@logicflow/extension
Version:
LogicFlow Extensions
1 lines • 477 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@logicflow/core")):"function"==typeof define&&define.amd?define(["exports","@logicflow/core"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Extension={},e.Core)}(this,(function(e,t){"use strict";var n=40,i=40,o=40,r=40,a=40,s=40,l=100,u=80,d=100,c=80,h={rect:{radius:5,stroke:"rgb(24, 125, 255)"},circle:{r:18,stroke:"rgb(24, 125, 255)"},polygon:{stroke:"rgb(24, 125, 255)"},polyline:{stroke:"rgb(24, 125, 255)",hoverStroke:"rgb(24, 125, 255)",selectedStroke:"rgb(24, 125, 255)"},edgeText:{textWidth:100,overflowMode:"default",fontSize:12,background:{fill:"white",height:14,stroke:"transparent",radius:3}}},f=function(e,t){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},f(e,t)};function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var g=function(){return g=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},g.apply(this,arguments)};function v(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}function m(e,t,n,i){var o,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,n,a):o(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a}function y(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))}function b(e,t){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,s[0]&&(a=0)),a;)try{if(n=1,i&&(o=2&s[0]?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],i=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function x(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function E(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var C=function(){function e(){globalThis._ids=this,this._ids=new Set}return e.prototype.generateId=function(){return"xxxxxxx".replace(/[x]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},e.prototype.next=function(){for(var e=this.generateId();this._ids.has(e);)e=this.generateId();return this._ids.add(e),e},e}(),N=(null===globalThis||void 0===globalThis?void 0:globalThis._ids)||new C;function _(){return N.next()}var S=function(e){function t(t,n){return t.id||(t.id="Event_".concat(_())),t.text||(t.text=""),t.text&&"string"==typeof t.text&&(t.text={value:t.text,x:t.x,y:t.y+40}),e.call(this,t,n)||this}return p(t,e),t.prototype.setAttributes=function(){this.r=18},t.prototype.getConnectedTargetRules=function(){var t=e.prototype.getConnectedTargetRules.call(this);return t.push({message:"起始节点不能作为边的终点",validate:function(){return!1}}),t},t.extendKey="StartEventModel",t}(t.CircleNodeModel),M=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.extendKey="StartEventNode",t}(t.CircleNode),T={type:"bpmn:startEvent",view:M,model:S},A=function(e){function t(t,n){return t.id||(t.id="Event_".concat(_())),t.text||(t.text=""),t.text&&"string"==typeof t.text&&(t.text={value:t.text,x:t.x,y:t.y+40}),e.call(this,t,n)||this}return p(t,e),t.prototype.setAttributes=function(){this.r=18},t.prototype.getConnectedSourceRules=function(){var t=e.prototype.getConnectedSourceRules.call(this);return t.push({message:"结束节点不能作为边的起点",validate:function(){return!1}}),t},t.extendKey="EndEventModel",t}(t.CircleNodeModel),k=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return p(n,e),n.prototype.getAnchorStyle=function(){return{visibility:"hidden"}},n.prototype.getShape=function(){var n=this.props.model,i=n.getNodeStyle(),o=n,r=o.x,a=o.y,s=o.r,l=e.prototype.getShape.call(this);return t.h("g",{},l,t.h("circle",g(g({},i),{cx:r,cy:a,r:s-5})))},n.extendKey="EndEventView",n}(t.CircleNode),R={type:"bpmn:endEvent",view:k,model:A},D=function(e){function t(t,n){return t.id||(t.id="Flow_".concat(_())),e.call(this,t,n)||this}return p(t,e),t.extendKey="SequenceFlowModel",t}(t.PolylineEdgeModel),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.extendKey="SequenceFlowEdge",t}(t.PolylineEdge),P={type:"bpmn:sequenceFlow",view:O,model:D},I=function(e){function t(t,n){var i=this;return t.id||(t.id="Gateway_".concat(_())),t.text||(t.text=""),t.text&&"string"==typeof t.text&&(t.text={value:t.text,x:t.x,y:t.y+40}),(i=e.call(this,t,n)||this).points=[[25,0],[50,25],[25,50],[0,25]],i}return p(t,e),t.extendKey="ExclusiveGatewayModel",t}(t.PolygonNodeModel),L=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return p(n,e),n.prototype.getShape=function(){var e=this.props.model,n=e,i=n.x,o=n.y,r=n.width,a=n.height,s=n.points,l=e.getNodeStyle();return t.h("g",{transform:"matrix(1 0 0 1 ".concat(i-r/2," ").concat(o-a/2,")")},t.h("polygon",g(g({},l),{x:i,y:o,points:s})),t.h("path",g({d:"m 16,15 7.42857142857143,9.714285714285715 -7.42857142857143,9.714285714285715 3.428571428571429,0 5.714285714285715,-7.464228571428572 5.714285714285715,7.464228571428572 3.428571428571429,0 -7.42857142857143,-9.714285714285715 7.42857142857143,-9.714285714285715 -3.428571428571429,0 -5.714285714285715,7.464228571428572 -5.714285714285715,-7.464228571428572 -3.428571428571429,0 z"},l)))},n.extendKey="ExclusiveGatewayNode",n}(t.PolygonNode),B={type:"bpmn:exclusiveGateway",view:L,model:I},j=function(e){function t(t,n){return t.id||(t.id="Activity_".concat(_())),e.call(this,t,n)||this}return p(t,e),t.extendKey="ServiceTaskModel",t}(t.RectNodeModel),F=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return p(n,e),n.prototype.getLabelShape=function(){var e=this.props.model,n=e.x,i=e.y,o=e.width,r=e.height,a=e.getNodeStyle();return t.h("svg",{x:n-o/2+5,y:i-r/2+5,width:30,height:30,viewBox:"0 0 1274 1024"},t.h("path",{fill:a.stroke,d:"M882.527918 434.149934c-2.234901-5.303796-7.311523-8.853645-13.059434-9.138124l-61.390185-3.009544c-6.635117-20.973684-15.521508-41.175795-26.513864-60.282968l42.051745-47.743374c4.308119-4.889357 4.955872-12.004405 1.602498-17.59268-46.384423-77.30362-103.969956-101.422947-106.400309-102.410438-5.332449-2.170432-11.432377-1.090844-15.693424 2.77009L654.674467 240.664222c-17.004279-8.654101-35.092239-15.756869-53.995775-21.210068l-3.26537-66.490344c-0.280386-5.747911-3.833305-10.824533-9.134031-13.059434-1.683339-0.709151-30.193673-12.391215-76.866668-12.051477-46.672996-0.339738-75.18333 11.342326-76.866668 12.051477-5.300726 2.234901-8.853645 7.311523-9.134031 13.059434l-3.26537 66.490344c-18.903535 5.453199-36.991496 12.555967-53.995775 21.210068l-48.450479-43.922349c-4.261047-3.860934-10.360975-4.940522-15.693424-2.77009-2.430352 0.98749-60.015885 25.106818-106.400309 102.410438-3.353374 5.588275-2.705622 12.703323 1.602498 17.59268l42.051745 47.743374c-10.992355 19.107173-19.878746 39.309284-26.513864 60.282968l-61.390185 3.009544c-5.747911 0.284479-10.824533 3.834328-13.059434 9.138124-1.01512 2.415003-24.687262 60.190871-2.822278 147.651828 1.583055 6.324032 7.072069 10.893094 13.57518 11.308557 5.892197 0.37146 11.751648 0.523933 17.419741 0.667196 14.498202 0.372483 28.193109 0.723477 40.908712 4.63353 4.212952 1.294482 6.435573 8.270361 9.349949 18.763342 1.287319 4.640694 2.617617 9.43693 4.484128 14.010085 1.794879 4.393054 3.75758 8.570189 5.66093 12.607132 1.302669 2.765997 2.529613 5.380544 3.689019 8.018627 2.986007 6.803963 2.682086 9.773598 2.578732 10.349719-3.061732 3.672646-6.391571 7.238868-9.91379 11.015891-1.810229 1.943258-3.680832 3.949962-5.523807 5.980201l-22.560832 24.8909c-3.865028 4.261047-4.940522 10.365068-2.774183 15.693424 0.991584 2.426259 25.102724 60.011792 102.414531 106.400309 5.588275 3.353374 12.703323 2.701528 17.591657-1.603521l23.476691-20.682042c2.346441-2.061962 4.64888-4.336772 6.875594-6.534833 9.05319-8.93858 14.018272-12.95608 17.73185-11.576663 3.305279 1.222851 6.907317 3.166109 10.720156 5.228071 3.325745 1.794879 6.764054 3.650133 10.465352 5.288446 6.016017 2.662643 12.120039 4.688789 18.019399 6.65149 6.827499 2.266623 13.279445 4.409426 18.819624 7.275707 1.518586 0.782829 1.926886 0.994654 2.358721 7.830339 0.726547 11.496845 1.25048 23.276123 1.753947 34.672684 0.264013 5.900384 0.528026 11.803837 0.815575 17.700127 0.284479 5.743818 3.833305 10.82044 9.138124 13.05534 1.654686 0.698918 29.371958 12.063757 74.869175 12.063757 0.328481 0 3.65832 0 3.986801 0 45.497217 0 73.214489-11.364839 74.869175-12.063757 5.304819-2.234901 8.853645-7.311523 9.138124-13.05534 0.287549-5.89629 0.551562-11.799744 0.815575-17.700127 0.503467-11.396561 1.027399-23.175839 1.753947-34.672684 0.431835-6.835685 0.840134-7.04751 2.358721-7.830339 5.54018-2.866281 11.992125-5.009084 18.819624-7.275707 5.89936-1.962701 12.003382-3.988848 18.019399-6.65149 3.701299-1.638313 7.139607-3.493567 10.465352-5.288446 3.812839-2.061962 7.414877-4.00522 10.720156-5.228071 3.713578-1.379417 8.67866 2.638083 17.73185 11.576663 2.226714 2.198062 4.529153 4.472871 6.875594 6.534833l23.476691 20.682042c4.888334 4.305049 12.003382 4.956895 17.591657 1.603521 77.311807-46.388517 101.422947-103.97405 102.414531-106.400309 2.166339-5.328355 1.090844-11.432377-2.774183-15.693424l-22.560832-24.8909c-1.842974-2.030239-3.713578-4.036943-5.523807-5.980201-3.52222-3.777023-6.852058-7.343245-9.91379-11.015891-0.103354-0.576121-0.407276-3.545756 2.578732-10.349719 1.159406-2.638083 2.38635-5.252631 3.689019-8.018627 1.90335-4.036943 3.866051-8.214079 5.66093-12.607132 1.866511-4.573155 3.196809-9.369392 4.484128-14.010085 2.914376-10.492982 5.136997-17.46886 9.349949-18.763342 12.715603-3.910053 26.41051-4.261047 40.908712-4.63353 5.668093-0.143263 11.527544-0.295735 17.419741-0.667196 6.503111-0.415462 11.992125-4.984524 13.57518-11.308557C907.21518 494.340805 883.543038 436.564937 882.527918 434.149934zM643.49894 643.761929c-35.280528 35.280528-82.191954 54.711066-132.086317 54.711066s-96.806813-19.430538-132.086317-54.711066c-35.280528-35.279504-54.711066-82.191954-54.711066-132.086317 0-49.894364 19.430538-96.80272 54.711066-132.082224 35.283598-35.284621 82.191954-54.711066 132.086317-54.711066s96.80579 19.426445 132.086317 54.711066c35.279504 35.279504 54.711066 82.187861 54.711066 132.082224C698.210006 561.569976 678.782537 608.482425 643.49894 643.761929z"}))},n.prototype.getShape=function(){var e=this.props.model,n=e.x,i=e.y,o=e.width,r=e.height,a=e.radius,s=e.getNodeStyle();return t.h("g",{},[t.h("rect",g({x:n-o/2,y:i-r/2,rx:a,ry:a,width:o,height:r},s)),this.getLabelShape()])},n.extendKey="ServiceTaskNode",n}(t.RectNode),H={type:"bpmn:serviceTask",view:F,model:j},W=function(e){function t(t,n){return t.id||(t.id="Activity_".concat(_())),e.call(this,t,n)||this}return p(t,e),t.extendKey="UserTaskModel",t}(t.RectNodeModel),z=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return p(n,e),n.prototype.getLabelShape=function(){var e=this.props.model,n=e.x,i=e.y,o=e.width,r=e.height,a=e.getNodeStyle();return t.h("svg",{x:n-o/2+5,y:i-r/2+5,width:25,height:25,viewBox:"0 0 1274 1024"},t.h("path",{fill:a.stroke,d:"M655.807326 287.35973m-223.989415 0a218.879 218.879 0 1 0 447.978829 0 218.879 218.879 0 1 0-447.978829 0ZM1039.955839 895.482975c-0.490184-212.177424-172.287821-384.030443-384.148513-384.030443-211.862739 0-383.660376 171.85302-384.15056 384.030443L1039.955839 895.482975z"}))},n.prototype.getShape=function(){var e=this.props.model,n=e.x,i=e.y,o=e.width,r=e.height,a=e.radius,s=e.getNodeStyle();return t.h("g",{},[t.h("rect",g(g({},s),{x:n-o/2,y:i-r/2,rx:a,ry:a,width:o,height:r})),this.getLabelShape()])},n.extendKey="UserTaskNode",n}(t.RectNode),G={type:"bpmn:userTask",view:z,model:W},U={pluginName:"bpmnElement",install:function(e){e.setTheme(h),e.register(T),e.register(R),e.register(B),e.register(G),e.register(H),e.options.customBpmnEdge||(e.register(P),e.setDefaultEdgeType("bpmn:sequenceFlow"))}},q=function(){function e(){globalThis._ids=this,this._ids=new Set}return e.prototype.generateId=function(){return"xxxxxxx".replace(/[x]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},e.prototype.next=function(){for(var e=this.generateId();this._ids.has(e);)e=this.generateId();return this._ids.add(e),e},e}(),X=(null===globalThis||void 0===globalThis?void 0:globalThis._ids)||new q;function V(){return X.next()}function K(e){return Object.prototype.toString.call(e)}function Y(e){var t=e;return"[object Object]"===K(e)?(t={},Object.keys(e).forEach((function(n){var i=n;"-"===n.charAt(0)&&(i=n.substring(1)),t[i]=Y(e[n])}))):Array.isArray(e)&&(t=[],e.forEach((function(e,n){t[n]=Y(e)}))),t}function $(e){return null==e?"":e.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}var Z="\t\n";function J(e,t,n){var i=function(e){return" ".repeat(e)}(n);if(0!==e&&!1!==e&&!e)return Z+i+"<".concat(t," />");var o="";if("#text"===t)return Z+i+$(String(e));if("#cdata-section"===t)return Z+i+"<![CDATA["+e+"]]>";if("#comment"===t)return Z+i+"\x3c!--"+e+"--\x3e";if("-"==="".concat(t).charAt(0))return" "+t.substring(1)+'="'+function(e){var t=e;try{"string"!=typeof t&&(t=JSON.parse(e))}catch(n){t=JSON.stringify(Y(e)).replace(/"/g,"'")}return $(String(t))}(e)+'"';if(Array.isArray(e))e.forEach((function(e){o+=J(e,t,n+1)}));else if("[object Object]"===K(e)){var r=Object.keys(e),a="",s="";o+=(0===n?"":Z+i)+"<"+t,r.forEach((function(t){"-"===t.charAt(0)?a+=J(e[t],t,n+1):s+=J(e[t],t,n+1)})),o+=a+(""!==s?">".concat(s).concat(Z+i,"</").concat(t,">"):" />")}else o+=Z+i+"<".concat(t,">").concat($(String(e)),"</").concat(t,">");return o}function Q(e){var t="";for(var n in e)t+=J(e[n],n,0);return t}var ee=function(){};(ee.ObjTree=function(){return this}).VERSION="0.23",ee.ObjTree.prototype.xmlDecl='<?xml version="1.0" encoding="UTF-8" ?>\n',ee.ObjTree.prototype.attr_prefix="-",ee.ObjTree.prototype.parseXML=function(e){var t;if(window.DOMParser){var n=new DOMParser,i=n.parseFromString(e,"application/xml");if(!i)return;t=i.documentElement}else window.ActiveXObject&&((n=new ActiveXObject("Microsoft.XMLDOM")).async=!1,n.loadXML(e),t=n.documentElement);if(t)return this.parseDOM(t)},ee.ObjTree.prototype.parseHTTP=function(e,t,n){var i,o={};for(var r in t)o[r]=t[r];if(o.method||(void 0===o.postBody&&void 0===o.postbody&&void 0===o.parameters?o.method="get":o.method="post"),n){o.asynchronous=!0;var a=this,s=n,l=o.onComplete;o.onComplete=function(e){var t;e&&e.responseXML&&e.responseXML.documentElement&&(t=a.parseDOM(e.responseXML.documentElement)),s(t,e),l&&l(e)}}else o.asynchronous=!1;if("undefined"!=typeof HTTP&&HTTP.Request)o.uri=e,(u=new HTTP.Request(o))&&(i=u.transport);else if("undefined"!=typeof Ajax&&Ajax.Request){var u;(u=new Ajax.Request(e,o))&&(i=u.transport)}return n?i:i&&i.responseXML&&i.responseXML.documentElement?this.parseDOM(i.responseXML.documentElement):void 0},ee.ObjTree.prototype.parseDOM=function(e){if(e){if(this.__force_array={},this.force_array)for(var t=0;t<this.force_array.length;t++)this.__force_array[this.force_array[t]]=1;var n=this.parseElement(e);if(this.__force_array[e.nodeName]&&(n=[n]),11!=e.nodeType){var i={};i[e.nodeName]=n,n=i}return n}},ee.ObjTree.prototype.parseElement=function(e){if(7!=e.nodeType){if(3==e.nodeType||4==e.nodeType||8==e.nodeType){if(null==e.nodeValue.match(/[^\x00-\x20]/))return;return e.nodeValue}var t=null,n={};if(e.attributes&&e.attributes.length){t={};for(var i=0;i<e.attributes.length;i++){if("string"==typeof(s=e.attributes[i].nodeName)){var o=e.attributes[i].nodeValue;try{o=JSON.parse(e.attributes[i].nodeValue.replace(/'/g,'"'))}catch(t){o=e.attributes[i].nodeValue}o&&(void 0===n[s=this.attr_prefix+s]&&(n[s]=0),n[s]++,this.addNode(t,s,n[s],o))}}}if(e.childNodes&&e.childNodes.length){var r=!0;t&&(r=!1);for(i=0;i<e.childNodes.length&&r;i++){var a=e.childNodes[i].nodeType;3!=a&&4!=a&&8!=a&&(r=!1)}if(r){t||(t="");for(i=0;i<e.childNodes.length;i++)t+=e.childNodes[i].nodeValue}else{t||(t={});for(i=0;i<e.childNodes.length;i++){var s;if("string"==typeof(s=e.childNodes[i].nodeName))(o=this.parseElement(e.childNodes[i]))&&(void 0===n[s]&&(n[s]=0),n[s]++,this.addNode(t,s,n[s],o))}}}else null===t&&(t={});return t}},ee.ObjTree.prototype.addNode=function(e,t,n,i){this.__force_array[t]?(1==n&&(e[t]=[]),e[t][e[t].length]=i):1==n?e[t]=i:2==n?e[t]=[e[t],i]:e[t][e[t].length]=i},ee.ObjTree.prototype.writeXML=function(e){var t=this.hash_to_xml(null,e);return this.xmlDecl+t},ee.ObjTree.prototype.hash_to_xml=function(e,t){var n=[],i=[];for(var o in t)if(t.hasOwnProperty(o)){var r=t[o];o.charAt(0)!=this.attr_prefix?void 0===r||null==r?n[n.length]="<"+o+" />":"object"==typeof r&&r.constructor==Array?n[n.length]=this.array_to_xml(o,r):n[n.length]="object"==typeof r?this.hash_to_xml(o,r):this.scalar_to_xml(o,r):i[i.length]=" "+o.substring(1)+'="'+this.xml_escape(r)+'"'}var a=i.join(""),s=n.join("");return void 0===e||null==e||(s=n.length>0?s.match(/\n/)?"<"+e+a+">\n"+s+"</"+e+">\n":"<"+e+a+">"+s+"</"+e+">\n":"<"+e+a+" />\n"),s},ee.ObjTree.prototype.array_to_xml=function(e,t){for(var n=[],i=0;i<t.length;i++){var o=t[i];void 0===o||null==o?n[n.length]="<"+e+" />":"object"==typeof o&&o.constructor==Array?n[n.length]=this.array_to_xml(e,o):n[n.length]="object"==typeof o?this.hash_to_xml(e,o):this.scalar_to_xml(e,o)}return n.join("")},ee.ObjTree.prototype.scalar_to_xml=function(e,t){return"#text"==e?this.xml_escape(t):"<"+e+">"+this.xml_escape(t)+"</"+e+">\n"},ee.ObjTree.prototype.xml_escape=$;var te,ne=function(e){return(new ee.ObjTree).parseXML(e)};!function(e){e.START="bpmn:startEvent",e.END="bpmn:endEvent",e.GATEWAY="bpmn:exclusiveGateway",e.USER="bpmn:userTask",e.SYSTEM="bpmn:serviceTask",e.FLOW="bpmn:sequenceFlow"}(te||(te={}));var ie=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"],oe=["properties","startPoint","endPoint","pointsList"],re=function(e){return String(e||"").replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'")};function ae(e){var t=e?oe.concat(e):oe;return function(e){return function e(n){var i={};return"string"==typeof n?n:Array.isArray(n)?n.map((function(t){return e(t)})):(Object.entries(n).forEach((function(n){var o=w(n,2),r=o[0],a=o[1];"object"!=typeof a?0===r.indexOf("-")||["#text","#cdata-section","#comment"].includes(r)?i[r]=a:i["-".concat(r)]=a:t.includes(r)?i["-".concat(r)]=e(a):i[r]=e(a)})),i)}(e)}}function se(e){var t={};return Object.entries(e).forEach((function(e){var n=w(e,2),i=n[0],o=n[1];0===i.indexOf("-")?t[i.substring(1)]=Y(o):"string"==typeof o?t[i]=o:"[object Object]"===Object.prototype.toString.call(o)?t[i]=se(o):Array.isArray(o)?t[i]=o.map((function(e){return se(e)})):t[i]=o})),t}function le(e,t){e["bpmndi:BPMNEdge"]=t.edges.map((function(e){var t,n=e.id,i=e.pointsList.map((function(e){return{"-x":e.x,"-y":e.y}})),o={"-id":"".concat(n,"_di"),"-bpmnElement":n,"di:waypoint":i};return(null===(t=e.text)||void 0===t?void 0:t.value)&&(o["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":e.text.x-10*e.text.value.length/2,"-y":e.text.y-7,"-width":10*e.text.value.length,"-height":14}}),o})),e["bpmndi:BPMNShape"]=t.nodes.map((function(e){var t,n=e.id,i=100,o=80,r=e.x,a=e.y,s=he.shapeConfigMap.get(e.type);s&&(i=s.width,o=s.height),r-=i/2,a-=o/2;var l={"-id":"".concat(n,"_di"),"-bpmnElement":n,"dc:Bounds":{"-x":r,"-y":a,"-width":i,"-height":o}};return(null===(t=e.text)||void 0===t?void 0:t.value)&&(l["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":e.text.x-10*e.text.value.length/2,"-y":e.text.y-7,"-width":10*e.text.value.length,"-height":14}}),l}))}function ue(e){var t=[],n=[],i=e["bpmn:definitions"];if(i){var o=i["bpmn:process"],r=i["bpmndi:BPMNDiagram"],a=null==r?void 0:r["bpmndi:BPMNPlane"];if(!o||!a)return{nodes:t,edges:n};Object.keys(o).forEach((function(e){if(0===e.indexOf("bpmn:")){var i=o[e];if(e===te.FLOW){var r=a["bpmndi:BPMNEdge"],s=(Array.isArray(r),r);n=function(e,t){var n=[];if(Array.isArray(e))e.forEach((function(e){var i;i=Array.isArray(t)?t.find((function(t){return t["-bpmnElement"]===e["-id"]})):t,n.push(ce(i,e))}));else{var i=void 0;i=Array.isArray(t)?t.find((function(t){return t["-bpmnElement"]===e["-id"]})):t,n.push(ce(i,e))}return n}(i,s)}else{var l=a["bpmndi:BPMNShape"],u=(Array.isArray(l),l);t=t.concat(function(e,t,n){var i=[];if(Array.isArray(e))e.forEach((function(e){var o=de(Array.isArray(t)?t.find((function(t){return t["-bpmnElement"]===e["-id"]})):t,n,e);i.push(o)}));else{var o=de(Array.isArray(t)?t.find((function(t){return t["-bpmnElement"]===e["-id"]})):t,n,e);i.push(o)}return i}(i,u,e))}}}))}return{nodes:t,edges:n}}function de(e,t,n){var i,o,r=Number(e["dc:Bounds"]["-x"]),a=Number(e["dc:Bounds"]["-y"]),s=re(n["-name"]),l=he.shapeConfigMap.get(t);if(l&&(r+=l.width/2,a+=l.height/2),Object.entries(n).forEach((function(e){var t=w(e,2),n=t[0],o=t[1];-1===ie.indexOf(n)&&(i||(i={}),i[n]=o)})),i&&(i=se(i)),s&&(o={x:r,y:a,value:s},e["bpmndi:BPMNLabel"]&&e["bpmndi:BPMNLabel"]["dc:Bounds"])){var u=e["bpmndi:BPMNLabel"]["dc:Bounds"];o.x=Number(u["-x"])+Number(u["-width"])/2,o.y=Number(u["-y"])+Number(u["-height"])/2}var d={id:e["-bpmnElement"],type:t,x:r,y:a,properties:i};return o&&(d.text=o),d}function ce(e,t){var n,i,o=t["-name"]?re("".concat(t["-name"])):"";if(o){var r=void 0;e["bpmndi:BPMNLabel"]&&e["bpmndi:BPMNLabel"]["dc:Bounds"]&&(r=e["bpmndi:BPMNLabel"]["dc:Bounds"]);var a=0;if(o.split("\n").forEach((function(e){a<e.length&&(a=e.length)})),r)n={value:o,x:Number(r["-x"])+10*a/2,y:Number(r["-y"])+7};else{var s=e["di:waypoint"]||[],l=s[0],u=s[s.length-1]||l;n={value:o,x:(Number((null==l?void 0:l["-x"])||0)+Number((null==u?void 0:u["-x"])||0))/2,y:(Number((null==l?void 0:l["-y"])||0)+Number((null==u?void 0:u["-y"])||0))/2}}}Object.entries(t).forEach((function(e){var t=w(e,2),n=t[0],o=t[1];-1===ie.indexOf(n)&&(i||(i={}),i[n]=o)})),i&&(i=se(i));var d={id:t["-id"],type:te.FLOW,pointsList:e["di:waypoint"].map((function(e){return{x:Number(e["-x"]),y:Number(e["-y"])}})),sourceNodeId:t["-sourceRef"],targetNodeId:t["-targetRef"],properties:i};return n&&(d.text=n),d}var he=function(){function e(e){var t=e.lf,n=this;this.adapterOut=function(e,t){var i=g({},n.processAttributes);!function(e,t,n){var i=new Map;t.nodes.forEach((function(t){var o,r={"-id":t.id};if((null===(o=t.text)||void 0===o?void 0:o.value)&&(r["-name"]=t.text.value),t.properties){var a=ae(n)(t.properties);Object.assign(r,a)}i.set(t.id,r),e[t.type]?Array.isArray(e[t.type])?e[t.type].push(r):e[t.type]=[e[t.type],r]:e[t.type]=r}));var o=t.edges.map((function(e){var t,o,r=i.get(e.targetNodeId);r["bpmn:incoming"]?Array.isArray(r["bpmn:incoming"])?r["bpmn:incoming"].push(e.id):r["bpmn:incoming"]=[r["bpmn:incoming"],e.id]:r["bpmn:incoming"]=e.id;var a={"-id":e.id,"-sourceRef":e.sourceNodeId,"-targetRef":e.targetNodeId};if((null===(t=e.text)||void 0===t?void 0:t.value)&&(a["-name"]=null===(o=e.text)||void 0===o?void 0:o.value),e.properties){var s=ae(n)(e.properties);Object.assign(a,s)}return a}));t.edges.forEach((function(e){var t=i.get(e.sourceNodeId);t["bpmn:outgoing"]?Array.isArray(t["bpmn:outgoing"])?t["bpmn:outgoing"].push(e.id):t["bpmn:outgoing"]=[t["bpmn:outgoing"],e.id]:t["bpmn:outgoing"]=e.id})),e[te.FLOW]=o}(i,e,t);var o={"-id":"BPMNPlane_1","-bpmnElement":i["-id"]};le(o,e);var r=n.definitionAttributes;return r["bpmn:process"]=i,r["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":o},{"bpmn:definitions":r}},this.adapterIn=function(e){if(e)return ue(e)},t.adapterIn=function(e){return n.adapterIn(e)},t.adapterOut=function(e,t){return n.adapterOut(e,t)},this.processAttributes={"-isExecutable":"true","-id":"Process_".concat(V())},this.definitionAttributes={"-id":"Definitions_".concat(V()),"-xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","-xmlns:bpmn":"http://www.omg.org/spec/BPMN/20100524/MODEL","-xmlns:bpmndi":"http://www.omg.org/spec/BPMN/20100524/DI","-xmlns:dc":"http://www.omg.org/spec/DD/20100524/DC","-xmlns:di":"http://www.omg.org/spec/DD/20100524/DI","-targetNamespace":"http://logic-flow.org","-exporter":"logicflow","-exporterVersion":"1.2.0"}}return e.prototype.setCustomShape=function(t,n){e.shapeConfigMap.set(t,n)},e.pluginName="bpmn-adapter",e.shapeConfigMap=new Map,e}();he.shapeConfigMap.set(te.START,{width:n,height:i}),he.shapeConfigMap.set(te.END,{width:o,height:r}),he.shapeConfigMap.set(te.GATEWAY,{width:a,height:s}),he.shapeConfigMap.set(te.SYSTEM,{width:l,height:u}),he.shapeConfigMap.set(te.USER,{width:d,height:c});var fe=function(e){function t(t){var n=e.call(this,t)||this;n.adapterXmlIn=function(e){var t="string"==typeof e?n.sanitizeNameAttributes(e):e,i=ne(t);return n.adapterIn(i)},n.adapterXmlOut=function(e,t){return Q(n.adapterOut(e,t))};var i=t.lf;return i.adapterIn=n.adapterXmlIn,i.adapterOut=n.adapterXmlOut,n}return p(t,e),t.prototype.sanitizeNameAttributes=function(e){return e.replace(/name="([^"]*)"/g,(function(e,t){var n=t.replace(/&(?!#?\w+;)/g,"&").replace(/</g,"<").replace(/>/g,">");return'name="'.concat(n,'"')}))},t.pluginName="bpmnXmlAdapter",t}(he);function pe(){this.targetRules.push({message:"分组外的节点不允许连接分组内的",validate:function(e,t){var n=!!e.properties.parent,i=!!t.properties.parent;return!(!n&&i)}})}var ge=function(){function e(){globalThis._ids=this,this._ids=new Set}return e.prototype.generateId=function(){return"xxxxxxx".replace(/[x]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},e.prototype.next=function(){for(var e=this.generateId();this._ids.has(e);)e=this.generateId();return this._ids.add(e),e},e}(),ve=(null===globalThis||void 0===globalThis?void 0:globalThis._ids)||new ge;function me(){return ve.next()}var ye=Object.freeze({__proto__:null,genBpmnId:me,groupRule:pe});function be(e){var n=w(e.useDefinition(),1)[0],i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return p(i,e),i.prototype.getAnchorStyle=function(){return{visibility:"hidden"}},i.prototype.getShape=function(){var i,o=this.props.model,r=o.getNodeStyle(),a=o,s=a.x,l=a.y,u=a.r,d=a.width,c=a.height,h=a.properties,f=e.prototype.getShape.call(this),p=h.definitionType,v=((null===(i=n.endEvent)||void 0===i?void 0:i.get(p))||{}).icon,m=Array.isArray(v)?t.h.apply(void 0,E(["g",{transform:"matrix(1 0 0 1 ".concat(s-d/2," ").concat(l-c/2,")")}],w(v),!1)):t.h("path",{transform:"matrix(1 0 0 1 ".concat(s-d/2," ").concat(l-c/2,")"),d:v,style:"fill: black; stroke-linecap: round; stroke-linejoin: round; stroke: white; stroke-width: 1px;"});return t.h("g",{},f,t.h("circle",g(g({},r),{strokeWidth:2,cx:s,cy:l,r:u-2})),m)},i}(t.CircleNode),o=function(e){function t(t,i){var o,r,a,s;t.id||(t.id="Event_".concat(me())),t.text||(t.text=""),t.text&&"string"==typeof t.text&&(t.text={value:t.text,x:t.x,y:t.y+40});var l=((null===(r=n.endEvent)||void 0===r?void 0:r.get(null===(a=t.properties)||void 0===a?void 0:a.definitionType))||{}).properties,u=void 0===l?{}:l;return t.properties=g(g({},u),t.properties),(null===(s=t.properties)||void 0===s?void 0:s.definitionType)&&(t.properties.definitionId="Definition_".concat(me())),o=e.call(this,t,i)||this,pe.call(o),o}return p(t,e),t.prototype.setAttributes=function(){this.r=18},t.prototype.getConnectedSourceRules=function(){var t=this,n=e.prototype.getConnectedSourceRules.call(this),i={message:"结束节点不能作为边的起点",validate:function(e,n){return e!==t}};return n.push(i),n},t}(t.CircleNodeModel);return{type:"bpmn:endEvent",view:i,model:o}}function xe(e){var n=w(e.useDefinition(),1)[0],i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return p(i,e),i.prototype.getAnchorStyle=function(){return{visibility:"hidden"}},i.prototype.getShape=function(){var e,i=this.props.model,o=i.getNodeStyle(),r=i,a=r.x,s=r.y,l=r.r,u=r.width,d=r.height,c=r.properties.definitionType,h=((null===(e=n.intermediateCatchEvent)||void 0===e?void 0:e.get(c))||{}).icon,f=Array.isArray(h)?t.h.apply(void 0,E(["g",{transform:"matrix(1 0 0 1 ".concat(a-u/2," ").concat(s-d/2,")")}],w(h),!1)):t.h("path",{transform:"matrix(1 0 0 1 ".concat(a-u/2," ").concat(s-d/2,")"),d:h});return t.h("g",{},t.h("circle",g(g({},o),{cx:a,cy:s,r:l,strokeWidth:1.5})),t.h("circle",g(g({},o),{cx:a,cy:s,r:l-3,strokeWidth:1.5})),f)},i}(t.CircleNode),o=function(e){function t(t,i){var o,r,a,s;t.id||(t.id="Event_".concat(me())),t.text||(t.text=""),t.text&&"string"==typeof t.text&&(t.text={value:t.text,x:t.x,y:t.y+40});var l=((null===(r=n.intermediateCatchEvent)||void 0===r?void 0:r.get(null===(a=t.properties)||void 0===a?void 0:a.definitionType))||{}).properties,u=void 0===l?{}:l;return t.properties=g(g({},u),t.properties),(null===(s=t.properties)||void 0===s?void 0:s.definitionType)&&(t.properties.definitionId="Definition_".concat(me())),o=e.call(this,t,i)||this,pe.call(o),o}return p(t,e),t.prototype.setAttributes=function(){this.r=18},t}(t.CircleNodeModel);return{type:"bpmn:intermediateCatchEvent",view:i,model:o}}function we(e){var n=w(e.useDefinition(),1)[0],i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return p(i,e),i.prototype.getAnchorStyle=function(){return{visibility:"hidden"}},i.prototype.getShape=function(){var e,i=this.props.model,o=i.getNodeStyle(),r=i,a=r.x,s=r.y,l=r.r,u=r.width,d=r.height,c=r.properties,h=c.definitionType,f=c.isInterrupting,p=((null===(e=n.startEvent)||void 0===e?void 0:e.get(h))||{}).icon,v=Array.isArray(p)?t.h.apply(void 0,E(["g",{transform:"matrix(1 0 0 1 ".concat(a-u/2," ").concat(s-d/2,")")}],w(p),!1)):t.h("path",{transform:"matrix(1 0 0 1 ".concat(a-u/2," ").concat(s-d/2,")"),d:p,style:"fill: white; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"});return t.h("g",{},t.h("circle",g(g({},o),{cx:a,cy:s,r:l,strokeDasharray:f?"5,5":"",strokeWidth:2})),v)},i}(t.CircleNode),o=function(e){function t(t,i){var o,r,a;t.id||(t.id="Event_".concat(me())),t.text||(t.text=""),t.text&&"string"==typeof t.text&&(t.text={value:t.text,x:t.x,y:t.y+40});var s=((null===(o=n.startEvent)||void 0===o?void 0:o.get(null===(r=t.properties)||void 0===r?void 0:r.definitionType))||{}).properties,l=void 0===s?{}:s;return t.properties=g(g({},l),t.properties),(null===(a=t.properties)||void 0===a?void 0:a.definitionType)&&(t.properties.definitionId="Definition_".concat(me())),e.call(this,t,i)||this}return p(t,e),t.prototype.setAttributes=function(){this.r=18},t.prototype.getConnectedTargetRules=function(){var t=this,n=e.prototype.getConnectedTargetRules.call(this),i={message:"起始节点不能作为边的终点",validate:function(e,n){return n!==t}};return n.push(i),n},t}(t.CircleNodeModel);return{type:"bpmn:startEvent",view:i,model:o}}function Ee(e){var n=w(e.useDefinition(),1)[0],i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return p(i,e),i.prototype.getAnchorStyle=function(){return{visibility:"hidden"}},i.prototype.getShape=function(){var e,i=this.props.model,o=i.getNodeStyle(),r=i,a=r.x,s=r.y,l=r.r,u=r.width,d=r.height,c=r.properties,h=c.definitionType,f=c.cancelActivity,p=((null===(e=n.boundaryEvent)||void 0===e?void 0:e.get(h))||{}).icon,v=Array.isArray(p)?t.h.apply(void 0,E(["g",{transform:"matrix(1 0 0 1 ".concat(a-u/2," ").concat(s-d/2,")")}],w(p),!1)):t.h("path",{transform:"matrix(1 0 0 1 ".concat(a-u/2," ").concat(s-d/2,")"),d:p});return t.h("g",{},t.h("circle",g(g({},o),{cx:a,cy:s,r:l,strokeDasharray:f?"":"5,5",strokeWidth:1.5})),t.h("circle",g(g({},o),{cx:a,cy:s,r:l-3,strokeDasharray:f?"":"5,5",strokeWidth:1.5})),v)},i}(t.CircleNode),o=function(e){function t(t,i){var o,r,a,s;t.id||(t.id="Event_".concat(me())),t.text||(t.text=""),t.text&&"string"==typeof t.text&&(t.text={value:t.text,x:t.x,y:t.y+40});var l=((null===(r=n.boundaryEvent)||void 0===r?void 0:r.get(null===(a=t.properties)||void 0===a?void 0:a.definitionType))||{}).properties,u=void 0===l?{}:l;return t.properties=g(g({attachedToRef:"",cancelActivity:!0},u),t.properties),(null===(s=t.properties)||void 0===s?void 0:s.definitionType)&&(t.properties.definitionId="Definition_".concat(me())),o=e.call(this,t,i)||this,pe.call(o),o}return p(t,e),t.prototype.initNodeData=function(t){e.prototype.initNodeData.call(this,t),this.r=20,this.autoToFront=!1,this.zIndex=99999},t.prototype.setAttributes=function(){this.r=18},t}(t.CircleNodeModel);return{type:"bpmn:boundaryEvent",view:i,model:o}}function Ce(e){var n=w(e.useDefinition(),1)[0],i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return p(i,e),i.prototype.getAnchorStyle=function(){return{visibility:"hidden"}},i.prototype.getShape=function(){var e,i=this.props.model,o=i.getNodeStyle(),r=i,a=r.x,s=r.y,l=r.r,u=r.width,d=r.height,c=r.properties.definitionType,h=((null===(e=n.intermediateThrowEvent)||void 0===e?void 0:e.get(c))||{}).icon,f=Array.isArray(h)?t.h.apply(void 0,E(["g",{transform:"matrix(1 0 0 1 ".concat(a-u/2," ").concat(s-d/2,")")}],w(h),!1)):t.h("path",{transform:"matrix(1 0 0 1 ".concat(a-u/2," ").concat(s-d/2,")"),d:h,style:"fill: black"});return t.h("g",{},t.h("circle",g(g({},o),{cx:a,cy:s,r:l,strokeWidth:1.5})),t.h("circle",g(g({},o),{cx:a,cy:s,r:l-3,strokeWidth:1.5})),f)},i}(t.CircleNode),o=function(e){function t(t,i){var o,r,a,s;t.id||(t.id="Event_".concat(me())),t.text||(t.text=""),t.text&&"string"==typeof t.text&&(t.text={value:t.text,x:t.x,y:t.y+40});var l=((null===(r=n.intermediateThrowEvent)||void 0===r?void 0:r.get(null===(a=t.properties)||void 0===a?void 0:a.definitionType))||{}).properties,u=void 0===l?{}:l;return t.properties=g(g({},u),t.properties),(null===(s=t.properties)||void 0===s?void 0:s.definitionType)&&(t.properties.definitionId="Definition_".concat(me())),o=e.call(this,t,i)||this,pe.call(o),o}return p(t,e),t.prototype.setAttributes=function(){this.r=18},t}(t.CircleNodeModel);return{type:"bpmn:intermediateThrowEvent",view:i,model:o}}var Ne=[t.h("circle",{cx:18,cy:18,r:11,style:"stroke-linecap: round;stroke-linejoin: round;stroke: rgb(34, 36, 42);stroke-width: 2px;fill: white"}),t.h("path",{d:"M 18,18 l 2.25,-7.5 m -2.25,7.5 l 5.25,1.5",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 2px;"}),t.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(0,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),t.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(30,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),t.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(60,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),t.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(90,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),t.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(120,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),t.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(150,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),t.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(180,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),t.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(210,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),t.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(240,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),t.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(270,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),t.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(300,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),t.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(330,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"})],_e=[t.h("circle",{cx:18,cy:18,r:10,style:"stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 4px; fill: rgb(34, 36, 42);"})],Se="m 16,15 7.42857142857143,9.714285714285715 -7.42857142857143,9.714285714285715 3.428571428571429,0 5.714285714285715,-7.464228571428572 5.714285714285715,7.464228571428572 3.428571428571429,0 -7.42857142857143,-9.714285714285715 7.42857142857143,-9.714285714285715 -3.428571428571429,0 -5.714285714285715,7.464228571428572 -5.714285714285715,-7.464228571428572 -3.428571428571429,0 z",Me="m 23,10 0,12.5 -12.5,0 0,5 12.5,0 0,12.5 5,0 0,-12.5 12.5,0 0,-5 -12.5,0 0,-12.5 -5,0 z",Te=t.h("circle",{cx:25,cy:25,r:13,style:"stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 2.5px; fill: white;"}),Ae="M882.527918 434.149934c-2.234901-5.303796-7.311523-8.853645-13.059434-9.138124l-61.390185-3.009544c-6.635117-20.973684-15.521508-41.175795-26.513864-60.282968l42.051745-47.743374c4.308119-4.889357 4.955872-12.004405 1.602498-17.59268-46.384423-77.30362-103.969956-101.422947-106.400309-102.410438-5.332449-2.170432-11.432377-1.090844-15.693424 2.77009L654.674467 240.664222c-17.004279-8.654101-35.092239-15.756869-53.995775-21.210068l-3.26537-66.490344c-0.280386-5.747911-3.833305-10.824533-9.134031-13.059434-1.683339-0.709151-30.193673-12.391215-76.866668-12.051477-46.672996-0.339738-75.18333 11.342326-76.866668 12.051477-5.300726 2.234901-8.853645 7.311523-9.134031 13.059434l-3.26537 66.490344c-18.903535 5.453199-36.991496 12.555967-53.995775 21.210068l-48.450479-43.922349c-4.261047-3.860934-10.360975-4.940522-15.693424-2.77009-2.430352 0.98749-60.015885 25.106818-106.400309 102.410438-3.353374 5.588275-2.705622 12.703323 1.602498 17.59268l42.051745 47.743374c-10.992355 19.107173-19.878746 39.309284-26.513864 60.282968l-61.390185 3.009544c-5.747911 0.284479-10.824533 3.834328-13.059434 9.138124-1.01512 2.415003-24.687262 60.190871-2.822278 147.651828 1.583055 6.324032 7.072069 10.893094 13.57518 11.308557 5.892197 0.37146 11.751648 0.523933 17.419741 0.667196 14.498202 0.372483 28.193109 0.723477 40.908712 4.63353 4.212952 1.294482 6.435573 8.270361 9.349949 18.763342 1.287319 4.640694 2.617617 9.43693 4.484128 14.010085 1.794879 4.393054 3.75758 8.570189 5.66093 12.607132 1.302669 2.765997 2.529613 5.380544 3.689019 8.018627 2.986007 6.803963 2.682086 9.773598 2.578732 10.349719-3.061732 3.672646-6.391571 7.238868-9.91379 11.015891-1.810229 1.943258-3.680832 3.949962-5.523807 5.980201l-22.560832 24.8909c-3.865028 4.261047-4.940522 10.365068-2.774183 15.693424 0.991584 2.426259 25.102724 60.011792 102.414531 106.400309 5.588275 3.353374 12.703323 2.701528 17.591657-1.603521l23.476691-20.682042c2.346441-2.061962 4.64888-4.336772 6.875594-6.534833 9.05319-8.93858 14.018272-12.95608 17.73185-11.576663 3.305279 1.222851 6.907317 3.166109 10.720156 5.228071 3.325745 1.794879 6.764054 3.650133 10.465352 5.288446 6.016017 2.662643 12.120039 4.688789 18.019399 6.65149 6.827499 2.266623 13.279445 4.409426 18.819624 7.275707 1.518586 0.782829 1.926886 0.994654 2.358721 7.830339 0.726547 11.496845 1.25048 23.276123 1.753947 34.672684 0.264013 5.900384 0.528026 11.803837 0.815575 17.700127 0.284479 5.743818 3.833305 10.82044 9.138124 13.05534 1.654686 0.698918 29.371958 12.063757 74.869175 12.063757 0.328481 0 3.65832 0 3.986801 0 45.497217 0 73.214489-11.364839 74.869175-12.063757 5.304819-2.234901 8.853645-7.311523 9.138124-13.05534 0.287549-5.89629 0.551562-11.799744 0.815575-17.700127 0.503467-11.396561 1.027399-23.175839 1.753947-34.672684 0.431835-6.835685 0.840134-7.04751 2.358721-7.830339 5.54018-2.866281 11.992125-5.009084 18.819624-7.275707 5.89936-1.962701 12.003382-3.988848 18.019399-6.65149 3.701299-1.638313 7.139607-3.493567 10.465352-5.288446 3.812839-2.061962 7.414877-4.00522 10.720156-5.228071 3.713578-1.379417 8.67866 2.638083 17.73185 11.576663 2.226714 2.198062 4.529153 4.472871 6.875594 6.534833l23.476691 20.682042c4.888334 4.305049 12.003382 4.956895 17.591657 1.603521 77.311807-46.388517 101.422947-103.97405 102.414531-106.400309 2.166339-5.328355 1.090844-11.432377-2.774183-15.693424l-22.560832-24.8909c-1.842974-2.030239-3.713578-4.036943-5.523807-5.980201-3.52222-3.777023-6.852058-7.343245-9.91379-11.015891-0.103354-0.576121-0.407276-3.545756 2.578732-10.349719 1.159406-2.638083 2.38635-5.252631 3.689019-8.018627 1.90335-4.036943 3.866051-8.214079 5.66093-12.607132 1.866511-4.573155 3.196809-9.369392 4.484128-14.010085 2.914376-10.492982 5.136997-17.46886 9.349949-18.763342 12.715603-3.910053 26.41051-4.261047 40.908712-4.63353 5.668093-0.143263 11.527544-0.295735 17.419741-0.667196 6.503111-0.415462 11.992125-4.984524 13.57518-11.308557C907.21518 494.340805 883.543038 436.564937 882.527918 434.149934zM643.49894 643.761929c-35.280528 35.280528-82.191954 54.711066-132.086317 54.711066s-96.806813-19.430538-132.086317-54.711066c-35.280528-35.279504-54.711066-82.191954-54.711066-132.086317 0-49.894364 19.430538-96.80272 54.711066-132.082224 35.283598-35.284621 82.191954-54.711066 132.086317-54.711066s96.80579 19.426445 132.086317 54.711066c35.279504 35.279504 54.711066 82.187861 54.711066 132.082224C698.210006 561.569976 678.782537 608.482425 643.49894 643.761929z",ke="M655.807326 287.35973m-223.989415 0a218.879 218.879 0 1 0 447.978829 0 218.879 218.879 0 1 0-447.978829 0ZM1039.955839 895.482975c-0.490184-212.177424-172.287821-384.030443-384.148513-384.030443-211.862739 0-383.660376 171.85302-384.15056 384.030443L1039.955839 895.482975z",Re="m44,60 m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",De="m47,61 m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",Oe="m 50,73 c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",Pe=Object.freeze({__proto__:null,compensationIcon:"m 7.92,18 9,-6.5 0,13 z m 9.3,-0.4 8.7,-6.1 0,13 -8.7,-6.1 z",conditionalIcon:"M 10.5,8.5 l 14.5,0 l 0,18 l -14.5,0 Z M 12.5,11.5 l 10.5,0 M 12.5,14.5 l 10.5,0 M 12.5,17.5 l 10.5,0 M 12.5,20.5 l 10.5,0 M 12.5,23.5 l 10.5,0 M 12.5,26.5 l 10.5,0 ",errorIcon:"m 7.2,25.991999999999997 0.09350000000000001,-0.025300000000000003 7.3392,-9.610700000000001 7.667000000000001,8.9661 4.7003,-18.2204 -5.8707,11.6501 -7.299600000000001,-9.585400000000002 z",escalationIcon:"M 18,7.2 l 8,20 l -8,-7 l -8,7 Z",exclusiveIcon:Se,inclusiveIcon:Te,linkIcon:"m 20.52,9.468 0,4.4375 -13.5,0 0,6.75 13.5,0 0,4.4375 9.84375,-7.8125 -9.84375,-7.8125 z",loopMarker:Oe,manualTaskIcon:"M0.5,3.751L4.583,0.5009999999999999C4.583,0.5009999999999999,15.749,0.5839999999999999,16.666,0.5839999999999999S14.249,3.5009999999999994,15.166,3.5009999999999994S26.833,3.5009999999999994,27.75,3.5009999999999994C28.916,5.209,27.582,6.667999999999999,26.916,7.167999999999999S27.791,9.084999999999999,25.916,11.584999999999999C25.166,11.834999999999999,26.666,13.459999999999999,24.583000000000002,14.918C23.416,15.501,25.166,16.46,23.333000000000002,17.750999999999998C22.166,17.750999999999998,2.5000000000000036,17.833999999999996,2.5000000000000036,17.833999999999996L0.5000000000000036,16.500999999999998V3.751ZM13.5,7L27,7M13.5,11L26,11M14,14.5L25,14.5M8.2,3.1L15,3.1",messageIcon:"m 8.459999999999999,11.34 l 0,12.6 l 18.900000000000002,0 l 0,-12.6 z l 9.450000000000001,5.4 l 9.450000000000001,-5.4",parallelIcon:Me,parallelMarker:Re,scriptTaskIcon:"M6.402,0.5H20.902C20.902,0.5,15.069,3.333,15.069,6.083S19.486,12.083,19.486,15.25S15.319,20.333,15.319,20.333H0.235C0.235,20.333,5.235,17.665999999999997,5.235,15.332999999999998S0.6520000000000001,8.582999999999998,0.6520000000000001,6.082999999999998S6.402,0.5,6.402,0.5ZM3.5,4.5L13.5,4.5M3.8,8.5L13.8,8.5M6.3,12.5L16.3,12.5M6.5,16.5L16.5,16.5",sequentialMarker:De,serviceTaskIcon:Ae,signalIcon:"M 18,7.2 l 9,16.2 l -18,0 Z",style:{throw:"fill: rgb(34, 36, 42); stroke-linecap: round; stroke-linejoin: round; stroke: white; stroke-width: 1px;",catch:"fill: white; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;",nonIntermediate:"stroke-width: 1.5; stroke-dash-array: 6",intermediate:"stroke-width: 1.5"},terminateIcon:_e,timerIcon:Ne,userTaskIcon:ke});function Ie(e,n,i){var o=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return p(i,e),i.prototype.getShape=function(){var e=this.props.model,i=e,o=i.x,r=i.y,a=i.width,s=i.height,l=i.points,u=e.getNodeStyle();return t.h("g",{transform:"matrix(1 0 0 1 ".concat(o-a/2," ").concat(r-s/2,")")},t.h(t.Polygon,g(g({},u),{x:o,y:r,points:l})),"string"==typeof n?t.h("path",g(g({d:n},u),{fill:"rgb(34, 36, 42)",strokeWidth:1})):n)},i}(t.PolygonNode);return{type:e,view:o,model:function(e){function t(t,n){var o=this;return t.id||(t.id="Gateway_".concat(me())),t.text||(t.text=""),t.text&&"string"==typeof t.text&&(t.text={value:t.text,x:t.x,y:t.y+40}),t.properties=g(g({},i||{}),t.properties),(o=e.call(this,t,n)||this).points=[[25,0],[50,25],[25,50],[0,25]],pe.call(o),o}return p(t,e),t}(t.PolygonNodeModel)}}var Le={parallel:Re,sequential:De,loop:Oe};function Be(e,n,i){var o=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return p(i,e),i.prototype.getLabelShape=function(){var e=this.props.model,i=e.x,o=e.y,r=e.width,a=e.height,s=e.getNodeStyle(),l=Array.isArray(n)?t.h.apply(void 0,E(["g",{transform:"matrix(1 0 0 1 ".concat(i-r/2," ").concat(o-a/2,")")}],w(n),!1)):t.h("path",{fill:s.stroke,d:n});return t.h("svg",{x:i-r/2+5,y:o-a/2+5,width:25,height:25,viewBox:"0 0 1274 1024"},l)},i.prototype.getShape=function(){var e=this.props.model,n=e.x,i=e.y,o=e.width,r=e.height,a=e.radius,s=e.properties,l=e.getNodeStyle();return t.h("g",{},[t.h("rect",g(g({},l),{x:n-o/2,y:i-r/2,rx:a,ry:a,width:o,height:r,opacity:.95})),this.getLabelShape(),t.h("g",{transform:"matrix(1 0 0 1 ".concat(n-o/2," ").concat(i-r/2,")")},t.h("path",{fill:"white",strokeLinecap:"round",strokeLinejoin:"round",stroke:"rgb(34, 36, 42)",strokeWidth:"2",d:Le[s.multiInstanceType]||""}))])},i}(t.RectNode),r=function(e){function t(t,n){var o,r=this;t.id||(t.id="Activity_".concat(me()));var a=g(g({},i||{}),t.properties);return t.properties=a,r=e.call(this,t,n)||this,null===(o=null==a?void 0:a.boundaryEvents)||void 0===o||o.forEach((function(e){r.addBoundaryEvent(e)})),r.deleteProperty("boundaryEvents"),pe.call(r),r}return p(t,e),t.prototype.initNodeData=function(t){e.prototype.initNodeData.call(this,t),this.isTaskNode=!0,this.boundaryEvents=[]},t.prototype.getNodeStyle=function(){var t=e.prototype.getNodeStyle.call(this);return this.properties.isBoundaryEventTouchingTask&&(t.stroke="#00acff",t.strokeWidth=2),t},t.prototype.getOutlineStyle=function(){var t=e.prototype.getOutlineStyle.call(this);return t.stroke="transparent",!t.hover&&(t.hover={}),t.hover.stroke="transparent",t},t.prototype.setTouching=function(e){this.setProperty("isBoundaryEventTouchingTask",e)},t.prototype.addBoundaryEvent=function(e){if(this.setTouching(!1),this.boundaryEvents.find((function(t){return t===e})))return!1;var t=this.graphModel.getNodeModelById(e);return null==t||t.setProperties({attachedToRef:this.id}),this.boundaryEvents.push(e),!0},t.prototype.deleteBoundaryEvent=function(e){this.boundaryEvents=this.boundaryEvents.filter((function(t){return t!==e}))},