"use strict";var iC=Object.defineProperty;var oC=(e,t,n)=>t in e?iC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var $t=(e,t,n)=>(oC(e,typeof t!="symbol"?t+"":t,n),n);const J=require("react"),se=require("antd"),bh=require("react-dom"),qf=require("@ant-design/icons");function aC(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const P=aC(J);function nc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yp={exports:{}},ds={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var km;function sC(){if(km)return ds;km=1;var e=J,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(s,c,l){var u,f={},p=null,d=null;l!==void 0&&(p=""+l),c.key!==void 0&&(p=""+c.key),c.ref!==void 0&&(d=c.ref);for(u in c)r.call(c,u)&&!o.hasOwnProperty(u)&&(f[u]=c[u]);if(s&&s.defaultProps)for(u in c=s.defaultProps,c)f[u]===void 0&&(f[u]=c[u]);return{$$typeof:t,type:s,key:p,ref:d,props:f,_owner:i.current}}return ds.Fragment=n,ds.jsx=a,ds.jsxs=a,ds}var hs={};/** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Lm;function cC(){return Lm||(Lm=1,process.env.NODE_ENV!=="production"&&function(){var e=J,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),h=Symbol.iterator,v="@@iterator";function m(j){if(j===null||typeof j!="object")return null;var te=h&&j[h]||j[v];return typeof te=="function"?te:null}var _=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(j){{for(var te=arguments.length,de=new Array(te>1?te-1:0),Ne=1;Ne=1&&Et>=0&&Ve[dt]!==pt[Et];)Et--;for(;dt>=1&&Et>=0;dt--,Et--)if(Ve[dt]!==pt[Et]){if(dt!==1||Et!==1)do if(dt--,Et--,Et<0||Ve[dt]!==pt[Et]){var sn=` `+Ve[dt].replace(" at new "," at ");return j.displayName&&sn.includes("")&&(sn=sn.replace("",j.displayName)),typeof j=="function"&&_e.set(j,sn),sn}while(dt>=1&&Et>=0);break}}}finally{me=!1,ee.current=ft,U(),Error.prepareStackTrace=tt}var cr=j?j.displayName||j.name:"",Ei=cr?le(cr):"";return typeof j=="function"&&_e.set(j,Ei),Ei}function De(j,te,de){return rt(j,!1)}function re(j){var te=j.prototype;return!!(te&&te.isReactComponent)}function He(j,te,de){if(j==null)return"";if(typeof j=="function")return rt(j,re(j));if(typeof j=="string")return le(j);switch(j){case l:return le("Suspense");case u:return le("SuspenseList")}if(typeof j=="object")switch(j.$$typeof){case c:return De(j.render);case f:return He(j.type,te,de);case p:{var Ne=j,tt=Ne._payload,ft=Ne._init;try{return He(ft(tt),te,de)}catch{}}}return""}var Ye=Object.prototype.hasOwnProperty,ke={},ue=_.ReactDebugCurrentFrame;function Ee(j){if(j){var te=j._owner,de=He(j.type,j._source,te?te.type:null);ue.setExtraStackFrame(de)}else ue.setExtraStackFrame(null)}function pe(j,te,de,Ne,tt){{var ft=Function.call.bind(Ye);for(var ze in j)if(ft(j,ze)){var Ve=void 0;try{if(typeof j[ze]!="function"){var pt=Error((Ne||"React class")+": "+de+" type `"+ze+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof j[ze]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw pt.name="Invariant Violation",pt}Ve=j[ze](te,ze,Ne,de,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(dt){Ve=dt}Ve&&!(Ve instanceof Error)&&(Ee(tt),g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Ne||"React class",de,ze,typeof Ve),Ee(null)),Ve instanceof Error&&!(Ve.message in ke)&&(ke[Ve.message]=!0,Ee(tt),g("Failed %s type: %s",de,Ve.message),Ee(null))}}}var we=Array.isArray;function Ke(j){return we(j)}function ct(j){{var te=typeof Symbol=="function"&&Symbol.toStringTag,de=te&&j[Symbol.toStringTag]||j.constructor.name||"Object";return de}}function ye(j){try{return he(j),!1}catch{return!0}}function he(j){return""+j}function Xe(j){if(ye(j))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ct(j)),he(j)}var Tt=_.ReactCurrentOwner,zt={key:!0,ref:!0,__self:!0,__source:!0},en,qn,kt;kt={};function or(j){if(Ye.call(j,"ref")){var te=Object.getOwnPropertyDescriptor(j,"ref").get;if(te&&te.isReactWarning)return!1}return j.ref!==void 0}function Vt(j){if(Ye.call(j,"key")){var te=Object.getOwnPropertyDescriptor(j,"key").get;if(te&&te.isReactWarning)return!1}return j.key!==void 0}function tn(j,te){if(typeof j.ref=="string"&&Tt.current&&te&&Tt.current.stateNode!==te){var de=V(Tt.current.type);kt[de]||(g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',V(Tt.current.type),j.ref),kt[de]=!0)}}function Lt(j,te){{var de=function(){en||(en=!0,g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",te))};de.isReactWarning=!0,Object.defineProperty(j,"key",{get:de,configurable:!0})}}function En(j,te){{var de=function(){qn||(qn=!0,g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",te))};de.isReactWarning=!0,Object.defineProperty(j,"ref",{get:de,configurable:!0})}}var Yn=function(j,te,de,Ne,tt,ft,ze){var Ve={$$typeof:t,type:j,key:te,ref:de,props:ze,_owner:ft};return Ve._store={},Object.defineProperty(Ve._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ve,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ne}),Object.defineProperty(Ve,"_source",{configurable:!1,enumerable:!1,writable:!1,value:tt}),Object.freeze&&(Object.freeze(Ve.props),Object.freeze(Ve)),Ve};function Ot(j,te,de,Ne,tt){{var ft,ze={},Ve=null,pt=null;de!==void 0&&(Xe(de),Ve=""+de),Vt(te)&&(Xe(te.key),Ve=""+te.key),or(te)&&(pt=te.ref,tn(te,tt));for(ft in te)Ye.call(te,ft)&&!zt.hasOwnProperty(ft)&&(ze[ft]=te[ft]);if(j&&j.defaultProps){var dt=j.defaultProps;for(ft in dt)ze[ft]===void 0&&(ze[ft]=dt[ft])}if(Ve||pt){var Et=typeof j=="function"?j.displayName||j.name||"Unknown":j;Ve&&Lt(ze,Et),pt&&En(ze,Et)}return Yn(j,Ve,pt,tt,Ne,Tt.current,ze)}}var Bt=_.ReactCurrentOwner,fe=_.ReactDebugCurrentFrame;function Oe(j){if(j){var te=j._owner,de=He(j.type,j._source,te?te.type:null);fe.setExtraStackFrame(de)}else fe.setExtraStackFrame(null)}var vt;vt=!1;function Re(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function Me(){{if(Bt.current){var j=V(Bt.current.type);if(j)return` Check the render method of \``+j+"`."}return""}}function Rt(j){{if(j!==void 0){var te=j.fileName.replace(/^.*[\\\/]/,""),de=j.lineNumber;return` Check your code at `+te+":"+de+"."}return""}}var wt={};function Bn(j){{var te=Me();if(!te){var de=typeof j=="string"?j:j.displayName||j.name;de&&(te=` Check the top-level render call using <`+de+">.")}return te}}function ar(j,te){{if(!j._store||j._store.validated||j.key!=null)return;j._store.validated=!0;var de=Bn(te);if(wt[de])return;wt[de]=!0;var Ne="";j&&j._owner&&j._owner!==Bt.current&&(Ne=" It was passed a child from "+V(j._owner.type)+"."),Oe(j),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',de,Ne),Oe(null)}}function sr(j,te){{if(typeof j!="object")return;if(Ke(j))for(var de=0;de",Ve=" Did you accidentally export a JSX literal instead of a component?"):dt=typeof j,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",dt,Ve)}var Et=Ot(j,te,de,tt,ft);if(Et==null)return Et;if(ze){var sn=te.children;if(sn!==void 0)if(Ne)if(Ke(sn)){for(var cr=0;cr=Math.pow(2,n)?t(n,r):s};t.rack=function(n,r,i){var o=function(s){var c=0;do{if(c++>10)if(i)n+=i;else throw new Error("too many ID collisions, use more bits");var l=t(n,r)}while(Object.hasOwnProperty.call(a,l));return a[l]=s,l},a=o.hats={};return o.get=function(s){return o.hats[s]},o.set=function(s,c){return o.hats[s]=c,o},o.bits=n||128,o.base=r||16,o}});function ui(e){if(!(this instanceof ui))return new ui(e);e=e||[128,36,1],this._seed=e.length?uC.rack(e[0],e[1],e[2]):e}ui.prototype.next=function(e){return this._seed(e||!0)};ui.prototype.nextPrefixed=function(e,t){var n;do n=e+this.next(!0);while(this.assigned(n));return this.claim(n,t),n};ui.prototype.claim=function(e,t){this._seed.set(e,t||!0)};ui.prototype.assigned=function(e){return this._seed.get(e)||!1};ui.prototype.unclaim=function(e){delete this._seed.hats[e]};ui.prototype.clear=function(){var e=this._seed.hats,t;for(t in e)this.unclaim(t)};function Jl(e){return Array.prototype.concat.apply([],e)}const rc=Object.prototype.toString,fC=Object.prototype.hasOwnProperty;function io(e){return e===void 0}function ln(e){return e!==void 0}function Kp(e){return e==null}function qe(e){return rc.call(e)==="[object Array]"}function fn(e){return rc.call(e)==="[object Object]"}function Le(e){return rc.call(e)==="[object Number]"}function Rn(e){const t=rc.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"||t==="[object Proxy]"}function tr(e){return rc.call(e)==="[object String]"}function pC(e){if(!qe(e))throw new Error("must supply array")}function xr(e,t){return fC.call(e,t)}function st(e,t){const n=Ou(t);let r;return z(e,function(i,o){if(n(i,o))return r=i,!1}),r}function sE(e,t){const n=Ou(t);let r=qe(e)?-1:void 0;return z(e,function(i,o){if(n(i,o))return r=o,!1}),r}function Ge(e,t){const n=Ou(t);let r=[];return z(e,function(i,o){n(i,o)&&r.push(i)}),r}function z(e,t){let n,r;if(io(e))return;const i=qe(e)?gC:mC;for(let o in e)if(xr(e,o)&&(n=e[o],r=t(n,i(o)),r===!1))return n}function dC(e,t){if(io(e))return[];pC(e);const n=Ou(t);return e.filter(function(r,i){return!n(r,i)})}function nr(e,t,n){return z(e,function(r,i){n=t(n,r,i)}),n}function Jo(e,t){return!!nr(e,function(n,r,i){return n&&t(r,i)},!0)}function Ni(e,t){return!!st(e,t)}function mn(e,t){let n=[];return z(e,function(r,i){n.push(t(r,i))}),n}function eu(e){return e&&Object.keys(e)||[]}function hC(e){return eu(e).length}function Eh(e){return mn(e,t=>t)}function qa(e,t,n={}){return t=_h(t),z(e,function(r){let i=t(r)||"_",o=n[i];o||(o=n[i]=[]),o.push(r)}),n}function cE(e,...t){e=_h(e);let n={};return z(t,i=>qa(i,e,n)),mn(n,function(i,o){return i[0]})}const vC=cE;function Yr(e,t){t=_h(t);let n=[];return z(e,function(r,i){let o=t(r,i),a={d:o,v:r};for(var s=0;sr.v)}function Ur(e){return function(t){return Jo(e,function(n,r){return t[r]===n})}}function _h(e){return Rn(e)?e:t=>t[e]}function Ou(e){return Rn(e)?e:t=>t===e}function mC(e){return e}function gC(e){return Number(e)}function lE(e,t){let n,r,i,o;function a(f){let p=Date.now(),d=f?0:o+t-p;if(d>0)return s(d);e.apply(i,r),c()}function s(f){n=setTimeout(a,f)}function c(){n&&clearTimeout(n),n=o=r=i=void 0}function l(){n&&a(!0),c()}function u(...f){o=Date.now(),r=f,i=this,n||s(t)}return u.flush=l,u.cancel=c,u}function Vn(e,t){return e.bind(t)}function W(e,...t){return Object.assign(e,...t)}function yC(e,t,n){let r=e;return z(t,function(i,o){if(typeof i!="number"&&typeof i!="string")throw new Error("illegal key type: "+typeof i+". Key should be of type number or string.");if(i==="constructor")throw new Error("illegal key: constructor");if(i==="__proto__")throw new Error("illegal key: __proto__");let a=t[o+1],s=r[i];ln(a)&&Kp(s)&&(s=r[i]=isNaN(+a)?{}:[]),io(a)?io(n)?delete r[i]:r[i]=n:r=s}),e}function Kr(e,t){let n={},r=Object(e);return z(t,function(i){i in r&&(n[i]=e[i])}),n}function pi(e,t){let n={},r=Object(e);return z(r,function(i,o){t.indexOf(o)===-1&&(n[o]=i)}),n}function bC(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(e)}const EC=Object.prototype.toString,_C=Object.prototype.hasOwnProperty;function xC(e){return e===void 0}function wC(e){return EC.call(e)==="[object Array]"}function SC(e,t){return _C.call(e,t)}function $m(e,t){let n,r;if(xC(e))return;const i=wC(e)?TC:CC;for(let o in e)if(SC(e,o)&&(n=e[o],r=t(n,i(o)),r===!1))return n}function CC(e){return e}function TC(e){return Number(e)}function Cn(e,...t){const n=e.style;return $m(t,function(r){r&&$m(r,function(i,o){n[o]=i})}),e}function Tn(e,t,n){return arguments.length==2?e.getAttribute(t):n===null?e.removeAttribute(t):(e.setAttribute(t,n),e)}const RC=Object.prototype.toString;function At(e){return new oo(e)}function oo(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}oo.prototype.add=function(e){return this.list.add(e),this};oo.prototype.remove=function(e){return RC.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)};oo.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n
a',pE=!Wc.getElementsByTagName("link").length,Wc=void 0);var rn={legend:[1,"
","
"],tr:[2,"","
"],col:[2,"","
"],_default:pE?[1,"X
","
"]:[0,"",""]};rn.td=rn.th=[3,"","
"];rn.option=rn.optgroup=[1,'"];rn.thead=rn.tbody=rn.colgroup=rn.caption=rn.tfoot=[1,"","
"];rn.polyline=rn.ellipse=rn.polygon=rn.circle=rn.text=rn.line=rn.path=rn.rect=rn.g=[1,'',""];function IC(e,t){if(typeof e!="string")throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var r=n[1];if(r=="body"){var c=t.createElement("html");return c.innerHTML=e,c.removeChild(c.lastChild)}var i=Object.prototype.hasOwnProperty.call(rn,r)?rn[r]:rn._default,o=i[0],a=i[1],s=i[2],c=t.createElement("div");for(c.innerHTML=a+e+s;o--;)c=c.lastChild;if(c.firstChild==c.lastChild)return c.removeChild(c.firstChild);for(var l=t.createDocumentFragment();c.firstChild;)l.appendChild(c.removeChild(c.firstChild));return l}var Ct=DC;function ht(e,t){return t=t||document,t.querySelector(e)}function Zp(e,t){return t=t||document,t.querySelectorAll(e)}function fi(e){e.parentNode&&e.parentNode.removeChild(e)}function NC(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch{}return e}function dE(e,t){return t.appendChild(NC(e,t))}function Ie(e,t){return dE(t,e),e}var Qp=2,hE={"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":Qp,"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":Qp,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function kC(e,t){return hE[t]?e.style[t]:e.getAttributeNS(null,t)}function vE(e,t,n){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=hE[r];i?(i===Qp&&typeof n=="number"&&(n=String(n)+"px"),e.style[r]=n):e.setAttributeNS(null,t,n)}function LC(e,t){var n=Object.keys(t),r,i;for(r=0,i;i=n[r];r++)vE(e,i,t[i])}function ge(e,t,n){if(typeof t=="string")if(n!==void 0)vE(e,t,n);else return kC(e,t);else LC(e,t);return e}const $C=Object.prototype.toString;function et(e){return new ao(e)}function ao(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}ao.prototype.add=function(e){return this.list.add(e),this};ao.prototype.remove=function(e){return $C.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)};ao.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n"+e+"",t=!0);var n=jC(e);if(!t)return n;for(var r=document.createDocumentFragment(),i=n.firstChild;i.firstChild;)r.appendChild(i.firstChild);return r}function jC(e){var t;return t=new DOMParser,t.async=!1,t.parseFromString(e,"text/xml")}function Te(e,t){var n;return e.charAt(0)==="<"?(n=mE(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(Sh.svg,e),t&&ge(n,t),n}var Yf=null;function Jp(){return Yf===null&&(Yf=Te("svg")),Yf}function Fm(e,t){var n,r,i=Object.keys(t);for(n=0;r=i[n];n++)e[r]=t[r];return e}function FC(e,t,n,r,i,o){var a=Jp().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return Fm(a,e);case 6:return Fm(a,{a:e,b:t,c:n,d:r,e:i,f:o})}}function Ps(e){return e?Jp().createSVGTransformFromMatrix(e):Jp().createSVGTransform()}var Bm=/([&<>]{1})/g,BC=/([\n\r"]{1})/g,HC={"&":"&","<":"<",">":">",'"':"'"};function Kf(e,t){function n(r,i){return HC[i]||i}return e.replace(t,n)}function gE(e,t){var n,r,i,o,a;switch(e.nodeType){case 3:t.push(Kf(e.textContent,Bm));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(i=e.attributes,n=0,r=i.length;n"),a=e.childNodes,n=0,r=a.length;n")}else t.push("/>");break;case 8:t.push("");break;case 4:t.push("");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function zC(e,t){var n=mE(t);if(ic(e),!!t){WC(n)||(n=n.documentElement);for(var r=UC(n.childNodes),i=0;i{const i=r.match(QC);return(i&&i[1]||r).trim()})||[]}function yE(e,t){t=t||{get:function(g,y){if(n.push(g),y===!1)return null;throw a(`No provider for "${g}"!`)}};const n=[],r=this._providers=Object.create(t._providers||null),i=this._instances=Object.create(null),o=i.injector=this,a=function(g){const y=n.join(" -> ");return n.length=0,new Error(y?`${g} (Resolving: ${y})`:g)};function s(g,y){if(!r[g]&&g.indexOf(".")!==-1){const b=g.split(".");let x=s(b.shift());for(;b.length;)x=x[b.shift()];return x}if(Xf(i,g))return i[g];if(Xf(r,g)){if(n.indexOf(g)!==-1)throw n.push(g),a("Cannot resolve circular dependency!");return n.push(g),i[g]=r[g][0](r[g][1]),n.pop(),i[g]}return t.get(g,y)}function c(g,y){if(typeof y>"u"&&(y={}),typeof g!="function")if(Ch(g))g=kl(g.slice());else throw a(`Cannot invoke "${g}". Expected a function!`);const x=(g.$inject||JC(g)).map(S=>Xf(y,S)?y[S]:s(S));return{fn:g,dependencies:x}}function l(g){const{fn:y,dependencies:b}=c(g),x=Function.prototype.bind.apply(y,[null].concat(b));return new x}function u(g,y,b){const{fn:x,dependencies:S}=c(g,b);return x.apply(y,S)}function f(g){return kl(y=>g.get(y))}function p(g,y){if(y&&y.length){const b=Object.create(null),x=Object.create(null),S=[],C=[],M=[];let A,N,L,B;for(let V in r)A=r[V],y.indexOf(V)!==-1&&(A[2]==="private"?(N=S.indexOf(A[3]),N===-1?(L=A[3].createChild([],y),B=f(L),S.push(A[3]),C.push(L),M.push(B),b[V]=[B,V,"private",L]):b[V]=[M[N],V,"private",C[N]]):b[V]=[A[2],A[1]],x[V]=!0),(A[2]==="factory"||A[2]==="type")&&A[1].$scope&&y.forEach(K=>{A[1].$scope.indexOf(K)!==-1&&(b[V]=[A[2],A[1]],x[K]=!0)});y.forEach(V=>{if(!x[V])throw new Error('No provider for "'+V+'". Cannot use provider from the parent!')}),g.unshift(b)}return new yE(g,o)}const d={factory:u,type:l,value:function(g){return g}};function h(g,y){const b=g.__init__||[];return function(){b.forEach(x=>{typeof x=="string"?y.get(x):y.invoke(x)})}}function v(g){const y=g.__exports__;if(y){const b=g.__modules__,x=Object.keys(g).reduce((N,L)=>(L!=="__exports__"&&L!=="__modules__"&&L!=="__init__"&&L!=="__depends__"&&(N[L]=g[L]),N),Object.create(null)),S=(b||[]).concat(x),C=p(S),M=kl(function(N){return C.get(N)});y.forEach(function(N){r[N]=[M,N,"private",C]});const A=(g.__init__||[]).slice();return A.unshift(function(){C.init()}),g=Object.assign({},g,{__init__:A}),h(g,C)}return Object.keys(g).forEach(function(b){if(b==="__init__"||b==="__depends__")return;if(g[b][2]==="private"){r[b]=g[b];return}const x=g[b][0],S=g[b][1];r[b]=[d[x],eT(x,S),x]}),h(g,o)}function m(g,y){return g.indexOf(y)!==-1||(g=(y.__depends__||[]).reduce(m,g),g.indexOf(y)!==-1)?g:g.concat(y)}function _(g){const y=g.reduce(m,[]).map(v);let b=!1;return function(){b||(b=!0,y.forEach(x=>x()))}}this.get=s,this.invoke=u,this.instantiate=l,this.createChild=p,this.init=_(e)}function eT(e,t){return e!=="value"&&Ch(t)&&(t=kl(t.slice())),t}var tT=1e3;function Li(e,t){var n=this;t=t||tT,e.on(["render.shape","render.connection"],t,function(r,i){var o=r.type,a=i.element,s=i.gfx,c=i.attrs;if(n.canRender(a))return o==="render.shape"?n.drawShape(s,a,c):n.drawConnection(s,a,c)}),e.on(["render.getShapePath","render.getConnectionPath"],t,function(r,i){if(n.canRender(i))return r.type==="render.getShapePath"?n.getShapePath(i):n.getConnectionPath(i)})}Li.prototype.canRender=function(e){};Li.prototype.drawShape=function(e,t){};Li.prototype.drawConnection=function(e,t){};Li.prototype.getShapePath=function(e){};Li.prototype.getConnectionPath=function(e){};function ea(e){return e.flat().join(",").replace(/,?([A-z]),?/g,"$1")}function nT(e){return["M",e.x,e.y]}function Zf(e){return["L",e.x,e.y]}function rT(e,t,n){return["C",e.x,e.y,t.x,t.y,n.x,n.y]}function iT(e,t){const n=e.length,r=[nT(e[0])];for(let i=1;ii||i===void 0)&&(i=c+f),(l+u>o||o===void 0)&&(o=l+u)}),{x:n,y:r,height:o-r,width:i-n}}function sT(e,t){var n={};return z(e,function(r){var i=r;i.waypoints&&(i=Zt(i)),!Le(t.y)&&i.x>t.x&&(n[r.id]=r),!Le(t.x)&&i.y>t.y&&(n[r.id]=r),i.x>t.x&&i.y>t.y&&(Le(t.width)&&Le(t.height)&&i.width+i.x"u"&&(r=5),!e||!t||!n)return!1;var i=(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),o=ac(e,t);return Math.abs(i/o)<=r}var fT=2;function Pi(e,t){var n=Array.from(arguments).flat();const r={x:"v",y:"h"};for(const[i,o]of Object.entries(r))if(pT(i,n))return o;return!1}function pT(e,t){const n=t[0];return Jo(t,function(r){return Math.abs(n[e]-r[e])<=fT})}function Vm(e,t,n){return n=n||0,e.x>t.x-n&&e.y>t.y-n&&e.x=1e3&&delete i[o.shift()],o.push(r),i[r]=e.apply(0,n),i[r])}return t}function yT(e){if(!e)return null;var t=ka(e);if(t.arr)return As(t.arr);var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},r=[];return ru(e)&&ru(e[0])&&(r=As(e)),r.length||String(e).replace(hT,function(i,o,a){var s=[],c=o.toLowerCase();for(a.replace(vT,function(l,u){u&&s.push(+u)}),c=="m"&&s.length>2&&(r.push([o].concat(s.splice(0,2))),c="l",o=o=="m"?"l":"L");s.length>=n[c]&&(r.push([o].concat(s.splice(0,n[c]))),!!n[c]););}),r.toString=ka.toString,t.arr=As(r),r}function ka(e){var t=ka.ps=ka.ps||{};return t[e]?t[e].sleep=100:t[e]={sleep:100},setTimeout(function(){for(var n in t)Ph(t,n)&&n!=e&&(t[n].sleep--,!t[n].sleep&&delete t[n])}),t[e]}function nd(e,t,n,r){return arguments.length===1&&(t=e.y,n=e.width,r=e.height,e=e.x),{x:e,y:t,width:n,height:r,x2:e+n,y2:t+r}}function wE(){return this.join(",").replace(dT,"$1")}function iu(e){var t=As(e);return t.toString=wE,t}function Gm(e,t,n,r,i,o,a,s,c){var l=1-c,u=Um(l,3),f=Um(l,2),p=c*c,d=p*c,h=u*e+f*3*c*n+l*3*c*c*i+d*a,v=u*t+f*3*c*r+l*3*c*c*o+d*s;return{x:ou(h),y:ou(v)}}function qm(e){var t=ST.apply(null,e);return nd(t.x0,t.y0,t.x1-t.x0,t.y1-t.y0)}function Xi(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function bT(e,t){return e=nd(e),t=nd(t),Xi(t,e.x,e.y)||Xi(t,e.x2,e.y)||Xi(t,e.x,e.y2)||Xi(t,e.x2,e.y2)||Xi(e,t.x,t.y)||Xi(e,t.x2,t.y)||Xi(e,t.x,t.y2)||Xi(e,t.x2,t.y2)||(e.xt.x||t.xe.x)&&(e.yt.y||t.ye.y)}function Ym(e,t,n,r,i){var o=-3*t+9*n-9*r+3*i,a=e*o+6*t-12*n+6*r;return e*a-3*t+3*n}function Km(e,t,n,r,i,o,a,s,c){c==null&&(c=1),c=c>1?1:c<0?0:c;for(var l=c/2,u=12,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],p=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,h=0;hai(i,a)||ai(t,r)ai(o,s))){var c=(e*r-t*n)*(i-a)-(e-n)*(i*s-o*a),l=(e*r-t*n)*(o-s)-(t-r)*(i*s-o*a),u=(e-n)*(o-s)-(t-r)*(i-a);if(u){var f=ou(c/u),p=ou(l/u),d=+f.toFixed(2),h=+p.toFixed(2);if(!(d<+oi(e,n).toFixed(2)||d>+ai(e,n).toFixed(2)||d<+oi(i,a).toFixed(2)||d>+ai(i,a).toFixed(2)||h<+oi(t,r).toFixed(2)||h>+ai(t,r).toFixed(2)||h<+oi(o,s).toFixed(2)||h>+ai(o,s).toFixed(2)))return{x:f,y:p}}}}function ou(e){return Math.round(e*1e11)/1e11}function _T(e,t,n){var r=qm(e),i=qm(t);if(!bT(r,i))return n?0:[];for(var o=Km.apply(0,e),a=Km.apply(0,t),s=Xm(e)?1:~~(o/5)||1,c=Xm(t)?1:~~(a/5)||1,l=[],u=[],f={},p=n?0:[],d=0;d=0&&M<=1&&A>=0&&A<=1&&(n?p++:p.push({x:S.x,y:S.y,t1:M,t2:A}))}}return p}function xT(e,t,n){e=Qm(e),t=Qm(t);for(var r,i,o,a,s,c,l,u,f,p,d=n?0:[],h=0,v=e.length;h1&&(_=Yt.sqrt(_),n=_*n,r=_*r);var g=n*n,y=r*r,b=(o==a?-1:1)*Yt.sqrt(eo((g*y-g*m*m-y*v*v)/(g*m*m+y*v*v))),x=b*n*m/r+(e+s)/2,S=b*-r*v/n+(t+c)/2,C=Yt.asin(((t-S)/r).toFixed(9)),M=Yt.asin(((c-S)/r).toFixed(9));C=eM&&(C=C-Ki*2),!a&&M>C&&(M=M-Ki*2)}var A=M-C;if(eo(A)>u){var N=M,L=s,B=c;M=C+u*(a&&M>C?1:-1),s=x+n*Yt.cos(M),c=S+r*Yt.sin(M),p=SE(s,c,n,r,i,0,a,L,B,[M,N,x,S])}A=M-C;var V=Yt.cos(C),K=Yt.sin(C),Q=Yt.cos(M),G=Yt.sin(M),H=Yt.tan(A/4),q=4/3*n*H,T=4/3*r*H,E=[e,t],D=[e+q*K,t-T*V],k=[s+q*G,c-T*Q],I=[s,c];if(D[0]=2*E[0]-D[0],D[1]=2*E[1]-D[1],l)return[D,k,I].concat(p);p=[D,k,I].concat(p).join().split(",");for(var $=[],U=0,ee=p.length;U7){d[h].shift();for(var v=d[h];v.length;)a[h]="A",d.splice(h++,0,["C"].concat(v.splice(0,6)));d.splice(h,1),u=n.length}},a=[],s="",c="",l=0,u=n.length;l=i.right,s=r.top-n.y>=i.bottom,c=r.right+n.x<=i.left,l=o?"top":s?"bottom":null,u=c?"left":a?"right":null;return u&&l?l+"-"+u:u||l||"intersect"}function rd(e,t,n){var r=PT(e,t);return r.length===1||r.length===2&&ac(r[0],r[1])<1?Oi(r[0]):r.length>1?(r=Yr(r,function(i){var o=Math.floor(i.t2*100)||1;return o=100-o,o=(o<10?"0":"")+o,i.segment2+"#"+o}),Oi(r[n?0:r.length-1])):null}function PT(e,t){return CE(e,t)}function AT(e){e=e.slice();for(var t=0,n,r,i;e[t];)n=e[t],r=e[t-1],i=e[t+1],ac(n,i)===0||Rh(r,i,n)?e.splice(t,1):t++;return e}function OT(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ll(e,t){return Math.round(e*t)/t}function Jm(e){return Le(e)?e+"px":e}function MT(e){for(;e.parent;)e=e.parent;return e}function DT(e){e=W({},{width:"100%",height:"100%"},e);const t=e.container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),Cn(n,{position:"relative",overflow:"hidden",width:Jm(e.width),height:Jm(e.height)}),t.appendChild(n),n}function RE(e,t,n){const r=Te("g");et(r).add(t);const i=n!==void 0?n:e.childNodes.length-1;return e.insertBefore(r,e.childNodes[i]||null),r}const IT="base",PE=0,NT=1,kT={shape:["x","y","width","height"],connection:["waypoints"]};function We(e,t,n,r){this._eventBus=t,this._elementRegistry=r,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._init(e||{})}We.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"];We.prototype._init=function(e){const t=this._eventBus,n=this._container=DT(e),r=this._svg=Te("svg");ge(r,{width:"100%",height:"100%"}),Ie(n,r);const i=this._viewport=RE(r,"viewport");e.deferUpdate&&(this._viewboxChanged=lE(Vn(this._viewboxChanged,this),300)),t.on("diagram.init",()=>{t.fire("canvas.init",{svg:r,viewport:i})}),t.on(["shape.added","connection.added","shape.removed","connection.removed","elements.changed","root.set"],()=>{delete this._cachedViewbox}),t.on("diagram.destroy",500,this._destroy,this),t.on("diagram.clear",500,this._clear,this)};We.prototype._destroy=function(){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});const e=this._container.parentNode;e&&e.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._planes,delete this._rootElement,delete this._viewport};We.prototype._clear=function(){this._elementRegistry.getAll().forEach(t=>{const n=_E(t);n==="root"?this.removeRootElement(t):this._removeElement(t,n)}),this._planes=[],this._rootElement=null,delete this._cachedViewbox};We.prototype.getDefaultLayer=function(){return this.getLayer(IT,PE)};We.prototype.getLayer=function(e,t){if(!e)throw new Error("must specify a name");let n=this._layers[e];if(n||(n=this._layers[e]=this._createLayer(e,t)),typeof t<"u"&&n.index!==t)throw new Error("layer <"+e+"> already created at index <"+t+">");return n.group};We.prototype._getChildIndex=function(e){return nr(this._layers,function(t,n){return n.visible&&e>=n.index&&t++,t},0)};We.prototype._createLayer=function(e,t){typeof t>"u"&&(t=NT);const n=this._getChildIndex(t);return{group:RE(this._viewport,"layer-"+e,n),index:t,visible:!0}};We.prototype.showLayer=function(e){if(!e)throw new Error("must specify a name");const t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");const n=this._viewport,r=t.group,i=t.index;if(t.visible)return r;const o=this._getChildIndex(i);return n.insertBefore(r,n.childNodes[o]||null),t.visible=!0,r};We.prototype.hideLayer=function(e){if(!e)throw new Error("must specify a name");const t=this._layers[e];if(!t)throw new Error("layer <"+e+"> does not exist");const n=t.group;return t.visible&&(jt(n),t.visible=!1),n};We.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],jt(t.group))};We.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null};We.prototype.findRoot=function(e){return typeof e=="string"&&(e=this._elementRegistry.get(e)),e?(this._findPlaneForRoot(MT(e))||{}).rootElement:void 0};We.prototype.getRootElements=function(){return this._planes.map(function(e){return e.rootElement})};We.prototype._findPlaneForRoot=function(e){return st(this._planes,function(t){return t.rootElement===e})};We.prototype.getContainer=function(){return this._container};We.prototype._updateMarker=function(e,t,n){let r;e.id||(e=this._elementRegistry.get(e)),r=this._elementRegistry._elements[e.id],r&&(z([r.gfx,r.secondaryGfx],function(i){i&&(n?et(i).add(t):et(i).remove(t))}),this._eventBus.fire("element.marker.update",{element:e,gfx:r.gfx,marker:t,add:!!n}))};We.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)};We.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)};We.prototype.hasMarker=function(e,t){e.id||(e=this._elementRegistry.get(e));const n=this.getGraphics(e);return et(n).has(t)};We.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)};We.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))};We.prototype.addRootElement=function(e){const t=this._rootsIdx++;e||(e={id:"__implicitroot_"+t,children:[],isImplicit:!0});const n=e.layer="root-"+t;this._ensureValid("root",e);const r=this.getLayer(n,PE);return this.hideLayer(n),this._addRoot(e,r),this._planes.push({rootElement:e,layer:r}),e};We.prototype.removeRootElement=function(e){if(typeof e=="string"&&(e=this._elementRegistry.get(e)),!!this._findPlaneForRoot(e))return this._removeRoot(e),this._removeLayer(e.layer),this._planes=this._planes.filter(function(n){return n.rootElement!==e}),this._rootElement===e&&(this._rootElement=null),e};We.prototype.setRootElement=function(e){if(e===this._rootElement)return;let t;if(!e)throw new Error("rootElement required");return t=this._findPlaneForRoot(e),t||(e=this.addRootElement(e)),this._setRoot(e),e};We.prototype._removeRoot=function(e){const t=this._elementRegistry,n=this._eventBus;n.fire("root.remove",{element:e}),n.fire("root.removed",{element:e}),t.remove(e)};We.prototype._addRoot=function(e,t){const n=this._elementRegistry,r=this._eventBus;r.fire("root.add",{element:e}),n.add(e,t),r.fire("root.added",{element:e,gfx:t})};We.prototype._setRoot=function(e,t){const n=this._rootElement;n&&(this._elementRegistry.updateGraphics(n,null,!0),this.hideLayer(n.layer)),e&&(t||(t=this._findPlaneForRoot(e).layer),this._elementRegistry.updateGraphics(e,this._svg,!0),this.showLayer(e.layer)),this._rootElement=e,this._eventBus.fire("root.set",{element:e})};We.prototype._ensureValid=function(e,t){if(!t.id)throw new Error("element must have an id");if(this._elementRegistry.get(t.id))throw new Error("element <"+t.id+"> already exists");const n=kT[e];if(!Jo(n,function(i){return typeof t[i]<"u"}))throw new Error("must supply { "+n.join(", ")+" } with "+e)};We.prototype._setParent=function(e,t,n){an(t.children,e,n),e.parent=t};We.prototype._addElement=function(e,t,n,r){n=n||this.getRootElement();const i=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),i.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,r);const a=o.create(e,t,r);return this._elementRegistry.add(t,a),o.update(e,t,a),i.fire(e+".added",{element:t,gfx:a}),t};We.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)};We.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)};We.prototype._removeElement=function(e,t){const n=this._elementRegistry,r=this._graphicsFactory,i=this._eventBus;if(e=n.get(e.id||e),!!e)return i.fire(t+".remove",{element:e}),r.remove(e),Qt(e.parent&&e.parent.children,e),e.parent=null,i.fire(t+".removed",{element:e}),n.remove(e),e};We.prototype.removeShape=function(e){return this._removeElement(e,"shape")};We.prototype.removeConnection=function(e){return this._removeElement(e,"connection")};We.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)};We.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()};We.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})};We.prototype.viewbox=function(e){if(e===void 0&&this._cachedViewbox)return this._cachedViewbox;const t=this._viewport,n=this.getSize();let r,i,o,a,s,c,l;if(e)this._changeViewbox(function(){s=Math.min(n.width/e.width,n.height/e.height);const u=this._svg.createSVGMatrix().scale(s).translate(-e.x,-e.y);Hs(t,u)});else return o=this._rootElement?this.getActiveLayer():null,r=o&&o.getBBox()||{},a=Hs(t),i=a?a.matrix:FC(),s=Ll(i.a,1e3),c=Ll(-i.e||0,1e3),l=Ll(-i.f||0,1e3),e=this._cachedViewbox={x:c?c/s:0,y:l?l/s:0,width:n.width/s,height:n.height/s,scale:s,inner:{width:r.width||0,height:r.height||0,x:r.x||0,y:r.y||0},outer:n},e;return e};We.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox(function(){e=W({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),AE(t,n)}),{x:n.e,y:n.f}};We.prototype.scrollToElement=function(e,t){let n=100;typeof e=="string"&&(e=this._elementRegistry.get(e));const r=this.findRoot(e);if(r!==this.getRootElement()&&this.setRootElement(r),r===e)return;t||(t={}),typeof t=="number"&&(n=t),t={top:t.top||n,right:t.right||n,bottom:t.bottom||n,left:t.left||n};const i=Zt(e),o=Ae(i),a=this.viewbox(),s=this.zoom();let c,l;a.y+=t.top/s,a.x+=t.left/s,a.width-=(t.right+t.left)/s,a.height-=(t.bottom+t.top)/s;const u=Ae(a);if(!(i.width=0&&r.y>=0&&r.x+r.width<=n.width&&r.y+r.height<=n.height&&!e?o={x:0,y:0,width:Math.max(r.width+r.x,n.width),height:Math.max(r.height+r.y,n.height)}:(i=Math.min(1,n.width/r.width,n.height/r.height),o={x:r.x+(e?r.width/2-n.width/i/2:0),y:r.y+(e?r.height/2-n.height/i/2:0),width:n.width/i,height:n.height/i}),this.viewbox(o),this.viewbox(!1).scale};We.prototype._setZoom=function(e,t){const n=this._svg,r=this._viewport,i=n.createSVGMatrix(),o=n.createSVGPoint();let a,s,c,l,u;c=r.getCTM();const f=c.a;return t?(a=W(o,t),s=a.matrixTransform(c.inverse()),l=i.translate(s.x,s.y).scale(1/f*e).translate(-s.x,-s.y),u=c.multiply(l)):u=i.scale(e),AE(this._viewport,u),u};We.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}};We.prototype.getAbsoluteBBox=function(e){const t=this.viewbox();let n;e.waypoints?n=this.getGraphics(e).getBBox():n=e;const r=n.x*t.scale-t.x*t.scale,i=n.y*t.scale-t.y*t.scale,o=n.width*t.scale,a=n.height*t.scale;return{x:r,y:i,width:o,height:a}};We.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var La="data-element-id";function mr(e){this._elements={},this._eventBus=e}mr.$inject=["eventBus"];mr.prototype.add=function(e,t,n){var r=e.id;this._validateId(r),ge(t,La,r),n&&ge(n,La,r),this._elements[r]={element:e,gfx:t,secondaryGfx:n}};mr.prototype.remove=function(e){var t=this._elements,n=e.id||e,r=n&&t[n];r&&(ge(r.gfx,La,""),r.secondaryGfx&&ge(r.secondaryGfx,La,""),delete t[n])};mr.prototype.updateId=function(e,t){this._validateId(t),typeof e=="string"&&(e=this.get(e)),this._eventBus.fire("element.updateId",{element:e,newId:t});var n=this.getGraphics(e),r=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,r)};mr.prototype.updateGraphics=function(e,t,n){var r=e.id||e,i=this._elements[r];return n?i.secondaryGfx=t:i.gfx=t,t&&ge(t,La,r),t};mr.prototype.get=function(e){var t;typeof e=="string"?t=e:t=e&&ge(e,La);var n=this._elements[t];return n&&n.element};mr.prototype.filter=function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(n)}),t};mr.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),r=0;r"u"){if(s!==-1)return;a=this.length}s!==-1&&this.splice(s,1),this.splice(a,0,o),s===-1&&t.set(o,i,r)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e}function $T(e){return e.__refs_collection===!0}ku.extend=LT;ku.isExtended=$T;var OE=ku;function jT(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function ME(e,t,n){var r=OE.extend(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:r}),r.length&&r.forEach(function(i){e.set(i,t.inverse,n)})}function FT(e,t,n){var r=t.inverse,i=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return i},set:function(o){if(o!==i){var a=i;i=null,a&&e.unset(a,r,n),i=o,e.set(i,r,n)}}})}function so(e,t){if(!(this instanceof so))return new so(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}so.prototype.bind=function(e,t){if(typeof t=="string"){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?ME(this,t,e):FT(this,t,e)};so.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return OE.isExtended(n)||ME(this,t,e),n};so.prototype.ensureBound=function(e,t){jT(e,t)||this.bind(e,t)};so.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)};so.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var BT=so;Ah.exports=BT;Ah.exports.Collection=ku;var HT=Ah.exports;const sc=nc(HT);var Oh=new sc({name:"children",enumerable:!0,collection:!0},{name:"parent"}),DE=new sc({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),eg=new sc({name:"attachers",collection:!0},{name:"host"}),IE=new sc({name:"outgoing",collection:!0},{name:"source"}),NE=new sc({name:"incoming",collection:!0},{name:"target"});function Ya(){Object.defineProperty(this,"businessObject",{writable:!0}),Object.defineProperty(this,"label",{get:function(){return this.labels[0]},set:function(e){var t=this.label,n=this.labels;!e&&t?n.remove(t):n.add(e,0)}}),Oh.bind(this,"parent"),DE.bind(this,"labels"),IE.bind(this,"outgoing"),NE.bind(this,"incoming")}function cc(){Ya.call(this),Oh.bind(this,"children"),eg.bind(this,"host"),eg.bind(this,"attachers")}xe(cc,Ya);function kE(){Ya.call(this),Oh.bind(this,"children")}xe(kE,cc);function LE(){cc.call(this),DE.bind(this,"labelTarget")}xe(LE,cc);function $E(){Ya.call(this),IE.bind(this,"source"),NE.bind(this,"target")}xe($E,Ya);var zT={connection:$E,shape:cc,label:LE,root:kE};function VT(e,t){var n=zT[e];if(!n)throw new Error("unknown type: <"+e+">");return W(new n,t)}function WT(e){return e instanceof Ya}function $i(){this._uid=12}$i.prototype.createRoot=function(e){return this.create("root",e)};$i.prototype.createLabel=function(e){return this.create("label",e)};$i.prototype.createShape=function(e){return this.create("shape",e)};$i.prototype.createConnection=function(e){return this.create("connection",e)};$i.prototype.create=function(e,t){return t=W({},t||{}),t.id||(t.id=e+"_"+this._uid++),VT(e,t)};var au="__fn",jE=1e3,UT=Array.prototype.slice;function rr(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}rr.prototype.on=function(e,t,n,r){if(e=qe(e)?e:[e],Rn(t)&&(r=n,n=t,t=jE),!Le(t))throw new Error("priority must be a number");var i=n;r&&(i=Vn(n,r),i[au]=n[au]||n);var o=this;e.forEach(function(a){o._addListener(a,{priority:t,callback:i,next:null})})};rr.prototype.once=function(e,t,n,r){var i=this;if(Rn(t)&&(r=n,n=t,t=jE),!Le(t))throw new Error("priority must be a number");function o(){o.__isTomb=!0;var a=n.apply(r,arguments);return i.off(e,o),a}o[au]=n,this.on(e,t,o)};rr.prototype.off=function(e,t){e=qe(e)?e:[e];var n=this;e.forEach(function(r){n._removeListener(r,t)})};rr.prototype.createEvent=function(e){var t=new lc;return t.init(e),t};rr.prototype.fire=function(e,t){var n,r,i,o;if(o=UT.call(arguments),typeof e=="object"&&(t=e,e=t.type),!e)throw new Error("no event type specified");if(r=this._listeners[e],!!r){t instanceof lc?n=t:n=this.createEvent(t),o[0]=n;var a=n.type;e!==a&&(n.type=e);try{i=this._invokeListeners(n,o,r)}finally{e!==a&&(n.type=a)}return i===void 0&&n.defaultPrevented&&(i=!1),i}};rr.prototype.handleError=function(e){return this.fire("error",{error:e})===!1};rr.prototype._destroy=function(){this._listeners={}};rr.prototype._invokeListeners=function(e,t,n){for(var r;n&&!e.cancelBubble;)r=this._invokeListener(e,t,n),n=n.next;return r};rr.prototype._invokeListener=function(e,t,n){var r;if(n.callback.__isTomb)return r;try{r=GT(n.callback,t),r!==void 0&&(e.returnValue=r,e.stopPropagation()),r===!1&&e.preventDefault()}catch(i){if(!this.handleError(i))throw console.error("unhandled error in event listener",i),i}return r};rr.prototype._addListener=function(e,t){var n=this._getListeners(e),r;if(!n){this._setListeners(e,t);return}for(;n;){if(n.priority or , got "+e);return e=(i?i+":":"")+r,{name:e,prefix:i,localName:r}}function yr(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}yr.prototype.build=function(){return Kr(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])};yr.prototype.addProperty=function(e,t,n){typeof t=="boolean"&&(n=t,t=void 0),this.addNamedProperty(e,n!==!1);var r=this.properties;t!==void 0?r.splice(t,0,e):r.push(e)};yr.prototype.replaceProperty=function(e,t,n){var r=e.ns,i=this.properties,o=this.propertiesByName,a=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var s=i.indexOf(e);if(s===-1)throw new Error("property <"+r.name+"> not found in property list");i.splice(s,1),this.addProperty(t,n?void 0:s,a),o[r.name]=o[r.localName]=t};yr.prototype.redefineProperty=function(e,t,n){var r=e.ns.prefix,i=t.split("#"),o=$n(i[0],r),a=$n(i[1],o.prefix).name,s=this.propertiesByName[a];if(s)this.replaceProperty(s,e,n);else throw new Error("refined property <"+a+"> not found");delete e.redefines};yr.prototype.addNamedProperty=function(e,t){var n=e.ns,r=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),r[n.name]=r[n.localName]=e};yr.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]};yr.prototype.setBodyProperty=function(e,t){if(t&&this.bodyProperty)throw new Error("body property defined multiple times (<"+this.bodyProperty.ns.name+">, <"+e.ns.name+">)");this.bodyProperty=e};yr.prototype.setIdProperty=function(e,t){if(t&&this.idProperty)throw new Error("id property defined multiple times (<"+this.idProperty.ns.name+">, <"+e.ns.name+">)");this.idProperty=e};yr.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)};yr.prototype.assertNotDefined=function(e,t){var n=e.name,r=this.propertiesByName[n];if(r)throw new Error("property <"+n+"> already defined; override of <"+r.definedBy.ns.name+"#"+r.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")};yr.prototype.hasProperty=function(e){return this.propertiesByName[e]};yr.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,r=this.allTypes,i=e.name;i in n||(z(e.properties,Vn(function(o){o=W({},o,{name:o.ns.localName,inherited:t}),Object.defineProperty(o,"definedBy",{value:e});var a=o.replaces,s=o.redefines;a||s?this.redefineProperty(o,a||s,a):(o.isBody&&this.setBodyProperty(o),o.isId&&this.setIdProperty(o),this.addProperty(o))},this)),r.push(e),n[i]=e)};function fo(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,z(e,Vn(this.registerPackage,this))}fo.prototype.getPackage=function(e){return this.packageMap[e]};fo.prototype.getPackages=function(){return this.packages};fo.prototype.registerPackage=function(e){e=W({},e);var t=this.packageMap;tg(t,e,"prefix"),tg(t,e,"uri"),z(e.types,Vn(function(n){this.registerType(n,e)},this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)};fo.prototype.registerType=function(e,t){e=W({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:W(e.meta||{})});var n=$n(e.name,t.prefix),r=n.name,i={};z(e.properties,Vn(function(o){var a=$n(o.name,n.prefix),s=a.name;od(o.type)||(o.type=$n(o.type,a.prefix).name),W(o,{ns:a,name:s}),i[s]=o},this)),W(e,{ns:n,name:r,propertiesByName:i}),z(e.extends,Vn(function(o){var a=$n(o,n.prefix),s=this.typeMap[a.name];s.traits=s.traits||[],s.traits.push(r)},this)),this.definePackage(e,t),this.typeMap[r]=e};fo.prototype.mapTypes=function(e,t,n){var r=od(e.name)?{name:e.name}:this.typeMap[e.name],i=this;function o(c,l){var u=$n(c,od(c)?"":e.prefix);i.mapTypes(u,t,l)}function a(c){return o(c,!0)}function s(c){return o(c,!1)}if(!r)throw new Error("unknown type <"+e.name+">");z(r.superClass,n?a:s),t(r,!n),z(r.traits,a)};fo.prototype.getEffectiveDescriptor=function(e){var t=$n(e),n=new yr(t);this.mapTypes(t,function(i,o){n.addTrait(i,o)});var r=n.build();return this.definePackage(r,r.allTypes[r.allTypes.length-1].$pkg),r};fo.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})};function tg(e,t,n){var r=t[n];if(r in e)throw new Error("package with "+n+" <"+r+"> already defined")}function na(e){this.model=e}na.prototype.set=function(e,t,n){if(!tr(t)||!t.length)throw new TypeError("property name must be a non-empty string");var r=this.getProperty(e,t),i=r&&r.name;QT(n)?r?delete e[i]:delete e.$attrs[ad(t)]:r?i in e?e[i]=n:WE(e,r,n):e.$attrs[ad(t)]=n};na.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[ad(t)];var r=n.name;return!e[r]&&n.isMany&&WE(e,n,[]),e[r]};na.prototype.define=function(e,t,n){if(!n.writable){var r=n.value;n=W({},n,{get:function(){return r}}),delete n.value}Object.defineProperty(e,t,n)};na.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})};na.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})};na.prototype.getProperty=function(e,t){var n=this.model,r=n.getPropertyDescriptor(e,t);if(r)return r;if(t.includes(":"))return null;const i=n.config.strict;if(typeof i<"u"){const o=new TypeError(`unknown property <${t}> on <${e.$type}>`);if(i)throw o;typeof console<"u"&&console.warn(o)}return null};function QT(e){return typeof e>"u"}function WE(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function ad(e){return e.replace(/^:/,"")}function Pr(e,t={}){this.properties=new na(this),this.factory=new HE(this,this.properties),this.registry=new fo(e,this.properties),this.typeCache={},this.config=t}Pr.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)};Pr.prototype.getType=function(e){var t=this.typeCache,n=tr(e)?e:e.ns.name,r=t[n];return r||(e=this.registry.getEffectiveDescriptor(n),r=t[n]=this.factory.createType(e)),r};Pr.prototype.createAny=function(e,t,n){var r=$n(e),i={$type:e,$instanceOf:function(a){return a===this.$type},get:function(a){return this[a]},set:function(a,s){yC(this,[a],s)}},o={name:e,isGeneric:!0,ns:{prefix:r.prefix,localName:r.localName,uri:t}};return this.properties.defineDescriptor(i,o),this.properties.defineModel(i,this),this.properties.define(i,"get",{enumerable:!1,writable:!0}),this.properties.define(i,"set",{enumerable:!1,writable:!0}),this.properties.define(i,"$parent",{enumerable:!1,writable:!0}),this.properties.define(i,"$instanceOf",{enumerable:!1,writable:!0}),z(n,function(a,s){fn(a)&&a.value!==void 0?i[a.name]=a.value:i[s]=a}),i};Pr.prototype.getPackage=function(e){return this.registry.getPackage(e)};Pr.prototype.getPackages=function(){return this.registry.getPackages()};Pr.prototype.getElementDescriptor=function(e){return e.$descriptor};Pr.prototype.hasType=function(e,t){t===void 0&&(t=e,e=this);var n=e.$model.getElementDescriptor(e);return t in n.allTypesByName};Pr.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]};Pr.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var ng=String.fromCharCode,JT=Object.prototype.hasOwnProperty,eR=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,Os={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(Os).forEach(function(e){Os[e.toUpperCase()]=Os[e]});function tR(e,t,n,r){return r?JT.call(Os,r)?Os[r]:"&"+r+";":ng(t||parseInt(n,16))}function Oo(e){return e.length>3&&e.indexOf("&")!==-1?e.replace(eR,tR):e}var nR="http://www.w3.org/2001/XMLSchema-instance",rR="xsi",rg="xsi:type",ig="non-whitespace outside of root node";function da(e){return new Error(e)}function og(e){return"missing namespace for prefix <"+e+">"}function qc(e){return{get:e,enumerable:!0}}function iR(e){var t={},n;for(n in e)t[n]=e[n];return t}function sd(e){return e+"$uri"}function oR(e){var t={},n,r;for(n in e)r=e[n],t[r]=r,t[sd(r)]=n;return t}function ag(){return{line:0,column:0}}function aR(e){throw e}function UE(e){if(!this)return new UE(e);var t=e&&e.proxy,n,r,i,o,a=aR,s,c,l,u,f=ag,p=!1,d=!1,h=null,v=!1,m;function _(b){b instanceof Error||(b=da(b)),h=b,a(b,f)}function g(b){s&&(b instanceof Error||(b=da(b)),s(b,f))}this.on=function(b,x){if(typeof x!="function")throw da("required args ");switch(b){case"openTag":r=x;break;case"text":n=x;break;case"closeTag":i=x;break;case"error":a=x;break;case"warn":s=x;break;case"cdata":o=x;break;case"attention":u=x;break;case"question":l=x;break;case"comment":c=x;break;default:throw da("unsupported event: "+b)}return this},this.ns=function(b){if(typeof b>"u"&&(b={}),typeof b!="object")throw da("required args ");var x={},S;for(S in b)x[S]=b[S];return x[nR]=rR,d=!0,m=x,this},this.parse=function(b){if(typeof b!="string")throw da("required args ");return h=null,y(b),f=ag,v=!1,h},this.stop=function(){v=!0};function y(b){var x=d?[]:null,S=d?oR(m):null,C,M=[],A=0,N=!1,L=!1,B=0,V=0,K,Q,G,H,q,T,E,D,k,I="",$=0,U;function ee(){if(U!==null)return U;var le,me,_e,Be=d&&S.xmlns,rt=d&&p?[]:null,De=$,re=I,He=re.length,Ye,ke,ue,Ee,pe,we={},Ke={},ct,ye,he;e:for(;De8)){for((ye<65||ye>122||ye>90&&ye<97)&&ye!==95&&ye!==58&&(g("illegal first char attribute name"),ct=!0),he=De+1;he96&&ye<123||ye>64&&ye<91||ye>47&&ye<59||ye===46||ye===45||ye===95)){if(ye===32||ye<14&&ye>8){g("missing attribute value"),De=he;continue e}if(ye===61)break;g("illegal attribute name char"),ct=!0}if(pe=re.substring(De,he),pe==="xmlns:xmlns"&&(g("illegal declaration of xmlns"),ct=!0),ye=re.charCodeAt(he+1),ye===34)he=re.indexOf('"',De=he+2),he===-1&&(he=re.indexOf("'",De),he!==-1&&(g("attribute value quote missmatch"),ct=!0));else if(ye===39)he=re.indexOf("'",De=he+2),he===-1&&(he=re.indexOf('"',De),he!==-1&&(g("attribute value quote missmatch"),ct=!0));else for(g("missing attribute value quotes"),ct=!0,he=he+1;he8));he++);for(he===-1&&(g("missing closing quotes"),he=He,ct=!0),ct||(ue=re.substring(De,he)),De=he;he+18));he++)De===he&&(g("illegal character after attribute end"),ct=!0);if(De=he+1,ct)continue e;if(pe in Ke){g("attribute <"+pe+"> already defined");continue}if(Ke[pe]=!0,!d){we[pe]=ue;continue}if(p){if(ke=pe==="xmlns"?"xmlns":pe.charCodeAt(0)===120&&pe.substr(0,6)==="xmlns:"?pe.substr(6):null,ke!==null){if(le=Oo(ue),me=sd(ke),Ee=m[le],!Ee){if(ke==="xmlns"||me in S&&S[me]!==le)do Ee="ns"+A++;while(typeof S[Ee]<"u");else Ee=ke;m[le]=Ee}S[ke]!==Ee&&(Ye||(S=iR(S),Ye=!0),S[ke]=Ee,ke==="xmlns"&&(S[sd(Ee)]=le,Be=Ee),S[me]=le),we[pe]=ue;continue}rt.push(pe,ue);continue}if(ye=pe.indexOf(":"),ye===-1){we[pe]=ue;continue}if(!(_e=S[pe.substring(0,ye)])){g(og(pe.substring(0,ye)));continue}pe=Be===_e?pe.substr(ye+1):_e+pe.substr(ye),pe===rg&&(ye=ue.indexOf(":"),ye!==-1?(_e=ue.substring(0,ye),_e=S[_e]||_e,ue=_e+ue.substring(ye)):ue=Be+":"+ue),we[pe]=ue}if(p)for(De=0,He=rt.length;De=Be&&(De=le.exec(b),!(!De||(rt=De[0].length+De.index,rt>B)));)me+=1,Be=rt;return B==-1?(_e=rt,re=b.substring(V)):V===0?re=b.substring(V,B):(_e=B-Be,re=V==-1?b.substring(B):b.substring(B,V+1)),{data:re,line:me,column:_e}}for(f=oe,t&&(k=Object.create({},{name:qc(function(){return E}),originalName:qc(function(){return D}),attrs:qc(ee),ns:qc(function(){return S})}));V!==-1;){if(b.charCodeAt(V)===60?B=V:B=b.indexOf("<",V),B===-1){if(M.length)return _("unexpected end of file");if(V===0)return _("missing start tag");V",B),V===-1)return _("unclosed cdata");if(o&&(o(b.substring(B+9,V),f),v))return;V+=3;continue}if(G===45&&b.charCodeAt(B+3)===45){if(V=b.indexOf("-->",B),V===-1)return _("unclosed comment");if(c&&(c(b.substring(B+4,V),Oo,f),v))return;V+=3;continue}}if(H===63){if(V=b.indexOf("?>",B),V===-1)return _("unclosed question");if(l&&(l(b.substring(B,V+2),f),v))return;V+=2;continue}for(K=B+1;;K++){if(q=b.charCodeAt(K),isNaN(q))return V=-1,_("unclosed tag");if(q===34)G=b.indexOf('"',K+1),K=G!==-1?G:K;else if(q===39)G=b.indexOf("'",K+1),K=G!==-1?G:K;else if(q===62){V=K;break}}if(H===33){if(u&&(u(b.substring(B,V+1),Oo,f),v))return;V+=1;continue}if(U={},H===47){if(N=!1,L=!0,!M.length)return _("missing open tag");if(K=E=M.pop(),G=B+2+K.length,b.substring(B+2,G)!==K)return _("closing tag mismatch");for(;G8&&H<14))return _("close tag")}else{if(b.charCodeAt(V-1)===47?(K=E=b.substring(B+1,V-1),N=!0,L=!0):(K=E=b.substring(B+1,V),N=!0,L=!1),!(H>96&&H<123||H>64&&H<91||H===95||H===58))return _("illegal first char nodeName");for(G=1,Q=K.length;G96&&H<123||H>64&&H<91||H>47&&H<59||H===45||H===95||H==46)){if(H===32||H<14&&H>8){E=K.substring(0,G),U=null;break}return _("invalid nodeName")}L||M.push(E)}if(d){if(C=S,N&&(L||x.push(C),U===null&&(p=K.indexOf("xmlns",G)!==-1)&&($=G,I=K,ee(),p=!1)),D=E,H=E.indexOf(":"),H!==-1){if(T=S[E.substring(0,H)],!T)return _("missing namespace on <"+D+">");E=E.substr(H+1)}else T=S.xmlns;T&&(E=T+":"+E)}if(N&&($=G,I=K,r&&(t?r(k,Oo,L,f):r(E,ee,Oo,L,f),v)))return;if(L){if(i&&(i(t?k:E,Oo,N,f),v))return;d&&(N?S=C:S=x.pop())}V+=1}}}function GE(e){return e.xml&&e.xml.tagAlias==="lowerCase"}var sR={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},Lu="xsi:type";function qE(e){return e.xml&&e.xml.serialize}function YE(e){return qE(e)===Lu}function cR(e){return qE(e)==="property"}function lR(e){return e.charAt(0).toUpperCase()+e.slice(1)}function KE(e,t){return GE(t)?e.prefix+":"+lR(e.localName):e.name}function uR(e,t){var n=e.name,r=e.localName,i=t.xml&&t.xml.typePrefix;return i&&r.indexOf(i)===0?e.prefix+":"+r.slice(i.length):n}function fR(e,t){var n=$n(e),r=t.getPackage(n.prefix);return uR(n,r)}function co(e){return new Error(e)}function Mi(e){return e.$descriptor}function pR(e){W(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(t){this.references.push(t)},this.addElement=function(t){if(!t)throw co("expected element");var n=this.elementsById,r=Mi(t),i=r.idProperty,o;if(i&&(o=t.get(i.name),o)){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(o))throw new Error("illegal ID <"+o+">");if(n[o])throw co("duplicate ID <"+o+">");n[o]=t}},this.addWarning=function(t){this.warnings.push(t)}}function uc(){}uc.prototype.handleEnd=function(){};uc.prototype.handleText=function(){};uc.prototype.handleNode=function(){};function Ih(){}Ih.prototype=Object.create(uc.prototype);Ih.prototype.handleNode=function(){return this};function Xa(){}Xa.prototype=Object.create(uc.prototype);Xa.prototype.handleText=function(e){this.body=(this.body||"")+e};function fc(e,t){this.property=e,this.context=t}fc.prototype=Object.create(Xa.prototype);fc.prototype.handleNode=function(e){if(this.element)throw co("expected no sub nodes");return this.element=this.createReference(e),this};fc.prototype.handleEnd=function(){this.element.id=this.body};fc.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}};function Nh(e,t){this.element=t,this.propertyDesc=e}Nh.prototype=Object.create(Xa.prototype);Nh.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=Dh(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)};function $u(){}$u.prototype=Object.create(Xa.prototype);$u.prototype.handleNode=function(e){var t=this,n=this.element;return n?t=this.handleChild(e):(n=this.element=this.createElement(e),this.context.addElement(n)),t};function Fn(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}Fn.prototype=Object.create($u.prototype);Fn.prototype.addReference=function(e){this.context.addReference(e)};Fn.prototype.handleText=function(e){var t=this.element,n=Mi(t),r=n.bodyProperty;if(!r)throw co("unexpected body text <"+e+">");Xa.prototype.handleText.call(this,e)};Fn.prototype.handleEnd=function(){var e=this.body,t=this.element,n=Mi(t),r=n.bodyProperty;r&&e!==void 0&&(e=Dh(r.type,e),t.set(r.name,e))};Fn.prototype.createElement=function(e){var t=e.attributes,n=this.type,r=Mi(n),i=this.context,o=new n({}),a=this.model,s;return z(t,function(c,l){var u=r.propertiesByName[l],f;u&&u.isReference?u.isMany?(f=c.split(" "),z(f,function(p){i.addReference({element:o,property:u.ns.name,id:p})})):i.addReference({element:o,property:u.ns.name,id:c}):(u?c=Dh(u.type,c):l!=="xmlns"&&(s=$n(l,r.ns.prefix),a.getPackage(s.prefix)&&i.addWarning({message:"unknown attribute <"+l+">",element:o,property:l,value:c})),o.set(l,c))}),o};Fn.prototype.getPropertyForNode=function(e){var t=e.name,n=$n(t),r=this.type,i=this.model,o=Mi(r),a=n.name,s=o.propertiesByName[a],c,l;if(s&&!s.isAttr)return YE(s)&&(c=e.attributes[Lu],c)?(c=fR(c,i),l=i.getType(c),W({},s,{effectiveType:Mi(l).name})):s;var u=i.getPackage(n.prefix);if(u){if(c=KE(n,u),l=i.getType(c),s=st(o.properties,function(f){return!f.isVirtual&&!f.isReference&&!f.isAttribute&&l.hasType(f.type)}),s)return W({},s,{effectiveType:Mi(l).name})}else if(s=st(o.properties,function(f){return!f.isReference&&!f.isAttribute&&f.type==="Element"}),s)return s;throw co("unrecognized element <"+n.name+">")};Fn.prototype.toString=function(){return"ElementDescriptor["+Mi(this.type).name+"]"};Fn.prototype.valueHandler=function(e,t){return new Nh(e,t)};Fn.prototype.referenceHandler=function(e){return new fc(e,this.context)};Fn.prototype.handler=function(e){return e==="Element"?new $a(this.model,e,this.context):new Fn(this.model,e,this.context)};Fn.prototype.handleChild=function(e){var t,n,r,i;if(t=this.getPropertyForNode(e),r=this.element,n=t.effectiveType||t.type,VE(n))return this.valueHandler(t,r);t.isReference?i=this.referenceHandler(t).handleNode(e):i=this.handler(n).handleNode(e);var o=i.element;return o!==void 0&&(t.isMany?r.get(t.name).push(o):r.set(t.name,o),t.isReference?(W(o,{element:r}),this.context.addReference(o)):o.$parent=r),i};function kh(e,t,n){Fn.call(this,e,t,n)}kh.prototype=Object.create(Fn.prototype);kh.prototype.createElement=function(e){var t=e.name,n=$n(t),r=this.model,i=this.type,o=r.getPackage(n.prefix),a=o&&KE(n,o)||t;if(!i.hasType(a))throw co("unexpected element <"+e.originalName+">");return Fn.prototype.createElement.call(this,e)};function $a(e,t,n){this.model=e,this.context=n}$a.prototype=Object.create($u.prototype);$a.prototype.createElement=function(e){var t=e.name,n=$n(t),r=n.prefix,i=e.ns[r+"$uri"],o=e.attributes;return this.model.createAny(t,i,o)};$a.prototype.handleChild=function(e){var t=new $a(this.model,"Element",this.context).handleNode(e),n=this.element,r=t.element,i;return r!==void 0&&(i=n.$children=n.$children||[],i.push(r),r.$parent=n),t};$a.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)};function Lh(e){e instanceof Pr&&(e={model:e}),W(this,{lax:!1},e)}Lh.prototype.fromXML=function(e,t,n){var r=t.rootHandler;t instanceof Fn?(r=t,t={}):typeof t=="string"?(r=this.handler(t),t={}):typeof r=="string"&&(r=this.handler(r));var i=this.model,o=this.lax,a=new pR(W({},t,{rootHandler:r})),s=new UE({proxy:!0}),c=dR();r.context=a,c.push(r);function l(x,S,C){var M=S(),A=M.line,N=M.column,L=M.data;L.charAt(0)==="<"&&L.indexOf(" ")!==-1&&(L=L.slice(0,L.indexOf(" "))+">");var B="unparsable content "+(L?L+" ":"")+`detected line: `+A+` column: `+N+` nested error: `+x.message;if(C)return a.addWarning({message:B,error:x}),!0;throw co(B)}function u(x,S){return l(x,S,!0)}function f(){var x=a.elementsById,S=a.references,C,M;for(C=0;M=S[C];C++){var A=M.element,N=x[M.id],L=Mi(A).propertiesByName[M.property];if(N||a.addWarning({message:"unresolved reference <"+M.id+">",element:M.element,property:M.property,value:M.id}),L.isMany){var B=A.get(L.name),V=B.indexOf(M);V===-1&&(V=B.length),N?B[V]=N:B.splice(V,1)}else A.set(L.name,N)}}function p(){c.pop().handleEnd()}var d=/^<\?xml /i,h=/ encoding="([^"]+)"/i,v=/^utf-8$/i;function m(x){if(d.test(x)){var S=h.exec(x),C=S&&S[1];!C||v.test(C)||a.addWarning({message:"unsupported document encoding <"+C+">, falling back to UTF-8"})}}function _(x,S){var C=c.peek();try{c.push(C.handleNode(x))}catch(M){l(M,S,o)&&c.push(new Ih)}}function g(x,S){try{c.peek().handleText(x)}catch(C){u(C,S)}}function y(x,S){x.trim()&&g(x,S)}var b=i.getPackages().reduce(function(x,S){return x[S.uri]=S.prefix,x},{"http://www.w3.org/XML/1998/namespace":"xml"});return s.ns(b).on("openTag",function(x,S,C,M){var A=x.attrs||{},N=Object.keys(A).reduce(function(B,V){var K=S(A[V]);return B[V]=K,B},{}),L={name:x.name,originalName:x.originalName,attributes:N,ns:x.ns};_(L,M)}).on("question",m).on("closeTag",p).on("cdata",g).on("text",function(x,S,C){y(S(x),C)}).on("error",l).on("warn",u),new Promise(function(x,S){var C;try{s.parse(e),f()}catch(B){C=B}var M=r.element;!C&&!M&&(C=co("failed to parse document as <"+r.type.$descriptor.name+">"));var A=a.warnings,N=a.references,L=a.elementsById;return C?(C.warnings=A,S(C)):x({rootElement:M,elementsById:L,references:N,warnings:A})})};Lh.prototype.handler=function(e){return new kh(this.model,e)};function dR(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}var hR=` `,vR=/<|>|'|"|&|\n\r|\n/g,XE=/<|>|&/g;function mR(e){var t={},n={},r={},i=[],o=[];this.byUri=function(a){return n[a]||e&&e.byUri(a)},this.add=function(a,s){n[a.uri]=a,s?i.push(a):o.push(a),this.mapPrefix(a.prefix,a.uri)},this.uriByPrefix=function(a){return t[a||"xmlns"]},this.mapPrefix=function(a,s){t[a||"xmlns"]=s},this.getNSKey=function(a){return a.prefix!==void 0?a.uri+"|"+a.prefix:a.uri},this.logUsed=function(a){var s=a.uri,c=this.getNSKey(a);r[c]=this.byUri(s),e&&e.logUsed(a)},this.getUsed=function(a){function s(u){var f=c.getNSKey(u);return r[f]}var c=this,l=[].concat(i,o);return l.filter(s)}}function gR(e){return e.charAt(0).toLowerCase()+e.slice(1)}function yR(e,t){return GE(t)?gR(e):e}function ZE(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function QE(e){return tr(e)?e:(e.prefix?e.prefix+":":"")+e.localName}function bR(e){return e.getUsed().filter(function(t){return t.prefix!=="xml"}).map(function(t){var n="xmlns"+(t.prefix?":"+t.prefix:"");return{name:n,value:t.uri}})}function ER(e,t){return t.isGeneric?W({localName:t.ns.localName},e):W({localName:yR(t.ns.localName,t.$pkg)},e)}function _R(e,t){return W({localName:t.ns.localName},e)}function xR(e){var t=e.$descriptor;return Ge(t.properties,function(n){var r=n.name;if(n.isVirtual||!xr(e,r))return!1;var i=e[r];return i===n.default||i===null?!1:n.isMany?i.length:!0})}var wR={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},SR={"<":"lt",">":"gt","&":"amp"};function JE(e,t,n){return e=tr(e)?e:""+e,e.replace(t,function(r){return"&"+n[r]+";"})}function CR(e){return JE(e,vR,wR)}function TR(e){return JE(e,XE,SR)}function RR(e){return Ge(e,function(t){return t.isAttr})}function PR(e){return Ge(e,function(t){return!t.isAttr})}function $h(e){this.tagName=e}$h.prototype.build=function(e){return this.element=e,this};$h.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"").appendNewLine()};function qo(){}qo.prototype.serializeValue=qo.prototype.serializeTo=function(e){e.append(this.escape?TR(this.value):this.value)};qo.prototype.build=function(e,t){return this.value=t,e.type==="String"&&t.search(XE)!==-1&&(this.escape=!0),this};function jh(e){this.tagName=e}ZE(jh,qo);jh.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("").appendNewLine()};function Dt(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}Dt.prototype.build=function(e){this.element=e;var t=e.$descriptor,n=this.propertyDescriptor,r,i,o=t.isGeneric;return o?r=this.parseGeneric(e):r=this.parseNsAttributes(e),n?this.ns=this.nsPropertyTagName(n):this.ns=this.nsTagName(t),this.tagName=this.addTagName(this.ns),o||(i=xR(e),this.parseAttributes(RR(i)),this.parseContainments(PR(i))),this.parseGenericAttributes(e,r),this};Dt.prototype.nsTagName=function(e){var t=this.logNamespaceUsed(e.ns);return ER(t,e)};Dt.prototype.nsPropertyTagName=function(e){var t=this.logNamespaceUsed(e.ns);return _R(t,e)};Dt.prototype.isLocalNs=function(e){return e.uri===this.ns.uri};Dt.prototype.nsAttributeName=function(e){var t;if(tr(e)?t=$n(e):t=e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:W({localName:t.localName},n)};Dt.prototype.parseGeneric=function(e){var t=this,n=this.body,r=[];return z(e,function(i,o){var a;o==="$body"?n.push(new qo().build({type:"String"},i)):o==="$children"?z(i,function(s){n.push(new Dt(t).build(s))}):o.indexOf("$")!==0&&(a=t.parseNsAttribute(e,o,i),a&&r.push({name:o,value:i}))}),r};Dt.prototype.parseNsAttribute=function(e,t,n){var r=e.$model,i=$n(t),o;if(i.prefix==="xmlns"&&(o={prefix:i.localName,uri:n}),!i.prefix&&i.localName==="xmlns"&&(o={uri:n}),!o)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(o,!0,!0);else{var a=this.logNamespaceUsed(o,!0);this.getNamespaces().logUsed(a)}};Dt.prototype.parseNsAttributes=function(e,t){var n=this,r=e.$attrs,i=[];return z(r,function(o,a){var s=n.parseNsAttribute(e,a,o);s&&i.push(s)}),i};Dt.prototype.parseGenericAttributes=function(e,t){var n=this;z(t,function(r){if(r.name!==Lu)try{n.addAttribute(n.nsAttributeName(r.name),r.value)}catch(i){console.warn("missing namespace information for ",r.name,"=",r.value,"on",e,i)}})};Dt.prototype.parseContainments=function(e){var t=this,n=this.body,r=this.element;z(e,function(i){var o=r.get(i.name),a=i.isReference,s=i.isMany;if(s||(o=[o]),i.isBody)n.push(new qo().build(i,o[0]));else if(VE(i.type))z(o,function(u){n.push(new jh(t.addTagName(t.nsPropertyTagName(i))).build(i,u))});else if(a)z(o,function(u){n.push(new $h(t.addTagName(t.nsPropertyTagName(i))).build(u))});else{var c=YE(i),l=cR(i);z(o,function(u){var f;c?f=new ju(t,i):l?f=new Dt(t,i):f=new Dt(t),n.push(f.build(u))})}})};Dt.prototype.getNamespaces=function(e){var t=this.namespaces,n=this.parent,r;return t||(r=n&&n.getNamespaces(),e||!r?this.namespaces=t=new mR(r):t=r),t};Dt.prototype.logNamespace=function(e,t,n){var r=this.getNamespaces(n),i=e.uri,o=e.prefix,a=r.byUri(i);return(!a||n)&&r.add(e,t),r.mapPrefix(o,i),e};Dt.prototype.logNamespaceUsed=function(e,t){var n=this.element,r=n.$model,i=this.getNamespaces(t),o=e.prefix,a=e.uri,s,c,l;if(!o&&!a)return{localName:e.localName};if(l=sR[o]||r&&(r.getPackage(o)||{}).uri,a=a||l||i.uriByPrefix(o),!a)throw new Error("no namespace uri given for prefix <"+o+">");if(e=i.byUri(a),!e){for(s=o,c=1;i.uriByPrefix(s);)s=o+"_"+c++;e=this.logNamespace({prefix:s,uri:a},l===a)}return o&&i.mapPrefix(o,a),e};Dt.prototype.parseAttributes=function(e){var t=this,n=this.element;z(e,function(r){var i=n.get(r.name);if(r.isReference)if(!r.isMany)i=i.id;else{var o=[];z(i,function(a){o.push(a.id)}),i=o.join(" ")}t.addAttribute(t.nsAttributeName(r),i)})};Dt.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),QE(e)};Dt.prototype.addAttribute=function(e,t){var n=this.attrs;tr(t)&&(t=CR(t));var r=sE(n,function(o){return o.name.localName===e.localName&&o.name.uri===e.uri&&o.name.prefix===e.prefix}),i={name:e,value:t};r!==-1?n.splice(r,1,i):n.push(i)};Dt.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=bR(n).concat(t)),z(t,function(r){e.append(" ").append(QE(r.name)).append('="').append(r.value).append('"')})};Dt.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==qo;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),z(this.body,function(r){r.serializeTo(e)}),n&&e.unindent().appendIndent(),e.append("")),e.appendNewLine()};function ju(e,t){Dt.call(this,e,t)}ZE(ju,Dt);ju.prototype.parseNsAttributes=function(e){var t=Dt.prototype.parseNsAttributes.call(this,e),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var r=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var i=e.$model.getPackage(r.uri),o=i.xml&&i.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(Lu),(r.prefix?r.prefix+":":"")+o+n.ns.localName),t};ju.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri};function AR(){this.value="",this.write=function(e){this.value+=e}}function OR(e,t){var n=[""];this.append=function(r){return e.write(r),this},this.appendNewLine=function(){return t&&e.write(` `),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function MR(e){e=W({format:!1,preamble:!0},e||{});function t(n,r){var i=r||new AR,o=new OR(i,e.format);if(e.preamble&&o.append(hR),new Dt().build(n).serializeTo(o),!r)return i.value}return{toXML:t}}function Fu(e,t){Pr.call(this,e,t)}Fu.prototype=Object.create(Pr.prototype);Fu.prototype.fromXML=function(e,t,n){tr(t)||(n=t,t="bpmn:Definitions");var r=new Lh(W({model:this,lax:!0},n)),i=r.handler(t);return r.fromXML(e,i)};Fu.prototype.toXML=function(e,t){var n=new MR(t);return new Promise(function(r,i){try{var o=n.toXML(e);return r({xml:o})}catch(a){return i(a)}})};var DR="BPMN20",IR="http://www.omg.org/spec/BPMN/20100524/MODEL",NR="bpmn",kR=[],LR=[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["Collaboration","FlowElementsContainer"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isMany:!0,isVirtual:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity","InteractionNode"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],$R=[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],jR={tagAlias:"lowerCase",typePrefix:"t"},FR={name:DR,uri:IR,prefix:NR,associations:kR,types:LR,enumerations:$R,xml:jR},BR="BPMNDI",HR="http://www.omg.org/spec/BPMN/20100524/DI",zR="bpmndi",VR=[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],WR=[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],UR=[],GR={name:BR,uri:HR,prefix:zR,types:VR,enumerations:WR,associations:UR},qR="DC",YR="http://www.omg.org/spec/DD/20100524/DC",KR="dc",XR=[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],ZR=[],QR={name:qR,uri:YR,prefix:KR,types:XR,associations:ZR},JR="DI",eP="http://www.omg.org/spec/DD/20100524/DI",tP="di",nP=[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],rP=[],iP={tagAlias:"lowerCase"},oP={name:JR,uri:eP,prefix:tP,types:nP,associations:rP,xml:iP},aP="bpmn.io colors for BPMN",sP="http://bpmn.io/schema/bpmn/biocolor/1.0",cP="bioc",lP=[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],uP=[],fP=[],pP={name:aP,uri:sP,prefix:cP,types:lP,enumerations:uP,associations:fP},dP="BPMN in Color",hP="http://www.omg.org/spec/BPMN/non-normative/color/1.0",vP="color",mP=[{name:"ColoredLabel",extends:["bpmndi:BPMNLabel"],properties:[{name:"color",isAttr:!0,type:"String"}]},{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"background-color",isAttr:!0,type:"String"},{name:"border-color",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"border-color",isAttr:!0,type:"String"}]}],gP=[],yP=[],bP={name:dP,uri:hP,prefix:vP,types:mP,enumerations:gP,associations:yP},EP={bpmn:FR,bpmndi:GR,dc:QR,di:oP,bioc:pP,color:bP};function _P(e,t){var n=W({},EP,e);return new Fu(n,t)}function Mn(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':""}var xP="Tried to access di from the businessObject. The di is available through the diagram element only. For more information, see https://github.com/bpmn-io/bpmn-js/issues/1472";function e_(e){xr(e,"di")||Object.defineProperty(e,"di",{enumerable:!1,get:function(){throw new Error(xP)}})}function zn(e,t){return e.$instanceOf(t)}function wP(e){return st(e.rootElements,function(t){return zn(t,"bpmn:Process")||zn(t,"bpmn:Collaboration")})}function SP(e,t){var n={},r=[],i={};function o(I,$){return function(U){I(U,$)}}function a(I){n[I.id]=I}function s(I){return n[I.id]}function c(I,$){var U=I.gfx;if(U)throw new Error(t("already rendered {element}",{element:Mn(I)}));return e.element(I,i[I.id],$)}function l(I,$){return e.root(I,i[I.id],$)}function u(I,$){try{var U=i[I.id]&&c(I,$);return a(I),U}catch(ee){f(ee.message,{element:I,error:ee}),console.error(t("failed to import {element}",{element:Mn(I)})),console.error(ee)}}function f(I,$){e.error(I,$)}var p=this.registerDi=function($){var U=$.bpmnElement;U?i[U.id]?f(t("multiple DI elements defined for {element}",{element:Mn(U)}),{element:U}):(i[U.id]=$,e_(U)):f(t("no bpmnElement referenced in {element}",{element:Mn($)}),{element:$})};function d(I){h(I.plane)}function h(I){p(I),z(I.planeElement,v)}function v(I){p(I)}this.handleDefinitions=function($,U){var ee=$.diagrams;if(U&&ee.indexOf(U)===-1)throw new Error(t("diagram not part of bpmn:Definitions"));if(!U&&ee&&ee.length&&(U=ee[0]),!U)throw new Error(t("no diagram to display"));i={},d(U);var oe=U.plane;if(!oe)throw new Error(t("no plane for {element}",{element:Mn(U)}));var le=oe.bpmnElement;if(!le)if(le=wP($),le)f(t("correcting missing bpmnElement on {plane} to {rootElement}",{plane:Mn(oe),rootElement:Mn(le)})),oe.bpmnElement=le,p(oe);else throw new Error(t("no process or collaboration to display"));var me=l(le,oe);if(zn(le,"bpmn:Process")||zn(le,"bpmn:SubProcess"))_(le,me);else if(zn(le,"bpmn:Collaboration"))D(le,me),g($.rootElements,me);else throw new Error(t("unsupported bpmnElement for {plane}: {rootElement}",{plane:Mn(oe),rootElement:Mn(le)}));m(r)};var m=this.handleDeferred=function(){for(var $;r.length;)$=r.shift(),$()};function _(I,$){q(I,$),N(I.ioSpecification,$),A(I.artifacts,$),a(I)}function g(I,$){var U=Ge(I,function(ee){return!s(ee)&&zn(ee,"bpmn:Process")&&ee.laneSets});U.forEach(o(_,$))}function y(I,$){u(I,$)}function b(I,$){z(I,o(y,$))}function x(I,$){u(I,$)}function S(I,$){u(I,$)}function C(I,$){u(I,$)}function M(I,$){u(I,$)}function A(I,$){z(I,function(U){zn(U,"bpmn:Association")?r.push(function(){M(U,$)}):M(U,$)})}function N(I,$){I&&(z(I.dataInputs,o(S,$)),z(I.dataOutputs,o(C,$)))}var L=this.handleSubProcess=function($,U){q($,U),A($.artifacts,U)};function B(I,$){var U=u(I,$);zn(I,"bpmn:SubProcess")&&L(I,U||$),zn(I,"bpmn:Activity")&&N(I.ioSpecification,$),r.push(function(){z(I.dataInputAssociations,o(x,$)),z(I.dataOutputAssociations,o(x,$))})}function V(I,$){u(I,$)}function K(I,$){u(I,$)}function Q(I,$){r.push(function(){var U=u(I,$);I.childLaneSet&&G(I.childLaneSet,U||$),k(I)})}function G(I,$){z(I.lanes,o(Q,$))}function H(I,$){z(I,o(G,$))}function q(I,$){T(I.flowElements,$),I.laneSets&&H(I.laneSets,$)}function T(I,$){z(I,function(U){zn(U,"bpmn:SequenceFlow")?r.push(function(){V(U,$)}):zn(U,"bpmn:BoundaryEvent")?r.unshift(function(){B(U,$)}):zn(U,"bpmn:FlowNode")?B(U,$):zn(U,"bpmn:DataObject")||(zn(U,"bpmn:DataStoreReference")||zn(U,"bpmn:DataObjectReference")?K(U,$):f(t("unrecognized flowElement {element} in context {context}",{element:Mn(U),context:$?Mn($.businessObject):"null"}),{element:U,context:$}))})}function E(I,$){var U=u(I,$),ee=I.processRef;ee&&_(ee,U||$)}function D(I,$){z(I.participants,o(E,$)),A(I.artifacts,$),r.push(function(){b(I.messageFlows,$)})}function k(I){z(I.flowNodeRef,function($){var U=$.get("lanes");U&&U.push(I)})}}function w(e,t){var n=ce(e);return n&&typeof n.$instanceOf=="function"&&n.$instanceOf(t)}function Qe(e,t){return Ni(t,function(n){return w(e,n)})}function ce(e){return e&&e.businessObject||e}function at(e){return e&&e.di}function CP(e,t,n){var r,i,o,a,s,c=[];function l(u,f){var p={root:function(m,_){return r.add(m,_)},element:function(m,_,g){return r.add(m,_,g)},error:function(m,_){c.push({message:m,context:_})}},d=new SP(p,o);f=f||u.diagrams&&u.diagrams[0];var h=TP(u,f);if(!h)throw new Error(o("no diagram to display"));z(h,function(m){d.handleDefinitions(u,m)});var v=f.plane.bpmnElement.id;a.setRootElement(a.findRoot(v+"_plane")||a.findRoot(v))}return new Promise(function(u,f){try{return r=e.get("bpmnImporter"),i=e.get("eventBus"),o=e.get("translate"),a=e.get("canvas"),i.fire("import.render.start",{definitions:t}),l(t,n),i.fire("import.render.complete",{error:s,warnings:c}),u({warnings:c})}catch(p){return p.warnings=c,f(p)}})}function TP(e,t){if(t){var n=t.plane.bpmnElement,r=n;!w(n,"bpmn:Process")&&!w(n,"bpmn:Collaboration")&&(r=RP(n));var i;w(r,"bpmn:Collaboration")?i=r:i=st(e.rootElements,function(l){if(w(l,"bpmn:Collaboration"))return st(l.participants,function(u){return u.processRef===r})});var o=[r];i&&(o=mn(i.participants,function(l){return l.processRef}),o.push(i));var a=t_(o),s=[t],c=[n];return z(e.diagrams,function(l){var u=l.plane.bpmnElement;a.indexOf(u)!==-1&&c.indexOf(u)===-1&&(s.push(l),c.push(u))}),s}}function t_(e){var t=[];return z(e,function(n){n&&(t.push(n),t=t.concat(t_(n.flowElements)))}),t}function RP(e){for(var t=e;t;){if(w(t,"bpmn:Process"))return t;t=t.$parent}}var PP='',n_=PP,r_={verticalAlign:"middle"},i_={color:"#404040"},AP={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},OP={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},MP={position:"absolute",left:"50%",top:"40%",transform:"translate(-50%)",width:"260px",padding:"10px",background:"white",boxShadow:"0 1px 4px rgba(0,0,0,0.3)",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"14px",display:"flex",lineHeight:"1.3"},DP='
'+n_+'Web-based tooling for BPMN, DMN and forms powered by bpmn.io.
',si;function IP(){si=Ct(DP),Cn(si,AP),Cn(ht("svg",si),r_),Cn(ht(".backdrop",si),OP),Cn(ht(".notice",si),MP),Cn(ht(".link",si),i_,{margin:"15px 20px 15px 10px",alignSelf:"center"})}function NP(){si||(IP(),Sr.bind(si,".backdrop","click",function(e){document.body.removeChild(si)})),document.body.appendChild(si)}function It(e){e=W({},LP,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),jP(this._container),this._init(this._container,this._moddle,e)}xe(It,Ka);It.prototype.importXML=async function(t,n){const r=this;function i(a){return r.get("eventBus").createEvent(a)}let o=[];try{t=this._emit("import.parse.start",{xml:t})||t;let a;try{a=await this._moddle.fromXML(t,"bpmn:Definitions")}catch(p){throw this._emit("import.parse.complete",{error:p}),p}let s=a.rootElement;const c=a.references,l=a.warnings,u=a.elementsById;o=o.concat(l),s=this._emit("import.parse.complete",i({error:null,definitions:s,elementsById:u,references:c,warnings:o}))||s;const f=await this.importDefinitions(s,n);return o=o.concat(f.warnings),this._emit("import.done",{error:null,warnings:o}),{warnings:o}}catch(a){let s=a;throw o=o.concat(s.warnings||[]),$l(s,o),s=kP(s),this._emit("import.done",{error:s,warnings:s.warnings}),s}};It.prototype.importDefinitions=async function(t,n){return this._setDefinitions(t),{warnings:(await this.open(n)).warnings}};It.prototype.open=async function(t){const n=this._definitions;let r=t;if(!n){const o=new Error("no XML imported");throw $l(o,[]),o}if(typeof t=="string"&&(r=$P(n,t),!r)){const o=new Error("BPMNDiagram <"+t+"> not found");throw $l(o,[]),o}try{this.clear()}catch(o){throw $l(o,[]),o}const{warnings:i}=await CP(this,n,r);return{warnings:i}};It.prototype.saveXML=async function(t){t=t||{};let n=this._definitions,r,i;try{if(!n)throw new Error("no definitions loaded");n=this._emit("saveXML.start",{definitions:n})||n,i=(await this._moddle.toXML(n,t)).xml,i=this._emit("saveXML.serialized",{xml:i})||i}catch(a){r=a}const o=r?{error:r}:{xml:i};if(this._emit("saveXML.done",o),r)throw r;return o};It.prototype.saveSVG=async function(){this._emit("saveSVG.start");let t,n;try{const r=this.get("canvas"),i=r.getActiveLayer(),o=ht("defs",r._svg),a=Hm(i),s=o?""+Hm(o)+"":"",c=i.getBBox();t=` '+s+a+""}catch(r){n=r}if(this._emit("saveSVG.done",{error:n,svg:t}),n)throw n;return{svg:t}};It.prototype._setDefinitions=function(e){this._definitions=e};It.prototype.getModules=function(){return this._modules};It.prototype.clear=function(){this.getDefinitions()&&Ka.prototype.clear.call(this)};It.prototype.destroy=function(){Ka.prototype.destroy.call(this),fi(this._container)};It.prototype.on=function(e,t,n,r){return this.get("eventBus").on(e,t,n,r)};It.prototype.off=function(e,t){this.get("eventBus").off(e,t)};It.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach(),e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),typeof e=="string"&&(e=ht(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()};It.prototype.getDefinitions=function(){return this._definitions};It.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))};It.prototype._init=function(e,t,n){const r=n.modules||this.getModules(n),i=n.additionalModules||[],o=[{bpmnjs:["value",this],moddle:["value",t]}],a=[].concat(o,r,i),s=W(pi(n,["additionalModules"]),{canvas:W({},n.canvas,{container:e}),modules:a});Ka.call(this,s),n&&n.container&&this.attachTo(n.container)};It.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)};It.prototype._createContainer=function(e){const t=Ct('
');return Cn(t,{width:sg(e.width),height:sg(e.height),position:e.position}),t};It.prototype._createModdle=function(e){const t=W({},this._moddleExtensions,e.moddleExtensions);return new _P(t)};It.prototype._modules=[];function $l(e,t){return e.warnings=t,e}function kP(e){const n=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);return n&&(e.message="unparsable content <"+n[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+n[2]),e}const LP={width:"100%",height:"100%",position:"relative"};function sg(e){return e+(Le(e)?"px":"")}function $P(e,t){return t&&st(e.diagrams,function(n){return n.id===t})||null}function jP(e){const n=''+n_+"",r=Ct(n);Cn(ht("svg",r),r_),Cn(r,i_,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(r),Ce.bind(r,"click",function(i){NP(),i.preventDefault()})}function pc(e){It.call(this,e),this.on("import.parse.complete",function(t){t.error||this._collectIds(t.definitions,t.elementsById)},this),this.on("diagram.destroy",function(){this.get("moddle").ids.clear()},this)}xe(pc,It);pc.prototype._createModdle=function(e){var t=It.prototype._createModdle.call(this,e);return t.ids=new ui([32,36,1]),t};pc.prototype._collectIds=function(e,t){var n=e.$model,r=n.ids,i;r.clear();for(i in t)r.claim(i,t[i])};function ot(e,t){return w(e,"bpmn:CallActivity")?!1:w(e,"bpmn:SubProcess")?(t=t||at(e),t&&w(t,"bpmndi:BPMNPlane")?!0:t&&!!t.isExpanded):w(e,"bpmn:Participant")?!!ce(e).processRef:!0}function FP(e){return e&&ce(e).isInterrupting!==!1}function er(e){return e&&!!ce(e).triggeredByEvent}function Bu(e,t){var n=ce(e).eventDefinitions;return Ni(n,function(r){return w(r,t)})}function BP(e){return Bu(e,"bpmn:ErrorEventDefinition")}function HP(e){return Bu(e,"bpmn:EscalationEventDefinition")}function zP(e){return Bu(e,"bpmn:CompensateEventDefinition")}var Vs={width:90,height:20},cg=15;function Yo(e){return w(e,"bpmn:Event")||w(e,"bpmn:Gateway")||w(e,"bpmn:DataStoreReference")||w(e,"bpmn:DataObjectReference")||w(e,"bpmn:DataInput")||w(e,"bpmn:DataOutput")||w(e,"bpmn:SequenceFlow")||w(e,"bpmn:MessageFlow")||w(e,"bpmn:Group")}function Hu(e){return ut(e.label)}function VP(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)],i=WP(e),o=Math.atan((r.y-n.y)/(r.x-n.x)),a=i.x,s=i.y;return Math.abs(o)1?D.parallelMultiple?A("bpmn:ParallelMultipleEventDefinition")(E,T,k):A("bpmn:MultipleEventDefinition")(E,T,k):ri(D,"bpmn:MessageEventDefinition")?A("bpmn:MessageEventDefinition")(E,T,k):ri(D,"bpmn:TimerEventDefinition")?A("bpmn:TimerEventDefinition")(E,T,k):ri(D,"bpmn:ConditionalEventDefinition")?A("bpmn:ConditionalEventDefinition")(E,T):ri(D,"bpmn:SignalEventDefinition")?A("bpmn:SignalEventDefinition")(E,T,k):ri(D,"bpmn:EscalationEventDefinition")?A("bpmn:EscalationEventDefinition")(E,T,k):ri(D,"bpmn:LinkEventDefinition")?A("bpmn:LinkEventDefinition")(E,T,k):ri(D,"bpmn:ErrorEventDefinition")?A("bpmn:ErrorEventDefinition")(E,T,k):ri(D,"bpmn:CancelEventDefinition")?A("bpmn:CancelEventDefinition")(E,T,k):ri(D,"bpmn:CompensateEventDefinition")?A("bpmn:CompensateEventDefinition")(E,T,k):ri(D,"bpmn:TerminateEventDefinition")?A("bpmn:TerminateEventDefinition")(E,T,k):null}function B(T,E,D){D=W({size:{width:100}},D);var k=o.createText(E||"",D);return et(k).add("djs-label"),Ie(T,k),k}function V(T,E,D){var k=ce(E);return B(T,k.name,{box:E,align:D,padding:7,style:{fill:ms(E,l,c)}})}function K(T,E){var D={width:90,height:30,x:E.width/2+E.x,y:E.height/2+E.y};return B(T,Cr(E),{box:D,fitBox:!0,style:W({},o.getExternalStyle(),{fill:ms(E,l,c)})})}function Q(T,E,D){var k=B(T,E,{box:{height:30,width:D.height},align:"center-middle",style:{fill:ms(D,l,c)}}),I=-1*D.height;id(k,0,-I,270)}var G=this.handlers={"bpmn:Event":function(T,E,D){return"fillOpacity"in D||(D.fillOpacity=ha),g(T,E.width,E.height,D)},"bpmn:StartEvent":function(T,E,D){var k={fill:it(E,s),stroke:ve(E,c)},I=ce(E);I.isInterrupting||(k={strokeDasharray:"6",fill:it(E,s),stroke:ve(E,c)});var $=A("bpmn:Event")(T,E,k);return(!D||D.renderIcon!==!1)&&L(E,T),$},"bpmn:MessageEventDefinition":function(T,E,D){var k=r.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:E.width,containerHeight:E.height,position:{mx:.235,my:.315}}),I=D?ve(E,c):it(E,s),$=D?it(E,s):ve(E,c),U=C(T,k,{strokeWidth:1,fill:I,stroke:$});return U},"bpmn:TimerEventDefinition":function(T,E){var D=g(T,E.width,E.height,.2*E.height,{strokeWidth:2,fill:it(E,s),stroke:ve(E,c)}),k=r.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:E.width,containerHeight:E.height,position:{mx:.5,my:.5}});C(T,k,{strokeWidth:2,stroke:ve(E,c)});for(var I=0;I<12;I++){var $=r.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:E.width,containerHeight:E.height,position:{mx:.5,my:.5}}),U=E.width/2,ee=E.height/2;C(T,$,{strokeWidth:1,transform:"rotate("+I*30+","+ee+","+U+")",stroke:ve(E,c)})}return D},"bpmn:EscalationEventDefinition":function(T,E,D){var k=r.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:.5,my:.2}}),I=D?ve(E,c):"none";return C(T,k,{strokeWidth:1,fill:I,stroke:ve(E,c)})},"bpmn:ConditionalEventDefinition":function(T,E){var D=r.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:.5,my:.222}});return C(T,D,{strokeWidth:1,stroke:ve(E,c)})},"bpmn:LinkEventDefinition":function(T,E,D){var k=r.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:.57,my:.263}}),I=D?ve(E,c):"none";return C(T,k,{strokeWidth:1,fill:I,stroke:ve(E,c)})},"bpmn:ErrorEventDefinition":function(T,E,D){var k=r.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:E.width,containerHeight:E.height,position:{mx:.2,my:.722}}),I=D?ve(E,c):"none";return C(T,k,{strokeWidth:1,fill:I,stroke:ve(E,c)})},"bpmn:CancelEventDefinition":function(T,E,D){var k=r.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:.638,my:-.055}}),I=D?ve(E,c):"none",$=C(T,k,{strokeWidth:1,fill:I,stroke:ve(E,c)});return FE($,45),$},"bpmn:CompensateEventDefinition":function(T,E,D){var k=r.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:.22,my:.5}}),I=D?ve(E,c):"none";return C(T,k,{strokeWidth:1,fill:I,stroke:ve(E,c)})},"bpmn:SignalEventDefinition":function(T,E,D){var k=r.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:E.width,containerHeight:E.height,position:{mx:.5,my:.2}}),I=D?ve(E,c):"none";return C(T,k,{strokeWidth:1,fill:I,stroke:ve(E,c)})},"bpmn:MultipleEventDefinition":function(T,E,D){var k=r.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:E.width,containerHeight:E.height,position:{mx:.222,my:.36}}),I=D?ve(E,c):"none";return C(T,k,{strokeWidth:1,fill:I})},"bpmn:ParallelMultipleEventDefinition":function(T,E){var D=r.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:E.width,containerHeight:E.height,position:{mx:.458,my:.194}});return C(T,D,{strokeWidth:1,fill:ve(E,c),stroke:ve(E,c)})},"bpmn:EndEvent":function(T,E,D){var k=A("bpmn:Event")(T,E,{strokeWidth:4,fill:it(E,s),stroke:ve(E,c)});return(!D||D.renderIcon!==!1)&&L(E,T),k},"bpmn:TerminateEventDefinition":function(T,E){var D=g(T,E.width,E.height,8,{strokeWidth:4,fill:ve(E,c),stroke:ve(E,c)});return D},"bpmn:IntermediateEvent":function(T,E,D){var k=A("bpmn:Event")(T,E,{strokeWidth:1.5,fill:it(E,s),stroke:ve(E,c)});return g(T,E.width,E.height,Qf,{strokeWidth:1.5,fill:it(E,"none"),stroke:ve(E,c)}),(!D||D.renderIcon!==!1)&&L(E,T),k},"bpmn:IntermediateCatchEvent":N("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":N("bpmn:IntermediateEvent"),"bpmn:Activity":function(T,E,D){return D=D||{},"fillOpacity"in D||(D.fillOpacity=ha),y(T,E.width,E.height,jl,D)},"bpmn:Task":function(T,E){var D={fill:it(E,s),stroke:ve(E,c)},k=A("bpmn:Activity")(T,E,D);return V(T,E,"center-middle"),H(T,E),k},"bpmn:ServiceTask":function(T,E){var D=A("bpmn:Task")(T,E),k=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});C(T,k,{strokeWidth:1,fill:it(E,s),stroke:ve(E,c)});var I=r.getScaledPath("TASK_TYPE_SERVICE_FILL",{abspos:{x:17.2,y:18}});C(T,I,{strokeWidth:0,fill:it(E,s)});var $=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return C(T,$,{strokeWidth:1,fill:it(E,s),stroke:ve(E,c)}),D},"bpmn:UserTask":function(T,E){var D=A("bpmn:Task")(T,E),k=15,I=12,$=r.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:k,y:I}});C(T,$,{strokeWidth:.5,fill:it(E,s),stroke:ve(E,c)});var U=r.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:k,y:I}});C(T,U,{strokeWidth:.5,fill:it(E,s),stroke:ve(E,c)});var ee=r.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:k,y:I}});return C(T,ee,{strokeWidth:.5,fill:ve(E,c),stroke:ve(E,c)}),D},"bpmn:ManualTask":function(T,E){var D=A("bpmn:Task")(T,E),k=r.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return C(T,k,{strokeWidth:.5,fill:it(E,s),stroke:ve(E,c)}),D},"bpmn:SendTask":function(T,E){var D=A("bpmn:Task")(T,E),k=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return C(T,k,{strokeWidth:1,fill:ve(E,c),stroke:it(E,s)}),D},"bpmn:ReceiveTask":function(T,E){var D=ce(E),k=A("bpmn:Task")(T,E),I;return D.instantiate?(g(T,28,28,20*.22,{strokeWidth:1}),I=r.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):I=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),C(T,I,{strokeWidth:1,fill:it(E,s),stroke:ve(E,c)}),k},"bpmn:ScriptTask":function(T,E){var D=A("bpmn:Task")(T,E),k=r.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return C(T,k,{strokeWidth:1,stroke:ve(E,c)}),D},"bpmn:BusinessRuleTask":function(T,E){var D=A("bpmn:Task")(T,E),k=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),I=C(T,k);ge(I,{strokeWidth:1,fill:it(E,"#aaaaaa"),stroke:ve(E,c)});var $=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),U=C(T,$);return ge(U,{strokeWidth:1,stroke:ve(E,c)}),D},"bpmn:SubProcess":function(T,E,D){D={fill:it(E,s),stroke:ve(E,c),...D};var k=A("bpmn:Activity")(T,E,D),I=ot(E);return er(E)&&ge(k,{strokeDasharray:"0, 5.5",strokeWidth:2.5}),V(T,E,I?"center-top":"center-middle"),I?H(T,E):H(T,E,["SubProcessMarker"]),k},"bpmn:AdHocSubProcess":function(T,E){return A("bpmn:SubProcess")(T,E)},"bpmn:Transaction":function(T,E){var D=A("bpmn:SubProcess")(T,E,{strokeWidth:1.5}),k=n.style(["no-fill","no-events"],{stroke:ve(E,c),strokeWidth:1.5});return y(T,E.width,E.height,jl-3,Qf,k),D},"bpmn:CallActivity":function(T,E){return A("bpmn:SubProcess")(T,E,{strokeWidth:5})},"bpmn:Participant":function(T,E){var D=1.5,k={fillOpacity:ha,fill:it(E,s),stroke:ve(E,c),strokeWidth:D},I=A("bpmn:Lane")(T,E,k),$=ot(E);if($){x(T,[{x:30,y:0},{x:30,y:E.height}],{stroke:ve(E,c),strokeWidth:D});var U=ce(E).name;Q(T,U,E)}else{var ee=ce(E).name;B(T,ee,{box:E,align:"center-middle",style:{fill:ms(E,l,c)}})}var oe=!!ce(E).participantMultiplicity;return oe&&A("ParticipantMultiplicityMarker")(T,E),I},"bpmn:Lane":function(T,E,D){var k=y(T,E.width,E.height,0,{fill:it(E,s),fillOpacity:tA,stroke:ve(E,c),strokeWidth:1.5,...D}),I=ce(E);if(I.$type==="bpmn:Lane"){var $=I.name;Q(T,$,E)}return k},"bpmn:InclusiveGateway":function(T,E){var D=A("bpmn:Gateway")(T,E);return g(T,E.width,E.height,E.height*.24,{strokeWidth:2.5,fill:it(E,s),stroke:ve(E,c)}),D},"bpmn:ExclusiveGateway":function(T,E){var D=A("bpmn:Gateway")(T,E),k=r.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:E.width,containerHeight:E.height,position:{mx:.32,my:.3}});return at(E).isMarkerVisible&&C(T,k,{strokeWidth:1,fill:ve(E,c),stroke:ve(E,c)}),D},"bpmn:ComplexGateway":function(T,E){var D=A("bpmn:Gateway")(T,E),k=r.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:E.width,containerHeight:E.height,position:{mx:.46,my:.26}});return C(T,k,{strokeWidth:1,fill:ve(E,c),stroke:ve(E,c)}),D},"bpmn:ParallelGateway":function(T,E){var D=A("bpmn:Gateway")(T,E),k=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:E.width,containerHeight:E.height,position:{mx:.46,my:.2}});return C(T,k,{strokeWidth:1,fill:ve(E,c),stroke:ve(E,c)}),D},"bpmn:EventBasedGateway":function(T,E){var D=ce(E),k=A("bpmn:Gateway")(T,E);g(T,E.width,E.height,E.height*.2,{strokeWidth:1,fill:"none",stroke:ve(E,c)});var I=D.eventGatewayType,$=!!D.instantiate;function U(){var oe=r.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:E.width,containerHeight:E.height,position:{mx:.36,my:.44}});C(T,oe,{strokeWidth:2,fill:it(E,"none"),stroke:ve(E,c)})}if(I==="Parallel"){var ee=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:E.width,containerHeight:E.height,position:{mx:.474,my:.296}});C(T,ee,{strokeWidth:1,fill:"none"})}else I==="Exclusive"&&($||g(T,E.width,E.height,E.height*.26,{strokeWidth:1,fill:"none",stroke:ve(E,c)}),U());return k},"bpmn:Gateway":function(T,E){return b(T,E.width,E.height,{fill:it(E,s),fillOpacity:ha,stroke:ve(E,c)})},"bpmn:SequenceFlow":function(T,E){var D=it(E,s),k=ve(E,c),I=S(T,E.waypoints,{markerEnd:m("sequenceflow-end",D,k),stroke:ve(E,c)}),$=ce(E),U;return E.source&&(U=E.source.businessObject,$.conditionExpression&&U.$instanceOf("bpmn:Activity")&&ge(I,{markerStart:m("conditional-flow-marker",D,k)}),U.default&&(U.$instanceOf("bpmn:Gateway")||U.$instanceOf("bpmn:Activity"))&&U.default===$&&ge(I,{markerStart:m("conditional-default-flow-marker",D,k)})),I},"bpmn:Association":function(T,E,D){var k=ce(E),I=it(E,s),$=ve(E,c);return D={strokeDasharray:"0, 5",stroke:ve(E,c),...D},(k.associationDirection==="One"||k.associationDirection==="Both")&&(D.markerEnd=m("association-end",I,$)),k.associationDirection==="Both"&&(D.markerStart=m("association-start",I,$)),S(T,E.waypoints,D)},"bpmn:DataInputAssociation":function(T,E){var D=it(E,s),k=ve(E,c);return A("bpmn:Association")(T,E,{markerEnd:m("association-end",D,k)})},"bpmn:DataOutputAssociation":function(T,E){var D=it(E,s),k=ve(E,c);return A("bpmn:Association")(T,E,{markerEnd:m("association-end",D,k)})},"bpmn:MessageFlow":function(T,E){var D=ce(E),k=at(E),I=it(E,s),$=ve(E,c),U=S(T,E.waypoints,{markerEnd:m("messageflow-end",I,$),markerStart:m("messageflow-start",I,$),strokeDasharray:"10, 11",strokeWidth:1.5,stroke:ve(E,c)});if(D.messageRef){var ee=U.getPointAtLength(U.getTotalLength()/2),oe=r.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:ee.x,y:ee.y}}),le={strokeWidth:1};k.messageVisibleKind==="initiating"?(le.fill="white",le.stroke=Ts):(le.fill="#888",le.stroke="white");var me=C(T,oe,le),_e=D.messageRef.name,Be=B(T,_e,{align:"center-top",fitBox:!0,style:{fill:ve(E,l)}}),rt=me.getBBox(),De=Be.getBBox(),re=ee.x-De.width/2,He=ee.y+rt.height/2+nA;id(Be,re,He,0)}return U},"bpmn:DataObject":function(T,E){var D=r.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:.474,my:.296}}),k=C(T,D,{fill:it(E,s),fillOpacity:ha,stroke:ve(E,c)}),I=ce(E);return KP(I)&&q(T,E),k},"bpmn:DataObjectReference":N("bpmn:DataObject"),"bpmn:DataInput":function(T,E){var D=r.getRawPath("DATA_ARROW"),k=A("bpmn:DataObject")(T,E);return C(T,D,{strokeWidth:1}),k},"bpmn:DataOutput":function(T,E){var D=r.getRawPath("DATA_ARROW"),k=A("bpmn:DataObject")(T,E);return C(T,D,{strokeWidth:1,fill:Ts}),k},"bpmn:DataStoreReference":function(T,E){var D=r.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:0,my:.133}}),k=C(T,D,{strokeWidth:2,fill:it(E,s),fillOpacity:ha,stroke:ve(E,c)});return k},"bpmn:BoundaryEvent":function(T,E,D){var k=ce(E),I=k.cancelActivity,$={strokeWidth:1.5,fill:it(E,s),stroke:ve(E,c)};I||($.strokeDasharray="6");var U={...$,fillOpacity:1},ee={...$,fill:"none"},oe=A("bpmn:Event")(T,E,U);return g(T,E.width,E.height,Qf,ee),(!D||D.renderIcon!==!1)&&L(E,T),oe},"bpmn:Group":function(T,E){return y(T,E.width,E.height,jl,{stroke:ve(E,c),strokeWidth:1.5,strokeDasharray:"10,6,0,6",fill:"none",pointerEvents:"none"})},label:function(T,E){return K(T,E)},"bpmn:TextAnnotation":function(T,E){var D=y(T,E.width,E.height,0,0,{fill:"none",stroke:"none"}),k=r.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:0,my:0}});C(T,k,{stroke:ve(E,c)});var I=ce(E).text||"";return B(T,I,{box:E,align:"left-top",padding:7,style:{fill:ms(E,l,c)}}),D},ParticipantMultiplicityMarker:function(T,E){var D=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:E.width/2/E.width,my:(E.height-15)/E.height}});M("participant-multiplicity",T,D,{strokeWidth:2,fill:it(E,s),stroke:ve(E,c)})},SubProcessMarker:function(T,E){var D=y(T,14,14,0,{strokeWidth:1,fill:it(E,s),stroke:ve(E,c)});Jn(D,E.width/2-7.5,E.height-20);var k=r.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:E.width,containerHeight:E.height,position:{mx:(E.width/2-7.5)/E.width,my:(E.height-20)/E.height}});M("sub-process",T,k,{fill:it(E,s),stroke:ve(E,c)})},ParallelMarker:function(T,E,D){var k=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:(E.width/2+D.parallel)/E.width,my:(E.height-20)/E.height}});M("parallel",T,k,{fill:it(E,s),stroke:ve(E,c)})},SequentialMarker:function(T,E,D){var k=r.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:(E.width/2+D.seq)/E.width,my:(E.height-19)/E.height}});M("sequential",T,k,{fill:it(E,s),stroke:ve(E,c)})},CompensationMarker:function(T,E,D){var k=r.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:(E.width/2+D.compensation)/E.width,my:(E.height-13)/E.height}});M("compensation",T,k,{strokeWidth:1,fill:it(E,s),stroke:ve(E,c)})},LoopMarker:function(T,E,D){var k=r.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:(E.width/2+D.loop)/E.width,my:(E.height-7)/E.height}});M("loop",T,k,{strokeWidth:1.5,fill:it(E,s),stroke:ve(E,c),strokeMiterlimit:.5})},AdhocMarker:function(T,E,D){var k=r.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:(E.width/2+D.adhoc)/E.width,my:(E.height-15)/E.height}});M("adhoc",T,k,{strokeWidth:1,fill:ve(E,c),stroke:ve(E,c)})}};function H(T,E,D){var k=ce(E),I=D&&D.indexOf("SubProcessMarker")!==-1,$;I?$={seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:$={seq:-3,parallel:-6,compensation:-27,loop:0,adhoc:10},z(D,function(oe){A(oe)(T,E,$)}),k.isForCompensation&&A("CompensationMarker")(T,E,$),k.$type==="bpmn:AdHocSubProcess"&&A("AdhocMarker")(T,E,$);var U=k.loopCharacteristics,ee=U&&U.isSequential;U&&(ee===void 0&&A("LoopMarker")(T,E,$),ee===!1&&A("ParallelMarker")(T,E,$),ee===!0&&A("SequentialMarker")(T,E,$))}function q(T,E){var D=(E.height-18)/E.height,k=r.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:.33,my:D}});C(T,k,{strokeWidth:2})}this._drawPath=C,this._renderer=A}xe(ra,Li);ra.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"];ra.prototype.canRender=function(e){return w(e,"bpmn:BaseElement")};ra.prototype.drawShape=function(e,t){var n=t.type,r=this._renderer(n);return r(e,t)};ra.prototype.drawConnection=function(e,t){var n=t.type,r=this._renderer(n);return r(e,t)};ra.prototype.getShapePath=function(e){return w(e,"bpmn:Event")?XP(e):w(e,"bpmn:Activity")?ZP(e,jl):w(e,"bpmn:Gateway")?QP(e):JP(e)};var rA=0,iA={width:150,height:50};function oA(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function aA(e){return fn(e)?W({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}function sA(e,t){t.textContent=e;var n;try{var r,i=e==="";return t.textContent=i?"dummy":e,n=t.getBBox(),r={width:n.width+n.x*2,height:n.height},i&&(r.width=0),r}catch{return{width:0,height:0}}}function cA(e,t,n){for(var r=e.shift(),i=r,o;;){if(o=sA(i,n),o.width=i?o.width:0,i===" "||i===""||o.width1)for(;r=n.shift();)if(r.length+og?y.width:g},0),v=o.top;i.vertical==="middle"&&(v+=(n.height-d)/2),v-=(s||l[0].height)/4;var m=Te("text");ge(m,r),z(l,function(g){var y;switch(v+=s||g.height,i.horizontal){case"left":y=o.left;break;case"right":y=(a?h:u)-o.right-g.width;break;default:y=Math.max(((a?h:u)-g.width)/2+o.left,0)}var b=Te("tspan");ge(b,{x:y,y:v}),b.textContent=g.text,Ie(m,b)}),jt(f);var _={width:h,height:d};return{dimensions:_,element:m}};function dA(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}var hA=12,vA=1.2,mA=30;function a_(e){var t=W({fontFamily:"Arial, sans-serif",fontSize:hA,fontWeight:"normal",lineHeight:vA},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,r=W({},t,{fontSize:n},e&&e.externalStyle||{}),i=new zu({style:t});this.getExternalLabelBounds=function(o,a){var s=i.getDimensions(a,{box:{width:90,height:30},style:r});return{x:Math.round(o.x+o.width/2-s.width/2),y:Math.round(o.y),width:Math.ceil(s.width),height:Math.ceil(s.height)}},this.getTextAnnotationBounds=function(o,a){var s=i.getDimensions(a,{box:o,style:t,align:"left-top",padding:5});return{x:o.x,y:o.y,width:o.width,height:Math.max(mA,Math.round(s.height))}},this.createText=function(o,a){return i.createText(o,a||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return r}}a_.$inject=["config.textRenderer"];function gA(){this.pathMap={EVENT_MESSAGE:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z",height:36,width:36,heightElements:[20,7],widthElements:[8]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{d:"m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{d:"m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{d:"m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} {e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} {e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{d:"m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m {mx},{my} l 0,{e.y2} c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 l 0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{d:"m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{d:"m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{d:"m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 -0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 -1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 -10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 -0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 -1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 -0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 -5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z"},TASK_TYPE_INSTANTIATING_SEND:{d:"m {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6"},TASK_TYPE_SERVICE:{d:"m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 -1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 -0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 -1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 -0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_SERVICE_FILL:{d:"m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_BUSINESS_RULE_HEADER:{d:"m {mx},{my} 0,4 20,0 0,-4 z"},TASK_TYPE_BUSINESS_RULE_MAIN:{d:"m {mx},{my} 0,12 20,0 0,-12 zm 0,8 l 20,0 m -13,-4 l 0,8"},MESSAGE_FLOW_MARKER:{d:"m {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6"}},this.getRawPath=function(t){return this.pathMap[t].d},this.getScaledPath=function(t,n){var r=this.pathMap[t],i,o;n.abspos?(i=n.abspos.x,o=n.abspos.y):(i=n.containerWidth*n.position.mx,o=n.containerHeight*n.position.my);var a={};if(n.position){for(var s=n.containerHeight/r.height*n.yScaleFactor,c=n.containerWidth/r.width*n.xScaleFactor,l=0;l=e.x&&n<=e.x+e.width&&r>=e.y&&r<=e.y+e.height}function TA(e){return w(e,"bpmn:Group")}const RA={__depends__:[Vu],bpmnImporter:["type",ji]},PA={__depends__:[xA,RA]};function ug(e){!e||typeof e.stopPropagation!="function"||e.stopPropagation()}function Za(e){return e.originalEvent||e.srcEvent}function Jf(e){ug(e),ug(Za(e))}function lo(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}function c_(){return/mac/i.test(navigator.platform)}function l_(e,t){return(Za(e)||e).button===t}function po(e){return l_(e,0)}function AA(e){return l_(e,1)}function Ko(e){var t=Za(e)||e;return po(e)?c_()?t.metaKey:t.ctrlKey:!1}function Bh(e){var t=Za(e)||e;return po(e)&&t.shiftKey}function OA(e){return!0}function Yc(e){return po(e)||AA(e)}var fg=500;function u_(e,t,n){var r=this;function i(M,A,N){if(!s(M,A)){var L,B,V;N?B=t.getGraphics(N):(L=A.delegateTarget||A.target,L&&(B=L,N=t.get(B))),!(!B||!N)&&(V=e.fire(M,{element:N,gfx:B,originalEvent:A}),V===!1&&(A.stopPropagation(),A.preventDefault()))}}var o={};function a(M){return o[M]}function s(M,A){var N=l[M]||po;return!N(A)}var c={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},l={"element.contextmenu":OA,"element.mousedown":Yc,"element.mouseup":Yc,"element.click":Yc,"element.dblclick":Yc};function u(M,A,N){var L=c[M];if(!L)throw new Error("unmapped DOM event name <"+M+">");return i(L,A,N)}var f="svg, .djs-element";function p(M,A,N,L){var B=o[N]=function(V){i(N,V)};L&&(l[N]=L),B.$delegate=Sr.bind(M,f,A,B)}function d(M,A,N){var L=a(N);L&&Sr.unbind(M,A,L.$delegate)}function h(M){z(c,function(A,N){p(M,N,A)})}function v(M){z(c,function(A,N){d(M,N,A)})}e.on("canvas.destroy",function(M){v(M.svg)}),e.on("canvas.init",function(M){h(M.svg)}),e.on(["shape.added","connection.added"],function(M){var A=M.element,N=M.gfx;e.fire("interactionEvents.createHit",{element:A,gfx:N})}),e.on(["shape.changed","connection.changed"],fg,function(M){var A=M.element,N=M.gfx;e.fire("interactionEvents.updateHit",{element:A,gfx:N})}),e.on("interactionEvents.createHit",fg,function(M){var A=M.element,N=M.gfx;r.createDefaultHit(A,N)}),e.on("interactionEvents.updateHit",function(M){var A=M.element,N=M.gfx;r.updateDefaultHit(A,N)});var m=x("djs-hit djs-hit-stroke"),_=x("djs-hit djs-hit-click-stroke"),g=x("djs-hit djs-hit-all"),y=x("djs-hit djs-hit-no-move"),b={all:g,"click-stroke":_,stroke:m,"no-move":y};function x(M,A){return A=W({stroke:"white",strokeWidth:15},A||{}),n.cls(M,["no-fill","no-border"],A)}function S(M,A){var N=b[A];if(!N)throw new Error("invalid hit type <"+A+">");return ge(M,N),M}function C(M,A){Ie(M,A)}this.removeHits=function(M){var A=Zp(".djs-hit",M);z(A,jt)},this.createDefaultHit=function(M,A){var N=M.waypoints,L=M.isFrame,B;return N?this.createWaypointsHit(A,N):(B=L?"stroke":"all",this.createBoxHit(A,B,{width:M.width,height:M.height}))},this.createWaypointsHit=function(M,A){var N=Du(A);return S(N,"stroke"),C(M,N),N},this.createBoxHit=function(M,A,N){N=W({x:0,y:0},N);var L=Te("rect");return S(L,A),ge(L,N),C(M,L),L},this.updateDefaultHit=function(M,A){var N=ht(".djs-hit",A);if(N)return M.waypoints?bE(N,M.waypoints):ge(N,{width:M.width,height:M.height}),N},this.fire=i,this.triggerMouseEvent=u,this.mouseHandler=a,this.registerEvent=p,this.unregisterEvent=d}u_.$inject=["eventBus","elementRegistry","styles"];const dc={__init__:["interactionEvents"],interactionEvents:["type",u_]};var MA=500;function Wu(e,t){this.offset=6;var n=t.cls("djs-outline",["no-fill"]),r=this;function i(o,a){var s=Te("rect");return ge(s,W({x:10,y:10,rx:4,width:100,height:100},n)),Ie(o,s),s}e.on(["shape.added","shape.changed"],MA,function(o){var a=o.element,s=o.gfx,c=ht(".djs-outline",s);c||(c=i(s)),r.updateShapeOutline(c,a)}),e.on(["connection.added","connection.changed"],function(o){var a=o.element,s=o.gfx,c=ht(".djs-outline",s);c||(c=i(s)),r.updateConnectionOutline(c,a)})}Wu.prototype.updateShapeOutline=function(e,t){ge(e,{x:-this.offset,y:-this.offset,width:t.width+this.offset*2,height:t.height+this.offset*2})};Wu.prototype.updateConnectionOutline=function(e,t){var n=Zt(t);ge(e,{x:n.x-this.offset,y:n.y-this.offset,width:n.width+this.offset*2,height:n.height+this.offset*2})};Wu.$inject=["eventBus","styles","elementRegistry"];const f_={__init__:["outline"],outline:["type",Wu]};function Qa(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=[];var n=this;e.on(["shape.remove","connection.remove"],function(r){var i=r.element;n.deselect(i)}),e.on(["diagram.clear","root.set"],function(r){n.select(null)})}Qa.$inject=["eventBus","canvas"];Qa.prototype.deselect=function(e){var t=this._selectedElements,n=t.indexOf(e);if(n!==-1){var r=t.slice();t.splice(n,1),this._eventBus.fire("selection.changed",{oldSelection:r,newSelection:t})}};Qa.prototype.get=function(){return this._selectedElements};Qa.prototype.isSelected=function(e){return this._selectedElements.indexOf(e)!==-1};Qa.prototype.select=function(e,t){var n=this._selectedElements,r=n.slice();qe(e)||(e=e?[e]:[]);var i=this._canvas,o=i.getRootElement();e=e.filter(function(a){var s=i.findRoot(a);return o===s}),t?z(e,function(a){n.indexOf(a)===-1&&n.push(a)}):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:r,newSelection:n})};var pg="hover",dg="selected",Kc=6;function Hh(e,t,n){this._canvas=e;var r=this;this._multiSelectionBox=null;function i(a,s){e.addMarker(a,s)}function o(a,s){e.removeMarker(a,s)}t.on("element.hover",function(a){i(a.element,pg)}),t.on("element.out",function(a){o(a.element,pg)}),t.on("selection.changed",function(a){function s(f){o(f,dg)}function c(f){i(f,dg)}var l=a.oldSelection,u=a.newSelection;z(l,function(f){u.indexOf(f)===-1&&s(f)}),z(u,function(f){l.indexOf(f)===-1&&c(f)}),r._updateSelectionOutline(u)}),t.on("element.changed",function(a){n.isSelected(a.element)&&r._updateSelectionOutline(n.get())})}Hh.$inject=["canvas","eventBus","selection"];Hh.prototype._updateSelectionOutline=function(e){var t=this._canvas.getLayer("selectionOutline");ic(t);var n=e.length>1,r=this._canvas.getContainer();if(et(r)[n?"add":"remove"]("djs-multi-select"),!!n){var i=DA(Zt(e)),o=Te("rect");ge(o,W({rx:3},i)),et(o).add("djs-selection-outline"),Ie(t,o)}};function DA(e){return{x:e.x-Kc,y:e.y-Kc,width:e.width+Kc*2,height:e.height+Kc*2}}function p_(e,t,n,r){e.on("create.end",500,function(i){var o=i.context,a=o.canExecute,s=o.elements,c=o.hints||{},l=c.autoSelect;if(a){if(l===!1)return;qe(l)?t.select(l):t.select(s.filter(IA))}}),e.on("connect.end",500,function(i){var o=i.context,a=o.connection;a&&t.select(a)}),e.on("shape.move.end",500,function(i){var o=i.previousSelection||[],a=r.get(i.context.shape.id),s=st(o,function(c){return a.id===c.id});s||t.select(a)}),e.on("element.click",function(i){if(po(i)){var o=i.element;o===n.getRootElement()&&(o=null);var a=t.isSelected(o),s=t.get().length>1,c=Ko(i)||Bh(i);if(a&&s)return c?t.deselect(o):t.select(o);a?t.deselect(o):t.select(o,c)}})}p_.$inject=["eventBus","selection","canvas","elementRegistry"];function IA(e){return!e.hidden}const di={__init__:["selectionVisuals","selectionBehavior"],__depends__:[dc,f_],selection:["type",Qa],selectionVisuals:["type",Hh],selectionBehavior:["type",p_]};function zh(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(Math.random()*1e9)+"-"}zh.prototype.next=function(){return this._prefix+ ++this._counter};var NA=new zh("ov"),kA=500;function bn(e,t,n,r){this._eventBus=t,this._canvas=n,this._elementRegistry=r,this._ids=NA,this._overlayDefaults=W({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=LA(n.getContainer()),this._init()}bn.$inject=["config.overlays","eventBus","canvas","elementRegistry"];bn.prototype.get=function(e){if(tr(e)&&(e={id:e}),tr(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?Ge(t.overlays,Ur({type:e.type})):t.overlays.slice():[]}else return e.type?Ge(this._overlays,Ur({type:e.type})):e.id?this._overlays[e.id]:null};bn.prototype.add=function(e,t,n){if(fn(t)&&(n=t,t=null),e.id||(e=this._elementRegistry.get(e)),!n.position)throw new Error("must specifiy overlay position");if(!n.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var r=this._ids.next();return n=W({},this._overlayDefaults,n,{id:r,type:t,element:e,html:n.html}),this._addOverlay(n),r};bn.prototype.remove=function(e){var t=this.get(e)||[];qe(t)||(t=[t]);var n=this;z(t,function(r){var i=n._getOverlayContainer(r.element,!0);if(r&&(fi(r.html),fi(r.htmlContainer),delete r.htmlContainer,delete r.element,delete n._overlays[r.id]),i){var o=i.overlays.indexOf(r);o!==-1&&i.overlays.splice(o,1)}})};bn.prototype.isShown=function(){return this._overlayRoot.style.display!=="none"};bn.prototype.show=function(){Uu(this._overlayRoot)};bn.prototype.hide=function(){Uu(this._overlayRoot,!1)};bn.prototype.clear=function(){this._overlays={},this._overlayContainers=[],Mu(this._overlayRoot)};bn.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,r=t.x,i=t.y;if(t.waypoints){var o=Zt(t);r=o.x,i=o.y}d_(n,r,i),Tn(e.html,"data-container-id",t.id)};bn.prototype._updateOverlay=function(e){var t=e.position,n=e.htmlContainer,r=e.element,i=t.left,o=t.top;if(t.right!==void 0){var a;r.waypoints?a=Zt(r).width:a=r.width,i=t.right*-1+a}if(t.bottom!==void 0){var s;r.waypoints?s=Zt(r).height:s=r.height,o=t.bottom*-1+s}d_(n,i||0,o||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())};bn.prototype._createOverlayContainer=function(e){var t=Ct('
');Cn(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n};bn.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";h_(this._overlayRoot,n)};bn.prototype._getOverlayContainer=function(e,t){var n=st(this._overlayContainers,function(r){return r.element===e});return!n&&!t?this._createOverlayContainer(e):n};bn.prototype._addOverlay=function(e){var t=e.id,n=e.element,r=e.html,i,o;r.get&&r.constructor.prototype.jquery&&(r=r.get(0)),tr(r)&&(r=Ct(r)),o=this._getOverlayContainer(n),i=Ct('
'),Cn(i,{position:"absolute"}),i.appendChild(r),e.type&&At(i).add("djs-overlay-"+e.type);var a=this._canvas.findRoot(n),s=this._canvas.getRootElement();Uu(i,a===s),e.htmlContainer=i,o.overlays.push(e),o.html.appendChild(i),this._overlays[t]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())};bn.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,r=this._canvas.findRoot(e.element),i=n&&n.minZoom,o=n&&n.maxZoom,a=e.htmlContainer,s=this._canvas.getRootElement(),c=!0;(r!==s||n&&(ln(i)&&i>t.scale||ln(o)&&oi&&(a=(1/t.scale||1)*i)),ln(a)&&(s="scale("+a+","+a+")"),h_(o,s)};bn.prototype._updateOverlaysVisibilty=function(e){var t=this;z(this._overlays,function(n){t._updateOverlayVisibilty(n,e)})};bn.prototype._init=function(){var e=this._eventBus,t=this;function n(r){t._updateRoot(r),t._updateOverlaysVisibilty(r),t.show()}e.on("canvas.viewbox.changing",function(r){t.hide()}),e.on("canvas.viewbox.changed",function(r){n(r.viewbox)}),e.on(["shape.remove","connection.remove"],function(r){var i=r.element,o=t.get({element:i});z(o,function(c){t.remove(c.id)});var a=t._getOverlayContainer(i);if(a){fi(a.html);var s=t._overlayContainers.indexOf(a);s!==-1&&t._overlayContainers.splice(s,1)}}),e.on("element.changed",kA,function(r){var i=r.element,o=t._getOverlayContainer(i,!0);o&&(z(o.overlays,function(a){t._updateOverlay(a)}),t._updateOverlayContainer(o))}),e.on("element.marker.update",function(r){var i=t._getOverlayContainer(r.element,!0);i&&At(i.html)[r.add?"add":"remove"](r.marker)}),e.on("root.set",function(){t._updateOverlaysVisibilty(t._canvas.viewbox())}),e.on("diagram.clear",this.clear,this)};function LA(e){var t=Ct('
');return Cn(t,{position:"absolute",width:0,height:0}),e.insertBefore(t,e.firstChild),t}function d_(e,t,n){Cn(e,{left:t+"px",top:n+"px"})}function Uu(e,t){e.style.display=t===!1?"none":""}function h_(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(n){e.style[n+"transform"]=t})}const Gu={__init__:["overlays"],overlays:["type",bn]};function v_(e,t,n,r){e.on("element.changed",function(i){var o=i.element;(o.parent||o===t.getRootElement())&&(i.gfx=n.getGraphics(o)),i.gfx&&e.fire(_E(o)+".changed",i)}),e.on("elements.changed",function(i){var o=i.elements;o.forEach(function(a){e.fire("element.changed",{element:a})}),r.updateContainments(o)}),e.on("shape.changed",function(i){r.update("shape",i.element,i.gfx)}),e.on("connection.changed",function(i){r.update("connection",i.element,i.gfx)})}v_.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];const Vh={__init__:["changeSupport"],changeSupport:["type",v_]};var $A=1e3;function ae(e){this._eventBus=e}ae.$inject=["eventBus"];function jA(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}ae.prototype.on=function(e,t,n,r,i,o){if((Rn(t)||Le(t))&&(o=i,i=r,r=n,n=t,t=null),Rn(n)&&(o=i,i=r,r=n,n=$A),fn(i)&&(o=i,i=!1),!Rn(r))throw new Error("handlerFn must be a function");qe(e)||(e=[e]);var a=this._eventBus;z(e,function(s){var c=["commandStack",s,t].filter(function(l){return l}).join(".");a.on(c,n,i?jA(r,o):r,o)})};ae.prototype.canExecute=Fi("canExecute");ae.prototype.preExecute=Fi("preExecute");ae.prototype.preExecuted=Fi("preExecuted");ae.prototype.execute=Fi("execute");ae.prototype.executed=Fi("executed");ae.prototype.postExecute=Fi("postExecute");ae.prototype.postExecuted=Fi("postExecuted");ae.prototype.revert=Fi("revert");ae.prototype.reverted=Fi("reverted");function Fi(e){return function(n,r,i,o,a){(Rn(n)||Le(n))&&(a=o,o=i,i=r,r=n,n=null),this.on(n,e,r,i,o,a)}}function Wh(e,t){t.invoke(ae,this),this.executed(function(n){var r=n.context;r.rootElement?e.setRootElement(r.rootElement):r.rootElement=e.getRootElement()}),this.revert(function(n){var r=n.context;r.rootElement&&e.setRootElement(r.rootElement)})}xe(Wh,ae);Wh.$inject=["canvas","injector"];const FA={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",Wh]};function Xo(e){return CSS.escape(e)}var BA={"&":"&","<":"<",">":">",'"':""","'":"'"};function cd(e){return e=""+e,e&&e.replace(/[&<>"']/g,function(t){return BA[t]})}var m_="_plane";function hg(e){var t=e.id;return HA(t)}function Ri(e){var t=e.id;return w(e,"bpmn:SubProcess")?g_(t):t}function Mo(e){return g_(e)}function ep(e){var t=at(e);return w(t,"bpmndi:BPMNPlane")}function g_(e){return e+m_}function HA(e){return e.replace(new RegExp(m_+"$"),"")}var zA="bjs-breadcrumbs-shown";function y_(e,t,n){var r=Ct('
    '),i=n.getContainer(),o=At(i);i.appendChild(r);var a=[];e.on("element.changed",function(c){var l=c.element,u=ce(l),f=st(a,function(p){return p===u});f&&s()});function s(c){c&&(a=VA(c));var l=a.map(function(f){var p=cd(f.name||f.id),d=Ct('
  • '+p+"
  • "),h=n.findRoot(Ri(f))||n.findRoot(f.id);if(!h&&w(f,"bpmn:Process")){var v=t.find(function(m){var _=ce(m);return _&&_.get("processRef")&&_.get("processRef")===f});h=n.findRoot(v.id)}return d.addEventListener("click",function(){n.setRootElement(h)}),d});r.innerHTML="";var u=l.length>1;o.toggle(zA,u),l.forEach(function(f){r.appendChild(f)})}e.on("root.set",function(c){s(c.element)})}y_.$inject=["eventBus","elementRegistry","canvas"];function VA(e){for(var t=ce(e),n=[],r=t;r;r=r.$parent)(w(r,"bpmn:SubProcess")||w(r,"bpmn:Process"))&&n.push(r);return n.reverse()}function b_(e,t){var n=null,r=new WA;e.on("root.set",function(i){var o=i.element,a=t.viewbox(),s=r.get(o);if(r.set(n,{x:a.x,y:a.y,zoom:a.scale}),n=o,!(w(o,"bpmn:Collaboration")&&!s)){s=s||{x:0,y:0,zoom:1};var c=(a.x-s.x)*a.scale,l=(a.y-s.y)*a.scale;(c!==0||l!==0)&&t.scroll({dx:c,dy:l}),s.zoom!==a.scale&&t.zoom(s.zoom,{x:0,y:0})}}),e.on("diagram.clear",function(){r.clear(),n=null})}b_.$inject=["eventBus","canvas"];function WA(){this._entries=[],this.set=function(e,t){var n=!1;for(var r in this._entries)if(this._entries[r][0]===e){this._entries[r][1]=t,n=!0;break}n||this._entries.push([e,t])},this.get=function(e){for(var t in this._entries)if(this._entries[t][0]===e)return this._entries[t][1];return null},this.clear=function(){this._entries.length=0},this.remove=function(e){var t=-1;for(var n in this._entries)if(this._entries[n][0]===e){t=n;break}t!==-1&&this._entries.splice(t,1)}}var vg={x:180,y:160};function ia(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,function(r,i){n._handleImport(i.definitions)})}ia.prototype._handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach(function(r){!r.plane||!r.plane.bpmnElement||(t._processToDiagramMap[r.plane.bpmnElement.id]=r)});var n=[];e.diagrams.forEach(function(r){var i=t._createNewDiagrams(r.plane);Array.prototype.push.apply(n,i)}),n.forEach(function(r){t._movePlaneElementsToOrigin(r.plane)})}};ia.prototype._createNewDiagrams=function(e){var t=this,n=[],r=[];e.get("planeElement").forEach(function(o){var a=o.bpmnElement;if(a){var s=a.$parent;w(a,"bpmn:SubProcess")&&!o.isExpanded&&n.push(a),GA(a,e)&&r.push({diElement:o,parent:s})}});var i=[];return n.forEach(function(o){if(!t._processToDiagramMap[o.id]){var a=t._createDiagram(o);t._processToDiagramMap[o.id]=a,i.push(a)}}),r.forEach(function(o){for(var a=o.diElement,s=o.parent;s&&n.indexOf(s)===-1;)s=s.$parent;if(s){var c=t._processToDiagramMap[s.id];t._moveToDiPlane(a,c.plane)}}),i};ia.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=UA(e),r={x:n.x-vg.x,y:n.y-vg.y};t.forEach(function(i){i.waypoint?i.waypoint.forEach(function(o){o.x=o.x-r.x,o.y=o.y-r.y}):i.bounds&&(i.bounds.x=i.bounds.x-r.x,i.bounds.y=i.bounds.y-r.y)})};ia.prototype._moveToDiPlane=function(e,t){var n=E_(e),r=n.plane.get("planeElement");r.splice(r.indexOf(e),1),t.get("planeElement").push(e)};ia.prototype._createDiagram=function(e){var t=this._moddle.create("bpmndi:BPMNPlane",{bpmnElement:e}),n=this._moddle.create("bpmndi:BPMNDiagram",{plane:t});return t.$parent=n,t.bpmnElement=e,n.$parent=this._definitions,this._definitions.diagrams.push(n),n};ia.$inject=["eventBus","moddle"];function E_(e){return w(e,"bpmndi:BPMNDiagram")?e:E_(e.$parent)}function UA(e){var t={top:1/0,right:-1/0,bottom:-1/0,left:1/0};return e.planeElement.forEach(function(n){if(n.bounds){var r=Ae(n.bounds);t.top=Math.min(r.top,t.top),t.left=Math.min(r.left,t.left)}}),Nu(t)}function GA(e,t){var n=e.$parent;return!(!w(n,"bpmn:SubProcess")||n===t.bpmnElement||Qe(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))}var Xc=250,qA='',YA="bjs-drilldown-empty";function ho(e,t,n,r){ae.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=r;var i=this;this.executed("shape.toggleCollapse",Xc,function(o){var a=o.shape;i._canDrillDown(a)?i._addOverlay(a):i._removeOverlay(a)},!0),this.reverted("shape.toggleCollapse",Xc,function(o){var a=o.shape;i._canDrillDown(a)?i._addOverlay(a):i._removeOverlay(a)},!0),this.executed(["shape.create","shape.move","shape.delete"],Xc,function(o){var a=o.oldParent,s=o.newParent||o.parent,c=o.shape;i._canDrillDown(c)&&i._addOverlay(c),i._updateDrilldownOverlay(a),i._updateDrilldownOverlay(s),i._updateDrilldownOverlay(c)},!0),this.reverted(["shape.create","shape.move","shape.delete"],Xc,function(o){var a=o.oldParent,s=o.newParent||o.parent,c=o.shape;i._canDrillDown(c)&&i._addOverlay(c),i._updateDrilldownOverlay(a),i._updateDrilldownOverlay(s),i._updateDrilldownOverlay(c)},!0),t.on("import.render.complete",function(){n.filter(function(o){return i._canDrillDown(o)}).map(function(o){i._addOverlay(o)})})}xe(ho,ae);ho.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}};ho.prototype._canDrillDown=function(e){var t=this._canvas;return w(e,"bpmn:SubProcess")&&t.findRoot(Ri(e))};ho.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=ce(e),r=t.get({element:n.id,type:"drilldown"})[0];if(r){var i=n&&n.get("flowElements")&&n.get("flowElements").length;At(r.html).toggle(YA,!i)}};ho.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,r=n.get({element:e,type:"drilldown"});r.length&&this._removeOverlay(e);var i=Ct('");i.addEventListener("click",function(){t.setRootElement(t.findRoot(Ri(e)))}),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:i}),this._updateOverlayVisibility(e)};ho.prototype._removeOverlay=function(e){var t=this._overlays;t.remove({element:e,type:"drilldown"})};ho.$inject=["canvas","eventBus","elementRegistry","overlays"];const KA={__depends__:[Gu,Vh,FA],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",y_],drilldownCentering:["type",b_],drilldownOverlayBehavior:["type",ho],subprocessCompatibility:["type",ia]};function vo(e){It.call(this,e)}xe(vo,It);vo.prototype._modules=[PA,Vu,di,Gu,KA];vo.prototype._moddleExtensions={};var XA=["c","C"],ZA=["v","V"],QA=["y","Y"],__=["z","Z"];function JA(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function vr(e){return e.altKey?!1:e.ctrlKey||e.metaKey}function vn(e,t){return e=qe(e)?e:[e],e.indexOf(t.key)!==-1||e.indexOf(t.code)!==-1}function Uh(e){return e.shiftKey}function e2(e){return vr(e)&&vn(XA,e)}function t2(e){return vr(e)&&vn(ZA,e)}function n2(e){return vr(e)&&!Uh(e)&&vn(__,e)}function r2(e){return vr(e)&&(vn(QA,e)||vn(__,e)&&Uh(e))}var qu="keyboard.keydown",i2="keyboard.keyup",mg="input-handle-modified-keys",o2=1e3;function Pn(e,t){var n=this;this._config=e||{},this._eventBus=t,this._keydownHandler=this._keydownHandler.bind(this),this._keyupHandler=this._keyupHandler.bind(this),t.on("diagram.destroy",function(){n._fire("destroy"),n.unbind()}),t.on("diagram.init",function(){n._fire("init")}),t.on("attach",function(){e&&e.bindTo&&n.bind(e.bindTo)}),t.on("detach",function(){n.unbind()})}Pn.$inject=["config.keyboard","eventBus"];Pn.prototype._keydownHandler=function(e){this._keyHandler(e,qu)};Pn.prototype._keyupHandler=function(e){this._keyHandler(e,i2)};Pn.prototype._keyHandler=function(e,t){var n;if(!this._isEventIgnored(e)){var r={keyEvent:e};n=this._eventBus.fire(t||qu,r),n&&e.preventDefault()}};Pn.prototype._isEventIgnored=function(e){return e.defaultPrevented?!0:a2(e.target)&&this._isModifiedKeyIgnored(e)};Pn.prototype._isModifiedKeyIgnored=function(e){if(!vr(e))return!0;var t=this._getAllowedModifiers(e.target);return t.indexOf(e.key)===-1};Pn.prototype._getAllowedModifiers=function(e){var t=ki(e,"["+mg+"]",!0);return!t||this._node&&!this._node.contains(t)?[]:t.getAttribute(mg).split(",")};Pn.prototype.bind=function(e){this.unbind(),this._node=e,Ce.bind(e,"keydown",this._keydownHandler),Ce.bind(e,"keyup",this._keyupHandler),this._fire("bind")};Pn.prototype.getBinding=function(){return this._node};Pn.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),Ce.unbind(e,"keydown",this._keydownHandler),Ce.unbind(e,"keyup",this._keyupHandler)),this._node=null};Pn.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node})};Pn.prototype.addListener=function(e,t,n){Rn(e)&&(n=t,t=e,e=o2),this._eventBus.on(n||qu,e,t)};Pn.prototype.removeListener=function(e,t){this._eventBus.off(t||qu,e)};Pn.prototype.hasModifier=JA;Pn.prototype.isCmd=vr;Pn.prototype.isShift=Uh;Pn.prototype.isKey=vn;function a2(e){return e&&(Bs(e,"input, textarea")||e.contentEditable==="true")}var s2=500;function Ja(e,t){var n=this;e.on("editorActions.init",s2,function(r){var i=r.editorActions;n.registerBindings(t,i)})}Ja.$inject=["eventBus","keyboard"];Ja.prototype.registerBindings=function(e,t){function n(r,i){t.isRegistered(r)&&e.addListener(i)}n("undo",function(r){var i=r.keyEvent;if(n2(i))return t.trigger("undo"),!0}),n("redo",function(r){var i=r.keyEvent;if(r2(i))return t.trigger("redo"),!0}),n("copy",function(r){var i=r.keyEvent;if(e2(i))return t.trigger("copy"),!0}),n("paste",function(r){var i=r.keyEvent;if(t2(i))return t.trigger("paste"),!0}),n("stepZoom",function(r){var i=r.keyEvent;if(vn(["+","Add","="],i)&&vr(i))return t.trigger("stepZoom",{value:1}),!0}),n("stepZoom",function(r){var i=r.keyEvent;if(vn(["-","Subtract"],i)&&vr(i))return t.trigger("stepZoom",{value:-1}),!0}),n("zoom",function(r){var i=r.keyEvent;if(vn("0",i)&&vr(i))return t.trigger("zoom",{value:1}),!0}),n("removeSelection",function(r){var i=r.keyEvent;if(vn(["Backspace","Delete","Del"],i))return t.trigger("removeSelection"),!0})};const Gh={__init__:["keyboard","keyboardBindings"],keyboard:["type",Pn],keyboardBindings:["type",Ja]};var c2={moveSpeed:50,moveSpeedAccelerated:200};function x_(e,t,n){var r=this;this._config=W({},c2,e||{}),t.addListener(i);function i(o){var a=o.keyEvent,s=r._config;if(t.isCmd(a)&&t.isKey(["ArrowLeft","Left","ArrowUp","Up","ArrowDown","Down","ArrowRight","Right"],a)){var c=t.isShift(a)?s.moveSpeedAccelerated:s.moveSpeed,l;switch(a.key){case"ArrowLeft":case"Left":l="left";break;case"ArrowUp":case"Up":l="up";break;case"ArrowRight":case"Right":l="right";break;case"ArrowDown":case"Down":l="down";break}return r.moveCanvas({speed:c,direction:l}),!0}}this.moveCanvas=function(o){var a=0,s=0,c=o.speed,l=c/Math.min(Math.sqrt(n.viewbox().scale),1);switch(o.direction){case"left":a=l;break;case"up":s=l;break;case"right":a=-l;break;case"down":s=-l;break}n.scroll({dx:a,dy:s})}}x_.$inject=["config.keyboardMove","keyboard","canvas"];const w_={__depends__:[Gh],__init__:["keyboardMove"],keyboardMove:["type",x_]};var l2=/^djs-cursor-.*$/;function Yu(e){var t=At(document.body);t.removeMatching(l2),e&&t.add("djs-cursor-"+e)}function S_(){Yu(null)}var u2=5e3;function C_(e,t){t=t||"element.click";function n(){return!1}return e.once(t,u2,n),function(){e.off(t,n)}}function Ms(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function Gr(e,t){return{x:e.x-t.x,y:e.y-t.y}}var f2=15;function T_(e,t){var n;e.on("element.mousedown",500,function(a){return o(a.originalEvent)});function r(a){var s=n.start,c=n.button,l=lo(a),u=Gr(l,s);if(!n.dragging&&p2(u)>f2&&(n.dragging=!0,c===0&&C_(e),Yu("grab")),n.dragging){var f=n.last||n.start;u=Gr(l,f),t.scroll({dx:u.x,dy:u.y}),n.last=l}a.preventDefault()}function i(a){Ce.unbind(document,"mousemove",r),Ce.unbind(document,"mouseup",i),n=null,S_()}function o(a){if(!ki(a.target,".djs-draggable")){var s=a.button;if(!(s>=2||a.ctrlKey||a.shiftKey||a.altKey))return n={button:s,start:lo(a)},Ce.bind(document,"mousemove",r),Ce.bind(document,"mouseup",i),!0}}this.isActive=function(){return!!n}}T_.$inject=["eventBus","canvas"];function p2(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}const R_={__init__:["moveCanvas"],moveCanvas:["type",T_]};function ld(e){return Math.log(e)/Math.log(10)}function P_(e,t){var n=ld(e.min),r=ld(e.max),i=Math.abs(n)+Math.abs(r);return i/t}function d2(e,t){return Math.max(e.min,Math.min(e.max,t))}var h2=Math.sign||function(e){return e>=0?1:-1},qh={min:.2,max:4},A_=10,v2=.1,m2=.75;function hi(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=Vn(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||m2;var r=this;t.on("canvas.init",function(i){r._init(e.enabled!==!1)})}hi.$inject=["config.zoomScroll","eventBus","canvas"];hi.prototype.scroll=function(t){this._canvas.scroll(t)};hi.prototype.reset=function(){this._canvas.zoom("fit-viewport")};hi.prototype.zoom=function(t,n){var r=P_(qh,A_*2);this._totalDelta+=t,Math.abs(this._totalDelta)>v2&&(this._zoom(t,n,r),this._totalDelta=0)};hi.prototype._handleWheel=function(t){if(!ki(t.target,".djs-scrollable",!0)){var n=this._container;t.preventDefault();var r=t.ctrlKey||c_()&&t.metaKey,i=t.shiftKey,o=-1*this._scale,a;if(r?o*=t.deltaMode===0?.02:.32:o*=t.deltaMode===0?1:16,r){var s=n.getBoundingClientRect(),c={x:t.clientX-s.left,y:t.clientY-s.top};a=Math.sqrt(Math.pow(t.deltaY,2)+Math.pow(t.deltaX,2))*h2(t.deltaY)*o,this.zoom(a,c)}else i?a={dx:o*t.deltaY,dy:0}:a={dx:o*t.deltaX,dy:o*t.deltaY},this.scroll(a)}};hi.prototype.stepZoom=function(t,n){var r=P_(qh,A_);this._zoom(t,n,r)};hi.prototype._zoom=function(e,t,n){var r=this._canvas,i=e>0?1:-1,o=ld(r.zoom()),a=Math.round(o/n)*n;a+=n*i;var s=Math.pow(10,a);r.zoom(d2(qh,s),t)};hi.prototype.toggle=function(t){var n=this._container,r=this._handleWheel,i=this._enabled;return typeof t>"u"&&(t=!i),i!==t&&Ce[t?"bind":"unbind"](n,"wheel",r,!1),this._enabled=t,t};hi.prototype._init=function(e){this.toggle(e)};const O_={__init__:["zoomScroll"],zoomScroll:["type",hi]};function Ws(e){vo.call(this,e)}xe(Ws,vo);Ws.prototype._navigationModules=[w_,R_,O_];Ws.prototype._modules=[].concat(vo.prototype._modules,Ws.prototype._navigationModules);var M_={exports:{}};/*! Hammer.JS - v2.0.7 - 2016-04-22 * http://hammerjs.github.io/ * * Copyright (c) 2016 Jorik Tangelder; * Licensed under the MIT license */(function(e){(function(t,n,r,i){var o=["","webkit","Moz","MS","ms","o"],a=n.createElement("div"),s="function",c=Math.round,l=Math.abs,u=Date.now;function f(R,O,F){return setTimeout(y(R,F),O)}function p(R,O,F){return Array.isArray(R)?(d(R,F[O],F),!0):!1}function d(R,O,F){var X;if(R)if(R.forEach)R.forEach(O,F);else if(R.length!==i)for(X=0;X\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",Ze=t.console&&(t.console.warn||t.console.log);return Ze&&Ze.call(t.console,X,be),R.apply(this,arguments)}}var v;typeof Object.assign!="function"?v=function(O){if(O===i||O===null)throw new TypeError("Cannot convert undefined or null to object");for(var F=Object(O),X=1;X-1}function N(R){return R.trim().split(/\s+/g)}function L(R,O,F){if(R.indexOf&&!F)return R.indexOf(O);for(var X=0;Xdn[O]}):X=X.sort()),X}function K(R,O){for(var F,X,ne=O[0].toUpperCase()+O.slice(1),be=0;be1&&!F.firstMultiple?F.firstMultiple=Tt(O):ne===1&&(F.firstMultiple=!1);var be=F.firstInput,Ze=F.firstMultiple,Mt=Ze?Ze.center:be.center,Ut=O.center=zt(X);O.timeStamp=u(),O.deltaTime=O.timeStamp-be.timeStamp,O.angle=or(Mt,Ut),O.distance=kt(Mt,Ut),he(F,O),O.offsetDirection=qn(O.deltaX,O.deltaY);var dn=en(O.deltaTime,O.deltaX,O.deltaY);O.overallVelocityX=dn.x,O.overallVelocityY=dn.y,O.overallVelocity=l(dn.x)>l(dn.y)?dn.x:dn.y,O.scale=Ze?tn(Ze.pointers,X):1,O.rotation=Ze?Vt(Ze.pointers,X):0,O.maxPointers=F.prevInput?O.pointers.length>F.prevInput.maxPointers?O.pointers.length:F.prevInput.maxPointers:O.pointers.length,Xe(F,O);var Xn=R.element;M(O.srcEvent.target,Xn)&&(Xn=O.srcEvent.target),O.target=Xn}function he(R,O){var F=O.center,X=R.offsetDelta||{},ne=R.prevDelta||{},be=R.prevInput||{};(O.eventType===oe||be.eventType===me)&&(ne=R.prevDelta={x:be.deltaX||0,y:be.deltaY||0},X=R.offsetDelta={x:F.x,y:F.y}),O.deltaX=ne.x+(F.x-X.x),O.deltaY=ne.y+(F.y-X.y)}function Xe(R,O){var F=R.lastInterval||O,X=O.timeStamp-F.timeStamp,ne,be,Ze,Mt;if(O.eventType!=_e&&(X>ee||F.velocity===i)){var Ut=O.deltaX-F.deltaX,dn=O.deltaY-F.deltaY,Xn=en(X,Ut,dn);be=Xn.x,Ze=Xn.y,ne=l(Xn.x)>l(Xn.y)?Xn.x:Xn.y,Mt=qn(Ut,dn),R.lastInterval=O}else ne=F.velocity,be=F.velocityX,Ze=F.velocityY,Mt=F.direction;O.velocity=ne,O.velocityX=be,O.velocityY=Ze,O.direction=Mt}function Tt(R){for(var O=[],F=0;F=l(O)?R<0?rt:De:O<0?re:He}function kt(R,O,F){F||(F=Ee);var X=O[F[0]]-R[F[0]],ne=O[F[1]]-R[F[1]];return Math.sqrt(X*X+ne*ne)}function or(R,O,F){F||(F=Ee);var X=O[F[0]]-R[F[0]],ne=O[F[1]]-R[F[1]];return Math.atan2(ne,X)*180/Math.PI}function Vt(R,O){return or(O[1],O[0],pe)+or(R[1],R[0],pe)}function tn(R,O){return kt(O[0],O[1],pe)/kt(R[0],R[1],pe)}var Lt={mousedown:oe,mousemove:le,mouseup:me},En="mousedown",Yn="mousemove mouseup";function Ot(){this.evEl=En,this.evWin=Yn,this.pressed=!1,we.apply(this,arguments)}g(Ot,we,{handler:function(O){var F=Lt[O.type];F&oe&&O.button===0&&(this.pressed=!0),F&le&&O.which!==1&&(F=me),this.pressed&&(F&me&&(this.pressed=!1),this.callback(this.manager,F,{pointers:[O],changedPointers:[O],pointerType:$,srcEvent:O}))}});var Bt={pointerdown:oe,pointermove:le,pointerup:me,pointercancel:_e,pointerout:_e},fe={2:k,3:I,4:$,5:U},Oe="pointerdown",vt="pointermove pointerup pointercancel";t.MSPointerEvent&&!t.PointerEvent&&(Oe="MSPointerDown",vt="MSPointerMove MSPointerUp MSPointerCancel");function Re(){this.evEl=Oe,this.evWin=vt,we.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}g(Re,we,{handler:function(O){var F=this.store,X=!1,ne=O.type.toLowerCase().replace("ms",""),be=Bt[ne],Ze=fe[O.pointerType]||O.pointerType,Mt=Ze==k,Ut=L(F,O.pointerId,"pointerId");be&oe&&(O.button===0||Mt)?Ut<0&&(F.push(O),Ut=F.length-1):be&(me|_e)&&(X=!0),!(Ut<0)&&(F[Ut]=O,this.callback(this.manager,be,{pointers:F,changedPointers:[O],pointerType:Ze,srcEvent:O}),X&&F.splice(Ut,1))}});var Me={touchstart:oe,touchmove:le,touchend:me,touchcancel:_e},Rt="touchstart",wt="touchstart touchmove touchend touchcancel";function Bn(){this.evTarget=Rt,this.evWin=wt,this.started=!1,we.apply(this,arguments)}g(Bn,we,{handler:function(O){var F=Me[O.type];if(F===oe&&(this.started=!0),!!this.started){var X=ar.call(this,O,F);F&(me|_e)&&X[0].length-X[1].length===0&&(this.started=!1),this.callback(this.manager,F,{pointers:X[0],changedPointers:X[1],pointerType:k,srcEvent:O})}}});function ar(R,O){var F=B(R.touches),X=B(R.changedTouches);return O&(me|_e)&&(F=V(F.concat(X),"identifier",!0)),[F,X]}var sr={touchstart:oe,touchmove:le,touchend:me,touchcancel:_e},_n="touchstart touchmove touchend touchcancel";function Hn(){this.evTarget=_n,this.targetIds={},we.apply(this,arguments)}g(Hn,we,{handler:function(O){var F=sr[O.type],X=Lr.call(this,O,F);X&&this.callback(this.manager,F,{pointers:X[0],changedPointers:X[1],pointerType:k,srcEvent:O})}});function Lr(R,O){var F=B(R.touches),X=this.targetIds;if(O&(oe|le)&&F.length===1)return X[F[0].identifier]=!0,[F,F];var ne,be,Ze=B(R.changedTouches),Mt=[],Ut=this.target;if(be=F.filter(function(dn){return M(dn.target,Ut)}),O===oe)for(ne=0;ne-1&&X.splice(be,1)};setTimeout(ne,pn)}}function te(R){for(var O=R.srcEvent.clientX,F=R.srcEvent.clientY,X=0;X-1&&this.requireFail.splice(O,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(R){return!!this.simultaneous[R.id]},emit:function(R){var O=this,F=this.state;function X(ne){O.manager.emit(ne,R)}F=Ln&&X(O.options.event+jr(F))},tryEmit:function(R){if(this.canEmit())return this.emit(R);this.state=xn},canEmit:function(){for(var R=0;RO.threshold&&ne&O.direction},attrTest:function(R){return Sn.prototype.attrTest.call(this,R)&&(this.state&An||!(this.state&An)&&this.directionTest(R))},emit:function(R){this.pX=R.deltaX,this.pY=R.deltaY;var O=ni(R.direction);O&&(R.additionalEvent=this.options.event+O),this._super.emit.call(this,R)}});function To(){Sn.apply(this,arguments)}g(To,Sn,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Ve]},attrTest:function(R){return this._super.attrTest.call(this,R)&&(Math.abs(R.scale-1)>this.options.threshold||this.state&An)},emit:function(R){if(R.scale!==1){var O=R.scale<1?"in":"out";R.additionalEvent=this.options.event+O}this._super.emit.call(this,R)}});function Gi(){wn.apply(this,arguments),this._timer=null,this._input=null}g(Gi,wn,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ft]},process:function(R){var O=this.options,F=R.pointers.length===O.pointers,X=R.distanceO.time;if(this._input=R,!X||!F||R.eventType&(me|_e)&&!ne)this.reset();else if(R.eventType&oe)this.reset(),this._timer=f(function(){this.state=On,this.tryEmit()},O.time,this);else if(R.eventType&me)return On;return xn},reset:function(){clearTimeout(this._timer)},emit:function(R){this.state===On&&(R&&R.eventType&me?this.manager.emit(this.options.event+"up",R):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}});function Ro(){Sn.apply(this,arguments)}g(Ro,Sn,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Ve]},attrTest:function(R){return this._super.attrTest.call(this,R)&&(Math.abs(R.rotation)>this.options.threshold||this.state&An)}});function qi(){Sn.apply(this,arguments)}g(qi,Sn,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ye|ke,pointers:1},getTouchAction:function(){return Kn.prototype.getTouchAction.call(this)},attrTest:function(R){var O=this.options.direction,F;return O&(Ye|ke)?F=R.overallVelocity:O&Ye?F=R.overallVelocityX:O&ke&&(F=R.overallVelocityY),this._super.attrTest.call(this,R)&&O&R.offsetDirection&&R.distance>this.options.threshold&&R.maxPointers==this.options.pointers&&l(F)>this.options.velocity&&R.eventType&me},emit:function(R){var O=ni(R.offsetDirection);O&&this.manager.emit(this.options.event+O,R),this.manager.emit(this.options.event,R)}});function Yi(){wn.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}g(Yi,wn,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ze]},process:function(R){var O=this.options,F=R.pointers.length===O.pointers,X=R.distance1&&(s=!0),p.elements.length}),s)return o[e]=np(c).center,o;l=t[0],t=Yr(t,function(p){return p[r]+p[i]}),u=np(t),o[e]=f(l,u)}return o};es.prototype.trigger=function(e,t){var n=this._modeling,r,i=Ge(e,function(c){return!(c.waypoints||c.host||c.labelTarget)});if(r=this._rules.allowed("elements.align",{elements:i}),qe(r)&&(i=r),!(i.length<2||!r)){var o=x2[t],a=Yr(i,o),s=this._alignmentPosition(t,a);n.alignElements(a,s)}};const w2={__init__:["alignElements"],alignElements:["type",es]};var Eg=".entry",S2=1e3,_g=12;function Wn(e,t,n,r){this._canvas=e,this._eventBus=n,this._overlays=r;var i=ln(t&&t.scale)?t.scale:{min:1,max:1.5};this._overlaysConfig={scale:i},this._current=null,this._init()}Wn.$inject=["canvas","config.contextPad","eventBus","overlays"];Wn.prototype._init=function(){var e=this;this._eventBus.on("selection.changed",function(t){var n=t.newSelection,r=n.length?n.length===1?n[0]:n:null;r?e.open(r,!0):e.close()}),this._eventBus.on("elements.changed",function(t){var n=t.elements,r=e._current;if(r){var i=r.target,o=Ni(qe(i)?i:[i],function(a){return I_(n,a)});o&&e.open(i,!0)}})};Wn.prototype.registerProvider=function(e,t){t||(t=e,e=S2),this._eventBus.on("contextPad.getProviders",e,function(n){n.providers.push(t)})};Wn.prototype.getEntries=function(e){var t=this._getProviders(),n=qe(e)?"getMultiElementContextPadEntries":"getContextPadEntries",r={};return z(t,function(i){if(Rn(i[n])){var o=i[n](e);Rn(o)?r=o(r):z(o,function(a,s){r[s]=a})}}),r};Wn.prototype.trigger=function(e,t,n){var r,i,o=t.delegateTarget||t.target;return o?(r=Tn(o,"data-action"),i=t.originalEvent||t,this.triggerEntry(r,e,i,n)):t.preventDefault()};Wn.prototype.triggerEntry=function(e,t,n,r){if(this.isShown()){var i=this._current.target,o=this._current.entries,a=o[e];if(a){var s=a.action;if(this._eventBus.fire("contextPad.trigger",{entry:a,event:n})!==!1){if(Rn(s)){if(t==="click")return s(n,i,r)}else if(s[t])return s[t](n,i,r);n.preventDefault()}}}};Wn.prototype.open=function(e,t){!t&&this.isOpen(e)||(this.close(),this._updateAndOpen(e))};Wn.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"contextPad.getProviders",providers:[]});return this._eventBus.fire(e),e.providers};Wn.prototype._updateAndOpen=function(e){var t=this.getEntries(e),n=this.getPad(e),r=n.html,i;z(t,function(o,a){var s=o.group||"default",c=Ct(o.html||'
    '),l;Tn(c,"data-action",a),l=ht("[data-group="+Xo(s)+"]",r),l||(l=Ct('
    '),Tn(l,"data-group",s),r.appendChild(l)),l.appendChild(c),o.className&&C2(c,o.className),o.title&&Tn(c,"title",o.title),o.imageUrl&&(i=Ct(""),Tn(i,"src",o.imageUrl),i.style.width="100%",i.style.height="100%",c.appendChild(i))}),At(r).add("open"),this._current={target:e,entries:t,pad:n},this._eventBus.fire("contextPad.open",{current:this._current})};Wn.prototype.getPad=function(e){if(this.isOpen())return this._current.pad;var t=this,n=this._overlays,r=Ct('
    '),i=this._getPosition(e),o=W({html:r},this._overlaysConfig,i);Sr.bind(r,Eg,"click",function(c){t.trigger("click",c)}),Sr.bind(r,Eg,"dragstart",function(c){t.trigger("dragstart",c)}),Ce.bind(r,"mousedown",function(c){c.stopPropagation()});var a=this._canvas.getRootElement();this._overlayId=n.add(a,"context-pad",o);var s=n.get(this._overlayId);return this._eventBus.fire("contextPad.create",{target:e,pad:s}),s};Wn.prototype.close=function(){this.isOpen()&&(this._overlays.remove(this._overlayId),this._overlayId=null,this._eventBus.fire("contextPad.close",{current:this._current}),this._current=null)};Wn.prototype.isOpen=function(e){var t=this._current;if(!t)return!1;if(!e)return!0;var n=t.target;return qe(e)!==qe(n)?!1:qe(e)?e.length===n.length&&Jo(e,function(r){return I_(n,r)}):n===e};Wn.prototype.isShown=function(){return this.isOpen()&&this._overlays.isShown()};Wn.prototype._getPosition=function(e){var t=qe(e)?e:[e],n=Zt(t);return{position:{left:n.x+n.width+_g,top:n.y-_g/2}}};function C2(e,t){var n=At(e);t=qe(t)?t:t.split(/\s+/g),t.forEach(function(r){n.add(r)})}function I_(e,t){return e.indexOf(t)!==-1}const N_={__depends__:[dc,Gu],contextPad:["type",Wn]};var Ku,Je,k_,$o,xg,L_,fd,Da={},$_=[],T2=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Kh=Array.isArray;function to(e,t){for(var n in t)e[n]=t[n];return e}function j_(e){var t=e.parentNode;t&&t.removeChild(e)}function F_(e,t,n){var r,i,o,a={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?Ku.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return Bl(e,a,r,i,null)}function Bl(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++k_};return i==null&&Je.vnode!=null&&Je.vnode(o),o}function Xu(e){return e.children}function Hl(e,t){this.props=e,this.context=t}function Us(e,t){if(t==null)return e.__?Us(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&$o.sort(fd));su.__r=0}function H_(e,t,n,r,i,o,a,s,c,l,u){var f,p,d,h,v,m,_,g,y,b=0,x=r&&r.__k||$_,S=x.length,C=S,M=t.length;for(n.__k=[],f=0;f0?Bl(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)!=null?(h.__=n,h.__b=n.__b+1,(g=R2(h,x,_=f+b,C))===-1?d=Da:(d=x[g]||Da,x[g]=void 0,C--),Xh(e,h,d,i,o,a,s,c,l,u),v=h.__e,(p=h.ref)&&d.ref!=p&&(d.ref&&Zh(d.ref,null,h),u.push(p,h.__c||v,h)),v!=null&&(m==null&&(m=v),(y=d===Da||d.__v===null)?g==-1&&b--:g!==_&&(g===_+1?b++:g>_?C>M-_?b+=g-_:b--:b=g<_&&g==_-1?g-_:0),_=f+b,typeof h.type!="function"||g===_&&d.__k!==h.__k?typeof h.type=="function"||g===_&&!y?h.__d!==void 0?(c=h.__d,h.__d=void 0):c=v.nextSibling:c=V_(e,v,c):c=z_(h,c,e),typeof n.type=="function"&&(n.__d=c))):(d=x[f])&&d.key==null&&d.__e&&(d.__e==c&&(d.__=r,c=Us(d)),pd(d,d,!1),x[f]=null);for(n.__e=m,f=S;f--;)x[f]!=null&&(typeof n.type=="function"&&x[f].__e!=null&&x[f].__e==n.__d&&(n.__d=x[f].__e.nextSibling),pd(x[f],x[f]))}function z_(e,t,n){for(var r,i=e.__k,o=0;i&&o(c!=null?1:0))for(;a>=0||s=0){if((c=t[a])&&i==c.key&&o===c.type)return a;a--}if(s=5&&((a||!p&&o===5)&&(c.push(o,0,a,i),o=6),p&&(c.push(o,p,0,i),o=6)),a=""},u=0;u"?(o=1,a=""):a=r+a[0]:s?r===s?s="":a+=r:r==='"'||r==="'"?s=r:r===">"?(l(),o=1):o&&(r==="="?(o=5,i=a,a=""):r==="/"&&(o<5||n[u][f+1]===">")?(l(),o===3&&(c=c[0]),o=c,(c=c[0]).push(2,0,o),o=0):r===" "||r===" "||r===` `||r==="\r"?(l(),o=2):a+=r),o===3&&a==="!--"&&(o=4,c=c[0])}return l(),c}(e)),t),arguments,[])).length>1?t:t[0]}var cn=M2.bind(F_),ja,Kt,rp,Pg,Gs=0,q_=[],zl=[],Ag=Je.__b,Og=Je.__r,Mg=Je.diffed,Dg=Je.__c,Ig=Je.unmount;function Zu(e,t){Je.__h&&Je.__h(Kt,e,Gs||t),Gs=0;var n=Kt.__H||(Kt.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:zl}),n.__[e]}function ip(e){return Gs=1,D2(Y_,e)}function D2(e,t,n){var r=Zu(ja++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Y_(void 0,t),function(s){var c=r.__N?r.__N[0]:r.__[0],l=r.t(c,s);c!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=Kt,!Kt.u)){var i=function(s,c,l){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(p){return p.__c});if(u.every(function(p){return!p.__N}))return!o||o.call(this,s,c,l);var f=!1;return u.forEach(function(p){if(p.__N){var d=p.__[0];p.__=p.__N,p.__N=void 0,d!==p.__[0]&&(f=!0)}}),!(!f&&r.__c.props===s)&&(!o||o.call(this,s,c,l))};Kt.u=!0;var o=Kt.shouldComponentUpdate,a=Kt.componentWillUpdate;Kt.componentWillUpdate=function(s,c,l){if(this.__e){var u=o;o=void 0,i(s,c,l),o=u}a&&a.call(this,s,c,l)},Kt.shouldComponentUpdate=i}return r.__N||r.__}function op(e,t){var n=Zu(ja++,3);!Je.__s&&Jh(n.__H,t)&&(n.__=e,n.i=t,Kt.__H.__h.push(n))}function lu(e,t){var n=Zu(ja++,4);!Je.__s&&Jh(n.__H,t)&&(n.__=e,n.i=t,Kt.__h.push(n))}function Qh(e){return Gs=5,qs(function(){return{current:e}},[])}function qs(e,t){var n=Zu(ja++,7);return Jh(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Ca(e,t){return Gs=8,qs(function(){return e},t)}function I2(){for(var e;e=q_.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Vl),e.__H.__h.forEach(dd),e.__H.__h=[]}catch(t){e.__H.__h=[],Je.__e(t,e.__v)}}Je.__b=function(e){Kt=null,Ag&&Ag(e)},Je.__r=function(e){Og&&Og(e),ja=0;var t=(Kt=e.__c).__H;t&&(rp===Kt?(t.__h=[],Kt.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=zl,n.__N=n.i=void 0})):(t.__h.forEach(Vl),t.__h.forEach(dd),t.__h=[],ja=0)),rp=Kt},Je.diffed=function(e){Mg&&Mg(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(q_.push(t)!==1&&Pg===Je.requestAnimationFrame||((Pg=Je.requestAnimationFrame)||N2)(I2)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==zl&&(n.__=n.__V),n.i=void 0,n.__V=zl})),rp=Kt=null},Je.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Vl),n.__h=n.__h.filter(function(r){return!r.__||dd(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],Je.__e(r,n.__v)}}),Dg&&Dg(e,t)},Je.unmount=function(e){Ig&&Ig(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Vl(r)}catch(i){t=i}}),n.__H=void 0,t&&Je.__e(t,n.__v))};var Ng=typeof requestAnimationFrame=="function";function N2(e){var t,n=function(){clearTimeout(r),Ng&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Ng&&(t=requestAnimationFrame(n))}function Vl(e){var t=Kt,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Kt=t}function dd(e){var t=Kt;e.__c=e.__(),Kt=t}function Jh(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Y_(e,t){return typeof t=="function"?t(e):t}function K_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;to(a,t,"dragstart")} draggable=${!0} >
    ${t.imageUrl&&cn``||t.imageHtml&&cn`
    `} ${t.label?cn` ${t.label} `:null} ${t.description&&cn` ${t.description} `}
    ${t.documentationRef&&cn`
    a.stopPropagation()} title="Open element documentation" target="_blank" rel="noopener" >
    `} `}function L2(e){const{selectedEntry:t,setSelectedEntry:n,entries:r,...i}=e,o=Qh(),a=qs(()=>$2(r),[r]);return lu(()=>{const s=o.current;if(!s)return;const c=s.querySelector(".selected");c&&j2(c)},[t]),cn`
    ${a.map(s=>cn` ${s.name&&cn`
    ${s.name}
    `}
      ${s.entries.map(c=>cn` <${k2} key=${c.id} entry=${c} selected=${c===t} onMouseEnter=${()=>n(c)} onMouseLeave=${()=>n(null)} ...${i} /> `)}
    `)}
    `}function $2(e){const t=[],n=o=>t.find(a=>o.id===a.id),r=o=>!!n(o),i=o=>typeof o=="string"?{id:o}:o;return e.forEach(o=>{const a=o.group?i(o.group):{id:"default"};r(a)?n(a).entries.push(o):t.push({...a,entries:[o]})}),t}function j2(e){typeof e.scrollIntoViewIfNeeded=="function"?e.scrollIntoViewIfNeeded():e.scrollIntoView({scrollMode:"if-needed",block:"nearest"})}function F2(e){const{onClose:t,onSelect:n,className:r,headerEntries:i,position:o,title:a,width:s,scale:c,search:l,entries:u,onOpened:f,onClosed:p}=e,d=qs(()=>ln(l)?u.length>5:!1,[l,u]),h=Qh(),[v,m]=ip(""),_=Ca((L,B)=>{if(!d)return L;const V=K=>{if(!B)return(K.rank||0)>=0;const Q=[K.description||"",K.label||"",K.search||""].join("---").toLowerCase();return B.toLowerCase().split(/\s/g).every(G=>Q.includes(G))};return L.filter(V)},[d]),[g,y]=ip(_(u,v)),[b,x]=ip(g[0]),S=Ca(L=>{(!b||!L.includes(b))&&x(L[0]),y(L)},[b,y,x]);op(()=>{S(_(u,v))},[v,u]),op(()=>{const L=B=>{if(B.key==="Escape")return B.preventDefault(),t()};return document.documentElement.addEventListener("keydown",L),()=>{document.documentElement.removeEventListener("keydown",L)}},[]),lu(()=>{h.current&&h.current.focus()},[]);const C=Ca(L=>{let V=g.indexOf(b)+L;V<0&&(V=g.length-1),V>=g.length&&(V=0),x(g[V])},[g,b,x]),M=Ca(L=>{if(L.key==="Enter"&&b)return n(L,b);if(L.key==="ArrowUp"||L.key==="Tab"&&L.shiftKey)return C(-1),L.preventDefault();if(L.key==="ArrowDown"||L.key==="Tab")return C(1),L.preventDefault()},[n,t,b,C]),A=Ca(L=>{Bs(L.target,"input")&&m(()=>L.target.value)},[m]);op(()=>(f(),()=>{p()}),[]);const N=qs(()=>a||i.length>0,[a,i]);return cn` <${kg} onClose=${t} onKeyup=${A} onKeydown=${M} className=${r} position=${o} width=${s} scale=${c} > ${N&&cn`

    ${a}

    ${i.map(L=>cn` n(B,L)} title=${L.title||L.label} data-id=${L.id} onMouseEnter=${()=>x(L)} onMouseLeave=${()=>x(null)} > ${L.imageUrl?cn` `:null} ${L.label?cn` ${L.label} `:null} `)}
    `} ${u.length>0&&cn`
    ${d&&cn` `} <${L2} entries=${g} selectedEntry=${b} setSelectedEntry=${x} onAction=${n} />
    ${g.length===0&&cn`
    No matching entries found.
    `} `} `}function kg(e){const{onClose:t,onKeydown:n,onKeyup:r,className:i,children:o,position:a}=e,s=Qh(),c=Ca(l=>{ki(l.target,".djs-popup",!0)||t()},[t]);return lu(()=>{if(typeof a!="function")return;const l=s.current,u=a(l);l.style.left=`${u.x}px`,l.style.top=`${u.y}px`},[s.current,a]),lu(()=>{s.current&&s.current.focus()},[]),cn`
    ${o}
    `}function B2(e){return{transform:`scale(${e.scale})`,width:`${e.width}px`}}function H2(e,t){return uu("entry",e.className,e.active?"active":"",e.disabled?"disabled":"",t?"selected":"")}var z2="data-id",X_=["contextPad.close","canvas.viewbox.changing","commandStack.changed"],V2=1e3;function Ht(e,t,n){this._eventBus=t,this._canvas=n,this._current=null;var r=ln(e&&e.scale)?e.scale:{min:1,max:1.5};this._config={scale:r},t.on("diagram.destroy",()=>{this.close()}),t.on("element.changed",i=>{const o=this.isOpen()&&this._current.target;i.element===o&&this._render()})}Ht.$inject=["config.popupMenu","eventBus","canvas"];Ht.prototype._render=function(){const{position:e,className:t,entries:n,headerEntries:r,options:i}=this._current,o=Object.entries(n).map(([f,p])=>({id:f,...p})),a=Object.entries(r).map(([f,p])=>({id:f,...p})),s=e&&(f=>this._ensureVisible(f,e)),c=this._updateScale(this._current.container);U_(cn` <${F2} onClose=${f=>this.close(f)} onSelect=${(f,p,d)=>this.trigger(f,p,d)} position=${s} className=${t} entries=${o} headerEntries=${a} scale=${c} onOpened=${this._onOpened.bind(this)} onClosed=${this._onClosed.bind(this)} ...${{...i}} /> `,this._current.container)};Ht.prototype.open=function(e,t,n,r){if(!e)throw new Error("target is missing");if(!t)throw new Error("providers for <"+t+"> not found");if(!n)throw new Error("position is missing");this.isOpen()&&this.close();const{entries:i,headerEntries:o}=this._getContext(e,t);this._current={position:n,className:t,target:e,entries:i,headerEntries:o,container:this._createContainer({provider:t}),options:r},this._emit("open"),this._bindAutoClose(),this._render()};Ht.prototype._getContext=function(e,t){const n=this._getProviders(t);if(!n||!n.length)throw new Error("provider for <"+t+"> not found");const r=this._getEntries(e,n),i=this._getHeaderEntries(e,n);return{entries:r,headerEntries:i,empty:!(Object.keys(r).length||Object.keys(i).length)}};Ht.prototype.close=function(){this.isOpen()&&(this._emit("close"),this.reset(),this._current=null)};Ht.prototype.reset=function(){const e=this._current.container;U_(null,e),fi(e)};Ht.prototype._emit=function(e,t){this._eventBus.fire(`popupMenu.${e}`,t)};Ht.prototype._onOpened=function(){this._emit("opened")};Ht.prototype._onClosed=function(){this._emit("closed")};Ht.prototype._createContainer=function(e){var t=this._canvas,n=t.getContainer();const r=Ct(`
    `);return n.appendChild(r),r};Ht.prototype._bindAutoClose=function(){this._eventBus.once(X_,this.close,this)};Ht.prototype._unbindAutoClose=function(){this._eventBus.off(X_,this.close,this)};Ht.prototype._updateScale=function(){var e=this._canvas.zoom(),t=this._config.scale,n,r,i=e;return t!==!0&&(t===!1?(n=1,r=1):(n=t.min,r=t.max),ln(n)&&er&&(i=r)),i};Ht.prototype._ensureVisible=function(e,t){var n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect(),i={},o=t.x,a=t.y;return t.x+r.width>n.width&&(i.x=!0),t.y+r.height>n.height&&(i.y=!0),i.x&&i.y?(o=t.x-r.width,a=t.y-r.height):i.x?(o=t.x-r.width,a=t.y):i.y&&t.y `,bottom:` `,center:` `,left:` `,right:` `,top:` `,middle:` `};const Z_=W2;var U2=900;function ts(e,t,n,r){e.registerProvider(U2,this),this._contextPad=e,this._popupMenu=t,this._translate=n,this._canvas=r}ts.$inject=["contextPad","popupMenu","translate","canvas"];ts.prototype.getMultiElementContextPadEntries=function(e){var t={};return this._isAllowed(e)&&W(t,this._getEntries(e)),t};ts.prototype._isAllowed=function(e){return!this._popupMenu.isEmpty(e,"align-elements")};ts.prototype._getEntries=function(){var e=this;return{"align-elements":{group:"align-elements",title:e._translate("Align elements"),html:`
    ${Z_.align}
    `,action:{click:function(t,n){var r=e._getMenuPosition(n);W(r,{cursor:{x:t.x,y:t.y}}),e._popupMenu.open(n,"align-elements",r)}}}}};ts.prototype._getMenuPosition=function(e){var t=5,n=this._contextPad.getPad(e).html,r=n.getBoundingClientRect(),i={x:r.left,y:r.bottom+t};return i};var G2=["left","center","right","top","middle","bottom"];function hc(e,t,n,r){this._alignElements=t,this._translate=n,this._popupMenu=e,this._rules=r,e.registerProvider("align-elements",this)}hc.$inject=["popupMenu","alignElements","translate","rules"];hc.prototype.getPopupMenuEntries=function(e){var t={};return this._isAllowed(e)&&W(t,this._getEntries(e)),t};hc.prototype._isAllowed=function(e){return this._rules.allowed("elements.align",{elements:e})};hc.prototype._getEntries=function(e){var t=this._alignElements,n=this._translate,r=this._popupMenu,i={};return z(G2,function(o){i["align-elements-"+o]={group:"align",title:n("Align elements "+o),className:"bjs-align-elements-menu-entry",imageHtml:Z_[o],action:function(){t.trigger(e,o),r.close()}}}),i};function Ar(e){ae.call(this,e),this.init()}Ar.$inject=["eventBus"];xe(Ar,ae);Ar.prototype.addRule=function(e,t,n){var r=this;typeof e=="string"&&(e=[e]),e.forEach(function(i){r.canExecute(i,t,function(o,a,s){return n(o)},!0)})};Ar.prototype.init=function(){};function Qu(e){Ar.call(this,e)}Qu.$inject=["eventBus"];xe(Qu,Ar);Qu.prototype.init=function(){this.addRule("elements.align",function(e){var t=e.elements,n=Ge(t,function(r){return!(r.waypoints||r.host||r.labelTarget)});return n=Iu(n),n.length<2?!1:n})};const q2={__depends__:[w2,N_,ev],__init__:["alignElementsContextPadProvider","alignElementsMenuProvider","bpmnAlignElements"],alignElementsContextPadProvider:["type",ts],alignElementsMenuProvider:["type",hc],bpmnAlignElements:["type",Qu]};var Y2=10,Q_=50,K2=250;function tv(e,t,n,r){for(var i;i=X2(e,n,t);)n=r(t,n,i);return n}function nv(e){return function(t,n,r){var i={x:n.x,y:n.y};return["x","y"].forEach(function(o){var a=e[o];if(a){var s=o==="x"?"width":"height",c=a.margin,l=a.minDistance;c<0?i[o]=Math.min(r[o]+c-t[s]/2,n[o]-l+c):i[o]=Math.max(r[o]+r[s]+c+t[s]/2,n[o]+l+c)}}),i}}function X2(e,t,n){var r={x:t.x-n.width/2,y:t.y-n.height/2,width:n.width,height:n.height},i=Q2(e);return st(i,function(o){if(o===n)return!1;var a=In(o,r,Y2);return a==="intersect"})}function Z2(e,t){t||(t={});function n(h){return h.source===e?1:-1}var r=t.defaultDistance||Q_,i=t.direction||"e",o=t.filter,a=t.getWeight||n,s=t.maxDistance||K2,c=t.reference||"start";o||(o=tO);function l(h,v){return i==="n"?c==="start"?Ae(h).top-Ae(v).bottom:c==="center"?Ae(h).top-$e(v).y:Ae(h).top-Ae(v).top:i==="w"?c==="start"?Ae(h).left-Ae(v).right:c==="center"?Ae(h).left-$e(v).x:Ae(h).left-Ae(v).left:i==="s"?c==="start"?Ae(v).top-Ae(h).bottom:c==="center"?$e(v).y-Ae(h).bottom:Ae(v).bottom-Ae(h).bottom:c==="start"?Ae(v).left-Ae(h).right:c==="center"?$e(v).x-Ae(h).right:Ae(v).right-Ae(h).right}var u=e.incoming.filter(o).map(function(h){var v=a(h),m=v<0?l(h.source,e):l(e,h.source);return{id:h.source.id,distance:m,weight:v}}),f=e.outgoing.filter(o).map(function(h){var v=a(h),m=v>0?l(e,h.target):l(h.target,e);return{id:h.target.id,distance:m,weight:v}}),p=u.concat(f).reduce(function(h,v){return h[v.id+"__weight_"+v.weight]=v,h},{}),d=nr(p,function(h,v){var m=v.distance,_=v.weight;return m<0||m>s||(h[String(m)]||(h[String(m)]=0),h[String(m)]+=1*_,(!h.distance||h[h.distance]t.top&&(n=n.concat("n")),e.rightt.left&&(n=n.concat("e")),n}function Ju(e){e.invoke(Bi,this)}Ju.$inject=["injector"];xe(Ju,Bi);Ju.prototype.resize=function(e,t,n){w(e,"bpmn:Participant")?this._modeling.resizeLane(e,t,null,n):this._modeling.resizeShape(e,t,null,n)};function vc(e){Ar.call(this,e);var t=this;this.addRule("element.autoResize",function(n){return t.canResize(n.elements,n.target)})}vc.$inject=["eventBus"];xe(vc,Ar);vc.prototype.canResize=function(e,t){return!1};function ef(e,t){vc.call(this,e),this._modeling=t}xe(ef,vc);ef.$inject=["eventBus","modeling"];ef.prototype.canResize=function(e,t){if(w(t.di,"bpmndi:BPMNPlane")||!w(t,"bpmn:Participant")&&!w(t,"bpmn:Lane")&&!w(t,"bpmn:SubProcess"))return!1;var n=!0;return z(e,function(r){if(w(r,"bpmn:Lane")||ut(r)){n=!1;return}}),n};const fO={__init__:["bpmnAutoResize","bpmnAutoResizeProvider"],bpmnAutoResize:["type",Ju],bpmnAutoResizeProvider:["type",ef]};var Lg=1500;function ix(e,t,n){var r=this,i=n.get("dragging",!1);function o(a){if(!a.hover){var s=a.originalEvent,c=r._findTargetGfx(s),l=c&&e.get(c);c&&l&&(a.stopPropagation(),i.hover({element:l,gfx:c}),i.move(s))}}i&&t.on("drag.start",function(a){t.once("drag.move",Lg,function(s){o(s)})}),function(){var a,s;t.on("element.hover",function(c){a=c.gfx,s=c.element}),t.on("element.hover",Lg,function(c){s&&t.fire("element.out",{element:s,gfx:a})}),t.on("element.out",function(){a=null,s=null})}(),this._findTargetGfx=function(a){var s,c;if(a instanceof MouseEvent)return s=lo(a),c=document.elementFromPoint(s.x,s.y),pO(c)}}ix.$inject=["elementRegistry","eventBus","injector"];function pO(e){return ki(e,"svg, .djs-element",!0)}const dO={__init__:["hoverFix"],hoverFix:["type",ix]};var va=Math.round,$g="djs-drag-active";function Do(e){e.preventDefault()}function hO(e){return typeof TouchEvent<"u"&&e instanceof TouchEvent}function vO(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}function ox(e,t,n,r){var i={threshold:5,trapClick:!0},o;function a(y){var b=t.viewbox(),x=t._container.getBoundingClientRect();return{x:b.x+(y.x-x.left)/b.scale,y:b.y+(y.y-x.top)/b.scale}}function s(y,b){b=b||o;var x=e.createEvent(W({},b.payload,b.data,{isTouch:b.isTouch}));return e.fire("drag."+y,x)===!1?!1:e.fire(b.prefix+"."+y,x)}function c(y){var b=y.filter(function(x){return r.get(x.id)});b.length&&n.select(b)}function l(y,b){var x=o.payload,S=o.displacement,C=o.globalStart,M=lo(y),A=Gr(M,C),N=o.localStart,L=a(M),B=Gr(L,N);if(!o.active&&(b||vO(A)>o.threshold)){if(W(x,{x:va(N.x+S.x),y:va(N.y+S.y),dx:0,dy:0},{originalEvent:y}),s("start")===!1)return m();o.active=!0,o.keepSelection||(x.previousSelection=n.get(),n.select(null)),o.cursor&&Yu(o.cursor),t.addMarker(t.getRootElement(),$g)}Jf(y),o.active&&(W(x,{x:va(L.x+S.x),y:va(L.y+S.y),dx:va(B.x),dy:va(B.y)},{originalEvent:y}),s("move"))}function u(y){var b,x=!0;o.active&&(y&&(o.payload.originalEvent=y,Jf(y)),x=s("end")),x===!1&&s("rejected"),b=_(x!==!0),s("ended",b)}function f(y){vn("Escape",y)&&(Do(y),m())}function p(y){var b;o.active&&(b=C_(e),setTimeout(b,400),Do(y)),u(y)}function d(y){l(y)}function h(y){var b=o.payload;b.hoverGfx=y.gfx,b.hover=y.element,s("hover")}function v(y){s("out");var b=o.payload;b.hoverGfx=null,b.hover=null}function m(y){var b;if(o){var x=o.active;x&&s("cancel"),b=_(y),x&&s("canceled",b)}}function _(y){var b,x;s("cleanup"),S_(),o.trapClick?x=p:x=u,Ce.unbind(document,"mousemove",l),Ce.unbind(document,"dragstart",Do),Ce.unbind(document,"selectstart",Do),Ce.unbind(document,"mousedown",x,!0),Ce.unbind(document,"mouseup",x,!0),Ce.unbind(document,"keyup",f),Ce.unbind(document,"touchstart",d,!0),Ce.unbind(document,"touchcancel",m,!0),Ce.unbind(document,"touchmove",l,!0),Ce.unbind(document,"touchend",u,!0),e.off("element.hover",h),e.off("element.out",v),t.removeMarker(t.getRootElement(),$g);var S=o.payload.previousSelection;return y!==!1&&S&&!n.get().length&&c(S),b=o,o=null,b}function g(y,b,x,S){o&&m(!1),typeof b=="string"&&(S=x,x=b,b=null),S=W({},i,S||{});var C=S.data||{},M,A,N,L,B;S.trapClick?L=p:L=u,y?(M=Za(y)||y,A=lo(y),Jf(y),M.type==="dragstart"&&Do(M)):(M=null,A={x:0,y:0}),N=a(A),b||(b=N),B=hO(M),o=W({prefix:x,data:C,payload:{},globalStart:A,displacement:Gr(b,N),localStart:N,isTouch:B},S),S.manual||(B?(Ce.bind(document,"touchstart",d,!0),Ce.bind(document,"touchcancel",m,!0),Ce.bind(document,"touchmove",l,!0),Ce.bind(document,"touchend",u,!0)):(Ce.bind(document,"mousemove",l),Ce.bind(document,"dragstart",Do),Ce.bind(document,"selectstart",Do),Ce.bind(document,"mousedown",L,!0),Ce.bind(document,"mouseup",L,!0)),Ce.bind(document,"keyup",f),e.on("element.hover",h),e.on("element.out",v)),s("init"),S.autoActivate&&l(y,!0)}e.on("diagram.destroy",m),this.init=g,this.move=l,this.hover=h,this.out=v,this.end=u,this.cancel=m,this.context=function(){return o},this.setOptions=function(y){W(i,y)}}ox.$inject=["eventBus","canvas","selection","elementRegistry"];const Hi={__depends__:[dO,di],dragging:["type",ox]};function ns(e,t,n){this._canvas=n,this._opts=W({scrollThresholdIn:[20,20,20,20],scrollThresholdOut:[0,0,0,0],scrollRepeatTimeout:15,scrollStep:10},e);var r=this;t.on("drag.move",function(i){var o=r._toBorderPoint(i);r.startScroll(o)}),t.on(["drag.cleanup"],function(){r.stopScroll()})}ns.$inject=["config.autoScroll","eventBus","canvas"];ns.prototype.startScroll=function(e){var t=this._canvas,n=this._opts,r=this,i=t.getContainer().getBoundingClientRect(),o=[e.x,e.y,i.width-e.x,i.height-e.y];this.stopScroll();for(var a=0,s=0,c=0;c<4;c++)mO(o[c],n.scrollThresholdOut[c],n.scrollThresholdIn[c])&&(c===0?a=n.scrollStep:c==1?s=n.scrollStep:c==2?a=-n.scrollStep:c==3&&(s=-n.scrollStep));(a!==0||s!==0)&&(t.scroll({dx:a,dy:s}),this._scrolling=setTimeout(function(){r.startScroll(e)},n.scrollRepeatTimeout))};function mO(e,t,n){return tS-3&&(A=In(d.target,x),v===S-2?A==="intersect"&&(y.pop(),y[y.length-1]=x):A!=="intersect"&&y.push(_)),p.newWaypoints=d.waypoints=s(d,y),l(p,C,f),p.newSegmentStartIndex=h+C,c(f)}),t.on("connectionSegment.move.hover",function(f){f.context.hover=f.hover,n.addMarker(f.hover,Ug)}),t.on(["connectionSegment.move.out","connectionSegment.move.cleanup"],function(f){var p=f.context.hover;p&&n.removeMarker(p,Ug)}),t.on("connectionSegment.move.cleanup",function(f){var p=f.context,d=p.connection;p.draggerGfx&&jt(p.draggerGfx),n.removeMarker(d,Gg)}),t.on(["connectionSegment.move.cancel","connectionSegment.move.end"],function(f){var p=f.context,d=p.connection;d.waypoints=p.originalWaypoints,c(f)}),t.on("connectionSegment.move.end",function(f){var p=f.context,d=p.connection,h=p.newWaypoints,v=p.newSegmentStartIndex;h=h.map(function(x){return{original:x.original,x:Math.round(x.x),y:Math.round(x.y)}});var m=u(h,v),_=m.waypoints,g=s(d,_),y=m.segmentOffset,b={segmentMove:{segmentStartIndex:p.segmentStartIndex,newSegmentStartIndex:v+y}};o.updateWaypoints(d,g,b)})}vx.$inject=["injector","eventBus","canvas","dragging","graphicsFactory","modeling"];var NO=Math.abs,Kg=Math.round;function kO(e,t,n){n=n===void 0?10:n;var r,i;for(r=0;ro-sp)return a-c+o}return a}function n(o,a){if(o.waypoints)return RO(a,o);if(o.width)return{x:Xg(o.width/2+o.x),y:Xg(o.height/2+o.y)}}function r(o){var a=o.context,s=a.snapPoints,c=a.connection,l=c.waypoints,u=a.segmentStart,f=a.segmentStartIndex,p=a.segmentEnd,d=a.segmentEndIndex,h=a.axis;if(s)return s;var v=[l[f-1],u,p,l[d+1]];return f<2&&v.unshift(n(c.source,o)),d>l.length-3&&v.unshift(n(c.target,o)),a.snapPoints=s={horizontal:[],vertical:[]},z(v,function(m){m&&(m=m.original||m,h==="y"&&s.horizontal.push(m.y),h==="x"&&s.vertical.push(m.x))}),s}e.on("connectionSegment.move.move",1500,function(o){var a=r(o),s=o.x,c=o.y,l,u;if(a){l=t(a.vertical,s),u=t(a.horizontal,c);var f=s-l,p=c-u;W(o,{dx:o.dx-f,dy:o.dy-p,x:l,y:u}),(f||a.vertical.indexOf(s)!==-1)&&Xt(o,"x",l),(p||a.horizontal.indexOf(c)!==-1)&&Xt(o,"y",u)}});function i(o){var a=o.snapPoints,s=o.connection.waypoints,c=o.bendpointIndex;if(a)return a;var l=[s[c-1],s[c+1]];return o.snapPoints=a={horizontal:[],vertical:[]},z(l,function(u){u&&(u=u.original||u,a.horizontal.push(u.y),a.vertical.push(u.x))}),a}e.on(["connect.hover","connect.move","connect.end"],1500,function(o){var a=o.context,s=a.hover,c=s&&n(s,o);!Pt(s)||!c||!c.x||!c.y||(Xt(o,"x",c.x),Xt(o,"y",c.y))}),e.on(["bendpoint.move.move","bendpoint.move.end"],1500,function(o){var a=o.context,s=i(a),c=a.hover,l=c&&n(c,o),u=o.x,f=o.y,p,d;if(s){p=t(l?s.vertical.concat([l.x]):s.vertical,u),d=t(l?s.horizontal.concat([l.y]):s.horizontal,f);var h=u-p,v=f-d;W(o,{dx:o.dx-h,dy:o.dy-v,x:o.x-h,y:o.y-v}),(h||s.vertical.indexOf(u)!==-1)&&Xt(o,"x",p),(v||s.horizontal.indexOf(f)!==-1)&&Xt(o,"y",d)}})}bx.$inject=["eventBus"];const $O={__depends__:[Hi,vi],__init__:["bendpoints","bendpointSnapping","bendpointMovePreview"],bendpoints:["type",px],bendpointMove:["type",ov],bendpointMovePreview:["type",dx],connectionSegmentMove:["type",vx],bendpointSnapping:["type",bx]};function Ex(e,t,n,r){function i(a,s){return r.allowed("connection.create",{source:a,target:s})}function o(a,s){return i(s,a)}e.on("connect.hover",function(a){var s=a.context,c=s.start,l=a.hover,u;if(s.hover=l,u=s.canExecute=i(c,l),!Kp(u)){if(u!==!1){s.source=c,s.target=l;return}u=s.canExecute=o(c,l),!Kp(u)&&u!==!1&&(s.source=l,s.target=c)}}),e.on(["connect.out","connect.cleanup"],function(a){var s=a.context;s.hover=null,s.source=null,s.target=null,s.canExecute=!1}),e.on("connect.end",function(a){var s=a.context,c=s.canExecute,l=s.connectionStart,u={x:a.x,y:a.y},f=s.source,p=s.target;if(!c)return!1;var d=null,h={connectionStart:yd(s)?u:l,connectionEnd:yd(s)?l:u};fn(c)&&(d=c),s.connection=n.connect(f,p,d,h)}),this.start=function(a,s,c,l){fn(c)||(l=c,c=$e(s)),t.init(a,"connect",{autoActivate:l,data:{shape:s,context:{start:s,connectionStart:c}}})}}Ex.$inject=["eventBus","dragging","modeling","rules"];function yd(e){var t=e.hover,n=e.source,r=e.target;return t&&n&&t===n&&n!==r}var jO=1100,FO=900,Zg="connect-ok",Qg="connect-not-ok";function _x(e,t,n){var r=e.get("connectionPreview",!1);r&&t.on("connect.move",function(i){var o=i.context,a=o.canExecute,s=o.hover,c=o.source,l=o.start,u=o.startPosition,f=o.target,p=o.connectionStart||u,d=o.connectionEnd||{x:i.x,y:i.y},h=p,v=d;yd(o)&&(h=d,v=p),r.drawPreview(o,a,{source:c||l,target:f||s,connectionStart:h,connectionEnd:v})}),t.on("connect.hover",FO,function(i){var o=i.context,a=i.hover,s=o.canExecute;s!==null&&n.addMarker(a,s?Zg:Qg)}),t.on(["connect.out","connect.cleanup"],jO,function(i){var o=i.hover;o&&(n.removeMarker(o,Zg),n.removeMarker(o,Qg))}),r&&t.on("connect.cleanup",function(i){r.cleanUp(i.context)})}_x.$inject=["injector","eventBus","canvas"];const sv={__depends__:[di,vi,Hi],__init__:["connectPreview"],connect:["type",Ex],connectPreview:["type",_x]};var BO="djs-connection-preview";function zi(e,t,n,r){this._canvas=t,this._graphicsFactory=n,this._elementFactory=r,this._connectionDocking=e.get("connectionDocking",!1),this._layouter=e.get("layouter",!1)}zi.$inject=["injector","canvas","graphicsFactory","elementFactory"];zi.prototype.drawPreview=function(e,t,n){n=n||{};var r=e.connectionPreviewGfx,i=e.getConnection,o=n.source,a=n.target,s=n.waypoints,c=n.connectionStart,l=n.connectionEnd,u=n.noLayout,f=n.noCropping,p=n.noNoop,d,h=this;if(r||(r=e.connectionPreviewGfx=this.createConnectionPreviewGfx()),ic(r),i||(i=e.getConnection=HO(function(v,m,_){return h.getConnection(v,m,_)})),t&&(d=i(t,o,a)),!d){!p&&this.drawNoopPreview(r,n);return}d.waypoints=s||[],this._layouter&&!u&&(d.waypoints=this._layouter.layoutConnection(d,{source:o,target:a,connectionStart:c,connectionEnd:l,waypoints:n.waypoints||d.waypoints})),(!d.waypoints||!d.waypoints.length)&&(d.waypoints=[o?$e(o):c,a?$e(a):l]),this._connectionDocking&&(o||a)&&!f&&(d.waypoints=this._connectionDocking.getCroppedWaypoints(d,o,a)),this._graphicsFactory.drawConnection(r,d)};zi.prototype.drawNoopPreview=function(e,t){var n=t.source,r=t.target,i=t.connectionStart||$e(n),o=t.connectionEnd||$e(r),a=this.cropWaypoints(i,o,n,r),s=this.createNoopConnection(a[0],a[1]);Ie(e,s)};zi.prototype.cropWaypoints=function(e,t,n,r){var i=this._graphicsFactory,o=n&&i.getShapePath(n),a=r&&i.getShapePath(r),s=i.getConnectionPath({waypoints:[e,t]});return e=n&&rd(o,s,!0)||e,t=r&&rd(a,s,!1)||t,[e,t]};zi.prototype.cleanUp=function(e){e&&e.connectionPreviewGfx&&jt(e.connectionPreviewGfx)};zi.prototype.getConnection=function(e){var t=zO(e);return this._elementFactory.createConnection(t)};zi.prototype.createConnectionPreviewGfx=function(){var e=Te("g");return ge(e,{pointerEvents:"none"}),et(e).add(BO),Ie(this._canvas.getActiveLayer(),e),e};zi.prototype.createNoopConnection=function(e,t){return Du([e,t],{stroke:"#333",strokeDasharray:[1],strokeWidth:2,"pointer-events":"none"})};function HO(e){var t={};return function(n){var r=JSON.stringify(n),i=t[r];return i||(i=t[r]=e.apply(null,arguments)),i}}function zO(e){return fn(e)?e:{}}const VO={__init__:["connectionPreview"],connectionPreview:["type",zi]};var Jg=Math.min,ey=Math.max;function cp(e){e.preventDefault()}function Ds(e){e.stopPropagation()}function WO(e){return e.nodeType===Node.TEXT_NODE}function UO(e){return[].slice.call(e)}function Zr(e){this.container=e.container,this.parent=Ct('
    '),this.content=ht("[contenteditable]",this.parent),this.keyHandler=e.keyHandler||function(){},this.resizeHandler=e.resizeHandler||function(){},this.autoResize=Vn(this.autoResize,this),this.handlePaste=Vn(this.handlePaste,this)}Zr.prototype.create=function(e,t,n,r){var i=this,o=this.parent,a=this.content,s=this.container;r=this.options=r||{},t=this.style=t||{};var c=Kr(t,["width","height","maxWidth","maxHeight","minWidth","minHeight","left","top","backgroundColor","position","overflow","border","wordWrap","textAlign","outline","transform"]);W(o.style,{width:e.width+"px",height:e.height+"px",maxWidth:e.maxWidth+"px",maxHeight:e.maxHeight+"px",minWidth:e.minWidth+"px",minHeight:e.minHeight+"px",left:e.x+"px",top:e.y+"px",backgroundColor:"#ffffff",position:"absolute",overflow:"visible",border:"1px solid #ccc",boxSizing:"border-box",wordWrap:"normal",textAlign:"center",outline:"none"},c);var l=Kr(t,["fontFamily","fontSize","fontWeight","lineHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"]);return W(a.style,{boxSizing:"border-box",width:"100%",outline:"none",wordWrap:"break-word"},l),r.centerVertically&&W(a.style,{position:"absolute",top:"50%",transform:"translate(0, -50%)"},l),a.innerText=n,Ce.bind(a,"keydown",this.keyHandler),Ce.bind(a,"mousedown",Ds),Ce.bind(a,"paste",i.handlePaste),r.autoResize&&Ce.bind(a,"input",this.autoResize),r.resizable&&this.resizable(t),s.appendChild(o),this.setSelection(a.lastChild,a.lastChild&&a.lastChild.length),o};Zr.prototype.handlePaste=function(e){var t=this.options,n=this.style;e.preventDefault();var r;if(e.clipboardData?r=e.clipboardData.getData("text/plain"):r=window.clipboardData.getData("Text"),this.insertText(r),t.autoResize){var i=this.autoResize(n);i&&this.resizeHandler(i)}};Zr.prototype.insertText=function(e){e=GO(e);var t=document.execCommand("insertText",!1,e);t||this._insertTextIE(e)};Zr.prototype._insertTextIE=function(e){var t=this.getSelection(),n=t.startContainer,r=t.endContainer,i=t.startOffset,o=t.endOffset,a=t.commonAncestorContainer,s=UO(a.childNodes),c,l;if(WO(a)){var u=n.textContent;n.textContent=u.substring(0,i)+e+u.substring(o),c=n,l=i+e.length}else if(n===this.content&&r===this.content){var f=document.createTextNode(e);this.content.insertBefore(f,s[i]),c=f,l=f.textContent.length}else{var p=s.indexOf(n),d=s.indexOf(r);s.forEach(function(h,v){v===p?h.textContent=n.textContent.substring(0,i)+e+r.textContent.substring(o):v>p&&v<=d&&fi(h)}),c=n,l=i+e.length}c&&l!==void 0&&setTimeout(function(){self.setSelection(c,l)})};Zr.prototype.autoResize=function(){var e=this.parent,t=this.content,n=parseInt(this.style.fontSize)||12;if(t.scrollHeight>e.offsetHeight||t.scrollHeight
    ');var s,c,l,u,f=function(h){cp(h),Ds(h),s=h.clientX,c=h.clientY;var v=t.getBoundingClientRect();l=v.width,u=v.height,Ce.bind(document,"mousemove",p),Ce.bind(document,"mouseup",d)},p=function(h){cp(h),Ds(h);var v=Jg(ey(l+h.clientX-s,r),o),m=Jg(ey(u+h.clientY-c,i),a);t.style.width=v+"px",t.style.height=m+"px",e.resizeHandler({width:l,height:u,dx:h.clientX-s,dy:h.clientY-c})},d=function(h){cp(h),Ds(h),Ce.unbind(document,"mousemove",p,!1),Ce.unbind(document,"mouseup",d,!1)};Ce.bind(n,"mousedown",f)}W(n.style,{position:"absolute",bottom:"0px",right:"0px",cursor:"nwse-resize",width:"0",height:"0",borderTop:(parseInt(this.style.fontSize)/4||3)+"px solid transparent",borderRight:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderBottom:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderLeft:(parseInt(this.style.fontSize)/4||3)+"px solid transparent"}),t.appendChild(n)};Zr.prototype.destroy=function(){var e=this.parent,t=this.content,n=this.resizeHandle;t.innerText="",e.removeAttribute("style"),t.removeAttribute("style"),Ce.unbind(t,"keydown",this.keyHandler),Ce.unbind(t,"mousedown",Ds),Ce.unbind(t,"input",this.autoResize),Ce.unbind(t,"paste",this.handlePaste),n&&(n.removeAttribute("style"),fi(n)),fi(e)};Zr.prototype.getValue=function(){return this.content.innerText.trim()};Zr.prototype.getSelection=function(){var e=window.getSelection(),t=e.getRangeAt(0);return t};Zr.prototype.setSelection=function(e,t){var n=document.createRange();e===null?n.selectNodeContents(this.content):(n.setStart(e,t),n.setEnd(e,t));var r=window.getSelection();r.removeAllRanges(),r.addRange(n)};function GO(e){return e.replace(/\r\n|\r|\n/g,` `)}function Or(e,t){this._eventBus=e,this._providers=[],this._textbox=new Zr({container:t.getContainer(),keyHandler:Vn(this._handleKey,this),resizeHandler:Vn(this._handleResize,this)})}Or.$inject=["eventBus","canvas"];Or.prototype.registerProvider=function(e){this._providers.push(e)};Or.prototype.isActive=function(e){return!!(this._active&&(!e||this._active.element===e))};Or.prototype.cancel=function(){this._active&&(this._fire("cancel"),this.close())};Or.prototype._fire=function(e,t){this._eventBus.fire("directEditing."+e,t||{active:this._active})};Or.prototype.close=function(){this._textbox.destroy(),this._fire("deactivate"),this._active=null,this.resizable=void 0};Or.prototype.complete=function(){var e=this._active;if(e){var t,n=e.context.bounds,r=this.$textbox.getBoundingClientRect(),i=this.getValue(),o=e.context.text;(i!==o||r.height!==n.height||r.width!==n.width)&&(t=this._textbox.container.getBoundingClientRect(),e.provider.update(e.element,i,e.context.text,{x:r.left-t.left,y:r.top-t.top,width:r.width,height:r.height})),this._fire("complete"),this.close()}};Or.prototype.getValue=function(){return this._textbox.getValue()};Or.prototype._handleKey=function(e){e.stopPropagation();var t=e.keyCode||e.charCode;if(t===27)return e.preventDefault(),this.cancel();if(t===13&&!e.shiftKey)return e.preventDefault(),this.complete()};Or.prototype._handleResize=function(e){this._fire("resize",e)};Or.prototype.activate=function(e){this.isActive()&&this.cancel();var t,n=st(this._providers,function(r){return(t=r.activate(e))?r:null});return t&&(this.$textbox=this._textbox.create(t.bounds,t.style,t.text,t.options),this._active={element:e,context:t,provider:n},t.options&&t.options.resizable&&(this.resizable=!0),this._fire("activate")),!!t};const xx={__depends__:[dc],__init__:["directEditing"],directEditing:["type",Or]};var qO=["marker-start","marker-mid","marker-end"],YO=["circle","ellipse","line","path","polygon","polyline","path","rect"];function oa(e,t,n,r){this._elementRegistry=e,this._canvas=n,this._styles=r,this._clonedMarkers={};var i=this;t.on("drag.cleanup",function(){z(i._clonedMarkers,function(o){jt(o)}),i._clonedMarkers={}})}oa.$inject=["elementRegistry","eventBus","canvas","styles"];oa.prototype.getGfx=function(e){return this._elementRegistry.getGraphics(e)};oa.prototype.addDragger=function(e,t,n){n=n||this.getGfx(e);var r=wh(n),i=n.getBoundingClientRect();return this._cloneMarkers(zs(r)),ge(r,this._styles.cls("djs-dragger",[],{x:i.top,y:i.left})),Ie(t,r),r};oa.prototype.addFrame=function(e,t){var n=Te("rect",{class:"djs-resize-overlay",width:e.width,height:e.height,x:e.x,y:e.y});return Ie(t,n),n};oa.prototype._cloneMarkers=function(e){var t=this;if(e.childNodes)for(var n=0;n=120&&W(u,{"lane-divide-two":{group:"lane-divide",className:"bpmn-icon-lane-divide-two",title:l("Divide into two Lanes"),action:{click:m(2)}}}),e.height>=180&&W(u,{"lane-divide-three":{group:"lane-divide",className:"bpmn-icon-lane-divide-three",title:l("Divide into three Lanes"),action:{click:m(3)}}})),W(u,{"lane-insert-below":{group:"lane-insert-below",className:"bpmn-icon-lane-insert-below",title:l("Add Lane below"),action:{click:function(y,b){n.addLane(b,"bottom")}}}})}w(f,"bpmn:FlowNode")&&(w(f,"bpmn:EventBasedGateway")?W(u,{"append.receive-task":v("bpmn:ReceiveTask","bpmn-icon-receive-task",l("Append ReceiveTask")),"append.message-intermediate-event":v("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-message",l("Append MessageIntermediateCatchEvent"),{eventDefinitionType:"bpmn:MessageEventDefinition"}),"append.timer-intermediate-event":v("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-timer",l("Append TimerIntermediateCatchEvent"),{eventDefinitionType:"bpmn:TimerEventDefinition"}),"append.condition-intermediate-event":v("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-condition",l("Append ConditionIntermediateCatchEvent"),{eventDefinitionType:"bpmn:ConditionalEventDefinition"}),"append.signal-intermediate-event":v("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-signal",l("Append SignalIntermediateCatchEvent"),{eventDefinitionType:"bpmn:SignalEventDefinition"})}):dy(f,"bpmn:BoundaryEvent","bpmn:CompensateEventDefinition")?W(u,{"append.compensation-activity":v("bpmn:Task","bpmn-icon-task",l("Append compensation activity"),{isForCompensation:!0})}):!w(f,"bpmn:EndEvent")&&!f.isForCompensation&&!dy(f,"bpmn:IntermediateThrowEvent","bpmn:LinkEventDefinition")&&!er(f)&&W(u,{"append.end-event":v("bpmn:EndEvent","bpmn-icon-end-event-none",l("Append EndEvent")),"append.gateway":v("bpmn:ExclusiveGateway","bpmn-icon-gateway-none",l("Append Gateway")),"append.append-task":v("bpmn:Task","bpmn-icon-task",l("Append Task")),"append.intermediate-event":v("bpmn:IntermediateThrowEvent","bpmn-icon-intermediate-event-none",l("Append Intermediate/Boundary Event"))})),a.isEmpty(e,"bpmn-replace")||W(u,{replace:{group:"edit",className:"bpmn-icon-screw-wrench",title:l("Change type"),action:{click:function(y,b){var x=W(h(b),{cursor:{x:y.x,y:y.y}});a.open(b,"bpmn-replace",x,{title:l("Change element"),width:300,search:!0})}}}}),w(f,"bpmn:SequenceFlow")&&W(u,{"append.text-annotation":v("bpmn:TextAnnotation","bpmn-icon-text-annotation",l("Append TextAnnotation"))}),Qe(f,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference"])&&W(u,{"append.text-annotation":v("bpmn:TextAnnotation","bpmn-icon-text-annotation",l("Append TextAnnotation")),connect:{group:"connect",className:"bpmn-icon-connection-multi",title:l("Connect using "+(f.isForCompensation?"":"Sequence/MessageFlow or ")+"Association"),action:{click:p,dragstart:p}}}),w(f,"bpmn:TextAnnotation")&&W(u,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:l("Connect using Association"),action:{click:p,dragstart:p}}}),Qe(f,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&W(u,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:l("Connect using DataInputAssociation"),action:{click:p,dragstart:p}}}),w(f,"bpmn:Group")&&W(u,{"append.text-annotation":v("bpmn:TextAnnotation","bpmn-icon-text-annotation",l("Append TextAnnotation"))});var g=s.allowed("elements.delete",{elements:[e]});return qe(g)&&(g=g[0]===e),g&&W(u,{delete:{group:"edit",className:"bpmn-icon-trash",title:l("Remove"),action:{click:d}}}),u};function dy(e,t,n){var r=e.$instanceOf(t),i=!1,o=e.eventDefinitions||[];return z(o,function(a){a.$type===n&&(i=!0)}),r&&i}function jM(e,t){return e.indexOf(t)!==-1}const FM={__depends__:[xx,N_,di,sv,tf,RM],__init__:["contextPadProvider"],contextPadProvider:["type",rs]};var BM={horizontal:["x","width"],vertical:["y","height"]},hy=5;function Vi(e,t){this._modeling=e,this._filters=[],this.registerFilter(function(n){var r=t.allowed("elements.distribute",{elements:n});return qe(r)?r:r?n:[]})}Vi.$inject=["modeling","rules"];Vi.prototype.registerFilter=function(e){if(typeof e!="function")throw new Error("the filter has to be a function");this._filters.push(e)};Vi.prototype.trigger=function(e,t){var n=this._modeling,r,i;if(!(e.length<3)&&(this._setOrientation(t),i=this._filterElements(e),r=this._createGroups(i),!(r.length<=2)))return n.distributeElements(r,this._axis,this._dimension),r};Vi.prototype._filterElements=function(e){var t=this._filters,n=this._axis,r=this._dimension,i=[].concat(e);return t.length?(z(t,function(o){i=o(i,n,r)}),i):e};Vi.prototype._createGroups=function(e){var t=[],n=this,r=this._axis,i=this._dimension;if(!r)throw new Error('must have a defined "axis" and "dimension"');var o=Yr(e,r);return z(o,function(a,s){var c=n._findRange(a,r,i),l,u=t[t.length-1];u&&n._hasIntersection(u.range,c)?t[t.length-1].elements.push(a):(l={range:c,elements:[a]},t.push(l))}),t};Vi.prototype._setOrientation=function(e){var t=BM[e];this._axis=t[0],this._dimension=t[1]};Vi.prototype._hasIntersection=function(e,t){return Math.max(e.min,e.max)>=Math.min(t.min,t.max)&&Math.min(e.min,e.max)<=Math.max(t.min,t.max)};Vi.prototype._findRange=function(e){var t=e[this._axis],n=e[this._dimension];return{min:t+hy,max:t+n-hy}};const HM={__init__:["distributeElements"],distributeElements:["type",Vi]};function rf(e){Ar.call(this,e)}rf.$inject=["eventBus"];xe(rf,Ar);rf.prototype.init=function(){this.addRule("elements.distribute",function(e){var t=e.elements;return t=Ge(t,function(n){var r=Qe(n,["bpmn:Association","bpmn:BoundaryEvent","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:Lane","bpmn:MessageFlow","bpmn:SequenceFlow","bpmn:TextAnnotation"]);return!(n.labelTarget||r)}),t=Iu(t),t.length<3?!1:t})};var zM={horizontal:` `,vertical:` `};const vy=zM;var VM=900;function Ec(e,t,n,r){this._distributeElements=t,this._translate=n,this._popupMenu=e,this._rules=r,e.registerProvider("align-elements",VM,this)}Ec.$inject=["popupMenu","distributeElements","translate","rules"];Ec.prototype.getPopupMenuEntries=function(e){var t={};return this._isAllowed(e)&&W(t,this._getEntries(e)),t};Ec.prototype._isAllowed=function(e){return this._rules.allowed("elements.distribute",{elements:e})};Ec.prototype._getEntries=function(e){var t=this._distributeElements,n=this._translate,r=this._popupMenu,i={"distribute-elements-horizontal":{group:"distribute",title:n("Distribute elements horizontally"),className:"bjs-align-elements-menu-entry",imageHtml:vy.horizontal,action:function(o,a){t.trigger(e,"horizontal"),r.close()}},"distribute-elements-vertical":{group:"distribute",title:n("Distribute elements vertically"),imageHtml:vy.vertical,action:function(o,a){t.trigger(e,"vertical"),r.close()}}};return i};const WM={__depends__:[ev,HM],__init__:["bpmnDistributeElements","distributeElementsMenuProvider"],bpmnDistributeElements:["type",rf],distributeElementsMenuProvider:["type",Ec]};var Ix="is not a registered action",UM="is already registered";function Dr(e,t){this._actions={};var n=this;e.on("diagram.init",function(){n._registerDefaultActions(t),e.fire("editorActions.init",{editorActions:n})})}Dr.$inject=["eventBus","injector"];Dr.prototype._registerDefaultActions=function(e){var t=e.get("commandStack",!1),n=e.get("modeling",!1),r=e.get("selection",!1),i=e.get("zoomScroll",!1),o=e.get("copyPaste",!1),a=e.get("canvas",!1),s=e.get("rules",!1),c=e.get("keyboardMove",!1),l=e.get("keyboardMoveSelection",!1);t&&(this.register("undo",function(){t.undo()}),this.register("redo",function(){t.redo()})),o&&r&&this.register("copy",function(){var u=r.get();if(u.length)return o.copy(u)}),o&&this.register("paste",function(){o.paste()}),i&&this.register("stepZoom",function(u){i.stepZoom(u.value)}),a&&this.register("zoom",function(u){a.zoom(u.value)}),n&&r&&s&&this.register("removeSelection",function(){var u=r.get();if(u.length){var f=s.allowed("elements.delete",{elements:u}),p;f!==!1&&(qe(f)?p=f:p=u,p.length&&n.removeElements(p.slice()))}}),c&&this.register("moveCanvas",function(u){c.moveCanvas(u)}),l&&this.register("moveSelection",function(u){l.moveSelection(u.direction,u.accelerated)})};Dr.prototype.trigger=function(e,t){if(!this._actions[e])throw uv(e,Ix);return this._actions[e](t)};Dr.prototype.register=function(e,t){var n=this;if(typeof e=="string")return this._registerAction(e,t);z(e,function(r,i){n._registerAction(i,r)})};Dr.prototype._registerAction=function(e,t){if(this.isRegistered(e))throw uv(e,UM);this._actions[e]=t};Dr.prototype.unregister=function(e){if(!this.isRegistered(e))throw uv(e,Ix);this._actions[e]=void 0};Dr.prototype.getActions=function(){return Object.keys(this._actions)};Dr.prototype.isRegistered=function(e){return!!this._actions[e]};function uv(e,t){return new Error(e+" "+t)}const GM={__init__:["editorActions"],editorActions:["type",Dr]};function of(e){e.invoke(Dr,this)}xe(of,Dr);of.$inject=["injector"];of.prototype._registerDefaultActions=function(e){Dr.prototype._registerDefaultActions.call(this,e);var t=e.get("canvas",!1),n=e.get("elementRegistry",!1),r=e.get("selection",!1),i=e.get("spaceTool",!1),o=e.get("lassoTool",!1),a=e.get("handTool",!1),s=e.get("globalConnect",!1),c=e.get("distributeElements",!1),l=e.get("alignElements",!1),u=e.get("directEditing",!1),f=e.get("searchPad",!1),p=e.get("modeling",!1),d=e.get("contextPad",!1);t&&n&&r&&this._registerAction("selectElements",function(){var h=t.getRootElement(),v=n.filter(function(m){return m!==h});return r.select(v),v}),i&&this._registerAction("spaceTool",function(){i.toggle()}),o&&this._registerAction("lassoTool",function(){o.toggle()}),a&&this._registerAction("handTool",function(){a.toggle()}),s&&this._registerAction("globalConnectTool",function(){s.toggle()}),r&&c&&this._registerAction("distributeElements",function(h){var v=r.get(),m=h.type;v.length&&c.trigger(v,m)}),r&&l&&this._registerAction("alignElements",function(h){var v=r.get(),m=[],_=h.type;v.length&&(m=Ge(v,function(g){return!w(g,"bpmn:Lane")}),l.trigger(m,_))}),r&&p&&this._registerAction("setColor",function(h){var v=r.get();v.length&&p.setColor(v,h)}),r&&u&&this._registerAction("directEditing",function(){var h=r.get();h.length&&u.activate(h[0])}),f&&this._registerAction("find",function(){f.toggle()}),t&&p&&this._registerAction("moveToOrigin",function(){var h=t.getRootElement(),v,m;w(h,"bpmn:Collaboration")?m=n.filter(function(_){return w(_.parent,"bpmn:Collaboration")}):m=n.filter(function(_){return _!==h&&!w(_.parent,"bpmn:SubProcess")}),v=Zt(m),p.moveElements(m,{x:-v.x,y:-v.y},h)}),r&&d&&this._registerAction("replaceElement",function(h){d.triggerEntry("replace","click",h)})};const qM={__depends__:[GM],editorActions:["type",of]};function Nx(e){e.on(["create.init","shape.move.init"],function(t){var n=t.context,r=t.shape;Qe(r,["bpmn:Participant","bpmn:SubProcess","bpmn:TextAnnotation"])&&(n.gridSnappingContext||(n.gridSnappingContext={}),n.gridSnappingContext.snapLocation="top-left")})}Nx.$inject=["eventBus"];var Wl=10;function fp(e,t,n){return n||(n="round"),Math[n](e/t)*t}var YM=1200,KM=800;function go(e,t,n){var r=!n||n.active!==!1;this._eventBus=t;var i=this;t.on("diagram.init",KM,function(){i.setActive(r)}),t.on(["create.move","create.end","bendpoint.move.move","bendpoint.move.end","connect.move","connect.end","connectionSegment.move.move","connectionSegment.move.end","resize.move","resize.end","shape.move.move","shape.move.end"],YM,function(o){var a=o.originalEvent;if(!(!i.active||a&&vr(a))){var s=o.context,c=s.gridSnappingContext;c||(c=s.gridSnappingContext={}),["x","y"].forEach(function(l){var u={},f=ZM(o,l,e);f&&(u.offset=f);var p=XM(o,l);p&&W(u,p),Fa(o,l)||i.snapEvent(o,l,u)})}})}go.prototype.snapEvent=function(e,t,n){var r=this.snapValue(e[t],n);Xt(e,t,r)};go.prototype.getGridSpacing=function(){return Wl};go.prototype.snapValue=function(e,t){var n=0;t&&t.offset&&(n=t.offset),e+=n,e=fp(e,Wl);var r,i;return t&&t.min&&(r=t.min,Le(r)&&(r=fp(r+n,Wl,"ceil"),e=Math.max(e,r))),t&&t.max&&(i=t.max,Le(i)&&(i=fp(i+n,Wl,"floor"),e=Math.min(e,i))),e-=n,e};go.prototype.isActive=function(){return this.active};go.prototype.setActive=function(e){this.active=e,this._eventBus.fire("gridSnapping.toggle",{active:e})};go.prototype.toggleActive=function(){this.setActive(!this.active)};go.$inject=["elementRegistry","eventBus","config.gridSnapping"];function XM(e,t){var n=e.context,r=n.createConstraints,i=n.resizeConstraints||{},o=n.gridSnappingContext,a=o.snapConstraints;if(a&&a[t])return a[t];a||(a=o.snapConstraints={}),a[t]||(a[t]={});var s=n.direction;r&&(Ul(t)?(a.x.min=r.left,a.x.max=r.right):(a.y.min=r.top,a.y.max=r.bottom));var c=i.min,l=i.max;return c&&(Ul(t)?gy(s)?a.x.max=c.left:a.x.min=c.right:my(s)?a.y.max=c.top:a.y.min=c.bottom),l&&(Ul(t)?gy(s)?a.x.min=l.left:a.x.max=l.right:my(s)?a.y.min=l.top:a.y.max=l.bottom),a[t]}function ZM(e,t,n){var r=e.context,i=e.shape,o=r.gridSnappingContext,a=o.snapLocation,s=o.snapOffset;return s&&Le(s[t])||(s||(s=o.snapOffset={}),Le(s[t])||(s[t]=0),!i)||(n.get(i.id)||(Ul(t)?s[t]+=i[t]+i.width/2:s[t]+=i[t]+i.height/2),!a)||(t==="x"?/left/.test(a)?s[t]-=i.width/2:/right/.test(a)&&(s[t]+=i.width/2):/top/.test(a)?s[t]-=i.height/2:/bottom/.test(a)&&(s[t]+=i.height/2)),s[t]}function Ul(e){return e==="x"}function my(e){return e.indexOf("n")!==-1}function gy(e){return e.indexOf("w")!==-1}function aa(e,t){ae.call(this,e),this._gridSnapping=t;var n=this;this.preExecute("shape.resize",function(r){var i=r.context,o=i.hints||{},a=o.autoResize;if(a){var s=i.shape,c=i.newBounds;tr(a)?i.newBounds=n.snapComplex(c,a):i.newBounds=n.snapSimple(s,c)}})}aa.$inject=["eventBus","gridSnapping","modeling"];xe(aa,ae);aa.prototype.snapSimple=function(e,t){var n=this._gridSnapping;return t.width=n.snapValue(t.width,{min:t.width}),t.height=n.snapValue(t.height,{min:t.height}),t.x=e.x+e.width/2-t.width/2,t.y=e.y+e.height/2-t.height/2,t};aa.prototype.snapComplex=function(e,t){return/w|e/.test(t)&&(e=this.snapHorizontally(e,t)),/n|s/.test(t)&&(e=this.snapVertically(e,t)),e};aa.prototype.snapHorizontally=function(e,t){var n=this._gridSnapping,r=/w/.test(t),i=/e/.test(t),o={};return o.width=n.snapValue(e.width,{min:e.width}),i&&(r?(o.x=n.snapValue(e.x,{max:e.x}),o.width+=n.snapValue(e.x-o.x,{min:e.x-o.x})):e.x=e.x+e.width-o.width),W(e,o),e};aa.prototype.snapVertically=function(e,t){var n=this._gridSnapping,r=/n/.test(t),i=/s/.test(t),o={};return o.height=n.snapValue(e.height,{min:e.height}),r&&(i?(o.y=n.snapValue(e.y,{max:e.y}),o.height+=n.snapValue(e.y-o.y,{min:e.y-o.y})):e.y=e.y+e.height-o.height),W(e,o),e};var QM=2e3;function kx(e,t){e.on(["spaceTool.move","spaceTool.end"],QM,function(n){var r=n.context;if(r.initialized){var i=r.axis,o;i==="x"?(o=t.snapValue(n.dx),n.x=n.x+o-n.dx,n.dx=o):(o=t.snapValue(n.dy),n.y=n.y+o-n.dy,n.dy=o)}})}kx.$inject=["eventBus","gridSnapping"];const JM={__init__:["gridSnappingResizeBehavior","gridSnappingSpaceToolBehavior"],gridSnappingResizeBehavior:["type",aa],gridSnappingSpaceToolBehavior:["type",kx]},eD={__depends__:[JM],__init__:["gridSnapping"],gridSnapping:["type",go]};var tD=2e3;function Lx(e,t){e.on("autoPlace",tD,function(n){var r=n.source,i=$e(r),o=n.shape,a=tx(r,o);return["x","y"].forEach(function(s){var c={};a[s]!==i[s]&&(a[s]>i[s]?c.min=a[s]:c.max=a[s],w(o,"bpmn:TextAnnotation")&&(nD(s)?c.offset=-o.width/2:c.offset=-o.height/2),a[s]=t.snapValue(a[s],c))}),a})}Lx.$inject=["eventBus","gridSnapping"];function nD(e){return e==="x"}var rD=1750;function $x(e,t,n){t.on(["create.start","shape.move.start"],rD,function(r){var i=r.context,o=i.shape,a=e.getRootElement();if(!(!w(o,"bpmn:Participant")||!w(a,"bpmn:Process")||!a.children.length)){var s=i.createConstraints;s&&(o.width=n.snapValue(o.width,{min:o.width}),o.height=n.snapValue(o.height,{min:o.height}))}})}$x.$inject=["canvas","eventBus","gridSnapping"];var iD=3e3;function af(e,t,n){ae.call(this,e),this._gridSnapping=t;var r=this;this.postExecuted(["connection.create","connection.layout"],iD,function(i){var o=i.context,a=o.connection,s=o.hints||{},c=a.waypoints;s.connectionStart||s.connectionEnd||s.createElementsBehavior===!1||oD(c)&&n.updateWaypoints(a,r.snapMiddleSegments(c))})}af.$inject=["eventBus","gridSnapping","modeling"];xe(af,ae);af.prototype.snapMiddleSegments=function(e){var t=this._gridSnapping,n;e=e.slice();for(var r=1;r3}function aD(e){return e==="h"}function sD(e){return e==="v"}function cD(e,t,n){var r=Pi(t,n),i={};return aD(r)&&(i.y=e.snapValue(t.y)),sD(r)&&(i.x=e.snapValue(t.x)),("x"in i||"y"in i)&&(t=W({},t,i),n=W({},n,i)),[t,n]}const lD={__init__:["gridSnappingAutoPlaceBehavior","gridSnappingParticipantBehavior","gridSnappingLayoutConnectionBehavior"],gridSnappingAutoPlaceBehavior:["type",Lx],gridSnappingParticipantBehavior:["type",$x],gridSnappingLayoutConnectionBehavior:["type",af]},uD={__depends__:[eD,lD],__init__:["bpmnGridSnapping"],bpmnGridSnapping:["type",Nx]};var fD=30,pD=30;function _c(e,t){this._interactionEvents=t;var n=this;e.on(["interactionEvents.createHit","interactionEvents.updateHit"],function(r){var i=r.element,o=r.gfx;if(w(i,"bpmn:Lane"))return n._createParticipantHit(i,o);if(w(i,"bpmn:Participant"))return ot(i)?n._createParticipantHit(i,o):n._createDefaultHit(i,o);if(w(i,"bpmn:SubProcess"))return ot(i)?n._createSubProcessHit(i,o):n._createDefaultHit(i,o)})}_c.$inject=["eventBus","interactionEvents"];_c.prototype._createDefaultHit=function(e,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createDefaultHit(e,t),!0};_c.prototype._createParticipantHit=function(e,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createBoxHit(t,"no-move",{width:e.width,height:e.height}),this._interactionEvents.createBoxHit(t,"click-stroke",{width:e.width,height:e.height}),this._interactionEvents.createBoxHit(t,"all",{width:fD,height:e.height}),!0};_c.prototype._createSubProcessHit=function(e,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createBoxHit(t,"no-move",{width:e.width,height:e.height}),this._interactionEvents.createBoxHit(t,"click-stroke",{width:e.width,height:e.height}),this._interactionEvents.createBoxHit(t,"all",{width:e.width,height:pD}),!0};const dD={__init__:["bpmnInteractionEvents"],bpmnInteractionEvents:["type",_c]};function sf(e){e.invoke(Ja,this)}xe(sf,Ja);sf.$inject=["injector"];sf.prototype.registerBindings=function(e,t){Ja.prototype.registerBindings.call(this,e,t);function n(r,i){t.isRegistered(r)&&e.addListener(i)}n("selectElements",function(r){var i=r.keyEvent;if(e.isKey(["a","A"],i)&&e.isCmd(i))return t.trigger("selectElements"),!0}),n("find",function(r){var i=r.keyEvent;if(e.isKey(["f","F"],i)&&e.isCmd(i))return t.trigger("find"),!0}),n("spaceTool",function(r){var i=r.keyEvent;if(!e.hasModifier(i)&&e.isKey(["s","S"],i))return t.trigger("spaceTool"),!0}),n("lassoTool",function(r){var i=r.keyEvent;if(!e.hasModifier(i)&&e.isKey(["l","L"],i))return t.trigger("lassoTool"),!0}),n("handTool",function(r){var i=r.keyEvent;if(!e.hasModifier(i)&&e.isKey(["h","H"],i))return t.trigger("handTool"),!0}),n("globalConnectTool",function(r){var i=r.keyEvent;if(!e.hasModifier(i)&&e.isKey(["c","C"],i))return t.trigger("globalConnectTool"),!0}),n("directEditing",function(r){var i=r.keyEvent;if(!e.hasModifier(i)&&e.isKey(["e","E"],i))return t.trigger("directEditing"),!0}),n("replaceElement",function(r){var i=r.keyEvent;if(!e.hasModifier(i)&&e.isKey(["r","R"],i))return t.trigger("replaceElement",i),!0})};const hD={__depends__:[Gh],__init__:["keyboardBindings"],keyboardBindings:["type",sf]};var vD={moveSpeed:1,moveSpeedAccelerated:10},mD=1500,yy="left",by="up",Ey="right",_y="down",gD={ArrowLeft:yy,Left:yy,ArrowUp:by,Up:by,ArrowRight:Ey,Right:Ey,ArrowDown:_y,Down:_y},yD={left:function(e){return{x:-e,y:0}},up:function(e){return{x:0,y:-e}},right:function(e){return{x:e,y:0}},down:function(e){return{x:0,y:e}}};function jx(e,t,n,r,i){var o=this;this._config=W({},vD,e||{}),t.addListener(mD,function(a){var s=a.keyEvent,c=gD[s.key];if(c&&!t.isCmd(s)){var l=t.isShift(s);return o.moveSelection(c,l),!0}}),this.moveSelection=function(a,s){var c=i.get();if(c.length){var l=this._config[s?"moveSpeedAccelerated":"moveSpeed"],u=yD[a](l),f=r.allowed("elements.move",{shapes:c});f&&n.moveElements(c,u)}}}jx.$inject=["config.keyboardMoveSelection","keyboard","modeling","rules","selection"];const bD={__depends__:[Gh,di],__init__:["keyboardMoveSelection"],keyboardMoveSelection:["type",jx]};var xy=10;function xc(e,t,n,r){this._dragging=r,this._rules=t;var i=this;function o(c,l){var u=c.shape,f=c.direction,p=c.resizeConstraints,d;c.delta=l,d=AM(u,f,l),c.newBounds=MM(d,p),c.canExecute=i.canResize(c)}function a(c){var l=c.resizeConstraints,u=c.minBounds;l===void 0&&(u===void 0&&(u=i.computeMinResizeBox(c)),c.resizeConstraints={min:Ae(u)})}function s(c){var l=c.shape,u=c.canExecute,f=c.newBounds;if(u){if(f=TE(f),!ED(l,f))return;n.resizeShape(l,f)}}e.on("resize.start",function(c){a(c.context)}),e.on("resize.move",function(c){var l={x:c.dx,y:c.dy};o(c.context,l)}),e.on("resize.end",function(c){s(c.context)})}xc.prototype.canResize=function(e){var t=this._rules,n=Kr(e,["newBounds","shape","delta","direction"]);return t.allowed("shape.resize",n)};xc.prototype.activate=function(e,t,n){var r=this._dragging,i,o;if(typeof n=="string"&&(n={direction:n}),i=W({shape:t},n),o=i.direction,!o)throw new Error("must provide a direction (n|w|s|e|nw|se|ne|sw)");r.init(e,Fx(t,o),"resize",{autoActivate:!0,cursor:_D(o),data:{shape:t,context:i}})};xc.prototype.computeMinResizeBox=function(e){var t=e.shape,n=e.direction,r,i;return r=e.minDimensions||{width:xy,height:xy},i=Dx(t,e.childrenBoxPadding),DM(n,t,r,i)};xc.$inject=["eventBus","rules","modeling","dragging"];function ED(e,t){return e.x!==t.x||e.y!==t.y||e.width!==t.width||e.height!==t.height}function Fx(e,t){var n=$e(e),r=Ae(e),i={x:n.x,y:n.y};return t.indexOf("n")!==-1?i.y=r.top:t.indexOf("s")!==-1&&(i.y=r.bottom),t.indexOf("e")!==-1?i.x=r.right:t.indexOf("w")!==-1&&(i.x=r.left),i}function _D(e){var t="resize-";return e==="n"||e==="s"?t+"ns":e==="e"||e==="w"?t+"ew":e==="nw"||e==="se"?t+"nwse":t+"nesw"}var wy="djs-resizing",Sy="resize-not-ok",xD=500;function Bx(e,t,n){function r(o){var a=o.shape,s=o.newBounds,c=o.frame;c||(c=o.frame=n.addFrame(a,t.getActiveLayer()),t.addMarker(a,wy)),s.width>5&&ge(c,{x:s.x,width:s.width}),s.height>5&&ge(c,{y:s.y,height:s.height}),o.canExecute?et(c).remove(Sy):et(c).add(Sy)}function i(o){var a=o.shape,s=o.frame;s&&jt(o.frame),t.removeMarker(a,wy)}e.on("resize.move",xD,function(o){r(o.context)}),e.on("resize.cleanup",function(o){i(o.context)})}Bx.$inject=["eventBus","canvas","previewSupport"];var rl=-6,il=8,ol=20,Es="djs-resizer",wD=["n","w","s","e","nw","ne","se","sw"];function yo(e,t,n,r){this._resize=r,this._canvas=t;var i=this;e.on("selection.changed",function(o){var a=o.newSelection;i.removeResizers(),a.length===1&&z(a,Vn(i.addResizer,i))}),e.on("shape.changed",function(o){var a=o.element;n.isSelected(a)&&(i.removeResizers(),i.addResizer(a))})}yo.prototype.makeDraggable=function(e,t,n){var r=this._resize;function i(o){po(o)&&r.activate(o,e,n)}Ce.bind(t,"mousedown",i),Ce.bind(t,"touchstart",i)};yo.prototype._createResizer=function(e,t,n,r){var i=this._getResizersParent(),o=SD(r),a=Te("g");et(a).add(Es),et(a).add(Es+"-"+e.id),et(a).add(Es+"-"+r),Ie(i,a);var s=Te("rect");ge(s,{x:-il/2+o.x,y:-il/2+o.y,width:il,height:il}),et(s).add(Es+"-visual"),Ie(a,s);var c=Te("rect");return ge(c,{x:-ol/2+o.x,y:-ol/2+o.y,width:ol,height:ol}),et(c).add(Es+"-hit"),Ie(a,c),id(a,t,n),a};yo.prototype.createResizer=function(e,t){var n=Fx(e,t),r=this._createResizer(e,n.x,n.y,t);this.makeDraggable(e,r,t)};yo.prototype.addResizer=function(e){var t=this;Pt(e)||!this._resize.canResize({shape:e})||z(wD,function(n){t.createResizer(e,n)})};yo.prototype.removeResizers=function(){var e=this._getResizersParent();ic(e)};yo.prototype._getResizersParent=function(){return this._canvas.getLayer("resizers")};yo.$inject=["eventBus","canvas","selection","resize"];function SD(e){var t={x:0,y:0};return e.indexOf("e")!==-1?t.x=-rl:e.indexOf("w")!==-1&&(t.x=rl),e.indexOf("s")!==-1?t.y=-rl:e.indexOf("n")!==-1&&(t.y=rl),t}const Hx={__depends__:[vi,Hi,mc],__init__:["resize","resizePreview","resizeHandles"],resize:["type",xc],resizePreview:["type",Bx],resizeHandles:["type",yo]};var CD=2e3;function wc(e,t,n,r,i,o,a){this._bpmnFactory=t,this._canvas=n,this._modeling=i,this._textRenderer=a,r.registerProvider(this),e.on("element.dblclick",function(c){s(c.element,!0)}),e.on(["autoPlace.start","canvas.viewbox.changing","drag.init","element.mousedown","popupMenu.open","root.set","selection.changed"],function(){r.isActive()&&r.complete()}),e.on(["shape.remove","connection.remove"],CD,function(c){r.isActive(c.element)&&r.cancel()}),e.on(["commandStack.changed"],function(c){r.isActive()&&r.cancel()}),e.on("directEditing.activate",function(c){o.removeResizers()}),e.on("create.end",500,function(c){var l=c.context,u=l.shape,f=c.context.canExecute,p=c.isTouch;p||f&&(l.hints&&l.hints.createElementsBehavior===!1||s(u))}),e.on("autoPlace.end",500,function(c){s(c.shape)});function s(c,l){(l||Qe(c,["bpmn:Task","bpmn:TextAnnotation","bpmn:Participant"])||fv(c))&&r.activate(c)}}wc.$inject=["eventBus","bpmnFactory","canvas","directEditing","modeling","resizeHandles","textRenderer"];wc.prototype.activate=function(e){var t=Cr(e);if(t!==void 0){var n={text:t},r=this.getEditingBBox(e);W(n,r);var i={};return(Qe(e,["bpmn:Task","bpmn:Participant","bpmn:Lane","bpmn:CallActivity"])||fv(e))&&W(i,{centerVertically:!0}),Yo(e)&&W(i,{autoResize:!0}),w(e,"bpmn:TextAnnotation")&&W(i,{resizable:!0,autoResize:!0}),W(n,{options:i}),n}};wc.prototype.getEditingBBox=function(e){var t=this._canvas,n=e.label||e,r=t.getAbsoluteBBox(n),i={x:r.x+r.width/2,y:r.y+r.height/2},o={x:r.x,y:r.y},a=t.zoom(),s=this._textRenderer.getDefaultStyle(),c=this._textRenderer.getExternalStyle(),l=c.fontSize*a,u=c.lineHeight,f=s.fontSize*a,p=s.lineHeight,d={fontFamily:this._textRenderer.getDefaultStyle().fontFamily,fontWeight:this._textRenderer.getDefaultStyle().fontWeight};(w(e,"bpmn:Lane")||PD(e))&&(W(o,{width:r.height,height:30*a,x:r.x-r.height/2+15*a,y:i.y-30*a/2}),W(d,{fontSize:f+"px",lineHeight:p,paddingTop:7*a+"px",paddingBottom:7*a+"px",paddingLeft:5*a+"px",paddingRight:5*a+"px",transform:"rotate(-90deg)"})),(Qe(e,["bpmn:Task","bpmn:CallActivity"])||RD(e)||fv(e))&&(W(o,{width:r.width,height:r.height}),W(d,{fontSize:f+"px",lineHeight:p,paddingTop:7*a+"px",paddingBottom:7*a+"px",paddingLeft:5*a+"px",paddingRight:5*a+"px"})),TD(e)&&(W(o,{width:r.width,x:r.x}),W(d,{fontSize:f+"px",lineHeight:p,paddingTop:7*a+"px",paddingBottom:7*a+"px",paddingLeft:5*a+"px",paddingRight:5*a+"px"}));var h=90*a,v=7*a,m=4*a;if(n.labelTarget&&(W(o,{width:h,height:r.height+v+m,x:i.x-h/2,y:r.y-v}),W(d,{fontSize:l+"px",lineHeight:u,paddingTop:v+"px",paddingBottom:m+"px"})),Yo(n)&&!Hu(n)&&!ut(n)){var _=Fh(e),g=t.getAbsoluteBBox({x:_.x,y:_.y,width:0,height:0}),y=l+v+m;W(o,{width:h,height:y,x:g.x-h/2,y:g.y-y/2}),W(d,{fontSize:l+"px",lineHeight:u,paddingTop:v+"px",paddingBottom:m+"px"})}return w(e,"bpmn:TextAnnotation")&&(W(o,{width:r.width,height:r.height,minWidth:30*a,minHeight:10*a}),W(d,{textAlign:"left",paddingTop:5*a+"px",paddingBottom:7*a+"px",paddingLeft:7*a+"px",paddingRight:5*a+"px",fontSize:f+"px",lineHeight:p})),{bounds:o,style:d}};wc.prototype.update=function(e,t,n,r){var i,o;w(e,"bpmn:TextAnnotation")&&(o=this._canvas.getAbsoluteBBox(e),i={x:e.x,y:e.y,width:e.width/o.width*r.width,height:e.height/o.height*r.height}),AD(t)&&(t=null),this._modeling.updateLabel(e,t,i)};function fv(e){return w(e,"bpmn:SubProcess")&&!ot(e)}function TD(e){return w(e,"bpmn:SubProcess")&&ot(e)}function RD(e){return w(e,"bpmn:Participant")&&!ot(e)}function PD(e){return w(e,"bpmn:Participant")&&ot(e)}function AD(e){return!e||!e.trim()}var Cy="djs-element-hidden",Ty="djs-label-hidden";function zx(e,t,n){var r=this,i=t.getDefaultLayer(),o,a,s;e.on("directEditing.activate",function(c){var l=c.active;if(o=l.element.label||l.element,w(o,"bpmn:TextAnnotation")){a=t.getAbsoluteBBox(o),s=Te("g");var u=n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:o.width,containerHeight:o.height,position:{mx:0,my:0}}),f=r.path=Te("path");ge(f,{d:u,strokeWidth:2,stroke:OD(o)}),Ie(s,f),Ie(i,s),Jn(s,o.x,o.y)}w(o,"bpmn:TextAnnotation")||o.labelTarget?t.addMarker(o,Cy):(w(o,"bpmn:Task")||w(o,"bpmn:CallActivity")||w(o,"bpmn:SubProcess")||w(o,"bpmn:Participant"))&&t.addMarker(o,Ty)}),e.on("directEditing.resize",function(c){if(w(o,"bpmn:TextAnnotation")){var l=c.height,u=c.dy,f=Math.max(o.height/a.height*(l+u),0),p=n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:o.width,containerHeight:f,position:{mx:0,my:0}});ge(r.path,{d:p})}}),e.on(["directEditing.complete","directEditing.cancel"],function(c){var l=c.active;l&&(t.removeMarker(l.element.label||l.element,Cy),t.removeMarker(o,Ty)),o=void 0,a=void 0,s&&(jt(s),s=void 0)})}zx.$inject=["eventBus","canvas","pathMap"];function OD(e,t){var n=at(e);return n.get("stroke")||t||"black"}const MD={__depends__:[Vh,Hx,xx],__init__:["labelEditingProvider","labelEditingPreview"],labelEditingProvider:["type",wc],labelEditingPreview:["type",zx]};var pv=["top","bottom","left","right"],al=10;function dv(e,t){ae.call(this,e),this.postExecuted(["connection.create","connection.layout","connection.updateWaypoints"],function(i){var o=i.context,a=o.connection,s=a.source,c=a.target,l=o.hints||{};l.createElementsBehavior!==!1&&(n(s),n(c))}),this.postExecuted(["label.create"],function(i){var o=i.context,a=o.shape,s=o.hints||{};s.createElementsBehavior!==!1&&n(a.labelTarget)}),this.postExecuted(["elements.create"],function(i){var o=i.context,a=o.elements,s=o.hints||{};s.createElementsBehavior!==!1&&a.forEach(function(c){n(c)})});function n(i){if(Hu(i)){var o=ND(i);o&&r(i,o)}}function r(i,o){var a=$e(i),s=i.label,c=$e(s);if(s.parent){var l=Ae(i),u;switch(o){case"top":u={x:a.x,y:l.top-al-s.height/2};break;case"left":u={x:l.left-al-s.width/2,y:a.y};break;case"bottom":u={x:a.x,y:l.bottom+al+s.height/2};break;case"right":u={x:l.right+al+s.width/2,y:a.y};break}var f=Gr(u,c);t.moveShape(s,f)}}}xe(dv,ae);dv.$inject=["eventBus","modeling"];function DD(e){var t=e.host,n=$e(e),r=In(n,t),i;r.indexOf("-")>=0?i=r.split("-"):i=[r];var o=pv.filter(function(a){return i.indexOf(a)===-1});return o}function ID(e){var t=$e(e),n=[].concat(e.incoming.map(function(r){return r.waypoints[r.waypoints.length-2]}),e.outgoing.map(function(r){return r.waypoints[1]})).map(function(r){return Vx(t,r)});return n}function ND(e){var t=$e(e.label),n=$e(e),r=Vx(n,t);if(kD(r)){var i=ID(e);if(e.host){var o=DD(e);i=i.concat(o)}var a=pv.filter(function(s){return i.indexOf(s)===-1});if(a.indexOf(r)===-1)return a[0]}}function Vx(e,t){return In(t,e,5)}function kD(e){return pv.indexOf(e)!==-1}function hv(e){ae.call(this,e),this.preExecute("shape.append",function(t){var n=t.source,r=t.shape;t.position||(w(r,"bpmn:TextAnnotation")?t.position={x:n.x+n.width/2+75,y:n.y-50-r.height/2}:t.position={x:n.x+n.width+80+r.width/2,y:n.y+n.height/2})},!0)}xe(hv,ae);hv.$inject=["eventBus"];function vv(e,t){e.invoke(ae,this),this.postExecute("shape.move",function(n){var r=n.newParent,i=n.shape,o=Ge(i.incoming.concat(i.outgoing),function(a){return w(a,"bpmn:Association")});z(o,function(a){t.moveConnection(a,{x:0,y:0},r)})},!0)}xe(vv,ae);vv.$inject=["injector","modeling"];var Ry=500;function cf(e,t){t.invoke(ae,this),this._bpmnReplace=e;var n=this;this.postExecuted("elements.create",Ry,function(r){var i=r.elements;i=i.filter(function(o){var a=o.host;return Py(o,a)}),i.length===1&&i.map(function(o){return i.indexOf(o)}).forEach(function(o){var a=i[o];r.elements[o]=n._replaceShape(i[o],a)})},!0),this.preExecute("elements.move",Ry,function(r){var i=r.shapes,o=r.newHost;if(i.length===1){var a=i[0];Py(a,o)&&(r.shapes=[n._replaceShape(a,o)])}},!0)}cf.$inject=["bpmnReplace","injector"];xe(cf,ae);cf.prototype._replaceShape=function(e,t){var n=LD(e),r={type:"bpmn:BoundaryEvent",host:t};return n&&(r.eventDefinitionType=n.$type),this._bpmnReplace.replaceElement(e,r,{layoutConnection:!1})};function LD(e){var t=ce(e),n=t.eventDefinitions;return n&&n[0]}function Py(e,t){return!ut(e)&&Qe(e,["bpmn:IntermediateThrowEvent","bpmn:IntermediateCatchEvent"])&&!!t}function mv(e,t){ae.call(this,e);function n(r){return Ge(r.attachers,function(i){return w(i,"bpmn:BoundaryEvent")})}this.postExecute("connection.create",function(r){var i=r.context.source,o=r.context.target,a=n(o);w(i,"bpmn:EventBasedGateway")&&w(o,"bpmn:ReceiveTask")&&a.length>0&&t.removeElements(a)}),this.postExecute("connection.reconnect",function(r){var i=r.context.oldSource,o=r.context.newSource;w(i,"bpmn:Gateway")&&w(o,"bpmn:EventBasedGateway")&&z(o.outgoing,function(a){var s=a.target,c=n(s);w(s,"bpmn:ReceiveTask")&&c.length>0&&t.removeElements(c)})})}mv.$inject=["eventBus","modeling"];xe(mv,ae);function gv(e){e.invoke(ae,this),this.preExecute("shape.create",1500,function(t){var n=t.context,r=n.parent,i=n.shape;w(r,"bpmn:Lane")&&!w(i,"bpmn:Lane")&&(n.parent=fu(r,"bpmn:Participant"))})}gv.$inject=["injector"];xe(gv,ae);function yv(e,t){ae.call(this,e),this.preExecute("shape.create",function(n){var r=n.context,i=r.shape;if(w(i,"bpmn:DataObjectReference")&&i.type!=="label"){var o=t.create("bpmn:DataObject");i.businessObject.dataObjectRef=o}})}yv.$inject=["eventBus","bpmnFactory"];xe(yv,ae);var Ed=20,_d=20,Wx=30,sl=2e3;function bv(e,t,n){ae.call(this,t),t.on(["create.start","shape.move.start"],sl,function(i){var o=i.context,a=o.shape,s=e.getRootElement();if(!(!w(a,"bpmn:Participant")||!w(s,"bpmn:Process")||!s.children.length)){var c=s.children.filter(function(f){return!w(f,"bpmn:Group")&&!ut(f)&&!Pt(f)});if(c.length){var l=Zt(c),u=$D(a,l);W(a,u),o.createConstraints=jD(a,l)}}}),t.on("create.start",sl,function(i){var o=i.context,a=o.shape,s=e.getRootElement(),c=e.getGraphics(s);function l(u){u.element=s,u.gfx=c}w(a,"bpmn:Participant")&&w(s,"bpmn:Process")&&(t.on("element.hover",sl,l),t.once("create.cleanup",function(){t.off("element.hover",l)}))});function r(){var i=e.getRootElement();return w(i,"bpmn:Collaboration")?i:n.makeCollaboration()}this.preExecute("elements.create",sl,function(i){var o=i.elements,a=i.parent,s=FD(o),c;s&&w(a,"bpmn:Process")&&(i.parent=r(),c=i.hints=i.hints||{},c.participant=s,c.process=a,c.processRef=ce(s).get("processRef"))},!0),this.preExecute("shape.create",function(i){var o=i.parent,a=i.shape;w(a,"bpmn:Participant")&&w(o,"bpmn:Process")&&(i.parent=r(),i.process=o,i.processRef=ce(a).get("processRef"))},!0),this.execute("shape.create",function(i){var o=i.hints||{},a=i.process||o.process,s=i.shape,c=o.participant;a&&(!c||s===c)&&ce(s).set("processRef",ce(a))},!0),this.revert("shape.create",function(i){var o=i.hints||{},a=i.process||o.process,s=i.processRef||o.processRef,c=i.shape,l=o.participant;a&&(!l||c===l)&&ce(c).set("processRef",s)},!0),this.postExecute("shape.create",function(i){var o=i.hints||{},a=i.process||i.hints.process,s=i.shape,c=o.participant;if(a){var l=a.children.slice();c?s===c&&n.moveElements(l,{x:0,y:0},c):n.moveElements(l,{x:0,y:0},s)}},!0)}bv.$inject=["canvas","eventBus","modeling"];xe(bv,ae);function $D(e,t){t={width:t.width+Ed*2+Wx,height:t.height+_d*2};var n=Math.max(e.width,t.width),r=Math.max(e.height,t.height);return{x:-n/2,y:-r/2,width:n,height:r}}function jD(e,t){return t=Ae(t),{bottom:t.top+e.height/2-_d,left:t.right-e.width/2+Ed,top:t.bottom-e.height/2+_d,right:t.left+e.width/2-Ed-Wx}}function FD(e){return st(e,function(t){return w(t,"bpmn:Participant")})}var Ay="__targetRef_placeholder";function Ev(e,t){ae.call(this,e),this.executed(["connection.create","connection.delete","connection.move","connection.reconnect"],Oy(o)),this.reverted(["connection.create","connection.delete","connection.move","connection.reconnect"],Oy(o));function n(a,s,c){var l=a.get("dataInputAssociations");return st(l,function(u){return u!==c&&u.targetRef===s})}function r(a,s){var c=a.get("properties"),l=st(c,function(u){return u.name===Ay});return!l&&s&&(l=t.create("bpmn:Property",{name:Ay}),an(c,l)),l}function i(a,s){var c=r(a);c&&(n(a,c,s)||Qt(a.get("properties"),c))}function o(a){var s=a.context,c=s.connection,l=c.businessObject,u=c.target,f=u&&u.businessObject,p=s.newTarget,d=p&&p.businessObject,h=s.oldTarget||s.target,v=h&&h.businessObject,m=c.businessObject,_;v&&v!==f&&i(v,l),d&&d!==f&&i(d,l),f?(_=r(f,!0),m.targetRef=_):m.targetRef=null}}Ev.$inject=["eventBus","bpmnFactory"];xe(Ev,ae);function Oy(e){return function(t){var n=t.context,r=n.connection;if(w(r,"bpmn:DataInputAssociation"))return e(t)}}function lf(e){this._bpmnUpdater=e}lf.$inject=["bpmnUpdater"];lf.prototype.execute=function(e){var t=e.dataStoreBo,n=e.dataStoreDi,r=e.newSemanticParent,i=e.newDiParent;return e.oldSemanticParent=t.$parent,e.oldDiParent=n.$parent,this._bpmnUpdater.updateSemanticParent(t,r),this._bpmnUpdater.updateDiParent(n,i),[]};lf.prototype.revert=function(e){var t=e.dataStoreBo,n=e.dataStoreDi,r=e.oldSemanticParent,i=e.oldDiParent;return this._bpmnUpdater.updateSemanticParent(t,r),this._bpmnUpdater.updateDiParent(n,i),[]};function _v(e,t,n,r){ae.call(this,r),t.registerHandler("dataStore.updateContainment",lf);function i(){return n.filter(function(s){return w(s,"bpmn:Participant")&&ce(s).processRef})[0]}function o(s){return s.children.filter(function(c){return w(c,"bpmn:DataStoreReference")&&!c.labelTarget})}function a(s,c){var l=s.businessObject||s;if(c=c||i(),c){var u=c.businessObject||c;t.execute("dataStore.updateContainment",{dataStoreBo:l,dataStoreDi:at(s),newSemanticParent:u.processRef||u,newDiParent:at(c)})}}this.preExecute("shape.create",function(s){var c=s.context,l=c.shape;w(l,"bpmn:DataStoreReference")&&l.type!=="label"&&(c.hints||(c.hints={}),c.hints.autoResize=!1)}),this.preExecute("elements.move",function(s){var c=s.context,l=c.shapes,u=l.filter(function(f){return w(f,"bpmn:DataStoreReference")});u.length&&(c.hints||(c.hints={}),c.hints.autoResize=l.filter(function(f){return!w(f,"bpmn:DataStoreReference")}))}),this.postExecute("shape.create",function(s){var c=s.context,l=c.shape,u=l.parent;w(l,"bpmn:DataStoreReference")&&l.type!=="label"&&w(u,"bpmn:Collaboration")&&a(l)}),this.postExecute("shape.move",function(s){var c=s.context,l=c.shape,u=c.oldParent,f=l.parent;if(!w(u,"bpmn:Collaboration")&&w(l,"bpmn:DataStoreReference")&&l.type!=="label"&&w(f,"bpmn:Collaboration")){var p=w(u,"bpmn:Participant")?u:HD(u,"bpmn:Participant");a(l,p)}}),this.postExecute("shape.delete",function(s){var c=s.context,l=c.shape,u=e.getRootElement();Qe(l,["bpmn:Participant","bpmn:SubProcess"])&&w(u,"bpmn:Collaboration")&&o(u).filter(function(f){return BD(f,l)}).forEach(function(f){a(f)})}),this.postExecute("canvas.updateRoot",function(s){var c=s.context,l=c.oldRoot,u=c.newRoot,f=o(l);f.forEach(function(p){w(u,"bpmn:Process")&&a(p,u)})})}_v.$inject=["canvas","commandStack","elementRegistry","eventBus"];xe(_v,ae);function BD(e,t){for(var n=e.businessObject||e,r=t.businessObject||t;n.$parent;){if(n.$parent===r.processRef||r)return!0;n=n.$parent}return!1}function HD(e,t){for(;e.parent;){if(w(e.parent,t))return e.parent;e=e.parent}}var zD=500;function xv(e,t){ae.call(this,e);function n(r,i){var o=mo(i),a=[],s=[];if(ta(o,function(f){return f.y>r.y?s.push(f):a.push(f),f.children}),!!o.length){var c;s.length&&a.length?c=r.height/2:c=r.height;var l,u;a.length&&(l=t.calculateAdjustments(a,"y",c,r.y-10),t.makeSpace(l.movingShapes,l.resizingShapes,{x:0,y:c},"s")),s.length&&(u=t.calculateAdjustments(s,"y",-c,r.y+r.height+10),t.makeSpace(u.movingShapes,u.resizingShapes,{x:0,y:-c},"n"))}}this.postExecuted("shape.delete",zD,function(r){var i=r.context,o=i.hints,a=i.shape,s=i.oldParent;w(a,"bpmn:Lane")&&(o&&o.nested||n(a,s))})}xv.$inject=["eventBus","spaceTool"];xe(xv,ae);var My=500;function uf(e,t){t.invoke(ae,this),this._bpmnReplace=e;var n=this;this.postExecuted("elements.create",My,function(r){var i=r.elements;i.filter(function(o){var a=o.host;return Dy(o,a)}).map(function(o){return i.indexOf(o)}).forEach(function(o){r.elements[o]=n._replaceShape(i[o])})},!0),this.preExecute("elements.move",My,function(r){var i=r.shapes,o=r.newHost;i.forEach(function(a,s){var c=a.host;Dy(a,WD(i,c)?c:o)&&(i[s]=n._replaceShape(a))})},!0)}uf.$inject=["bpmnReplace","injector"];xe(uf,ae);uf.prototype._replaceShape=function(e){var t=VD(e),n;return t?n={type:"bpmn:IntermediateCatchEvent",eventDefinitionType:t.$type}:n={type:"bpmn:IntermediateThrowEvent"},this._bpmnReplace.replaceElement(e,n,{layoutConnection:!1})};function VD(e){var t=ce(e),n=t.eventDefinitions;return n&&n[0]}function Dy(e,t){return!ut(e)&&w(e,"bpmn:BoundaryEvent")&&!t}function WD(e,t){return e.indexOf(t)!==-1}function wv(e,t,n){ae.call(this,e);function r(i,o,a){var s=o.waypoints,c,l,u,f,p,d,h,v=i.outgoing.slice(),m=i.incoming.slice(),_;Le(a.width)?_=$e(a):_=a;var g=hd(s,_);if(g){if(c=s.slice(0,g.index),l=s.slice(g.index+(g.bendpoint?1:0)),!c.length||!l.length)return;u=g.bendpoint?s[g.index]:_,(c.length===1||!Iy(i,c[c.length-1]))&&c.push(Ny(u)),(l.length===1||!Iy(i,l[0]))&&l.unshift(Ny(u))}f=o.source,p=o.target,t.canConnect(f,i,o)&&(n.reconnectEnd(o,i,c||_),d=o),t.canConnect(i,p,o)&&(d?h=n.connect(i,p,{type:o.type,waypoints:l}):(n.reconnectStart(o,i,l||_),h=o));var y=[].concat(d&&Ge(m,function(b){return b.source===d.source})||[],h&&Ge(v,function(b){return b.target===h.target})||[]);y.length&&n.removeElements(y)}this.preExecute("elements.move",function(i){var o=i.newParent,a=i.shapes,s=i.delta,c=a[0];if(!(!c||!o)){o&&o.waypoints&&(i.newParent=o=o.parent);var l=$e(c),u={x:l.x+s.x,y:l.y+s.y},f=st(o.children,function(p){var d=t.canInsert(a,p);return d&&hd(p.waypoints,u)});f&&(i.targetFlow=f,i.position=u)}},!0),this.postExecuted("elements.move",function(i){var o=i.shapes,a=i.targetFlow,s=i.position;a&&r(o[0],a,s)},!0),this.preExecute("shape.create",function(i){var o=i.parent,a=i.shape;t.canInsert(a,o)&&(i.targetFlow=o,i.parent=o.parent)},!0),this.postExecuted("shape.create",function(i){var o=i.shape,a=i.targetFlow,s=i.position;a&&r(o,a,s)},!0)}xe(wv,ae);wv.$inject=["eventBus","bpmnRules","modeling"];function Iy(e,t){var n=t.x,r=t.y;return n>=e.x&&n<=e.x+e.width&&r>=e.y&&r<=e.y+e.height}function Ny(e){return W({},e)}function Sv(e,t){ae.call(this,e),this.preExecuted("connection.create",function(n){var r=n.context,i=r.connection,o=r.source,a=r.target,s=r.hints;if(!(s&&s.createElementsBehavior===!1)&&ma(i)){var c=[];w(o,"bpmn:EventBasedGateway")?c=a.incoming.filter(l=>l!==i&&ma(l)):c=a.incoming.filter(l=>l!==i&&ma(l)&&w(l.source,"bpmn:EventBasedGateway")),c.forEach(function(l){t.removeConnection(l)})}}),this.preExecuted("shape.replace",function(n){var r=n.context,i=r.newShape;if(w(i,"bpmn:EventBasedGateway")){var o=i.outgoing.filter(ma).reduce(function(a,s){return a.includes(s.target)?a:a.concat(s.target)},[]);o.forEach(function(a){a.incoming.filter(ma).forEach(function(s){const c=a.incoming.filter(ma).filter(function(l){return l.source===i});(s.source!==i||c.length>1)&&t.removeConnection(s)})})}})}Sv.$inject=["eventBus","modeling"];xe(Sv,ae);function ma(e){return w(e,"bpmn:SequenceFlow")}var cl=1500,UD=2e3;function Ux(e,t,n){t.on(["create.hover","create.move","create.out","create.end","shape.move.hover","shape.move.move","shape.move.out","shape.move.end"],cl,function(r){var i=r.context,o=i.shape||r.shape,a=r.hover;w(a,"bpmn:Lane")&&!Qe(o,["bpmn:Lane","bpmn:Participant"])&&(r.hover=Vr(a),r.hoverGfx=e.getGraphics(r.hover));var s=n.getRootElement();a!==s&&(o.labelTarget||w(o,"bpmn:Group"))&&(r.hover=s,r.hoverGfx=e.getGraphics(r.hover))}),t.on(["connect.hover","connect.out","connect.end","connect.cleanup","global-connect.hover","global-connect.out","global-connect.end","global-connect.cleanup"],cl,function(r){var i=r.hover;w(i,"bpmn:Lane")&&(r.hover=Vr(i)||i,r.hoverGfx=e.getGraphics(r.hover))}),t.on(["bendpoint.move.hover"],cl,function(r){var i=r.context,o=r.hover,a=i.type;w(o,"bpmn:Lane")&&/reconnect/.test(a)&&(r.hover=Vr(o)||o,r.hoverGfx=e.getGraphics(r.hover))}),t.on(["connect.start"],cl,function(r){var i=r.context,o=i.start;w(o,"bpmn:Lane")&&(i.start=Vr(o)||o)}),t.on("shape.move.start",UD,function(r){var i=r.shape;w(i,"bpmn:Lane")&&(r.shape=Vr(i)||i)})}Ux.$inject=["elementRegistry","eventBus","canvas"];function GD(e){return e.create("bpmn:Category")}function qD(e){return e.create("bpmn:CategoryValue")}function YD(e,t,n){return an(t.get("categoryValue"),e),e.$parent=t,an(n.get("rootElements"),t),t.$parent=n,e}function KD(e){var t=e.$parent;return t&&(Qt(t.get("categoryValue"),e),e.$parent=null),e}function XD(e){var t=e.$parent;return t&&(Qt(t.get("rootElements"),e),e.$parent=null),e}var ky=770;function Cv(e,t,n,r,i,o){i.invoke(ae,this);function a(){return n.filter(function(h){return w(h,"bpmn:Group")})}function s(h,v){return h.some(function(m){var _=ce(m),g=_.categoryValueRef&&_.categoryValueRef.$parent;return g===v})}function c(h,v){return h.some(function(m){var _=ce(m);return _.categoryValueRef===v})}function l(h,v,m){var _=a().filter(function(g){return g.businessObject!==m});v&&!s(_,v)&&XD(v),h&&!c(_,h)&&KD(h)}function u(h,v){return YD(h,v,t.getDefinitions())}function f(h,v){var m=ce(h),_=m.categoryValueRef;_||(_=m.categoryValueRef=v.categoryValue=v.categoryValue||qD(e));var g=_.$parent;g||(g=_.$parent=v.category=v.category||GD(e)),u(_,g,t.getDefinitions())}function p(h,v){var m=v.category,_=v.categoryValue,g=ce(h);_?(g.categoryValueRef=null,l(_,m,g)):l(null,g.categoryValueRef.$parent,g)}this.execute("label.create",function(h){var v=h.context,m=v.labelTarget;w(m,"bpmn:Group")&&f(m,v)}),this.revert("label.create",function(h){var v=h.context,m=v.labelTarget;w(m,"bpmn:Group")&&p(m,v)}),this.execute("shape.delete",function(h){var v=h.context,m=v.shape,_=ce(m);if(!(!w(m,"bpmn:Group")||m.labelTarget)){var g=v.categoryValue=_.categoryValueRef,y;g&&(y=v.category=g.$parent,l(g,y,_),_.categoryValueRef=null)}}),this.reverted("shape.delete",function(h){var v=h.context,m=v.shape;if(!(!w(m,"bpmn:Group")||m.labelTarget)){var _=v.category,g=v.categoryValue,y=ce(m);g&&(y.categoryValueRef=g,u(g,_))}}),this.execute("shape.create",function(h){var v=h.context,m=v.shape;!w(m,"bpmn:Group")||m.labelTarget||ce(m).categoryValueRef&&f(m,v)}),this.reverted("shape.create",function(h){var v=h.context,m=v.shape;!w(m,"bpmn:Group")||m.labelTarget||ce(m).categoryValueRef&&p(m,v)});function d(h,v){var m=e.create(h.$type);return o.copyElement(h,m,null,v)}r.on("copyPaste.copyElement",ky,function(h){var v=h.descriptor,m=h.element;if(!(!w(m,"bpmn:Group")||m.labelTarget)){var _=ce(m);if(_.categoryValueRef){var g=_.categoryValueRef;v.categoryValue=d(g,!0),g.$parent&&(v.category=d(g.$parent,!0))}}}),r.on("copyPaste.pasteElement",ky,function(h){var v=h.descriptor,m=v.businessObject,_=v.categoryValue,g=v.category;_&&(_=m.categoryValueRef=d(_)),g&&(_.$parent=d(g)),delete v.category,delete v.categoryValue})}Cv.$inject=["bpmnFactory","bpmnjs","elementRegistry","eventBus","injector","moddleCopy"];xe(Cv,ae);function xd(e,t,n,r){var i,o,a,s,c;return i=(r.y-n.y)*(t.x-e.x)-(r.x-n.x)*(t.y-e.y),i==0?null:(o=e.y-n.y,a=e.x-n.x,c=(r.x-n.x)*o-(r.y-n.y)*a,s=c/i,{x:Math.round(e.x+s*(t.x-e.x)),y:Math.round(e.y+s*(t.y-e.y))})}function Gx(e){function t(r,i,o){var a={x:o.x,y:o.y-50},s={x:o.x-50,y:o.y},c=xd(r,i,o,a),l=xd(r,i,o,s),u;c&&l?Ly(c,o)>Ly(l,o)?u=l:u=c:u=c||l,r.original=u}function n(r){var i=r.waypoints;t(i[0],i[1],$e(r.source)),t(i[i.length-1],i[i.length-2],$e(r.target))}e.on("bpmnElement.added",function(r){var i=r.element;i.waypoints&&n(i)})}Gx.$inject=["eventBus"];function Ly(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Tv(e){ae.call(this,e);var t=["bpmn:Participant","bpmn:Lane"];this.executed(["shape.move","shape.create","shape.resize"],function(n){var r=n.context.shape,i=ce(r),o=at(r);Qe(i,t)&&!o.get("isHorizontal")&&o.set("isHorizontal",!0)})}Tv.$inject=["eventBus"];xe(Tv,ae);var qx=Math.sqrt,Yx=Math.min,ZD=Math.max,$y=Math.abs;function jy(e){return Math.pow(e,2)}function _s(e,t){return qx(jy(e.x-t.x)+jy(e.y-t.y))}function QD(e,t){var n=0,r,i,o,a,s,c,l,u,f,p,d;for(n=0;n line intersections");l.length===1&&(u={type:"bendpoint",position:l[0],segmentIndex:n,bendpointIndex:By(r,l[0])?n:n+1}),l.length===2&&(s=tI(l[0],l[1]),u={type:"segment",position:s,segmentIndex:n,relativeLocation:_s(r,s)/_s(r,i)}),f=_s(u.position,e),(!d||p>f)&&(d=u,p=f)}return d}function JD(e,t,n,r){var i=t.x-e.x,o=t.y-e.y,a=n.x-e.x,s=n.y-e.y,c=i*i+o*o,l=i*a+o*s,u=a*a+s*s-r*r,f=l/c,p=u/c,d=f*f-p;if(d<0&&d>-1e-6&&(d=0),d<0)return[];var h=qx(d),v=-f+h,m=-f-h,_={x:e.x-i*v,y:e.y-o*v};if(d===0)return[_];var g={x:e.x-i*m,y:e.y-o*m};return[_,g].filter(function(y){return eI(y,e,t)})}function eI(e,t,n){return Fy(e.x,t.x,n.x)&&Fy(e.y,t.y,n.y)}function Fy(e,t,n){return e>=Yx(t,n)-mu&&e<=ZD(t,n)+mu}function tI(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}var mu=.1;function By(e,t){return $y(e.x-t.x)<=mu&&$y(e.y-t.y)<=mu}function nI(e,t,n,r){var i=n.segmentIndex,o=t.length-e.length;if(r.segmentMove){var a=r.segmentMove.segmentStartIndex,s=r.segmentMove.newSegmentStartIndex;return i===a?s:i>=s?i+o=l&&(u=c?i+1:i-1),it.length-2||l===null)return a;var u=Hy(n,c),f=Hy(t,l),p=s.position,d=iI(u,p),h=rI(u,f);if(s.type==="bendpoint"){var v=t.length-n.length,m=s.bendpointIndex,_=n[m];if(t.indexOf(_)!==-1)return a;if(v===0){var g=t[m];return i=g.x-s.position.x,o=g.y-s.position.y,{delta:{x:i,y:o},point:{x:e.x+i,y:e.y+o}}}v<0&&m!==0&&m{ce(a.context.element)===a.context.moddleElement&&i(a)});function i(a){var s=a.context,c=s.element,l=s.properties;if(Vy in l&&t.updateLabel(c,l[Vy]),Wy in l&&w(c,"bpmn:TextAnnotation")){var u=r.getTextAnnotationBounds({x:c.x,y:c.y,width:c.width,height:c.height},l[Wy]||"");t.updateLabel(c,l.text,u)}}this.postExecute(["shape.create","connection.create"],function(a){var s=a.context,c=s.hints||{};if(c.createElementsBehavior!==!1){var l=s.shape||s.connection;ut(l)||!Yo(l)||Cr(l)&&t.updateLabel(l,Cr(l))}}),this.postExecute("shape.delete",function(a){var s=a.context,c=s.labelTarget,l=s.hints||{};c&&l.unsetLabel!==!1&&t.updateLabel(c,null,null,{removeShape:!1})});function o(a){var s=a.context,c=s.connection,l=c.label,u=W({},s.hints),f=s.newWaypoints||c.waypoints,p=s.oldWaypoints;return typeof u.startChanged>"u"&&(u.startChanged=!!u.connectionStart),typeof u.endChanged>"u"&&(u.endChanged=!!u.connectionEnd),oI(l,f,p,u)}this.postExecute(["connection.layout","connection.updateWaypoints"],function(a){var s=a.context,c=s.hints||{};if(c.labelBehavior!==!1){var l=s.connection,u=l.label,f;!u||!u.parent||(f=o(a),t.moveShape(u,f))}}),this.postExecute(["shape.replace"],function(a){var s=a.context,c=s.newShape,l=s.oldShape,u=ce(c);u&&Yo(u)&&l.label&&c.label&&(c.label.x=l.label.x,c.label.y=l.label.y)}),this.postExecute("shape.resize",function(a){var s=a.context,c=s.shape,l=s.newBounds,u=s.oldBounds;if(Hu(c)){var f=c.label,p=$e(f),d=pI(u),h=fI(p,d),v=uI(h,u,l);t.moveShape(f,v)}})}xe(Rv,ae);Rv.$inject=["eventBus","modeling","bpmnFactory","textRenderer"];function uI(e,t,n){var r=Sc(e,t,n);return Oi(Gr(r,e))}function fI(e,t){if(t.length){var n=dI(e,t);return iv(e,n)}}function pI(e){return[[{x:e.x,y:e.y},{x:e.x+(e.width||0),y:e.y}],[{x:e.x+(e.width||0),y:e.y},{x:e.x+(e.width||0),y:e.y+(e.height||0)}],[{x:e.x,y:e.y+(e.height||0)},{x:e.x+(e.width||0),y:e.y+(e.height||0)}],[{x:e.x,y:e.y},{x:e.x,y:e.y+(e.height||0)}]]}function dI(e,t){var n=t.map(function(i){return{line:i,distance:cx(e,i)}}),r=Yr(n,"distance");return r[0].line}function hI(e,t,n,r){return Kx(e,t,n,r).point}function Pv(e,t){ae.call(this,e);function n(r,i){var o=r.context,a=o.connection,s=W({},o.hints),c=o.newWaypoints||a.waypoints,l=o.oldWaypoints;return typeof s.startChanged>"u"&&(s.startChanged=!!s.connectionStart),typeof s.endChanged>"u"&&(s.endChanged=!!s.connectionEnd),hI(i,c,l,s)}this.postExecute(["connection.layout","connection.updateWaypoints"],function(r){var i=r.context,o=i.connection,a=o.outgoing,s=o.incoming;s.forEach(function(c){var l=c.waypoints[c.waypoints.length-1],u=n(r,l),f=[].concat(c.waypoints.slice(0,-1),[u]);t.updateWaypoints(c,f)}),a.forEach(function(c){var l=c.waypoints[0],u=n(r,l),f=[].concat([u],c.waypoints.slice(1));t.updateWaypoints(c,f)})}),this.postExecute(["connection.move"],function(r){var i=r.context,o=i.connection,a=o.outgoing,s=o.incoming,c=i.delta;s.forEach(function(l){var u=l.waypoints[l.waypoints.length-1],f={x:u.x+c.x,y:u.y+c.y},p=[].concat(l.waypoints.slice(0,-1),[f]);t.updateWaypoints(l,p)}),a.forEach(function(l){var u=l.waypoints[0],f={x:u.x+c.x,y:u.y+c.y},p=[].concat([f],l.waypoints.slice(1));t.updateWaypoints(l,p)})})}xe(Pv,ae);Pv.$inject=["eventBus","modeling"];function ff(e,t,n){var r=df(e),i=Qx(r,t),o=r[0];return i.length?i[i.length-1]:Sc(o.original||o,n,t)}function pf(e,t,n){var r=df(e),i=Qx(r,t),o=r[r.length-1];return i.length?i[0]:Sc(o.original||o,n,t)}function Av(e,t,n){var r=df(e),i=Zx(t,n),o=r[0];return Sc(o.original||o,i,t)}function Ov(e,t,n){var r=df(e),i=Zx(t,n),o=r[r.length-1];return Sc(o.original||o,i,t)}function Zx(e,t){return{x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height}}function df(e){var t=e.waypoints;if(!t.length)throw new Error("connection#"+e.id+": no waypoints");return t}function Qx(e,t){var n=mn(e,mI);return Ge(n,function(r){return vI(r,t)})}function vI(e,t){return In(t,e,1)==="intersect"}function mI(e){return e.original||e}function Mv(e,t){ae.call(this,e),this.postExecute("shape.replace",function(n){var r=n.oldShape,i=n.newShape;if(gI(r,i)){var o=yI(r);o.incoming.forEach(function(a){var s=pf(a,i,r);t.reconnectEnd(a,i,s)}),o.outgoing.forEach(function(a){var s=ff(a,i,r);t.reconnectStart(a,i,s)})}},!0)}Mv.$inject=["eventBus","modeling"];xe(Mv,ae);function gI(e,t){return w(e,"bpmn:Participant")&&ot(e)&&w(t,"bpmn:Participant")&&!ot(t)}function yI(e){var t=oc([e],!1),n=[],r=[];return t.forEach(function(i){i!==e&&(i.incoming.forEach(function(o){w(o,"bpmn:MessageFlow")&&n.push(o)}),i.outgoing.forEach(function(o){w(o,"bpmn:MessageFlow")&&r.push(o)}))},[]),{incoming:n,outgoing:r}}function Dv(e,t){ae.call(this,e),this.preExecute("shape.resize",function(n){var r=n.shape,i=at(r),o=i&&i.get("label"),a=o&&o.get("bounds");a&&t.updateModdleProperties(r,o,{bounds:void 0})},!0)}xe(Dv,ae);Dv.$inject=["eventBus","modeling"];function Iv(e,t,n){ae.call(this,e),this.preExecute("shape.delete",function(r){var i=r.context.shape;if(!(i.incoming.length!==1||i.outgoing.length!==1)){var o=i.incoming[0],a=i.outgoing[0];if(!(!w(o,"bpmn:SequenceFlow")||!w(a,"bpmn:SequenceFlow"))&&t.canConnect(o.source,a.target,o)){var s=bI(o.waypoints,a.waypoints);n.reconnectEnd(o,a.target,s)}}})}xe(Iv,ae);Iv.$inject=["eventBus","bpmnRules","modeling"];function ga(e){return e.original||e}function bI(e,t){var n=xd(ga(e[e.length-2]),ga(e[e.length-1]),ga(t[1]),ga(t[0]));return n?[].concat(e.slice(0,e.length-1),[n],t.slice(1)):[ga(e[0]),ga(t[t.length-1])]}function Nv(e,t){ae.call(this,e),this.preExecute("shape.delete",function(n){var r=n.shape,i=r.parent;w(r,"bpmn:Participant")&&(n.collaborationRoot=i)},!0),this.postExecute("shape.delete",function(n){var r=n.collaborationRoot;r&&!r.businessObject.participants.length&&t.makeProcess()},!0)}Nv.$inject=["eventBus","modeling"];xe(Nv,ae);function kv(e,t,n,r){ae.call(this,e);var i=r.get("dragging",!1);function o(c){var l=c.source,u=c.target,f=c.parent;if(f){var p,d;w(c,"bpmn:SequenceFlow")&&(n.canConnectSequenceFlow(l,u)||(d=!0),n.canConnectMessageFlow(l,u)&&(p="bpmn:MessageFlow")),w(c,"bpmn:MessageFlow")&&(n.canConnectMessageFlow(l,u)||(d=!0),n.canConnectSequenceFlow(l,u)&&(p="bpmn:SequenceFlow")),w(c,"bpmn:Association")&&!n.canConnectAssociation(l,u)&&(d=!0),d&&t.removeConnection(c),p&&t.connect(l,u,{type:p,waypoints:c.waypoints.slice()})}}function a(c){var l=c.context,u=l.connection,f=l.newSource||u.source,p=l.newTarget||u.target,d,h;d=n.canConnect(f,p),!(!d||d.type===u.type)&&(h=t.connect(f,p,{type:d.type,waypoints:u.waypoints.slice()}),t.removeConnection(u),l.connection=h,i&&s(u,h))}function s(c,l){var u=i.context(),f=u&&u.payload.previousSelection,p;!f||!f.length||(p=f.indexOf(c),p!==-1&&f.splice(p,1,l))}this.postExecuted("elements.move",function(c){var l=c.closure,u=l.allConnections;z(u,o)},!0),this.preExecute("connection.reconnect",a),this.postExecuted("element.updateProperties",function(c){var l=c.context,u=l.properties,f=l.element,p=f.businessObject,d;u.default&&(d=st(f.outgoing,Ur({id:f.businessObject.default.id})),d&&t.updateProperties(d,{conditionExpression:void 0})),u.conditionExpression&&p.sourceRef.default===p&&t.updateProperties(f.source,{default:void 0})})}xe(kv,ae);kv.$inject=["eventBus","modeling","bpmnRules","injector"];function hf(e,t,n,r,i,o){r.invoke(ae,this),this._bpmnReplace=e,this._elementRegistry=n,this._selection=o,this.postExecuted(["elements.create"],500,function(a){var s=a.context,c=s.parent,l=s.elements,u=nr(l,function(f,p){var d=t.canReplace([p],p.host||p.parent||c);return d?f.concat(d.replacements):f},[]);u.length&&this._replaceElements(l,u)},this),this.postExecuted(["elements.move"],500,function(a){var s=a.context,c=s.newParent,l=s.newHost,u=[];z(s.closure.topLevel,function(p){er(p)?u=u.concat(p.children):u=u.concat(p)}),u.length===1&&l&&(c=l);var f=t.canReplace(u,c);f&&this._replaceElements(u,f.replacements,l)},this),this.postExecute(["shape.replace"],1500,function(a){var s=a.context,c=s.oldShape,l=s.newShape,u=c.attachers,f;u&&u.length&&(f=t.canReplace(u,l),this._replaceElements(u,f.replacements))},this),this.postExecuted(["shape.replace"],1500,function(a){var s=a.context,c=s.oldShape,l=s.newShape;i.unclaimId(c.businessObject.id,c.businessObject),i.updateProperties(l,{id:c.id})})}xe(hf,ae);hf.prototype._replaceElements=function(e,t){var n=this._elementRegistry,r=this._bpmnReplace,i=this._selection;z(t,function(o){var a={type:o.newElementType},s=n.get(o.oldElementId),c=e.indexOf(s);e[c]=r.replaceElement(s,a,{select:!1})}),t&&i.select(e)};hf.$inject=["bpmnReplace","bpmnRules","elementRegistry","injector","modeling","selection"];var EI=1500,_I={width:140,height:120},ko={width:300,height:60},Ys={width:300,height:150},Jx={width:140,height:120},ew={width:50,height:30};function tw(e){e.on("resize.start",EI,function(t){var n=t.context,r=n.shape,i=n.direction,o=n.balanced;(w(r,"bpmn:Lane")||w(r,"bpmn:Participant"))&&(n.resizeConstraints=PI(r,i,o)),w(r,"bpmn:Participant")&&(n.minDimensions=Ys),w(r,"bpmn:SubProcess")&&ot(r)&&(n.minDimensions=Jx),w(r,"bpmn:TextAnnotation")&&(n.minDimensions=ew)})}tw.$inject=["eventBus"];var ll=Math.abs,xI=Math.min,wI=Math.max;function nw(e,t,n,r){var i=e[t];e[t]=i===void 0?n:r(n,i)}function ul(e,t,n){return nw(e,t,n,xI)}function fl(e,t,n){return nw(e,t,n,wI)}var SI=20,CI=50,TI=20,RI=20;function PI(e,t,n){var r=Vr(e),i=!0,o=!0,a=nf(r,[r]),s=Ae(e),c={},l={};/e/.test(t)?l.right=s.left+ko.width:/w/.test(t)&&(l.left=s.right-ko.width),a.forEach(function(f){var p=Ae(f);/n/.test(t)&&(p.tops.bottom+10&&(o=!1),n&&ll(s.bottom-p.top)<10&&ul(c,"bottom",p.bottom-ko.height),ll(s.bottom-p.bottom)<5&&fl(l,"bottom",p.top+ko.height))});var u=r.children.filter(function(f){return!f.hidden&&!f.waypoints&&(w(f,"bpmn:FlowElement")||w(f,"bpmn:Artifact"))});return u.forEach(function(f){var p=Ae(f);i&&/n/.test(t)&&ul(l,"top",p.top-TI),/e/.test(t)&&fl(l,"right",p.right+SI),o&&/s/.test(t)&&fl(l,"bottom",p.bottom+RI),/w/.test(t)&&ul(l,"left",p.left-CI)}),{min:l,max:c}}var Uy=1001;function rw(e,t){e.on("resize.start",Uy+500,function(n){var r=n.context,i=r.shape;(w(i,"bpmn:Lane")||w(i,"bpmn:Participant"))&&(r.balanced=!Ko(n))}),e.on("resize.end",Uy,function(n){var r=n.context,i=r.shape,o=r.canExecute,a=r.newBounds;if(w(i,"bpmn:Lane")||w(i,"bpmn:Participant"))return o&&(a=TE(a),t.resizeLane(i,a,r.balanced)),!1})}rw.$inject=["eventBus","modeling"];var AI=500;function Lv(e,t,n,r,i){n.invoke(ae,this);function o(u){return Qe(u,["bpmn:ReceiveTask","bpmn:SendTask"])||OI(u,["bpmn:ErrorEventDefinition","bpmn:EscalationEventDefinition","bpmn:MessageEventDefinition","bpmn:SignalEventDefinition"])}function a(u){var f=e.getDefinitions(),p=f.get("rootElements");return!!st(p,Ur({id:u.id}))}function s(u){if(w(u,"bpmn:ErrorEventDefinition"))return"errorRef";if(w(u,"bpmn:EscalationEventDefinition"))return"escalationRef";if(w(u,"bpmn:MessageEventDefinition"))return"messageRef";if(w(u,"bpmn:SignalEventDefinition"))return"signalRef"}function c(u){if(Qe(u,["bpmn:ReceiveTask","bpmn:SendTask"]))return u.get("messageRef");var f=u.get("eventDefinitions"),p=f[0];return p.get(s(p))}function l(u,f){if(Qe(u,["bpmn:ReceiveTask","bpmn:SendTask"]))return u.set("messageRef",f);var p=u.get("eventDefinitions"),d=p[0];return d.set(s(d),f)}this.executed(["shape.create","element.updateProperties","element.updateModdleProperties"],function(u){var f=u.shape||u.element;if(o(f)){var p=ce(f),d=c(p),h;d&&!a(d)&&(h=e.getDefinitions().get("rootElements"),an(h,d),u.addedRootElement=d)}},!0),this.reverted(["shape.create","element.updateProperties","element.updateModdleProperties"],function(u){var f=u.addedRootElement;if(f){var p=e.getDefinitions().get("rootElements");Qt(p,f)}},!0),t.on("copyPaste.copyElement",function(u){var f=u.descriptor,p=u.element;if(!(p.labelTarget||!o(p))){var d=ce(p),h=c(d);h&&(f.referencedRootElement=h)}}),t.on("copyPaste.pasteElement",AI,function(u){var f=u.descriptor,p=f.businessObject,d=f.referencedRootElement;d&&(a(d)||(d=r.copyElement(d,i.create(d.$type))),l(p,d),delete f.referencedRootElement)})}Lv.$inject=["bpmnjs","eventBus","injector","moddleCopy","bpmnFactory"];xe(Lv,ae);function OI(e,t){return qe(t)||(t=[t]),Ni(t,function(n){return Bu(e,n)})}var MI=Math.max;function iw(e){e.on("spaceTool.getMinDimensions",function(t){var n=t.shapes,r=t.axis,i=t.start,o={};return z(n,function(a){var s=a.id;w(a,"bpmn:Participant")&&(DI(r)?o[s]=Ys:o[s]={width:Ys.width,height:II(a,i)}),w(a,"bpmn:SubProcess")&&ot(a)&&(o[s]=Jx),w(a,"bpmn:TextAnnotation")&&(o[s]=ew),w(a,"bpmn:Group")&&(o[s]=_I)}),o})}iw.$inject=["eventBus"];function DI(e){return e==="x"}function II(e,t){var n;return NI(e)?(n=kI(e,t),MI(Ys.height,n)):Ys.height}function NI(e){return!!mo(e).length}function kI(e,t){var n=mo(e),r;return r=ow(n,t),e.height-r.height+ko.height}function ow(e,t){var n,r,i;for(n=0;n=r.y&&t<=r.y+r.height)return i=mo(r),i.length?ow(i,t):r}var Gy=400,LI=600,qy={x:180,y:160};function bo(e,t,n,r,i,o,a){ae.call(this,t),this._canvas=e,this._eventBus=t,this._modeling=n,this._elementFactory=r,this._bpmnFactory=i,this._bpmnjs=o,this._elementRegistry=a;var s=this;function c(f){return w(f,"bpmn:SubProcess")&&!ot(f)}function l(f){var p=f.shape,d=f.newRootElement,h=ce(p);d=s._addDiagram(d||h),f.newRootElement=e.addRootElement(d)}function u(f){var p=f.shape,d=ce(p);s._removeDiagram(d);var h=f.newRootElement=a.get(Ri(d));e.removeRootElement(h)}this.executed("shape.create",function(f){var p=f.shape;c(p)&&l(f)},!0),this.postExecuted("shape.create",function(f){var p=f.shape,d=f.newRootElement;!d||!p.children||(s._showRecursively(p.children),s._moveChildrenToShape(p,d))},!0),this.reverted("shape.create",function(f){var p=f.shape;c(p)&&u(f)},!0),this.preExecuted("shape.delete",function(f){var p=f.shape;if(c(p)){var d=a.get(Ri(p));d&&n.removeElements(d.children.slice())}},!0),this.executed("shape.delete",function(f){var p=f.shape;c(p)&&u(f)},!0),this.reverted("shape.delete",function(f){var p=f.shape;c(p)&&l(f)},!0),this.preExecuted("shape.replace",function(f){var p=f.oldShape,d=f.newShape;!c(p)||!c(d)||(f.oldRoot=e.removeRootElement(Ri(p)))},!0),this.postExecuted("shape.replace",function(f){var p=f.newShape,d=f.oldRoot,h=e.findRoot(Ri(p));if(!(!d||!h)){var v=d.children;n.moveElements(v,{x:0,y:0},h)}},!0),this.executed("element.updateProperties",function(f){var p=f.element;if(w(p,"bpmn:SubProcess")){var d=f.properties,h=f.oldProperties,v=h.id,m=d.id;if(v!==m){if(ep(p)){a.updateId(p,Mo(m)),a.updateId(v,m);return}var _=a.get(Mo(v));_&&a.updateId(Mo(v),Mo(m))}}},!0),this.reverted("element.updateProperties",function(f){var p=f.element;if(w(p,"bpmn:SubProcess")){var d=f.properties,h=f.oldProperties,v=h.id,m=d.id;if(v!==m){if(ep(p)){a.updateId(p,Mo(v)),a.updateId(m,v);return}var _=a.get(Mo(m));_&&a.updateId(_,Mo(v))}}},!0),t.on("element.changed",function(f){var p=f.element;if(ep(p)){var d=p,h=a.get(hg(d));!h||h===d||t.fire("element.changed",{element:h})}}),this.executed("shape.toggleCollapse",Gy,function(f){var p=f.shape;w(p,"bpmn:SubProcess")&&(ot(p)?u(f):(l(f),s._showRecursively(p.children)))},!0),this.reverted("shape.toggleCollapse",Gy,function(f){var p=f.shape;w(p,"bpmn:SubProcess")&&(ot(p)?u(f):(l(f),s._showRecursively(p.children)))},!0),this.postExecuted("shape.toggleCollapse",LI,function(f){var p=f.shape;if(w(p,"bpmn:SubProcess")){var d=f.newRootElement;d&&(ot(p)?s._moveChildrenToShape(d,p):s._moveChildrenToShape(p,d))}},!0),t.on("copyPaste.createTree",function(f){var p=f.element,d=f.children;if(c(p)){var h=Ri(p),v=a.get(h);v&&d.push.apply(d,v.children)}}),t.on("copyPaste.copyElement",function(f){var p=f.descriptor,d=f.element,h=f.elements,v=d.parent,m=w(at(v),"bpmndi:BPMNPlane");if(m){var _=hg(v),g=st(h,function(y){return y.id===_});g&&(p.parent=g.id)}}),t.on("copyPaste.pasteElement",function(f){var p=f.descriptor;p.parent&&(c(p.parent)||p.parent.hidden)&&(p.hidden=!0)})}xe(bo,ae);bo.prototype._moveChildrenToShape=function(e,t){var n=this._modeling,r=e.children,i;if(r){r=r.concat(r.reduce(function(l,u){return u.label&&u.label.parent!==e?l.concat(u.label):l},[]));var o=r.filter(function(l){return!l.hidden});if(!o.length){n.moveElements(r,{x:0,y:0},t,{autoResize:!1});return}var a=Zt(o);if(!t.x)i={x:qy.x-a.x,y:qy.y-a.y};else{var s=$e(t),c=$e(a);i={x:s.x-c.x,y:s.y-c.y}}n.moveElements(r,i,t,{autoResize:!1})}};bo.prototype._showRecursively=function(e,t){var n=this,r=[];return e.forEach(function(i){i.hidden=!!t,r=r.concat(i),i.children&&(r=r.concat(n._showRecursively(i.children,i.collapsed||t)))}),r};bo.prototype._addDiagram=function(e){var t=this._bpmnjs,n=t.getDefinitions().diagrams;return e.businessObject||(e=this._createNewDiagram(e)),n.push(e.di.$parent),e};bo.prototype._createNewDiagram=function(e){var t=this._bpmnFactory,n=this._elementFactory,r=t.create("bpmndi:BPMNPlane",{bpmnElement:e}),i=t.create("bpmndi:BPMNDiagram",{plane:r});r.$parent=i;var o=n.createRoot({id:Ri(e),type:e.$type,di:r,businessObject:e,collapsed:!0});return o};bo.prototype._removeDiagram=function(e){var t=this._bpmnjs,n=t.getDefinitions().diagrams,r=st(n,function(i){return i.plane.bpmnElement.id===e.id});return n.splice(n.indexOf(r),1),r};bo.$inject=["canvas","eventBus","modeling","elementFactory","bpmnFactory","bpmnjs","elementRegistry"];function $v(e,t){e.invoke(ae,this),this.postExecuted("shape.replace",function(n){var r=n.context.oldShape,i=n.context.newShape;if(!(!w(i,"bpmn:SubProcess")||!(w(r,"bpmn:Task")||w(r,"bpmn:CallActivity"))||!ot(i))){var o=$I(i);t.createShape({type:"bpmn:StartEvent"},o,i)}})}$v.$inject=["injector","modeling"];xe($v,ae);function $I(e){return{x:e.x+e.width/6,y:e.y+e.height/2}}function jv(e,t){ae.call(this,e),this.postExecuted("shape.toggleCollapse",1500,function(n){var r=n.shape;if(ot(r))return;var i=oc(r);i.forEach(function(a){var s=a.incoming.slice(),c=a.outgoing.slice();z(s,function(l){o(l,!0)}),z(c,function(l){o(l,!1)})});function o(a,s){i.indexOf(a.source)!==-1&&i.indexOf(a.target)!==-1||(s?t.reconnectEnd(a,r,$e(r)):t.reconnectStart(a,r,$e(r)))}},!0)}xe(jv,ae);jv.$inject=["eventBus","modeling"];var pp=500;function Fv(e,t,n){ae.call(this,e);function r(a){a.length&&a.forEach(function(s){s.type==="label"&&!s.businessObject.name&&(s.hidden=!0)})}function i(a,s){var c=a.children,l=s,u,f;return u=jI(c).concat([a]),f=Dx(u),f?(l.width=Math.max(f.width,l.width),l.height=Math.max(f.height,l.height),l.x=f.x+(f.width-l.width)/2,l.y=f.y+(f.height-l.height)/2):(l.x=a.x+(a.width-l.width)/2,l.y=a.y+(a.height-l.height)/2),l}function o(a,s){return{x:a.x+(a.width-s.width)/2,y:a.y+(a.height-s.height)/2,width:s.width,height:s.height}}this.executed(["shape.toggleCollapse"],pp,function(a){var s=a.context,c=s.shape;w(c,"bpmn:SubProcess")&&(c.collapsed?at(c).isExpanded=!1:(r(c.children),at(c).isExpanded=!0))}),this.reverted(["shape.toggleCollapse"],pp,function(a){var s=a.context,c=s.shape;c.collapsed?at(c).isExpanded=!1:at(c).isExpanded=!0}),this.postExecuted(["shape.toggleCollapse"],pp,function(a){var s=a.context.shape,c=t.getDefaultSize(s),l;s.collapsed?l=o(s,c):l=i(s,c),n.resizeShape(s,l,null,{autoResize:s.collapsed?!1:"nwse"})})}xe(Fv,ae);Fv.$inject=["eventBus","elementFactory","modeling"];function jI(e){return e.filter(function(t){return!t.hidden})}function Bv(e,t,n,r){t.invoke(ae,this),this.preExecute("shape.delete",function(i){var o=i.context,a=o.shape,s=a.businessObject;ut(a)||(w(a,"bpmn:Participant")&&ot(a)&&n.ids.unclaim(s.processRef.id),r.unclaimId(s.id,s))}),this.preExecute("connection.delete",function(i){var o=i.context,a=o.connection,s=a.businessObject;r.unclaimId(s.id,s)}),this.preExecute("canvas.updateRoot",function(){var i=e.getRootElement(),o=i.businessObject;w(i,"bpmn:Collaboration")&&n.ids.unclaim(o.id)})}xe(Bv,ae);Bv.$inject=["canvas","injector","moddle","modeling"];function Hv(e,t){ae.call(this,e),this.preExecute("connection.delete",function(n){var r=n.context,i=r.connection,o=i.source;FI(i,o)&&t.updateProperties(o,{default:null})})}xe(Hv,ae);Hv.$inject=["eventBus","modeling"];function FI(e,t){if(!w(e,"bpmn:SequenceFlow"))return!1;var n=ce(t),r=ce(e);return n.get("default")===r}var BI=500,HI=5e3;function zv(e,t,n){ae.call(this,e);var r;function i(){return r=r||new zI,r.enter(),r}function o(){if(!r)throw new Error(n("out of bounds release"));return r}function a(){if(!r)throw new Error(n("out of bounds release"));var c=r.leave();return c&&(t.updateLaneRefs(r.flowNodes,r.lanes),r=null),c}var s=["spaceTool","lane.add","lane.resize","lane.split","elements.create","elements.delete","elements.move","shape.create","shape.delete","shape.move","shape.resize"];this.preExecute(s,HI,function(c){i()}),this.postExecuted(s,BI,function(c){a()}),this.preExecute(["shape.create","shape.move","shape.delete","shape.resize"],function(c){var l=c.context,u=l.shape,f=o();u.labelTarget||(w(u,"bpmn:Lane")&&f.addLane(u),w(u,"bpmn:FlowNode")&&f.addFlowNode(u))})}zv.$inject=["eventBus","modeling","translate"];xe(zv,ae);function zI(){this.flowNodes=[],this.lanes=[],this.counter=0,this.addLane=function(e){this.lanes.push(e)},this.addFlowNode=function(e){this.flowNodes.push(e)},this.enter=function(){this.counter++},this.leave=function(){return this.counter--,!this.counter}}const VI={__init__:["adaptiveLabelPositioningBehavior","appendBehavior","associationBehavior","attachEventBehavior","boundaryEventBehavior","createBehavior","createDataObjectBehavior","createParticipantBehavior","dataInputAssociationBehavior","dataStoreBehavior","deleteLaneBehavior","detachEventBehavior","dropOnFlowBehavior","eventBasedGatewayBehavior","fixHoverBehavior","groupBehavior","importDockingFix","isHorizontalFix","labelBehavior","layoutConnectionBehavior","messageFlowBehavior","removeElementBehavior","removeEmbeddedLabelBoundsBehavior","removeParticipantBehavior","replaceConnectionBehavior","replaceElementBehaviour","resizeBehavior","resizeLaneBehavior","rootElementReferenceBehavior","spaceToolBehavior","subProcessPlaneBehavior","subProcessStartEventBehavior","toggleCollapseConnectionBehaviour","toggleElementCollapseBehaviour","unclaimIdBehavior","updateFlowNodeRefsBehavior","unsetDefaultFlowBehavior"],adaptiveLabelPositioningBehavior:["type",dv],appendBehavior:["type",hv],associationBehavior:["type",vv],attachEventBehavior:["type",cf],boundaryEventBehavior:["type",mv],createBehavior:["type",gv],createDataObjectBehavior:["type",yv],createParticipantBehavior:["type",bv],dataInputAssociationBehavior:["type",Ev],dataStoreBehavior:["type",_v],deleteLaneBehavior:["type",xv],detachEventBehavior:["type",uf],dropOnFlowBehavior:["type",wv],eventBasedGatewayBehavior:["type",Sv],fixHoverBehavior:["type",Ux],groupBehavior:["type",Cv],importDockingFix:["type",Gx],isHorizontalFix:["type",Tv],labelBehavior:["type",Rv],layoutConnectionBehavior:["type",Pv],messageFlowBehavior:["type",Mv],removeElementBehavior:["type",Iv],removeEmbeddedLabelBoundsBehavior:["type",Dv],removeParticipantBehavior:["type",Nv],replaceConnectionBehavior:["type",kv],replaceElementBehaviour:["type",hf],resizeBehavior:["type",tw],resizeLaneBehavior:["type",rw],rootElementReferenceBehavior:["type",Lv],spaceToolBehavior:["type",iw],subProcessPlaneBehavior:["type",bo],subProcessStartEventBehavior:["type",$v],toggleCollapseConnectionBehaviour:["type",jv],toggleElementCollapseBehaviour:["type",Fv],unclaimIdBehavior:["type",Bv],unsetDefaultFlowBehavior:["type",Hv],updateFlowNodeRefsBehavior:["type",zv]};function aw(e,t){var n=In(e,t,-15);return n!=="intersect"?n:null}function Nn(e){Ar.call(this,e)}xe(Nn,Ar);Nn.$inject=["eventBus"];Nn.prototype.init=function(){this.addRule("connection.start",function(e){var t=e.source;return WI(t)}),this.addRule("connection.create",function(e){var t=e.source,n=e.target,r=e.hints||{},i=r.targetParent,o=r.targetAttach;if(o)return!1;i&&(n.parent=i);try{return Gl(t,n)}finally{i&&(n.parent=null)}}),this.addRule("connection.reconnect",function(e){var t=e.connection,n=e.source,r=e.target;return Gl(n,r,t)}),this.addRule("connection.updateWaypoints",function(e){return{type:e.connection.type}}),this.addRule("shape.resize",function(e){var t=e.shape,n=e.newBounds;return dw(t,n)}),this.addRule("elements.create",function(e){var t=e.elements,n=e.position,r=e.target;return Pt(r)&&!gu(t,r)?!1:Jo(t,function(i){return Pt(i)?Gl(i.source,i.target,i):i.host?Is(i,i.host,null,n):Td(i,r,null)})}),this.addRule("elements.move",function(e){var t=e.target,n=e.shapes,r=e.position;return Is(n,t,null,r)||fw(n,t,r)||pw(n,t)||gu(n,t)}),this.addRule("shape.create",function(e){return Td(e.shape,e.target,e.source,e.position)}),this.addRule("shape.attach",function(e){return Is(e.shape,e.target,null,e.position)}),this.addRule("element.copy",function(e){var t=e.element,n=e.elements;return gw(n,t)})};Nn.prototype.canConnectMessageFlow=vw;Nn.prototype.canConnectSequenceFlow=mw;Nn.prototype.canConnectDataAssociation=Uv;Nn.prototype.canConnectAssociation=hw;Nn.prototype.canMove=pw;Nn.prototype.canAttach=Is;Nn.prototype.canReplace=fw;Nn.prototype.canDrop=Ba;Nn.prototype.canInsert=gu;Nn.prototype.canCreate=Td;Nn.prototype.canConnect=Gl;Nn.prototype.canResize=dw;Nn.prototype.canCopy=gw;function WI(e){return wd(e)?null:Qe(e,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference","bpmn:Group","bpmn:TextAnnotation"])}function wd(e){return!e||ut(e)}function UI(e,t){return e===t}function Yy(e){do{if(w(e,"bpmn:Process"))return ce(e);if(w(e,"bpmn:Participant"))return ce(e).processRef||ce(e)}while(e=e.parent)}function Sd(e){return w(e,"bpmn:TextAnnotation")}function Vv(e){return w(e,"bpmn:Group")&&!e.labelTarget}function Wv(e){return w(e,"bpmn:BoundaryEvent")&&ci(e,"bpmn:CompensateEventDefinition")}function is(e){return ce(e).isForCompensation}function GI(e,t){var n=Yy(e),r=Yy(t);return n===r}function qI(e){return w(e,"bpmn:InteractionNode")&&!w(e,"bpmn:BoundaryEvent")&&(!w(e,"bpmn:Event")||w(e,"bpmn:ThrowEvent")&&sw(e,"bpmn:MessageEventDefinition"))}function YI(e){return w(e,"bpmn:InteractionNode")&&!is(e)&&(!w(e,"bpmn:Event")||w(e,"bpmn:CatchEvent")&&sw(e,"bpmn:MessageEventDefinition"))&&!(w(e,"bpmn:BoundaryEvent")&&!ci(e,"bpmn:MessageEventDefinition"))}function Ky(e){for(var t=e;t=t.parent;){if(w(t,"bpmn:FlowElementsContainer"))return ce(t);if(w(t,"bpmn:Participant"))return ce(t).processRef}return null}function KI(e,t){var n=Ky(e),r=Ky(t);return n===r}function ci(e,t){var n=ce(e);return!!st(n.eventDefinitions||[],function(r){return w(r,t)})}function sw(e,t){var n=ce(e);return(n.eventDefinitions||[]).every(function(r){return w(r,t)})}function XI(e){return w(e,"bpmn:FlowNode")&&!w(e,"bpmn:EndEvent")&&!er(e)&&!(w(e,"bpmn:IntermediateThrowEvent")&&ci(e,"bpmn:LinkEventDefinition"))&&!Wv(e)&&!is(e)}function ZI(e){return w(e,"bpmn:FlowNode")&&!w(e,"bpmn:StartEvent")&&!w(e,"bpmn:BoundaryEvent")&&!er(e)&&!(w(e,"bpmn:IntermediateCatchEvent")&&ci(e,"bpmn:LinkEventDefinition"))&&!is(e)}function QI(e){return w(e,"bpmn:ReceiveTask")||w(e,"bpmn:IntermediateCatchEvent")&&(ci(e,"bpmn:MessageEventDefinition")||ci(e,"bpmn:TimerEventDefinition")||ci(e,"bpmn:ConditionalEventDefinition")||ci(e,"bpmn:SignalEventDefinition"))}function JI(e){for(var t=[];e;)e=e.parent,e&&t.push(e);return t}function Cd(e,t){var n=JI(t);return n.indexOf(e)!==-1}function Gl(e,t,n){if(wd(e)||wd(t))return null;if(!w(n,"bpmn:DataAssociation")){if(vw(e,t))return{type:"bpmn:MessageFlow"};if(mw(e,t))return{type:"bpmn:SequenceFlow"}}var r=Uv(e,t);return r||(Wv(e)&&is(t)?{type:"bpmn:Association",associationDirection:"One"}:hw(e,t)?{type:"bpmn:Association"}:!1)}function Ba(e,t){return ut(e)||Vv(e)?!0:w(t,"bpmn:Participant")&&!ot(t)?!1:w(e,"bpmn:Participant")?w(t,"bpmn:Process")||w(t,"bpmn:Collaboration"):Qe(e,["bpmn:DataInput","bpmn:DataOutput"])&&e.parent?t===e.parent:w(e,"bpmn:Lane")?w(t,"bpmn:Participant")||w(t,"bpmn:Lane"):w(e,"bpmn:BoundaryEvent")&&!eN(e)?!1:w(e,"bpmn:FlowElement")&&!w(e,"bpmn:DataStoreReference")?w(t,"bpmn:FlowElementsContainer")?ot(t):Qe(t,["bpmn:Participant","bpmn:Lane"]):w(e,"bpmn:DataStoreReference")&&w(t,"bpmn:Collaboration")?Ni(ce(t).get("participants"),function(n){return!!n.get("processRef")}):Qe(e,["bpmn:Artifact","bpmn:DataAssociation","bpmn:DataStoreReference"])?Qe(t,["bpmn:Collaboration","bpmn:Lane","bpmn:Participant","bpmn:Process","bpmn:SubProcess"]):w(e,"bpmn:MessageFlow")?w(t,"bpmn:Collaboration")||e.source.parent==t||e.target.parent==t:!1}function eN(e){return ce(e).cancelActivity&&(cw(e)||lw(e))}function tN(e){return!ut(e)&&w(e,"bpmn:BoundaryEvent")}function nN(e){return w(e,"bpmn:Lane")}function rN(e){return tN(e)||w(e,"bpmn:IntermediateThrowEvent")&&cw(e)?!0:w(e,"bpmn:IntermediateCatchEvent")&&lw(e)}function cw(e){var t=ce(e);return t&&!(t.eventDefinitions&&t.eventDefinitions.length)}function lw(e){return uw(e,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])}function uw(e,t){return t.some(function(n){return ci(e,n)})}function iN(e){return w(e,"bpmn:ReceiveTask")&&st(e.incoming,function(t){return w(t.source,"bpmn:EventBasedGateway")})}function Is(e,t,n,r){if(Array.isArray(e)||(e=[e]),e.length!==1)return!1;var i=e[0];return ut(i)||!rN(i)||er(t)||!w(t,"bpmn:Activity")||is(t)||r&&!aw(r,t)||iN(t)?!1:"attach"}function fw(e,t,n){if(!t)return!1;var r={replacements:[]};return z(e,function(i){er(t)||w(i,"bpmn:StartEvent")&&i.type!=="label"&&Ba(i,t)&&(FP(i)||r.replacements.push({oldElementId:i.id,newElementType:"bpmn:StartEvent"}),(BP(i)||HP(i)||zP(i))&&r.replacements.push({oldElementId:i.id,newElementType:"bpmn:StartEvent"}),uw(i,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])&&w(t,"bpmn:SubProcess")&&r.replacements.push({oldElementId:i.id,newElementType:"bpmn:StartEvent"})),w(t,"bpmn:Transaction")||ci(i,"bpmn:CancelEventDefinition")&&i.type!=="label"&&(w(i,"bpmn:EndEvent")&&Ba(i,t)&&r.replacements.push({oldElementId:i.id,newElementType:"bpmn:EndEvent"}),w(i,"bpmn:BoundaryEvent")&&Is(i,t,null,n)&&r.replacements.push({oldElementId:i.id,newElementType:"bpmn:BoundaryEvent"}))}),r.replacements.length?r:!1}function pw(e,t){return Ni(e,nN)?!1:t?e.every(function(n){return Ba(n,t)}):!0}function Td(e,t,n,r){return t?ut(e)||Vv(e)?!0:UI(n,t)||n&&Cd(n,t)?!1:Ba(e,t)||gu(e,t):!1}function dw(e,t){return w(e,"bpmn:SubProcess")?ot(e)&&(!t||t.width>=100&&t.height>=80):w(e,"bpmn:Lane")?!t||t.width>=130&&t.height>=60:w(e,"bpmn:Participant")?!t||t.width>=250&&t.height>=50:!!(Sd(e)||Vv(e))}function oN(e,t){var n=Sd(e),r=Sd(t);return(n||r)&&n!==r}function hw(e,t){return Wv(e)&&is(t)?!0:Cd(t,e)||Cd(e,t)?!1:oN(e,t)?!0:!!Uv(e,t)}function vw(e,t){return Xy(e)&&!Xy(t)?!1:qI(e)&&YI(t)&&!GI(e,t)}function mw(e,t){return XI(e)&&ZI(t)&&KI(e,t)&&!(w(e,"bpmn:EventBasedGateway")&&!QI(t))}function Uv(e,t){return Qe(e,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&Qe(t,["bpmn:Activity","bpmn:ThrowEvent"])?{type:"bpmn:DataInputAssociation"}:Qe(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&Qe(e,["bpmn:Activity","bpmn:CatchEvent"])?{type:"bpmn:DataOutputAssociation"}:!1}function gu(e,t,n){if(!t)return!1;if(Array.isArray(e)){if(e.length!==1)return!1;e=e[0]}return t.source===e||t.target===e?!1:Qe(t,["bpmn:SequenceFlow","bpmn:MessageFlow"])&&!ut(t)&&w(e,"bpmn:FlowNode")&&!w(e,"bpmn:BoundaryEvent")&&Ba(e,t.parent)}function aN(e,t){return e&&t&&e.indexOf(t)!==-1}function gw(e,t){return ut(t)?!0:!(w(t,"bpmn:Lane")&&!aN(e,t.parent))}function Xy(e){return fu(e,"bpmn:Process")||fu(e,"bpmn:Collaboration")}const sN={__depends__:[vi],__init__:["bpmnRules"],bpmnRules:["type",Nn]};var cN=2e3;function yw(e,t){e.on("saveXML.start",cN,n);function n(){var r=t.getRootElements();z(r,function(i){var o=at(i),a,s;a=oc([i],!1),a=Ge(a,function(c){return c!==i&&!c.labelTarget}),s=mn(a,at),o.set("planeElement",s)})}}yw.$inject=["eventBus","canvas"];const lN={__init__:["bpmnDiOrdering"],bpmnDiOrdering:["type",yw]};function vf(e){ae.call(this,e);var t=this;this.preExecute(["shape.create","connection.create"],function(n){var r=n.context,i=r.shape||r.connection,o=r.parent,a=t.getOrdering(i,o);a&&(a.parent!==void 0&&(r.parent=a.parent),r.parentIndex=a.index)}),this.preExecute(["shape.move","connection.move"],function(n){var r=n.context,i=r.shape||r.connection,o=r.newParent||i.parent,a=t.getOrdering(i,o);a&&(a.parent!==void 0&&(r.newParent=a.parent),r.newParentIndex=a.index)})}vf.prototype.getOrdering=function(e,t){return null};xe(vf,ae);function Gv(e,t,n){vf.call(this,e);var r=[{type:"bpmn:SubProcess",order:{level:6}},{type:"bpmn:SequenceFlow",order:{level:9,containers:["bpmn:Participant","bpmn:FlowElementsContainer"]}},{type:"bpmn:DataAssociation",order:{level:9,containers:["bpmn:Collaboration","bpmn:FlowElementsContainer"]}},{type:"bpmn:MessageFlow",order:{level:9,containers:["bpmn:Collaboration"]}},{type:"bpmn:Association",order:{level:6,containers:["bpmn:Participant","bpmn:FlowElementsContainer","bpmn:Collaboration"]}},{type:"bpmn:BoundaryEvent",order:{level:8}},{type:"bpmn:Group",order:{level:10,containers:["bpmn:Collaboration","bpmn:FlowElementsContainer"]}},{type:"bpmn:FlowElement",order:{level:5}},{type:"bpmn:Participant",order:{level:-2}},{type:"bpmn:Lane",order:{level:-1}}];function i(s){if(s.labelTarget)return{level:10};var c=st(r,function(l){return Qe(s,[l.type])});return c&&c.order||{level:1}}function o(s){var c=s.order;if(c||(s.order=c=i(s)),!c)throw new Error("no order for <"+s.id+">");return c}function a(s,c,l){for(var u=c;u&&!Qe(u,l);)u=u.parent;if(!u)throw new Error("no parent for <"+s.id+"> in <"+(c&&c.id)+">");return u}this.getOrdering=function(s,c){if(s.labelTarget)return{parent:t.findRoot(c)||t.getRootElement(),index:-1};var l=o(s);l.containers&&(c=a(s,c,l.containers));var u=c.children.indexOf(s),f=sE(c.children,function(p){return!s.labelTarget&&p.labelTarget?!1:l.level0)return"e";if(t<0)return"w"}if(e==="y"){if(t>0)return"s";if(t<0)return"n"}return null}function hN(e,t){var n=[];return z(e.concat(t),function(r){var i=r.incoming,o=r.outgoing;z(i.concat(o),function(a){var s=a.source,c=a.target;(xs(e,s)||xs(e,c)||xs(t,s)||xs(t,c))&&(xs(n,a)||n.push(a))})}),n}function xs(e,t){return e.indexOf(t)!==-1}function vN(e,t,n){var r=e.x,i=e.y,o=e.width,a=e.height,s=n.x,c=n.y;switch(t){case"n":return{x:r,y:i+c,width:o,height:a-c};case"s":return{x:r,y:i,width:o,height:a+c};case"w":return{x:r+s,y:i,width:o-s,height:a};case"e":return{x:r,y:i,width:o+s,height:a};default:throw new Error("unknown direction: "+t)}}var dp=Math.abs,mN=Math.round,wi={x:"width",y:"height"},bw="crosshair",Zi={n:"top",w:"left",s:"bottom",e:"right"},gN=1500,pl={n:"s",w:"e",s:"n",e:"w"},dl=20;function Ir(e,t,n,r,i,o,a){this._canvas=e,this._dragging=t,this._eventBus=n,this._modeling=r,this._rules=i,this._toolManager=o,this._mouse=a;var s=this;o.registerTool("space",{tool:"spaceTool.selection",dragging:"spaceTool"}),n.on("spaceTool.selection.end",function(c){n.once("spaceTool.selection.ended",function(){s.activateMakeSpace(c.originalEvent)})}),n.on("spaceTool.move",gN,function(c){var l=c.context,u=l.initialized;u||(u=l.initialized=s.init(c,l)),u&&Qy(c)}),n.on("spaceTool.end",function(c){var l=c.context,u=l.axis,f=l.direction,p=l.movingShapes,d=l.resizingShapes,h=l.start;if(l.initialized){Qy(c);var v={x:0,y:0};v[u]=mN(c["d"+u]),s.makeSpace(p,d,v,f,h),n.once("spaceTool.ended",function(m){s.activateSelection(m.originalEvent,!0,!0)})}})}Ir.$inject=["canvas","dragging","eventBus","modeling","rules","toolManager","mouse"];Ir.prototype.activateSelection=function(e,t,n){this._dragging.init(e,"spaceTool.selection",{autoActivate:t,cursor:bw,data:{context:{reactivate:n}},trapClick:!1})};Ir.prototype.activateMakeSpace=function(e){this._dragging.init(e,"spaceTool",{autoActivate:!0,cursor:bw,data:{context:{}}})};Ir.prototype.makeSpace=function(e,t,n,r,i){return this._modeling.createSpace(e,t,n,r,i)};Ir.prototype.init=function(e,t){var n=dp(e.dx)>dp(e.dy)?"x":"y",r=e["d"+n],i=e[n]-r;if(dp(r)<5)return!1;r<0&&(r*=-1),Ko(e)&&(r*=-1);var o=dN(n,r),a=this._canvas.getRootElement();Bh(e)&&e.hover&&(a=e.hover);var s=[...oc(a,!0),...a.attachers||[]],c=this.calculateAdjustments(s,n,r,i),l=this._eventBus.fire("spaceTool.getMinDimensions",{axis:n,direction:o,shapes:c.resizingShapes,start:i}),u=yN(c,n,o,i,l);return W(t,c,{axis:n,direction:o,spaceToolConstraints:u,start:i}),Yu("resize-"+(n==="x"?"ew":"ns")),!0};Ir.prototype.calculateAdjustments=function(e,t,n,r){var i=this._rules,o=[],a=[],s=[],c=[];function l(p){o.includes(p)||o.push(p);var d=p.label;d&&!o.includes(d)&&o.push(d)}function u(p){a.includes(p)||a.push(p)}z(e,function(p){if(!(!p.parent||ut(p))){if(Pt(p)){c.push(p);return}var d=p[t],h=d+p[wi[t]];if(bN(p)&&(n>0&&$e(p)[t]>r||n<0&&$e(p)[t]0&&d>r||n<0&&hr&&i.allowed("shape.resize",{shape:p})){u(p);return}}}),z(o,function(p){var d=p.attachers;d&&z(d,function(h){l(h)})});var f=o.concat(a);return z(s,function(p){var d=p.host;Fo(f,d)&&l(p)}),f=o.concat(a),z(c,function(p){var d=p.source,h=p.target,v=p.label;Fo(f,d)&&Fo(f,h)&&v&&l(v)}),{movingShapes:o,resizingShapes:a}};Ir.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateSelection(e,!!e)};Ir.prototype.isActive=function(){var e=this._dragging.context();return e?/^spaceTool/.test(e.prefix):!1};function Zy(e){return{top:e.top-dl,right:e.right+dl,bottom:e.bottom+dl,left:e.left-dl}}function Qy(e){var t=e.context,n=t.spaceToolConstraints;if(n){var r,i;Le(n.left)&&(r=Math.max(e.x,n.left),e.dx=e.dx+r-e.x,e.x=r),Le(n.right)&&(r=Math.min(e.x,n.right),e.dx=e.dx+r-e.x,e.x=r),Le(n.top)&&(i=Math.max(e.y,n.top),e.dy=e.dy+i-e.y,e.y=i),Le(n.bottom)&&(i=Math.min(e.y,n.bottom),e.dy=e.dy+i-e.y,e.y=i)}}function yN(e,t,n,r,i){var o=e.movingShapes,a=e.resizingShapes;if(a.length){var s={},c,l;return z(a,function(u){var f=u.attachers,p=u.children,d=Ae(u),h=Ge(p,function(N){return!Pt(N)&&!ut(N)&&!Fo(o,N)&&!Fo(a,N)}),v=Ge(p,function(N){return!Pt(N)&&!ut(N)&&Fo(o,N)}),m,_,g,y=[],b=[],x,S,C,M;h.length&&(_=Zy(Ae(Zt(h))),m=r-d[Zi[n]]+_[Zi[n]],n==="n"?s.bottom=l=Le(l)?Math.min(l,m):m:n==="w"?s.right=l=Le(l)?Math.min(l,m):m:n==="s"?s.top=c=Le(c)?Math.max(c,m):m:n==="e"&&(s.left=c=Le(c)?Math.max(c,m):m)),v.length&&(g=Zy(Ae(Zt(v))),m=r-g[Zi[pl[n]]]+d[Zi[pl[n]]],n==="n"?s.bottom=l=Le(l)?Math.min(l,m):m:n==="w"?s.right=l=Le(l)?Math.min(l,m):m:n==="s"?s.top=c=Le(c)?Math.max(c,m):m:n==="e"&&(s.left=c=Le(c)?Math.max(c,m):m)),f&&f.length&&(f.forEach(function(N){Fo(o,N)?y.push(N):b.push(N)}),y.length&&(x=Ae(Zt(y.map($e))),S=d[Zi[pl[n]]]-(x[Zi[pl[n]]]-r)),b.length&&(C=Ae(Zt(b.map($e))),M=C[Zi[n]]-(d[Zi[n]]-r)),n==="n"?(m=Math.min(S||1/0,M||1/0),s.bottom=l=Le(l)?Math.min(l,m):m):n==="w"?(m=Math.min(S||1/0,M||1/0),s.right=l=Le(l)?Math.min(l,m):m):n==="s"?(m=Math.max(S||-1/0,M||-1/0),s.top=c=Le(c)?Math.max(c,m):m):n==="e"&&(m=Math.max(S||-1/0,M||-1/0),s.left=c=Le(c)?Math.max(c,m):m));var A=i&&i[u.id];A&&(n==="n"?(m=r+u[wi[t]]-A[wi[t]],s.bottom=l=Le(l)?Math.min(l,m):m):n==="w"?(m=r+u[wi[t]]-A[wi[t]],s.right=l=Le(l)?Math.min(l,m):m):n==="s"?(m=r-u[wi[t]]+A[wi[t]],s.top=c=Le(c)?Math.max(c,m):m):n==="e"&&(m=r-u[wi[t]]+A[wi[t]],s.left=c=Le(c)?Math.max(c,m):m))}),s}}function Fo(e,t){return e.indexOf(t)!==-1}function bN(e){return!!e.host}var hp="djs-dragging",Jy="djs-resizing",EN=250,hl=Math.max;function Ew(e,t,n,r,i){function o(a,s){z(a,function(c){i.addDragger(c,s),n.addMarker(c,hp)})}e.on("spaceTool.selection.start",function(a){var s=n.getLayer("space"),c=a.context,l={x:"M 0,-10000 L 0,10000",y:"M -10000,0 L 10000,0"},u=Te("g");ge(u,r.cls("djs-crosshair-group",["no-events"])),Ie(s,u);var f=Te("path");ge(f,"d",l.x),et(f).add("djs-crosshair"),Ie(u,f);var p=Te("path");ge(p,"d",l.y),et(p).add("djs-crosshair"),Ie(u,p),c.crosshairGroup=u}),e.on("spaceTool.selection.move",function(a){var s=a.context.crosshairGroup;Jn(s,a.x,a.y)}),e.on("spaceTool.selection.cleanup",function(a){var s=a.context,c=s.crosshairGroup;c&&jt(c)}),e.on("spaceTool.move",EN,function(a){var s=a.context,c=s.line,l=s.axis,u=s.movingShapes,f=s.resizingShapes;if(s.initialized){if(!s.dragGroup){var p=n.getLayer("space");c=Te("path"),ge(c,"d","M0,0 L0,0"),et(c).add("djs-crosshair"),Ie(p,c),s.line=c;var d=Te("g");ge(d,r.cls("djs-drag-group",["no-events"])),Ie(n.getActiveLayer(),d),o(u,d);var h=s.movingConnections=t.filter(function(b){var x=!1;z(u,function(A){z(A.outgoing,function(N){b===N&&(x=!0)})});var S=!1;z(u,function(A){z(A.incoming,function(N){b===N&&(S=!0)})});var C=!1;z(f,function(A){z(A.outgoing,function(N){b===N&&(C=!0)})});var M=!1;return z(f,function(A){z(A.incoming,function(N){b===N&&(M=!0)})}),Pt(b)&&(x||C)&&(S||M)});o(h,d),s.dragGroup=d}if(!s.frameGroup){var v=Te("g");ge(v,r.cls("djs-frame-group",["no-events"])),Ie(n.getActiveLayer(),v);var m=[];z(f,function(b){var x=i.addFrame(b,v),S=x.getBBox();m.push({element:x,initialBounds:S}),n.addMarker(b,Jy)}),s.frameGroup=v,s.frames=m}var _={x:"M"+a.x+", -10000 L"+a.x+", 10000",y:"M -10000, "+a.y+" L 10000, "+a.y};ge(c,{d:_[l]});var g={x:"y",y:"x"},y={x:a.dx,y:a.dy};y[g[s.axis]]=0,Jn(s.dragGroup,y.x,y.y),z(s.frames,function(b){var x=b.element,S=b.initialBounds,C,M;s.direction==="e"?ge(x,{width:hl(S.width+y.x,5)}):(C=hl(S.width-y.x,5),ge(x,{width:C,x:S.x+S.width-C})),s.direction==="s"?ge(x,{height:hl(S.height+y.y,5)}):(M=hl(S.height-y.y,5),ge(x,{height:M,y:S.y+S.height-M}))})}}),e.on("spaceTool.cleanup",function(a){var s=a.context,c=s.movingShapes,l=s.movingConnections,u=s.resizingShapes,f=s.line,p=s.dragGroup,d=s.frameGroup;z(c,function(h){n.removeMarker(h,hp)}),z(l,function(h){n.removeMarker(h,hp)}),p&&(jt(f),jt(p)),z(u,function(h){n.removeMarker(h,Jy)}),d&&jt(d)})}Ew.$inject=["eventBus","elementRegistry","canvas","styles","previewSupport"];const _N={__init__:["spaceToolPreview"],__depends__:[Hi,vi,mf,mc,yc],spaceTool:["type",Ir],spaceToolPreview:["type",Ew]};function gf(e){e.invoke(Ir,this)}gf.$inject=["injector"];xe(gf,Ir);gf.prototype.calculateAdjustments=function(e,t,n,r){var i=Ir.prototype.calculateAdjustments.call(this,e,t,n,r);return i.resizingShapes=i.resizingShapes.filter(function(o){return!(w(o,"bpmn:TextAnnotation")||t==="y"&&xN(o))}),i};function xN(e){return w(e,"bpmn:Participant")&&!ce(e).processRef}const _w={__depends__:[_N],spaceTool:["type",gf]};function Nt(e,t){this._handlerMap={},this._stack=[],this._stackIdx=-1,this._currentExecution={actions:[],dirty:[],trigger:null},this._injector=t,this._eventBus=e,this._uid=1,e.on(["diagram.destroy","diagram.clear"],function(){this.clear(!1)},this)}Nt.$inject=["eventBus","injector"];Nt.prototype.execute=function(e,t){if(!e)throw new Error("command required");this._currentExecution.trigger="execute";const n={command:e,context:t};this._pushAction(n),this._internalExecute(n),this._popAction()};Nt.prototype.canExecute=function(e,t){const n={command:e,context:t},r=this._getHandler(e);let i=this._fire(e,"canExecute",n);if(i===void 0){if(!r)return!1;r.canExecute&&(i=r.canExecute(t))}return i};Nt.prototype.clear=function(e){this._stack.length=0,this._stackIdx=-1,e!==!1&&this._fire("changed",{trigger:"clear"})};Nt.prototype.undo=function(){let e=this._getUndoAction(),t;if(e){for(this._currentExecution.trigger="undo",this._pushAction(e);e&&(this._internalUndo(e),t=this._getUndoAction(),!(!t||t.id!==e.id));)e=t;this._popAction()}};Nt.prototype.redo=function(){let e=this._getRedoAction(),t;if(e){for(this._currentExecution.trigger="redo",this._pushAction(e);e&&(this._internalExecute(e,!0),t=this._getRedoAction(),!(!t||t.id!==e.id));)e=t;this._popAction()}};Nt.prototype.register=function(e,t){this._setHandler(e,t)};Nt.prototype.registerHandler=function(e,t){if(!e||!t)throw new Error("command and handlerCls must be defined");const n=this._injector.instantiate(t);this.register(e,n)};Nt.prototype.canUndo=function(){return!!this._getUndoAction()};Nt.prototype.canRedo=function(){return!!this._getRedoAction()};Nt.prototype._getRedoAction=function(){return this._stack[this._stackIdx+1]};Nt.prototype._getUndoAction=function(){return this._stack[this._stackIdx]};Nt.prototype._internalUndo=function(e){const t=e.command,n=e.context,r=this._getHandler(t);this._atomicDo(()=>{this._fire(t,"revert",e),r.revert&&this._markDirty(r.revert(n)),this._revertedAction(e),this._fire(t,"reverted",e)})};Nt.prototype._fire=function(e,t,n){arguments.length<3&&(n=t,t=null);const r=t?[e+"."+t,t]:[e];let i;n=this._eventBus.createEvent(n);for(const o of r)if(i=this._eventBus.fire("commandStack."+o,n),n.cancelBubble)break;return i};Nt.prototype._createId=function(){return this._uid++};Nt.prototype._atomicDo=function(e){const t=this._currentExecution;t.atomic=!0;try{e()}finally{t.atomic=!1}};Nt.prototype._internalExecute=function(e,t){const n=e.command,r=e.context,i=this._getHandler(n);if(!i)throw new Error("no command handler registered for <"+n+">");this._pushAction(e),t||(this._fire(n,"preExecute",e),i.preExecute&&i.preExecute(r),this._fire(n,"preExecuted",e)),this._atomicDo(()=>{this._fire(n,"execute",e),i.execute&&this._markDirty(i.execute(r)),this._executedAction(e,t),this._fire(n,"executed",e)}),t||(this._fire(n,"postExecute",e),i.postExecute&&i.postExecute(r),this._fire(n,"postExecuted",e)),this._popAction()};Nt.prototype._pushAction=function(e){const t=this._currentExecution,n=t.actions,r=n[0];if(t.atomic)throw new Error("illegal invocation in or phase (action: "+e.command+")");e.id||(e.id=r&&r.id||this._createId()),n.push(e)};Nt.prototype._popAction=function(){const e=this._currentExecution,t=e.trigger,n=e.actions,r=e.dirty;n.pop(),n.length||(this._eventBus.fire("elements.changed",{elements:cE("id",r.reverse())}),r.length=0,this._fire("changed",{trigger:t}),e.trigger=null)};Nt.prototype._markDirty=function(e){const t=this._currentExecution;e&&(e=qe(e)?e:[e],t.dirty=t.dirty.concat(e))};Nt.prototype._executedAction=function(e,t){const n=++this._stackIdx;t||this._stack.splice(n,this._stack.length,e)};Nt.prototype._revertedAction=function(e){this._stackIdx--};Nt.prototype._getHandler=function(e){return this._handlerMap[e]};Nt.prototype._setHandler=function(e,t){if(!e||!t)throw new Error("command and handler required");if(this._handlerMap[e])throw new Error("overriding handler for command <"+e+">");this._handlerMap[e]=t};const wN={commandStack:["type",Nt]};function ro(e,t){if(typeof t!="function")throw new Error("removeFn iterator must be a function");if(e){for(var n;n=e[0];)t(n);return e}}var SN=250,e0=1400;function qv(e,t,n){ae.call(this,t);var r=e.get("movePreview",!1);t.on("shape.move.start",e0,function(i){var o=i.context,a=o.shapes,s=o.validatedShapes;o.shapes=t0(a),o.validatedShapes=t0(s)}),r&&t.on("shape.move.start",SN,function(i){var o=i.context,a=o.shapes,s=[];z(a,function(c){z(c.labels,function(l){!l.hidden&&o.shapes.indexOf(l)===-1&&s.push(l),c.labelTarget&&s.push(c)})}),z(s,function(c){r.makeDraggable(o,c,!0)})}),this.preExecuted("elements.move",e0,function(i){var o=i.context,a=o.closure,s=a.enclosedElements,c=[];z(s,function(l){z(l.labels,function(u){s[u.id]||c.push(u)})}),a.addAll(c)}),this.preExecute(["connection.delete","shape.delete"],function(i){var o=i.context,a=o.connection||o.shape;ro(a.labels,function(s){n.removeShape(s,{nested:!0})})}),this.execute("shape.delete",function(i){var o=i.context,a=o.shape,s=a.labelTarget;s&&(o.labelTargetIndex=Th(s.labels,a),o.labelTarget=s,a.labelTarget=null)}),this.revert("shape.delete",function(i){var o=i.context,a=o.shape,s=o.labelTarget,c=o.labelTargetIndex;s&&(an(s.labels,a,c),a.labelTarget=s)})}xe(qv,ae);qv.$inject=["injector","eventBus","modeling"];function t0(e){return Ge(e,function(t){return e.indexOf(t.labelTarget)===-1})}const CN={__init__:["labelSupport"],labelSupport:["type",qv]};var TN=251,n0=1401,r0="attach-ok";function Yv(e,t,n,r,i){ae.call(this,t);var o=e.get("movePreview",!1);t.on("shape.move.start",n0,function(a){var s=a.context,c=s.shapes,l=s.validatedShapes;s.shapes=RN(c),s.validatedShapes=PN(l)}),o&&t.on("shape.move.start",TN,function(a){var s=a.context,c=s.shapes,l=Rd(c);z(l,function(u){o.makeDraggable(s,u,!0),z(u.labels,function(f){o.makeDraggable(s,f,!0)})})}),o&&t.on("shape.move.start",function(a){var s=a.context,c=s.shapes;if(c.length===1){var l=c[0],u=l.host;u&&(n.addMarker(u,r0),t.once(["shape.move.out","shape.move.cleanup"],function(){n.removeMarker(u,r0)}))}}),this.preExecuted("elements.move",n0,function(a){var s=a.context,c=s.closure,l=s.shapes,u=Rd(l);z(u,function(f){c.add(f,c.topLevel[f.host.id])})}),this.postExecuted("elements.move",function(a){var s=a.context,c=s.shapes,l=s.newHost,u;l&&c.length!==1||(l?u=c:u=Ge(c,function(f){var p=f.host;return AN(f)&&!ON(c,p)}),z(u,function(f){i.updateAttachment(f,l)}))}),this.postExecuted("elements.move",function(a){var s=a.context.shapes;z(s,function(c){z(c.attachers,function(l){z(l.outgoing.slice(),function(u){var f=r.allowed("connection.reconnect",{connection:u,source:u.source,target:u.target});f||i.removeConnection(u)}),z(l.incoming.slice(),function(u){var f=r.allowed("connection.reconnect",{connection:u,source:u.source,target:u.target});f||i.removeConnection(u)})})})}),this.postExecute("shape.create",function(a){var s=a.context,c=s.shape,l=s.host;l&&i.updateAttachment(c,l)}),this.postExecute("shape.replace",function(a){var s=a.context,c=s.oldShape,l=s.newShape;ro(c.attachers,function(u){var f=r.allowed("elements.move",{target:l,shapes:[u]});f==="attach"?i.updateAttachment(u,l):i.removeShape(u)}),l.attachers.length&&z(l.attachers,function(u){var f=zy(u,c,l);i.moveShape(u,f,u.parent)})}),this.postExecute("shape.resize",function(a){var s=a.context,c=s.shape,l=s.oldBounds,u=s.newBounds,f=c.attachers,p=s.hints||{};p.attachSupport!==!1&&z(f,function(d){var h=zy(d,l,u);i.moveShape(d,h,d.parent),z(d.labels,function(v){i.moveShape(v,h,v.parent)})})}),this.preExecute("shape.delete",function(a){var s=a.context.shape;ro(s.attachers,function(c){i.removeShape(c)}),s.host&&i.updateAttachment(s,null)})}xe(Yv,ae);Yv.$inject=["injector","eventBus","canvas","rules","modeling"];function Rd(e){return Jl(mn(e,function(t){return t.attachers||[]}))}function RN(e){var t=Rd(e);return vC("id",e,t)}function PN(e){var t=qa(e,"id");return Ge(e,function(n){for(;n;){if(n.host&&t[n.host.id])return!1;n=n.parent}return!0})}function AN(e){return!!e.host}function ON(e,t){return e.indexOf(t)!==-1}const MN={__depends__:[vi],__init__:["attachSupport"],attachSupport:["type",Yv]};function Nr(e){this._model=e}Nr.$inject=["moddle"];Nr.prototype._needsId=function(e){return Qe(e,["bpmn:RootElement","bpmn:FlowElement","bpmn:MessageFlow","bpmn:DataAssociation","bpmn:Artifact","bpmn:Participant","bpmn:Lane","bpmn:LaneSet","bpmn:Process","bpmn:Collaboration","bpmndi:BPMNShape","bpmndi:BPMNEdge","bpmndi:BPMNDiagram","bpmndi:BPMNPlane","bpmn:Property","bpmn:CategoryValue"])};Nr.prototype._ensureId=function(e){if(e.id){this._model.ids.claim(e.id,e);return}var t;w(e,"bpmn:Activity")?t="Activity":w(e,"bpmn:Event")?t="Event":w(e,"bpmn:Gateway")?t="Gateway":Qe(e,["bpmn:SequenceFlow","bpmn:MessageFlow"])?t="Flow":t=(e.$type||"").replace(/^[^:]*:/g,""),t+="_",!e.id&&this._needsId(e)&&(e.id=this._model.ids.nextPrefixed(t,e))};Nr.prototype.create=function(e,t){var n=this._model.create(e,t||{});return this._ensureId(n),n};Nr.prototype.createDiLabel=function(){return this.create("bpmndi:BPMNLabel",{bounds:this.createDiBounds()})};Nr.prototype.createDiShape=function(e,t){return this.create("bpmndi:BPMNShape",W({bpmnElement:e,bounds:this.createDiBounds()},t))};Nr.prototype.createDiBounds=function(e){return this.create("dc:Bounds",e)};Nr.prototype.createDiWaypoints=function(e){var t=this;return mn(e,function(n){return t.createDiWaypoint(n)})};Nr.prototype.createDiWaypoint=function(e){return this.create("dc:Point",Kr(e,["x","y"]))};Nr.prototype.createDiEdge=function(e,t){return this.create("bpmndi:BPMNEdge",W({bpmnElement:e,waypoint:this.createDiWaypoints([])},t))};Nr.prototype.createDiPlane=function(e,t){return this.create("bpmndi:BPMNPlane",W({bpmnElement:e},t))};function ir(e,t,n,r){ae.call(this,e),this._bpmnFactory=t,this._translate=r;var i=this;function o(h){var v=h.context,m=v.hints||{},_;!v.cropped&&m.createElementsBehavior!==!1&&(_=v.connection,_.waypoints=n.getCroppedWaypoints(_),v.cropped=!0)}this.executed(["connection.layout","connection.create"],o),this.reverted(["connection.layout"],function(h){delete h.context.cropped});function a(h){var v=h.context;i.updateParent(v.shape||v.connection,v.oldParent)}function s(h){var v=h.context,m=v.shape||v.connection,_=v.parent||v.newParent;i.updateParent(m,_)}this.executed(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],Zn(a)),this.reverted(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],Zn(s));function c(h){var v=h.context,m=v.oldRoot,_=m.children;z(_,function(g){w(g,"bpmn:BaseElement")&&i.updateParent(g)})}this.executed(["canvas.updateRoot"],c),this.reverted(["canvas.updateRoot"],c);function l(h){var v=h.context.shape;w(v,"bpmn:BaseElement")&&i.updateBounds(v)}this.executed(["shape.move","shape.create","shape.resize"],Zn(function(h){h.context.shape.type!=="label"&&l(h)})),this.reverted(["shape.move","shape.create","shape.resize"],Zn(function(h){h.context.shape.type!=="label"&&l(h)})),e.on("shape.changed",function(h){h.element.type==="label"&&l({context:{shape:h.element}})});function u(h){i.updateConnection(h.context)}this.executed(["connection.create","connection.move","connection.delete","connection.reconnect"],Zn(u)),this.reverted(["connection.create","connection.move","connection.delete","connection.reconnect"],Zn(u));function f(h){i.updateConnectionWaypoints(h.context.connection)}this.executed(["connection.layout","connection.move","connection.updateWaypoints"],Zn(f)),this.reverted(["connection.layout","connection.move","connection.updateWaypoints"],Zn(f)),this.executed("connection.reconnect",Zn(function(h){var v=h.context,m=v.connection,_=v.oldSource,g=v.newSource,y=ce(m),b=ce(_),x=ce(g);y.conditionExpression&&!Qe(x,["bpmn:Activity","bpmn:ExclusiveGateway","bpmn:InclusiveGateway"])&&(v.oldConditionExpression=y.conditionExpression,delete y.conditionExpression),_!==g&&b.default===y&&(v.oldDefault=b.default,delete b.default)})),this.reverted("connection.reconnect",Zn(function(h){var v=h.context,m=v.connection,_=v.oldSource,g=v.newSource,y=ce(m),b=ce(_),x=ce(g);v.oldConditionExpression&&(y.conditionExpression=v.oldConditionExpression),v.oldDefault&&(b.default=v.oldDefault,delete x.default)}));function p(h){i.updateAttachment(h.context)}this.executed(["element.updateAttachment"],Zn(p)),this.reverted(["element.updateAttachment"],Zn(p)),this.executed("element.updateLabel",Zn(d)),this.reverted("element.updateLabel",Zn(d));function d(h){const{element:v}=h.context,m=Cr(v),_=at(v),g=_&&_.get("label");Yo(v)||(m&&!g?_.set("label",t.create("bpmndi:BPMNLabel")):!m&&g&&_.set("label",void 0))}}xe(ir,ae);ir.$inject=["eventBus","bpmnFactory","connectionDocking","translate"];ir.prototype.updateAttachment=function(e){var t=e.shape,n=t.businessObject,r=t.host;n.attachedToRef=r&&r.businessObject};ir.prototype.updateParent=function(e,t){if(!ut(e)&&!(w(e,"bpmn:DataStoreReference")&&e.parent&&w(e.parent,"bpmn:Collaboration"))){var n=e.parent,r=e.businessObject,i=at(e),o=n&&n.businessObject,a=at(n);w(e,"bpmn:FlowNode")&&this.updateFlowNodeRefs(r,o,t&&t.businessObject),w(e,"bpmn:DataOutputAssociation")&&(e.source?o=e.source.businessObject:o=null),w(e,"bpmn:DataInputAssociation")&&(e.target?o=e.target.businessObject:o=null),this.updateSemanticParent(r,o),w(e,"bpmn:DataObjectReference")&&r.dataObjectRef&&this.updateSemanticParent(r.dataObjectRef,o),this.updateDiParent(i,a)}};ir.prototype.updateBounds=function(e){var t=at(e),n=IN(e);if(n){var r=Gr(n,t.get("bounds"));W(n,{x:e.x+r.x,y:e.y+r.y})}var i=ut(e)?this._getLabel(t):t,o=i.bounds;o||(o=this._bpmnFactory.createDiBounds(),i.set("bounds",o)),W(o,{x:e.x,y:e.y,width:e.width,height:e.height})};ir.prototype.updateFlowNodeRefs=function(e,t,n){if(n!==t){var r,i;w(n,"bpmn:Lane")&&(r=n.get("flowNodeRef"),Qt(r,e)),w(t,"bpmn:Lane")&&(i=t.get("flowNodeRef"),an(i,e))}};ir.prototype.updateDiConnection=function(e,t,n){var r=at(e),i=at(t),o=at(n);r.sourceElement&&r.sourceElement.bpmnElement!==ce(t)&&(r.sourceElement=t&&i),r.targetElement&&r.targetElement.bpmnElement!==ce(n)&&(r.targetElement=n&&o)};ir.prototype.updateDiParent=function(e,t){if(t&&!w(t,"bpmndi:BPMNPlane")&&(t=t.$parent),e.$parent!==t){var n=(t||e.$parent).get("planeElement");t?(n.push(e),e.$parent=t):(Qt(n,e),e.$parent=null)}};function DN(e){for(;e&&!w(e,"bpmn:Definitions");)e=e.$parent;return e}ir.prototype.getLaneSet=function(e){var t,n;return w(e,"bpmn:Lane")?(t=e.childLaneSet,t||(t=this._bpmnFactory.create("bpmn:LaneSet"),e.childLaneSet=t,t.$parent=e),t):(w(e,"bpmn:Participant")&&(e=e.processRef),n=e.get("laneSets"),t=n[0],t||(t=this._bpmnFactory.create("bpmn:LaneSet"),t.$parent=e,n.push(t)),t)};ir.prototype.updateSemanticParent=function(e,t,n){var r,i=this._translate;if(e.$parent!==t&&!((w(e,"bpmn:DataInput")||w(e,"bpmn:DataOutput"))&&(w(t,"bpmn:Participant")&&"processRef"in t&&(t=t.processRef),"ioSpecification"in t&&t.ioSpecification===e.$parent))){if(w(e,"bpmn:Lane"))t&&(t=this.getLaneSet(t)),r="lanes";else if(w(e,"bpmn:FlowElement")){if(t){if(w(t,"bpmn:Participant"))t=t.processRef;else if(w(t,"bpmn:Lane"))do t=t.$parent.$parent;while(w(t,"bpmn:Lane"))}r="flowElements"}else if(w(e,"bpmn:Artifact")){for(;t&&!w(t,"bpmn:Process")&&!w(t,"bpmn:SubProcess")&&!w(t,"bpmn:Collaboration");)if(w(t,"bpmn:Participant")){t=t.processRef;break}else t=t.$parent;r="artifacts"}else if(w(e,"bpmn:MessageFlow"))r="messageFlows";else if(w(e,"bpmn:Participant")){r="participants";var o=e.processRef,a;o&&(a=DN(e.$parent||t),e.$parent&&(Qt(a.get("rootElements"),o),o.$parent=null),t&&(an(a.get("rootElements"),o),o.$parent=a))}else w(e,"bpmn:DataOutputAssociation")?r="dataOutputAssociations":w(e,"bpmn:DataInputAssociation")&&(r="dataInputAssociations");if(!r)throw new Error(i("no parent for {element} in {parent}",{element:e.id,parent:t.id}));var s;if(e.$parent&&(s=e.$parent.get(r),Qt(s,e)),t?(s=t.get(r),s.push(e),e.$parent=t):e.$parent=null,n){var c=n.get(r);Qt(s,e),t&&(c||(c=[],t.set(r,c)),c.push(e))}}};ir.prototype.updateConnectionWaypoints=function(e){var t=at(e);t.set("waypoint",this._bpmnFactory.createDiWaypoints(e.waypoints))};ir.prototype.updateConnection=function(e){var t=e.connection,n=ce(t),r=t.source,i=ce(r),o=t.target,a=ce(t.target),s;if(w(n,"bpmn:DataAssociation"))w(n,"bpmn:DataInputAssociation")?(n.get("sourceRef")[0]=i,s=e.parent||e.newParent||a,this.updateSemanticParent(n,a,s)):w(n,"bpmn:DataOutputAssociation")&&(s=e.parent||e.newParent||i,this.updateSemanticParent(n,i,s),n.targetRef=a);else{var c=w(n,"bpmn:SequenceFlow");n.sourceRef!==i&&(c&&(Qt(n.sourceRef&&n.sourceRef.get("outgoing"),n),i&&i.get("outgoing")&&i.get("outgoing").push(n)),n.sourceRef=i),n.targetRef!==a&&(c&&(Qt(n.targetRef&&n.targetRef.get("incoming"),n),a&&a.get("incoming")&&a.get("incoming").push(n)),n.targetRef=a)}this.updateConnectionWaypoints(t),this.updateDiConnection(t,r,o)};ir.prototype._getLabel=function(e){return e.label||(e.label=this._bpmnFactory.createDiLabel()),e.label};function Zn(e){return function(t){var n=t.context,r=n.shape||n.connection||n.element;w(r,"bpmn:BaseElement")&&e(t)}}function IN(e){if(w(e,"bpmn:Activity")){var t=at(e);if(t){var n=t.get("label");if(n)return n.get("bounds")}}}function Eo(e,t,n){$i.call(this),this._bpmnFactory=e,this._moddle=t,this._translate=n}xe(Eo,$i);Eo.$inject=["bpmnFactory","moddle","translate"];Eo.prototype._baseCreate=$i.prototype.create;Eo.prototype.create=function(e,t){if(e==="label"){var n=t.di||this._bpmnFactory.createDiLabel();return this._baseCreate(e,W({type:"label",di:n},Vs,t))}return this.createElement(e,t)};Eo.prototype.createElement=function(e,t){var n,r=this._translate;t=W({},t||{});var i=t.businessObject,o=t.di;if(!i){if(!t.type)throw new Error(r("no shape type specified"));i=this._bpmnFactory.create(t.type),e_(i)}if(!kN(o)){var a=W({},o||{},{id:i.id+"_di"});e==="root"?o=this._bpmnFactory.createDiPlane(i,a):e==="connection"?o=this._bpmnFactory.createDiEdge(i,a):o=this._bpmnFactory.createDiShape(i,a)}w(i,"bpmn:Group")&&(t=W({isFrame:!0},t)),t=NN(i,t,["processRef","isInterrupting","associationDirection","isForCompensation"]),t.isExpanded&&(t=xw(o,t,"isExpanded")),w(i,"bpmn:SubProcess")&&(t.collapsed=!ot(i,o)),w(i,"bpmn:ExclusiveGateway")&&(o.isMarkerVisible=!0),ln(t.triggeredByEvent)&&(i.triggeredByEvent=t.triggeredByEvent,delete t.triggeredByEvent),ln(t.cancelActivity)&&(i.cancelActivity=t.cancelActivity,delete t.cancelActivity);var s,c;return t.eventDefinitionType&&(s=i.get("eventDefinitions")||[],c=this._bpmnFactory.create(t.eventDefinitionType,t.eventDefinitionAttrs),t.eventDefinitionType==="bpmn:ConditionalEventDefinition"&&(c.condition=this._bpmnFactory.create("bpmn:FormalExpression")),s.push(c),c.$parent=i,i.eventDefinitions=s,delete t.eventDefinitionType),n=this.getDefaultSize(i,o),t=W({id:i.id},n,t,{businessObject:i,di:o}),this._baseCreate(e,t)};Eo.prototype.getDefaultSize=function(e,t){var n=ce(e);return t=t||at(e),w(n,"bpmn:SubProcess")?ot(n,t)?{width:350,height:200}:{width:100,height:80}:w(n,"bpmn:Task")?{width:100,height:80}:w(n,"bpmn:Gateway")?{width:50,height:50}:w(n,"bpmn:Event")?{width:36,height:36}:w(n,"bpmn:Participant")?ot(n,t)?{width:600,height:250}:{width:400,height:60}:w(n,"bpmn:Lane")?{width:400,height:100}:w(n,"bpmn:DataObjectReference")?{width:36,height:50}:w(n,"bpmn:DataStoreReference")?{width:50,height:50}:w(n,"bpmn:TextAnnotation")?{width:100,height:30}:w(n,"bpmn:Group")?{width:300,height:300}:{width:100,height:80}};Eo.prototype.createParticipantShape=function(e){return fn(e)||(e={isExpanded:e}),e=W({type:"bpmn:Participant"},e||{}),e.isExpanded!==!1&&(e.processRef=this._bpmnFactory.create("bpmn:Process")),this.createShape(e)};function NN(e,t,n){return z(n,function(r){t=xw(e,t,r)}),t}function xw(e,t,n){return t[n]===void 0?t:(e[n]=t[n],pi(t,[n]))}function kN(e){return Qe(e,["bpmndi:BPMNShape","bpmndi:BPMNEdge","bpmndi:BPMNDiagram","bpmndi:BPMNPlane"])}function yf(e,t){this._modeling=e,this._canvas=t}yf.$inject=["modeling","canvas"];yf.prototype.preExecute=function(e){var t=this._modeling,n=e.elements,r=e.alignment;z(n,function(i){var o={x:0,y:0};ln(r.left)?o.x=r.left-i.x:ln(r.right)?o.x=r.right-i.width-i.x:ln(r.center)?o.x=r.center-Math.round(i.width/2)-i.x:ln(r.top)?o.y=r.top-i.y:ln(r.bottom)?o.y=r.bottom-i.height-i.y:ln(r.middle)&&(o.y=r.middle-Math.round(i.height/2)-i.y),t.moveElements([i],o,i.parent)})};yf.prototype.postExecute=function(e){};function bf(e){this._modeling=e}bf.$inject=["modeling"];bf.prototype.preExecute=function(e){var t=e.source;if(!t)throw new Error("source required");var n=e.target||t.parent,r=e.shape,i=e.hints||{};r=e.shape=this._modeling.createShape(r,e.position,n,{attach:i.attach}),e.shape=r};bf.prototype.postExecute=function(e){var t=e.hints||{};LN(e.source,e.shape)||(t.connectionTarget===e.source?this._modeling.connect(e.shape,e.source,e.connection):this._modeling.connect(e.source,e.shape,e.connection))};function LN(e,t){return Ni(e.outgoing,function(n){return n.target===t})}function Ef(e,t){this._canvas=e,this._layouter=t}Ef.$inject=["canvas","layouter"];Ef.prototype.execute=function(e){var t=e.connection,n=e.source,r=e.target,i=e.parent,o=e.parentIndex,a=e.hints;if(!n||!r)throw new Error("source and target required");if(!i)throw new Error("parent required");return t.source=n,t.target=r,t.waypoints||(t.waypoints=this._layouter.layoutConnection(t,a)),this._canvas.addConnection(t,i,o),t};Ef.prototype.revert=function(e){var t=e.connection;return this._canvas.removeConnection(t),t.source=null,t.target=null,t};var vl=Math.round;function Kv(e){this._modeling=e}Kv.$inject=["modeling"];Kv.prototype.preExecute=function(e){var t=e.elements,n=e.parent,r=e.parentIndex,i=e.position,o=e.hints,a=this._modeling;z(t,function(f){Le(f.x)||(f.x=0),Le(f.y)||(f.y=0)});var s=Ge(t,function(f){return!f.hidden}),c=Zt(s);z(t,function(f){Pt(f)&&(f.waypoints=mn(f.waypoints,function(p){return{x:vl(p.x-c.x-c.width/2+i.x),y:vl(p.y-c.y-c.height/2+i.y)}})),W(f,{x:vl(f.x-c.x-c.width/2+i.x),y:vl(f.y-c.y-c.height/2+i.y)})});var l=Iu(t),u={};z(t,function(f){if(Pt(f)){u[f.id]=Le(r)?a.createConnection(u[f.source.id],u[f.target.id],r,f,f.parent||n,o):a.createConnection(u[f.source.id],u[f.target.id],f,f.parent||n,o);return}var p=W({},o);l.indexOf(f)===-1&&(p.autoResize=!1),ut(f)&&(p=pi(p,["attach"])),u[f.id]=Le(r)?a.createShape(f,Kr(f,["x","y","width","height"]),f.parent||n,r,p):a.createShape(f,Kr(f,["x","y","width","height"]),f.parent||n,p)}),e.elements=Eh(u)};var i0=Math.round;function _o(e){this._canvas=e}_o.$inject=["canvas"];_o.prototype.execute=function(e){var t=e.shape,n=e.position,r=e.parent,i=e.parentIndex;if(!r)throw new Error("parent required");if(!n)throw new Error("position required");return n.width!==void 0?W(t,n):W(t,{x:n.x-i0(t.width/2),y:n.y-i0(t.height/2)}),this._canvas.addShape(t,r,i),t};_o.prototype.revert=function(e){var t=e.shape;return this._canvas.removeShape(t),t};function Cc(e){_o.call(this,e)}xe(Cc,_o);Cc.$inject=["canvas"];var $N=_o.prototype.execute;Cc.prototype.execute=function(e){var t=e.shape;return FN(t),t.labelTarget=e.labelTarget,$N.call(this,e)};var jN=_o.prototype.revert;Cc.prototype.revert=function(e){return e.shape.labelTarget=null,jN.call(this,e)};function FN(e){["width","height"].forEach(function(t){typeof e[t]>"u"&&(e[t]=0)})}function Tc(e,t){this._canvas=e,this._modeling=t}Tc.$inject=["canvas","modeling"];Tc.prototype.preExecute=function(e){var t=this._modeling,n=e.connection;ro(n.incoming,function(r){t.removeConnection(r,{nested:!0})}),ro(n.outgoing,function(r){t.removeConnection(r,{nested:!0})})};Tc.prototype.execute=function(e){var t=e.connection,n=t.parent;return e.parent=n,e.parentIndex=Th(n.children,t),e.source=t.source,e.target=t.target,this._canvas.removeConnection(t),t.source=null,t.target=null,t};Tc.prototype.revert=function(e){var t=e.connection,n=e.parent,r=e.parentIndex;return t.source=e.source,t.target=e.target,an(n.children,t,r),this._canvas.addConnection(t,n),t};function Xv(e,t){this._modeling=e,this._elementRegistry=t}Xv.$inject=["modeling","elementRegistry"];Xv.prototype.postExecute=function(e){var t=this._modeling,n=this._elementRegistry,r=e.elements;z(r,function(i){n.get(i.id)&&(i.waypoints?t.removeConnection(i):t.removeShape(i))})};function Rc(e,t){this._canvas=e,this._modeling=t}Rc.$inject=["canvas","modeling"];Rc.prototype.preExecute=function(e){var t=this._modeling,n=e.shape;ro(n.incoming,function(r){t.removeConnection(r,{nested:!0})}),ro(n.outgoing,function(r){t.removeConnection(r,{nested:!0})}),ro(n.children,function(r){Pt(r)?t.removeConnection(r,{nested:!0}):t.removeShape(r,{nested:!0})})};Rc.prototype.execute=function(e){var t=this._canvas,n=e.shape,r=n.parent;return e.oldParent=r,e.oldParentIndex=Th(r.children,n),t.removeShape(n),n};Rc.prototype.revert=function(e){var t=this._canvas,n=e.shape,r=e.oldParent,i=e.oldParentIndex;return an(r.children,n,i),t.addShape(n,r),n};function _f(e){this._modeling=e}_f.$inject=["modeling"];var o0={x:"y",y:"x"};_f.prototype.preExecute=function(e){var t=this._modeling,n=e.groups,r=e.axis,i=e.dimension;function o(m,_){m.range.min=Math.min(_[r],m.range.min),m.range.max=Math.max(_[r]+_[i],m.range.max)}function a(m){return m[r]+m[i]/2}function s(m){return m.length-1}function c(m){return m.max-m.min}function l(m,_){var g={y:0};g[r]=m-a(_),g[r]&&(g[o0[r]]=0,t.moveElements([_],g,_.parent))}var u=n[0],f=s(n),p=n[f],d,h,v=0;z(n,function(m,_){var g,y,b;if(m.elements.length<2){_&&_!==n.length-1&&(o(m,m.elements[0]),v+=c(m.range));return}g=Yr(m.elements,r),y=g[0],_===f&&(y=g[s(g)]),b=a(y),m.range=null,z(g,function(x){if(l(b,x),m.range===null){m.range={min:x[r],max:x[r]+x[i]};return}o(m,x)}),_&&_!==n.length-1&&(v+=c(m.range))}),h=Math.abs(p.range.min-u.range.max),d=Math.round((h-v)/(n.length-1)),!(dt;if(/n|w/.test(n))return e[r] required");var i=e.changed||this._getVisualReferences(n).concat(t),o=e.oldProperties||zN(n,eu(r));return Aw(n,r),e.oldProperties=o,e.changed=i,i};Mc.prototype.revert=function(e){var t=e.oldProperties,n=e.moddleElement,r=e.changed;return Aw(n,t),r};Mc.prototype._getVisualReferences=function(e){var t=this._elementRegistry;return w(e,"bpmn:DataObject")?VN(e,t):[]};function zN(e,t){return nr(t,function(n,r){return n[r]=e.get(r),n},{})}function Aw(e,t){z(t,function(n,r){e.set(r,n)})}function VN(e,t){return t.filter(function(n){return w(n,"bpmn:DataObjectReference")&&ce(n).dataObjectRef===e})}var ws="default",Di="id",Ow="di",WN={width:0,height:0};function Dc(e,t,n,r,i){this._elementRegistry=e,this._moddle=t,this._translate=n,this._modeling=r,this._textRenderer=i}Dc.$inject=["elementRegistry","moddle","translate","modeling","textRenderer"];Dc.prototype.execute=function(e){var t=e.element,n=[t],r=this._translate;if(!t)throw new Error(r("element required"));var i=this._elementRegistry,o=this._moddle.ids,a=t.businessObject,s=KN(e.properties),c=e.oldProperties||UN(t,s);return Mw(s,a)&&(o.unclaim(a[Di]),i.updateId(t,s[Di]),o.claim(s[Di],a)),ws in s&&(s[ws]&&n.push(i.get(s[ws].id)),a[ws]&&n.push(i.get(a[ws].id))),Dw(t,s),e.oldProperties=c,e.changed=n,n};Dc.prototype.postExecute=function(e){var t=e.element,n=t.label,r=n&&ce(n).name;if(r){var i=this._textRenderer.getExternalLabelBounds(n,r);this._modeling.resizeShape(n,i,WN)}};Dc.prototype.revert=function(e){var t=e.element,n=e.properties,r=e.oldProperties,i=t.businessObject,o=this._elementRegistry,a=this._moddle.ids;return Dw(t,r),Mw(n,i)&&(a.unclaim(n[Di]),o.updateId(t,r[Di]),a.claim(r[Di],i)),e.changed};function Mw(e,t){return Di in e&&e[Di]!==t[Di]}function UN(e,t){var n=eu(t),r=e.businessObject,i=at(e);return nr(n,function(o,a){return a!==Ow?o[a]=r.get(a):o[a]=GN(i,eu(t.di)),o},{})}function GN(e,t){return nr(t,function(n,r){return n[r]=e&&e.get(r),n},{})}function Dw(e,t){var n=e.businessObject,r=at(e);z(t,function(i,o){o!==Ow?n.set(o,i):r&&qN(r,i)})}function qN(e,t){z(t,function(n,r){e.set(r,n)})}var YN=["default"];function KN(e){var t=W({},e);return YN.forEach(function(n){n in e&&(t[n]=ce(t[n]))}),t}function Tf(e,t){this._canvas=e,this._modeling=t}Tf.$inject=["canvas","modeling"];Tf.prototype.execute=function(e){var t=this._canvas,n=e.newRoot,r=n.businessObject,i=t.getRootElement(),o=i.businessObject,a=o.$parent,s=at(i);return t.setRootElement(n),t.removeRootElement(i),an(a.rootElements,r),r.$parent=a,Qt(a.rootElements,o),o.$parent=null,i.di=null,s.bpmnElement=r,n.di=s,e.oldRoot=i,[]};Tf.prototype.revert=function(e){var t=this._canvas,n=e.newRoot,r=n.businessObject,i=e.oldRoot,o=i.businessObject,a=r.$parent,s=at(n);return t.setRootElement(i),t.removeRootElement(n),Qt(a.rootElements,r),r.$parent=null,an(a.rootElements,o),o.$parent=a,n.di=null,s.bpmnElement=o,i.di=s,[]};function em(e,t){this._modeling=e,this._spaceTool=t}em.$inject=["modeling","spaceTool"];em.prototype.preExecute=function(e){var t=this._spaceTool,n=this._modeling,r=e.shape,i=e.location,o=Vr(r),a=o===r,s=a?r:r.parent,c=mo(s);c.length||n.createShape({type:"bpmn:Lane"},{x:r.x+Ra,y:r.y,width:r.width-Ra,height:r.height},s);var l=[];ta(o,function(v){return l.push(v),v.label&&l.push(v.label),v===r?[]:Ge(v.children,function(m){return m!==r})});var u=i==="top"?-120:120,f=i==="top"?r.y:r.y+r.height,p=f+(i==="top"?10:-10),d=i==="top"?"n":"s",h=t.calculateAdjustments(l,"y",u,p);t.makeSpace(h.movingShapes,h.resizingShapes,{x:0,y:u},d,p),e.newLane=n.createShape({type:"bpmn:Lane"},{x:r.x+(a?Ra:0),y:f-(i==="top"?120:0),width:r.width-(a?Ra:0),height:120},s)};function tm(e,t){this._modeling=e,this._translate=t}tm.$inject=["modeling","translate"];tm.prototype.preExecute=function(e){var t=this._modeling,n=this._translate,r=e.shape,i=e.count,o=mo(r),a=o.length;if(a>i)throw new Error(n("more than {count} child lanes",{count:i}));var s=Math.round(r.height/i),c,l,u,f,p;for(p=0;p0||o.bottom<0?-l:l,d=n.calculateAdjustments(s,"y",p,u),n.makeSpace(d.movingShapes,d.resizingShapes,{x:0,y:l},f)),(o.left||o.right)&&(l=o.right||o.left,u=e.x+(o.right?e.width:0)+(o.right?-10:100),f=o.right?"e":"w",p=o.left>0||o.right<0?-l:l,d=n.calculateAdjustments(c,"x",p,u),n.makeSpace(d.movingShapes,d.resizingShapes,{x:l,y:0},f))};var Ks="flowNodeRef",nm="lanes";function Nc(e){this._elementRegistry=e}Nc.$inject=["elementRegistry"];Nc.prototype._computeUpdates=function(e,t){var n=[],r=[],i={},o=[];function a(u,f){var p=Ae(f),d={x:u.x+u.width/2,y:u.y+u.height/2};return d.x>p.left&&d.xp.top&&d.y"u"&&(p=t.getExternalLabelBounds(u,h)),p&&e.resizeShape(u,p,JN)}}this.preExecute=i,this.execute=o,this.revert=a,this.postExecute=s}Iw.$inject=["modeling","textRenderer","bpmnFactory"];function l0(e){return!e||!e.trim()}function kn(e,t,n,r){bt.call(this,e,t,n),this._bpmnRules=r}xe(kn,bt);kn.$inject=["eventBus","elementFactory","commandStack","bpmnRules"];kn.prototype.getHandlers=function(){var e=bt.prototype.getHandlers.call(this);return e["element.updateModdleProperties"]=Mc,e["element.updateProperties"]=Dc,e["canvas.updateRoot"]=Tf,e["lane.add"]=em,e["lane.resize"]=Ic,e["lane.split"]=tm,e["lane.updateRefs"]=Nc,e["id.updateClaim"]=Rf,e["element.setColor"]=rm,e["element.updateLabel"]=Iw,e};kn.prototype.updateLabel=function(e,t,n,r){this._commandStack.execute("element.updateLabel",{element:e,newLabel:t,newBounds:n,hints:r||{}})};kn.prototype.connect=function(e,t,n,r){var i=this._bpmnRules;if(n||(n=i.canConnect(e,t)),!!n)return this.createConnection(e,t,n,e.parent,r)};kn.prototype.updateModdleProperties=function(e,t,n){this._commandStack.execute("element.updateModdleProperties",{element:e,moddleElement:t,properties:n})};kn.prototype.updateProperties=function(e,t){this._commandStack.execute("element.updateProperties",{element:e,properties:t})};kn.prototype.resizeLane=function(e,t,n){this._commandStack.execute("lane.resize",{shape:e,newBounds:t,balanced:n})};kn.prototype.addLane=function(e,t){var n={shape:e,location:t};return this._commandStack.execute("lane.add",n),n.newLane};kn.prototype.splitLane=function(e,t){this._commandStack.execute("lane.split",{shape:e,count:t})};kn.prototype.makeCollaboration=function(){var e=this._create("root",{type:"bpmn:Collaboration"}),t={newRoot:e};return this._commandStack.execute("canvas.updateRoot",t),e};kn.prototype.makeProcess=function(){var e=this._create("root",{type:"bpmn:Process"}),t={newRoot:e};this._commandStack.execute("canvas.updateRoot",t)};kn.prototype.updateLaneRefs=function(e,t){this._commandStack.execute("lane.updateRefs",{flowNodeShapes:e,laneShapes:t})};kn.prototype.claimId=function(e,t){this._commandStack.execute("id.updateClaim",{id:e,element:t,claiming:!0})};kn.prototype.unclaimId=function(e,t){this._commandStack.execute("id.updateClaim",{id:e,element:t})};kn.prototype.setColor=function(e,t){e.length||(e=[e]),this._commandStack.execute("element.setColor",{elements:e,colors:t})};function Nw(){}Nw.prototype.layoutConnection=function(e,t){return t=t||{},[t.connectionStart||$e(t.source||e.source),t.connectionEnd||$e(t.target||e.target)]};var ml=20,e5=5,yu=Math.round,u0=20,t5={"h:h":20,"v:v":20,"h:v":-10,"v:h":-10};function n5(e,t){return!{t:/top/,r:/right/,b:/bottom/,l:/left/,h:/./,v:/./}[t].test(e)}function r5(e,t){return{t:/top/,r:/right/,b:/bottom/,l:/left/,h:/left|right/,v:/top|bottom/}[e].test(t)}function kw(e,t,n){var r=In(t,e,e5),i=n.split(":")[0],o=yu((t.x-e.x)/2+e.x),a=yu((t.y-e.y)/2+e.y),s,c,l=r5(i,r),u=/h|r|l/.test(i),f=!1,p=!1;return l?(s=u?{x:o,y:e.y}:{x:e.x,y:a},c=u?"h:h":"v:v"):(f=n5(r,i),c=u?"h:v":"v:h",f?u?(p=a===e.y,s={x:e.x+ml*(/l/.test(i)?-1:1),y:p?a+ml:a}):(p=o===e.x,s={x:p?o+ml:o,y:e.y+ml*(/t/.test(i)?-1:1)}):s={x:o,y:a}),{waypoints:im(e,s,c).concat(s),directions:c,turnNextDirections:p}}function i5(e,t,n){return kw(e,t,n)}function o5(e,t,n){var r=kw(t,e,f0(n));return{waypoints:r.waypoints.slice().reverse(),directions:f0(r.directions),turnNextDirections:r.turnNextDirections}}function a5(e,t){var n=e.directions.split(":")[1],r=t.directions.split(":")[0];e.turnNextDirections&&(n=n=="h"?"v":"h"),t.turnNextDirections&&(r=r=="h"?"v":"h");var i=n+":"+r,o=im(e.waypoints[e.waypoints.length-1],t.waypoints[0],i);return{waypoints:o,directions:i}}function f0(e){return e.split(":").reverse().join(":")}function s5(e,t,n){var r=yu((t.x-e.x)/2+e.x),i=yu((t.y-e.y)/2+e.y);if(n==="h:v")return[{x:t.x,y:e.y}];if(n==="v:h")return[{x:e.x,y:t.y}];if(n==="h:h")return[{x:r,y:e.y},{x:r,y:t.y}];if(n==="v:v")return[{x:e.x,y:i},{x:t.x,y:i}];throw new Error("invalid directions: can only handle varians of [hv]:[hv]")}function im(e,t,n){if(n=n||"h:h",!m5(n))throw new Error("unknown directions: <"+n+">: must be specified as : with start/end in { h,v,t,r,b,l }");if(Lw(n)){var r=i5(e,t,n),i=o5(e,t,n),o=a5(r,i);return[].concat(r.waypoints,o.waypoints,i.waypoints)}return s5(e,t,n)}function c5(e,t,n){var r=im(e,t,n);return r.unshift(e),r.push(t),$w(r)}function l5(e,t,n,r,i){var o=i&&i.preferredLayouts||[],a=dC(o,"straight")[0]||"h:h",s=t5[a]||0,c=In(e,t,s),l=v5(c,a);n=n||$e(e),r=r||$e(t);var u=l.split(":"),f=d0(n,e,u[0],g5(c)),p=d0(r,t,u[1],c);return c5(f,p,l)}function u5(e,t,n,r,i,o){qe(n)&&(i=n,o=r,n=$e(e),r=$e(t)),o=W({preferredLayouts:[]},o),i=i||[];var a=o.preferredLayouts,s=a.indexOf("straight")!==-1,c;return c=s&&p5(e,t,n,r,o),c||(c=o.connectionEnd&&h5(t,e,r,i),c)||(c=o.connectionStart&&d5(e,t,n,i),c)?c:!o.connectionStart&&!o.connectionEnd&&i&&i.length?i:l5(e,t,n,r,o)}function f5(e,t,n){return e>=t&&e<=n}function p0(e,t,n){var r={x:"width",y:"height"};return f5(t[e],n[e],n[e]+n[r[e]])}function p5(e,t,n,r,i){var o={},a,s;return s=In(e,t),/^(top|bottom|left|right)$/.test(s)?(/top|bottom/.test(s)&&(a="x"),/left|right/.test(s)&&(a="y"),i.preserveDocking==="target"?p0(a,r,e)?(o[a]=r[a],[{x:o.x!==void 0?o.x:n.x,y:o.y!==void 0?o.y:n.y,original:{x:o.x!==void 0?o.x:n.x,y:o.y!==void 0?o.y:n.y}},{x:r.x,y:r.y}]):null:p0(a,n,t)?(o[a]=n[a],[{x:n.x,y:n.y},{x:o.x!==void 0?o.x:r.x,y:o.y!==void 0?o.y:r.y,original:{x:o.x!==void 0?o.x:r.x,y:o.y!==void 0?o.y:r.y}}]):null):null}function d5(e,t,n,r){return om(e,t,n,r)}function h5(e,t,n,r){var i=r.slice().reverse();return i=om(e,t,n,i),i?i.reverse():null}function om(e,t,n,r){function i(u){return u.length<3?!0:u.length>4?!1:!!st(u,function(f,p){var d=u[p-1];return d&&ac(f,d)<3})}function o(u,f,p){var d=Pi(f,u);switch(d){case"v":return{x:p.x,y:u.y};case"h":return{x:u.x,y:p.y}}return{x:u.x,y:u.y}}function a(u,f,p){var d;for(d=u.length-2;d!==0;d--)if(Vm(u[d],f,u0)||Vm(u[d],p,u0))return u.slice(d);return u}if(i(r))return null;var s=r[0],c=r.slice(),l;return c[0]=n,c[1]=o(c[1],s,n),l=a(c,e,t),l!==c&&(c=om(e,t,n,l)),c&&Pi(c)?null:c}function v5(e,t){if(Lw(t))return t;switch(e){case"intersect":return"t:t";case"top":case"bottom":return"v:v";case"left":case"right":return"h:h";default:return t}}function m5(e){return e&&/^h|v|t|r|b|l:h|v|t|r|b|l$/.test(e)}function Lw(e){return e&&/t|r|b|l/.test(e)}function g5(e){return{top:"bottom",bottom:"top",left:"right",right:"left","top-left":"bottom-right","bottom-right":"top-left","top-right":"bottom-left","bottom-left":"top-right"}[e]}function d0(e,t,n,r){if(n==="h"&&(n=/left/.test(r)?"l":"r"),n==="v"&&(n=/top/.test(r)?"t":"b"),n==="t")return{original:e,x:e.x,y:t.y};if(n==="r")return{original:e,x:t.x+t.width,y:e.y};if(n==="b")return{original:e,x:e.x,y:t.y+t.height};if(n==="l")return{original:e,x:t.x,y:e.y};throw new Error("unexpected dockingDirection: <"+n+">")}function $w(e){return e.reduce(function(t,n,r){var i=t[t.length-1],o=e[r+1];return Rh(i,o,n,0)||t.push(n),t},[])}var y5=-10,b5=40,am={top:"bottom","top-right":"bottom-left","top-left":"bottom-right",right:"left",bottom:"top","bottom-right":"top-left","bottom-left":"top-right",left:"right"},ql={top:"t",right:"r",bottom:"b",left:"l"};function sm(){}xe(sm,Nw);sm.prototype.layoutConnection=function(e,t){t||(t={});var n=t.source||e.source,r=t.target||e.target,i=t.waypoints||e.waypoints,o=t.connectionStart,a=t.connectionEnd,s,c;return o||(o=h0(i&&i[0],n)),a||(a=h0(i&&i[i.length-1],r)),(w(e,"bpmn:Association")||w(e,"bpmn:DataAssociation"))&&i&&!v0(n,r)?[].concat([o],i.slice(1,-1),[a]):(w(e,"bpmn:MessageFlow")?s=_5(n,r):(w(e,"bpmn:SequenceFlow")||v0(n,r))&&(n===r?s={preferredLayouts:A5(n,e)}:w(n,"bpmn:BoundaryEvent")?s={preferredLayouts:O5(n,r,a)}:Xs(n)||Xs(r)?s=w5(n):w(n,"bpmn:Gateway")?s={preferredLayouts:["v:h"]}:w(r,"bpmn:Gateway")?s={preferredLayouts:["h:v"]}:s={preferredLayouts:["h:h"]}),s&&(s=W(s,t),c=$w(u5(n,r,o,a,i,s))),c||[o,a])};function E5(e){var t=e.host;return In($e(e),t,y5)}function _5(e,t){return{preferredLayouts:["straight","v:v"],preserveDocking:x5(e,t)}}function x5(e,t){return w(t,"bpmn:Participant")?"source":w(e,"bpmn:Participant")?"target":Xs(t)?"source":Xs(e)||w(t,"bpmn:Event")?"target":w(e,"bpmn:Event")?"source":null}function w5(e){return{preferredLayouts:["straight","h:h"],preserveDocking:S5(e)}}function S5(e){return Xs(e)?"target":"source"}function h0(e,t){return e?e.original||e:$e(t)}function v0(e,t){return w(t,"bpmn:Activity")&&w(e,"bpmn:BoundaryEvent")&&t.businessObject.isForCompensation}function Xs(e){return w(e,"bpmn:SubProcess")&&ot(e)}function Ns(e,t){return e===t}function C5(e,t){return t.indexOf(e)!==-1}function ks(e){var t=/right|left/.exec(e);return t&&t[0]}function Vo(e){var t=/top|bottom/.exec(e);return t&&t[0]}function T5(e,t){return am[e]===t}function R5(e,t){var n=ks(e),r=am[n];return t.indexOf(r)!==-1}function P5(e,t){var n=Vo(e),r=am[n];return t.indexOf(r)!==-1}function Pd(e){return e==="right"||e==="left"}function A5(e,t){var n=t.waypoints,r=n&&n.length&&In(n[0],e);return r==="top"?["t:r"]:r==="right"?["r:b"]:r==="left"?["l:t"]:["b:l"]}function O5(e,t,n){var r=$e(e),i=$e(t),o=E5(e),a,s,c=Ns(e.host,t),l=C5(o,["top","right","bottom","left"]),u=In(i,r,{x:e.width/2+t.width/2,y:e.height/2+t.height/2});return c?M5(o,l,e,t,n):(a=D5(o,u,l),s=I5(o,u,l),[a+":"+s])}function M5(e,t,n,r,i){var o=t?e:Vo(e),a=ql[o],s;return t?Pd(e)?s=m0("y",n,r,i)?"h":"b":s=m0("x",n,r,i)?"v":"l":s="v",[a+":"+s]}function m0(e,t,n,r){var i=b5;return!(vp(e,r,n,i)||vp(e,r,{x:n.x+n.width,y:n.y+n.height},i)||vp(e,r,$e(t),i))}function vp(e,t,n,r){return Math.abs(t[e]-n[e])');return Cn(t,{position:"absolute",width:"0",height:"0"}),e.insertBefore(t,e.firstChild),t}function $5(e,t,n){Cn(e,{left:t+"px",top:n+"px"})}function cm(e,t){e.style.display=t===!1?"none":""}var jw="djs-tooltip",mp="."+jw;function Un(e,t){this._eventBus=e,this._canvas=t,this._ids=k5,this._tooltipDefaults={show:{minZoom:.7,maxZoom:5}},this._tooltips={},this._tooltipRoot=L5(t.getContainer());var n=this;Sr.bind(this._tooltipRoot,mp,"mousedown",function(r){r.stopPropagation()}),Sr.bind(this._tooltipRoot,mp,"mouseover",function(r){n.trigger("mouseover",r)}),Sr.bind(this._tooltipRoot,mp,"mouseout",function(r){n.trigger("mouseout",r)}),this._init()}Un.$inject=["eventBus","canvas"];Un.prototype.add=function(e){if(!e.position)throw new Error("must specifiy tooltip position");if(!e.html)throw new Error("must specifiy tooltip html");var t=this._ids.next();return e=W({},this._tooltipDefaults,e,{id:t}),this._addTooltip(e),e.timeout&&this.setTimeout(e),t};Un.prototype.trigger=function(e,t){var n=t.delegateTarget||t.target,r=this.get(Tn(n,"data-tooltip-id"));r&&(e==="mouseover"&&r.timeout&&this.clearTimeout(r),e==="mouseout"&&r.timeout&&(r.timeout=1e3,this.setTimeout(r)))};Un.prototype.get=function(e){return typeof e!="string"&&(e=e.id),this._tooltips[e]};Un.prototype.clearTimeout=function(e){if(e=this.get(e),!!e){var t=e.removeTimer;t&&(clearTimeout(t),e.removeTimer=null)}};Un.prototype.setTimeout=function(e){if(e=this.get(e),!!e){this.clearTimeout(e);var t=this;e.removeTimer=setTimeout(function(){t.remove(e)},e.timeout)}};Un.prototype.remove=function(e){var t=this.get(e);t&&(fi(t.html),fi(t.htmlContainer),delete t.htmlContainer,delete this._tooltips[t.id])};Un.prototype.show=function(){cm(this._tooltipRoot)};Un.prototype.hide=function(){cm(this._tooltipRoot,!1)};Un.prototype._updateRoot=function(e){var t=e.scale||1,n=e.scale||1,r="matrix("+t+",0,0,"+n+","+-1*e.x*t+","+-1*e.y*n+")";this._tooltipRoot.style.transform=r,this._tooltipRoot.style["-ms-transform"]=r};Un.prototype._addTooltip=function(e){var t=e.id,n=e.html,r,i=this._tooltipRoot;n.get&&n.constructor.prototype.jquery&&(n=n.get(0)),tr(n)&&(n=Ct(n)),r=Ct('
    '),Cn(r,{position:"absolute"}),r.appendChild(n),e.type&&At(r).add("djs-tooltip-"+e.type),e.className&&At(r).add(e.className),e.htmlContainer=r,i.appendChild(r),this._tooltips[t]=e,this._updateTooltip(e)};Un.prototype._updateTooltip=function(e){var t=e.position,n=e.htmlContainer;$5(n,t.x,t.y)};Un.prototype._updateTooltipVisibilty=function(e){z(this._tooltips,function(t){var n=t.show,r=t.htmlContainer,i=!0;n&&((n.minZoom>e.scale||n.maxZoom"+o+"
    "})}e.on(["shape.move.rejected","create.rejected"],function(i){var o=i.context,a=o.shape,s=o.target;w(s,"bpmn:Collaboration")&&w(a,"bpmn:FlowNode")&&r(i,n(F5))})}Fw.$inject=["eventBus","tooltips","translate"];const B5={__depends__:[j5],__init__:["modelingFeedback"],modelingFeedback:["type",Fw]};var H5=500,z5=1250,V5=1500,bu=Math.round;function W5(e){return{x:e.x+bu(e.width/2),y:e.y+bu(e.height/2)}}function Bw(e,t,n,r,i){function o(s,c,l,u){return i.allowed("elements.move",{shapes:s,delta:c,position:l,target:u})}e.on("shape.move.start",V5,function(s){var c=s.context,l=s.shape,u=r.get().slice();u.indexOf(l)===-1&&(u=[l]),u=U5(u),W(c,{shapes:u,validatedShapes:u,shape:l})}),e.on("shape.move.start",z5,function(s){var c=s.context,l=c.validatedShapes,u;if(u=c.canExecute=o(l),!u)return!1}),e.on("shape.move.move",H5,function(s){var c=s.context,l=c.validatedShapes,u=s.hover,f={x:s.dx,y:s.dy},p={x:s.x,y:s.y},d;if(d=o(l,f,p,u),c.delta=f,c.canExecute=d,d===null){c.target=null;return}c.target=u}),e.on("shape.move.end",function(s){var c=s.context,l=c.delta,u=c.canExecute,f=u==="attach",p=c.shapes;if(u===!1)return!1;l.x=bu(l.x),l.y=bu(l.y),!(l.x===0&&l.y===0)&&n.moveElements(p,l,c.target,{primaryShape:c.shape,attach:f})}),e.on("element.mousedown",function(s){if(po(s)){var c=Za(s);if(!c)throw new Error("must supply DOM mousedown event");return a(c,s.element)}});function a(s,c,l,u){if(fn(l)&&(u=l,l=!1),!(c.waypoints||!c.parent)&&!et(s.target).has("djs-hit-no-move")){var f=W5(c);return t.init(s,f,"shape.move",{cursor:"grabbing",autoActivate:l,data:{shape:c,context:u||{}}}),!0}}this.start=a}Bw.$inject=["eventBus","dragging","modeling","selection","rules"];function U5(e){var t=qa(e,"id");return Ge(e,function(n){for(;n=n.parent;)if(t[n.id])return!1;return!0})}var y0=499,gp="djs-dragging",b0="drop-ok",E0="drop-not-ok",_0="new-parent",x0="attach-ok";function Hw(e,t,n,r){function i(c){var l=o(c),u=G5(l);return u}function o(c){var l=oc(c,!0),u=mn(l,function(f){return(f.incoming||[]).concat(f.outgoing||[])});return Jl(l.concat(u))}function a(c,l){[x0,b0,E0,_0].forEach(function(u){u===l?t.addMarker(c,u):t.removeMarker(c,u)})}function s(c,l,u){r.addDragger(l,c.dragGroup),u&&t.addMarker(l,gp),c.allDraggedElements?c.allDraggedElements.push(l):c.allDraggedElements=[l]}e.on("shape.move.start",y0,function(c){var l=c.context,u=l.shapes,f=l.allDraggedElements,p=i(u);if(!l.dragGroup){var d=Te("g");ge(d,n.cls("djs-drag-group",["no-events"]));var h=t.getActiveLayer();Ie(h,d),l.dragGroup=d}p.forEach(function(v){r.addDragger(v,l.dragGroup)}),f?f=Jl([f,o(u)]):f=o(u),z(f,function(v){t.addMarker(v,gp)}),l.allDraggedElements=f,l.differentParents=q5(u)}),e.on("shape.move.move",y0,function(c){var l=c.context,u=l.dragGroup,f=l.target,p=l.shape.parent,d=l.canExecute;f&&(d==="attach"?a(f,x0):l.canExecute&&f&&f.id!==p.id?a(f,_0):a(f,l.canExecute?b0:E0)),Jn(u,c.dx,c.dy)}),e.on(["shape.move.out","shape.move.cleanup"],function(c){var l=c.context,u=l.target;u&&a(u,null)}),e.on("shape.move.cleanup",function(c){var l=c.context,u=l.allDraggedElements,f=l.dragGroup;z(u,function(p){t.removeMarker(p,gp)}),f&&jt(f)}),this.makeDraggable=s}Hw.$inject=["eventBus","canvas","styles","previewSupport"];function G5(e){var t=Ge(e,function(n){return Pt(n)?st(e,Ur({id:n.source.id}))&&st(e,Ur({id:n.target.id})):!0});return t}function q5(e){return hC(qa(e,function(t){return t.parent&&t.parent.id}))!==1}const Y5={__depends__:[dc,di,f_,vi,Hi,mc],__init__:["move","movePreview"],move:["type",Bw],movePreview:["type",Hw]};var zw=".djs-palette-toggle",Vw=".entry",K5=zw+", "+Vw,Ad="djs-palette-",X5="shown",Od="open",w0="two-column",Z5=1e3;function Jt(e,t){this._eventBus=e,this._canvas=t;var n=this;e.on("tool-manager.update",function(r){var i=r.tool;n.updateToolHighlight(i)}),e.on("i18n.changed",function(){n._update()}),e.on("diagram.init",function(){n._diagramInitialized=!0,n._rebuild()})}Jt.$inject=["eventBus","canvas"];Jt.prototype.registerProvider=function(e,t){t||(t=e,e=Z5),this._eventBus.on("palette.getProviders",e,function(n){n.providers.push(t)}),this._rebuild()};Jt.prototype.getEntries=function(){var e=this._getProviders();return e.reduce(J5,{})};Jt.prototype._rebuild=function(){if(this._diagramInitialized){var e=this._getProviders();e.length&&(this._container||this._init(),this._update())}};Jt.prototype._init=function(){var e=this,t=this._eventBus,n=this._getParentContainer(),r=this._container=Ct(Jt.HTML_MARKUP);n.appendChild(r),At(n).add(Ad+X5),Sr.bind(r,K5,"click",function(i){var o=i.delegateTarget;if(Bs(o,zw))return e.toggle();e.trigger("click",i)}),Ce.bind(r,"mousedown",function(i){i.stopPropagation()}),Sr.bind(r,Vw,"dragstart",function(i){e.trigger("dragstart",i)}),t.on("canvas.resized",this._layoutChanged,this),t.fire("palette.create",{container:r})};Jt.prototype._getProviders=function(e){var t=this._eventBus.createEvent({type:"palette.getProviders",providers:[]});return this._eventBus.fire(t),t.providers};Jt.prototype._toggleState=function(e){e=e||{};var t=this._getParentContainer(),n=this._container,r=this._eventBus,i,o=At(n),a=At(t);"twoColumn"in e?i=e.twoColumn:i=this._needsCollapse(t.clientHeight,this._entries||{}),o.toggle(w0,i),a.toggle(Ad+w0,i),"open"in e&&(o.toggle(Od,e.open),a.toggle(Ad+Od,e.open)),r.fire("palette.changed",{twoColumn:i,open:this.isOpen()})};Jt.prototype._update=function(){var e=ht(".djs-palette-entries",this._container),t=this._entries=this.getEntries();Mu(e),z(t,function(n,r){var i=n.group||"default",o=ht("[data-group="+Xo(i)+"]",e);o||(o=Ct('
    '),Tn(o,"data-group",i),e.appendChild(o));var a=n.html||(n.separator?'
    ':'
    '),s=Ct(a);if(o.appendChild(s),!n.separator&&(Tn(s,"data-action",r),n.title&&Tn(s,"title",n.title),n.className&&Q5(s,n.className),n.imageUrl)){var c=Ct("");Tn(c,"src",n.imageUrl),s.appendChild(c)}}),this.open()};Jt.prototype.trigger=function(e,t,n){var r,i,o=t.delegateTarget||t.target;return o?(r=Tn(o,"data-action"),i=t.originalEvent||t,this.triggerEntry(r,e,i,n)):t.preventDefault()};Jt.prototype.triggerEntry=function(e,t,n,r){var i=this._entries,o,a;if(o=i[e],!!o&&(a=o.action,this._eventBus.fire("palette.trigger",{entry:o,event:n})!==!1)){if(Rn(a)){if(t==="click")return a(n,r)}else if(a[t])return a[t](n,r);n.preventDefault()}};Jt.prototype._layoutChanged=function(){this._toggleState({})};Jt.prototype._needsCollapse=function(e,t){var n=50,r=Object.keys(t).length*46;return e=n.x&&t.yn.x&&t.y<=n.y?r={x:n.x,y:t.y,width:t.x-n.x,height:n.y-t.y}:t.x<=n.x&&t.y>n.y||t.x=n.y?r={x:t.x,y:n.y,width:n.x-t.x,height:t.y-n.y}:t.x>=n.x&&t.y>n.y||t.x>n.x&&t.y>=n.y?r={x:n.x,y:n.y,width:t.x-n.x,height:t.y-n.y}:r={x:n.x,y:n.y,width:0,height:0},r}const tk={__depends__:[mf,yc],__init__:["lassoTool"],lassoTool:["type",la]};var bp=1500,Uw="grab";function os(e,t,n,r,i,o){this._dragging=n,this._mouse=o;var a=this,s=r.get("keyboard",!1);i.registerTool("hand",{tool:"hand",dragging:"hand.move"}),e.on("element.mousedown",bp,function(c){if(Ko(c))return a.activateMove(c.originalEvent,!0),!1}),s&&s.addListener(bp,function(c){if(!(!S0(c.keyEvent)||a.isActive())){var l=a._mouse.getLastMoveEvent();a.activateMove(l,!!l)}},"keyboard.keydown"),s&&s.addListener(bp,function(c){!S0(c.keyEvent)||!a.isActive()||a.toggle()},"keyboard.keyup"),e.on("hand.end",function(c){var l=c.originalEvent.target;if(!c.hover&&!(l instanceof SVGElement))return!1;e.once("hand.ended",function(){a.activateMove(c.originalEvent,{reactivate:!0})})}),e.on("hand.move.move",function(c){var l=t.viewbox().scale;t.scroll({dx:c.dx*l,dy:c.dy*l})}),e.on("hand.move.end",function(c){var l=c.context,u=l.reactivate;return!Ko(c)&&u&&e.once("hand.move.ended",function(f){a.activateHand(f.originalEvent,!0,!0)}),!1})}os.$inject=["eventBus","canvas","dragging","injector","toolManager","mouse"];os.prototype.activateMove=function(e,t,n){typeof t=="object"&&(n=t,t=!1),this._dragging.init(e,"hand.move",{autoActivate:t,cursor:Uw,data:{context:n||{}}})};os.prototype.activateHand=function(e,t,n){this._dragging.init(e,"hand",{trapClick:!1,autoActivate:t,cursor:Uw,data:{context:{reactivate:n}}})};os.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateHand(e,!!e)};os.prototype.isActive=function(){var e=this._dragging.context();return e?/^(hand|hand\.move)$/.test(e.prefix):!1};function S0(e){return vn("Space",e)}const nk={__depends__:[mf,yc],__init__:["handTool"],handTool:["type",os]};var C0="connect-ok",T0="connect-not-ok";function as(e,t,n,r,i,o,a){var s=this;this._dragging=t,this._rules=o,this._mouse=a,i.registerTool("global-connect",{tool:"global-connect",dragging:"global-connect.drag"}),e.on("global-connect.hover",function(c){var l=c.context,u=c.hover,f=l.canStartConnect=s.canStartConnect(u);f!==null&&(l.startTarget=u,r.addMarker(u,f?C0:T0))}),e.on(["global-connect.out","global-connect.cleanup"],function(c){var l=c.context.startTarget,u=c.context.canStartConnect;l&&r.removeMarker(l,u?C0:T0)}),e.on(["global-connect.ended"],function(c){var l=c.context,u=l.startTarget,f={x:c.x,y:c.y},p=s.canStartConnect(u);if(p)return e.once("element.out",function(){e.once(["connect.ended","connect.canceled"],function(){e.fire("global-connect.drag.ended")}),n.start(null,u,f)}),!1})}as.$inject=["eventBus","dragging","connect","canvas","toolManager","rules","mouse"];as.prototype.start=function(e,t){this._dragging.init(e,"global-connect",{autoActivate:t,trapClick:!1,data:{context:{}}})};as.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();return this.start(e,!!e)};as.prototype.isActive=function(){var e=this._dragging.context();return e&&/^global-connect/.test(e.prefix)};as.prototype.canStartConnect=function(e){return this._rules.allowed("connection.start",{source:e})};const rk={__depends__:[sv,vi,Hi,mf,yc],globalConnect:["type",as]};function Pf(e,t,n,r,i,o,a,s){this._palette=e,this._create=t,this._elementFactory=n,this._spaceTool=r,this._lassoTool=i,this._handTool=o,this._globalConnect=a,this._translate=s,e.registerProvider(this)}Pf.$inject=["palette","create","elementFactory","spaceTool","lassoTool","handTool","globalConnect","translate"];Pf.prototype.getPaletteEntries=function(){var e={},t=this._create,n=this._elementFactory,r=this._spaceTool,i=this._lassoTool,o=this._handTool,a=this._globalConnect,s=this._translate;function c(f,p,d,h,v){function m(g){var y=n.createShape(W({type:f},v));if(v){var b=at(y);b.isExpanded=v.isExpanded}t.start(g,y)}var _=f.replace(/^bpmn:/,"");return{group:p,className:d,title:h||s("Create {type}",{type:_}),action:{dragstart:m,click:m}}}function l(f){var p=n.createShape({type:"bpmn:SubProcess",x:0,y:0,isExpanded:!0}),d=n.createShape({type:"bpmn:StartEvent",x:40,y:82,parent:p});t.start(f,[p,d],{hints:{autoSelect:[p]}})}function u(f){t.start(f,n.createParticipantShape())}return W(e,{"hand-tool":{group:"tools",className:"bpmn-icon-hand-tool",title:s("Activate the hand tool"),action:{click:function(f){o.activateHand(f)}}},"lasso-tool":{group:"tools",className:"bpmn-icon-lasso-tool",title:s("Activate the lasso tool"),action:{click:function(f){i.activateSelection(f)}}},"space-tool":{group:"tools",className:"bpmn-icon-space-tool",title:s("Activate the create/remove space tool"),action:{click:function(f){r.activateSelection(f)}}},"global-connect-tool":{group:"tools",className:"bpmn-icon-connection-multi",title:s("Activate the global connect tool"),action:{click:function(f){a.start(f)}}},"tool-separator":{group:"tools",separator:!0},"create.start-event":c("bpmn:StartEvent","event","bpmn-icon-start-event-none",s("Create StartEvent")),"create.intermediate-event":c("bpmn:IntermediateThrowEvent","event","bpmn-icon-intermediate-event-none",s("Create Intermediate/Boundary Event")),"create.end-event":c("bpmn:EndEvent","event","bpmn-icon-end-event-none",s("Create EndEvent")),"create.exclusive-gateway":c("bpmn:ExclusiveGateway","gateway","bpmn-icon-gateway-none",s("Create Gateway")),"create.task":c("bpmn:Task","activity","bpmn-icon-task",s("Create Task")),"create.data-object":c("bpmn:DataObjectReference","data-object","bpmn-icon-data-object",s("Create DataObjectReference")),"create.data-store":c("bpmn:DataStoreReference","data-store","bpmn-icon-data-store",s("Create DataStoreReference")),"create.subprocess-expanded":{group:"activity",className:"bpmn-icon-subprocess-expanded",title:s("Create expanded SubProcess"),action:{dragstart:l,click:l}},"create.participant-expanded":{group:"collaboration",className:"bpmn-icon-participant",title:s("Create Pool/Participant"),action:{dragstart:u,click:u}},"create.group":c("bpmn:Group","artifact","bpmn-icon-group",s("Create Group"))}),e};const ik={__depends__:[ek,tf,_w,tk,nk,rk,Vu],__init__:["paletteProvider"],paletteProvider:["type",Pf]};var ok=250;function lm(e,t,n,r,i){ae.call(this,e);function o(s){var c=s.canExecute.replacements;z(c,function(l){var u=l.oldElementId,f={type:l.newElementType};if(!s.visualReplacements[u]){var p=t.get(u);W(f,{x:p.x,y:p.y});var d=n.createShape(f);r.addShape(d,p.parent);var h=ht('[data-element-id="'+Xo(p.id)+'"]',s.dragGroup);h&&ge(h,{display:"none"});var v=i.addDragger(d,s.dragGroup);s.visualReplacements[u]=v,r.removeShape(d)}})}function a(s){var c=s.visualReplacements;z(c,function(l,u){var f=ht('[data-element-id="'+Xo(u)+'"]',s.dragGroup);f&&ge(f,{display:"inline"}),l.remove(),c[u]&&delete c[u]})}e.on("shape.move.move",ok,function(s){var c=s.context,l=c.canExecute;c.visualReplacements||(c.visualReplacements={}),l&&l.replacements?o(c):a(c)})}lm.$inject=["eventBus","elementRegistry","elementFactory","canvas","previewSupport"];xe(lm,ae);const ak={__depends__:[mc],__init__:["bpmnReplacePreview"],bpmnReplacePreview:["type",lm]};var sk=1250,Ep=40,ck=20,lk=10,R0=20,Gw=["x","y"],uk=Math.abs;function qw(e){e.on(["connect.hover","connect.move","connect.end"],sk,function(t){var n=t.context,r=n.canExecute,i=n.start,o=n.hover,a=n.source,s=n.target;t.originalEvent&&vr(t.originalEvent)||(n.initialConnectionStart||(n.initialConnectionStart=n.connectionStart),r&&o&&fk(t,o,vk(o)),o&&hk(r,["bpmn:Association","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:SequenceFlow"])?(n.connectionStart=wr(i),Qe(o,["bpmn:Event","bpmn:Gateway"])&&P0(t,wr(o)),Qe(o,["bpmn:Task","bpmn:SubProcess"])&&pk(t,o),w(a,"bpmn:BoundaryEvent")&&s===a.host&&dk(t)):Yw(r,"bpmn:MessageFlow")?(w(i,"bpmn:Event")&&(n.connectionStart=wr(i)),w(o,"bpmn:Event")&&P0(t,wr(o))):n.connectionStart=n.initialConnectionStart)})}qw.$inject=["eventBus"];function fk(e,t,n){Gw.forEach(function(r){var i=Kw(r,t);e[r]t[r]+i-n&&Xt(e,r,t[r]+i-n)})}function pk(e,t){var n=wr(t);Gw.forEach(function(r){mk(e,t,r)&&Xt(e,r,n[r])})}function dk(e){var t=e.context,n=t.source,r=t.target;if(!gk(t)){var i=wr(n),o=In(i,r,-10),a=[];/top|bottom/.test(o)&&a.push("x"),/left|right/.test(o)&&a.push("y"),a.forEach(function(s){var c=e[s],l;uk(c-i[s])i[s]?l=i[s]+Ep:l=i[s]-Ep,Xt(e,s,l))})}}function P0(e,t){Xt(e,"x",t.x),Xt(e,"y",t.y)}function Yw(e,t){return e&&e.type===t}function hk(e,t){return Ni(t,function(n){return Yw(e,n)})}function Kw(e,t){return e==="x"?t.width:t.height}function vk(e){return w(e,"bpmn:Task")?lk:ck}function mk(e,t,n){return e[n]>t[n]+R0&&e[n]=e.x||i&&i<=e.x)&&Xt(e,"x",e.x),(r&&r>=e.y||o&&o<=e.y)&&Xt(e,"y",e.y)}}function O0(e,t){return e.indexOf(t)!==-1}function M0(e,t,n){return t?{x:e.x-n.x,y:e.y-n.y}:{x:e.x,y:e.y}}var Sk=1250;function kc(e,t){var n=this;e.on(["resize.start"],function(r){n.initSnap(r)}),e.on(["resize.move","resize.end"],Sk,function(r){var i=r.context,o=i.shape,a=o.parent,s=i.direction,c=i.snapContext;if(!(r.originalEvent&&vr(r.originalEvent))&&!Fa(r)){var l=c.pointsForTarget(a);l.initialized||(l=n.addSnapTargetPoints(l,o,a,s),l.initialized=!0),Rk(s)&&Xt(r,"x",r.x),Pk(s)&&Xt(r,"y",r.y),t.snap(r,l)}}),e.on(["resize.cleanup"],function(){t.hide()})}kc.prototype.initSnap=function(e){var t=e.context,n=t.shape,r=t.direction,i=t.snapContext;i||(i=t.snapContext=new So);var o=Xw(n,r);return i.setSnapOrigin("corner",{x:o.x-e.x,y:o.y-e.y}),i};kc.prototype.addSnapTargetPoints=function(e,t,n,r){var i=this.getSnapTargets(t,n);return z(i,function(o){e.add("corner",gx(o)),e.add("corner",mx(o))}),e.add("corner",Xw(t,r)),e};kc.$inject=["eventBus","snapping"];kc.prototype.getSnapTargets=function(e,t){return yx(t).filter(function(n){return!Ck(n,e)&&!Pt(n)&&!Tk(n)&&!ut(n)})};function Xw(e,t){var n=$e(e),r=Ae(e),i={x:n.x,y:n.y};return t.indexOf("n")!==-1?i.y=r.top:t.indexOf("s")!==-1&&(i.y=r.bottom),t.indexOf("e")!==-1?i.x=r.right:t.indexOf("w")!==-1&&(i.x=r.left),i}function Ck(e,t){return e.host===t}function Tk(e){return!!e.hidden}function Rk(e){return e==="n"||e==="s"}function Pk(e){return e==="e"||e==="w"}var Ak=7,Ok=1e3;function Co(e){this._canvas=e,this._asyncHide=lE(Vn(this.hide,this),Ok)}Co.$inject=["canvas"];Co.prototype.snap=function(e,t){var n=e.context,r=n.snapContext,i=r.getSnapLocations(),o={x:Fa(e,"x"),y:Fa(e,"y")};z(i,function(a){var s=r.getSnapOrigin(a),c={x:e.x+s.x,y:e.y+s.y};if(z(["x","y"],function(l){var u;o[l]||(u=t.snap(c,a,l,Ak),u!==void 0&&(o[l]={value:u,originValue:u-s[l]}))}),o.x&&o.y)return!1}),this.showSnapLine("vertical",o.x&&o.x.value),this.showSnapLine("horizontal",o.y&&o.y.value),z(["x","y"],function(a){var s=o[a];fn(s)&&Xt(e,a,s.originValue)})};Co.prototype._createLine=function(e){var t=this._canvas.getLayer("snap"),n=Te("path");return ge(n,{d:"M0,0 L0,0"}),et(n).add("djs-snap-line"),Ie(t,n),{update:function(r){Le(r)?e==="horizontal"?ge(n,{d:"M-100000,"+r+" L+100000,"+r,display:""}):ge(n,{d:"M "+r+",-100000 L "+r+", +100000",display:""}):ge(n,{display:"none"})}}};Co.prototype._createSnapLines=function(){this._snapLines={horizontal:this._createLine("horizontal"),vertical:this._createLine("vertical")}};Co.prototype.showSnapLine=function(e,t){var n=this.getSnapLine(e);n&&n.update(t),this._asyncHide()};Co.prototype.getSnapLine=function(e){return this._snapLines||this._createSnapLines(),this._snapLines[e]};Co.prototype.hide=function(){z(this._snapLines,function(e){e.update()})};const Mk={__init__:["createMoveSnapping","resizeSnapping","snapping"],createMoveSnapping:["type",mi],resizeSnapping:["type",kc],snapping:["type",Co]},Dk={__depends__:[Mk],__init__:["connectSnapping","createMoveSnapping"],connectSnapping:["type",qw],createMoveSnapping:["type",ss]};function Fe(e,t,n,r){this._open=!1,this._results=[],this._eventMaps=[],this._canvas=e,this._eventBus=t,this._overlays=n,this._selection=r,this._container=Ct(Fe.BOX_HTML),this._searchInput=ht(Fe.INPUT_SELECTOR,this._container),this._resultsContainer=ht(Fe.RESULTS_CONTAINER_SELECTOR,this._container),this._canvas.getContainer().appendChild(this._container),t.on(["canvas.destroy","diagram.destroy"],this.close,this)}Fe.$inject=["canvas","eventBus","overlays","selection"];Fe.prototype._bindEvents=function(){var e=this;function t(n,r,i,o){e._eventMaps.push({el:n,type:i,listener:Sr.bind(n,r,i,o)})}t(document,"html","click",function(n){e.close()}),t(this._container,Fe.INPUT_SELECTOR,"click",function(n){n.stopPropagation(),n.delegateTarget.focus()}),t(this._container,Fe.RESULT_SELECTOR,"mouseover",function(n){n.stopPropagation(),e._scrollToNode(n.delegateTarget),e._preselect(n.delegateTarget)}),t(this._container,Fe.RESULT_SELECTOR,"click",function(n){n.stopPropagation(),e._select(n.delegateTarget)}),t(this._container,Fe.INPUT_SELECTOR,"keydown",function(n){vn("ArrowUp",n)&&n.preventDefault(),vn("ArrowDown",n)&&n.preventDefault()}),t(this._container,Fe.INPUT_SELECTOR,"keyup",function(n){if(vn("Escape",n))return e.close();if(vn("Enter",n)){var r=e._getCurrentResult();return r?e._select(r):e.close()}if(vn("ArrowUp",n))return e._scrollToDirection(!0);if(vn("ArrowDown",n))return e._scrollToDirection();vn(["ArrowLeft","ArrowRight"],n)||e._search(n.delegateTarget.value)})};Fe.prototype._unbindEvents=function(){this._eventMaps.forEach(function(e){Sr.unbind(e.el,e.type,e.listener)})};Fe.prototype._search=function(e){var t=this;if(this._clearResults(),!(!e||e==="")){var n=this._searchProvider.find(e);if(n.length){n.forEach(function(i){var o=i.element.id,a=t._createResultNode(i,o);t._results[o]={element:i.element,node:a}});var r=ht(Fe.RESULT_SELECTOR,this._resultsContainer);this._scrollToNode(r),this._preselect(r)}}};Fe.prototype._scrollToDirection=function(e){var t=this._getCurrentResult();if(t){var n=e?t.previousElementSibling:t.nextElementSibling;n&&(this._scrollToNode(n),this._preselect(n))}};Fe.prototype._scrollToNode=function(e){if(!(!e||e===this._getCurrentResult())){var t=e.offsetTop,n=this._resultsContainer.scrollTop,r=t-this._resultsContainer.clientHeight+e.clientHeight;t0&&D0(n,e.primaryTokens,Fe.RESULT_PRIMARY_HTML),D0(n,e.secondaryTokens,Fe.RESULT_SECONDARY_HTML),Tn(n,Fe.RESULT_ID_ATTRIBUTE,t),this._resultsContainer.appendChild(n),n};Fe.prototype.registerProvider=function(e){this._searchProvider=e};Fe.prototype.open=function(){if(!this._searchProvider)throw new Error("no search provider registered");this.isOpen()||(this._bindEvents(),this._open=!0,At(this._container).add("open"),this._searchInput.focus(),this._eventBus.fire("searchPad.opened"))};Fe.prototype.close=function(){this.isOpen()&&(this._unbindEvents(),this._open=!1,At(this._container).remove("open"),this._clearResults(),this._searchInput.value="",this._searchInput.blur(),this._resetOverlay(),this._eventBus.fire("searchPad.closed"))};Fe.prototype.toggle=function(){this.isOpen()?this.close():this.open()};Fe.prototype.isOpen=function(){return this._open};Fe.prototype._preselect=function(e){var t=this._getCurrentResult();if(e!==t){t&&At(t).remove(Fe.RESULT_SELECTED_CLASS);var n=Tn(e,Fe.RESULT_ID_ATTRIBUTE),r=this._results[n].element;At(e).add(Fe.RESULT_SELECTED_CLASS),this._resetOverlay(r),this._canvas.scrollToElement(r,{top:400}),this._selection.select(r),this._eventBus.fire("searchPad.preselected",r)}};Fe.prototype._select=function(e){var t=Tn(e,Fe.RESULT_ID_ATTRIBUTE),n=this._results[t].element;this.close(),this._resetOverlay(),this._canvas.scrollToElement(n,{top:400}),this._selection.select(n),this._eventBus.fire("searchPad.selected",n)};Fe.prototype._resetOverlay=function(e){if(this._overlayId&&this._overlays.remove(this._overlayId),e){var t=Zt(e),n=Ik(t);this._overlayId=this._overlays.add(e,n)}};function Ik(e){var t=6,n=e.width+t*2,r=e.height+t*2,i={width:n+"px",height:r+"px"},o=Ct('
    ');return Cn(o,i),{position:{bottom:r-t,right:n-t},show:!0,html:o}}function D0(e,t,n){var r=Nk(t),i=Ct(n);i.innerHTML=r,e.appendChild(i)}function Nk(e){var t="";return e.forEach(function(n){n.matched?t+=''+cd(n.matched)+"":t+=cd(n.normal)}),t!==""?t:null}Fe.CONTAINER_SELECTOR=".djs-search-container";Fe.INPUT_SELECTOR=".djs-search-input input";Fe.RESULTS_CONTAINER_SELECTOR=".djs-search-results";Fe.RESULT_SELECTOR=".djs-search-result";Fe.RESULT_SELECTED_CLASS="djs-search-result-selected";Fe.RESULT_SELECTED_SELECTOR="."+Fe.RESULT_SELECTED_CLASS;Fe.RESULT_ID_ATTRIBUTE="data-result-id";Fe.RESULT_HIGHLIGHT_CLASS="djs-search-highlight";Fe.OVERLAY_CLASS="djs-search-overlay";Fe.BOX_HTML='
    ';Fe.RESULT_HTML='
    ';Fe.RESULT_PRIMARY_HTML='
    ';Fe.RESULT_SECONDARY_HTML='

    ';const kk={__depends__:[Gu,di],searchPad:["type",Fe]};function um(e,t,n){this._elementRegistry=e,this._canvas=n,t.registerProvider(this)}um.$inject=["elementRegistry","searchPad","canvas"];um.prototype.find=function(e){var t=this._canvas.getRootElement(),n=this._elementRegistry.filter(function(r){return!r.labelTarget});return n=Ge(n,function(r){return r!==t}),n=mn(n,function(r){return{primaryTokens:N0(Cr(r),e),secondaryTokens:N0(r.id,e),element:r}}),n=Ge(n,function(r){return I0(r.primaryTokens)||I0(r.secondaryTokens)}),n=Yr(n,function(r){return Cr(r.element)+r.element.id}),n};function I0(e){var t=Ge(e,function(n){return!!n.matched});return t.length>0}function N0(e,t){var n=[],r=e;if(!e)return n;e=e.toLowerCase(),t=t.toLowerCase();var i=e.indexOf(t);return i>-1?(i!==0&&n.push({normal:r.substr(0,i)}),n.push({matched:r.substr(i,t.length)}),t.length+ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(n[i]=e[i]);return n}function Tr(e,t){if(e==null)return{};var n=Wk(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var e1={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i1)&&(e=1),e}function yl(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Bo(e){return e.length===1?"0"+e:String(e)}function Yk(e,t,n){return{r:Dn(e,255)*255,g:Dn(t,255)*255,b:Dn(n,255)*255}}function k0(e,t,n){e=Dn(e,255),t=Dn(t,255),n=Dn(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var c=r-i;switch(a=s>.5?c/(2-r-i):c/(r+i),r){case e:o=(t-n)/c+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Kk(e,t,n){var r,i,o;if(e=Dn(e,360),t=Dn(t,100),n=Dn(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=_p(s,a,e+1/3),i=_p(s,a,e),o=_p(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function Id(e,t,n){e=Dn(e,255),t=Dn(t,255),n=Dn(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,c=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var kd={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Ta(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=nL(e)),typeof e=="object"&&(_i(e.r)&&_i(e.g)&&_i(e.b)?(t=Yk(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):_i(e.h)&&_i(e.s)&&_i(e.v)?(r=yl(e.s),i=yl(e.v),t=Xk(e.h,r,i),a=!0,s="hsv"):_i(e.h)&&_i(e.s)&&_i(e.l)&&(r=yl(e.s),o=yl(e.l),t=Kk(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=t1(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var eL="[-\\+]?\\d+%?",tL="[-\\+]?\\d*\\.\\d+%?",no="(?:".concat(tL,")|(?:").concat(eL,")"),xp="[\\s|\\(]+(".concat(no,")[,|\\s]+(").concat(no,")[,|\\s]+(").concat(no,")\\s*\\)?"),wp="[\\s|\\(]+(".concat(no,")[,|\\s]+(").concat(no,")[,|\\s]+(").concat(no,")[,|\\s]+(").concat(no,")\\s*\\)?"),Br={CSS_UNIT:new RegExp(no),rgb:new RegExp("rgb"+xp),rgba:new RegExp("rgba"+wp),hsl:new RegExp("hsl"+xp),hsla:new RegExp("hsla"+wp),hsv:new RegExp("hsv"+xp),hsva:new RegExp("hsva"+wp),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function nL(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(kd[e])e=kd[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Br.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Br.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Br.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Br.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Br.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Br.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Br.hex8.exec(e),n?{r:pr(n[1]),g:pr(n[2]),b:pr(n[3]),a:L0(n[4]),format:t?"name":"hex8"}:(n=Br.hex6.exec(e),n?{r:pr(n[1]),g:pr(n[2]),b:pr(n[3]),format:t?"name":"hex"}:(n=Br.hex4.exec(e),n?{r:pr(n[1]+n[1]),g:pr(n[2]+n[2]),b:pr(n[3]+n[3]),a:L0(n[4]+n[4]),format:t?"name":"hex8"}:(n=Br.hex3.exec(e),n?{r:pr(n[1]+n[1]),g:pr(n[2]+n[2]),b:pr(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function _i(e){return!!Br.CSS_UNIT.exec(String(e))}var dr=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=Jk(t)),this.originalInput=t;var i=Ta(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=t1(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Id(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Id(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=k0(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=k0(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Nd(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Zk(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Dn(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Dn(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+Nd(this.r,this.g,this.b,!1),n=0,r=Object.entries(kd);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=gl(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=gl(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=gl(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=gl(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),i=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;a=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-bl*t:Math.round(e.h)+bl*t:r=n?Math.round(e.h)+bl*t:Math.round(e.h)-bl*t,r<0?r+=360:r>=360&&(r-=360),r}function B0(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-$0*t:t===r1?r=e.s+$0:r=e.s+rL*t,r>1&&(r=1),n&&t===n1&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function H0(e,t,n){var r;return n?r=e.v+iL*t:r=e.v-oL*t,r>1&&(r=1),Number(r.toFixed(2))}function Zo(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Ta(e),i=n1;i>0;i-=1){var o=j0(r),a=El(Ta({h:F0(o,i,!0),s:B0(o,i,!0),v:H0(o,i,!0)}));n.push(a)}n.push(El(r));for(var s=1;s<=r1;s+=1){var c=j0(r),l=El(Ta({h:F0(c,s),s:B0(c,s),v:H0(c,s)}));n.push(l)}return t.theme==="dark"?aL.map(function(u){var f=u.index,p=u.opacity,d=El(sL(Ta(t.backgroundColor||"#141414"),Ta(n[f]),p*100));return d}):n}var Sp={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Ls={},Cp={};Object.keys(Sp).forEach(function(e){Ls[e]=Zo(Sp[e]),Ls[e].primary=Ls[e][5],Cp[e]=Zo(Sp[e],{theme:"dark",backgroundColor:"#141414"}),Cp[e].primary=Cp[e][5]});var cL=Ls.gold,lL=Ls.blue,uL=J.createContext({});const pm=uL;function z0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ie(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):pL}function Of(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function dL(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function o1(e){return Array.from((Ld.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function a1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!jn())return null;var n=t.csp,r=t.prepend,i=t.priority,o=i===void 0?0:i,a=dL(r),s=a==="prependQueue",c=document.createElement("style");c.setAttribute(V0,a),s&&o&&c.setAttribute(W0,"".concat(o)),n!=null&&n.nonce&&(c.nonce=n==null?void 0:n.nonce),c.innerHTML=e;var l=Of(t),u=l.firstChild;if(r){if(s){var f=o1(l).filter(function(p){if(!["prepend","prependQueue"].includes(p.getAttribute(V0)))return!1;var d=Number(p.getAttribute(W0)||0);return o>=d});if(f.length)return l.insertBefore(c,f[f.length-1].nextSibling),c}l.insertBefore(c,u)}else l.appendChild(c);return c}function s1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Of(t);return o1(n).find(function(r){return r.getAttribute(i1(t))===e})}function Eu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=s1(e,t);if(n){var r=Of(t);r.removeChild(n)}}function hL(e,t){var n=Ld.get(e);if(!n||!fL(document,n)){var r=a1("",t),i=r.parentNode;Ld.set(e,i),e.removeChild(r)}}function Ha(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Of(n);hL(r,n);var i=s1(t,n);if(i){var o,a;if((o=n.csp)!==null&&o!==void 0&&o.nonce&&i.nonce!==((a=n.csp)===null||a===void 0?void 0:a.nonce)){var s;i.nonce=(s=n.csp)===null||s===void 0?void 0:s.nonce}return i.innerHTML!==e&&(i.innerHTML=e),i}var c=a1(e,n);return c.setAttribute(i1(n),t),c}function c1(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function vL(e){return c1(e)instanceof ShadowRoot}function _u(e){return vL(e)?c1(e):null}var $d={},dm=[],mL=function(t){dm.push(t)};function Zs(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){var n=dm.reduce(function(r,i){return i(r??"","warning")},t);n&&console.error("Warning: ".concat(n))}}function gL(e,t){if(process.env.NODE_ENV!=="production"&&!e&&console!==void 0){var n=dm.reduce(function(r,i){return i(r??"","note")},t);n&&console.warn("Note: ".concat(n))}}function l1(){$d={}}function u1(e,t,n){!t&&!$d[n]&&(e(!1,n),$d[n]=!0)}function Ft(e,t){u1(Zs,e,t)}function yL(e,t){u1(gL,e,t)}Ft.preMessage=mL;Ft.resetWarned=l1;Ft.noteOnce=yL;function bL(e){return e.replace(/-(.)/g,function(t,n){return n.toUpperCase()})}function EL(e,t){Ft(e,"[@ant-design/icons] ".concat(t))}function U0(e){return yt(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(yt(e.icon)==="object"||typeof e.icon=="function")}function G0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:delete t[n],t[bL(n)]=r}return t},{})}function jd(e,t,n){return n?J.createElement(e.tag,ie(ie({key:t},G0(e.attrs)),n),(e.children||[]).map(function(r,i){return jd(r,"".concat(t,"-").concat(e.tag,"-").concat(i))})):J.createElement(e.tag,ie({key:t},G0(e.attrs)),(e.children||[]).map(function(r,i){return jd(r,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function f1(e){return Zo(e)[0]}function p1(e){return e?Array.isArray(e)?e:[e]:[]}var _L=` .anticon { display: inline-block; color: inherit; font-style: normal; line-height: 0; text-align: center; text-transform: none; vertical-align: -0.125em; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .anticon > * { line-height: 1; } .anticon svg { display: inline-block; } .anticon::before { display: none; } .anticon .anticon-icon { display: block; } .anticon[tabindex] { cursor: pointer; } .anticon-spin::before, .anticon-spin { display: inline-block; -webkit-animation: loadingCircle 1s infinite linear; animation: loadingCircle 1s infinite linear; } @-webkit-keyframes loadingCircle { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes loadingCircle { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } `,xL=function(t){var n=J.useContext(pm),r=n.csp,i=n.prefixCls,o=_L;i&&(o=o.replace(/anticon/g,i)),J.useEffect(function(){var a=t.current,s=_u(a);Ha(o,"@ant-design-icons",{prepend:!0,csp:r,attachTo:s})},[])},wL=["icon","className","onClick","style","primaryColor","secondaryColor"],$s={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function SL(e){var t=e.primaryColor,n=e.secondaryColor;$s.primaryColor=t,$s.secondaryColor=n||f1(t),$s.calculated=!!n}function CL(){return ie({},$s)}var Mf=function(t){var n=t.icon,r=t.className,i=t.onClick,o=t.style,a=t.primaryColor,s=t.secondaryColor,c=Tr(t,wL),l=P.useRef(),u=$s;if(a&&(u={primaryColor:a,secondaryColor:s||f1(a)}),xL(l),EL(U0(n),"icon should be icon definiton, but got ".concat(n)),!U0(n))return null;var f=n;return f&&typeof f.icon=="function"&&(f=ie(ie({},f),{},{icon:f.icon(u.primaryColor,u.secondaryColor)})),jd(f.icon,"svg-".concat(f.name),ie(ie({className:r,onClick:i,style:o,"data-icon":f.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},c),{},{ref:l}))};Mf.displayName="IconReact";Mf.getTwoToneColors=CL;Mf.setTwoToneColors=SL;const hm=Mf;function d1(e){var t=p1(e),n=Se(t,2),r=n[0],i=n[1];return hm.setTwoToneColors({primaryColor:r,secondaryColor:i})}function TL(){var e=hm.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var RL=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];d1(lL.primary);var Df=P.forwardRef(function(e,t){var n,r=e.className,i=e.icon,o=e.spin,a=e.rotate,s=e.tabIndex,c=e.onClick,l=e.twoToneColor,u=Tr(e,RL),f=P.useContext(pm),p=f.prefixCls,d=p===void 0?"anticon":p,h=f.rootClassName,v=gt(h,d,(n={},Z(n,"".concat(d,"-").concat(i.name),!!i.name),Z(n,"".concat(d,"-spin"),!!o||i.name==="loading"),n),r),m=s;m===void 0&&c&&(m=-1);var _=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,g=p1(l),y=Se(g,2),b=y[0],x=y[1];return P.createElement("span",gn({role:"img","aria-label":i.name},u,{ref:t,tabIndex:m,onClick:c,className:v}),P.createElement(hm,{icon:i,primaryColor:b,secondaryColor:x,style:_}))});Df.displayName="AntdIcon";Df.getTwoToneColor=TL;Df.setTwoToneColor=d1;const Lc=Df;var h1=function(t,n){return P.createElement(Lc,gn({},t,{ref:n,icon:Hk}))};process.env.NODE_ENV!=="production"&&(h1.displayName="CloseCircleFilled");const PL=P.forwardRef(h1);function AL(e){if(Array.isArray(e))return Dd(e)}function v1(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function OL(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ue(e){return AL(e)||v1(e)||fm(e)||OL()}function ya(e){return!!(e.addonBefore||e.addonAfter)}function Tp(e){return!!(e.prefix||e.suffix||e.allowClear)}function Rp(e,t,n,r){if(n){var i=t;if(t.type==="click"){var o=e.cloneNode(!0);i=Object.create(t,{target:{value:o},currentTarget:{value:o}}),o.value="",n(i);return}if(r!==void 0){i=Object.create(t,{target:{value:e},currentTarget:{value:e}}),e.value=r,n(i);return}n(i)}}function ML(e){return typeof e>"u"||e===null?"":String(e)}var DL=function(t){var n,r,i=t.inputElement,o=t.prefixCls,a=t.prefix,s=t.suffix,c=t.addonBefore,l=t.addonAfter,u=t.className,f=t.style,p=t.disabled,d=t.readOnly,h=t.focused,v=t.triggerFocus,m=t.allowClear,_=t.value,g=t.handleReset,y=t.hidden,b=t.classes,x=t.classNames,S=t.dataAttrs,C=t.styles,M=t.components,A=(M==null?void 0:M.affixWrapper)||"span",N=(M==null?void 0:M.groupWrapper)||"span",L=(M==null?void 0:M.wrapper)||"span",B=(M==null?void 0:M.groupAddon)||"span",V=J.useRef(null),K=function(ee){var oe;(oe=V.current)!==null&&oe!==void 0&&oe.contains(ee.target)&&(v==null||v())},Q=function(){var ee;if(!m)return null;var oe=!p&&!d&&_,le="".concat(o,"-clear-icon"),me=yt(m)==="object"&&m!==null&&m!==void 0&&m.clearIcon?m.clearIcon:"✖";return J.createElement("span",{onClick:g,onMouseDown:function(Be){return Be.preventDefault()},className:gt(le,(ee={},Z(ee,"".concat(le,"-hidden"),!oe),Z(ee,"".concat(le,"-has-suffix"),!!s),ee)),role:"button",tabIndex:-1},me)},G=J.cloneElement(i,{value:_,hidden:y,className:gt((n=i.props)===null||n===void 0?void 0:n.className,!Tp(t)&&!ya(t)&&u)||null,style:ie(ie({},(r=i.props)===null||r===void 0?void 0:r.style),!Tp(t)&&!ya(t)?f:{})});if(Tp(t)){var H,q="".concat(o,"-affix-wrapper"),T=gt(q,(H={},Z(H,"".concat(q,"-disabled"),p),Z(H,"".concat(q,"-focused"),h),Z(H,"".concat(q,"-readonly"),d),Z(H,"".concat(q,"-input-with-clear-btn"),s&&m&&_),H),!ya(t)&&u,b==null?void 0:b.affixWrapper,x==null?void 0:x.affixWrapper),E=(s||m)&&J.createElement("span",{className:gt("".concat(o,"-suffix"),x==null?void 0:x.suffix),style:C==null?void 0:C.suffix},Q(),s);G=J.createElement(A,gn({className:T,style:ie(ie({},ya(t)?void 0:f),C==null?void 0:C.affixWrapper),hidden:!ya(t)&&y,onClick:K},S==null?void 0:S.affixWrapper,{ref:V}),a&&J.createElement("span",{className:gt("".concat(o,"-prefix"),x==null?void 0:x.prefix),style:C==null?void 0:C.prefix},a),J.cloneElement(i,{value:_,hidden:null}),E)}if(ya(t)){var D="".concat(o,"-group"),k="".concat(D,"-addon"),I=gt("".concat(o,"-wrapper"),D,b==null?void 0:b.wrapper),$=gt("".concat(o,"-group-wrapper"),u,b==null?void 0:b.group);return J.createElement(N,{className:$,style:f,hidden:y},J.createElement(L,{className:I},c&&J.createElement(B,{className:k},c),J.cloneElement(G,{hidden:null}),l&&J.createElement(B,{className:k},l)))}return G};function Ci(e){var t=P.useRef();t.current=e;var n=P.useCallback(function(){for(var r,i=arguments.length,o=new Array(i),a=0;a1&&arguments[1]!==void 0?arguments[1]:{},n=[];return J.Children.forEach(e,function(r){r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat(za(r)):g1.isFragment(r)&&r.props?n=n.concat(za(r.props.children,t)):n.push(r))}),n}function vm(e,t,n){var r=P.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}function mm(e,t){typeof e=="function"?e(t):yt(e)==="object"&&e&&"current"in e&&(e.current=t)}function $c(){for(var e=arguments.length,t=new Array(e),n=0;n0},e.prototype.connect_=function(){!Hd||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),BL?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!Hd||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,i=FL.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),E1=function(e,t){for(var n=0,r=Object.keys(t);n"u"||!(Element instanceof Object))){if(!(t instanceof Va(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new KL(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Va(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new XL(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),x1=typeof WeakMap<"u"?new WeakMap:new b1,w1=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=HL.getInstance(),r=new ZL(t,n,this);x1.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){w1.prototype[e]=function(){var t;return(t=x1.get(this))[e].apply(t,arguments)}});var QL=function(){return typeof wu.ResizeObserver<"u"?wu.ResizeObserver:w1}(),Ai=new Map;function S1(e){e.forEach(function(t){var n,r=t.target;(n=Ai.get(r))===null||n===void 0||n.forEach(function(i){return i(r)})})}var C1=new QL(S1);process.env.NODE_ENV;process.env.NODE_ENV;function JL(e,t){Ai.has(e)||(Ai.set(e,new Set),C1.observe(e)),Ai.get(e).add(t)}function e$(e,t){Ai.has(e)&&(Ai.get(e).delete(t),Ai.get(e).size||(C1.unobserve(e),Ai.delete(e)))}function gi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q0(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function mt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n$(e,t){if(t&&(yt(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mt(e)}function $f(e){var t=t$();return function(){var r=Cu(e),i;if(t){var o=Cu(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return n$(this,i)}}var r$=function(e){Lf(n,e);var t=$f(n);function n(){return gi(this,n),t.apply(this,arguments)}return yi(n,[{key:"render",value:function(){return this.props.children}}]),n}(P.Component),Vd=P.createContext(null);function i$(e){var t=e.children,n=e.onBatchResize,r=P.useRef(0),i=P.useRef([]),o=P.useContext(Vd),a=P.useCallback(function(s,c,l){r.current+=1;var u=r.current;i.current.push({size:s,element:c,data:l}),Promise.resolve().then(function(){u===r.current&&(n==null||n(i.current),i.current=[])}),o==null||o(s,c,l)},[n,o]);return P.createElement(Vd.Provider,{value:a},t)}function o$(e,t){var n=e.children,r=e.disabled,i=P.useRef(null),o=P.useRef(null),a=P.useContext(Vd),s=typeof n=="function",c=s?n(i):n,l=P.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),u=!s&&P.isValidElement(c)&&Nf(c),f=u?c.ref:null,p=P.useMemo(function(){return $c(f,i)},[f,i]),d=function(){return Bd(i.current)||Bd(o.current)};P.useImperativeHandle(t,function(){return d()});var h=P.useRef(e);h.current=e;var v=P.useCallback(function(m){var _=h.current,g=_.onResize,y=_.data,b=m.getBoundingClientRect(),x=b.width,S=b.height,C=m.offsetWidth,M=m.offsetHeight,A=Math.floor(x),N=Math.floor(S);if(l.current.width!==A||l.current.height!==N||l.current.offsetWidth!==C||l.current.offsetHeight!==M){var L={width:A,height:N,offsetWidth:C,offsetHeight:M};l.current=L;var B=C===Math.round(x)?x:C,V=M===Math.round(S)?S:M,K=ie(ie({},L),{},{offsetWidth:B,offsetHeight:V});a==null||a(K,m,y),g&&Promise.resolve().then(function(){g(K,m)})}},[]);return P.useEffect(function(){var m=d();return m&&!r&&JL(m,v),function(){return e$(m,v)}},[i.current,r]),P.createElement(r$,{ref:o},u?P.cloneElement(c,{ref:p}):c)}var T1=P.forwardRef(o$);process.env.NODE_ENV!=="production"&&(T1.displayName="SingleObserver");var a$="rc-observer-key";function s$(e,t){var n=e.children,r=typeof n=="function"?[n]:za(n);return process.env.NODE_ENV!=="production"&&(r.length>1?Zs(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):r.length===0&&Zs(!1,"`children` of ResizeObserver is empty. Nothing is in observe.")),r.map(function(i,o){var a=(i==null?void 0:i.key)||"".concat(a$,"-").concat(o);return P.createElement(T1,gn({},e,{key:a,ref:o===0?t:void 0}),i)})}var cs=P.forwardRef(s$);process.env.NODE_ENV!=="production"&&(cs.displayName="ResizeObserver");cs.Collection=i$;var R1=function(t){return+setTimeout(t,16)},P1=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&(R1=function(t){return window.requestAnimationFrame(t)},P1=function(t){return window.cancelAnimationFrame(t)});var J0=0,gm=new Map;function A1(e){gm.delete(e)}var Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;J0+=1;var r=J0;function i(o){if(o===0)A1(r),t();else{var a=R1(function(){i(o-1)});gm.set(r,a)}}return i(n),r};Qo.cancel=function(e){var t=gm.get(e);return A1(t),P1(t)};var c$=` min-height:0 !important; max-height:none !important; height:0 !important; visibility:hidden !important; overflow:hidden !important; position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; pointer-events: none !important; `,l$=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],Ap={},br;function u$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&Ap[n])return Ap[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=l$.map(function(l){return"".concat(l,":").concat(r.getPropertyValue(l))}).join(";"),c={sizingStyle:s,paddingSize:o,borderSize:a,boxSizing:i};return t&&n&&(Ap[n]=c),c}function f$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;br||(br=document.createElement("textarea"),br.setAttribute("tab-index","-1"),br.setAttribute("aria-hidden","true"),document.body.appendChild(br)),e.getAttribute("wrap")?br.setAttribute("wrap",e.getAttribute("wrap")):br.removeAttribute("wrap");var i=u$(e,t),o=i.paddingSize,a=i.borderSize,s=i.boxSizing,c=i.sizingStyle;br.setAttribute("style","".concat(c,";").concat(c$)),br.value=e.value||e.placeholder||"";var l=void 0,u=void 0,f,p=br.scrollHeight;if(s==="border-box"?p+=a:s==="content-box"&&(p-=o),n!==null||r!==null){br.value=" ";var d=br.scrollHeight-o;n!==null&&(l=d*n,s==="border-box"&&(l=l+o+a),p=Math.max(l,p)),r!==null&&(u=d*r,s==="border-box"&&(u=u+o+a),f=p>u?"":"hidden",p=Math.min(u,p))}var h={height:p,overflowY:f,resize:"none"};return l&&(h.minHeight=l),u&&(h.maxHeight=u),h}var p$=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Op=0,Mp=1,Dp=2,d$=P.forwardRef(function(e,t){var n=e,r=n.prefixCls;n.onPressEnter;var i=n.defaultValue,o=n.value,a=n.autoSize,s=n.onResize,c=n.className,l=n.style,u=n.disabled,f=n.onChange,p=n.onInternalAutoSize,d=Tr(n,p$),h=If(i,{value:o,postState:function(U){return U??""}}),v=Se(h,2),m=v[0],_=v[1],g=function(U){_(U.target.value),f==null||f(U)},y=P.useRef();P.useImperativeHandle(t,function(){return{textArea:y.current}});var b=P.useMemo(function(){return a&&yt(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),x=Se(b,2),S=x[0],C=x[1],M=!!a,A=function(){try{if(document.activeElement===y.current){var U=y.current,ee=U.selectionStart,oe=U.selectionEnd,le=U.scrollTop;y.current.setSelectionRange(ee,oe),y.current.scrollTop=le}}catch{}},N=P.useState(Dp),L=Se(N,2),B=L[0],V=L[1],K=P.useState(),Q=Se(K,2),G=Q[0],H=Q[1],q=function(){V(Op),process.env.NODE_ENV==="test"&&(p==null||p())};on(function(){M&&q()},[o,S,C,M]),on(function(){if(B===Op)V(Mp);else if(B===Mp){var $=f$(y.current,!1,S,C);V(Dp),H($)}else A()},[B]);var T=P.useRef(),E=function(){Qo.cancel(T.current)},D=function(U){B===Dp&&(s==null||s(U),a&&(E(),T.current=Qo(function(){q()})))};P.useEffect(function(){return E},[]);var k=M?G:null,I=ie(ie({},l),k);return(B===Op||B===Mp)&&(I.overflowY="hidden",I.overflowX="hidden"),P.createElement(cs,{onResize:D,disabled:!(a||s)},P.createElement("textarea",gn({},d,{ref:y,style:I,className:gt(r,c,Z({},"".concat(r,"-disabled"),u)),disabled:u,value:m,onChange:g})))}),h$=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function O1(e,t){return Ue(e||"").slice(0,t).join("")}function eb(e,t,n,r){var i=n;return e?i=O1(n,r):Ue(t||"").lengthr&&(i=t),i}var v$=J.forwardRef(function(e,t){var n,r=e.defaultValue,i=e.value,o=e.onFocus,a=e.onBlur,s=e.onChange,c=e.allowClear,l=e.maxLength,u=e.onCompositionStart,f=e.onCompositionEnd,p=e.suffix,d=e.prefixCls,h=d===void 0?"rc-textarea":d,v=e.classes,m=e.showCount,_=e.className,g=e.style,y=e.disabled,b=e.hidden,x=e.classNames,S=e.styles,C=e.onResize,M=Tr(e,h$),A=If(r,{value:i,defaultValue:r}),N=Se(A,2),L=N[0],B=N[1],V=J.useRef(null),K=J.useState(!1),Q=Se(K,2),G=Q[0],H=Q[1],q=J.useState(!1),T=Se(q,2),E=T[0],D=T[1],k=J.useRef(),I=J.useRef(0),$=J.useState(null),U=Se($,2),ee=U[0],oe=U[1],le=function(){var he;(he=V.current)===null||he===void 0||he.textArea.focus()};J.useImperativeHandle(t,function(){return{resizableTextArea:V.current,focus:le,blur:function(){var he;(he=V.current)===null||he===void 0||he.textArea.blur()}}}),J.useEffect(function(){H(function(ye){return!y&&ye})},[y]);var me=Number(l)>0,_e=function(he){D(!0),k.current=L,I.current=he.currentTarget.selectionStart,u==null||u(he)},Be=function(he){D(!1);var Xe=he.currentTarget.value;if(me){var Tt,zt=I.current>=l+1||I.current===((Tt=k.current)===null||Tt===void 0?void 0:Tt.length);Xe=eb(zt,k.current,Xe,l)}Xe!==L&&(B(Xe),Rp(he.currentTarget,he,s,Xe)),f==null||f(he)},rt=function(he){var Xe=he.target.value;if(!E&&me){var Tt=he.target.selectionStart>=l+1||he.target.selectionStart===Xe.length||!he.target.selectionStart;Xe=eb(Tt,L,Xe,l)}B(Xe),Rp(he.currentTarget,he,s,Xe)},De=function(he){var Xe=M.onPressEnter,Tt=M.onKeyDown;he.key==="Enter"&&Xe&&Xe(he),Tt==null||Tt(he)},re=function(he){H(!0),o==null||o(he)},He=function(he){H(!1),a==null||a(he)},Ye=function(he){var Xe;B(""),le(),Rp((Xe=V.current)===null||Xe===void 0?void 0:Xe.textArea,he,s)},ke=ML(L);!E&&me&&i==null&&(ke=O1(ke,l));var ue=p,Ee;if(m){var pe=Ue(ke).length;yt(m)==="object"?Ee=m.formatter({value:ke,count:pe,maxLength:l}):Ee="".concat(pe).concat(me?" / ".concat(l):""),ue=J.createElement(J.Fragment,null,ue,J.createElement("span",{className:gt("".concat(h,"-data-count"),x==null?void 0:x.count),style:S==null?void 0:S.count},Ee))}var we=function(he){var Xe;C==null||C(he),(Xe=V.current)!==null&&Xe!==void 0&&Xe.textArea.style.height&&oe(!0)},Ke=!M.autoSize&&!m&&!c,ct=J.createElement(DL,{value:ke,allowClear:c,handleReset:Ye,suffix:ue,prefixCls:h,classes:{affixWrapper:gt(v==null?void 0:v.affixWrapper,(n={},Z(n,"".concat(h,"-show-count"),m),Z(n,"".concat(h,"-textarea-allow-clear"),c),n))},disabled:y,focused:G,className:_,style:ie(ie({},g),ee&&!Ke?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Ee=="string"?Ee:void 0}},hidden:b,inputElement:J.createElement(d$,gn({},M,{onKeyDown:De,onChange:rt,onFocus:re,onBlur:He,onCompositionStart:_e,onCompositionEnd:Be,className:x==null?void 0:x.textarea,style:ie(ie({},S==null?void 0:S.textarea),{},{resize:g==null?void 0:g.resize}),disabled:y,prefixCls:h,onResize:we,ref:V}))});return ct});function tb(e,t,n){return gt({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n})}const m$=(e,t)=>t||e;function ym(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function M1(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function i(o,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,c=r.has(o);if(Ft(!c,"Warning: There may be circular references"),c)return!1;if(o===a)return!0;if(n&&s>1)return!1;r.add(o);var l=s+1;if(Array.isArray(o)){if(!Array.isArray(a)||o.length!==a.length)return!1;for(var u=0;u1&&arguments[1]!==void 0?arguments[1]:!1,a={map:this.cache};return n.forEach(function(s){if(!a)a=void 0;else{var c,l;a=(c=a)===null||c===void 0||(l=c.map)===null||l===void 0?void 0:l.get(s)}}),(r=a)!==null&&r!==void 0&&r.value&&o&&(a.value[1]=this.cacheCallTimes++),(i=a)===null||i===void 0?void 0:i.value}},{key:"get",value:function(n){var r;return(r=this.internalGet(n,!0))===null||r===void 0?void 0:r[0]}},{key:"has",value:function(n){return!!this.internalGet(n)}},{key:"set",value:function(n,r){var i=this;if(!this.has(n)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var o=this.keys.reduce(function(l,u){var f=Se(l,2),p=f[1];return i.internalGet(u)[1]0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),rb+=1}return yi(e,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(r,i){return i(n,r)},void 0)}}]),e}(),Ip=new Em;function Ud(e){var t=Array.isArray(e)?e:[e];return Ip.has(t)||Ip.set(t,new D1(t)),Ip.get(t)}var x$=new WeakMap,Np={};function w$(e,t){for(var n=x$,r=0;rU$&&r.forEach(function(i){W$(i,t),jo.delete(i)})}var q$=function(t,n,r,i){var o=r.getDerivativeToken(t),a=ie(ie({},o),n);return i&&(a=i(a)),a};function Y$(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=J.useContext(bm),i=r.cache.instanceId,o=n.salt,a=o===void 0?"":o,s=n.override,c=s===void 0?H$:s,l=n.formatToken,u=n.getComputedToken,f=w$(function(){return Object.assign.apply(Object,[{}].concat(Ue(t)))},t),p=Tu(f),d=Tu(c),h=N1("token",[a,e.id,p,d],function(){var v=u?u(f,c,e):q$(f,c,e,l),m=S$(v,a);v._tokenKey=m,V$(m);var _="".concat(z$,"-").concat(ym(m));return v._hashId=_,[v,_]},function(v){G$(v[0]._tokenKey,i)});return h}var K$={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},k1="comm",L1="rule",$1="decl",X$="@import",Z$="@keyframes",Q$="@layer",J$=Math.abs,_m=String.fromCharCode;function j1(e){return e.trim()}function Yl(e,t,n){return e.replace(t,n)}function ej(e,t){return e.indexOf(t)}function Qs(e,t){return e.charCodeAt(t)|0}function Js(e,t,n){return e.slice(t,n)}function Ti(e){return e.length}function tj(e){return e.length}function _l(e,t){return t.push(e),e}var jf=1,Wa=1,F1=0,Rr=0,un=0,ls="";function xm(e,t,n,r,i,o,a,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:jf,column:Wa,length:a,return:"",siblings:s}}function nj(){return un}function rj(){return un=Rr>0?Qs(ls,--Rr):0,Wa--,un===10&&(Wa=1,jf--),un}function qr(){return un=Rr2||qd(un)>3?"":" "}function sj(e,t){for(;--t&&qr()&&!(un<48||un>102||un>57&&un<65||un>70&&un<97););return Ff(e,Kl()+(t<6&&Uo()==32&&qr()==32))}function Yd(e){for(;qr();)switch(un){case e:return Rr;case 34:case 39:e!==34&&e!==39&&Yd(un);break;case 40:e===41&&Yd(e);break;case 92:qr();break}return Rr}function cj(e,t){for(;qr()&&e+un!==47+10;)if(e+un===42+42&&Uo()===47)break;return"/*"+Ff(t,Rr-1)+"*"+_m(e===47?e:qr())}function lj(e){for(;!qd(Uo());)qr();return Ff(e,Rr)}function uj(e){return oj(Xl("",null,null,null,[""],e=ij(e),0,[0],e))}function Xl(e,t,n,r,i,o,a,s,c){for(var l=0,u=0,f=a,p=0,d=0,h=0,v=1,m=1,_=1,g=0,y="",b=i,x=o,S=r,C=y;m;)switch(h=g,g=qr()){case 40:if(h!=108&&Qs(C,f-1)==58){ej(C+=Yl($p(g),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:C+=$p(g);break;case 9:case 10:case 13:case 32:C+=aj(h);break;case 92:C+=sj(Kl()-1,7);continue;case 47:switch(Uo()){case 42:case 47:_l(fj(cj(qr(),Kl()),t,n,c),c);break;default:C+="/"}break;case 123*v:s[l++]=Ti(C)*_;case 125*v:case 59:case 0:switch(g){case 0:case 125:m=0;case 59+u:_==-1&&(C=Yl(C,/\f/g,"")),d>0&&Ti(C)-f&&_l(d>32?sb(C+";",r,n,f-1,c):sb(Yl(C," ","")+";",r,n,f-2,c),c);break;case 59:C+=";";default:if(_l(S=ab(C,t,n,l,u,i,s,y,b=[],x=[],f,o),o),g===123)if(u===0)Xl(C,t,S,S,b,o,f,s,x);else switch(p===99&&Qs(C,3)===110?100:p){case 100:case 108:case 109:case 115:Xl(e,S,S,r&&_l(ab(e,S,S,0,0,i,s,y,i,b=[],f,x),x),i,x,f,s,r?b:x);break;default:Xl(C,S,S,S,[""],x,0,s,x)}}l=u=d=0,v=_=1,y=C="",f=a;break;case 58:f=1+Ti(C),d=h;default:if(v<1){if(g==123)--v;else if(g==125&&v++==0&&rj()==125)continue}switch(C+=_m(g),g*v){case 38:_=u>0?1:(C+="\f",-1);break;case 44:s[l++]=(Ti(C)-1)*_,_=1;break;case 64:Uo()===45&&(C+=$p(qr())),p=Uo(),u=f=Ti(y=C+=lj(Kl())),g++;break;case 45:h===45&&Ti(C)==2&&(v=0)}}return o}function ab(e,t,n,r,i,o,a,s,c,l,u,f){for(var p=i-1,d=i===0?o:[""],h=tj(d),v=0,m=0,_=0;v0?d[g]+" "+y:Yl(y,/&\f/g,d[g])))&&(c[_++]=b);return xm(e,t,n,i===0?L1:s,c,l,u,f)}function fj(e,t,n,r){return xm(e,t,n,k1,_m(nj()),Js(e,2,-2),0,r)}function sb(e,t,n,r,i){return xm(e,t,n,$1,Js(e,0,r),Js(e,r+1,-1),r,i)}function Kd(e,t){for(var n="",r=0;r1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},i=r.root,o=r.injectHash,a=r.parentSelectors,s=n.hashId,c=n.layer,l=n.path,u=n.hashPriority,f=n.transformers,p=f===void 0?[]:f,d=n.linters,h=d===void 0?[]:d,v="",m={};function _(S){var C=S.getName(s);if(!m[C]){var M=e(S.style,n,{root:!1,parentSelectors:a}),A=Se(M,1),N=A[0];m[C]="@keyframes ".concat(S.getName(s)).concat(N)}}function g(S){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return S.forEach(function(M){Array.isArray(M)?g(M,C):M&&C.push(M)}),C}var y=g(Array.isArray(t)?t:[t]);if(y.forEach(function(S){var C=typeof S=="string"&&!i?{}:S;if(typeof C=="string")v+="".concat(C,` `);else if(C._keyframe)_(C);else{var M=p.reduce(function(A,N){var L;return(N==null||(L=N.visit)===null||L===void 0?void 0:L.call(N,A))||A},C);Object.keys(M).forEach(function(A){var N=M[A];if(yt(N)==="object"&&N&&(A!=="animationName"||!N._keyframe)&&!yj(N)){var L=!1,B=A.trim(),V=!1;(i||o)&&s?B.startsWith("@")?L=!0:B=bj(A,s,u):i&&!s&&(B==="&"||B==="")&&(B="",V=!0);var K=e(N,n,{root:V,injectHash:L,parentSelectors:[].concat(Ue(a),[B])}),Q=Se(K,2),G=Q[0],H=Q[1];m=ie(ie({},m),H),v+="".concat(B).concat(G)}else{let E=function(D,k){process.env.NODE_ENV!=="production"&&(yt(N)!=="object"||!(N!=null&&N[V1]))&&[dj,hj].concat(Ue(h)).forEach(function(U){return U(D,k,{path:l,hashId:s,parentSelectors:a})});var I=D.replace(/[A-Z]/g,function(U){return"-".concat(U.toLowerCase())}),$=k;!K$[D]&&typeof $=="number"&&$!==0&&($="".concat($,"px")),D==="animationName"&&k!==null&&k!==void 0&&k._keyframe&&(_(k),$=k.getName(s)),v+="".concat(I,":").concat($,";")};var q,T=(q=N==null?void 0:N.value)!==null&&q!==void 0?q:N;yt(N)==="object"&&N!==null&&N!==void 0&&N[W1]&&Array.isArray(T)?T.forEach(function(D){E(A,D)}):E(A,T)}})}}),!i)v="{".concat(v,"}");else if(c&&T$()){var b=c.split(","),x=b[b.length-1].trim();v="@layer ".concat(x," {").concat(v,"}"),b.length>1&&(v="@layer ".concat(c,"{%%%:%}").concat(v))}return[v,m]};function _j(e,t){return ym("".concat(e.join("%")).concat(t))}function xj(){return null}function Xd(e,t){var n=e.token,r=e.path,i=e.hashId,o=e.layer,a=e.nonce,s=e.clientOnly,c=e.order,l=c===void 0?0:c,u=P.useContext(bm),f=u.autoClear,p=u.mock,d=u.defaultCache,h=u.hashPriority,v=u.container,m=u.ssrInline,_=u.transformers,g=u.linters,y=u.cache,b=n._tokenKey,x=[b].concat(Ue(r)),S=lb;process.env.NODE_ENV!=="production"&&p!==void 0&&(S=p==="client");var C=N1("style",x,function(){var B=x.join("|");if(mj(B)){var V=gj(B),K=Se(V,2),Q=K[0],G=K[1];if(Q)return[Q,b,G,{},s,l]}var H=t(),q=Ej(H,{hashId:i,hashPriority:h,layer:o,path:r.join("-"),transformers:_,linters:g}),T=Se(q,2),E=T[0],D=T[1],k=ub(E),I=_j(x,k);return[k,b,I,D,s,l]},function(B,V){var K=Se(B,3),Q=K[2];(V||f)&&lb&&Eu(Q,{mark:Wo})},function(B){var V=Se(B,4),K=V[0];V[1];var Q=V[2],G=V[3];if(S&&K!==H1){var H={mark:Wo,prepend:"queue",attachTo:v,priority:l},q=typeof a=="function"?a():a;q&&(H.csp={nonce:q});var T=Ha(K,Q,H);T[Pa]=y.instanceId,T.setAttribute(Wd,b),process.env.NODE_ENV!=="production"&&T.setAttribute(y$,x.join("|")),Object.keys(G).forEach(function(E){Ha(ub(G[E]),"_effect-".concat(E),H)})}}),M=Se(C,3),A=M[0],N=M[1],L=M[2];return function(B){var V;if(!m||S||!d)V=P.createElement(xj,null);else{var K;V=P.createElement("style",gn({},(K={},Z(K,Wd,N),Z(K,Wo,L),K),{dangerouslySetInnerHTML:{__html:A}}))}return P.createElement(P.Fragment,null,V,B)}}var kr=function(){function e(t,n){gi(this,e),Z(this,"name",void 0),Z(this,"style",void 0),Z(this,"_keyframe",!0),this.name=t,this.style=n}return yi(e,[{key:"getName",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return n?"".concat(n,"-").concat(this.name):this.name}}]),e}();function ba(e){return e.notSplit=!0,e}ba(["borderTop","borderBottom"]),ba(["borderTop"]),ba(["borderBottom"]),ba(["borderLeft","borderRight"]),ba(["borderLeft"]),ba(["borderRight"]);function wj(e){return Zw(e)||v1(e)||fm(e)||Qw()}function Wr(e,t){for(var n=e,r=0;r3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&r&&n===void 0&&!Wr(e,t.slice(0,-1))?e:U1(e,t,n,r)}function Sj(e){return yt(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function fb(e){return Array.isArray(e)?[]:{}}var Cj=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Aa(){for(var e=arguments.length,t=new Array(e),n=0;n{Ft(e,`[antd: ${t}] ${n}`),process.env.NODE_ENV==="test"&&Tj()});const q1=P.createContext({}),ua=process.env.NODE_ENV!=="production"?e=>{const{strict:t}=P.useContext(q1),n=(r,i,o)=>{if(!r)if(t===!1&&i==="deprecated"){const a=Si;Si||(Si={}),Si[e]=Si[e]||[],Si[e].includes(o||"")||Si[e].push(o||""),a||console.warn("[antd] There exists deprecated usage in your code:",Si)}else process.env.NODE_ENV!=="production"&&wm(r,e,o)};return n.deprecated=(r,i,o,a)=>{n(r,"deprecated",`\`${i}\` is deprecated. Please use \`${o}\` instead.${a?` ${a}`:""}`)},n}:()=>{const e=()=>{};return e.deprecated=G1,e},Bf=wm,Rj=J.createContext(void 0),Pj={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};var Aj={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"};const Oj={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},Y1=Oj,Mj={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},Aj),timePickerLocale:Object.assign({},Y1)},pb=Mj,ur="${label} is not a valid ${type}",Dj={locale:"en",Pagination:Pj,DatePicker:pb,TimePicker:Y1,Calendar:pb,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:ur,method:ur,array:ur,object:ur,number:ur,date:ur,boolean:ur,integer:ur,float:ur,regexp:ur,email:ur,url:ur,hex:ur},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh"},ColorPicker:{presetEmpty:"Empty"}},Ua=Dj;Object.assign({},Ua.Modal);let Zl=[];const db=()=>Zl.reduce((e,t)=>Object.assign(Object.assign({},e),t),Ua.Modal);function Ij(e){if(e){const t=Object.assign({},e);return Zl.push(t),db(),()=>{Zl=Zl.filter(n=>n!==t),db()}}Object.assign({},Ua.Modal)}const Nj=J.createContext(void 0),Sm=Nj,kj=(e,t)=>{const n=P.useContext(Sm),r=P.useMemo(()=>{var o;const a=t||Ua[e],s=(o=n==null?void 0:n[e])!==null&&o!==void 0?o:{};return Object.assign(Object.assign({},typeof a=="function"?a():a),s||{})},[e,t,n]),i=P.useMemo(()=>{const o=n==null?void 0:n.locale;return n!=null&&n.exist&&!o?Ua.locale:o},[n]);return[r,i]},Lj=kj,K1="internalMark",X1=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;if(process.env.NODE_ENV!=="production"){const o=ua("LocaleProvider");process.env.NODE_ENV!=="production"&&o(r===K1,"deprecated","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale")}P.useEffect(()=>Ij(t&&t.Modal),[t]);const i=P.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return P.createElement(Sm.Provider,{value:i},n)};process.env.NODE_ENV!=="production"&&(X1.displayName="LocaleProvider");const $j=X1,jj=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},Fj=jj;function Bj(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const Z1={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Hj=Object.assign(Object.assign({},Z1),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),Hf=Hj;function zj(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:r}=t;const{colorSuccess:i,colorWarning:o,colorError:a,colorInfo:s,colorPrimary:c,colorBgBase:l,colorTextBase:u}=e,f=n(c),p=n(i),d=n(o),h=n(a),v=n(s),m=r(l,u),_=e.colorLink||e.colorInfo,g=n(_);return Object.assign(Object.assign({},m),{colorPrimaryBg:f[1],colorPrimaryBgHover:f[2],colorPrimaryBorder:f[3],colorPrimaryBorderHover:f[4],colorPrimaryHover:f[5],colorPrimary:f[6],colorPrimaryActive:f[7],colorPrimaryTextHover:f[8],colorPrimaryText:f[9],colorPrimaryTextActive:f[10],colorSuccessBg:p[1],colorSuccessBgHover:p[2],colorSuccessBorder:p[3],colorSuccessBorderHover:p[4],colorSuccessHover:p[4],colorSuccess:p[6],colorSuccessActive:p[7],colorSuccessTextHover:p[8],colorSuccessText:p[9],colorSuccessTextActive:p[10],colorErrorBg:h[1],colorErrorBgHover:h[2],colorErrorBorder:h[3],colorErrorBorderHover:h[4],colorErrorHover:h[5],colorError:h[6],colorErrorActive:h[7],colorErrorTextHover:h[8],colorErrorText:h[9],colorErrorTextActive:h[10],colorWarningBg:d[1],colorWarningBgHover:d[2],colorWarningBorder:d[3],colorWarningBorderHover:d[4],colorWarningHover:d[4],colorWarning:d[6],colorWarningActive:d[7],colorWarningTextHover:d[8],colorWarningText:d[9],colorWarningTextActive:d[10],colorInfoBg:v[1],colorInfoBgHover:v[2],colorInfoBorder:v[3],colorInfoBorderHover:v[4],colorInfoHover:v[4],colorInfo:v[6],colorInfoActive:v[7],colorInfoTextHover:v[8],colorInfoText:v[9],colorInfoTextActive:v[10],colorLinkHover:g[4],colorLink:g[6],colorLinkActive:g[7],colorBgMask:new dr("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const Vj=e=>{let t=e,n=e,r=e,i=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?i=4:e>=8&&(i=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:i}},Wj=Vj;function Uj(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:i}=e;return Object.assign({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:i+1},Wj(r))}const xi=(e,t)=>new dr(e).setAlpha(t).toRgbString(),Ss=(e,t)=>new dr(e).darken(t).toHexString(),Gj=e=>{const t=Zo(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},qj=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:xi(r,.88),colorTextSecondary:xi(r,.65),colorTextTertiary:xi(r,.45),colorTextQuaternary:xi(r,.25),colorFill:xi(r,.15),colorFillSecondary:xi(r,.06),colorFillTertiary:xi(r,.04),colorFillQuaternary:xi(r,.02),colorBgLayout:Ss(n,4),colorBgContainer:Ss(n,0),colorBgElevated:Ss(n,0),colorBgSpotlight:xi(r,.85),colorBgBlur:"transparent",colorBorder:Ss(n,15),colorBorderSecondary:Ss(n,6)}};function Yj(e){const t=new Array(10).fill(null).map((n,r)=>{const i=r-1,o=e*Math.pow(2.71828,i/5),a=r>1?Math.floor(o):Math.ceil(o);return Math.floor(a/2)*2});return t[1]=e,t.map(n=>{const r=n+8;return{size:n,lineHeight:r/n}})}const Kj=e=>{const t=Yj(e),n=t.map(i=>i.size),r=t.map(i=>i.lineHeight);return{fontSizeSM:n[0],fontSize:n[1],fontSizeLG:n[2],fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:r[1],lineHeightLG:r[2],lineHeightSM:r[0],lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}},Xj=Kj;function Zj(e){const t=Object.keys(Z1).map(n=>{const r=Zo(e[n]);return new Array(10).fill(1).reduce((i,o,a)=>(i[`${n}-${a+1}`]=r[a],i[`${n}${a+1}`]=r[a],i),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),zj(e,{generateColorPalettes:Gj,generateNeutralColorPalettes:qj})),Xj(e.fontSize)),Bj(e)),Fj(e)),Uj(e))}const Q1=Ud(Zj),J1={token:Hf,hashed:!0},eS=J.createContext(J1),tS="anticon",Qj=(e,t)=>t||(e?`ant-${e}`:"ant"),Ui=P.createContext({getPrefixCls:Qj,iconPrefixCls:tS}),Jj=`-ant-${Date.now()}-${Math.random()}`;function eF(e,t){const n={},r=(a,s)=>{let c=a.clone();return c=(s==null?void 0:s(c))||c,c.toRgbString()},i=(a,s)=>{const c=new dr(a),l=Zo(c.toRgbString());n[`${s}-color`]=r(c),n[`${s}-color-disabled`]=l[1],n[`${s}-color-hover`]=l[4],n[`${s}-color-active`]=l[6],n[`${s}-color-outline`]=c.clone().setAlpha(.2).toRgbString(),n[`${s}-color-deprecated-bg`]=l[0],n[`${s}-color-deprecated-border`]=l[2]};if(t.primaryColor){i(t.primaryColor,"primary");const a=new dr(t.primaryColor),s=Zo(a.toRgbString());s.forEach((l,u)=>{n[`primary-${u+1}`]=l}),n["primary-color-deprecated-l-35"]=r(a,l=>l.lighten(35)),n["primary-color-deprecated-l-20"]=r(a,l=>l.lighten(20)),n["primary-color-deprecated-t-20"]=r(a,l=>l.tint(20)),n["primary-color-deprecated-t-50"]=r(a,l=>l.tint(50)),n["primary-color-deprecated-f-12"]=r(a,l=>l.setAlpha(l.getAlpha()*.12));const c=new dr(s[0]);n["primary-color-active-deprecated-f-30"]=r(c,l=>l.setAlpha(l.getAlpha()*.3)),n["primary-color-active-deprecated-d-02"]=r(c,l=>l.darken(2))}return t.successColor&&i(t.successColor,"success"),t.warningColor&&i(t.warningColor,"warning"),t.errorColor&&i(t.errorColor,"error"),t.infoColor&&i(t.infoColor,"info"),` :root { ${Object.keys(n).map(a=>`--${e}-${a}: ${n[a]};`).join(` `)} } `.trim()}function tF(e,t){const n=eF(e,t);jn()?Ha(n,`${Jj}-dynamic-theme`):process.env.NODE_ENV!=="production"&&Bf(!1,"ConfigProvider","SSR do not support dynamic theme with css variables.")}const Zd=P.createContext(!1),nF=e=>{let{children:t,disabled:n}=e;const r=P.useContext(Zd);return P.createElement(Zd.Provider,{value:n??r},t)},nS=Zd,Qd=P.createContext(void 0),rF=e=>{let{children:t,size:n}=e;const r=P.useContext(Qd);return P.createElement(Qd.Provider,{value:n||r},t)},zf=Qd;function iF(){const e=J.useContext(nS),t=J.useContext(zf);return{componentDisabled:e,componentSize:t}}const Ru=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],oF="5.10.0";function jp(e){return e>=0&&e<=255}function xl(e,t){const{r:n,g:r,b:i,a:o}=new dr(e).toRgb();if(o<1)return e;const{r:a,g:s,b:c}=new dr(t).toRgb();for(let l=.01;l<=1;l+=.01){const u=Math.round((n-a*(1-l))/l),f=Math.round((r-s*(1-l))/l),p=Math.round((i-c*(1-l))/l);if(jp(u)&&jp(f)&&jp(p))return new dr({r:u,g:f,b:p,a:Math.round(l*100)/100}).toRgbString()}return new dr({r:n,g:r,b:i,a:1}).toRgbString()}var aF=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{delete r[p]});const i=Object.assign(Object.assign({},n),r),o=480,a=576,s=768,c=992,l=1200,u=1600;if(i.motion===!1){const p="0s";i.motionDurationFast=p,i.motionDurationMid=p,i.motionDurationSlow=p}return Object.assign(Object.assign(Object.assign({},i),{colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:xl(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:xl(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:xl(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidthFocus:i.lineWidth*4,lineWidth:i.lineWidth,controlOutlineWidth:i.lineWidth*2,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:xl(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:` 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowSecondary:` 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowTertiary:` 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02) `,screenXS:o,screenXSMin:o,screenXSMax:a-1,screenSM:a,screenSMMin:a,screenSMMax:s-1,screenMD:s,screenMDMin:s,screenMDMax:c-1,screenLG:c,screenLGMin:c,screenLGMax:l-1,screenXL:l,screenXLMin:l,screenXLMax:u-1,screenXXL:u,screenXXLMin:u,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:` 0 1px 2px -2px ${new dr("rgba(0, 0, 0, 0.16)").toRgbString()}, 0 3px 6px 0 ${new dr("rgba(0, 0, 0, 0.12)").toRgbString()}, 0 5px 12px 4px ${new dr("rgba(0, 0, 0, 0.09)").toRgbString()} `,boxShadowDrawerRight:` -6px 0 16px 0 rgba(0, 0, 0, 0.08), -3px 0 6px -4px rgba(0, 0, 0, 0.12), -9px 0 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowDrawerLeft:` 6px 0 16px 0 rgba(0, 0, 0, 0.08), 3px 0 6px -4px rgba(0, 0, 0, 0.12), 9px 0 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowDrawerUp:` 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowDrawerDown:` 0 -6px 16px 0 rgba(0, 0, 0, 0.08), 0 -3px 6px -4px rgba(0, 0, 0, 0.12), 0 -9px 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}var hb=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{const r=n.getDerivativeToken(e),{override:i}=t,o=hb(t,["override"]);let a=Object.assign(Object.assign({},r),{override:i});return a=rS(a),o&&Object.entries(o).forEach(s=>{let[c,l]=s;const{theme:u}=l,f=hb(l,["theme"]);let p=f;u&&(p=iS(Object.assign(Object.assign({},a),f),{override:f},u)),a[c]=p}),a};function Vf(){const{token:e,hashed:t,theme:n,components:r}=J.useContext(eS),i=`${oF}-${t||""}`,o=n||Q1,[a,s]=Y$(o,[Hf,e],{salt:i,override:Object.assign({override:e},r),getComputedToken:iS,formatToken:rS});return[o,a,t?s:""]}const oS=e=>({color:e.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"&:focus, &:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive}}),sF=(e,t,n,r,i)=>{const o=e/2,a=0,s=o,c=n*1/Math.sqrt(2),l=o-n*(1-1/Math.sqrt(2)),u=o-t*(1/Math.sqrt(2)),f=n*(Math.sqrt(2)-1)+t*(1/Math.sqrt(2)),p=2*o-u,d=f,h=2*o-c,v=l,m=2*o-a,_=s,g=o*Math.sqrt(2)+n*(Math.sqrt(2)-2),y=n*(Math.sqrt(2)-1);return{pointerEvents:"none",width:e,height:e,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:e,height:e/2,background:r,clipPath:{_multi_value_:!0,value:[`polygon(${y}px 100%, 50% ${y}px, ${2*o-y}px 100%, ${y}px 100%)`,`path('M ${a} ${s} A ${n} ${n} 0 0 0 ${c} ${l} L ${u} ${f} A ${t} ${t} 0 0 1 ${p} ${d} L ${h} ${v} A ${n} ${n} 0 0 0 ${m} ${_} Z')`]},content:'""'},"&::after":{content:'""',position:"absolute",width:g,height:g,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${t}px 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:i,zIndex:0,background:"transparent"}}},Cm=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return{boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}},cF=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),lF=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),uF=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active,\n &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),fF=(e,t)=>{const{fontFamily:n,fontSize:r}=e,i=`[class^="${t}"], [class*=" ${t}"]`;return{[i]:{fontFamily:n,fontSize:r,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[i]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}},aS=process.env.NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u";let Jd=!0;function Ii(){for(var e=arguments.length,t=new Array(e),n=0;n{Object.keys(i).forEach(a=>{Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:()=>i[a]})})}),Jd=!0,r}const vb={};function pF(){}function dF(e){let t,n=e,r=pF;return aS&&(t=new Set,n=new Proxy(e,{get(i,o){return Jd&&t.add(o),i[o]}}),r=(i,o)=>{var a;vb[i]={global:Array.from(t),component:Object.assign(Object.assign({},(a=vb[i])===null||a===void 0?void 0:a.component),o)}}),{token:n,keys:t,flush:r}}const hF=(e,t)=>{const[n,r]=Vf();return Xd({theme:n,token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce},()=>[{[`.${e}`]:Object.assign(Object.assign({},cF()),{[`.${e} .${e}-icon`]:{display:"block"}})}])},sS=hF;function Tm(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=Array.isArray(e)?e:[e,e],[o]=i,a=i.join("-");return s=>{const[c,l,u]=Vf(),{getPrefixCls:f,iconPrefixCls:p,csp:d}=J.useContext(Ui),h=f(),v={theme:c,token:l,hashId:u,nonce:()=>d==null?void 0:d.nonce,clientOnly:r.clientOnly,order:r.order||-999};return Xd(Object.assign(Object.assign({},v),{clientOnly:!1,path:["Shared",h]}),()=>[{"&":uF(l)}]),sS(p),[Xd(Object.assign(Object.assign({},v),{path:[a,s,p]}),()=>{const{token:m,flush:_}=dF(l),g=Object.assign({},l[o]);if(r.deprecatedTokens){const{deprecatedTokens:M}=r;M.forEach(A=>{let[N,L]=A;var B;process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&Ft(!(g!=null&&g[N]),`The token '${String(N)}' of ${o} had deprecated, use '${String(L)}' instead.`),(g!=null&&g[N]||g!=null&&g[L])&&((B=g[L])!==null&&B!==void 0||(g[L]=g==null?void 0:g[N]))})}const y=typeof n=="function"?n(Ii(m,g??{})):n,b=Object.assign(Object.assign({},y),g),x=`.${s}`,S=Ii(m,{componentCls:x,prefixCls:s,iconCls:`.${p}`,antCls:`.${h}`},b),C=t(S,{hashId:u,prefixCls:s,rootPrefixCls:h,iconPrefixCls:p,overrideComponentToken:g});return _(o,b),[r.resetStyle===!1?null:fF(l,s),C]}),u]}}function vF(e,t){return Ru.reduce((n,r)=>{const i=e[`${r}1`],o=e[`${r}3`],a=e[`${r}6`],s=e[`${r}7`];return Object.assign(Object.assign({},n),t(r,{lightColor:i,lightBorderColor:o,darkColor:a,textColor:s}))},{})}function mF(e,t){const n=e||{},r=n.inherit===!1||!t?J1:t;return vm(()=>{if(!e)return t;const i=Object.assign({},r.components);return Object.keys(e.components||{}).forEach(o=>{i[o]=Object.assign(Object.assign({},i[o]),e.components[o])}),Object.assign(Object.assign(Object.assign({},r),n),{token:Object.assign(Object.assign({},r.token),n.token),components:i})},[n,r],(i,o)=>i.some((a,s)=>{const c=o[s];return!M1(a,c,!0)}))}var gF=["children"],cS=P.createContext({});function yF(e){var t=e.children,n=Tr(e,gF);return P.createElement(cS.Provider,{value:n},t)}var bF=function(e){Lf(n,e);var t=$f(n);function n(){return gi(this,n),t.apply(this,arguments)}return yi(n,[{key:"render",value:function(){return this.props.children}}]),n}(P.Component),Lo="none",wl="appear",Sl="enter",Cl="leave",mb="none",zr="prepare",Oa="start",Ma="active",Rm="end",lS="prepared";function gb(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function EF(e,t){var n={animationend:gb("Animation","AnimationEnd"),transitionend:gb("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var _F=EF(jn(),typeof window<"u"?window:{}),uS={};if(jn()){var xF=document.createElement("div");uS=xF.style}var Tl={};function fS(e){if(Tl[e])return Tl[e];var t=_F[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i1&&arguments[1]!==void 0?arguments[1]:2;t();var o=Qo(function(){i<=1?r({isCanceled:function(){return o!==e.current}}):n(r,i-1)});e.current=o}return P.useEffect(function(){return function(){t()}},[]),[n,t]};var CF=[zr,Oa,Ma,Rm],TF=[zr,lS],mS=!1,RF=!0;function gS(e){return e===Ma||e===Rm}const PF=function(e,t,n){var r=Ia(mb),i=Se(r,2),o=i[0],a=i[1],s=SF(),c=Se(s,2),l=c[0],u=c[1];function f(){a(zr,!0)}var p=t?TF:CF;return vS(function(){if(o!==mb&&o!==Rm){var d=p.indexOf(o),h=p[d+1],v=n(o);v===mS?a(h,!0):h&&l(function(m){function _(){m.isCanceled()||a(h,!0)}v===!0?_():Promise.resolve(v).then(_)})}},[e,o]),P.useEffect(function(){return function(){u()}},[]),[f,o]};function AF(e,t,n,r){var i=r.motionEnter,o=i===void 0?!0:i,a=r.motionAppear,s=a===void 0?!0:a,c=r.motionLeave,l=c===void 0?!0:c,u=r.motionDeadline,f=r.motionLeaveImmediately,p=r.onAppearPrepare,d=r.onEnterPrepare,h=r.onLeavePrepare,v=r.onAppearStart,m=r.onEnterStart,_=r.onLeaveStart,g=r.onAppearActive,y=r.onEnterActive,b=r.onLeaveActive,x=r.onAppearEnd,S=r.onEnterEnd,C=r.onLeaveEnd,M=r.onVisibleChanged,A=Ia(),N=Se(A,2),L=N[0],B=N[1],V=Ia(Lo),K=Se(V,2),Q=K[0],G=K[1],H=Ia(null),q=Se(H,2),T=q[0],E=q[1],D=J.useRef(!1),k=J.useRef(null);function I(){return n()}var $=J.useRef(!1);function U(){G(Lo,!0),E(null,!0)}function ee(Ee){var pe=I();if(!(Ee&&!Ee.deadline&&Ee.target!==pe)){var we=$.current,Ke;Q===wl&&we?Ke=x==null?void 0:x(pe,Ee):Q===Sl&&we?Ke=S==null?void 0:S(pe,Ee):Q===Cl&&we&&(Ke=C==null?void 0:C(pe,Ee)),Q!==Lo&&we&&Ke!==!1&&U()}}var oe=wF(ee),le=Se(oe,1),me=le[0],_e=function(pe){var we,Ke,ct;switch(pe){case wl:return we={},Z(we,zr,p),Z(we,Oa,v),Z(we,Ma,g),we;case Sl:return Ke={},Z(Ke,zr,d),Z(Ke,Oa,m),Z(Ke,Ma,y),Ke;case Cl:return ct={},Z(ct,zr,h),Z(ct,Oa,_),Z(ct,Ma,b),ct;default:return{}}},Be=P.useMemo(function(){return _e(Q)},[Q]),rt=PF(Q,!e,function(Ee){if(Ee===zr){var pe=Be[zr];return pe?pe(I()):mS}if(He in Be){var we;E(((we=Be[He])===null||we===void 0?void 0:we.call(Be,I(),null))||null)}return He===Ma&&(me(I()),u>0&&(clearTimeout(k.current),k.current=setTimeout(function(){ee({deadline:!0})},u))),He===lS&&U(),RF}),De=Se(rt,2),re=De[0],He=De[1],Ye=gS(He);$.current=Ye,vS(function(){B(t);var Ee=D.current;D.current=!0;var pe;!Ee&&t&&s&&(pe=wl),Ee&&t&&o&&(pe=Sl),(Ee&&!t&&l||!Ee&&f&&!t&&l)&&(pe=Cl);var we=_e(pe);pe&&(e||we[zr])?(G(pe),re()):G(Lo)},[t]),J.useEffect(function(){(Q===wl&&!s||Q===Sl&&!o||Q===Cl&&!l)&&G(Lo)},[s,o,l]),J.useEffect(function(){return function(){D.current=!1,clearTimeout(k.current)}},[]);var ke=P.useRef(!1);J.useEffect(function(){L&&(ke.current=!0),L!==void 0&&Q===Lo&&((ke.current||L)&&(M==null||M(L)),ke.current=!0)},[L,Q]);var ue=T;return Be[zr]&&He===Oa&&(ue=ie({transition:"none"},ue)),[Q,He,ue,L??t]}function OF(e){var t=e;yt(e)==="object"&&(t=e.transitionSupport);function n(i,o){return!!(i.motionName&&t&&o!==!1)}var r=P.forwardRef(function(i,o){var a=i.visible,s=a===void 0?!0:a,c=i.removeOnLeave,l=c===void 0?!0:c,u=i.forceRender,f=i.children,p=i.motionName,d=i.leavedClassName,h=i.eventProps,v=P.useContext(cS),m=v.motion,_=n(i,m),g=J.useRef(),y=J.useRef();function b(){try{return g.current instanceof HTMLElement?g.current:Bd(y.current)}catch{return null}}var x=AF(_,s,b,i),S=Se(x,4),C=S[0],M=S[1],A=S[2],N=S[3],L=P.useRef(N);N&&(L.current=!0);var B=P.useCallback(function(E){g.current=E,mm(o,E)},[o]),V,K=ie(ie({},h),{},{visible:s});if(!f)V=null;else if(C===Lo)N?V=f(ie({},K),B):!l&&L.current&&d?V=f(ie(ie({},K),{},{className:d}),B):u||!l&&!d?V=f(ie(ie({},K),{},{style:{display:"none"}}),B):V=null;else{var Q,G;M===zr?G="prepare":gS(M)?G="active":M===Oa&&(G="start");var H=Eb(p,"".concat(C,"-").concat(G));V=f(ie(ie({},K),{},{className:gt(Eb(p,C),(Q={},Z(Q,H,H&&G),Z(Q,p,typeof p=="string"),Q)),style:A}),B)}if(P.isValidElement(V)&&Nf(V)){var q=V,T=q.ref;T||(V=P.cloneElement(V,{ref:B}))}return P.createElement(bF,{ref:y},V)});return r.displayName="CSSMotion",r}const Pm=OF(hS);var eh="add",th="keep",nh="remove",Fp="removed";function MF(e){var t;return e&&yt(e)==="object"&&"key"in e?t=e:t={key:e},ie(ie({},t),{},{key:String(t.key)})}function rh(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(MF)}function DF(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,i=t.length,o=rh(e),a=rh(t);o.forEach(function(l){for(var u=!1,f=r;f1});return c.forEach(function(l){n=n.filter(function(u){var f=u.key,p=u.status;return f!==l||p!==nh}),n.forEach(function(u){u.key===l&&(u.status=th)})}),n}var IF=["component","children","onVisibleChanged","onAllRemoved"],NF=["status"],kF=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function LF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pm,n=function(r){Lf(o,r);var i=$f(o);function o(){var a;gi(this,o);for(var s=arguments.length,c=new Array(s),l=0;l{let{dropdownMatchSelectWidth:t}=e;return ua("ConfigProvider").deprecated(t===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),null});process.env.NODE_ENV!=="production"&&(yS.displayName="PropWarning");const jF=process.env.NODE_ENV!=="production"?yS:()=>null;var FF=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);it.endsWith("Color"))}const WF=e=>{let{prefixCls:t,iconPrefixCls:n,theme:r}=e;t!==void 0&&(bS=t),r&&VF(r)&&(process.env.NODE_ENV!=="production"&&Bf(!1,"ConfigProvider","`config` of css variable theme is not work in v5. Please use new `theme` config instead."),tF(zF(),r))},UF=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:i,anchor:o,form:a,locale:s,componentSize:c,direction:l,space:u,virtual:f,dropdownMatchSelectWidth:p,popupMatchSelectWidth:d,popupOverflow:h,legacyLocale:v,parentContext:m,iconPrefixCls:_,theme:g,componentDisabled:y,segmented:b,statistic:x,spin:S,calendar:C,carousel:M,cascader:A,collapse:N,typography:L,checkbox:B,descriptions:V,divider:K,drawer:Q,skeleton:G,steps:H,image:q,layout:T,list:E,mentions:D,modal:k,progress:I,result:$,slider:U,breadcrumb:ee,menu:oe,pagination:le,input:me,empty:_e,badge:Be,radio:rt,rate:De,switch:re,transfer:He,avatar:Ye,message:ke,tag:ue,table:Ee,card:pe,tabs:we,timeline:Ke,timePicker:ct,upload:ye,notification:he,tree:Xe,colorPicker:Tt,datePicker:zt,flex:en,wave:qn,warning:kt}=e,or=P.useCallback((Re,Me)=>{const{prefixCls:Rt}=e;if(Me)return Me;const wt=Rt||m.getPrefixCls("");return Re?`${wt}-${Re}`:wt},[m.getPrefixCls,e.prefixCls]),Vt=_||m.iconPrefixCls||tS,tn=n||m.csp;sS(Vt,tn);const Lt=mF(g,m.theme);process.env.NODE_ENV!=="production"&&(ih=ih||!!Lt);const En={csp:tn,autoInsertSpaceInButton:r,alert:i,anchor:o,locale:s||v,direction:l,space:u,virtual:f,popupMatchSelectWidth:d??p,popupOverflow:h,getPrefixCls:or,iconPrefixCls:Vt,theme:Lt,segmented:b,statistic:x,spin:S,calendar:C,carousel:M,cascader:A,collapse:N,typography:L,checkbox:B,descriptions:V,divider:K,drawer:Q,skeleton:G,steps:H,image:q,input:me,layout:T,list:E,mentions:D,modal:k,progress:I,result:$,slider:U,breadcrumb:ee,menu:oe,pagination:le,empty:_e,badge:Be,radio:rt,rate:De,switch:re,transfer:He,avatar:Ye,message:ke,tag:ue,table:Ee,card:pe,tabs:we,timeline:Ke,timePicker:ct,upload:ye,notification:he,tree:Xe,colorPicker:Tt,datePicker:zt,flex:en,wave:qn,warning:kt},Yn=Object.assign({},m);Object.keys(En).forEach(Re=>{En[Re]!==void 0&&(Yn[Re]=En[Re])}),BF.forEach(Re=>{const Me=e[Re];Me&&(Yn[Re]=Me)});const Ot=vm(()=>Yn,Yn,(Re,Me)=>{const Rt=Object.keys(Re),wt=Object.keys(Me);return Rt.length!==wt.length||Rt.some(Bn=>Re[Bn]!==Me[Bn])}),Bt=P.useMemo(()=>({prefixCls:Vt,csp:tn}),[Vt,tn]);let fe=P.createElement(P.Fragment,null,P.createElement(jF,{dropdownMatchSelectWidth:p}),t);const Oe=P.useMemo(()=>{var Re,Me,Rt,wt;return Aa(((Re=Ua.Form)===null||Re===void 0?void 0:Re.defaultValidateMessages)||{},((Rt=(Me=Ot.locale)===null||Me===void 0?void 0:Me.Form)===null||Rt===void 0?void 0:Rt.defaultValidateMessages)||{},((wt=Ot.form)===null||wt===void 0?void 0:wt.validateMessages)||{},(a==null?void 0:a.validateMessages)||{})},[Ot,a==null?void 0:a.validateMessages]);Object.keys(Oe).length>0&&(fe=P.createElement(Rj.Provider,{value:Oe},fe)),s&&(fe=P.createElement($j,{locale:s,_ANT_MARK__:K1},fe)),(Vt||tn)&&(fe=P.createElement(pm.Provider,{value:Bt},fe)),c&&(fe=P.createElement(rF,{size:c},fe)),fe=P.createElement($F,null,fe);const vt=P.useMemo(()=>{const Re=Lt||{},{algorithm:Me,token:Rt,components:wt}=Re,Bn=FF(Re,["algorithm","token","components"]),ar=Me&&(!Array.isArray(Me)||Me.length>0)?Ud(Me):Q1,sr={};return Object.entries(wt||{}).forEach(_n=>{let[Hn,Lr]=_n;const pn=Object.assign({},Lr);"algorithm"in pn&&(pn.algorithm===!0?pn.theme=ar:(Array.isArray(pn.algorithm)||typeof pn.algorithm=="function")&&(pn.theme=Ud(pn.algorithm)),delete pn.algorithm),sr[Hn]=pn}),Object.assign(Object.assign({},Bn),{theme:ar,token:Object.assign(Object.assign({},Hf),Rt),components:sr})},[Lt]);return g&&(fe=P.createElement(eS.Provider,{value:vt},fe)),Ot.warning&&(fe=P.createElement(q1.Provider,{value:Ot.warning},fe)),y!==void 0&&(fe=P.createElement(nF,{disabled:y},fe)),P.createElement(Ui.Provider,{value:Ot},fe)},us=e=>{const t=P.useContext(Ui),n=P.useContext(Sm);return P.createElement(UF,Object.assign({parentContext:t,legacyLocale:n},e))};us.ConfigContext=Ui;us.SizeContext=zf;us.config=WF;us.useConfig=iF;Object.defineProperty(us,"SizeContext",{get:()=>(process.env.NODE_ENV!=="production"&&Bf(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),zf)});process.env.NODE_ENV!=="production"&&(us.displayName="ConfigProvider");const GF=e=>{const t=J.useContext(zf);return J.useMemo(()=>e?typeof e=="string"?e??t:e instanceof Function?e(t):t:t,[e,t])},qF=GF;function Xr(){Xr=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(G,H,q){G[H]=q.value},o=typeof Symbol=="function"?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(G,H,q){return Object.defineProperty(G,H,{value:q,enumerable:!0,configurable:!0,writable:!0}),G[H]}try{l({},"")}catch{l=function(q,T,E){return q[T]=E}}function u(G,H,q,T){var E=H&&H.prototype instanceof _?H:_,D=Object.create(E.prototype),k=new K(T||[]);return i(D,"_invoke",{value:N(G,q,k)}),D}function f(G,H,q){try{return{type:"normal",arg:G.call(H,q)}}catch(T){return{type:"throw",arg:T}}}t.wrap=u;var p="suspendedStart",d="suspendedYield",h="executing",v="completed",m={};function _(){}function g(){}function y(){}var b={};l(b,a,function(){return this});var x=Object.getPrototypeOf,S=x&&x(x(Q([])));S&&S!==n&&r.call(S,a)&&(b=S);var C=y.prototype=_.prototype=Object.create(b);function M(G){["next","throw","return"].forEach(function(H){l(G,H,function(q){return this._invoke(H,q)})})}function A(G,H){function q(E,D,k,I){var $=f(G[E],G,D);if($.type!=="throw"){var U=$.arg,ee=U.value;return ee&&yt(ee)=="object"&&r.call(ee,"__await")?H.resolve(ee.__await).then(function(oe){q("next",oe,k,I)},function(oe){q("throw",oe,k,I)}):H.resolve(ee).then(function(oe){U.value=oe,k(U)},function(oe){return q("throw",oe,k,I)})}I($.arg)}var T;i(this,"_invoke",{value:function(D,k){function I(){return new H(function($,U){q(D,k,$,U)})}return T=T?T.then(I,I):I()}})}function N(G,H,q){var T=p;return function(E,D){if(T===h)throw new Error("Generator is already running");if(T===v){if(E==="throw")throw D;return{value:e,done:!0}}for(q.method=E,q.arg=D;;){var k=q.delegate;if(k){var I=L(k,q);if(I){if(I===m)continue;return I}}if(q.method==="next")q.sent=q._sent=q.arg;else if(q.method==="throw"){if(T===p)throw T=v,q.arg;q.dispatchException(q.arg)}else q.method==="return"&&q.abrupt("return",q.arg);T=h;var $=f(G,H,q);if($.type==="normal"){if(T=q.done?v:d,$.arg===m)continue;return{value:$.arg,done:q.done}}$.type==="throw"&&(T=v,q.method="throw",q.arg=$.arg)}}}function L(G,H){var q=H.method,T=G.iterator[q];if(T===e)return H.delegate=null,q==="throw"&&G.iterator.return&&(H.method="return",H.arg=e,L(G,H),H.method==="throw")||q!=="return"&&(H.method="throw",H.arg=new TypeError("The iterator does not provide a '"+q+"' method")),m;var E=f(T,G.iterator,H.arg);if(E.type==="throw")return H.method="throw",H.arg=E.arg,H.delegate=null,m;var D=E.arg;return D?D.done?(H[G.resultName]=D.value,H.next=G.nextLoc,H.method!=="return"&&(H.method="next",H.arg=e),H.delegate=null,m):D:(H.method="throw",H.arg=new TypeError("iterator result is not an object"),H.delegate=null,m)}function B(G){var H={tryLoc:G[0]};1 in G&&(H.catchLoc=G[1]),2 in G&&(H.finallyLoc=G[2],H.afterLoc=G[3]),this.tryEntries.push(H)}function V(G){var H=G.completion||{};H.type="normal",delete H.arg,G.completion=H}function K(G){this.tryEntries=[{tryLoc:"root"}],G.forEach(B,this),this.reset(!0)}function Q(G){if(G||G===""){var H=G[a];if(H)return H.call(G);if(typeof G.next=="function")return G;if(!isNaN(G.length)){var q=-1,T=function E(){for(;++q=0;--E){var D=this.tryEntries[E],k=D.completion;if(D.tryLoc==="root")return T("end");if(D.tryLoc<=this.prev){var I=r.call(D,"catchLoc"),$=r.call(D,"finallyLoc");if(I&&$){if(this.prev=0;--T){var E=this.tryEntries[T];if(E.tryLoc<=this.prev&&r.call(E,"finallyLoc")&&this.prev=0;--q){var T=this.tryEntries[q];if(T.finallyLoc===H)return this.complete(T.completion,T.afterLoc),V(T),m}},catch:function(H){for(var q=this.tryEntries.length-1;q>=0;--q){var T=this.tryEntries[q];if(T.tryLoc===H){var E=T.completion;if(E.type==="throw"){var D=E.arg;V(T)}return D}}throw new Error("illegal catch attempt")},delegateYield:function(H,q,T){return this.delegate={iterator:Q(H),resultName:q,nextLoc:T},this.method==="next"&&(this.arg=e),m}},t}function _b(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(l){n(l);return}s.done?t(c):Promise.resolve(c).then(r,i)}function jc(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(c){_b(o,r,i,a,s,"next",c)}function s(c){_b(o,r,i,a,s,"throw",c)}a(void 0)})}}var Ho="RC_FORM_INTERNAL_HOOKS",St=function(){Ft(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Ga=P.createContext({getFieldValue:St,getFieldsValue:St,getFieldError:St,getFieldWarning:St,getFieldsError:St,isFieldsTouched:St,isFieldTouched:St,isFieldValidating:St,isFieldsValidating:St,resetFields:St,setFields:St,setFieldValue:St,setFieldsValue:St,validateFields:St,submit:St,getInternalHooks:function(){return St(),{dispatch:St,initEntityValue:St,registerField:St,useSubscribe:St,setInitialValues:St,destroyForm:St,setCallbacks:St,registerWatch:St,getFields:St,setValidateMessages:St,setPreserve:St,getInitialValue:St}}}),Pu=P.createContext(null);function oh(e){return e==null?[]:Array.isArray(e)?e:[e]}function YF(e){return e&&!!e._init}function zo(){return zo=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ql(e,t,n){return XF()?Ql=Reflect.construct.bind():Ql=function(i,o,a){var s=[null];s.push.apply(s,o);var c=Function.bind.apply(i,s),l=new c;return a&&ec(l,a.prototype),l},Ql.apply(null,arguments)}function ZF(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function sh(e){var t=typeof Map=="function"?new Map:void 0;return sh=function(r){if(r===null||!ZF(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,i)}function i(){return Ql(r,arguments,ah(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),ec(i,r)},sh(e)}var QF=/%[sdj%]/g,ES=function(){};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(ES=function(t,n){typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&n.every(function(r){return typeof r=="string"})&&console.warn(t,n)});function ch(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function hr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=o)return s;switch(s){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return s}});return a}return e}function JF(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function yn(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||JF(t)&&typeof e=="string"&&!e)}function eB(e,t,n){var r=[],i=0,o=e.length;function a(s){r.push.apply(r,s||[]),i++,i===o&&n(r)}e.forEach(function(s){t(s,a)})}function xb(e,t,n){var r=0,i=e.length;function o(a){if(a&&a.length){n(a);return}var s=r;r=r+1,s()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Rs={integer:function(t){return Rs.number(t)&&parseInt(t,10)===t},float:function(t){return Rs.number(t)&&!Rs.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!Rs.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(Tb.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(aB())},hex:function(t){return typeof t=="string"&&!!t.match(Tb.hex)}},sB=function(t,n,r,i,o){if(t.required&&n===void 0){_S(t,n,r,i,o);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=t.type;a.indexOf(s)>-1?Rs[s](n)||i.push(hr(o.messages.types[s],t.fullField,t.type)):s&&typeof n!==t.type&&i.push(hr(o.messages.types[s],t.fullField,t.type))},cB=function(t,n,r,i,o){var a=typeof t.len=="number",s=typeof t.min=="number",c=typeof t.max=="number",l=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,f=null,p=typeof n=="number",d=typeof n=="string",h=Array.isArray(n);if(p?f="number":d?f="string":h&&(f="array"),!f)return!1;h&&(u=n.length),d&&(u=n.replace(l,"_").length),a?u!==t.len&&i.push(hr(o.messages[f].len,t.fullField,t.len)):s&&!c&&ut.max?i.push(hr(o.messages[f].max,t.fullField,t.max)):s&&c&&(ut.max)&&i.push(hr(o.messages[f].range,t.fullField,t.min,t.max))},Ea="enum",lB=function(t,n,r,i,o){t[Ea]=Array.isArray(t[Ea])?t[Ea]:[],t[Ea].indexOf(n)===-1&&i.push(hr(o.messages[Ea],t.fullField,t[Ea].join(", ")))},uB=function(t,n,r,i,o){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||i.push(hr(o.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var a=new RegExp(t.pattern);a.test(n)||i.push(hr(o.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},lt={required:_S,whitespace:oB,type:sB,range:cB,enum:lB,pattern:uB},fB=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(yn(n,"string")&&!t.required)return r();lt.required(t,n,i,a,o,"string"),yn(n,"string")||(lt.type(t,n,i,a,o),lt.range(t,n,i,a,o),lt.pattern(t,n,i,a,o),t.whitespace===!0&<.whitespace(t,n,i,a,o))}r(a)},pB=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(yn(n)&&!t.required)return r();lt.required(t,n,i,a,o),n!==void 0&<.type(t,n,i,a,o)}r(a)},dB=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(n===""&&(n=void 0),yn(n)&&!t.required)return r();lt.required(t,n,i,a,o),n!==void 0&&(lt.type(t,n,i,a,o),lt.range(t,n,i,a,o))}r(a)},hB=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(yn(n)&&!t.required)return r();lt.required(t,n,i,a,o),n!==void 0&<.type(t,n,i,a,o)}r(a)},vB=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(yn(n)&&!t.required)return r();lt.required(t,n,i,a,o),yn(n)||lt.type(t,n,i,a,o)}r(a)},mB=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(yn(n)&&!t.required)return r();lt.required(t,n,i,a,o),n!==void 0&&(lt.type(t,n,i,a,o),lt.range(t,n,i,a,o))}r(a)},gB=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(yn(n)&&!t.required)return r();lt.required(t,n,i,a,o),n!==void 0&&(lt.type(t,n,i,a,o),lt.range(t,n,i,a,o))}r(a)},yB=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(n==null&&!t.required)return r();lt.required(t,n,i,a,o,"array"),n!=null&&(lt.type(t,n,i,a,o),lt.range(t,n,i,a,o))}r(a)},bB=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(yn(n)&&!t.required)return r();lt.required(t,n,i,a,o),n!==void 0&<.type(t,n,i,a,o)}r(a)},EB="enum",_B=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(yn(n)&&!t.required)return r();lt.required(t,n,i,a,o),n!==void 0&<[EB](t,n,i,a,o)}r(a)},xB=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(yn(n,"string")&&!t.required)return r();lt.required(t,n,i,a,o),yn(n,"string")||lt.pattern(t,n,i,a,o)}r(a)},wB=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(yn(n,"date")&&!t.required)return r();if(lt.required(t,n,i,a,o),!yn(n,"date")){var c;n instanceof Date?c=n:c=new Date(n),lt.type(t,c,i,a,o),c&<.range(t,c.getTime(),i,a,o)}}r(a)},SB=function(t,n,r,i,o){var a=[],s=Array.isArray(n)?"array":typeof n;lt.required(t,n,i,a,o,s),r(a)},Bp=function(t,n,r,i,o){var a=t.type,s=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(yn(n,a)&&!t.required)return r();lt.required(t,n,i,s,o,a),yn(n,a)||lt.type(t,n,i,s,o)}r(s)},CB=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(yn(n)&&!t.required)return r();lt.required(t,n,i,a,o)}r(a)},Fs={string:fB,method:pB,number:dB,boolean:hB,regexp:vB,integer:mB,float:gB,array:yB,object:bB,enum:_B,pattern:xB,date:wB,url:Bp,hex:Bp,email:Bp,required:SB,any:CB};function lh(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var uh=lh(),Fc=function(){function e(n){this.rules=null,this._messages=uh,this.define(n)}var t=e.prototype;return t.define=function(r){var i=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(typeof r!="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(o){var a=r[o];i.rules[o]=Array.isArray(a)?a:[a]})},t.messages=function(r){return r&&(this._messages=Cb(lh(),r)),this._messages},t.validate=function(r,i,o){var a=this;i===void 0&&(i={}),o===void 0&&(o=function(){});var s=r,c=i,l=o;if(typeof c=="function"&&(l=c,c={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,s),Promise.resolve(s);function u(v){var m=[],_={};function g(b){if(Array.isArray(b)){var x;m=(x=m).concat.apply(x,b)}else m.push(b)}for(var y=0;y2&&arguments[2]!==void 0?arguments[2]:!1;return e&&e.some(function(r){return wS(t,r,n)})}function wS(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!e||!t||!n&&e.length!==t.length?!1:t.every(function(r,i){return e[i]===r})}function OB(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||yt(e)!=="object"||yt(t)!=="object")return!1;var n=Object.keys(e),r=Object.keys(t),i=new Set([].concat(n,r));return Ue(i).every(function(o){var a=e[o],s=t[o];return typeof a=="function"&&typeof s=="function"?!0:a===s})}function MB(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&yt(t.target)==="object"&&e in t.target?t.target[e]:t}function Ob(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var i=e[t],o=t-n;return o>0?[].concat(Ue(e.slice(0,n)),[i],Ue(e.slice(n,t)),Ue(e.slice(t+1,r))):o<0?[].concat(Ue(e.slice(0,t)),Ue(e.slice(t+1,n+1)),[i],Ue(e.slice(n+1,r))):e}var DB=["name"],Er=[];function Mb(e,t,n,r,i,o){return typeof e=="function"?e(t,n,"source"in o?{source:o.source}:{}):r!==i}var Am=function(e){Lf(n,e);var t=$f(n);function n(r){var i;if(gi(this,n),i=t.call(this,r),Z(mt(i),"state",{resetCount:0}),Z(mt(i),"cancelRegisterFunc",null),Z(mt(i),"mounted",!1),Z(mt(i),"touched",!1),Z(mt(i),"dirty",!1),Z(mt(i),"validatePromise",void 0),Z(mt(i),"prevValidating",void 0),Z(mt(i),"errors",Er),Z(mt(i),"warnings",Er),Z(mt(i),"cancelRegister",function(){var c=i.props,l=c.preserve,u=c.isListField,f=c.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(u,l,nn(f)),i.cancelRegisterFunc=null}),Z(mt(i),"getNamePath",function(){var c=i.props,l=c.name,u=c.fieldContext,f=u.prefixName,p=f===void 0?[]:f;return l!==void 0?[].concat(Ue(p),Ue(l)):[]}),Z(mt(i),"getRules",function(){var c=i.props,l=c.rules,u=l===void 0?[]:l,f=c.fieldContext;return u.map(function(p){return typeof p=="function"?p(f):p})}),Z(mt(i),"refresh",function(){i.mounted&&i.setState(function(c){var l=c.resetCount;return{resetCount:l+1}})}),Z(mt(i),"metaCache",null),Z(mt(i),"triggerMetaEvent",function(c){var l=i.props.onMetaChange;if(l){var u=ie(ie({},i.getMeta()),{},{destroy:c});M1(i.metaCache,u)||l(u),i.metaCache=u}else i.metaCache=null}),Z(mt(i),"onStoreChange",function(c,l,u){var f=i.props,p=f.shouldUpdate,d=f.dependencies,h=d===void 0?[]:d,v=f.onReset,m=u.store,_=i.getNamePath(),g=i.getValue(c),y=i.getValue(m),b=l&&Na(l,_);switch(u.type==="valueUpdate"&&u.source==="external"&&g!==y&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=Er,i.warnings=Er,i.triggerMetaEvent()),u.type){case"reset":if(!l||b){i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=Er,i.warnings=Er,i.triggerMetaEvent(),v==null||v(),i.refresh();return}break;case"remove":{if(p){i.reRender();return}break}case"setField":{var x=u.data;if(b){"touched"in x&&(i.touched=x.touched),"validating"in x&&!("originRCField"in x)&&(i.validatePromise=x.validating?Promise.resolve([]):null),"errors"in x&&(i.errors=x.errors||Er),"warnings"in x&&(i.warnings=x.warnings||Er),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}else if("value"in x&&Na(l,_,!0)){i.reRender();return}if(p&&!_.length&&Mb(p,c,m,g,y,u)){i.reRender();return}break}case"dependenciesUpdate":{var S=h.map(nn);if(S.some(function(C){return Na(u.relatedFields,C)})){i.reRender();return}break}default:if(b||(!h.length||_.length||p)&&Mb(p,c,m,g,y,u)){i.reRender();return}break}p===!0&&i.reRender()}),Z(mt(i),"validateRules",function(c){var l=i.getNamePath(),u=i.getValue(),f=c||{},p=f.triggerName,d=f.validateOnly,h=d===void 0?!1:d,v=Promise.resolve().then(jc(Xr().mark(function m(){var _,g,y,b,x,S,C;return Xr().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:if(i.mounted){A.next=2;break}return A.abrupt("return",[]);case 2:if(_=i.props,g=_.validateFirst,y=g===void 0?!1:g,b=_.messageVariables,x=_.validateDebounce,S=i.getRules(),p&&(S=S.filter(function(N){return N}).filter(function(N){var L=N.validateTrigger;if(!L)return!0;var B=oh(L);return B.includes(p)})),!(x&&p)){A.next=10;break}return A.next=8,new Promise(function(N){setTimeout(N,x)});case 8:if(i.validatePromise===v){A.next=10;break}return A.abrupt("return",[]);case 10:return C=RB(l,u,S,c,y,b),C.catch(function(N){return N}).then(function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Er;if(i.validatePromise===v){var L;i.validatePromise=null;var B=[],V=[];(L=N.forEach)===null||L===void 0||L.call(N,function(K){var Q=K.rule.warningOnly,G=K.errors,H=G===void 0?Er:G;Q?V.push.apply(V,Ue(H)):B.push.apply(B,Ue(H))}),i.errors=B,i.warnings=V,i.triggerMetaEvent(),i.reRender()}}),A.abrupt("return",C);case 13:case"end":return A.stop()}},m)})));return h||(i.validatePromise=v,i.dirty=!0,i.errors=Er,i.warnings=Er,i.triggerMetaEvent(),i.reRender()),v}),Z(mt(i),"isFieldValidating",function(){return!!i.validatePromise}),Z(mt(i),"isFieldTouched",function(){return i.touched}),Z(mt(i),"isFieldDirty",function(){if(i.dirty||i.props.initialValue!==void 0)return!0;var c=i.props.fieldContext,l=c.getInternalHooks(Ho),u=l.getInitialValue;return u(i.getNamePath())!==void 0}),Z(mt(i),"getErrors",function(){return i.errors}),Z(mt(i),"getWarnings",function(){return i.warnings}),Z(mt(i),"isListField",function(){return i.props.isListField}),Z(mt(i),"isList",function(){return i.props.isList}),Z(mt(i),"isPreserve",function(){return i.props.preserve}),Z(mt(i),"getMeta",function(){i.prevValidating=i.isFieldValidating();var c={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:i.validatePromise===null};return c}),Z(mt(i),"getOnlyChild",function(c){if(typeof c=="function"){var l=i.getMeta();return ie(ie({},i.getOnlyChild(c(i.getControlled(),l,i.props.fieldContext))),{},{isFunction:!0})}var u=za(c);return u.length!==1||!P.isValidElement(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}}),Z(mt(i),"getValue",function(c){var l=i.props.fieldContext.getFieldsValue,u=i.getNamePath();return Wr(c||l(!0),u)}),Z(mt(i),"getControlled",function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=i.props,u=l.trigger,f=l.validateTrigger,p=l.getValueFromEvent,d=l.normalize,h=l.valuePropName,v=l.getValueProps,m=l.fieldContext,_=f!==void 0?f:m.validateTrigger,g=i.getNamePath(),y=m.getInternalHooks,b=m.getFieldsValue,x=y(Ho),S=x.dispatch,C=i.getValue(),M=v||function(B){return Z({},h,B)},A=c[u],N=ie(ie({},c),M(C));N[u]=function(){i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var B,V=arguments.length,K=new Array(V),Q=0;Q=0&&N<=L.length?(u.keys=[].concat(Ue(u.keys.slice(0,N)),[u.id],Ue(u.keys.slice(N))),y([].concat(Ue(L.slice(0,N)),[A],Ue(L.slice(N))))):(process.env.NODE_ENV!=="production"&&(N<0||N>L.length)&&Ft(!1,"The second parameter of the add function should be a valid positive number."),u.keys=[].concat(Ue(u.keys),[u.id]),y([].concat(Ue(L),[A]))),u.id+=1},remove:function(A){var N=x(),L=new Set(Array.isArray(A)?A:[A]);L.size<=0||(u.keys=u.keys.filter(function(B,V){return!L.has(V)}),y(N.filter(function(B,V){return!L.has(V)})))},move:function(A,N){if(A!==N){var L=x();A<0||A>=L.length||N<0||N>=L.length||(u.keys=Ob(u.keys,A,N),y(Ob(L,A,N)))}}},C=g||[];return Array.isArray(C)||(C=[],process.env.NODE_ENV!=="production"&&Ft(!1,"Current value of '".concat(f.join(" > "),"' is not an array type."))),r(C.map(function(M,A){var N=u.keys[A];return N===void 0&&(u.keys[A]=u.id,N=u.keys[A],u.id+=1),{name:A,key:N,isListField:!0}}),S,m)})))}function NB(e){var t=!1,n=e.length,r=[];return e.length?new Promise(function(i,o){e.forEach(function(a,s){a.catch(function(c){return t=!0,c}).then(function(c){n-=1,r[s]=c,!(n>0)&&(t&&o(r),i(r))})})}):Promise.resolve([])}var CS="__@field_split__";function Hp(e){return e.map(function(t){return"".concat(yt(t),":").concat(t)}).join(CS)}var _a=function(){function e(){gi(this,e),Z(this,"kvs",new Map)}return yi(e,[{key:"set",value:function(n,r){this.kvs.set(Hp(n),r)}},{key:"get",value:function(n){return this.kvs.get(Hp(n))}},{key:"update",value:function(n,r){var i=this.get(n),o=r(i);o?this.set(n,o):this.delete(n)}},{key:"delete",value:function(n){this.kvs.delete(Hp(n))}},{key:"map",value:function(n){return Ue(this.kvs.entries()).map(function(r){var i=Se(r,2),o=i[0],a=i[1],s=o.split(CS);return n({key:s.map(function(c){var l=c.match(/^([^:]*):(.*)$/),u=Se(l,3),f=u[1],p=u[2];return f==="number"?Number(p):p}),value:a})})}},{key:"toJSON",value:function(){var n={};return this.map(function(r){var i=r.key,o=r.value;return n[i.join(".")]=o,null}),n}}]),e}(),kB=["name"],LB=yi(function e(t){var n=this;gi(this,e),Z(this,"formHooked",!1),Z(this,"forceRootUpdate",void 0),Z(this,"subscribable",!0),Z(this,"store",{}),Z(this,"fieldEntities",[]),Z(this,"initialValues",{}),Z(this,"callbacks",{}),Z(this,"validateMessages",null),Z(this,"preserve",null),Z(this,"lastValidatePromise",null),Z(this,"getForm",function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}}),Z(this,"getInternalHooks",function(r){return r===Ho?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(Ft(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),Z(this,"useSubscribe",function(r){n.subscribable=r}),Z(this,"prevWithoutPreserves",null),Z(this,"setInitialValues",function(r,i){if(n.initialValues=r||{},i){var o,a=Aa(r,n.store);(o=n.prevWithoutPreserves)===null||o===void 0||o.map(function(s){var c=s.key;a=Hr(a,c,Wr(r,c))}),n.prevWithoutPreserves=null,n.updateStore(a)}}),Z(this,"destroyForm",function(){var r=new _a;n.getFieldEntities(!0).forEach(function(i){n.isMergedPreserve(i.isPreserve())||r.set(i.getNamePath(),!0)}),n.prevWithoutPreserves=r}),Z(this,"getInitialValue",function(r){var i=Wr(n.initialValues,r);return r.length?Aa(i):i}),Z(this,"setCallbacks",function(r){n.callbacks=r}),Z(this,"setValidateMessages",function(r){n.validateMessages=r}),Z(this,"setPreserve",function(r){n.preserve=r}),Z(this,"watchList",[]),Z(this,"registerWatch",function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(i){return i!==r})}}),Z(this,"notifyWatch",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(n.watchList.length){var i=n.getFieldsValue(),o=n.getFieldsValue(!0);n.watchList.forEach(function(a){a(i,o,r)})}}),Z(this,"timeoutId",null),Z(this,"warningUnhooked",function(){process.env.NODE_ENV!=="production"&&!n.timeoutId&&typeof window<"u"&&(n.timeoutId=setTimeout(function(){n.timeoutId=null,n.formHooked||Ft(!1,"Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?")}))}),Z(this,"updateStore",function(r){n.store=r}),Z(this,"getFieldEntities",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return r?n.fieldEntities.filter(function(i){return i.getNamePath().length}):n.fieldEntities}),Z(this,"getFieldsMap",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=new _a;return n.getFieldEntities(r).forEach(function(o){var a=o.getNamePath();i.set(a,o)}),i}),Z(this,"getFieldEntitiesForNamePathList",function(r){if(!r)return n.getFieldEntities(!0);var i=n.getFieldsMap(!0);return r.map(function(o){var a=nn(o);return i.get(a)||{INVALIDATE_NAME_PATH:nn(o)}})}),Z(this,"getFieldsValue",function(r,i){n.warningUnhooked();var o,a,s;if(r===!0||Array.isArray(r)?(o=r,a=i):r&&yt(r)==="object"&&(s=r.strict,a=r.filter),o===!0&&!a)return n.store;var c=n.getFieldEntitiesForNamePathList(Array.isArray(o)?o:null),l=[];return c.forEach(function(u){var f,p,d="INVALIDATE_NAME_PATH"in u?u.INVALIDATE_NAME_PATH:u.getNamePath();if(s){var h,v;if((h=(v=u).isList)!==null&&h!==void 0&&h.call(v))return}else if(!o&&(f=(p=u).isListField)!==null&&f!==void 0&&f.call(p))return;if(!a)l.push(d);else{var m="getMeta"in u?u.getMeta():null;a(m)&&l.push(d)}}),Ab(n.store,l.map(nn))}),Z(this,"getFieldValue",function(r){n.warningUnhooked();var i=nn(r);return Wr(n.store,i)}),Z(this,"getFieldsError",function(r){n.warningUnhooked();var i=n.getFieldEntitiesForNamePathList(r);return i.map(function(o,a){return o&&!("INVALIDATE_NAME_PATH"in o)?{name:o.getNamePath(),errors:o.getErrors(),warnings:o.getWarnings()}:{name:nn(r[a]),errors:[],warnings:[]}})}),Z(this,"getFieldError",function(r){n.warningUnhooked();var i=nn(r),o=n.getFieldsError([i])[0];return o.errors}),Z(this,"getFieldWarning",function(r){n.warningUnhooked();var i=nn(r),o=n.getFieldsError([i])[0];return o.warnings}),Z(this,"isFieldsTouched",function(){n.warningUnhooked();for(var r=arguments.length,i=new Array(r),o=0;o0&&arguments[0]!==void 0?arguments[0]:{},i=new _a,o=n.getFieldEntities(!0);o.forEach(function(c){var l=c.props.initialValue,u=c.getNamePath();if(l!==void 0){var f=i.get(u)||new Set;f.add({entity:c,value:l}),i.set(u,f)}});var a=function(l){l.forEach(function(u){var f=u.props.initialValue;if(f!==void 0){var p=u.getNamePath(),d=n.getInitialValue(p);if(d!==void 0)Ft(!1,"Form already set 'initialValues' with path '".concat(p.join("."),"'. Field can not overwrite it."));else{var h=i.get(p);if(h&&h.size>1)Ft(!1,"Multiple Field with path '".concat(p.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(h){var v=n.getFieldValue(p);(!r.skipExist||v===void 0)&&n.updateStore(Hr(n.store,p,Ue(h)[0].value))}}}})},s;r.entities?s=r.entities:r.namePathList?(s=[],r.namePathList.forEach(function(c){var l=i.get(c);if(l){var u;(u=s).push.apply(u,Ue(Ue(l).map(function(f){return f.entity})))}})):s=o,a(s)}),Z(this,"resetFields",function(r){n.warningUnhooked();var i=n.store;if(!r){n.updateStore(Aa(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(i,null,{type:"reset"}),n.notifyWatch();return}var o=r.map(nn);o.forEach(function(a){var s=n.getInitialValue(a);n.updateStore(Hr(n.store,a,s))}),n.resetWithFieldInitialValue({namePathList:o}),n.notifyObservers(i,o,{type:"reset"}),n.notifyWatch(o)}),Z(this,"setFields",function(r){n.warningUnhooked();var i=n.store,o=[];r.forEach(function(a){var s=a.name,c=Tr(a,kB),l=nn(s);o.push(l),"value"in c&&n.updateStore(Hr(n.store,l,c.value)),n.notifyObservers(i,[l],{type:"setField",data:a})}),n.notifyWatch(o)}),Z(this,"getFields",function(){var r=n.getFieldEntities(!0),i=r.map(function(o){var a=o.getNamePath(),s=o.getMeta(),c=ie(ie({},s),{},{name:a,value:n.getFieldValue(a)});return Object.defineProperty(c,"originRCField",{value:!0}),c});return i}),Z(this,"initEntityValue",function(r){var i=r.props.initialValue;if(i!==void 0){var o=r.getNamePath(),a=Wr(n.store,o);a===void 0&&n.updateStore(Hr(n.store,o,i))}}),Z(this,"isMergedPreserve",function(r){var i=r!==void 0?r:n.preserve;return i??!0}),Z(this,"registerField",function(r){n.fieldEntities.push(r);var i=r.getNamePath();if(n.notifyWatch([i]),r.props.initialValue!==void 0){var o=n.store;n.resetWithFieldInitialValue({entities:[r],skipExist:!0}),n.notifyObservers(o,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(a,s){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(f){return f!==r}),!n.isMergedPreserve(s)&&(!a||c.length>1)){var l=a?void 0:n.getInitialValue(i);if(i.length&&n.getFieldValue(i)!==l&&n.fieldEntities.every(function(f){return!wS(f.getNamePath(),i)})){var u=n.store;n.updateStore(Hr(u,i,l,!0)),n.notifyObservers(u,[i],{type:"remove"}),n.triggerDependenciesUpdate(u,i)}}n.notifyWatch([i])}}),Z(this,"dispatch",function(r){switch(r.type){case"updateValue":{var i=r.namePath,o=r.value;n.updateValue(i,o);break}case"validateField":{var a=r.namePath,s=r.triggerName;n.validateFields([a],{triggerName:s});break}}}),Z(this,"notifyObservers",function(r,i,o){if(n.subscribable){var a=ie(ie({},o),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(s){var c=s.onStoreChange;c(r,i,a)})}else n.forceRootUpdate()}),Z(this,"triggerDependenciesUpdate",function(r,i){var o=n.getDependencyChildrenFields(i);return o.length&&n.validateFields(o),n.notifyObservers(r,o,{type:"dependenciesUpdate",relatedFields:[i].concat(Ue(o))}),o}),Z(this,"updateValue",function(r,i){var o=nn(r),a=n.store;n.updateStore(Hr(n.store,o,i)),n.notifyObservers(a,[o],{type:"valueUpdate",source:"internal"}),n.notifyWatch([o]);var s=n.triggerDependenciesUpdate(a,o),c=n.callbacks.onValuesChange;if(c){var l=Ab(n.store,[o]);c(l,n.getFieldsValue())}n.triggerOnFieldsChange([o].concat(Ue(s)))}),Z(this,"setFieldsValue",function(r){n.warningUnhooked();var i=n.store;if(r){var o=Aa(n.store,r);n.updateStore(o)}n.notifyObservers(i,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),Z(this,"setFieldValue",function(r,i){n.setFields([{name:r,value:i}])}),Z(this,"getDependencyChildrenFields",function(r){var i=new Set,o=[],a=new _a;n.getFieldEntities().forEach(function(c){var l=c.props.dependencies;(l||[]).forEach(function(u){var f=nn(u);a.update(f,function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return p.add(c),p})})});var s=function c(l){var u=a.get(l)||new Set;u.forEach(function(f){if(!i.has(f)){i.add(f);var p=f.getNamePath();f.isFieldDirty()&&p.length&&(o.push(p),c(p))}})};return s(r),o}),Z(this,"triggerOnFieldsChange",function(r,i){var o=n.callbacks.onFieldsChange;if(o){var a=n.getFields();if(i){var s=new _a;i.forEach(function(l){var u=l.name,f=l.errors;s.set(u,f)}),a.forEach(function(l){l.errors=s.get(l.name)||l.errors})}var c=a.filter(function(l){var u=l.name;return Na(r,u)});c.length&&o(c,a)}}),Z(this,"validateFields",function(r,i){var o;n.warningUnhooked();var a,s;Array.isArray(r)||typeof r=="string"||typeof i=="string"?(a=r,s=i):s=r;var c=!!a,l=c?a.map(nn):[],u=[],f=String(Date.now()),p=new Set,d=(o=s)===null||o===void 0?void 0:o.recursive;n.getFieldEntities(!0).forEach(function(_){if(c||l.push(_.getNamePath()),!(!_.props.rules||!_.props.rules.length)){var g=_.getNamePath();if(p.add(g.join(f)),!c||Na(l,g,d)){var y=_.validateRules(ie({validateMessages:ie(ie({},xS),n.validateMessages)},s));u.push(y.then(function(){return{name:g,errors:[],warnings:[]}}).catch(function(b){var x,S=[],C=[];return(x=b.forEach)===null||x===void 0||x.call(b,function(M){var A=M.rule.warningOnly,N=M.errors;A?C.push.apply(C,Ue(N)):S.push.apply(S,Ue(N))}),S.length?Promise.reject({name:g,errors:S,warnings:C}):{name:g,errors:S,warnings:C}}))}}});var h=NB(u);n.lastValidatePromise=h,h.catch(function(_){return _}).then(function(_){var g=_.map(function(y){var b=y.name;return b});n.notifyObservers(n.store,g,{type:"validateFinish"}),n.triggerOnFieldsChange(g,_)});var v=h.then(function(){return n.lastValidatePromise===h?Promise.resolve(n.getFieldsValue(l)):Promise.reject([])}).catch(function(_){var g=_.filter(function(y){return y&&y.errors.length});return Promise.reject({values:n.getFieldsValue(l),errorFields:g,outOfDate:n.lastValidatePromise!==h})});v.catch(function(_){return _});var m=l.filter(function(_){return p.has(_.join(f))});return n.triggerOnFieldsChange(m),v}),Z(this,"submit",function(){n.warningUnhooked(),n.validateFields().then(function(r){var i=n.callbacks.onFinish;if(i)try{i(r)}catch(o){console.error(o)}}).catch(function(r){var i=n.callbacks.onFinishFailed;i&&i(r)})}),this.forceRootUpdate=t});function TS(e){var t=P.useRef(),n=P.useState({}),r=Se(n,2),i=r[1];if(!t.current)if(e)t.current=e;else{var o=function(){i({})},a=new LB(o);t.current=a.getForm()}return[t.current]}var vh=P.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),$B=function(t){var n=t.validateMessages,r=t.onFormChange,i=t.onFormFinish,o=t.children,a=P.useContext(vh),s=P.useRef({});return P.createElement(vh.Provider,{value:ie(ie({},a),{},{validateMessages:ie(ie({},a.validateMessages),n),triggerFormChange:function(l,u){r&&r(l,{changedFields:u,forms:s.current}),a.triggerFormChange(l,u)},triggerFormFinish:function(l,u){i&&i(l,{values:u,forms:s.current}),a.triggerFormFinish(l,u)},registerForm:function(l,u){l&&(s.current=ie(ie({},s.current),{},Z({},l,u))),a.registerForm(l,u)},unregisterForm:function(l){var u=ie({},s.current);delete u[l],s.current=u,a.unregisterForm(l)}})},o)},jB=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"],FB=function(t,n){var r=t.name,i=t.initialValues,o=t.fields,a=t.form,s=t.preserve,c=t.children,l=t.component,u=l===void 0?"form":l,f=t.validateMessages,p=t.validateTrigger,d=p===void 0?"onChange":p,h=t.onValuesChange,v=t.onFieldsChange,m=t.onFinish,_=t.onFinishFailed,g=Tr(t,jB),y=P.useContext(vh),b=TS(a),x=Se(b,1),S=x[0],C=S.getInternalHooks(Ho),M=C.useSubscribe,A=C.setInitialValues,N=C.setCallbacks,L=C.setValidateMessages,B=C.setPreserve,V=C.destroyForm;P.useImperativeHandle(n,function(){return S}),P.useEffect(function(){return y.registerForm(r,S),function(){y.unregisterForm(r)}},[y,S,r]),L(ie(ie({},y.validateMessages),f)),N({onValuesChange:h,onFieldsChange:function(k){if(y.triggerFormChange(r,k),v){for(var I=arguments.length,$=new Array(I>1?I-1:0),U=1;U{let{children:t}=e;return P.createElement(VB.Provider,{value:null},t)};function UB(e,t,n){const{focusElCls:r,focus:i,borderElCls:o}=n,a=o?"> *":"",s=["hover",i?"focus":null,"active"].filter(Boolean).map(c=>`&:${c} ${a}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:-e.lineWidth},"&-item":Object.assign(Object.assign({[s]:{zIndex:2}},r?{[`&${r}`]:{zIndex:2}}:{}),{[`&[disabled] ${a}`]:{zIndex:0}})}}function GB(e,t,n){const{borderElCls:r}=n,i=r?`> ${r}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function qB(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0};const{componentCls:n}=e,r=`${n}-compact`;return{[r]:Object.assign(Object.assign({},UB(e,r,t)),GB(n,r,t))}}const YB=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),PS=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),mh=e=>({borderColor:e.activeBorderColor,boxShadow:e.activeShadow,outline:0,backgroundColor:e.activeBg}),AS=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},PS(Ii(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),OS=e=>{const{paddingBlockLG:t,fontSizeLG:n,lineHeightLG:r,borderRadiusLG:i,paddingInlineLG:o}=e;return{padding:`${t}px ${o}px`,fontSize:n,lineHeight:r,borderRadius:i}},MS=e=>({padding:`${e.paddingBlockSM}px ${e.paddingInlineSM}px`,borderRadius:e.borderRadiusSM}),DS=(e,t)=>{const{componentCls:n,colorError:r,colorWarning:i,errorActiveShadow:o,warningActiveShadow:a,colorErrorBorderHover:s,colorWarningBorderHover:c}=e;return{[`&-status-error:not(${t}-disabled):not(${t}-borderless)${t}`]:{borderColor:r,"&:hover":{borderColor:s},"&:focus, &:focus-within":Object.assign({},mh(Ii(e,{activeBorderColor:r,activeShadow:o}))),[`${n}-prefix, ${n}-suffix`]:{color:r}},[`&-status-warning:not(${t}-disabled):not(${t}-borderless)${t}`]:{borderColor:i,"&:hover":{borderColor:c},"&:focus, &:focus-within":Object.assign({},mh(Ii(e,{activeBorderColor:i,activeShadow:a}))),[`${n}-prefix, ${n}-suffix`]:{color:i}}}},IS=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${e.paddingBlock}px ${e.paddingInline}px`,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,backgroundColor:e.colorBgContainer,backgroundImage:"none",borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:e.colorBorder,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},YB(e.colorTextPlaceholder)),{"&:hover":Object.assign({},PS(e)),"&:focus, &:focus-within":Object.assign({},mh(e)),"&-disabled, &[disabled]":Object.assign({},AS(e)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},OS(e)),"&-sm":Object.assign({},MS(e)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),KB=e=>{const{componentCls:t,antCls:n}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},OS(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},MS(e)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${e.paddingInline}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,textAlign:"center",backgroundColor:e.addonBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`-${e.paddingBlock+1}px -${e.paddingInline}px`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${e.lineWidth}px ${e.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${n}-select-selector`]:{color:e.colorPrimary}}},[`${n}-cascader-picker`]:{margin:`-9px -${e.paddingInline}px`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${t}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},lF()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[` & > ${t}-affix-wrapper, & > ${t}-number-affix-wrapper, & > ${n}-picker-range `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-e.lineWidth,borderInlineEndWidth:e.lineWidth},[`${t}`]:{float:"none"},[`& > ${n}-select > ${n}-select-selector, & > ${n}-select-auto-complete ${t}, & > ${n}-cascader-picker ${t}, & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child, & > ${n}-select:first-child > ${n}-select-selector, & > ${n}-select-auto-complete:first-child ${t}, & > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child, & > ${n}-select:last-child > ${n}-select-selector, & > ${n}-cascader-picker:last-child ${t}, & > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:-e.lineWidth,[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},XB=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:r}=e,i=16,o=(n-r*2-i)/2;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},Cm(e)),IS(e)),DS(e,t)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:o,paddingBottom:o}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},ZB=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextTertiary},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${e.inputAffixPadding}px`}}}},QB=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:o,colorIconHover:a,iconCls:s}=e;return{[`${t}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},IS(e)),{display:"inline-flex",[`&:not(${t}-affix-wrapper-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${t}[disabled]`]:{background:"transparent"}},[`> input${t}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${t}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),ZB(e)),{[`${s}${t}-password-icon`]:{color:o,cursor:"pointer",transition:`all ${i}`,"&:hover":{color:a}}}),DS(e,`${t}-affix-wrapper`))}},JB=e=>{const{componentCls:t,colorError:n,colorWarning:r,borderRadiusLG:i,borderRadiusSM:o}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},Cm(e)),KB(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:i,fontSize:e.fontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:o}},"&-status-error":{[`${t}-group-addon`]:{color:n,borderColor:n}},"&-status-warning":{[`${t}-group-addon`]:{color:r,borderColor:r}},"&-disabled":{[`${t}-group-addon`]:Object.assign({},AS(e))},[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},e3=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-search`;return{[r]:{[`${t}`]:{"&:hover, &:focus":{borderColor:e.colorPrimaryHover,[`+ ${t}-group-addon ${r}-button:not(${n}-btn-primary)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{borderRadius:0},[`${t}-lg`]:{lineHeight:e.lineHeightLG-2e-4},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${r}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${r}-button:not(${n}-btn-primary)`]:{color:e.colorTextDescription,"&:hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${n}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${r}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${r}-button`]:{height:e.controlHeightLG},[`&-small ${r}-button`]:{height:e.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:-e.lineWidth,borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button, > ${t}, ${t}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},t3=e=>{const{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[r]:{position:"relative","&-show-count":{[`> ${t}`]:{height:"100%"},[`${t}-data-count`]:{position:"absolute",bottom:-e.fontSize*e.lineHeight,insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${t}`]:{paddingInlineEnd:n}},[`&-affix-wrapper${r}-has-feedback`]:{[`${t}`]:{paddingInlineEnd:n}},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function n3(e){return Ii(e,{inputAffixPadding:e.paddingXXS})}const r3=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:o,controlHeightLG:a,fontSizeLG:s,lineHeightLG:c,paddingSM:l,controlPaddingHorizontalSM:u,controlPaddingHorizontal:f,colorFillAlter:p,colorPrimaryHover:d,colorPrimary:h}=e;return{paddingBlock:Math.max(Math.round((t-n*r)/2*10)/10-i,0),paddingBlockSM:Math.max(Math.round((o-n*r)/2*10)/10-i,0),paddingBlockLG:Math.ceil((a-s*c)/2*10)/10-i,paddingInline:l-i,paddingInlineSM:u-i,paddingInlineLG:f-i,addonBg:p,activeBorderColor:h,hoverBorderColor:d,activeShadow:"none",errorActiveShadow:"none",warningActiveShadow:"none",hoverBg:"transparent",activeBg:"transparent"}},i3=Tm("Input",e=>{const t=Ii(e,n3(e));return[XB(t),t3(t),QB(t),JB(t),e3(t),qB(t)]},r3);globalThis&&globalThis.__rest;function o3(e,t){if(!e)return;e.focus(t);const{cursor:n}=t||{};if(n){const r=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r);break}}}var a3=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{const{prefixCls:n,bordered:r=!0,size:i,disabled:o,status:a,allowClear:s,showCount:c,classNames:l,rootClassName:u,className:f}=e,p=a3(e,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:d,direction:h}=P.useContext(Ui),v=qF(i),m=P.useContext(nS),_=o??m,{status:g,hasFeedback:y,feedbackIcon:b}=P.useContext(RS),x=m$(g,a),S=P.useRef(null);P.useImperativeHandle(t,()=>{var L;return{resizableTextArea:(L=S.current)===null||L===void 0?void 0:L.resizableTextArea,focus:B=>{var V,K;o3((K=(V=S.current)===null||V===void 0?void 0:V.resizableTextArea)===null||K===void 0?void 0:K.textArea,B)},blur:()=>{var B;return(B=S.current)===null||B===void 0?void 0:B.blur()}}});const C=d("input",n);let M;typeof s=="object"&&(s!=null&&s.clearIcon)?M=s:s&&(M={clearIcon:P.createElement(PL,null)});const[A,N]=i3(C);return A(P.createElement(v$,Object.assign({},p,{disabled:_,allowClear:M,className:gt(f,u),classes:{affixWrapper:gt(`${C}-textarea-affix-wrapper`,{[`${C}-affix-wrapper-rtl`]:h==="rtl",[`${C}-affix-wrapper-borderless`]:!r,[`${C}-affix-wrapper-sm`]:v==="small",[`${C}-affix-wrapper-lg`]:v==="large",[`${C}-textarea-show-count`]:c},tb(`${C}-affix-wrapper`,x),N)},classNames:Object.assign(Object.assign({},l),{textarea:gt({[`${C}-borderless`]:!r,[`${C}-sm`]:v==="small",[`${C}-lg`]:v==="large"},tb(C,x),N,l==null?void 0:l.textarea)}),prefixCls:C,suffix:y&&P.createElement("span",{className:`${C}-textarea-suffix`},b),showCount:c,ref:S})))}),Au=s3;function c3(e){const t=J.useRef(!1);J.useEffect(()=>{const n=i=>{if((i.keyCode==91||i.keyCode==224)&&(t.current=!0),t.current&&i.keyCode==83)return t.current=!1,i.preventDefault(),e(),!1;if(i.ctrlKey==!0&&i.keyCode==83)return i.preventDefault(),e(),!1};document.addEventListener("keydown",n);const r=i=>{(i.keyCode==91||i.keyCode==224)&&(t.current=!1)};return document.addEventListener("keyup",r),()=>{document.removeEventListener("keydown",n),document.removeEventListener("keyup",r)}},[])}const l3=({modeler:e})=>{const t=J.useRef(1),n=J.useRef(),[r,i]=J.useState(!1),[o,a]=J.useState(!1),[s,c]=J.useState("");J.useEffect(()=>{if(e){const _=e.get("eventBus"),g=y=>{n.current=y.newSelection};return _.on("selection.changed",g),()=>{_.off("selection.changed",g)}}},[]);function l(_){n.current&&n.current.length>1?e.get("alignElements").trigger(n.current,_):alert("需要选择 2 个以上的对象,才能进行对齐操作。")}function u(){t.current+=.05,e.get("canvas").zoom(t.current,"auto")}function f(){t.current-=.05,e.get("canvas").zoom(t.current,"auto")}function p(){e.get("commandStack").undo()}function d(){e.get("commandStack").redo()}async function h(){const _=await e.saveXML({format:!0});c(_.xml),i(!0)}async function v(){const _=await e.saveXML({format:!0}),g=await e.saveSVG(),y=e.get("canvas").getRootElement().id,b={xmlContent:_.xml,svgContent:g.svg,processKey:y};console.log("saveContent: ",b)}c3(v);function m(){e.get("minimap").toggle()}return Y.jsxs(Y.Fragment,{children:[Y.jsx(se.Modal,{title:"XML 预览",open:r,width:"80%",footer:[Y.jsx(se.Button,{type:"primary",onClick:()=>i(!1),children:"好的"},"back")],onCancel:()=>i(!1),children:Y.jsx(Au,{rows:30,value:s,spellCheck:!1})}),Y.jsx(se.Modal,{title:"快捷键",open:o,width:"40%",footer:[Y.jsx(se.Button,{type:"primary",onClick:()=>a(!1),children:"好的"},"back")],onCancel:()=>a(!1),children:Y.jsxs("ul",{children:[Y.jsx("li",{children:"撤销:⌘ (Ctrl) + Z"}),Y.jsx("li",{children:"重做:⌘ (Ctrl) + ⇧ (Shift) + Z"}),Y.jsx("li",{children:"全选:⌘ (Ctrl) + A"}),Y.jsx("li",{children:"删除:Delete (删除键)"}),Y.jsx("li",{children:"编辑文字:E"}),Y.jsx("li",{children:"抓手工具:H"}),Y.jsx("li",{children:"套索工具:L"}),Y.jsx("li",{children:"空间工具:S"})]})}),Y.jsxs(se.Space,{children:[Y.jsx(se.Button,{type:"primary",onClick:v,children:"保存(Ctrl+s)"}),Y.jsx(se.Button,{type:"default",onClick:h,children:" XML 预览"}),Y.jsxs(se.Space.Compact,{block:!0,children:[Y.jsx(se.Tooltip,{title:"向左对齐",children:Y.jsx(se.Button,{style:{padding:"5px 0 0",width:"40px"},onClick:()=>l("left"),icon:Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-align-start",viewBox:"0 0 16 16",children:[Y.jsx("path",{fillRule:"evenodd",d:"M1.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5z"}),Y.jsx("path",{d:"M3 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7z"})]})})}),Y.jsx(se.Tooltip,{title:"左右居中",children:Y.jsx(se.Button,{style:{padding:"5px 0 0",width:"40px"},onClick:()=>l("center"),icon:Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-align-center",viewBox:"0 0 16 16",children:Y.jsx("path",{d:"M8 1a.5.5 0 0 1 .5.5V6h-1V1.5A.5.5 0 0 1 8 1zm0 14a.5.5 0 0 1-.5-.5V10h1v4.5a.5.5 0 0 1-.5.5zM2 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7z"})})})}),Y.jsx(se.Tooltip,{title:"向右对齐",children:Y.jsx(se.Button,{style:{padding:"5px 0 0",width:"40px"},onClick:()=>l("right"),icon:Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-align-end",viewBox:"0 0 16 16",children:[Y.jsx("path",{fillRule:"evenodd",d:"M14.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5z"}),Y.jsx("path",{d:"M13 7a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V7z"})]})})})]}),Y.jsxs(se.Space.Compact,{block:!0,children:[Y.jsx(se.Tooltip,{title:"下上对齐",children:Y.jsx(se.Button,{style:{padding:"5px 0 0",width:"40px"},onClick:()=>l("top"),icon:Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-align-top",viewBox:"0 0 16 16",children:[Y.jsx("rect",{width:"4",height:"12",rx:"1",transform:"matrix(1 0 0 -1 6 15)"}),Y.jsx("path",{d:"M1.5 2a.5.5 0 0 1 0-1v1zm13-1a.5.5 0 0 1 0 1V1zm-13 0h13v1h-13V1z"})]})})}),Y.jsx(se.Tooltip,{title:"上下居中",children:Y.jsx(se.Button,{style:{padding:"5px 0 0",width:"40px"},onClick:()=>l("middle"),icon:Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-align-middle",viewBox:"0 0 16 16",children:Y.jsx("path",{d:"M6 13a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1v10zM1 8a.5.5 0 0 0 .5.5H6v-1H1.5A.5.5 0 0 0 1 8zm14 0a.5.5 0 0 1-.5.5H10v-1h4.5a.5.5 0 0 1 .5.5z"})})})}),Y.jsx(se.Tooltip,{title:"向下对齐",children:Y.jsx(se.Button,{style:{padding:"5px 0 0",width:"40px"},onClick:()=>l("bottom"),icon:Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-align-bottom",viewBox:"0 0 16 16",children:[Y.jsx("rect",{width:"4",height:"12",x:"6",y:"1",rx:"1"}),Y.jsx("path",{d:"M1.5 14a.5.5 0 0 0 0 1v-1zm13 1a.5.5 0 0 0 0-1v1zm-13 0h13v-1h-13v1z"})]})})})]}),Y.jsxs(se.Space.Compact,{block:!0,children:[Y.jsx(se.Tooltip,{title:"放大",children:Y.jsx(se.Button,{style:{padding:"5px 0 0",width:"40px"},onClick:u,icon:Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-zoom-in",viewBox:"0 0 16 16",children:[Y.jsx("path",{fillRule:"evenodd",d:"M6.5 12a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11zM13 6.5a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0z"}),Y.jsx("path",{d:"M10.344 11.742c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1 6.538 6.538 0 0 1-1.398 1.4z"}),Y.jsx("path",{fillRule:"evenodd",d:"M6.5 3a.5.5 0 0 1 .5.5V6h2.5a.5.5 0 0 1 0 1H7v2.5a.5.5 0 0 1-1 0V7H3.5a.5.5 0 0 1 0-1H6V3.5a.5.5 0 0 1 .5-.5z"})]})})}),Y.jsx(se.Tooltip,{title:"缩小",children:Y.jsx(se.Button,{style:{padding:"5px 0 0",width:"40px"},onClick:f,icon:Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-zoom-out",viewBox:"0 0 16 16",children:[Y.jsx("path",{fillRule:"evenodd",d:"M6.5 12a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11zM13 6.5a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0z"}),Y.jsx("path",{d:"M10.344 11.742c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1 6.538 6.538 0 0 1-1.398 1.4z"}),Y.jsx("path",{fillRule:"evenodd",d:"M3 6.5a.5.5 0 0 1 .5-.5h6a.5.5 0 0 1 0 1h-6a.5.5 0 0 1-.5-.5z"})]})})})]}),Y.jsxs(se.Space.Compact,{block:!0,children:[Y.jsx(se.Tooltip,{title:"重做",children:Y.jsx(se.Button,{style:{padding:"5px 0 0",width:"40px"},onClick:d,icon:Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-arrow-clockwise",viewBox:"0 0 16 16",children:[Y.jsx("path",{fillRule:"evenodd",d:"M8 3a5 5 0 1 0 4.546 2.914.5.5 0 0 1 .908-.417A6 6 0 1 1 8 2v1z"}),Y.jsx("path",{d:"M8 4.466V.534a.25.25 0 0 1 .41-.192l2.36 1.966c.12.1.12.284 0 .384L8.41 4.658A.25.25 0 0 1 8 4.466z"})]})})}),Y.jsx(se.Tooltip,{title:"撤销",children:Y.jsx(se.Button,{style:{padding:"5px 0 0",width:"40px"},onClick:p,icon:Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-arrow-counterclockwise",viewBox:"0 0 16 16",children:[Y.jsx("path",{fillRule:"evenodd",d:"M8 3a5 5 0 1 1-4.546 2.914.5.5 0 0 0-.908-.417A6 6 0 1 0 8 2v1z"}),Y.jsx("path",{d:"M8 4.466V.534a.25.25 0 0 0-.41-.192L5.23 2.308a.25.25 0 0 0 0 .384l2.36 1.966A.25.25 0 0 0 8 4.466z"})]})})})]}),Y.jsxs(se.Space.Compact,{block:!0,children:[Y.jsx(se.Tooltip,{title:"小地图",children:Y.jsx(se.Button,{style:{padding:"5px 0 0",width:"40px"},onClick:m,icon:Y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-map",viewBox:"0 0 16 16",children:Y.jsx("path",{fillRule:"evenodd",d:"M15.817.113A.5.5 0 0 1 16 .5v14a.5.5 0 0 1-.402.49l-5 1a.502.502 0 0 1-.196 0L5.5 15.01l-4.902.98A.5.5 0 0 1 0 15.5v-14a.5.5 0 0 1 .402-.49l5-1a.5.5 0 0 1 .196 0L10.5.99l4.902-.98a.5.5 0 0 1 .415.103zM10 1.91l-4-.8v12.98l4 .8V1.91zm1 12.98 4-.8V1.11l-4 .8v12.98zm-6-.8V1.11l-4 .8v12.98l4-.8z"})})})}),Y.jsx(se.Tooltip,{title:"快捷键",children:Y.jsx(se.Button,{style:{padding:"5px 0 0",width:"40px"},onClick:()=>a(!0),icon:Y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-keyboard",viewBox:"0 0 16 16",children:[Y.jsx("path",{d:"M14 5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h12zM2 4a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H2z"}),Y.jsx("path",{d:"M13 10.25a.25.25 0 0 1 .25-.25h.5a.25.25 0 0 1 .25.25v.5a.25.25 0 0 1-.25.25h-.5a.25.25 0 0 1-.25-.25v-.5zm0-2a.25.25 0 0 1 .25-.25h.5a.25.25 0 0 1 .25.25v.5a.25.25 0 0 1-.25.25h-.5a.25.25 0 0 1-.25-.25v-.5zm-5 0A.25.25 0 0 1 8.25 8h.5a.25.25 0 0 1 .25.25v.5a.25.25 0 0 1-.25.25h-.5A.25.25 0 0 1 8 8.75v-.5zm2 0a.25.25 0 0 1 .25-.25h1.5a.25.25 0 0 1 .25.25v.5a.25.25 0 0 1-.25.25h-1.5a.25.25 0 0 1-.25-.25v-.5zm1 2a.25.25 0 0 1 .25-.25h.5a.25.25 0 0 1 .25.25v.5a.25.25 0 0 1-.25.25h-.5a.25.25 0 0 1-.25-.25v-.5zm-5-2A.25.25 0 0 1 6.25 8h.5a.25.25 0 0 1 .25.25v.5a.25.25 0 0 1-.25.25h-.5A.25.25 0 0 1 6 8.75v-.5zm-2 0A.25.25 0 0 1 4.25 8h.5a.25.25 0 0 1 .25.25v.5a.25.25 0 0 1-.25.25h-.5A.25.25 0 0 1 4 8.75v-.5zm-2 0A.25.25 0 0 1 2.25 8h.5a.25.25 0 0 1 .25.25v.5a.25.25 0 0 1-.25.25h-.5A.25.25 0 0 1 2 8.75v-.5zm11-2a.25.25 0 0 1 .25-.25h.5a.25.25 0 0 1 .25.25v.5a.25.25 0 0 1-.25.25h-.5a.25.25 0 0 1-.25-.25v-.5zm-2 0a.25.25 0 0 1 .25-.25h.5a.25.25 0 0 1 .25.25v.5a.25.25 0 0 1-.25.25h-.5a.25.25 0 0 1-.25-.25v-.5zm-2 0A.25.25 0 0 1 9.25 6h.5a.25.25 0 0 1 .25.25v.5a.25.25 0 0 1-.25.25h-.5A.25.25 0 0 1 9 6.75v-.5zm-2 0A.25.25 0 0 1 7.25 6h.5a.25.25 0 0 1 .25.25v.5a.25.25 0 0 1-.25.25h-.5A.25.25 0 0 1 7 6.75v-.5zm-2 0A.25.25 0 0 1 5.25 6h.5a.25.25 0 0 1 .25.25v.5a.25.25 0 0 1-.25.25h-.5A.25.25 0 0 1 5 6.75v-.5zm-3 0A.25.25 0 0 1 2.25 6h1.5a.25.25 0 0 1 .25.25v.5a.25.25 0 0 1-.25.25h-1.5A.25.25 0 0 1 2 6.75v-.5zm0 4a.25.25 0 0 1 .25-.25h.5a.25.25 0 0 1 .25.25v.5a.25.25 0 0 1-.25.25h-.5a.25.25 0 0 1-.25-.25v-.5zm2 0a.25.25 0 0 1 .25-.25h5.5a.25.25 0 0 1 .25.25v.5a.25.25 0 0 1-.25.25h-5.5a.25.25 0 0 1-.25-.25v-.5z"})]})})})]})]})]})};var u3={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};const f3=u3;var NS=function(t,n){return P.createElement(Lc,gn({},t,{ref:n,icon:f3}))};process.env.NODE_ENV!=="production"&&(NS.displayName="CheckOutlined");const p3=P.forwardRef(NS);var d3={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const h3=d3;var kS=function(t,n){return P.createElement(Lc,gn({},t,{ref:n,icon:h3}))};process.env.NODE_ENV!=="production"&&(kS.displayName="CopyOutlined");const v3=P.forwardRef(kS);var m3={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};const g3=m3;var LS=function(t,n){return P.createElement(Lc,gn({},t,{ref:n,icon:g3}))};process.env.NODE_ENV!=="production"&&(LS.displayName="EditOutlined");const y3=P.forwardRef(LS);var b3=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=Ib[t.format]||Ib.default;window.clipboardData.setData(f,e)}else u.clipboardData.clearData(),u.clipboardData.setData(t.format,e);t.onCopy&&(u.preventDefault(),t.onCopy(u.clipboardData))}),document.body.appendChild(s),o.selectNodeContents(s),a.addRange(o);var l=document.execCommand("copy");if(!l)throw new Error("copy command was unsuccessful");c=!0}catch(u){n&&console.error("unable to copy using execCommand: ",u),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(f){n&&console.error("unable to copy using clipboardData: ",f),n&&console.error("falling back to prompt"),r=x3("message"in t?t.message:_3),window.prompt(r,e)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(o):a.removeAllRanges()),s&&document.body.removeChild(s),i()}return c}var S3=w3;const C3=nc(S3);var $S=function(t){if(jn()&&window.document.documentElement){var n=Array.isArray(t)?t:[t],r=window.document.documentElement;return n.some(function(i){return i in r.style})}return!1},T3=function(t,n){if(!$S(t))return!1;var r=document.createElement("div"),i=r.style[t];return r.style[t]=n,r.style[t]!==i};function Nb(e,t){return!Array.isArray(e)&&t!==void 0?T3(e,t):$S(e)}var je={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(t){var n=t.keyCode;if(t.altKey&&!t.ctrlKey||t.metaKey||n>=je.F1&&n<=je.F12)return!1;switch(n){case je.ALT:case je.CAPS_LOCK:case je.CONTEXT_MENU:case je.CTRL:case je.DOWN:case je.END:case je.ESC:case je.HOME:case je.INSERT:case je.LEFT:case je.MAC_FF_META:case je.META:case je.NUMLOCK:case je.NUM_CENTER:case je.PAGE_DOWN:case je.PAGE_UP:case je.PAUSE:case je.PRINT_SCREEN:case je.RIGHT:case je.SHIFT:case je.UP:case je.WIN_KEY:case je.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(t){if(t>=je.ZERO&&t<=je.NINE||t>=je.NUM_ZERO&&t<=je.NUM_MULTIPLY||t>=je.A&&t<=je.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&t===0)return!0;switch(t){case je.SPACE:case je.QUESTION_MARK:case je.NUM_PLUS:case je.NUM_MINUS:case je.NUM_PERIOD:case je.NUM_DIVISION:case je.SEMICOLON:case je.DASH:case je.EQUALS:case je.COMMA:case je.PERIOD:case je.SLASH:case je.APOSTROPHE:case je.SINGLE_QUOTE:case je.OPEN_SQUARE_BRACKET:case je.BACKSLASH:case je.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},R3=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{const n=l=>{const{keyCode:u}=l;u===je.ENTER&&l.preventDefault()},r=l=>{const{keyCode:u}=l,{onClick:f}=e;u===je.ENTER&&f&&f()},{style:i,noStyle:o,disabled:a}=e,s=R3(e,["style","noStyle","disabled"]);let c={};return o||(c=Object.assign({},P3)),a&&(c.pointerEvents="none"),c=Object.assign(Object.assign({},c),i),P.createElement("div",Object.assign({role:"button",tabIndex:0,ref:t},s,{onKeyDown:n,onKeyUp:r,style:c}))}),kb=A3;function jS(e){var t=e.children,n=e.prefixCls,r=e.id,i=e.overlayInnerStyle,o=e.className,a=e.style;return P.createElement("div",{className:gt("".concat(n,"-content"),o),style:a},P.createElement("div",{className:"".concat(n,"-inner"),id:r,role:"tooltip",style:i},typeof t=="function"?t():t))}var FS=P.createContext(null),Lb=[];function O3(e,t){var n=P.useState(function(){if(!jn())return null;var h=document.createElement("div");return process.env.NODE_ENV!=="production"&&t&&h.setAttribute("data-debug",t),h}),r=Se(n,1),i=r[0],o=P.useRef(!1),a=P.useContext(FS),s=P.useState(Lb),c=Se(s,2),l=c[0],u=c[1],f=a||(o.current?void 0:function(h){u(function(v){var m=[h].concat(Ue(v));return m})});function p(){i.parentElement||document.body.appendChild(i),o.current=!0}function d(){var h;(h=i.parentElement)===null||h===void 0||h.removeChild(i),o.current=!1}return on(function(){return e?a?a(p):p():d(),d},[e]),on(function(){l.length&&(l.forEach(function(h){return h()}),u(Lb))},[l]),[i,f]}var zp;function M3(e){if(typeof document>"u")return 0;if(e||zp===void 0){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var n=document.createElement("div"),r=n.style;r.position="absolute",r.top="0",r.left="0",r.pointerEvents="none",r.visibility="hidden",r.width="200px",r.height="150px",r.overflow="hidden",n.appendChild(t),document.body.appendChild(n);var i=t.offsetWidth;n.style.overflow="scroll";var o=t.offsetWidth;i===o&&(o=n.clientWidth),document.body.removeChild(n),zp=i-o}return zp}function $b(e){var t=e.match(/^(.*)px$/),n=Number(t==null?void 0:t[1]);return Number.isNaN(n)?M3():n}function D3(e){if(typeof document>"u"||!e||!(e instanceof Element))return{width:0,height:0};var t=getComputedStyle(e,"::-webkit-scrollbar"),n=t.width,r=t.height;return{width:$b(n),height:$b(r)}}function I3(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var N3="rc-util-locker-".concat(Date.now()),jb=0;function k3(e){var t=!!e,n=P.useState(function(){return jb+=1,"".concat(N3,"_").concat(jb)}),r=Se(n,1),i=r[0];on(function(){if(t){var o=D3(document.body).width,a=I3();Ha(` html body { overflow-y: hidden; `.concat(a?"width: calc(100% - ".concat(o,"px);"):"",` }`),i)}else Eu(i);return function(){Eu(i)}},[t,i])}var Fb=!1;function L3(e){return typeof e=="boolean"&&(Fb=e),Fb}var Bb=function(t){return t===!1?!1:!jn()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},Om=P.forwardRef(function(e,t){var n=e.open,r=e.autoLock,i=e.getContainer,o=e.debug,a=e.autoDestroy,s=a===void 0?!0:a,c=e.children,l=P.useState(n),u=Se(l,2),f=u[0],p=u[1],d=f||n;process.env.NODE_ENV!=="production"&&Ft(jn()||!n,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),P.useEffect(function(){(s||n)&&p(n)},[n,s]);var h=P.useState(function(){return Bb(i)}),v=Se(h,2),m=v[0],_=v[1];P.useEffect(function(){var B=Bb(i);_(B??null)});var g=O3(d&&!m,o),y=Se(g,2),b=y[0],x=y[1],S=m??b;k3(r&&n&&jn()&&(S===b||S===document.body));var C=null;if(c&&Nf(c)&&t){var M=c;C=M.ref}var A=y1(C,t);if(!d||!jn()||m===void 0)return null;var N=S===!1||L3(),L=c;return t&&(L=P.cloneElement(c,{ref:A})),P.createElement(FS.Provider,{value:x},N?L:bh.createPortal(L,S))});process.env.NODE_ENV!=="production"&&(Om.displayName="Portal");function $3(){var e=ie({},P);return e.useId}var Hb=0,zb=$3();const j3=zb?function(t){var n=zb();return t||(process.env.NODE_ENV==="test"?"test-id":n)}:function(t){var n=P.useState("ssr-id"),r=Se(n,2),i=r[0],o=r[1];return P.useEffect(function(){var a=Hb;Hb+=1,o("rc_unique_".concat(a))},[]),t||(process.env.NODE_ENV==="test"?"test-id":i)},F3=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e==null?void 0:e.substr(0,4))};var Vb=P.createContext(null);function Wb(e){return e?Array.isArray(e)?e:[e]:[]}function B3(e,t,n,r){return P.useMemo(function(){var i=Wb(n??t),o=Wb(r??t),a=new Set(i),s=new Set(o);return e&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]},[e,t,n,r])}const H3=function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e.getBoundingClientRect){var i=e.getBoundingClientRect(),o=i.width,a=i.height;if(o||a)return!0}}return!1};function z3(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function V3(e,t,n,r){for(var i=n.points,o=Object.keys(e),a=0;a1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function Cs(e){return tc(parseFloat(e),0)}function Gb(e,t){var n=ie({},e);return(t||[]).forEach(function(r){if(!(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)){var i=Hc(r).getComputedStyle(r),o=i.overflow,a=i.overflowClipMargin,s=i.borderTopWidth,c=i.borderBottomWidth,l=i.borderLeftWidth,u=i.borderRightWidth,f=r.getBoundingClientRect(),p=r.offsetHeight,d=r.clientHeight,h=r.offsetWidth,v=r.clientWidth,m=Cs(s),_=Cs(c),g=Cs(l),y=Cs(u),b=tc(Math.round(f.width/h*1e3)/1e3),x=tc(Math.round(f.height/p*1e3)/1e3),S=(h-v-g-y)*b,C=(p-d-m-_)*x,M=m*x,A=_*x,N=g*b,L=y*b,B=0,V=0;if(o==="clip"){var K=Cs(a);B=K*b,V=K*x}var Q=f.x+N-B,G=f.y+M-V,H=Q+f.width+2*B-N-L-S,q=G+f.height+2*V-M-A-C;n.left=Math.max(n.left,Q),n.top=Math.max(n.top,G),n.right=Math.min(n.right,H),n.bottom=Math.min(n.bottom,q)}}),n}function qb(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n="".concat(t),r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function Yb(e,t){var n=t||[],r=Se(n,2),i=r[0],o=r[1];return[qb(e.width,i),qb(e.height,o)]}function Kb(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function xa(e,t){var n=t[0],r=t[1],i,o;return n==="t"?o=e.y:n==="b"?o=e.y+e.height:o=e.y+e.height/2,r==="l"?i=e.x:r==="r"?i=e.x+e.width:i=e.x+e.width/2,{x:i,y:o}}function Ji(e,t){var n={t:"b",b:"t",l:"r",r:"l"};return e.map(function(r,i){return i===t?n[r]||"c":r}).join("")}function W3(e,t,n,r,i,o,a){var s=P.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[r]||{}}),c=Se(s,2),l=c[0],u=c[1],f=P.useRef(0),p=P.useMemo(function(){return t?gh(t):[]},[t]),d=P.useRef({}),h=function(){d.current={}};e||h();var v=Ci(function(){if(t&&n&&e){let O=function(X,ne){var be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ee,Ze=T.x+X,Mt=T.y+ne,Ut=Ze+le,dn=Mt+oe,Xn=Math.max(Ze,be.left),Wf=Math.max(Mt,be.top),Uf=Math.min(Ut,be.right),Pe=Math.min(dn,be.bottom);return Math.max(0,(Uf-Xn)*(Pe-Wf))},F=function(){j=T.y+Me,te=j+oe,de=T.x+Re,Ne=de+le};var g,y,b=t,x=b.ownerDocument,S=Hc(b),C=S.getComputedStyle(b),M=C.width,A=C.height,N=C.position,L=b.style.left,B=b.style.top,V=b.style.right,K=b.style.bottom,Q=ie(ie({},i[r]),o),G=x.createElement("div");(g=b.parentElement)===null||g===void 0||g.appendChild(G),G.style.left="".concat(b.offsetLeft,"px"),G.style.top="".concat(b.offsetTop,"px"),G.style.position=N,G.style.height="".concat(b.offsetHeight,"px"),G.style.width="".concat(b.offsetWidth,"px"),b.style.left="0",b.style.top="0",b.style.right="auto",b.style.bottom="auto";var H;if(Array.isArray(n))H={x:n[0],y:n[1],width:0,height:0};else{var q=n.getBoundingClientRect();H={x:q.x,y:q.y,width:q.width,height:q.height}}var T=b.getBoundingClientRect(),E=x.documentElement,D=E.clientWidth,k=E.clientHeight,I=E.scrollWidth,$=E.scrollHeight,U=E.scrollTop,ee=E.scrollLeft,oe=T.height,le=T.width,me=H.height,_e=H.width,Be={left:0,top:0,right:D,bottom:k},rt={left:-ee,top:-U,right:I-ee,bottom:$-U},De=Q.htmlRegion,re="visible",He="visibleFirst";De!=="scroll"&&De!==He&&(De=re);var Ye=De===He,ke=Gb(rt,p),ue=Gb(Be,p),Ee=De===re?ue:ke,pe=Ye?ue:Ee;b.style.left="auto",b.style.top="auto",b.style.right="0",b.style.bottom="0";var we=b.getBoundingClientRect();b.style.left=L,b.style.top=B,b.style.right=V,b.style.bottom=K,(y=b.parentElement)===null||y===void 0||y.removeChild(G);var Ke=tc(Math.round(le/parseFloat(M)*1e3)/1e3),ct=tc(Math.round(oe/parseFloat(A)*1e3)/1e3);if(Ke===0||ct===0||xu(n)&&!H3(n))return;var ye=Q.offset,he=Q.targetOffset,Xe=Yb(T,ye),Tt=Se(Xe,2),zt=Tt[0],en=Tt[1],qn=Yb(H,he),kt=Se(qn,2),or=kt[0],Vt=kt[1];H.x-=or,H.y-=Vt;var tn=Q.points||[],Lt=Se(tn,2),En=Lt[0],Yn=Lt[1],Ot=Kb(Yn),Bt=Kb(En),fe=xa(H,Ot),Oe=xa(T,Bt),vt=ie({},Q),Re=fe.x-Oe.x+zt,Me=fe.y-Oe.y+en,Rt=O(Re,Me),wt=O(Re,Me,ue),Bn=xa(H,["t","l"]),ar=xa(T,["t","l"]),sr=xa(H,["b","r"]),_n=xa(T,["b","r"]),Hn=Q.overflow||{},Lr=Hn.adjustX,pn=Hn.adjustY,Jr=Hn.shiftX,ei=Hn.shiftY,bi=function(ne){return typeof ne=="boolean"?ne:ne>=0},j,te,de,Ne;F();var tt=bi(pn),ft=Bt[0]===Ot[0];if(tt&&Bt[0]==="t"&&(te>pe.bottom||d.current.bt)){var ze=Me;ft?ze-=oe-me:ze=Bn.y-_n.y-en;var Ve=O(Re,ze),pt=O(Re,ze,ue);Ve>Rt||Ve===Rt&&(!Ye||pt>=wt)?(d.current.bt=!0,Me=ze,en=-en,vt.points=[Ji(Bt,0),Ji(Ot,0)]):d.current.bt=!1}if(tt&&Bt[0]==="b"&&(jRt||Et===Rt&&(!Ye||sn>=wt)?(d.current.tb=!0,Me=dt,en=-en,vt.points=[Ji(Bt,0),Ji(Ot,0)]):d.current.tb=!1}var cr=bi(Lr),Ei=Bt[1]===Ot[1];if(cr&&Bt[1]==="l"&&(Ne>pe.right||d.current.rl)){var Wt=Re;Ei?Wt-=le-_e:Wt=Bn.x-_n.x-zt;var An=O(Wt,Me),ti=O(Wt,Me,ue);An>Rt||An===Rt&&(!Ye||ti>=wt)?(d.current.rl=!0,Re=Wt,zt=-zt,vt.points=[Ji(Bt,1),Ji(Ot,1)]):d.current.rl=!1}if(cr&&Bt[1]==="r"&&(deRt||On===Rt&&(!Ye||$r>=wt)?(d.current.lr=!0,Re=Ln,zt=-zt,vt.points=[Ji(Bt,1),Ji(Ot,1)]):d.current.lr=!1}F();var xn=Jr===!0?0:Jr;typeof xn=="number"&&(deue.right&&(Re-=Ne-ue.right-zt,H.x>ue.right-xn&&(Re+=H.x-ue.right+xn)));var wn=ei===!0?0:ei;typeof wn=="number"&&(jue.bottom&&(Me-=te-ue.bottom-en,H.y>ue.bottom-wn&&(Me+=H.y-ue.bottom+wn)));var jr=T.x+Re,ni=jr+le,Fr=T.y+Me,Sn=Fr+oe,Kn=H.x,To=Kn+_e,Gi=H.y,Ro=Gi+me,qi=Math.max(jr,Kn),Yi=Math.min(ni,To),lr=(qi+Yi)/2,fs=lr-jr,Po=Math.max(Fr,Gi),Ao=Math.min(Sn,Ro),fa=(Po+Ao)/2,pa=fa-Fr;a==null||a(t,vt);var ps=we.right-T.x-(Re+T.width),R=we.bottom-T.y-(Me+T.height);u({ready:!0,offsetX:Re/Ke,offsetY:Me/ct,offsetR:ps/Ke,offsetB:R/ct,arrowX:fs/Ke,arrowY:pa/ct,scaleX:Ke,scaleY:ct,align:vt})}}),m=function(){f.current+=1;var y=f.current;Promise.resolve().then(function(){f.current===y&&v()})},_=function(){u(function(y){return ie(ie({},y),{},{ready:!1})})};return on(_,[r]),on(function(){e||_()},[e]),[l.ready,l.offsetX,l.offsetY,l.offsetR,l.offsetB,l.arrowX,l.arrowY,l.scaleX,l.scaleY,l.align,m]}function U3(e,t,n,r,i){on(function(){if(e&&t&&n){let f=function(){r(),i()};var o=t,a=n,s=gh(o),c=gh(a),l=Hc(a),u=new Set([l].concat(Ue(s),Ue(c)));return u.forEach(function(p){p.addEventListener("scroll",f,{passive:!0})}),l.addEventListener("resize",f,{passive:!0}),r(),function(){u.forEach(function(p){p.removeEventListener("scroll",f),l.removeEventListener("resize",f)})}}},[e,t,n])}function G3(e,t,n,r,i,o,a,s){var c=P.useRef(e),l=P.useRef(!1);c.current!==e&&(l.current=!0,c.current=e),P.useEffect(function(){var u=Qo(function(){l.current=!1});return function(){Qo.cancel(u)}},[e]),P.useEffect(function(){if(t&&r&&(!i||o)){var u=function(){var N=!1,L=function(K){var Q=K.target;N=a(Q)},B=function(K){var Q=K.target;!l.current&&c.current&&!N&&!a(Q)&&s(!1)};return[L,B]},f=u(),p=Se(f,2),d=p[0],h=p[1],v=u(),m=Se(v,2),_=m[0],g=m[1],y=Hc(r);y.addEventListener("mousedown",d,!0),y.addEventListener("click",h,!0),y.addEventListener("contextmenu",h,!0);var b=_u(n);if(b&&(b.addEventListener("mousedown",_,!0),b.addEventListener("click",g,!0),b.addEventListener("contextmenu",g,!0)),process.env.NODE_ENV!=="production"){var x,S,C=n==null||(x=n.getRootNode)===null||x===void 0?void 0:x.call(n),M=(S=r.getRootNode)===null||S===void 0?void 0:S.call(r);Ft(C===M,"trigger element and popup element should in same shadow root.")}return function(){y.removeEventListener("mousedown",d,!0),y.removeEventListener("click",h,!0),y.removeEventListener("contextmenu",h,!0),b&&(b.removeEventListener("mousedown",_,!0),b.removeEventListener("click",g,!0),b.removeEventListener("contextmenu",g,!0))}}},[t,n,r,i,o])}function q3(e){var t=e.prefixCls,n=e.align,r=e.arrow,i=e.arrowPos,o=r||{},a=o.className,s=o.content,c=i.x,l=c===void 0?0:c,u=i.y,f=u===void 0?0:u,p=P.useRef();if(!n||!n.points)return null;var d={position:"absolute"};if(n.autoArrow!==!1){var h=n.points[0],v=n.points[1],m=h[0],_=h[1],g=v[0],y=v[1];m===g||!["t","b"].includes(m)?d.top=f:m==="t"?d.top=0:d.bottom=0,_===y||!["l","r"].includes(_)?d.left=l:_==="l"?d.left=0:d.right=0}return P.createElement("div",{ref:p,className:gt("".concat(t,"-arrow"),a),style:d},s)}function Y3(e){var t=e.prefixCls,n=e.open,r=e.zIndex,i=e.mask,o=e.motion;return i?P.createElement(Pm,gn({},o,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(a){var s=a.className;return P.createElement("div",{style:{zIndex:r},className:gt("".concat(t,"-mask"),s)})}):null}var BS=P.memo(function(e){var t=e.children;return t},function(e,t){return t.cache});process.env.NODE_ENV!=="production"&&(BS.displayName="PopupContent");var HS=P.forwardRef(function(e,t){var n=e.popup,r=e.className,i=e.prefixCls,o=e.style,a=e.target,s=e.onVisibleChanged,c=e.open,l=e.keepDom,u=e.fresh,f=e.onClick,p=e.mask,d=e.arrow,h=e.arrowPos,v=e.align,m=e.motion,_=e.maskMotion,g=e.forceRender,y=e.getPopupContainer,b=e.autoDestroy,x=e.portal,S=e.zIndex,C=e.onMouseEnter,M=e.onMouseLeave,A=e.onPointerEnter,N=e.ready,L=e.offsetX,B=e.offsetY,V=e.offsetR,K=e.offsetB,Q=e.onAlign,G=e.onPrepare,H=e.stretch,q=e.targetWidth,T=e.targetHeight,E=typeof n=="function"?n():n,D=c||l,k=(y==null?void 0:y.length)>0,I=P.useState(!y||!k),$=Se(I,2),U=$[0],ee=$[1];if(on(function(){!U&&k&&a&&ee(!0)},[U,k,a]),!U)return null;var oe="auto",le={left:"-1000vw",top:"-1000vh",right:oe,bottom:oe};if(N||!c){var me,_e=v.points,Be=v.dynamicInset||((me=v._experimental)===null||me===void 0?void 0:me.dynamicInset),rt=Be&&_e[0][1]==="r",De=Be&&_e[0][0]==="b";rt?(le.right=V,le.left=oe):(le.left=L,le.right=oe),De?(le.bottom=K,le.top=oe):(le.top=B,le.bottom=oe)}var re={};return H&&(H.includes("height")&&T?re.height=T:H.includes("minHeight")&&T&&(re.minHeight=T),H.includes("width")&&q?re.width=q:H.includes("minWidth")&&q&&(re.minWidth=q)),c||(re.pointerEvents="none"),P.createElement(x,{open:g||D,getContainer:y&&function(){return y(a)},autoDestroy:b},P.createElement(Y3,{prefixCls:i,open:c,zIndex:S,mask:p,motion:_}),P.createElement(cs,{onResize:Q,disabled:!c},function(He){return P.createElement(Pm,gn({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:g,leavedClassName:"".concat(i,"-hidden")},m,{onAppearPrepare:G,onEnterPrepare:G,visible:c,onVisibleChanged:function(ke){var ue;m==null||(ue=m.onVisibleChanged)===null||ue===void 0||ue.call(m,ke),s(ke)}}),function(Ye,ke){var ue=Ye.className,Ee=Ye.style,pe=gt(i,ue,r);return P.createElement("div",{ref:$c(He,t,ke),className:pe,style:ie(ie(ie(ie({"--arrow-x":"".concat(h.x||0,"px"),"--arrow-y":"".concat(h.y||0,"px")},le),re),Ee),{},{boxSizing:"border-box",zIndex:S},o),onMouseEnter:C,onMouseLeave:M,onPointerEnter:A,onClick:f},d&&P.createElement(q3,{prefixCls:i,arrow:d,arrowPos:h,align:v}),P.createElement(BS,{cache:!c&&!u},E))})}))});process.env.NODE_ENV!=="production"&&(HS.displayName="Popup");var zS=P.forwardRef(function(e,t){var n=e.children,r=e.getTriggerDOMNode,i=Nf(n),o=P.useCallback(function(s){mm(t,r?r(s):s)},[r]),a=y1(o,n.ref);return i?P.cloneElement(n,{ref:a}):n});process.env.NODE_ENV!=="production"&&(zS.displayName="TriggerWrapper");var K3=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function X3(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Om,t=P.forwardRef(function(n,r){var i=n.prefixCls,o=i===void 0?"rc-trigger-popup":i,a=n.children,s=n.action,c=s===void 0?"hover":s,l=n.showAction,u=n.hideAction,f=n.popupVisible,p=n.defaultPopupVisible,d=n.onPopupVisibleChange,h=n.afterPopupVisibleChange,v=n.mouseEnterDelay,m=n.mouseLeaveDelay,_=m===void 0?.1:m,g=n.focusDelay,y=n.blurDelay,b=n.mask,x=n.maskClosable,S=x===void 0?!0:x,C=n.getPopupContainer,M=n.forceRender,A=n.autoDestroy,N=n.destroyPopupOnHide,L=n.popup,B=n.popupClassName,V=n.popupStyle,K=n.popupPlacement,Q=n.builtinPlacements,G=Q===void 0?{}:Q,H=n.popupAlign,q=n.zIndex,T=n.stretch,E=n.getPopupClassNameFromAlign,D=n.fresh,k=n.alignPoint,I=n.onPopupClick,$=n.onPopupAlign,U=n.arrow,ee=n.popupMotion,oe=n.maskMotion,le=n.popupTransitionName,me=n.popupAnimation,_e=n.maskTransitionName,Be=n.maskAnimation,rt=n.className,De=n.getTriggerDOMNode,re=Tr(n,K3),He=A||N||!1,Ye=P.useState(!1),ke=Se(Ye,2),ue=ke[0],Ee=ke[1];on(function(){Ee(F3())},[]);var pe=P.useRef({}),we=P.useContext(Vb),Ke=P.useMemo(function(){return{registerSubPopup:function(nt,Gt){pe.current[nt]=Gt,we==null||we.registerSubPopup(nt,Gt)}}},[we]),ct=j3(),ye=P.useState(null),he=Se(ye,2),Xe=he[0],Tt=he[1],zt=Ci(function(Pe){xu(Pe)&&Xe!==Pe&&Tt(Pe),we==null||we.registerSubPopup(ct,Pe)}),en=P.useState(null),qn=Se(en,2),kt=qn[0],or=qn[1],Vt=Ci(function(Pe){xu(Pe)&&kt!==Pe&&or(Pe)}),tn=P.Children.only(a),Lt=(tn==null?void 0:tn.props)||{},En={},Yn=Ci(function(Pe){var nt,Gt,hn=kt;return(hn==null?void 0:hn.contains(Pe))||((nt=_u(hn))===null||nt===void 0?void 0:nt.host)===Pe||Pe===hn||(Xe==null?void 0:Xe.contains(Pe))||((Gt=_u(Xe))===null||Gt===void 0?void 0:Gt.host)===Pe||Pe===Xe||Object.values(pe.current).some(function(qt){return(qt==null?void 0:qt.contains(Pe))||Pe===qt})}),Ot=Ub(o,ee,me,le),Bt=Ub(o,oe,Be,_e),fe=P.useState(p||!1),Oe=Se(fe,2),vt=Oe[0],Re=Oe[1],Me=f??vt,Rt=Ci(function(Pe){f===void 0&&Re(Pe)});on(function(){Re(f||!1)},[f]);var wt=P.useRef(Me);wt.current=Me;var Bn=Ci(function(Pe){bh.flushSync(function(){Me!==Pe&&(Rt(Pe),d==null||d(Pe))})}),ar=P.useRef(),sr=function(){clearTimeout(ar.current)},_n=function(nt){var Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;sr(),Gt===0?Bn(nt):ar.current=setTimeout(function(){Bn(nt)},Gt*1e3)};P.useEffect(function(){return sr},[]);var Hn=P.useState(!1),Lr=Se(Hn,2),pn=Lr[0],Jr=Lr[1];on(function(Pe){(!Pe||Me)&&Jr(!0)},[Me]);var ei=P.useState(null),bi=Se(ei,2),j=bi[0],te=bi[1],de=P.useState([0,0]),Ne=Se(de,2),tt=Ne[0],ft=Ne[1],ze=function(nt){ft([nt.clientX,nt.clientY])},Ve=W3(Me,Xe,k?tt:kt,K,G,H,$),pt=Se(Ve,11),dt=pt[0],Et=pt[1],sn=pt[2],cr=pt[3],Ei=pt[4],Wt=pt[5],An=pt[6],ti=pt[7],Ln=pt[8],On=pt[9],$r=pt[10],xn=B3(ue,c,l,u),wn=Se(xn,2),jr=wn[0],ni=wn[1],Fr=jr.has("click"),Sn=ni.has("click")||ni.has("contextMenu"),Kn=Ci(function(){pn||$r()}),To=function(){wt.current&&k&&Sn&&_n(!1)};U3(Me,kt,Xe,Kn,To),on(function(){Kn()},[tt,K]),on(function(){Me&&!(G!=null&&G[K])&&Kn()},[JSON.stringify(H)]);var Gi=P.useMemo(function(){var Pe=V3(G,o,On,k);return gt(Pe,E==null?void 0:E(On))},[On,E,G,o,k]);P.useImperativeHandle(r,function(){return{forceAlign:Kn}});var Ro=P.useState(0),qi=Se(Ro,2),Yi=qi[0],lr=qi[1],fs=P.useState(0),Po=Se(fs,2),Ao=Po[0],fa=Po[1],pa=function(){if(T&&kt){var nt=kt.getBoundingClientRect();lr(nt.width),fa(nt.height)}},ps=function(){pa(),Kn()},R=function(nt){Jr(!1),$r(),h==null||h(nt)},O=function(){return new Promise(function(nt){pa(),te(function(){return nt})})};on(function(){j&&($r(),j(),te(null))},[j]);function F(Pe,nt,Gt,hn){En[Pe]=function(qt){var zc;hn==null||hn(qt),_n(nt,Gt);for(var Gf=arguments.length,Nm=new Array(Gf>1?Gf-1:0),Vc=1;Vc1?Gt-1:0),qt=1;qt1?Gt-1:0),qt=1;qtn!==void 0?n:`${e}-${t}`,VS=8;function WS(e){const t=VS,{contentRadius:n,limitVerticalRadius:r}=e,i=n>12?n+2:12;return{dropdownArrowOffset:i,dropdownArrowOffsetVertical:r?t:i}}function Pl(e,t){return e?t:{}}function r6(e,t){const{componentCls:n,sizePopupArrow:r,borderRadiusXS:i,borderRadiusOuter:o,boxShadowPopoverArrow:a}=e,{colorBg:s,contentRadius:c=e.borderRadiusLG,limitVerticalRadius:l,arrowDistance:u=0,arrowPlacement:f={left:!0,right:!0,top:!0,bottom:!0}}=t,{dropdownArrowOffsetVertical:p,dropdownArrowOffset:d}=WS({contentRadius:c,limitVerticalRadius:l});return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({[`${n}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},sF(r,i,o,s,a)),{"&:before":{background:s}})]},Pl(!!f.top,{[[`&-placement-top ${n}-arrow`,`&-placement-topLeft ${n}-arrow`,`&-placement-topRight ${n}-arrow`].join(",")]:{bottom:u,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft ${n}-arrow`]:{left:{_skip_check_:!0,value:d}},[`&-placement-topRight ${n}-arrow`]:{right:{_skip_check_:!0,value:d}}})),Pl(!!f.bottom,{[[`&-placement-bottom ${n}-arrow`,`&-placement-bottomLeft ${n}-arrow`,`&-placement-bottomRight ${n}-arrow`].join(",")]:{top:u,transform:"translateY(-100%)"},[`&-placement-bottom ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},[`&-placement-bottomLeft ${n}-arrow`]:{left:{_skip_check_:!0,value:d}},[`&-placement-bottomRight ${n}-arrow`]:{right:{_skip_check_:!0,value:d}}})),Pl(!!f.left,{[[`&-placement-left ${n}-arrow`,`&-placement-leftTop ${n}-arrow`,`&-placement-leftBottom ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:u},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop ${n}-arrow`]:{top:p},[`&-placement-leftBottom ${n}-arrow`]:{bottom:p}})),Pl(!!f.right,{[[`&-placement-right ${n}-arrow`,`&-placement-rightTop ${n}-arrow`,`&-placement-rightBottom ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:u},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop ${n}-arrow`]:{top:p},[`&-placement-rightBottom ${n}-arrow`]:{bottom:p}}))}}function i6(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const i=r&&typeof r=="object"?r:{},o={};switch(e){case"top":case"bottom":o.shiftX=t.dropdownArrowOffset*2+n,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=t.dropdownArrowOffsetVertical*2+n,o.shiftX=!0,o.adjustX=!0;break}const a=Object.assign(Object.assign({},o),i);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const Xb={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},o6={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},a6=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function s6(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:i,borderRadius:o,visibleFirst:a}=e,s=t/2,c={};return Object.keys(Xb).forEach(l=>{const u=r&&o6[l]||Xb[l],f=Object.assign(Object.assign({},u),{offset:[0,0],dynamicInset:!0});switch(c[l]=f,a6.has(l)&&(f.autoArrow=!1),l){case"top":case"topLeft":case"topRight":f.offset[1]=-s-i;break;case"bottom":case"bottomLeft":case"bottomRight":f.offset[1]=s+i;break;case"left":case"leftTop":case"leftBottom":f.offset[0]=-s-i;break;case"right":case"rightTop":case"rightBottom":f.offset[0]=s+i;break}const p=WS({contentRadius:o,limitVerticalRadius:!0});if(r)switch(l){case"topLeft":case"bottomLeft":f.offset[0]=-p.dropdownArrowOffset-s;break;case"topRight":case"bottomRight":f.offset[0]=p.dropdownArrowOffset+s;break;case"leftTop":case"rightTop":f.offset[1]=-p.dropdownArrowOffset-s;break;case"leftBottom":case"rightBottom":f.offset[1]=p.dropdownArrowOffset+s;break}f.overflow=i6(l,p,t,n),a&&(f.htmlRegion="visibleFirst")}),c}const{isValidElement:Mm}=P;function c6(e){return e&&Mm(e)&&e.type===P.Fragment}function l6(e,t,n){return Mm(e)?P.cloneElement(e,typeof n=="function"?n(e.props||{}):n):t}function US(e,t){return l6(e,e,t)}const u6=e=>({animationDuration:e,animationFillMode:"both"}),f6=e=>({animationDuration:e,animationFillMode:"both"}),p6=function(e,t,n,r){const o=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[` ${o}${e}-enter, ${o}${e}-appear `]:Object.assign(Object.assign({},u6(r)),{animationPlayState:"paused"}),[`${o}${e}-leave`]:Object.assign(Object.assign({},f6(r)),{animationPlayState:"paused"}),[` ${o}${e}-enter${e}-enter-active, ${o}${e}-appear${e}-appear-active `]:{animationName:t,animationPlayState:"running"},[`${o}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},d6=new kr("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),h6=new kr("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Zb=new kr("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Qb=new kr("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),v6=new kr("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),m6=new kr("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),g6=new kr("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),y6=new kr("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),b6=new kr("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),E6=new kr("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),_6=new kr("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),x6=new kr("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),w6={zoom:{inKeyframes:d6,outKeyframes:h6},"zoom-big":{inKeyframes:Zb,outKeyframes:Qb},"zoom-big-fast":{inKeyframes:Zb,outKeyframes:Qb},"zoom-left":{inKeyframes:g6,outKeyframes:y6},"zoom-right":{inKeyframes:b6,outKeyframes:E6},"zoom-up":{inKeyframes:v6,outKeyframes:m6},"zoom-down":{inKeyframes:_6,outKeyframes:x6}},S6=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:o}=w6[t];return[p6(r,i,o,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[` ${r}-enter, ${r}-appear `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},C6=e=>{const{componentCls:t,tooltipMaxWidth:n,tooltipColor:r,tooltipBg:i,tooltipBorderRadius:o,zIndexPopup:a,controlHeight:s,boxShadowSecondary:c,paddingSM:l,paddingXS:u,tooltipRadiusOuter:f}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},Cm(e)),{position:"absolute",zIndex:a,display:"block",width:"max-content",maxWidth:n,visibility:"visible",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","&-hidden":{display:"none"},"--antd-arrow-background-color":i,[`${t}-inner`]:{minWidth:s,minHeight:s,padding:`${l/2}px ${u}px`,color:r,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:o,boxShadow:c,boxSizing:"border-box"},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${t}-inner`]:{borderRadius:Math.min(o,VS)}},[`${t}-content`]:{position:"relative"}}),vF(e,(p,d)=>{let{darkColor:h}=d;return{[`&${t}-${p}`]:{[`${t}-inner`]:{backgroundColor:h},[`${t}-arrow`]:{"--antd-arrow-background-color":h}}}})),{"&-rtl":{direction:"rtl"}})},r6(Ii(e,{borderRadiusOuter:f}),{colorBg:"var(--antd-arrow-background-color)",contentRadius:o,limitVerticalRadius:!0}),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},GS=(e,t)=>Tm("Tooltip",r=>{if(t===!1)return[];const{borderRadius:i,colorTextLightSolid:o,colorBgDefault:a,borderRadiusOuter:s}=r,c=Ii(r,{tooltipMaxWidth:250,tooltipColor:o,tooltipBorderRadius:i,tooltipBg:a,tooltipRadiusOuter:s>4?4:s});return[C6(c),S6(r,"zoom-big-fast")]},r=>{let{zIndexPopupBase:i,colorBgSpotlight:o}=r;return{zIndexPopup:i+70,colorBgDefault:o}},{resetStyle:!1})(e),T6=Ru.map(e=>`${e}-inverse`);function R6(e){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat(Ue(T6),Ue(Ru)).includes(e):Ru.includes(e)}function qS(e,t){const n=R6(t),r=gt({[`${e}-${t}`]:t&&n}),i={},o={};return t&&!n&&(i.background=t,o["--antd-arrow-background-color"]=t),{className:r,overlayStyle:i,arrowStyle:o}}const P6=e=>{const{prefixCls:t,className:n,placement:r="top",title:i,color:o,overlayInnerStyle:a}=e,{getPrefixCls:s}=P.useContext(Ui),c=s("tooltip",t),[l,u]=GS(c,!0),f=qS(c,o),p=f.arrowStyle,d=Object.assign(Object.assign({},a),f.overlayStyle),h=gt(u,c,`${c}-pure`,`${c}-placement-${r}`,n,f.className);return l(P.createElement("div",{className:h,style:p},P.createElement("div",{className:`${c}-arrow`}),P.createElement(jS,Object.assign({},e,{className:u,prefixCls:c,overlayInnerStyle:d}),i)))},A6=P6;var O6=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{var n,r;const{prefixCls:i,openClassName:o,getTooltipContainer:a,overlayClassName:s,color:c,overlayInnerStyle:l,children:u,afterOpenChange:f,afterVisibleChange:p,destroyTooltipOnHide:d,arrow:h=!0,title:v,overlay:m,builtinPlacements:_,arrowPointAtCenter:g=!1,autoAdjustOverflow:y=!0}=e,b=!!h,[,x]=Vf(),{getPopupContainer:S,getPrefixCls:C,direction:M}=P.useContext(Ui),A=ua("Tooltip"),N=P.useRef(null),L=()=>{var Ee;(Ee=N.current)===null||Ee===void 0||Ee.forceAlign()};P.useImperativeHandle(t,()=>({forceAlign:L,forcePopupAlign:()=>{A.deprecated(!1,"forcePopupAlign","forceAlign"),L()}})),process.env.NODE_ENV!=="production"&&([["visible","open"],["defaultVisible","defaultOpen"],["onVisibleChange","onOpenChange"],["afterVisibleChange","afterOpenChange"],["arrowPointAtCenter","arrow={{ pointAtCenter: true }}"]].forEach(Ee=>{let[pe,we]=Ee;A.deprecated(!(pe in e),pe,we)}),process.env.NODE_ENV!=="production"&&A(!d||typeof d=="boolean","usage","`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly."),process.env.NODE_ENV!=="production"&&A(!h||typeof h=="boolean"||!("arrowPointAtCenter"in h),"deprecated","`arrowPointAtCenter` in `arrow` is deprecated. Please use `pointAtCenter` instead."));const[B,V]=If(!1,{value:(n=e.open)!==null&&n!==void 0?n:e.visible,defaultValue:(r=e.defaultOpen)!==null&&r!==void 0?r:e.defaultVisible}),K=!v&&!m&&v!==0,Q=Ee=>{var pe,we;V(K?!1:Ee),K||((pe=e.onOpenChange)===null||pe===void 0||pe.call(e,Ee),(we=e.onVisibleChange)===null||we===void 0||we.call(e,Ee))},G=P.useMemo(()=>{var Ee,pe;let we=g;return typeof h=="object"&&(we=(pe=(Ee=h.pointAtCenter)!==null&&Ee!==void 0?Ee:h.arrowPointAtCenter)!==null&&pe!==void 0?pe:g),_||s6({arrowPointAtCenter:we,autoAdjustOverflow:y,arrowWidth:b?x.sizePopupArrow:0,borderRadius:x.borderRadius,offset:x.marginXXS,visibleFirst:!0})},[g,h,_,x]),H=P.useMemo(()=>v===0?v:m||v||"",[m,v]),q=P.createElement(WB,null,typeof H=="function"?H():H),{getPopupContainer:T,placement:E="top",mouseEnterDelay:D=.1,mouseLeaveDelay:k=.1,overlayStyle:I,rootClassName:$}=e,U=O6(e,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),ee=C("tooltip",i),oe=C(),le=e["data-popover-inject"];let me=B;!("open"in e)&&!("visible"in e)&&K&&(me=!1);const _e=Mm(u)&&!c6(u)?u:P.createElement("span",null,u),Be=_e.props,rt=!Be.className||typeof Be.className=="string"?gt(Be.className,o||`${ee}-open`):Be.className,[De,re]=GS(ee,!le),He=qS(ee,c),Ye=He.arrowStyle,ke=Object.assign(Object.assign({},l),He.overlayStyle),ue=gt(s,{[`${ee}-rtl`]:M==="rtl"},He.className,$,re);return De(P.createElement(t6,Object.assign({},U,{showArrow:b,placement:E,mouseEnterDelay:D,mouseLeaveDelay:k,prefixCls:ee,overlayClassName:ue,overlayStyle:Object.assign(Object.assign({},Ye),I),getTooltipContainer:T||a||S,ref:N,builtinPlacements:G,overlay:q,visible:me,onVisibleChange:Q,afterVisibleChange:f??p,overlayInnerStyle:ke,arrowContent:P.createElement("span",{className:`${ee}-arrow-content`}),motion:{motionName:n6(oe,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!d}),me?US(_e,{className:rt}):_e))});process.env.NODE_ENV!=="production"&&(Dm.displayName="Tooltip");Dm._InternalPanelDoNotUseOrYouWillBeFired=A6;const yh=Dm;var M6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};const D6=M6;var YS=function(t,n){return P.createElement(Lc,gn({},t,{ref:n,icon:D6}))};process.env.NODE_ENV!=="production"&&(YS.displayName="EnterOutlined");const I6=P.forwardRef(YS),N6=(e,t,n,r)=>{const{titleMarginBottom:i,fontWeightStrong:o}=r;return{marginBottom:i,color:n,fontWeight:o,fontSize:e,lineHeight:t}},k6=e=>{const t=[1,2,3,4,5],n={};return t.forEach(r=>{n[` h${r}&, div&-h${r}, div&-h${r} > textarea, h${r} `]=N6(e[`fontSizeHeading${r}`],e[`lineHeightHeading${r}`],e.colorTextHeading,e)}),n},L6=e=>{const{componentCls:t}=e;return{"a&, a":Object.assign(Object.assign({},oS(e)),{textDecoration:e.linkDecoration,"&:active, &:hover":{textDecoration:e.linkHoverDecoration},[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},$6=e=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:cL[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:600},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),j6=e=>{const{componentCls:t,paddingSM:n}=e,r=n;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:-e.paddingSM,marginTop:-r,marginBottom:`calc(1em - ${r}px)`},[`${t}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:e.marginXS+2,insetBlockEnd:e.marginXS,color:e.colorTextDescription,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},F6=e=>({"&-copy-success":{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}}}),B6=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-single-line":{whiteSpace:"nowrap"},"&-ellipsis-single-line":{overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),H6=e=>{const{componentCls:t,titleMarginTop:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success`]:{color:e.colorSuccess},[`&${t}-warning`]:{color:e.colorWarning},[`&${t}-danger`]:{color:e.colorError,"a&:active, a&:focus":{color:e.colorErrorActive},"a&:hover":{color:e.colorErrorHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"}},k6(e)),{[` & + h1${t}, & + h2${t}, & + h3${t}, & + h4${t}, & + h5${t} `]:{marginTop:n},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:n}}}),$6(e)),L6(e)),{[` ${t}-expand, ${t}-edit, ${t}-copy `]:Object.assign(Object.assign({},oS(e)),{marginInlineStart:e.marginXXS})}),j6(e)),F6(e)),B6()),{"&-rtl":{direction:"rtl"}})}},KS=Tm("Typography",e=>[H6(e)],()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"})),z6=e=>{const{prefixCls:t,"aria-label":n,className:r,style:i,direction:o,maxLength:a,autoSize:s=!0,value:c,onSave:l,onCancel:u,onEnd:f,component:p,enterIcon:d=P.createElement(I6,null)}=e,h=P.useRef(null),v=P.useRef(!1),m=P.useRef(),[_,g]=P.useState(c);P.useEffect(()=>{g(c)},[c]),P.useEffect(()=>{if(h.current&&h.current.resizableTextArea){const{textArea:K}=h.current.resizableTextArea;K.focus();const{length:Q}=K.value;K.setSelectionRange(Q,Q)}},[]);const y=K=>{let{target:Q}=K;g(Q.value.replace(/[\n\r]/g,""))},b=()=>{v.current=!0},x=()=>{v.current=!1},S=K=>{let{keyCode:Q}=K;v.current||(m.current=Q)},C=()=>{l(_.trim())},M=K=>{let{keyCode:Q,ctrlKey:G,altKey:H,metaKey:q,shiftKey:T}=K;m.current===Q&&!v.current&&!G&&!H&&!q&&!T&&(Q===je.ENTER?(C(),f==null||f()):Q===je.ESC&&u())},A=()=>{C()},N=p?`${t}-${p}`:"",[L,B]=KS(t),V=gt(t,`${t}-edit-content`,{[`${t}-rtl`]:o==="rtl"},r,N,B);return L(P.createElement("div",{className:V,style:i},P.createElement(Au,{ref:h,maxLength:a,value:_,onChange:y,onKeyDown:S,onKeyUp:M,onCompositionStart:b,onCompositionEnd:x,onBlur:A,"aria-label":n,rows:1,autoSize:s}),d!==null?US(d,{className:`${t}-edit-content-confirm`}):null))},V6=z6;var W6=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{const{prefixCls:n,component:r="article",className:i,rootClassName:o,setContentRef:a,children:s,direction:c,style:l}=e,u=W6(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:f,direction:p,typography:d}=P.useContext(Ui),h=c??p;let v=t;a&&(v=$c(t,a)),process.env.NODE_ENV!=="production"&&ua("Typography").deprecated(!a,"setContentRef","ref");const m=f("typography",n),[_,g]=KS(m),y=gt(m,d==null?void 0:d.className,{[`${m}-rtl`]:h==="rtl"},i,o,g),b=Object.assign(Object.assign({},d==null?void 0:d.style),l);return _(P.createElement(r,Object.assign({className:y,style:b,ref:v},u),s))});process.env.NODE_ENV!=="production"&&(XS.displayName="Typography");const U6=XS;function Vp(e,t){return P.useMemo(()=>{const n=!!e;return[n,Object.assign(Object.assign({},t),n&&typeof e=="object"?e:null)]},[e])}const G6=(e,t)=>{const n=P.useRef(!1);P.useEffect(()=>{n.current?e():n.current=!0},t)},q6=G6;function ZS(e){const t=typeof e;return t==="string"||t==="number"}function Y6(e){let t=0;return e.forEach(n=>{ZS(n)?t+=String(n).length:t+=1}),t}function Wp(e,t){let n=0;const r=[];for(let i=0;it){const l=t-n;return r.push(String(o).slice(0,l)),r}r.push(o),n=c}return e}const K6=0,Al=1,Jb=2,Up=3,Gp=4,QS=e=>{let{enabledMeasure:t,children:n,text:r,width:i,fontSize:o,rows:a,onEllipsis:s}=e;const[[c,l,u],f]=P.useState([0,0,0]),[p,d]=P.useState(0),[h,v]=P.useState(K6),[m,_]=P.useState(0),g=P.useRef(null),y=P.useRef(null),b=P.useMemo(()=>za(r),[r]),x=P.useMemo(()=>Y6(b),[b]),S=P.useMemo(()=>!t||h!==Up?p&&h!==Gp&&t?n(Wp(b,p),p{t&&i&&o&&x&&(v(Al),f([0,Math.ceil(x/2),x]))},[t,i,o,r,x,a]),on(()=>{var N;h===Al&&_(((N=g.current)===null||N===void 0?void 0:N.offsetHeight)||0)},[h]),on(()=>{var N,L;if(m){if(h===Al){const B=((N=y.current)===null||N===void 0?void 0:N.offsetHeight)||0,V=a*m;B<=V?(v(Gp),s(!1)):v(Jb)}else if(h===Jb)if(c!==u){const B=((L=y.current)===null||L===void 0?void 0:L.offsetHeight)||0,V=a*m;let K=c,Q=u;c===u-1?Q=c:B<=V?K=l:Q=l;const G=Math.ceil((K+Q)/2);f([K,G,Q])}else v(Up),d(l),s(!0)}},[h,c,u,a,m]);const C={width:i,whiteSpace:"normal",margin:0,padding:0},M=(N,L,B)=>P.createElement("span",{"aria-hidden":!0,ref:L,style:Object.assign({position:"fixed",display:"block",left:0,top:0,zIndex:-9999,visibility:"hidden",pointerEvents:"none",fontSize:Math.ceil(o/2)*2},B)},N),A=(N,L)=>{const B=Wp(b,N);return M(n(B,!0),L,C)};return P.createElement(P.Fragment,null,S,t&&h!==Up&&h!==Gp&&P.createElement(P.Fragment,null,M("lg",g,{wordBreak:"keep-all",whiteSpace:"nowrap"}),h===Al?M(n(b,!1),y,C):A(l,y)))};process.env.NODE_ENV!=="production"&&(QS.displayName="Ellipsis");const X6=QS,JS=e=>{let{enabledEllipsis:t,isEllipsis:n,children:r,tooltipProps:i}=e;return!(i!=null&&i.title)||!t?r:P.createElement(yh,Object.assign({open:n?void 0:!1},i),r)};process.env.NODE_ENV!=="production"&&(JS.displayName="EllipsisTooltip");const Z6=JS;var Q6=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{var n,r,i;const{prefixCls:o,className:a,style:s,type:c,disabled:l,children:u,ellipsis:f,editable:p,copyable:d,component:h,title:v}=e,m=Q6(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:_,direction:g}=P.useContext(Ui),[y]=Lj("Text"),b=P.useRef(null),x=P.useRef(null),S=_("typography",o),C=m1(m,["mark","code","delete","underline","strong","keyboard","italic"]),[M,A]=Vp(p),[N,L]=If(!1,{value:A.editing}),{triggerType:B=["icon"]}=A,V=fe=>{var Oe;fe&&((Oe=A.onStart)===null||Oe===void 0||Oe.call(A)),L(fe)};q6(()=>{var fe;N||(fe=x.current)===null||fe===void 0||fe.focus()},[N]);const K=fe=>{fe==null||fe.preventDefault(),V(!0)},Q=fe=>{var Oe;(Oe=A.onChange)===null||Oe===void 0||Oe.call(A,fe),V(!1)},G=()=>{var fe;(fe=A.onCancel)===null||fe===void 0||fe.call(A),V(!1)},[H,q]=Vp(d),[T,E]=P.useState(!1),D=P.useRef(null),k={};q.format&&(k.format=q.format);const I=()=>{D.current&&clearTimeout(D.current)},$=fe=>{var Oe;fe==null||fe.preventDefault(),fe==null||fe.stopPropagation(),C3(q.text||String(u)||"",k),E(!0),I(),D.current=setTimeout(()=>{E(!1)},3e3),(Oe=q.onCopy)===null||Oe===void 0||Oe.call(q,fe)};P.useEffect(()=>I,[]);const[U,ee]=P.useState(!1),[oe,le]=P.useState(!1),[me,_e]=P.useState(!1),[Be,rt]=P.useState(!1),[De,re]=P.useState(!1),[He,Ye]=P.useState(!0),[ke,ue]=Vp(f,{expandable:!1}),Ee=ke&&!me,{rows:pe=1}=ue,we=P.useMemo(()=>!Ee||ue.suffix!==void 0||ue.onEllipsis||ue.expandable||M||H,[Ee,ue,M,H]);on(()=>{ke&&!we&&(ee(Nb("webkitLineClamp")),le(Nb("textOverflow")))},[we,ke]);const Ke=P.useMemo(()=>we?!1:pe===1?oe:U,[we,oe,U]),ct=Ee&&(Ke?De:Be),ye=Ee&&pe===1&&Ke,he=Ee&&pe>1&&Ke,Xe=fe=>{var Oe;_e(!0),(Oe=ue.onExpand)===null||Oe===void 0||Oe.call(ue,fe)},[Tt,zt]=P.useState(0),[en,qn]=P.useState(0),kt=(fe,Oe)=>{let{offsetWidth:vt}=fe;var Re;zt(vt),qn(parseInt((Re=window.getComputedStyle)===null||Re===void 0?void 0:Re.call(window,Oe).fontSize,10)||0)},or=fe=>{var Oe;rt(fe),Be!==fe&&((Oe=ue.onEllipsis)===null||Oe===void 0||Oe.call(ue,fe))};P.useEffect(()=>{const fe=b.current;if(ke&&Ke&&fe){const Oe=he?fe.offsetHeight{const fe=b.current;if(typeof IntersectionObserver>"u"||!fe||!Ke||!Ee)return;const Oe=new IntersectionObserver(()=>{Ye(!!fe.offsetParent)});return Oe.observe(fe),()=>{Oe.disconnect()}},[Ke,Ee]);let Vt={};ue.tooltip===!0?Vt={title:(n=A.text)!==null&&n!==void 0?n:u}:P.isValidElement(ue.tooltip)?Vt={title:ue.tooltip}:typeof ue.tooltip=="object"?Vt=Object.assign({title:(r=A.text)!==null&&r!==void 0?r:u},ue.tooltip):Vt={title:ue.tooltip};const tn=P.useMemo(()=>{const fe=Oe=>["string","number"].includes(typeof Oe);if(!(!ke||Ke)){if(fe(A.text))return A.text;if(fe(u))return u;if(fe(v))return v;if(fe(Vt.title))return Vt.title}},[ke,Ke,v,Vt.title,ct]);if(N)return P.createElement(V6,{value:(i=A.text)!==null&&i!==void 0?i:typeof u=="string"?u:"",onSave:Q,onCancel:G,onEnd:A.onEnd,prefixCls:S,className:a,style:s,direction:g,component:h,maxLength:A.maxLength,autoSize:A.autoSize,enterIcon:A.enterIcon});const Lt=()=>{const{expandable:fe,symbol:Oe}=ue;if(!fe)return null;let vt;return Oe?vt=Oe:vt=y==null?void 0:y.expand,P.createElement("a",{key:"expand",className:`${S}-expand`,onClick:Xe,"aria-label":y==null?void 0:y.expand},vt)},En=()=>{if(!M)return;const{icon:fe,tooltip:Oe}=A,vt=za(Oe)[0]||(y==null?void 0:y.edit),Re=typeof vt=="string"?vt:"";return B.includes("icon")?P.createElement(yh,{key:"edit",title:Oe===!1?"":vt},P.createElement(kb,{ref:x,className:`${S}-edit`,onClick:K,"aria-label":Re},fe||P.createElement(y3,{role:"button"}))):null},Yn=()=>{if(!H)return;const{tooltips:fe,icon:Oe}=q,vt=eE(fe),Re=eE(Oe),Me=T?Ol(vt[1],y==null?void 0:y.copied):Ol(vt[0],y==null?void 0:y.copy),Rt=T?y==null?void 0:y.copied:y==null?void 0:y.copy,wt=typeof Me=="string"?Me:Rt;return P.createElement(yh,{key:"copy",title:Me},P.createElement(kb,{className:gt(`${S}-copy`,T&&`${S}-copy-success`),onClick:$,"aria-label":wt},T?Ol(Re[1],P.createElement(p3,null),!0):Ol(Re[0],P.createElement(v3,null),!0)))},Ot=fe=>[fe&&Lt(),En(),Yn()],Bt=fe=>[fe&&P.createElement("span",{"aria-hidden":!0,key:"ellipsis"},e4),ue.suffix,Ot(fe)];return P.createElement(cs,{onResize:kt,disabled:!Ee||Ke},fe=>P.createElement(Z6,{tooltipProps:Vt,enabledEllipsis:Ee,isEllipsis:ct},P.createElement(U6,Object.assign({className:gt({[`${S}-${c}`]:c,[`${S}-disabled`]:l,[`${S}-ellipsis`]:ke,[`${S}-single-line`]:Ee&&pe===1,[`${S}-ellipsis-single-line`]:ye,[`${S}-ellipsis-multiple-line`]:he},a),prefixCls:o,style:Object.assign(Object.assign({},s),{WebkitLineClamp:he?pe:void 0}),component:h,ref:$c(fe,b,t),direction:g,onClick:B.includes("text")?K:void 0,"aria-label":tn==null?void 0:tn.toString(),title:v},C),P.createElement(X6,{enabledMeasure:Ee&&!Ke,text:u,rows:pe,width:Tt,fontSize:en,onEllipsis:or},(Oe,vt)=>{let Re=Oe;return Oe.length&&vt&&tn&&(Re=P.createElement("span",{key:"show-content","aria-hidden":!0},Re)),J6(e,P.createElement(P.Fragment,null,Re,Bt(vt)))}))))}),Im=t4;var n4=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{const{level:n=1}=e,r=n4(e,["level"]);let i;if(process.env.NODE_ENV!=="production"){const o=ua("Typography.Title");process.env.NODE_ENV!=="production"&&o(tE.includes(n),"usage","Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version.")}return tE.includes(n)?i=`h${n}`:i="h1",P.createElement(Im,Object.assign({ref:t},r,{component:i}))}),i4=r4;var o4=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{var{ellipsis:n}=e,r=o4(e,["ellipsis"]);const i=P.useMemo(()=>n&&typeof n=="object"?m1(n,["expandable","rows"]):n,[n]);if(process.env.NODE_ENV!=="production"){const o=ua("Typography.Text");process.env.NODE_ENV!=="production"&&o(typeof n!="object"||!n||!("expandable"in n)&&!("rows"in n),"usage","`ellipsis` do not support `expandable` or `rows` props.")}return P.createElement(Im,Object.assign({ref:t},r,{ellipsis:i,component:"span"}))},nE=P.forwardRef(a4);var s4=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i{var{ellipsis:n,rel:r}=e,i=s4(e,["ellipsis","rel"]);if(process.env.NODE_ENV!=="production"){const a=ua("Typography.Link");process.env.NODE_ENV!=="production"&&a(typeof n!="object","usage","`ellipsis` only supports boolean value.")}const o=Object.assign(Object.assign({},i),{rel:r===void 0&&i.target==="_blank"?"noopener noreferrer":r});return delete o.navigate,P.createElement(Im,Object.assign({},o,{ref:t,ellipsis:!!n,component:"a"}))}),rE=c4,l4=({modeler:e,defaultElement:t,attrPrefix:n="flowable:",config:r})=>{var D,k;const i=e.get("modeling"),[o,a]=J.useState(t),[s,c]=J.useState(o==null?void 0:o.businessObject.id),[l,u]=J.useState(o==null?void 0:o.businessObject.name),[f,p]=J.useState(o==null?void 0:o.businessObject.conditionExpression),[d,h]=J.useState(),[v,m]=J.useState(),[_,g]=J.useState(),[y,b]=J.useState("张三"),[x,S]=J.useState([]),[C,M]=J.useState([]);J.useEffect(()=>{r.onLoad(r.deptDataUrl,M)},[]);const[A,N]=J.useState(!1),[L,B]=J.useState(!1),[V,K]=J.useState(!1),Q=J.useRef(),G=J.useRef(!1);function H(I){var le,me;console.log("changeCurrentElement: ",I),a(I);const $=I.businessObject;Q.current=$,c($.id),u($.name);let U=$.$attrs[n+"actions"];U?(typeof U=="string"&&(U=U.split(",")),h(U)):h([]);const ee=$.$attrs[n+"assignee"];g(ee||void 0);const oe=$.$attrs[n+"assignees"];if(oe){const _e=JSON.parse(oe);g(_e)}else g(void 0);(le=I.businessObject)!=null&&le.$type.endsWith("UserTask")?N(!0):N(!1),I.businessObject.loopCharacteristics&&I.businessObject.loopCharacteristics.$type!="bpmn:StandardLoopCharacteristics"?B(!0):B(!1),$.$type.endsWith("SequenceFlow")?(K(!0),p((me=$.conditionExpression)==null?void 0:me.body)):K(!1)}J.useEffect(()=>{const I=e.get("eventBus"),$=ee=>{console.log("element.click",ee.element),H(ee.element)};I.on("element.click",$);const U=ee=>{var oe;if(console.log("changed: ",ee),!G.current){if((oe=ee.element.businessObject)!=null&&oe.$type.endsWith("SequenceFlow"))return;H(ee.element)}};return I.on("element.changed",U),()=>{I.off("element.click",$),I.off("element.changed",U)}},[]);function q(I,$,U=!1){if(Q.current&&o)try{G.current=!0,U?o.businessObject.$attrs[n+I]=$:i.updateProperties(o,{[I]:$})}finally{G.current=!1}}J.useEffect(()=>{q("id",s)},[s]),J.useEffect(()=>{q("name",l)},[l]),J.useEffect(()=>{q(n+"assignee",_)},[_]),J.useEffect(()=>{const I=JSON.stringify(x);q(n+"assignees",I)},[x]),J.useEffect(()=>{q("actions",d,!0)},[d]),J.useEffect(()=>{if(f){const $=e.get("bpmnFactory").create("bpmn:FormalExpression");$.body=f,q("conditionExpression",$)}else q("conditionExpression",void 0)},[f]),J.useEffect(()=>{const $=e.get("bpmnFactory").create("bpmn:Expression");$.body=v;const U=o.businessObject.loopCharacteristics;U&&($.$parent=U,U.completionCondition=$),q("loopCharacteristics",U)},[v]);function T(I){r.onChooseAssignee&&r.onChooseAssignee(($,U)=>{switch(I){case"multi":S(x.concat({id:$,nickName:U}));break;case"single":g($),b(U)}})}function E(I){S(x.filter($=>$.id!=I))}return Y.jsxs(Y.Fragment,{children:[Y.jsxs("div",{className:Md.toolbar,children:["当前对象:",(D=o==null?void 0:o.businessObject)==null?void 0:D.$type]}),Y.jsxs("div",{style:{height:"600px",border:"1px solid #eee",padding:"10px"},children:[Y.jsxs(se.Row,{style:{margin:"10px 0"},children:[Y.jsx(se.Col,{span:4,style:{textAlign:"right",lineHeight:"30px"},children:"ID:"}),Y.jsx(se.Col,{span:20,children:Y.jsx(se.Input,{value:s,onChange:I=>c(I.target.value)})})]}),Y.jsxs(se.Row,{style:{margin:"10px 0"},children:[Y.jsx(se.Col,{span:4,style:{textAlign:"right",lineHeight:"30px"},children:"名称:"}),Y.jsx(se.Col,{span:20,children:Y.jsx(se.Input,{value:l,onChange:I=>u(I.target.value)})})]}),V&&Y.jsxs(se.Row,{style:{margin:"10px 0"},children:[Y.jsx(se.Col,{span:4,style:{textAlign:"right",lineHeight:"30px"},children:"条件:"}),Y.jsxs(se.Col,{span:20,children:[Y.jsx(Au,{rows:2,value:f,onChange:I=>p(I.target.value)}),Y.jsxs(nE,{type:"secondary",children:["流转条件表达式,请参考:",Y.jsx(rE,{onClick:()=>{alert("here")},children:"这里"}),"。"]})]})]}),A&&Y.jsxs(Y.Fragment,{children:[Y.jsxs(se.Row,{style:{margin:"10px 0"},children:[Y.jsx(se.Col,{span:4,style:{textAlign:"right",lineHeight:"30px"},children:"操作:"}),Y.jsx(se.Col,{span:20,children:Y.jsx(se.Checkbox.Group,{onChange:I=>{h(I)},value:d,children:Y.jsxs(se.Row,{children:[Y.jsx(se.Col,{span:8,children:Y.jsx(se.Checkbox,{value:"agree",style:{lineHeight:"22px"},children:"同意"})}),Y.jsx(se.Col,{span:8,children:Y.jsx(se.Checkbox,{value:"refuse",style:{lineHeight:"22px"},disabled:!0,children:"拒绝"})}),Y.jsx(se.Col,{span:8,children:Y.jsx(se.Checkbox,{value:"rebut",style:{lineHeight:"22px"},children:"驳回"})}),Y.jsx(se.Col,{span:8,children:Y.jsx(se.Checkbox,{value:"transfer",style:{lineHeight:"22px"},children:"转办"})}),Y.jsx(se.Col,{span:8,children:Y.jsx(se.Checkbox,{value:"assign",style:{lineHeight:"22px"},children:"委派"})}),Y.jsx(se.Col,{span:8,children:Y.jsx(se.Checkbox,{value:"stop",style:{lineHeight:"22px"},children:"终止"})}),Y.jsx(se.Col,{span:8,children:Y.jsx(se.Checkbox,{value:"recall",style:{lineHeight:"22px"},children:"撤回"})}),Y.jsx(se.Col,{span:8,children:Y.jsx(se.Checkbox,{value:"retract",style:{lineHeight:"22px"},children:"撤销"})})]})})})]}),!L&&Y.jsxs(Y.Fragment,{children:[Y.jsxs(se.Row,{style:{margin:"10px 0"},children:[Y.jsx(se.Col,{span:4,style:{textAlign:"right",lineHeight:"30px"},children:"人员:"}),Y.jsx(se.Col,{span:20,children:Y.jsx(se.Input,{addonAfter:Y.jsx(qf.UserAddOutlined,{onClick:()=>T("single")}),value:y,readOnly:!0})})]}),Y.jsxs(se.Row,{style:{margin:"10px 0"},children:[Y.jsx(se.Col,{span:4,style:{textAlign:"right",lineHeight:"30px"},children:"部门:"}),Y.jsx(se.Col,{span:20,children:Y.jsx(se.Select,{placeholder:"请选择部门",allowClear:!0,style:{width:"100%"},options:C})})]})]})]}),L&&Y.jsxs(Y.Fragment,{children:[Y.jsx("div",{children:Y.jsxs(i4,{level:5,children:["多实例 (",(k=o.businessObject.loopCharacteristics)!=null&&k.isSequential?"串行":"并行",")"]})}),Y.jsxs(se.Row,{style:{margin:"10px 0"},children:[Y.jsx(se.Col,{span:4,style:{textAlign:"right",lineHeight:"30px"},children:"人员:"}),Y.jsx(se.Col,{span:20,children:Y.jsxs(se.Row,{gutter:[4,4],children:[x&&x.map(I=>Y.jsx(se.Col,{span:4,children:Y.jsx("a",{onClick:()=>{E(I.id)},children:Y.jsx(se.Badge,{count:"-",size:"small",children:Y.jsx(se.Avatar,{style:{backgroundColor:"#4c80e7"},icon:Y.jsx(qf.UserOutlined,{})})})})})),Y.jsx(se.Col,{span:4,children:Y.jsx(se.Button,{type:"dashed",shape:"circle",icon:Y.jsx(qf.PlusOutlined,{}),onClick:()=>T("multi")})})]})})]}),Y.jsxs(se.Row,{style:{margin:"10px 0"},children:[Y.jsx(se.Col,{span:4,style:{textAlign:"right",lineHeight:"30px"},children:"完成:"}),Y.jsxs(se.Col,{span:20,children:[Y.jsx(Au,{rows:3,value:v,onChange:I=>m(I.target.value)}),Y.jsxs(nE,{type:"secondary",children:["完成条件表达式,请参考:",Y.jsx(rE,{onClick:()=>{alert("here")},children:"这里"}),"。"]})]})]})]})]})]})};var u4={"Activate the global connect tool":"启动全局连接工具","Append {type}":"追加 {type}","Add Lane above":"添加到通道之上","Divide into two Lanes":"分成两条通道","Divide into three Lanes":"分成三条通道","Add Lane below":"添加到通道之下","Append compensation activity":"追加补偿活动","Append EndEvent":"追加结束事件","Append Gateway":"追加网关","Append Task":"追加Task","Append Intermediate/Boundary Event":"追加中间/边界事件",TextAnnotation:"文本注释","Change type":"更改类型","Connect using Association":"文本关联","Connect using Sequence/MessageFlow or Association":"消息关联","Connect using DataInputAssociation":"数据关联",Remove:"移除","Activate the hand tool":"激活抓手工具","Activate the lasso tool":"激活套索工具","Activate the create/remove space tool":"激活创建/删除空间工具","Create StartEvent":"创建开始事件","Create EndEvent":"创建结束事件","Create expanded SubProcess":"创建可折叠子流程","Create IntermediateThrowEvent/BoundaryEvent":"创建中间抛出/边界事件","Create Pool/Participant":"创建池/参与者","Create Task":"创建Task","Create DataObjectReference":"创建数据对象引用","Parallel Multi Instance":"并行多实例","Sequential Multi Instance":"串行多实例",DataObjectReference:"数据对象参考",DataStoreReference:"数据存储参考",Loop:"循环","Ad-hoc":"Ad-hoc子流程","Create {type}":"创建 {type}",Task:"任务","Send Task":"发送任务","Receive Task":"接收任务","User Task":"用户任务","Manual Task":"手动任务","Business Rule Task":"业务规则任务","Service Task":"服务任务","Script Task":"脚本任务","Call Activity":"引用流程","Sub Process (collapsed)":"可折叠子流程","Sub Process (expanded)":"可展开子流程","Start Event":"开始事件",StartEvent:"开始事件","Intermediate Throw Event":"中间抛出事件","End Event":"结束事件",EndEvent:"结束事件","Create Gateway":"创建网关","Create Intermediate/Boundary Event":"创建中间/边界事件","Message Start Event":"消息启动事件","Timer Start Event":"定时启动事件","Conditional Start Event":"条件启动事件","Signal Start Event":"信号启动事件","Error Start Event":"错误启动事件","Escalation Start Event":"升级启动事件","Compensation Start Event":"补偿启动事件","Message Start Event (non-interrupting)":"消息启动事件(非中断)","Timer Start Event (non-interrupting)":"定时启动事件(非中断)","Conditional Start Event (non-interrupting)":"条件启动事件(非中断)","Signal Start Event (non-interrupting)":"信号启动事件(非中断)","Escalation Start Event (non-interrupting)":"升级启动事件(非中断)","Message Intermediate Catch Event":"中间消息捕获事件","Message Intermediate Throw Event":"中间消息抛出事件","Timer Intermediate Catch Event":"中间定时捕获事件","Escalation Intermediate Throw Event":"中间升级抛出事件","Conditional Intermediate Catch Event":"中间条件捕获事件","Link Intermediate Catch Event":"中间链接捕获事件","Link Intermediate Throw Event":"中间链接抛出事件","Compensation Intermediate Throw Event":"中间补偿抛出事件","Signal Intermediate Catch Event":"中间信号捕获事件","Signal Intermediate Throw Event":"中间信号抛出事件","Message End Event":"结束消息事件","Escalation End Event":"结束升级事件","Error End Event":"结束错误事件","Cancel End Event":"结束取消事件","Compensation End Event":"结束补偿事件","Signal End Event":"结束信号事件","Terminate End Event":"终止边界事件","Message Boundary Event":"消息边界事件","Message Boundary Event (non-interrupting)":"消息边界事件(非中断)","Timer Boundary Event":"定时边界事件","Timer Boundary Event (non-interrupting)":"定时边界事件(非中断)","Escalation Boundary Event":"升级边界事件","Escalation Boundary Event (non-interrupting)":"升级边界事件(非中断)","Conditional Boundary Event":"条件边界事件","Conditional Boundary Event (non-interrupting)":"条件边界事件(非中断)","Error Boundary Event":"错误边界事件","Cancel Boundary Event":"取消边界事件","Signal Boundary Event":"信号边界事件","Signal Boundary Event (non-interrupting)":"信号边界事件(非中断)","Compensation Boundary Event":"补偿边界事件","Exclusive Gateway":"独占网关","Parallel Gateway":"并行网关","Inclusive Gateway":"包容网关","Complex Gateway":"复杂网关","Event based Gateway":"事件网关",Transaction:"事务","Sub Process":"子流程","Event Sub Process":"事件子流程","Collapsed Pool":"折叠池","Expanded Pool":"展开池","no parent for {element} in {parent}":"在 {element} 中没有父元素 {parent}","no shape type specified":"未指定形状类型","flow elements must be children of pools/participants":"流元素必须是池/参与者的子级","out of bounds release":"越界释放","more than {count} child lanes":"超过 {count} 条通道 ","element required":"需要元素","diagram not part of bpmn:Definitions":"流程图不符合bpmn规范","no diagram to display":"没有要显示的图表","no process or collaboration to display":"没有可显示的流程或协作","element {element} referenced by {referenced}#{property} not yet drawn":"元素 {element} 的引用 {referenced}#{property} 尚未绘制","already rendered {element}":"{element} 已呈现","failed to import {element}":"{element} 导入失败",Id:"id",Name:"name",General:"常规",Details:"详情","Message Name":"消息名称",Message:"消息",Initiator:"创建者","Asynchronous Continuations":"持续异步","Asynchronous Before":"异步前","Asynchronous After":"异步后","Job Configuration":"工作配置",Exclusive:"排除","Job Priority":"工作优先级","Retry Time Cycle":"重试时间周期",Documentation:"文档","Element Documentation":"元素文档","History Configuration":"历史配置","History Time To Live":"历史的生存时间",Forms:"表单","Form Key":"表单key","Form Fields":"表单字段集","Business Key":"业务key","Form Field":"表单字段",ID:"ID",Type:"Type",Label:"Label","Default Value":"默认值",Validation:"校验","Add Constraint":"添加约束",Config:"配置",Properties:"属性","Add Property":"添加属性",Value:"Value",Listeners:"监听器","Execution Listener":"执行监听","Event Type":"事件类型","Listener Type":"监听器类型","Java Class":"Java类",Expression:"表达式","Must provide a value":"必须提供一个值","Delegate Expression":"代理表达式",Script:"脚本","Script Format":"脚本格式","Script Type":"脚本类型","Inline Script":"内联脚本","External Script":"外部脚本",Resource:"资源","Field Injection":"字段注入",Extensions:"扩展","Input/Output":"输入/输出","Input Parameters":"输入参数","Output Parameters":"输出参数",Parameters:"参数","Output Parameter":"输出参数","Timer Definition Type":"定时器定义类型","Timer Definition":"定时器定义",Date:"日期",Duration:"持续",Cycle:"循环",Signal:"信号","Signal Name":"信号名称",Escalation:"升级",Error:"错误","Link Name":"链接名称",Condition:"条件名称","Variable Name":"变量名称","Variable Event":"变量事件","Specify more than one variable change event as a comma separated list.":"多个变量事件以逗号隔开","Wait for Completion":"等待完成","Activity Ref":"活动参考","Version Tag":"版本标签",Executable:"可被执行","External Task Configuration":"外部任务配置","Task Priority":"任务优先级",External:"外部",Connector:"连接器","Must configure Connector":"必须配置连接器","Connector Id":"连接器Id",Implementation:"实现方式","Field Injections":"字段注入",Fields:"字段","Result Variable":"结果变量",Topic:"主题","Configure Connector":"配置连接器","Input Parameter":"输入参数",Assignee:"代理人","Candidate Users":"候选用户","Candidate Groups":"候选组","Due Date":"到期时间","Follow Up Date":"跟踪日期",Priority:"优先级","The follow up date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)":"跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00","The due date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)":"跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00",Variables:"变量","Specify more than one user as a comma separated list.":"指定多个用户作为逗号分隔列表","Create Group":"创建组","Create DataStoreReference":"创建数据存储引用","Create UserTask":"创建用户任务","Append UserTask":"追加用户任务","Append TextAnnotation":"追加文本批注","Default Flow":"默认顺序流","Sequence Flow":"顺序流","Conditional Flow":"条件顺序流","Change element":"切换节点","Open minimap":"打开小地图","Close minimap":"关闭小地图"};function f4(e,t){return t=t||{},e=u4[e]||e,e.replace(/{([^}]+)}/g,function(n,r){return t[r]||"{"+r+"}"})}const p4={translate:["value",f4]};class eC extends Pf{constructor(n,r,i,o,a,s,c,l){super(n,r,i,o,a,s,c,l);$t(this,"_palette");$t(this,"_create");$t(this,"_elementFactory");$t(this,"_spaceTool");$t(this,"_lassoTool");$t(this,"_handTool");$t(this,"_globalConnect");$t(this,"_translate");this._palette=n,this._create=r,this._elementFactory=i,this._spaceTool=o,this._lassoTool=a,this._handTool=s,this._globalConnect=c,this._translate=l}getPaletteEntries(){const n={},r=this._create,i=this._elementFactory,o=this._spaceTool,a=this._lassoTool,s=this._handTool,c=this._globalConnect,l=this._translate;function u(d,h,v,m,_){function g(b){const x=i.createShape(W({type:d},_));if(_){const S=at(x);S.isExpanded=_.isExpanded}r.start(b,x,null)}const y=d.replace(/^bpmn:/,"");return{group:h,className:v,title:m||l("Create {type}",{type:y}),action:{dragstart:g,click:g}}}function f(d){const h=i.createShape({type:"bpmn:SubProcess",x:0,y:0,isExpanded:!0}),v=i.createShape({type:"bpmn:StartEvent",x:40,y:82,parent:h});r.start(d,[h,v],{hints:{autoSelect:[h]}})}function p(d){r.start(d,i.createParticipantShape(),null)}return W(n,{"hand-tool":{group:"tools",className:"bpmn-icon-hand-tool",title:l("Activate the hand tool"),action:{click:function(d){s.activateHand(d,null,null)}}},"lasso-tool":{group:"tools",className:"bpmn-icon-lasso-tool",title:l("Activate the lasso tool"),action:{click:function(d){a.activateSelection(d,null)}}},"space-tool":{group:"tools",className:"bpmn-icon-space-tool",title:l("Activate the create/remove space tool"),action:{click:function(d){o.activateSelection(d,!1,!1)}}},"global-connect-tool":{group:"tools",className:"bpmn-icon-connection-multi",title:l("Activate the global connect tool"),action:{click:function(d){c.start(d,null)}}},"tool-separator":{group:"tools",separator:!0},"create.start-event":u("bpmn:StartEvent","event","bpmn-icon-start-event-none",l("Create StartEvent")),"create.intermediate-event":u("bpmn:IntermediateThrowEvent","event","bpmn-icon-intermediate-event-none",l("Create Intermediate/Boundary Event")),"create.end-event":u("bpmn:EndEvent","event","bpmn-icon-end-event-none",l("Create EndEvent")),"create.exclusive-gateway":u("bpmn:ExclusiveGateway","gateway","bpmn-icon-gateway-none",l("Create Gateway")),"create.user-task":u("bpmn:UserTask","activity","bpmn-icon-user-task",l("Create UserTask")),"create.data-object":u("bpmn:DataObjectReference","data-object","bpmn-icon-data-object",l("Create DataObjectReference")),"create.data-store":u("bpmn:DataStoreReference","data-store","bpmn-icon-data-store",l("Create DataStoreReference")),"create.subprocess-expanded":{group:"activity",className:"bpmn-icon-subprocess-expanded",title:l("Create expanded SubProcess"),action:{dragstart:f,click:f}},"create.participant-expanded":{group:"collaboration",className:"bpmn-icon-participant",title:l("Create Pool/Participant"),action:{dragstart:p,click:p}},"create.group":u("bpmn:Group","artifact","bpmn-icon-group",l("Create Group"))}),n}}$t(eC,"$inject",["palette","create","elementFactory","spaceTool","lassoTool","handTool","globalConnect","translate"]);const d4={paletteProvider:["type",eC]};class tC extends rs{constructor(n,r,i,o,a,s,c,l,u,f,p,d){super(n,r,i,o,a,s,c,l,u,f,p,d);$t(this,"_config");$t(this,"_injector");$t(this,"_eventBus");$t(this,"_contextPad");$t(this,"_modeling");$t(this,"_elementFactory");$t(this,"_connect");$t(this,"_create");$t(this,"_popupMenu");$t(this,"_canvas");$t(this,"_rules");$t(this,"_translate");$t(this,"_autoPlace");this._config=n,this._injector=r,this._eventBus=i,this._contextPad=o,this._modeling=a,this._elementFactory=s,this._connect=c,this._create=l,this._popupMenu=u,this._canvas=f,this._rules=p,this._translate=d,n.autoPlace!==!1&&(this._autoPlace=r.get("autoPlace",!1)),i.on("create.end",250,function(h){const v=h.context,m=v.shape;if(!Ko(h)||!o.isOpen(m))return;const _=o.getEntries(m);_.replace&&_.replace.action.click(h,m)})}isEventType(n,r,i){const o=n.$instanceOf(r);let a=!1;const s=n.eventDefinitions||[];return z(s,function(c){c.$type===i&&(a=!0)}),o&&a}getContextPadEntries(n){const r=this._contextPad,i=this._modeling,o=this._elementFactory,a=this._connect,s=this._create,c=this._popupMenu,l=this._rules,u=this._autoPlace,f=this._translate,p={};if(n.type==="label")return p;const d=n.businessObject;function h(b,x){a.start(b,x)}function v(b,x){i.removeElements([x])}function m(b){const C=r.getPad(b).html.getBoundingClientRect();return{x:C.left,y:C.bottom+5}}function _(b,x,S,C){typeof S!="string"&&(C=S,S=f("Append {type}",{type:b.replace(/^bpmn:/,"")}));function M(N,L){const B=o.createShape(W({type:b},C));s.start(N,B,{source:L})}return{group:"model",className:x,title:S,action:{dragstart:M,click:u?function(N,L){const B=o.createShape(W({type:b},C));u.append(L,B)}:M}}}function g(b){return function(x,S){i.splitLane(S,b),r.open(S,!0)}}if(Qe(d,["bpmn:Lane","bpmn:Participant"])&&ot(n)){const b=mo(n);W(p,{"lane-insert-above":{group:"lane-insert-above",className:"bpmn-icon-lane-insert-above",title:f("Add Lane above"),action:{click:function(x,S){i.addLane(S,"top")}}}}),b.length<2&&(n.height>=120&&W(p,{"lane-divide-two":{group:"lane-divide",className:"bpmn-icon-lane-divide-two",title:f("Divide into two Lanes"),action:{click:g(2)}}}),n.height>=180&&W(p,{"lane-divide-three":{group:"lane-divide",className:"bpmn-icon-lane-divide-three",title:f("Divide into three Lanes"),action:{click:g(3)}}})),W(p,{"lane-insert-below":{group:"lane-insert-below",className:"bpmn-icon-lane-insert-below",title:f("Add Lane below"),action:{click:function(x,S){i.addLane(S,"bottom")}}}})}w(d,"bpmn:FlowNode")&&(w(d,"bpmn:EventBasedGateway")?W(p,{"append.receive-task":_("bpmn:ReceiveTask","bpmn-icon-receive-task",f("Append ReceiveTask")),"append.message-intermediate-event":_("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-message",f("Append MessageIntermediateCatchEvent"),{eventDefinitionType:"bpmn:MessageEventDefinition"}),"append.timer-intermediate-event":_("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-timer",f("Append TimerIntermediateCatchEvent"),{eventDefinitionType:"bpmn:TimerEventDefinition"}),"append.condition-intermediate-event":_("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-condition",f("Append ConditionIntermediateCatchEvent"),{eventDefinitionType:"bpmn:ConditionalEventDefinition"}),"append.signal-intermediate-event":_("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-signal",f("Append SignalIntermediateCatchEvent"),{eventDefinitionType:"bpmn:SignalEventDefinition"})}):this.isEventType(d,"bpmn:BoundaryEvent","bpmn:CompensateEventDefinition")?W(p,{"append.compensation-activity":_("bpmn:Task","bpmn-icon-task",f("Append compensation activity"),{isForCompensation:!0})}):!w(d,"bpmn:EndEvent")&&!d.isForCompensation&&!this.isEventType(d,"bpmn:IntermediateThrowEvent","bpmn:LinkEventDefinition")&&!er(d)&&W(p,{"append.end-event":_("bpmn:EndEvent","bpmn-icon-end-event-none",f("Append EndEvent")),"append.gateway":_("bpmn:ExclusiveGateway","bpmn-icon-gateway-none",f("Append Gateway")),"append.append-user-task":_("bpmn:UserTask","bpmn-icon-user-task",f("Append UserTask")),"append.intermediate-event":_("bpmn:IntermediateThrowEvent","bpmn-icon-intermediate-event-none",f("Append Intermediate/Boundary Event"))})),c.isEmpty(n,"bpmn-replace")||W(p,{replace:{group:"edit",className:"bpmn-icon-screw-wrench",title:f("Change type"),action:{click:function(b,x){const S=W(m(x),{cursor:{x:b.x,y:b.y}});c.open(x,"bpmn-replace",S,{title:f("Change element"),width:300,search:!0})}}}}),w(d,"bpmn:SequenceFlow")&&W(p,{"append.text-annotation":_("bpmn:TextAnnotation","bpmn-icon-text-annotation",f("Append TextAnnotation"))}),Qe(d,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference"])&&W(p,{"append.text-annotation":_("bpmn:TextAnnotation","bpmn-icon-text-annotation",f("Append TextAnnotation")),connect:{group:"connect",className:"bpmn-icon-connection-multi",title:f("Connect using "+(d.isForCompensation?"":"Sequence/MessageFlow or ")+"Association"),action:{click:h,dragstart:h}}}),w(d,"bpmn:TextAnnotation")&&W(p,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:f("Connect using Association"),action:{click:h,dragstart:h}}}),Qe(d,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&W(p,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:f("Connect using DataInputAssociation"),action:{click:h,dragstart:h}}}),w(d,"bpmn:Group")&&W(p,{"append.text-annotation":_("bpmn:TextAnnotation","bpmn-icon-text-annotation",f("Append TextAnnotation"))});let y=l.allowed("elements.delete",{elements:[n]});return qe(y)&&(y=y[0]===n),y&&W(p,{delete:{group:"edit",className:"bpmn-icon-trash",title:f("Remove"),action:{click:v}}}),p}}$t(tC,"$inject",["config","injector","eventBus","contextPad","modeling","elementFactory","connect","create","popupMenu","canvas","rules","translate"]);const h4={contextPadProvider:["type",tC]};var Ml=50,iE={min:.2,max:4},v4=10,m4=.1,g4=250;function Gn(e,t,n,r,i){var o=this;this._canvas=r,this._elementRegistry=i,this._eventBus=n,this._injector=t,this._state={isOpen:void 0,isDragging:!1,initialDragPosition:null,offsetViewport:null,cachedViewbox:null,dragger:null,svgClientRect:null,parentClientRect:null,zoomDelta:0},this._init();var a=new Qn.Manager(document);a.add(new Qn.Pan),a.on("panmove",f),a.on("panend",p);var s=new Qn.Manager(this._svg);s.add(new Qn.Pan),s.on("panstart",u(!0)),s.add(new Qn.Tap),s.on("tap",function(d){l(Nl(d))});var c=new Qn.Manager(this._viewportDom);c.add(new Qn.Pan),c.on("panstart",u(!1)),this.toggle(e&&e.open||!1);function l(d){(!o._state._svgClientRect||Il(o._state._svgClientRect))&&(o._state._svgClientRect=o._svg.getBoundingClientRect());var h=Dl({x:d.x-o._state._svgClientRect.left,y:d.y-o._state._svgClientRect.top},o._svg,o._lastViewbox);qp(h,o._canvas),o._update()}function u(d){return function(v){var m=Nl(v);(!o._state._svgClientRect||Il(o._state._svgClientRect))&&(o._state._svgClientRect=o._svg.getBoundingClientRect()),d&&l(m);var _=Dl({x:m.x-o._state._svgClientRect.left,y:m.y-o._state._svgClientRect.top},o._svg,o._lastViewbox),g=r.viewbox(),y=b4(_,g),b=o._viewportDom.getBoundingClientRect(),x={x:m.x-b.left+1,y:m.y-b.top+1};W(o._state,{cachedViewbox:g,initialDragPosition:{x:m.x,y:m.y},isDragging:!0,offsetViewport:y,offsetViewportDom:x,viewportClientRect:o._viewport.getBoundingClientRect(),parentClientRect:o._parent.getBoundingClientRect()}),Ce.bind(document,"mousemove",f),Ce.bind(document,"mouseup",p)}}function f(d){var h=Nl(d);if(o._state.isDragging){(!o._state._svgClientRect||Il(o._state._svgClientRect))&&(o._state._svgClientRect=o._svg.getBoundingClientRect());var v=o._state.offsetViewportDom,m=o._state.viewportClientRect,_=o._state.parentClientRect;W(o._viewportDom.style,{top:h.y-v.y-_.top+"px",left:h.x-v.x-_.left+"px"});var g=nC(_,{top:h.y-v.y-_.top,left:h.x-v.x-_.left,width:m.width,height:m.height});W(o._overlay.style,{clipPath:g});var y=Dl({x:h.x-o._state._svgClientRect.left,y:h.y-o._state._svgClientRect.top},o._svg,o._lastViewbox);qp({x:y.x-o._state.offsetViewport.x,y:y.y-o._state.offsetViewport.y},o._canvas)}}function p(d){var h=Nl(d);o._state.isDragging&&(o._state.initialDragPosition.x===h.x&&o._state.initialDragPosition.y===h.y&&l(d),o._update(),W(o._state,{cachedViewbox:null,initialDragPosition:null,isDragging:!1,offsetViewport:null,offsetViewportDom:null}),Ce.unbind(document,"mousemove",f),Ce.unbind(document,"mouseup",p))}Ce.bind(this._viewportDom,"mousedown",u(!1)),Ce.bind(this._svg,"mousedown",u(!0)),Ce.bind(this._parent,"wheel",function(d){if(d.preventDefault(),d.stopPropagation(),!!d.ctrlKey&&((!o._state._svgClientRect||Il(o._state._svgClientRect))&&(o._state._svgClientRect=o._svg.getBoundingClientRect()),!!w4(d,o._state._svgClientRect))){var h=d.deltaMode===0?.02:.32,v=Math.sqrt(Math.pow(d.deltaY,2)+Math.pow(d.deltaX,2))*S4(d.deltaY)*-h;if(o._state.zoomDelta+=v,Math.abs(o._state.zoomDelta)>m4){var m=v>0?1:-1,_=Math.log(r.zoom())/Math.log(10),g=C4(iE,v4*2),y=Math.round(_/g)*g;y+=g*m;var b=Math.pow(10,y);r.zoom(T4(iE,b),x),o._state.zoomDelta=0;var x=Dl({x:d.clientX-o._state._svgClientRect.left,y:d.clientY-o._state._svgClientRect.top},o._svg,o._lastViewbox);qp(x,o._canvas),o._update()}}}),Ce.bind(this._toggle,"click",function(d){d.preventDefault(),d.stopPropagation(),o.toggle()}),n.on(["shape.added","connection.added"],function(d){var h=d.element;o._addElement(h),o._update()}),n.on(["shape.removed","connection.removed"],function(d){var h=d.element;o._removeElement(h),o._update()}),n.on("elements.changed",g4,function(d){var h=d.elements;h.forEach(function(v){o._updateElement(v)}),o._update()}),n.on("element.updateId",function(d){var h=d.element,v=d.newId;o._updateElementId(h,v)}),n.on("canvas.viewbox.changed",function(){o._state.isDragging||o._update()}),n.on("canvas.resized",function(){document.body.contains(o._parent)&&(o._state.isDragging||o._update(),o._state._svgClientRect=o._svg.getBoundingClientRect())}),n.on(["root.set","plane.set"],function(d){o._clear();var h=d.element||d.plane.rootElement;h.children.forEach(function(v){o._addElement(v)}),o._update()})}Gn.$inject=["config.minimap","injector","eventBus","canvas","elementRegistry"];Gn.prototype._init=function(){var e=this._canvas,t=e.getContainer(),n=this._parent=document.createElement("div");At(n).add("djs-minimap"),t.appendChild(n);var r=this._toggle=document.createElement("div");At(r).add("toggle"),n.appendChild(r);var i=this._map=document.createElement("div");At(i).add("map"),n.appendChild(i);var o=this._svg=Te("svg");ge(o,{width:"100%",height:"100%"}),Ie(i,o);var a=this._elementsGroup=Te("g");Ie(o,a);var s=this._viewportGroup=Te("g");Ie(o,s);var c=this._viewport=Te("rect");et(c).add("viewport"),Ie(s,c),Ce.bind(n,"mousedown",function(f){f.stopPropagation()});var l=this._viewportDom=document.createElement("div");At(l).add("viewport-dom"),this._parent.appendChild(l);var u=this._overlay=document.createElement("div");At(u).add("overlay"),this._parent.appendChild(u)};Gn.prototype._update=function(){var e=this._canvas.viewbox(),t=e.inner,n=e.outer;if(rC(e)){var r,i,o,a,s=n.width-t.width,c=n.height-t.height;t.width"u"&&(e=!t),e!=t&&(e?this.open():this.close())};Gn.prototype.isOpen=function(){return this._state.isOpen};Gn.prototype._updateElement=function(e){try{e.parent!==void 0&&e.parent!==null&&(this._removeElement(e),this._addElement(e))}catch(t){console.warn("Minimap#_updateElement errored",t)}};Gn.prototype._updateElementId=function(e,t){try{var n=ht("#"+Xo(e.id),this._elementsGroup);n&&(n.id=t)}catch(r){console.warn("Minimap#_updateElementId errored",r)}};Gn.prototype.isOnActivePlane=function(e){var t=this._canvas;return t.findRoot?t.findRoot(e)===t.getRootElement():t.findPlane?t.findPlane(e)===t.getActivePlane():!0};Gn.prototype._addElement=function(e){var t=this;if(this._removeElement(e),!!this.isOnActivePlane(e)){var n,r,i,o=this._createElement(e),a=ht("#"+Xo(e.parent.id),this._elementsGroup);if(o){var s=this._elementRegistry.getGraphics(e),c=this._elementRegistry.getGraphics(e.parent),l=_4(s,c);return l!=="undefined"?a?a.childNodes.length>l?aE(o,a,l):aE(o,a,a.childNodes.length-1):this._elementsGroup.appendChild(o):this._elementsGroup.appendChild(o),y4(e)?(n=e.parent,r=0,i=0,typeof n.x<"u"&&typeof n.y<"u"&&(r=-n.x,i=-n.y),ge(o,{transform:"translate("+r+" "+i+")"})):(r=e.x,i=e.y,a&&(n=e.parent,r-=n.x,i-=n.y),ge(o,{transform:"translate("+r+" "+i+")"})),e.children&&e.children.length&&e.children.forEach(function(u){t._addElement(u)}),o}}};Gn.prototype._removeElement=function(e){var t=this._svg.getElementById(e.id);t&&jt(t)};Gn.prototype._createElement=function(e){var t=this._elementRegistry.getGraphics(e),n;if(t&&(n=zs(t),n)){var r=wh(n);return ge(r,{id:e.id}),r}};Gn.prototype._clear=function(){ic(this._elementsGroup)};function y4(e){return e.waypoints}function b4(e,t){var n={x:t.x+t.width/2,y:t.y+t.height/2};return{x:e.x-n.x,y:e.y-n.y}}function Dl(e,t,n){var r=t.getBoundingClientRect(),i=E4(n,r.width/r.height),o=oE(e.x,0,r.width,i.x,i.x+i.width),a=oE(e.y,0,r.height,i.y,i.y+i.height);return{x:o,y:a}}function qp(e,t){var n=t.viewbox(),r=n.width,i=n.height;t.viewbox({x:e.x-r/2,y:e.y-i/2,width:r,height:i})}function E4(e,t){var n=e.width/e.height,r=W({},{x:e.x,y:e.y,width:e.width,height:e.height});if(n>t){var i=r.width*(1/t),o=r.y-(i-r.height)/2;W(r,{y:o,height:i})}else if(nt.left&&e.xt.top&&e.y=0?1:-1};function C4(e,t){var n=Math.log(e.min)/Math.log(10),r=Math.log(e.max)/Math.log(10),i=Math.abs(n)+Math.abs(r);return i/t}function T4(e,t){return Math.max(e.min,Math.min(e.max,t))}function nC(e,t){var n=[ii(t.left,t.top),ii(t.left+t.width,t.top),ii(t.left+t.width,t.top+t.height),ii(t.left,t.top+t.height),ii(t.left,e.height),ii(e.width,e.height),ii(e.width,0),ii(0,0),ii(0,e.height),ii(t.left,e.height)].join(", ");return"polygon("+n+")"}function ii(e,t){return e+"px "+t+"px"}function rC(e){return Jo(e,function(t){return fn(t)?rC(t):Le(t)&&isFinite(t)})}function Nl(e){return e.center?e.center:{x:e.clientX,y:e.clientY}}var R4={__init__:["minimap"],minimap:["type",Gn]};const P4={name:"Flowable",uri:"http://flowable.org/bpmn",prefix:"flowable",xml:{tagAlias:"lowerCase"},associations:[],types:[{name:"InOutBinding",superClass:["Element"],isAbstract:!0,properties:[{name:"source",isAttr:!0,type:"String"},{name:"sourceExpression",isAttr:!0,type:"String"},{name:"target",isAttr:!0,type:"String"},{name:"businessKey",isAttr:!0,type:"String"},{name:"local",isAttr:!0,type:"Boolean",default:!1},{name:"variables",isAttr:!0,type:"String"}]},{name:"In",superClass:["InOutBinding"],meta:{allowedIn:["bpmn:CallActivity"]}},{name:"Out",superClass:["InOutBinding"],meta:{allowedIn:["bpmn:CallActivity"]}},{name:"AsyncCapable",isAbstract:!0,extends:["bpmn:Activity","bpmn:Gateway","bpmn:Event"],properties:[{name:"async",isAttr:!0,type:"Boolean",default:!1},{name:"asyncBefore",isAttr:!0,type:"Boolean",default:!1},{name:"asyncAfter",isAttr:!0,type:"Boolean",default:!1},{name:"exclusive",isAttr:!0,type:"Boolean",default:!0}]},{name:"JobPriorized",isAbstract:!0,extends:["bpmn:Process","flowable:AsyncCapable"],properties:[{name:"jobPriority",isAttr:!0,type:"String"}]},{name:"SignalEventDefinition",isAbstract:!0,extends:["bpmn:SignalEventDefinition"],properties:[{name:"async",isAttr:!0,type:"Boolean",default:!1}]},{name:"ErrorEventDefinition",isAbstract:!0,extends:["bpmn:ErrorEventDefinition"],properties:[{name:"errorCodeVariable",isAttr:!0,type:"String"},{name:"errorMessageVariable",isAttr:!0,type:"String"}]},{name:"Error",isAbstract:!0,extends:["bpmn:Error"],properties:[{name:"flowable:errorMessage",isAttr:!0,type:"String"}]},{name:"PotentialStarter",superClass:["Element"],properties:[{name:"resourceAssignmentExpression",type:"bpmn:ResourceAssignmentExpression"}]},{name:"FormSupported",isAbstract:!0,extends:["bpmn:StartEvent","bpmn:UserTask"],properties:[{name:"formHandlerClass",isAttr:!0,type:"String"},{name:"formKey",isAttr:!0,type:"String"}]},{name:"TemplateSupported",isAbstract:!0,extends:["bpmn:Process","bpmn:FlowElement"],properties:[{name:"modelerTemplate",isAttr:!0,type:"String"}]},{name:"Initiator",isAbstract:!0,extends:["bpmn:StartEvent"],properties:[{name:"initiator",isAttr:!0,type:"String"}]},{name:"ScriptTask",isAbstract:!0,extends:["bpmn:ScriptTask"],properties:[{name:"resultVariable",isAttr:!0,type:"String"},{name:"resource",isAttr:!0,type:"String"}]},{name:"Process",isAbstract:!0,extends:["bpmn:Process"],properties:[{name:"candidateStarterGroups",isAttr:!0,type:"String"},{name:"candidateStarterUsers",isAttr:!0,type:"String"},{name:"versionTag",isAttr:!0,type:"String"},{name:"historyTimeToLive",isAttr:!0,type:"String"},{name:"isStartableInTasklist",isAttr:!0,type:"Boolean",default:!0}]},{name:"EscalationEventDefinition",isAbstract:!0,extends:["bpmn:EscalationEventDefinition"],properties:[{name:"escalationCodeVariable",isAttr:!0,type:"String"}]},{name:"FormalExpression",isAbstract:!0,extends:["bpmn:FormalExpression"],properties:[{name:"resource",isAttr:!0,type:"String"}]},{name:"Assignable",extends:["bpmn:UserTask"],properties:[{name:"assignee",isAttr:!0,type:"String"},{name:"candidateUsers",isAttr:!0,type:"String"},{name:"candidateGroups",isAttr:!0,type:"String"},{name:"dueDate",isAttr:!0,type:"String"},{name:"followUpDate",isAttr:!0,type:"String"},{name:"priority",isAttr:!0,type:"String"}]},{name:"CallActivity",extends:["bpmn:CallActivity"],properties:[{name:"calledElementBinding",isAttr:!0,type:"String",default:"latest"},{name:"calledElementVersion",isAttr:!0,type:"String"},{name:"calledElementVersionTag",isAttr:!0,type:"String"},{name:"calledElementTenantId",isAttr:!0,type:"String"},{name:"caseRef",isAttr:!0,type:"String"},{name:"caseBinding",isAttr:!0,type:"String",default:"latest"},{name:"caseVersion",isAttr:!0,type:"String"},{name:"caseTenantId",isAttr:!0,type:"String"},{name:"variableMappingClass",isAttr:!0,type:"String"},{name:"variableMappingDelegateExpression",isAttr:!0,type:"String"}]},{name:"ServiceTaskLike",extends:["bpmn:ServiceTask","bpmn:BusinessRuleTask","bpmn:SendTask","bpmn:MessageEventDefinition"],properties:[{name:"expression",isAttr:!0,type:"String"},{name:"class",isAttr:!0,type:"String"},{name:"delegateExpression",isAttr:!0,type:"String"},{name:"resultVariable",isAttr:!0,type:"String"}]},{name:"DmnCapable",extends:["bpmn:BusinessRuleTask"],properties:[{name:"decisionRef",isAttr:!0,type:"String"},{name:"decisionRefBinding",isAttr:!0,type:"String",default:"latest"},{name:"decisionRefVersion",isAttr:!0,type:"String"},{name:"mapDecisionResult",isAttr:!0,type:"String",default:"resultList"},{name:"decisionRefTenantId",isAttr:!0,type:"String"}]},{name:"ExternalCapable",extends:["flowable:ServiceTaskLike"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"topic",isAttr:!0,type:"String"}]},{name:"TaskPriorized",extends:["bpmn:Process","flowable:ExternalCapable"],properties:[{name:"taskPriority",isAttr:!0,type:"String"}]},{name:"Properties",superClass:["Element"],meta:{allowedIn:["*"]},properties:[{name:"values",type:"Property",isMany:!0}]},{name:"Property",superClass:["Element"],properties:[{name:"id",type:"String",isAttr:!0},{name:"name",type:"String",isAttr:!0},{name:"value",type:"String",isAttr:!0}]},{name:"Connector",superClass:["Element"],meta:{allowedIn:["flowable:ServiceTaskLike"]},properties:[{name:"inputOutput",type:"InputOutput"},{name:"connectorId",type:"String"}]},{name:"InputOutput",superClass:["Element"],meta:{allowedIn:["bpmn:FlowNode","flowable:Connector"]},properties:[{name:"inputOutput",type:"InputOutput"},{name:"connectorId",type:"String"},{name:"inputParameters",isMany:!0,type:"InputParameter"},{name:"outputParameters",isMany:!0,type:"OutputParameter"}]},{name:"InputOutputParameter",properties:[{name:"name",isAttr:!0,type:"String"},{name:"value",isBody:!0,type:"String"},{name:"definition",type:"InputOutputParameterDefinition"}]},{name:"InputOutputParameterDefinition",isAbstract:!0},{name:"List",superClass:["InputOutputParameterDefinition"],properties:[{name:"items",isMany:!0,type:"InputOutputParameterDefinition"}]},{name:"Map",superClass:["InputOutputParameterDefinition"],properties:[{name:"entries",isMany:!0,type:"Entry"}]},{name:"Entry",properties:[{name:"key",isAttr:!0,type:"String"},{name:"value",isBody:!0,type:"String"},{name:"definition",type:"InputOutputParameterDefinition"}]},{name:"Value",superClass:["InputOutputParameterDefinition"],properties:[{name:"id",isAttr:!0,type:"String"},{name:"name",isAttr:!0,type:"String"},{name:"value",isBody:!0,type:"String"}]},{name:"Script",superClass:["InputOutputParameterDefinition"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"resource",isAttr:!0,type:"String"},{name:"value",isBody:!0,type:"String"}]},{name:"Field",superClass:["Element"],meta:{allowedIn:["flowable:ServiceTaskLike","flowable:ExecutionListener","flowable:TaskListener"]},properties:[{name:"name",isAttr:!0,type:"String"},{name:"expression",type:"String"},{name:"stringValue",isAttr:!0,type:"String"},{name:"string",type:"String"}]},{name:"InputParameter",superClass:["InputOutputParameter"]},{name:"OutputParameter",superClass:["InputOutputParameter"]},{name:"Collectable",isAbstract:!0,extends:["bpmn:MultiInstanceLoopCharacteristics"],superClass:["flowable:AsyncCapable"],properties:[{name:"collection",isAttr:!0,type:"String"},{name:"elementVariable",isAttr:!0,type:"String"}]},{name:"FailedJobRetryTimeCycle",superClass:["Element"],meta:{allowedIn:["flowable:AsyncCapable","bpmn:MultiInstanceLoopCharacteristics"]},properties:[{name:"body",isBody:!0,type:"String"}]},{name:"ExecutionListener",superClass:["Element"],meta:{allowedIn:["bpmn:Task","bpmn:ServiceTask","bpmn:UserTask","bpmn:BusinessRuleTask","bpmn:ScriptTask","bpmn:ReceiveTask","bpmn:ManualTask","bpmn:ExclusiveGateway","bpmn:SequenceFlow","bpmn:ParallelGateway","bpmn:InclusiveGateway","bpmn:EventBasedGateway","bpmn:StartEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:EndEvent","bpmn:BoundaryEvent","bpmn:CallActivity","bpmn:SubProcess","bpmn:Process"]},properties:[{name:"expression",isAttr:!0,type:"String"},{name:"class",isAttr:!0,type:"String"},{name:"delegateExpression",isAttr:!0,type:"String"},{name:"event",isAttr:!0,type:"String"},{name:"script",type:"Script"},{name:"fields",type:"Field",isMany:!0}]},{name:"TaskListener",superClass:["Element"],meta:{allowedIn:["bpmn:UserTask"]},properties:[{name:"expression",isAttr:!0,type:"String"},{name:"class",isAttr:!0,type:"String"},{name:"delegateExpression",isAttr:!0,type:"String"},{name:"event",isAttr:!0,type:"String"},{name:"script",type:"Script"},{name:"fields",type:"Field",isMany:!0}]},{name:"FormProperty",superClass:["Element"],meta:{allowedIn:["bpmn:StartEvent","bpmn:UserTask"]},properties:[{name:"id",type:"String",isAttr:!0},{name:"name",type:"String",isAttr:!0},{name:"type",type:"String",isAttr:!0},{name:"required",type:"String",isAttr:!0},{name:"readable",type:"String",isAttr:!0},{name:"writable",type:"String",isAttr:!0},{name:"variable",type:"String",isAttr:!0},{name:"expression",type:"String",isAttr:!0},{name:"datePattern",type:"String",isAttr:!0},{name:"default",type:"String",isAttr:!0},{name:"values",type:"Value",isMany:!0}]},{name:"FormData",superClass:["Element"],meta:{allowedIn:["bpmn:StartEvent","bpmn:UserTask"]},properties:[{name:"fields",type:"FormField",isMany:!0},{name:"businessKey",type:"String",isAttr:!0}]},{name:"FormField",superClass:["Element"],properties:[{name:"id",type:"String",isAttr:!0},{name:"label",type:"String",isAttr:!0},{name:"type",type:"String",isAttr:!0},{name:"datePattern",type:"String",isAttr:!0},{name:"defaultValue",type:"String",isAttr:!0},{name:"properties",type:"Properties"},{name:"validation",type:"Validation"},{name:"values",type:"Value",isMany:!0}]},{name:"Validation",superClass:["Element"],properties:[{name:"constraints",type:"Constraint",isMany:!0}]},{name:"Constraint",superClass:["Element"],properties:[{name:"name",type:"String",isAttr:!0},{name:"config",type:"String",isAttr:!0}]},{name:"ConditionalEventDefinition",isAbstract:!0,extends:["bpmn:ConditionalEventDefinition"],properties:[{name:"variableName",isAttr:!0,type:"String"},{name:"variableEvent",isAttr:!0,type:"String"}]}],emumerations:[]},A4=({attrPrefix:e="flowable:",config:t})=>{const[n,r]=J.useState(null),i=J.useRef(null),[o,a]=J.useState(),[s,c]=J.useState(null);return J.useEffect(()=>{if(n&&i.current){const l=new li({container:i.current,additionalModules:[p4,d4,h4,R4],moddleExtensions:{flowable:P4},keyboard:{bindTo:document},bpmnRenderer:{defaultLabelColor:"#000",defaultFillColor:"#eef4ff",defaultStrokeColor:"#349afa"},textRenderer:{defaultStyle:{fontFamily:'"Inter, system-ui, Avenir, Helvetica, Arial, sans-serif"',fontSize:"14px",fontWeight:400,lineHeight:"20px"}}});return l.on("import.done",()=>{const u=l.get("canvas");u.zoom("fit-viewport","auto");const f=u.getRootElement();a(f)}),l.importXML(n).then(()=>{console.log("import xml success!")}).catch(u=>console.log("import xml error: ",u)),c(l),()=>{l&&l.destroy()}}},[n]),J.useEffect(()=>{t.onLoad(t.xmlDataUrl,r)},[]),Y.jsxs(se.Row,{children:[Y.jsxs(se.Col,{span:18,style:{height:"600px"},children:[Y.jsx("div",{className:Md.toolbar,children:s&&Y.jsx(l3,{modeler:s})}),Y.jsx("div",{id:"container",className:Md.container,ref:i,style:{width:"100%",height:"620px"}})]}),Y.jsx(se.Col,{span:6,children:s&&Y.jsx(l4,{attrPrefix:e,config:t,modeler:s,defaultElement:o})})]})};module.exports=A4;