Home
last modified time | relevance | path

Searched refs:SequentialMarker (Results 1 – 3 of 3) sorted by relevance

/plugin/bpmnio/vendor/bpmn-js/dist/
H A Dbpmn-viewer.production.min.js2 (()=>{var Ps=Object.create;var vn=Object.defineProperty;var ks=Object.getOwnPropertyDescriptor;var Ts=Object.getOwnPropertyNames;var Ms=Object.getPrototypeOf,Ds=Object.prototype.hasOwnProperty;var Ns=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var En=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Bs=(e,t)=>{for(var n in t)vn(e,n,{get:t[n],enumerable:!0})},Ni=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ts(t))!Ds.call(e,i)&&i!==n&&vn(e,i,{get:()=>t[i],enumerable:!(r=ks(t,i))||r.enumerable});return e};var Os=(e,t,n)=>(n=e!=null?Ps(Ms(e)):{},Ni(t||!e||!e.__esModule?vn(n,"default",{value:e,enumerable:!0}):n,e)),Ls=e=>Ni(vn({},"__esModule",{value:!0}),e);var Fi={};Bs(Fi,{assign:()=>M,bind:()=>Ye,debounce:()=>dr,ensureArray:()=>Bi,every:()=>bn,filter:()=>nt,find:()=>ve,findIndex:()=>hr,flatten:()=>Is,forEach:()=>P,get:()=>Gs,groupBy:()=>Ft,has:()=>at,isArray:()=>xe,isDefined:()=>wt,isFunction:()=>tt,isNil:()=>nn,isNumber:()=>Me,isObject:()=>_e,isString:()=>De,isUndefined:()=>Tt,keys:()=>Oi,map:()=>_t,matchPattern:()=>xn,merge:()=>Ii,omit:()=>vr,pick:()=>gr,reduce:()=>Ve,set:()=>yr,size:()=>$s,some:()=>rn,sortBy:()=>Ws,throttle:()=>Us,unionBy:()=>qs,uniqueBy:()=>Li,values:()=>Vs,without:()=>js});function Is(e){return Array.prototype.concat.apply([],e)}function Tt(e){return e===void 0}function wt(e){return e!==void 0}function nn(e){return e==null}function xe(e){return tn.call(e)==="[object Array]"}function _e(e){return tn.call(e)==="[object Object]"}function Me(e){return tn.call(e)==="[object Number]"}function tt(e){let t=tn.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"||t==="[object Proxy]"}function De(e){return tn.call(e)==="[object String]"}function Bi(e){if(!xe(e))throw new Error("must supply array")}function at(e,t){return!nn(e)&&Fs.call(e,t)}function ve(e,t){let n=wn(t),r;return P(e,function(i,o){if(n(i,o))return r=i,!1}),r}function hr(e,t){let n=wn(t),r=xe(e)?-1:void 0;return P(e,function(i,o){if(n(i,o))return r=o,!1}),r}function nt(e,t){let n=wn(t),r=[];return P(e,function(i,o){n(i,o)&&r.push(i)}),r}function P(e,t){let n,r;if(Tt(e))return;let i=xe(e)?zs:Hs;for(let o in e)if(at(e,o)&&(n=e[o],r=t(n,i(o)),r===!1))return n}function js(e,t){if(Tt(e))return[];Bi(e);let n=wn(t);return e.filter(function(r,i){return!n(r,i)})}function Ve(e,t,n){return P(e,function(r,i){n=t(n,r,i)}),n}function bn(e,t){return!!Ve(e,function(n,r,i){return n&&t(r,i)},!0)}function rn(e,t){return!!ve(e,t)}function _t(e,t){let n=[];return P(e,function(r,i){n.push(t(r,i))}),n}function Oi(e){return e&&Object.keys(e)||[]}function $s(e){return Oi(e).length}function Vs(e){return _t(e,t=>t)}function Ft(e,t,n={}){return t=mr(t),P(e,function(r){let i=t(r)||"_",o=n[i];o||(o=n[i]=[]),o.push(r)}),n}function Li(e,...t){e=mr(e);let n={};return P(t,i=>Ft(i,e,n)),_t(n,function(i,o){return i[0]})}function Ws(e,t){t=mr(t);let n=[];return P(e,function(r,i){let o=t(r,i),a={d:o,v:r};for(var s=0;s<n.length;s++){let{d:c}=n[s];if(o<c){n.splice(s,0,a);return}}n.push(a)}),_t(n,r=>r.v)}function xn(e){return function(t){return bn(e,function(n,r){return t[r]===n})}}function mr(e){return tt(e)?e:t=>t[e]}function wn(e){return tt(e)?e:t=>t===e}function Hs(e){return e}function zs(e){return Number(e)}function dr(e,t){let n,r,i,o;function a(y){let v=Date.now(),A=y?0:o+t-v;if(A>0)return s(A);e.apply(i,r),c()}function s(y){n=setTimeout(a,y)}function c(){n&&clearTimeout(n),n=o=r=i=void 0}function f(){n&&a(!0),c()}function h(...y){o=Date.now(),r=y,i=this,n||s(t)}return h.flush=f,h.cancel=c,h}function Us(e,t){let n=!1;return function(...r){n||(e(...r),n=!0,setTimeout(()=>{n=!1},t))}}function Ye(e,t){return e.bind(t)}function M(e,...t){return Object.assign(e,...t)}function yr(e,t,n){let r=e;return P(t,function(i,o){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 a=t[o+1],s=r[i];wt(a)&&nn(s)&&(s=r[i]=isNaN(+a)?{}:[]),Tt(a)?Tt(n)?delete r[i]:r[i]=n:r=s}),e}function Gs(e,t,n){let r=e;return P(t,function(i){if(nn(r))return r=void 0,!1;r=r[i]}),Tt(r)?n:r}function gr(e,t){let n={},r=Object(e);return P(t,function(i){i in r&&(n[i]=e[i])}),n}function vr(e,t){let n={},r=Object(e);return P(r,function(i,o){t.indexOf(o)===-1&&(n[o]=i)}),n}function Ii(e,...t){return t.length&&P(t,function(n){!n||!_e(n)||P(n,function(r,i){if(i==="__proto__")return;let o=e[i];_e(r)?(_e(o)||(o={}),e[i]=Ii(o,r)):e[i]=r})}),e}var tn,Fs,qs,Q=Ns(()=>{tn=Object.prototype.toString,Fs=Object.prototype.hasOwnProperty;qs=Li});var Sa=En((fv,_a)=>{function Cf(e){return["String","Boolean","Integer","Real"].includes(e)}_a.exports=function e(t,n){let r=n.enter,i=n.leave,o=r&&r(t),a=t.$descriptor;o!==!1&&!a.isGeneric&&a.properties.filter(c=>!c.isAttr&&!c.isReference&&!Cf(c.type)).forEach(c=>{if(c.name in t){let f=t[c.name];c.isMany?f.forEach(h=>{e(h,n)}):e(f,n)}}),i&&i(t)}});var Ra=En((pv,Aa)=>{var Pf=Sa(),{isArray:kf,isObject:Tf,isFunction:Mf}=(Q(),Ls(Fi)),ri=class{constructor({moddleRoot:t,rule:n}){this.rule=n,this.moddleRoot=t,this.messages=[],this.report=this.report.bind(this)}report(t,n,r){let i={id:t,message:n};r&&kf(r)&&(i={...i,path:r}),r&&Tf(r)&&(i={...i,...r}),this.messages.push(i)}};Aa.exports=function({moddleRoot:t,rule:n}){let r=new ri({rule:n,moddleRoot:t}),i=n.check||{},o="leave"in i?i.leave:void 0,a="enter"in i?i.enter:Mf(i)?i:void 0;if(!a&&!o)throw new Error("no check implemented");return Pf(t,{enter:a?s=>a(s,r):void 0,leave:o?s=>o(s,r):void 0}),r.messages}});var ka=En((hv,Pa)=>{var Df=Ra(),Nf=(e,t)=>e,Bf={0:"off",1:"warn",2:"error",3:"info"},Of="rule-error";function Qe(e){let{config:t={},resolver:n,transformRule:r=Nf}=e||{};if(typeof n=="undefined")throw new Error("must provide <options.resolver>");this.config=t,this.resolver=n,this.transformRule=r,this.cachedRules={},this.cachedConfigs={}}Pa.exports=Qe;Qe.prototype.applyRule=function(t,n){let{config:r,rule:i,category:o,name:a}=n;try{return Df({moddleRoot:t,rule:i,config:r}).map(function(c){return{...c,meta:i.meta,category:o}})}catch(s){return console.error("rule <"+a+"> failed with error: ",s),[{message:s.message,category:Of}]}};Qe.prototype.resolveRule=function(e,t){let{pkg:n,ruleName:r}=this.parseRuleName(e),i=`${n}-${r}`,o=this.cachedRules[i];return o?Promise.resolve(o):Promise.resolve(this.resolver.resolveRule(n,r)).then(a=>{if(!a)throw new Error(`unknown rule <${e}>`);return this.cachedRules[i]=this.transformRule(a(t),{pkg:n,ruleName:r})})};Qe.prototype.resolveConfig=function(e){let{pkg:t,configName:n}=this.parseConfigName(e),r=`${t}-${n}`,i=this.cachedConfigs[r];return i?Promise.resolve(i):Promise.resolve(this.resolver.resolveConfig(t,n)).then(o=>{if(!o)throw new Error(`unknown config <${e}>`);return this.cachedConfigs[r]=this.normalizeConfig(o,t)})};Qe.prototype.resolveRules=function(e){return this.resolveConfiguredRules(e).then(t=>{let i=Object.entries(t).map(([o,a])=>{let{category:s,config:c}=this.parseRuleValue(a);return{name:o,category:s,config:c}}).filter(o=>o.category!=="off").map(o=>{let{name:a,config:s}=o;return this.resolveRule(a,s).then(function(c){return{...o,rule:c}})});return Promise.all(i)})};Qe.prototype.resolveConfiguredRules=function(e){let t=e.extends;return typeof t=="string"&&(t=[t]),typeof t=="undefined"&&(t=[]),Promise.all(t.map(n=>this.resolveConfig(n).then(r=>this.resolveConfiguredRules(r)))).then(n=>{let r=this.normalizeConfig(e,"bpmnlint").rules;return[...n,r].reduce((o,a)=>({...o,...a}),{})})};Qe.prototype.lint=function(e,t){return t=t||this.config,this.resolveRules(t).then(n=>{let r={};return n.forEach(i=>{let{name:o}=i,a=this.applyRule(e,i);a.length&&(r[o]=a)}),r})};Qe.prototype.parseRuleValue=function(e){let t,n;return Array.isArray(e)?(t=e[0],n=e[1]):(t=e,n={}),typeof t=="string"&&(t=t.toLowerCase()),t=Bf[t]||t,{config:n,category:t}};Qe.prototype.parseRuleName=function(e,t="bpmnlint"){let n=/^(?:(?:(@[^/]+)\/)?([^@]{1}[^/]*)\/)?([^/]+)$/.exec(e);if(!n)throw new Error(`unparseable rule name <${e}>`);let[r,i,o,a]=n;return o?{pkg:`${i?i+"/":""}${Ca(o)}`,ruleName:a}:{pkg:t,ruleName:a}};Qe.prototype.parseConfigName=function(e){let t=/^(?:(?:plugin:(?:(@[^/]+)\/)?([^@]{1}[^/]*)\/)|bpmnlint:)([^/]+)$/.exec(e);if(!t)throw new Error(`unparseable config name <${e}>`);let[n,r,i,o]=t;return i?{pkg:`${r?r+"/":""}${Ca(i)}`,configName:o}:{pkg:"bpmnlint",configName:o}};Qe.prototype.getSimplePackageName=function(e){let t=/^(?:(@[^/]+)\/)?([^/]+)$/.exec(e);if(!t)throw new Error(`unparseable package name <${e}>`);let[n,r,i]=t;return`${r?r+"/":""}${Lf(i)}`};Qe.prototype.normalizeConfig=function(e,t){let n=e.rules||{},r=Object.keys(n).reduce((i,o)=>{let a=n[o],{pkg:s,ruleName:c}=this.parseRuleName(o,t),f=s==="bpmnlint"?c:`${this.getSimplePackageName(s)}/${c}`;return i[f]=a,i},{});return{...e,rules:r}};function Ca(e){return e==="bpmnlint"?"bpmnlint":e.startsWith("bpmnlint-plugin-")?e:`bpmnlint-plugin-${e}`}function Lf(e){return e.startsWith("bpmnlint-plugin-")?e.substring(16):e}});var Ma=En((mv,Ta)=>{var If=ka();Ta.exports={Linter:If}});function Ce(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}Q();var Ks=1e3;function Xe(e,t){var n=this;t=t||Ks,e.on(["render.shape","render.connection"],t,function(r,i){var o=r.type,a=i.element,s=i.gfx,c=i.attrs;if(n.canRender(a))return o==="render.shape"?n.drawShape(s,a,c):n.drawConnection(s,a,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)})}Xe.prototype.canRender=function(e){};Xe.prototype.drawShape=function(e,t){};Xe.prototype.drawConnection=function(e,t){};Xe.prototype.getShapePath=function(e){};Xe.prototype.getConnectionPath=function(e){};Q();function N(e,t){var n=oe(e);return n&&typeof n.$instanceOf=="function"&&n.$instanceOf(t)}function ji(e,t){return rn(t,function(n){return N(e,n)})}function oe(e){return e&&e.businessObject||e}function Ze(e){return e&&e.di}function dt(e,t){return N(e,"bpmn:CallActivity")?!1:N(e,"bpmn:SubProcess")?(t=t||Ze(e),t&&N(t,"bpmndi:BPMNPlane")?!0:t&&!!t.isExpanded):N(e,"bpmn:Participant")?!!oe(e).processRef:!0}function Er(e){if(!(!N(e,"bpmn:Participant")&&!N(e,"bpmn:Lane"))){var t=Ze(e).isHorizontal;return t===void 0?!0:t}}function $i(e){return e&&!!oe(e).triggeredByEvent}Q();Q();function Vi(e){return _e(e)&&at(e,"waypoints")}function br(e){return _e(e)&&at(e,"labelTarget")}var jt={width:90,height:20},qi=15;function Wi(e){return N(e,"bpmn:Event")||N(e,"bpmn:Gateway")||N(e,"bpmn:DataStoreReference")||N(e,"bpmn:DataObjectReference")||N(e,"bpmn:DataInput")||N(e,"bpmn:DataOutput")||N(e,"bpmn:SequenceFlow")||N(e,"bpmn:MessageFlow")||N(e,"bpmn:Group")}function Ys(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)],i=Xs(e),o=Math.atan((r.y-n.y)/(r.x-n.x)),a=i.x,s=i.y;return Math.abs(o)<Math.PI/2?s-=qi:a+=qi,{x:a,y:s}}function Xs(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 Zs(e){return e.waypoints?Ys(e.waypoints):N(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+jt.height/2}:{x:e.x+e.width/2,y:e.y+e.height+jt.height/2}}function Hi(e,t){var n,r,i,o=e.label;return o&&o.bounds?(i=o.bounds,r={width:Math.max(jt.width,i.width),height:i.height},n={x:i.x+i.width/2,y:i.y+i.height/2}):(n=Zs(t),r=jt),M({x:n.x-r.width/2,y:n.y-r.height/2},r)}function Qs(e){if(N(e,"bpmn:FlowElement")||N(e,"bpmn:Participant")||N(e,"bpmn:Lane")||N(e,"bpmn:SequenceFlow")||N(e,"bpmn:MessageFlow")||N(e,"bpmn:DataInput")||N(e,"bpmn:DataOutput"))return"name";if(N(e,"bpmn:TextAnnotation"))return"text";if(N(e,"bpmn:Group"))return"categoryValueRef"}function Js(e){var t=e.categoryValueRef;return t&&t.value||""}function $t(e){var t=e.businessObject,n=Qs(t);if(n)return n==="categoryValueRef"?Js(t):t[n]||""}Q();function Mt(e,t){t=!!t,xe(e)||(e=[e]);var n,r,i,o;return P(e,function(a){var s=a;a.waypoints&&!t&&(s=Mt(a.waypoints,!0));var c=s.x,f=s.y,h=s.height||0,y=s.width||0;(c<n||n===void 0)&&(n=c),(f<r||r===void 0)&&(r=f),(c+y>i||i===void 0)&&(i=c+y),(f+h>o||o===void 0)&&(o=f+h)}),{x:n,y:r,height:o-r,width:i-n}}function _n(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function Sn(e){return!!(e&&e.isFrame)}var An=7;Q();function eu(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch{}return e}function Ki(e,t){return t.appendChild(eu(e,t))}function fe(e,t){return Ki(t,e),e}var _r=2,Yi={"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":_r,"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":_r,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function tu(e,t){return Yi[t]?e.style[t]:e.getAttributeNS(null,t)}function Xi(e,t,n){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=Yi[r];i?(i===_r&&typeof n=="number"&&(n=String(n)+"px"),e.style[r]=n):e.setAttributeNS(null,t,n)}function nu(e,t){var n=Object.keys(t),r,i;for(r=0,i;i=n[r];r++)Xi(e,i,t[i])}function te(e,t,n){if(typeof t=="string")if(n!==void 0)Xi(e,t,n);else return tu(e,t);else nu(e,t);return e}var ru=Object.prototype.toString;function qe(e){return new St(e)}function St(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}St.prototype.add=function(e){return this.list.add(e),this};St.prototype.remove=function(e){return ru.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)};St.prototype.removeMatching=function(e){let t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this};St.prototype.toggle=function(e,t){return typeof t!="undefined"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this};St.prototype.array=function(){return Array.from(this.list)};St.prototype.has=St.prototype.contains=function(e){return this.list.contains(e)};function iu(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}var Ar={svg:"http://www.w3.org/2000/svg"},zi='<svg xmlns="'+Ar.svg+'"';function Zi(e){var t=!1;e.substring(0,4)==="<svg"?e.indexOf(Ar.svg)===-1&&(e=zi+e.substring(4)):(e=zi+">"+e+"</svg>",t=!0);var n=ou(e);if(!t)return n;for(var r=document.createDocumentFragment(),i=n.firstChild;i.firstChild;)r.appendChild(i.firstChild);return r}function ou(e){var t;return t=new DOMParser,t.async=!1,t.parseFromString(e,"text/xml")}function ne(e,t){var n;return e=e.trim(),e.charAt(0)==="<"?(n=Zi(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(Ar.svg,e),t&&te(n,t),n}var xr=null;function Sr(){return xr===null&&(xr=ne("svg")),xr}function Ui(e,t){var n,r,i=Object.keys(t);for(n=0;r=i[n];n++)e[r]=t[r];return e}function Qi(e,t,n,r,i,o){var a=Sr().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return Ui(a,e);case 6:return Ui(a,{a:e,b:t,c:n,d:r,e:i,f:o})}}function Vt(e){return e?Sr().createSVGTransformFromMatrix(e):Sr().createSVGTransform()}var Gi=/([&<>]{1})/g,au=/([&<>\n\r"]{1})/g,su={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function wr(e,t){function n(r,i){return su[i]||i}return e.replace(t,n)}function Ji(e,t){var n,r,i,o,a;switch(e.nodeType){case 3:t.push(wr(e.textContent,Gi));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(i=e.attributes,n=0,r=i.length;n<r;++n)o=i.item(n),t.push(" ",o.name,'="',wr(o.value,au),'"');if(e.hasChildNodes()){for(t.push(">"),a=e.childNodes,n=0,r=a.length;n<r;++n)Ji(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("<!--",wr(e.nodeValue,Gi),"-->");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function uu(e,t){var n=Zi(t);if(iu(e),!!t){cu(n)||(n=n.documentElement);for(var r=fu(n.childNodes),i=0;i<r.length;i++)Ki(r[i],e)}}function lu(e){for(var t=e.firstChild,n=[];t;)Ji(t,n),t=t.nextSibling;return n.join("")}function cu(e){return e.nodeName==="#document-fragment"}function Rr(e,t){if(t!==void 0){try{uu(e,t)}catch(n){throw new Error("error parsing SVG: "+n.message)}return e}else return lu(e)}function fu(e){return Array.prototype.slice.call(e)}function Dt(e){var t=e.parentNode;return t&&t.removeChild(e),e}function pu(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function hu(e,t){var n,r;for(e.clear(),n=0;r=t[n];n++)e.appendItem(pu(e,r))}function Nt(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),hu(n,t)),n.consolidate()}function yt(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function mu(e){return["M",e.x,e.y]}function Cr(e){return["L",e.x,e.y]}function du(e,t,n){return["C",e.x,e.y,t.x,t.y,n.x,n.y]}function yu(e,t){let n=e.length,r=[mu(e[0])];for(let i=1;i<n;i++){let o=e[i-1],a=e[i],s=e[i+1];if(!s||!t){r.push(Cr(a));continue}let c=Math.min(t,Pr(a.x-o.x,a.y-o.y),Pr(s.x-a.x,s.y-a.y));if(!c){r.push(Cr(a));continue}let f=Rn(a,o,c),h=Rn(a,o,c*.5),y=Rn(a,s,c),v=Rn(a,s,c*.5);r.push(Cr(f)),r.push(du(h,v,y))}return r}function Rn(e,t,n){let r=t.x-e.x,i=t.y-e.y,o=Pr(r,i),a=n/o;return{x:e.x+r*a,y:e.y+i*a}}function Pr(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function qt(e,t,n){Me(t)&&(n=t,t=null),t||(t={});let r=ne("path",t);return Me(n)&&(r.dataset.cornerRadius=String(n)),kr(r,e)}function kr(e,t){let n=parseInt(e.dataset.cornerRadius,10)||0;return te(e,{d:yt(yu(t,n))}),e}Q();var Cn="hsl(225, 10%, 15%)",gu="white";function rt(e,t){return rn(e.eventDefinitions,function(n){return n.$type===t})}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 U(e,t,n){var r=Ze(e);return n||r.get("color:background-color")||r.get("bioc:fill")||t||gu}function k(e,t,n){var r=Ze(e);return n||r.get("color:border-color")||r.get("bioc:stroke")||t||Cn}function Wt(e,t,n,r){var i=Ze(e),o=i.get("label");return r||o&&o.get("color:color")||t||k(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 yt(i)}function Tr(e,t){var n=e.x,r=e.y,i=e.width,o=e.height,a=[["M",n+t,r],["l",i-t*2,0],["a",t,t,0,0,1,t,t],["l",0,o-t*2],["a",t,t,0,0,1,-t,t],["l",t*2-i,0],["a",t,t,0,0,1,-t,-t],["l",0,t*2-o],["a",t,t,0,0,1,t,-t],["z"]];return yt(a)}function ro(e){var t=e.width,n=e.height,r=e.x,i=e.y,o=t/2,a=n/2,s=[["M",r+o,i],["l",o,a],["l",-o,a],["l",-o,-a],["z"]];return yt(s)}function io(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=[["M",t,n],["l",r,0],["l",0,i],["l",-r,0],["z"]];return yt(o)}function Ht(e,t={}){return{width:We(e,t),height:Ne(e,t)}}function We(e,t={}){return at(t,"width")?t.width:e.width}function Ne(e,t={}){return at(t,"height")?t.height:e.height}Q();var Ee={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:[0,"",""]};Ee.td=Ee.th=[3,"<table><tbody><tr>","</tr></tbody></table>"];Ee.option=Ee.optgroup=[1,'<select multiple="multiple">',"</select>"];Ee.thead=Ee.tbody=Ee.colgroup=Ee.caption=Ee.tfoot=[1,"<table>","</table>"];Ee.polyline=Ee.ellipse=Ee.polygon=Ee.circle=Ee.text=Ee.line=Ee.path=Ee.rect=Ee.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function ee(e,t=globalThis.document){var f;if(typeof e!="string")throw new TypeError("String expected");let n=/^<!--(.*?)-->$/s.exec(e);if(n)return t.createComment(n[1]);let r=(f=/<([\w:]+)/.exec(e))==null?void 0:f[1];if(!r)return t.createTextNode(e);if(e=e.trim(),r==="body"){let h=t.createElement("html");h.innerHTML=e;let{lastChild:y}=h;return y.remove(),y}let[i,o,a]=Object.hasOwn(Ee,r)?Ee[r]:Ee._default,s=t.createElement("div");for(s.innerHTML=o+e+a;i--;)s=s.lastChild;if(s.firstChild===s.lastChild){let{firstChild:h}=s;return h.remove(),h}let c=t.createDocumentFragment();return c.append(...s.childNodes),c}function vu(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)}function Pe(e,...t){let n=e.style;return P(t,function(r){r&&P(r,function(i,o){n[o]=i})}),e}function kn(e,t,n){return arguments.length==2?e.getAttribute(t):n===null?e.removeAttribute(t):(e.setAttribute(t,n),e)}var Eu=Object.prototype.toString;function Bt(e){return new At(e)}function At(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}At.prototype.add=function(e){return this.list.add(e),this};At.prototype.remove=function(e){return Eu.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)};At.prototype.removeMatching=function(e){let t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this};At.prototype.toggle=function(e,t){return typeof t!="undefined"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this};At.prototype.array=function(){return Array.from(this.list)};At.prototype.has=At.prototype.contains=function(e){return this.list.contains(e)};function Tn(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function bu(e,t,n){var r=n?e:e.parentNode;return r&&typeof r.closest=="function"&&r.closest(t)||null}function xu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pn={},oo;function wu(){if(oo)return Pn;oo=1;var e,t,n;function r(){e=window.addEventListener?"addEventListener":"attachEvent",t=window.removeEventListener?"removeEventListener":"detachEvent",n=e!=="addEventListener"?"on":""}return Pn.bind=function(i,o,a,s){return e||r(),i[e](n+o,a,s||!1),a},Pn.unbind=function(i,o,a,s){return t||r(),i[t](n+o,a,s||!1),a},Pn}var ao=wu(),_u=xu(ao),Mn=vu({__proto__:null,default:_u},[ao]),so=["focus","blur"];function Su(e,t,n,r,i){return so.indexOf(n)!==-1&&(i=!0),Mn.bind(e,n,function(o){var a=o.target||o.srcElement;o.delegateTarget=bu(a,t,!0),o.delegateTarget&&r.call(e,o)},i)}function Au(e,t,n,r){return so.indexOf(t)!==-1&&(r=!0),Mn.unbind(e,t,n,r)}var on={bind:Su,unbind:Au};function He(e,t){return t=t||document,t.querySelector(e)}function uo(e,t){return t=t||document,t.querySelectorAll(e)}function zt(e){e.parentNode&&e.parentNode.removeChild(e)}function Dn(e,t,n,r,i){var o=Vt();o.setTranslate(t,n);var a=Vt();a.setRotate(r||0,0,0);var s=Vt();s.setScale(i||1,i||1),Nt(e,[o,a,s])}function Nn(e,t,n){var r=Vt();r.setTranslate(t,n),Nt(e,r)}function lo(e,t){var n=Vt();n.setRotate(t,0,0),Nt(e,n)}function Ru(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mr={exports:{}},co;function Cu(){if(co)return Mr.exports;co=1;var e=Mr.exports=function(t,n){if(n||(n=16),t===void 0&&(t=128),t<=0)return"0";for(var r=Math.log(Math.pow(2,t))/Math.log(n),i=2;r===1/0;i*=2)r=Math.log(Math.pow(2,t/i))/Math.log(n)*i;for(var o=r-Math.floor(r),a="",i=0;i<Math.floor(r);i++){var s=Math.floor(Math.random()*n).toString(n);a=s+a}if(o){var c=Math.pow(n,o),s=Math.floor(Math.random()*c).toString(n);a=s+a}var f=parseInt(a,n);return f!==1/0&&f>=Math.pow(2,t)?e(t,n):a};return e.rack=function(t,n,r){var i=function(a){var s=0;do{if(s++>10)if(r)t+=r;else throw new Error("too many ID collisions, use more bits");var c=e(t,n)}while(Object.hasOwnProperty.call(o,c));return o[c]=a,c},o=i.hats={};return i.get=function(a){return i.hats[a]},i.set=function(a,s){return i.hats[a]=s,i},i.bits=t||128,i.base=n||16,i},Mr.exports}var Pu=Cu(),ku=Ru(Pu);function st(e){if(!(this instanceof st))return new st(e);e=e||[128,36,1],this._seed=e.length?ku.rack(e[0],e[1],e[2]):e}st.prototype.next=function(e){return this._seed(e||!0)};st.prototype.nextPrefixed=function(e,t){var n;do n=e+this.next(!0);while(this.assigned(n));return this.claim(n,t),n};st.prototype.claim=function(e,t){this._seed.set(e,t||!0)};st.prototype.assigned=function(e){return this._seed.get(e)||!1};st.prototype.unclaim=function(e){delete this._seed.hats[e]};st.prototype.clear=function(){var e=this._seed.hats,t;for(t in e)this.unclaim(t)};var Tu=new st,Mu=10,Bn=3,Du=1.5,On=10,Nu=4,Ut=.95,Bu=1,Ou=.25;function gt(e,t,n,r,i,o,a){Xe.call(this,t,a);var s=e&&e.defaultFillColor,c=e&&e.defaultStrokeColor,f=e&&e.defaultLabelColor;function h(p){return n.computeStyle(p,{strokeLinecap:"round",strokeLinejoin:"round",stroke:Cn,strokeWidth:2,fill:"white"})}function y(p){return n.computeStyle(p,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:Cn,strokeWidth:2})}function v(p,l){var{ref:u={x:0,y:0},scale:m=1,element:d,parentGfx:E=i._svg}=l,S=ne("marker",{id:p,viewBox:"0 0 20 20",refX:u.x,refY:u.y,markerWidth:20*m,markerHeight:20*m,orient:"auto"});fe(S,d);var j=He(":scope > defs",E);j||(j=ne("defs"),fe(E,j)),fe(j,S)}function A(p,l,u,m){var d=Tu.nextPrefixed("marker-");return W(p,d,l,u,m),"url(#"+d+")"}function W(p,l,u,m,d){if(u==="sequenceflow-end"){var E=ne("path",{d:"M 1 5 L 11 10 L 1 15 Z",...h({fill:d,stroke:d,strokeWidth:1})});v(l,{element:E,ref:{x:11,y:10},scale:.5,parentGfx:p})}if(u==="messageflow-start"){var S=ne("circle",{cx:6,cy:6,r:3.5,...h({fill:m,stroke:d,strokeWidth:1,strokeDasharray:[1e4,1]})});v(l,{element:S,ref:{x:6,y:6},parentGfx:p})}if(u==="messageflow-end"){var j=ne("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...h({fill:m,stroke:d,strokeWidth:1,strokeDasharray:[1e4,1]})});v(l,{element:j,ref:{x:8.5,y:5},parentGfx:p})}if(u==="association-start"){var Y=ne("path",{d:"M 11 5 L 1 10 L 11 15",...y({fill:"none",stroke:d,strokeWidth:1.5,strokeDasharray:[1e4,1]})});v(l,{element:Y,ref:{x:1,y:10},scale:.5,parentGfx:p})}if(u==="association-end"){var ge=ne("path",{d:"M 1 5 L 11 10 L 1 15",...y({fill:"none",stroke:d,strokeWidth:1.5,strokeDasharray:[1e4,1]})});v(l,{element:ge,ref:{x:11,y:10},scale:.5,parentGfx:p})}if(u==="conditional-flow-marker"){var he=ne("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...h({fill:m,stroke:d})});v(l,{element:he,ref:{x:-1,y:10},scale:.5,parentGfx:p})}if(u==="conditional-default-flow-marker"){var we=ne("path",{d:"M 6 4 L 10 16",...h({stroke:d,fill:"none"})});v(l,{element:we,ref:{x:0,y:10},scale:.5,parentGfx:p})}}function L(p,l,u,m,d={}){_e(m)&&(d=m,m=0),m=m||0,d=h(d);var E=l/2,S=u/2,j=ne("circle",{cx:E,cy:S,r:Math.round((l+u)/4-m),...d});return fe(p,j),j}function O(p,l,u,m,d,E){_e(d)&&(E=d,d=0),d=d||0,E=h(E);var S=ne("rect",{x:d,y:d,width:l-d*2,height:u-d*2,rx:m,ry:m,...E});return fe(p,S),S}function H(p,l,u,m){var d=l/2,E=u/2,S=[{x:d,y:0},{x:l,y:E},{x:d,y:u},{x:0,y:E}],j=S.map(function(ge){return ge.x+","+ge.y}).join(" ");m=h(m);var Y=ne("polygon",{...m,points:j});return fe(p,Y),Y}function G(p,l,u,m){u=y(u);var d=qt(l,u,m);return fe(p,d),d}function T(p,l,u){return G(p,l,u,5)}function g(p,l,u){u=y(u);var m=ne("path",{...u,d:l});return fe(p,m),m}function w(p,l,u,m){return g(l,u,M({"data-marker":p},m))}function C(p){return je[p]}function V(p){return function(l,u,m){return C(p)(l,u,m)}}var b={"bpmn:MessageEventDefinition":function(p,l,u={},m){var d=r.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:u.width||l.width,containerHeight:u.height||l.height,position:{mx:.235,my:.315}}),E=m?k(l,c,u.stroke):U(l,s,u.fill),S=m?U(l,s,u.fill):k(l,c,u.stroke),j=g(p,d,{fill:E,stroke:S,strokeWidth:1});return j},"bpmn:TimerEventDefinition":function(p,l,u={}){var m=u.width||l.width,d=u.height||l.height,E=u.width?1:2,S=L(p,m,d,.2*d,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:E}),j=r.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:m,containerHeight:d,position:{mx:.5,my:.5}});g(p,j,{stroke:k(l,c,u.stroke),strokeWidth:E});for(var Y=0;Y<12;Y++){var ge=r.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:m,containerHeight:d,position:{mx:.5,my:.5}}),he=m/2,we=d/2;g(p,ge,{strokeWidth:1,stroke:k(l,c,u.stroke),transform:"rotate("+Y*30+","+we+","+he+")"})}return S},"bpmn:EscalationEventDefinition":function(p,l,u={},m){var d=r.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width||l.width,containerHeight:u.height||l.height,position:{mx:.5,my:.2}}),E=m?k(l,c,u.stroke):U(l,s,u.fill);return g(p,d,{fill:E,stroke:k(l,c,u.stroke),strokeWidth:1})},"bpmn:ConditionalEventDefinition":function(p,l,u={}){var m=r.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width||l.width,containerHeight:u.height||l.height,position:{mx:.5,my:.222}});return g(p,m,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:1})},"bpmn:LinkEventDefinition":function(p,l,u={},m){var d=r.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:.57,my:.263}}),E=m?k(l,c,u.stroke):U(l,s,u.fill);return g(p,d,{fill:E,stroke:k(l,c,u.stroke),strokeWidth:1})},"bpmn:ErrorEventDefinition":function(p,l,u={},m){var d=r.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:u.width||l.width,containerHeight:u.height||l.height,position:{mx:.2,my:.722}}),E=m?k(l,c,u.stroke):U(l,s,u.fill);return g(p,d,{fill:E,stroke:k(l,c,u.stroke),strokeWidth:1})},"bpmn:CancelEventDefinition":function(p,l,u={},m){var d=r.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:.638,my:-.055}}),E=m?k(l,c,u.stroke):"none",S=g(p,d,{fill:E,stroke:k(l,c,u.stroke),strokeWidth:1});return lo(S,45),S},"bpmn:CompensateEventDefinition":function(p,l,u={},m){var d=r.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width||l.width,containerHeight:u.height||l.height,position:{mx:.22,my:.5}}),E=m?k(l,c,u.stroke):U(l,s,u.fill);return g(p,d,{fill:E,stroke:k(l,c,u.stroke),strokeWidth:1})},"bpmn:SignalEventDefinition":function(p,l,u={},m){var d=r.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:u.width||l.width,containerHeight:u.height||l.height,position:{mx:.5,my:.2}}),E=m?k(l,c,u.stroke):U(l,s,u.fill);return g(p,d,{strokeWidth:1,fill:E,stroke:k(l,c,u.stroke)})},"bpmn:MultipleEventDefinition":function(p,l,u={},m){var d=r.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:u.width||l.width,containerHeight:u.height||l.height,position:{mx:.211,my:.36}}),E=m?k(l,c,u.stroke):U(l,s,u.fill);return g(p,d,{fill:E,stroke:k(l,c,u.stroke),strokeWidth:1})},"bpmn:ParallelMultipleEventDefinition":function(p,l,u={}){var m=r.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:u.width||l.width,containerHeight:u.height||l.height,position:{mx:.458,my:.194}});return g(p,m,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:1})},"bpmn:TerminateEventDefinition":function(p,l,u={}){var m=L(p,l.width,l.height,8,{fill:k(l,c,u.stroke),stroke:k(l,c,u.stroke),strokeWidth:4});return m}};function D(p,l,u={},m){var d=oe(p),E=eo(d),S=m||p;return d.get("eventDefinitions")&&d.get("eventDefinitions").length>1?d.get("parallelMultiple")?b["bpmn:ParallelMultipleEventDefinition"](l,S,u,E):b["bpmn:MultipleEventDefinition"](l,S,u,E):rt(d,"bpmn:MessageEventDefinition")?b["bpmn:MessageEventDefinition"](l,S,u,E):rt(d,"bpmn:TimerEventDefinition")?b["bpmn:TimerEventDefinition"](l,S,u,E):rt(d,"bpmn:ConditionalEventDefinition")?b["bpmn:ConditionalEventDefinition"](l,S,u,E):rt(d,"bpmn:SignalEventDefinition")?b["bpmn:SignalEventDefinition"](l,S,u,E):rt(d,"bpmn:EscalationEventDefinition")?b["bpmn:EscalationEventDefinition"](l,S,u,E):rt(d,"bpmn:LinkEventDefinition")?b["bpmn:LinkEventDefinition"](l,S,u,E):rt(d,"bpmn:ErrorEventDefinition")?b["bpmn:ErrorEventDefinition"](l,S,u,E):rt(d,"bpmn:CancelEventDefinition")?b["bpmn:CancelEventDefinition"](l,S,u,E):rt(d,"bpmn:CompensateEventDefinition")?b["bpmn:CompensateEventDefinition"](l,S,u,E):rt(d,"bpmn:TerminateEventDefinition")?b["bpmn:TerminateEventDefinition"](l,S,u,E):null}var R={ParticipantMultiplicityMarker:function(p,l,u={}){var m=We(l,u),d=Ne(l,u),E=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:m,containerHeight:d,position:{mx:(m/2-6)/m,my:(d-15)/d}});w("participant-multiplicity",p,E,{strokeWidth:2,fill:U(l,s,u.fill),stroke:k(l,c,u.stroke)})},SubProcessMarker:function(p,l,u={}){var m=O(p,14,14,0,{strokeWidth:1,fill:U(l,s,u.fill),stroke:k(l,c,u.stroke)});Nn(m,l.width/2-7.5,l.height-20);var d=r.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:l.width,containerHeight:l.height,position:{mx:(l.width/2-7.5)/l.width,my:(l.height-20)/l.height}});w("sub-process",p,d,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke)})},ParallelMarker:function(p,l,u){var m=We(l,u),d=Ne(l,u),E=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:m,containerHeight:d,position:{mx:(m/2+u.parallel)/m,my:(d-20)/d}});w("parallel",p,E,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke)})},SequentialMarker:function(p,l,u){var m=r.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:(l.width/2+u.seq)/l.width,my:(l.height-19)/l.height}});w("sequential",p,m,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke)})},CompensationMarker:function(p,l,u){var m=r.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:(l.width/2+u.compensation)/l.width,my:(l.height-13)/l.height}});w("compensation",p,m,{strokeWidth:1,fill:U(l,s,u.fill),stroke:k(l,c,u.stroke)})},LoopMarker:function(p,l,u){var m=We(l,u),d=Ne(l,u),E=r.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:m,containerHeight:d,position:{mx:(m/2+u.loop)/m,my:(d-7)/d}});w("loop",p,E,{strokeWidth:1.5,fill:"none",stroke:k(l,c,u.stroke),strokeMiterlimit:.5})},AdhocMarker:function(p,l,u){var m=We(l,u),d=Ne(l,u),E=r.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:m,containerHeight:d,position:{mx:(m/2+u.adhoc)/m,my:(d-15)/d}});w("adhoc",p,E,{strokeWidth:1,fill:k(l,c,u.stroke),stroke:k(l,c,u.stroke)})}};function F(p,l,u,m){R[p](l,u,m)}function B(p,l,u=[],m={}){m={fill:m.fill,stroke:m.stroke,width:We(l,m),height:Ne(l,m)};var d=oe(l),E=u.includes("SubProcessMarker");E?m={...m,seq:-21,parallel:-22,compensation:-25,loop:-18,adhoc:10}:m={...m,seq:-5,parallel:-6,compensation:-7,loop:0,adhoc:-8},d.get("isForCompensation")&&u.push("CompensationMarker"),N(d,"bpmn:AdHocSubProcess")&&(u.push("AdhocMarker"),E||M(m,{compensation:m.compensation-18}));var S=d.get("loopCharacteristics"),j=S&&S.get("isSequential");S&&(M(m,{compensation:m.compensation-18}),u.includes("AdhocMarker")&&M(m,{seq:-23,loop:-18,parallel:-24}),j===void 0&&u.push("LoopMarker"),j===!1&&u.push("ParallelMarker"),j===!0&&u.push("SequentialMarker")),u.includes("CompensationMarker")&&u.length===1&&M(m,{compensation:-8}),P(u,function(Y){F(Y,p,l,m)})}function I(p,l,u={}){u=M({size:{width:100}},u);var m=o.createText(l||"",u);return qe(m).add("djs-label"),fe(p,m),m}function K(p,l,u,m={}){var d=oe(l),E=Ht({x:l.x,y:l.y,width:l.width,height:l.height},m);return I(p,d.name,{align:u,box:E,padding:7,style:{fill:Wt(l,f,c,m.stroke)}})}function ot(p,l,u={}){var m={width:l.width,height:l.height,x:l.width/2+l.x,y:l.height/2+l.y};return I(p,$t(l),{box:m,style:M({},o.getExternalStyle(),{fill:Wt(l,f,c,u.stroke)})})}function ae(p,l,u,m={}){var d=Er(u),E=I(p,l,{box:{height:30,width:d?Ne(u,m):We(u,m)},align:"center-middle",style:{fill:Wt(u,f,c,m.stroke)}});if(d){var S=-1*Ne(u,m);Dn(E,0,-S,270)}}function Z(p,l,u={}){var{width:m,height:d}=Ht(l,u);return O(p,m,d,On,{...u,fill:U(l,s,u.fill),fillOpacity:Ut,stroke:k(l,c,u.stroke)})}function Je(p,l,u={}){var m=oe(l),d=U(l,s,u.fill),E=k(l,c,u.stroke);return(m.get("associationDirection")==="One"||m.get("associationDirection")==="Both")&&(u.markerEnd=A(p,"association-end",d,E)),m.get("associationDirection")==="Both"&&(u.markerStart=A(p,"association-start",d,E)),u=X(u,["markerStart","markerEnd"]),T(p,l.waypoints,{...u,stroke:E,strokeDasharray:"0, 5"})}function et(p,l,u={}){var m=U(l,s,u.fill),d=k(l,c,u.stroke),E=r.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:.474,my:.296}}),S=g(p,E,{fill:m,fillOpacity:Ut,stroke:d}),j=oe(l);if(to(j)){var Y=r.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:.33,my:(l.height-18)/l.height}});g(p,Y,{strokeWidth:2,fill:m,stroke:d})}return S}function ye(p,l,u={}){return L(p,l.width,l.height,{fillOpacity:Ut,...u,fill:U(l,s,u.fill),stroke:k(l,c,u.stroke)})}function Ge(p,l,u={}){return H(p,l.width,l.height,{fill:U(l,s,u.fill),fillOpacity:Ut,stroke:k(l,c,u.stroke)})}function x(p,l,u={}){var m=O(p,We(l,u),Ne(l,u),0,{fill:U(l,s,u.fill),fillOpacity:u.fillOpacity||Ut,stroke:k(l,c,u.stroke),strokeWidth:1.5}),d=oe(l);if(N(d,"bpmn:Lane")){var E=d.get("name");ae(p,E,l,u)}return m}function _(p,l,u={}){var m=Z(p,l,u),d=dt(l);if($i(l)&&(te(m,{strokeDasharray:"0, 5.5",strokeWidth:2.5}),!d)){var E=oe(l).flowElements||[],S=E.filter(j=>N(j,"bpmn:StartEvent"));S.length===1&&$(S[0],p,u,l)}return K(p,l,d?"center-top":"center-middle",u),d?B(p,l,void 0,u):B(p,l,["SubProcessMarker"],u),m}function $(p,l,u,m){var d=22,E={fill:U(m,s,u.fill),stroke:k(m,c,u.stroke),width:d,height:d},S=oe(p).isInterrupting,j=S?0:3,Y=S?1:1.2,ge=20,he=(d-ge)/2,we="translate("+he+","+he+")";L(l,ge,ge,{fill:E.fill,stroke:E.stroke,strokeWidth:Y,strokeDasharray:j,transform:we}),D(p,l,E,m)}function re(p,l,u={}){var m=Z(p,l,u);return K(p,l,"center-middle",u),B(p,l,void 0,u),m}var je=this.handlers={"bpmn:AdHocSubProcess":function(p,l,u={}){return dt(l)?u=X(u,["fill","stroke","width","height"]):u=X(u,["fill","stroke"]),_(p,l,u)},"bpmn:Association":function(p,l,u={}){return u=X(u,["fill","stroke"]),Je(p,l,u)},"bpmn:BoundaryEvent":function(p,l,u={}){var{renderIcon:m=!0}=u;u=X(u,["fill","stroke"]);var d=oe(l),E=d.get("cancelActivity");u={strokeWidth:1.5,fill:U(l,s,u.fill),fillOpacity:Bu,stroke:k(l,c,u.stroke)},E||(u.strokeDasharray="6");var S=ye(p,l,u);return L(p,l.width,l.height,Bn,{...u,fill:"none"}),m&&D(l,p,u),S},"bpmn:BusinessRuleTask":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=re(p,l,u),d=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),E=g(p,d);te(E,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:1});var S=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),j=g(p,S);return te(j,{fill:k(l,c,u.stroke),stroke:k(l,c,u.stroke),strokeWidth:1}),m},"bpmn:CallActivity":function(p,l,u={}){return u=X(u,["fill","stroke"]),_(p,l,{strokeWidth:5,...u})},"bpmn:ComplexGateway":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=Ge(p,l,u),d=r.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:l.width,containerHeight:l.height,position:{mx:.46,my:.26}});return g(p,d,{fill:k(l,c,u.stroke),stroke:k(l,c,u.stroke),strokeWidth:1}),m},"bpmn:DataInput":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=r.getRawPath("DATA_ARROW"),d=et(p,l,u);return g(p,m,{fill:"none",stroke:k(l,c,u.stroke),strokeWidth:1}),d},"bpmn:DataInputAssociation":function(p,l,u={}){return u=X(u,["fill","stroke"]),Je(p,l,{...u,markerEnd:A(p,"association-end",U(l,s,u.fill),k(l,c,u.stroke))})},"bpmn:DataObject":function(p,l,u={}){return u=X(u,["fill","stroke"]),et(p,l,u)},"bpmn:DataObjectReference":V("bpmn:DataObject"),"bpmn:DataOutput":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=r.getRawPath("DATA_ARROW"),d=et(p,l,u);return g(p,m,{strokeWidth:1,fill:k(l,c,u.stroke),stroke:k(l,c,u.stroke)}),d},"bpmn:DataOutputAssociation":function(p,l,u={}){return u=X(u,["fill","stroke"]),Je(p,l,{...u,markerEnd:A(p,"association-end",U(l,s,u.fill),k(l,c,u.stroke))})},"bpmn:DataStoreReference":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=r.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:l.width,containerHeight:l.height,position:{mx:0,my:.133}});return g(p,m,{fill:U(l,s,u.fill),fillOpacity:Ut,stroke:k(l,c,u.stroke),strokeWidth:2})},"bpmn:EndEvent":function(p,l,u={}){var{renderIcon:m=!0}=u;u=X(u,["fill","stroke"]);var d=ye(p,l,{...u,strokeWidth:4});return m&&D(l,p,u),d},"bpmn:EventBasedGateway":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=oe(l),d=Ge(p,l,u);L(p,l.width,l.height,l.height*.2,{fill:U(l,"none",u.fill),stroke:k(l,c,u.stroke),strokeWidth:1});var E=m.get("eventGatewayType"),S=!!m.get("instantiate");function j(){var ge=r.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:l.width,containerHeight:l.height,position:{mx:.36,my:.44}});g(p,ge,{fill:"none",stroke:k(l,c,u.stroke),strokeWidth:2})}if(E==="Parallel"){var Y=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:l.width,containerHeight:l.height,position:{mx:.474,my:.296}});g(p,Y,{fill:"none",stroke:k(l,c,u.stroke),strokeWidth:1})}else E==="Exclusive"&&(S||L(p,l.width,l.height,l.height*.26,{fill:"none",stroke:k(l,c,u.stroke),strokeWidth:1}),j());return d},"bpmn:ExclusiveGateway":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=Ge(p,l,u),d=r.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:l.width,containerHeight:l.height,position:{mx:.32,my:.3}}),E=Ze(l);return E.get("isMarkerVisible")&&g(p,d,{fill:k(l,c,u.stroke),stroke:k(l,c,u.stroke),strokeWidth:1}),m},"bpmn:Gateway":function(p,l,u={}){return u=X(u,["fill","stroke"]),Ge(p,l,u)},"bpmn:Group":function(p,l,u={}){return u=X(u,["fill","stroke","width","height"]),O(p,l.width,l.height,On,{stroke:k(l,c,u.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:We(l,u),height:Ne(l,u)})},"bpmn:InclusiveGateway":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=Ge(p,l,u);return L(p,l.width,l.height,l.height*.24,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:2.5}),m},"bpmn:IntermediateEvent":function(p,l,u={}){var{renderIcon:m=!0}=u;u=X(u,["fill","stroke"]);var d=ye(p,l,{...u,strokeWidth:1.5});return L(p,l.width,l.height,Bn,{fill:"none",stroke:k(l,c,u.stroke),strokeWidth:1.5}),m&&D(l,p,u),d},"bpmn:IntermediateCatchEvent":V("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":V("bpmn:IntermediateEvent"),"bpmn:Lane":function(p,l,u={}){return u=X(u,["fill","stroke","width","height"]),x(p,l,{...u,fillOpacity:Ou})},"bpmn:ManualTask":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=re(p,l,u),d=r.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return g(p,d,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:.5}),m},"bpmn:MessageFlow":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=oe(l),d=Ze(l),E=U(l,s,u.fill),S=k(l,c,u.stroke),j=T(p,l.waypoints,{markerEnd:A(p,"messageflow-end",E,S),markerStart:A(p,"messageflow-start",E,S),stroke:S,strokeDasharray:"10, 11",strokeWidth:1.5});if(m.get("messageRef")){var Y=j.getPointAtLength(j.getTotalLength()/2),ge=r.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:Y.x,y:Y.y}}),he={strokeWidth:1};d.get("messageVisibleKind")==="initiating"?(he.fill=E,he.stroke=S):(he.fill=S,he.stroke=E);var we=g(p,ge,he),Ke=m.get("messageRef"),ie=Ke.get("name"),mt=I(p,ie,{align:"center-top",fitBox:!0,style:{fill:S}}),gn=we.getBBox(),$e=mt.getBBox(),z=Y.x-$e.width/2,J=Y.y+gn.height/2+Mu;Dn(mt,z,J,0)}return j},"bpmn:ParallelGateway":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=Ge(p,l,u),d=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:l.width,containerHeight:l.height,position:{mx:.46,my:.2}});return g(p,d,{fill:k(l,c,u.stroke),stroke:k(l,c,u.stroke),strokeWidth:1}),m},"bpmn:Participant":function(p,l,u={}){u=X(u,["fill","stroke","width","height"]);var m=x(p,l,u),d=dt(l),E=Er(l),S=oe(l),j=S.get("name");if(d){var Y=E?[{x:30,y:0},{x:30,y:Ne(l,u)}]:[{x:0,y:30},{x:We(l,u),y:30}];G(p,Y,{stroke:k(l,c,u.stroke),strokeWidth:Du}),ae(p,j,l,u)}else{var ge=Ht(l,u);E||(ge.height=We(l,u),ge.width=Ne(l,u));var he=I(p,j,{box:ge,align:"center-middle",style:{fill:Wt(l,f,c,u.stroke)}});if(!E){var we=-1*Ne(l,u);Dn(he,0,-we,270)}}return S.get("participantMultiplicity")&&F("ParticipantMultiplicityMarker",p,l,u),m},"bpmn:ReceiveTask":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=oe(l),d=re(p,l,u),E;return m.get("instantiate")?(L(p,28,28,20*.22,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:1}),E=r.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):E=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),g(p,E,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:1}),d},"bpmn:ScriptTask":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=re(p,l,u),d=r.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return g(p,d,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:1}),m},"bpmn:SendTask":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=re(p,l,u),d=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return g(p,d,{fill:k(l,c,u.stroke),stroke:U(l,s,u.fill),strokeWidth:1}),m},"bpmn:SequenceFlow":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=U(l,s,u.fill),d=k(l,c,u.stroke),E=T(p,l.waypoints,{markerEnd:A(p,"sequenceflow-end",m,d),stroke:d}),S=oe(l),{source:j}=l;if(j){var Y=oe(j);S.get("conditionExpression")&&N(Y,"bpmn:Activity")&&te(E,{markerStart:A(p,"conditional-flow-marker",m,d)}),Y.get("default")&&(N(Y,"bpmn:Gateway")||N(Y,"bpmn:Activity"))&&Y.get("default")===S&&te(E,{markerStart:A(p,"conditional-default-flow-marker",m,d)})}return E},"bpmn:ServiceTask":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=re(p,l,u);L(p,10,10,{fill:U(l,s,u.fill),stroke:"none",transform:"translate(6, 6)"});var d=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});g(p,d,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:1}),L(p,10,10,{fill:U(l,s,u.fill),stroke:"none",transform:"translate(11, 10)"});var E=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return g(p,E,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:1}),m},"bpmn:StartEvent":function(p,l,u={}){var{renderIcon:m=!0}=u;u=X(u,["fill","stroke"]);var d=oe(l);d.get("isInterrupting")||(u={...u,strokeDasharray:"6"});var E=ye(p,l,u);return m&&D(l,p,u),E},"bpmn:SubProcess":function(p,l,u={}){return dt(l)?u=X(u,["fill","stroke","width","height"]):u=X(u,["fill","stroke"]),_(p,l,u)},"bpmn:Task":function(p,l,u={}){return u=X(u,["fill","stroke"]),re(p,l,u)},"bpmn:TextAnnotation":function(p,l,u={}){u=X(u,["fill","stroke"]);var{width:m,height:d}=Ht(l,u),E=O(p,m,d,0,0,{fill:"none",stroke:"none"}),S=r.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:m,containerHeight:d,position:{mx:0,my:0}});g(p,S,{stroke:k(l,c,u.stroke)});var j=oe(l),Y=j.get("text")||"";return I(p,Y,{align:"left-top",box:Ht(l,u),padding:An,style:{fill:Wt(l,f,c,u.stroke)}}),E},"bpmn:Transaction":function(p,l,u={}){dt(l)?u=X(u,["fill","stroke","width","height"]):u=X(u,["fill","stroke"]);var m=_(p,l,{strokeWidth:1.5,...u}),d=n.style(["no-fill","no-events"],{stroke:k(l,c,u.stroke),strokeWidth:1.5}),E=dt(l);return E||(u={}),O(p,We(l,u),Ne(l,u),On-Bn,Bn,d),m},"bpmn:UserTask":function(p,l,u={}){u=X(u,["fill","stroke"]);var m=re(p,l,u),d=15,E=12,S=r.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:d,y:E}});g(p,S,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:.5});var j=r.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:d,y:E}});g(p,j,{fill:U(l,s,u.fill),stroke:k(l,c,u.stroke),strokeWidth:.5});var Y=r.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:d,y:E}});return g(p,Y,{fill:k(l,c,u.stroke),stroke:k(l,c,u.stroke),strokeWidth:.5}),m},label:function(p,l,u={}){return ot(p,l,u)}};this._drawPath=g,this._renderer=C}Ce(gt,Xe);gt.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"];gt.prototype.canRender=function(e){return N(e,"bpmn:BaseElement")};gt.prototype.drawShape=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)};gt.prototype.drawConnection=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)};gt.prototype.getShapePath=function(e){return br(e)?Tr(e,Nu):N(e,"bpmn:Event")?no(e):N(e,"bpmn:Activity")?Tr(e,On):N(e,"bpmn:Gateway")?ro(e):io(e)};function X(e,t=[]){return t.reduce((n,r)=>(e[r]&&(n[r]=e[r]),n),{})}Q();Q();var Lu=0,Iu={width:150,height:50};function Fu(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function ju(e){return _e(e)?M({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}var Dr=null;function $u(){return Dr||(Dr=document.createElement("canvas").getContext("2d")),Dr}function Vu(e){var t=[];return e.fontStyle&&t.push(e.fontStyle),e.fontVariant&&t.push(e.fontVariant),e.fontWeight&&t.push(e.fontWeight),e.fontStretch&&t.push(e.fontStretch),t.push(po(e.fontSize)||"12px"),t.push(e.fontFamily||"sans-serif"),t.join(" ")}function po(e){if(e!=null)return typeof e=="number"||/^-?\d+(\.\d+)?$/.test(e)?e+"px":e}function qu(e,t){var n=$u();if(!n)return{width:0,height:0};n.font=Vu(t),"letterSpacing"in n&&(n.letterSpacing=po(t.letterSpacing)||"0px");var r=e==="",i=r?"dummy":e.replace(/\s+$/,""),o=n.measureText(i);return{width:r?0:o.width,height:"fontBoundingBoxAscent"in o?o.fontBoundingBoxAscent+o.fontBoundingBoxDescent:o.actualBoundingBoxAscent+o.actualBoundingBoxDescent}}function Wu(e,t,n){for(var r=e.shift(),i=r,o;;){if(o=qu(i,n),o.width=i?o.width:0,i===" "||i===""||o.width<Math.round(t)||i.length<2)return Hu(e,i,r,o);i=Uu(i,o.width,t)}}function Hu(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 fo="\xAD";function zu(e,t){var n=e.split(/(\s|-|\u00AD)/g),r,i=[],o=0;if(n.length>1)for(;r=n.shift();)if(r.length+o<t)i.push(r),o+=r.length;else{(r==="-"||r===fo)&&i.pop();break}var a=i[i.length-1];return a&&a===fo&&(i[i.length-1]="-"),i.join("")}function Uu(e,t,n){var r=Math.max(e.length*(n/t),1),i=zu(e,r);return i||(i=e.slice(0,Math.max(Math.round(r-1),1))),i}function Gt(e){this._config=M({},{size:Iu,padding:Lu,style:{},align:"center-top"},e||{})}Gt.prototype.createText=function(e,t){return this.layoutText(e,t).element};Gt.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions};Gt.prototype.layoutText=function(e,t){for(var n=M({},this._config.size,t.box),r=M({},this._config.style,t.style),i=Fu(t.align||this._config.align),o=ju(t.padding!==void 0?t.padding:this._config.padding),a=t.fitBox||!1,s=Gu(r),c=e.split(/\u00AD?\r?\n/),f=[],h=n.width-o.left-o.right;c.length;)f.push(Wu(c,h,r));i.vertical==="middle"&&(o.top=o.bottom=0);var y=Ve(f,function(O,H,G){return O+(s||H.height)},0)+o.top+o.bottom,v=Ve(f,function(O,H,G){return H.width>O?H.width:O},0),A=o.top;i.vertical==="middle"&&(A+=(n.height-y)/2),A-=(s||f[0].height)/4;var W=ne("text");te(W,r),P(f,function(O){var H;switch(A+=s||O.height,i.horizontal){case"left":H=o.left;break;case"right":H=(a?v:h)-o.right-O.width;break;default:H=Math.max(((a?v:h)-O.width)/2+o.left,0)}var G=ne("tspan");te(G,{x:H,y:A}),G.textContent=O.text,fe(W,G)});var L={width:v,height:y};return{dimensions:L,element:W}};function Gu(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}var Ku=12,Yu=1.2,Xu=40;function Ln(e){var t=M({fontFamily:"Arial, sans-serif",fontSize:Ku,fontWeight:"normal",lineHeight:Yu},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,r=M({},t,{fontSize:n},e&&e.externalStyle||{}),i=new Gt({style:t});this.getExternalLabelBounds=function(a,s){var c={width:Math.max(a.width,jt.width),height:30},f=o(s,c,{style:r});return{x:Math.round(a.x+a.width/2-f.width/2),y:a.y,width:Math.ceil(f.width),height:Math.ceil(f.height)}},this.getTextAnnotationBounds=function(a,s){var c=o(s,a,{style:t,align:"left-top",padding:An});return{x:a.x,y:a.y,width:a.width,height:Math.max(Xu,Math.round(c.height))}},this.getDimensions=function(a,s){return i.getDimensions(a,s||{})};function o(a,s,c){return i.getDimensions(a,M({box:s},c))}this.createText=function(a,s){return i.createText(a,s||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return r}}Ln.$inject=["config.textRenderer"];function Nr(){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,o;n.abspos?(i=n.abspos.x,o=n.abspos.y):(i=n.containerWidth*n.position.mx,o=n.containerHeight*n.position.my);var a={};if(n.position){for(var s=n.containerHeight/r.height*n.yScaleFactor,c=n.containerWidth/r.width*n.xScaleFactor,f=0;f<r.heightElements.length;f++)a["y"+f]=r.heightElements[f]*s;for(var h=0;h<r.widthElements.length;h++)a["x"+h]=r.widthElements[h]*c}var y=el(r.d,{mx:i,my:o,e:a});return y}}var Zu=/\{([^{}]+)\}/g,Qu=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;function Ju(e,t,n){var r=n;return t.replace(Qu,function(i,o,a,s,c){o=o||s,r&&(o in r&&(r=r[o]),typeof r=="function"&&c&&(r=r()))}),r=(r==null||r==n?e:r)+"",r}function el(e,t){return String(e).replace(Zu,function(n,r){return Ju(n,r,t)})}var ho={__init__:["bpmnRenderer"],bpmnRenderer:["type",gt],textRenderer:["type",Ln],pathMap:["type",Nr]};function Br(e,t){return t=t||{},e.replace(/{([^}]+)}/g,function(n,r){return t[r]||"{"+r+"}"})}var In={translate:["value",Br]};Q();var an=Math,Hm=an.PI,zm=an.min,Um=an.max,Gm=an.pow,Km=an.abs;function tl(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function sn(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function mo(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function nl(e){return tl({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function rl(e){for(var t=e.waypoints,n=t.reduce(function(f,h,y){var v=t[y-1];if(v){var A=f[f.length-1],W=A&&A.endLength||0,L=il(v,h);f.push({start:v,end:h,startLength:W,endLength:W+L,length:L})}return f},[]),r=n.reduce(function(f,h){return f+h.length},0),i=r/2,o=0,a=n[o];a.endLength<i;)a=n[++o];var s=(i-a.startLength)/a.length,c={x:a.start.x+(a.end.x-a.start.x)*s,y:a.start.y+(a.end.y-a.start.y)*s};return c}function Fn(e){return Vi(e)?rl(e):nl(e)}function il(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Se(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function jn(e,t,n){return M({id:e.id,type:e.$type,businessObject:e,di:t},n)}function ol(e,t,n){var r=e.waypoint;return!r||r.length<2?[Fn(t),Fn(n)]:r.map(function(i){return{x:i.x,y:i.y}})}function yo(e,t,n){return new Error(`element ${Se(t)} referenced by ${Se(e)}#${n} not yet drawn`)}function it(e,t,n,r,i){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=r,this._textRenderer=i}it.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"];it.prototype.add=function(e,t,n){var r,i,o;if(N(t,"bpmndi:BPMNPlane")){var a=N(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};r=this._elementFactory.createRoot(jn(e,t,a)),this._canvas.addRootElement(r)}else if(N(t,"bpmndi:BPMNShape")){var s=!dt(e,t),c=sl(e);i=n&&(n.hidden||n.collapsed);var f=t.bounds;r=this._elementFactory.createShape(jn(e,t,{collapsed:s,hidden:i,x:Math.round(f.x),y:Math.round(f.y),width:Math.round(f.width),height:Math.round(f.height),isFrame:c})),N(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,r),N(e,"bpmn:Lane")&&(o=0),N(e,"bpmn:DataStoreReference")&&(al(n,Fn(f))||(n=this._canvas.findRoot(n))),this._canvas.addShape(r,n,o)}else if(N(t,"bpmndi:BPMNEdge")){var h=this._getSource(e),y=this._getTarget(e);i=n&&(n.hidden||n.collapsed),r=this._elementFactory.createConnection(jn(e,t,{hidden:i,source:h,target:y,waypoints:ol(t,h,y)})),N(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(r,n,o)}else throw new Error(`unknown di ${Se(t)} for element ${Se(e)}`);return Wi(e)&&$t(r)&&this.addLabel(e,t,r),this._eventBus.fire("bpmnElement.added",{element:r}),r};it.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${Se(e)}#attachedToRef`);var r=this._elementRegistry.get(n.id),i=r&&r.attachers;if(!r)throw yo(e,n,"attachedToRef");t.host=r,i||(r.attachers=i=[]),i.indexOf(t)===-1&&i.push(t)};it.prototype.addLabel=function(e,t,n){var r,i,o;return r=Hi(t,n),i=$t(n),i&&(r=this._textRenderer.getExternalLabelBounds(r,i)),o=this._elementFactory.createLabel(jn(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!$t(n),x:Math.round(r.x),y:Math.round(r.y),width:Math.round(r.width),height:Math.round(r.height)})),this._canvas.addShape(o,n.parent)};it.prototype._getConnectedElement=function(e,t){var n,r,i=e.$type;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?yo(e,r,t+"Ref"):new Error(`${Se(e)}#${t} Ref not specified`)};it.prototype._getSource=function(e){return this._getConnectedElement(e,"source")};it.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")};it.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};function al(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 sl(e){return N(e,"bpmn:Group")}var go={__depends__:[In],bpmnImporter:["type",it]};var vo={__depends__:[ho,go]};Q();function $n(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(Math.random()*1e9)+"-"}$n.prototype.next=function(){return this._prefix+ ++this._counter};var ul=new $n("ov"),ll=500;function be(e,t,n,r){this._eventBus=t,this._canvas=n,this._elementRegistry=r,this._ids=ul,this._overlayDefaults=M({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=cl(n.getContainer()),this._init()}be.$inject=["config.overlays","eventBus","canvas","elementRegistry"];be.prototype.get=function(e){if(De(e)&&(e={id:e}),De(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?nt(t.overlays,xn({type:e.type})):t.overlays.slice():[]}else return e.type?nt(this._overlays,xn({type:e.type})):e.id?this._overlays[e.id]:null};be.prototype.add=function(e,t,n){if(_e(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=M({},this._overlayDefaults,n,{id:r,type:t,element:e,html:n.html}),this._addOverlay(n),r};be.prototype.remove=function(e){var t=this.get(e)||[];xe(t)||(t=[t]);var n=this;P(t,function(r){var i=n._getOverlayContainer(r.element,!0);if(r&&(zt(r.html),zt(r.htmlContainer),delete r.htmlContainer,delete r.element,delete n._overlays[r.id]),i){var o=i.overlays.indexOf(r);o!==-1&&i.overlays.splice(o,1)}})};be.prototype.isShown=function(){return this._overlayRoot.style.display!=="none"};be.prototype.show=function(){Vn(this._overlayRoot)};be.prototype.hide=function(){Vn(this._overlayRoot,!1)};be.prototype.clear=function(){this._overlays={},this._overlayContainers=[],Tn(this._overlayRoot)};be.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,r=t.x,i=t.y;if(t.waypoints){var o=Mt(t);r=o.x,i=o.y}Eo(n,r,i),kn(e.html,"data-container-id",t.id)};be.prototype._updateOverlay=function(e){var t=e.position,n=e.htmlContainer,r=e.element,i=t.left,o=t.top;if(t.right!==void 0){var a;r.waypoints?a=Mt(r).width:a=r.width,i=t.right*-1+a}if(t.bottom!==void 0){var s;r.waypoints?s=Mt(r).height:s=r.height,o=t.bottom*-1+s}Eo(n,i||0,o||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())};be.prototype._createOverlayContainer=function(e){var t=ee('<div class="djs-overlays" />');Pe(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n};be.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";bo(this._overlayRoot,n)};be.prototype._getOverlayContainer=function(e,t){var n=ve(this._overlayContainers,function(r){return r.element===e});return!n&&!t?this._createOverlayContainer(e):n};be.prototype._addOverlay=function(e){var t=e.id,n=e.element,r=e.html,i,o;r.get&&r.constructor.prototype.jquery&&(r=r.get(0)),De(r)&&(r=ee(r)),o=this._getOverlayContainer(n),i=ee('<div class="djs-overlay" data-overlay-id="'+t+'">'),Pe(i,{position:"absolute"}),i.appendChild(r),e.type&&Bt(i).add("djs-overlay-"+e.type);var a=this._canvas.findRoot(n),s=this._canvas.getRootElement();Vn(i,a===s),e.htmlContainer=i,o.overlays.push(e),o.html.appendChild(i),this._overlays[t]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())};be.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,r=this._canvas.findRoot(e.element),i=n&&n.minZoom,o=n&&n.maxZoom,a=e.htmlContainer,s=this._canvas.getRootElement(),c=!0;(r!==s||n&&(wt(i)&&i>t.scale||wt(o)&&o<t.scale))&&(c=!1),Vn(a,c),this._updateOverlayScale(e,t)};be.prototype._updateOverlayScale=function(e,t){var n=e.scale,r,i,o=e.htmlContainer,a,s="";n!==!0&&(n===!1?(r=1,i=1):(r=n.min,i=n.max),wt(r)&&t.scale<r&&(a=(1/t.scale||1)*r),wt(i)&&t.scale>i&&(a=(1/t.scale||1)*i)),wt(a)&&(s="scale("+a+","+a+")"),bo(o,s)};be.prototype._updateOverlaysVisibilty=function(e){var t=this;P(this._overlays,function(n){t._updateOverlayVisibilty(n,e)})};be.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,o=t.get({element:i});P(o,function(c){t.remove(c.id)});var a=t._getOverlayContainer(i);if(a){zt(a.html);var s=t._overlayContainers.indexOf(a);s!==-1&&t._overlayContainers.splice(s,1)}}),e.on("element.changed",ll,function(r){var i=r.element,o=t._getOverlayContainer(i,!0);o&&(P(o.overlays,function(a){t._updateOverlay(a)}),t._updateOverlayContainer(o))}),e.on("element.marker.update",function(r){var i=t._getOverlayContainer(r.element,!0);i&&Bt(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 cl(e){var t=ee('<div class="djs-overlay-container" />');return Pe(t,{position:"absolute",width:0,height:0}),e.insertBefore(t,e.firstChild),t}function Eo(e,t,n){Pe(e,{left:t+"px",top:n+"px"})}function Vn(e,t){e.style.display=t===!1?"none":""}function bo(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(n){e.style[n+"transform"]=t})}var qn={__init__:["overlays"],overlays:["type",be]};function Wn(e,t,n,r){e.on("element.changed",function(i){var o=i.element;(o.parent||o===t.getRootElement())&&(i.gfx=n.getGraphics(o)),i.gfx&&e.fire(_n(o)+".changed",i)}),e.on("elements.changed",function(i){var o=i.elements;o.forEach(function(a){e.fire("element.changed",{element:a})}),r.updateContainments(o)}),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)})}Wn.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var xo={__init__:["changeSupport"],changeSupport:["type",Wn]};Q();var fl=1e3;function Ae(e){this._eventBus=e}Ae.$inject=["eventBus"];function pl(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}Ae.prototype.on=function(e,t,n,r,i,o){if((tt(t)||Me(t))&&(o=i,i=r,r=n,n=t,t=null),tt(n)&&(o=i,i=r,r=n,n=fl),_e(i)&&(o=i,i=!1),!tt(r))throw new Error("handlerFn must be a function");xe(e)||(e=[e]);var a=this._eventBus;P(e,function(s){var c=["commandStack",s,t].filter(function(f){return f}).join(".");a.on(c,n,i?pl(r,o):r,o)})};Ae.prototype.canExecute=vt("canExecute");Ae.prototype.preExecute=vt("preExecute");Ae.prototype.preExecuted=vt("preExecuted");Ae.prototype.execute=vt("execute");Ae.prototype.executed=vt("executed");Ae.prototype.postExecute=vt("postExecute");Ae.prototype.postExecuted=vt("postExecuted");Ae.prototype.revert=vt("revert");Ae.prototype.reverted=vt("reverted");function vt(e){return function(n,r,i,o,a){(tt(n)||Me(n))&&(a=o,o=i,i=r,r=n,n=null),this.on(n,e,r,i,o,a)}}function un(e,t){t.invoke(Ae,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)})}Ce(un,Ae);un.$inject=["canvas","injector"];var wo={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",un]};Q();var hl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Et(e){return e=""+e,e&&e.replace(/[&<>"']/g,function(t){return hl[t]})}var ml="_plane";function ln(e){var t=e.id;return N(e,"bpmn:SubProcess")?dl(t):t}function dl(e){return e+ml}var yl="bjs-breadcrumbs-shown";function Hn(e,t,n){var r=ee('<ul class="bjs-breadcrumbs"></ul>'),i=n.getContainer(),o=Bt(i);i.appendChild(r);var a=[];e.on("element.changed",function(c){var f=c.element,h=oe(f),y=ve(a,function(v){return v===h});y&&s()});function s(c){c&&(a=gl(c));var f=a.flatMap(function(y){var v=n.findRoot(ln(y))||n.findRoot(y.id);if(!v&&N(y,"bpmn:Process")){var A=t.find(function(O){var H=oe(O);return H&&H.get("processRef")===y});v=A&&n.findRoot(A.id)}if(!v)return[];var W=Et(y.name||y.id),L=ee('<li><span class="bjs-crumb"><a title="'+W+'">'+W+"</a></span></li>");return L.addEventListener("click",function(){n.setRootElement(v)}),L});r.innerHTML="";var h=f.length>1;o.toggle(yl,h),f.forEach(function(y){r.appendChild(y)})}e.on("root.set",function(c){s(c.element)})}Hn.$inject=["eventBus","elementRegistry","canvas"];function gl(e){for(var t=oe(e),n=[],r=t;r;r=r.$parent)(N(r,"bpmn:SubProcess")||N(r,"bpmn:Process"))&&n.push(r);return n.reverse()}function zn(e,t){var n=null,r=new vl;e.on("root.set",function(i){var o=i.element,a=t.viewbox(),s=r.get(o);if(r.set(n,{x:a.x,y:a.y,zoom:a.scale}),n=o,!(!N(o,"bpmn:SubProcess")&&!s)){s=s||{x:0,y:0,zoom:1};var c=(a.x-s.x)*a.scale,f=(a.y-s.y)*a.scale;(c!==0||f!==0)&&t.scroll({dx:c,dy:f}),s.zoom!==a.scale&&t.zoom(s.zoom,{x:0,y:0})}}),e.on("diagram.clear",function(){r.clear(),n=null})}zn.$inject=["eventBus","canvas"];function vl(){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 _o={x:180,y:160};function bt(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,function(r,i){n._handleImport(i.definitions)})}bt.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.filter(r=>r.plane).flatMap(r=>t._createNewDiagrams(r.plane));n.forEach(function(r){t._movePlaneElementsToOrigin(r.plane)})}};bt.prototype._createNewDiagrams=function(e){var t=this,n=[],r=[];e.get("planeElement").forEach(function(o){var a=o.bpmnElement;if(a){var s=a.$parent;N(a,"bpmn:SubProcess")&&!o.isExpanded&&n.push(a),bl(a,e)&&r.push({diElement:o,parent:s})}});var i=[];return n.forEach(function(o){if(!t._processToDiagramMap[o.id]){var a=t._createDiagram(o);t._processToDiagramMap[o.id]=a,i.push(a)}}),r.forEach(function(o){for(var a=o.diElement,s=o.parent;s&&n.indexOf(s)===-1;)s=s.$parent;if(s){var c=t._processToDiagramMap[s.id];t._moveToDiPlane(a,c.plane)}}),i};bt.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=El(e),r={x:n.x-_o.x,y:n.y-_o.y};t.forEach(function(i){i.waypoint?i.waypoint.forEach(function(o){o.x=o.x-r.x,o.y=o.y-r.y}):i.bounds&&(i.bounds.x=i.bounds.x-r.x,i.bounds.y=i.bounds.y-r.y)})};bt.prototype._moveToDiPlane=function(e,t){var n=So(e),r=n.plane.get("planeElement");r.splice(r.indexOf(e),1),t.get("planeElement").push(e)};bt.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};bt.$inject=["eventBus","moddle"];function So(e){return N(e,"bpmndi:BPMNDiagram")?e:So(e.$parent)}function El(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=sn(n.bounds);t.top=Math.min(r.top,t.top),t.left=Math.min(r.left,t.left)}}),mo(t)}function bl(e,t){var n=e.$parent;return!(!N(n,"bpmn:SubProcess")||n===t.bpmnElement||ji(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))}var Un=250,xl='<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>',wl="bjs-drilldown-empty";function ut(e,t,n,r,i){Ae.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=r,this._translate=i;var o=this;this.executed("shape.toggleCollapse",Un,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.reverted("shape.toggleCollapse",Un,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.executed(["shape.create","shape.move","shape.delete"],Un,function(a){var s=a.oldParent,c=a.newParent||a.parent,f=a.shape;o._canDrillDown(f)&&o._addOverlay(f),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(c),o._updateDrilldownOverlay(f)},!0),this.reverted(["shape.create","shape.move","shape.delete"],Un,function(a){var s=a.oldParent,c=a.newParent||a.parent,f=a.shape;o._canDrillDown(f)&&o._addOverlay(f),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(c),o._updateDrilldownOverlay(f)},!0),t.on("import.render.complete",function(){n.filter(function(a){return o._canDrillDown(a)}).map(function(a){o._addOverlay(a)})})}Ce(ut,Ae);ut.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}};ut.prototype._canDrillDown=function(e){var t=this._canvas;return N(e,"bpmn:SubProcess")&&t.findRoot(ln(e))};ut.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=oe(e),r=t.get({element:n.id,type:"drilldown"})[0];if(r){var i=n&&n.get("flowElements")&&n.get("flowElements").length;Bt(r.html).toggle(wl,!i)}};ut.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,r=oe(e),i=n.get({element:e,type:"drilldown"});i.length&&this._removeOverlay(e);var o=ee('<button type="button" class="bjs-drilldown">'+xl+"</button>"),a=r.get("name")||r.get("id"),s=this._translate("Open {element}",{element:a});o.setAttribute("title",s),o.addEventListener("click",function(){t.setRootElement(t.findRoot(ln(e)))}),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:o}),this._updateOverlayVisibility(e)};ut.prototype._removeOverlay=function(e){var t=this._overlays;t.remove({element:e,type:"drilldown"})};ut.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];var Ao={__depends__:[qn,xo,wo],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",Hn],drilldownCentering:["type",zn],drilldownOverlayBehavior:["type",ut],subprocessCompatibility:["type",bt]};Q();function Or(e){return e.originalEvent||e.srcEvent}function Ro(e,t){return(Or(e)||e).button===t}function Kt(e){return Ro(e,0)}function Co(e){return Ro(e,1)}function Po(e){var t=Or(e)||e;return Kt(e)&&t.shiftKey}function _l(e){return!0}function Gn(e){return Kt(e)||Co(e)}var ko=500;function Kn(e,t,n){var r=this;function i(b,D,R){if(!s(b,D)){var F,B,I;R?B=t.getGraphics(R):(F=D.delegateTarget||D.target,F&&(B=F,R=t.get(B))),!(!B||!R)&&(I=e.fire(b,{element:R,gfx:B,originalEvent:D}),I===!1&&(D.stopPropagation(),D.preventDefault()))}}var o={};function a(b){return o[b]}function s(b,D){var R=f[b]||Kt;return!R(D)}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"},f={"element.contextmenu":_l,"element.mousedown":Gn,"element.mouseup":Gn,"element.click":Gn,"element.dblclick":Gn};function h(b,D,R){var F=c[b];if(!F)throw new Error("unmapped DOM event name <"+b+">");return i(F,D,R)}var y="svg, .djs-element";function v(b,D,R,F){var B=o[R]=function(I){i(R,I)};F&&(f[R]=F),B.$delegate=on.bind(b,y,D,B)}function A(b,D,R){var F=a(R);F&&on.unbind(b,D,F.$delegate)}function W(b){P(c,function(D,R){v(b,R,D)})}function L(b){P(c,function(D,R){A(b,R,D)})}e.on("canvas.destroy",function(b){L(b.svg)}),e.on("canvas.init",function(b){W(b.svg)}),e.on(["shape.added","connection.added"],function(b){var D=b.element,R=b.gfx;e.fire("interactionEvents.createHit",{element:D,gfx:R})}),e.on(["shape.changed","connection.changed"],ko,function(b){var D=b.element,R=b.gfx;e.fire("interactionEvents.updateHit",{element:D,gfx:R})}),e.on("interactionEvents.createHit",ko,function(b){var D=b.element,R=b.gfx;r.createDefaultHit(D,R)}),e.on("interactionEvents.updateHit",function(b){var D=b.element,R=b.gfx;r.updateDefaultHit(D,R)});var O=w("djs-hit djs-hit-stroke"),H=w("djs-hit djs-hit-click-stroke"),G=w("djs-hit djs-hit-all"),T=w("djs-hit djs-hit-no-move"),g={all:G,"click-stroke":H,stroke:O,"no-move":T};function w(b,D){return D=M({stroke:"white",strokeWidth:15},D||{}),n.cls(b,["no-fill","no-border"],D)}function C(b,D){var R=g[D];if(!R)throw new Error("invalid hit type <"+D+">");return te(b,R),b}function V(b,D){fe(b,D)}this.removeHits=function(b){var D=uo(".djs-hit",b);P(D,Dt)},this.createDefaultHit=function(b,D){var R=b.waypoints,F=b.isFrame,B;return R?this.createWaypointsHit(D,R):(B=F?"stroke":"all",this.createBoxHit(D,B,{width:b.width,height:b.height}))},this.createWaypointsHit=function(b,D){var R=qt(D);return C(R,"stroke"),V(b,R),R},this.createBoxHit=function(b,D,R){R=M({x:0,y:0},R);var F=ne("rect");return C(F,D),te(F,R),V(b,F),F},this.updateDefaultHit=function(b,D){var R=He(".djs-hit",D);if(R)return b.waypoints?kr(R,b.waypoints):te(R,{width:b.width,height:b.height}),R},this.fire=i,this.triggerMouseEvent=h,this.mouseHandler=a,this.registerEvent=v,this.unregisterEvent=A}Kn.$inject=["eventBus","elementRegistry","styles"];var To={__init__:["interactionEvents"],interactionEvents:["type",Kn]};Q();function Rt(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)})}Rt.$inject=["eventBus","canvas"];Rt.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})}};Rt.prototype.get=function(){return this._selectedElements};Rt.prototype.isSelected=function(e){return this._selectedElements.indexOf(e)!==-1};Rt.prototype.select=function(e,t){var n=this._selectedElements,r=n.slice();xe(e)||(e=e?[e]:[]);var i=this._canvas,o=i.getRootElement();e=e.filter(function(a){var s=i.findRoot(a);return o===s}),t?P(e,function(a){n.indexOf(a)===-1&&n.push(a)}):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:r,newSelection:n})};Q();var Mo="hover",Do="selected";function Yn(e,t){this._canvas=e;function n(i,o){e.addMarker(i,o)}function r(i,o){e.removeMarker(i,o)}t.on("element.hover",function(i){n(i.element,Mo)}),t.on("element.out",function(i){r(i.element,Mo)}),t.on("selection.changed",function(i){function o(f){r(f,Do)}function a(f){n(f,Do)}var s=i.oldSelection,c=i.newSelection;P(s,function(f){c.indexOf(f)===-1&&o(f)}),P(c,function(f){s.indexOf(f)===-1&&a(f)})})}Yn.$inject=["canvas","eventBus"];Q();function Xn(e,t,n,r){e.on("create.end",500,function(i){var o=i.context,a=o.canExecute,s=o.elements,c=o.hints||{},f=c.autoSelect;if(a){if(f===!1)return;xe(f)?t.select(f):t.select(s.filter(Sl))}}),e.on("connect.end",500,function(i){var o=i.context,a=o.connection;a&&t.select(a)}),e.on("shape.move.end",500,function(i){var o=i.previousSelection||[],a=r.get(i.context.shape.id),s=ve(o,function(c){return a.id===c.id});s||t.select(a)}),e.on("element.click",function(i){if(Kt(i)){var o=i.element;o===n.getRootElement()&&(o=null);var a=t.isSelected(o),s=t.get().length>1,c=Po(i);if(a&&s)return c?t.deselect(o):t.select(o);a?t.deselect(o):t.select(o,c)}})}Xn.$inject=["eventBus","selection","canvas","elementRegistry"];function Sl(e){return!e.hidden}var No={__init__:["selectionVisuals","selectionBehavior"],__depends__:[To],selection:["type",Rt],selectionVisuals:["type",Yn],selectionBehavior:["type",Xn]};Q();var Al=/^class[ {]/;function Rl(e){return Al.test(e.toString())}function Ir(e){return Array.isArray(e)}function Lr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Zn(...e){e.length===1&&Ir(e[0])&&(e=e[0]),e=[...e];let t=e.pop();return t.$inject=e,t}var Cl=/constructor\s*[^(]*\(\s*([^)]*)\)/m,Pl=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,kl=/\/\*([^*]*)\*\//m;function Tl(e){if(typeof e!="function")throw new Error(`Cannot annotate "${e}". Expected a function!`);let t=e.toString().match(Rl(e)?Cl:Pl);if(!t)return[];let n=t[1]||t[2];return n&&n.split(",").map(r=>{let i=r.match(kl);return(i&&i[1]||r).trim()})||[]}function Fr(e,t){let n=t||{get:function(T,g){if(r.push(T),g===!1)return null;throw s(`No provider for "${T}"!`)}},r=[],i=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),a=o.injector=this,s=function(T){let g=r.join(" -> ");return r.length=0,new Error(g?`${T} (Resolving: ${g})`:T)};function c(T,g){if(!i[T]&&T.includes(".")){let w=T.split("."),C=c(w.shift());for(;w.length;)C=C[w.shift()];return C}if(Lr(o,T))return o[T];if(Lr(i,T)){if(r.indexOf(T)!==-1)throw r.push(T),s("Cannot resolve circular dependency!");return r.push(T),o[T]=i[T][0](i[T][1]),r.pop(),o[T]}return n.get(T,g)}function f(T,g){if(typeof g=="undefined"&&(g={}),typeof T!="function")if(Ir(T))T=Zn(T.slice());else throw s(`Cannot invoke "${T}". Expected a function!`);let C=(T.$inject||Tl(T)).map(V=>Lr(g,V)?g[V]:c(V));return{fn:T,dependencies:C}}function h(T){let{fn:g,dependencies:w}=f(T),C=Function.prototype.bind.call(g,null,...w);return new C}function y(T,g,w){let{fn:C,dependencies:V}=f(T,w);return C.apply(g,V)}function v(T){return Zn(g=>T.get(g))}function A(T,g){if(g&&g.length){let w=Object.create(null),C=Object.create(null),V=[],b=[],D=[],R,F,B,I;for(let K in i)R=i[K],g.indexOf(K)!==-1&&(R[2]==="private"?(F=V.indexOf(R[3]),F===-1?(B=R[3].createChild([],g),I=v(B),V.push(R[3]),b.push(B),D.push(I),w[K]=[I,K,"private",B]):w[K]=[D[F],K,"private",b[F]]):w[K]=[R[2],R[1]],C[K]=!0),(R[2]==="factory"||R[2]==="type")&&R[1].$scope&&g.forEach(ot=>{R[1].$scope.indexOf(ot)!==-1&&(w[K]=[R[2],R[1]],C[ot]=!0)});g.forEach(K=>{if(!C[K])throw new Error('No provider for "'+K+'". Cannot use provider from the parent!')}),T.unshift(w)}return new Fr(T,a)}let W={factory:y,type:h,value:function(T){return T}};function L(T,g){let w=T.__init__||[];return function(){w.forEach(C=>{typeof C=="string"?g.get(C):g.invoke(C)})}}function O(T){let g=T.__exports__;if(g){let w=T.__modules__,C=Object.keys(T).reduce((F,B)=>(B!=="__exports__"&&B!=="__modules__"&&B!=="__init__"&&B!=="__depends__"&&(F[B]=T[B]),F),Object.create(null)),V=(w||[]).concat(C),b=A(V),D=Zn(function(F){return b.get(F)});g.forEach(function(F){i[F]=[D,F,"private",b]});let R=(T.__init__||[]).slice();return R.unshift(function(){b.init()}),T=Object.assign({},T,{__init__:R}),L(T,b)}return Object.keys(T).forEach(function(w){if(w==="__init__"||w==="__depends__")return;let C=T[w];if(C[2]==="private"){i[w]=C;return}let V=C[0],b=C[1];i[w]=[W[V],Ml(V,b),V]}),L(T,a)}function H(T,g){return T.indexOf(g)!==-1||(T=(g.__depends__||[]).reduce(H,T),T.indexOf(g)!==-1)?T:T.concat(g)}function G(T){let g=T.reduce(H,[]).map(O),w=!1;return function(){w||(w=!0,g.forEach(C=>C()))}}this.get=c,this.invoke=y,this.instantiate=h,this.createChild=A,this.init=G(e)}function Ml(e,t){return e!=="value"&&Ir(t)&&(t=Zn(t.slice())),t}Q();var Dl=1;function lt(e,t){Xe.call(this,e,Dl),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})}Ce(lt,Xe);lt.prototype.canRender=function(){return!0};lt.prototype.drawShape=function(t,n,r){var i=ne("rect");return te(i,{x:0,y:0,width:n.width||0,height:n.height||0}),Sn(n)?te(i,M({},this.FRAME_STYLE,r||{})):te(i,M({},this.SHAPE_STYLE,r||{})),fe(t,i),i};lt.prototype.drawConnection=function(t,n,r){var i=qt(n.waypoints,M({},this.CONNECTION_STYLE,r||{}));return fe(t,i),i};lt.prototype.getShapePath=function(t){var n=t.x,r=t.y,i=t.width,o=t.height,a=[["M",n,r],["l",i,0],["l",0,o],["l",-i,0],["z"]];return yt(a)};lt.prototype.getConnectionPath=function(t){var n=t.waypoints,r,i,o=[];for(r=0;i=n[r];r++)i=i.original||i,o.push([r===0?"M":"L",i.x,i.y]);return yt(o)};lt.$inject=["eventBus","styles"];Q();function jr(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(n,r,i){var o=this.style(r,i);return M(o,{class:n})},this.style=function(n,r){!xe(n)&&!r&&(r=n,n=[]);var i=Ve(n,function(o,a){return M(o,e[a]||{})},{});return r?M(i,r):i},this.computeStyle=function(n,r,i){return xe(r)||(i=r,r=[]),t.style(r||[],M({},i,n||{}))}}var Bo={__init__:["defaultRenderer"],defaultRenderer:["type",lt],styles:["type",jr]};Q();function Oo(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return n!==-1&&e.splice(n,1),n}function Lo(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 Qn(e,t){return Math.round(e*t)/t}function Io(e){return Me(e)?e+"px":e}function Nl(e){for(;e.parent;)e=e.parent;return e}function Bl(e){e=M({},{width:"100%",height:"100%"},e);let t=e.container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),Pe(n,{position:"relative",overflow:"hidden",width:Io(e.width),height:Io(e.height)}),t.appendChild(n),n}function Fo(e,t,n){let r=ne("g");qe(r).add(t);let i=n!==void 0?n:e.childNodes.length-1;return e.insertBefore(r,e.childNodes[i]||null),r}var Ol="base",jo=0,Ll=1,Il={shape:["x","y","width","height"],connection:["waypoints"]};function q(e,t,n,r){this._eventBus=t,this._elementRegistry=r,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(e||{})}q.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"];q.prototype._init=function(e){let t=this._eventBus,n=this._container=Bl(e),r=this._svg=ne("svg");te(r,{width:"100%",height:"100%"}),kn(r,"tabindex",0),e.autoFocus&&t.on("element.hover",()=>{this.restoreFocus()}),t.on("element.mousedown",500,o=>{this.focus()}),r.addEventListener("focusin",()=>{this._setFocused(!0)}),r.addEventListener("focusout",()=>{this._setFocused(!1)}),r.addEventListener("mouseover",()=>{this._eventBus.fire("canvas.mouseover")}),r.addEventListener("mouseout",()=>{this._eventBus.fire("canvas.mouseout")}),fe(n,r);let i=this._viewport=Fo(r,"viewport");e.deferUpdate&&(this._viewboxChanged=dr(Ye(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)};q.prototype._destroy=function(){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});let 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};q.prototype._setFocused=function(e){e!=this._focused&&(this._focused=e,this._eventBus.fire("canvas.focus.changed",{focused:e}))};q.prototype._clear=function(){this._elementRegistry.getAll().forEach(t=>{let n=_n(t);n==="root"?this.removeRootElement(t):this._removeElement(t,n)}),this._planes=[],this._rootElement=null,delete this._cachedViewbox};q.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)};q.prototype.restoreFocus=function(){document.activeElement===document.body&&this.focus()};q.prototype.isFocused=function(){return this._focused};q.prototype.getDefaultLayer=function(){return this.getLayer(Ol,jo)};q.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!="undefined"&&n.index!==t)throw new Error("layer <"+e+"> already created at index <"+t+">");return n.group};q.prototype._getChildIndex=function(e){return Ve(this._layers,function(t,n){return n.visible&&e>=n.index&&t++,t},0)};q.prototype._createLayer=function(e,t){typeof t=="undefined"&&(t=Ll);let n=this._getChildIndex(t);return{group:Fo(this._viewport,"layer-"+e,n),index:t,visible:!0}};q.prototype.showLayer=function(e){if(!e)throw new Error("must specify a name");let t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");let n=this._viewport,r=t.group,i=t.index;if(t.visible)return r;let o=this._getChildIndex(i);return n.insertBefore(r,n.childNodes[o]||null),t.visible=!0,r};q.prototype.hideLayer=function(e){if(!e)throw new Error("must specify a name");let t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");let n=t.group;return t.visible&&(Dt(n),t.visible=!1),n};q.prototype._removeLayer=function(e){let t=this._layers[e];t&&(delete this._layers[e],Dt(t.group))};q.prototype.getActiveLayer=function(){let e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null};q.prototype.findRoot=function(e){return typeof e=="string"&&(e=this._elementRegistry.get(e)),e?(this._findPlaneForRoot(Nl(e))||{}).rootElement:void 0};q.prototype.getRootElements=function(){return this._planes.map(function(e){return e.rootElement})};q.prototype._findPlaneForRoot=function(e){return ve(this._planes,function(t){return t.rootElement===e})};q.prototype.getContainer=function(){return this._container};q.prototype._updateMarker=function(e,t,n){let r;e.id||(e=this._elementRegistry.get(e)),e.markers=e.markers||new Set,r=this._elementRegistry._elements[e.id],r&&(P([r.gfx,r.secondaryGfx],function(i){i&&(n?(e.markers.add(t),qe(i).add(t)):(e.markers.delete(t),qe(i).remove(t)))}),this._eventBus.fire("element.marker.update",{element:e,gfx:r.gfx,marker:t,add:!!n}))};q.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)};q.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)};q.prototype.hasMarker=function(e,t){return e.id||(e=this._elementRegistry.get(e)),e.markers?e.markers.has(t):!1};q.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)};q.prototype.getRootElement=function(){let e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))};q.prototype.addRootElement=function(e){let t=this._rootsIdx++;e||(e={id:"__implicitroot_"+t,children:[],isImplicit:!0});let n=e.layer="root-"+t;this._ensureValid("root",e);let r=this.getLayer(n,jo);return this.hideLayer(n),this._addRoot(e,r),this._planes.push({rootElement:e,layer:r}),e};q.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};q.prototype.setRootElement=function(e){if(e===this._rootElement)return e;let t;if(!e)throw new Error("rootElement required");return t=this._findPlaneForRoot(e),t||(e=this.addRootElement(e)),this._setRoot(e),e};q.prototype._removeRoot=function(e){let t=this._elementRegistry,n=this._eventBus;n.fire("root.remove",{element:e}),n.fire("root.removed",{element:e}),t.remove(e)};q.prototype._addRoot=function(e,t){let n=this._elementRegistry,r=this._eventBus;r.fire("root.add",{element:e}),n.add(e,t),r.fire("root.added",{element:e,gfx:t})};q.prototype._setRoot=function(e,t){let 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})};q.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");let n=Il[e];if(!bn(n,function(i){return typeof t[i]!="undefined"}))throw new Error("must supply { "+n.join(", ")+" } with "+e)};q.prototype._setParent=function(e,t,n){Lo(t.children,e,n),e.parent=t};q.prototype._addElement=function(e,t,n,r){n=n||this.getRootElement();let i=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),i.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,r);let a=o.create(e,t,r);return this._elementRegistry.add(t,a),o.update(e,t,a),i.fire(e+".added",{element:t,gfx:a}),t};q.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)};q.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)};q.prototype._removeElement=function(e,t){let 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),Oo(e.parent&&e.parent.children,e),e.parent=null,i.fire(t+".removed",{element:e}),n.remove(e),e};q.prototype.removeShape=function(e){return this._removeElement(e,"shape")};q.prototype.removeConnection=function(e){return this._removeElement(e,"connection")};q.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)};q.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()};q.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})};q.prototype.viewbox=function(e){if(e===void 0&&this._cachedViewbox)return structuredClone(this._cachedViewbox);let t=this._viewport,n=this.getSize(),r,i,o,a,s,c,f;if(e)this._changeViewbox(function(){s=Math.min(n.width/e.width,n.height/e.height);let h=this._svg.createSVGMatrix().scale(s).translate(-e.x,-e.y);Nt(t,h)});else return o=this._rootElement?this.getActiveLayer():null,r=o&&o.getBBox()||{},a=Nt(t),i=a?a.matrix:Qi(),s=Qn(i.a,1e3),c=Qn(-i.e||0,1e3),f=Qn(-i.f||0,1e3),e=this._cachedViewbox={x:c?c/s:0,y:f?f/s:0,width:n.width/s,height:n.height/s,scale:s,inner:{width:r.width||0,height:r.height||0,x:r.x||0,y:r.y||0},outer:n},e;return e};q.prototype.scroll=function(e){let t=this._viewport,n=t.getCTM();return e&&this._changeViewbox(function(){e=M({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),$o(t,n)}),{x:n.e,y:n.f}};q.prototype.scrollToElement=function(e,t){let n=100;typeof e=="string"&&(e=this._elementRegistry.get(e));let r=this.findRoot(e);if(r!==this.getRootElement()&&this.setRootElement(r),r===e)return;t||(t={}),typeof t=="number"&&(n=t),t={top:t.top||n,right:t.right||n,bottom:t.bottom||n,left:t.left||n};let i=Mt(e),o=sn(i),a=this.viewbox(),s=this.zoom(),c,f;a.y+=t.top/s,a.x+=t.left/s,a.width-=(t.right+t.left)/s,a.height-=(t.bottom+t.top)/s;let h=sn(a);if(!(i.width<a.width&&i.height<a.height))c=i.x-a.x,f=i.y-a.y;else{let v=Math.max(0,o.right-h.right),A=Math.min(0,o.left-h.left),W=Math.max(0,o.bottom-h.bottom),L=Math.min(0,o.top-h.top);c=v||A,f=W||L}this.scroll({dx:-c*s,dy:-f*s})};q.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)}),Qn(r.a,1e3)};function $o(e,t){let n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}q.prototype._fitViewport=function(e){let t=this.viewbox(),n=t.outer,r=t.inner,i,o;return r.x>=0&&r.y>=0&&r.x+r.width<=n.width&&r.y+r.height<=n.height&&!e?o={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),o={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(o),this.viewbox(!1).scale};q.prototype._setZoom=function(e,t){let n=this._svg,r=this._viewport,i=n.createSVGMatrix(),o=n.createSVGPoint(),a,s,c,f,h;c=r.getCTM();let y=c.a;return t?(a=M(o,t),s=a.matrixTransform(c.inverse()),f=i.translate(s.x,s.y).scale(1/y*e).translate(-s.x,-s.y),h=c.multiply(f)):h=i.scale(e),$o(this._viewport,h),h};q.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}};q.prototype.getAbsoluteBBox=function(e){let t=this.viewbox(),n;e.waypoints?n=this.getGraphics(e).getBBox():n=e;let r=n.x*t.scale-t.x*t.scale,i=n.y*t.scale-t.y*t.scale,o=n.width*t.scale,a=n.height*t.scale;return{x:r,y:i,width:o,height:a}};q.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var Yt="data-element-id";function Be(e){this._elements={},this._eventBus=e}Be.$inject=["eventBus"];Be.prototype.add=function(e,t,n){var r=e.id;this._validateId(r),te(t,Yt,r),n&&te(n,Yt,r),this._elements[r]={element:e,gfx:t,secondaryGfx:n}};Be.prototype.remove=function(e){var t=this._elements,n=e.id||e,r=n&&t[n];r&&(te(r.gfx,Yt,""),r.secondaryGfx&&te(r.secondaryGfx,Yt,""),delete t[n])};Be.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)};Be.prototype.updateGraphics=function(e,t,n){var r=e.id||e,i=this._elements[r];return n?i.secondaryGfx=t:i.gfx=t,t&&te(t,Yt,r),t};Be.prototype.get=function(e){var t;typeof e=="string"?t=e:t=e&&te(e,Yt);var n=this._elements[t];return n&&n.element};Be.prototype.filter=function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(n)}),t};Be.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),r=0;r<n.length;r++){var i=n[r],o=t[i],a=o.element,s=o.gfx;if(e(a,s))return a}};Be.prototype.getAll=function(){return this.filter(function(e){return e})};Be.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach(function(n){var r=t[n],i=r.element,o=r.gfx;return e(i,o)})};Be.prototype.getGraphics=function(e,t){var n=e.id||e,r=this._elements[n];return r&&(t?r.secondaryGfx:r.gfx)};Be.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")};Q();function Fl(e,t,n,r){var i=n.inverse;return Object.defineProperty(e,"remove",{value:function(o){var a=this.indexOf(o);return a!==-1&&(this.splice(a,1),t.unset(o,i,r)),o}}),Object.defineProperty(e,"contains",{value:function(o){return this.indexOf(o)!==-1}}),Object.defineProperty(e,"add",{value:function(o,a){var s=this.indexOf(o);if(typeof a=="undefined"){if(s!==-1)return;a=this.length}s!==-1&&this.splice(s,1),this.splice(a,0,o),s===-1&&t.set(o,i,r)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}function jl(e){return e.__refs_collection===!0}function $l(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function Vo(e,t,n){var r=Fl(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:r}),r.length&&r.forEach(function(i){e.set(i,t.inverse,n)})}function Vl(e,t,n){var r=t.inverse,i=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return i},set:function(o){if(o!==i){var a=i;i=null,a&&e.unset(a,r,n),i=o,e.set(i,r,n)}}})}function ze(e,t){if(!(this instanceof ze))return new ze(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}ze.prototype.bind=function(e,t){if(typeof t=="string"){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?Vo(this,t,e):Vl(this,t,e)};ze.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return jl(n)||Vo(this,t,e),n};ze.prototype.ensureBound=function(e,t){$l(e,t)||this.bind(e,t)};ze.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)};ze.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var $r=new ze({name:"children",enumerable:!0,collection:!0},{name:"parent"}),Wo=new ze({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),qo=new ze({name:"attachers",collection:!0},{name:"host"}),Ho=new ze({name:"outgoing",collection:!0},{name:"source"}),zo=new ze({name:"incoming",collection:!0},{name:"target"});function cn(){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)}}),$r.bind(this,"parent"),Wo.bind(this,"labels"),Ho.bind(this,"outgoing"),zo.bind(this,"incoming")}function fn(){cn.call(this),$r.bind(this,"children"),qo.bind(this,"host"),qo.bind(this,"attachers")}Ce(fn,cn);function Uo(){cn.call(this),$r.bind(this,"children")}Ce(Uo,fn);function Go(){fn.call(this),Wo.bind(this,"labelTarget")}Ce(Go,fn);function Ko(){cn.call(this),Ho.bind(this,"source"),zo.bind(this,"target")}Ce(Ko,cn);var ql={connection:Ko,shape:fn,label:Go,root:Uo};function Yo(e,t){var n=ql[e];if(!n)throw new Error("unknown type: <"+e+">");return M(new n,t)}Q();function Ct(){this._uid=12}Ct.prototype.createRoot=function(e){return this.create("root",e)};Ct.prototype.createLabel=function(e){return this.create("label",e)};Ct.prototype.createShape=function(e){return this.create("shape",e)};Ct.prototype.createConnection=function(e){return this.create("connection",e)};Ct.prototype.create=function(e,t){return t=M({},t||{}),t.id||(t.id=e+"_"+this._uid++),Yo(e,t)};Q();var Jn="__fn",Xo=1e3,Wl=Array.prototype.slice;function ke(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}ke.prototype.on=function(e,t,n,r){if(e=xe(e)?e:[e],tt(t)&&(r=n,n=t,t=Xo),!Me(t))throw new Error("priority must be a number");var i=n;r&&(i=Ye(n,r),i[Jn]=n[Jn]||n);var o=this;e.forEach(function(a){o._addListener(a,{priority:t,callback:i,next:null})})};ke.prototype.once=function(e,t,n,r){var i=this;if(tt(t)&&(r=n,n=t,t=Xo),!Me(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var a=n.apply(r,arguments);return i.off(e,o),a}o[Jn]=n,this.on(e,t,o)};ke.prototype.off=function(e,t){e=xe(e)?e:[e];var n=this;e.forEach(function(r){n._removeListener(r,t)})};ke.prototype.createEvent=function(e){var t=new pn;return t.init(e),t};ke.prototype.fire=function(e,t){var n,r,i,o;if(o=Wl.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 pn?n=t:n=this.createEvent(t),o[0]=n;var a=n.type;e!==a&&(n.type=e);try{i=this._invokeListeners(n,o,r)}finally{e!==a&&(n.type=a)}return i===void 0&&n.defaultPrevented&&(i=!1),i}};ke.prototype.handleError=function(e){return this.fire("error",{error:e})===!1};ke.prototype._destroy=function(){this._listeners={}};ke.prototype._invokeListeners=function(e,t,n){for(var r;n&&!e.cancelBubble;)r=this._invokeListener(e,t,n),n=n.next;return r};ke.prototype._invokeListener=function(e,t,n){var r;if(n.callback.__isTomb)return r;try{r=Hl(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};ke.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};ke.prototype._getListeners=function(e){return this._listeners[e]};ke.prototype._setListeners=function(e,t){this._listeners[e]=t};ke.prototype._removeListener=function(e,t){var n=this._getListeners(e),r,i,o;if(!t){this._setListeners(e,null);return}for(;n;)r=n.next,o=n.callback,(o===t||o[Jn]===t)&&(i?i.next=r:this._setListeners(e,r)),i=n,n=r};function pn(){}pn.prototype.stopPropagation=function(){this.cancelBubble=!0};pn.prototype.preventDefault=function(){this.defaultPrevented=!0};pn.prototype.init=function(e){M(this,e||{})};function Hl(e,t){return e.apply(null,t)}Q();function Zo(e){return e.childNodes[0]}function Qo(e){return e.parentNode.childNodes[1]}function Oe(e,t){this._eventBus=e,this._elementRegistry=t}Oe.$inject=["eventBus","elementRegistry"];Oe.prototype._getChildrenContainer=function(e){var t=this._elementRegistry.getGraphics(e),n;return e.parent?(n=Qo(t),n||(n=ne("g"),qe(n).add("djs-children"),fe(t.parentNode,n))):n=t,n};Oe.prototype._clear=function(e){var t=Zo(e);return Tn(t),t};Oe.prototype._createContainer=function(e,t,n,r){var i=ne("g");qe(i).add("djs-group"),typeof n!="undefined"?Jo(i,t,t.childNodes[n]):fe(t,i);var o=ne("g");qe(o).add("djs-element"),qe(o).add("djs-"+e),r&&qe(o).add("djs-frame"),fe(i,o);var a=ne("g");return qe(a).add("djs-visual"),fe(o,a),o};Oe.prototype.create=function(e,t,n){var r=this._getChildrenContainer(t.parent);return this._createContainer(e,r,n,Sn(t))};Oe.prototype.updateContainments=function(e){var t=this,n=this._elementRegistry,r;r=Ve(e,function(i,o){return o.parent&&(i[o.parent.id]=o.parent),i},{}),P(r,function(i){var o=i.children;if(o){var a=t._getChildrenContainer(i);P(o.slice().reverse(),function(s){var c=n.getGraphics(s);Jo(c.parentNode,a)})}})};Oe.prototype.drawShape=function(e,t,n={}){var r=this._eventBus;return r.fire("render.shape",{gfx:e,element:t,attrs:n})};Oe.prototype.getShapePath=function(e){var t=this._eventBus;return t.fire("render.getShapePath",e)};Oe.prototype.drawConnection=function(e,t,n={}){var r=this._eventBus;return r.fire("render.connection",{gfx:e,element:t,attrs:n})};Oe.prototype.getConnectionPath=function(e){var t=this._eventBus;return t.fire("render.getConnectionPath",e)};Oe.prototype.update=function(e,t,n){if(t.parent){var r=this._clear(n);if(e==="shape")this.drawShape(r,t),Nn(n,t.x,t.y);else if(e==="connection")this.drawConnection(r,t);else throw new Error("unknown type: "+e);t.hidden?te(n,"display","none"):te(n,"display","block")}};Oe.prototype.remove=function(e){var t=this._elementRegistry.getGraphics(e);Dt(t.parentNode)};function Jo(e,t,n){var r=n||t.firstChild;e!==r&&t.insertBefore(e,r)}var ea={__depends__:[Bo],__init__:["canvas"],canvas:["type",q],elementRegistry:["type",Be],elementFactory:["type",Ct],eventBus:["type",ke],graphicsFactory:["type",Oe]};function zl(e){var t=new Fr(e);return t.init(),t}function Ul(e){e=e||{};var t={config:["value",e]},n=[t,ea].concat(e.modules||[]);return zl(n)}function ct(e,t){this._injector=t||Ul(e),this.get("eventBus").fire("diagram.init")}ct.prototype.get=function(e,t){return this._injector.get(e,t)};ct.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)};ct.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")};ct.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};Q();Q();function Wr(){}Wr.prototype.get=function(e){return this.$model.properties.get(this,e)};Wr.prototype.set=function(e,t){this.$model.properties.set(this,e,t)};function na(e,t){this.model=e,this.properties=t}na.prototype.createType=function(e){var t=this.model,n=this.properties,r=Object.create(Wr.prototype);P(e.properties,function(a){!a.isMany&&a.default!==void 0&&(r[a.name]=a.default)}),n.defineModel(r,t),n.defineDescriptor(r,e);var i=e.ns.name;function o(a){n.define(this,"$type",{value:i,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),P(a,Ye(function(s,c){this.set(c,s)},this))}return o.prototype=r,o.hasType=r.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var Gl={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},ra={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 er(e,t){var n=ra[e];return n?n(t):t}function Vr(e){return!!Gl[e]}function Hr(e){return!!ra[e]}function Re(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 Ue(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}Ue.prototype.build=function(){return gr(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])};Ue.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)};Ue.prototype.replaceProperty=function(e,t,n){var r=e.ns,i=this.properties,o=this.propertiesByName,a=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var s=i.indexOf(e);if(s===-1)throw new Error("property <"+r.name+"> not found in property list");i.splice(s,1),this.addProperty(t,n?void 0:s,a),o[r.name]=o[r.localName]=t};Ue.prototype.redefineProperty=function(e,t,n){var r=e.ns.prefix,i=t.split("#"),o=Re(i[0],r),a=Re(i[1],o.prefix).name,s=this.propertiesByName[a];if(s)this.replaceProperty(s,e,n);else throw new Error("refined property <"+a+"> not found");delete e.redefines};Ue.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};Ue.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]};Ue.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};Ue.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};Ue.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)};Ue.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")};Ue.prototype.hasProperty=function(e){return this.propertiesByName[e]};Ue.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,r=this.allTypes,i=e.name;i in n||(P(e.properties,Ye(function(o){o=M({},o,{name:o.ns.localName,inherited:t}),Object.defineProperty(o,"definedBy",{value:e});var a=o.replaces,s=o.redefines;a||s?this.redefineProperty(o,a||s,a):(o.isBody&&this.setBodyProperty(o),o.isId&&this.setIdProperty(o),this.addProperty(o))},this)),r.push(e),n[i]=e)};function Pt(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,P(e,Ye(this.registerPackage,this))}Pt.prototype.getPackage=function(e){return this.packageMap[e]};Pt.prototype.getPackages=function(){return this.packages};Pt.prototype.registerPackage=function(e){e=M({},e);var t=this.packageMap;ta(t,e,"prefix"),ta(t,e,"uri"),P(e.types,Ye(function(n){this.registerType(n,e)},this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)};Pt.prototype.registerType=function(e,t){e=M({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:M(e.meta||{})});var n=Re(e.name,t.prefix),r=n.name,i={};P(e.properties,Ye(function(o){var a=Re(o.name,n.prefix),s=a.name;Vr(o.type)||(o.type=Re(o.type,a.prefix).name),M(o,{ns:a,name:s}),i[s]=o},this)),M(e,{ns:n,name:r,propertiesByName:i}),P(e.extends,Ye(function(o){var a=Re(o,n.prefix),s=this.typeMap[a.name];s.traits=s.traits||[],s.traits.push(r)},this)),this.definePackage(e,t),this.typeMap[r]=e};Pt.prototype.mapTypes=function(e,t,n){var r=Vr(e.name)?{name:e.name}:this.typeMap[e.name],i=this;function o(c,f){var h=Re(c,Vr(c)?"":e.prefix);i.mapTypes(h,t,f)}function a(c){return o(c,!0)}function s(c){return o(c,!1)}if(!r)throw new Error("unknown type <"+e.name+">");P(r.superClass,n?a:s),t(r,!n),P(r.traits,a)};Pt.prototype.getEffectiveDescriptor=function(e){var t=Re(e),n=new Ue(t);this.mapTypes(t,function(i,o){n.addTrait(i,o)});var r=n.build();return this.definePackage(r,r.allTypes[r.allTypes.length-1].$pkg),r};Pt.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})};function ta(e,t,n){var r=t[n];if(r in e)throw new Error("package with "+n+" <"+r+"> already defined")}function Ot(e){this.model=e}Ot.prototype.set=function(e,t,n){if(!De(t)||!t.length)throw new TypeError("property name must be a non-empty string");var r=this.getProperty(e,t),i=r&&r.name;Kl(n)?r?delete e[i]:delete e.$attrs[qr(t)]:r?i in e?e[i]=n:ia(e,r,n):e.$attrs[qr(t)]=n};Ot.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[qr(t)];var r=n.name;return!e[r]&&n.isMany&&ia(e,n,[]),e[r]};Ot.prototype.define=function(e,t,n){if(!n.writable){var r=n.value;n=M({},n,{get:function(){return r}}),delete n.value}Object.defineProperty(e,t,n)};Ot.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})};Ot.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})};Ot.prototype.getProperty=function(e,t){var n=this.model,r=n.getPropertyDescriptor(e,t);if(r)return r;if(t.includes(":"))return null;let i=n.config.strict;if(typeof i!="undefined"){let o=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(i)throw o;typeof console!="undefined"&&console.warn(o)}return null};function Kl(e){return typeof e=="undefined"}function ia(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function qr(e){return e.replace(/^:/,"")}function Fe(e,t={}){this.properties=new Ot(this),this.factory=new na(this,this.properties),this.registry=new Pt(e,this.properties),this.typeCache={},this.config=t}Fe.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)};Fe.prototype.getType=function(e){var t=this.typeCache,n=De(e)?e:e.ns.name,r=t[n];return r||(e=this.registry.getEffectiveDescriptor(n),r=t[n]=this.factory.createType(e)),r};Fe.prototype.createAny=function(e,t,n){var r=Re(e),i={$type:e,$instanceOf:function(a){return a===this.$type},get:function(a){return this[a]},set:function(a,s){yr(this,[a],s)}},o={name:e,isGeneric:!0,ns:{prefix:r.prefix,localName:r.localName,uri:t}};return this.properties.defineDescriptor(i,o),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}),P(n,function(a,s){_e(a)&&a.value!==void 0?i[a.name]=a.value:i[s]=a}),i};Fe.prototype.getPackage=function(e){return this.registry.getPackage(e)};Fe.prototype.getPackages=function(){return this.registry.getPackages()};Fe.prototype.getElementDescriptor=function(e){return e.$descriptor};Fe.prototype.hasType=function(e,t){t===void 0&&(t=e,e=this);var n=e.$model.getElementDescriptor(e);return t in n.allTypesByName};Fe.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]};Fe.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};Q();var oa=String.fromCharCode,Yl=Object.prototype.hasOwnProperty,Xl=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,hn={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(hn).forEach(function(e){hn[e.toUpperCase()]=hn[e]});function Zl(e,t,n,r){return r?Yl.call(hn,r)?hn[r]:"&"+r+";":oa(t||parseInt(n,16))}function Lt(e){return e.length>3&&e.indexOf("&")!==-1?e.replace(Xl,Zl):e}var aa="non-whitespace outside of root node";function Xt(e){return new Error(e)}function sa(e){return"missing namespace for prefix <"+e+">"}function tr(e){return{get:e,enumerable:!0}}function Ql(e){var t={},n;for(n in e)t[n]=e[n];return t}function zr(e){return e+"$uri"}function Jl(e){var t={},n,r;for(n in e)r=e[n],t[r]=r,t[zr(r)]=n;return t}function ua(){return{line:0,column:0}}function ec(e){throw e}function Ur(e){if(!this)return new Ur(e);var t=e&&e.proxy,n,r,i,o,a=ec,s,c,f,h,y=ua,v=!1,A=!1,W=null,L=!1,O;function H(g){g instanceof Error||(g=Xt(g)),W=g,a(g,y)}function G(g){s&&(g instanceof Error||(g=Xt(g)),s(g,y))}this.on=function(g,w){if(typeof w!="function")throw Xt("required args <name, cb>");switch(g){case"openTag":r=w;break;case"text":n=w;break;case"closeTag":i=w;break;case"error":a=w;break;case"warn":s=w;break;case"cdata":o=w;break;case"attention":h=w;break;case"question":f=w;break;case"comment":c=w;break;default:throw Xt("unsupported event: "+g)}return this},this.ns=function(g){if(typeof g=="undefined"&&(g={}),typeof g!="object")throw Xt("required args <nsMap={}>");var w={},C;for(C in g)w[C]=g[C];return A=!0,O=w,this},this.parse=function(g){if(typeof g!="string")throw Xt("required args <xml=string>");return W=null,T(g),y=ua,L=!1,W},this.stop=function(){L=!0};function T(g){var w=A?[]:null,C=A?Jl(O):null,V,b=[],D=0,R=!1,F=!1,B=0,I=0,K,ot,ae,Z,Je,et,ye,Ge,x,_="",$=0,re;function je(){if(re!==null)return re;var l,u,m,d=A&&C.xmlns,E=A&&v?[]:null,S=$,j=_,Y=j.length,ge,he,we,Ke,ie,mt={},gn={},$e,z,J;e:for(;S<Y;S++)if($e=!1,z=j.charCodeAt(S),!(z===32||z<14&&z>8)){for((z<65||z>122||z>90&&z<97)&&z!==95&&z!==58&&(G("illegal first char attribute name"),$e=!0),J=S+1;J<Y;J++)if(z=j.charCodeAt(J),!(z>96&&z<123||z>64&&z<91||z>47&&z<59||z===46||z===45||z===95)){if(z===32||z<14&&z>8){G("missing attribute value"),S=J;continue e}if(z===61)break;G("illegal attribute name char"),$e=!0}if(ie=j.substring(S,J),ie==="xmlns:xmlns"&&(G("illegal declaration of xmlns"),$e=!0),z=j.charCodeAt(J+1),z===34)J=j.indexOf('"',S=J+2),J===-1&&(J=j.indexOf("'",S),J!==-1&&(G("attribute value quote missmatch"),$e=!0));else if(z===39)J=j.indexOf("'",S=J+2),J===-1&&(J=j.indexOf('"',S),J!==-1&&(G("attribute value quote missmatch"),$e=!0));else for(G("missing attribute value quotes"),$e=!0,J=J+1;J<Y&&(z=j.charCodeAt(J+1),!(z===32||z<14&&z>8));J++);for(J===-1&&(G("missing closing quotes"),J=Y,$e=!0),$e||(we=j.substring(S,J)),S=J;J+1<Y&&(z=j.charCodeAt(J+1),!(z===32||z<14&&z>8));J++)S===J&&(G("illegal character after attribute end"),$e=!0);if(S=J+1,$e)continue e;if(ie in gn){G("attribute <"+ie+"> already defined");continue}if(gn[ie]=!0,!A){mt[ie]=we;continue}if(v){if(he=ie==="xmlns"?"xmlns":ie.charCodeAt(0)===120&&ie.substr(0,6)==="xmlns:"?ie.substr(6):null,he!==null){if(l=Lt(we),u=zr(he),Ke=O[l],!Ke){if(he==="xmlns"||u in C&&C[u]!==l)do Ke="ns"+D++;while(typeof C[Ke]!="undefined");else Ke=he;O[l]=Ke}C[he]!==Ke&&(ge||(C=Ql(C),ge=!0),C[he]=Ke,he==="xmlns"&&(C[zr(Ke)]=l,d=Ke),C[u]=l),mt[ie]=we;continue}E.push(ie,we);continue}if(z=ie.indexOf(":"),z===-1){mt[ie]=we;continue}if(!(m=C[ie.substring(0,z)])){G(sa(ie.substring(0,z)));continue}ie=d===m?ie.substr(z+1):m+ie.substr(z),mt[ie]=we}if(v)for(S=0,Y=E.length;S<Y;S++){if(ie=E[S++],we=E[S],z=ie.indexOf(":"),z!==-1){if(!(m=C[ie.substring(0,z)])){G(sa(ie.substring(0,z)));continue}ie=d===m?ie.substr(z+1):m+ie.substr(z)}mt[ie]=we}return re=mt}function p(){for(var l=/(\r\n|\r|\n)/g,u=0,m=0,d=0,E=I,S,j;B>=d&&(S=l.exec(g),!(!S||(E=S[0].length+S.index,E>B)));)u+=1,d=E;return B==-1?(m=E,j=g.substring(I)):I===0?j=g.substring(I,B):(m=B-d,j=I==-1?g.substring(B):g.substring(B,I+1)),{data:j,line:u,column:m}}for(y=p,t&&(x=Object.create({},{name:tr(function(){return ye}),originalName:tr(function(){return Ge}),attrs:tr(je),ns:tr(function(){return C})}));I!==-1;){if(g.charCodeAt(I)===60?B=I:B=g.indexOf("<",I),B===-1){if(b.length)return H("unexpected end of file");if(I===0)return H("missing start tag");I<g.length&&g.substring(I).trim()&&G(aa);return}if(I!==B){if(b.length){if(n&&(n(g.substring(I,B),Lt,y),L))return}else if(g.substring(I,B).trim()&&(G(aa),L))return}if(Z=g.charCodeAt(B+1),Z===33){if(ae=g.charCodeAt(B+2),ae===91&&g.substr(B+3,6)==="CDATA["){if(I=g.indexOf("]]>",B),I===-1)return H("unclosed cdata");if(o&&(o(g.substring(B+9,I),y),L))return;I+=3;continue}if(ae===45&&g.charCodeAt(B+3)===45){if(I=g.indexOf("-->",B),I===-1)return H("unclosed comment");if(c&&(c(g.substring(B+4,I),Lt,y),L))return;I+=3;continue}}if(Z===63){if(I=g.indexOf("?>",B),I===-1)return H("unclosed question");if(f&&(f(g.substring(B,I+2),y),L))return;I+=2;continue}for(K=B+1;;K++){if(Je=g.charCodeAt(K),isNaN(Je))return I=-1,H("unclosed tag");if(Je===34)ae=g.indexOf('"',K+1),K=ae!==-1?ae:K;else if(Je===39)ae=g.indexOf("'",K+1),K=ae!==-1?ae:K;else if(Je===62){I=K;break}}if(Z===33){if(h&&(h(g.substring(B,I+1),Lt,y),L))return;I+=1;continue}if(re={},Z===47){if(R=!1,F=!0,!b.length)return H("missing open tag");if(K=ye=b.pop(),ae=B+2+K.length,g.substring(B+2,ae)!==K)return H("closing tag mismatch");for(;ae<I;ae++)if(Z=g.charCodeAt(ae),!(Z===32||Z>8&&Z<14))return H("close tag")}else{if(g.charCodeAt(I-1)===47?(K=ye=g.substring(B+1,I-1),R=!0,F=!0):(K=ye=g.substring(B+1,I),R=!0,F=!1),!(Z>96&&Z<123||Z>64&&Z<91||Z===95||Z===58))return H("illegal first char nodeName");for(ae=1,ot=K.length;ae<ot;ae++)if(Z=K.charCodeAt(ae),!(Z>96&&Z<123||Z>64&&Z<91||Z>47&&Z<59||Z===45||Z===95||Z==46)){if(Z===32||Z<14&&Z>8){ye=K.substring(0,ae),re=null;break}return H("invalid nodeName")}F||b.push(ye)}if(A){if(V=C,R&&(F||w.push(V),re===null&&(v=K.indexOf("xmlns",ae)!==-1)&&($=ae,_=K,je(),v=!1)),Ge=ye,Z=ye.indexOf(":"),Z!==-1){if(et=C[ye.substring(0,Z)],!et)return H("missing namespace on <"+Ge+">");ye=ye.substr(Z+1)}else et=C.xmlns;et&&(ye=et+":"+ye)}if(R&&($=ae,_=K,r&&(t?r(x,Lt,F,y):r(ye,je,Lt,F,y),L)))return;if(F){if(i&&(i(t?x:ye,Lt,R,y),L))return;A&&(R?C=V:C=w.pop())}I+=1}}}function la(e){return e.xml&&e.xml.tagAlias==="lowerCase"}var Gr={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},ca="property";function fa(e){return e.xml&&e.xml.serialize}function tc(e){let t=fa(e);return t!==ca&&(t||null)}function nc(e){return e.charAt(0).toUpperCase()+e.slice(1)}function pa(e,t){return la(t)?e.prefix+":"+nc(e.localName):e.name}function rc(e,t){var n=e.name,r=e.localName,i=t&&t.xml&&t.xml.typePrefix;return i&&r.indexOf(i)===0?e.prefix+":"+r.slice(i.length):n}function ic(e,t,n){let r=Re(e,t.xmlns),i=`${t[r.prefix]||r.prefix}:${r.localName}`,o=Re(i);var a=n.getPackage(o.prefix);return rc(o,a)}function kt(e){return new Error(e)}function xt(e){return e.$descriptor}function oc(e){M(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(t){this.references.push(t)},this.addElement=function(t){if(!t)throw kt("expected element");var n=this.elementsById,r=xt(t),i=r.idProperty,o;if(i&&(o=t.get(i.name),o)){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(o))throw new Error("illegal ID <"+o+">");if(n[o])throw kt("duplicate ID <"+o+">");n[o]=t}},this.addWarning=function(t){this.warnings.push(t)}}function mn(){}mn.prototype.handleEnd=function(){};mn.prototype.handleText=function(){};mn.prototype.handleNode=function(){};function Kr(){}Kr.prototype=Object.create(mn.prototype);Kr.prototype.handleNode=function(){return this};function Qt(){}Qt.prototype=Object.create(mn.prototype);Qt.prototype.handleText=function(e){this.body=(this.body||"")+e};function dn(e,t){this.property=e,this.context=t}dn.prototype=Object.create(Qt.prototype);dn.prototype.handleNode=function(e){if(this.element)throw kt("expected no sub nodes");return this.element=this.createReference(e),this};dn.prototype.handleEnd=function(){this.element.id=this.body};dn.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}};function Yr(e,t){this.element=t,this.propertyDesc=e}Yr.prototype=Object.create(Qt.prototype);Yr.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=er(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)};function nr(){}nr.prototype=Object.create(Qt.prototype);nr.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 Te(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}Te.prototype=Object.create(nr.prototype);Te.prototype.addReference=function(e){this.context.addReference(e)};Te.prototype.handleText=function(e){var t=this.element,n=xt(t),r=n.bodyProperty;if(!r)throw kt("unexpected body text <"+e+">");Qt.prototype.handleText.call(this,e)};Te.prototype.handleEnd=function(){var e=this.body,t=this.element,n=xt(t),r=n.bodyProperty;r&&e!==void 0&&(e=er(r.type,e),t.set(r.name,e))};Te.prototype.createElement=function(e){var t=e.attributes,n=this.type,r=xt(n),i=this.context,o=new n({}),a=this.model,s;return P(t,function(c,f){var h=r.propertiesByName[f],y;h&&h.isReference?h.isMany?(y=c.split(" "),P(y,function(v){i.addReference({element:o,property:h.ns.name,id:v})})):i.addReference({element:o,property:h.ns.name,id:c}):(h?c=er(h.type,c):f==="xmlns"?f=":"+f:(s=Re(f,r.ns.prefix),a.getPackage(s.prefix)&&i.addWarning({message:"unknown attribute <"+f+">",element:o,property:f,value:c})),o.set(f,c))}),o};Te.prototype.getPropertyForNode=function(e){var t=e.name,n=Re(t),r=this.type,i=this.model,o=xt(r),a=n.name,s=o.propertiesByName[a];if(s&&!s.isAttr){let f=tc(s);if(f){let h=e.attributes[f];if(h){let y=ic(h,e.ns,i),v=i.getType(y);return M({},s,{effectiveType:xt(v).name})}}return s}var c=i.getPackage(n.prefix);if(c){let f=pa(n,c),h=i.getType(f);if(s=ve(o.properties,function(y){return!y.isVirtual&&!y.isReference&&!y.isAttribute&&h.hasType(y.type)}),s)return M({},s,{effectiveType:xt(h).name})}else if(s=ve(o.properties,function(f){return!f.isReference&&!f.isAttribute&&f.type==="Element"}),s)return s;throw kt("unrecognized element <"+n.name+">")};Te.prototype.toString=function(){return"ElementDescriptor["+xt(this.type).name+"]"};Te.prototype.valueHandler=function(e,t){return new Yr(e,t)};Te.prototype.referenceHandler=function(e){return new dn(e,this.context)};Te.prototype.handler=function(e){return e==="Element"?new Zt(this.model,e,this.context):new Te(this.model,e,this.context)};Te.prototype.handleChild=function(e){var t,n,r,i;if(t=this.getPropertyForNode(e),r=this.element,n=t.effectiveType||t.type,Hr(n))return this.valueHandler(t,r);t.isReference?i=this.referenceHandler(t).handleNode(e):i=this.handler(n).handleNode(e);var o=i.element;return o!==void 0&&(t.isMany?r.get(t.name).push(o):r.set(t.name,o),t.isReference?(M(o,{element:r}),this.context.addReference(o)):o.$parent=r),i};function Xr(e,t,n){Te.call(this,e,t,n)}Xr.prototype=Object.create(Te.prototype);Xr.prototype.createElement=function(e){var t=e.name,n=Re(t),r=this.model,i=this.type,o=r.getPackage(n.prefix),a=o&&pa(n,o)||t;if(!i.hasType(a))throw kt("unexpected element <"+e.originalName+">");return Te.prototype.createElement.call(this,e)};function Zt(e,t,n){this.model=e,this.context=n}Zt.prototype=Object.create(nr.prototype);Zt.prototype.createElement=function(e){var t=e.name,n=Re(t),r=n.prefix,i=e.ns[r+"$uri"],o=e.attributes;return this.model.createAny(t,i,o)};Zt.prototype.handleChild=function(e){var t=new Zt(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};Zt.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)};function rr(e){e instanceof Fe&&(e={model:e}),M(this,{lax:!1},e)}rr.prototype.fromXML=function(e,t,n){var r=t.rootHandler;t instanceof Te?(r=t,t={}):typeof t=="string"?(r=this.handler(t),t={}):typeof r=="string"&&(r=this.handler(r));var i=this.model,o=this.lax,a=new oc(M({},t,{rootHandler:r})),s=new Ur({proxy:!0}),c=ac();r.context=a,c.push(r);function f(w,C,V){var b=C(),D=b.line,R=b.column,F=b.data;F.charAt(0)==="<"&&F.indexOf(" ")!==-1&&(F=F.slice(0,F.indexOf(" "))+">");var B="unparsable content "+(F?F+" ":"")+`detected method
H A Dbpmn-modeler.production.min.js10 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="`+c.width+'" height="'+c.height+'" viewBox="'+c.x+" "+c.y+" "+c.width+" "+c.height+'" version="1.1">'+s+a+"</svg>"}catch(r){n=r}if(this._emit("saveSVG.done",{error:n,svg:t}),n)throw n;return{svg:t}};$e.prototype._setDefinitions=function(e){this._definitions=e};$e.prototype.getModules=function(){return this._modules};$e.prototype.clear=function(){this.getDefinitions()&&tr.prototype.clear.call(this)};$e.prototype.destroy=function(){tr.prototype.destroy.call(this),Wt(this._container)};$e.prototype.on=function(e,t,n,r){return this.get("eventBus").on(e,t,n,r)};$e.prototype.off=function(e,t){this.get("eventBus").off(e,t)};$e.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=_e(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()};$e.prototype.getDefinitions=function(){return this._definitions};$e.prototype.detach=function(){let e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))};$e.prototype._init=function(e,t,n){let r=n.modules||this.getModules(n),i=n.additionalModules||[],o=[{bpmnjs:["value",this],moddle:["value",t]}],a=[].concat(o,r,i),s=C(Nt(n,["additionalModules"]),{canvas:C({},n.canvas,{container:e}),modules:a});tr.call(this,s),n&&n.container&&this.attachTo(n.container)};$e.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)};$e.prototype._createContainer=function(e){let t=ue('<div class="bjs-container"></div>');return vt(t,{width:mh(e.width),height:mh(e.height),position:e.position}),t};$e.prototype._createModdle=function(e){let t=C({},this._moddleExtensions,e.moddleExtensions);return new ph(t)};$e.prototype._modules=[];function Nc(e,t){return e.warnings=t,e}function YS(e){let 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}var XS={width:"100%",height:"100%",position:"relative"};function mh(e){return e+(ne(e)?"px":"")}function ZS(e,t){return t&&re(e.diagrams,function(n){return n.id===t})||null}function QS(e){let n='<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+Xl+"</a>",r=ue(n);vt(_e("svg",r),Zl),vt(r,Ql,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(r),se.bind(r,"click",function(i){dh(),i.preventDefault()})}function Ai(e){$e.call(this,e),this.on("import.parse.complete",function(t){t.error||this._collectIds(t.definitions,t.elementsById)},this),this.on("diagram.destroy",function(){this.get("moddle").ids.clear()},this)}B(Ai,$e);Ai.prototype._createModdle=function(e){var t=$e.prototype._createModdle.call(this,e);return t.ids=new En([32,36,1]),t};Ai.prototype._collectIds=function(e,t){var n=e.$model,r=n.ids,i;r.clear();for(i in t)r.claim(i,t[i])};N();N();function ie(e,t){return h(e,"bpmn:CallActivity")?!1:h(e,"bpmn:SubProcess")?(t=t||ce(e),t&&h(t,"bpmndi:BPMNPlane")?!0:t&&!!t.isExpanded):h(e,"bpmn:Participant")?!!j(e).processRef:!0}function Me(e){if(!(!h(e,"bpmn:Participant")&&!h(e,"bpmn:Lane"))){var t=ce(e).isHorizontal;return t===void 0?!0:t}}function hh(e){return e&&j(e).isInterrupting!==!1}function Qe(e){return e&&!!j(e).triggeredByEvent}function Er(e,t){var n=j(e).eventDefinitions;return Lt(n,function(r){return h(r,t)})}function vh(e){return Er(e,"bpmn:ErrorEventDefinition")}function gh(e){return Er(e,"bpmn:EscalationEventDefinition")}function yh(e){return Er(e,"bpmn:CompensateEventDefinition")}N();var ir={width:90,height:20},_h=15;function mn(e){return h(e,"bpmn:Event")||h(e,"bpmn:Gateway")||h(e,"bpmn:DataStoreReference")||h(e,"bpmn:DataObjectReference")||h(e,"bpmn:DataInput")||h(e,"bpmn:DataOutput")||h(e,"bpmn:SequenceFlow")||h(e,"bpmn:MessageFlow")||h(e,"bpmn:Group")}function Xr(e){return ee(e.label)}function JS(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)],i=e1(e),o=Math.atan((r.y-n.y)/(r.x-n.x)),a=i.x,s=i.y;return Math.abs(o)<Math.PI/2?s-=_h:a+=_h,{x:a,y:s}}function e1(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 La(e){return e.waypoints?JS(e.waypoints):h(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+ir.height/2}:{x:e.x+e.width/2,y:e.y+e.height+ir.height/2}}function bh(e,t){var n,r,i,o=e.label;return o&&o.bounds?(i=o.bounds,r={width:Math.max(ir.width,i.width),height:i.height},n={x:i.x+i.width/2,y:i.y+i.height/2}):(n=La(t),r=ir),C({x:n.x-r.width/2,y:n.y-r.height/2},r)}function xh(e){if(h(e,"bpmn:FlowElement")||h(e,"bpmn:Participant")||h(e,"bpmn:Lane")||h(e,"bpmn:SequenceFlow")||h(e,"bpmn:MessageFlow")||h(e,"bpmn:DataInput")||h(e,"bpmn:DataOutput"))return"name";if(h(e,"bpmn:TextAnnotation"))return"text";if(h(e,"bpmn:Group"))return"categoryValueRef"}function t1(e){var t=e.categoryValueRef;return t&&t.value||""}function gt(e){var t=e.businessObject,n=xh(t);if(n)return n==="categoryValueRef"?t1(t):t[n]||""}function Eh(e,t){var n=e.businessObject,r=xh(n);if(r)if(r==="categoryValueRef"){if(!n[r])return e;n[r].value=t}else n[r]=t;return e}function wh(e){return ee(e)&&mn(e.labelTarget)}N();var wr=7;function Jl(e){let t=[];return E(e.incoming,n=>{h(n,"bpmn:Association")&&h(n.source,"bpmn:TextAnnotation")&&t.push({annotation:n.source,association:n})}),E(e.outgoing,n=>{h(n,"bpmn:Association")&&h(n.target,"bpmn:TextAnnotation")&&t.push({annotation:n.target,association:n})}),t}function Ti(e){let t=new Map;return E(Ta(e,!0,-1),n=>{E(Jl(n),r=>{t.has(r.annotation)||t.set(r.annotation,{annotation:r.annotation,associations:[]}),t.get(r.annotation).associations.push(r.association)})}),[...t.values()]}N();var Oc="hsl(225, 10%, 15%)",n1="white";function jn(e,t){return Lt(e.eventDefinitions,function(n){return n.$type===t})}function Sh(e){return e.$type==="bpmn:IntermediateThrowEvent"||e.$type==="bpmn:EndEvent"}function Ch(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection}function ge(e,t,n){var r=ce(e);return n||r.get("color:background-color")||r.get("bioc:fill")||t||n1}function Y(e,t,n){var r=ce(e);return n||r.get("color:border-color")||r.get("bioc:stroke")||t||Oc}function go(e,t,n,r){var i=ce(e),o=i.get("label");return r||o&&o.get("color:color")||t||Y(e,n)}function Bc(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 br(i)}function ja(e,t){var n=e.x,r=e.y,i=e.width,o=e.height,a=[["M",n+t,r],["l",i-t*2,0],["a",t,t,0,0,1,t,t],["l",0,o-t*2],["a",t,t,0,0,1,-t,t],["l",t*2-i,0],["a",t,t,0,0,1,-t,-t],["l",0,t*2-o],["a",t,t,0,0,1,t,-t],["z"]];return br(a)}function Rh(e){var t=e.width,n=e.height,r=e.x,i=e.y,o=t/2,a=n/2,s=[["M",r+o,i],["l",o,a],["l",-o,a],["l",-o,-a],["z"]];return br(s)}function Ph(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=[["M",t,n],["l",r,0],["l",0,i],["l",-r,0],["z"]];return br(o)}function yo(e,t={}){return{width:hn(e,t),height:Yt(e,t)}}function hn(e,t={}){return dt(t,"width")?t.width:e.width}function Yt(e,t={}){return dt(t,"height")?t.height:e.height}var r1=new En,i1=10,Ic=3,o1=1.5,Lc=10,a1=4,_o=.95,s1=1,c1=.25;function Sr(e,t,n,r,i,o,a){Cn.call(this,t,a);var s=e&&e.defaultFillColor,c=e&&e.defaultStrokeColor,u=e&&e.defaultLabelColor;function p(P){return n.computeStyle(P,{strokeLinecap:"round",strokeLinejoin:"round",stroke:Oc,strokeWidth:2,fill:"white"})}function l(P){return n.computeStyle(P,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:Oc,strokeWidth:2})}function f(P,_){var{ref:y={x:0,y:0},scale:M=1,element:D,parentGfx:F=i._svg}=_,V=U("marker",{id:P,viewBox:"0 0 20 20",refX:y.x,refY:y.y,markerWidth:20*M,markerHeight:20*M,orient:"auto"});J(V,D);var ae=_e(":scope > defs",F);ae||(ae=U("defs"),J(F,ae)),J(ae,V)}function d(P,_,y,M){var D=r1.nextPrefixed("marker-");return m(P,D,_,y,M),"url(#"+D+")"}function m(P,_,y,M,D){if(y==="sequenceflow-end"){var F=U("path",{d:"M 1 5 L 11 10 L 1 15 Z",...p({fill:D,stroke:D,strokeWidth:1})});f(_,{element:F,ref:{x:11,y:10},scale:.5,parentGfx:P})}if(y==="messageflow-start"){var V=U("circle",{cx:6,cy:6,r:3.5,...p({fill:M,stroke:D,strokeWidth:1,strokeDasharray:[1e4,1]})});f(_,{element:V,ref:{x:6,y:6},parentGfx:P})}if(y==="messageflow-end"){var ae=U("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...p({fill:M,stroke:D,strokeWidth:1,strokeDasharray:[1e4,1]})});f(_,{element:ae,ref:{x:8.5,y:5},parentGfx:P})}if(y==="association-start"){var be=U("path",{d:"M 11 5 L 1 10 L 11 15",...l({fill:"none",stroke:D,strokeWidth:1.5,strokeDasharray:[1e4,1]})});f(_,{element:be,ref:{x:1,y:10},scale:.5,parentGfx:P})}if(y==="association-end"){var ft=U("path",{d:"M 1 5 L 11 10 L 1 15",...l({fill:"none",stroke:D,strokeWidth:1.5,strokeDasharray:[1e4,1]})});f(_,{element:ft,ref:{x:11,y:10},scale:.5,parentGfx:P})}if(y==="conditional-flow-marker"){var at=U("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...p({fill:M,stroke:D})});f(_,{element:at,ref:{x:-1,y:10},scale:.5,parentGfx:P})}if(y==="conditional-default-flow-marker"){var St=U("path",{d:"M 6 4 L 10 16",...p({stroke:D,fill:"none"})});f(_,{element:St,ref:{x:0,y:10},scale:.5,parentGfx:P})}}function g(P,_,y,M,D={}){Se(M)&&(D=M,M=0),M=M||0,D=p(D);var F=_/2,V=y/2,ae=U("circle",{cx:F,cy:V,r:Math.round((_+y)/4-M),...D});return J(P,ae),ae}function v(P,_,y,M,D,F){Se(D)&&(F=D,D=0),D=D||0,F=p(F);var V=U("rect",{x:D,y:D,width:_-D*2,height:y-D*2,rx:M,ry:M,...F});return J(P,V),V}function w(P,_,y,M){var D=_/2,F=y/2,V=[{x:D,y:0},{x:_,y:F},{x:D,y},{x:0,y:F}],ae=V.map(function(ft){return ft.x+","+ft.y}).join(" ");M=p(M);var be=U("polygon",{...M,points:ae});return J(P,be),be}function S(P,_,y,M){y=l(y);var D=Xn(_,y,M);return J(P,D),D}function x(P,_,y){return S(P,_,y,5)}function b(P,_,y){y=l(y);var M=U("path",{...y,d:_});return J(P,M),M}function R(P,_,y,M){return b(_,y,C({"data-marker":P},M))}function A(P){return Gt[P]}function O(P){return function(_,y,M){return A(P)(_,y,M)}}var T={"bpmn:MessageEventDefinition":function(P,_,y={},M){var D=r.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:y.width||_.width,containerHeight:y.height||_.height,position:{mx:.235,my:.315}}),F=M?Y(_,c,y.stroke):ge(_,s,y.fill),V=M?ge(_,s,y.fill):Y(_,c,y.stroke),ae=b(P,D,{fill:F,stroke:V,strokeWidth:1});return ae},"bpmn:TimerEventDefinition":function(P,_,y={}){var M=y.width||_.width,D=y.height||_.height,F=y.width?1:2,V=g(P,M,D,.2*D,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:F}),ae=r.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:M,containerHeight:D,position:{mx:.5,my:.5}});b(P,ae,{stroke:Y(_,c,y.stroke),strokeWidth:F});for(var be=0;be<12;be++){var ft=r.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:M,containerHeight:D,position:{mx:.5,my:.5}}),at=M/2,St=D/2;b(P,ft,{strokeWidth:1,stroke:Y(_,c,y.stroke),transform:"rotate("+be*30+","+St+","+at+")"})}return V},"bpmn:EscalationEventDefinition":function(P,_,y={},M){var D=r.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:y.width||_.width,containerHeight:y.height||_.height,position:{mx:.5,my:.2}}),F=M?Y(_,c,y.stroke):ge(_,s,y.fill);return b(P,D,{fill:F,stroke:Y(_,c,y.stroke),strokeWidth:1})},"bpmn:ConditionalEventDefinition":function(P,_,y={}){var M=r.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:y.width||_.width,containerHeight:y.height||_.height,position:{mx:.5,my:.222}});return b(P,M,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:1})},"bpmn:LinkEventDefinition":function(P,_,y={},M){var D=r.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:_.width,containerHeight:_.height,position:{mx:.57,my:.263}}),F=M?Y(_,c,y.stroke):ge(_,s,y.fill);return b(P,D,{fill:F,stroke:Y(_,c,y.stroke),strokeWidth:1})},"bpmn:ErrorEventDefinition":function(P,_,y={},M){var D=r.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:y.width||_.width,containerHeight:y.height||_.height,position:{mx:.2,my:.722}}),F=M?Y(_,c,y.stroke):ge(_,s,y.fill);return b(P,D,{fill:F,stroke:Y(_,c,y.stroke),strokeWidth:1})},"bpmn:CancelEventDefinition":function(P,_,y={},M){var D=r.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:_.width,containerHeight:_.height,position:{mx:.638,my:-.055}}),F=M?Y(_,c,y.stroke):"none",V=b(P,D,{fill:F,stroke:Y(_,c,y.stroke),strokeWidth:1});return Rc(V,45),V},"bpmn:CompensateEventDefinition":function(P,_,y={},M){var D=r.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:y.width||_.width,containerHeight:y.height||_.height,position:{mx:.22,my:.5}}),F=M?Y(_,c,y.stroke):ge(_,s,y.fill);return b(P,D,{fill:F,stroke:Y(_,c,y.stroke),strokeWidth:1})},"bpmn:SignalEventDefinition":function(P,_,y={},M){var D=r.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:y.width||_.width,containerHeight:y.height||_.height,position:{mx:.5,my:.2}}),F=M?Y(_,c,y.stroke):ge(_,s,y.fill);return b(P,D,{strokeWidth:1,fill:F,stroke:Y(_,c,y.stroke)})},"bpmn:MultipleEventDefinition":function(P,_,y={},M){var D=r.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:y.width||_.width,containerHeight:y.height||_.height,position:{mx:.211,my:.36}}),F=M?Y(_,c,y.stroke):ge(_,s,y.fill);return b(P,D,{fill:F,stroke:Y(_,c,y.stroke),strokeWidth:1})},"bpmn:ParallelMultipleEventDefinition":function(P,_,y={}){var M=r.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:y.width||_.width,containerHeight:y.height||_.height,position:{mx:.458,my:.194}});return b(P,M,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:1})},"bpmn:TerminateEventDefinition":function(P,_,y={}){var M=g(P,_.width,_.height,8,{fill:Y(_,c,y.stroke),stroke:Y(_,c,y.stroke),strokeWidth:4});return M}};function I(P,_,y={},M){var D=j(P),F=Sh(D),V=M||P;return D.get("eventDefinitions")&&D.get("eventDefinitions").length>1?D.get("parallelMultiple")?T["bpmn:ParallelMultipleEventDefinition"](_,V,y,F):T["bpmn:MultipleEventDefinition"](_,V,y,F):jn(D,"bpmn:MessageEventDefinition")?T["bpmn:MessageEventDefinition"](_,V,y,F):jn(D,"bpmn:TimerEventDefinition")?T["bpmn:TimerEventDefinition"](_,V,y,F):jn(D,"bpmn:ConditionalEventDefinition")?T["bpmn:ConditionalEventDefinition"](_,V,y,F):jn(D,"bpmn:SignalEventDefinition")?T["bpmn:SignalEventDefinition"](_,V,y,F):jn(D,"bpmn:EscalationEventDefinition")?T["bpmn:EscalationEventDefinition"](_,V,y,F):jn(D,"bpmn:LinkEventDefinition")?T["bpmn:LinkEventDefinition"](_,V,y,F):jn(D,"bpmn:ErrorEventDefinition")?T["bpmn:ErrorEventDefinition"](_,V,y,F):jn(D,"bpmn:CancelEventDefinition")?T["bpmn:CancelEventDefinition"](_,V,y,F):jn(D,"bpmn:CompensateEventDefinition")?T["bpmn:CompensateEventDefinition"](_,V,y,F):jn(D,"bpmn:TerminateEventDefinition")?T["bpmn:TerminateEventDefinition"](_,V,y,F):null}var L={ParticipantMultiplicityMarker:function(P,_,y={}){var M=hn(_,y),D=Yt(_,y),F=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:M,containerHeight:D,position:{mx:(M/2-6)/M,my:(D-15)/D}});R("participant-multiplicity",P,F,{strokeWidth:2,fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke)})},SubProcessMarker:function(P,_,y={}){var M=v(P,14,14,0,{strokeWidth:1,fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke)});Fe(M,_.width/2-7.5,_.height-20);var D=r.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:_.width,containerHeight:_.height,position:{mx:(_.width/2-7.5)/_.width,my:(_.height-20)/_.height}});R("sub-process",P,D,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke)})},ParallelMarker:function(P,_,y){var M=hn(_,y),D=Yt(_,y),F=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:M,containerHeight:D,position:{mx:(M/2+y.parallel)/M,my:(D-20)/D}});R("parallel",P,F,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke)})},SequentialMarker:function(P,_,y){var M=r.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:_.width,containerHeight:_.height,position:{mx:(_.width/2+y.seq)/_.width,my:(_.height-19)/_.height}});R("sequential",P,M,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke)})},CompensationMarker:function(P,_,y){var M=r.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:_.width,containerHeight:_.height,position:{mx:(_.width/2+y.compensation)/_.width,my:(_.height-13)/_.height}});R("compensation",P,M,{strokeWidth:1,fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke)})},LoopMarker:function(P,_,y){var M=hn(_,y),D=Yt(_,y),F=r.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:M,containerHeight:D,position:{mx:(M/2+y.loop)/M,my:(D-7)/D}});R("loop",P,F,{strokeWidth:1.5,fill:"none",stroke:Y(_,c,y.stroke),strokeMiterlimit:.5})},AdhocMarker:function(P,_,y){var M=hn(_,y),D=Yt(_,y),F=r.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:M,containerHeight:D,position:{mx:(M/2+y.adhoc)/M,my:(D-15)/D}});R("adhoc",P,F,{strokeWidth:1,fill:Y(_,c,y.stroke),stroke:Y(_,c,y.stroke)})}};function W(P,_,y,M){L[P](_,y,M)}function z(P,_,y=[],M={}){M={fill:M.fill,stroke:M.stroke,width:hn(_,M),height:Yt(_,M)};var D=j(_),F=y.includes("SubProcessMarker");F?M={...M,seq:-21,parallel:-22,compensation:-25,loop:-18,adhoc:10}:M={...M,seq:-5,parallel:-6,compensation:-7,loop:0,adhoc:-8},D.get("isForCompensation")&&y.push("CompensationMarker"),h(D,"bpmn:AdHocSubProcess")&&(y.push("AdhocMarker"),F||C(M,{compensation:M.compensation-18}));var V=D.get("loopCharacteristics"),ae=V&&V.get("isSequential");V&&(C(M,{compensation:M.compensation-18}),y.includes("AdhocMarker")&&C(M,{seq:-23,loop:-18,parallel:-24}),ae===void 0&&y.push("LoopMarker"),ae===!1&&y.push("ParallelMarker"),ae===!0&&y.push("SequentialMarker")),y.includes("CompensationMarker")&&y.length===1&&C(M,{compensation:-8}),E(y,function(be){W(be,P,_,M)})}function K(P,_,y={}){y=C({size:{width:100}},y);var M=o.createText(_||"",y);return pe(M).add("djs-label"),J(P,M),M}function ve(P,_,y,M={}){var D=j(_),F=yo({x:_.x,y:_.y,width:_.width,height:_.height},M);return K(P,D.name,{align:y,box:F,padding:7,style:{fill:go(_,u,c,M.stroke)}})}function Jt(P,_,y={}){var M={width:_.width,height:_.height,x:_.width/2+_.x,y:_.height/2+_.y};return K(P,gt(_),{box:M,style:C({},o.getExternalStyle(),{fill:go(_,u,c,y.stroke)})})}function ke(P,_,y,M={}){var D=Me(y),F=K(P,_,{box:{height:30,width:D?Yt(y,M):hn(y,M)},align:"center-middle",style:{fill:go(y,u,c,M.stroke)}});if(D){var V=-1*Yt(y,M);fo(F,0,-V,270)}}function ye(P,_,y={}){var{width:M,height:D}=yo(_,y);return v(P,M,D,Lc,{...y,fill:ge(_,s,y.fill),fillOpacity:_o,stroke:Y(_,c,y.stroke)})}function he(P,_,y={}){var M=j(_),D=ge(_,s,y.fill),F=Y(_,c,y.stroke);return(M.get("associationDirection")==="One"||M.get("associationDirection")==="Both")&&(y.markerEnd=d(P,"association-end",D,F)),M.get("associationDirection")==="Both"&&(y.markerStart=d(P,"association-start",D,F)),y=Ee(y,["markerStart","markerEnd"]),x(P,_.waypoints,{...y,stroke:F,strokeDasharray:"0, 5"})}function we(P,_,y={}){var M=ge(_,s,y.fill),D=Y(_,c,y.stroke),F=r.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:_.width,containerHeight:_.height,position:{mx:.474,my:.296}}),V=b(P,F,{fill:M,fillOpacity:_o,stroke:D}),ae=j(_);if(Ch(ae)){var be=r.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:_.width,containerHeight:_.height,position:{mx:.33,my:(_.height-18)/_.height}});b(P,be,{strokeWidth:2,fill:M,stroke:D})}return V}function Ie(P,_,y={}){return g(P,_.width,_.height,{fillOpacity:_o,...y,fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke)})}function Ze(P,_,y={}){return w(P,_.width,_.height,{fill:ge(_,s,y.fill),fillOpacity:_o,stroke:Y(_,c,y.stroke)})}function H(P,_,y={}){var M=v(P,hn(_,y),Yt(_,y),0,{fill:ge(_,s,y.fill),fillOpacity:y.fillOpacity||_o,stroke:Y(_,c,y.stroke),strokeWidth:1.5}),D=j(_);if(h(D,"bpmn:Lane")){var F=D.get("name");ke(P,F,_,y)}return M}function G(P,_,y={}){var M=ye(P,_,y),D=ie(_);if(Qe(_)&&($(M,{strokeDasharray:"0, 5.5",strokeWidth:2.5}),!D)){var F=j(_).flowElements||[],V=F.filter(ae=>h(ae,"bpmn:StartEvent"));V.length===1&&oe(V[0],P,y,_)}return ve(P,_,D?"center-top":"center-middle",y),D?z(P,_,void 0,y):z(P,_,["SubProcessMarker"],y),M}function oe(P,_,y,M){var D=22,F={fill:ge(M,s,y.fill),stroke:Y(M,c,y.stroke),width:D,height:D},V=j(P).isInterrupting,ae=V?0:3,be=V?1:1.2,ft=20,at=(D-ft)/2,St="translate("+at+","+at+")";g(_,ft,ft,{fill:F.fill,stroke:F.stroke,strokeWidth:be,strokeDasharray:ae,transform:St}),I(P,_,F,M)}function xe(P,_,y={}){var M=ye(P,_,y);return ve(P,_,"center-middle",y),z(P,_,void 0,y),M}var Gt=this.handlers={"bpmn:AdHocSubProcess":function(P,_,y={}){return ie(_)?y=Ee(y,["fill","stroke","width","height"]):y=Ee(y,["fill","stroke"]),G(P,_,y)},"bpmn:Association":function(P,_,y={}){return y=Ee(y,["fill","stroke"]),he(P,_,y)},"bpmn:BoundaryEvent":function(P,_,y={}){var{renderIcon:M=!0}=y;y=Ee(y,["fill","stroke"]);var D=j(_),F=D.get("cancelActivity");y={strokeWidth:1.5,fill:ge(_,s,y.fill),fillOpacity:s1,stroke:Y(_,c,y.stroke)},F||(y.strokeDasharray="6");var V=Ie(P,_,y);return g(P,_.width,_.height,Ic,{...y,fill:"none"}),M&&I(_,P,y),V},"bpmn:BusinessRuleTask":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=xe(P,_,y),D=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),F=b(P,D);$(F,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:1});var V=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),ae=b(P,V);return $(ae,{fill:Y(_,c,y.stroke),stroke:Y(_,c,y.stroke),strokeWidth:1}),M},"bpmn:CallActivity":function(P,_,y={}){return y=Ee(y,["fill","stroke"]),G(P,_,{strokeWidth:5,...y})},"bpmn:ComplexGateway":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=Ze(P,_,y),D=r.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:_.width,containerHeight:_.height,position:{mx:.46,my:.26}});return b(P,D,{fill:Y(_,c,y.stroke),stroke:Y(_,c,y.stroke),strokeWidth:1}),M},"bpmn:DataInput":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=r.getRawPath("DATA_ARROW"),D=we(P,_,y);return b(P,M,{fill:"none",stroke:Y(_,c,y.stroke),strokeWidth:1}),D},"bpmn:DataInputAssociation":function(P,_,y={}){return y=Ee(y,["fill","stroke"]),he(P,_,{...y,markerEnd:d(P,"association-end",ge(_,s,y.fill),Y(_,c,y.stroke))})},"bpmn:DataObject":function(P,_,y={}){return y=Ee(y,["fill","stroke"]),we(P,_,y)},"bpmn:DataObjectReference":O("bpmn:DataObject"),"bpmn:DataOutput":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=r.getRawPath("DATA_ARROW"),D=we(P,_,y);return b(P,M,{strokeWidth:1,fill:Y(_,c,y.stroke),stroke:Y(_,c,y.stroke)}),D},"bpmn:DataOutputAssociation":function(P,_,y={}){return y=Ee(y,["fill","stroke"]),he(P,_,{...y,markerEnd:d(P,"association-end",ge(_,s,y.fill),Y(_,c,y.stroke))})},"bpmn:DataStoreReference":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=r.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:_.width,containerHeight:_.height,position:{mx:0,my:.133}});return b(P,M,{fill:ge(_,s,y.fill),fillOpacity:_o,stroke:Y(_,c,y.stroke),strokeWidth:2})},"bpmn:EndEvent":function(P,_,y={}){var{renderIcon:M=!0}=y;y=Ee(y,["fill","stroke"]);var D=Ie(P,_,{...y,strokeWidth:4});return M&&I(_,P,y),D},"bpmn:EventBasedGateway":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=j(_),D=Ze(P,_,y);g(P,_.width,_.height,_.height*.2,{fill:ge(_,"none",y.fill),stroke:Y(_,c,y.stroke),strokeWidth:1});var F=M.get("eventGatewayType"),V=!!M.get("instantiate");function ae(){var ft=r.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:_.width,containerHeight:_.height,position:{mx:.36,my:.44}});b(P,ft,{fill:"none",stroke:Y(_,c,y.stroke),strokeWidth:2})}if(F==="Parallel"){var be=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:_.width,containerHeight:_.height,position:{mx:.474,my:.296}});b(P,be,{fill:"none",stroke:Y(_,c,y.stroke),strokeWidth:1})}else F==="Exclusive"&&(V||g(P,_.width,_.height,_.height*.26,{fill:"none",stroke:Y(_,c,y.stroke),strokeWidth:1}),ae());return D},"bpmn:ExclusiveGateway":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=Ze(P,_,y),D=r.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:_.width,containerHeight:_.height,position:{mx:.32,my:.3}}),F=ce(_);return F.get("isMarkerVisible")&&b(P,D,{fill:Y(_,c,y.stroke),stroke:Y(_,c,y.stroke),strokeWidth:1}),M},"bpmn:Gateway":function(P,_,y={}){return y=Ee(y,["fill","stroke"]),Ze(P,_,y)},"bpmn:Group":function(P,_,y={}){return y=Ee(y,["fill","stroke","width","height"]),v(P,_.width,_.height,Lc,{stroke:Y(_,c,y.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:hn(_,y),height:Yt(_,y)})},"bpmn:InclusiveGateway":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=Ze(P,_,y);return g(P,_.width,_.height,_.height*.24,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:2.5}),M},"bpmn:IntermediateEvent":function(P,_,y={}){var{renderIcon:M=!0}=y;y=Ee(y,["fill","stroke"]);var D=Ie(P,_,{...y,strokeWidth:1.5});return g(P,_.width,_.height,Ic,{fill:"none",stroke:Y(_,c,y.stroke),strokeWidth:1.5}),M&&I(_,P,y),D},"bpmn:IntermediateCatchEvent":O("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":O("bpmn:IntermediateEvent"),"bpmn:Lane":function(P,_,y={}){return y=Ee(y,["fill","stroke","width","height"]),H(P,_,{...y,fillOpacity:c1})},"bpmn:ManualTask":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=xe(P,_,y),D=r.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return b(P,D,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:.5}),M},"bpmn:MessageFlow":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=j(_),D=ce(_),F=ge(_,s,y.fill),V=Y(_,c,y.stroke),ae=x(P,_.waypoints,{markerEnd:d(P,"messageflow-end",F,V),markerStart:d(P,"messageflow-start",F,V),stroke:V,strokeDasharray:"10, 11",strokeWidth:1.5});if(M.get("messageRef")){var be=ae.getPointAtLength(ae.getTotalLength()/2),ft=r.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:be.x,y:be.y}}),at={strokeWidth:1};D.get("messageVisibleKind")==="initiating"?(at.fill=F,at.stroke=V):(at.fill=V,at.stroke=F);var St=b(P,ft,at),xn=M.get("messageRef"),Be=xn.get("name"),yr=K(P,Be,{align:"center-top",fitBox:!0,style:{fill:V}}),lc=St.getBBox(),pn=yr.getBBox(),me=be.x-pn.width/2,Te=be.y+lc.height/2+i1;fo(yr,me,Te,0)}return ae},"bpmn:ParallelGateway":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=Ze(P,_,y),D=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:_.width,containerHeight:_.height,position:{mx:.46,my:.2}});return b(P,D,{fill:Y(_,c,y.stroke),stroke:Y(_,c,y.stroke),strokeWidth:1}),M},"bpmn:Participant":function(P,_,y={}){y=Ee(y,["fill","stroke","width","height"]);var M=H(P,_,y),D=ie(_),F=Me(_),V=j(_),ae=V.get("name");if(D){var be=F?[{x:30,y:0},{x:30,y:Yt(_,y)}]:[{x:0,y:30},{x:hn(_,y),y:30}];S(P,be,{stroke:Y(_,c,y.stroke),strokeWidth:o1}),ke(P,ae,_,y)}else{var ft=yo(_,y);F||(ft.height=hn(_,y),ft.width=Yt(_,y));var at=K(P,ae,{box:ft,align:"center-middle",style:{fill:go(_,u,c,y.stroke)}});if(!F){var St=-1*Yt(_,y);fo(at,0,-St,270)}}return V.get("participantMultiplicity")&&W("ParticipantMultiplicityMarker",P,_,y),M},"bpmn:ReceiveTask":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=j(_),D=xe(P,_,y),F;return M.get("instantiate")?(g(P,28,28,20*.22,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:1}),F=r.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):F=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),b(P,F,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:1}),D},"bpmn:ScriptTask":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=xe(P,_,y),D=r.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return b(P,D,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:1}),M},"bpmn:SendTask":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=xe(P,_,y),D=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return b(P,D,{fill:Y(_,c,y.stroke),stroke:ge(_,s,y.fill),strokeWidth:1}),M},"bpmn:SequenceFlow":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=ge(_,s,y.fill),D=Y(_,c,y.stroke),F=x(P,_.waypoints,{markerEnd:d(P,"sequenceflow-end",M,D),stroke:D}),V=j(_),{source:ae}=_;if(ae){var be=j(ae);V.get("conditionExpression")&&h(be,"bpmn:Activity")&&$(F,{markerStart:d(P,"conditional-flow-marker",M,D)}),be.get("default")&&(h(be,"bpmn:Gateway")||h(be,"bpmn:Activity"))&&be.get("default")===V&&$(F,{markerStart:d(P,"conditional-default-flow-marker",M,D)})}return F},"bpmn:ServiceTask":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=xe(P,_,y);g(P,10,10,{fill:ge(_,s,y.fill),stroke:"none",transform:"translate(6, 6)"});var D=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});b(P,D,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:1}),g(P,10,10,{fill:ge(_,s,y.fill),stroke:"none",transform:"translate(11, 10)"});var F=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return b(P,F,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:1}),M},"bpmn:StartEvent":function(P,_,y={}){var{renderIcon:M=!0}=y;y=Ee(y,["fill","stroke"]);var D=j(_);D.get("isInterrupting")||(y={...y,strokeDasharray:"6"});var F=Ie(P,_,y);return M&&I(_,P,y),F},"bpmn:SubProcess":function(P,_,y={}){return ie(_)?y=Ee(y,["fill","stroke","width","height"]):y=Ee(y,["fill","stroke"]),G(P,_,y)},"bpmn:Task":function(P,_,y={}){return y=Ee(y,["fill","stroke"]),xe(P,_,y)},"bpmn:TextAnnotation":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var{width:M,height:D}=yo(_,y),F=v(P,M,D,0,0,{fill:"none",stroke:"none"}),V=r.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:M,containerHeight:D,position:{mx:0,my:0}});b(P,V,{stroke:Y(_,c,y.stroke)});var ae=j(_),be=ae.get("text")||"";return K(P,be,{align:"left-top",box:yo(_,y),padding:wr,style:{fill:go(_,u,c,y.stroke)}}),F},"bpmn:Transaction":function(P,_,y={}){ie(_)?y=Ee(y,["fill","stroke","width","height"]):y=Ee(y,["fill","stroke"]);var M=G(P,_,{strokeWidth:1.5,...y}),D=n.style(["no-fill","no-events"],{stroke:Y(_,c,y.stroke),strokeWidth:1.5}),F=ie(_);return F||(y={}),v(P,hn(_,y),Yt(_,y),Lc-Ic,Ic,D),M},"bpmn:UserTask":function(P,_,y={}){y=Ee(y,["fill","stroke"]);var M=xe(P,_,y),D=15,F=12,V=r.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:D,y:F}});b(P,V,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:.5});var ae=r.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:D,y:F}});b(P,ae,{fill:ge(_,s,y.fill),stroke:Y(_,c,y.stroke),strokeWidth:.5});var be=r.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:D,y:F}});return b(P,be,{fill:Y(_,c,y.stroke),stroke:Y(_,c,y.stroke),strokeWidth:.5}),M},label:function(P,_,y={}){return Jt(P,_,y)}};this._drawPath=b,this._renderer=A}B(Sr,Cn);Sr.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"];Sr.prototype.canRender=function(e){return h(e,"bpmn:BaseElement")};Sr.prototype.drawShape=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)};Sr.prototype.drawConnection=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)};Sr.prototype.getShapePath=function(e){return ee(e)?ja(e,a1):h(e,"bpmn:Event")?Bc(e):h(e,"bpmn:Activity")?ja(e,Lc):h(e,"bpmn:Gateway")?Rh(e):Ph(e)};function Ee(e,t=[]){return t.reduce((n,r)=>(e[r]&&(n[r]=e[r]),n),{})}N();N();var u1=0,p1={width:150,height:50};function l1(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function f1(e){return Se(e)?C({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}var ef=null;function d1(){return ef||(ef=document.createElement("canvas").getContext("2d")),ef}function m1(e){var t=[];return e.fontStyle&&t.push(e.fontStyle),e.fontVariant&&t.push(e.fontVariant),e.fontWeight&&t.push(e.fontWeight),e.fontStretch&&t.push(e.fontStretch),t.push(Th(e.fontSize)||"12px"),t.push(e.fontFamily||"sans-serif"),t.join(" ")}function Th(e){if(e!=null)return typeof e=="number"||/^-?\d+(\.\d+)?$/.test(e)?e+"px":e}function h1(e,t){var n=d1();if(!n)return{width:0,height:0};n.font=m1(t),"letterSpacing"in n&&(n.letterSpacing=Th(t.letterSpacing)||"0px");var r=e==="",i=r?"dummy":e.replace(/\s+$/,""),o=n.measureText(i);return{width:r?0:o.width,height:"fontBoundingBoxAscent"in o?o.fontBoundingBoxAscent+o.fontBoundingBoxDescent:o.actualBoundingBoxAscent+o.actualBoundingBoxDescent}}function v1(e,t,n){for(var r=e.shift(),i=r,o;;){if(o=h1(i,n),o.width=i?o.width:0,i===" "||i===""||o.width<Math.round(t)||i.length<2)return g1(e,i,r,o);i=_1(i,o.width,t)}}function g1(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 Ah="\xAD";function y1(e,t){var n=e.split(/(\s|-|\u00AD)/g),r,i=[],o=0;if(n.length>1)for(;r=n.shift();)if(r.length+o<t)i.push(r),o+=r.length;else{(r==="-"||r===Ah)&&i.pop();break}var a=i[i.length-1];return a&&a===Ah&&(i[i.length-1]="-"),i.join("")}function _1(e,t,n){var r=Math.max(e.length*(n/t),1),i=y1(e,r);return i||(i=e.slice(0,Math.max(Math.round(r-1),1))),i}function bo(e){this._config=C({},{size:p1,padding:u1,style:{},align:"center-top"},e||{})}bo.prototype.createText=function(e,t){return this.layoutText(e,t).element};bo.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions};bo.prototype.layoutText=function(e,t){for(var n=C({},this._config.size,t.box),r=C({},this._config.style,t.style),i=l1(t.align||this._config.align),o=f1(t.padding!==void 0?t.padding:this._config.padding),a=t.fitBox||!1,s=b1(r),c=e.split(/\u00AD?\r?\n/),u=[],p=n.width-o.left-o.right;c.length;)u.push(v1(c,p,r));i.vertical==="middle"&&(o.top=o.bottom=0);var l=Ge(u,function(v,w,S){return v+(s||w.height)},0)+o.top+o.bottom,f=Ge(u,function(v,w,S){return w.width>v?w.width:v},0),d=o.top;i.vertical==="middle"&&(d+=(n.height-l)/2),d-=(s||u[0].height)/4;var m=U("text");$(m,r),E(u,function(v){var w;switch(d+=s||v.height,i.horizontal){case"left":w=o.left;break;case"right":w=(a?f:p)-o.right-v.width;break;default:w=Math.max(((a?f:p)-v.width)/2+o.left,0)}var S=U("tspan");$(S,{x:w,y:d}),S.textContent=v.text,J(m,S)});var g={width:f,height:l};return{dimensions:g,element:m}};function b1(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}var x1=12,E1=1.2,w1=40;function jc(e){var t=C({fontFamily:"Arial, sans-serif",fontSize:x1,fontWeight:"normal",lineHeight:E1},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,r=C({},t,{fontSize:n},e&&e.externalStyle||{}),i=new bo({style:t});this.getExternalLabelBounds=function(a,s){var c={width:Math.max(a.width,ir.width),height:30},u=o(s,c,{style:r});return{x:Math.round(a.x+a.width/2-u.width/2),y:a.y,width:Math.ceil(u.width),height:Math.ceil(u.height)}},this.getTextAnnotationBounds=function(a,s){var c=o(s,a,{style:t,align:"left-top",padding:wr});return{x:a.x,y:a.y,width:a.width,height:Math.max(w1,Math.round(c.height))}},this.getDimensions=function(a,s){return i.getDimensions(a,s||{})};function o(a,s,c){return i.getDimensions(a,C({box:s},c))}this.createText=function(a,s){return i.createText(a,s||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return r}}jc.$inject=["config.textRenderer"];function tf(){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,o;n.abspos?(i=n.abspos.x,o=n.abspos.y):(i=n.containerWidth*n.position.mx,o=n.containerHeight*n.position.my);var a={};if(n.position){for(var s=n.containerHeight/r.height*n.yScaleFactor,c=n.containerWidth/r.width*n.xScaleFactor,u=0;u<r.heightElements.length;u++)a["y"+u]=r.heightElements[u]*s;for(var p=0;p<r.widthElements.length;p++)a["x"+p]=r.widthElements[p]*c}var l=P1(r.d,{mx:i,my:o,e:a});return l}}var S1=/\{([^{}]+)\}/g,C1=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;function R1(e,t,n){var r=n;return t.replace(C1,function(i,o,a,s,c){o=o||s,r&&(o in r&&(r=r[o]),typeof r=="function"&&c&&(r=r()))}),r=(r==null||r==n?e:r)+"",r}function P1(e,t){return String(e).replace(S1,function(n,r){return R1(n,r,t)})}var Mh={__init__:["bpmnRenderer"],bpmnRenderer:["type",Sr],textRenderer:["type",jc],pathMap:["type",tf]};function nf(e,t){return t=t||{},e.replace(/{([^}]+)}/g,function(n,r){return t[r]||"{"+r+"}"})}var Zr={translate:["value",nf]};N();function Fc(e,t,n){return C({id:e.id,type:e.$type,businessObject:e,di:t},n)}function A1(e,t,n){var r=e.waypoint;return!r||r.length<2?[X(t),X(n)]:r.map(function(i){return{x:i.x,y:i.y}})}function Dh(e,t,n){return new Error(`element ${Rt(t)} referenced by ${Rt(e)}#${n} not yet drawn`)}function Fn(e,t,n,r,i){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=r,this._textRenderer=i}Fn.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"];Fn.prototype.add=function(e,t,n){var r,i,o;if(h(t,"bpmndi:BPMNPlane")){var a=h(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};r=this._elementFactory.createRoot(Fc(e,t,a)),this._canvas.addRootElement(r)}else if(h(t,"bpmndi:BPMNShape")){var s=!ie(e,t),c=M1(e);i=n&&(n.hidden||n.collapsed);var u=t.bounds;r=this._elementFactory.createShape(Fc(e,t,{collapsed:s,hidden:i,x:Math.round(u.x),y:Math.round(u.y),width:Math.round(u.width),height:Math.round(u.height),isFrame:c})),h(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,r),h(e,"bpmn:Lane")&&(o=0),h(e,"bpmn:DataStoreReference")&&(T1(n,X(u))||(n=this._canvas.findRoot(n))),this._canvas.addShape(r,n,o)}else if(h(t,"bpmndi:BPMNEdge")){var p=this._getSource(e),l=this._getTarget(e);i=n&&(n.hidden||n.collapsed),r=this._elementFactory.createConnection(Fc(e,t,{hidden:i,source:p,target:l,waypoints:A1(t,p,l)})),h(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(r,n,o)}else throw new Error(`unknown di ${Rt(t)} for element ${Rt(e)}`);return mn(e)&&gt(r)&&this.addLabel(e,t,r),this._eventBus.fire("bpmnElement.added",{element:r}),r};Fn.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${Rt(e)}#attachedToRef`);var r=this._elementRegistry.get(n.id),i=r&&r.attachers;if(!r)throw Dh(e,n,"attachedToRef");t.host=r,i||(r.attachers=i=[]),i.indexOf(t)===-1&&i.push(t)};Fn.prototype.addLabel=function(e,t,n){var r,i,o;return r=bh(t,n),i=gt(n),i&&(r=this._textRenderer.getExternalLabelBounds(r,i)),o=this._elementFactory.createLabel(Fc(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!gt(n),x:Math.round(r.x),y:Math.round(r.y),width:Math.round(r.width),height:Math.round(r.height)})),this._canvas.addShape(o,n.parent)};Fn.prototype._getConnectedElement=function(e,t){var n,r,i=e.$type;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?Dh(e,r,t+"Ref"):new Error(`${Rt(e)}#${t} Ref not specified`)};Fn.prototype._getSource=function(e){return this._getConnectedElement(e,"source")};Fn.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")};Fn.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};function T1(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 M1(e){return h(e,"bpmn:Group")}var kh={__depends__:[Zr],bpmnImporter:["type",Fn]};var Nh={__depends__:[Mh,kh]};N();function or(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(Math.random()*1e9)+"-"}or.prototype.next=function(){return this._prefix+ ++this._counter};var D1=new or("ov"),k1=500;function yt(e,t,n,r){this._eventBus=t,this._canvas=n,this._elementRegistry=r,this._ids=D1,this._overlayDefaults=C({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=N1(n.getContainer()),this._init()}yt.$inject=["config.overlays","eventBus","canvas","elementRegistry"];yt.prototype.get=function(e){if(st(e)&&(e={id:e}),st(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?Q(t.overlays,Ct({type:e.type})):t.overlays.slice():[]}else return e.type?Q(this._overlays,Ct({type:e.type})):e.id?this._overlays[e.id]:null};yt.prototype.add=function(e,t,n){if(Se(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=C({},this._overlayDefaults,n,{id:r,type:t,element:e,html:n.html}),this._addOverlay(n),r};yt.prototype.remove=function(e){var t=this.get(e)||[];q(t)||(t=[t]);var n=this;E(t,function(r){var i=n._getOverlayContainer(r.element,!0);if(r&&(Wt(r.html),Wt(r.htmlContainer),delete r.htmlContainer,delete r.element,delete n._overlays[r.id]),i){var o=i.overlays.indexOf(r);o!==-1&&i.overlays.splice(o,1)}})};yt.prototype.isShown=function(){return this._overlayRoot.style.display!=="none"};yt.prototype.show=function(){Hc(this._overlayRoot)};yt.prototype.hide=function(){Hc(this._overlayRoot,!1)};yt.prototype.clear=function(){this._overlays={},this._overlayContainers=[],Hr(this._overlayRoot)};yt.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,r=t.x,i=t.y;if(t.waypoints){var o=Ce(t);r=o.x,i=o.y}Oh(n,r,i),nt(e.html,"data-container-id",t.id)};yt.prototype._updateOverlay=function(e){var t=e.position,n=e.htmlContainer,r=e.element,i=t.left,o=t.top;if(t.right!==void 0){var a;r.waypoints?a=Ce(r).width:a=r.width,i=t.right*-1+a}if(t.bottom!==void 0){var s;r.waypoints?s=Ce(r).height:s=r.height,o=t.bottom*-1+s}Oh(n,i||0,o||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())};yt.prototype._createOverlayContainer=function(e){var t=ue('<div class="djs-overlays" />');vt(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n};yt.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";Bh(this._overlayRoot,n)};yt.prototype._getOverlayContainer=function(e,t){var n=re(this._overlayContainers,function(r){return r.element===e});return!n&&!t?this._createOverlayContainer(e):n};yt.prototype._addOverlay=function(e){var t=e.id,n=e.element,r=e.html,i,o;r.get&&r.constructor.prototype.jquery&&(r=r.get(0)),st(r)&&(r=ue(r)),o=this._getOverlayContainer(n),i=ue('<div class="djs-overlay" data-overlay-id="'+t+'">'),vt(i,{position:"absolute"}),i.appendChild(r),e.type&&Ne(i).add("djs-overlay-"+e.type);var a=this._canvas.findRoot(n),s=this._canvas.getRootElement();Hc(i,a===s),e.htmlContainer=i,o.overlays.push(e),o.html.appendChild(i),this._overlays[t]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())};yt.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,r=this._canvas.findRoot(e.element),i=n&&n.minZoom,o=n&&n.maxZoom,a=e.htmlContainer,s=this._canvas.getRootElement(),c=!0;(r!==s||n&&(Ue(i)&&i>t.scale||Ue(o)&&o<t.scale))&&(c=!1),Hc(a,c),this._updateOverlayScale(e,t)};yt.prototype._updateOverlayScale=function(e,t){var n=e.scale,r,i,o=e.htmlContainer,a,s="";n!==!0&&(n===!1?(r=1,i=1):(r=n.min,i=n.max),Ue(r)&&t.scale<r&&(a=(1/t.scale||1)*r),Ue(i)&&t.scale>i&&(a=(1/t.scale||1)*i)),Ue(a)&&(s="scale("+a+","+a+")"),Bh(o,s)};yt.prototype._updateOverlaysVisibilty=function(e){var t=this;E(this._overlays,function(n){t._updateOverlayVisibilty(n,e)})};yt.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,o=t.get({element:i});E(o,function(c){t.remove(c.id)});var a=t._getOverlayContainer(i);if(a){Wt(a.html);var s=t._overlayContainers.indexOf(a);s!==-1&&t._overlayContainers.splice(s,1)}}),e.on("element.changed",k1,function(r){var i=r.element,o=t._getOverlayContainer(i,!0);o&&(E(o.overlays,function(a){t._updateOverlay(a)}),t._updateOverlayContainer(o))}),e.on("element.marker.update",function(r){var i=t._getOverlayContainer(r.element,!0);i&&Ne(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 N1(e){var t=ue('<div class="djs-overlay-container" />');return vt(t,{position:"absolute",width:0,height:0}),e.insertBefore(t,e.firstChild),t}function Oh(e,t,n){vt(e,{left:t+"px",top:n+"px"})}function Hc(e,t){e.style.display=t===!1?"none":""}function Bh(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(n){e.style[n+"transform"]=t})}var Qr={__init__:["overlays"],overlays:["type",yt]};function $c(e,t,n,r){e.on("element.changed",function(i){var o=i.element;(o.parent||o===t.getRootElement())&&(i.gfx=n.getGraphics(o)),i.gfx&&e.fire(_c(o)+".changed",i)}),e.on("elements.changed",function(i){var o=i.elements;o.forEach(function(a){e.fire("element.changed",{element:a})}),r.updateContainments(o)}),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)})}$c.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var xo={__init__:["changeSupport"],changeSupport:["type",$c]};N();var O1=1e3;function k(e){this._eventBus=e}k.$inject=["eventBus"];function B1(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}k.prototype.on=function(e,t,n,r,i,o){if((Le(t)||ne(t))&&(o=i,i=r,r=n,n=t,t=null),Le(n)&&(o=i,i=r,r=n,n=O1),Se(i)&&(o=i,i=!1),!Le(r))throw new Error("handlerFn must be a function");q(e)||(e=[e]);var a=this._eventBus;E(e,function(s){var c=["commandStack",s,t].filter(function(u){return u}).join(".");a.on(c,n,i?B1(r,o):r,o)})};k.prototype.canExecute=Cr("canExecute");k.prototype.preExecute=Cr("preExecute");k.prototype.preExecuted=Cr("preExecuted");k.prototype.execute=Cr("execute");k.prototype.executed=Cr("executed");k.prototype.postExecute=Cr("postExecute");k.prototype.postExecuted=Cr("postExecuted");k.prototype.revert=Cr("revert");k.prototype.reverted=Cr("reverted");function Cr(e){return function(n,r,i,o,a){(Le(n)||ne(n))&&(a=o,o=i,i=r,r=n,n=null),this.on(n,e,r,i,o,a)}}function Fa(e,t){t.invoke(k,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)})}B(Fa,k);Fa.$inject=["canvas","injector"];var Ih={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",Fa]};N();function Rr(e){return CSS.escape(e)}var I1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Hn(e){return e=""+e,e&&e.replace(/[&<>"']/g,function(t){return I1[t]})}var Lh="_plane";function rf(e){var t=e.id;return L1(t)}function vn(e){var t=e.id;return h(e,"bpmn:SubProcess")?jh(t):t}function Jr(e){return jh(e)}function Eo(e){var t=ce(e);return h(t,"bpmndi:BPMNPlane")}function jh(e){return e+Lh}function L1(e){return e.replace(new RegExp(Lh+"$"),"")}var j1="bjs-breadcrumbs-shown";function zc(e,t,n){var r=ue('<ul class="bjs-breadcrumbs"></ul>'),i=n.getContainer(),o=Ne(i);i.appendChild(r);var a=[];e.on("element.changed",function(c){var u=c.element,p=j(u),l=re(a,function(f){return f===p});l&&s()});function s(c){c&&(a=F1(c));var u=a.flatMap(function(l){var f=n.findRoot(vn(l))||n.findRoot(l.id);if(!f&&h(l,"bpmn:Process")){var d=t.find(function(v){var w=j(v);return w&&w.get("processRef")===l});f=d&&n.findRoot(d.id)}if(!f)return[];var m=Hn(l.name||l.id),g=ue('<li><span class="bjs-crumb"><a title="'+m+'">'+m+"</a></span></li>");return g.addEventListener("click",function(){n.setRootElement(f)}),g});r.innerHTML="";var p=u.length>1;o.toggle(j1,p),u.forEach(function(l){r.appendChild(l)})}e.on("root.set",function(c){s(c.element)})}zc.$inject=["eventBus","elementRegistry","canvas"];function F1(e){for(var t=j(e),n=[],r=t;r;r=r.$parent)(h(r,"bpmn:SubProcess")||h(r,"bpmn:Process"))&&n.push(r);return n.reverse()}function Gc(e,t){var n=null,r=new H1;e.on("root.set",function(i){var o=i.element,a=t.viewbox(),s=r.get(o);if(r.set(n,{x:a.x,y:a.y,zoom:a.scale}),n=o,!(!h(o,"bpmn:SubProcess")&&!s)){s=s||{x:0,y:0,zoom:1};var c=(a.x-s.x)*a.scale,u=(a.y-s.y)*a.scale;(c!==0||u!==0)&&t.scroll({dx:c,dy:u}),s.zoom!==a.scale&&t.zoom(s.zoom,{x:0,y:0})}}),e.on("diagram.clear",function(){r.clear(),n=null})}Gc.$inject=["eventBus","canvas"];function H1(){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 Fh={x:180,y:160};function Pr(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,function(r,i){n._handleImport(i.definitions)})}Pr.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.filter(r=>r.plane).flatMap(r=>t._createNewDiagrams(r.plane));n.forEach(function(r){t._movePlaneElementsToOrigin(r.plane)})}};Pr.prototype._createNewDiagrams=function(e){var t=this,n=[],r=[];e.get("planeElement").forEach(function(o){var a=o.bpmnElement;if(a){var s=a.$parent;h(a,"bpmn:SubProcess")&&!o.isExpanded&&n.push(a),z1(a,e)&&r.push({diElement:o,parent:s})}});var i=[];return n.forEach(function(o){if(!t._processToDiagramMap[o.id]){var a=t._createDiagram(o);t._processToDiagramMap[o.id]=a,i.push(a)}}),r.forEach(function(o){for(var a=o.diElement,s=o.parent;s&&n.indexOf(s)===-1;)s=s.$parent;if(s){var c=t._processToDiagramMap[s.id];t._moveToDiPlane(a,c.plane)}}),i};Pr.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=$1(e),r={x:n.x-Fh.x,y:n.y-Fh.y};t.forEach(function(i){i.waypoint?i.waypoint.forEach(function(o){o.x=o.x-r.x,o.y=o.y-r.y}):i.bounds&&(i.bounds.x=i.bounds.x-r.x,i.bounds.y=i.bounds.y-r.y)})};Pr.prototype._moveToDiPlane=function(e,t){var n=Hh(e),r=n.plane.get("planeElement");r.splice(r.indexOf(e),1),t.get("planeElement").push(e)};Pr.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};Pr.$inject=["eventBus","moddle"];function Hh(e){return h(e,"bpmndi:BPMNDiagram")?e:Hh(e.$parent)}function $1(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=Z(n.bounds);t.top=Math.min(r.top,t.top),t.left=Math.min(r.left,t.left)}}),Si(t)}function z1(e,t){var n=e.$parent;return!(!h(n,"bpmn:SubProcess")||n===t.bpmnElement||te(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))}var Vc=250,G1='<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>',V1="bjs-drilldown-empty";function ar(e,t,n,r,i){k.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=r,this._translate=i;var o=this;this.executed("shape.toggleCollapse",Vc,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.reverted("shape.toggleCollapse",Vc,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.executed(["shape.create","shape.move","shape.delete"],Vc,function(a){var s=a.oldParent,c=a.newParent||a.parent,u=a.shape;o._canDrillDown(u)&&o._addOverlay(u),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(c),o._updateDrilldownOverlay(u)},!0),this.reverted(["shape.create","shape.move","shape.delete"],Vc,function(a){var s=a.oldParent,c=a.newParent||a.parent,u=a.shape;o._canDrillDown(u)&&o._addOverlay(u),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(c),o._updateDrilldownOverlay(u)},!0),t.on("import.render.complete",function(){n.filter(function(a){return o._canDrillDown(a)}).map(function(a){o._addOverlay(a)})})}B(ar,k);ar.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}};ar.prototype._canDrillDown=function(e){var t=this._canvas;return h(e,"bpmn:SubProcess")&&t.findRoot(vn(e))};ar.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=j(e),r=t.get({element:n.id,type:"drilldown"})[0];if(r){var i=n&&n.get("flowElements")&&n.get("flowElements").length;Ne(r.html).toggle(V1,!i)}};ar.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,r=j(e),i=n.get({element:e,type:"drilldown"});i.length&&this._removeOverlay(e);var o=ue('<button type="button" class="bjs-drilldown">'+G1+"</button>"),a=r.get("name")||r.get("id"),s=this._translate("Open {element}",{element:a});o.setAttribute("title",s),o.addEventListener("click",function(){t.setRootElement(t.findRoot(vn(e)))}),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:o}),this._updateOverlayVisibility(e)};ar.prototype._removeOverlay=function(e){var t=this._overlays;t.remove({element:e,type:"drilldown"})};ar.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];var $h={__depends__:[Qr,xo,Ih],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",zc],drilldownCentering:["type",Gc],drilldownOverlayBehavior:["type",ar],subprocessCompatibility:["type",Pr]};N();function zh(e){!e||typeof e.stopPropagation!="function"||e.stopPropagation()}function Ar(e){return e.originalEvent||e.srcEvent}function Wc(e){zh(e),zh(Ar(e))}function An(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 Uc(){return/mac/i.test(navigator.platform)}function Gh(e,t){return(Ar(e)||e).button===t}function gn(e){return Gh(e,0)}function Vh(e){return Gh(e,1)}function Tr(e){var t=Ar(e)||e;return gn(e)?Uc()?t.metaKey:t.ctrlKey:!1}function Mi(e){var t=Ar(e)||e;return gn(e)&&t.shiftKey}function W1(e){return!0}function qc(e){return gn(e)||Vh(e)}var Wh=500;function Kc(e,t,n){var r=this;function i(T,I,L){if(!s(T,I)){var W,z,K;L?z=t.getGraphics(L):(W=I.delegateTarget||I.target,W&&(z=W,L=t.get(z))),!(!z||!L)&&(K=e.fire(T,{element:L,gfx:z,originalEvent:I}),K===!1&&(I.stopPropagation(),I.preventDefault()))}}var o={};function a(T){return o[T]}function s(T,I){var L=u[T]||gn;return!L(I)}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"},u={"element.contextmenu":W1,"element.mousedown":qc,"element.mouseup":qc,"element.click":qc,"element.dblclick":qc};function p(T,I,L){var W=c[T];if(!W)throw new Error("unmapped DOM event name <"+T+">");return i(W,I,L)}var l="svg, .djs-element";function f(T,I,L,W){var z=o[L]=function(K){i(L,K)};W&&(u[L]=W),z.$delegate=bt.bind(T,l,I,z)}function d(T,I,L){var W=a(L);W&&bt.unbind(T,I,W.$delegate)}function m(T){E(c,function(I,L){f(T,L,I)})}function g(T){E(c,function(I,L){d(T,L,I)})}e.on("canvas.destroy",function(T){g(T.svg)}),e.on("canvas.init",function(T){m(T.svg)}),e.on(["shape.added","connection.added"],function(T){var I=T.element,L=T.gfx;e.fire("interactionEvents.createHit",{element:I,gfx:L})}),e.on(["shape.changed","connection.changed"],Wh,function(T){var I=T.element,L=T.gfx;e.fire("interactionEvents.updateHit",{element:I,gfx:L})}),e.on("interactionEvents.createHit",Wh,function(T){var I=T.element,L=T.gfx;r.createDefaultHit(I,L)}),e.on("interactionEvents.updateHit",function(T){var I=T.element,L=T.gfx;r.updateDefaultHit(I,L)});var v=R("djs-hit djs-hit-stroke"),w=R("djs-hit djs-hit-click-stroke"),S=R("djs-hit djs-hit-all"),x=R("djs-hit djs-hit-no-move"),b={all:S,"click-stroke":w,stroke:v,"no-move":x};function R(T,I){return I=C({stroke:"white",strokeWidth:15},I||{}),n.cls(T,["no-fill","no-border"],I)}function A(T,I){var L=b[I];if(!L)throw new Error("invalid hit type <"+I+">");return $(T,L),T}function O(T,I){J(T,I)}this.removeHits=function(T){var I=xi(".djs-hit",T);E(I,Pe)},this.createDefaultHit=function(T,I){var L=T.waypoints,W=T.isFrame,z;return L?this.createWaypointsHit(I,L):(z=W?"stroke":"all",this.createBoxHit(I,z,{width:T.width,height:T.height}))},this.createWaypointsHit=function(T,I){var L=Xn(I);return A(L,"stroke"),O(T,L),L},this.createBoxHit=function(T,I,L){L=C({x:0,y:0},L);var W=U("rect");return A(W,I),$(W,L),O(T,W),W},this.updateDefaultHit=function(T,I){var L=_e(".djs-hit",I);if(L)return T.waypoints?Pa(L,T.waypoints):$(L,{width:T.width,height:T.height}),L},this.fire=i,this.triggerMouseEvent=p,this.mouseHandler=a,this.registerEvent=f,this.unregisterEvent=d}Kc.$inject=["eventBus","elementRegistry","styles"];var ei={__init__:["interactionEvents"],interactionEvents:["type",Kc]};N();function ti(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)})}ti.$inject=["eventBus","canvas"];ti.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})}};ti.prototype.get=function(){return this._selectedElements};ti.prototype.isSelected=function(e){return this._selectedElements.indexOf(e)!==-1};ti.prototype.select=function(e,t){var n=this._selectedElements,r=n.slice();q(e)||(e=e?[e]:[]);var i=this._canvas,o=i.getRootElement();e=e.filter(function(a){var s=i.findRoot(a);return o===s}),t?E(e,function(a){n.indexOf(a)===-1&&n.push(a)}):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:r,newSelection:n})};N();var Uh="hover",qh="selected";function Yc(e,t){this._canvas=e;function n(i,o){e.addMarker(i,o)}function r(i,o){e.removeMarker(i,o)}t.on("element.hover",function(i){n(i.element,Uh)}),t.on("element.out",function(i){r(i.element,Uh)}),t.on("selection.changed",function(i){function o(u){r(u,qh)}function a(u){n(u,qh)}var s=i.oldSelection,c=i.newSelection;E(s,function(u){c.indexOf(u)===-1&&o(u)}),E(c,function(u){s.indexOf(u)===-1&&a(u)})})}Yc.$inject=["canvas","eventBus"];N();function Xc(e,t,n,r){e.on("create.end",500,function(i){var o=i.context,a=o.canExecute,s=o.elements,c=o.hints||{},u=c.autoSelect;if(a){if(u===!1)return;q(u)?t.select(u):t.select(s.filter(U1))}}),e.on("connect.end",500,function(i){var o=i.context,a=o.connection;a&&t.select(a)}),e.on("shape.move.end",500,function(i){var o=i.previousSelection||[],a=r.get(i.context.shape.id),s=re(o,function(c){return a.id===c.id});s||t.select(a)}),e.on("element.click",function(i){if(gn(i)){var o=i.element;o===n.getRootElement()&&(o=null);var a=t.isSelected(o),s=t.get().length>1,c=Mi(i);if(a&&s)return c?t.deselect(o):t.select(o);a?t.deselect(o):t.select(o,c)}})}Xc.$inject=["eventBus","selection","canvas","elementRegistry"];function U1(e){return!e.hidden}var rt={__init__:["selectionVisuals","selectionBehavior"],__depends__:[ei],selection:["type",ti],selectionVisuals:["type",Yc],selectionBehavior:["type",Xc]};function nn(e){$e.call(this,e)}B(nn,$e);nn.prototype._modules=[Nh,$h,Qr,rt,Zr];nn.prototype._moddleExtensions={};N();N();var Kh=["c","C"],Yh=["v","V"],q1=["d","D"],K1=["x","X"],Xh=["y","Y"],of=["z","Z"];function Zh(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function xt(e){return e.altKey?!1:e.ctrlKey||e.metaKey}function Ke(e,t){return e=q(e)?e:[e],e.indexOf(t.key)!==-1||e.indexOf(t.code)!==-1}function Zc(e){return e.shiftKey}function Qh(e){return xt(e)&&Ke(Kh,e)}function Jh(e){return xt(e)&&Ke(Yh,e)}function ev(e){return xt(e)&&Ke(q1,e)}function tv(e){return xt(e)&&Ke(K1,e)}function nv(e){return xt(e)&&!Zc(e)&&Ke(of,e)}function rv(e){return xt(e)&&(Ke(Xh,e)||Ke(of,e)&&Zc(e))}var Qc="keyboard.keydown",Y1="keyboard.keyup",X1=1e3,iv="Keyboard binding is now implicit; explicit binding to an element got removed. For more information, see https://github.com/bpmn-io/diagram-js/issues/661";function Mt(e,t){var n=this;this._config=e=e||{},this._eventBus=t,this._keydownHandler=this._keydownHandler.bind(this),this._keyupHandler=this._keyupHandler.bind(this),t.on("diagram.destroy",function(){n._fire("destroy"),n.unbind()}),e.bindTo&&console.error("unsupported configuration <keyboard.bindTo>",new Error(iv));var r=e&&e.bind!==!1;t.on("canvas.init",function(i){n._target=i.svg,r&&n.bind(),n._fire("init")})}Mt.$inject=["config.keyboard","eventBus"];Mt.prototype._keydownHandler=function(e){this._keyHandler(e,Qc)};Mt.prototype._keyupHandler=function(e){this._keyHandler(e,Y1)};Mt.prototype._keyHandler=function(e,t){var n;if(!this._isEventIgnored(e)){var r={keyEvent:e};n=this._eventBus.fire(t||Qc,r),n&&e.preventDefault()}};Mt.prototype._isEventIgnored=function(e){return!1};Mt.prototype.bind=function(e){e&&console.error("unsupported argument <node>",new Error(iv)),this.unbind(),e=this._node=this._target,se.bind(e,"keydown",this._keydownHandler),se.bind(e,"keyup",this._keyupHandler),this._fire("bind")};Mt.prototype.getBinding=function(){return this._node};Mt.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),se.unbind(e,"keydown",this._keydownHandler),se.unbind(e,"keyup",this._keyupHandler)),this._node=null};Mt.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node})};Mt.prototype.addListener=function(e,t,n){Le(e)&&(n=t,t=e,e=X1),this._eventBus.on(n||Qc,e,t)};Mt.prototype.removeListener=function(e,t){this._eventBus.off(t||Qc,e)};Mt.prototype.hasModifier=Zh;Mt.prototype.isCmd=xt;Mt.prototype.isShift=Zc;Mt.prototype.isKey=Ke;var Z1=500;function Mr(e,t){var n=this;e.on("editorActions.init",Z1,function(r){var i=r.editorActions;n.registerBindings(t,i)})}Mr.$inject=["eventBus","keyboard"];Mr.prototype.registerBindings=function(e,t){function n(r,i){t.isRegistered(r)&&e.addListener(i)}n("undo",function(r){var i=r.keyEvent;if(nv(i))return t.trigger("undo"),!0}),n("redo",function(r){var i=r.keyEvent;if(rv(i))return t.trigger("redo"),!0}),n("copy",function(r){var i=r.keyEvent;if(Qh(i))return t.trigger("copy"),!0}),n("paste",function(r){var i=r.keyEvent;if(Jh(i))return t.trigger("paste"),!0}),n("duplicate",function(r){var i=r.keyEvent;if(ev(i))return t.trigger("duplicate"),!0}),n("cut",function(r){var i=r.keyEvent;if(tv(i))return t.trigger("cut"),!0}),n("stepZoom",function(r){var i=r.keyEvent;if(Ke(["+","Add","="],i)&&xt(i))return t.trigger("stepZoom",{value:1}),!0}),n("stepZoom",function(r){var i=r.keyEvent;if(Ke(["-","Subtract"],i)&&xt(i))return t.trigger("stepZoom",{value:-1}),!0}),n("zoom",function(r){var i=r.keyEvent;if(Ke("0",i)&&xt(i))return t.trigger("zoom",{value:1}),!0}),n("removeSelection",function(r){var i=r.keyEvent;if(Ke(["Backspace","Delete","Del"],i))return t.trigger("removeSelection"),!0})};var wo={__init__:["keyboard","keyboardBindings"],keyboard:["type",Mt],keyboardBindings:["type",Mr]};N();var Q1={moveSpeed:50,moveSpeedAccelerated:200};function Jc(e,t,n){var r=this;this._config=C({},Q1,e||{}),t.addListener(i);function i(o){var a=o.keyEvent,s=r._config;if(t.isCmd(a)&&t.isKey(["ArrowLeft","Left","ArrowUp","Up","ArrowDown","Down","ArrowRight","Right"],a)){var c=t.isShift(a)?s.moveSpeedAccelerated:s.moveSpeed,u;switch(a.key){case"ArrowLeft":case"Left":u="left";break;case"ArrowUp":case"Up":u="up";break;case"ArrowRight":case"Right":u="right";break;case"ArrowDown":case"Down":u="down";break}return r.moveCanvas({speed:c,direction:u}),!0}}this.moveCanvas=function(o){var a=0,s=0,c=o.speed,u=c/Math.min(Math.sqrt(n.viewbox().scale),1);switch(o.direction){case"left":a=u;break;case"up":s=u;break;case"right":a=-u;break;case"down":s=-u;break}n.scroll({dx:a,dy:s})}}Jc.$inject=["config.keyboardMove","keyboard","canvas"];var eu={__depends__:[wo],__init__:["keyboardMove"],keyboardMove:["type",Jc]};var J1=/^djs-cursor-.*$/;function Di(e){var t=Ne(document.body);t.removeMatching(J1),e&&t.add("djs-cursor-"+e)}function tu(){Di(null)}var eC=5e3;function nu(e,t){t=t||"element.click";function n(){return!1}return e.once(t,eC,n),function(){e.off(t,n)}}function So(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function Dt(e,t){return{x:e.x-t.x,y:e.y-t.y}}var tC=15;function ru(e,t){var n;function r(s){return a(s.originalEvent)}e.on("canvas.focus.changed",function(s){s.focused?e.on("element.mousedown",500,r):e.off("element.mousedown",r)});function i(s){var c=n.start,u=n.button,p=An(s),l=Dt(p,c);if(!n.dragging&&nC(l)>tC&&(n.dragging=!0,u===0&&nu(e),Di("grab")),n.dragging){var f=n.last||n.start;l=Dt(p,f),t.scroll({dx:l.x,dy:l.y}),n.last=p}s.preventDefault()}function o(s){se.unbind(document,"mousemove",i),se.unbind(document,"mouseup",o),n=null,tu()}function a(s){if(!Bn(s.target,".djs-draggable")){var c=s.button;if(!(c>=2||s.ctrlKey||s.shiftKey||s.altKey))return n={button:c,start:An(s)},se.bind(document,"mousemove",i),se.bind(document,"mouseup",o),!0}}this.isActive=function(){return!!n}}ru.$inject=["eventBus","canvas"];function nC(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}var iu={__init__:["moveCanvas"],moveCanvas:["type",ru]};function Ha(e){return Math.log(e)/Math.log(10)}function af(e,t){var n=Ha(e.min),r=Ha(e.max),i=Math.abs(n)+Math.abs(r);return i/t}function ov(e,t){return Math.max(e.min,Math.min(e.max,t))}N();var rC=Math.sign||function(e){return e>=0?1:-1},sf={min:.2,max:4},av=10,iC=.1,oC=.75;function Tn(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=tt(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||oC;var r=this;t.on("canvas.mouseover",function(){r._init(e.enabled!==!1)}),t.on("canvas.mouseout",function(){r._init(!1)})}Tn.$inject=["config.zoomScroll","eventBus","canvas"];Tn.prototype.scroll=function(t){this._canvas.scroll(t)};Tn.prototype.reset=function(){this._canvas.zoom("fit-viewport")};Tn.prototype.zoom=function(t,n){var r=af(sf,av*2);this._totalDelta+=t,Math.abs(this._totalDelta)>iC&&(this._zoom(t,n,r),this._totalDelta=0)};Tn.prototype._handleWheel=function(t){if(this._enabled){var n=this._container;t.preventDefault();var r=t.ctrlKey||Uc()&&t.metaKey,i=t.shiftKey,o=-1*this._scale,a;if(r?o*=t.deltaMode===0?.02:.32:o*=t.deltaMode===0?1:16,r){var s=n.getBoundingClientRect(),c={x:t.clientX-s.left,y:t.clientY-s.top};a=Math.sqrt(Math.pow(t.deltaY,2)+Math.pow(t.deltaX,2))*rC(t.deltaY)*o,this.zoom(a,c)}else i?a={dx:o*t.deltaY,dy:0}:a={dx:o*t.deltaX,dy:o*t.deltaY},this.scroll(a)}};Tn.prototype.stepZoom=function(t,n){var r=af(sf,av);this._zoom(t,n,r)};Tn.prototype._zoom=function(e,t,n){var r=this._canvas,i=e>0?1:-1,o=Ha(r.zoom()),a=Math.round(o/n)*n;a+=n*i;var s=Math.pow(10,a);r.zoom(ov(sf,s),t)};Tn.prototype.toggle=function(t){var n=this._container,r=this._handleWheel,i=this._enabled;return typeof t=="undefined"&&(t=!i),i!==t&&se[t?"bind":"unbind"](n,"wheel",r,!1),this._enabled=t,t};Tn.prototype._init=function(e){this.toggle(e)};var ou={__init__:["zoomScroll"],zoomScroll:["type",Tn]};function sr(e){nn.call(this,e)}B(sr,nn);sr.prototype._navigationModules=[eu,iu,ou];sr.prototype._modules=[].concat(nn.prototype._modules,sr.prototype._navigationModules);N();function cf(e){return e&&e[e.length-1]}function sv(e){return e.y}function cv(e){return e.x}var aC={left:cv,center:cv,right:function(e){return e.x+e.width},top:sv,middle:sv,bottom:function(e){return e.y+e.height}};function ni(e,t){this._modeling=e,this._rules=t}ni.$inject=["modeling","rules"];ni.prototype._getOrientationDetails=function(e){var t=["top","bottom","middle"],n="x",r="width";return t.indexOf(e)!==-1&&(n="y",r="height"),{axis:n,dimension:r}};ni.prototype._isType=function(e,t){return t.indexOf(e)!==-1};ni.prototype._alignmentPosition=function(e,t){var n=this._getOrientationDetails(e),r=n.axis,i=n.dimension,o={},a={},s=!1,c,u,p;function l(f,d){return Math.round((f[r]+d[r]+d[i])/2)}if(this._isType(e,["left","top"]))o[e]=t[0][r];else if(this._isType(e,["right","bottom"]))p=cf(t),o[e]=p[r]+p[i];else if(this._isType(e,["center","middle"])){if(E(t,function(f){var d=f[r]+Math.round(f[i]/2);a[d]?a[d].elements.push(f):a[d]={elements:[f],center:d}}),c=At(a,function(f){return f.elements.length>1&&(s=!0),f.elements.length}),s)return o[e]=cf(c).center,o;u=t[0],t=At(t,function(f){return f[r]+f[i]}),p=cf(t),o[e]=l(u,p)}return o};ni.prototype.trigger=function(e,t){var n=this._modeling,r,i=Q(e,function(c){return!(c.waypoints||c.host||c.labelTarget)});if(r=this._rules.allowed("elements.align",{elements:i}),q(r)&&(i=r),!(i.length<2||!r)){var o=aC[t],a=At(i,o),s=this._alignmentPosition(t,a);n.alignElements(a,s)}};var uv={__init__:["alignElements"],alignElements:["type",ni]};var sC=new or;function ri(e){this._scheduled={},e.on("diagram.destroy",()=>{Object.keys(this._scheduled).forEach(t=>{this.cancel(t)})})}ri.$inject=["eventBus"];ri.prototype.schedule=function(e,t=sC.next()){this.cancel(t);let n=this._schedule(e,t);return this._scheduled[t]=n,n.promise};ri.prototype._schedule=function(e,t){let n=cC();return{executionId:setTimeout(()=>{try{this._scheduled[t]=null;try{n.resolve(e())}catch(i){n.reject(i)}}catch(i){console.error("Scheduler#_schedule execution failed",i)}}),promise:n.promise}};ri.prototype.cancel=function(e){let t=this._scheduled[e];t&&(this._cancel(t),this._scheduled[e]=null)};ri.prototype._cancel=function(e){clearTimeout(e.executionId)};function cC(){let e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}var pv={scheduler:["type",ri]};N();var uC="djs-element-hidden",au=".entry",pC=1e3,lv=8,lC=300;function it(e,t,n,r){this._canvas=e,this._elementRegistry=t,this._eventBus=n,this._scheduler=r,this._current=null,this._init()}it.$inject=["canvas","elementRegistry","eventBus","scheduler"];it.prototype._init=function(){var e=this;this._eventBus.on("selection.changed",function(t){var n=t.newSelection,r=n.length?n.length===1?n[0]:n:null;r?e.open(r,!0):e.close()}),this._eventBus.on("elements.changed",function(t){var n=t.elements,r=e._current;if(r){var i=r.target,o=q(i)?i:[i],a=o.filter(function(c){return n.includes(c)});if(a.length){e.close();var s=o.filter(function(c){return e._elementRegistry.get(c.id)});s.length&&e._updateAndOpen(s.length>1?s:s[0])}}}),this._eventBus.on("canvas.viewbox.changed",function(){e._updatePosition()}),this._eventBus.on("element.marker.update",function(t){if(e.isOpen()){var n=t.element,r=e._current,i=q(r.target)?r.target:[r.target];i.includes(n)&&e._updateVisibility()}}),this._container=this._createContainer()};it.prototype._createContainer=function(){var e=ue('<div class="djs-context-pad-parent"></div>');return this._canvas.getContainer().appendChild(e),e};it.prototype.registerProvider=function(e,t){t||(t=e,e=pC),this._eventBus.on("contextPad.getProviders",e,function(n){n.providers.push(t)})};it.prototype.getEntries=function(e){var t=this._getProviders(),n=q(e)?"getMultiElementContextPadEntries":"getContextPadEntries",r={};return E(t,function(i){if(Le(i[n])){var o=i[n](e);Le(o)?r=o(r):E(o,function(a,s){r[s]=a})}}),r};it.prototype.trigger=function(e,t,n){var r=this,i,o,a=t.delegateTarget||t.target;if(!a)return t.preventDefault();if(i=nt(a,"data-action"),o=t.originalEvent||t,e==="mouseover"){this._timeout=setTimeout(function(){r._mouseout=r.triggerEntry(i,"hover",o,n)},lC);return}else if(e==="mouseout"){clearTimeout(this._timeout),this._mouseout&&(this._mouseout(),this._mouseout=null);return}return this.triggerEntry(i,e,o,n)};it.prototype.triggerEntry=function(e,t,n,r){if(this.isShown()){var i=this._current.target,o=this._current.entries,a=o[e];if(a){var s=a.action;if(this._eventBus.fire("contextPad.trigger",{entry:a,event:n})!==!1){if(Le(s)){if(t==="click")return s(n,i,r)}else if(s[t])return s[t](n,i,r);n.preventDefault()}}}};it.prototype.open=function(e,t){if(!(!t&&this.isOpen(e))){var n=this._eventBus.fire("contextPad.open.allowed",{target:e});n!==!1&&(this.close(),this._updateAndOpen(e))}};it.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"contextPad.getProviders",providers:[]});return this._eventBus.fire(e),e.providers};it.prototype._updateAndOpen=function(e){var t=this.getEntries(e),n=this._createHtml(e),r;E(t,function(i,o){var a=i.group||"default",s=ue(i.html||'<div class="entry" draggable="true"></div>'),c;nt(s,"data-action",o),c=_e("[data-group="+Rr(a)+"]",n),c||(c=ue('<div class="group"></div>'),nt(c,"data-group",a),n.appendChild(c)),c.appendChild(s),i.className&&fC(s,i.className),i.title&&nt(s,"title",i.title),i.imageUrl&&(r=ue("<img>"),nt(r,"src",i.imageUrl),r.style.width="100%",r.style.height="100%",s.appendChild(r))}),Ne(n).add("open"),this._current={entries:t,html:n,target:e},this._updatePosition(),this._updateVisibility(),this._eventBus.fire("contextPad.open",{current:this._current})};it.prototype._createHtml=function(e){var t=this,n=ue('<div class="djs-context-pad"></div>');return bt.bind(n,au,"click",function(r){t.trigger("click",r)}),bt.bind(n,au,"dragstart",function(r){t.trigger("dragstart",r)}),bt.bind(n,au,"mouseover",function(r){t.trigger("mouseover",r)}),bt.bind(n,au,"mouseout",function(r){t.trigger("mouseout",r)}),se.bind(n,"mousedown",function(r){r.stopPropagation()}),this._container.appendChild(n),this._eventBus.fire("contextPad.create",{target:e,pad:n}),n};it.prototype.getPad=function(e){console.warn(new Error("ContextPad#getPad is deprecated and will be removed in future library versions, cf. https://github.com/bpmn-io/diagram-js/pull/888"));let t;return this.isOpen()&&mC(this._current.target,e)?t=this._current.html:t=this._createHtml(e),{html:t}};it.prototype.close=function(){this.isOpen()&&(clearTimeout(this._timeout),this._container.innerHTML="",this._eventBus.fire("contextPad.close",{current:this._current}),this._current=null)};it.prototype.isOpen=function(e){var t=this._current;if(!t)return!1;if(!e)return!0;var n=t.target;return q(e)!==q(n)?!1:q(e)?e.length===n.length&&ln(e,function(r){return n.includes(r)}):n===e};it.prototype.isShown=function(){return this.isOpen()&&Ne(this._current.html).has("open")};it.prototype.show=function(){this.isOpen()&&(Ne(this._current.html).add("open"),this._updatePosition(),this._eventBus.fire("contextPad.show",{current:this._current}))};it.prototype.hide=function(){this.isOpen()&&(Ne(this._current.html).remove("open"),this._eventBus.fire("contextPad.hide",{current:this._current}))};it.prototype._getPosition=function(e){if(!q(e)&&de(e)){var t=this._canvas.viewbox(),n=dC(e),r=n.x*t.scale-t.x*t.scale,i=n.y*t.scale-t.y*t.scale;return{left:r+lv*this._canvas.zoom(),top:i}}var o=this._canvas.getContainer(),a=o.getBoundingClientRect(),s=this._getTargetBounds(e);return{left:s.right-a.left+lv*this._canvas.zoom(),top:s.top-a.top}};it.prototype._updatePosition=function(){let e=()=>{if(this.isOpen()){var t=this._current.html,n=this._getPosition(this._current.target);"x"in n&&"y"in n?(t.style.left=n.x+"px",t.style.top=n.y+"px"):["top","right","bottom","left"].forEach(function(r){r in n&&(t.style[r]=n[r]+"px")})}};this._scheduler.schedule(e,"ContextPad#_updatePosition")};it.prototype._updateVisibility=function(){let e=()=>{if(this.isOpen()){var t=this,n=this._current.target,r=q(n)?n:[n],i=r.some(function(o){return t._canvas.hasMarker(o,uC)});i?t.hide():t.show()}};this._scheduler.schedule(e,"ContextPad#_updateVisibility")};it.prototype._getTargetBounds=function(e){var t=this,n=q(e)?e:[e],r=n.map(function(i){return t._canvas.getGraphics(i)});return r.reduce(function(i,o){let a=o.getBoundingClientRect();return i.top=Math.min(i.top,a.top),i.right=Math.max(i.right,a.right),i.bottom=Math.max(i.bottom,a.bottom),i.left=Math.min(i.left,a.left),i.x=i.left,i.y=i.top,i.width=i.right-i.left,i.height=i.bottom-i.top,i},{top:1/0,right:-1/0,bottom:-1/0,left:1/0})};function fC(e,t){var n=Ne(e);t=q(t)?t:t.split(/\s+/g),t.forEach(function(r){n.add(r)})}function dC(e){return e.waypoints[e.waypoints.length-1]}function mC(e,t){return e=q(e)?e:[e],t=q(t)?t:[t],e.length===t.length&&ln(e,function(n){return t.includes(n)})}var su={__depends__:[ei,pv,Qr],contextPad:["type",it]};var mu,Ye,vv,hC,ii,fv,gv,yv,uf,uu,$a,_v,df,pf,lf,vC,lu={},fu=[],gC=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,hu=Array.isArray;function Dr(e,t){for(var n in t)e[n]=t[n];return e}function mf(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function vu(e,t,n){var r,i,o,a={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?mu.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return pu(e,a,r,i,null)}function pu(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i==null?++vv:i,__i:-1,__u:0};return i==null&&Ye.vnode!=null&&Ye.vnode(o),o}function gu(e){return e.children}function za(e,t){this.props=e,this.context=t}function Co(e,t){if(t==null)return e.__?Co(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Co(e):null}function yC(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],i=[],o=Dr({},t);o.__v=t.__v+1,Ye.vnode&&Ye.vnode(o),hf(e.__P,o,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n==null?Co(t):n,!!(32&t.__u),i),o.__v=t.__v,o.__.__k[o.__i]=o,wv(r,o,i),t.__e=t.__=null,o.__e!=n&&bv(o)}}function bv(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),bv(e)}function dv(e){(!e.__d&&(e.__d=!0)&&ii.push(e)&&!du.__r++||fv!=Ye.debounceRendering)&&((fv=Ye.debounceRendering)||gv)(du)}function du(){try{for(var e,t=1;ii.length;)ii.length>t&&ii.sort(yv),e=ii.shift(),t=ii.length,yC(e)}finally{ii.length=du.__r=0}}function xv(e,t,n,r,i,o,a,s,c,u,p){var l,f,d,m,g,v,w,S=r&&r.__k||fu,x=t.length;for(c=_C(n,t,S,c,x),l=0;l<x;l++)(d=n.__k[l])!=null&&(f=d.__i!=-1&&S[d.__i]||lu,d.__i=l,v=hf(e,d,f,i,o,a,s,c,u,p),m=d.__e,d.ref&&f.ref!=d.ref&&(f.ref&&vf(f.ref,null,d),p.push(d.ref,d.__c||m,d)),g==null&&m!=null&&(g=m),(w=!!(4&d.__u))||f.__k===d.__k?(c=Ev(d,c,e,w),w&&f.__e&&(f.__e=null)):typeof d.type=="function"&&v!==void 0?c=v:m&&(c=m.nextSibling),d.__u&=-7);return n.__e=g,c}function _C(e,t,n,r,i){var o,a,s,c,u,p=n.length,l=p,f=0;for(e.__k=new Array(i),o=0;o<i;o++)(a=t[o])!=null&&typeof a!="boolean"&&typeof a!="function"?(typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?a=e.__k[o]=pu(null,a,null,null,null):hu(a)?a=e.__k[o]=pu(gu,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?a=e.__k[o]=pu(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[o]=a,c=o+f,a.__=e,a.__b=e.__b+1,s=null,(u=a.__i=bC(a,n,c,l))!=-1&&(l--,(s=n[u])&&(s.__u|=2)),s==null||s.__v==null?(u==-1&&(i>p?f--:i<p&&f++),typeof a.type!="function"&&(a.__u|=4)):u!=c&&(u==c-1?f--:u==c+1?f++:(u>c?f--:f++,a.__u|=4))):e.__k[o]=null;if(l)for(o=0;o<p;o++)(s=n[o])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=Co(s)),Cv(s,s));return r}function Ev(e,t,n,r){var i,o;if(typeof e.type=="function"){for(i=e.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=e,t=Ev(i[o],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=Co(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function bC(e,t,n,r){var i,o,a,s=e.key,c=e.type,u=t[n],p=u!=null&&(2&u.__u)==0;if(u===null&&s==null||p&&s==u.key&&c==u.type)return n;if(r>(p?1:0)){for(i=n-1,o=n+1;i>=0||o<t.length;)if((u=t[a=i>=0?i--:o++])!=null&&(2&u.__u)==0&&s==u.key&&c==u.type)return a}return-1}function mv(e,t,n){t[0]=="-"?e.setProperty(t,n==null?"":n):e[t]=n==null?"":typeof n!="number"||gC.test(t)?n:n+"px"}function cu(e,t,n,r,i){var o,a;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||mv(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||mv(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(_v,"$1")),a=t.toLowerCase(),t=a in e||t=="onFocusOut"||t=="onFocusIn"?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n[$a]=r[$a]:(n[$a]=df,e.addEventListener(t,o?lf:pf,o)):e.removeEventListener(t,o?lf:pf,o);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n==null?"":n;break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function hv(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[uu]==null)t[uu]=df++;else if(t[uu]<n[$a])return;return n(Ye.event?Ye.event(t):t)}}}function hf(e,t,n,r,i,o,a,s,c,u){var p,l,f,d,m,g,v,w,S,x,b,R,A,O,T,I=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),o=[s=t.__e=n.__e]),(p=Ye.__b)&&p(t);e:if(typeof I=="function")try{if(w=t.props,S=I.prototype&&I.prototype.render,x=(p=I.contextType)&&r[p.__c],b=p?x?x.props.value:p.__:r,n.__c?v=(l=t.__c=n.__c).__=l.__E:(S?t.__c=l=new I(w,b):(t.__c=l=new za(w,b),l.constructor=I,l.render=EC),x&&x.sub(l),l.state||(l.state={}),l.__n=r,f=l.__d=!0,l.__h=[],l._sb=[]),S&&l.__s==null&&(l.__s=l.state),S&&I.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Dr({},l.__s)),Dr(l.__s,I.getDerivedStateFromProps(w,l.__s))),d=l.props,m=l.state,l.__v=t,f)S&&I.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),S&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(S&&I.getDerivedStateFromProps==null&&w!==d&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(w,b),t.__v==n.__v||!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(w,l.__s,b)===!1){t.__v!=n.__v&&(l.props=w,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(L){L&&(L.__=t)}),fu.push.apply(l.__h,l._sb),l._sb=[],l.__h.length&&a.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(w,l.__s,b),S&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(d,m,g)})}if(l.context=b,l.props=w,l.__P=e,l.__e=!1,R=Ye.__r,A=0,S)l.state=l.__s,l.__d=!1,R&&R(t),p=l.render(l.props,l.state,l.context),fu.push.apply(l.__h,l._sb),l._sb=[];else do l.__d=!1,R&&R(t),p=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++A<25);l.state=l.__s,l.getChildContext!=null&&(r=Dr(Dr({},r),l.getChildContext())),S&&!f&&l.getSnapshotBeforeUpdate!=null&&(g=l.getSnapshotBeforeUpdate(d,m)),O=p!=null&&p.type===gu&&p.key==null?Sv(p.props.children):p,s=xv(e,hu(O)?O:[O],t,n,r,i,o,a,s,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&a.push(l),v&&(l.__E=l.__=null)}catch(L){if(t.__v=null,c||o!=null)if(L.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,t.__e=s}else{for(T=o.length;T--;)mf(o[T]);ff(t)}else t.__e=n.__e,t.__k=n.__k,L.then||ff(t);Ye.__e(L,t,n)}else o==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=xC(n.__e,t,n,r,i,o,a,c,u);return(p=Ye.diffed)&&p(t),128&t.__u?void 0:s}function ff(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(ff))}function wv(e,t,n){for(var r=0;r<n.length;r++)vf(n[r],n[++r],n[++r]);Ye.__c&&Ye.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){Ye.__e(o,i.__v)}})}function Sv(e){return typeof e!="object"||e==null||e.__b>0?e:hu(e)?e.map(Sv):e.constructor!==void 0?null:Dr({},e)}function xC(e,t,n,r,i,o,a,s,c){var u,p,l,f,d,m,g,v=n.props||lu,w=t.props,S=t.type;if(S=="svg"?i="http://www.w3.org/2000/svg":S=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(u=0;u<o.length;u++)if((d=o[u])&&"setAttribute"in d==!!S&&(S?d.localName==S:d.nodeType==3)){e=d,o[u]=null;break}}if(e==null){if(S==null)return document.createTextNode(w);e=document.createElementNS(i,S,w.is&&w),s&&(Ye.__m&&Ye.__m(t,o),s=!1),o=null}if(S==null)v===w||s&&e.data==w||(e.data=w);else{if(o=S=="textarea"&&w.defaultValue!=null?null:o&&mu.call(e.childNodes),!s&&o!=null)for(v={},u=0;u<e.attributes.length;u++)v[(d=e.attributes[u]).name]=d.value;for(u in v)d=v[u],u=="dangerouslySetInnerHTML"?l=d:u=="children"||u in w||u=="value"&&"defaultValue"in w||u=="checked"&&"defaultChecked"in w||cu(e,u,null,d,i);for(u in w)d=w[u],u=="children"?f=d:u=="dangerouslySetInnerHTML"?p=d:u=="value"?m=d:u=="checked"?g=d:s&&typeof d!="function"||v[u]===d||cu(e,u,d,v[u],i);if(p)s||l&&(p.__html==l.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(l&&(e.innerHTML=""),xv(t.type=="template"?e.content:e,hu(f)?f:[f],t,n,r,S=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,a,o?o[0]:n.__k&&Co(n,0),s,c),o!=null)for(u=o.length;u--;)mf(o[u]);s&&S!="textarea"||(u="value",S=="progress"&&m==null?e.removeAttribute("value"):m!=null&&(m!==e[u]||S=="progress"&&!m||S=="option"&&m!=v[u])&&cu(e,u,m,v[u],i),u="checked",g!=null&&g!=e[u]&&cu(e,u,g,v[u],i))}return e}function vf(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(i){Ye.__e(i,n)}}function Cv(e,t,n){var r,i;if(Ye.unmount&&Ye.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||vf(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){Ye.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Cv(r[i],t,n||typeof e.type!="function");n||mf(e.__e),e.__c=e.__=e.__e=void 0}function EC(e,t,n){return this.constructor(e,n)}function yu(e,t,n){var r,i,o,a;t==document&&(t=document.documentElement),Ye.__&&Ye.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],a=[],hf(t,e=(!r&&n||t).__k=vu(gu,null,[e]),i||lu,lu,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?mu.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,a),wv(o,e,a)}mu=fu.slice,Ye={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},vv=0,hC=function(e){return e!=null&&e.constructor===void 0},za.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Dr({},this.state),typeof e=="function"&&(e=e(Dr({},n),this.props)),e&&Dr(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),dv(this))},za.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),dv(this))},za.prototype.render=gu,ii=[],gv=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,yv=function(e,t){return e.__v.__b-t.__v.__b},du.__r=0,uf=Math.random().toString(8),uu="__d"+uf,$a="__a"+uf,_v=/(PointerCapture)$|Capture$/i,df=0,pf=hv(!1),lf=hv(!0),vC=0;var Pv=function(e,t,n,r){var i;t[0]=0;for(var o=1;o<t.length;o++){var a=t[o++],s=t[o]?(t[0]|=a?1:2,n[t[o++]]):t[++o];a===3?r[0]=s:a===4?r[1]=Object.assign(r[1]||{},s):a===5?(r[1]=r[1]||{})[t[++o]]=s:a===6?r[1][t[++o]]+=s+"":a?(i=e.apply(s,Pv(e,s,n,["",null])),r.push(i),s[0]?t[0]|=2:(t[o-2]=0,t[o]=i)):r.push(s)}return r},Rv=new Map;function Av(e){var t=Rv.get(this);return t||(t=new Map,Rv.set(this,t)),(t=Pv(this,t.get(e)||(t.set(e,t=(function(n){for(var r,i,o=1,a="",s="",c=[0],u=function(f){o===1&&(f||(a=a.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?c.push(0,f,a):o===3&&(f||a)?(c.push(3,f,a),o=2):o===2&&a==="..."&&f?c.push(4,f,0):o===2&&a&&!f?c.push(5,0,!0,a):o>=5&&((a||!f&&o===5)&&(c.push(o,0,a,i),o=6),f&&(c.push(o,f,0,i),o=6)),a=""},p=0;p<n.length;p++){p&&(o===1&&u(),u(p));for(var l=0;l<n[p].length;l++)r=n[p][l],o===1?r==="<"?(u(),c=[c],o=3):a+=r:o===4?a==="--"&&r===">"?(o=1,a=""):a=r+a[0]:s?r===s?s="":a+=r:r==='"'||r==="'"?s=r:r===">"?(u(),o=1):o&&(r==="="?(o=5,i=a,a=""):r==="/"&&(o<5||n[p][l+1]===">")?(u(),o===3&&(c=c[0]),o=c,(c=c[0]).push(2,0,o),o=0):r===" "||r===" "||r===` method
/plugin/bpmnioeditor/vendor/bpmnio-js/
Dbpmn-modeler.production.min.js28 ….width,my:(t.height-20)/t.height}}),{fill:zr(t,s),stroke:Fr(t,c)})},SequentialMarker:function(e,t,…