UNPKG

65.9 kBJavaScriptView Raw
1!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).BpmnModdle=t()}(this,(function(){"use strict";var e=Object.prototype.toString,t=Object.prototype.hasOwnProperty;function n(t){return"[object Array]"===e.call(t)}function i(t){return"[object String]"===e.call(t)}function r(e,n){return t.call(e,n)}function a(e,t){var n;return t=p(t),o(e,(function(e,i){if(t(e,i))return n=e,!1})),n}function s(e,t){var n=[];return o(e,(function(e,i){t(e,i)&&n.push(e)})),n}function o(e,t){var i;if(void 0!==e){var a=n(e)?l:m;for(var s in e)if(r(e,s)&&!1===t(i=e[s],a(s)))return i}}function p(t){return n=t,"[object Function]"===(i=e.call(n))||"[object AsyncFunction]"===i||"[object GeneratorFunction]"===i||"[object AsyncGeneratorFunction]"===i||"[object Proxy]"===i?t:function(e){return e===t};var n,i}function m(e){return e}function l(e){return Number(e)}function u(e,t){return e.bind(t)}function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function y(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return c.apply(void 0,[e].concat(n))}function f(){}function d(e,t){this.model=e,this.properties=t}f.prototype.get=function(e){return this.$model.properties.get(this,e)},f.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},d.prototype.createType=function(e){var t=this.model,n=this.properties,i=Object.create(f.prototype);o(e.properties,(function(e){e.isMany||void 0===e.default||(i[e.name]=e.default)})),n.defineModel(i,t),n.defineDescriptor(i,e);var r=e.ns.name;function a(e){n.define(this,"$type",{value:r,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),o(e,u((function(e,t){this.set(t,e)}),this))}return a.prototype=i,a.hasType=i.$instanceOf=this.model.hasType,n.defineModel(a,t),n.defineDescriptor(a,e),a};var h={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},g={String:function(e){return e},Boolean:function(e){return"true"===e},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e)}};function A(e,t){var n=g[e];return n?n(t):t}function E(e){return!!h[e]}function b(e){return!!g[e]}function v(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected <prefix:localName> or <localName>, got "+e);n=r[1],i=r[0]}return{name:e=(i?i+":":"")+n,prefix:i,localName:n}}function R(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function C(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,o(e,u(this.registerPackage,this))}function x(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function w(e){this.model=e}function M(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function N(e){this.properties=new w(this),this.factory=new d(this,this.properties),this.registry=new C(e,this.properties),this.typeCache={}}R.prototype.build=function(){return e=this,t=["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"],n={},i=Object(e),o(t,(function(t){t in i&&(n[t]=e[t])})),n;var e,t,n,i},R.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,!1!==n);var i=this.properties;void 0!==t?i.splice(t,0,e):i.push(e)},R.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,a=this.propertiesByName,s=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 o=r.indexOf(e);if(-1===o)throw new Error("property <"+i.name+"> not found in property list");r.splice(o,1),this.addProperty(t,n?void 0:o,s),a[i.name]=a[i.localName]=t},R.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),a=v(r[0],i),s=v(r[1],a.prefix).name,o=this.propertiesByName[s];if(!o)throw new Error("refined property <"+s+"> not found");this.replaceProperty(o,e,n),delete e.redefines},R.prototype.addNamedProperty=function(e,t){var n=e.ns,i=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),i[n.name]=i[n.localName]=e},R.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},R.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},R.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},R.prototype.assertNotDefined=function(e,t){var n=e.name,i=this.propertiesByName[n];if(i)throw new Error("property <"+n+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},R.prototype.hasProperty=function(e){return this.propertiesByName[e]},R.prototype.addTrait=function(e,t){var n=this.allTypesByName,i=this.allTypes,r=e.name;r in n||(o(e.properties,u((function(n){n=y({},n,{name:n.ns.localName,inherited:t}),Object.defineProperty(n,"definedBy",{value:e});var i=n.replaces,r=n.redefines;i||r?this.redefineProperty(n,i||r,i):(n.isBody&&this.setBodyProperty(n),n.isId&&this.setIdProperty(n),this.addProperty(n))}),this)),i.push(e),n[r]=e)},C.prototype.getPackage=function(e){return this.packageMap[e]},C.prototype.getPackages=function(){return this.packages},C.prototype.registerPackage=function(e){e=y({},e);var t=this.packageMap;x(t,e,"prefix"),x(t,e,"uri"),o(e.types,u((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},C.prototype.registerType=function(e,t){var n=v((e=y({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:y(e.meta||{})})).name,t.prefix),i=n.name,r={};o(e.properties,u((function(e){var t=v(e.name,n.prefix),i=t.name;E(e.type)||(e.type=v(e.type,t.prefix).name),y(e,{ns:t,name:i}),r[i]=e}),this)),y(e,{ns:n,name:i,propertiesByName:r}),o(e.extends,u((function(e){var t=this.typeMap[e];t.traits=t.traits||[],t.traits.push(i)}),this)),this.definePackage(e,t),this.typeMap[i]=e},C.prototype.mapTypes=function(e,t,n){var i=E(e.name)?{name:e.name}:this.typeMap[e.name],r=this;function a(e){return s(e,!0)}function s(n,i){var a=v(n,E(n)?"":e.prefix);r.mapTypes(a,t,i)}if(!i)throw new Error("unknown type <"+e.name+">");o(i.superClass,n?a:s),t(i,!n),o(i.traits,a)},C.prototype.getEffectiveDescriptor=function(e){var t=v(e),n=new R(t);this.mapTypes(t,(function(e,t){n.addTrait(e,t)}));var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},C.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},w.prototype.set=function(e,t,n){var i=this.model.getPropertyDescriptor(e,t),r=i&&i.name;void 0===n?i?delete e[r]:delete e.$attrs[t]:i?r in e?e[r]=n:M(e,i,n):e.$attrs[t]=n},w.prototype.get=function(e,t){var n=this.model.getPropertyDescriptor(e,t);if(!n)return e.$attrs[t];var i=n.name;return!e[i]&&n.isMany&&M(e,n,[]),e[i]},w.prototype.define=function(e,t,n){Object.defineProperty(e,t,n)},w.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},w.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},N.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},N.prototype.getType=function(e){var t=this.typeCache,n=i(e)?e:e.ns.name,r=t[n];return r||(e=this.registry.getEffectiveDescriptor(n),r=t[n]=this.factory.createType(e)),r},N.prototype.createAny=function(t,n,i){var r=v(t),a={$type:t,$instanceOf:function(e){return e===this.$type}},s={name:t,isGeneric:!0,ns:{prefix:r.prefix,localName:r.localName,uri:n}};return this.properties.defineDescriptor(a,s),this.properties.defineModel(a,this),this.properties.define(a,"$parent",{enumerable:!1,writable:!0}),this.properties.define(a,"$instanceOf",{enumerable:!1,writable:!0}),o(i,(function(t,n){var i;i=t,"[object Object]"===e.call(i)&&void 0!==t.value?a[t.name]=t.value:a[n]=t})),a},N.prototype.getPackage=function(e){return this.registry.getPackage(e)},N.prototype.getPackages=function(){return this.registry.getPackages()},N.prototype.getElementDescriptor=function(e){return e.$descriptor},N.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},N.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},N.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var S=String.fromCharCode,P=Object.prototype.hasOwnProperty,B=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,D={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function I(e,t,n,i){return i?P.call(D,i)?D[i]:"&"+i+";":S(t||parseInt(n,16))}function O(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(B,I):e}Object.keys(D).forEach((function(e){D[e.toUpperCase()]=D[e]}));var T="xsi:type",k="non-whitespace outside of root node";function F(e){return new Error(e)}function L(e){return"missing namespace for prefix <"+e+">"}function V(e){return{get:e,enumerable:!0}}function j(e){var t,n={};for(t in e)n[t]=e[t];return n}function $(e){return e+"$uri"}function z(){return{line:0,column:0}}function G(e){throw e}function U(e){if(!this)return new U(e);var t,n,i,r,a,s,o,p,m,l=e&&e.proxy,u=G,c=z,y=!1,f=!1,d=null,h=!1;function g(e){e instanceof Error||(e=F(e)),d=e,u(e,c)}function A(e){a&&(e instanceof Error||(e=F(e)),a(e,c))}this.on=function(e,m){if("function"!=typeof m)throw F("required args <name, cb>");switch(e){case"openTag":n=m;break;case"text":t=m;break;case"closeTag":i=m;break;case"error":u=m;break;case"warn":a=m;break;case"cdata":r=m;break;case"attention":p=m;break;case"question":o=m;break;case"comment":s=m;break;default:throw F("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!=typeof e)throw F("required args <nsMap={}>");var t,n={};for(t in e)n[t]=e[t];return n["http://www.w3.org/2001/XMLSchema-instance"]="xsi",f=!0,m=n,this},this.parse=function(e){if("string"!=typeof e)throw F("required args <xml=string>");return d=null,function(e){var a,u,d,E,b,v,R,C,x,w,M,N=f?[]:null,S=f?function(e){var t,n,i={};for(t in e)i[n=e[t]]=n,i[$(n)]=t;return i}(m):null,P=[],B=0,D=!1,I=!1,F=0,z=0,G="",U=0;function q(){if(null!==M)return M;var e,t,n,i,r,a,s,o,p,l,u,c=f&&S.xmlns,d=f&&y?[]:null,h=U,g=G,E=g.length,b={},v={};e:for(;h<E;h++)if(p=!1,!(32===(l=g.charCodeAt(h))||l<14&&l>8)){for((l<65||l>122||l>90&&l<97)&&95!==l&&58!==l&&(A("illegal first char attribute name"),p=!0),u=h+1;u<E;u++)if(!((l=g.charCodeAt(u))>96&&l<123||l>64&&l<91||l>47&&l<59||46===l||45===l||95===l)){if(32===l||l<14&&l>8){A("missing attribute value"),h=u;continue e}if(61===l)break;A("illegal attribute name char"),p=!0}if("xmlns:xmlns"===(o=g.substring(h,u))&&(A("illegal declaration of xmlns"),p=!0),34===(l=g.charCodeAt(u+1)))-1===(u=g.indexOf('"',h=u+2))&&-1!==(u=g.indexOf("'",h))&&(A("attribute value quote missmatch"),p=!0);else if(39===l)-1===(u=g.indexOf("'",h=u+2))&&-1!==(u=g.indexOf('"',h))&&(A("attribute value quote missmatch"),p=!0);else for(A("missing attribute value quotes"),p=!0,u+=1;u<E&&!(32===(l=g.charCodeAt(u+1))||l<14&&l>8);u++);for(-1===u&&(A("missing closing quotes"),u=E,p=!0),p||(a=g.substring(h,u)),h=u;u+1<E&&!(32===(l=g.charCodeAt(u+1))||l<14&&l>8);u++)h===u&&(A("illegal character after attribute end"),p=!0);if(h=u+1,!p)if(o in v)A("attribute <"+o+"> already defined");else if(v[o]=!0,f)if(y){if(null!==(r="xmlns"===o?"xmlns":120===o.charCodeAt(0)&&"xmlns:"===o.substr(0,6)?o.substr(6):null)){if(e=O(a),t=$(r),!(s=m[e])){if("xmlns"===r||t in S&&S[t]!==e)do{s="ns"+B++}while(void 0!==S[s]);else s=r;m[e]=s}S[r]!==s&&(i||(S=j(S),i=!0),S[r]=s,"xmlns"===r&&(S[$(s)]=e,c=s),S[t]=e),b[o]=a;continue}d.push(o,a)}else-1!==(l=o.indexOf(":"))?(n=S[o.substring(0,l)])?((o=c===n?o.substr(l+1):n+o.substr(l))===T&&(-1!==(l=a.indexOf(":"))?(n=a.substring(0,l),a=(n=S[n]||n)+a.substring(l)):a=c+":"+a),b[o]=a):A(L(o.substring(0,l))):b[o]=a;else b[o]=a}if(y)for(h=0,E=d.length;h<E;h++){if(o=d[h++],a=d[h],-1!==(l=o.indexOf(":"))){if(!(n=S[o.substring(0,l)])){A(L(o.substring(0,l)));continue}(o=c===n?o.substr(l+1):n+o.substr(l))===T&&(-1!==(l=a.indexOf(":"))?(n=a.substring(0,l),a=(n=S[n]||n)+a.substring(l)):a=c+":"+a)}b[o]=a}return M=b}function K(){for(var t,n,i=/(\r\n|\r|\n)/g,r=0,a=0,s=0,o=z;F>=s&&(t=i.exec(e))&&!((o=t[0].length+t.index)>F);)r+=1,s=o;return-1==F?(a=o,n=e.substring(z)):0===z?n=e.substring(z,F):(a=F-s,n=-1==z?e.substring(F):e.substring(F,z+1)),{data:n,line:r,column:a}}c=K,l&&(w=Object.create({},{name:V((function(){return C})),originalName:V((function(){return x})),attrs:V(q),ns:V((function(){return S}))}));for(;-1!==z;){if(-1===(F=60===e.charCodeAt(z)?z:e.indexOf("<",z)))return P.length?g("unexpected end of file"):0===z?g("missing start tag"):void(z<e.length&&e.substring(z).trim()&&A(k));if(z!==F)if(P.length){if(t&&(t(e.substring(z,F),O,c),h))return}else if(e.substring(z,F).trim()&&(A(k),h))return;if(33===(b=e.charCodeAt(F+1))){if(91===(E=e.charCodeAt(F+2))&&"CDATA["===e.substr(F+3,6)){if(-1===(z=e.indexOf("]]>",F)))return g("unclosed cdata");if(r&&(r(e.substring(F+9,z),c),h))return;z+=3;continue}if(45===E&&45===e.charCodeAt(F+3)){if(-1===(z=e.indexOf("--\x3e",F)))return g("unclosed comment");if(s&&(s(e.substring(F+4,z),O,c),h))return;z+=3;continue}}if(63!==b){for(u=F+1;;u++){if(v=e.charCodeAt(u),isNaN(v))return z=-1,g("unclosed tag");if(34===v)u=-1!==(E=e.indexOf('"',u+1))?E:u;else if(39===v)u=-1!==(E=e.indexOf("'",u+1))?E:u;else if(62===v){z=u;break}}if(33!==b){if(M={},47===b){if(D=!1,I=!0,!P.length)return g("missing open tag");if(u=C=P.pop(),E=F+2+u.length,e.substring(F+2,E)!==u)return g("closing tag mismatch");for(;E<z;E++)if(!(32===(b=e.charCodeAt(E))||b>8&&b<14))return g("close tag")}else{if(47===e.charCodeAt(z-1)?(u=C=e.substring(F+1,z-1),D=!0,I=!0):(u=C=e.substring(F+1,z),D=!0,I=!1),!(b>96&&b<123||b>64&&b<91||95===b||58===b))return g("illegal first char nodeName");for(E=1,d=u.length;E<d;E++)if(!((b=u.charCodeAt(E))>96&&b<123||b>64&&b<91||b>47&&b<59||45===b||95===b||46==b)){if(32===b||b<14&&b>8){C=u.substring(0,E),M=null;break}return g("invalid nodeName")}I||P.push(C)}if(f){if(a=S,D&&(I||N.push(a),null===M&&(y=-1!==u.indexOf("xmlns",E))&&(U=E,G=u,q(),y=!1)),x=C,-1!==(b=C.indexOf(":"))){if(!(R=S[C.substring(0,b)]))return g("missing namespace on <"+x+">");C=C.substr(b+1)}else R=S.xmlns;R&&(C=R+":"+C)}if(D&&(U=E,G=u,n&&(l?n(w,O,I,c):n(C,q,O,I,c),h)))return;if(I){if(i&&(i(l?w:C,O,D,c),h))return;f&&(S=D?a:N.pop())}z+=1}else{if(p&&(p(e.substring(F,z+1),O,c),h))return;z+=1}}else{if(-1===(z=e.indexOf("?>",F)))return g("unclosed question");if(o&&(o(e.substring(F,z+2),c),h))return;z+=2}}}(e),c=z,h=!1,d},this.stop=function(){h=!0}}function q(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var K={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},_="xsi:type";function H(e){return e.xml&&e.xml.serialize}function X(e){return H(e)===_}function W(e,t){return q(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function Q(e){return new Error(e)}function J(e){return e.$descriptor}function Y(e){y(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw Q("expected element");var t,n=this.elementsById,i=J(e).idProperty;if(i&&(t=e.get(i.name))){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(t))throw new Error("illegal ID <"+t+">");if(n[t])throw Q("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function Z(){}function ee(){}function te(){}function ne(e,t){this.property=e,this.context=t}function ie(e,t){this.element=t,this.propertyDesc=e}function re(){}function ae(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function se(e,t,n){ae.call(this,e,t,n)}function oe(e,t,n){this.model=e,this.context=n}function pe(e){e instanceof N&&(e={model:e}),y(this,{lax:!1},e)}Z.prototype.handleEnd=function(){},Z.prototype.handleText=function(){},Z.prototype.handleNode=function(){},ee.prototype=Object.create(Z.prototype),ee.prototype.handleNode=function(){return this},te.prototype=Object.create(Z.prototype),te.prototype.handleText=function(e){this.body=(this.body||"")+e},ne.prototype=Object.create(te.prototype),ne.prototype.handleNode=function(e){if(this.element)throw Q("expected no sub nodes");return this.element=this.createReference(e),this},ne.prototype.handleEnd=function(){this.element.id=this.body},ne.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},ie.prototype=Object.create(te.prototype),ie.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=A(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},re.prototype=Object.create(te.prototype),re.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},ae.prototype=Object.create(re.prototype),ae.prototype.addReference=function(e){this.context.addReference(e)},ae.prototype.handleText=function(e){if(!J(this.element).bodyProperty)throw Q("unexpected body text <"+e+">");te.prototype.handleText.call(this,e)},ae.prototype.handleEnd=function(){var e=this.body,t=this.element,n=J(t).bodyProperty;n&&void 0!==e&&(e=A(n.type,e),t.set(n.name,e))},ae.prototype.createElement=function(e){var t,n=e.attributes,i=this.type,r=J(i),a=this.context,s=new i({}),p=this.model;return o(n,(function(e,n){var i=r.propertiesByName[n];i&&i.isReference?i.isMany?o(e.split(" "),(function(e){a.addReference({element:s,property:i.ns.name,id:e})})):a.addReference({element:s,property:i.ns.name,id:e}):(i?e=A(i.type,e):"xmlns"!==n&&(t=v(n,r.ns.prefix),p.getPackage(t.prefix)&&a.addWarning({message:"unknown attribute <"+n+">",element:s,property:n,value:e})),s.set(n,e))})),s},ae.prototype.getPropertyForNode=function(e){var t,n,i=v(e.name),r=this.type,s=this.model,o=J(r),p=i.name,m=o.propertiesByName[p];if(m&&!m.isAttr)return X(m)&&(t=e.attributes[_])?(t=function(e,t){var n=v(e);return function(e,t){var n=e.name,i=e.localName,r=t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}(n,t.getPackage(n.prefix))}(t,s),y({},m,{effectiveType:J(n=s.getType(t)).name})):m;var l=s.getPackage(i.prefix);if(l){if(t=W(i,l),n=s.getType(t),m=a(o.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})))return y({},m,{effectiveType:J(n).name})}else if(m=a(o.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})))return m;throw Q("unrecognized element <"+i.name+">")},ae.prototype.toString=function(){return"ElementDescriptor["+J(this.type).name+"]"},ae.prototype.valueHandler=function(e,t){return new ie(e,t)},ae.prototype.referenceHandler=function(e){return new ne(e,this.context)},ae.prototype.handler=function(e){return"Element"===e?new oe(this.model,e,this.context):new ae(this.model,e,this.context)},ae.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,b(n=t.effectiveType||t.type))return this.valueHandler(t,i);var a=(r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e)).element;return void 0!==a&&(t.isMany?i.get(t.name).push(a):i.set(t.name,a),t.isReference?(y(a,{element:i}),this.context.addReference(a)):a.$parent=i),r},se.prototype=Object.create(ae.prototype),se.prototype.createElement=function(e){var t=e.name,n=v(t),i=this.model,r=this.type,a=i.getPackage(n.prefix),s=a&&W(n,a)||t;if(!r.hasType(s))throw Q("unexpected element <"+e.originalName+">");return ae.prototype.createElement.call(this,e)},oe.prototype=Object.create(re.prototype),oe.prototype.createElement=function(e){var t=e.name,n=v(t).prefix,i=e.ns[n+"$uri"],r=e.attributes;return this.model.createAny(t,i,r)},oe.prototype.handleChild=function(e){var t=new oe(this.model,"Element",this.context).handleNode(e),n=this.element,i=t.element;return void 0!==i&&((n.$children=n.$children||[]).push(i),i.$parent=n),t},oe.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},pe.prototype.fromXML=function(e,t,n){var i=t.rootHandler;t instanceof ae?(i=t,t={}):"string"==typeof t?(i=this.handler(t),t={}):"string"==typeof i&&(i=this.handler(i));var r=this.model,a=this.lax,s=new Y(y({},t,{rootHandler:i})),o=new U({proxy:!0}),p=function(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}();function m(e,t,n){var i=t(),r=i.line,a=i.column,o=i.data;"<"===o.charAt(0)&&-1!==o.indexOf(" ")&&(o=o.slice(0,o.indexOf(" "))+">");var p="unparsable content "+(o?o+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+a+"\n\tnested error: "+e.message;if(n)return s.addWarning({message:p,error:e}),!0;throw Q(p)}function l(e,t){return m(e,t,!0)}i.context=s,p.push(i);var u=/^<\?xml /i,c=/ encoding="([^"]+)"/i,f=/^utf-8$/i;function d(e,t){try{p.peek().handleText(e)}catch(e){l(e,t)}}var h=r.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),{"http://www.w3.org/XML/1998/namespace":"xml"});return o.ns(h).on("openTag",(function(e,t,n,i){var r=e.attrs||{},s=Object.keys(r).reduce((function(e,n){var i=t(r[n]);return e[n]=i,e}),{});!function(e,t){var n=p.peek();try{p.push(n.handleNode(e))}catch(e){m(e,t,a)&&p.push(new ee)}}({name:e.name,originalName:e.originalName,attributes:s,ns:e.ns},i)})).on("question",(function(e){if(u.test(e)){var t=c.exec(e),n=t&&t[1];n&&!f.test(n)&&s.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}})).on("closeTag",(function(){p.pop().handleEnd()})).on("cdata",d).on("text",(function(e,t,n){!function(e,t){e.trim()&&d(e,t)}(t(e),n)})).on("error",m).on("warn",l),new Promise((function(t,n){var r;try{o.parse(e),function(){var e,t,n=s.elementsById,i=s.references;for(e=0;t=i[e];e++){var r=t.element,a=n[t.id],o=J(r).propertiesByName[t.property];if(a||s.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),o.isMany){var p=r.get(o.name),m=p.indexOf(t);-1===m&&(m=p.length),a?p[m]=a:p.splice(m,1)}else r.set(o.name,a)}}()}catch(e){r=e}var a=i.element;r||a||(r=Q("failed to parse document as <"+i.type.$descriptor.name+">"));var p=s.warnings,m=s.references,l=s.elementsById;return r?(r.warnings=p,n(r)):t({rootElement:a,elementsById:l,references:m,warnings:p})}))},pe.prototype.handler=function(e){return new se(this.model,e)};var me=/<|>|'|"|&|\n\r|\n/g,le=/<|>|&/g;function ue(e){var t={},n={},i={},r=[],a=[];this.byUri=function(t){return n[t]||e&&e.byUri(t)},this.add=function(e,t){n[e.uri]=e,t?r.push(e):a.push(e),this.mapPrefix(e.prefix,e.uri)},this.uriByPrefix=function(e){return t[e||"xmlns"]},this.mapPrefix=function(e,n){t[e||"xmlns"]=n},this.getNSKey=function(e){return void 0!==e.prefix?e.uri+"|"+e.prefix:e.uri},this.logUsed=function(t){var n=t.uri,r=this.getNSKey(t);i[r]=this.byUri(n),e&&e.logUsed(t)},this.getUsed=function(e){var t=this;return[].concat(r,a).filter((function(e){var n=t.getNSKey(e);return i[n]}))}}function ce(e,t){return q(t)?(n=e).charAt(0).toLowerCase()+n.slice(1):e;var n}function ye(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function fe(e){return i(e)?e:(e.prefix?e.prefix+":":"")+e.localName}var de={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},he={"<":"lt",">":"gt","&":"amp"};function ge(e,t,n){return(e=i(e)?e:""+e).replace(t,(function(e){return"&"+n[e]+";"}))}function Ae(e){this.tagName=e}function Ee(){}function be(e){this.tagName=e}function ve(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function Re(e,t){ve.call(this,e,t)}function Ce(){this.value="",this.write=function(e){this.value+=e}}function xe(e,t){var n=[""];this.append=function(t){return e.write(t),this},this.appendNewLine=function(){return t&&e.write("\n"),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function we(e){return e=y({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new Ce,r=new xe(i,e.format);if(e.preamble&&r.append('<?xml version="1.0" encoding="UTF-8"?>\n'),(new ve).build(t).serializeTo(r),!n)return i.value}}}function Me(e,t){N.call(this,e,t)}Ae.prototype.build=function(e){return this.element=e,this},Ae.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()},Ee.prototype.serializeValue=Ee.prototype.serializeTo=function(e){e.append(this.escape?ge(this.value,le,he):this.value)},Ee.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(le)&&(this.escape=!0),this},ye(be,Ee),be.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()},ve.prototype.build=function(e){this.element=e;var t,n,i=e.$descriptor,a=this.propertyDescriptor,o=i.isGeneric;return t=o?this.parseGeneric(e):this.parseNsAttributes(e),this.ns=a?this.nsPropertyTagName(a):this.nsTagName(i),this.tagName=this.addTagName(this.ns),o||(n=function(e){return s(e.$descriptor.properties,(function(t){var n=t.name;if(t.isVirtual)return!1;if(!r(e,n))return!1;var i=e[n];return i!==t.default&&null!==i&&(!t.isMany||i.length)}))}(e),this.parseAttributes(s(n,(function(e){return e.isAttr}))),this.parseContainments(function(e){return s(e,(function(e){return!e.isAttr}))}(n))),this.parseGenericAttributes(e,t),this},ve.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?y({localName:t.ns.localName},e):y({localName:ce(t.ns.localName,t.$pkg)},e)}(this.logNamespaceUsed(e.ns),e)},ve.prototype.nsPropertyTagName=function(e){return function(e,t){return y({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},ve.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},ve.prototype.nsAttributeName=function(e){var t;if(t=i(e)?v(e):e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:y({localName:t.localName},n)},ve.prototype.parseGeneric=function(e){var t=this,n=this.body,i=[];return o(e,(function(r,a){"$body"===a?n.push((new Ee).build({type:"String"},r)):"$children"===a?o(r,(function(e){n.push(new ve(t).build(e))})):0!==a.indexOf("$")&&t.parseNsAttribute(e,a,r)&&i.push({name:a,value:r})})),i},ve.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,a=v(t);if("xmlns"===a.prefix&&(i={prefix:a.localName,uri:n}),a.prefix||"xmlns"!==a.localName||(i={uri:n}),!i)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(i,!0,!0);else{var s=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(s)}},ve.prototype.parseNsAttributes=function(e,t){var n=this,i=e.$attrs,r=[];return o(i,(function(t,i){var a=n.parseNsAttribute(e,i,t);a&&r.push(a)})),r},ve.prototype.parseGenericAttributes=function(e,t){var n=this;o(t,(function(t){if(t.name!==_)try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){console.warn("missing namespace information for ",t.name,"=",t.value,"on",e,n)}}))},ve.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;o(e,(function(e){var r=i.get(e.name),a=e.isReference;if(e.isMany||(r=[r]),e.isBody)n.push((new Ee).build(e,r[0]));else if(b(e.type))o(r,(function(i){n.push(new be(t.addTagName(t.nsPropertyTagName(e))).build(e,i))}));else if(a)o(r,(function(i){n.push(new Ae(t.addTagName(t.nsPropertyTagName(e))).build(i))}));else{var s=X(e),p=function(e){return"property"===H(e)}(e);o(r,(function(i){var r;r=s?new Re(t,e):p?new ve(t,e):new ve(t),n.push(r.build(i))}))}}))},ve.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new ue(t):n=t),n},ve.prototype.logNamespace=function(e,t,n){var i=this.getNamespaces(n),r=e.uri,a=e.prefix;return i.byUri(r)&&!n||i.add(e,t),i.mapPrefix(a,r),e},ve.prototype.logNamespaceUsed=function(e,t){var n,i,r,a=this.element.$model,s=this.getNamespaces(t),o=e.prefix,p=e.uri;if(!o&&!p)return{localName:e.localName};if(r=K[o]||a&&(a.getPackage(o)||{}).uri,!(p=p||r||s.uriByPrefix(o)))throw new Error("no namespace uri given for prefix <"+o+">");if(!(e=s.byUri(p))){for(n=o,i=1;s.uriByPrefix(n);)n=o+"_"+i++;e=this.logNamespace({prefix:n,uri:p},r===p)}return o&&s.mapPrefix(o,p),e},ve.prototype.parseAttributes=function(e){var t=this,n=this.element;o(e,(function(e){var i=n.get(e.name);if(e.isReference)if(e.isMany){var r=[];o(i,(function(e){r.push(e.id)})),i=r.join(" ")}else i=i.id;t.addAttribute(t.nsAttributeName(e),i)}))},ve.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),fe(e)},ve.prototype.addAttribute=function(e,t){var r=this.attrs;i(t)&&(t=ge(t,me,de));var a=function(e,t){t=p(t);var i=n(e)?-1:void 0;return o(e,(function(e,n){if(t(e,n))return i=n,!1})),i}(r,(function(t){return t.name.localName===e.localName&&t.name.uri===e.uri&&t.name.prefix===e.prefix})),s={name:e,value:t};-1!==a?r.splice(a,1,s):r.push(s)},ve.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=function(e){return e.getUsed().filter((function(e){return"xml"!==e.prefix})).map((function(e){return{name:"xmlns"+(e.prefix?":"+e.prefix:""),value:e.uri}}))}(n).concat(t)),o(t,(function(t){e.append(" ").append(fe(t.name)).append('="').append(t.value).append('"')}))},ve.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==Ee;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),o(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()},ye(Re,ve),Re.prototype.parseNsAttributes=function(e){var t=ve.prototype.parseNsAttributes.call(this,e),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var r=e.$model.getPackage(i.uri),a=r.xml&&r.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(_),(i.prefix?i.prefix+":":"")+a+n.ns.localName),t},Re.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},Me.prototype=Object.create(N.prototype),Me.prototype.fromXML=function(e,t,n){i(t)||(n=t,t="bpmn:Definitions");var r=new pe(y({model:this,lax:!0},n)),a=r.handler(t);return r.fromXML(e,a)},Me.prototype.toXML=function(e,t){var n=new we(t);return new Promise((function(t,i){try{return t({xml:n.toXML(e)})}catch(e){return i(e)}}))};var Ne={bpmn:{name:"BPMN20",uri:"http://www.omg.org/spec/BPMN/20100524/MODEL",prefix:"bpmn",associations:[],types:[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isAttr:!0,isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["Collaboration","FlowElementsContainer"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isMany:!0,isVirtual:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity","InteractionNode"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],enumerations:[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],xml:{tagAlias:"lowerCase",typePrefix:"t"}},bpmndi:{name:"BPMNDI",uri:"http://www.omg.org/spec/BPMN/20100524/DI",prefix:"bpmndi",types:[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],enumerations:[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],associations:[]},dc:{name:"DC",uri:"http://www.omg.org/spec/DD/20100524/DC",prefix:"dc",types:[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],associations:[]},di:{name:"DI",uri:"http://www.omg.org/spec/DD/20100524/DI",prefix:"di",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],associations:[],xml:{tagAlias:"lowerCase"}},bioc:{name:"bpmn.io colors for BPMN",uri:"http://bpmn.io/schema/bpmn/biocolor/1.0",prefix:"bioc",types:[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]},color:{name:"BPMN in Color",uri:"http://www.omg.org/spec/BPMN/non-normative/color/1.0",prefix:"color",types:[{name:"ColoredLabel",extends:["bpmndi:BPMNLabel"],properties:[{name:"color",isAttr:!0,type:"String"}]},{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"background-color",isAttr:!0,type:"String"},{name:"border-color",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"border-color",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]}};return function(e,t){return new Me(y({},Ne,e),t)}}));