2025-05-29 15:03:59 +08:00

10 lines
196 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{g as Xr}from"./index-CrAWI0wi.js";function Ve(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}function Rc(e){return Array.prototype.concat.apply([],e)}const Lt=Object.prototype.toString,xa=Object.prototype.hasOwnProperty;function Nt(e){return e===void 0}function ut(e){return e!==void 0}function Zr(e){return e==null}function Re(e){return Lt.call(e)==="[object Array]"}function Ze(e){return Lt.call(e)==="[object Object]"}function Se(e){return Lt.call(e)==="[object Number]"}function ze(e){const t=Lt.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"||t==="[object Proxy]"}function $e(e){return Lt.call(e)==="[object String]"}function _a(e){if(!Re(e))throw new Error("must supply array")}function Wn(e,t){return!Zr(e)&&xa.call(e,t)}function Ne(e,t){const n=mn(t);let r;return L(e,function(i,a){if(n(i,a))return r=i,!1}),r}function ba(e,t){const n=mn(t);let r=Re(e)?-1:void 0;return L(e,function(i,a){if(n(i,a))return r=a,!1}),r}function lt(e,t){const n=mn(t);let r=[];return L(e,function(i,a){n(i,a)&&r.push(i)}),r}function L(e,t){let n,r;if(Nt(e))return;const i=Re(e)?Pa:Ca;for(let a in e)if(Wn(e,a)&&(n=e[a],r=t(n,i(a)),r===!1))return n}function Cc(e,t){if(Nt(e))return[];_a(e);const n=mn(t);return e.filter(function(r,i){return!n(r,i)})}function wt(e,t,n){return L(e,function(r,i){n=t(n,r,i)}),n}function hn(e,t){return!!wt(e,function(n,r,i){return n&&t(r,i)},!0)}function Qr(e,t){return!!Ne(e,t)}function dn(e,t){let n=[];return L(e,function(r,i){n.push(t(r,i))}),n}function Sa(e){return e&&Object.keys(e)||[]}function Pc(e){return Sa(e).length}function Mc(e){return dn(e,t=>t)}function Jr(e,t,n={}){return t=zn(t),L(e,function(r){let i=t(r)||"_",a=n[i];a||(a=n[i]=[]),a.push(r)}),n}function Aa(e,...t){e=zn(e);let n={};return L(t,i=>Jr(i,e,n)),dn(n,function(i,a){return i[0]})}const Tc=Aa;function Ra(e,t){t=zn(t);let n=[];return L(e,function(r,i){let a=t(r,i),o={d:a,v:r};for(var u=0;u<n.length;u++){let{d:c}=n[u];if(a<c){n.splice(u,0,o);return}}n.push(o)}),dn(n,r=>r.v)}function wr(e){return function(t){return hn(e,function(n,r){return t[r]===n})}}function zn(e){return ze(e)?e:t=>t[e]}function mn(e){return ze(e)?e:t=>t===e}function Ca(e){return e}function Pa(e){return Number(e)}function Ma(e,t){let n,r,i,a;function o(_){let $=Date.now(),J=_?0:a+t-$;if(J>0)return u(J);e.apply(i,r),c()}function u(_){n=setTimeout(o,_)}function c(){n&&clearTimeout(n),n=a=r=i=void 0}function y(){n&&o(!0),c()}function v(..._){a=Date.now(),r=_,i=this,n||u(t)}return v.flush=y,v.cancel=c,v}function Ue(e,t){return e.bind(t)}function U(e,...t){return Object.assign(e,...t)}function Ta(e,t,n){let r=e;return L(t,function(i,a){if(typeof i!="number"&&typeof i!="string")throw new Error("illegal key type: "+typeof i+". Key should be of type number or string.");if(i==="constructor")throw new Error("illegal key: constructor");if(i==="__proto__")throw new Error("illegal key: __proto__");let o=t[a+1],u=r[i];ut(o)&&Zr(u)&&(u=r[i]=isNaN(+o)?{}:[]),Nt(o)?Nt(n)?delete r[i]:r[i]=n:r=u}),e}function Da(e,t){let n={},r=Object(e);return L(t,function(i){i in r&&(n[i]=e[i])}),n}function Oa(e,t){let n={},r=Object(e);return L(r,function(i,a){t.indexOf(a)===-1&&(n[a]=i)}),n}var Na=1e3;function Ye(e,t){var n=this;t=t||Na,e.on(["render.shape","render.connection"],t,function(r,i){var a=r.type,o=i.element,u=i.gfx,c=i.attrs;if(n.canRender(o))return a==="render.shape"?n.drawShape(u,o,c):n.drawConnection(u,o,c)}),e.on(["render.getShapePath","render.getConnectionPath"],t,function(r,i){if(n.canRender(i))return r.type==="render.getShapePath"?n.getShapePath(i):n.getConnectionPath(i)})}Ye.prototype.canRender=function(e){};Ye.prototype.drawShape=function(e,t){};Ye.prototype.drawConnection=function(e,t){};Ye.prototype.getShapePath=function(e){};Ye.prototype.getConnectionPath=function(e){};function Y(e,t){var n=Qe(e);return n&&typeof n.$instanceOf=="function"&&n.$instanceOf(t)}function ka(e,t){return Qr(t,function(n){return Y(e,n)})}function Qe(e){return e&&e.businessObject||e}function ct(e){return e&&e.di}function On(e,t){return Y(e,"bpmn:CallActivity")?!1:Y(e,"bpmn:SubProcess")?(t=t||ct(e),t&&Y(t,"bpmndi:BPMNPlane")?!0:t&&!!t.isExpanded):Y(e,"bpmn:Participant")?!!Qe(e).processRef:!0}function Dc(e){return e&&Qe(e).isInterrupting!==!1}function Ba(e){return e&&!!Qe(e).triggeredByEvent}function Hn(e,t){var n=Qe(e),r=!1;return n.eventDefinitions&&L(n.eventDefinitions,function(i){Y(i,t)&&(r=!0)}),r}function Oc(e){return Hn(e,"bpmn:ErrorEventDefinition")}function Nc(e){return Hn(e,"bpmn:EscalationEventDefinition")}function kc(e){return Hn(e,"bpmn:CompensateEventDefinition")}function ei(e){if(Y(e,"bpmn:FlowElement")||Y(e,"bpmn:Participant")||Y(e,"bpmn:Lane")||Y(e,"bpmn:SequenceFlow")||Y(e,"bpmn:MessageFlow")||Y(e,"bpmn:DataInput")||Y(e,"bpmn:DataOutput"))return"name";if(Y(e,"bpmn:TextAnnotation"))return"text";if(Y(e,"bpmn:Group"))return"categoryValueRef"}function La(e){var t=e.categoryValueRef;return t&&t.value||""}function sn(e){var t=e.businessObject,n=ei(t);if(n)return n==="categoryValueRef"?La(t):t[n]||""}function Bc(e,t,n){var r=e.businessObject,i=ei(r);return i&&(i==="categoryValueRef"?r.categoryValueRef.value=t:r[i]=t),e}function Ia(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch{}return e}function Fa(e,t){return t.appendChild(Ia(e,t))}function ye(e,t){return Fa(t,e),e}var Nn=2,ti={"alignment-baseline":1,"baseline-shift":1,clip:1,"clip-path":1,"clip-rule":1,color:1,"color-interpolation":1,"color-interpolation-filters":1,"color-profile":1,"color-rendering":1,cursor:1,direction:1,display:1,"dominant-baseline":1,"enable-background":1,fill:1,"fill-opacity":1,"fill-rule":1,filter:1,"flood-color":1,"flood-opacity":1,font:1,"font-family":1,"font-size":Nn,"font-size-adjust":1,"font-stretch":1,"font-style":1,"font-variant":1,"font-weight":1,"glyph-orientation-horizontal":1,"glyph-orientation-vertical":1,"image-rendering":1,kerning:1,"letter-spacing":1,"lighting-color":1,marker:1,"marker-end":1,"marker-mid":1,"marker-start":1,mask:1,opacity:1,overflow:1,"pointer-events":1,"shape-rendering":1,"stop-color":1,"stop-opacity":1,stroke:1,"stroke-dasharray":1,"stroke-dashoffset":1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":1,"stroke-opacity":1,"stroke-width":Nn,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function $a(e,t){return ti[t]?e.style[t]:e.getAttributeNS(null,t)}function ni(e,t,n){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=ti[r];i?(i===Nn&&typeof n=="number"&&(n=String(n)+"px"),e.style[r]=n):e.setAttributeNS(null,t,n)}function ja(e,t){var n=Object.keys(t),r,i;for(r=0,i;i=n[r];r++)ni(e,i,t[i])}function le(e,t,n){if(typeof t=="string")if(n!==void 0)ni(e,t,n);else return $a(e,t);else ja(e,t);return e}const Va=Object.prototype.toString;function Pe(e){return new Je(e)}function Je(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}Je.prototype.add=function(e){return this.list.add(e),this};Je.prototype.remove=function(e){return Va.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)};Je.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this};Je.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this};Je.prototype.array=function(){return Array.from(this.list)};Je.prototype.has=Je.prototype.contains=function(e){return this.list.contains(e)};function Wa(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function Lc(e){return e.cloneNode(!0)}var Un={svg:"http://www.w3.org/2000/svg"},xr='<svg xmlns="'+Un.svg+'"';function za(e){var t=!1;e.substring(0,4)==="<svg"?e.indexOf(Un.svg)===-1&&(e=xr+e.substring(4)):(e=xr+">"+e+"</svg>",t=!0);var n=Ha(e);if(!t)return n;for(var r=document.createDocumentFragment(),i=n.firstChild;i.firstChild;)r.appendChild(i.firstChild);return r}function Ha(e){var t;return t=new DOMParser,t.async=!1,t.parseFromString(e,"text/xml")}function fe(e,t){var n;return e=e.trim(),e.charAt(0)==="<"?(n=za(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(Un.svg,e),t&&le(n,t),n}var An=null;function ri(){return An===null&&(An=fe("svg")),An}function _r(e,t){var n,r,i=Object.keys(t);for(n=0;r=i[n];n++)e[r]=t[r];return e}function Ua(e,t,n,r,i,a){var o=ri().createSVGMatrix();switch(arguments.length){case 0:return o;case 1:return _r(o,e);case 6:return _r(o,{a:e,b:t,c:n,d:r,e:i,f:a})}}function Dt(e){return ri().createSVGTransform()}var br=/([&<>]{1})/g,Ka=/([&<>\n\r"]{1})/g,Ya={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function Rn(e,t){function n(r,i){return Ya[i]||i}return e.replace(t,n)}function ii(e,t){var n,r,i,a,o;switch(e.nodeType){case 3:t.push(Rn(e.textContent,br));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(i=e.attributes,n=0,r=i.length;n<r;++n)a=i.item(n),t.push(" ",a.name,'="',Rn(a.value,Ka),'"');if(e.hasChildNodes()){for(t.push(">"),o=e.childNodes,n=0,r=o.length;n<r;++n)ii(o.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("<!--",Rn(e.nodeValue,br),"-->");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function qa(e){for(var t=e.firstChild,n=[];t;)ii(t,n),t=t.nextSibling;return n.join("")}function Sr(e,t){return qa(e)}function It(e){var t=e.parentNode;return t&&t.removeChild(e),e}function Ga(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function Xa(e,t){var n,r;for(e.clear(),n=0;r=t[n];n++)e.appendItem(Ga(e,r))}function kt(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),Xa(n,t)),n.consolidate()}function pt(e){return e.flat().join(",").replace(/,?([A-z]),?/g,"$1")}function Za(e){return["M",e.x,e.y]}function Cn(e){return["L",e.x,e.y]}function Qa(e,t,n){return["C",e.x,e.y,t.x,t.y,n.x,n.y]}function Ja(e,t){const n=e.length,r=[Za(e[0])];for(let i=1;i<n;i++){const a=e[i-1],o=e[i],u=e[i+1];if(!u||!t){r.push(Cn(o));continue}const c=Math.min(t,kn(o.x-a.x,o.y-a.y),kn(u.x-o.x,u.y-o.y));if(!c){r.push(Cn(o));continue}const y=Kt(o,a,c),v=Kt(o,a,c*.5),_=Kt(o,u,c),$=Kt(o,u,c*.5);r.push(Cn(y)),r.push(Qa(v,$,_))}return r}function Kt(e,t,n){const r=t.x-e.x,i=t.y-e.y,a=kn(r,i),o=n/a;return{x:e.x+r*o,y:e.y+i*o}}function kn(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function Kn(e,t,n){Se(t)&&(n=t,t=null),t||(t={});const r=fe("path",t);return Se(n)&&(r.dataset.cornerRadius=String(n)),ai(r,e)}function ai(e,t){const n=parseInt(e.dataset.cornerRadius,10)||0;return le(e,{d:pt(Ja(t,n))}),e}var Tt="hsl(225, 10%, 15%)";function Ie(e,t,n){function r(i,a){return hn(a,function(o,u){return i[u]==o})}return Qr(e.eventDefinitions,function(i){return i.$type===t&&r(e,n)})}function eo(e){return e.$type==="bpmn:IntermediateThrowEvent"||e.$type==="bpmn:EndEvent"}function to(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection}function we(e){return e.businessObject}function re(e,t){var n=ct(e);return n.get("color:background-color")||n.get("bioc:fill")||t||"white"}function O(e,t){var n=ct(e);return n.get("color:border-color")||n.get("bioc:stroke")||t||Tt}function Pt(e,t,n){var r=ct(e),i=r.get("label");return i&&i.get("color:color")||t||O(e,n)}function no(e){var t=e.x+e.width/2,n=e.y+e.height/2,r=e.width/2,i=[["M",t,n],["m",0,-r],["a",r,r,0,1,1,0,2*r],["a",r,r,0,1,1,0,-2*r],["z"]];return pt(i)}function ro(e,t){var n=e.x,r=e.y,i=e.width,a=e.height,o=[["M",n+t,r],["l",i-t*2,0],["a",t,t,0,0,1,t,t],["l",0,a-t*2],["a",t,t,0,0,1,-10,t],["l",t*2-i,0],["a",t,t,0,0,1,-10,-10],["l",0,t*2-a],["a",t,t,0,0,1,t,-10],["z"]];return pt(o)}function io(e){var t=e.width,n=e.height,r=e.x,i=e.y,a=t/2,o=n/2,u=[["M",r+a,i],["l",a,o],["l",-a,o],["l",-a,-o],["z"]];return pt(u)}function ao(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=[["M",t,n],["l",r,0],["l",0,i],["l",-r,0],["z"]];return pt(a)}function oo(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(e)}const so=Object.prototype.toString,uo=Object.prototype.hasOwnProperty;function lo(e){return e===void 0}function co(e){return so.call(e)==="[object Array]"}function fo(e,t){return uo.call(e,t)}function Ar(e,t){let n,r;if(lo(e))return;const i=co(e)?ho:po;for(let a in e)if(fo(e,a)&&(n=e[a],r=t(n,i(a)),r===!1))return n}function po(e){return e}function ho(e){return Number(e)}function Ae(e,...t){const n=e.style;return Ar(t,function(r){r&&Ar(r,function(i,a){n[a]=i})}),e}function mo(e,t,n){return arguments.length==2?e.getAttribute(t):n===null?e.removeAttribute(t):(e.setAttribute(t,n),e)}const yo=Object.prototype.toString;function Ft(e){return new et(e)}function et(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}et.prototype.add=function(e){return this.list.add(e),this};et.prototype.remove=function(e){return yo.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)};et.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this};et.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this};et.prototype.array=function(){return Array.from(this.list)};et.prototype.has=et.prototype.contains=function(e){return this.list.contains(e)};function oi(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function Yn(e,t,n){var r=n?e:e.parentNode;return r&&typeof r.closest=="function"&&r.closest(t)||null}var un={},ln,Bn,qn;function si(){ln=window.addEventListener?"addEventListener":"attachEvent",Bn=window.removeEventListener?"removeEventListener":"detachEvent",qn=ln!=="addEventListener"?"on":""}var vo=un.bind=function(e,t,n,r){return ln||si(),e[ln](qn+t,n,r||!1),n},go=un.unbind=function(e,t,n,r){return Bn||si(),e[Bn](qn+t,n,r||!1),n},Xe=oo({__proto__:null,bind:vo,unbind:go,default:un},[un]),ui=["focus","blur"];function Eo(e,t,n,r,i){return ui.indexOf(n)!==-1&&(i=!0),Xe.bind(e,n,function(a){var o=a.target||a.srcElement;a.delegateTarget=Yn(o,t,!0),a.delegateTarget&&r.call(e,a)},i)}function wo(e,t,n,r){return ui.indexOf(t)!==-1&&(r=!0),Xe.unbind(e,t,n,r)}var Ln={bind:Eo,unbind:wo},xo=_o,li=!1,Yt;typeof document<"u"&&(Yt=document.createElement("div"),Yt.innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',li=!Yt.getElementsByTagName("link").length,Yt=void 0);var ve={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:li?[1,"X<div>","</div>"]:[0,"",""]};ve.td=ve.th=[3,"<table><tbody><tr>","</tr></tbody></table>"];ve.option=ve.optgroup=[1,'<select multiple="multiple">',"</select>"];ve.thead=ve.tbody=ve.colgroup=ve.caption=ve.tfoot=[1,"<table>","</table>"];ve.polyline=ve.ellipse=ve.polygon=ve.circle=ve.text=ve.line=ve.path=ve.rect=ve.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function _o(e,t){if(typeof e!="string")throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var r=n[1];if(r=="body"){var c=t.createElement("html");return c.innerHTML=e,c.removeChild(c.lastChild)}var i=Object.prototype.hasOwnProperty.call(ve,r)?ve[r]:ve._default,a=i[0],o=i[1],u=i[2],c=t.createElement("div");for(c.innerHTML=o+e+u;a--;)c=c.lastChild;if(c.firstChild==c.lastChild)return c.removeChild(c.firstChild);for(var y=t.createDocumentFragment();c.firstChild;)y.appendChild(c.removeChild(c.firstChild));return y}var je=xo;function Ic(e,t){return e&&typeof e.matches=="function"&&e.matches(t)||!1}function Le(e,t){return t=t||document,t.querySelector(e)}function bo(e,t){return t=t||document,t.querySelectorAll(e)}function cn(e){e.parentNode&&e.parentNode.removeChild(e)}function Rr(e,t,n,r,i){var a=Dt();a.setTranslate(t,n);var o=Dt();o.setRotate(r||0,0,0);var u=Dt();u.setScale(1,1),kt(e,[a,o,u])}function ci(e,t,n){var r=Dt();r.setTranslate(t,n),kt(e,r)}function So(e,t){var n=Dt();n.setRotate(t,0,0),kt(e,n)}function Ao(e,t){return t={exports:{}},e(t,t.exports),t.exports}var Ro=Ao(function(e){var t=e.exports=function(n,r){if(r||(r=16),n===void 0&&(n=128),n<=0)return"0";for(var i=Math.log(Math.pow(2,n))/Math.log(r),a=2;i===1/0;a*=2)i=Math.log(Math.pow(2,n/a))/Math.log(r)*a;for(var o=i-Math.floor(i),u="",a=0;a<Math.floor(i);a++){var c=Math.floor(Math.random()*r).toString(r);u=c+u}if(o){var y=Math.pow(r,o),c=Math.floor(Math.random()*y).toString(r);u=c+u}var v=parseInt(u,r);return v!==1/0&&v>=Math.pow(2,n)?t(n,r):u};t.rack=function(n,r,i){var a=function(u){var c=0;do{if(c++>10)if(i)n+=i;else throw new Error("too many ID collisions, use more bits");var y=t(n,r)}while(Object.hasOwnProperty.call(o,y));return o[y]=u,y},o=a.hats={};return a.get=function(u){return a.hats[u]},a.set=function(u,c){return a.hats[u]=c,a},a.bits=n||128,a.base=r||16,a}});function Ke(e){if(!(this instanceof Ke))return new Ke(e);e=e||[128,36,1],this._seed=e.length?Ro.rack(e[0],e[1],e[2]):e}Ke.prototype.next=function(e){return this._seed(e||!0)};Ke.prototype.nextPrefixed=function(e,t){var n;do n=e+this.next(!0);while(this.assigned(n));return this.claim(n,t),n};Ke.prototype.claim=function(e,t){this._seed.set(e,t||!0)};Ke.prototype.assigned=function(e){return this._seed.get(e)||!1};Ke.prototype.unclaim=function(e){delete this._seed.hats[e]};Ke.prototype.clear=function(){var e=this._seed.hats,t;for(t in e)this.unclaim(t)};var Co=new Ke,en=10,Pn=3,gt=.95,Po=.35,Mo=10;function ht(e,t,n,r,i,a,o){Ye.call(this,t,o);var u=e&&e.defaultFillColor,c=e&&e.defaultStrokeColor,y=e&&e.defaultLabelColor,v=Co.next(),_={};function $(h){return n.computeStyle(h,{strokeLinecap:"round",strokeLinejoin:"round",stroke:Tt,strokeWidth:2,fill:"white"})}function J(h){return n.computeStyle(h,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:Tt,strokeWidth:2})}function ie(h,s){var{ref:l={x:0,y:0},scale:f=1,element:m}=s,p=fe("marker",{id:h,viewBox:"0 0 20 20",refX:l.x,refY:l.y,markerWidth:20*f,markerHeight:20*f,orient:"auto"});ye(p,m);var d=Le("defs",i._svg);d||(d=fe("defs"),ye(i._svg,d)),ye(d,p),_[h]=p}function te(h){return h.replace(/[^0-9a-zA-z]+/g,"_")}function Z(h,s,l){var f=h+"-"+te(s)+"-"+te(l)+"-"+v;return _[f]||ae(f,h,s,l),"url(#"+f+")"}function ae(h,s,l,f){if(s==="sequenceflow-end"){var m=fe("path",{d:"M 1 5 L 11 10 L 1 15 Z",...$({fill:f,stroke:f,strokeWidth:1})});ie(h,{element:m,ref:{x:11,y:10},scale:.5})}if(s==="messageflow-start"){var p=fe("circle",{cx:6,cy:6,r:3.5,...$({fill:l,stroke:f,strokeWidth:1,strokeDasharray:[1e4,1]})});ie(h,{element:p,ref:{x:6,y:6}})}if(s==="messageflow-end"){var d=fe("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...$({fill:l,stroke:f,strokeWidth:1,strokeDasharray:[1e4,1]})});ie(h,{element:d,ref:{x:8.5,y:5}})}if(s==="association-start"){var w=fe("path",{d:"M 11 5 L 1 10 L 11 15",...J({fill:"none",stroke:f,strokeWidth:1.5,strokeDasharray:[1e4,1]})});ie(h,{element:w,ref:{x:1,y:10},scale:.5})}if(s==="association-end"){var T=fe("path",{d:"M 1 5 L 11 10 L 1 15",...J({fill:"none",stroke:f,strokeWidth:1.5,strokeDasharray:[1e4,1]})});ie(h,{element:T,ref:{x:11,y:10},scale:.5})}if(s==="conditional-flow-marker"){var C=fe("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...$({fill:l,stroke:f})});ie(h,{element:C,ref:{x:-1,y:10},scale:.5})}if(s==="conditional-default-flow-marker"){var k=fe("path",{d:"M 6 4 L 10 16",...$({stroke:f})});ie(h,{element:k,ref:{x:0,y:10},scale:.5})}}function E(h,s,l,f,m){Ze(f)&&(m=f,f=0),f=f||0,m=$(m),m.fill==="none"&&delete m.fillOpacity;var p=s/2,d=l/2,w=fe("circle",{cx:p,cy:d,r:Math.round((s+l)/4-f),...m});return ye(h,w),w}function V(h,s,l,f,m,p){Ze(m)&&(p=m,m=0),m=m||0,p=$(p);var d=fe("rect",{x:m,y:m,width:s-m*2,height:l-m*2,rx:f,ry:f,...p});return ye(h,d),d}function S(h,s,l,f){var m=s/2,p=l/2,d=[{x:m,y:0},{x:s,y:p},{x:m,y:l},{x:0,y:p}],w=d.map(function(C){return C.x+","+C.y}).join(" ");f=$(f);var T=fe("polygon",{...f,points:w});return ye(h,T),T}function M(h,s,l,f){l=J(l);var m=Kn(s,l,f);return ye(h,m),m}function N(h,s,l){return M(h,s,l,5)}function D(h,s,l){l=J(l);var f=fe("path",{...l,d:s});return ye(h,f),f}function A(h,s,l,f){return D(s,l,U({"data-marker":h},f))}function g(h){return ue[h]}function P(h){return function(s,l){return g(h)(s,l)}}function j(h,s){var l=we(h),f=eo(l);return l.eventDefinitions&&l.eventDefinitions.length>1?l.parallelMultiple?g("bpmn:ParallelMultipleEventDefinition")(s,h,f):g("bpmn:MultipleEventDefinition")(s,h,f):Ie(l,"bpmn:MessageEventDefinition")?g("bpmn:MessageEventDefinition")(s,h,f):Ie(l,"bpmn:TimerEventDefinition")?g("bpmn:TimerEventDefinition")(s,h,f):Ie(l,"bpmn:ConditionalEventDefinition")?g("bpmn:ConditionalEventDefinition")(s,h):Ie(l,"bpmn:SignalEventDefinition")?g("bpmn:SignalEventDefinition")(s,h,f):Ie(l,"bpmn:EscalationEventDefinition")?g("bpmn:EscalationEventDefinition")(s,h,f):Ie(l,"bpmn:LinkEventDefinition")?g("bpmn:LinkEventDefinition")(s,h,f):Ie(l,"bpmn:ErrorEventDefinition")?g("bpmn:ErrorEventDefinition")(s,h,f):Ie(l,"bpmn:CancelEventDefinition")?g("bpmn:CancelEventDefinition")(s,h,f):Ie(l,"bpmn:CompensateEventDefinition")?g("bpmn:CompensateEventDefinition")(s,h,f):Ie(l,"bpmn:TerminateEventDefinition")?g("bpmn:TerminateEventDefinition")(s,h,f):null}function F(h,s,l){l=U({size:{width:100}},l);var f=a.createText(s||"",l);return Pe(f).add("djs-label"),ye(h,f),f}function I(h,s,l){var f=we(s);return F(h,f.name,{box:s,align:l,padding:7,style:{fill:Pt(s,y,c)}})}function se(h,s){var l={width:90,height:30,x:s.width/2+s.x,y:s.height/2+s.y};return F(h,sn(s),{box:l,fitBox:!0,style:U({},a.getExternalStyle(),{fill:Pt(s,y,c)})})}function Be(h,s,l){var f=F(h,s,{box:{height:30,width:l.height},align:"center-middle",style:{fill:Pt(l,y,c)}}),m=-1*l.height;Rr(f,0,-m,270)}var ue=this.handlers={"bpmn:Event":function(h,s,l){return"fillOpacity"in l||(l.fillOpacity=gt),E(h,s.width,s.height,l)},"bpmn:StartEvent":function(h,s){var l={fill:re(s,u),stroke:O(s,c)},f=we(s);f.isInterrupting||(l={strokeDasharray:"6",fill:re(s,u),stroke:O(s,c)});var m=g("bpmn:Event")(h,s,l);return j(s,h),m},"bpmn:MessageEventDefinition":function(h,s,l){var f=r.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:s.width,containerHeight:s.height,position:{mx:.235,my:.315}}),m=l?O(s,c):re(s,u),p=l?re(s,u):O(s,c),d=D(h,f,{strokeWidth:1,fill:m,stroke:p});return d},"bpmn:TimerEventDefinition":function(h,s){var l=E(h,s.width,s.height,.2*s.height,{strokeWidth:2,fill:re(s,u),stroke:O(s,c)}),f=r.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:s.width,containerHeight:s.height,position:{mx:.5,my:.5}});D(h,f,{strokeWidth:2,stroke:O(s,c)});for(var m=0;m<12;m++){var p=r.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:s.width,containerHeight:s.height,position:{mx:.5,my:.5}}),d=s.width/2,w=s.height/2;D(h,p,{strokeWidth:1,transform:"rotate("+m*30+","+w+","+d+")",stroke:O(s,c)})}return l},"bpmn:EscalationEventDefinition":function(h,s,l){var f=r.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:.5,my:.2}}),m=l?O(s,c):"none";return D(h,f,{strokeWidth:1,fill:m,stroke:O(s,c)})},"bpmn:ConditionalEventDefinition":function(h,s){var l=r.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:.5,my:.222}});return D(h,l,{strokeWidth:1,stroke:O(s,c)})},"bpmn:LinkEventDefinition":function(h,s,l){var f=r.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:.57,my:.263}}),m=l?O(s,c):"none";return D(h,f,{strokeWidth:1,fill:m,stroke:O(s,c)})},"bpmn:ErrorEventDefinition":function(h,s,l){var f=r.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:s.width,containerHeight:s.height,position:{mx:.2,my:.722}}),m=l?O(s,c):"none";return D(h,f,{strokeWidth:1,fill:m,stroke:O(s,c)})},"bpmn:CancelEventDefinition":function(h,s,l){var f=r.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:.638,my:-.055}}),m=l?O(s,c):"none",p=D(h,f,{strokeWidth:1,fill:m,stroke:O(s,c)});return So(p,45),p},"bpmn:CompensateEventDefinition":function(h,s,l){var f=r.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:.22,my:.5}}),m=l?O(s,c):"none";return D(h,f,{strokeWidth:1,fill:m,stroke:O(s,c)})},"bpmn:SignalEventDefinition":function(h,s,l){var f=r.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:s.width,containerHeight:s.height,position:{mx:.5,my:.2}}),m=l?O(s,c):"none";return D(h,f,{strokeWidth:1,fill:m,stroke:O(s,c)})},"bpmn:MultipleEventDefinition":function(h,s,l){var f=r.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:s.width,containerHeight:s.height,position:{mx:.222,my:.36}}),m=l?O(s,c):"none";return D(h,f,{strokeWidth:1,fill:m})},"bpmn:ParallelMultipleEventDefinition":function(h,s){var l=r.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:s.width,containerHeight:s.height,position:{mx:.458,my:.194}});return D(h,l,{strokeWidth:1,fill:O(s,c),stroke:O(s,c)})},"bpmn:EndEvent":function(h,s){var l=g("bpmn:Event")(h,s,{strokeWidth:4,fill:re(s,u),stroke:O(s,c)});return j(s,h),l},"bpmn:TerminateEventDefinition":function(h,s){var l=E(h,s.width,s.height,8,{strokeWidth:4,fill:O(s,c),stroke:O(s,c)});return l},"bpmn:IntermediateEvent":function(h,s){var l=g("bpmn:Event")(h,s,{strokeWidth:1.5,fill:re(s,u),stroke:O(s,c)});return E(h,s.width,s.height,Pn,{strokeWidth:1.5,fill:re(s,"none"),stroke:O(s,c)}),j(s,h),l},"bpmn:IntermediateCatchEvent":P("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":P("bpmn:IntermediateEvent"),"bpmn:Activity":function(h,s,l){return l=l||{},"fillOpacity"in l||(l.fillOpacity=gt),V(h,s.width,s.height,en,l)},"bpmn:Task":function(h,s){var l={fill:re(s,u),stroke:O(s,c)},f=g("bpmn:Activity")(h,s,l);return I(h,s,"center-middle"),ee(h,s),f},"bpmn:ServiceTask":function(h,s){var l=g("bpmn:Task")(h,s),f=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});D(h,f,{strokeWidth:1,fill:re(s,u),stroke:O(s,c)});var m=r.getScaledPath("TASK_TYPE_SERVICE_FILL",{abspos:{x:17.2,y:18}});D(h,m,{strokeWidth:0,fill:re(s,u)});var p=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return D(h,p,{strokeWidth:1,fill:re(s,u),stroke:O(s,c)}),l},"bpmn:UserTask":function(h,s){var l=g("bpmn:Task")(h,s),f=15,m=12,p=r.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:f,y:m}});D(h,p,{strokeWidth:.5,fill:re(s,u),stroke:O(s,c)});var d=r.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:f,y:m}});D(h,d,{strokeWidth:.5,fill:re(s,u),stroke:O(s,c)});var w=r.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:f,y:m}});return D(h,w,{strokeWidth:.5,fill:O(s,c),stroke:O(s,c)}),l},"bpmn:ManualTask":function(h,s){var l=g("bpmn:Task")(h,s),f=r.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return D(h,f,{strokeWidth:.5,fill:re(s,u),stroke:O(s,c)}),l},"bpmn:SendTask":function(h,s){var l=g("bpmn:Task")(h,s),f=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return D(h,f,{strokeWidth:1,fill:O(s,c),stroke:re(s,u)}),l},"bpmn:ReceiveTask":function(h,s){var l=we(s),f=g("bpmn:Task")(h,s),m;return l.instantiate?(E(h,28,28,20*.22,{strokeWidth:1}),m=r.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):m=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),D(h,m,{strokeWidth:1,fill:re(s,u),stroke:O(s,c)}),f},"bpmn:ScriptTask":function(h,s){var l=g("bpmn:Task")(h,s),f=r.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return D(h,f,{strokeWidth:1,stroke:O(s,c)}),l},"bpmn:BusinessRuleTask":function(h,s){var l=g("bpmn:Task")(h,s),f=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),m=D(h,f);le(m,{strokeWidth:1,fill:re(s,"#aaaaaa"),stroke:O(s,c)});var p=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),d=D(h,p);return le(d,{strokeWidth:1,stroke:O(s,c)}),l},"bpmn:SubProcess":function(h,s,l){l={fill:re(s,u),stroke:O(s,c),...l};var f=g("bpmn:Activity")(h,s,l),m=On(s);return Ba(s)&&le(f,{strokeDasharray:"0, 5.5",strokeWidth:2.5}),I(h,s,m?"center-top":"center-middle"),m?ee(h,s):ee(h,s,["SubProcessMarker"]),f},"bpmn:AdHocSubProcess":function(h,s){return g("bpmn:SubProcess")(h,s)},"bpmn:Transaction":function(h,s){var l=g("bpmn:SubProcess")(h,s,{strokeWidth:1.5}),f=n.style(["no-fill","no-events"],{stroke:O(s,c),strokeWidth:1.5});return V(h,s.width,s.height,en-3,Pn,f),l},"bpmn:CallActivity":function(h,s){return g("bpmn:SubProcess")(h,s,{strokeWidth:5})},"bpmn:Participant":function(h,s){var l=1.5,f={fillOpacity:gt,fill:re(s,u),stroke:O(s,c),strokeWidth:l},m=g("bpmn:Lane")(h,s,f),p=On(s);if(p){M(h,[{x:30,y:0},{x:30,y:s.height}],{stroke:O(s,c),strokeWidth:l});var d=we(s).name;Be(h,d,s)}else{var w=we(s).name;F(h,w,{box:s,align:"center-middle",style:{fill:Pt(s,y,c)}})}var T=!!we(s).participantMultiplicity;return T&&g("ParticipantMultiplicityMarker")(h,s),m},"bpmn:Lane":function(h,s,l){var f=V(h,s.width,s.height,0,{fill:re(s,u),fillOpacity:Po,stroke:O(s,c),strokeWidth:1.5,...l}),m=we(s);if(m.$type==="bpmn:Lane"){var p=m.name;Be(h,p,s)}return f},"bpmn:InclusiveGateway":function(h,s){var l=g("bpmn:Gateway")(h,s);return E(h,s.width,s.height,s.height*.24,{strokeWidth:2.5,fill:re(s,u),stroke:O(s,c)}),l},"bpmn:ExclusiveGateway":function(h,s){var l=g("bpmn:Gateway")(h,s),f=r.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:s.width,containerHeight:s.height,position:{mx:.32,my:.3}});return ct(s).isMarkerVisible&&D(h,f,{strokeWidth:1,fill:O(s,c),stroke:O(s,c)}),l},"bpmn:ComplexGateway":function(h,s){var l=g("bpmn:Gateway")(h,s),f=r.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:s.width,containerHeight:s.height,position:{mx:.46,my:.26}});return D(h,f,{strokeWidth:1,fill:O(s,c),stroke:O(s,c)}),l},"bpmn:ParallelGateway":function(h,s){var l=g("bpmn:Gateway")(h,s),f=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:s.width,containerHeight:s.height,position:{mx:.46,my:.2}});return D(h,f,{strokeWidth:1,fill:O(s,c),stroke:O(s,c)}),l},"bpmn:EventBasedGateway":function(h,s){var l=we(s),f=g("bpmn:Gateway")(h,s);E(h,s.width,s.height,s.height*.2,{strokeWidth:1,fill:"none",stroke:O(s,c)});var m=l.eventGatewayType,p=!!l.instantiate;function d(){var T=r.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:s.width,containerHeight:s.height,position:{mx:.36,my:.44}});D(h,T,{strokeWidth:2,fill:re(s,"none"),stroke:O(s,c)})}if(m==="Parallel"){var w=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:s.width,containerHeight:s.height,position:{mx:.474,my:.296}});D(h,w,{strokeWidth:1,fill:"none"})}else m==="Exclusive"&&(p||E(h,s.width,s.height,s.height*.26,{strokeWidth:1,fill:"none",stroke:O(s,c)}),d());return f},"bpmn:Gateway":function(h,s){return S(h,s.width,s.height,{fill:re(s,u),fillOpacity:gt,stroke:O(s,c)})},"bpmn:SequenceFlow":function(h,s){var l=re(s,u),f=O(s,c),m=N(h,s.waypoints,{markerEnd:Z("sequenceflow-end",l,f),stroke:O(s,c)}),p=we(s),d;return s.source&&(d=s.source.businessObject,p.conditionExpression&&d.$instanceOf("bpmn:Activity")&&le(m,{markerStart:Z("conditional-flow-marker",l,f)}),d.default&&(d.$instanceOf("bpmn:Gateway")||d.$instanceOf("bpmn:Activity"))&&d.default===p&&le(m,{markerStart:Z("conditional-default-flow-marker",l,f)})),m},"bpmn:Association":function(h,s,l){var f=we(s),m=re(s,u),p=O(s,c);return l={strokeDasharray:"0, 5",stroke:O(s,c),...l},(f.associationDirection==="One"||f.associationDirection==="Both")&&(l.markerEnd=Z("association-end",m,p)),f.associationDirection==="Both"&&(l.markerStart=Z("association-start",m,p)),N(h,s.waypoints,l)},"bpmn:DataInputAssociation":function(h,s){var l=re(s,u),f=O(s,c);return g("bpmn:Association")(h,s,{markerEnd:Z("association-end",l,f)})},"bpmn:DataOutputAssociation":function(h,s){var l=re(s,u),f=O(s,c);return g("bpmn:Association")(h,s,{markerEnd:Z("association-end",l,f)})},"bpmn:MessageFlow":function(h,s){var l=we(s),f=ct(s),m=re(s,u),p=O(s,c),d=N(h,s.waypoints,{markerEnd:Z("messageflow-end",m,p),markerStart:Z("messageflow-start",m,p),strokeDasharray:"10, 11",strokeWidth:1.5,stroke:O(s,c)});if(l.messageRef){var w=d.getPointAtLength(d.getTotalLength()/2),T=r.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:w.x,y:w.y}}),C={strokeWidth:1};f.messageVisibleKind==="initiating"?(C.fill="white",C.stroke=Tt):(C.fill="#888",C.stroke="white");var k=D(h,T,C),b=l.messageRef.name,z=F(h,b,{align:"center-top",fitBox:!0,style:{fill:O(s,y)}}),K=k.getBBox(),W=z.getBBox(),x=w.x-W.width/2,R=w.y+K.height/2+Mo;Rr(z,x,R,0)}return d},"bpmn:DataObject":function(h,s){var l=r.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:.474,my:.296}}),f=D(h,l,{fill:re(s,u),fillOpacity:gt,stroke:O(s,c)}),m=we(s);return to(m)&&Oe(h,s),f},"bpmn:DataObjectReference":P("bpmn:DataObject"),"bpmn:DataInput":function(h,s){var l=r.getRawPath("DATA_ARROW"),f=g("bpmn:DataObject")(h,s);return D(h,l,{strokeWidth:1}),f},"bpmn:DataOutput":function(h,s){var l=r.getRawPath("DATA_ARROW"),f=g("bpmn:DataObject")(h,s);return D(h,l,{strokeWidth:1,fill:Tt}),f},"bpmn:DataStoreReference":function(h,s){var l=r.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:0,my:.133}}),f=D(h,l,{strokeWidth:2,fill:re(s,u),fillOpacity:gt,stroke:O(s,c)});return f},"bpmn:BoundaryEvent":function(h,s){var l=we(s),f=l.cancelActivity,m={strokeWidth:1.5,fill:re(s,u),stroke:O(s,c)};f||(m.strokeDasharray="6");var p={...m,fillOpacity:1},d={...m,fill:"none"},w=g("bpmn:Event")(h,s,p);return E(h,s.width,s.height,Pn,d),j(s,h),w},"bpmn:Group":function(h,s){return V(h,s.width,s.height,en,{stroke:O(s,c),strokeWidth:1.5,strokeDasharray:"10,6,0,6",fill:"none",pointerEvents:"none"})},label:function(h,s){return se(h,s)},"bpmn:TextAnnotation":function(h,s){var l=V(h,s.width,s.height,0,0,{fill:"none",stroke:"none"}),f=r.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:0,my:0}});D(h,f,{stroke:O(s,c)});var m=we(s).text||"";return F(h,m,{box:s,align:"left-top",padding:7,style:{fill:Pt(s,y,c)}}),l},ParticipantMultiplicityMarker:function(h,s){var l=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:s.width/2/s.width,my:(s.height-15)/s.height}});A("participant-multiplicity",h,l,{strokeWidth:2,fill:re(s,u),stroke:O(s,c)})},SubProcessMarker:function(h,s){var l=V(h,14,14,0,{strokeWidth:1,fill:re(s,u),stroke:O(s,c)});ci(l,s.width/2-7.5,s.height-20);var f=r.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:s.width,containerHeight:s.height,position:{mx:(s.width/2-7.5)/s.width,my:(s.height-20)/s.height}});A("sub-process",h,f,{fill:re(s,u),stroke:O(s,c)})},ParallelMarker:function(h,s,l){var f=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:(s.width/2+l.parallel)/s.width,my:(s.height-20)/s.height}});A("parallel",h,f,{fill:re(s,u),stroke:O(s,c)})},SequentialMarker:function(h,s,l){var f=r.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:(s.width/2+l.seq)/s.width,my:(s.height-19)/s.height}});A("sequential",h,f,{fill:re(s,u),stroke:O(s,c)})},CompensationMarker:function(h,s,l){var f=r.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:(s.width/2+l.compensation)/s.width,my:(s.height-13)/s.height}});A("compensation",h,f,{strokeWidth:1,fill:re(s,u),stroke:O(s,c)})},LoopMarker:function(h,s,l){var f=r.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:(s.width/2+l.loop)/s.width,my:(s.height-7)/s.height}});A("loop",h,f,{strokeWidth:1.5,fill:re(s,u),stroke:O(s,c),strokeMiterlimit:.5})},AdhocMarker:function(h,s,l){var f=r.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:(s.width/2+l.adhoc)/s.width,my:(s.height-15)/s.height}});A("adhoc",h,f,{strokeWidth:1,fill:O(s,c),stroke:O(s,c)})}};function ee(h,s,l){var f=we(s),m=l&&l.indexOf("SubProcessMarker")!==-1,p;m?p={seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:p={seq:-3,parallel:-6,compensation:-27,loop:0,adhoc:10},L(l,function(T){g(T)(h,s,p)}),f.isForCompensation&&g("CompensationMarker")(h,s,p),f.$type==="bpmn:AdHocSubProcess"&&g("AdhocMarker")(h,s,p);var d=f.loopCharacteristics,w=d&&d.isSequential;d&&(w===void 0&&g("LoopMarker")(h,s,p),w===!1&&g("ParallelMarker")(h,s,p),w===!0&&g("SequentialMarker")(h,s,p))}function Oe(h,s){var l=(s.height-18)/s.height,f=r.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:s.width,containerHeight:s.height,position:{mx:.33,my:l}});D(h,f,{strokeWidth:2})}this._drawPath=D,this._renderer=g}Ve(ht,Ye);ht.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"];ht.prototype.canRender=function(e){return Y(e,"bpmn:BaseElement")};ht.prototype.drawShape=function(e,t){var n=t.type,r=this._renderer(n);return r(e,t)};ht.prototype.drawConnection=function(e,t){var n=t.type,r=this._renderer(n);return r(e,t)};ht.prototype.getShapePath=function(e){return Y(e,"bpmn:Event")?no(e):Y(e,"bpmn:Activity")?ro(e,en):Y(e,"bpmn:Gateway")?io(e):ao(e)};var To=0,Do={width:150,height:50};function Oo(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function No(e){return Ze(e)?U({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}function ko(e,t){t.textContent=e;var n;try{var r,i=e==="";return t.textContent=i?"dummy":e,n=t.getBBox(),r={width:n.width+n.x*2,height:n.height},i&&(r.width=0),r}catch{return{width:0,height:0}}}function Bo(e,t,n){for(var r=e.shift(),i=r,a;;){if(a=ko(i,n),a.width=i?a.width:0,i===" "||i===""||a.width<Math.round(t)||i.length<2)return Lo(e,i,r,a);i=Fo(i,a.width,t)}}function Lo(e,t,n,r){if(t.length<n.length){var i=n.slice(t.length).trim();e.unshift(i)}return{width:r.width,height:r.height,text:t}}var Cr="­";function Io(e,t){var n=e.split(/(\s|-|\u00AD)/g),r,i=[],a=0;if(n.length>1)for(;r=n.shift();)if(r.length+a<t)i.push(r),a+=r.length;else{(r==="-"||r===Cr)&&i.pop();break}var o=i[i.length-1];return o&&o===Cr&&(i[i.length-1]="-"),i.join("")}function Fo(e,t,n){var r=Math.max(e.length*(n/t),1),i=Io(e,r);return i||(i=e.slice(0,Math.max(Math.round(r-1),1))),i}function $o(){var e=document.getElementById("helper-svg");return e||(e=fe("svg"),le(e,{id:"helper-svg"}),Ae(e,{visibility:"hidden",position:"fixed",width:0,height:0}),document.body.appendChild(e)),e}function yn(e){this._config=U({},{size:Do,padding:To,style:{},align:"center-top"},e||{})}yn.prototype.createText=function(e,t){return this.layoutText(e,t).element};yn.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions};yn.prototype.layoutText=function(e,t){var n=U({},this._config.size,t.box),r=U({},this._config.style,t.style),i=Oo(t.align||this._config.align),a=No(t.padding!==void 0?t.padding:this._config.padding),o=t.fitBox||!1,u=jo(r),c=e.split(/\u00AD?\r?\n/),y=[],v=n.width-a.left-a.right,_=fe("text");le(_,{x:0,y:0}),le(_,r);var $=$o();for(ye($,_);c.length;)y.push(Bo(c,v,_));i.vertical==="middle"&&(a.top=a.bottom=0);var J=wt(y,function(E,V,S){return E+(u||V.height)},0)+a.top+a.bottom,ie=wt(y,function(E,V,S){return V.width>E?V.width:E},0),te=a.top;i.vertical==="middle"&&(te+=(n.height-J)/2),te-=(u||y[0].height)/4;var Z=fe("text");le(Z,r),L(y,function(E){var V;switch(te+=u||E.height,i.horizontal){case"left":V=a.left;break;case"right":V=(o?ie:v)-a.right-E.width;break;default:V=Math.max(((o?ie:v)-E.width)/2+a.left,0)}var S=fe("tspan");le(S,{x:V,y:te}),S.textContent=E.text,ye(Z,S)}),It(_);var ae={width:ie,height:J};return{dimensions:ae,element:Z}};function jo(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}var Vo=12,Wo=1.2,zo=30;function fi(e){var t=U({fontFamily:"Arial, sans-serif",fontSize:Vo,fontWeight:"normal",lineHeight:Wo},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,r=U({},t,{fontSize:n},e&&e.externalStyle||{}),i=new yn({style:t});this.getExternalLabelBounds=function(a,o){var u=i.getDimensions(o,{box:{width:90,height:30,x:a.width/2+a.x,y:a.height/2+a.y},style:r});return{x:Math.round(a.x+a.width/2-u.width/2),y:Math.round(a.y),width:Math.ceil(u.width),height:Math.ceil(u.height)}},this.getTextAnnotationBounds=function(a,o){var u=i.getDimensions(o,{box:a,style:t,align:"left-top",padding:5});return{x:a.x,y:a.y,width:a.width,height:Math.max(zo,Math.round(u.height))}},this.createText=function(a,o){return i.createText(a,o||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return r}}fi.$inject=["config.textRenderer"];function Ho(){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} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z",height:36,width:36,heightElements:[20,7],widthElements:[8]},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 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},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(t){return this.pathMap[t].d},this.getScaledPath=function(t,n){var r=this.pathMap[t],i,a;n.abspos?(i=n.abspos.x,a=n.abspos.y):(i=n.containerWidth*n.position.mx,a=n.containerHeight*n.position.my);var o={};if(n.position){for(var u=n.containerHeight/r.height*n.yScaleFactor,c=n.containerWidth/r.width*n.xScaleFactor,y=0;y<r.heightElements.length;y++)o["y"+y]=r.heightElements[y]*u;for(var v=0;v<r.widthElements.length;v++)o["x"+v]=r.widthElements[v]*c}var _=qo(r.d,{mx:i,my:a,e:o});return _}}var Uo=/\{([^{}]+)\}/g,Ko=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;function Yo(e,t,n){var r=n;return t.replace(Ko,function(i,a,o,u,c){a=a||u,r&&(a in r&&(r=r[a]),typeof r=="function"&&c&&(r=r()))}),r=(r==null||r==n?e:r)+"",r}function qo(e,t){return String(e).replace(Uo,function(n,r){return Yo(n,r,t)})}const Go={__init__:["bpmnRenderer"],bpmnRenderer:["type",ht],textRenderer:["type",fi],pathMap:["type",Ho]};function Xo(e,t){return t=t||{},e.replace(/{([^}]+)}/g,function(n,r){return t[r]||"{"+r+"}"})}const pi={translate:["value",Xo]};var fn={width:90,height:20},Pr=15;function Zo(e){return Y(e,"bpmn:Event")||Y(e,"bpmn:Gateway")||Y(e,"bpmn:DataStoreReference")||Y(e,"bpmn:DataObjectReference")||Y(e,"bpmn:DataInput")||Y(e,"bpmn:DataOutput")||Y(e,"bpmn:SequenceFlow")||Y(e,"bpmn:MessageFlow")||Y(e,"bpmn:Group")}function Fc(e){return ns(e.label)}function Qo(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)],i=Jo(e),a=Math.atan((r.y-n.y)/(r.x-n.x)),o=i.x,u=i.y;return Math.abs(a)<Math.PI/2?u-=Pr:o+=Pr,{x:o,y:u}}function Jo(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)];return{x:n.x+(r.x-n.x)/2,y:n.y+(r.y-n.y)/2}}function es(e){return e.waypoints?Qo(e.waypoints):Y(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+fn.height/2}:{x:e.x+e.width/2,y:e.y+e.height+fn.height/2}}function ts(e,t){var n,r,i,a=e.label;return a&&a.bounds?(i=a.bounds,r={width:Math.max(fn.width,i.width),height:i.height},n={x:i.x+i.width/2,y:i.y+i.height/2}):(n=es(t),r=fn),U({x:n.x-r.width/2,y:n.y-r.height/2},r)}function ns(e){return e&&!!e.labelTarget}function Gn(e,t){return!e||!t?-1:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function rs(e,t,n,r){if(typeof r>"u"&&(r=5),!e||!t||!n)return!1;var i=(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),a=Gn(e,t);return Math.abs(i/a)<=r}var is=2;function $c(e,t){var n=Array.from(arguments).flat();const r={x:"v",y:"h"};for(const[i,a]of Object.entries(r))if(as(i,n))return a;return!1}function as(e,t){const n=t[0];return hn(t,function(r){return Math.abs(n[e]-r[e])<=is})}function jc(e,t,n){return n=n||0,e.x>t.x-n&&e.y>t.y-n&&e.x<t.x+t.width+n&&e.y<t.y+t.height+n}function Vc(e,t){return{x:Math.round(e.x+(t.x-e.x)/2),y:Math.round(e.y+(t.y-e.y)/2)}}var Mn,Mr;function os(){if(Mr)return Mn;Mr=1;var e=/,?([a-z]),?/gi,t=parseFloat,n=Math,r=n.PI,i=n.min,a=n.max,o=n.pow,u=n.abs,c=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/ig,y=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/ig,v=Array.isArray||function(l){return l instanceof Array};function _(l,f){return Object.prototype.hasOwnProperty.call(l,f)}function $(l){if(typeof l=="function"||Object(l)!==l)return l;var f=new l.constructor;for(var m in l)_(l,m)&&(f[m]=$(l[m]));return f}function J(l,f){for(var m=0,p=l.length;m<p;m++)if(l[m]===f)return l.push(l.splice(m,1)[0])}function ie(l){function f(){var m=Array.prototype.slice.call(arguments,0),p=m.join("␀"),d=f.cache=f.cache||{},w=f.count=f.count||[];return _(d,p)?(J(w,p),d[p]):(w.length>=1e3&&delete d[w.shift()],w.push(p),d[p]=l.apply(0,m),d[p])}return f}function te(l){if(!l)return null;var f=Z(l);if(f.arr)return $(f.arr);var m={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},p=[];return v(l)&&v(l[0])&&(p=$(l)),p.length||String(l).replace(c,function(d,w,T){var C=[],k=w.toLowerCase();for(T.replace(y,function(b,z){z&&C.push(+z)}),k=="m"&&C.length>2&&(p.push([w].concat(C.splice(0,2))),k="l",w=w=="m"?"l":"L");C.length>=m[k]&&(p.push([w].concat(C.splice(0,m[k]))),!!m[k]););}),p.toString=Z.toString,f.arr=$(p),p}function Z(l){var f=Z.ps=Z.ps||{};return f[l]?f[l].sleep=100:f[l]={sleep:100},setTimeout(function(){for(var m in f)_(f,m)&&m!=l&&(f[m].sleep--,!f[m].sleep&&delete f[m])}),f[l]}function ae(l,f,m,p){return arguments.length===1&&(f=l.y,m=l.width,p=l.height,l=l.x),{x:l,y:f,width:m,height:p,x2:l+m,y2:f+p}}function E(){return this.join(",").replace(e,"$1")}function V(l){var f=$(l);return f.toString=E,f}function S(l,f,m,p,d,w,T,C,k){var b=1-k,z=o(b,3),K=o(b,2),W=k*k,x=W*k,R=z*l+K*3*k*m+b*3*k*k*d+x*T,ne=z*f+K*3*k*p+b*3*k*k*w+x*C;return{x:j(R),y:j(ne)}}function M(l){var f=h.apply(null,l);return ae(f.x0,f.y0,f.x1-f.x0,f.y1-f.y0)}function N(l,f,m){return f>=l.x&&f<=l.x+l.width&&m>=l.y&&m<=l.y+l.height}function D(l,f){return l=ae(l),f=ae(f),N(f,l.x,l.y)||N(f,l.x2,l.y)||N(f,l.x,l.y2)||N(f,l.x2,l.y2)||N(l,f.x,f.y)||N(l,f.x2,f.y)||N(l,f.x,f.y2)||N(l,f.x2,f.y2)||(l.x<f.x2&&l.x>f.x||f.x<l.x2&&f.x>l.x)&&(l.y<f.y2&&l.y>f.y||f.y<l.y2&&f.y>l.y)}function A(l,f,m,p,d){var w=-3*f+9*m-9*p+3*d,T=l*w+6*f-12*m+6*p;return l*T-3*f+3*m}function g(l,f,m,p,d,w,T,C,k){k==null&&(k=1),k=k>1?1:k<0?0:k;for(var b=k/2,z=12,K=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],W=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],x=0,R=0;R<z;R++){var ne=b*K[R]+b,Q=A(ne,l,m,d,T),G=A(ne,f,p,w,C),ce=Q*Q+G*G;x+=W[R]*n.sqrt(ce)}return b*x}function P(l,f,m,p,d,w,T,C){if(!(a(l,m)<i(d,T)||i(l,m)>a(d,T)||a(f,p)<i(w,C)||i(f,p)>a(w,C))){var k=(l*p-f*m)*(d-T)-(l-m)*(d*C-w*T),b=(l*p-f*m)*(w-C)-(f-p)*(d*C-w*T),z=(l-m)*(w-C)-(f-p)*(d-T);if(z){var K=j(k/z),W=j(b/z),x=+K.toFixed(2),R=+W.toFixed(2);if(!(x<+i(l,m).toFixed(2)||x>+a(l,m).toFixed(2)||x<+i(d,T).toFixed(2)||x>+a(d,T).toFixed(2)||R<+i(f,p).toFixed(2)||R>+a(f,p).toFixed(2)||R<+i(w,C).toFixed(2)||R>+a(w,C).toFixed(2)))return{x:K,y:W}}}}function j(l){return Math.round(l*1e11)/1e11}function F(l,f,m){var p=M(l),d=M(f);if(!D(p,d))return m?0:[];for(var w=g.apply(0,l),T=g.apply(0,f),C=Be(l)?1:~~(w/5)||1,k=Be(f)?1:~~(T/5)||1,b=[],z=[],K={},W=m?0:[],x=0;x<C+1;x++){var R=S.apply(0,l.concat(x/C));b.push({x:R.x,y:R.y,t:x/C})}for(x=0;x<k+1;x++)R=S.apply(0,f.concat(x/k)),z.push({x:R.x,y:R.y,t:x/k});for(x=0;x<C;x++)for(var ne=0;ne<k;ne++){var Q=b[x],G=b[x+1],ce=z[ne],q=z[ne+1],pe=u(G.x-Q.x)<.01?"y":"x",oe=u(q.x-ce.x)<.01?"y":"x",he=P(Q.x,Q.y,G.x,G.y,ce.x,ce.y,q.x,q.y),B;if(he){if(B=he.x.toFixed(9)+"#"+he.y.toFixed(9),K[B])continue;K[B]=!0;var H=Q.t+u((he[pe]-Q[pe])/(G[pe]-Q[pe]))*(G.t-Q.t),ot=ce.t+u((he[oe]-ce[oe])/(q[oe]-ce[oe]))*(q.t-ce.t);H>=0&&H<=1&&ot>=0&&ot<=1&&(m?W++:W.push({x:he.x,y:he.y,t1:H,t2:ot}))}}return W}function I(l,f,m){l=s(l),f=s(f);for(var p,d,w,T,C,k,b,z,K,W,x=m?0:[],R=0,ne=l.length;R<ne;R++){var Q=l[R];if(Q[0]=="M")p=C=Q[1],d=k=Q[2];else{Q[0]=="C"?(K=[p,d].concat(Q.slice(1)),p=K[6],d=K[7]):(K=[p,d,p,d,C,k,C,k],p=C,d=k);for(var G=0,ce=f.length;G<ce;G++){var q=f[G];if(q[0]=="M")w=b=q[1],T=z=q[2];else{q[0]=="C"?(W=[w,T].concat(q.slice(1)),w=W[6],T=W[7]):(W=[w,T,w,T,b,z,b,z],w=b,T=z);var pe=F(K,W,m);if(m)x+=pe;else{for(var oe=0,he=pe.length;oe<he;oe++)pe[oe].segment1=R,pe[oe].segment2=G,pe[oe].bez1=K,pe[oe].bez2=W;x=x.concat(pe)}}}}}return x}function se(l){var f=Z(l);if(f.abs)return V(f.abs);if((!v(l)||!v(l&&l[0]))&&(l=te(l)),!l||!l.length)return[["M",0,0]];var m=[],p=0,d=0,w=0,T=0,C=0,k;l[0][0]=="M"&&(p=+l[0][1],d=+l[0][2],w=p,T=d,C++,m[0]=["M",p,d]);for(var b,z,K=C,W=l.length;K<W;K++){if(m.push(b=[]),z=l[K],k=z[0],k!=k.toUpperCase())switch(b[0]=k.toUpperCase(),b[0]){case"A":b[1]=z[1],b[2]=z[2],b[3]=z[3],b[4]=z[4],b[5]=z[5],b[6]=+z[6]+p,b[7]=+z[7]+d;break;case"V":b[1]=+z[1]+d;break;case"H":b[1]=+z[1]+p;break;case"M":w=+z[1]+p,T=+z[2]+d;default:for(var x=1,R=z.length;x<R;x++)b[x]=+z[x]+(x%2?p:d)}else for(var ne=0,Q=z.length;ne<Q;ne++)b[ne]=z[ne];switch(k=k.toUpperCase(),b[0]){case"Z":p=+w,d=+T;break;case"H":p=b[1];break;case"V":d=b[1];break;case"M":w=b[b.length-2],T=b[b.length-1];default:p=b[b.length-2],d=b[b.length-1]}}return m.toString=E,f.abs=V(m),m}function Be(l){return l[0]===l[2]&&l[1]===l[3]&&l[4]===l[6]&&l[5]===l[7]}function ue(l,f,m,p){return[l,f,m,p,m,p]}function ee(l,f,m,p,d,w){var T=.3333333333333333,C=2/3;return[T*l+C*m,T*f+C*p,T*d+C*m,T*w+C*p,d,w]}function Oe(l,f,m,p,d,w,T,C,k,b){var z=r*120/180,K=r/180*(+d||0),W=[],x,R=ie(function(gr,Er,Ut){var Ea=gr*n.cos(Ut)-Er*n.sin(Ut),wa=gr*n.sin(Ut)+Er*n.cos(Ut);return{x:Ea,y:wa}});if(b)B=b[0],H=b[1],oe=b[2],he=b[3];else{x=R(l,f,-K),l=x.x,f=x.y,x=R(C,k,-K),C=x.x,k=x.y;var ne=(l-C)/2,Q=(f-k)/2,G=ne*ne/(m*m)+Q*Q/(p*p);G>1&&(G=n.sqrt(G),m=G*m,p=G*p);var ce=m*m,q=p*p,pe=(w==T?-1:1)*n.sqrt(u((ce*q-ce*Q*Q-q*ne*ne)/(ce*Q*Q+q*ne*ne))),oe=pe*m*Q/p+(l+C)/2,he=pe*-p*ne/m+(f+k)/2,B=n.asin(((f-he)/p).toFixed(9)),H=n.asin(((k-he)/p).toFixed(9));B=l<oe?r-B:B,H=C<oe?r-H:H,B<0&&(B=r*2+B),H<0&&(H=r*2+H),T&&B>H&&(B=B-r*2),!T&&H>B&&(H=H-r*2)}var ot=H-B;if(u(ot)>z){var fa=H,pa=C,ha=k;H=B+z*(T&&H>B?1:-1),C=oe+m*n.cos(H),k=he+p*n.sin(H),W=Oe(C,k,m,p,d,0,T,pa,ha,[H,fa,oe,he])}ot=H-B;var da=n.cos(B),ma=n.sin(B),ya=n.cos(H),va=n.sin(H),fr=n.tan(ot/4),pr=4/3*m*fr,hr=4/3*p*fr,dr=[l,f],vt=[l+pr*ma,f-hr*da],mr=[C+pr*va,k-hr*ya],yr=[C,k];if(vt[0]=2*dr[0]-vt[0],vt[1]=2*dr[1]-vt[1],b)return[vt,mr,yr].concat(W);W=[vt,mr,yr].concat(W).join().split(",");for(var vr=[],Ge=0,ga=W.length;Ge<ga;Ge++)vr[Ge]=Ge%2?R(W[Ge-1],W[Ge],K).y:R(W[Ge],W[Ge+1],K).x;return vr}function h(l,f,m,p,d,w,T,C){for(var k=[],b=[[],[]],z,K,W,x,R,ne,Q,G,ce=0;ce<2;++ce){if(ce==0?(K=6*l-12*m+6*d,z=-3*l+9*m-9*d+3*T,W=3*m-3*l):(K=6*f-12*p+6*w,z=-3*f+9*p-9*w+3*C,W=3*p-3*f),u(z)<1e-12){if(u(K)<1e-12)continue;x=-W/K,0<x&&x<1&&k.push(x);continue}Q=K*K-4*W*z,G=n.sqrt(Q),!(Q<0)&&(R=(-K+G)/(2*z),0<R&&R<1&&k.push(R),ne=(-K-G)/(2*z),0<ne&&ne<1&&k.push(ne))}for(var q=k.length,pe=q,oe;q--;)x=k[q],oe=1-x,b[0][q]=oe*oe*oe*l+3*oe*oe*x*m+3*oe*x*x*d+x*x*x*T,b[1][q]=oe*oe*oe*f+3*oe*oe*x*p+3*oe*x*x*w+x*x*x*C;return b[0][pe]=l,b[1][pe]=f,b[0][pe+1]=T,b[1][pe+1]=C,b[0].length=b[1].length=pe+2,{x0:i.apply(0,b[0]),y0:i.apply(0,b[1]),x1:a.apply(0,b[0]),y1:a.apply(0,b[1])}}function s(l){var f=Z(l);if(f.curve)return V(f.curve);for(var m=se(l),p={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},d=function(x,R,ne){var Q,G;if(!x)return["C",R.x,R.y,R.x,R.y,R.x,R.y];switch(!(x[0]in{T:1,Q:1})&&(R.qx=R.qy=null),x[0]){case"M":R.X=x[1],R.Y=x[2];break;case"A":x=["C"].concat(Oe.apply(0,[R.x,R.y].concat(x.slice(1))));break;case"S":ne=="C"||ne=="S"?(Q=R.x*2-R.bx,G=R.y*2-R.by):(Q=R.x,G=R.y),x=["C",Q,G].concat(x.slice(1));break;case"T":ne=="Q"||ne=="T"?(R.qx=R.x*2-R.qx,R.qy=R.y*2-R.qy):(R.qx=R.x,R.qy=R.y),x=["C"].concat(ee(R.x,R.y,R.qx,R.qy,x[1],x[2]));break;case"Q":R.qx=x[1],R.qy=x[2],x=["C"].concat(ee(R.x,R.y,x[1],x[2],x[3],x[4]));break;case"L":x=["C"].concat(ue(R.x,R.y,x[1],x[2]));break;case"H":x=["C"].concat(ue(R.x,R.y,x[1],R.y));break;case"V":x=["C"].concat(ue(R.x,R.y,R.x,x[1]));break;case"Z":x=["C"].concat(ue(R.x,R.y,R.X,R.Y));break}return x},w=function(x,R){if(x[R].length>7){x[R].shift();for(var ne=x[R];ne.length;)T[R]="A",x.splice(R++,0,["C"].concat(ne.splice(0,6)));x.splice(R,1),z=m.length}},T=[],C="",k="",b=0,z=m.length;b<z;b++){m[b]&&(C=m[b][0]),C!="C"&&(T[b]=C,b&&(k=T[b-1])),m[b]=d(m[b],p,k),T[b]!="A"&&C=="C"&&(T[b]="C"),w(m,b);var K=m[b],W=K.length;p.x=K[W-2],p.y=K[W-1],p.bx=t(K[W-4])||p.x,p.by=t(K[W-3])||p.y}return f.curve=V(m),m}return Mn=I,Mn}var ss=os();const us=Xr(ss);function Wc(e){return{x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height)}}function tn(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function Bt(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function ls(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function cs(e){return tn({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function fs(e){for(var t=e.waypoints,n=t.reduce(function(y,v,_){var $=t[_-1];if($){var J=y[y.length-1],ie=J&&J.endLength||0,te=hs($,v);y.push({start:$,end:v,startLength:ie,endLength:ie+te,length:te})}return y},[]),r=n.reduce(function(y,v){return y+v.length},0),i=r/2,a=0,o=n[a];o.endLength<i;)o=n[++a];var u=(i-o.startLength)/o.length,c={x:o.start.x+(o.end.x-o.start.x)*u,y:o.start.y+(o.end.y-o.start.y)*u};return c}function In(e){return ds(e)?fs(e):cs(e)}function zc(e,t,n){n=n||0,Ze(n)||(n={x:n,y:n});var r=Bt(e),i=Bt(t),a=r.bottom+n.y<=i.top,o=r.left-n.x>=i.right,u=r.top-n.y>=i.bottom,c=r.right+n.x<=i.left,y=a?"top":u?"bottom":null,v=c?"left":o?"right":null;return v&&y?y+"-"+v:v||y||"intersect"}function Hc(e,t,n){var r=ps(e,t);return r.length===1||r.length===2&&Gn(r[0],r[1])<1?tn(r[0]):r.length>1?(r=Ra(r,function(i){var a=Math.floor(i.t2*100)||1;return a=100-a,a=(a<10?"0":"")+a,i.segment2+"#"+a}),tn(r[n?0:r.length-1])):null}function ps(e,t){return us(e,t)}function Uc(e){e=e.slice();for(var t=0,n,r,i;e[t];)n=e[t],r=e[t-1],i=e[t+1],Gn(n,i)===0||rs(r,i,n)?e.splice(t,1):t++;return e}function hs(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ds(e){return!!e.waypoints}function Ee(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function nn(e,t,n){return U({id:e.id,type:e.$type,businessObject:e,di:t},n)}function ms(e,t,n){var r=e.waypoint;return!r||r.length<2?[In(t),In(n)]:r.map(function(i){return{x:i.x,y:i.y}})}function hi(e,t,n,r){return new Error(e("element {element} referenced by {referenced}#{property} not yet drawn",{element:Ee(n),referenced:Ee(t),property:r}))}function qe(e,t,n,r,i,a){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=r,this._translate=i,this._textRenderer=a}qe.$inject=["eventBus","canvas","elementFactory","elementRegistry","translate","textRenderer"];qe.prototype.add=function(e,t,n){var r,i=this._translate,a,o;if(Y(t,"bpmndi:BPMNPlane")){var u=Y(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};r=this._elementFactory.createRoot(nn(e,t,u)),this._canvas.addRootElement(r)}else if(Y(t,"bpmndi:BPMNShape")){var c=!On(e,t),y=vs(e);a=n&&(n.hidden||n.collapsed);var v=t.bounds;r=this._elementFactory.createShape(nn(e,t,{collapsed:c,hidden:a,x:Math.round(v.x),y:Math.round(v.y),width:Math.round(v.width),height:Math.round(v.height),isFrame:y})),Y(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,r),Y(e,"bpmn:Lane")&&(o=0),Y(e,"bpmn:DataStoreReference")&&(ys(n,In(v))||(n=this._canvas.findRoot(n))),this._canvas.addShape(r,n,o)}else if(Y(t,"bpmndi:BPMNEdge")){var _=this._getSource(e),$=this._getTarget(e);a=n&&(n.hidden||n.collapsed),r=this._elementFactory.createConnection(nn(e,t,{hidden:a,source:_,target:$,waypoints:ms(t,_,$)})),Y(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(r,n,o)}else throw new Error(i("unknown di {di} for element {semantic}",{di:Ee(t),semantic:Ee(e)}));return Zo(e)&&sn(r)&&this.addLabel(e,t,r),this._eventBus.fire("bpmnElement.added",{element:r}),r};qe.prototype._attachBoundary=function(e,t){var n=this._translate,r=e.attachedToRef;if(!r)throw new Error(n("missing {semantic}#attachedToRef",{semantic:Ee(e)}));var i=this._elementRegistry.get(r.id),a=i&&i.attachers;if(!i)throw hi(n,e,r,"attachedToRef");t.host=i,a||(i.attachers=a=[]),a.indexOf(t)===-1&&a.push(t)};qe.prototype.addLabel=function(e,t,n){var r,i,a;return r=ts(t,n),i=sn(n),i&&(r=this._textRenderer.getExternalLabelBounds(r,i)),a=this._elementFactory.createLabel(nn(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!sn(n),x:Math.round(r.x),y:Math.round(r.y),width:Math.round(r.width),height:Math.round(r.height)})),this._canvas.addShape(a,n.parent)};qe.prototype._getEnd=function(e,t){var n,r,i=e.$type,a=this._translate;if(r=e[t+"Ref"],t==="source"&&i==="bpmn:DataInputAssociation"&&(r=r&&r[0]),(t==="source"&&i==="bpmn:DataOutputAssociation"||t==="target"&&i==="bpmn:DataInputAssociation")&&(r=e.$parent),n=r&&this._getElement(r),n)return n;throw r?hi(a,e,r,t+"Ref"):new Error(a("{semantic}#{side} Ref not specified",{semantic:Ee(e),side:t}))};qe.prototype._getSource=function(e){return this._getEnd(e,"source")};qe.prototype._getTarget=function(e){return this._getEnd(e,"target")};qe.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};function ys(e,t){var n=t.x,r=t.y;return n>=e.x&&n<=e.x+e.width&&r>=e.y&&r<=e.y+e.height}function vs(e){return Y(e,"bpmn:Group")}const gs={__depends__:[pi],bpmnImporter:["type",qe]},Es={__depends__:[Go,gs]};function Tr(e){!e||typeof e.stopPropagation!="function"||e.stopPropagation()}function vn(e){return e.originalEvent||e.srcEvent}function Kc(e,t){Tr(e),Tr(vn(e))}function Dr(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}function ws(){return/mac/i.test(navigator.platform)}function di(e,t){return(vn(e)||e).button===t}function $t(e){return di(e,0)}function xs(e){return di(e,1)}function _s(e){var t=vn(e)||e;return $t(e)?ws()?t.metaKey:t.ctrlKey:!1}function bs(e){var t=vn(e)||e;return $t(e)&&t.shiftKey}function Ss(e){return!0}function qt(e){return $t(e)||xs(e)}var Or=500;function mi(e,t,n){var r=this;function i(A,g,P){if(!u(A,g)){var j,F,I;P?F=t.getGraphics(P):(j=g.delegateTarget||g.target,j&&(F=j,P=t.get(F))),!(!F||!P)&&(I=e.fire(A,{element:P,gfx:F,originalEvent:g}),I===!1&&(g.stopPropagation(),g.preventDefault()))}}var a={};function o(A){return a[A]}function u(A,g){var P=y[A]||$t;return!P(g)}var c={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},y={"element.contextmenu":Ss,"element.mousedown":qt,"element.mouseup":qt,"element.click":qt,"element.dblclick":qt};function v(A,g,P){var j=c[A];if(!j)throw new Error("unmapped DOM event name <"+A+">");return i(j,g,P)}var _="svg, .djs-element";function $(A,g,P,j){var F=a[P]=function(I){i(P,I)};j&&(y[P]=j),F.$delegate=Ln.bind(A,_,g,F)}function J(A,g,P){var j=o(P);j&&Ln.unbind(A,g,j.$delegate)}function ie(A){L(c,function(g,P){$(A,P,g)})}function te(A){L(c,function(g,P){J(A,P,g)})}e.on("canvas.destroy",function(A){te(A.svg)}),e.on("canvas.init",function(A){ie(A.svg)}),e.on(["shape.added","connection.added"],function(A){var g=A.element,P=A.gfx;e.fire("interactionEvents.createHit",{element:g,gfx:P})}),e.on(["shape.changed","connection.changed"],Or,function(A){var g=A.element,P=A.gfx;e.fire("interactionEvents.updateHit",{element:g,gfx:P})}),e.on("interactionEvents.createHit",Or,function(A){var g=A.element,P=A.gfx;r.createDefaultHit(g,P)}),e.on("interactionEvents.updateHit",function(A){var g=A.element,P=A.gfx;r.updateDefaultHit(g,P)});var Z=M("djs-hit djs-hit-stroke"),ae=M("djs-hit djs-hit-click-stroke"),E=M("djs-hit djs-hit-all"),V=M("djs-hit djs-hit-no-move"),S={all:E,"click-stroke":ae,stroke:Z,"no-move":V};function M(A,g){return g=U({stroke:"white",strokeWidth:15},g||{}),n.cls(A,["no-fill","no-border"],g)}function N(A,g){var P=S[g];if(!P)throw new Error("invalid hit type <"+g+">");return le(A,P),A}function D(A,g){ye(A,g)}this.removeHits=function(A){var g=bo(".djs-hit",A);L(g,It)},this.createDefaultHit=function(A,g){var P=A.waypoints,j=A.isFrame,F;return P?this.createWaypointsHit(g,P):(F=j?"stroke":"all",this.createBoxHit(g,F,{width:A.width,height:A.height}))},this.createWaypointsHit=function(A,g){var P=Kn(g);return N(P,"stroke"),D(A,P),P},this.createBoxHit=function(A,g,P){P=U({x:0,y:0},P);var j=fe("rect");return N(j,g),le(j,P),D(A,j),j},this.updateDefaultHit=function(A,g){var P=Le(".djs-hit",g);if(P)return A.waypoints?ai(P,A.waypoints):le(P,{width:A.width,height:A.height}),P},this.fire=i,this.triggerMouseEvent=v,this.mouseHandler=o,this.registerEvent=$,this.unregisterEvent=J}mi.$inject=["eventBus","elementRegistry","styles"];const As={__init__:["interactionEvents"],interactionEvents:["type",mi]};function Yc(e){return lt(e,function(t){return!Ne(e,function(n){return n!==t&&yi(t,n)})})}function yi(e,t){if(t){if(e===t)return t;if(e.parent)return yi(e.parent,t)}}function Nr(e,t,n){var r=!n||e.indexOf(t)===-1;return r&&e.push(t),r}function Xn(e,t,n){n=n||0,Re(e)||(e=[e]),L(e,function(r,i){var a=t(r,i,n);Re(a)&&a.length&&Xn(a,t,n+1)})}function Rs(e,t,n){var r=[],i=[];return Xn(e,function(a,o,u){Nr(r,a,t);var c=a.children;if(c&&Nr(i,c,t))return c}),r}function qc(e,t){return Rs(e,!t)}function Gc(e,t,n){Nt(t)&&(t=!0),Ze(t)&&(n=t,t=!0),n=n||{};var r=Mt(n.allShapes),i=Mt(n.allConnections),a=Mt(n.enclosedElements),o=Mt(n.enclosedConnections),u=Mt(n.topLevel,t&&Jr(e,function(v){return v.id}));function c(v){u[v.source.id]&&u[v.target.id]&&(u[v.id]=[v]),r[v.source.id]&&r[v.target.id]&&(o[v.id]=a[v.id]=v),i[v.id]=v}function y(v){if(a[v.id]=v,v.waypoints)o[v.id]=i[v.id]=v;else return r[v.id]=v,L(v.incoming,c),L(v.outgoing,c),v.children}return Xn(e,y),{allShapes:r,allConnections:i,topLevel:u,enclosedConnections:o,enclosedElements:a}}function tt(e,t){t=!!t,Re(e)||(e=[e]);var n,r,i,a;return L(e,function(o){var u=o;o.waypoints&&!t&&(u=tt(o.waypoints,!0));var c=u.x,y=u.y,v=u.height||0,_=u.width||0;(c<n||n===void 0)&&(n=c),(y<r||r===void 0)&&(r=y),(c+_>i||i===void 0)&&(i=c+_),(y+v>a||a===void 0)&&(a=y+v)}),{x:n,y:r,height:a-r,width:i-n}}function Xc(e,t){var n={};return L(e,function(r){var i=r;i.waypoints&&(i=tt(i)),!Se(t.y)&&i.x>t.x&&(n[r.id]=r),!Se(t.x)&&i.y>t.y&&(n[r.id]=r),i.x>t.x&&i.y>t.y&&(Se(t.width)&&Se(t.height)&&i.width+i.x<t.width+t.x&&i.height+i.y<t.height+t.y||!Se(t.width)||!Se(t.height))&&(n[r.id]=r)}),n}function vi(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function gi(e){return!!(e&&e.isFrame)}function Mt(e,t){return U({},e||{},t||{})}var Cs=500;function gn(e,t){this.offset=6;var n=t.cls("djs-outline",["no-fill"]),r=this;function i(a,o){var u=fe("rect");return le(u,U({x:10,y:10,rx:4,width:100,height:100},n)),ye(a,u),u}e.on(["shape.added","shape.changed"],Cs,function(a){var o=a.element,u=a.gfx,c=Le(".djs-outline",u);c||(c=i(u)),r.updateShapeOutline(c,o)}),e.on(["connection.added","connection.changed"],function(a){var o=a.element,u=a.gfx,c=Le(".djs-outline",u);c||(c=i(u)),r.updateConnectionOutline(c,o)})}gn.prototype.updateShapeOutline=function(e,t){le(e,{x:-this.offset,y:-this.offset,width:t.width+this.offset*2,height:t.height+this.offset*2})};gn.prototype.updateConnectionOutline=function(e,t){var n=tt(t);le(e,{x:n.x-this.offset,y:n.y-this.offset,width:n.width+this.offset*2,height:n.height+this.offset*2})};gn.$inject=["eventBus","styles","elementRegistry"];const Ps={__init__:["outline"],outline:["type",gn]};function bt(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=[];var n=this;e.on(["shape.remove","connection.remove"],function(r){var i=r.element;n.deselect(i)}),e.on(["diagram.clear","root.set"],function(r){n.select(null)})}bt.$inject=["eventBus","canvas"];bt.prototype.deselect=function(e){var t=this._selectedElements,n=t.indexOf(e);if(n!==-1){var r=t.slice();t.splice(n,1),this._eventBus.fire("selection.changed",{oldSelection:r,newSelection:t})}};bt.prototype.get=function(){return this._selectedElements};bt.prototype.isSelected=function(e){return this._selectedElements.indexOf(e)!==-1};bt.prototype.select=function(e,t){var n=this._selectedElements,r=n.slice();Re(e)||(e=e?[e]:[]);var i=this._canvas,a=i.getRootElement();e=e.filter(function(o){var u=i.findRoot(o);return a===u}),t?L(e,function(o){n.indexOf(o)===-1&&n.push(o)}):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:r,newSelection:n})};var kr="hover",Br="selected",Gt=6;function Zn(e,t,n){this._canvas=e;var r=this;this._multiSelectionBox=null;function i(o,u){e.addMarker(o,u)}function a(o,u){e.removeMarker(o,u)}t.on("element.hover",function(o){i(o.element,kr)}),t.on("element.out",function(o){a(o.element,kr)}),t.on("selection.changed",function(o){function u(_){a(_,Br)}function c(_){i(_,Br)}var y=o.oldSelection,v=o.newSelection;L(y,function(_){v.indexOf(_)===-1&&u(_)}),L(v,function(_){y.indexOf(_)===-1&&c(_)}),r._updateSelectionOutline(v)}),t.on("element.changed",function(o){n.isSelected(o.element)&&r._updateSelectionOutline(n.get())})}Zn.$inject=["canvas","eventBus","selection"];Zn.prototype._updateSelectionOutline=function(e){var t=this._canvas.getLayer("selectionOutline");Wa(t);var n=e.length>1,r=this._canvas.getContainer();if(Pe(r)[n?"add":"remove"]("djs-multi-select"),!!n){var i=Ms(tt(e)),a=fe("rect");le(a,U({rx:3},i)),Pe(a).add("djs-selection-outline"),ye(t,a)}};function Ms(e){return{x:e.x-Gt,y:e.y-Gt,width:e.width+Gt*2,height:e.height+Gt*2}}function Ei(e,t,n,r){e.on("create.end",500,function(i){var a=i.context,o=a.canExecute,u=a.elements,c=a.hints||{},y=c.autoSelect;if(o){if(y===!1)return;Re(y)?t.select(y):t.select(u.filter(Ts))}}),e.on("connect.end",500,function(i){var a=i.context,o=a.connection;o&&t.select(o)}),e.on("shape.move.end",500,function(i){var a=i.previousSelection||[],o=r.get(i.context.shape.id),u=Ne(a,function(c){return o.id===c.id});u||t.select(o)}),e.on("element.click",function(i){if($t(i)){var a=i.element;a===n.getRootElement()&&(a=null);var o=t.isSelected(a),u=t.get().length>1,c=_s(i)||bs(i);if(o&&u)return c?t.deselect(a):t.select(a);o?t.deselect(a):t.select(a,c)}})}Ei.$inject=["eventBus","selection","canvas","elementRegistry"];function Ts(e){return!e.hidden}const Ds={__init__:["selectionVisuals","selectionBehavior"],__depends__:[As,Ps],selection:["type",bt],selectionVisuals:["type",Zn],selectionBehavior:["type",Ei]};function wi(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(Math.random()*1e9)+"-"}wi.prototype.next=function(){return this._prefix+ ++this._counter};var Os=new wi("ov"),Ns=500;function ge(e,t,n,r){this._eventBus=t,this._canvas=n,this._elementRegistry=r,this._ids=Os,this._overlayDefaults=U({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=ks(n.getContainer()),this._init()}ge.$inject=["config.overlays","eventBus","canvas","elementRegistry"];ge.prototype.get=function(e){if($e(e)&&(e={id:e}),$e(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?lt(t.overlays,wr({type:e.type})):t.overlays.slice():[]}else return e.type?lt(this._overlays,wr({type:e.type})):e.id?this._overlays[e.id]:null};ge.prototype.add=function(e,t,n){if(Ze(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 r=this._ids.next();return n=U({},this._overlayDefaults,n,{id:r,type:t,element:e,html:n.html}),this._addOverlay(n),r};ge.prototype.remove=function(e){var t=this.get(e)||[];Re(t)||(t=[t]);var n=this;L(t,function(r){var i=n._getOverlayContainer(r.element,!0);if(r&&(cn(r.html),cn(r.htmlContainer),delete r.htmlContainer,delete r.element,delete n._overlays[r.id]),i){var a=i.overlays.indexOf(r);a!==-1&&i.overlays.splice(a,1)}})};ge.prototype.isShown=function(){return this._overlayRoot.style.display!=="none"};ge.prototype.show=function(){En(this._overlayRoot)};ge.prototype.hide=function(){En(this._overlayRoot,!1)};ge.prototype.clear=function(){this._overlays={},this._overlayContainers=[],oi(this._overlayRoot)};ge.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,r=t.x,i=t.y;if(t.waypoints){var a=tt(t);r=a.x,i=a.y}xi(n,r,i),mo(e.html,"data-container-id",t.id)};ge.prototype._updateOverlay=function(e){var t=e.position,n=e.htmlContainer,r=e.element,i=t.left,a=t.top;if(t.right!==void 0){var o;r.waypoints?o=tt(r).width:o=r.width,i=t.right*-1+o}if(t.bottom!==void 0){var u;r.waypoints?u=tt(r).height:u=r.height,a=t.bottom*-1+u}xi(n,i||0,a||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())};ge.prototype._createOverlayContainer=function(e){var t=je('<div class="djs-overlays" />');Ae(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n};ge.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";_i(this._overlayRoot,n)};ge.prototype._getOverlayContainer=function(e,t){var n=Ne(this._overlayContainers,function(r){return r.element===e});return!n&&!t?this._createOverlayContainer(e):n};ge.prototype._addOverlay=function(e){var t=e.id,n=e.element,r=e.html,i,a;r.get&&r.constructor.prototype.jquery&&(r=r.get(0)),$e(r)&&(r=je(r)),a=this._getOverlayContainer(n),i=je('<div class="djs-overlay" data-overlay-id="'+t+'">'),Ae(i,{position:"absolute"}),i.appendChild(r),e.type&&Ft(i).add("djs-overlay-"+e.type);var o=this._canvas.findRoot(n),u=this._canvas.getRootElement();En(i,o===u),e.htmlContainer=i,a.overlays.push(e),a.html.appendChild(i),this._overlays[t]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())};ge.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,r=this._canvas.findRoot(e.element),i=n&&n.minZoom,a=n&&n.maxZoom,o=e.htmlContainer,u=this._canvas.getRootElement(),c=!0;(r!==u||n&&(ut(i)&&i>t.scale||ut(a)&&a<t.scale))&&(c=!1),En(o,c),this._updateOverlayScale(e,t)};ge.prototype._updateOverlayScale=function(e,t){var n=e.scale,r,i,a=e.htmlContainer,o,u="";n!==!0&&(n===!1?(r=1,i=1):(r=n.min,i=n.max),ut(r)&&t.scale<r&&(o=(1/t.scale||1)*r),ut(i)&&t.scale>i&&(o=(1/t.scale||1)*i)),ut(o)&&(u="scale("+o+","+o+")"),_i(a,u)};ge.prototype._updateOverlaysVisibilty=function(e){var t=this;L(this._overlays,function(n){t._updateOverlayVisibilty(n,e)})};ge.prototype._init=function(){var e=this._eventBus,t=this;function n(r){t._updateRoot(r),t._updateOverlaysVisibilty(r),t.show()}e.on("canvas.viewbox.changing",function(r){t.hide()}),e.on("canvas.viewbox.changed",function(r){n(r.viewbox)}),e.on(["shape.remove","connection.remove"],function(r){var i=r.element,a=t.get({element:i});L(a,function(c){t.remove(c.id)});var o=t._getOverlayContainer(i);if(o){cn(o.html);var u=t._overlayContainers.indexOf(o);u!==-1&&t._overlayContainers.splice(u,1)}}),e.on("element.changed",Ns,function(r){var i=r.element,a=t._getOverlayContainer(i,!0);a&&(L(a.overlays,function(o){t._updateOverlay(o)}),t._updateOverlayContainer(a))}),e.on("element.marker.update",function(r){var i=t._getOverlayContainer(r.element,!0);i&&Ft(i.html)[r.add?"add":"remove"](r.marker)}),e.on("root.set",function(){t._updateOverlaysVisibilty(t._canvas.viewbox())}),e.on("diagram.clear",this.clear,this)};function ks(e){var t=je('<div class="djs-overlay-container" />');return Ae(t,{position:"absolute",width:0,height:0}),e.insertBefore(t,e.firstChild),t}function xi(e,t,n){Ae(e,{left:t+"px",top:n+"px"})}function En(e,t){e.style.display=t===!1?"none":""}function _i(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(n){e.style[n+"transform"]=t})}const bi={__init__:["overlays"],overlays:["type",ge]};function Si(e,t,n,r){e.on("element.changed",function(i){var a=i.element;(a.parent||a===t.getRootElement())&&(i.gfx=n.getGraphics(a)),i.gfx&&e.fire(vi(a)+".changed",i)}),e.on("elements.changed",function(i){var a=i.elements;a.forEach(function(o){e.fire("element.changed",{element:o})}),r.updateContainments(a)}),e.on("shape.changed",function(i){r.update("shape",i.element,i.gfx)}),e.on("connection.changed",function(i){r.update("connection",i.element,i.gfx)})}Si.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];const Bs={__init__:["changeSupport"],changeSupport:["type",Si]};var Ls=1e3;function dt(e){this._eventBus=e}dt.$inject=["eventBus"];function Is(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}dt.prototype.on=function(e,t,n,r,i,a){if((ze(t)||Se(t))&&(a=i,i=r,r=n,n=t,t=null),ze(n)&&(a=i,i=r,r=n,n=Ls),Ze(i)&&(a=i,i=!1),!ze(r))throw new Error("handlerFn must be a function");Re(e)||(e=[e]);var o=this._eventBus;L(e,function(u){var c=["commandStack",u,t].filter(function(y){return y}).join(".");o.on(c,n,i?Is(r,a):r,a)})};var Fs=["canExecute","preExecute","preExecuted","execute","executed","postExecute","postExecuted","revert","reverted"];L(Fs,function(e){dt.prototype[e]=function(t,n,r,i,a){(ze(t)||Se(t))&&(a=i,i=r,r=n,n=t,t=null),this.on(t,e,n,r,i,a)}});function Qn(e,t){t.invoke(dt,this),this.executed(function(n){var r=n.context;r.rootElement?e.setRootElement(r.rootElement):r.rootElement=e.getRootElement()}),this.revert(function(n){var r=n.context;r.rootElement&&e.setRootElement(r.rootElement)})}Ve(Qn,dt);Qn.$inject=["canvas","injector"];const $s={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",Qn]};function Zc(e){return CSS.escape(e)}var js={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Vs(e){return e=""+e,e&&e.replace(/[&<>"']/g,function(t){return js[t]})}var Ai="_plane";function Qc(e){var t=e.id;return Ws(t)}function Jn(e){var t=e.id;return Y(e,"bpmn:SubProcess")?Ri(t):t}function Jc(e){return Ri(e)}function ef(e){var t=ct(e);return Y(t,"bpmndi:BPMNPlane")}function Ri(e){return e+Ai}function Ws(e){return e.replace(new RegExp(Ai+"$"),"")}var zs="bjs-breadcrumbs-shown";function Ci(e,t,n,r){var i=je('<ul class="bjs-breadcrumbs"></ul>'),a=r.getContainer(),o=Ft(a);a.appendChild(i);var u=[];e.on("element.changed",function(y){var v=y.element,_=Qe(v),$=Ne(u,function(J){return J===_});$&&c()});function c(y){y&&(u=Hs(y));var v=u.map(function($){var J=Vs($.name||$.id),ie=je('<li><span class="bjs-crumb"><a title="'+J+'">'+J+"</a></span></li>"),te=r.findRoot(Jn($))||r.findRoot($.id);if(!te&&Y($,"bpmn:Process")){var Z=t.find(function(ae){var E=Qe(ae);return E&&E.processRef&&E.processRef===$});te=r.findRoot(Z.id)}return ie.addEventListener("click",function(){r.setRootElement(te)}),ie});i.innerHTML="";var _=v.length>1;o.toggle(zs,_),v.forEach(function($){i.appendChild($)})}e.on("root.set",function(y){c(y.element)})}Ci.$inject=["eventBus","elementRegistry","overlays","canvas"];function Hs(e){for(var t=Qe(e),n=[],r=t;r;r=r.$parent)(Y(r,"bpmn:SubProcess")||Y(r,"bpmn:Process"))&&n.push(r);return n.reverse()}function Pi(e,t){var n=null,r=new Us;e.on("root.set",function(i){var a=i.element,o=t.viewbox(),u=r.get(a);if(r.set(n,{x:o.x,y:o.y,zoom:o.scale}),n=a,!(Y(a,"bpmn:Collaboration")&&!u)){u=u||{x:0,y:0,zoom:1};var c=(o.x-u.x)*o.scale,y=(o.y-u.y)*o.scale;(c!==0||y!==0)&&t.scroll({dx:c,dy:y}),u.zoom!==o.scale&&t.zoom(u.zoom,{x:0,y:0})}}),e.on("diagram.clear",function(){r.clear(),n=null})}Pi.$inject=["eventBus","canvas"];function Us(){this._entries=[],this.set=function(e,t){var n=!1;for(var r in this._entries)if(this._entries[r][0]===e){this._entries[r][1]=t,n=!0;break}n||this._entries.push([e,t])},this.get=function(e){for(var t in this._entries)if(this._entries[t][0]===e)return this._entries[t][1];return null},this.clear=function(){this._entries.length=0},this.remove=function(e){var t=-1;for(var n in this._entries)if(this._entries[n][0]===e){t=n;break}t!==-1&&this._entries.splice(t,1)}}var Lr={x:180,y:160};function mt(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,function(r,i){n.handleImport(i.definitions)})}mt.prototype.handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach(function(r){!r.plane||!r.plane.bpmnElement||(t._processToDiagramMap[r.plane.bpmnElement.id]=r)});var n=[];e.diagrams.forEach(function(r){var i=t.createNewDiagrams(r.plane);Array.prototype.push.apply(n,i)}),n.forEach(function(r){t.movePlaneElementsToOrigin(r.plane)})}};mt.prototype.createNewDiagrams=function(e){var t=this,n=[],r=[];e.get("planeElement").forEach(function(a){var o=a.bpmnElement;if(o){var u=o.$parent;Y(o,"bpmn:SubProcess")&&!a.isExpanded&&n.push(o),Ys(o,e)&&r.push({diElement:a,parent:u})}});var i=[];return n.forEach(function(a){if(!t._processToDiagramMap[a.id]){var o=t.createDiagram(a);t._processToDiagramMap[a.id]=o,i.push(o)}}),r.forEach(function(a){for(var o=a.diElement,u=a.parent;u&&n.indexOf(u)===-1;)u=u.$parent;if(u){var c=t._processToDiagramMap[u.id];t.moveToDiPlane(o,c.plane)}}),i};mt.prototype.movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=Ks(e),r={x:n.x-Lr.x,y:n.y-Lr.y};t.forEach(function(i){i.waypoint?i.waypoint.forEach(function(a){a.x=a.x-r.x,a.y=a.y-r.y}):i.bounds&&(i.bounds.x=i.bounds.x-r.x,i.bounds.y=i.bounds.y-r.y)})};mt.prototype.moveToDiPlane=function(e,t){var n=Mi(e),r=n.plane.get("planeElement");r.splice(r.indexOf(e),1),t.get("planeElement").push(e)};mt.prototype.createDiagram=function(e){var t=this._moddle.create("bpmndi:BPMNPlane",{bpmnElement:e}),n=this._moddle.create("bpmndi:BPMNDiagram",{plane:t});return t.$parent=n,t.bpmnElement=e,n.$parent=this._definitions,this._definitions.diagrams.push(n),n};mt.$inject=["eventBus","moddle"];function Mi(e){return Y(e,"bpmndi:BPMNDiagram")?e:Mi(e.$parent)}function Ks(e){var t={top:1/0,right:-1/0,bottom:-1/0,left:1/0};return e.planeElement.forEach(function(n){if(n.bounds){var r=Bt(n.bounds);t.top=Math.min(r.top,t.top),t.left=Math.min(r.left,t.left)}}),ls(t)}function Ys(e,t){var n=e.$parent;return!(!Y(n,"bpmn:SubProcess")||n===t.bpmnElement||ka(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))}var Xt=250,qs='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg>',Gs="bjs-drilldown-empty";function rt(e,t,n,r){dt.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=r;var i=this;this.executed("shape.toggleCollapse",Xt,function(a){var o=a.shape;i.canDrillDown(o)?i.addOverlay(o):i.removeOverlay(o)},!0),this.reverted("shape.toggleCollapse",Xt,function(a){var o=a.shape;i.canDrillDown(o)?i.addOverlay(o):i.removeOverlay(o)},!0),this.executed(["shape.create","shape.move","shape.delete"],Xt,function(a){var o=a.oldParent,u=a.newParent||a.parent,c=a.shape;i.canDrillDown(c)&&i.addOverlay(c),i.updateDrilldownOverlay(o),i.updateDrilldownOverlay(u),i.updateDrilldownOverlay(c)},!0),this.reverted(["shape.create","shape.move","shape.delete"],Xt,function(a){var o=a.oldParent,u=a.newParent||a.parent,c=a.shape;i.canDrillDown(c)&&i.addOverlay(c),i.updateDrilldownOverlay(o),i.updateDrilldownOverlay(u),i.updateDrilldownOverlay(c)},!0),t.on("import.render.complete",function(){n.filter(function(a){return i.canDrillDown(a)}).map(function(a){i.addOverlay(a)})})}Ve(rt,dt);rt.prototype.updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this.updateOverlayVisibility(n)}};rt.prototype.canDrillDown=function(e){var t=this._canvas;return Y(e,"bpmn:SubProcess")&&t.findRoot(Jn(e))};rt.prototype.updateOverlayVisibility=function(e){var t=this._overlays,n=e.businessObject,r=t.get({element:n.id,type:"drilldown"})[0];if(r){var i=n&&n.flowElements&&n.flowElements.length;Ft(r.html).toggle(Gs,!i)}};rt.prototype.addOverlay=function(e){var t=this._canvas,n=this._overlays,r=n.get({element:e,type:"drilldown"});r.length&&this.removeOverlay(e);var i=je('<button class="bjs-drilldown">'+qs+"</button>");i.addEventListener("click",function(){t.setRootElement(t.findRoot(Jn(e)))}),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:i}),this.updateOverlayVisibility(e)};rt.prototype.removeOverlay=function(e){var t=this._overlays;t.remove({element:e,type:"drilldown"})};rt.$inject=["canvas","eventBus","elementRegistry","overlays"];const Xs={__depends__:[bi,Bs,$s],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",Ci],drilldownCentering:["type",Pi],drilldownOverlayBehavior:["type",rt],subprocessCompatibility:["type",mt]},Zs=/^class[ {]/;function Qs(e){return Zs.test(e.toString())}function er(e){return Array.isArray(e)}function Tn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function rn(...e){e.length===1&&er(e[0])&&(e=e[0]),e=[...e];const t=e.pop();return t.$inject=e,t}const Js=/constructor\s*[^(]*\(\s*([^)]*)\)/m,eu=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,tu=/\/\*([^*]*)\*\//m;function nu(e){if(typeof e!="function")throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(Qs(e)?Js:eu);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map(r=>{const i=r.match(tu);return(i&&i[1]||r).trim()})||[]}function Ti(e,t){t=t||{get:function(E,V){if(n.push(E),V===!1)return null;throw o(`No provider for "${E}"!`)}};const n=[],r=this._providers=Object.create(t._providers||null),i=this._instances=Object.create(null),a=i.injector=this,o=function(E){const V=n.join(" -> ");return n.length=0,new Error(V?`${E} (Resolving: ${V})`:E)};function u(E,V){if(!r[E]&&E.indexOf(".")!==-1){const S=E.split(".");let M=u(S.shift());for(;S.length;)M=M[S.shift()];return M}if(Tn(i,E))return i[E];if(Tn(r,E)){if(n.indexOf(E)!==-1)throw n.push(E),o("Cannot resolve circular dependency!");return n.push(E),i[E]=r[E][0](r[E][1]),n.pop(),i[E]}return t.get(E,V)}function c(E,V){if(typeof V>"u"&&(V={}),typeof E!="function")if(er(E))E=rn(E.slice());else throw o(`Cannot invoke "${E}". Expected a function!`);const M=(E.$inject||nu(E)).map(N=>Tn(V,N)?V[N]:u(N));return{fn:E,dependencies:M}}function y(E){const{fn:V,dependencies:S}=c(E),M=Function.prototype.bind.apply(V,[null].concat(S));return new M}function v(E,V,S){const{fn:M,dependencies:N}=c(E,S);return M.apply(V,N)}function _(E){return rn(V=>E.get(V))}function $(E,V){if(V&&V.length){const S=Object.create(null),M=Object.create(null),N=[],D=[],A=[];let g,P,j,F;for(let I in r)g=r[I],V.indexOf(I)!==-1&&(g[2]==="private"?(P=N.indexOf(g[3]),P===-1?(j=g[3].createChild([],V),F=_(j),N.push(g[3]),D.push(j),A.push(F),S[I]=[F,I,"private",j]):S[I]=[A[P],I,"private",D[P]]):S[I]=[g[2],g[1]],M[I]=!0),(g[2]==="factory"||g[2]==="type")&&g[1].$scope&&V.forEach(se=>{g[1].$scope.indexOf(se)!==-1&&(S[I]=[g[2],g[1]],M[se]=!0)});V.forEach(I=>{if(!M[I])throw new Error('No provider for "'+I+'". Cannot use provider from the parent!')}),E.unshift(S)}return new Ti(E,a)}const J={factory:v,type:y,value:function(E){return E}};function ie(E,V){const S=E.__init__||[];return function(){S.forEach(M=>{typeof M=="string"?V.get(M):V.invoke(M)})}}function te(E){const V=E.__exports__;if(V){const S=E.__modules__,M=Object.keys(E).reduce((P,j)=>(j!=="__exports__"&&j!=="__modules__"&&j!=="__init__"&&j!=="__depends__"&&(P[j]=E[j]),P),Object.create(null)),N=(S||[]).concat(M),D=$(N),A=rn(function(P){return D.get(P)});V.forEach(function(P){r[P]=[A,P,"private",D]});const g=(E.__init__||[]).slice();return g.unshift(function(){D.init()}),E=Object.assign({},E,{__init__:g}),ie(E,D)}return Object.keys(E).forEach(function(S){if(S==="__init__"||S==="__depends__")return;if(E[S][2]==="private"){r[S]=E[S];return}const M=E[S][0],N=E[S][1];r[S]=[J[M],ru(M,N),M]}),ie(E,a)}function Z(E,V){return E.indexOf(V)!==-1||(E=(V.__depends__||[]).reduce(Z,E),E.indexOf(V)!==-1)?E:E.concat(V)}function ae(E){const V=E.reduce(Z,[]).map(te);let S=!1;return function(){S||(S=!0,V.forEach(M=>M()))}}this.get=u,this.invoke=v,this.instantiate=y,this.createChild=$,this.init=ae(e)}function ru(e,t){return e!=="value"&&er(t)&&(t=rn(t.slice())),t}var iu=1;function it(e,t){Ye.call(this,e,iu),this.CONNECTION_STYLE=t.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=t.style({fill:"white",stroke:"fuchsia",strokeWidth:2}),this.FRAME_STYLE=t.style(["no-fill"],{stroke:"fuchsia",strokeDasharray:4,strokeWidth:2})}Ve(it,Ye);it.prototype.canRender=function(){return!0};it.prototype.drawShape=function(t,n,r){var i=fe("rect");return le(i,{x:0,y:0,width:n.width||0,height:n.height||0}),gi(n)?le(i,U({},this.FRAME_STYLE,r||{})):le(i,U({},this.SHAPE_STYLE,r||{})),ye(t,i),i};it.prototype.drawConnection=function(t,n,r){var i=Kn(n.waypoints,U({},this.CONNECTION_STYLE,r||{}));return ye(t,i),i};it.prototype.getShapePath=function(t){var n=t.x,r=t.y,i=t.width,a=t.height,o=[["M",n,r],["l",i,0],["l",0,a],["l",-i,0],["z"]];return pt(o)};it.prototype.getConnectionPath=function(t){var n=t.waypoints,r,i,a=[];for(r=0;i=n[r];r++)i=i.original||i,a.push([r===0?"M":"L",i.x,i.y]);return pt(a)};it.$inject=["eventBus","styles"];function au(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(n,r,i){var a=this.style(r,i);return U(a,{class:n})},this.style=function(n,r){!Re(n)&&!r&&(r=n,n=[]);var i=wt(n,function(a,o){return U(a,e[o]||{})},{});return r?U(i,r):i},this.computeStyle=function(n,r,i){return Re(r)||(i=r,r=[]),t.style(r||[],U({},i,n||{}))}}const ou={__init__:["defaultRenderer"],defaultRenderer:["type",it],styles:["type",au]};function su(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return n!==-1&&e.splice(n,1),n}function uu(e,t,n){if(!(!e||!t)){typeof n!="number"&&(n=-1);var r=e.indexOf(t);if(r!==-1){if(r===n)return;if(n!==-1)e.splice(r,1);else return}n!==-1?e.splice(n,0,t):e.push(t)}}function tf(e,t){return!e||!t?-1:e.indexOf(t)}function an(e,t){return Math.round(e*t)/t}function Ir(e){return Se(e)?e+"px":e}function lu(e){for(;e.parent;)e=e.parent;return e}function cu(e){e=U({},{width:"100%",height:"100%"},e);const t=e.container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),Ae(n,{position:"relative",overflow:"hidden",width:Ir(e.width),height:Ir(e.height)}),t.appendChild(n),n}function Di(e,t,n){const r=fe("g");Pe(r).add(t);const i=n!==void 0?n:e.childNodes.length-1;return e.insertBefore(r,e.childNodes[i]||null),r}const fu="base",Oi=0,pu=1,hu={shape:["x","y","width","height"],connection:["waypoints"]};function X(e,t,n,r){this._eventBus=t,this._elementRegistry=r,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._init(e||{})}X.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"];X.prototype._init=function(e){const t=this._eventBus,n=this._container=cu(e),r=this._svg=fe("svg");le(r,{width:"100%",height:"100%"}),ye(n,r);const i=this._viewport=Di(r,"viewport");e.deferUpdate!==!1&&(this._viewboxChanged=Ma(Ue(this._viewboxChanged,this),300)),t.on("diagram.init",()=>{t.fire("canvas.init",{svg:r,viewport:i})}),t.on(["shape.added","connection.added","shape.removed","connection.removed","elements.changed","root.set"],()=>{delete this._cachedViewbox}),t.on("diagram.destroy",500,this._destroy,this),t.on("diagram.clear",500,this._clear,this)};X.prototype._destroy=function(){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});const e=this._container.parentNode;e&&e.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._planes,delete this._rootElement,delete this._viewport};X.prototype._clear=function(){this._elementRegistry.getAll().forEach(t=>{const n=vi(t);n==="root"?this.removeRootElement(t):this._removeElement(t,n)}),this._planes=[],this._rootElement=null,delete this._cachedViewbox};X.prototype.getDefaultLayer=function(){return this.getLayer(fu,Oi)};X.prototype.getLayer=function(e,t){if(!e)throw new Error("must specify a name");let n=this._layers[e];if(n||(n=this._layers[e]=this._createLayer(e,t)),typeof t<"u"&&n.index!==t)throw new Error("layer <"+e+"> already created at index <"+t+">");return n.group};X.prototype._getChildIndex=function(e){return wt(this._layers,function(t,n){return n.visible&&e>=n.index&&t++,t},0)};X.prototype._createLayer=function(e,t){typeof t>"u"&&(t=pu);const n=this._getChildIndex(t);return{group:Di(this._viewport,"layer-"+e,n),index:t,visible:!0}};X.prototype.showLayer=function(e){if(!e)throw new Error("must specify a name");const t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");const n=this._viewport,r=t.group,i=t.index;if(t.visible)return r;const a=this._getChildIndex(i);return n.insertBefore(r,n.childNodes[a]||null),t.visible=!0,r};X.prototype.hideLayer=function(e){if(!e)throw new Error("must specify a name");const t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");const n=t.group;return t.visible&&(It(n),t.visible=!1),n};X.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],It(t.group))};X.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null};X.prototype.findRoot=function(e){return typeof e=="string"&&(e=this._elementRegistry.get(e)),e?(this._findPlaneForRoot(lu(e))||{}).rootElement:void 0};X.prototype.getRootElements=function(){return this._planes.map(function(e){return e.rootElement})};X.prototype._findPlaneForRoot=function(e){return Ne(this._planes,function(t){return t.rootElement===e})};X.prototype.getContainer=function(){return this._container};X.prototype._updateMarker=function(e,t,n){let r;e.id||(e=this._elementRegistry.get(e)),r=this._elementRegistry._elements[e.id],r&&(L([r.gfx,r.secondaryGfx],function(i){i&&(n?Pe(i).add(t):Pe(i).remove(t))}),this._eventBus.fire("element.marker.update",{element:e,gfx:r.gfx,marker:t,add:!!n}))};X.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)};X.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)};X.prototype.hasMarker=function(e,t){e.id||(e=this._elementRegistry.get(e));const n=this.getGraphics(e);return Pe(n).has(t)};X.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)};X.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))};X.prototype.addRootElement=function(e){const t=this._rootsIdx++;e||(e={id:"__implicitroot_"+t,children:[],isImplicit:!0});const n=e.layer="root-"+t;this._ensureValid("root",e);const r=this.getLayer(n,Oi);return this.hideLayer(n),this._addRoot(e,r),this._planes.push({rootElement:e,layer:r}),e};X.prototype.removeRootElement=function(e){if(typeof e=="string"&&(e=this._elementRegistry.get(e)),!!this._findPlaneForRoot(e))return this._removeRoot(e),this._removeLayer(e.layer),this._planes=this._planes.filter(function(n){return n.rootElement!==e}),this._rootElement===e&&(this._rootElement=null),e};X.prototype.setRootElement=function(e,t){if(ut(t))throw new Error("override not supported");if(e===this._rootElement)return;let n;if(!e)throw new Error("rootElement required");return n=this._findPlaneForRoot(e),n||(e=this.addRootElement(e)),this._setRoot(e),e};X.prototype._removeRoot=function(e){const t=this._elementRegistry,n=this._eventBus;n.fire("root.remove",{element:e}),n.fire("root.removed",{element:e}),t.remove(e)};X.prototype._addRoot=function(e,t){const n=this._elementRegistry,r=this._eventBus;r.fire("root.add",{element:e}),n.add(e,t),r.fire("root.added",{element:e,gfx:t})};X.prototype._setRoot=function(e,t){const n=this._rootElement;n&&(this._elementRegistry.updateGraphics(n,null,!0),this.hideLayer(n.layer)),e&&(t||(t=this._findPlaneForRoot(e).layer),this._elementRegistry.updateGraphics(e,this._svg,!0),this.showLayer(e.layer)),this._rootElement=e,this._eventBus.fire("root.set",{element:e})};X.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 <"+t.id+"> already exists");const n=hu[e];if(!hn(n,function(i){return typeof t[i]<"u"}))throw new Error("must supply { "+n.join(", ")+" } with "+e)};X.prototype._setParent=function(e,t,n){uu(t.children,e,n),e.parent=t};X.prototype._addElement=function(e,t,n,r){n=n||this.getRootElement();const i=this._eventBus,a=this._graphicsFactory;this._ensureValid(e,t),i.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,r);const o=a.create(e,t,r);return this._elementRegistry.add(t,o),a.update(e,t,o),i.fire(e+".added",{element:t,gfx:o}),t};X.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)};X.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)};X.prototype._removeElement=function(e,t){const n=this._elementRegistry,r=this._graphicsFactory,i=this._eventBus;if(e=n.get(e.id||e),!!e)return i.fire(t+".remove",{element:e}),r.remove(e),su(e.parent&&e.parent.children,e),e.parent=null,i.fire(t+".removed",{element:e}),n.remove(e),e};X.prototype.removeShape=function(e){return this._removeElement(e,"shape")};X.prototype.removeConnection=function(e){return this._removeElement(e,"connection")};X.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)};X.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()};X.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})};X.prototype.viewbox=function(e){if(e===void 0&&this._cachedViewbox)return this._cachedViewbox;const t=this._viewport,n=this.getSize();let r,i,a,o,u,c,y;if(e)this._changeViewbox(function(){u=Math.min(n.width/e.width,n.height/e.height);const v=this._svg.createSVGMatrix().scale(u).translate(-e.x,-e.y);kt(t,v)});else return a=this._rootElement?this.getActiveLayer():null,r=a&&a.getBBox()||{},o=kt(t),i=o?o.matrix:Ua(),u=an(i.a,1e3),c=an(-i.e||0,1e3),y=an(-i.f||0,1e3),e=this._cachedViewbox={x:c?c/u:0,y:y?y/u:0,width:n.width/u,height:n.height/u,scale:u,inner:{width:r.width||0,height:r.height||0,x:r.x||0,y:r.y||0},outer:n},e;return e};X.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox(function(){e=U({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),Ni(t,n)}),{x:n.e,y:n.f}};X.prototype.scrollToElement=function(e,t){let n=100;typeof e=="string"&&(e=this._elementRegistry.get(e));const r=this.findRoot(e);r!==this.getRootElement()&&this.setRootElement(r),t||(t={}),typeof t=="number"&&(n=t),t={top:t.top||n,right:t.right||n,bottom:t.bottom||n,left:t.left||n};const i=tt(e),a=Bt(i),o=this.viewbox(),u=this.zoom();let c,y;o.y+=t.top/u,o.x+=t.left/u,o.width-=(t.right+t.left)/u,o.height-=(t.bottom+t.top)/u;const v=Bt(o);if(!(i.width<o.width&&i.height<o.height))c=i.x-o.x,y=i.y-o.y;else{const $=Math.max(0,a.right-v.right),J=Math.min(0,a.left-v.left),ie=Math.max(0,a.bottom-v.bottom),te=Math.min(0,a.top-v.top);c=$||J,y=ie||te}this.scroll({dx:-c*u,dy:-y*u})};X.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if(e==="fit-viewport")return this._fitViewport(t);let n,r;return this._changeViewbox(function(){typeof t!="object"&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),r=this._setZoom(e,t)}),an(r.a,1e3)};function Ni(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}X.prototype._fitViewport=function(e){const t=this.viewbox(),n=t.outer,r=t.inner;let i,a;return r.x>=0&&r.y>=0&&r.x+r.width<=n.width&&r.y+r.height<=n.height&&!e?a={x:0,y:0,width:Math.max(r.width+r.x,n.width),height:Math.max(r.height+r.y,n.height)}:(i=Math.min(1,n.width/r.width,n.height/r.height),a={x:r.x+(e?r.width/2-n.width/i/2:0),y:r.y+(e?r.height/2-n.height/i/2:0),width:n.width/i,height:n.height/i}),this.viewbox(a),this.viewbox(!1).scale};X.prototype._setZoom=function(e,t){const n=this._svg,r=this._viewport,i=n.createSVGMatrix(),a=n.createSVGPoint();let o,u,c,y,v;c=r.getCTM();const _=c.a;return t?(o=U(a,t),u=o.matrixTransform(c.inverse()),y=i.translate(u.x,u.y).scale(1/_*e).translate(-u.x,-u.y),v=c.multiply(y)):v=i.scale(e),Ni(this._viewport,v),v};X.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}};X.prototype.getAbsoluteBBox=function(e){const t=this.viewbox();let n;e.waypoints?n=this.getGraphics(e).getBBox():n=e;const r=n.x*t.scale-t.x*t.scale,i=n.y*t.scale-t.y*t.scale,a=n.width*t.scale,o=n.height*t.scale;return{x:r,y:i,width:a,height:o}};X.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var xt="data-element-id";function Me(e){this._elements={},this._eventBus=e}Me.$inject=["eventBus"];Me.prototype.add=function(e,t,n){var r=e.id;this._validateId(r),le(t,xt,r),n&&le(n,xt,r),this._elements[r]={element:e,gfx:t,secondaryGfx:n}};Me.prototype.remove=function(e){var t=this._elements,n=e.id||e,r=n&&t[n];r&&(le(r.gfx,xt,""),r.secondaryGfx&&le(r.secondaryGfx,xt,""),delete t[n])};Me.prototype.updateId=function(e,t){this._validateId(t),typeof e=="string"&&(e=this.get(e)),this._eventBus.fire("element.updateId",{element:e,newId:t});var n=this.getGraphics(e),r=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,r)};Me.prototype.updateGraphics=function(e,t,n){var r=e.id||e,i=this._elements[r];return n?i.secondaryGfx=t:i.gfx=t,t&&le(t,xt,r),t};Me.prototype.get=function(e){var t;typeof e=="string"?t=e:t=e&&le(e,xt);var n=this._elements[t];return n&&n.element};Me.prototype.filter=function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(n)}),t};Me.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),r=0;r<n.length;r++){var i=n[r],a=t[i],o=a.element,u=a.gfx;if(e(o,u))return o}};Me.prototype.getAll=function(){return this.filter(function(e){return e})};Me.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach(function(n){var r=t[n],i=r.element,a=r.gfx;return e(i,a)})};Me.prototype.getGraphics=function(e,t){var n=e.id||e,r=this._elements[n];return r&&(t?r.secondaryGfx:r.gfx)};Me.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")};var Zt={exports:{}},Qt={},Fr;function ki(){if(Fr)return Qt;Fr=1;function e(n,r,i,a){var o=i.inverse;return Object.defineProperty(n,"remove",{value:function(u){var c=this.indexOf(u);return c!==-1&&(this.splice(c,1),r.unset(u,o,a)),u}}),Object.defineProperty(n,"contains",{value:function(u){return this.indexOf(u)!==-1}}),Object.defineProperty(n,"add",{value:function(u,c){var y=this.indexOf(u);if(typeof c>"u"){if(y!==-1)return;c=this.length}y!==-1&&this.splice(y,1),this.splice(c,0,u),y===-1&&r.set(u,o,a)}}),Object.defineProperty(n,"__refs_collection",{value:!0}),n}function t(n){return n.__refs_collection===!0}return Qt.extend=e,Qt.isExtended=t,Qt}var Dn,$r;function du(){if($r)return Dn;$r=1;var e=ki();function t(a,o){return Object.prototype.hasOwnProperty.call(a,o.name||o)}function n(a,o,u){var c=e.extend(u[o.name]||[],a,o,u);Object.defineProperty(u,o.name,{enumerable:o.enumerable,value:c}),c.length&&c.forEach(function(y){a.set(y,o.inverse,u)})}function r(a,o,u){var c=o.inverse,y=u[o.name];Object.defineProperty(u,o.name,{configurable:o.configurable,enumerable:o.enumerable,get:function(){return y},set:function(v){if(v!==y){var _=y;y=null,_&&a.unset(_,c,u),y=v,a.set(y,c,u)}}})}function i(a,o){if(!(this instanceof i))return new i(a,o);a.inverse=o,o.inverse=a,this.props={},this.props[a.name]=a,this.props[o.name]=o}return i.prototype.bind=function(a,o){if(typeof o=="string"){if(!this.props[o])throw new Error("no property <"+o+"> in ref");o=this.props[o]}o.collection?n(this,o,a):r(this,o,a)},i.prototype.ensureRefsCollection=function(a,o){var u=a[o.name];return e.isExtended(u)||n(this,o,a),u},i.prototype.ensureBound=function(a,o){t(a,o)||this.bind(a,o)},i.prototype.unset=function(a,o,u){a&&(this.ensureBound(a,o),o.collection?this.ensureRefsCollection(a,o).remove(u):a[o.name]=void 0)},i.prototype.set=function(a,o,u){a&&(this.ensureBound(a,o),o.collection?this.ensureRefsCollection(a,o).add(u):a[o.name]=u)},Dn=i,Dn}var jr;function mu(){return jr||(jr=1,Zt.exports=du(),Zt.exports.Collection=ki()),Zt.exports}var yu=mu();const jt=Xr(yu);var Bi=new jt({name:"children",enumerable:!0,collection:!0},{name:"parent"}),Li=new jt({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),Vr=new jt({name:"attachers",collection:!0},{name:"host"}),Ii=new jt({name:"outgoing",collection:!0},{name:"source"}),Fi=new jt({name:"incoming",collection:!0},{name:"target"});function wn(){Object.defineProperty(this,"businessObject",{writable:!0}),Object.defineProperty(this,"label",{get:function(){return this.labels[0]},set:function(e){var t=this.label,n=this.labels;!e&&t?n.remove(t):n.add(e,0)}}),Bi.bind(this,"parent"),Li.bind(this,"labels"),Ii.bind(this,"outgoing"),Fi.bind(this,"incoming")}function St(){wn.call(this),Bi.bind(this,"children"),Vr.bind(this,"host"),Vr.bind(this,"attachers")}Ve(St,wn);function $i(){St.call(this)}Ve($i,St);function ji(){St.call(this),Li.bind(this,"labelTarget")}Ve(ji,St);function Vi(){wn.call(this),Ii.bind(this,"source"),Fi.bind(this,"target")}Ve(Vi,wn);var vu={connection:Vi,shape:St,label:ji,root:$i};function gu(e,t){var n=vu[e];if(!n)throw new Error("unknown type: <"+e+">");return U(new n,t)}function At(){this._uid=12}At.prototype.createRoot=function(e){return this.create("root",e)};At.prototype.createLabel=function(e){return this.create("label",e)};At.prototype.createShape=function(e){return this.create("shape",e)};At.prototype.createConnection=function(e){return this.create("connection",e)};At.prototype.create=function(e,t){return t=U({},t||{}),t.id||(t.id=e+"_"+this._uid++),gu(e,t)};var pn="__fn",Wi=1e3,Eu=Array.prototype.slice;function Ce(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}Ce.prototype.on=function(e,t,n,r){if(e=Re(e)?e:[e],ze(t)&&(r=n,n=t,t=Wi),!Se(t))throw new Error("priority must be a number");var i=n;r&&(i=Ue(n,r),i[pn]=n[pn]||n);var a=this;e.forEach(function(o){a._addListener(o,{priority:t,callback:i,next:null})})};Ce.prototype.once=function(e,t,n,r){var i=this;if(ze(t)&&(r=n,n=t,t=Wi),!Se(t))throw new Error("priority must be a number");function a(){a.__isTomb=!0;var o=n.apply(r,arguments);return i.off(e,a),o}a[pn]=n,this.on(e,t,a)};Ce.prototype.off=function(e,t){e=Re(e)?e:[e];var n=this;e.forEach(function(r){n._removeListener(r,t)})};Ce.prototype.createEvent=function(e){var t=new Vt;return t.init(e),t};Ce.prototype.fire=function(e,t){var n,r,i,a;if(a=Eu.call(arguments),typeof e=="object"&&(t=e,e=t.type),!e)throw new Error("no event type specified");if(r=this._listeners[e],!!r){t instanceof Vt?n=t:n=this.createEvent(t),a[0]=n;var o=n.type;e!==o&&(n.type=e);try{i=this._invokeListeners(n,a,r)}finally{e!==o&&(n.type=o)}return i===void 0&&n.defaultPrevented&&(i=!1),i}};Ce.prototype.handleError=function(e){return this.fire("error",{error:e})===!1};Ce.prototype._destroy=function(){this._listeners={}};Ce.prototype._invokeListeners=function(e,t,n){for(var r;n&&!e.cancelBubble;)r=this._invokeListener(e,t,n),n=n.next;return r};Ce.prototype._invokeListener=function(e,t,n){var r;if(n.callback.__isTomb)return r;try{r=wu(n.callback,t),r!==void 0&&(e.returnValue=r,e.stopPropagation()),r===!1&&e.preventDefault()}catch(i){if(!this.handleError(i))throw console.error("unhandled error in event listener",i),i}return r};Ce.prototype._addListener=function(e,t){var n=this._getListeners(e),r;if(!n){this._setListeners(e,t);return}for(;n;){if(n.priority<t.priority){t.next=n,r?r.next=t:this._setListeners(e,t);return}r=n,n=n.next}r.next=t};Ce.prototype._getListeners=function(e){return this._listeners[e]};Ce.prototype._setListeners=function(e,t){this._listeners[e]=t};Ce.prototype._removeListener=function(e,t){var n=this._getListeners(e),r,i,a;if(!t){this._setListeners(e,null);return}for(;n;)r=n.next,a=n.callback,(a===t||a[pn]===t)&&(i?i.next=r:this._setListeners(e,r)),i=n,n=r};function Vt(){}Vt.prototype.stopPropagation=function(){this.cancelBubble=!0};Vt.prototype.preventDefault=function(){this.defaultPrevented=!0};Vt.prototype.init=function(e){U(this,e||{})};function wu(e,t){return e.apply(null,t)}function xu(e){return e.childNodes[0]}function _u(e){return e.parentNode.childNodes[1]}function Te(e,t){this._eventBus=e,this._elementRegistry=t}Te.$inject=["eventBus","elementRegistry"];Te.prototype._getChildrenContainer=function(e){var t=this._elementRegistry.getGraphics(e),n;return e.parent?(n=_u(t),n||(n=fe("g"),Pe(n).add("djs-children"),ye(t.parentNode,n))):n=t,n};Te.prototype._clear=function(e){var t=xu(e);return oi(t),t};Te.prototype._createContainer=function(e,t,n,r){var i=fe("g");Pe(i).add("djs-group"),typeof n<"u"?zi(i,t,t.childNodes[n]):ye(t,i);var a=fe("g");Pe(a).add("djs-element"),Pe(a).add("djs-"+e),r&&Pe(a).add("djs-frame"),ye(i,a);var o=fe("g");return Pe(o).add("djs-visual"),ye(a,o),a};Te.prototype.create=function(e,t,n){var r=this._getChildrenContainer(t.parent);return this._createContainer(e,r,n,gi(t))};Te.prototype.updateContainments=function(e){var t=this,n=this._elementRegistry,r;r=wt(e,function(i,a){return a.parent&&(i[a.parent.id]=a.parent),i},{}),L(r,function(i){var a=i.children;if(a){var o=t._getChildrenContainer(i);L(a.slice().reverse(),function(u){var c=n.getGraphics(u);zi(c.parentNode,o)})}})};Te.prototype.drawShape=function(e,t){var n=this._eventBus;return n.fire("render.shape",{gfx:e,element:t})};Te.prototype.getShapePath=function(e){var t=this._eventBus;return t.fire("render.getShapePath",e)};Te.prototype.drawConnection=function(e,t){var n=this._eventBus;return n.fire("render.connection",{gfx:e,element:t})};Te.prototype.getConnectionPath=function(e){var t=this._eventBus;return t.fire("render.getConnectionPath",e)};Te.prototype.update=function(e,t,n){if(t.parent){var r=this._clear(n);if(e==="shape")this.drawShape(r,t),ci(n,t.x,t.y);else if(e==="connection")this.drawConnection(r,t);else throw new Error("unknown type: "+e);t.hidden?le(n,"display","none"):le(n,"display","block")}};Te.prototype.remove=function(e){var t=this._elementRegistry.getGraphics(e);It(t.parentNode)};function zi(e,t,n){var r=n||t.firstChild;e!==r&&t.insertBefore(e,r)}const bu={__depends__:[ou],__init__:["canvas"],canvas:["type",X],elementRegistry:["type",Me],elementFactory:["type",At],eventBus:["type",Ce],graphicsFactory:["type",Te]};function Su(e){var t=new Ti(e);return t.init(),t}function Au(e){e=e||{};var t={config:["value",e]},n=[t,bu].concat(e.modules||[]);return Su(n)}function Rt(e,t){this.injector=t=t||Au(e),this.get=t.get,this.invoke=t.invoke,this.get("eventBus").fire("diagram.init")}Rt.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")};Rt.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};function tr(){}tr.prototype.get=function(e){return this.$model.properties.get(this,e)};tr.prototype.set=function(e,t){this.$model.properties.set(this,e,t)};function Hi(e,t){this.model=e,this.properties=t}Hi.prototype.createType=function(e){var t=this.model,n=this.properties,r=Object.create(tr.prototype);L(e.properties,function(o){!o.isMany&&o.default!==void 0&&(r[o.name]=o.default)}),n.defineModel(r,t),n.defineDescriptor(r,e);var i=e.ns.name;function a(o){n.define(this,"$type",{value:i,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),L(o,Ue(function(u,c){this.set(c,u)},this))}return a.prototype=r,a.hasType=r.$instanceOf=this.model.hasType,n.defineModel(a,t),n.defineDescriptor(a,e),a};var Ru={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},Ui={String:function(e){return e},Boolean:function(e){return e==="true"},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e)}};function nr(e,t){var n=Ui[e];return n?n(t):t}function Fn(e){return!!Ru[e]}function Ki(e){return!!Ui[e]}function xe(e,t){var n=e.split(/:/),r,i;if(n.length===1)r=e,i=t;else if(n.length===2)r=n[1],i=n[0];else throw new Error("expected <prefix:localName> or <localName>, got "+e);return e=(i?i+":":"")+r,{name:e,prefix:i,localName:r}}function De(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}De.prototype.build=function(){return Da(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])};De.prototype.addProperty=function(e,t,n){typeof t=="boolean"&&(n=t,t=void 0),this.addNamedProperty(e,n!==!1);var r=this.properties;t!==void 0?r.splice(t,0,e):r.push(e)};De.prototype.replaceProperty=function(e,t,n){var r=e.ns,i=this.properties,a=this.propertiesByName,o=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 u=i.indexOf(e);if(u===-1)throw new Error("property <"+r.name+"> not found in property list");i.splice(u,1),this.addProperty(t,n?void 0:u,o),a[r.name]=a[r.localName]=t};De.prototype.redefineProperty=function(e,t,n){var r=e.ns.prefix,i=t.split("#"),a=xe(i[0],r),o=xe(i[1],a.prefix).name,u=this.propertiesByName[o];if(u)this.replaceProperty(u,e,n);else throw new Error("refined property <"+o+"> not found");delete e.redefines};De.prototype.addNamedProperty=function(e,t){var n=e.ns,r=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),r[n.name]=r[n.localName]=e};De.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]};De.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};De.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};De.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)};De.prototype.assertNotDefined=function(e,t){var n=e.name,r=this.propertiesByName[n];if(r)throw new Error("property <"+n+"> already defined; override of <"+r.definedBy.ns.name+"#"+r.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")};De.prototype.hasProperty=function(e){return this.propertiesByName[e]};De.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,r=this.allTypes,i=e.name;i in n||(L(e.properties,Ue(function(a){a=U({},a,{name:a.ns.localName,inherited:t}),Object.defineProperty(a,"definedBy",{value:e});var o=a.replaces,u=a.redefines;o||u?this.redefineProperty(a,o||u,o):(a.isBody&&this.setBodyProperty(a),a.isId&&this.setIdProperty(a),this.addProperty(a))},this)),r.push(e),n[i]=e)};function at(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,L(e,Ue(this.registerPackage,this))}at.prototype.getPackage=function(e){return this.packageMap[e]};at.prototype.getPackages=function(){return this.packages};at.prototype.registerPackage=function(e){e=U({},e);var t=this.packageMap;Wr(t,e,"prefix"),Wr(t,e,"uri"),L(e.types,Ue(function(n){this.registerType(n,e)},this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)};at.prototype.registerType=function(e,t){e=U({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:U(e.meta||{})});var n=xe(e.name,t.prefix),r=n.name,i={};L(e.properties,Ue(function(a){var o=xe(a.name,n.prefix),u=o.name;Fn(a.type)||(a.type=xe(a.type,o.prefix).name),U(a,{ns:o,name:u}),i[u]=a},this)),U(e,{ns:n,name:r,propertiesByName:i}),L(e.extends,Ue(function(a){var o=xe(a,n.prefix),u=this.typeMap[o.name];u.traits=u.traits||[],u.traits.push(r)},this)),this.definePackage(e,t),this.typeMap[r]=e};at.prototype.mapTypes=function(e,t,n){var r=Fn(e.name)?{name:e.name}:this.typeMap[e.name],i=this;function a(c,y){var v=xe(c,Fn(c)?"":e.prefix);i.mapTypes(v,t,y)}function o(c){return a(c,!0)}function u(c){return a(c,!1)}if(!r)throw new Error("unknown type <"+e.name+">");L(r.superClass,n?o:u),t(r,!n),L(r.traits,o)};at.prototype.getEffectiveDescriptor=function(e){var t=xe(e),n=new De(t);this.mapTypes(t,function(i,a){n.addTrait(i,a)});var r=n.build();return this.definePackage(r,r.allTypes[r.allTypes.length-1].$pkg),r};at.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})};function Wr(e,t,n){var r=t[n];if(r in e)throw new Error("package with "+n+" <"+r+"> already defined")}function yt(e){this.model=e}yt.prototype.set=function(e,t,n){if(!$e(t)||!t.length)throw new TypeError("property name must be a non-empty string");var r=this.getProperty(e,t),i=r&&r.name;Cu(n)?r?delete e[i]:delete e.$attrs[$n(t)]:r?i in e?e[i]=n:Yi(e,r,n):e.$attrs[$n(t)]=n};yt.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[$n(t)];var r=n.name;return!e[r]&&n.isMany&&Yi(e,n,[]),e[r]};yt.prototype.define=function(e,t,n){if(!n.writable){var r=n.value;n=U({},n,{get:function(){return r}}),delete n.value}Object.defineProperty(e,t,n)};yt.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})};yt.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})};yt.prototype.getProperty=function(e,t){var n=this.model,r=n.getPropertyDescriptor(e,t);if(r)return r;if(t.includes(":"))return null;const i=n.config.strict;if(typeof i<"u"){const a=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(i)throw a;typeof console<"u"&&console.warn(a)}return null};function Cu(e){return typeof e>"u"}function Yi(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function $n(e){return e.replace(/^:/,"")}function ke(e,t={}){this.properties=new yt(this),this.factory=new Hi(this,this.properties),this.registry=new at(e,this.properties),this.typeCache={},this.config=t}ke.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)};ke.prototype.getType=function(e){var t=this.typeCache,n=$e(e)?e:e.ns.name,r=t[n];return r||(e=this.registry.getEffectiveDescriptor(n),r=t[n]=this.factory.createType(e)),r};ke.prototype.createAny=function(e,t,n){var r=xe(e),i={$type:e,$instanceOf:function(o){return o===this.$type},get:function(o){return this[o]},set:function(o,u){Ta(this,[o],u)}},a={name:e,isGeneric:!0,ns:{prefix:r.prefix,localName:r.localName,uri:t}};return this.properties.defineDescriptor(i,a),this.properties.defineModel(i,this),this.properties.define(i,"get",{enumerable:!1,writable:!0}),this.properties.define(i,"set",{enumerable:!1,writable:!0}),this.properties.define(i,"$parent",{enumerable:!1,writable:!0}),this.properties.define(i,"$instanceOf",{enumerable:!1,writable:!0}),L(n,function(o,u){Ze(o)&&o.value!==void 0?i[o.name]=o.value:i[u]=o}),i};ke.prototype.getPackage=function(e){return this.registry.getPackage(e)};ke.prototype.getPackages=function(){return this.registry.getPackages()};ke.prototype.getElementDescriptor=function(e){return e.$descriptor};ke.prototype.hasType=function(e,t){t===void 0&&(t=e,e=this);var n=e.$model.getElementDescriptor(e);return t in n.allTypesByName};ke.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]};ke.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var zr=String.fromCharCode,Pu=Object.prototype.hasOwnProperty,Mu=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,Ot={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(Ot).forEach(function(e){Ot[e.toUpperCase()]=Ot[e]});function Tu(e,t,n,r){return r?Pu.call(Ot,r)?Ot[r]:"&"+r+";":zr(t||parseInt(n,16))}function st(e){return e.length>3&&e.indexOf("&")!==-1?e.replace(Mu,Tu):e}var Du="http://www.w3.org/2001/XMLSchema-instance",Ou="xsi",Hr="xsi:type",Ur="non-whitespace outside of root node";function Et(e){return new Error(e)}function Kr(e){return"missing namespace for prefix <"+e+">"}function Jt(e){return{get:e,enumerable:!0}}function Nu(e){var t={},n;for(n in e)t[n]=e[n];return t}function jn(e){return e+"$uri"}function ku(e){var t={},n,r;for(n in e)r=e[n],t[r]=r,t[jn(r)]=n;return t}function Yr(){return{line:0,column:0}}function Bu(e){throw e}function qi(e){if(!this)return new qi(e);var t=e&&e.proxy,n,r,i,a,o=Bu,u,c,y,v,_=Yr,$=!1,J=!1,ie=null,te=!1,Z;function ae(S){S instanceof Error||(S=Et(S)),ie=S,o(S,_)}function E(S){u&&(S instanceof Error||(S=Et(S)),u(S,_))}this.on=function(S,M){if(typeof M!="function")throw Et("required args <name, cb>");switch(S){case"openTag":r=M;break;case"text":n=M;break;case"closeTag":i=M;break;case"error":o=M;break;case"warn":u=M;break;case"cdata":a=M;break;case"attention":v=M;break;case"question":y=M;break;case"comment":c=M;break;default:throw Et("unsupported event: "+S)}return this},this.ns=function(S){if(typeof S>"u"&&(S={}),typeof S!="object")throw Et("required args <nsMap={}>");var M={},N;for(N in S)M[N]=S[N];return M[Du]=Ou,J=!0,Z=M,this},this.parse=function(S){if(typeof S!="string")throw Et("required args <xml=string>");return ie=null,V(S),_=Yr,te=!1,ie},this.stop=function(){te=!0};function V(S){var M=J?[]:null,N=J?ku(Z):null,D,A=[],g=0,P=!1,j=!1,F=0,I=0,se,Be,ue,ee,Oe,h,s,l,f,m="",p=0,d;function w(){if(d!==null)return d;var C,k,b,z=J&&N.xmlns,K=J&&$?[]:null,W=p,x=m,R=x.length,ne,Q,G,ce,q,pe={},oe={},he,B,H;e:for(;W<R;W++)if(he=!1,B=x.charCodeAt(W),!(B===32||B<14&&B>8)){for((B<65||B>122||B>90&&B<97)&&B!==95&&B!==58&&(E("illegal first char attribute name"),he=!0),H=W+1;H<R;H++)if(B=x.charCodeAt(H),!(B>96&&B<123||B>64&&B<91||B>47&&B<59||B===46||B===45||B===95)){if(B===32||B<14&&B>8){E("missing attribute value"),W=H;continue e}if(B===61)break;E("illegal attribute name char"),he=!0}if(q=x.substring(W,H),q==="xmlns:xmlns"&&(E("illegal declaration of xmlns"),he=!0),B=x.charCodeAt(H+1),B===34)H=x.indexOf('"',W=H+2),H===-1&&(H=x.indexOf("'",W),H!==-1&&(E("attribute value quote missmatch"),he=!0));else if(B===39)H=x.indexOf("'",W=H+2),H===-1&&(H=x.indexOf('"',W),H!==-1&&(E("attribute value quote missmatch"),he=!0));else for(E("missing attribute value quotes"),he=!0,H=H+1;H<R&&(B=x.charCodeAt(H+1),!(B===32||B<14&&B>8));H++);for(H===-1&&(E("missing closing quotes"),H=R,he=!0),he||(G=x.substring(W,H)),W=H;H+1<R&&(B=x.charCodeAt(H+1),!(B===32||B<14&&B>8));H++)W===H&&(E("illegal character after attribute end"),he=!0);if(W=H+1,he)continue e;if(q in oe){E("attribute <"+q+"> already defined");continue}if(oe[q]=!0,!J){pe[q]=G;continue}if($){if(Q=q==="xmlns"?"xmlns":q.charCodeAt(0)===120&&q.substr(0,6)==="xmlns:"?q.substr(6):null,Q!==null){if(C=st(G),k=jn(Q),ce=Z[C],!ce){if(Q==="xmlns"||k in N&&N[k]!==C)do ce="ns"+g++;while(typeof N[ce]<"u");else ce=Q;Z[C]=ce}N[Q]!==ce&&(ne||(N=Nu(N),ne=!0),N[Q]=ce,Q==="xmlns"&&(N[jn(ce)]=C,z=ce),N[k]=C),pe[q]=G;continue}K.push(q,G);continue}if(B=q.indexOf(":"),B===-1){pe[q]=G;continue}if(!(b=N[q.substring(0,B)])){E(Kr(q.substring(0,B)));continue}q=z===b?q.substr(B+1):b+q.substr(B),q===Hr&&(B=G.indexOf(":"),B!==-1?(b=G.substring(0,B),b=N[b]||b,G=b+G.substring(B)):G=z+":"+G),pe[q]=G}if($)for(W=0,R=K.length;W<R;W++){if(q=K[W++],G=K[W],B=q.indexOf(":"),B!==-1){if(!(b=N[q.substring(0,B)])){E(Kr(q.substring(0,B)));continue}q=z===b?q.substr(B+1):b+q.substr(B),q===Hr&&(B=G.indexOf(":"),B!==-1?(b=G.substring(0,B),b=N[b]||b,G=b+G.substring(B)):G=z+":"+G)}pe[q]=G}return d=pe}function T(){for(var C=/(\r\n|\r|\n)/g,k=0,b=0,z=0,K=I,W,x;F>=z&&(W=C.exec(S),!(!W||(K=W[0].length+W.index,K>F)));)k+=1,z=K;return F==-1?(b=K,x=S.substring(I)):I===0?x=S.substring(I,F):(b=F-z,x=I==-1?S.substring(F):S.substring(F,I+1)),{data:x,line:k,column:b}}for(_=T,t&&(f=Object.create({},{name:Jt(function(){return s}),originalName:Jt(function(){return l}),attrs:Jt(w),ns:Jt(function(){return N})}));I!==-1;){if(S.charCodeAt(I)===60?F=I:F=S.indexOf("<",I),F===-1){if(A.length)return ae("unexpected end of file");if(I===0)return ae("missing start tag");I<S.length&&S.substring(I).trim()&&E(Ur);return}if(I!==F){if(A.length){if(n&&(n(S.substring(I,F),st,_),te))return}else if(S.substring(I,F).trim()&&(E(Ur),te))return}if(ee=S.charCodeAt(F+1),ee===33){if(ue=S.charCodeAt(F+2),ue===91&&S.substr(F+3,6)==="CDATA["){if(I=S.indexOf("]]>",F),I===-1)return ae("unclosed cdata");if(a&&(a(S.substring(F+9,I),_),te))return;I+=3;continue}if(ue===45&&S.charCodeAt(F+3)===45){if(I=S.indexOf("-->",F),I===-1)return ae("unclosed comment");if(c&&(c(S.substring(F+4,I),st,_),te))return;I+=3;continue}}if(ee===63){if(I=S.indexOf("?>",F),I===-1)return ae("unclosed question");if(y&&(y(S.substring(F,I+2),_),te))return;I+=2;continue}for(se=F+1;;se++){if(Oe=S.charCodeAt(se),isNaN(Oe))return I=-1,ae("unclosed tag");if(Oe===34)ue=S.indexOf('"',se+1),se=ue!==-1?ue:se;else if(Oe===39)ue=S.indexOf("'",se+1),se=ue!==-1?ue:se;else if(Oe===62){I=se;break}}if(ee===33){if(v&&(v(S.substring(F,I+1),st,_),te))return;I+=1;continue}if(d={},ee===47){if(P=!1,j=!0,!A.length)return ae("missing open tag");if(se=s=A.pop(),ue=F+2+se.length,S.substring(F+2,ue)!==se)return ae("closing tag mismatch");for(;ue<I;ue++)if(ee=S.charCodeAt(ue),!(ee===32||ee>8&&ee<14))return ae("close tag")}else{if(S.charCodeAt(I-1)===47?(se=s=S.substring(F+1,I-1),P=!0,j=!0):(se=s=S.substring(F+1,I),P=!0,j=!1),!(ee>96&&ee<123||ee>64&&ee<91||ee===95||ee===58))return ae("illegal first char nodeName");for(ue=1,Be=se.length;ue<Be;ue++)if(ee=se.charCodeAt(ue),!(ee>96&&ee<123||ee>64&&ee<91||ee>47&&ee<59||ee===45||ee===95||ee==46)){if(ee===32||ee<14&&ee>8){s=se.substring(0,ue),d=null;break}return ae("invalid nodeName")}j||A.push(s)}if(J){if(D=N,P&&(j||M.push(D),d===null&&($=se.indexOf("xmlns",ue)!==-1)&&(p=ue,m=se,w(),$=!1)),l=s,ee=s.indexOf(":"),ee!==-1){if(h=N[s.substring(0,ee)],!h)return ae("missing namespace on <"+l+">");s=s.substr(ee+1)}else h=N.xmlns;h&&(s=h+":"+s)}if(P&&(p=ue,m=se,r&&(t?r(f,st,j,_):r(s,w,st,j,_),te)))return;if(j){if(i&&(i(t?f:s,st,P,_),te))return;J&&(P?N=D:N=M.pop())}I+=1}}}function Gi(e){return e.xml&&e.xml.tagAlias==="lowerCase"}var Lu={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},xn="xsi:type";function Xi(e){return e.xml&&e.xml.serialize}function Zi(e){return Xi(e)===xn}function Iu(e){return Xi(e)==="property"}function Fu(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Qi(e,t){return Gi(t)?e.prefix+":"+Fu(e.localName):e.name}function $u(e,t){var n=e.name,r=e.localName,i=t.xml&&t.xml.typePrefix;return i&&r.indexOf(i)===0?e.prefix+":"+r.slice(i.length):n}function ju(e,t){var n=xe(e),r=t.getPackage(n.prefix);return $u(n,r)}function nt(e){return new Error(e)}function He(e){return e.$descriptor}function Vu(e){U(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(t){this.references.push(t)},this.addElement=function(t){if(!t)throw nt("expected element");var n=this.elementsById,r=He(t),i=r.idProperty,a;if(i&&(a=t.get(i.name),a)){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(a))throw new Error("illegal ID <"+a+">");if(n[a])throw nt("duplicate ID <"+a+">");n[a]=t}},this.addWarning=function(t){this.warnings.push(t)}}function Wt(){}Wt.prototype.handleEnd=function(){};Wt.prototype.handleText=function(){};Wt.prototype.handleNode=function(){};function rr(){}rr.prototype=Object.create(Wt.prototype);rr.prototype.handleNode=function(){return this};function Ct(){}Ct.prototype=Object.create(Wt.prototype);Ct.prototype.handleText=function(e){this.body=(this.body||"")+e};function zt(e,t){this.property=e,this.context=t}zt.prototype=Object.create(Ct.prototype);zt.prototype.handleNode=function(e){if(this.element)throw nt("expected no sub nodes");return this.element=this.createReference(e),this};zt.prototype.handleEnd=function(){this.element.id=this.body};zt.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}};function ir(e,t){this.element=t,this.propertyDesc=e}ir.prototype=Object.create(Ct.prototype);ir.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=nr(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)};function _n(){}_n.prototype=Object.create(Ct.prototype);_n.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};function _e(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}_e.prototype=Object.create(_n.prototype);_e.prototype.addReference=function(e){this.context.addReference(e)};_e.prototype.handleText=function(e){var t=this.element,n=He(t),r=n.bodyProperty;if(!r)throw nt("unexpected body text <"+e+">");Ct.prototype.handleText.call(this,e)};_e.prototype.handleEnd=function(){var e=this.body,t=this.element,n=He(t),r=n.bodyProperty;r&&e!==void 0&&(e=nr(r.type,e),t.set(r.name,e))};_e.prototype.createElement=function(e){var t=e.attributes,n=this.type,r=He(n),i=this.context,a=new n({}),o=this.model,u;return L(t,function(c,y){var v=r.propertiesByName[y],_;v&&v.isReference?v.isMany?(_=c.split(" "),L(_,function($){i.addReference({element:a,property:v.ns.name,id:$})})):i.addReference({element:a,property:v.ns.name,id:c}):(v?c=nr(v.type,c):y!=="xmlns"&&(u=xe(y,r.ns.prefix),o.getPackage(u.prefix)&&i.addWarning({message:"unknown attribute <"+y+">",element:a,property:y,value:c})),a.set(y,c))}),a};_e.prototype.getPropertyForNode=function(e){var t=e.name,n=xe(t),r=this.type,i=this.model,a=He(r),o=n.name,u=a.propertiesByName[o],c,y;if(u&&!u.isAttr)return Zi(u)&&(c=e.attributes[xn],c)?(c=ju(c,i),y=i.getType(c),U({},u,{effectiveType:He(y).name})):u;var v=i.getPackage(n.prefix);if(v){if(c=Qi(n,v),y=i.getType(c),u=Ne(a.properties,function(_){return!_.isVirtual&&!_.isReference&&!_.isAttribute&&y.hasType(_.type)}),u)return U({},u,{effectiveType:He(y).name})}else if(u=Ne(a.properties,function(_){return!_.isReference&&!_.isAttribute&&_.type==="Element"}),u)return u;throw nt("unrecognized element <"+n.name+">")};_e.prototype.toString=function(){return"ElementDescriptor["+He(this.type).name+"]"};_e.prototype.valueHandler=function(e,t){return new ir(e,t)};_e.prototype.referenceHandler=function(e){return new zt(e,this.context)};_e.prototype.handler=function(e){return e==="Element"?new _t(this.model,e,this.context):new _e(this.model,e,this.context)};_e.prototype.handleChild=function(e){var t,n,r,i;if(t=this.getPropertyForNode(e),r=this.element,n=t.effectiveType||t.type,Ki(n))return this.valueHandler(t,r);t.isReference?i=this.referenceHandler(t).handleNode(e):i=this.handler(n).handleNode(e);var a=i.element;return a!==void 0&&(t.isMany?r.get(t.name).push(a):r.set(t.name,a),t.isReference?(U(a,{element:r}),this.context.addReference(a)):a.$parent=r),i};function ar(e,t,n){_e.call(this,e,t,n)}ar.prototype=Object.create(_e.prototype);ar.prototype.createElement=function(e){var t=e.name,n=xe(t),r=this.model,i=this.type,a=r.getPackage(n.prefix),o=a&&Qi(n,a)||t;if(!i.hasType(o))throw nt("unexpected element <"+e.originalName+">");return _e.prototype.createElement.call(this,e)};function _t(e,t,n){this.model=e,this.context=n}_t.prototype=Object.create(_n.prototype);_t.prototype.createElement=function(e){var t=e.name,n=xe(t),r=n.prefix,i=e.ns[r+"$uri"],a=e.attributes;return this.model.createAny(t,i,a)};_t.prototype.handleChild=function(e){var t=new _t(this.model,"Element",this.context).handleNode(e),n=this.element,r=t.element,i;return r!==void 0&&(i=n.$children=n.$children||[],i.push(r),r.$parent=n),t};_t.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)};function or(e){e instanceof ke&&(e={model:e}),U(this,{lax:!1},e)}or.prototype.fromXML=function(e,t,n){var r=t.rootHandler;t instanceof _e?(r=t,t={}):typeof t=="string"?(r=this.handler(t),t={}):typeof r=="string"&&(r=this.handler(r));var i=this.model,a=this.lax,o=new Vu(U({},t,{rootHandler:r})),u=new qi({proxy:!0}),c=Wu();r.context=o,c.push(r);function y(M,N,D){var A=N(),g=A.line,P=A.column,j=A.data;j.charAt(0)==="<"&&j.indexOf(" ")!==-1&&(j=j.slice(0,j.indexOf(" "))+">");var F="unparsable content "+(j?j+" ":"")+`detected
line: `+g+`
column: `+P+`
nested error: `+M.message;if(D)return o.addWarning({message:F,error:M}),!0;throw nt(F)}function v(M,N){return y(M,N,!0)}function _(){var M=o.elementsById,N=o.references,D,A;for(D=0;A=N[D];D++){var g=A.element,P=M[A.id],j=He(g).propertiesByName[A.property];if(P||o.addWarning({message:"unresolved reference <"+A.id+">",element:A.element,property:A.property,value:A.id}),j.isMany){var F=g.get(j.name),I=F.indexOf(A);I===-1&&(I=F.length),P?F[I]=P:F.splice(I,1)}else g.set(j.name,P)}}function $(){c.pop().handleEnd()}var J=/^<\?xml /i,ie=/ encoding="([^"]+)"/i,te=/^utf-8$/i;function Z(M){if(J.test(M)){var N=ie.exec(M),D=N&&N[1];!D||te.test(D)||o.addWarning({message:"unsupported document encoding <"+D+">, falling back to UTF-8"})}}function ae(M,N){var D=c.peek();try{c.push(D.handleNode(M))}catch(A){y(A,N,a)&&c.push(new rr)}}function E(M,N){try{c.peek().handleText(M)}catch(D){v(D,N)}}function V(M,N){M.trim()&&E(M,N)}var S=i.getPackages().reduce(function(M,N){return M[N.uri]=N.prefix,M},{"http://www.w3.org/XML/1998/namespace":"xml"});return u.ns(S).on("openTag",function(M,N,D,A){var g=M.attrs||{},P=Object.keys(g).reduce(function(F,I){var se=N(g[I]);return F[I]=se,F},{}),j={name:M.name,originalName:M.originalName,attributes:P,ns:M.ns};ae(j,A)}).on("question",Z).on("closeTag",$).on("cdata",E).on("text",function(M,N,D){V(N(M),D)}).on("error",y).on("warn",v),new Promise(function(M,N){var D;try{u.parse(e),_()}catch(F){D=F}var A=r.element;!D&&!A&&(D=nt("failed to parse document as <"+r.type.$descriptor.name+">"));var g=o.warnings,P=o.references,j=o.elementsById;return D?(D.warnings=g,N(D)):M({rootElement:A,elementsById:j,references:P,warnings:g})})};or.prototype.handler=function(e){return new ar(this.model,e)};function Wu(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}var zu=`<?xml version="1.0" encoding="UTF-8"?>
`,Hu=/<|>|'|"|&|\n\r|\n/g,Ji=/<|>|&/g;function Uu(e){var t={},n={},r={},i=[],a=[];this.byUri=function(o){return n[o]||e&&e.byUri(o)},this.add=function(o,u){n[o.uri]=o,u?i.push(o):a.push(o),this.mapPrefix(o.prefix,o.uri)},this.uriByPrefix=function(o){return t[o||"xmlns"]},this.mapPrefix=function(o,u){t[o||"xmlns"]=u},this.getNSKey=function(o){return o.prefix!==void 0?o.uri+"|"+o.prefix:o.uri},this.logUsed=function(o){var u=o.uri,c=this.getNSKey(o);r[c]=this.byUri(u),e&&e.logUsed(o)},this.getUsed=function(o){function u(v){var _=c.getNSKey(v);return r[_]}var c=this,y=[].concat(i,a);return y.filter(u)}}function Ku(e){return e.charAt(0).toLowerCase()+e.slice(1)}function Yu(e,t){return Gi(t)?Ku(e):e}function ea(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function ta(e){return $e(e)?e:(e.prefix?e.prefix+":":"")+e.localName}function qu(e){return e.getUsed().filter(function(t){return t.prefix!=="xml"}).map(function(t){var n="xmlns"+(t.prefix?":"+t.prefix:"");return{name:n,value:t.uri}})}function Gu(e,t){return t.isGeneric?U({localName:t.ns.localName},e):U({localName:Yu(t.ns.localName,t.$pkg)},e)}function Xu(e,t){return U({localName:t.ns.localName},e)}function Zu(e){var t=e.$descriptor;return lt(t.properties,function(n){var r=n.name;if(n.isVirtual||!Wn(e,r))return!1;var i=e[r];return i===n.default||i===null?!1:n.isMany?i.length:!0})}var Qu={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},Ju={"<":"lt",">":"gt","&":"amp"};function na(e,t,n){return e=$e(e)?e:""+e,e.replace(t,function(r){return"&"+n[r]+";"})}function el(e){return na(e,Hu,Qu)}function tl(e){return na(e,Ji,Ju)}function nl(e){return lt(e,function(t){return t.isAttr})}function rl(e){return lt(e,function(t){return!t.isAttr})}function sr(e){this.tagName=e}sr.prototype.build=function(e){return this.element=e,this};sr.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()};function ft(){}ft.prototype.serializeValue=ft.prototype.serializeTo=function(e){e.append(this.escape?tl(this.value):this.value)};ft.prototype.build=function(e,t){return this.value=t,e.type==="String"&&t.search(Ji)!==-1&&(this.escape=!0),this};function ur(e){this.tagName=e}ea(ur,ft);ur.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()};function de(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}de.prototype.build=function(e){this.element=e;var t=e.$descriptor,n=this.propertyDescriptor,r,i,a=t.isGeneric;return a?r=this.parseGeneric(e):r=this.parseNsAttributes(e),n?this.ns=this.nsPropertyTagName(n):this.ns=this.nsTagName(t),this.tagName=this.addTagName(this.ns),a||(i=Zu(e),this.parseAttributes(nl(i)),this.parseContainments(rl(i))),this.parseGenericAttributes(e,r),this};de.prototype.nsTagName=function(e){var t=this.logNamespaceUsed(e.ns);return Gu(t,e)};de.prototype.nsPropertyTagName=function(e){var t=this.logNamespaceUsed(e.ns);return Xu(t,e)};de.prototype.isLocalNs=function(e){return e.uri===this.ns.uri};de.prototype.nsAttributeName=function(e){var t;if($e(e)?t=xe(e):t=e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:U({localName:t.localName},n)};de.prototype.parseGeneric=function(e){var t=this,n=this.body,r=[];return L(e,function(i,a){var o;a==="$body"?n.push(new ft().build({type:"String"},i)):a==="$children"?L(i,function(u){n.push(new de(t).build(u))}):a.indexOf("$")!==0&&(o=t.parseNsAttribute(e,a,i),o&&r.push({name:a,value:i}))}),r};de.prototype.parseNsAttribute=function(e,t,n){var r=e.$model,i=xe(t),a;if(i.prefix==="xmlns"&&(a={prefix:i.localName,uri:n}),!i.prefix&&i.localName==="xmlns"&&(a={uri:n}),!a)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(a,!0,!0);else{var o=this.logNamespaceUsed(a,!0);this.getNamespaces().logUsed(o)}};de.prototype.parseNsAttributes=function(e,t){var n=this,r=e.$attrs,i=[];return L(r,function(a,o){var u=n.parseNsAttribute(e,o,a);u&&i.push(u)}),i};de.prototype.parseGenericAttributes=function(e,t){var n=this;L(t,function(r){if(r.name!==xn)try{n.addAttribute(n.nsAttributeName(r.name),r.value)}catch(i){console.warn("missing namespace information for ",r.name,"=",r.value,"on",e,i)}})};de.prototype.parseContainments=function(e){var t=this,n=this.body,r=this.element;L(e,function(i){var a=r.get(i.name),o=i.isReference,u=i.isMany;if(u||(a=[a]),i.isBody)n.push(new ft().build(i,a[0]));else if(Ki(i.type))L(a,function(v){n.push(new ur(t.addTagName(t.nsPropertyTagName(i))).build(i,v))});else if(o)L(a,function(v){n.push(new sr(t.addTagName(t.nsPropertyTagName(i))).build(v))});else{var c=Zi(i),y=Iu(i);L(a,function(v){var _;c?_=new bn(t,i):y?_=new de(t,i):_=new de(t),n.push(_.build(v))})}})};de.prototype.getNamespaces=function(e){var t=this.namespaces,n=this.parent,r;return t||(r=n&&n.getNamespaces(),e||!r?this.namespaces=t=new Uu(r):t=r),t};de.prototype.logNamespace=function(e,t,n){var r=this.getNamespaces(n),i=e.uri,a=e.prefix,o=r.byUri(i);return(!o||n)&&r.add(e,t),r.mapPrefix(a,i),e};de.prototype.logNamespaceUsed=function(e,t){var n=this.element,r=n.$model,i=this.getNamespaces(t),a=e.prefix,o=e.uri,u,c,y;if(!a&&!o)return{localName:e.localName};if(y=Lu[a]||r&&(r.getPackage(a)||{}).uri,o=o||y||i.uriByPrefix(a),!o)throw new Error("no namespace uri given for prefix <"+a+">");if(e=i.byUri(o),!e){for(u=a,c=1;i.uriByPrefix(u);)u=a+"_"+c++;e=this.logNamespace({prefix:u,uri:o},y===o)}return a&&i.mapPrefix(a,o),e};de.prototype.parseAttributes=function(e){var t=this,n=this.element;L(e,function(r){var i=n.get(r.name);if(r.isReference)if(!r.isMany)i=i.id;else{var a=[];L(i,function(o){a.push(o.id)}),i=a.join(" ")}t.addAttribute(t.nsAttributeName(r),i)})};de.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),ta(e)};de.prototype.addAttribute=function(e,t){var n=this.attrs;$e(t)&&(t=el(t));var r=ba(n,function(a){return a.name.localName===e.localName&&a.name.uri===e.uri&&a.name.prefix===e.prefix}),i={name:e,value:t};r!==-1?n.splice(r,1,i):n.push(i)};de.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=qu(n).concat(t)),L(t,function(r){e.append(" ").append(ta(r.name)).append('="').append(r.value).append('"')})};de.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==ft;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),L(this.body,function(r){r.serializeTo(e)}),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()};function bn(e,t){de.call(this,e,t)}ea(bn,de);bn.prototype.parseNsAttributes=function(e){var t=de.prototype.parseNsAttributes.call(this,e),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var r=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var i=e.$model.getPackage(r.uri),a=i.xml&&i.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(xn),(r.prefix?r.prefix+":":"")+a+n.ns.localName),t};bn.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri};function il(){this.value="",this.write=function(e){this.value+=e}}function al(e,t){var n=[""];this.append=function(r){return e.write(r),this},this.appendNewLine=function(){return t&&e.write(`
`),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 ol(e){e=U({format:!1,preamble:!0},e||{});function t(n,r){var i=r||new il,a=new al(i,e.format);if(e.preamble&&a.append(zu),new de().build(n).serializeTo(a),!r)return i.value}return{toXML:t}}function Sn(e,t){ke.call(this,e,t)}Sn.prototype=Object.create(ke.prototype);Sn.prototype.fromXML=function(e,t,n){$e(t)||(n=t,t="bpmn:Definitions");var r=new or(U({model:this,lax:!0},n)),i=r.handler(t);return r.fromXML(e,i)};Sn.prototype.toXML=function(e,t){var n=new ol(t);return new Promise(function(r,i){try{var a=n.toXML(e);return r({xml:a})}catch(o){return i(o)}})};var sl="BPMN20",ul="http://www.omg.org/spec/BPMN/20100524/MODEL",ll="bpmn",cl=[],fl=[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{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",isAttr:!0,type:"String"}]},{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",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{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",isAttr:!0,isReference:!0}]},{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",default:!0},{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",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:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!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",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!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:"participantRef",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:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{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",isAttr:!0,type:"String"},{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",isMany:!0,isVirtual:!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",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!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"}],superClass:["BaseElement"]},{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:"participantRef",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:["Collaboration","FlowElementsContainer"]},{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",isMany:!0,isVirtual:!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:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity","InteractionNode"],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}],superClass:["BaseElement"]},{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"}]}],pl=[{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"}]}],hl={tagAlias:"lowerCase",typePrefix:"t"},dl={name:sl,uri:ul,prefix:ll,associations:cl,types:fl,enumerations:pl,xml:hl},ml="BPMNDI",yl="http://www.omg.org/spec/BPMN/20100524/DI",vl="bpmndi",gl=[{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"]}],El=[{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"}]}],wl=[],xl={name:ml,uri:yl,prefix:vl,types:gl,enumerations:El,associations:wl},_l="DC",bl="http://www.omg.org/spec/DD/20100524/DC",Sl="dc",Al=[{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}]}],Rl=[],Cl={name:_l,uri:bl,prefix:Sl,types:Al,associations:Rl},Pl="DI",Ml="http://www.omg.org/spec/DD/20100524/DI",Tl="di",Dl=[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{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,isMany:!0,isVirtual:!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",isAttr:!0,isId:!0,type:"String"},{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,isMany:!0,isVirtual:!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",isMany:!0,isVirtual:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],Ol=[],Nl={tagAlias:"lowerCase"},kl={name:Pl,uri:Ml,prefix:Tl,types:Dl,associations:Ol,xml:Nl},Bl="bpmn.io colors for BPMN",Ll="http://bpmn.io/schema/bpmn/biocolor/1.0",Il="bioc",Fl=[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],$l=[],jl=[],Vl={name:Bl,uri:Ll,prefix:Il,types:Fl,enumerations:$l,associations:jl},Wl="BPMN in Color",zl="http://www.omg.org/spec/BPMN/non-normative/color/1.0",Hl="color",Ul=[{name:"ColoredLabel",extends:["bpmndi:BPMNLabel"],properties:[{name:"color",isAttr:!0,type:"String"}]},{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"background-color",isAttr:!0,type:"String"},{name:"border-color",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"border-color",isAttr:!0,type:"String"}]}],Kl=[],Yl=[],ql={name:Wl,uri:zl,prefix:Hl,types:Ul,enumerations:Kl,associations:Yl},Gl={bpmn:dl,bpmndi:xl,dc:Cl,di:kl,bioc:Vl,color:ql};function Xl(e,t){var n=U({},Gl,e);return new Sn(n,t)}function Ht(e){return function(){if(!window.Promise)throw new Error("Promises is not supported in this environment. Please polyfill Promise.");var t=arguments.length;if(t>=1&&ze(arguments[t-1])){var n=arguments[t-1];console.warn(new Error("Passing callbacks to "+e.name+" is deprecated and will be removed in a future major release. Please switch to promises: https://bpmn.io/l/moving-to-promises.html"));var r=Array.prototype.slice.call(arguments,0,-1);e.apply(this,r).then(function(i){var a=Object.keys(i)[0];return n(null,i[a])},function(i){return n(i,i.warnings)})}else return e.apply(this,arguments)}}var Zl="Tried to access di from the businessObject. The di is available through the diagram element only. For more information, see https://github.com/bpmn-io/bpmn-js/issues/1472";function Ql(e){Wn(e,"di")||Object.defineProperty(e,"di",{enumerable:!1,get:function(){throw new Error(Zl)}})}function be(e,t){return e.$instanceOf(t)}function Jl(e){return Ne(e.rootElements,function(t){return be(t,"bpmn:Process")||be(t,"bpmn:Collaboration")})}function ec(e,t){var n={},r=[],i={};function a(p,d){return function(w){p(w,d)}}function o(p){n[p.id]=p}function u(p){return n[p.id]}function c(p,d){var w=p.gfx;if(w)throw new Error(t("already rendered {element}",{element:Ee(p)}));return e.element(p,i[p.id],d)}function y(p,d){return e.root(p,i[p.id],d)}function v(p,d){try{var w=i[p.id]&&c(p,d);return o(p),w}catch(T){_(T.message,{element:p,error:T}),console.error(t("failed to import {element}",{element:Ee(p)})),console.error(T)}}function _(p,d){e.error(p,d)}function $(p){var d=p.bpmnElement;d?i[d.id]?_(t("multiple DI elements defined for {element}",{element:Ee(d)}),{element:d}):(i[d.id]=p,Ql(d)):_(t("no bpmnElement referenced in {element}",{element:Ee(p)}),{element:p})}function J(p){ie(p.plane)}function ie(p){$(p),L(p.planeElement,te)}function te(p){$(p)}function Z(p,d){var w=p.diagrams;if(d&&w.indexOf(d)===-1)throw new Error(t("diagram not part of bpmn:Definitions"));if(!d&&w&&w.length&&(d=w[0]),!d)throw new Error(t("no diagram to display"));i={},J(d);var T=d.plane;if(!T)throw new Error(t("no plane for {element}",{element:Ee(d)}));var C=T.bpmnElement;if(!C)if(C=Jl(p),C)_(t("correcting missing bpmnElement on {plane} to {rootElement}",{plane:Ee(T),rootElement:Ee(C)})),T.bpmnElement=C,$(T);else throw new Error(t("no process or collaboration to display"));var k=y(C,T);if(be(C,"bpmn:Process")||be(C,"bpmn:SubProcess"))E(C,k);else if(be(C,"bpmn:Collaboration"))f(C,k),V(p.rootElements,k);else throw new Error(t("unsupported bpmnElement for {plane}: {rootElement}",{plane:Ee(T),rootElement:Ee(C)}));ae()}function ae(){for(var p;r.length;)p=r.shift(),p()}function E(p,d){h(p,d),j(p.ioSpecification,d),P(p.artifacts,d),o(p)}function V(p,d){var w=lt(p,function(T){return!u(T)&&be(T,"bpmn:Process")&&T.laneSets});w.forEach(a(E,d))}function S(p,d){v(p,d)}function M(p,d){L(p,a(S,d))}function N(p,d){v(p,d)}function D(p,d){v(p,d)}function A(p,d){v(p,d)}function g(p,d){v(p,d)}function P(p,d){L(p,function(w){be(w,"bpmn:Association")?r.push(function(){g(w,d)}):g(w,d)})}function j(p,d){p&&(L(p.dataInputs,a(D,d)),L(p.dataOutputs,a(A,d)))}function F(p,d){h(p,d),P(p.artifacts,d)}function I(p,d){var w=v(p,d);be(p,"bpmn:SubProcess")&&F(p,w||d),be(p,"bpmn:Activity")&&j(p.ioSpecification,d),r.push(function(){L(p.dataInputAssociations,a(N,d)),L(p.dataOutputAssociations,a(N,d))})}function se(p,d){v(p,d)}function Be(p,d){v(p,d)}function ue(p,d){r.push(function(){var w=v(p,d);p.childLaneSet&&ee(p.childLaneSet,w||d),m(p)})}function ee(p,d){L(p.lanes,a(ue,d))}function Oe(p,d){L(p,a(ee,d))}function h(p,d){s(p.flowElements,d),p.laneSets&&Oe(p.laneSets,d)}function s(p,d){L(p,function(w){be(w,"bpmn:SequenceFlow")?r.push(function(){se(w,d)}):be(w,"bpmn:BoundaryEvent")?r.unshift(function(){I(w,d)}):be(w,"bpmn:FlowNode")?I(w,d):be(w,"bpmn:DataObject")||(be(w,"bpmn:DataStoreReference")||be(w,"bpmn:DataObjectReference")?Be(w,d):_(t("unrecognized flowElement {element} in context {context}",{element:Ee(w),context:d?Ee(d.businessObject):"null"}),{element:w,context:d}))})}function l(p,d){var w=v(p,d),T=p.processRef;T&&E(T,w||d)}function f(p,d){L(p.participants,a(l,d)),P(p.artifacts,d),r.push(function(){M(p.messageFlows,d)})}function m(p){L(p.flowNodeRef,function(d){var w=d.get("lanes");w&&w.push(p)})}return{handleDeferred:ae,handleDefinitions:Z,handleSubProcess:F,registerDi:$}}function tc(e,t,n){var r,i,a,o,u,c=[];function y(v,_){var $={root:function(Z,ae){return r.add(Z,ae)},element:function(Z,ae,E){return r.add(Z,ae,E)},error:function(Z,ae){c.push({message:Z,context:ae})}},J=new ec($,a);_=_||v.diagrams&&v.diagrams[0];var ie=nc(v,_);if(!ie)throw new Error(a("no diagram to display"));L(ie,function(Z){J.handleDefinitions(v,Z)});var te=_.plane.bpmnElement.id;o.setRootElement(o.findRoot(te+"_plane")||o.findRoot(te))}return new Promise(function(v,_){try{return r=e.get("bpmnImporter"),i=e.get("eventBus"),a=e.get("translate"),o=e.get("canvas"),i.fire("import.render.start",{definitions:t}),y(t,n),i.fire("import.render.complete",{error:u,warnings:c}),v({warnings:c})}catch($){return $.warnings=c,_($)}})}function nc(e,t){if(t){var n=t.plane.bpmnElement,r=n;!Y(n,"bpmn:Process")&&!Y(n,"bpmn:Collaboration")&&(r=rc(n));var i;Y(r,"bpmn:Collaboration")?i=r:i=Ne(e.rootElements,function(y){if(Y(y,"bpmn:Collaboration"))return Ne(y.participants,function(v){return v.processRef===r})});var a=[r];i&&(a=dn(i.participants,function(y){return y.processRef}),a.push(i));var o=ra(a),u=[t],c=[n];return L(e.diagrams,function(y){var v=y.plane.bpmnElement;o.indexOf(v)!==-1&&c.indexOf(v)===-1&&(u.push(y),c.push(v))}),u}}function ra(e){var t=[];return L(e,function(n){n&&(t.push(n),t=t.concat(ra(n.flowElements)))}),t}function rc(e){for(var t=e;t;){if(Y(t,"bpmn:Process"))return t;t=t.$parent}}var ic='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>',ia=ic,aa={verticalAlign:"middle"},oa={color:"#404040"},ac={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},oc={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},sc={position:"absolute",left:"50%",top:"40%",transform:"translate(-50%)",width:"260px",padding:"10px",background:"white",boxShadow:"0 1px 4px rgba(0,0,0,0.3)",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"14px",display:"flex",lineHeight:"1.3"},uc='<div class="bjs-powered-by-lightbox"><div class="backdrop"></div><div class="notice"><a href="https://bpmn.io" target="_blank" rel="noopener" class="link">'+ia+'</a><span>Web-based tooling for BPMN, DMN and CMMN diagrams powered by <a href="https://bpmn.io" target="_blank" rel="noopener">bpmn.io</a>.</span></div></div>',Fe;function lc(){Fe=je(uc),Ae(Fe,ac),Ae(Le("svg",Fe),aa),Ae(Le(".backdrop",Fe),oc),Ae(Le(".notice",Fe),sc),Ae(Le(".link",Fe),oa,{margin:"15px 20px 15px 10px",alignSelf:"center"})}function cc(){Fe||(lc(),Ln.bind(Fe,".backdrop","click",function(e){document.body.removeChild(Fe)})),document.body.appendChild(Fe)}function me(e){e=U({},pc,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),dc(this._container),this._init(this._container,this._moddle,e)}Ve(me,Rt);me.prototype.importXML=Ht(async function(t,n){const r=this;function i(o){const u=r.get("eventBus").createEvent(o);return Object.defineProperty(u,"context",{enumerable:!0,get:function(){return console.warn(new Error("import.parse.complete <context> is deprecated and will be removed in future library versions")),{warnings:o.warnings,references:o.references,elementsById:o.elementsById}}}),u}let a=[];try{t=this._emit("import.parse.start",{xml:t})||t;let o;try{o=await this._moddle.fromXML(t,"bpmn:Definitions")}catch($){throw this._emit("import.parse.complete",{error:$}),$}let u=o.rootElement;const c=o.references,y=o.warnings,v=o.elementsById;a=a.concat(y),u=this._emit("import.parse.complete",i({error:null,definitions:u,elementsById:v,references:c,warnings:a}))||u;const _=await this.importDefinitions(u,n);return a=a.concat(_.warnings),this._emit("import.done",{error:null,warnings:a}),{warnings:a}}catch(o){let u=o;throw a=a.concat(u.warnings||[]),on(u,a),u=fc(u),this._emit("import.done",{error:u,warnings:u.warnings}),u}});me.prototype.importDefinitions=Ht(async function(t,n){return this._setDefinitions(t),{warnings:(await this.open(n)).warnings}});me.prototype.open=Ht(async function(t){const n=this._definitions;let r=t;if(!n){const a=new Error("no XML imported");throw on(a,[]),a}if(typeof t=="string"&&(r=hc(n,t),!r)){const a=new Error("BPMNDiagram <"+t+"> not found");throw on(a,[]),a}try{this.clear()}catch(a){throw on(a,[]),a}const{warnings:i}=await tc(this,n,r);return{warnings:i}});me.prototype.saveXML=Ht(async function(t){t=t||{};let n=this._definitions,r,i;try{if(!n)throw new Error("no definitions loaded");n=this._emit("saveXML.start",{definitions:n})||n,i=(await this._moddle.toXML(n,t)).xml,i=this._emit("saveXML.serialized",{xml:i})||i}catch(o){r=o}const a=r?{error:r}:{xml:i};if(this._emit("saveXML.done",a),r)throw r;return a});me.prototype.saveSVG=Ht(async function(t={}){this._emit("saveSVG.start");let n,r;try{const i=this.get("canvas"),a=i.getActiveLayer(),o=Le("defs",i._svg),u=Sr(a),c=o?"<defs>"+Sr(o)+"</defs>":"",y=a.getBBox();n=`<?xml version="1.0" encoding="utf-8"?>
<!-- created with bpmn-js / http://bpmn.io -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="`+y.width+'" height="'+y.height+'" viewBox="'+y.x+" "+y.y+" "+y.width+" "+y.height+'" version="1.1">'+c+u+"</svg>"}catch(i){r=i}if(this._emit("saveSVG.done",{error:r,svg:n}),r)throw r;return{svg:n}});me.prototype._setDefinitions=function(e){this._definitions=e};me.prototype.getModules=function(e){return this._modules};me.prototype.clear=function(){this.getDefinitions()&&Rt.prototype.clear.call(this)};me.prototype.destroy=function(){Rt.prototype.destroy.call(this),cn(this._container)};me.prototype.on=function(e,t,n,r){return this.get("eventBus").on(e,t,n,r)};me.prototype.off=function(e,t){this.get("eventBus").off(e,t)};me.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach(),e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),typeof e=="string"&&(e=Le(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()};me.prototype.getDefinitions=function(){return this._definitions};me.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))};me.prototype._init=function(e,t,n){const r=n.modules||this.getModules(n),i=n.additionalModules||[],a=[{bpmnjs:["value",this],moddle:["value",t]}],o=[].concat(a,r,i),u=U(Oa(n,["additionalModules"]),{canvas:U({},n.canvas,{container:e}),modules:o});Rt.call(this,u),n&&n.container&&this.attachTo(n.container)};me.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)};me.prototype._createContainer=function(e){const t=je('<div class="bjs-container"></div>');return Ae(t,{width:qr(e.width),height:qr(e.height),position:e.position}),t};me.prototype._createModdle=function(e){const t=U({},this._moddleExtensions,e.moddleExtensions);return new Xl(t)};me.prototype._modules=[];function on(e,t){return e.warnings=t,e}function fc(e){const n=/unparsable content <([^>]+)> detected([\s\S]*)$/.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}const pc={width:"100%",height:"100%",position:"relative"};function qr(e){return e+(Se(e)?"px":"")}function hc(e,t){return t&&Ne(e.diagrams,function(n){return n.id===t})||null}function dc(e){const n='<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+ia+"</a>",r=je(n);Ae(Le("svg",r),aa),Ae(r,oa,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(r),Xe.bind(r,"click",function(i){cc(),i.preventDefault()})}function lr(e){me.call(this,e)}Ve(lr,me);lr.prototype._modules=[Es,pi,Ds,bi,Xs];lr.prototype._moddleExtensions={};function nf(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function Gr(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vn(e){return Math.log(e)/Math.log(10)}function sa(e,t){var n=Vn(e.min),r=Vn(e.max),i=Math.abs(n)+Math.abs(r);return i/t}function mc(e,t){return Math.max(e.min,Math.min(e.max,t))}var yc=Math.sign||function(e){return e>=0?1:-1},cr={min:.2,max:4},ua=10,vc=.1,gc=.75;function We(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=Ue(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||gc;var r=this;t.on("canvas.init",function(i){r._init(e.enabled!==!1)})}We.$inject=["config.zoomScroll","eventBus","canvas"];We.prototype.scroll=function(t){this._canvas.scroll(t)};We.prototype.reset=function(){this._canvas.zoom("fit-viewport")};We.prototype.zoom=function(t,n){var r=sa(cr,ua*2);this._totalDelta+=t,Math.abs(this._totalDelta)>vc&&(this._zoom(t,n,r),this._totalDelta=0)};We.prototype._handleWheel=function(t){if(!Yn(t.target,".djs-scrollable",!0)){var n=this._container;t.preventDefault();var r=t.ctrlKey,i=t.shiftKey,a=-1*this._scale,o;if(r?a*=t.deltaMode===0?.02:.32:a*=t.deltaMode===0?1:16,r){var u=n.getBoundingClientRect(),c={x:t.clientX-u.left,y:t.clientY-u.top};o=Math.sqrt(Math.pow(t.deltaY,2)+Math.pow(t.deltaX,2))*yc(t.deltaY)*a,this.zoom(o,c)}else i?o={dx:a*t.deltaY,dy:0}:o={dx:a*t.deltaX,dy:a*t.deltaY},this.scroll(o)}};We.prototype.stepZoom=function(t,n){var r=sa(cr,ua);this._zoom(t,n,r)};We.prototype._zoom=function(e,t,n){var r=this._canvas,i=e>0?1:-1,a=Vn(r.zoom()),o=Math.round(a/n)*n;o+=n*i;var u=Math.pow(10,o);r.zoom(mc(cr,u),t)};We.prototype.toggle=function(t){var n=this._container,r=this._handleWheel,i=this._enabled;return typeof t>"u"&&(t=!i),i!==t&&Xe[t?"bind":"unbind"](n,"wheel",r,!1),this._enabled=t,t};We.prototype._init=function(e){this.toggle(e)};const rf={__init__:["zoomScroll"],zoomScroll:["type",We]};var Ec=/^djs-cursor-.*$/;function la(e){var t=Ft(document.body);t.removeMatching(Ec),e&&t.add("djs-cursor-"+e)}function wc(){la(null)}var xc=5e3;function _c(e,t){t=t||"element.click";function n(){return!1}return e.once(t,xc,n),function(){e.off(t,n)}}var bc=15;function ca(e,t){var n;e.on("element.mousedown",500,function(o){return a(o.originalEvent)});function r(o){var u=n.start,c=n.button,y=Dr(o),v=Gr(y,u);if(!n.dragging&&Sc(v)>bc&&(n.dragging=!0,c===0&&_c(e),la("grab")),n.dragging){var _=n.last||n.start;v=Gr(y,_),t.scroll({dx:v.x,dy:v.y}),n.last=y}o.preventDefault()}function i(o){Xe.unbind(document,"mousemove",r),Xe.unbind(document,"mouseup",i),n=null,wc()}function a(o){if(!Yn(o.target,".djs-draggable")){var u=o.button;if(!(u>=2||o.ctrlKey||o.shiftKey||o.altKey))return n={button:u,start:Dr(o)},Xe.bind(document,"mousemove",r),Xe.bind(document,"mouseup",i),!0}}this.isActive=function(){return!!n}}ca.$inject=["eventBus","canvas"];function Sc(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}const af={__init__:["moveCanvas"],moveCanvas:["type",ca]};export{_c as $,Oa as A,me as B,dt as C,Yc as D,wt as E,Ne as F,zc as G,Bt as H,Ke as I,In as J,ka as K,Y as L,af as M,Rc as N,bi as O,Mc as P,Jr as Q,wr as R,ls as S,Da as T,Gr as U,lr as V,la as W,Kc as X,wc as Y,rf as Z,vn as _,Xe as a,At as a$,Ds as a0,Gn as a1,us as a2,Vc as a3,$c as a4,Pe as a5,ci as a6,So as a7,It as a8,$t as a9,sn as aA,Zo as aB,Fc as aC,es as aD,Bs as aE,su as aF,uu as aG,tn as aH,nf as aI,qc as aJ,Hn as aK,Jn as aL,ef as aM,Jc as aN,Qc as aO,Dc as aP,Oc as aQ,Nc as aR,kc as aS,ba as aT,pi as aU,Aa as aV,wi as aW,Ae as aX,tf as aY,Tc as aZ,ji as a_,bo as aa,Uc as ab,rs as ac,Zr as ad,Ze as ae,Wa as af,Hc as ag,Kn as ah,Ue as ai,Lc as aj,xu as ak,Se as al,dn as am,Xn as an,Qe as ao,ct as ap,Nt as aq,Wn as ar,Ba as as,On as at,_s as au,oi as av,ns as aw,$e as ax,Wc as ay,Rr as az,ze as b,fn as b0,Ql as b1,Gc as b2,wn as b3,Sa as b4,Bc as b5,Cc as b6,jc as b7,Pc as b8,Ps as b9,bs as ba,Xc as bb,Ma as bc,Vs as bd,Ht as be,Yn as c,U as d,Ve as e,L as f,fe as g,le as h,Re as i,ye as j,As as k,lt as l,Ic as m,ut as n,Qr as o,mo as p,je as q,Le as r,Ra as s,Dr as t,Zc as u,Ft as v,Ln as w,hn as x,tt as y,cn as z};