Home
last modified time | relevance | path

Searched refs:WO (Results 1 – 8 of 8) sorted by relevance

/plugin/diagramsnet/lib/img/lib/ibm/vpc/
DFloatingIP.svg1 …EOvpK1Vf3qcQ30jW157oZqq+K0zVVy1skXbkAfI7meV3wm1Kfsew/I6Kya+1vLHIr2R+tfzqyi+WO Rb5ve4faMGpRrT3nQ4ej…
/plugin/html2pdf/html2pdf/html2ps/data/
DLineBreak.txt2815 0E27;SA # THAI CHARACTER WO WAEN
2886 0EA7;SA # LAO LETTER WO
3714 12CE;AL # ETHIOPIC SYLLABLE WO
3983 13EC;AL # CHEROKEE LETTER WO
4009 1412;AL # CANADIAN SYLLABICS WO
4010 1413;AL # CANADIAN SYLLABICS WEST-CREE WO
4429 15B6;AL # CANADIAN SYLLABICS BLACKFOOT WO
4456 15D1;AL # CANADIAN SYLLABICS CARRIER WO
9632 3092;ID # HIRAGANA LETTER WO
9726 30F2;ID # KATAKANA LETTER WO
[all …]
/plugin/bpmnio/vendor/dmn-js/dist/
H A Ddmn-viewer.production.min.js13 `),this},this.appendIndent=function(){return e&&n.write(t.join(" ")),this},this.indent=function(){return t.push(""),this},this.unindent=function(){return t.pop(),this}}function fp(n){n=D({format:!1,preamble:!0},n||{});function e(t,i){var r=i||new h1,s=new d1(r,n.format);n.preamble&&s.append(Jb);var o=new ae,a=t.$model;if(o.getNamespaces().mapDefaultPrefixes(p1(a)),o.build(t).serializeTo(s),!i)return r.value}return{toXML:e}}function p1(n){let e=n.config&&n.config.nsMap||{},t={};for(let i in Pc)t[i]=Pc[i];for(let i in e){let r=e[i];t[r]=i}for(let i of n.getPackages())t[i.prefix]=i.uri;return t}function xa(n,e){nt.call(this,n,e)}xa.prototype=Object.create(nt.prototype);xa.prototype.fromXML=function(n,e,t){tt(e)||(t=e,e="dmn:Definitions");var i=new ya(D({model:this,lax:!0},t)),r=i.handler(e);return i.fromXML(n,r)};xa.prototype.toXML=function(n,e){var t=new fp(e);return new Promise(function(i,r){try{var s=t.toXML(n);return i({xml:s})}catch(o){return r(o)}})};var m1="DC",g1="dc",y1="http://www.omg.org/spec/DMN/20180521/DC/",v1=[{name:"Dimension",properties:[{name:"width",isAttr:!0,type:"Real"},{name:"height",isAttr:!0,type:"Real"}]},{name:"Bounds",properties:[{name:"height",isAttr:!0,type:"Real"},{name:"width",isAttr:!0,type:"Real"},{name:"x",isAttr:!0,type:"Real"},{name:"y",isAttr:!0,type:"Real"}]},{name:"Point",properties:[{name:"x",isAttr:!0,type:"Real"},{name:"y",isAttr:!0,type:"Real"}]},{name:"Color",properties:[{name:"red",type:"UML_Standard_Profile.mdzip:eee_1045467100323_917313_65"},{name:"green",type:"UML_Standard_Profile.mdzip:eee_1045467100323_917313_65"},{name:"blue",type:"UML_Standard_Profile.mdzip:eee_1045467100323_917313_65"}]}],x1=[],b1=[{name:"AlignmentKind",literalValues:[{name:"start"},{name:"center"},{name:"end"}]}],w1={name:m1,prefix:g1,uri:y1,types:v1,associations:x1,enumerations:b1},O1="DI",k1="di",C1="http://www.omg.org/spec/DMN/20180521/DI/",S1=[{name:"DiagramElement",isAbstract:!0,properties:[{name:"extension",type:"Extension"},{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"style",isReference:!0,type:"Style",xml:{serialize:"property"}},{name:"sharedStyle",isReference:!0,isVirtual:!0,type:"Style"}]},{name:"Diagram",superClass:["DiagramElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"}]},{name:"Shape",isAbstract:!0,properties:[{name:"bounds",type:"dc:Bounds"}],superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,properties:[{name:"waypoint",type:"dc:Point",isMany:!0,xml:{serialize:"property"}}],superClass:["DiagramElement"]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],E1=[],A1=[],_1={tagAlias:"lowerCase"},T1={name:O1,prefix:k1,uri:C1,types:S1,associations:E1,enumerations:A1,xml:_1},M1="DMN",R1="dmn",P1="https://www.omg.org/spec/DMN/20191111/MODEL/",D1=[{name:"AuthorityRequirement",superClass:["DMNElement"],properties:[{name:"requiredAuthority",type:"DMNElementReference",xml:{serialize:"property"}},{name:"requiredDecision",type:"DMNElementReference",xml:{serialize:"property"}},{name:"requiredInput",type:"DMNElementReference",xml:{serialize:"property"}}]},{name:"ItemDefinition",superClass:["NamedElement"],properties:[{name:"typeRef",type:"String"},{name:"allowedValues",type:"UnaryTests",xml:{serialize:"property"}},{name:"typeLanguage",type:"String",isAttr:!0},{name:"itemComponent",type:"ItemDefinition",isMany:!0,xml:{serialize:"property"}},{name:"functionItem",type:"FunctionItem"},{name:"isCollection",isAttr:!0,type:"Boolean"}]},{name:"Definitions",superClass:["NamedElement"],properties:[{name:"import",type:"Import",isMany:!0},{name:"itemDefinition",type:"ItemDefinition",isMany:!0},{name:"drgElement",type:"DRGElement",isMany:!0},{name:"artifact",type:"Artifact",isMany:!0},{name:"elementCollection",type:"ElementCollection",isMany:!0},{name:"businessContextElement",type:"BusinessContextElement",isMany:!0},{name:"namespace",type:"String",isAttr:!0},{name:"expressionLanguage",type:"String",isAttr:!0},{name:"typeLanguage",type:"String",isAttr:!0},{name:"exporter",isAttr:!0,type:"String"},{name:"exporterVersion",isAttr:!0,type:"String"},{name:"dmnDI",type:"dmndi:DMNDI"}]},{name:"KnowledgeSource",superClass:["DRGElement"],properties:[{name:"authorityRequirement",type:"AuthorityRequirement",isMany:!0},{name:"type",type:"String"},{name:"owner",type:"DMNElementReference",xml:{serialize:"property"}},{name:"locationURI",type:"String",isAttr:!0}]},{name:"DecisionRule",superClass:["DMNElement"],properties:[{name:"inputEntry",type:"UnaryTests",isMany:!0,xml:{serialize:"property"}},{name:"outputEntry",type:"LiteralExpression",isMany:!0,xml:{serialize:"property"}},{name:"annotationEntry",type:"RuleAnnotation",isMany:!0,xml:{serialize:"property"}}]},{name:"Expression",isAbstract:!0,superClass:["DMNElement"],properties:[{name:"typeRef",isAttr:!0,type:"String"}]},{name:"InformationItem",superClass:["NamedElement"],properties:[{name:"typeRef",isAttr:!0,type:"String"}]},{name:"Decision",superClass:["DRGElement"],properties:[{name:"question",type:"String",xml:{serialize:"property"}},{name:"allowedAnswers",type:"String",xml:{serialize:"property"}},{name:"variable",type:"InformationItem",xml:{serialize:"property"}},{name:"informationRequirement",type:"InformationRequirement",isMany:!0},{name:"knowledgeRequirement",type:"KnowledgeRequirement",isMany:!0},{name:"authorityRequirement",type:"AuthorityRequirement",isMany:!0},{name:"supportedObjective",isMany:!0,type:"DMNElementReference",xml:{serialize:"property"}},{name:"impactedPerformanceIndicator",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"decisionMaker",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"decisionOwner",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"usingProcess",isMany:!0,type:"DMNElementReference",xml:{serialize:"property"}},{name:"usingTask",isMany:!0,type:"DMNElementReference",xml:{serialize:"property"}},{name:"decisionLogic",type:"Expression"}]},{name:"Invocation",superClass:["Expression"],properties:[{name:"calledFunction",type:"Expression"},{name:"binding",type:"Binding",isMany:!0}]},{name:"OrganisationalUnit",superClass:["BusinessContextElement"],properties:[{name:"decisionMade",type:"Decision",isReference:!0,isMany:!0},{name:"decisionOwned",type:"Decision",isReference:!0,isMany:!0}]},{name:"Import",superClass:["NamedElement"],properties:[{name:"importType",type:"String",isAttr:!0},{name:"locationURI",type:"String",isAttr:!0},{name:"namespace",type:"String",isAttr:!0}]},{name:"InformationRequirement",superClass:["DMNElement"],properties:[{name:"requiredDecision",type:"DMNElementReference",xml:{serialize:"property"}},{name:"requiredInput",type:"DMNElementReference",xml:{serialize:"property"}}]},{name:"ElementCollection",superClass:["NamedElement"],properties:[{name:"drgElement",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}}]},{name:"DRGElement",isAbstract:!0,superClass:["NamedElement"],properties:[]},{name:"InputData",superClass:["DRGElement"],properties:[{name:"variable",type:"InformationItem",xml:{serialize:"property"}}]},{name:"DMNElement",isAbstract:!0,properties:[{name:"description",type:"String"},{name:"extensionElements",type:"ExtensionElements"},{name:"id",type:"String",isAttr:!0,isId:!0},{name:"extensionAttribute",type:"ExtensionAttribute",isMany:!0},{name:"label",isAttr:!0,type:"String"}]},{name:"InputClause",superClass:["DMNElement"],properties:[{name:"inputExpression",type:"LiteralExpression",xml:{serialize:"property"}},{name:"inputValues",type:"UnaryTests",xml:{serialize:"property"}}]},{name:"DecisionTable",superClass:["Expression"],properties:[{name:"input",type:"InputClause",isMany:!0,xml:{serialize:"property"}},{name:"output",type:"OutputClause",isMany:!0,xml:{serialize:"property"}},{name:"annotation",type:"RuleAnnotationClause",isMany:!0,xml:{serialize:"property"}},{name:"rule",type:"DecisionRule",isMany:!0,xml:{serialize:"property"}},{name:"hitPolicy",type:"HitPolicy",isAttr:!0,default:"UNIQUE"},{name:"aggregation",type:"BuiltinAggregator",isAttr:!0},{name:"preferredOrientation",type:"DecisionTableOrientation",isAttr:!0},{name:"outputLabel",isAttr:!0,type:"String"}]},{name:"LiteralExpression",superClass:["Expression"],properties:[{name:"expressionLanguage",type:"String",isAttr:!0},{name:"text",type:"String"},{name:"importedValues",type:"ImportedValues"}]},{name:"Binding",properties:[{name:"parameter",type:"InformationItem",xml:{serialize:"property"}},{name:"bindingFormula",type:"Expression"}]},{name:"KnowledgeRequirement",superClass:["DMNElement"],properties:[{name:"requiredKnowledge",type:"DMNElementReference",xml:{serialize:"property"}}]},{name:"BusinessKnowledgeModel",superClass:["Invocable"],properties:[{name:"encapsulatedLogic",type:"FunctionDefinition",xml:{serialize:"property"}},{name:"knowledgeRequirement",type:"KnowledgeRequirement",isMany:!0},{name:"authorityRequirement",type:"AuthorityRequirement",isMany:!0}]},{name:"BusinessContextElement",isAbstract:!0,superClass:["NamedElement"],properties:[{name:"URI",type:"String",isAttr:!0}]},{name:"PerformanceIndicator",superClass:["BusinessContextElement"],properties:[{name:"impactingDecision",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}}]},{name:"FunctionDefinition",superClass:["Expression"],properties:[{name:"formalParameter",type:"InformationItem",isMany:!0,xml:{serialize:"property"}},{name:"body",type:"Expression"},{name:"kind",type:"FunctionKind",isAttr:!0}]},{name:"Context",superClass:["Expression"],properties:[{name:"contextEntry",type:"ContextEntry",isMany:!0}]},{name:"ContextEntry",superClass:["DMNElement"],properties:[{name:"variable",type:"InformationItem",xml:{serialize:"property"}},{name:"value",type:"Expression"}]},{name:"List",superClass:["Expression"],properties:[{name:"elements",isMany:!0,type:"Expression"}]},{name:"Relation",superClass:["Expression"],properties:[{name:"column",type:"InformationItem",isMany:!0,xml:{serialize:"property"}},{name:"row",type:"List",isMany:!0,xml:{serialize:"property"}}]},{name:"OutputClause",superClass:["DMNElement"],properties:[{name:"outputValues",type:"UnaryTests",xml:{serialize:"property"}},{name:"defaultOutputEntry",type:"LiteralExpression",xml:{serialize:"property"}},{name:"name",isAttr:!0,type:"String"},{name:"typeRef",isAttr:!0,type:"String"}]},{name:"UnaryTests",superClass:["Expression"],properties:[{name:"text",type:"String"},{name:"expressionLanguage",type:"String",isAttr:!0}]},{name:"NamedElement",isAbstract:!0,superClass:["DMNElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ImportedValues",superClass:["Import"],properties:[{name:"importedElement",type:"String"},{name:"expressionLanguage",type:"String",isAttr:!0}]},{name:"DecisionService",superClass:["Invocable"],properties:[{name:"outputDecision",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"encapsulatedDecision",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"inputDecision",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}},{name:"inputData",type:"DMNElementReference",isMany:!0,xml:{serialize:"property"}}]},{name:"ExtensionElements",properties:[{name:"values",type:"Element",isMany:!0}]},{name:"ExtensionAttribute",properties:[{name:"value",type:"Element"},{name:"valueRef",type:"Element",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Element",isAbstract:!0,properties:[{name:"extensionAttribute",type:"ExtensionAttribute",isAttr:!0,isReference:!0},{name:"elements",type:"ExtensionElements",isAttr:!0,isReference:!0}]},{name:"Artifact",isAbstract:!0,superClass:["DMNElement"],properties:[]},{name:"Association",superClass:["Artifact"],properties:[{name:"sourceRef",type:"DMNElementReference",xml:{serialize:"property"}},{name:"targetRef",type:"DMNElementReference",xml:{serialize:"property"}},{name:"associationDirection",type:"AssociationDirection",isAttr:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",isAttr:!0,type:"String",default:"text/plain"}]},{name:"RuleAnnotationClause",properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"RuleAnnotation",properties:[{name:"text",type:"String"}]},{name:"Invocable",isAbstract:!0,superClass:["DRGElement"],properties:[{name:"variable",type:"InformationItem",xml:{serialize:"property"}}]},{name:"Group",superClass:["Artifact"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"FunctionItem",superClass:["DMNElement"],properties:[{name:"parameters",isMany:!0,type:"InformationItem",xml:{serialize:"property"}},{name:"outputTypeRef",isAttr:!0,type:"String"}]},{name:"DMNElementReference",properties:[{isAttr:!0,name:"href",type:"String"}]}],B1=[{name:"HitPolicy",literalValues:[{name:"UNIQUE"},{name:"FIRST"},{name:"PRIORITY"},{name:"ANY"},{name:"COLLECT"},{name:"RULE ORDER"},{name:"OUTPUT ORDER"}]},{name:"BuiltinAggregator",literalValues:[{name:"SUM"},{name:"COUNT"},{name:"MIN"},{name:"MAX"}]},{name:"DecisionTableOrientation",literalValues:[{name:"Rule-as-Row"},{name:"Rule-as-Column"},{name:"CrossTable"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"FunctionKind",literalValues:[{name:"FEEL"},{name:"Java"},{name:"PMML"}]}],I1=[],$1={tagAlias:"lowerCase"},L1={name:M1,prefix:R1,uri:P1,types:D1,enumerations:B1,associations:I1,xml:$1},N1="DMNDI",q1="dmndi",F1="https://www.omg.org/spec/DMN/20191111/DMNDI/",j1=[{name:"DMNDI",properties:[{name:"diagrams",type:"DMNDiagram",isMany:!0},{name:"styles",type:"DMNStyle",isMany:!0}]},{name:"DMNStyle",superClass:["di:Style"],properties:[{name:"fillColor",type:"dc:Color",isAttr:!0},{name:"strokeColor",type:"dc:Color",isAttr:!0},{name:"fontColor",type:"dc:Color",isAttr:!0},{name:"fontSize",isAttr:!0,type:"Real"},{name:"fontFamily",isAttr:!0,type:"String"},{name:"fontItalic",isAttr:!0,type:"Boolean"},{name:"fontBold",isAttr:!0,type:"Boolean"},{name:"fontUnderline",isAttr:!0,type:"Boolean"},{name:"fontStrikeThrough",isAttr:!0,type:"Boolean"},{name:"labelHorizontalAlignment",type:"dc:AlignmentKind",isAttr:!0},{name:"labelVerticalAlignment",type:"dc:AlignmentKind",isAttr:!0}]},{name:"DMNDiagram",superClass:["di:Diagram"],properties:[{name:"dmnElementRef",type:"dmn:DMNElement",isAttr:!0,isReference:!0},{name:"size",type:"Size"},{name:"localStyle",type:"DMNStyle",isVirtual:!0},{name:"sharedStyle",type:"DMNStyle",isVirtual:!0,isReference:!0,redefines:"di:DiagramElement#sharedStyle"},{name:"diagramElements",type:"DMNDiagramElement",isMany:!0}]},{name:"DMNDiagramElement",isAbstract:!0,superClass:["di:DiagramElement"],properties:[{name:"dmnElementRef",type:"dmn:DMNElement",isAttr:!0,isReference:!0},{name:"sharedStyle",type:"DMNStyle",isVirtual:!0,isReference:!0,redefines:"di:DiagramElement#sharedStyle"},{name:"localStyle",type:"DMNStyle",isVirtual:!0},{name:"label",type:"DMNLabel"}]},{name:"DMNLabel",superClass:["di:Shape"],properties:[{name:"text",type:"Text"}]},{name:"DMNShape",superClass:["di:Shape","DMNDiagramElement"],properties:[{name:"isListedInputData",isAttr:!0,type:"Boolean"},{name:"decisionServiceDividerLine",type:"DMNDecisionServiceDividerLine"},{name:"isCollapsed",isAttr:!0,type:"Boolean"}]},{name:"DMNEdge",superClass:["di:Edge","DMNDiagramElement"],properties:[{name:"sourceElement",type:"DMNDiagramElement",isAttr:!0,isReference:!0},{name:"targetElement",type:"DMNDiagramElement",isAttr:!0,isReference:!0}]},{name:"DMNDecisionServiceDividerLine",superClass:["di:Edge"]},{name:"Text",properties:[{name:"text",isBody:!0,type:"String"}]},{name:"Size",superClass:["dc:Dimension"]}],V1=[],Q1=[],z1={name:N1,prefix:q1,uri:F1,types:j1,associations:V1,enumerations:Q1},W1="bpmn.io DI for DMN",H1="http://bpmn.io/schema/dmn/biodi/2.0",X1="biodi",U1={tagAlias:"lowerCase"},Y1=[{name:"DecisionTable",isAbstract:!0,extends:["dmn:DecisionTable"],properties:[{name:"annotationsWidth",isAttr:!0,type:"Integer"}]},{name:"OutputClause",isAbstract:!0,extends:["dmn:OutputClause"],properties:[{name:"width",isAttr:!0,type:"Integer"}]},{name:"InputClause",isAbstract:!0,extends:["dmn:InputClause"],properties:[{name:"width",isAttr:!0,type:"Integer"}]}],K1={name:W1,uri:H1,prefix:X1,xml:U1,types:Y1},G1={dc:w1,di:T1,dmn:L1,dmndi:z1,biodi:K1};function hp(n,e){var t=D({},G1,n);return new xa(t,e)}var Oe={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:[0,"",""]};Oe.td=Oe.th=[3,"<table><tbody><tr>","</tr></tbody></table>"];Oe.option=Oe.optgroup=[1,'<select multiple="multiple">',"</select>"];Oe.thead=Oe.tbody=Oe.colgroup=Oe.caption=Oe.tfoot=[1,"<table>","</table>"];Oe.polyline=Oe.ellipse=Oe.polygon=Oe.circle=Oe.text=Oe.line=Oe.path=Oe.rect=Oe.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function le(n,e=globalThis.document){var c;if(typeof n!="string")throw new TypeError("String expected");let t=/^<!--(.*?)-->$/s.exec(n);if(t)return e.createComment(t[1]);let i=(c=/<([\w:]+)/.exec(n))==null?void 0:c[1];if(!i)return e.createTextNode(n);if(n=n.trim(),i==="body"){let u=e.createElement("html");u.innerHTML=n;let{lastChild:f}=u;return f.remove(),f}let[r,s,o]=Object.hasOwn(Oe,i)?Oe[i]:Oe._default,a=e.createElement("div");for(a.innerHTML=s+n+o;r--;)a=a.lastChild;if(a.firstChild===a.lastChild){let{firstChild:u}=a;return u.remove(),u}let l=e.createDocumentFragment();return l.append(...a.childNodes),l}function J1(n,e){return e.forEach(function(t){t&&typeof t!="string"&&!Array.isArray(t)&&Object.keys(t).forEach(function(i){if(i!=="default"&&!(i in n)){var r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:function(){return t[i]}})}})}),Object.freeze(n)}function yi(n,...e){let t=n.style;return B(e,function(i){i&&B(i,function(r,s){t[s]=r})}),n}function tr(n,e,t){return arguments.length==2?n.getAttribute(e):t===null?n.removeAttribute(e):(n.setAttribute(e,t),n)}var Z1=Object.prototype.toString;function vi(n){return new Hn(n)}function Hn(n){if(!n||!n.nodeType)throw new Error("A DOM element reference is required");this.el=n,this.list=n.classList}Hn.prototype.add=function(n){return this.list.add(n),this};Hn.prototype.remove=function(n){return Z1.call(n)=="[object RegExp]"?this.removeMatching(n):(this.list.remove(n),this)};Hn.prototype.removeMatching=function(n){let e=this.array();for(let t=0;t<e.length;t++)n.test(e[t])&&this.remove(e[t]);return this};Hn.prototype.toggle=function(n,e){return typeof e!="undefined"?e!==this.list.toggle(n,e)&&this.list.toggle(n):this.list.toggle(n),this};Hn.prototype.array=function(){return Array.from(this.list)};Hn.prototype.has=Hn.prototype.contains=function(n){return this.list.contains(n)};function wa(n){for(var e;e=n.firstChild;)n.removeChild(e);return n}function ew(n,e,t){var i=t?n:n.parentNode;return i&&typeof i.closest=="function"&&i.closest(e)||null}function tw(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ba={},dp;function nw(){if(dp)return ba;dp=1;var n,e,t;function i(){n=window.addEventListener?"addEventListener":"attachEvent",e=window.removeEventListener?"removeEventListener":"detachEvent",t=n!=="addEventListener"?"on":""}return ba.bind=function(r,s,o,a){return n||i(),r[n](t+s,o,a||!1),o},ba.unbind=function(r,s,o,a){return e||i(),r[e](t+s,o,a||!1),o},ba}var pp=nw(),iw=tw(pp),Oa=J1({__proto__:null,default:iw},[pp]),mp=["focus","blur"];function rw(n,e,t,i,r){return mp.indexOf(t)!==-1&&(r=!0),Oa.bind(n,t,function(s){var o=s.target||s.srcElement;s.delegateTarget=ew(o,e,!0),s.delegateTarget&&i.call(n,s)},r)}function sw(n,e,t,i){return mp.indexOf(e)!==-1&&(i=!0),Oa.unbind(n,e,t,i)}var On={bind:rw,unbind:sw};function jt(n,e){return e=e||document,e.querySelector(n)}function gp(n,e){return e=e||document,e.querySelectorAll(n)}function $e(n){n.parentNode&&n.parentNode.removeChild(n)}function nr(n){return function(){if(!window.Promise)throw new Error("Promises is not supported in this environment. Please polyfill Promise.");var e=arguments.length;if(e>=1&&Ie(arguments[e-1])){var t=arguments[e-1];console.warn(new Error("Passing callbacks to "+ow(n.name)+" is deprecated and will be removed in a future major release. Please switch to promises: https://bpmn.io/l/moving-to-promises.html"));var i=Array.prototype.slice.call(arguments,0,-1);n.apply(this,i).then(function(r){var s=Object.keys(r)[0];return t(null,r[s])},function(r){return t(r,r.warnings)})}else return n.apply(this,arguments)}}function ow(n){return n.replace("bound ","")}var aw={width:"100%",height:"100%",position:"relative"},Rs=class{constructor(e={}){$(this,"_viewsChanged",()=>{this._emit("views.changed",{views:this._views,activeView:this._activeView})});this._eventBus=new ye,this._viewsChanged=Gi(this._viewsChanged,0),this._views=[],this._viewers={},this.open=nr(this.open.bind(this)),this.importXML=nr(this.importXML.bind(this)),this.saveXML=nr(this.saveXML.bind(this)),this._init(e)}importXML(e,t){var i=this;return t=t||{open:!0},new Promise(function(s,o){var a=i._activeView;i._clear().then(()=>{e=i._emit("import.parse.start",{xml:e})||e;var l;i._moddle.fromXML(e,"dmn:Definitions").then(c=>{var u=c.rootElement,f=c.references,h=c.elementsById;if(l=c.warnings,u=i._emit("import.parse.complete",r({error:null,definitions:u,elementsById:h,references:f,warnings:l}))||u,i._setDefinitions(u),!t.open){i._emit("import.done",{error:null,warnings:l}),s({warnings:l});return}var d=i._getInitialView(i._views,a);if(!d){var p=new Error("no displayable contents");return i._emit("import.done",{error:p,warnings:l}),p.warnings=l,o(p)}i.open(d).then(m=>({warnings:m.warnings})).catch(m=>({error:m,warnings:m.warnings})).then(m=>{var y=[].concat(l,m.warnings);i._emit("import.done",{error:m.error,warnings:y}),m.error?(m.error.warnings=y,o(m.error)):s({warnings:y})})}).catch(c=>(l=c.warnings,c=lw(c,e)||cw(c)||c,i._emit("import.parse.complete",r({error:c,warnings:l})),i._emit("import.done",{error:c,warnings:l}),c.warnings=l,o(c)))}).catch(l=>(i._emit("import.done",{error:l,warnings:[]}),l.warnings=[],o(l)))});function r(s){var o=i._eventBus.createEvent(s);return Object.defineProperty(o,"context",{enumerable:!0,get:function(){return console.warn(new Error("import.parse.complete <context> is deprecated and will be removed in future library versions")),{warnings:s.warnings,references:s.references,elementsById:s.elementsById}}}),o}}getDefinitions(){return this._definitions}getActiveView(){return this._activeView}getActiveViewer(){var e=this.getActiveView();return e&&this._getViewer(e)}getView(e){return this._views.filter(function(t){return t.element===e})[0]}getViews(){return this._views}saveXML(e){var t=this;e=e||{};var i=this._definitions;return new Promise(function(r,s){if(!i){s(new Error("no definitions loaded"));return}i=t._emit("saveXML.start",{definitions:i})||i,t._moddle.toXML(i,e).then(function(o){var a=o.xml;return a=t._emit("saveXML.serialized",{xml:a})||a,{xml:a}}).catch(o=>({error:o})).then(o=>{t._emit("saveXML.done",o),o.error?s(o.error):r({xml:o.xml})})})}on(...e){this._eventBus.on(...e)}off(...e){this._eventBus.off(...e)}once(...e){this._eventBus.once(...e)}attachTo(e){e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),typeof e=="string"&&(e=jt(e)),e.appendChild(this._container),this._emit("attach",{})}detach(){this._emit("detach",{}),$e(this._container)}destroy(){Object.keys(this._viewers).forEach(e=>{var t=this._viewers[e];xp(t,"destroy")}),$e(this._container)}_init(e){this._options=e,this._moddle=this._createModdle(e),this._viewers={},this._views=[];let t=le('<div class="dmn-js-parent"></div>'),i=D({},aw,e);D(t.style,{width:yp(i.width),height:yp(i.height),position:i.position}),this._container=t,e.container&&this.attachTo(e.container)}_clear(){return this._switchView(null)}open(e){return this._switchView(e)}_setDefinitions(e){this._definitions=e,this._updateViews()}_updateViews(){var e=this._definitions;if(!e){this._views=[],this._switchView(null);return}var t=this._getViewProviders(),i=[e,...e.drgElement||[]],r=this._views,s=[];for(var o of i){var a=we(t,function(d){return typeof d.opens=="string"?d.opens===o.$type:d.opens(o)});if(a){var l={element:o,id:o.id,name:o.name,type:a.id};s.push(l)}}var c=this._activeView,u;if(c&&(u=we(s,function(d){return ka(c,d)})||this._getInitialView(s),!u)){this._switchView(null);return}var f=!ka(c,u)||vp(c,u),h=r.length!==s.length||!Es(s,function(d){return we(r,function(p){return ka(p,d)&&!vp(p,d)})});this._activeView=u,this._views=s,(f||h)&&this._viewsChanged()}_getInitialView(e,t){var i;return t&&(i=we(e,function(r){return ka(r,t)})||we(e,function(r){return r.type===t})),i||e[0]}_switchView(e){var t=this;return new Promise(function(i,r){var s=(u,f)=>{t._viewsChanged(),u?r(u):i(f)},o=t.getActiveView(),a,l=e&&t._getViewer(e),c=e&&e.element;if(o&&(a=t._getViewer(o),a!==l&&(xp(a,"clear"),a.detach())),t._activeView=e,l){a!==l&&l.attachTo(t._container),t._emit("import.render.start",{view:e,element:c}),l.open(c).then(u=>{t._emit("import.render.complete",{view:e,error:null,warnings:u.warnings}),s(null,u)}).catch(u=>{t._emit("import.render.complete",{view:e,error:u,warnings:u.warnings}),s(u,null)});return}s()})}_getViewer(e){var t=e.type,i=this._viewers[t];return i||(i=this._viewers[t]=this._createViewer(e.type),this._emit("viewer.created",{type:t,viewer:i})),i}_createViewer(e){var t=we(this._getViewProviders(),function(o){return o.id===e});if(!t)throw new Error("no provider for view type <"+e+">");var i=t.constructor,r=this._options[e]||{},s=this._options.common||{};return new i({...s,...r,additionalModules:[...r.additionalModules||[],{_parent:["value",this],moddle:["value",this._moddle]}]})}_emit(...e){return this._eventBus.fire(...e)}_createModdle(e){return new hp(e.moddleExtensions)}_getViewProviders(){return[]}};function yp(n){return n+(Ce(n)?"px":"")}function lw(n,e){if(n.message!=="failed to parse document as <dmn:Definitions>")return null;var t=e.indexOf('"http://www.omg.org/spec/DMN/20151101/dmn.xsd"')!==-1&&"1.1"||e.indexOf('"http://www.omg.org/spec/DMN/20180521/MODEL/"')!==-1&&"1.2";return t?(n=new Error("unsupported DMN "+t+" file detected; only DMN 1.3 files can be opened"),console.error("Cannot open what looks like a DMN "+t+" diagram. Please refer to https://bpmn.io/l/dmn-compatibility.html to learn how to make the toolkit compatible with older DMN files",n),n):null}function cw(n){var e=/unparsable content <([^>]+)> detected([\s\S]*)$/,t=e.exec(n.message);return t?(n.message="unparsable content <"+t[1]+"> detected; this may indicate an invalid DMN 1.3 diagram file"+t[2],n):null}function ka(n,e){return ht(n)?ht(e)?n.element===e.element||n.id===e.id:!1:!ht(e)}function vp(n,e){return!n||!e||n.name!==e.name}function xp(n,e){Ie(n[e])&&n[e]()}var uw=/^class[ {]/;function fw(n){return uw.test(n.toString())}function qc(n){return Array.isArray(n)}function Nc(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function Ca(...n){n.length===1&&qc(n[0])&&(n=n[0]),n=[...n];let e=n.pop();return e.$inject=n,e}var hw=/constructor\s*[^(]*\(\s*([^)]*)\)/m,dw=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,pw=/\/\*([^*]*)\*\//m;function mw(n){if(typeof n!="function")throw new Error(`Cannot annotate "${n}". Expected a function!`);let e=n.toString().match(fw(n)?hw:dw);if(!e)return[];let t=e[1]||e[2];return t&&t.split(",").map(i=>{let r=i.match(pw);return(r&&r[1]||i).trim()})||[]}function xi(n,e){let t=e||{get:function(x,b){if(i.push(x),b===!1)return null;throw a(`No provider for "${x}"!`)}},i=[],r=this._providers=Object.create(t._providers||null),s=this._instances=Object.create(null),o=s.injector=this,a=function(x){let b=i.join(" -> ");return i.length=0,new Error(b?`${x} (Resolving: ${b})`:x)};function l(x,b){if(!r[x]&&x.includes(".")){let C=x.split("."),k=l(C.shift());for(;C.length;)k=k[C.shift()];return k}if(Nc(s,x))return s[x];if(Nc(r,x)){if(i.indexOf(x)!==-1)throw i.push(x),a("Cannot resolve circular dependency!");return i.push(x),s[x]=r[x][0](r[x][1]),i.pop(),s[x]}return t.get(x,b)}function c(x,b){if(typeof b=="undefined"&&(b={}),typeof x!="function")if(qc(x))x=Ca(x.slice());else throw a(`Cannot invoke "${x}". Expected a function!`);let k=(x.$inject||mw(x)).map(O=>Nc(b,O)?b[O]:l(O));return{fn:x,dependencies:k}}function u(x){let{fn:b,dependencies:C}=c(x),k=Function.prototype.bind.call(b,null,...C);return new k}function f(x,b,C){let{fn:k,dependencies:O}=c(x,C);return k.apply(b,O)}function h(x){return Ca(b=>x.get(b))}function d(x,b){if(b&&b.length){let C=Object.create(null),k=Object.create(null),O=[],v=[],A=[],S,M,_,P;for(let j in r)S=r[j],b.indexOf(j)!==-1&&(S[2]==="private"?(M=O.indexOf(S[3]),M===-1?(_=S[3].createChild([],b),P=h(_),O.push(S[3]),v.push(_),A.push(P),C[j]=[P,j,"private",_]):C[j]=[A[M],j,"private",v[M]]):C[j]=[S[2],S[1]],k[j]=!0),(S[2]==="factory"||S[2]==="type")&&S[1].$scope&&b.forEach(oe=>{S[1].$scope.indexOf(oe)!==-1&&(C[j]=[S[2],S[1]],k[oe]=!0)});b.forEach(j=>{if(!k[j])throw new Error('No provider for "'+j+'". Cannot use provider from the parent!')}),x.unshift(C)}return new xi(x,o)}let p={factory:f,type:u,value:function(x){return x}};function m(x,b){let C=x.__init__||[];return function(){C.forEach(k=>{typeof k=="string"?b.get(k):b.invoke(k)})}}function y(x){let b=x.__exports__;if(b){let C=x.__modules__,k=Object.keys(x).reduce((M,_)=>(_!=="__exports__"&&_!=="__modules__"&&_!=="__init__"&&_!=="__depends__"&&(M[_]=x[_]),M),Object.create(null)),O=(C||[]).concat(k),v=d(O),A=Ca(function(M){return v.get(M)});b.forEach(function(M){r[M]=[A,M,"private",v]});let S=(x.__init__||[]).slice();return S.unshift(function(){v.init()}),x=Object.assign({},x,{__init__:S}),m(x,v)}return Object.keys(x).forEach(function(C){if(C==="__init__"||C==="__depends__")return;let k=x[C];if(k[2]==="private"){r[C]=k;return}let O=k[0],v=k[1];r[C]=[p[O],gw(O,v),O]}),m(x,o)}function g(x,b){return x.indexOf(b)!==-1||(x=(b.__depends__||[]).reduce(g,x),x.indexOf(b)!==-1)?x:x.concat(b)}function w(x){let b=x.reduce(g,[]).map(y),C=!1;return function(){C||(C=!0,b.forEach(k=>k()))}}this.get=l,this.invoke=f,this.instantiate=u,this.createChild=d,this.init=w(n)}function gw(n,e){return n!=="value"&&qc(e)&&(e=Ca(e.slice())),e}function Vt(n,e){e&&(n.super_=e,n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}var yw=1e3;function it(n,e){var t=this;e=e||yw,n.on(["render.shape","render.connection"],e,function(i,r){var s=i.type,o=r.element,a=r.gfx,l=r.attrs;if(t.canRender(o))return s==="render.shape"?t.drawShape(a,o,l):t.drawConnection(a,o,l)}),n.on(["render.getShapePath","render.getConnectionPath"],e,function(i,r){if(t.canRender(r))return i.type==="render.getShapePath"?t.getShapePath(r):t.getConnectionPath(r)})}it.prototype.canRender=function(n){};it.prototype.drawShape=function(n,e){};it.prototype.drawConnection=function(n,e){};it.prototype.getShapePath=function(n){};it.prototype.getConnectionPath=function(n){};function vw(n,e){if(n.ownerDocument!==e.ownerDocument)try{return e.ownerDocument.importNode(n,!0)}catch{}return n}function kp(n,e){return e.appendChild(vw(n,e))}function ve(n,e){return kp(e,n),n}var Vc=2,Cp={"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":Vc,"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":Vc,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function xw(n,e){return Cp[e]?n.style[e]:n.getAttributeNS(null,e)}function Sp(n,e,t){var i=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=Cp[i];r?(r===Vc&&typeof t=="number"&&(t=String(t)+"px"),n.style[i]=t):n.setAttributeNS(null,e,t)}function bw(n,e){var t=Object.keys(e),i,r;for(i=0,r;r=t[i];i++)Sp(n,r,e[r])}function K(n,e,t){if(typeof e=="string")if(t!==void 0)Sp(n,e,t);else return xw(n,e);else bw(n,e);return n}var ww=Object.prototype.toString;function Qt(n){return new Xn(n)}function Xn(n){if(!n||!n.nodeType)throw new Error("A DOM element reference is required");this.el=n,this.list=n.classList}Xn.prototype.add=function(n){return this.list.add(n),this};Xn.prototype.remove=function(n){return ww.call(n)=="[object RegExp]"?this.removeMatching(n):(this.list.remove(n),this)};Xn.prototype.removeMatching=function(n){let e=this.array();for(let t=0;t<e.length;t++)n.test(e[t])&&this.remove(e[t]);return this};Xn.prototype.toggle=function(n,e){return typeof e!="undefined"?e!==this.list.toggle(n,e)&&this.list.toggle(n):this.list.toggle(n),this};Xn.prototype.array=function(){return Array.from(this.list)};Xn.prototype.has=Xn.prototype.contains=function(n){return this.list.contains(n)};function Ow(n){for(var e;e=n.firstChild;)n.removeChild(e);return n}var zc={svg:"http://www.w3.org/2000/svg"},bp='<svg xmlns="'+zc.svg+'"';function Ep(n){var e=!1;n.substring(0,4)==="<svg"?n.indexOf(zc.svg)===-1&&(n=bp+n.substring(4)):(n=bp+">"+n+"</svg>",e=!0);var t=kw(n);if(!e)return t;for(var i=document.createDocumentFragment(),r=t.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function kw(n){var e;return e=new DOMParser,e.async=!1,e.parseFromString(n,"text/xml")}function ie(n,e){var t;return n=n.trim(),n.charAt(0)==="<"?(t=Ep(n).firstChild,t=document.importNode(t,!0)):t=document.createElementNS(zc.svg,n),e&&K(t,e),t}var Fc=null;function Qc(){return Fc===null&&(Fc=ie("svg")),Fc}function wp(n,e){var t,i,r=Object.keys(e);for(t=0;i=r[t];t++)n[i]=e[i];return n}function Ap(n,e,t,i,r,s){var o=Qc().createSVGMatrix();switch(arguments.length){case 0:return o;case 1:return wp(o,n);case 6:return wp(o,{a:n,b:e,c:t,d:i,e:r,f:s})}}function _p(n){return n?Qc().createSVGTransformFromMatrix(n):Qc().createSVGTransform()}var Op=/([&<>]{1})/g,Cw=/([&<>\n\r"]{1})/g,Sw={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"'"};function jc(n,e){function t(i,r){return Sw[r]||r}return n.replace(e,t)}function Tp(n,e){var t,i,r,s,o;switch(n.nodeType){case 3:e.push(jc(n.textContent,Op));break;case 1:if(e.push("<",n.tagName),n.hasAttributes())for(r=n.attributes,t=0,i=r.length;t<i;++t)s=r.item(t),e.push(" ",s.name,'="',jc(s.value,Cw),'"');if(n.hasChildNodes()){for(e.push(">"),o=n.childNodes,t=0,i=o.length;t<i;++t)Tp(o.item(t),e);e.push("</",n.tagName,">")}else e.push("/>");break;case 8:e.push("<!--",jc(n.nodeValue,Op),"-->");break;case 4:e.push("<![CDATA[",n.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+n.nodeType)}return e}function Ew(n,e){var t=Ep(e);if(Ow(n),!!e){_w(t)||(t=t.documentElement);for(var i=Tw(t.childNodes),r=0;r<i.length;r++)kp(i[r],n)}}function Aw(n){for(var e=n.firstChild,t=[];e;)Tp(e,t),e=e.nextSibling;return t.join("")}function _w(n){return n.nodeName==="#document-fragment"}function Mp(n,e){if(e!==void 0){try{Ew(n,e)}catch(t){throw new Error("error parsing SVG: "+t.message)}return n}else return Aw(n)}function Tw(n){return Array.prototype.slice.call(n)}function bi(n){var e=n.parentNode;return e&&e.removeChild(n),n}function Mw(n,e){return e instanceof SVGMatrix?n.createSVGTransformFromMatrix(e):e}function Rw(n,e){var t,i;for(n.clear(),t=0;i=e[t];t++)n.appendItem(Mw(n,i))}function Ps(n,e){var t=n.transform.baseVal;return e&&(Array.isArray(e)||(e=[e]),Rw(t,e)),t.consolidate()}function Ea(n){return n.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function Pw(n){return["M",n.x,n.y]}function Wc(n){return["L",n.x,n.y]}function Dw(n,e,t){return["C",n.x,n.y,e.x,e.y,t.x,t.y]}function Bw(n,e){let t=n.length,i=[Pw(n[0])];for(let r=1;r<t;r++){let s=n[r-1],o=n[r],a=n[r+1];if(!a||!e){i.push(Wc(o));continue}let l=Math.min(e,Hc(o.x-s.x,o.y-s.y),Hc(a.x-o.x,a.y-o.y));if(!l){i.push(Wc(o));continue}let c=Sa(o,s,l),u=Sa(o,s,l*.5),f=Sa(o,a,l),h=Sa(o,a,l*.5);i.push(Wc(c)),i.push(Dw(u,h,f))}return i}function Sa(n,e,t){let i=e.x-n.x,r=e.y-n.y,s=Hc(i,r),o=t/s;return{x:n.x+i*o,y:n.y+r*o}}function Hc(n,e){return Math.sqrt(Math.pow(n,2)+Math.pow(e,2))}function ir(n,e,t){Ce(e)&&(t=e,e=null),e||(e={});let i=ie("path",e);return Ce(t)&&(i.dataset.cornerRadius=String(t)),Xc(i,n)}function Xc(n,e){let t=parseInt(n.dataset.cornerRadius,10)||0;return K(n,{d:Ea(Bw(e,t))}),n}function wi(n,e){e=!!e,_e(n)||(n=[n]);var t,i,r,s;return B(n,function(o){var a=o;o.waypoints&&!e&&(a=wi(o.waypoints,!0));var l=a.x,c=a.y,u=a.height||0,f=a.width||0;(l<t||t===void 0)&&(t=l),(c<i||i===void 0)&&(i=c),(l+f>r||r===void 0)&&(r=l+f),(c+u>s||s===void 0)&&(s=c+u)}),{x:t,y:i,height:s-i,width:r-t}}function Rp(n){return"waypoints"in n?"connection":"x"in n?"shape":"root"}function Aa(n){return!!(n&&n.isFrame)}var Iw=1;function rn(n,e){it.call(this,n,Iw),this.CONNECTION_STYLE=e.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=e.style({fill:"white",stroke:"fuchsia",strokeWidth:2}),this.FRAME_STYLE=e.style(["no-fill"],{stroke:"fuchsia",strokeDasharray:4,strokeWidth:2})}Vt(rn,it);rn.prototype.canRender=function(){return!0};rn.prototype.drawShape=function(e,t,i){var r=ie("rect");return K(r,{x:0,y:0,width:t.width||0,height:t.height||0}),Aa(t)?K(r,D({},this.FRAME_STYLE,i||{})):K(r,D({},this.SHAPE_STYLE,i||{})),ve(e,r),r};rn.prototype.drawConnection=function(e,t,i){var r=ir(t.waypoints,D({},this.CONNECTION_STYLE,i||{}));return ve(e,r),r};rn.prototype.getShapePath=function(e){var t=e.x,i=e.y,r=e.width,s=e.height,o=[["M",t,i],["l",r,0],["l",0,s],["l",-r,0],["z"]];return Ea(o)};rn.prototype.getConnectionPath=function(e){var t=e.waypoints,i,r,s=[];for(i=0;r=t[i];i++)r=r.original||r,s.push([i===0?"M":"L",r.x,r.y]);return Ea(s)};rn.$inject=["eventBus","styles"];function Uc(){var n={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},e=this;this.cls=function(t,i,r){var s=this.style(i,r);return D(s,{class:t})},this.style=function(t,i){!_e(t)&&!i&&(i=t,t=[]);var r=wt(t,function(s,o){return D(s,n[o]||{})},{});return i?D(r,i):r},this.computeStyle=function(t,i,r){return _e(i)||(r=i,i=[]),e.style(i||[],D({},r,t||{}))}}var Pp={__init__:["defaultRenderer"],defaultRenderer:["type",rn],styles:["type",Uc]};function Dp(n,e){if(!n||!e)return-1;var t=n.indexOf(e);return t!==-1&&n.splice(t,1),t}function Bp(n,e,t){if(!(!n||!e)){typeof t!="number"&&(t=-1);var i=n.indexOf(e);if(i!==-1){if(i===t)return;if(t!==-1)n.splice(i,1);else return}t!==-1?n.splice(t,0,e):n.push(e)}}var Ds=Math,wR=Ds.PI,OR=Ds.min,kR=Ds.max,CR=Ds.pow,SR=Ds.abs;function Yc(n){return{top:n.y,right:n.x+(n.width||0),bottom:n.y+(n.height||0),left:n.x}}function _a(n,e){return Math.round(n*e)/e}function Ip(n){return Ce(n)?n+"px":n}function $w(n){for(;n.parent;)n=n.parent;return n}function Lw(n){n=D({},{width:"100%",height:"100%"},n);let e=n.container||document.body,t=document.createElement("div");return t.setAttribute("class","djs-container djs-parent"),yi(t,{position:"relative",overflow:"hidden",width:Ip(n.width),height:Ip(n.height)}),e.appendChild(t),t}function $p(n,e,t){let i=ie("g");Qt(i).add(e);let r=t!==void 0?t:n.childNodes.length-1;return n.insertBefore(i,n.childNodes[r]||null),i}var Nw="base",Lp=0,qw=1,Fw={shape:["x","y","width","height"],connection:["waypoints"]};function V(n,e,t,i){this._eventBus=e,this._elementRegistry=i,this._graphicsFactory=t,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(n||{})}V.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"];V.prototype._init=function(n){let e=this._eventBus,t=this._container=Lw(n),i=this._svg=ie("svg");K(i,{width:"100%",height:"100%"}),tr(i,"tabindex",0),n.autoFocus&&e.on("element.hover",()=>{this.restoreFocus()}),e.on("element.mousedown",500,s=>{this.focus()}),i.addEventListener("focusin",()=>{this._setFocused(!0)}),i.addEventListener("focusout",()=>{this._setFocused(!1)}),i.addEventListener("mouseover",()=>{this._eventBus.fire("canvas.mouseover")}),i.addEventListener("mouseout",()=>{this._eventBus.fire("canvas.mouseout")}),ve(t,i);let r=this._viewport=$p(i,"viewport");n.deferUpdate&&(this._viewboxChanged=Gi(Ft(this._viewboxChanged,this),300)),e.on("diagram.init",()=>{e.fire("canvas.init",{svg:i,viewport:r})}),e.on(["shape.added","connection.added","shape.removed","connection.removed","elements.changed","root.set"],()=>{delete this._cachedViewbox}),e.on("diagram.destroy",500,this._destroy,this),e.on("diagram.clear",500,this._clear,this)};V.prototype._destroy=function(){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});let n=this._container.parentNode;n&&n.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._planes,delete this._rootElement,delete this._viewport};V.prototype._setFocused=function(n){n!=this._focused&&(this._focused=n,this._eventBus.fire("canvas.focus.changed",{focused:n}))};V.prototype._clear=function(){this._elementRegistry.getAll().forEach(e=>{let t=Rp(e);t==="root"?this.removeRootElement(e):this._removeElement(e,t)}),this._planes=[],this._rootElement=null,delete this._cachedViewbox};V.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)};V.prototype.restoreFocus=function(){document.activeElement===document.body&&this.focus()};V.prototype.isFocused=function(){return this._focused};V.prototype.getDefaultLayer=function(){return this.getLayer(Nw,Lp)};V.prototype.getLayer=function(n,e){if(!n)throw new Error("must specify a name");let t=this._layers[n];if(t||(t=this._layers[n]=this._createLayer(n,e)),typeof e!="undefined"&&t.index!==e)throw new Error("layer <"+n+"> already created at index <"+e+">");return t.group};V.prototype._getChildIndex=function(n){return wt(this._layers,function(e,t){return t.visible&&n>=t.index&&e++,e},0)};V.prototype._createLayer=function(n,e){typeof e=="undefined"&&(e=qw);let t=this._getChildIndex(e);return{group:$p(this._viewport,"layer-"+n,t),index:e,visible:!0}};V.prototype.showLayer=function(n){if(!n)throw new Error("must specify a name");let e=this._layers[n];if(!e)throw new Error("layer <"+n+"> does not exist");let t=this._viewport,i=e.group,r=e.index;if(e.visible)return i;let s=this._getChildIndex(r);return t.insertBefore(i,t.childNodes[s]||null),e.visible=!0,i};V.prototype.hideLayer=function(n){if(!n)throw new Error("must specify a name");let e=this._layers[n];if(!e)throw new Error("layer <"+n+"> does not exist");let t=e.group;return e.visible&&(bi(t),e.visible=!1),t};V.prototype._removeLayer=function(n){let e=this._layers[n];e&&(delete this._layers[n],bi(e.group))};V.prototype.getActiveLayer=function(){let n=this._findPlaneForRoot(this.getRootElement());return n?n.layer:null};V.prototype.findRoot=function(n){return typeof n=="string"&&(n=this._elementRegistry.get(n)),n?(this._findPlaneForRoot($w(n))||{}).rootElement:void 0};V.prototype.getRootElements=function(){return this._planes.map(function(n){return n.rootElement})};V.prototype._findPlaneForRoot=function(n){return we(this._planes,function(e){return e.rootElement===n})};V.prototype.getContainer=function(){return this._container};V.prototype._updateMarker=function(n,e,t){let i;n.id||(n=this._elementRegistry.get(n)),n.markers=n.markers||new Set,i=this._elementRegistry._elements[n.id],i&&(B([i.gfx,i.secondaryGfx],function(r){r&&(t?(n.markers.add(e),Qt(r).add(e)):(n.markers.delete(e),Qt(r).remove(e)))}),this._eventBus.fire("element.marker.update",{element:n,gfx:i.gfx,marker:e,add:!!t}))};V.prototype.addMarker=function(n,e){this._updateMarker(n,e,!0)};V.prototype.removeMarker=function(n,e){this._updateMarker(n,e,!1)};V.prototype.hasMarker=function(n,e){return n.id||(n=this._elementRegistry.get(n)),n.markers?n.markers.has(e):!1};V.prototype.toggleMarker=function(n,e){this.hasMarker(n,e)?this.removeMarker(n,e):this.addMarker(n,e)};V.prototype.getRootElement=function(){let n=this._rootElement;return n||this._planes.length?n:this.setRootElement(this.addRootElement(null))};V.prototype.addRootElement=function(n){let e=this._rootsIdx++;n||(n={id:"__implicitroot_"+e,children:[],isImplicit:!0});let t=n.layer="root-"+e;this._ensureValid("root",n);let i=this.getLayer(t,Lp);return this.hideLayer(t),this._addRoot(n,i),this._planes.push({rootElement:n,layer:i}),n};V.prototype.removeRootElement=function(n){if(typeof n=="string"&&(n=this._elementRegistry.get(n)),!!this._findPlaneForRoot(n))return this._removeRoot(n),this._removeLayer(n.layer),this._planes=this._planes.filter(function(t){return t.rootElement!==n}),this._rootElement===n&&(this._rootElement=null),n};V.prototype.setRootElement=function(n){if(n===this._rootElement)return n;let e;if(!n)throw new Error("rootElement required");return e=this._findPlaneForRoot(n),e||(n=this.addRootElement(n)),this._setRoot(n),n};V.prototype._removeRoot=function(n){let e=this._elementRegistry,t=this._eventBus;t.fire("root.remove",{element:n}),t.fire("root.removed",{element:n}),e.remove(n)};V.prototype._addRoot=function(n,e){let t=this._elementRegistry,i=this._eventBus;i.fire("root.add",{element:n}),t.add(n,e),i.fire("root.added",{element:n,gfx:e})};V.prototype._setRoot=function(n,e){let t=this._rootElement;t&&(this._elementRegistry.updateGraphics(t,null,!0),this.hideLayer(t.layer)),n&&(e||(e=this._findPlaneForRoot(n).layer),this._elementRegistry.updateGraphics(n,this._svg,!0),this.showLayer(n.layer)),this._rootElement=n,this._eventBus.fire("root.set",{element:n})};V.prototype._ensureValid=function(n,e){if(!e.id)throw new Error("element must have an id");if(this._elementRegistry.get(e.id))throw new Error("element <"+e.id+"> already exists");let t=Fw[n];if(!Es(t,function(r){return typeof e[r]!="undefined"}))throw new Error("must supply { "+t.join(", ")+" } with "+n)};V.prototype._setParent=function(n,e,t){Bp(e.children,n,t),n.parent=e};V.prototype._addElement=function(n,e,t,i){t=t||this.getRootElement();let r=this._eventBus,s=this._graphicsFactory;this._ensureValid(n,e),r.fire(n+".add",{element:e,parent:t}),this._setParent(e,t,i);let o=s.create(n,e,i);return this._elementRegistry.add(e,o),s.update(n,e,o),r.fire(n+".added",{element:e,gfx:o}),e};V.prototype.addShape=function(n,e,t){return this._addElement("shape",n,e,t)};V.prototype.addConnection=function(n,e,t){return this._addElement("connection",n,e,t)};V.prototype._removeElement=function(n,e){let t=this._elementRegistry,i=this._graphicsFactory,r=this._eventBus;if(n=t.get(n.id||n),!!n)return r.fire(e+".remove",{element:n}),i.remove(n),Dp(n.parent&&n.parent.children,n),n.parent=null,r.fire(e+".removed",{element:n}),t.remove(n),n};V.prototype.removeShape=function(n){return this._removeElement(n,"shape")};V.prototype.removeConnection=function(n){return this._removeElement(n,"connection")};V.prototype.getGraphics=function(n,e){return this._elementRegistry.getGraphics(n,e)};V.prototype._changeViewbox=function(n){this._eventBus.fire("canvas.viewbox.changing"),n.apply(this),this._cachedViewbox=null,this._viewboxChanged()};V.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})};V.prototype.viewbox=function(n){if(n===void 0&&this._cachedViewbox)return structuredClone(this._cachedViewbox);let e=this._viewport,t=this.getSize(),i,r,s,o,a,l,c;if(n)this._changeViewbox(function(){a=Math.min(t.width/n.width,t.height/n.height);let u=this._svg.createSVGMatrix().scale(a).translate(-n.x,-n.y);Ps(e,u)});else return s=this._rootElement?this.getActiveLayer():null,i=s&&s.getBBox()||{},o=Ps(e),r=o?o.matrix:Ap(),a=_a(r.a,1e3),l=_a(-r.e||0,1e3),c=_a(-r.f||0,1e3),n=this._cachedViewbox={x:l?l/a:0,y:c?c/a:0,width:t.width/a,height:t.height/a,scale:a,inner:{width:i.width||0,height:i.height||0,x:i.x||0,y:i.y||0},outer:t},n;return n};V.prototype.scroll=function(n){let e=this._viewport,t=e.getCTM();return n&&this._changeViewbox(function(){n=D({dx:0,dy:0},n||{}),t=this._svg.createSVGMatrix().translate(n.dx,n.dy).multiply(t),Np(e,t)}),{x:t.e,y:t.f}};V.prototype.scrollToElement=function(n,e){let t=100;typeof n=="string"&&(n=this._elementRegistry.get(n));let i=this.findRoot(n);if(i!==this.getRootElement()&&this.setRootElement(i),i===n)return;e||(e={}),typeof e=="number"&&(t=e),e={top:e.top||t,right:e.right||t,bottom:e.bottom||t,left:e.left||t};let r=wi(n),s=Yc(r),o=this.viewbox(),a=this.zoom(),l,c;o.y+=e.top/a,o.x+=e.left/a,o.width-=(e.right+e.left)/a,o.height-=(e.bottom+e.top)/a;let u=Yc(o);if(!(r.width<o.width&&r.height<o.height))l=r.x-o.x,c=r.y-o.y;else{let h=Math.max(0,s.right-u.right),d=Math.min(0,s.left-u.left),p=Math.max(0,s.bottom-u.bottom),m=Math.min(0,s.top-u.top);l=h||d,c=p||m}this.scroll({dx:-l*a,dy:-c*a})};V.prototype.zoom=function(n,e){if(!n)return this.viewbox(n).scale;if(n==="fit-viewport")return this._fitViewport(e);let t,i;return this._changeViewbox(function(){typeof e!="object"&&(t=this.viewbox().outer,e={x:t.width/2,y:t.height/2}),i=this._setZoom(n,e)}),_a(i.a,1e3)};function Np(n,e){let t="matrix("+e.a+","+e.b+","+e.c+","+e.d+","+e.e+","+e.f+")";n.setAttribute("transform",t)}V.prototype._fitViewport=function(n){let e=this.viewbox(),t=e.outer,i=e.inner,r,s;return i.x>=0&&i.y>=0&&i.x+i.width<=t.width&&i.y+i.height<=t.height&&!n?s={x:0,y:0,width:Math.max(i.width+i.x,t.width),height:Math.max(i.height+i.y,t.height)}:(r=Math.min(1,t.width/i.width,t.height/i.height),s={x:i.x+(n?i.width/2-t.width/r/2:0),y:i.y+(n?i.height/2-t.height/r/2:0),width:t.width/r,height:t.height/r}),this.viewbox(s),this.viewbox(!1).scale};V.prototype._setZoom=function(n,e){let t=this._svg,i=this._viewport,r=t.createSVGMatrix(),s=t.createSVGPoint(),o,a,l,c,u;l=i.getCTM();let f=l.a;return e?(o=D(s,e),a=o.matrixTransform(l.inverse()),c=r.translate(a.x,a.y).scale(1/f*n).translate(-a.x,-a.y),u=l.multiply(c)):u=r.scale(n),Np(this._viewport,u),u};V.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}};V.prototype.getAbsoluteBBox=function(n){let e=this.viewbox(),t;n.waypoints?t=this.getGraphics(n).getBBox():t=n;let i=t.x*e.scale-e.x*e.scale,r=t.y*e.scale-e.y*e.scale,s=t.width*e.scale,o=t.height*e.scale;return{x:i,y:r,width:s,height:o}};V.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var rr="data-element-id";function Xe(n){this._elements={},this._eventBus=n}Xe.$inject=["eventBus"];Xe.prototype.add=function(n,e,t){var i=n.id;this._validateId(i),K(e,rr,i),t&&K(t,rr,i),this._elements[i]={element:n,gfx:e,secondaryGfx:t}};Xe.prototype.remove=function(n){var e=this._elements,t=n.id||n,i=t&&e[t];i&&(K(i.gfx,rr,""),i.secondaryGfx&&K(i.secondaryGfx,rr,""),delete e[t])};Xe.prototype.updateId=function(n,e){this._validateId(e),typeof n=="string"&&(n=this.get(n)),this._eventBus.fire("element.updateId",{element:n,newId:e});var t=this.getGraphics(n),i=this.getGraphics(n,!0);this.remove(n),n.id=e,this.add(n,t,i)};Xe.prototype.updateGraphics=function(n,e,t){var i=n.id||n,r=this._elements[i];return t?r.secondaryGfx=e:r.gfx=e,e&&K(e,rr,i),e};Xe.prototype.get=function(n){var e;typeof n=="string"?e=n:e=n&&K(n,rr);var t=this._elements[e];return t&&t.element};Xe.prototype.filter=function(n){var e=[];return this.forEach(function(t,i){n(t,i)&&e.push(t)}),e};Xe.prototype.find=function(n){for(var e=this._elements,t=Object.keys(e),i=0;i<t.length;i++){var r=t[i],s=e[r],o=s.element,a=s.gfx;if(n(o,a))return o}};Xe.prototype.getAll=function(){return this.filter(function(n){return n})};Xe.prototype.forEach=function(n){var e=this._elements;Object.keys(e).forEach(function(t){var i=e[t],r=i.element,s=i.gfx;return n(r,s)})};Xe.prototype.getGraphics=function(n,e){var t=n.id||n,i=this._elements[t];return i&&(e?i.secondaryGfx:i.gfx)};Xe.prototype._validateId=function(n){if(!n)throw new Error("element must have an id");if(this._elements[n])throw new Error("element with id "+n+" already added")};function jw(n,e,t,i){var r=t.inverse;return Object.defineProperty(n,"remove",{value:function(s){var o=this.indexOf(s);return o!==-1&&(this.splice(o,1),e.unset(s,r,i)),s}}),Object.defineProperty(n,"contains",{value:function(s){return this.indexOf(s)!==-1}}),Object.defineProperty(n,"add",{value:function(s,o){var a=this.indexOf(s);if(typeof o=="undefined"){if(a!==-1)return;o=this.length}a!==-1&&this.splice(a,1),this.splice(o,0,s),a===-1&&e.set(s,r,i)}}),Object.defineProperty(n,"__refs_collection",{value:!0}),n}function Vw(n){return n.__refs_collection===!0}function Qw(n,e){return Object.prototype.hasOwnProperty.call(n,e.name||e)}function qp(n,e,t){var i=jw(t[e.name]||[],n,e,t);Object.defineProperty(t,e.name,{enumerable:e.enumerable,value:i}),i.length&&i.forEach(function(r){n.set(r,e.inverse,t)})}function zw(n,e,t){var i=e.inverse,r=t[e.name];Object.defineProperty(t,e.name,{configurable:e.configurable,enumerable:e.enumerable,get:function(){return r},set:function(s){if(s!==r){var o=r;r=null,o&&n.unset(o,i,t),r=s,n.set(r,i,t)}}})}function Ue(n,e){if(!(this instanceof Ue))return new Ue(n,e);n.inverse=e,e.inverse=n,this.props={},this.props[n.name]=n,this.props[e.name]=e}Ue.prototype.bind=function(n,e){if(typeof e=="string"){if(!this.props[e])throw new Error("no property <"+e+"> in ref");e=this.props[e]}e.collection?qp(this,e,n):zw(this,e,n)};Ue.prototype.ensureRefsCollection=function(n,e){var t=n[e.name];return Vw(t)||qp(this,e,n),t};Ue.prototype.ensureBound=function(n,e){Qw(n,e)||this.bind(n,e)};Ue.prototype.unset=function(n,e,t){n&&(this.ensureBound(n,e),e.collection?this.ensureRefsCollection(n,e).remove(t):n[e.name]=void 0)};Ue.prototype.set=function(n,e,t){n&&(this.ensureBound(n,e),e.collection?this.ensureRefsCollection(n,e).add(t):n[e.name]=t)};var Kc=new Ue({name:"children",enumerable:!0,collection:!0},{name:"parent"}),jp=new Ue({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),Fp=new Ue({name:"attachers",collection:!0},{name:"host"}),Vp=new Ue({name:"outgoing",collection:!0},{name:"source"}),Qp=new Ue({name:"incoming",collection:!0},{name:"target"});function Bs(){Object.defineProperty(this,"businessObject",{writable:!0}),Object.defineProperty(this,"label",{get:function(){return this.labels[0]},set:function(n){var e=this.label,t=this.labels;!n&&e?t.remove(e):t.add(n,0)}}),Kc.bind(this,"parent"),jp.bind(this,"labels"),Vp.bind(this,"outgoing"),Qp.bind(this,"incoming")}function Is(){Bs.call(this),Kc.bind(this,"children"),Fp.bind(this,"host"),Fp.bind(this,"attachers")}Vt(Is,Bs);function zp(){Bs.call(this),Kc.bind(this,"children")}Vt(zp,Is);function Wp(){Is.call(this),jp.bind(this,"labelTarget")}Vt(Wp,Is);function Hp(){Bs.call(this),Vp.bind(this,"source"),Qp.bind(this,"target")}Vt(Hp,Bs);var Ww={connection:Hp,shape:Is,label:Wp,root:zp};function Xp(n,e){var t=Ww[n];if(!t)throw new Error("unknown type: <"+n+">");return D(new t,e)}function Un(){this._uid=12}Un.prototype.createRoot=function(n){return this.create("root",n)};Un.prototype.createLabel=function(n){return this.create("label",n)};Un.prototype.createShape=function(n){return this.create("shape",n)};Un.prototype.createConnection=function(n){return this.create("connection",n)};Un.prototype.create=function(n,e){return e=D({},e||{}),e.id||(e.id=n+"_"+this._uid++),Xp(n,e)};function Up(n){return n.childNodes[0]}function Yp(n){return n.parentNode.childNodes[1]}function Kp(n,e,t){var i=_p();i.setTranslate(e,t),Ps(n,i)}function Ye(n,e){this._eventBus=n,this._elementRegistry=e}Ye.$inject=["eventBus","elementRegistry"];Ye.prototype._getChildrenContainer=function(n){var e=this._elementRegistry.getGraphics(n),t;return n.parent?(t=Yp(e),t||(t=ie("g"),Qt(t).add("djs-children"),ve(e.parentNode,t))):t=e,t};Ye.prototype._clear=function(n){var e=Up(n);return wa(e),e};Ye.prototype._createContainer=function(n,e,t,i){var r=ie("g");Qt(r).add("djs-group"),typeof t!="undefined"?Gp(r,e,e.childNodes[t]):ve(e,r);var s=ie("g");Qt(s).add("djs-element"),Qt(s).add("djs-"+n),i&&Qt(s).add("djs-frame"),ve(r,s);var o=ie("g");return Qt(o).add("djs-visual"),ve(s,o),s};Ye.prototype.create=function(n,e,t){var i=this._getChildrenContainer(e.parent);return this._createContainer(n,i,t,Aa(e))};Ye.prototype.updateContainments=function(n){var e=this,t=this._elementRegistry,i;i=wt(n,function(r,s){return s.parent&&(r[s.parent.id]=s.parent),r},{}),B(i,function(r){var s=r.children;if(s){var o=e._getChildrenContainer(r);B(s.slice().reverse(),function(a){var l=t.getGraphics(a);Gp(l.parentNode,o)})}})};Ye.prototype.drawShape=function(n,e,t={}){var i=this._eventBus;return i.fire("render.shape",{gfx:n,element:e,attrs:t})};Ye.prototype.getShapePath=function(n){var e=this._eventBus;return e.fire("render.getShapePath",n)};Ye.prototype.drawConnection=function(n,e,t={}){var i=this._eventBus;return i.fire("render.connection",{gfx:n,element:e,attrs:t})};Ye.prototype.getConnectionPath=function(n){var e=this._eventBus;return e.fire("render.getConnectionPath",n)};Ye.prototype.update=function(n,e,t){if(e.parent){var i=this._clear(t);if(n==="shape")this.drawShape(i,e),Kp(t,e.x,e.y);else if(n==="connection")this.drawConnection(i,e);else throw new Error("unknown type: "+n);e.hidden?K(t,"display","none"):K(t,"display","block")}};Ye.prototype.remove=function(n){var e=this._elementRegistry.getGraphics(n);bi(e.parentNode)};function Gp(n,e,t){var i=t||e.firstChild;n!==i&&e.insertBefore(n,i)}var Jp={__depends__:[Pp],__init__:["canvas"],canvas:["type",V],elementRegistry:["type",Xe],elementFactory:["type",Un],eventBus:["type",ye],graphicsFactory:["type",Ye]};function Hw(n){var e=new xi(n);return e.init(),e}function Xw(n){n=n||{};var e={config:["value",n]},t=[e,Jp].concat(n.modules||[]);return Hw(t)}function kn(n,e){this._injector=e||Xw(n),this.get("eventBus").fire("diagram.init")}kn.prototype.get=function(n,e){return this._injector.get(n,e)};kn.prototype.invoke=function(n,e,t){return this._injector.invoke(n,e,t)};kn.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")};kn.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};function Q(n,e){var t=Ot(n);return t&&typeof t.$instanceOf=="function"&&t.$instanceOf(e)}function Ot(n){return n&&n.businessObject||n}function Zp(n){return Ot(n).name}function Ta(n){var e=Ot(n);if(Q(e,"dmn:Decision"))return e.get("decisionLogic");if(Q(e,"dmn:BusinessKnowledgeModel")){var t=e.get("encapsulatedLogic");return t&&t.get("body")}}var Uw="https://www.omg.org/spec/DMN/20191111/FEEL/";function em(n){for(let e=n;e;e=e.$parent){let t=e.get("expressionLanguage");if(t)return!!(t===Uw||/feel/i.test(t));if(Q(e,"dmn:FunctionDefinition"))return(e.get("kind")||"FEEL")==="FEEL"}return!0}var Yw=new Ue({name:"dmnElementRef",enumerable:!0},{name:"di",configurable:!0});function Gc(n,e){var t=[];function i(g){var w=g.gfx;if(w)throw new Error("already rendered "+g.id);return n.element(g)}function r(g){return n.root(g)}function s(g){try{var w=g.di&&i(g);return w}catch(x){y(x.message,{element:g,error:x})}}function o(g,w){var x=g.dmnDI;if(!x)throw new Error("no dmndi:DMNDI");var b=x.diagrams||[];if(w&&b.indexOf(w)===-1)throw new Error("diagram not part of dmndi:DMNDI");if(!w&&b&&b.length&&(w=b[0]),!w)throw new Error("no diagram to display");g.di=w,f(w),r(g),a(g.get("drgElement")),l(g.get("artifact")),m()}function a(g){B(g,function(w){s(w),u(w)})}function l(g){B(g,function(w){Q(w,"dmn:Association")?c(w):s(w)})}function c(g){p(function(){s(g)})}function u(g){B(["informationRequirement","knowledgeRequirement","authorityRequirement"],function(w){B(g[w],function(x){p(function(){s(x)})})})}function f(g){B(g.diagramElements,h)}function h(g){d(g)}function d(g){var w=g.dmnElementRef;w?w.di?y("multiple DI elements defined for element",{element:w}):(Yw.bind(w,"di"),w.di=g):y("no DMN element referenced in element",{element:g})}function p(g){t.push(g)}function m(){B(t,function(g){g()})}function y(g,w){n.error(g,w)}return{handleDefinitions:o}}function tm(n,e,t){var i=n.get("drdImporter"),r=n.get("eventBus"),s,o=[];function a(l){var c={root:function(f){return i.root(f)},element:function(f,h){return i.add(f,h)},error:function(f,h){o.push({message:f,context:h})}},u=new Gc(c);u.handleDefinitions(l)}r.fire("import.start",{definitions:e});try{a(e)}catch(l){s=l}r.fire("import.done",{error:s,warnings:o}),t(s,o)}var ru="$NO_OP",Kw="a runtime error occured! Use Inferno in development environment to find the error.",Da=Array.isArray;function su(n){var e=typeof n;return e==="string"||e==="number"}function Z(n){return Ba(n)||fe(n)}function Yn(n){return fe(n)||n===!1||Gw(n)||Ba(n)}function G(n){return typeof n=="function"}function sr(n){return typeof n=="string"}function tu(n){return typeof n=="number"}function fe(n){return n===null}function Gw(n){return n===!0}function Ba(n){return n===void 0}function Jw(n){throw n||(n=Kw),new Error("Inferno Error: "+n)}function Ns(n,e){var t={};if(n)for(var i in n)t[i]=n[i];if(e)for(var r in e)t[r]=e[r];return t}var $s="$";function ou(n,e,t,i,r,s,o,a){return{childFlags:n,children:e,className:t,dom:null,flags:i,key:r===void 0?null:r,parentVNode:null,props:s===void 0?null:s,ref:o===void 0?null:o,type:a}}function E(n,e,t,i,r,s,o,a){var l=r===void 0?1:r,c=ou(l,i,t,n,o,s,a,e),u=Ct.createVNode;return typeof u=="function"&&u(c),l===0&&um(c,c.children),c}function F(n,e,t,i,r){(n&2)>0&&(n=e.prototype&&G(e.prototype.render)?4:8);var s=e.defaultProps;if(!Z(s)){t||(t={});for(var o in s)Ba(t[o])&&(t[o]=s[o])}if((n&8)>0){var a=e.defaultHooks;if(!Z(a))if(!r)r=a;else for(var l in a)Ba(r[l])&&(r[l]=a[l])}var c=ou(1,null,null,n,i,t,r,e),u=Ct.createVNode;return G(u)&&u(c),c}function xe(n,e){return ou(1,Z(n)?"":n,null,16,e,null,null,null)}function on(n){var e=n.props;if(e){var t=n.flags;t&481&&(e.children!==void 0&&Z(n.children)&&um(n,e.children),e.className!==void 0&&(n.className=e.className||null,e.className=void 0)),e.key!==void 0&&(n.key=e.key,e.key=void 0),e.ref!==void 0&&(t&8?n.ref=Ns(n.ref,e.ref):n.ref=e.ref,e.ref=void 0)}return n}function je(n){var e,t=n.flags;if(t&14){var i,r=n.props;if(!fe(r)){i={};for(var s in r)i[s]=r[s]}e=F(t,n.type,i,n.key,n.ref)}else t&481?e=E(t,n.type,n.className,n.children,n.childFlags,n.props,n.key,n.ref):t&16?e=xe(n.children,n.key):t&1024&&(e=n);return e}function lm(){return xe("",null)}function cm(n,e,t,i){for(var r=n.length;t<r;t++){var s=n[t];if(!Yn(s)){var o=i+$s+t;if(Da(s))cm(s,e,0,o);else{if(su(s))s=xe(s,o);else{var a=s.key,l=sr(a)&&a[0]===$s;(!fe(s.dom)||l)&&(s=je(s)),fe(a)||l?s.key=o:s.key=i+a}e.push(s)}}}}function um(n,e){var t,i=1;if(Yn(e))t=e;else if(sr(e))i=2,t=xe(e);else if(tu(e))i=2,t=xe(e+"");else if(Da(e)){var r=e.length;if(r===0)t=null,i=1;else{(Object.isFrozen(e)||e.$===!0)&&(e=e.slice()),i=8;for(var s=0;s<r;s++){var o=e[s];if(Yn(o)||Da(o)){t=t||e.slice(0,s),cm(e,t,s,"");break}else if(su(o))t=t||e.slice(0,s),t.push(xe(o,$s+s));else{var a=o.key,l=fe(o.dom),c=fe(a),u=!c&&sr(a)&&a[0]===$s;!l||c||u?(t=t||e.slice(0,s),(!l||u)&&(o=je(o)),(c||u)&&(o.key=$s+s),t.push(o)):t&&t.push(o)}}t=t||e,t.$=!0}}else t=e,fe(e.dom)||(t=je(e)),i=2;return n.children=t,n.childFlags=i,n}var Ct={afterRender:null,beforeRender:null,createVNode:null,renderComplete:null};var Oi="http://www.w3.org/1999/xlink",Jc="http://www.w3.org/XML/1998/namespace",Zw="http://www.w3.org/2000/svg",nm={"xlink:actuate":Oi,"xlink:arcrole":Oi,"xlink:href":Oi,"xlink:role":Oi,"xlink:show":Oi,"xlink:title":Oi,"xlink:type":Oi,"xml:base":Jc,"xml:lang":Jc,"xml:space":Jc},Me={},sn=[];function Ia(n,e){n.appendChild(e)}function Ma(n,e,t){Z(t)?Ia(n,e):n.insertBefore(e,t)}function eO(n,e){return e?document.createElementNS(Zw,n):document.createElement(n)}function au(n,e,t){n.replaceChild(e,t)}function tO(n,e){n.removeChild(e)}function lu(n){for(var e;(e=n.shift())!==void 0;)e()}var Ra={},Zc={};function fm(n,e,t){var i=Ra[n],r=t.$EV;e?(i||(Zc[n]=sO(n),Ra[n]=0),r||(r=t.$EV={}),r[n]||Ra[n]++,r[n]=e):r&&r[n]&&(Ra[n]--,i===1&&(document.removeEventListener(hm(n),Zc[n]),Zc[n]=null),r[n]=e)}function nO(n){return G(n.composedPath)?n.composedPath()[0]:n.target}function iO(n,e,t,i){for(var r=nO(n);!fe(r);){if(e&&r.disabled)return;var s=r.$EV;if(s){var o=s[t];if(o&&(i.dom=r,o.event?o.event(o.data,n):o(n),n.cancelBubble))return}r=r.parentNode}}function hm(n){return n.substr(2).toLowerCase()}function rO(){this.cancelBubble=!0,this.immediatePropagationStopped||this.stopImmediatePropagation()}function sO(n){var e=function(i){var r=i.type,s=r==="click"||r==="dblclick";if(s&&i.button!==0)return i.stopPropagation(),!1;i.stopPropagation=rO;var o={dom:document};Object.defineProperty(i,"currentTarget",{configurable:!0,get:function(){return o.dom}}),iO(i,s,n,o)};return document.addEventListener(hm(n),e),e}function dm(n,e){var t=document.createElement("i");return t.innerHTML=e,t.innerHTML===n.innerHTML}function oO(n,e){return!!(e&&e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html&&dm(n,e.dangerouslySetInnerHTML.__html))}function im(n,e,t){if(n[e]){var i=n[e];i.event?i.event(i.data,t):i(t)}else{var r=e.toLowerCase();n[r]&&n[r](t)}}function Fs(n,e){var t=function(r){r.stopPropagation();var s=this.$V;if(s){var o=s.props||Me,a=s.dom;if(sr(n))im(o,n,r);else for(var l=0;l<n.length;l++)im(o,n[l],r);if(G(e)){var c=this.$V,u=c.props||Me;e(u,a,!1,c)}}};return Object.defineProperty(t,"wrapped",{configurable:!1,enumerable:!1,value:!0,writable:!1}),t}function cu(n){return n==="checkbox"||n==="radio"}var aO=Fs("onInput",uu),lO=Fs(["onClick","onChange"],uu);function pm(n){n.stopPropagation()}pm.wrapped=!0;function cO(n,e){cu(e.type)?(n.onchange=lO,n.onclick=pm):n.oninput=aO}function uu(n,e){var t=n.type,i=n.value,r=n.checked,s=n.multiple,o=n.defaultValue,a=!Z(i);t&&t!==e.type&&e.setAttribute("type",t),!Z(s)&&s!==e.multiple&&(e.multiple=s),!Z(o)&&!a&&(e.defaultValue=o+""),cu(t)?(a&&(e.value=i),Z(r)||(e.checked=r)):a&&e.value!==i?(e.defaultValue=i,e.value=i):Z(r)||(e.checked=r)}function rm(n,e){var t=n.type;if(t==="optgroup"){var i=n.children,r=n.childFlags;if(r&12)for(var s=0,o=i.length;s<o;s++)eu(i[s],e);else r===2&&eu(i,e)}else eu(n,e)}function eu(n,e){var t=n.props||Me,i=n.dom;i.value=t.value,Da(e)&&e.indexOf(t.value)!==-1||t.value===e?i.selected=!0:(!Z(e)||!Z(t.selected))&&(i.selected=t.selected||!1)}var uO=Fs("onChange",mm);function fO(n){n.onchange=uO}function mm(n,e,t,i){var r=!!n.multiple;!Z(n.multiple)&&r!==e.multiple&&(e.multiple=r);var s=i.childFlags;if((s&1)===0){var o=i.children,a=n.value;if(t&&Z(a)&&(a=n.defaultValue),s&12)for(var l=0,c=o.length;l<c;l++)rm(o[l],a);else s===2&&rm(o,a)}}var hO=Fs("onInput",gm),dO=Fs("onChange");function pO(n,e){n.oninput=hO,e.onChange&&(n.onchange=dO)}function gm(n,e,t){var i=n.value,r=e.value;if(Z(i)){if(t){var s=n.defaultValue;!Z(s)&&s!==r&&(e.defaultValue=s,e.value=s)}}else r!==i&&(e.defaultValue=i,e.value=i)}function ym(n,e,t,i,r,s){n&64?uu(i,t):n&256?mm(i,t,r,e):n&128&&gm(i,t,r),s&&(t.$V=e)}function mO(n,e,t){n&64?cO(e,t):n&256?fO(e):n&128&&pO(e,t)}function vm(n){return n.type&&cu(n.type)?!Z(n.checked):!Z(n.value)}function kt(n,e){ki(n),e&&n.dom&&(tO(e,n.dom),n.dom=null)}function ki(n){var e=n.flags;if(e&481){var t=n.ref,i=n.props;G(t)&&t(null);var r=n.children,s=n.childFlags;if(s&12?fu(r):s===2&&ki(r),!fe(i))for(var o in i)switch(o){case"onClick":case"onDblClick":case"onFocusIn":case"onFocusOut":case"onKeyDown":case"onKeyPress":case"onKeyUp":case"onMouseDown":case"onMouseMove":case"onMouseUp":case"onSubmit":case"onTouchEnd":case"onTouchMove":case"onTouchStart":fm(o,null,n.dom);break}}else{var a=n.children;if(a)if(e&14){var l=n.ref;e&4?(G(a.componentWillUnmount)&&a.componentWillUnmount(),G(l)&&l(null),a.$UN=!0,a.$LI&&ki(a.$LI)):(!Z(l)&&G(l.onComponentWillUnmount)&&l.onComponentWillUnmount(n.dom,n.props||Me),ki(a))}else e&1024&&kt(a,n.type)}}function fu(n){for(var e=0,t=n.length;e<t;e++)ki(n[e])}function Pa(n,e){fu(e),n.textContent=""}function gO(n,e){return function(t){n(e.data,t)}}function yO(n,e,t){var i=n.toLowerCase();if(!G(e)&&!Z(e)){var r=e.event;r&&G(r)&&(t[i]=gO(r,e))}else{var s=t[i];(!s||!s.wrapped)&&(t[i]=e)}}function sm(n,e){switch(n){case"animationIterationCount":case"borderImageOutset":case"borderImageSlice":case"borderImageWidth":case"boxFlex":case"boxFlexGroup":case"boxOrdinalGroup":case"columnCount":case"fillOpacity":case"flex":case"flexGrow":case"flexNegative":case"flexOrder":case"flexPositive":case"flexShrink":case"floodOpacity":case"fontWeight":case"gridColumn":case"gridRow":case"lineClamp":case"lineHeight":case"opacity":case"order":case"orphans":case"stopOpacity":case"strokeDasharray":case"strokeDashoffset":case"strokeMiterlimit":case"strokeOpacity":case"strokeWidth":case"tabSize":case"widows":case"zIndex":case"zoom":return e;default:return e+"px"}}function vO(n,e,t){var i=t.style,r,s;if(sr(e)){i.cssText=e;return}if(!Z(n)&&!sr(n)){for(r in e)s=e[r],s!==n[r]&&(i[r]=tu(s)?sm(r,s):s);for(r in n)Z(e[r])&&(i[r]="")}else for(r in e)s=e[r],i[r]=tu(s)?sm(r,s):s}function nu(n,e,t,i,r,s,o){switch(n){case"onClick":case"onDblClick":case"onFocusIn":case"onFocusOut":case"onKeyDown":case"onKeyPress":case"onKeyUp":case"onMouseDown":case"onMouseMove":case"onMouseUp":case"onSubmit":case"onTouchEnd":case"onTouchMove":case"onTouchStart":fm(n,t,i);break;case"children":case"childrenType":case"className":case"defaultValue":case"key":case"multiple":case"ref":break;case"autoFocus":i.autofocus=!!t;break;case"allowfullscreen":case"autoplay":case"capture":case"checked":case"controls":case"default":case"disabled":case"hidden":case"indeterminate":case"loop":case"muted":case"novalidate":case"open":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"selected":i[n]=!!t;break;case"defaultChecked":case"value":case"volume":if(s&&n==="value")return;var a=Z(t)?"":t;i[n]!==a&&(i[n]=a);break;case"dangerouslySetInnerHTML":var l=e&&e.__html||"",c=t&&t.__html||"";l!==c&&!Z(c)&&!dm(i,c)&&(fe(o)||(o.childFlags&12?fu(o.children):o.childFlags===2&&ki(o.children),o.children=null,o.childFlags=1),i.innerHTML=c);break;default:n[0]==="o"&&n[1]==="n"?yO(n,t,i):Z(t)?i.removeAttribute(n):n==="style"?vO(e,t,i):r&&nm[n]?i.setAttributeNS(nm[n],n,t):i.setAttribute(n,t);break}}function xm(n,e,t,i,r){var s=!1,o=(e&448)>0;o&&(s=vm(t),s&&mO(e,i,t));for(var a in t)nu(a,null,t[a],i,r,s,null);o&&ym(e,n,i,t,!0,s)}function bm(n,e,t,i){var r=new e(t,i);if(n.children=r,r.$V=n,r.$BS=!1,r.context=i,r.props===Me&&(r.props=t),r.$UN=!1,G(r.componentWillMount)){if(r.$BR=!0,r.componentWillMount(),r.$PSS){var s=r.state,o=r.$PS;if(fe(s))r.state=o;else for(var a in o)s[a]=o[a];r.$PSS=!1,r.$PS=null}r.$BR=!1}G(Ct.beforeRender)&&Ct.beforeRender(r);var l=js(r.render(t,r.state,i),n),c;return G(r.getChildContext)&&(c=r.getChildContext()),Z(c)?r.$CX=i:r.$CX=Ns(i,c),G(Ct.afterRender)&&Ct.afterRender(r),r.$LI=l,r}function js(n,e){return Yn(n)?n=lm():su(n)?n=xe(n,null):(n.dom&&(n=je(n)),n.flags&14&&(n.parentVNode=e)),n}function Ke(n,e,t,i){var r=n.flags;if(r&481)return wm(n,e,t,i);if(r&14)return xO(n,e,t,i,(r&4)>0);if(r&512||r&16)return iu(n,e);if(r&1024)return Ke(n.children,n.type,t,!1),n.dom=iu(lm(),e)}function iu(n,e){var t=n.dom=document.createTextNode(n.children);return fe(e)||Ia(e,t),t}function wm(n,e,t,i){var r=n.flags,s=n.children,o=n.props,a=n.className,l=n.ref,c=n.childFlags;i=i||(r&32)>0;var u=eO(n.type,i);if(n.dom=u,!Z(a)&&a!==""&&(i?u.setAttribute("class",a):u.className=a),fe(e)||Ia(e,u),(c&1)===0){var f=i===!0&&n.type!=="foreignObject";c===2?Ke(s,u,t,f):c&12&&Ls(s,u,t,f)}return fe(o)||xm(n,r,o,u,i),G(l)&&hu(u,l),u}function Ls(n,e,t,i){for(var r=0,s=n.length;r<s;r++){var o=n[r];fe(o.dom)||(n[r]=o=je(o)),Ke(o,e,t,i)}}function xO(n,e,t,i,r){var s,o=n.type,a=n.props||Me,l=n.ref;if(r){var c=bm(n,o,a,t);n.dom=s=Ke(c.$LI,null,c.$CX,i),Om(n,l,c),c.$UPD=!1}else{var u=js(o(a,t),n);n.children=u,n.dom=s=Ke(u,null,t,i),km(a,l,s)}return fe(e)||Ia(e,s),s}function bO(n){return function(){n.$UPD=!0,n.componentDidMount(),n.$UPD=!1}}function Om(n,e,t){G(e)&&e(t),G(t.componentDidMount)&&sn.push(bO(t))}function wO(n,e,t){return function(){return n.onComponentDidMount(e,t)}}function km(n,e,t){Z(e)||(G(e.onComponentWillMount)&&e.onComponentWillMount(n),G(e.onComponentDidMount)&&sn.push(wO(e,t,n)))}function hu(n,e){sn.push(function(){return e(n)})}function OO(n,e,t,i,r){var s=n.type,o=n.ref,a=n.props||Me;if(r){var l=bm(n,s,a,t),c=l.$LI;qs(c,e,l.$CX,i),n.dom=c.dom,Om(n,o,l),l.$UPD=!1}else{var u=js(s(a,t),n);qs(u,e,t,i),n.children=u,n.dom=u.dom,km(a,o,e)}}function kO(n,e,t,i){var r=n.children,s=n.props,o=n.className,a=n.flags,l=n.ref;if(i=i||(a&32)>0,e.nodeType!==1||e.tagName.toLowerCase()!==n.type){var c=wm(n,null,t,i);n.dom=c,au(e.parentNode,c,e)}else{n.dom=e;var u=e.firstChild,f=n.childFlags;if((f&1)===0){for(var h=null;u;)h=u.nextSibling,u.nodeType===8&&(u.data==="!"?e.replaceChild(document.createTextNode(""),u):e.removeChild(u)),u=h;if(u=e.firstChild,f===2)fe(u)?Ke(r,e,t,i):(h=u.nextSibling,qs(r,u,t,i),u=h);else if(f&12)for(var d=0,p=r.length;d<p;d++){var m=r[d];fe(u)?Ke(m,e,t,i):(h=u.nextSibling,qs(m,u,t,i),u=h)}for(;u;)h=u.nextSibling,e.removeChild(u),u=h}else!fe(e.firstChild)&&!oO(e,s)&&(e.textContent="",a&448&&(e.defaultValue=""));fe(s)||xm(n,a,s,e,i),Z(o)?e.className!==""&&e.removeAttribute("class"):i?e.setAttribute("class",o):e.className=o,G(l)&&hu(e,l)}}function CO(n,e){if(e.nodeType!==3){var t=iu(n,null);n.dom=t,au(e.parentNode,t,e)}else{var i=n.children;e.nodeValue!==i&&(e.nodeValue=i),n.dom=e}}function qs(n,e,t,i){var r=n.flags;r&14?OO(n,e,t,i,(r&4)>0):r&481?kO(n,e,t,i):r&16?CO(n,e):r&512?n.dom=e:Jw()}function SO(n,e,t){var i=e.firstChild;if(!fe(i))for(Yn(n)||qs(n,i,Me,!1),i=e.firstChild;i=i.nextSibling;)e.removeChild(i);sn.length>0&&lu(sn),e.$V=n,G(t)&&t()}function du(n,e,t,i,r){ki(n),au(t,Ke(e,null,i,r),n.dom)}function Cn(n,e,t,i,r){var s=e.flags|0;n.flags!==s||s&2048?du(n,e,t,i,r):s&481?_O(n,e,t,i,r,s):s&14?TO(n,e,t,i,r,(s&4)>0):s&16?MO(n,e):s&512?e.dom=n.dom:AO(n,e,i)}function EO(n,e){n.textContent!==e.children&&(n.textContent=e.children)}function AO(n,e,t){var i=n.type,r=e.type,s=e.children;if(Cm(n.childFlags,e.childFlags,n.children,s,i,t,!1),e.dom=n.dom,i!==r&&!Yn(s)){var o=s.dom;i.removeChild(o),r.appendChild(o)}}function _O(n,e,t,i,r,s){var o=e.type;if(n.type!==o)du(n,e,t,i,r);else{var a=n.dom,l=n.props,c=e.props,u=!1,f=!1,h;if(e.dom=a,r=r||(s&32)>0,l!==c){var d=l||Me;if(h=c||Me,h!==Me){u=(s&448)>0,u&&(f=vm(h));for(var p in h){var m=d[p],y=h[p];m!==y&&nu(p,m,y,a,r,f,n)}}if(d!==Me)for(var g in d)!h.hasOwnProperty(g)&&!Z(d[g])&&nu(g,d[g],null,a,r,f,n)}var w=n.children,x=e.children,b=e.ref,C=n.className,k=e.className;s&4096?EO(a,x):Cm(n.childFlags,e.childFlags,w,x,a,i,r&&o!=="foreignObject"),u&&ym(s,e,a,h,!1,f),C!==k&&(Z(k)?a.removeAttribute("class"):r?a.setAttribute("class",k):a.className=k),G(b)&&n.ref!==b&&hu(a,b)}}function Cm(n,e,t,i,r,s,o){switch(n){case 2:switch(e){case 2:Cn(t,i,r,s,o);break;case 1:kt(t,r);break;default:kt(t,r),Ls(i,r,s,o);break}break;case 1:switch(e){case 2:Ke(i,r,s,o);break;case 1:break;default:Ls(i,r,s,o);break}break;default:if(e&12){var a=t.length,l=i.length;a===0?l>0&&Ls(i,r,s,o):l===0?Pa(r,t):e===8&&n===8?PO(t,i,r,s,o,a,l):RO(t,i,r,s,o,a,l)}else e===1?Pa(r,t):e===2&&(Pa(r,t),Ke(i,r,s,o));break}}function Sm(n,e,t,i,r,s,o,a,l){var c=n.state,u=n.props;t.children=n;var f;if(!n.$UN){if(u!==i||i===Me){if(!l&&G(n.componentWillReceiveProps)){if(n.$BR=!0,n.componentWillReceiveProps(i,s),n.$UN)return;n.$BR=!1}n.$PSS&&(e=Ns(e,n.$PS),n.$PSS=!1,n.$PS=null)}var h=!!n.shouldComponentUpdate;if(a||!h||h&&n.shouldComponentUpdate(i,e,s)){G(n.componentWillUpdate)&&(n.$BS=!0,n.componentWillUpdate(i,e,s),n.$BS=!1),n.props=i,n.state=e,n.context=s,G(Ct.beforeRender)&&Ct.beforeRender(n),f=n.render(i,e,s),G(Ct.afterRender)&&Ct.afterRender(n);var d=f!==ru,p;if(G(n.getChildContext)&&(p=n.getChildContext()),Z(p)?p=s:p=Ns(s,p),n.$CX=p,d){var m=n.$LI,y=js(f,t);Cn(m,y,r,p,o),n.$LI=y,G(n.componentDidUpdate)&&n.componentDidUpdate(u,c)}}else n.props=i,n.state=e,n.context=s;t.dom=n.$LI.dom}}function TO(n,e,t,i,r,s){var o=e.type,a=n.key,l=e.key;if(n.type!==o||a!==l)du(n,e,t,i,r);else{var c=e.props||Me;if(s){var u=n.children;u.$UPD=!0,u.$V=e,Sm(u,u.state,e,c,t,i,r,!1,!1),u.$UPD=!1}else{var f=!0,h=n.props,d=e.ref,p=!Z(d),m=n.children;if(e.dom=n.dom,e.children=m,p&&G(d.onComponentShouldUpdate)&&(f=d.onComponentShouldUpdate(h,c)),f!==!1){p&&G(d.onComponentWillUpdate)&&d.onComponentWillUpdate(h,c);var y=o(c,i);y!==ru&&(y=js(y,e),Cn(m,y,t,i,r),e.children=y,e.dom=y.dom,p&&G(d.onComponentDidUpdate)&&d.onComponentDidUpdate(h,c))}else m.flags&14&&(m.parentVNode=e)}}}function MO(n,e){var t=e.children,i=n.dom;t!==n.children&&(i.nodeValue=t),e.dom=i}function RO(n,e,t,i,r,s,o){for(var a=s>o?o:s,l=0,c,u;l<a;l++)c=e[l],u=n[l],c.dom&&(c=e[l]=je(c)),Cn(u,c,t,i,r),n[l]=c;if(s<o)for(l=a;l<o;l++)c=e[l],c.dom&&(c=e[l]=je(c)),Ke(c,t,i,r);else if(s>o)for(l=a;l<s;l++)kt(n[l],t)}function PO(n,e,t,i,r,s,o){var a=s-1,l=o-1,c,u=0,f=n[u],h=e[u],d;e:{for(;f.key===h.key;){if(h.dom&&(e[u]=h=je(h)),Cn(f,h,t,i,r),n[u]=h,u++,u>a||u>l)break e;f=n[u],h=e[u]}for(f=n[a],h=e[l];f.key===h.key;){if(h.dom&&(e[l]=h=je(h)),Cn(f,h,t,i,r),n[a]=h,a--,l--,u>a||u>l)break e;f=n[a],h=e[l]}}if(u>a){if(u<=l){d=l+1;for(var p=d<o?e[d].dom:null;u<=l;)h=e[u],h.dom&&(e[u]=h=je(h)),u++,Ma(t,Ke(h,null,i,r),p)}}else if(u>l)for(;u<=a;)kt(n[u++],t);else{var m=u,y=u,g=a-u+1,w=l-u+1,x=[];for(c=0;c<w;c++)x.push(0);var b=g===s,C=!1,k=0,O=0;if(o<4||(g|w)<32)for(c=m;c<=a;c++)if(f=n[c],O<w){for(u=y;u<=l;u++)if(h=e[u],f.key===h.key){if(x[u-y]=c+1,b)for(b=!1;c>m;)kt(n[m++],t);k>u?C=!0:k=u,h.dom&&(e[u]=h=je(h)),Cn(f,h,t,i,r),O++;break}!b&&u>l&&kt(f,t)}else b||kt(f,t);else{var v={};for(c=y;c<=l;c++)v[e[c].key]=c;for(c=m;c<=a;c++)if(f=n[c],O<w)if(u=v[f.key],u!==void 0){if(b)for(b=!1;c>m;)kt(n[m++],t);h=e[u],x[u-y]=c+1,k>u?C=!0:k=u,h.dom&&(e[u]=h=je(h)),Cn(f,h,t,i,r),O++}else b||kt(f,t);else b||kt(f,t)}if(b)Pa(t,n),Ls(e,t,i,r);else if(C){var A=DO(x);for(u=A.length-1,c=w-1;c>=0;c--)x[c]===0?(k=c+y,h=e[k],h.dom&&(e[k]=h=je(h)),d=k+1,Ma(t,Ke(h,null,i,r),d<o?e[d].dom:null)):u<0||c!==A[u]?(k=c+y,h=e[k],d=k+1,Ma(t,h.dom,d<o?e[d].dom:null)):u--}else if(O!==w)for(c=w-1;c>=0;c--)x[c]===0&&(k=c+y,h=e[k],h.dom&&(e[k]=h=je(h)),d=k+1,Ma(t,Ke(h,null,i,r),d<o?e[d].dom:null))}}function DO(n){var e=n.slice(),t=[0],i,r,s,o,a,l=n.length;for(i=0;i<l;i++){var c=n[i];if(c!==0){if(r=t[t.length-1],n[r]<c){e[i]=r,t.push(i);continue}for(s=0,o=t.length-1;s<o;)a=(s+o)/2|0,n[t[a]]<c?s=a+1:o=a;c<n[t[s]]&&(s>0&&(e[i]=t[s-1]),t[s]=i)}}for(s=t.length,o=t[s-1];s-- >0;)t[s]=o,o=e[o];return t}function or(n,e,t){if(n!==ru){var i=e.$V;if(Z(i)?Yn(n)||(n.dom&&(n=je(n)),fe(e.firstChild)?(Ke(n,e,Me,!1),e.$V=n):SO(n,e),i=n):Z(n)?(kt(i,e),e.$V=null):(n.dom&&(n=je(n)),Cn(i,n,e,Me,!1),i=e.$V=n),sn.length>0&&lu(sn),G(t)&&t(),G(Ct.renderComplete)&&Ct.renderComplete(i),i&&i.flags&14)return i.children}}function Em(n,e){return E(1024,e,null,n,0,null,Yn(n)?null:n.key,null)}var om=typeof Promise=="undefined"?null:Promise.resolve(),BO=typeof requestAnimationFrame=="undefined"?setTimeout:requestAnimationFrame.bind(window);function IO(n){return om?om.then(n):BO(n)}function am(n,e,t,i){G(e)&&(e=e(n.state,n.props,n.context));var r=n.$PS;if(Z(r))n.$PS=e;else for(var s in e)r[s]=e[s];if(!n.$PSS&&!n.$BR)if(!n.$UPD)n.$PSS=!0,n.$UPD=!0,Am(n,i,t),n.$UPD=!1;else{var o=n.$QU;fe(o)&&(o=n.$QU=[],IO($O(n,o))),G(t)&&o.push(t)}else n.$PSS=!0,n.$BR&&G(t)&&sn.push(t.bind(n))}function $O(n,e){return function(){n.$QU=null,n.$UPD=!0,Am(n,!1,function(){for(var t=0,i=e.length;t<i;t++)e[t].call(n)}),n.$UPD=!1}}function Am(n,e,t){if(!n.$UN){if(e||!n.$BR){n.$PSS=!1;var i=n.$PS,r=n.state,s=Ns(r,i),o=n.props,a=n.context;n.$PS=null;var l=n.$V,c=n.$LI,u=c.dom&&c.dom.parentNode;if(Sm(n,s,l,o,u,a,(l.flags&32)>0,e,!0),n.$UN)return;if((n.$LI.flags&1024)===0)for(var f=n.$LI.dom;!fe(l=l.parentVNode);)(l.flags&14)>0&&(l.dom=f);sn.length>0&&lu(sn)}else n.state=n.$PS,n.$PS=null;G(t)&&t.call(n)}}var z=(function(){function n(t,i){this.state=null,this.props=void 0,this.context=void 0,this.refs=void 0,this.$BR=!1,this.$BS=!0,this.$PSS=!1,this.$PS=null,this.$LI=null,this.$V=null,this.$UN=!1,this.$CX=null,this.$UPD=!0,this.$QU=null,this.props=t||Me,this.context=i||Me}var e=n.prototype;return e.forceUpdate=function(i){this.$UN||am(this,{},i,!0)},e.setState=function(i,r){if(!this.$UN)if(!this.$BS)am(this,i,r,!1);else return},e.render=function(i,r,s){},n})();z.defaultProps=void 0;var _m='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21" style="vertical-align:middle"><path fill="#000000" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="#000000" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>';function pu(n){var e='<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" style="position: absolute; bottom: 15px; right: 15px; z-index: 100;">'+_m+"</a>",t=le(e);n.appendChild(t),Oa.bind(t,"click",function(i){jO(),i.preventDefault()})}var Kn=class extends z{constructor(e,t){super(e,t),this.node=null}componentDidMount(){pu(this.node)}render(){return E(1,"div",null,null,1,null,null,e=>this.node=e)}};function mu(n){return n.join(";")}var LO=mu(["z-index: 1001","position: fixed","top: 0","left: 0","right: 0","bottom: 0"]),NO=mu(["width: 100%","height: 100%","background: rgba(40,40,40,0.2)"]),qO=mu(["position: absolute","left: 50%","top: 40%","transform: translate(-50%)","width: 260px","padding: 10px","background: white","box-shadow: 0 1px 4px rgba(0,0,0,0.3)","font-family: Helvetica, Arial, sans-serif","font-size: 14px","display: flex","line-height: 1.3"]),FO='<div class="bjs-powered-by-lightbox" style="'+LO+'"><div class="backdrop" style="'+NO+'"></div><div class="notice" style="'+qO+'"><a href="https://bpmn.io" target="_blank" rel="noopener" style="margin: 15px 20px 15px 10px; align-self: center;">'+_m+'</a><span>Web-based tooling for BPMN, DMN and CMMN diagrams powered by <a href="https://bpmn.io" target="_blank" rel="noopener">bpmn.io</a>.</span></div></div>',Vs;function jO(){Vs||(Vs=le(FO),On.bind(Vs,".backdrop","click",function(n){document.body.removeChild(Vs)})),document.body.appendChild(Vs)}function VO(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var gu={exports:{}},Tm;function QO(){if(Tm)return gu.exports;Tm=1;var n=gu.exports=function(e,t){if(t||(t=16),e===void 0&&(e=128),e<=0)return"0";for(var i=Math.log(Math.pow(2,e))/Math.log(t),r=2;i===1/0;r*=2)i=Math.log(Math.pow(2,e/r))/Math.log(t)*r;for(var s=i-Math.floor(i),o="",r=0;r<Math.floor(i);r++){var a=Math.floor(Math.random()*t).toString(t);o=a+o}if(s){var l=Math.pow(t,s),a=Math.floor(Math.random()*l).toString(t);o=a+o}var c=parseInt(o,t);return c!==1/0&&c>=Math.pow(2,e)?n(e,t):o};return n.rack=function(e,t,i){var r=function(o){var a=0;do{if(a++>10)if(i)e+=i;else throw new Error("too many ID collisions, use more bits");var l=n(e,t)}while(Object.hasOwnProperty.call(s,l));return s[l]=o,l},s=r.hats={};return r.get=function(o){return r.hats[o]},r.set=function(o,a){return r.hats[o]=a,r},r.bits=e||128,r.base=t||16,r},gu.exports}var zO=QO(),WO=VO(zO);function an(n){if(!(this instanceof an))return new an(n);n=n||[128,36,1],this._seed=n.length?WO.rack(n[0],n[1],n[2]):n}an.prototype.next=function(n){return this._seed(n||!0)};an.prototype.nextPrefixed=function(n,e){var t;do t=n+this.next(!0);while(this.assigned(t));return this.claim(t,e),t};an.prototype.claim=function(n,e){this._seed.set(n,e||!0)};an.prototype.assigned=function(n){return this._seed.get(n)||!1};an.prototype.unclaim=function(n){delete this._seed.hats[n]};an.prototype.clear=function(){var n=this._seed.hats,e;for(e in n)this.unclaim(e)};var HO=new an,$a="hsl(225, 10%, 15%)";function Qs(n,e,t,i,r,s){it.call(this,e);var o=HO.next(),a=i.computeStyle,l={},c=n&&n.defaultFillColor||"white",u=n&&n.defaultStrokeColor||$a,f=n&&n.defaultLabelColor;function h(O,v,A){var S=O+"-"+Rm(v)+"-"+Rm(A)+"-"+o;return l[S]||p(S,O,v,A),"url(#"+S+")"}function d(O,v){var A=D({strokeWidth:1,strokeLinecap:"round",strokeDasharray:"none"},v.attrs),S=v.ref||{x:0,y:0},M=v.scale||1;A.strokeDasharray==="none"&&(A.strokeDasharray=[1e4,1]);var _=ie("marker");K(v.element,A),ve(_,v.element),K(_,{id:O,viewBox:"0 0 20 20",refX:S.x,refY:S.y,markerWidth:20*M,markerHeight:20*M,orient:"auto"});var P=jt("defs",s._svg);P||(P=ie("defs"),ve(s._svg,P)),ve(P,_),l[O]=_}function p(O,v,A,S){if(v==="association-start"){var M=ie("path");K(M,{d:"M 11 5 L 1 10 L 11 15"}),d(O,{element:M,attrs:{fill:"none",stroke:S,strokeWidth:1.5},ref:{x:1,y:10},scale:.5})}else if(v==="association-end"){var _=ie("path");K(_,{d:"M 1 5 L 11 10 L 1 15"}),d(O,{element:_,attrs:{fill:"none",stroke:S,strokeWidth:1.5},ref:{x:12,y:10},scale:.5})}else if(v==="information-requirement-end"){var P=ie("path");K(P,{d:"M 1 5 L 11 10 L 1 15 Z"}),d(O,{element:P,attrs:{fill:S,stroke:"none"},ref:{x:11,y:10},scale:1})}else if(v==="knowledge-requirement-end"){var j=ie("path");K(j,{d:"M 1 3 L 11 10 L 1 17"}),d(O,{element:j,attrs:{fill:"none",stroke:S,strokeWidth:2},ref:{x:11,y:10},scale:.8})}else if(v==="authority-requirement-end"){var oe=ie("circle");K(oe,{cx:3,cy:3,r:3}),d(O,{element:oe,attrs:{fill:S,stroke:"none"},ref:{x:3,y:3},scale:.9})}}function m(O,v,A,S,M,_){dt(M)&&(_=M,M=0),M=M||0,_=a(_,{stroke:$a,strokeWidth:2,fill:"white"});var P=ie("rect");return K(P,{x:M,y:M,width:v-M*2,height:A-M*2,rx:S,ry:S}),K(P,_),ve(O,P),P}function y(O,v,A){var S=r.createText(v||"",A);return tr(S,"class","djs-label"),ve(O,S),S}function g(O,v,A,S){var M=Zp(v);return S=D({box:v,align:A,padding:5,style:{fill:Pm(v,f,u)}},S),y(O,M,S)}function w(O,v,A){A=a(A,["no-fill"],{strokeWidth:2,stroke:$a});var S=ie("path");return K(S,{d:v}),K(S,A),ve(O,S),S}var x={"dmn:Decision":function(O,v){var A=m(O,v.width,v.height,0,{stroke:ln(v,u),fill:Gn(v,c)});return g(O,v,"center-middle"),A},"dmn:KnowledgeSource":function(O,v){var A=t.getScaledPath("KNOWLEDGE_SOURCE",{xScaleFactor:1.021,yScaleFactor:1,containerWidth:v.width,containerHeight:v.height,position:{mx:0,my:.075}}),S=w(O,A,{strokeWidth:2,fill:Gn(v,c),stroke:ln(v,u)});return g(O,v,"center-middle"),S},"dmn:BusinessKnowledgeModel":function(O,v){var A=t.getScaledPath("BUSINESS_KNOWLEDGE_MODEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:v.width,containerHeight:v.height,position:{mx:0,my:.3}}),S=w(O,A,{strokeWidth:2,fill:Gn(v,c),stroke:ln(v,u)});return g(O,v,"center-middle"),S},"dmn:InputData":function(O,v){var A=m(O,v.width,v.height,22,{stroke:ln(v,u),fill:Gn(v,c)});return g(O,v,"center-middle"),A},"dmn:TextAnnotation":function(O,v){var A={fill:"none",stroke:"none"},S=m(O,v.width,v.height,0,0,A),M=t.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:v.width,containerHeight:v.height,position:{mx:0,my:0}});w(O,M,{stroke:ln(v,u)});var _=Mm(v).text||"";return y(O,_,{style:{fill:Pm(v,f,u)},box:v,align:"left-top",padding:5}),S},"dmn:Association":function(O,v){var A=Mm(v),S=Gn(v,c),M=ln(v,u),_={stroke:M,strokeDasharray:"0.5, 5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"};return(A.associationDirection==="One"||A.associationDirection==="Both")&&(_.markerEnd=h("association-end",S,M)),A.associationDirection==="Both"&&(_.markerStart=h("association-start",S,M)),k(O,v.waypoints,_)},"dmn:InformationRequirement":function(O,v){var A=Gn(v,c),S=ln(v,u),M={stroke:S,strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round",markerEnd:h("information-requirement-end",A,S)};return k(O,v.waypoints,M)},"dmn:KnowledgeRequirement":function(O,v){var A=Gn(v,c),S=ln(v,u),M={stroke:S,strokeWidth:1,strokeDasharray:5,strokeLinecap:"round",strokeLinejoin:"round",markerEnd:h("knowledge-requirement-end",A,S)};return k(O,v.waypoints,M)},"dmn:AuthorityRequirement":function(O,v){var A=Gn(v,c),S=ln(v,u),M={stroke:S,strokeWidth:1.5,strokeDasharray:5,strokeLinecap:"round",strokeLinejoin:"round",markerEnd:h("authority-requirement-end",A,S)};return k(O,v.waypoints,M)}};function b(O,v){var A=x[v.type];return A?A(O,v):it.prototype.drawShape.apply(this,[O,v])}function C(O,v){var A=v.type,S=x[A];return S?S(O,v):it.prototype.drawConnection.apply(this,[O,v])}function k(O,v,A){A=a(A,["no-fill"],{stroke:$a,strokeWidth:2,fill:"none"});var S=ir(v,A);return ve(O,S),S}this.canRender=function(O){return Q(O,"dmn:DMNElement")||Q(O,"dmn:InformationRequirement")||Q(O,"dmn:KnowledgeRequirement")||Q(O,"dmn:AuthorityRequirement")},this.drawShape=b,this.drawConnection=C}Vt(Qs,it);Qs.$inject=["config.drdRenderer","eventBus","pathMap","styles","textRenderer","canvas"];function Mm(n){return n.businessObject}function Rm(n){return n.replace(/[^0-9a-zA-z]+/g,"_")}function ln(n,e){return e}function Gn(n,e){return e}function Pm(n,e,t){return e||ln(n,t)}var XO=0,UO={width:150,height:50};function YO(n){var e=n.split("-");return{horizontal:e[0]||"center",vertical:e[1]||"top"}}function KO(n){return dt(n)?D({top:0,left:0,right:0,bottom:0},n):{top:n,left:n,right:n,bottom:n}}var yu=null;function GO(){return yu||(yu=document.createElement("canvas").getContext("2d")),yu}function JO(n){var e=[];return n.fontStyle&&e.push(n.fontStyle),n.fontVariant&&e.push(n.fontVariant),n.fontWeight&&e.push(n.fontWeight),n.fontStretch&&e.push(n.fontStretch),e.push(Bm(n.fontSize)||"12px"),e.push(n.fontFamily||"sans-serif"),e.join(" ")}function Bm(n){if(n!=null)return typeof n=="number"||/^-?\d+(\.\d+)?$/.test(n)?n+"px":n}function ZO(n,e){var t=GO();if(!t)return{width:0,height:0};t.font=JO(e),"letterSpacing"in t&&(t.letterSpacing=Bm(e.letterSpacing)||"0px");var i=n==="",r=i?"dummy":n.replace(/\s+$/,""),s=t.measureText(r);return{width:i?0:s.width,height:"fontBoundingBoxAscent"in s?s.fontBoundingBoxAscent+s.fontBoundingBoxDescent:s.actualBoundingBoxAscent+s.actualBoundingBoxDescent}}function ek(n,e,t){for(var i=n.shift(),r=i,s;;){if(s=ZO(r,t),s.width=r?s.width:0,r===" "||r===""||s.width<Math.round(e)||r.length<2)return tk(n,r,i,s);r=ik(r,s.width,e)}}function tk(n,e,t,i){if(e.length<t.length){var r=t.slice(e.length).trim();n.unshift(r)}return{width:i.width,height:i.height,text:e}}var Dm="\xAD";function nk(n,e){var t=n.split(/(\s|-|\u00AD)/g),i,r=[],s=0;if(t.length>1)for(;i=t.shift();)if(i.length+s<e)r.push(i),s+=i.length;else{(i==="-"||i===Dm)&&r.pop();break}var o=r[r.length-1];return o&&o===Dm&&(r[r.length-1]="-"),r.join("")}function ik(n,e,t){var i=Math.max(n.length*(t/e),1),r=nk(n,i);return r||(r=n.slice(0,Math.max(Math.round(i-1),1))),r}function ar(n){this._config=D({},{size:UO,padding:XO,style:{},align:"center-top"},n||{})}ar.prototype.createText=function(n,e){return this.layoutText(n,e).element};ar.prototype.getDimensions=function(n,e){return this.layoutText(n,e).dimensions};ar.prototype.layoutText=function(n,e){for(var t=D({},this._config.size,e.box),i=D({},this._config.style,e.style),r=YO(e.align||this._config.align),s=KO(e.padding!==void 0?e.padding:this._config.padding),o=e.fitBox||!1,a=rk(i),l=n.split(/\u00AD?\r?\n/),c=[],u=t.width-s.left-s.right;l.length;)c.push(ek(l,u,i));r.vertical==="middle"&&(s.top=s.bottom=0);var f=wt(c,function(y,g,w){return y+(a||g.height)},0)+s.top+s.bottom,h=wt(c,function(y,g,w){return g.width>y?g.width:y},0),d=s.top;r.vertical==="middle"&&(d+=(t.height-f)/2),d-=(a||c[0].height)/4;var p=ie("text");K(p,i),B(c,function(y){var g;switch(d+=a||y.height,r.horizontal){case"left":g=s.left;break;case"right":g=(o?h:u)-s.right-y.width;break;default:g=Math.max(((o?h:u)-y.width)/2+s.left,0)}var w=ie("tspan");K(w,{x:g,y:d}),w.textContent=y.text,ve(p,w)});var m={width:h,height:f};return{dimensions:m,element:p}};function rk(n){if("fontSize"in n&&"lineHeight"in n)return n.lineHeight*parseInt(n.fontSize,10)}var sk=12,ok=1.2,ak=30;function La(n){var e=D({fontFamily:"Arial, sans-serif",fontSize:sk,fontWeight:"normal",lineHeight:ok},n&&n.defaultStyle||{}),t=parseInt(e.fontSize,10)-1,i=D({},e,{fontSize:t},n&&n.externalStyle||{}),r=new ar({style:e});this.getExternalLabelBounds=function(s,o){var a=r.getDimensions(o,{box:{width:90,height:30,x:s.width/2+s.x,y:s.height/2+s.y},style:i});return{x:Math.round(s.x+s.width/2-a.width/2),y:Math.round(s.y),width:Math.ceil(a.width),height:Math.ceil(a.height)}},this.getTextAnnotationBounds=function(s,o){var a=r.getDimensions(o,{box:s,style:e,align:"left-top",padding:5});return{x:s.x,y:s.y,width:s.width,height:Math.max(ak,Math.round(a.height))}},this.createText=function(s,o){return r.createText(s,o||{})},this.getDefaultStyle=function(){return e},this.getExternalStyle=function(){return i}}La.$inject=["config.textRenderer"];function vu(){this.pathMap={KNOWLEDGE_SOURCE:{d:"m {mx},{my} l 0,{e.y0} c {e.x0},{e.y1} {e.x1},-{e.y2} {e.x2},-{e.y3} c {e.x3},-{e.y4} {e.x4},{e.y5} {e.x5},{e.y6} l 0,-{e.y7}z",width:100,height:65,widthElements:[29.8,48.4,67.2,12.2,19.8,30.8],heightElements:[55.3,19.7,4.2,6.7,2.3,1.6,6.2,54.6]},BUSINESS_KNOWLEDGE_MODEL:{d:"m {mx},{my} l {e.x0},-{e.y0} l {e.x1},0 l 0,{e.y1} l -{e.x2},{e.y2} l -{e.x3},0z",width:125,height:45,widthElements:[13.8,109.2,13.8,109.1],heightElements:[13.2,29.8,13.2]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",width:10,height:30,widthElements:[10],heightElements:[30]}},this.getRawPath=function(e){return this.pathMap[e].d},this.getScaledPath=function(e,t){var i=this.pathMap[e],r,s;t.abspos?(r=t.abspos.x,s=t.abspos.y):(r=t.containerWidth*t.position.mx,s=t.containerHeight*t.position.my);var o={};if(t.position){for(var a=t.containerHeight/i.height*t.yScaleFactor,l=t.containerWidth/i.width*t.xScaleFactor,c=0;c<i.heightElements.length;c++)o["y"+c]=i.heightElements[c]*a;for(var u=0;u<i.widthElements.length;u++)o["x"+u]=i.widthElements[u]*l}var f=fk(i.d,{mx:r,my:s,e:o});return f}}var lk=/\{([^{}]+)\}/g,ck=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;function uk(n,e,t){var i=t;return e.replace(ck,function(r,s,o,a,l){s=s||a,i&&(s in i&&(i=i[s]),typeof i=="function"&&l&&(i=i()))}),i=(i==null||i==t?n:i)+"",i}function fk(n,e){return String(n).replace(lk,function(t,i){return uk(t,i,e)})}var Im={__init__:["drdRenderer"],drdRenderer:["type",Qs],textRenderer:["type",La],pathMap:["type",vu]};function Sn(n,e,t,i){this._eventBus=n,this._canvas=e,this._elementRegistry=i,this._elementFactory=t}Sn.$inject=["eventBus","canvas","elementFactory","elementRegistry"];Sn.prototype.root=function(n){var e=this._elementFactory.createRoot(xu(n));return this._canvas.setRootElement(e),e};Sn.prototype.add=function(n){var e=this._elementFactory,t=this._canvas,i=this._eventBus,r=n.di,s,o,a,l,c,u;if(r.$instanceOf("dmndi:DMNShape"))u=r.bounds,c=xu(n,{x:Math.round(u.x),y:Math.round(u.y),width:Math.round(u.width),height:Math.round(u.height)}),s=e.createShape(c),t.addShape(s),i.fire("drdElement.added",{element:s,di:r});else if(r.$instanceOf("dmndi:DMNEdge"))o=hk(r),a=this._getSource(n),l=this._getTarget(n),a&&l&&(c=xu(n,{hidden:!1,source:a,target:l,waypoints:o}),s=e.createConnection(c),t.addConnection(s),i.fire("drdElement.added",{element:s,di:r}));else throw new Error("unknown di for element "+n.id);return s};Sn.prototype._getSource=function(n){var e,t;if(Q(n,"dmn:Association")?t=n.sourceRef:Q(n,"dmn:InformationRequirement")?t=n.requiredDecision||n.requiredInput:Q(n,"dmn:KnowledgeRequirement")?t=n.requiredKnowledge:Q(n,"dmn:AuthorityRequirement")&&(t=n.requiredDecision||n.requiredInput||n.requiredAuthority),t&&(e=t.href),e)return this._getShape($m(e))};Sn.prototype._getTarget=function(n){return Q(n,"dmn:Association")?n.targetRef&&this._getShape($m(n.targetRef.href)):this._getShape(n.$parent.id)};Sn.prototype._getShape=function(n){return this._elementRegistry.get(n)};function xu(n,e){return D({id:n.id,type:n.$type,businessObject:n},e)}function hk(n){var e=n.waypoint;if(e)return zd(e,function(t){var i={x:t.x,y:t.y};return D({original:i},i)})}function $m(n){return n.split("#").pop()}var Lm={drdImporter:["type",Sn]};var Nm={__depends__:[Im,Lm]};function bu(n,e){return e=e||{},n.replace(/{([^}]+)}/g,function(t,i){return e[i]||"{"+i+"}"})}var rt={translate:["value",bu]};function wu(n){return n.originalEvent||n.srcEvent}function qm(n,e){return(wu(n)||n).button===e}function lr(n){return qm(n,0)}function Fm(n){return qm(n,1)}function jm(n){var e=wu(n)||n;return lr(n)&&e.shiftKey}function dk(n){return!0}function Na(n){return lr(n)||Fm(n)}var Vm=500;function qa(n,e,t){var i=this;function r(v,A,S){if(!a(v,A)){var M,_,P;S?_=e.getGraphics(S):(M=A.delegateTarget||A.target,M&&(_=M,S=e.get(_))),!(!_||!S)&&(P=n.fire(v,{element:S,gfx:_,originalEvent:A}),P===!1&&(A.stopPropagation(),A.preventDefault()))}}var s={};function o(v){return s[v]}function a(v,A){var S=c[v]||lr;return!S(A)}var l={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},c={"element.contextmenu":dk,"element.mousedown":Na,"element.mouseup":Na,"element.click":Na,"element.dblclick":Na};function u(v,A,S){var M=l[v];if(!M)throw new Error("unmapped DOM event name <"+v+">");return r(M,A,S)}var f="svg, .djs-element";function h(v,A,S,M){var _=s[S]=function(P){r(S,P)};M&&(c[S]=M),_.$delegate=On.bind(v,f,A,_)}function d(v,A,S){var M=o(S);M&&On.unbind(v,A,M.$delegate)}function p(v){B(l,function(A,S){h(v,S,A)})}function m(v){B(l,function(A,S){d(v,S,A)})}n.on("canvas.destroy",function(v){m(v.svg)}),n.on("canvas.init",function(v){p(v.svg)}),n.on(["shape.added","connection.added"],function(v){var A=v.element,S=v.gfx;n.fire("interactionEvents.createHit",{element:A,gfx:S})}),n.on(["shape.changed","connection.changed"],Vm,function(v){var A=v.element,S=v.gfx;n.fire("interactionEvents.updateHit",{element:A,gfx:S})}),n.on("interactionEvents.createHit",Vm,function(v){var A=v.element,S=v.gfx;i.createDefaultHit(A,S)}),n.on("interactionEvents.updateHit",function(v){var A=v.element,S=v.gfx;i.updateDefaultHit(A,S)});var y=C("djs-hit djs-hit-stroke"),g=C("djs-hit djs-hit-click-stroke"),w=C("djs-hit djs-hit-all"),x=C("djs-hit djs-hit-no-move"),b={all:w,"click-stroke":g,stroke:y,"no-move":x};function C(v,A){return A=D({stroke:"white",strokeWidth:15},A||{}),t.cls(v,["no-fill","no-border"],A)}function k(v,A){var S=b[A];if(!S)throw new Error("invalid hit type <"+A+">");return K(v,S),v}function O(v,A){ve(v,A)}this.removeHits=function(v){var A=gp(".djs-hit",v);B(A,bi)},this.createDefaultHit=function(v,A){var S=v.waypoints,M=v.isFrame,_;return S?this.createWaypointsHit(A,S):(_=M?"stroke":"all",this.createBoxHit(A,_,{width:v.width,height:v.height}))},this.createWaypointsHit=function(v,A){var S=ir(A);return k(S,"stroke"),O(v,S),S},this.createBoxHit=function(v,A,S){S=D({x:0,y:0},S);var M=ie("rect");return k(M,A),K(M,S),O(v,M),M},this.updateDefaultHit=function(v,A){var S=jt(".djs-hit",A);if(S)return v.waypoints?Xc(S,v.waypoints):K(S,{width:v.width,height:v.height}),S},this.fire=r,this.triggerMouseEvent=u,this.mouseHandler=o,this.registerEvent=h,this.unregisterEvent=d}qa.$inject=["eventBus","elementRegistry","styles"];var Qm={__init__:["interactionEvents"],interactionEvents:["type",qa]};function Jn(n,e){this._eventBus=n,this._canvas=e,this._selectedElements=[];var t=this;n.on(["shape.remove","connection.remove"],function(i){var r=i.element;t.deselect(r)}),n.on(["diagram.clear","root.set"],function(i){t.select(null)})}Jn.$inject=["eventBus","canvas"];Jn.prototype.deselect=function(n){var e=this._selectedElements,t=e.indexOf(n);if(t!==-1){var i=e.slice();e.splice(t,1),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:e})}};Jn.prototype.get=function(){return this._selectedElements};Jn.prototype.isSelected=function(n){return this._selectedElements.indexOf(n)!==-1};Jn.prototype.select=function(n,e){var t=this._selectedElements,i=t.slice();_e(n)||(n=n?[n]:[]);var r=this._canvas,s=r.getRootElement();n=n.filter(function(o){var a=r.findRoot(o);return s===a}),e?B(n,function(o){t.indexOf(o)===-1&&t.push(o)}):this._selectedElements=t=n.slice(),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:t})};var zm="hover",Wm="selected";function Fa(n,e){this._canvas=n;function t(r,s){n.addMarker(r,s)}function i(r,s){n.removeMarker(r,s)}e.on("element.hover",function(r){t(r.element,zm)}),e.on("element.out",function(r){i(r.element,zm)}),e.on("selection.changed",function(r){function s(c){i(c,Wm)}function o(c){t(c,Wm)}var a=r.oldSelection,l=r.newSelection;B(a,function(c){l.indexOf(c)===-1&&s(c)}),B(l,function(c){a.indexOf(c)===-1&&o(c)})})}Fa.$inject=["canvas","eventBus"];function ja(n,e,t,i){n.on("create.end",500,function(r){var s=r.context,o=s.canExecute,a=s.elements,l=s.hints||{},c=l.autoSelect;if(o){if(c===!1)return;_e(c)?e.select(c):e.select(a.filter(pk))}}),n.on("connect.end",500,function(r){var s=r.context,o=s.connection;o&&e.select(o)}),n.on("shape.move.end",500,function(r){var s=r.previousSelection||[],o=i.get(r.context.shape.id),a=we(s,function(l){return o.id===l.id});a||e.select(o)}),n.on("element.click",function(r){if(lr(r)){var s=r.element;s===t.getRootElement()&&(s=null);var o=e.isSelected(s),a=e.get().length>1,l=jm(r);if(o&&a)return l?e.deselect(s):e.select(s);o?e.deselect(s):e.select(s,l)}})}ja.$inject=["eventBus","selection","canvas","elementRegistry"];function pk(n){return!n.hidden}var Hm={__init__:["selectionVisuals","selectionBehavior"],__depends__:[Qm],selection:["type",Jn],selectionVisuals:["type",Fa],selectionBehavior:["type",ja]};function Va(n){this._counter=0,this._prefix=(n?n+"-":"")+Math.floor(Math.random()*1e9)+"-"}Va.prototype.next=function(){return this._prefix+ ++this._counter};var mk=new Va("ov"),gk=500;function ke(n,e,t,i){this._eventBus=e,this._canvas=t,this._elementRegistry=i,this._ids=mk,this._overlayDefaults=D({show:null,scale:!0},n&&n.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=yk(t.getContainer()),this._init()}ke.$inject=["config.overlays","eventBus","canvas","elementRegistry"];ke.prototype.get=function(n){if(tt(n)&&(n={id:n}),tt(n.element)&&(n.element=this._elementRegistry.get(n.element)),n.element){var e=this._getOverlayContainer(n.element,!0);return e?n.type?Qn(e.overlays,Cc({type:n.type})):e.overlays.slice():[]}else return n.type?Qn(this._overlays,Cc({type:n.type})):n.id?this._overlays[n.id]:null};ke.prototype.add=function(n,e,t){if(dt(e)&&(t=e,e=null),n.id||(n=this._elementRegistry.get(n)),!t.position)throw new Error("must specifiy overlay position");if(!t.html)throw new Error("must specifiy overlay html");if(!n)throw new Error("invalid element specified");var i=this._ids.next();return t=D({},this._overlayDefaults,t,{id:i,type:e,element:n,html:t.html}),this._addOverlay(t),i};ke.prototype.remove=function(n){var e=this.get(n)||[];_e(e)||(e=[e]);var t=this;B(e,function(i){var r=t._getOverlayContainer(i.element,!0);if(i&&($e(i.html),$e(i.htmlContainer),delete i.htmlContainer,delete i.element,delete t._overlays[i.id]),r){var s=r.overlays.indexOf(i);s!==-1&&r.overlays.splice(s,1)}})};ke.prototype.isShown=function(){return this._overlayRoot.style.display!=="none"};ke.prototype.show=function(){Qa(this._overlayRoot)};ke.prototype.hide=function(){Qa(this._overlayRoot,!1)};ke.prototype.clear=function(){this._overlays={},this._overlayContainers=[],wa(this._overlayRoot)};ke.prototype._updateOverlayContainer=function(n){var e=n.element,t=n.html,i=e.x,r=e.y;if(e.waypoints){var s=wi(e);i=s.x,r=s.y}Xm(t,i,r),tr(n.html,"data-container-id",e.id)};ke.prototype._updateOverlay=function(n){var e=n.position,t=n.htmlContainer,i=n.element,r=e.left,s=e.top;if(e.right!==void 0){var o;i.waypoints?o=wi(i).width:o=i.width,r=e.right*-1+o}if(e.bottom!==void 0){var a;i.waypoints?a=wi(i).height:a=i.height,s=e.bottom*-1+a}Xm(t,r||0,s||0),this._updateOverlayVisibilty(n,this._canvas.viewbox())};ke.prototype._createOverlayContainer=function(n){var e=le('<div class="djs-overlays" />');yi(e,{position:"absolute"}),this._overlayRoot.appendChild(e);var t={html:e,element:n,overlays:[]};return this._updateOverlayContainer(t),this._overlayContainers.push(t),t};ke.prototype._updateRoot=function(n){var e=n.scale||1,t="matrix("+[e,0,0,e,-1*n.x*e,-1*n.y*e].join(",")+")";Um(this._overlayRoot,t)};ke.prototype._getOverlayContainer=function(n,e){var t=we(this._overlayContainers,function(i){return i.element===n});return!t&&!e?this._createOverlayContainer(n):t};ke.prototype._addOverlay=function(n){var e=n.id,t=n.element,i=n.html,r,s;i.get&&i.constructor.prototype.jquery&&(i=i.get(0)),tt(i)&&(i=le(i)),s=this._getOverlayContainer(t),r=le('<div class="djs-overlay" data-overlay-id="'+e+'">'),yi(r,{position:"absolute"}),r.appendChild(i),n.type&&vi(r).add("djs-overlay-"+n.type);var o=this._canvas.findRoot(t),a=this._canvas.getRootElement();Qa(r,o===a),n.htmlContainer=r,s.overlays.push(n),s.html.appendChild(r),this._overlays[e]=n,this._updateOverlay(n),this._updateOverlayVisibilty(n,this._canvas.viewbox())};ke.prototype._updateOverlayVisibilty=function(n,e){var t=n.show,i=this._canvas.findRoot(n.element),r=t&&t.minZoom,s=t&&t.maxZoom,o=n.htmlContainer,a=this._canvas.getRootElement(),l=!0;(i!==a||t&&(ht(r)&&r>e.scale||ht(s)&&s<e.scale))&&(l=!1),Qa(o,l),this._updateOverlayScale(n,e)};ke.prototype._updateOverlayScale=function(n,e){var t=n.scale,i,r,s=n.htmlContainer,o,a="";t!==!0&&(t===!1?(i=1,r=1):(i=t.min,r=t.max),ht(i)&&e.scale<i&&(o=(1/e.scale||1)*i),ht(r)&&e.scale>r&&(o=(1/e.scale||1)*r)),ht(o)&&(a="scale("+o+","+o+")"),Um(s,a)};ke.prototype._updateOverlaysVisibilty=function(n){var e=this;B(this._overlays,function(t){e._updateOverlayVisibilty(t,n)})};ke.prototype._init=function(){var n=this._eventBus,e=this;function t(i){e._updateRoot(i),e._updateOverlaysVisibilty(i),e.show()}n.on("canvas.viewbox.changing",function(i){e.hide()}),n.on("canvas.viewbox.changed",function(i){t(i.viewbox)}),n.on(["shape.remove","connection.remove"],function(i){var r=i.element,s=e.get({element:r});B(s,function(l){e.remove(l.id)});var o=e._getOverlayContainer(r);if(o){$e(o.html);var a=e._overlayContainers.indexOf(o);a!==-1&&e._overlayContainers.splice(a,1)}}),n.on("element.changed",gk,function(i){var r=i.element,s=e._getOverlayContainer(r,!0);s&&(B(s.overlays,function(o){e._updateOverlay(o)}),e._updateOverlayContainer(s))}),n.on("element.marker.update",function(i){var r=e._getOverlayContainer(i.element,!0);r&&vi(r.html)[i.add?"add":"remove"](i.marker)}),n.on("root.set",function(){e._updateOverlaysVisibilty(e._canvas.viewbox())}),n.on("diagram.clear",this.clear,this)};function yk(n){var e=le('<div class="djs-overlay-container" />');return yi(e,{position:"absolute",width:0,height:0}),n.insertBefore(e,n.firstChild),e}function Xm(n,e,t){yi(n,{left:e+"px",top:t+"px"})}function Qa(n,e){n.style.display=e===!1?"none":""}function Um(n,e){n.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(t){n.style[t+"transform"]=e})}var za={__init__:["overlays"],overlays:["type",ke]};function cr(n,e,t){this._eventBus=n,this._canvas=e,this._translate=t,n.on("diagram.init",function(){this._init()},this),n.on("import.done",function(i){i.error||this.update()},this),this.HTML_MARKUP='<div class="dmn-definitions"><div class="dmn-definitions-name" title="'+this._translate("Definition name")+'" spellcheck="false"></div><div class="dmn-definitions-id" title="'+this._translate("Definition ID")+'" spellcheck="false"></div></div>'}cr.$inject=["eventBus","canvas","translate"];cr.prototype._init=function(){var n=this._canvas,e=this._eventBus,t=n.getContainer(),i=this._container=le(this.HTML_MARKUP);t.appendChild(i),this.nameElement=jt(".dmn-definitions-name",this._container),this.idElement=jt(".dmn-definitions-id",this._container),On.bind(i,".dmn-definitions-name, .dmn-definitions-id","mousedown",function(r){r.stopPropagation()}),e.fire("definitionIdView.create",{html:i})};cr.prototype.update=function(){var n=this._canvas.getRootElement().businessObject;this.nameElement.textContent=n.name,this.idElement.textContent=n.id};function Wa(n,e){function t(i,r){var s=e.getContainer();vi(s).toggle(i,r)}n.on("palette.create",function(){t("with-palette",!0)}),n.on("palette.changed",function(i){t("with-palette-two-column",i.twoColumn)})}Wa.$inject=["eventBus","canvas"];var Ym={__depends__:[rt],__init__:["definitionPropertiesView","definitionPropertiesPaletteAdapter"],definitionPropertiesView:["type",cr],definitionPropertiesPaletteAdapter:["type",Wa]};var Km=[{className:"dmn-icon-decision-table",matches:function(n){var e=Ot(n);return Q(e,"dmn:Decision")&&Q(e.decisionLogic,"dmn:DecisionTable")},title:"Open decision table"},{className:"dmn-icon-literal-expression",matches:function(n){var e=Ta(n);return Q(e,"dmn:LiteralExpression")},title:"Open literal expression"}],ur=class{constructor(e,t,i,r,s){this._injector=e,this._eventBus=t,this._overlays=i,this._translate=s,this._config=r||{enabled:!0},t.on(["shape.added"],({element:o})=>{for(let l=0;l<Km.length;l++){let{matches:c,className:u,title:f}=Km[l];var a=c&&c(o);a&&this.addOverlay(o,u,f)}})}addOverlay(e,t,i){let r=this._config.enabled!==!1,s=this._getOverlayNode(t,i,r),o=this._overlays.add(e,{position:{top:2,left:2},html:s});r&&(vi(s).add("interactive"),this.bindEventListener(e,s,o))}_getOverlayNode(e,t,i){let r=document.createElement("div");if(r.className="drill-down-overlay",!i){let o=document.createElement("span");return o.className=e,r.appendChild(o),r}let s=document.createElement("button");return s.type="button",s.className=e,s.title=this._translate(t),r.appendChild(s),r}bindEventListener(e,t,i){let r=this._overlays,s=this._eventBus,o=r._overlayRoot;On.bind(o,'[data-overlay-id="'+i+'"]',"click",()=>{s.fire("drillDown.click",{element:e})!==!1&&this.drillDown(e)})}drillDown(e){let t=this._injector.get("_parent",!1);if(!t)return!1;let i=t.getView(e.businessObject);return i?(t.open(i),!0):!1}};ur.$inject=["injector","eventBus","overlays","config.drillDown","translate"];var Gm={__depends__:[za,rt],__init__:["drillDown"],drillDown:["type",ur]};function Ve(n){this._container=this._createContainer(),pu(this._container),this._init(this._container,n)}Vt(Ve,kn);Ve.prototype.saveSVG=nr(function(n){var e=this;return new Promise(function(t){var i=e.get("canvas"),r=i.getActiveLayer(),s=jt("defs",i._svg),o=Mp(r),a=s&&s.outerHTML||"",l=r.getBBox(),c=`<?xml version="1.0" encoding="utf-8"?>
H A Ddmn-modeler.production.min.js249 `)}function xn(n,e){this._eventBus=n,this._canvas=e,this._providers=[],this._textbox=new On({container:e.getContainer(),keyHandler:at(this._handleKey,this),resizeHandler:at(this._handleResize,this)})}xn.$inject=["eventBus","canvas"];xn.prototype.registerProvider=function(n){this._providers.push(n)};xn.prototype.isActive=function(n){return!!(this._active&&(!n||this._active.element===n))};xn.prototype.cancel=function(){this._active&&(this._fire("cancel"),this.close())};xn.prototype._fire=function(n,e){this._eventBus.fire("directEditing."+n,e||{active:this._active})};xn.prototype.close=function(){this._textbox.destroy(),this._fire("deactivate"),this._active=null,this.resizable=void 0,this._canvas.restoreFocus&&this._canvas.restoreFocus()};xn.prototype.complete=function(){var n=this._active;if(n){var e,t=n.context.bounds,i=this.$textbox.getBoundingClientRect(),r=this.getValue(),o=n.context.text;(r!==o||i.height!==t.height||i.width!==t.width)&&(e=this._textbox.container.getBoundingClientRect(),n.provider.update(n.element,r,n.context.text,{x:i.left-e.left,y:i.top-e.top,width:i.width,height:i.height})),this._fire("complete"),this.close()}};xn.prototype.getValue=function(){return this._textbox.getValue()};xn.prototype._handleKey=function(n){n.stopPropagation();var e=n.keyCode||n.charCode;if(e===27)return n.preventDefault(),this.cancel();if(e===13&&!n.shiftKey)return n.preventDefault(),this.complete()};xn.prototype._handleResize=function(n){this._fire("resize",n)};xn.prototype.activate=function(n){if(this.isActive()&&this.cancel(),this._eventBus.fire("directEditing.activate.allowed",{element:n})===!1)return!1;var e,t=ye(this._providers,function(i){return(e=i.activate(n))?i:null});return e&&(this.$textbox=this._textbox.create(e.bounds,e.style,e.text,e.options),this._active={element:n,context:e,provider:t},e.options&&e.options.resizable&&(this.resizable=!0),this._fire("activate")),!!e};var AO={__depends__:[fo],__init__:["directEditing"],directEditing:["type",xn]};var MO="djs-label-hidden";function bs(n,e,t,i,r){this._canvas=n,this._modeling=i,this._textRenderer=r,this._eventBus=t,e.registerProvider(this),t.on("element.dblclick",function(o){e.activate(o.element)}),t.on(["autoPlace.start","canvas.viewbox.changing","drag.init","drillDown.click","element.mousedown","popupMenu.open","selection.changed"],function(){e.complete()}),t.on(["commandStack.changed"],function(){e.cancel()}),t.on("create.end",500,function(o){var s=o.shape;(O(s,"dmn:Decision")||O(s,"dmn:InputData")||O(s,"dmn:BusinessKnowledgeModel")||O(s,"dmn:KnowledgeSource")||O(s,"dmn:TextAnnotation"))&&e.activate(s)}),t.on("autoPlace.end",500,function(o){e.activate(o.shape)}),this._eventBus.on(["directEditing.complete","directEditing.cancel"],function(o){var s=o.active;if(s){var a=s.element.label||s.element;n.removeMarker(a,MO)}})}bs.$inject=["canvas","directEditing","eventBus","modeling","textRenderer"];bs.prototype.activate=function(n){var e=fs(n);if(Me(e)){var t={text:e},i=this.getEditingBBox(n);T(t,i);var r={},o=t.style||{};return O(n,"dmn:DRGElement")&&(T(r,{centerVertically:!0}),T(o,{backgroundColor:null,border:null})),O(n,"dmn:TextAnnotation")&&T(r,{resizable:!0}),T(t,{options:r,style:o}),this._canvas.addMarker(n,MO),t}};bs.prototype.getEditingBBox=function(n){var e=this._canvas,t=n.label||n,i=e.getAbsoluteBBox(t),r={x:i.x,y:i.y},o=e.zoom(),s=this._textRenderer.getDefaultStyle(),a=s.fontSize*o,l=s.lineHeight,c={fontFamily:this._textRenderer.getDefaultStyle().fontFamily,fontWeight:this._textRenderer.getDefaultStyle().fontWeight};return O(n,"dmn:DRGElement")&&(T(r,{width:i.width,height:i.height}),T(c,{fontSize:a+"px",lineHeight:l,paddingTop:7*o+"px",paddingBottom:7*o+"px",paddingLeft:5*o+"px",paddingRight:5*o+"px"})),O(n,"dmn:TextAnnotation")&&(T(r,{width:i.width,height:i.height,minWidth:30*o,minHeight:10*o}),T(c,{textAlign:"left",paddingTop:5*o+"px",paddingBottom:7*o+"px",paddingLeft:7*o+"px",paddingRight:5*o+"px",fontSize:a+"px",lineHeight:l})),{bounds:r,style:c}};bs.prototype.update=function(n,e,t,i){var r,o;O(n,"dmn:TextAnnotation")&&(o=this._canvas.getAbsoluteBBox(n),r={x:n.x,y:n.y,width:n.width/o.width*i.width,height:n.height/o.height*i.height}),yF(e)&&(e=null),this._modeling.updateLabel(n,e,r)};function yF(n){return!n||!n.trim()}var PO={__depends__:[xs,Cm,AO],__init__:["labelEditingProvider"],labelEditingProvider:["type",bs]};function Mf(n,e){e.invoke(ae,this),this.preExecute("connection.create",function(t){var i=t.connection,r=i.businessObject,o=t.source,s=t.target,a,l,c;O(i,"dmn:Association")?(l=r.sourceRef=n.create("dmn:DMNElementReference",{href:"#"+o.id}),l.$parent=r,c=r.targetRef=n.create("dmn:DMNElementReference",{href:"#"+s.id}),c.$parent=r):(a=r["required"+vF(o)]=n.create("dmn:DMNElementReference",{href:"#"+o.id}),a.$parent=r)},!0)}Mf.$inject=["drdFactory","injector"];fe(Mf,ae);function vF(n){if(O(n,"dmn:BusinessKnowledgeModel"))return"Knowledge";if(O(n,"dmn:Decision"))return"Decision";if(O(n,"dmn:InputData"))return"Input";if(O(n,"dmn:KnowledgeSource"))return"Authority"}var xF=500;function Pf(n,e,t,i){n.invoke(ae,this),this.preExecute(["connection.create","connection.reconnect"],function(o){var s=o.connection,a=o.newSource||o.source,l=o.newTarget||o.target;if(!(O(s,"dmn:InformationRequirement")&&!i.allowed("connection.connect",{connection:s,source:a,target:l}))&&O(s,"dmn:InformationRequirement")){var c=vt(a,l);o.hints||(o.hints={}),T(o.hints,bF(a,l,c))}},!0);function r(o,s,a){s||(s=o.incoming.filter(function(c){return O(c,"dmn:InformationRequirement")}));var l={};a?l[a]=s:l=wF(o,s),k(l,function(c,u){c=CF(c,u);var f=_F(c,o,u);c.forEach((h,d)=>{var p=f[d].start,m=f[d].end,g=e.layoutConnection(h,{connectionStart:p,connectionEnd:m});t.updateWaypoints(h,g)})})}this.postExecuted(["connection.create","connection.delete","connection.reconnect"],function(o){var s=o.connection,a=s.source||o.source,l=s.target||o.target;if(O(s,"dmn:InformationRequirement")){var c=vt(a,l),u=l.incoming.filter(f=>{var h=vt(f.source,f.target);return O(f,"dmn:InformationRequirement")&&DO(h,c)});u.length&&r(l,u,c)}},!0),this.preExecute("connection.reconnect",function(o){var s=o.connection,a=s.source,l=s.target;if(O(s,"dmn:InformationRequirement")){var c=vt(a,l),u=l.incoming.filter(f=>{var h=vt(f.source,f.target);return f!==s&&O(f,"dmn:InformationRequirement")&&DO(h,c)});u.length&&r(l,u,c)}},!0),this.postExecuted("elements.move",xF,function(o){var s=o.shapes,a=o.closure,l=a.enclosedConnections;s.forEach(function(c){if(Ge(c,["dmn:Decision","dmn:InputData"])){var u=c.incoming.filter(function(f){return O(f,"dmn:InformationRequirement")&&!l[f.id]});u.length&&r(c,u),c.outgoing.forEach(function(f){!O(f,"dmn:InformationRequirement")||l[f.id]||r(f.target)})}})},!0)}Pf.$inject=["injector","layouter","modeling","rules"];fe(Pf,ae);function bF(n,e,t){var i=le(n),r=le(e);return t.includes("bottom")?(i.y=n.y,r.y=e.y+e.height):t.includes("top")?(i.y=n.y+n.height,r.y=e.y):t.includes("right")?(i.x=n.x,r.x=e.x+e.width):(i.x=n.x+n.width,r.x=e.x),{connectionStart:i,connectionEnd:r}}function _F(n,e,t){return n.map(function(i,r){var o=i.source,s=le(o),a=G(o),l=G(e),c=n.length;return t.includes("bottom")?{start:{x:s.x,y:a.top},end:{x:l.left+e.width/(c+1)*(r+1),y:l.bottom}}:t.includes("top")?{start:{x:s.x,y:a.bottom},end:{x:l.left+e.width/(c+1)*(r+1),y:l.top}}:t.includes("right")?{start:{x:a.left,y:s.y},end:{x:l.right,y:l.top+e.height/(c+1)*(r+1)}}:{start:{x:a.right,y:s.y},end:{x:l.left,y:l.top+e.height/(c+1)*(r+1)}}})}function wF(n,e){var t={};return e.forEach(function(i){var r=vt(i.source,n).split("-").shift();t[r]||(t[r]=[]),t[r].push(i)}),t}function DO(n,e){return n&&e&&n.split("-").shift()===e.split("-").shift()}function CF(n,e){var t;return e.includes("top")||e.includes("bottom")?t="x":t="y",n.sort(function(i,r){return le(i.source)[t]-le(r.source)[t]})}function Df(n,e,t){n.invoke(ae,this),this.preExecute("connection.reconnect",function(i){var r=i.connection,o=i.newSource||r.source,s=i.newTarget||r.target,a=r.waypoints.slice(),l=t.allowed("connection.reconnect",{connection:r,source:o,target:s});!l||l.type===r.type||(i.connection=e.connect(o,s,{type:l.type,waypoints:a}),e.removeConnection(r))},!0)}fe(Df,ae);Df.$inject=["injector","modeling","rules"];function If(n,e,t){ae.call(this,n),this._modeling=e,this.postExecuted(["shape.replace"],1500,function(i){var r=i.context,o=r.oldShape,s=r.newShape;e.unclaimId(o.businessObject.id,o.businessObject),e.updateProperties(s,{id:o.id}),t.select(s)})}fe(If,ae);If.$inject=["eventBus","modeling","selection"];var IO="id",Gn=class extends ae{constructor(e){super(e),this.executed("element.updateProperties",this.updateIds.bind(this))}updateIds({context:e}){let{element:t,oldProperties:i,properties:r}=e,o=Ke(t);if(this.shouldSkipUpdate(o,i,r))return;let s=SF(o);s.get("drgElement").forEach(c=>{OF(c,i.id,r.id)}),s.get("artifact").forEach(c=>{kF(c,i.id,r.id)})}shouldSkipUpdate(e,t,i){return!EF(t,i)||!O(e,"dmn:DRGElement")&&!O(e,"dmn:TextAnnotation")}};Gn.$inject=["eventBus"];function EF(n,e){return IO in n&&IO in e}function SF(n){let e=n;for(;!O(e,"dmn:Definitions");)e=e.$parent;return e}function OF(n,e,t){k({authorityRequirement:()=>{n.authorityRequirement.forEach(r=>{let{requiredAuthority:o,requiredDecision:s,requiredInput:a}=r;o&&o.href===`#${e}`&&(o.href=`#${t}`),s&&s.href===`#${e}`&&(s.href=`#${t}`),a&&a.href===`#${e}`&&(a.href=`#${t}`)})},informationRequirement:()=>{n.informationRequirement.forEach(r=>{let{requiredDecision:o,requiredInput:s}=r;o&&o.href===`#${e}`&&(o.href=`#${t}`),s&&s.href===`#${e}`&&(s.href=`#${t}`)})},knowledgeRequirement:()=>{n.knowledgeRequirement.forEach(r=>{let{requiredKnowledge:o}=r;o&&o.href===`#${e}`&&(o.href=`#${t}`)})}},(r,o)=>{n[o]&&r()})}function kF(n,e,t){k({sourceRef:()=>{let{sourceRef:r}=n;r.href===`#${e}`&&(r.href=`#${t}`)},targetRef:()=>{let{targetRef:r}=n;r.href===`#${e}`&&(r.href=`#${t}`)}},(r,o)=>{n[o]&&r()})}var qi=class extends ae{constructor(t,i){super(t);M(this,"updateVariableFromLabel",({context:t})=>{let{element:i,newLabel:r}=t,o=Ke(i),s=o.variable;s&&this._modeling.updateProperties(s,{name:r})});M(this,"updateVariableFromElement",({context:t})=>{let{element:i,properties:r}=t,o=Ke(i);o.variable&&(O(i,"dmn:Decision")||O(i,"dmn:BusinessKnowledgeModel"))&&this.isNameChanged(r)&&(this.isVariable(i)||this.shouldSyncVariable(i)||this.syncElementVariableChange(o))});this._modeling=i,this.postExecuted("element.updateProperties",this.updateVariableFromElement),this.postExecuted("element.updateLabel",this.updateVariableFromLabel)}isNameChanged(t){return"name"in t}isVariable(t){let i=RF(t);return O(t,"dmn:InformationItem")&&i&&i.get("variable")===t}shouldSyncVariable(t){let i=Ke(t),r=i.get("variable");return r&&i.name===r.name}syncElementVariableChange(t){let i=t.get("name"),r=t.variable;this._modeling.updateProperties(r,{name:i})}};M(qi,"$inject",["eventBus","modeling"]);function RF(n){return n.$parent}var LO={__init__:["createConnectionBehavior","idChangeBehavior","nameChangeBehavior","layoutConnectionBehavior","replaceConnectionBehavior","replaceElementBehavior"],createConnectionBehavior:["type",Mf],idChangeBehavior:["type",Gn],nameChangeBehavior:["type",qi],layoutConnectionBehavior:["type",Pf],replaceConnectionBehavior:["type",Df],replaceElementBehavior:["type",If]};function Vi(n){ae.call(this,n),this.init()}Vi.$inject=["eventBus"];fe(Vi,ae);Vi.prototype.addRule=function(n,e,t){var i=this;typeof n=="string"&&(n=[n]),n.forEach(function(r){i.canExecute(r,e,function(o,s,a){return t(o)},!0)})};Vi.prototype.init=function(){};function Rr(n){n.invoke(Vi,this)}fe(Rr,Vi);Rr.$inject=["injector"];Rr.prototype.init=function(){this.addRule("connection.create",function(n){var e=n.source,t=n.target;return Px(e,t)}),this.addRule("connection.reconnect",function(n){var e=n.connection,t=n.source,i=n.target;return Px(t,i,e)}),this.addRule("connection.updateWaypoints",function(n){let e=n.connection;return{type:e.type,businessObject:e.businessObject}}),this.addRule("elements.move",function(n){var e=n.target,t=n.shapes,i=n.position;return $O(t,e,i)}),this.addRule("shape.create",function(n){var e=n.shape,t=n.target;return NO(e,t)}),this.addRule("shape.resize",function(n){var e=n.shape;return O(e,"dmn:TextAnnotation")})};Rr.prototype.canConnect=Px;Rr.prototype.canCreate=NO;Rr.prototype.canMove=$O;function Px(n,e){if(!n||BO(n)||!e||BO(e))return null;if(n===e)return!1;if(O(n,"dmn:BusinessKnowledgeModel")&&Ge(e,["dmn:BusinessKnowledgeModel","dmn:Decision"]))return{type:"dmn:KnowledgeRequirement"};if(O(n,"dmn:Decision")){if(O(e,"dmn:Decision"))return{type:"dmn:InformationRequirement"};if(O(e,"dmn:KnowledgeSource"))return{type:"dmn:AuthorityRequirement"}}if(O(n,"dmn:Definitions")||O(e,"dmn:Definitions"))return!1;if(O(n,"dmn:InputData")){if(O(e,"dmn:Decision"))return{type:"dmn:InformationRequirement"};if(O(e,"dmn:KnowledgeSource"))return{type:"dmn:AuthorityRequirement"}}return O(n,"dmn:KnowledgeSource")&&Ge(e,["dmn:BusinessKnowledgeModel","dmn:Decision","dmn:KnowledgeSource"])?{type:"dmn:AuthorityRequirement"}:O(n,"dmn:TextAnnotation")&&!O(e,"dmn:TextAnnotation")||!O(n,"dmn:TextAnnotation")&&O(e,"dmn:TextAnnotation")?{type:"dmn:Association"}:!1}function NO(n,e){return Ge(n,["dmn:BusinessKnowledgeModel","dmn:Decision","dmn:InputData","dmn:KnowledgeSource","dmn:TextAnnotation"])&&O(e,"dmn:Definitions")}function $O(n,e){return F(n)||(n=[n]),!!(!e||kt(n,function(t){return Ge(t,["dmn:BusinessKnowledgeModel","dmn:Decision","dmn:InputData","dmn:KnowledgeSource","dmn:TextAnnotation","dmn:InformationRequirement","dmn:AuthorityRequirement","dmn:KnowledgeRequirement","dmn:Association"])})&&O(e,"dmn:Definitions"))}function BO(n){return!!n.labelTarget}var jO={__depends__:[yn],__init__:["drdRules"],drdRules:["type",Rr]};function kn(n){this._model=n}kn.$inject=["moddle"];kn.prototype._needsId=function(n){return Ge(n,["dmn:Artifact","dmn:DMNElement","dmn:DRGElement","dmndi:DMNDiagram","dmndi:DMNDiagramElement"])};kn.prototype._ensureId=function(n){var e=(n.$type||"").replace(/^[^:]*:/g,"")+"_";!n.id&&this._needsId(n)&&(n.id=this._model.ids.nextPrefixed(e,n))};kn.prototype.create=function(n,e){var t=this._model.create(n,e||{});return this._ensureId(t),t};kn.prototype.createDiShape=function(n,e,t){return this.create("dmndi:DMNShape",T({dmnElementRef:n,bounds:this.createDiBounds(e)},t))};kn.prototype.createDiBounds=function(n){return this.create("dc:Bounds",n)};kn.prototype.createDiEdge=function(n,e,t){return this.create("dmndi:DMNEdge",{dmnElementRef:n,waypoint:this.createDiWaypoints(e)},t)};kn.prototype.createDiWaypoints=function(n){var e=this;return n.map(function(t){return e.createDiWaypoint(t)})};kn.prototype.createDiWaypoint=function(n){return this.create("dc:Point",hn(n,["x","y"]))};kn.prototype.createExtensionElements=function(){return this.create("dmn:ExtensionElements",{values:[]})};function Hi(n,e,t,i,r){r.invoke(ae,this),this._definitionPropertiesView=e,this._drdFactory=t,this._drdRules=i;var o=this;function s(f){var h=f.connection,d=f.cropped;d||(h.waypoints=n.getCroppedWaypoints(h),f.cropped=!0)}this.executed(["connection.create","connection.layout"],s,!0),this.reverted(["connection.layout"],function(f){delete f.cropped},!0);function a(f){var h=f.connection,d=f.parent,p=f.shape;h&&!O(h,"dmn:Association")&&(d=h.target),o.updateParent(p||h,d)}function l(f){var h=f.connection,d=f.shape,p=f.parent||f.newParent;h&&!O(h,"dmn:Association")&&(p=h.target),o.updateParent(d||h,p)}this.executed(["connection.create","connection.delete","connection.move","shape.create","shape.delete"],a,!0),this.reverted(["connection.create","connection.delete","connection.move","shape.create","shape.delete"],l,!0);function c(f){var h=f.shape;(O(h,"dmn:DRGElement")||O(h,"dmn:TextAnnotation"))&&o.updateBounds(h)}this.executed(["shape.create","shape.move","shape.resize"],c,!0),this.reverted(["shape.create","shape.move","shape.resize"],c,!0);function u(f){o.updateConnectionWaypoints(f)}this.executed(["connection.create","connection.layout","connection.move","connection.updateWaypoints"],u,!0),this.reverted(["connection.create","connection.layout","connection.move","connection.updateWaypoints"],u,!0),this.executed("connection.create",function(f){var h=f.connection,d=h.businessObject,p=f.target,m=p.businessObject;O(h,"dmn:Association")?a(f):o.updateSemanticParent(d,m)},!0),this.reverted("connection.create",function(f){l(f)},!0),this.executed("connection.reconnect",function(f){var h=f.connection,d=h.businessObject,p=f.newTarget,m=p.businessObject;O(d,"dmn:Association")||o.updateSemanticParent(d,m)},!0),this.reverted("connection.reconnect",function(f){var h=f.connection,d=h.businessObject,p=f.oldTarget,m=p.businessObject;O(d,"dmn:Association")||o.updateSemanticParent(d,m)},!0),this.executed("element.updateProperties",function(f){e.update()},!0),this.reverted("element.updateProperties",function(f){e.update()},!0)}fe(Hi,ae);Hi.$inject=["connectionDocking","definitionPropertiesView","drdFactory","drdRules","injector"];Hi.prototype.updateBounds=function(n){var e=n.businessObject,t=e.di.bounds;T(t,{x:n.x,y:n.y,width:n.width,height:n.height})};Hi.prototype.updateConnectionWaypoints=function(n){var e=this._drdFactory,t=n.connection,i=t.businessObject,r=i.di;r.waypoint=e.createDiWaypoints(t.waypoints).map(function(o){return o.$parent=r,o})};Hi.prototype.updateParent=function(n,e){var t=n.parent;!O(n,"dmn:DRGElement")&&!O(n,"dmn:Artifact")&&(t=e);var i=n.businessObject,r=t&&t.businessObject;this.updateSemanticParent(i,r),this.updateDiParent(i.di,r&&r.di)};Hi.prototype.updateSemanticParent=function(n,e){var t,i;n.$parent!==e&&(O(n,"dmn:DRGElement")?i="drgElement":O(n,"dmn:Artifact")?i="artifact":O(n,"dmn:InformationRequirement")?i="informationRequirement":O(n,"dmn:AuthorityRequirement")?i="authorityRequirement":O(n,"dmn:KnowledgeRequirement")&&(i="knowledgeRequirement"),n.$parent&&(t=n.$parent.get(i),Vn(t,n)),e?(t=e.get(i),t&&(t.push(n),n.$parent=e)):n.$parent=null)};Hi.prototype.updateDiParent=function(n,e){if(n.$parent!==e)if(Ge(n,["dmndi:DMNEdge","dmndi:DMNShape"])){for(var t=e||n;!O(t,"dmndi:DMNDiagram");)t=t.$parent;var i=t.get("diagramElements");e?(n.$parent=t,zt(i,n)):(n.$parent=null,Vn(i,n))}else throw new Error("unsupported")};function Na(n,e){this._modeling=n,this._canvas=e}Na.$inject=["modeling","canvas"];Na.prototype.preExecute=function(n){var e=this._modeling,t=n.elements,i=n.alignment;k(t,function(r){var o={x:0,y:0};Me(i.left)?o.x=i.left-r.x:Me(i.right)?o.x=i.right-r.width-r.x:Me(i.center)?o.x=i.center-Math.round(r.width/2)-r.x:Me(i.top)?o.y=i.top-r.y:Me(i.bottom)?o.y=i.bottom-r.height-r.y:Me(i.middle)&&(o.y=i.middle-Math.round(r.height/2)-r.y),e.moveElements([r],o,r.parent)})};Na.prototype.postExecute=function(n){};function $a(n){this._modeling=n}$a.$inject=["modeling"];$a.prototype.preExecute=function(n){var e=n.source;if(!e)throw new Error("source required");var t=n.target||e.parent,i=n.shape,r=n.hints||{};i=n.shape=this._modeling.createShape(i,n.position,t,{attach:r.attach}),n.shape=i};$a.prototype.postExecute=function(n){var e=n.hints||{};TF(n.source,n.shape)||(e.connectionTarget===n.source?this._modeling.connect(n.shape,n.source,n.connection):this._modeling.connect(n.source,n.shape,n.connection))};function TF(n,e){return zd(n.outgoing,function(t){return t.target===e})}function ja(n,e){this._canvas=n,this._layouter=e}ja.$inject=["canvas","layouter"];ja.prototype.execute=function(n){var e=n.connection,t=n.source,i=n.target,r=n.parent,o=n.parentIndex,s=n.hints;if(!t||!i)throw new Error("source and target required");if(!r)throw new Error("parent required");return e.source=t,e.target=i,e.waypoints||(e.waypoints=this._layouter.layoutConnection(e,s)),this._canvas.addConnection(e,r,o),e};ja.prototype.revert=function(n){var e=n.connection;return this._canvas.removeConnection(e),e.source=null,e.target=null,e};var Em=Math.round;function Lf(n){this._modeling=n}Lf.$inject=["modeling"];Lf.prototype.preExecute=function(n){var e=n.elements,t=n.parent,i=n.parentIndex,r=n.position,o=n.hints,s=this._modeling;k(e,function(f){se(f.x)||(f.x=0),se(f.y)||(f.y=0)});var a=Ee(e,function(f){return!f.hidden}),l=Tt(a);k(e,function(f){Xe(f)&&(f.waypoints=Vt(f.waypoints,function(h){return{x:Em(h.x-l.x-l.width/2+r.x),y:Em(h.y-l.y-l.height/2+r.y)}})),T(f,{x:Em(f.x-l.x-l.width/2+r.x),y:Em(f.y-l.y-l.height/2+r.y)})});var c=E1(e),u={};k(e,function(f){if(Xe(f)){u[f.id]=se(i)?s.createConnection(u[f.source.id],u[f.target.id],i,f,f.parent||t,o):s.createConnection(u[f.source.id],u[f.target.id],f,f.parent||t,o);return}var h=T({},o);c.indexOf(f)===-1&&(h.autoResize=!1),Bi(f)&&(h=Uu(h,["attach"])),u[f.id]=se(i)?s.createShape(f,hn(f,["x","y","width","height"]),f.parent||t,i,h):s.createShape(f,hn(f,["x","y","width","height"]),f.parent||t,h)}),n.elements=Wu(u)};var FO=Math.round;function gi(n){this._canvas=n}gi.$inject=["canvas"];gi.prototype.execute=function(n){var e=n.shape,t=n.position,i=n.parent,r=n.parentIndex;if(!i)throw new Error("parent required");if(!t)throw new Error("position required");return t.width!==void 0?T(e,t):T(e,{x:t.x-FO(e.width/2),y:t.y-FO(e.height/2)}),this._canvas.addShape(e,i,r),e};gi.prototype.revert=function(n){var e=n.shape;return this._canvas.removeShape(e),e};function _s(n){gi.call(this,n)}fe(_s,gi);_s.$inject=["canvas"];var AF=gi.prototype.execute;_s.prototype.execute=function(n){var e=n.shape;return PF(e),e.labelTarget=n.labelTarget,AF.call(this,n)};var MF=gi.prototype.revert;_s.prototype.revert=function(n){return n.shape.labelTarget=null,MF.call(this,n)};function PF(n){["width","height"].forEach(function(e){typeof n[e]=="undefined"&&(n[e]=0)})}function ws(n,e){if(typeof e!="function")throw new Error("removeFn iterator must be a function");if(!n)return[];for(var t;t=n[0];)e(t);return n}function Cs(n,e){this._canvas=n,this._modeling=e}Cs.$inject=["canvas","modeling"];Cs.prototype.preExecute=function(n){var e=this._modeling,t=n.connection;ws(t.incoming,function(i){e.removeConnection(i,{nested:!0})}),ws(t.outgoing,function(i){e.removeConnection(i,{nested:!0})})};Cs.prototype.execute=function(n){var e=n.connection,t=e.parent;return n.parent=t,n.parentIndex=op(t.children,e),n.source=e.source,n.target=e.target,this._canvas.removeConnection(e),e.source=null,e.target=null,e};Cs.prototype.revert=function(n){var e=n.connection,t=n.parent,i=n.parentIndex;return e.source=n.source,e.target=n.target,zt(t.children,e,i),this._canvas.addConnection(e,t),e};function Bf(n,e){this._modeling=n,this._elementRegistry=e}Bf.$inject=["modeling","elementRegistry"];Bf.prototype.postExecute=function(n){var e=this._modeling,t=this._elementRegistry,i=n.elements;k(i,function(r){t.get(r.id)&&(r.waypoints?e.removeConnection(r):e.removeShape(r))})};function Es(n,e){this._canvas=n,this._modeling=e}Es.$inject=["canvas","modeling"];Es.prototype.preExecute=function(n){var e=this._modeling,t=n.shape;ws(t.incoming,function(i){e.removeConnection(i,{nested:!0})}),ws(t.outgoing,function(i){e.removeConnection(i,{nested:!0})}),ws(t.children,function(i){Xe(i)?e.removeConnection(i,{nested:!0}):e.removeShape(i,{nested:!0})})};Es.prototype.execute=function(n){var e=this._canvas,t=n.shape,i=t.parent;return n.oldParent=i,n.oldParentIndex=op(i.children,t),e.removeShape(t),t};Es.prototype.revert=function(n){var e=this._canvas,t=n.shape,i=n.oldParent,r=n.oldParentIndex;return zt(i.children,t,r),e.addShape(t,i),t};function Fa(n){this._modeling=n}Fa.$inject=["modeling"];var qO={x:"y",y:"x"};Fa.prototype.preExecute=function(n){var e=this._modeling,t=n.groups,i=n.axis,r=n.dimension;function o(g,b){g.range.min=Math.min(b[i],g.range.min),g.range.max=Math.max(b[i]+b[r],g.range.max)}function s(g){return g[i]+g[r]/2}function a(g){return g.length-1}function l(g){return g.max-g.min}function c(g,b){var _={y:0};_[i]=g-s(b),_[i]&&(_[qO[i]]=0,e.moveElements([b],_,b.parent))}var u=t[0],f=a(t),h=t[f],d,p,m=0;k(t,function(g,b){var _,v,x;if(g.elements.length<2){b&&b!==t.length-1&&(o(g,g.elements[0]),m+=l(g.range));return}_=Fn(g.elements,i),v=_[0],b===f&&(v=_[a(_)]),x=s(v),g.range=null,k(_,function(C){if(c(x,C),g.range===null){g.range={min:C[i],max:C[i]+C[r]};return}o(g,C)}),b&&b!==t.length-1&&(m+=l(g.range))}),p=Math.abs(h.range.min-u.range.max),d=Math.round((p-m)/(t.length-1)),!(d<t.length-1)&&k(t,function(g,b){var _={},v;g===u||g===h||(v=t[b-1],g.range.max=0,k(g.elements,function(x,C){_[qO[i]]=0,_[i]=v.range.max-x[i]+d,g.range.min!==x[i]&&(_[i]+=x[i]-g.range.min),_[i]&&e.moveElements([x],_,x.parent),g.range.max=Math.max(x[i]+x[r],C?g.range.max:0)}))})};Fa.prototype.postExecute=function(n){};function qa(n,e){this._layouter=n,this._canvas=e}qa.$inject=["layouter","canvas"];qa.prototype.execute=function(n){var e=n.connection,t=e.waypoints;return T(n,{oldWaypoints:t}),e.waypoints=this._layouter.layoutConnection(e,n.hints),e};qa.prototype.revert=function(n){var e=n.connection;return e.waypoints=n.oldWaypoints,e};function Nf(){}Nf.prototype.execute=function(n){var e=n.connection,t=n.delta,i=n.newParent||e.parent,r=n.newParentIndex,o=e.parent;return n.oldParent=o,n.oldParentIndex=Vn(o.children,e),zt(i.children,e,r),e.parent=i,k(e.waypoints,function(s){s.x+=t.x,s.y+=t.y,s.original&&(s.original.x+=t.x,s.original.y+=t.y)}),e};Nf.prototype.revert=function(n){var e=n.connection,t=e.parent,i=n.oldParent,r=n.oldParentIndex,o=n.delta;return Vn(t.children,e),zt(i.children,e,r),e.parent=i,k(e.waypoints,function(s){s.x-=o.x,s.y-=o.y,s.original&&(s.original.x-=o.x,s.original.y-=o.y)}),e};function $f(n,e,t){var i=Yv(e),r=Yv(t),o=xr(n,i),s={x:o.x*(t.width/e.width),y:o.y*(t.height/e.height)};return ma({x:r.x+s.x,y:r.y+s.y})}function Va(n,e,t){var i=Sm(n),r=HO(i,e),o=i[0];return r.length?r[r.length-1]:$f(o.original||o,t,e)}function Ha(n,e,t){var i=Sm(n),r=HO(i,e),o=i[i.length-1];return r.length?r[0]:$f(o.original||o,t,e)}function za(n,e,t){var i=Sm(n),r=VO(e,t),o=i[0];return $f(o.original||o,r,e)}function Wa(n,e,t){var i=Sm(n),r=VO(e,t),o=i[i.length-1];return $f(o.original||o,r,e)}function VO(n,e){return{x:n.x-e.x,y:n.y-e.y,width:n.width,height:n.height}}function Sm(n){var e=n.waypoints;if(!e.length)throw new Error("connection#"+n.id+": no waypoints");return e}function HO(n,e){var t=Vt(n,IF);return Ee(t,function(i){return DF(i,e)})}function DF(n,e){return vt(e,n,1)==="intersect"}function IF(n){return n.original||n}function jf(){this.allShapes={},this.allConnections={},this.enclosedElements={},this.enclosedConnections={},this.topLevel={}}jf.prototype.add=function(n,e){return this.addAll([n],e)};jf.prototype.addAll=function(n,e){var t=k1(n,!!e,this);return T(this,t),this};function wo(n){this._modeling=n}wo.prototype.moveRecursive=function(n,e,t){return n?this.moveClosure(this.getClosure(n),e,t):[]};wo.prototype.moveClosure=function(n,e,t,i,r){var o=this._modeling,s=n.allShapes,a=n.allConnections,l=n.enclosedConnections,c=n.topLevel,u=!1;r&&r.parent===t&&(u=!0),k(s,function(f){o.moveShape(f,e,c[f.id]&&!u&&t,{recurse:!1,layout:!1})}),k(a,function(f){var h=!!s[f.source.id],d=!!s[f.target.id];l[f.id]&&h&&d?o.moveConnection(f,e,c[f.id]&&!u&&t):o.layoutConnection(f,{connectionStart:h&&za(f,f.source,e),connectionEnd:d&&Wa(f,f.target,e)})})};wo.prototype.getClosure=function(n){return new jf().addAll(n,!0)};function Ua(n){this._helper=new wo(n)}Ua.$inject=["modeling"];Ua.prototype.preExecute=function(n){n.closure=this._helper.getClosure(n.shapes)};Ua.prototype.postExecute=function(n){var e=n.hints,t;e&&e.primaryShape&&(t=e.primaryShape,e.oldParent=t.parent),this._helper.moveClosure(n.closure,n.delta,n.newParent,n.newHost,t)};function Tr(n){this._modeling=n,this._helper=new wo(n)}Tr.$inject=["modeling"];Tr.prototype.execute=function(n){var e=n.shape,t=n.delta,i=n.newParent||e.parent,r=n.newParentIndex,o=e.parent;return n.oldBounds=hn(e,["x","y","width","height"]),n.oldParent=o,n.oldParentIndex=Vn(o.children,e),zt(i.children,e,r),T(e,{parent:i,x:e.x+t.x,y:e.y+t.y}),e};Tr.prototype.postExecute=function(n){var e=n.shape,t=n.delta,i=n.hints,r=this._modeling;i.layout!==!1&&(k(e.incoming,function(o){r.layoutConnection(o,{connectionEnd:Wa(o,e,t)})}),k(e.outgoing,function(o){r.layoutConnection(o,{connectionStart:za(o,e,t)})})),i.recurse!==!1&&this.moveChildren(n)};Tr.prototype.revert=function(n){var e=n.shape,t=n.oldParent,i=n.oldParentIndex,r=n.delta;return zt(t.children,e,i),T(e,{parent:t,x:e.x-r.x,y:e.y-r.y}),e};Tr.prototype.moveChildren=function(n){var e=n.delta,t=n.shape;this._helper.moveRecursive(t.children,e,null)};Tr.prototype.getNewParent=function(n){return n.newParent||n.shape.parent};function Ss(n){this._modeling=n}Ss.$inject=["modeling"];Ss.prototype.execute=function(n){var e=n.newSource,t=n.newTarget,i=n.connection,r=n.dockingOrPoints;if(!e&&!t)throw new Error("newSource or newTarget required");return F(r)&&(n.oldWaypoints=i.waypoints,i.waypoints=r),e&&(n.oldSource=i.source,i.source=e),t&&(n.oldTarget=i.target,i.target=t),i};Ss.prototype.postExecute=function(n){var e=n.connection,t=n.newSource,i=n.newTarget,r=n.dockingOrPoints,o=n.hints||{},s={};o.connectionStart&&(s.connectionStart=o.connectionStart),o.connectionEnd&&(s.connectionEnd=o.connectionEnd),o.layoutConnection!==!1&&(t&&(!i||o.docking==="source")&&(s.connectionStart=s.connectionStart||zO(F(r)?r[0]:r)),i&&(!t||o.docking==="target")&&(s.connectionEnd=s.connectionEnd||zO(F(r)?r[r.length-1]:r)),o.newWaypoints&&(s.waypoints=o.newWaypoints),this._modeling.layoutConnection(e,s))};Ss.prototype.revert=function(n){var e=n.oldSource,t=n.oldTarget,i=n.oldWaypoints,r=n.connection;return e&&(r.source=e),t&&(r.target=t),i&&(r.waypoints=i),r};function zO(n){return n.original||n}function yi(n,e){this._modeling=n,this._rules=e}yi.$inject=["modeling","rules"];yi.prototype.preExecute=function(n){var e=this,t=this._modeling,i=this._rules,r=n.oldShape,o=n.newData,s=n.hints||{},a;function l(p,m,g){return i.allowed("connection.reconnect",{connection:g,source:p,target:m})}var c={x:o.x,y:o.y},u={x:r.x,y:r.y,width:r.width,height:r.height};a=n.newShape=n.newShape||e.createShape(o,c,r.parent,s),r.host&&t.updateAttachment(a,r.host);var f;s.moveChildren!==!1&&(f=r.children.slice(),t.moveElements(f,{x:0,y:0},a,s));var h=r.incoming.slice(),d=r.outgoing.slice();k(h,function(p){var m=p.source,g=l(m,a,p);g&&e.reconnectEnd(p,a,Ha(p,a,u),s)}),k(d,function(p){var m=p.target,g=l(a,m,p);g&&e.reconnectStart(p,a,Va(p,a,u),s)})};yi.prototype.postExecute=function(n){var e=n.oldShape;this._modeling.removeShape(e)};yi.prototype.execute=function(n){};yi.prototype.revert=function(n){};yi.prototype.createShape=function(n,e,t,i){return this._modeling.createShape(n,e,t,i)};yi.prototype.reconnectStart=function(n,e,t,i){this._modeling.reconnectStart(n,e,t,i)};yi.prototype.reconnectEnd=function(n,e,t,i){this._modeling.reconnectEnd(n,e,t,i)};function Os(n){this._modeling=n}Os.$inject=["modeling"];Os.prototype.execute=function(n){var e=n.shape,t=n.newBounds,i=n.minBounds;if(t.x===void 0||t.y===void 0||t.width===void 0||t.height===void 0)throw new Error("newBounds must have {x, y, width, height} properties");if(i&&(t.width<i.width||t.height<i.height))throw new Error("width and height cannot be less than minimum height and width");if(!i&&t.width<10||t.height<10)throw new Error("width and height cannot be less than 10px");return n.oldBounds={width:e.width,height:e.height,x:e.x,y:e.y},T(e,{width:t.width,height:t.height,x:t.x,y:t.y}),e};Os.prototype.postExecute=function(n){var e=this._modeling,t=n.shape,i=n.oldBounds,r=n.hints||{};r.layout!==!1&&(k(t.incoming,function(o){e.layoutConnection(o,{connectionEnd:Ha(o,t,i)})}),k(t.outgoing,function(o){e.layoutConnection(o,{connectionStart:Va(o,t,i)})}))};Os.prototype.revert=function(n){var e=n.shape,t=n.oldBounds;return T(e,{width:t.width,height:t.height,x:t.x,y:t.y}),e};function WO(n,e){var t=[];return k(n.concat(e),function(i){var r=i.incoming,o=i.outgoing;k(r.concat(o),function(s){var a=s.source,l=s.target;(Ff(n,a)||Ff(n,l)||Ff(e,a)||Ff(e,l))&&(Ff(t,s)||t.push(s))})}),t}function Ff(n,e){return n.indexOf(e)!==-1}function UO(n,e,t){var i=n.x,r=n.y,o=n.width,s=n.height,a=t.x,l=t.y;switch(e){case"n":return{x:i,y:r+l,width:o,height:s-l};case"s":return{x:i,y:r,width:o,height:s+l};case"w":return{x:i+a,y:r,width:o-a,height:s};case"e":return{x:i,y:r,width:o+a,height:s};default:throw new Error("unknown direction: "+e)}}function zi(n){this._modeling=n}zi.$inject=["modeling"];zi.prototype.preExecute=function(n){var e=n.delta,t=n.direction,i=n.movingShapes,r=n.resizingShapes,o=n.start,s={};this.moveShapes(i,e),k(r,function(a){s[a.id]=BF(a)}),this.resizeShapes(r,e,t),this.updateConnectionWaypoints(WO(i,r),e,t,o,i,r,s)};zi.prototype.execute=function(){};zi.prototype.revert=function(){};zi.prototype.moveShapes=function(n,e){var t=this;k(n,function(i){t._modeling.moveShape(i,e,null,{autoResize:!1,layout:!1,recurse:!1})})};zi.prototype.resizeShapes=function(n,e,t){var i=this;k(n,function(r){var o=UO(r,t,e);i._modeling.resizeShape(r,o,null,{attachSupport:!1,autoResize:!1,layout:!1})})};zi.prototype.updateConnectionWaypoints=function(n,e,t,i,r,o,s){var a=this,l=r.concat(o);k(n,function(c){var u=c.source,f=c.target,h=LF(c),d=GO(t),p={};Co(l,u)&&Co(l,f)?(h=Vt(h,function(m){return KO(m,i,t)&&(m[d]=m[d]+e[d]),m.original&&KO(m.original,i,t)&&(m.original[d]=m.original[d]+e[d]),m}),a._modeling.updateWaypoints(c,h,{labelBehavior:!1})):(Co(l,u)||Co(l,f))&&(Co(r,u)?p.connectionStart=za(c,u,e):Co(r,f)?p.connectionEnd=Wa(c,f,e):Co(o,u)?p.connectionStart=Va(c,u,s[u.id]):Co(o,f)&&(p.connectionEnd=Ha(c,f,s[f.id])),a._modeling.layoutConnection(c,p))})};function QO(n){return T({},n)}function LF(n){return Vt(n.waypoints,function(e){return e=QO(e),e.original&&(e.original=QO(e.original)),e})}function GO(n){switch(n){case"n":return"y";case"w":return"x";case"s":return"y";case"e":return"x"}}function KO(n,e,t){var i=GO(t);if(/e|s/.test(t))return n[i]>e;if(/n|w/.test(t))return n[i]<e}function Co(n,e){return n.indexOf(e)!==-1}function BF(n){return{x:n.x,y:n.y,height:n.height,width:n.width}}function Qa(n){this._modeling=n}Qa.$inject=["modeling"];Qa.prototype.execute=function(n){var e=n.shape,t=e.children;n.oldChildrenVisibility=XO(t),e.collapsed=!e.collapsed;var i=YO(t,e.collapsed);return[e].concat(i)};Qa.prototype.revert=function(n){var e=n.shape,t=n.oldChildrenVisibility,i=e.children,r=ZO(i,t);return e.collapsed=!e.collapsed,[e].concat(r)};function XO(n){var e={};return k(n,function(t){e[t.id]=t.hidden,t.children&&(e=T({},e,XO(t.children)))}),e}function YO(n,e){var t=[];return k(n,function(i){i.hidden=e,t=t.concat(i),i.children&&(t=t.concat(YO(i.children,i.collapsed||e)))}),t}function ZO(n,e){var t=[];return k(n,function(i){i.hidden=e[i.id],t=t.concat(i),i.children&&(t=t.concat(ZO(i.children,e)))}),t}function Ka(n){this._modeling=n}Ka.$inject=["modeling"];Ka.prototype.execute=function(n){var e=n.shape,t=n.newHost,i=e.host;return n.oldHost=i,n.attacherIdx=JO(i,e),ek(t,e),e.host=t,e};Ka.prototype.revert=function(n){var e=n.shape,t=n.newHost,i=n.oldHost,r=n.attacherIdx;return e.host=i,JO(t,e),ek(i,e,r),e};function JO(n,e){return Vn(n&&n.attachers,e)}function ek(n,e,t){if(n){var i=n.attachers;i||(n.attachers=i=[]),zt(i,e,t)}}function qf(){}qf.prototype.execute=function(n){var e=n.connection,t=n.newWaypoints;return n.oldWaypoints=e.waypoints,e.waypoints=t,e};qf.prototype.revert=function(n){var e=n.connection,t=n.oldWaypoints;return e.waypoints=t,e};function Se(n,e,t){this._eventBus=n,this._elementFactory=e,this._commandStack=t;var i=this;n.on("diagram.init",function(){i.registerHandlers(t)})}Se.$inject=["eventBus","elementFactory","commandStack"];Se.prototype.getHandlers=function(){return{"shape.append":$a,"shape.create":gi,"shape.delete":Es,"shape.move":Tr,"shape.resize":Os,"shape.replace":yi,"shape.toggleCollapse":Qa,spaceTool:zi,"label.create":_s,"connection.create":ja,"connection.delete":Cs,"connection.move":Nf,"connection.layout":qa,"connection.updateWaypoints":qf,"connection.reconnect":Ss,"elements.create":Lf,"elements.move":Ua,"elements.delete":Bf,"elements.distribute":Fa,"elements.align":Na,"element.updateAttachment":Ka}};Se.prototype.registerHandlers=function(n){k(this.getHandlers(),function(e,t){n.registerHandler(t,e)})};Se.prototype.moveShape=function(n,e,t,i,r){typeof i=="object"&&(r=i,i=null);var o={shape:n,delta:e,newParent:t,newParentIndex:i,hints:r||{}};this._commandStack.execute("shape.move",o)};Se.prototype.updateAttachment=function(n,e){var t={shape:n,newHost:e};this._commandStack.execute("element.updateAttachment",t)};Se.prototype.moveElements=function(n,e,t,i){i=i||{};var r=i.attach,o=t,s;r===!0?(s=t,o=t.parent):r===!1&&(s=null);var a={shapes:n,delta:e,newParent:o,newHost:s,hints:i};this._commandStack.execute("elements.move",a)};Se.prototype.moveConnection=function(n,e,t,i,r){typeof i=="object"&&(r=i,i=void 0);var o={connection:n,delta:e,newParent:t,newParentIndex:i,hints:r||{}};this._commandStack.execute("connection.move",o)};Se.prototype.layoutConnection=function(n,e){var t={connection:n,hints:e||{}};this._commandStack.execute("connection.layout",t)};Se.prototype.createConnection=function(n,e,t,i,r,o){typeof t=="object"&&(o=r,r=i,i=t,t=void 0),i=this._create("connection",i);var s={source:n,target:e,parent:r,parentIndex:t,connection:i,hints:o};return this._commandStack.execute("connection.create",s),s.connection};Se.prototype.createShape=function(n,e,t,i,r){typeof i!="number"&&(r=i,i=void 0),r=r||{};var o=r.attach,s,a;n=this._create("shape",n),o?(s=t.parent,a=t):s=t;var l={position:e,shape:n,parent:s,parentIndex:i,host:a,hints:r};return this._commandStack.execute("shape.create",l),l.shape};Se.prototype.createElements=function(n,e,t,i,r){F(n)||(n=[n]),typeof i!="number"&&(r=i,i=void 0),r=r||{};var o={position:e,elements:n,parent:t,parentIndex:i,hints:r};return this._commandStack.execute("elements.create",o),o.elements};Se.prototype.createLabel=function(n,e,t,i){t=this._create("label",t);var r={labelTarget:n,position:e,parent:i||n.parent,shape:t};return this._commandStack.execute("label.create",r),r.shape};Se.prototype.appendShape=function(n,e,t,i,r){r=r||{},e=this._create("shape",e);var o={source:n,position:t,target:i,shape:e,connection:r.connection,connectionParent:r.connectionParent,hints:r};return this._commandStack.execute("shape.append",o),o.shape};Se.prototype.removeElements=function(n){var e={elements:n};this._commandStack.execute("elements.delete",e)};Se.prototype.distributeElements=function(n,e,t){var i={groups:n,axis:e,dimension:t};this._commandStack.execute("elements.distribute",i)};Se.prototype.removeShape=function(n,e){var t={shape:n,hints:e||{}};this._commandStack.execute("shape.delete",t)};Se.prototype.removeConnection=function(n,e){var t={connection:n,hints:e||{}};this._commandStack.execute("connection.delete",t)};Se.prototype.replaceShape=function(n,e,t){var i={oldShape:n,newData:e,hints:t||{}};return this._commandStack.execute("shape.replace",i),i.newShape};Se.prototype.alignElements=function(n,e){var t={elements:n,alignment:e};this._commandStack.execute("elements.align",t)};Se.prototype.resizeShape=function(n,e,t,i){var r={shape:n,newBounds:e,minBounds:t,hints:i};this._commandStack.execute("shape.resize",r)};Se.prototype.createSpace=function(n,e,t,i,r){var o={delta:t,direction:i,movingShapes:n,resizingShapes:e,start:r};this._commandStack.execute("spaceTool",o)};Se.prototype.updateWaypoints=function(n,e,t){var i={connection:n,newWaypoints:e,hints:t||{}};this._commandStack.execute("connection.updateWaypoints",i)};Se.prototype.reconnect=function(n,e,t,i,r){var o={connection:n,newSource:e,newTarget:t,dockingOrPoints:i,hints:r||{}};this._commandStack.execute("connection.reconnect",o)};Se.prototype.reconnectStart=function(n,e,t,i){i||(i={}),this.reconnect(n,e,n.target,t,T(i,{docking:"source"}))};Se.prototype.reconnectEnd=function(n,e,t,i){i||(i={}),this.reconnect(n,n.source,e,t,T(i,{docking:"target"}))};Se.prototype.connect=function(n,e,t,i){return this.createConnection(n,e,t||{},n.parent,i)};Se.prototype._create=function(n,e){return tC(e)?e:this._elementFactory.create(n,e)};Se.prototype.toggleCollapse=function(n,e){var t={shape:n,hints:e||{}};this._commandStack.execute("shape.toggleCollapse",t)};function Ga(n){this._moddle=n}Ga.$inject=["moddle"];Ga.prototype.execute=function(n){var e=this._moddle.ids,t=n.id,i=n.element,r=n.claiming;r?e.claim(t,i):e.unclaim(t)};Ga.prototype.revert=function(n){var e=this._moddle.ids,t=n.id,i=n.element,r=n.claiming;r?e.unclaim(t):e.claim(t,i)};function Dx(){function n(i,r){var o=i.label||i,s=i.labelTarget||i;return yE(o,r,s!==o),[o,s]}function e(i){return i.oldLabel=fs(i.element),n(i.element,i.newLabel)}function t(i){return n(i.element,i.oldLabel)}this.execute=e,this.revert=t}var NF="name",Ar="id";function Xa(n,e){this._elementRegistry=n,this._moddle=e}Xa.$inject=["elementRegistry","moddle"];Xa.prototype.execute=function(n){let{element:e,properties:t}=n,i=[e];if(!e)throw new Error("element required");let r=this._elementRegistry,o=this._moddle.ids,s=Ke(e),a=n.oldProperties||$F(s,di(t));return tk(t,s)&&(o.unclaim(s[Ar]),r.updateId(e,t[Ar]),o.claim(t[Ar],s)),NF in t&&e.label&&i.push(e.label),nk(s,t),n.oldProperties=a,n.changed=i,i};Xa.prototype.revert=function(n){let{element:e,properties:t,oldProperties:i}=n,r=Ke(e),o=this._elementRegistry,s=this._moddle.ids;return nk(r,i),tk(t,r)&&(s.unclaim(t[Ar]),o.updateId(e,i[Ar]),s.claim(i[Ar],r)),n.changed};function tk(n,e){return Ar in n&&n[Ar]!==e[Ar]}function $F(n,e){return st(e,function(t,i){return t[i]=n.get(i),t},{})}function nk(n,e){k(e,function(t,i){n.set(i,t)})}function Ya(n){this._elementRegistry=n}Ya.$inject=["elementRegistry"];Ya.prototype.execute=function(n){var e=n.element,t=n.moddleElement,i=n.properties;if(!t)throw new Error("<moddleElement> required");var r=n.changed||[e],o=n.oldProperties||jF(t,di(i));return ik(t,i),n.oldProperties=o,n.changed=r,r};Ya.prototype.revert=function(n){var e=n.oldProperties,t=n.moddleElement,i=n.changed;return ik(t,e),i};function jF(n,e){return st(e,function(t,i){return t[i]=n.get(i),t},{})}function ik(n,e){k(e,function(t,i){n.set(i,t)})}function Xn(n,e,t){this._canvas=n,this._drdRules=e,t.invoke(Se,this)}fe(Xn,Se);Xn.$inject=["canvas","drdRules","injector"];Xn.prototype.claimId=function(n,e){this._commandStack.execute("id.updateClaim",{id:n,element:e,claiming:!0})};Xn.prototype.connect=function(n,e,t,i){var r=this._drdRules,o=this._canvas.getRootElement();return t||(t=r.canConnect(n,e)||{type:"dmn:Association"}),this.createConnection(n,e,t,o,i)};Xn.prototype.getHandlers=function(){var n=Se.prototype.getHandlers.call(this);return n["id.updateClaim"]=Ga,n["element.updateLabel"]=Dx,n["element.updateProperties"]=Xa,n["element.updateModdleProperties"]=Ya,n};Xn.prototype.unclaimId=function(n,e){this._commandStack.execute("id.updateClaim",{id:n,element:e})};Xn.prototype.updateModdleProperties=function(n,e,t){this._commandStack.execute("element.updateModdleProperties",{element:n,moddleElement:e,properties:t})};Xn.prototype.updateProperties=function(n,e){this._commandStack.execute("element.updateProperties",{element:n,properties:e})};Xn.prototype.updateLabel=function(n,e,t,i){this._commandStack.execute("element.updateLabel",{element:n,newLabel:e,newBounds:t,hints:i||{}})};function Om(){}Om.prototype.layoutConnection=function(n,e){return e=e||{},[e.connectionStart||le(e.source||n.source),e.connectionEnd||le(e.target||n.target)]};var km=20;function Za(n){this._connectionDocking=n}fe(Za,Om);Za.$inject=["connectionDocking"];Za.prototype.layoutConnection=function(n,e){var t=this._connectionDocking;e||(e={});var i=e.source||n.source,r=e.target||n.target,o=e.waypoints||n.waypoints||[],s=e.connectionStart,a=e.connectionEnd,l=vt(i,r);if(s||(s=rk(o[0],i)),a||(a=rk(o[o.length-1],r)),O(n,"dmn:InformationRequirement")){o=[s,a];var c=t.getCroppedWaypoints(T({},n,{waypoints:o}),i,r);a=c.pop();var u={x:a.x,y:a.y};return l.includes("bottom")?u.y+=km:l.includes("top")?u.y-=km:l.includes("right")?u.x+=km:u.x-=km,o=c.concat([u,a]),o}return[s,a]};function rk(n,e){return n?n.original||n:le(e)}function ok(n){return T({original:n.point.original||n.point},n.actual)}function Wi(n,e){this._elementRegistry=n,this._graphicsFactory=e}Wi.$inject=["elementRegistry","graphicsFactory"];Wi.prototype.getCroppedWaypoints=function(n,e,t){e=e||n.source,t=t||n.target;var i=this.getDockingPoint(n,e,!0),r=this.getDockingPoint(n,t),o=n.waypoints.slice(i.idx+1,r.idx);return o.unshift(ok(i)),o.push(ok(r)),o};Wi.prototype.getDockingPoint=function(n,e,t){var i=n.waypoints,r,o,s;return r=t?0:i.length-1,o=i[r],s=this._getIntersection(e,n,t),{point:o,actual:s||o,idx:r}};Wi.prototype._getIntersection=function(n,e,t){var i=this._getShapePath(n),r=this._getConnectionPath(e);return tf(i,r,t)};Wi.prototype._getConnectionPath=function(n){return this._graphicsFactory.getConnectionPath(n)};Wi.prototype._getShapePath=function(n){return this._graphicsFactory.getShapePath(n)};Wi.prototype._getGfx=function(n){return this._elementRegistry.getGraphics(n)};var sk={__init__:["modeling","drdUpdater"],__depends__:[LO,jO,Ca,xs,ht,Cm],drdFactory:["type",kn],drdUpdater:["type",Hi],elementFactory:["type",_r],modeling:["type",Xn],layouter:["type",Za],connectionDocking:["type",Wi]};var FF=500,qF=1e3;function Mr(n,e){this._eventBus=n,this.offset=5;var t=e.cls("djs-outline",["no-fill"]),i=this;function r(o){var s=Q("rect");return j(s,T({x:0,y:0,rx:4,width:100,height:100},t)),s}n.on(["shape.added","shape.changed"],FF,function(o){var s=o.element,a=o.gfx,l=X(".djs-outline",a);l||(l=i.getOutline(s)||r(a),K(a,l)),i.updateShapeOutline(l,s)}),n.on(["connection.added","connection.changed"],function(o){var s=o.element,a=o.gfx,l=X(".djs-outline",a);l||(l=r(a),K(a,l)),i.updateConnectionOutline(l,s)})}Mr.prototype.updateShapeOutline=function(n,e){var t=!1,i=this._getProviders();i.length&&k(i,function(r){t=t||r.updateOutline(e,n)}),t||j(n,{x:-this.offset,y:-this.offset,width:e.width+this.offset*2,height:e.height+this.offset*2})};Mr.prototype.updateConnectionOutline=function(n,e){var t=Tt(e);j(n,{x:t.x-this.offset,y:t.y-this.offset,width:t.width+this.offset*2,height:t.height+this.offset*2})};Mr.prototype.registerProvider=function(n,e){e||(e=n,n=qF),this._eventBus.on("outline.getProviders",n,function(t){t.providers.push(e)})};Mr.prototype._getProviders=function(){var n=this._eventBus.createEvent({type:"outline.getProviders",providers:[]});return this._eventBus.fire(n),n.providers};Mr.prototype.getOutline=function(n){var e,t=this._getProviders();return k(t,function(i){ge(i.getOutline)&&(e=e||i.getOutline(n))}),e};Mr.$inject=["eventBus","styles","elementRegistry"];var Rm=6;function Vf(n,e,t){this._canvas=e;var i=this;n.on("element.changed",function(r){t.isSelected(r.element)&&i._updateMultiSelectionOutline(t.get())}),n.on("selection.changed",function(r){var o=r.newSelection;i._updateMultiSelectionOutline(o)})}Vf.prototype._updateMultiSelectionOutline=function(n){var e=this._canvas.getLayer("selectionOutline");ss(e);var t=n.length>1,i=this._canvas.getContainer();if(ne(i)[t?"add":"remove"]("djs-multi-select"),!!t){var r=VF(Tt(n)),o=Q("rect");j(o,T({rx:3},r)),ne(o).add("djs-selection-outline"),K(e,o)}};Vf.$inject=["eventBus","canvas","selection"];function VF(n){return{x:n.x-Rm,y:n.y-Rm,width:n.width+Rm*2,height:n.height+Rm*2}}var Tm={__depends__:[ht],__init__:["outline","multiSelectionOutline"],outline:["type",Mr],multiSelectionOutline:["type",Vf]};var HF=500,zF=1250,WF=1500,Am=Math.round;function UF(n){return{x:n.x+Am(n.width/2),y:n.y+Am(n.height/2)}}function Mm(n,e,t,i,r){function o(a,l,c,u){return r.allowed("elements.move",{shapes:a,delta:l,position:c,target:u})}n.on("shape.move.start",WF,function(a){var l=a.context,c=a.shape,u=i.get().slice();u.indexOf(c)===-1&&(u=[c]),u=QF(u),T(l,{shapes:u,validatedShapes:u,shape:c})}),n.on("shape.move.start",zF,function(a){var l=a.context,c=l.validatedShapes,u;if(u=l.canExecute=o(c),!u)return!1}),n.on("shape.move.move",HF,function(a){var l=a.context,c=l.validatedShapes,u=a.hover,f={x:a.dx,y:a.dy},h={x:a.x,y:a.y},d;if(d=o(c,f,h,u),l.delta=f,l.canExecute=d,d===null){l.target=null;return}l.target=u}),n.on("shape.move.end",function(a){var l=a.context,c=l.delta,u=l.canExecute,f=u==="attach",h=l.shapes;if(u===!1)return!1;c.x=Am(c.x),c.y=Am(c.y),!(c.x===0&&c.y===0)&&t.moveElements(h,c,l.target,{primaryShape:l.shape,attach:f})}),n.on("element.mousedown",function(a){if(Sn(a)){var l=vr(a);if(!l)throw new Error("must supply DOM mousedown event");return s(l,a.element)}});function s(a,l,c,u){if(Pe(c)&&(u=c,c=!1),!(l.waypoints||!l.parent)&&!ne(a.target).has("djs-hit-no-move")){var f=UF(l),h=e.init(a,f,"shape.move",{cursor:"grabbing",autoActivate:c,data:{shape:l,context:u||{}}});if(h!==!1)return!0}}this.start=s}Mm.$inject=["eventBus","dragging","modeling","selection","rules"];function QF(n){var e=ur(n,"id");return Ee(n,function(t){for(;t=t.parent;)if(e[t.id])return!1;return!0})}var ak=499,Ix="djs-dragging",lk="drop-ok",ck="drop-not-ok",uk="new-parent",fk="attach-ok";function Pm(n,e,t,i){function r(l){var c=o(l),u=KF(c);return u}function o(l){var c=O1(l,!0),u=c.flatMap(d=>(d.incoming||[]).concat(d.outgoing||[])),f=c.concat(u),h=[...new Set(f)];return h}function s(l,c){[fk,lk,ck,uk].forEach(function(u){u===c?e.addMarker(l,u):e.removeMarker(l,u)})}function a(l,c,u){i.addDragger(c,l.dragGroup),u&&e.addMarker(c,Ix),l.allDraggedElements?l.allDraggedElements.push(c):l.allDraggedElements=[c]}n.on("shape.move.start",ak,function(l){var c=l.context,u=c.shapes,f=c.allDraggedElements,h=r(u);if(!c.dragGroup){var d=Q("g");j(d,t.cls("djs-drag-group",["no-events"]));var p=e.getActiveLayer();K(p,d),c.dragGroup=d}h.forEach(function(m){i.addDragger(m,c.dragGroup)}),f?f=Dw([f,o(u)]):f=o(u),k(f,function(m){e.addMarker(m,Ix)}),c.allDraggedElements=f,c.differentParents=GF(u)}),n.on("shape.move.move",ak,function(l){var c=l.context,u=c.dragGroup,f=c.target,h=c.shape.parent,d=c.canExecute;f&&(d==="attach"?s(f,fk):c.canExecute&&h&&f.id!==h.id?s(f,uk):s(f,c.canExecute?lk:ck)),jt(u,l.dx,l.dy)}),n.on(["shape.move.out","shape.move.cleanup"],function(l){var c=l.context,u=c.target;u&&s(u,null)}),n.on("shape.move.cleanup",function(l){var c=l.context,u=c.allDraggedElements,f=c.dragGroup;k(u,function(h){e.removeMarker(h,Ix)}),f&&Fe(f)}),this.makeDraggable=a}Pm.$inject=["eventBus","canvas","styles","previewSupport"];function KF(n){var e=Ee(n,function(t){return Xe(t)?ye(n,la({id:t.source.id}))&&ye(n,la({id:t.target.id})):!0});return e}function GF(n){return Lw(ur(n,function(e){return e.parent&&e.parent.id}))!==1}var hk={__depends__:[fo,ht,Tm,yn,gn,ka],__init__:["move","movePreview"],move:["type",Mm],movePreview:["type",Pm]};var dk=`
198 `)}function vn(n,e){this._eventBus=n,this._canvas=e,this._providers=[],this._textbox=new On({container:e.getContainer(),keyHandler:it(this._handleKey,this),resizeHandler:it(this._h global() class in anonymousFunction9d0550af59300.anonymousFunction9d0550af59700.kn.Ba.Df.mi.Ss
[all...]
/plugin/vegalite/
H A Dvega.min.js1WO=(t,e,n)=>fN(t)?VO(t.signal,e,n):t===gz?{value:e}:{value:n},HO=(t,e,n)=>JO(`${t} === '${gz}' || …
/plugin/mizarproofchecker/dist/
Dscript.js.map1WO}OPO,59WOOOO1G.r1G.r\",\n stateData: \"!d~OQPORPOSPOTPOUPOVPOWSOYTO[UO~OXZO~PQOZZO~PQO]ZO~PQO…
/plugin/mizarveifiabledocs/dist/
Dscript.js.map1WO}OPO,59WOOOO1G.r1G.r\",\n stateData: \"!d~OQPORPOSPOTPOUPOVPOWSOYTO[UO~OXZO~PQOZZO~PQO]ZO~PQO…
/plugin/mizarverifiabledocs/dist/
H A Dscript.js.map1WO!bOPO,59XO!iOPO,59[O!pOPO,59[O!wOPO,59[OOOO1G.p1G.pOOOO1G.q1G.qOOOO1G.r1G.rOOOO1G.s1G.sOOOO1G.v1…