@witlink/components 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/components.js +43578 -0
- package/dist/components.umd.cjs +401 -0
- package/dist/style.css +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
(function(h,Gn){typeof exports=="object"&&typeof module<"u"?module.exports=Gn(require("vue"),require("ant-design-vue"),require("axios")):typeof define=="function"&&define.amd?define(["vue","ant-design-vue","axios"],Gn):(h=typeof globalThis<"u"?globalThis:h||self,h["witlink-components"]=Gn(h.Vue,h.antDesignVue,h.Axios))})(this,function(h,Gn,aP){"use strict";function ie(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}function sP(e,t){return t={exports:{}},e(t,t.exports),t.exports}var lP=sP(function(e){var t=e.exports=function(n,r){if(r||(r=16),n===void 0&&(n=128),n<=0)return"0";for(var i=Math.log(Math.pow(2,n))/Math.log(r),o=2;i===1/0;o*=2)i=Math.log(Math.pow(2,n/o))/Math.log(r)*o;for(var a=i-Math.floor(i),s="",o=0;o<Math.floor(i);o++){var l=Math.floor(Math.random()*r).toString(r);s=l+s}if(a){var c=Math.pow(r,a),l=Math.floor(Math.random()*c).toString(r);s=l+s}var u=parseInt(s,r);return u!==1/0&&u>=Math.pow(2,n)?t(n,r):s};t.rack=function(n,r,i){var o=function(s){var l=0;do{if(l++>10)if(i)n+=i;else throw new Error("too many ID collisions, use more bits");var c=t(n,r)}while(Object.hasOwnProperty.call(a,c));return a[c]=s,c},a=o.hats={};return o.get=function(s){return o.hats[s]},o.set=function(s,l){return o.hats[s]=l,o},o.bits=n||128,o.base=r||16,o}});function Un(e){if(!(this instanceof Un))return new Un(e);e=e||[128,36,1],this._seed=e.length?lP.rack(e[0],e[1],e[2]):e}Un.prototype.next=function(e){return this._seed(e||!0)},Un.prototype.nextPrefixed=function(e,t){var n;do n=e+this.next(!0);while(this.assigned(n));return this.claim(n,t),n},Un.prototype.claim=function(e,t){this._seed.set(e,t||!0)},Un.prototype.assigned=function(e){return this._seed.get(e)||!1},Un.prototype.unclaim=function(e){delete this._seed.hats[e]},Un.prototype.clear=function(){var e=this._seed.hats,t;for(t in e)this.unclaim(t)};function Rd(e){return Array.prototype.concat.apply([],e)}const ua=Object.prototype.toString,cP=Object.prototype.hasOwnProperty;function Si(e){return e===void 0}function ft(e){return e!==void 0}function da(e){return e==null}function me(e){return ua.call(e)==="[object Array]"}function pt(e){return ua.call(e)==="[object Object]"}function de(e){return ua.call(e)==="[object Number]"}function nt(e){const t=ua.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"||t==="[object Proxy]"}function kt(e){return ua.call(e)==="[object String]"}function uP(e){if(!me(e))throw new Error("must supply array")}function It(e,t){return!da(e)&&cP.call(e,t)}function Re(e,t){const n=nl(t);let r;return N(e,function(i,o){if(n(i,o))return r=i,!1}),r}function qg(e,t){const n=nl(t);let r=me(e)?-1:void 0;return N(e,function(i,o){if(n(i,o))return r=o,!1}),r}function _e(e,t){const n=nl(t);let r=[];return N(e,function(i,o){n(i,o)&&r.push(i)}),r}function N(e,t){let n,r;if(Si(e))return;const i=me(e)?mP:hP;for(let o in e)if(It(e,o)&&(n=e[o],r=t(n,i(o)),r===!1))return n}function dP(e,t){if(Si(e))return[];uP(e);const n=nl(t);return e.filter(function(r,i){return!n(r,i)})}function Lt(e,t,n){return N(e,function(r,i){n=t(n,r,i)}),n}function Ci(e,t){return!!Lt(e,function(n,r,i){return n&&t(r,i)},!0)}function kr(e,t){return!!Re(e,t)}function xt(e,t){let n=[];return N(e,function(r,i){n.push(t(r,i))}),n}function tl(e){return e&&Object.keys(e)||[]}function fP(e){return tl(e).length}function Ad(e){return xt(e,t=>t)}function fo(e,t,n={}){return t=Od(t),N(e,function(r){let i=t(r)||"_",o=n[i];o||(o=n[i]=[]),o.push(r)}),n}function Kg(e,...t){e=Od(e);let n={};return N(t,i=>fo(i,e,n)),xt(n,function(i,o){return i[0]})}const pP=Kg;function qn(e,t){t=Od(t);let n=[];return N(e,function(r,i){let o=t(r,i),a={d:o,v:r};for(var s=0;s<n.length;s++){let{d:l}=n[s];if(o<l){n.splice(s,0,a);return}}n.push(a)}),xt(n,r=>r.v)}function Bn(e){return function(t){return Ci(e,function(n,r){return t[r]===n})}}function Od(e){return nt(e)?e:t=>t[e]}function nl(e){return nt(e)?e:t=>t===e}function hP(e){return e}function mP(e){return Number(e)}function Yg(e,t){let n,r,i,o;function a(d){let f=Date.now(),p=d?0:o+t-f;if(p>0)return s(p);e.apply(i,r),l()}function s(d){n=setTimeout(a,d)}function l(){n&&clearTimeout(n),n=o=r=i=void 0}function c(){n&&a(!0),l()}function u(...d){o=Date.now(),r=d,i=this,n||s(t)}return u.flush=c,u.cancel=l,u}function Dt(e,t){return e.bind(t)}function j(e,...t){return Object.assign(e,...t)}function gP(e,t,n){let r=e;return N(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];ft(a)&&da(s)&&(s=r[i]=isNaN(+a)?{}:[]),Si(a)?Si(n)?delete r[i]:r[i]=n:r=s}),e}function kn(e,t){let n={},r=Object(e);return N(t,function(i){i in r&&(n[i]=e[i])}),n}function un(e,t){let n={},r=Object(e);return N(r,function(i,o){t.indexOf(o)===-1&&(n[o]=i)}),n}function vP(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 yP=Object.prototype.toString,bP=Object.prototype.hasOwnProperty;function xP(e){return e===void 0}function _P(e){return yP.call(e)==="[object Array]"}function wP(e,t){return bP.call(e,t)}function Xg(e,t){let n,r;if(xP(e))return;const i=_P(e)?SP:EP;for(let o in e)if(wP(e,o)&&(n=e[o],r=t(n,i(o)),r===!1))return n}function EP(e){return e}function SP(e){return Number(e)}function _t(e,...t){const n=e.style;return Xg(t,function(r){r&&Xg(r,function(i,o){n[o]=i})}),e}function $t(e,t,n){return arguments.length==2?e.getAttribute(t):n===null?e.removeAttribute(t):(e.setAttribute(t,n),e)}const CP=Object.prototype.toString;function Ge(e){return new Lr(e)}function Lr(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}Lr.prototype.add=function(e){return this.list.add(e),this},Lr.prototype.remove=function(e){return CP.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)},Lr.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},Lr.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Lr.prototype.array=function(){return Array.from(this.list)},Lr.prototype.has=Lr.prototype.contains=function(e){return this.list.contains(e)};function rl(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function jr(e,t,n){var r=n?e:e.parentNode;return r&&typeof r.closest=="function"&&r.closest(t)||null}var il={},ol,Md,Id;function Zg(){ol=window.addEventListener?"addEventListener":"attachEvent",Md=window.removeEventListener?"removeEventListener":"detachEvent",Id=ol!=="addEventListener"?"on":""}var TP=il.bind=function(e,t,n,r){return ol||Zg(),e[ol](Id+t,n,r||!1),n},PP=il.unbind=function(e,t,n,r){return Md||Zg(),e[Md](Id+t,n,r||!1),n},ge=vP({__proto__:null,bind:TP,unbind:PP,default:il},[il]),Qg=["focus","blur"];function $P(e,t,n,r,i){return Qg.indexOf(n)!==-1&&(i=!0),ge.bind(e,n,function(o){var a=o.target||o.srcElement;o.delegateTarget=jr(a,t,!0),o.delegateTarget&&r.call(e,o)},i)}function RP(e,t,n,r){return Qg.indexOf(t)!==-1&&(r=!0),ge.unbind(e,t,n,r)}var jt={bind:$P,unbind:RP},AP=OP,Jg=!1,al;typeof document<"u"&&(al=document.createElement("div"),al.innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',Jg=!al.getElementsByTagName("link").length,al=void 0);var rt={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:Jg?[1,"X<div>","</div>"]:[0,"",""]};rt.td=rt.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],rt.option=rt.optgroup=[1,'<select multiple="multiple">',"</select>"],rt.thead=rt.tbody=rt.colgroup=rt.caption=rt.tfoot=[1,"<table>","</table>"],rt.polyline=rt.ellipse=rt.polygon=rt.circle=rt.text=rt.line=rt.path=rt.rect=rt.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function OP(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 l=t.createElement("html");return l.innerHTML=e,l.removeChild(l.lastChild)}var i=Object.prototype.hasOwnProperty.call(rt,r)?rt[r]:rt._default,o=i[0],a=i[1],s=i[2],l=t.createElement("div");for(l.innerHTML=a+e+s;o--;)l=l.lastChild;if(l.firstChild==l.lastChild)return l.removeChild(l.firstChild);for(var c=t.createDocumentFragment();l.firstChild;)c.appendChild(l.removeChild(l.firstChild));return c}var ke=AP;function sl(e,t){return e&&typeof e.matches=="function"&&e.matches(t)||!1}function Ie(e,t){return t=t||document,t.querySelector(e)}function Dd(e,t){return t=t||document,t.querySelectorAll(e)}function Kn(e){e.parentNode&&e.parentNode.removeChild(e)}function MP(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch{}return e}function IP(e,t){return t.appendChild(MP(e,t))}function pe(e,t){return IP(t,e),e}var Nd=2,ev={"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":Nd,"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":Nd,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function DP(e,t){return ev[t]?e.style[t]:e.getAttributeNS(null,t)}function tv(e,t,n){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=ev[r];i?(i===Nd&&typeof n=="number"&&(n=String(n)+"px"),e.style[r]=n):e.setAttributeNS(null,t,n)}function NP(e,t){var n=Object.keys(t),r,i;for(r=0,i;i=n[r];r++)tv(e,i,t[i])}function ee(e,t,n){if(typeof t=="string")if(n!==void 0)tv(e,t,n);else return DP(e,t);else NP(e,t);return e}const BP=Object.prototype.toString;function Ce(e){return new Fr(e)}function Fr(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}Fr.prototype.add=function(e){return this.list.add(e),this},Fr.prototype.remove=function(e){return BP.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)},Fr.prototype.removeMatching=function(e){const t=this.array();for(let n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},Fr.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},Fr.prototype.array=function(){return Array.from(this.list)},Fr.prototype.has=Fr.prototype.contains=function(e){return this.list.contains(e)};function ll(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function nv(e){return e.cloneNode(!0)}var Bd={svg:"http://www.w3.org/2000/svg"},rv='<svg xmlns="'+Bd.svg+'"';function kP(e){var t=!1;e.substring(0,4)==="<svg"?e.indexOf(Bd.svg)===-1&&(e=rv+e.substring(4)):(e=rv+">"+e+"</svg>",t=!0);var n=LP(e);if(!t)return n;for(var r=document.createDocumentFragment(),i=n.firstChild;i.firstChild;)r.appendChild(i.firstChild);return r}function LP(e){var t;return t=new DOMParser,t.async=!1,t.parseFromString(e,"text/xml")}function le(e,t){var n;return e=e.trim(),e.charAt(0)==="<"?(n=kP(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(Bd.svg,e),t&&ee(n,t),n}var kd=null;function iv(){return kd===null&&(kd=le("svg")),kd}function ov(e,t){var n,r,i=Object.keys(t);for(n=0;r=i[n];n++)e[r]=t[r];return e}function jP(e,t,n,r,i,o){var a=iv().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return ov(a,e);case 6:return ov(a,{a:e,b:t,c:n,d:r,e:i,f:o})}}function fa(e){return iv().createSVGTransform()}var av=/([&<>]{1})/g,FP=/([&<>\n\r"]{1})/g,HP={"&":"&","<":"<",">":">",'"':"'"};function Ld(e,t){function n(r,i){return HP[i]||i}return e.replace(t,n)}function sv(e,t){var n,r,i,o,a;switch(e.nodeType){case 3:t.push(Ld(e.textContent,av));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(i=e.attributes,n=0,r=i.length;n<r;++n)o=i.item(n),t.push(" ",o.name,'="',Ld(o.value,FP),'"');if(e.hasChildNodes()){for(t.push(">"),a=e.childNodes,n=0,r=a.length;n<r;++n)sv(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("<!--",Ld(e.nodeValue,av),"-->");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function zP(e){for(var t=e.firstChild,n=[];t;)sv(t,n),t=t.nextSibling;return n.join("")}function lv(e,t){return zP(e)}function it(e){var t=e.parentNode;return t&&t.removeChild(e),e}function VP(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function WP(e,t){var n,r;for(e.clear(),n=0;r=t[n];n++)e.appendItem(VP(e,r))}function pa(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),WP(n,t)),n.consolidate()}const GP=/^class[ {]/;function UP(e){return GP.test(e.toString())}function jd(e){return Array.isArray(e)}function Fd(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function cl(...e){e.length===1&&jd(e[0])&&(e=e[0]),e=[...e];const t=e.pop();return t.$inject=e,t}const qP=/constructor\s*[^(]*\(\s*([^)]*)\)/m,KP=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,YP=/\/\*([^*]*)\*\//m;function XP(e){if(typeof e!="function")throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(UP(e)?qP:KP);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map(r=>{const i=r.match(YP);return(i&&i[1]||r).trim()})||[]}function cv(e,t){const n=t||{get:function(b,y){if(r.push(b),y===!1)return null;throw s(`No provider for "${b}"!`)}},r=[],i=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),a=o.injector=this,s=function(b){const y=r.join(" -> ");return r.length=0,new Error(y?`${b} (Resolving: ${y})`:b)};function l(b,y){if(!i[b]&&b.includes(".")){const _=b.split(".");let S=l(_.shift());for(;_.length;)S=S[_.shift()];return S}if(Fd(o,b))return o[b];if(Fd(i,b)){if(r.indexOf(b)!==-1)throw r.push(b),s("Cannot resolve circular dependency!");return r.push(b),o[b]=i[b][0](i[b][1]),r.pop(),o[b]}return n.get(b,y)}function c(b,y){if(typeof y>"u"&&(y={}),typeof b!="function")if(jd(b))b=cl(b.slice());else throw s(`Cannot invoke "${b}". Expected a function!`);const S=(b.$inject||XP(b)).map(C=>Fd(y,C)?y[C]:l(C));return{fn:b,dependencies:S}}function u(b){const{fn:y,dependencies:_}=c(b),S=Function.prototype.bind.call(y,null,..._);return new S}function d(b,y,_){const{fn:S,dependencies:C}=c(b,_);return S.apply(y,C)}function f(b){return cl(y=>b.get(y))}function p(b,y){if(y&&y.length){const _=Object.create(null),S=Object.create(null),C=[],$=[],M=[];let R,I,L,k;for(let V in i)R=i[V],y.indexOf(V)!==-1&&(R[2]==="private"?(I=C.indexOf(R[3]),I===-1?(L=R[3].createChild([],y),k=f(L),C.push(R[3]),$.push(L),M.push(k),_[V]=[k,V,"private",L]):_[V]=[M[I],V,"private",$[I]]):_[V]=[R[2],R[1]],S[V]=!0),(R[2]==="factory"||R[2]==="type")&&R[1].$scope&&y.forEach(W=>{R[1].$scope.indexOf(W)!==-1&&(_[V]=[R[2],R[1]],S[W]=!0)});y.forEach(V=>{if(!S[V])throw new Error('No provider for "'+V+'". Cannot use provider from the parent!')}),b.unshift(_)}return new cv(b,a)}const m={factory:d,type:u,value:function(b){return b}};function v(b,y){const _=b.__init__||[];return function(){_.forEach(S=>{typeof S=="string"?y.get(S):y.invoke(S)})}}function g(b){const y=b.__exports__;if(y){const _=b.__modules__,S=Object.keys(b).reduce((I,L)=>(L!=="__exports__"&&L!=="__modules__"&&L!=="__init__"&&L!=="__depends__"&&(I[L]=b[L]),I),Object.create(null)),C=(_||[]).concat(S),$=p(C),M=cl(function(I){return $.get(I)});y.forEach(function(I){i[I]=[M,I,"private",$]});const R=(b.__init__||[]).slice();return R.unshift(function(){$.init()}),b=Object.assign({},b,{__init__:R}),v(b,$)}return Object.keys(b).forEach(function(_){if(_==="__init__"||_==="__depends__")return;const S=b[_];if(S[2]==="private"){i[_]=S;return}const C=S[0],$=S[1];i[_]=[m[C],ZP(C,$),C]}),v(b,a)}function x(b,y){return b.indexOf(y)!==-1||(b=(y.__depends__||[]).reduce(x,b),b.indexOf(y)!==-1)?b:b.concat(y)}function w(b){const y=b.reduce(x,[]).map(g);let _=!1;return function(){_||(_=!0,y.forEach(S=>S()))}}this.get=l,this.invoke=d,this.instantiate=u,this.createChild=p,this.init=w(e)}function ZP(e,t){return e!=="value"&&jd(t)&&(t=cl(t.slice())),t}var QP=1e3;function fr(e,t){var n=this;t=t||QP,e.on(["render.shape","render.connection"],t,function(r,i){var o=r.type,a=i.element,s=i.gfx,l=i.attrs;if(n.canRender(a))return o==="render.shape"?n.drawShape(s,a,l):n.drawConnection(s,a,l)}),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)})}fr.prototype.canRender=function(e){},fr.prototype.drawShape=function(e,t){},fr.prototype.drawConnection=function(e,t){},fr.prototype.getShapePath=function(e){},fr.prototype.getConnectionPath=function(e){};function Ti(e){return e.flat().join(",").replace(/,?([A-z]),?/g,"$1")}function JP(e){return["M",e.x,e.y]}function Hd(e){return["L",e.x,e.y]}function e$(e,t,n){return["C",e.x,e.y,t.x,t.y,n.x,n.y]}function t$(e,t){const n=e.length,r=[JP(e[0])];for(let i=1;i<n;i++){const o=e[i-1],a=e[i],s=e[i+1];if(!s||!t){r.push(Hd(a));continue}const l=Math.min(t,zd(a.x-o.x,a.y-o.y),zd(s.x-a.x,s.y-a.y));if(!l){r.push(Hd(a));continue}const c=ul(a,o,l),u=ul(a,o,l*.5),d=ul(a,s,l),f=ul(a,s,l*.5);r.push(Hd(c)),r.push(e$(u,f,d))}return r}function ul(e,t,n){const r=t.x-e.x,i=t.y-e.y,o=zd(r,i),a=n/o;return{x:e.x+r*a,y:e.y+i*a}}function zd(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function dl(e,t,n){de(t)&&(n=t,t=null),t||(t={});const r=le("path",t);return de(n)&&(r.dataset.cornerRadius=String(n)),uv(r,e)}function uv(e,t){const n=parseInt(e.dataset.cornerRadius,10)||0;return ee(e,{d:Ti(t$(t,n))}),e}function fl(e){return _e(e,function(t){return!Re(e,function(n){return n!==t&&dv(t,n)})})}function dv(e,t){if(t){if(e===t)return t;if(e.parent)return dv(e.parent,t)}}function fv(e,t,n){var r=!n||e.indexOf(t)===-1;return r&&e.push(t),r}function Pi(e,t,n){n=n||0,me(e)||(e=[e]),N(e,function(r,i){var o=t(r,i,n);me(o)&&o.length&&Pi(o,t,n+1)})}function n$(e,t,n){var r=[],i=[];return Pi(e,function(o,a,s){fv(r,o,t);var l=o.children;if(l&&fv(i,l,t))return l}),r}function ha(e,t){return n$(e,!t)}function r$(e,t,n){Si(t)&&(t=!0),pt(t)&&(n=t,t=!0),n=n||{};var r=ma(n.allShapes),i=ma(n.allConnections),o=ma(n.enclosedElements),a=ma(n.enclosedConnections),s=ma(n.topLevel,t&&fo(e,function(u){return u.id}));function l(u){s[u.source.id]&&s[u.target.id]&&(s[u.id]=[u]),r[u.source.id]&&r[u.target.id]&&(a[u.id]=o[u.id]=u),i[u.id]=u}function c(u){if(o[u.id]=u,u.waypoints)a[u.id]=i[u.id]=u;else return r[u.id]=u,N(u.incoming,l),N(u.outgoing,l),u.children}return Pi(e,c),{allShapes:r,allConnections:i,topLevel:s,enclosedConnections:a,enclosedElements:o}}function st(e,t){t=!!t,me(e)||(e=[e]);var n,r,i,o;return N(e,function(a){var s=a;a.waypoints&&!t&&(s=st(a.waypoints,!0));var l=s.x,c=s.y,u=s.height||0,d=s.width||0;(l<n||n===void 0)&&(n=l),(c<r||r===void 0)&&(r=c),(l+d>i||i===void 0)&&(i=l+d),(c+u>o||o===void 0)&&(o=c+u)}),{x:n,y:r,height:o-r,width:i-n}}function i$(e,t){var n={};return N(e,function(r){var i=r;i.waypoints&&(i=st(i)),!de(t.y)&&i.x>t.x&&(n[r.id]=r),!de(t.x)&&i.y>t.y&&(n[r.id]=r),i.x>t.x&&i.y>t.y&&(de(t.width)&&de(t.height)&&i.width+i.x<t.width+t.x&&i.height+i.y<t.height+t.y||!de(t.width)||!de(t.height))&&(n[r.id]=r)}),n}function pv(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function hv(e){return!!(e&&e.isFrame)}function ma(e,t){return j({},e||{},t||{})}var o$=1;function Hr(e,t){fr.call(this,e,o$),this.CONNECTION_STYLE=t.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=t.style({fill:"white",stroke:"fuchsia",strokeWidth:2}),this.FRAME_STYLE=t.style(["no-fill"],{stroke:"fuchsia",strokeDasharray:4,strokeWidth:2})}ie(Hr,fr),Hr.prototype.canRender=function(){return!0},Hr.prototype.drawShape=function(t,n,r){var i=le("rect");return ee(i,{x:0,y:0,width:n.width||0,height:n.height||0}),hv(n)?ee(i,j({},this.FRAME_STYLE,r||{})):ee(i,j({},this.SHAPE_STYLE,r||{})),pe(t,i),i},Hr.prototype.drawConnection=function(t,n,r){var i=dl(n.waypoints,j({},this.CONNECTION_STYLE,r||{}));return pe(t,i),i},Hr.prototype.getShapePath=function(t){var n=t.x,r=t.y,i=t.width,o=t.height,a=[["M",n,r],["l",i,0],["l",0,o],["l",-i,0],["z"]];return Ti(a)},Hr.prototype.getConnectionPath=function(t){var n=t.waypoints,r,i,o=[];for(r=0;i=n[r];r++)i=i.original||i,o.push([r===0?"M":"L",i.x,i.y]);return Ti(o)},Hr.$inject=["eventBus","styles"];function a$(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(n,r,i){var o=this.style(r,i);return j(o,{class:n})},this.style=function(n,r){!me(n)&&!r&&(r=n,n=[]);var i=Lt(n,function(o,a){return j(o,e[a]||{})},{});return r?j(i,r):i},this.computeStyle=function(n,r,i){return me(r)||(i=r,r=[]),t.style(r||[],j({},i,n||{}))}}const s$={__init__:["defaultRenderer"],defaultRenderer:["type",Hr],styles:["type",a$]};function Xe(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return n!==-1&&e.splice(n,1),n}function ot(e,t,n){if(!(!e||!t)){typeof n!="number"&&(n=-1);var r=e.indexOf(t);if(r!==-1){if(r===n)return;if(n!==-1)e.splice(r,1);else return}n!==-1?e.splice(n,0,t):e.push(t)}}function Vd(e,t){return!e||!t?-1:e.indexOf(t)}function ga(e,t){return!e||!t?-1:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Wd(e,t,n,r){if(typeof r>"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=ga(e,t);return Math.abs(i/o)<=r}var l$=2;function pr(e,t){var n=Array.from(arguments).flat();const r={x:"v",y:"h"};for(const[i,o]of Object.entries(r))if(c$(i,n))return o;return!1}function c$(e,t){const n=t[0];return Ci(t,function(r){return Math.abs(n[e]-r[e])<=l$})}function mv(e,t,n){return n=n||0,e.x>t.x-n&&e.y>t.y-n&&e.x<t.x+t.width+n&&e.y<t.y+t.height+n}function Gd(e,t){return{x:Math.round(e.x+(t.x-e.x)/2),y:Math.round(e.y+(t.y-e.y)/2)}}var u$=/,?([a-z]),?/gi,gv=parseFloat,Ze=Math,zr=Ze.PI,Yn=Ze.min,Xn=Ze.max,vv=Ze.pow,Vr=Ze.abs,d$=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/ig,f$=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/ig,pl=Array.isArray||function(e){return e instanceof Array};function Ud(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function va(e){if(typeof e=="function"||Object(e)!==e)return e;var t=new e.constructor;for(var n in e)Ud(e,n)&&(t[n]=va(e[n]));return t}function p$(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return e.push(e.splice(n,1)[0])}function h$(e){function t(){var n=Array.prototype.slice.call(arguments,0),r=n.join("␀"),i=t.cache=t.cache||{},o=t.count=t.count||[];return Ud(i,r)?(p$(o,r),i[r]):(o.length>=1e3&&delete i[o.shift()],o.push(r),i[r]=e(...arguments),i[r])}return t}function m$(e){if(!e)return null;var t=po(e);if(t.arr)return va(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 pl(e)&&pl(e[0])&&(r=va(e)),r.length||String(e).replace(d$,function(i,o,a){var s=[],l=o.toLowerCase();for(a.replace(f$,function(c,u){u&&s.push(+u)}),l=="m"&&s.length>2&&(r.push([o,...s.splice(0,2)]),l="l",o=o=="m"?"l":"L");s.length>=n[l]&&(r.push([o,...s.splice(0,n[l])]),!!n[l]););}),r.toString=po.toString,t.arr=va(r),r}function po(e){var t=po.ps=po.ps||{};return t[e]?t[e].sleep=100:t[e]={sleep:100},setTimeout(function(){for(var n in t)Ud(t,n)&&n!=e&&(t[n].sleep--,!t[n].sleep&&delete t[n])}),t[e]}function qd(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 yv(){return this.join(",").replace(u$,"$1")}function hl(e){var t=va(e);return t.toString=yv,t}function bv(e,t,n,r,i,o,a,s,l){var c=1-l,u=vv(c,3),d=vv(c,2),f=l*l,p=f*l,m=u*e+d*3*l*n+c*3*l*l*i+p*a,v=u*t+d*3*l*r+c*3*l*l*o+p*s;return{x:ml(m),y:ml(v)}}function xv(e){var t=x$(...e);return qd(t.x0,t.y0,t.x1-t.x0,t.y1-t.y0)}function Wr(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function g$(e,t){return e=qd(e),t=qd(t),Wr(t,e.x,e.y)||Wr(t,e.x2,e.y)||Wr(t,e.x,e.y2)||Wr(t,e.x2,e.y2)||Wr(e,t.x,t.y)||Wr(e,t.x2,t.y)||Wr(e,t.x,t.y2)||Wr(e,t.x2,t.y2)||(e.x<t.x2&&e.x>t.x||t.x<e.x2&&t.x>e.x)&&(e.y<t.y2&&e.y>t.y||t.y<e.y2&&t.y>e.y)}function _v(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 wv(e,t,n,r,i,o,a,s,l){l==null&&(l=1),l=l>1?1:l<0?0:l;for(var c=l/2,u=12,d=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],f=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0,m=0;m<u;m++){var v=c*d[m]+c,g=_v(v,e,n,i,a),x=_v(v,t,r,o,s),w=g*g+x*x;p+=f[m]*Ze.sqrt(w)}return c*p}function v$(e,t,n,r,i,o,a,s){if(!(Xn(e,n)<Yn(i,a)||Yn(e,n)>Xn(i,a)||Xn(t,r)<Yn(o,s)||Yn(t,r)>Xn(o,s))){var l=(e*r-t*n)*(i-a)-(e-n)*(i*s-o*a),c=(e*r-t*n)*(o-s)-(t-r)*(i*s-o*a),u=(e-n)*(o-s)-(t-r)*(i-a);if(u){var d=ml(l/u),f=ml(c/u),p=+d.toFixed(2),m=+f.toFixed(2);if(!(p<+Yn(e,n).toFixed(2)||p>+Xn(e,n).toFixed(2)||p<+Yn(i,a).toFixed(2)||p>+Xn(i,a).toFixed(2)||m<+Yn(t,r).toFixed(2)||m>+Xn(t,r).toFixed(2)||m<+Yn(o,s).toFixed(2)||m>+Xn(o,s).toFixed(2)))return{x:d,y:f}}}}function ml(e){return Math.round(e*1e11)/1e11}function y$(e,t,n){var r=xv(e),i=xv(t);if(!g$(r,i))return n?0:[];for(var o=wv(...e),a=wv(...t),s=Sv(e)?1:~~(o/5)||1,l=Sv(t)?1:~~(a/5)||1,c=[],u=[],d={},f=n?0:[],p=0;p<s+1;p++){var m=bv(...e,p/s);c.push({x:m.x,y:m.y,t:p/s})}for(p=0;p<l+1;p++)m=bv(...t,p/l),u.push({x:m.x,y:m.y,t:p/l});for(p=0;p<s;p++)for(var v=0;v<l;v++){var g=c[p],x=c[p+1],w=u[v],b=u[v+1],y=Vr(x.x-g.x)<.01?"y":"x",_=Vr(b.x-w.x)<.01?"y":"x",S=v$(g.x,g.y,x.x,x.y,w.x,w.y,b.x,b.y),C;if(S){if(C=S.x.toFixed(9)+"#"+S.y.toFixed(9),d[C])continue;d[C]=!0;var $=g.t+Vr((S[y]-g[y])/(x[y]-g[y]))*(x.t-g.t),M=w.t+Vr((S[_]-w[_])/(b[_]-w[_]))*(b.t-w.t);$>=0&&$<=1&&M>=0&&M<=1&&(n?f++:f.push({x:S.x,y:S.y,t1:$,t2:M}))}}return f}function Ev(e,t,n){e=Pv(e),t=Pv(t);for(var r,i,o,a,s,l,c,u,d,f,p=n?0:[],m=0,v=e.length;m<v;m++){var g=e[m];if(g[0]=="M")r=s=g[1],i=l=g[2];else{g[0]=="C"?(d=[r,i,...g.slice(1)],r=d[6],i=d[7]):(d=[r,i,r,i,s,l,s,l],r=s,i=l);for(var x=0,w=t.length;x<w;x++){var b=t[x];if(b[0]=="M")o=c=b[1],a=u=b[2];else{b[0]=="C"?(f=[o,a,...b.slice(1)],o=f[6],a=f[7]):(f=[o,a,o,a,c,u,c,u],o=c,a=u);var y=y$(d,f,n);if(n)p+=y;else{for(var _=0,S=y.length;_<S;_++)y[_].segment1=m,y[_].segment2=x,y[_].bez1=d,y[_].bez2=f;p=p.concat(y)}}}}}return p}function b$(e){var t=po(e);if(t.abs)return hl(t.abs);if((!pl(e)||!pl(e&&e[0]))&&(e=m$(e)),!e||!e.length)return[["M",0,0]];var n=[],r=0,i=0,o=0,a=0,s=0,l;e[0][0]=="M"&&(r=+e[0][1],i=+e[0][2],o=r,a=i,s++,n[0]=["M",r,i]);for(var c,u,d=s,f=e.length;d<f;d++){if(n.push(c=[]),u=e[d],l=u[0],l!=l.toUpperCase())switch(c[0]=l.toUpperCase(),c[0]){case"A":c[1]=u[1],c[2]=u[2],c[3]=u[3],c[4]=u[4],c[5]=u[5],c[6]=+u[6]+r,c[7]=+u[7]+i;break;case"V":c[1]=+u[1]+i;break;case"H":c[1]=+u[1]+r;break;case"M":o=+u[1]+r,a=+u[2]+i;default:for(var p=1,m=u.length;p<m;p++)c[p]=+u[p]+(p%2?r:i)}else for(var v=0,g=u.length;v<g;v++)c[v]=u[v];switch(l=l.toUpperCase(),c[0]){case"Z":r=+o,i=+a;break;case"H":r=c[1];break;case"V":i=c[1];break;case"M":o=c[c.length-2],a=c[c.length-1];default:r=c[c.length-2],i=c[c.length-1]}}return n.toString=yv,t.abs=hl(n),n}function Sv(e){return e[0]===e[2]&&e[1]===e[3]&&e[4]===e[6]&&e[5]===e[7]}function gl(e,t,n,r){return[e,t,n,r,n,r]}function Cv(e,t,n,r,i,o){var a=.3333333333333333,s=2/3;return[a*e+s*n,a*t+s*r,a*i+s*n,a*o+s*r,i,o]}function Tv(e,t,n,r,i,o,a,s,l,c){var u=zr*120/180,d=zr/180*(+i||0),f=[],p,m=h$(function(E,T,D){var B=E*Ze.cos(D)-T*Ze.sin(D),G=E*Ze.sin(D)+T*Ze.cos(D);return{x:B,y:G}});if(c)C=c[0],$=c[1],_=c[2],S=c[3];else{p=m(e,t,-d),e=p.x,t=p.y,p=m(s,l,-d),s=p.x,l=p.y;var v=(e-s)/2,g=(t-l)/2,x=v*v/(n*n)+g*g/(r*r);x>1&&(x=Ze.sqrt(x),n=x*n,r=x*r);var w=n*n,b=r*r,y=(o==a?-1:1)*Ze.sqrt(Vr((w*b-w*g*g-b*v*v)/(w*g*g+b*v*v))),_=y*n*g/r+(e+s)/2,S=y*-r*v/n+(t+l)/2,C=Ze.asin(((t-S)/r).toFixed(9)),$=Ze.asin(((l-S)/r).toFixed(9));C=e<_?zr-C:C,$=s<_?zr-$:$,C<0&&(C=zr*2+C),$<0&&($=zr*2+$),a&&C>$&&(C=C-zr*2),!a&&$>C&&($=$-zr*2)}var M=$-C;if(Vr(M)>u){var R=$,I=s,L=l;$=C+u*(a&&$>C?1:-1),s=_+n*Ze.cos($),l=S+r*Ze.sin($),f=Tv(s,l,n,r,i,0,a,I,L,[$,R,_,S])}M=$-C;var k=Ze.cos(C),V=Ze.sin(C),W=Ze.cos($),q=Ze.sin($),H=Ze.tan(M/4),Z=4/3*n*H,U=4/3*r*H,X=[e,t],re=[e+Z*V,t-U*k],F=[s+Z*q,l-U*W],z=[s,l];if(re[0]=2*X[0]-re[0],re[1]=2*X[1]-re[1],c)return[re,F,z].concat(f);f=[re,F,z].concat(f).join().split(",");for(var J=[],Y=0,A=f.length;Y<A;Y++)J[Y]=Y%2?m(f[Y-1],f[Y],d).y:m(f[Y],f[Y+1],d).x;return J}function x$(e,t,n,r,i,o,a,s){for(var l=[],c=[[],[]],u,d,f,p,m,v,g,x,w=0;w<2;++w){if(w==0?(d=6*e-12*n+6*i,u=-3*e+9*n-9*i+3*a,f=3*n-3*e):(d=6*t-12*r+6*o,u=-3*t+9*r-9*o+3*s,f=3*r-3*t),Vr(u)<1e-12){if(Vr(d)<1e-12)continue;p=-f/d,0<p&&p<1&&l.push(p);continue}g=d*d-4*f*u,x=Ze.sqrt(g),!(g<0)&&(m=(-d+x)/(2*u),0<m&&m<1&&l.push(m),v=(-d-x)/(2*u),0<v&&v<1&&l.push(v))}for(var b=l.length,y=b,_;b--;)p=l[b],_=1-p,c[0][b]=_*_*_*e+3*_*_*p*n+3*_*p*p*i+p*p*p*a,c[1][b]=_*_*_*t+3*_*_*p*r+3*_*p*p*o+p*p*p*s;return c[0][y]=e,c[1][y]=t,c[0][y+1]=a,c[1][y+1]=s,c[0].length=c[1].length=y+2,{x0:Yn(...c[0]),y0:Yn(...c[1]),x1:Xn(...c[0]),y1:Xn(...c[1])}}function Pv(e){var t=po(e);if(t.curve)return hl(t.curve);for(var n=b$(e),r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},i=function(p,m,v){var g,x;if(!p)return["C",m.x,m.y,m.x,m.y,m.x,m.y];switch(!(p[0]in{T:1,Q:1})&&(m.qx=m.qy=null),p[0]){case"M":m.X=p[1],m.Y=p[2];break;case"A":p=["C",...Tv(m.x,m.y,...p.slice(1))];break;case"S":v=="C"||v=="S"?(g=m.x*2-m.bx,x=m.y*2-m.by):(g=m.x,x=m.y),p=["C",g,x,...p.slice(1)];break;case"T":v=="Q"||v=="T"?(m.qx=m.x*2-m.qx,m.qy=m.y*2-m.qy):(m.qx=m.x,m.qy=m.y),p=["C",...Cv(m.x,m.y,m.qx,m.qy,p[1],p[2])];break;case"Q":m.qx=p[1],m.qy=p[2],p=["C",...Cv(m.x,m.y,p[1],p[2],p[3],p[4])];break;case"L":p=["C",...gl(m.x,m.y,p[1],p[2])];break;case"H":p=["C",...gl(m.x,m.y,p[1],m.y)];break;case"V":p=["C",...gl(m.x,m.y,m.x,p[1])];break;case"Z":p=["C",...gl(m.x,m.y,m.X,m.Y)];break}return p},o=function(p,m){if(p[m].length>7){p[m].shift();for(var v=p[m];v.length;)a[m]="A",p.splice(m++,0,["C",...v.splice(0,6)]);p.splice(m,1),u=n.length}},a=[],s="",l="",c=0,u=n.length;c<u;c++){n[c]&&(s=n[c][0]),s!="C"&&(a[c]=s,c&&(l=a[c-1])),n[c]=i(n[c],r,l),a[c]!="A"&&s=="C"&&(a[c]="C"),o(n,c);var d=n[c],f=d.length;r.x=d[f-2],r.y=d[f-1],r.bx=gv(d[f-4])||r.x,r.by=gv(d[f-3])||r.y}return t.curve=hl(n),n}function Be(e){return pt(e)&&It(e,"waypoints")}function Te(e){return pt(e)&&It(e,"labelTarget")}function $v(e){return{x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height)}}function hr(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function ce(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function vl(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function _$(e){return hr({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function w$(e){for(var t=e.waypoints,n=t.reduce(function(c,u,d){var f=t[d-1];if(f){var p=c[c.length-1],m=p&&p.endLength||0,v=C$(f,u);c.push({start:f,end:u,startLength:m,endLength:m+v,length:v})}return c},[]),r=n.reduce(function(c,u){return c+u.length},0),i=r/2,o=0,a=n[o];a.endLength<i;)a=n[++o];var s=(i-a.startLength)/a.length,l={x:a.start.x+(a.end.x-a.start.x)*s,y:a.start.y+(a.end.y-a.start.y)*s};return l}function fe(e){return Be(e)?w$(e):_$(e)}function wt(e,t,n){n=n||0,pt(n)||(n={x:n,y:n});var r=ce(e),i=ce(t),o=r.bottom+n.y<=i.top,a=r.left-n.x>=i.right,s=r.top-n.y>=i.bottom,l=r.right+n.x<=i.left,c=o?"top":s?"bottom":null,u=l?"left":a?"right":null;return u&&c?c+"-"+u:u||c||"intersect"}function Kd(e,t,n){var r=E$(e,t);return r.length===1||r.length===2&&ga(r[0],r[1])<1?hr(r[0]):r.length>1?(r=qn(r,function(i){var o=Math.floor(i.t2*100)||1;return o=100-o,o=(o<10?"0":"")+o,i.segment2+"#"+o}),hr(r[n?0:r.length-1])):null}function E$(e,t){return Ev(e,t)}function S$(e){e=e.slice();for(var t=0,n,r,i;e[t];)n=e[t],r=e[t-1],i=e[t+1],ga(n,i)===0||Wd(r,i,n)?e.splice(t,1):t++;return e}function C$(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function yl(e,t){return Math.round(e*t)/t}function Rv(e){return de(e)?e+"px":e}function T$(e){for(;e.parent;)e=e.parent;return e}function P$(e){e=j({},{width:"100%",height:"100%"},e);const t=e.container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),_t(n,{position:"relative",overflow:"hidden",width:Rv(e.width),height:Rv(e.height)}),t.appendChild(n),n}function Av(e,t,n){const r=le("g");Ce(r).add(t);const i=n!==void 0?n:e.childNodes.length-1;return e.insertBefore(r,e.childNodes[i]||null),r}const $$="base",Ov=0,R$=1,A$={shape:["x","y","width","height"],connection:["waypoints"]};function ve(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||{})}ve.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],ve.prototype._init=function(e){const t=this._eventBus,n=this._container=P$(e),r=this._svg=le("svg");ee(r,{width:"100%",height:"100%"}),pe(n,r);const i=this._viewport=Av(r,"viewport");e.deferUpdate&&(this._viewboxChanged=Yg(Dt(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)},ve.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},ve.prototype._clear=function(){this._elementRegistry.getAll().forEach(t=>{const n=pv(t);n==="root"?this.removeRootElement(t):this._removeElement(t,n)}),this._planes=[],this._rootElement=null,delete this._cachedViewbox},ve.prototype.getDefaultLayer=function(){return this.getLayer($$,Ov)},ve.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},ve.prototype._getChildIndex=function(e){return Lt(this._layers,function(t,n){return n.visible&&e>=n.index&&t++,t},0)},ve.prototype._createLayer=function(e,t){typeof t>"u"&&(t=R$);const n=this._getChildIndex(t);return{group:Av(this._viewport,"layer-"+e,n),index:t,visible:!0}},ve.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},ve.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&&(it(n),t.visible=!1),n},ve.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],it(t.group))},ve.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},ve.prototype.findRoot=function(e){return typeof e=="string"&&(e=this._elementRegistry.get(e)),e?(this._findPlaneForRoot(T$(e))||{}).rootElement:void 0},ve.prototype.getRootElements=function(){return this._planes.map(function(e){return e.rootElement})},ve.prototype._findPlaneForRoot=function(e){return Re(this._planes,function(t){return t.rootElement===e})},ve.prototype.getContainer=function(){return this._container},ve.prototype._updateMarker=function(e,t,n){let r;e.id||(e=this._elementRegistry.get(e)),e.markers=e.markers||new Set,r=this._elementRegistry._elements[e.id],r&&(N([r.gfx,r.secondaryGfx],function(i){i&&(n?(e.markers.add(t),Ce(i).add(t)):(e.markers.delete(t),Ce(i).remove(t)))}),this._eventBus.fire("element.marker.update",{element:e,gfx:r.gfx,marker:t,add:!!n}))},ve.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},ve.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},ve.prototype.hasMarker=function(e,t){return e.id||(e=this._elementRegistry.get(e)),e.markers?e.markers.has(t):!1},ve.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},ve.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},ve.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,Ov);return this.hideLayer(n),this._addRoot(e,r),this._planes.push({rootElement:e,layer:r}),e},ve.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},ve.prototype.setRootElement=function(e){if(e===this._rootElement)return e;let t;if(!e)throw new Error("rootElement required");return t=this._findPlaneForRoot(e),t||(e=this.addRootElement(e)),this._setRoot(e),e},ve.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)},ve.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})},ve.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})},ve.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=A$[e];if(!Ci(n,function(i){return typeof t[i]<"u"}))throw new Error("must supply { "+n.join(", ")+" } with "+e)},ve.prototype._setParent=function(e,t,n){ot(t.children,e,n),e.parent=t},ve.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},ve.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},ve.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},ve.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),Xe(e.parent&&e.parent.children,e),e.parent=null,i.fire(t+".removed",{element:e}),n.remove(e),e},ve.prototype.removeShape=function(e){return this._removeElement(e,"shape")},ve.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},ve.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},ve.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},ve.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},ve.prototype.viewbox=function(e){if(e===void 0&&this._cachedViewbox)return structuredClone(this._cachedViewbox);const t=this._viewport,n=this.getSize();let r,i,o,a,s,l,c;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);pa(t,u)});else return o=this._rootElement?this.getActiveLayer():null,r=o&&o.getBBox()||{},a=pa(t),i=a?a.matrix:jP(),s=yl(i.a,1e3),l=yl(-i.e||0,1e3),c=yl(-i.f||0,1e3),e=this._cachedViewbox={x:l?l/s:0,y:c?c/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},ve.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox(function(){e=j({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),Mv(t,n)}),{x:n.e,y:n.f}},ve.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=st(e),o=ce(i),a=this.viewbox(),s=this.zoom();let l,c;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=ce(a);if(!(i.width<a.width&&i.height<a.height))l=i.x-a.x,c=i.y-a.y;else{const f=Math.max(0,o.right-u.right),p=Math.min(0,o.left-u.left),m=Math.max(0,o.bottom-u.bottom),v=Math.min(0,o.top-u.top);l=f||p,c=m||v}this.scroll({dx:-l*s,dy:-c*s})},ve.prototype.zoom=function(e,t){if(!e)return this.viewbox(e).scale;if(e==="fit-viewport")return this._fitViewport(t);let n,r;return this._changeViewbox(function(){typeof t!="object"&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),r=this._setZoom(e,t)}),yl(r.a,1e3)};function Mv(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}ve.prototype._fitViewport=function(e){const t=this.viewbox(),n=t.outer,r=t.inner;let i,o;return r.x>=0&&r.y>=0&&r.x+r.width<=n.width&&r.y+r.height<=n.height&&!e?o={x:0,y:0,width:Math.max(r.width+r.x,n.width),height:Math.max(r.height+r.y,n.height)}:(i=Math.min(1,n.width/r.width,n.height/r.height),o={x:r.x+(e?r.width/2-n.width/i/2:0),y:r.y+(e?r.height/2-n.height/i/2:0),width:n.width/i,height:n.height/i}),this.viewbox(o),this.viewbox(!1).scale},ve.prototype._setZoom=function(e,t){const n=this._svg,r=this._viewport,i=n.createSVGMatrix(),o=n.createSVGPoint();let a,s,l,c,u;l=r.getCTM();const d=l.a;return t?(a=j(o,t),s=a.matrixTransform(l.inverse()),c=i.translate(s.x,s.y).scale(1/d*e).translate(-s.x,-s.y),u=l.multiply(c)):u=i.scale(e),Mv(this._viewport,u),u},ve.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},ve.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}},ve.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var ho="data-element-id";function Kt(e){this._elements={},this._eventBus=e}Kt.$inject=["eventBus"],Kt.prototype.add=function(e,t,n){var r=e.id;this._validateId(r),ee(t,ho,r),n&&ee(n,ho,r),this._elements[r]={element:e,gfx:t,secondaryGfx:n}},Kt.prototype.remove=function(e){var t=this._elements,n=e.id||e,r=n&&t[n];r&&(ee(r.gfx,ho,""),r.secondaryGfx&&ee(r.secondaryGfx,ho,""),delete t[n])},Kt.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)},Kt.prototype.updateGraphics=function(e,t,n){var r=e.id||e,i=this._elements[r];return n?i.secondaryGfx=t:i.gfx=t,t&&ee(t,ho,r),t},Kt.prototype.get=function(e){var t;typeof e=="string"?t=e:t=e&&ee(e,ho);var n=this._elements[t];return n&&n.element},Kt.prototype.filter=function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(n)}),t},Kt.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),r=0;r<n.length;r++){var i=n[r],o=t[i],a=o.element,s=o.gfx;if(e(a,s))return a}},Kt.prototype.getAll=function(){return this.filter(function(e){return e})},Kt.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach(function(n){var r=t[n],i=r.element,o=r.gfx;return e(i,o)})},Kt.prototype.getGraphics=function(e,t){var n=e.id||e,r=this._elements[n];return r&&(t?r.secondaryGfx:r.gfx)},Kt.prototype._validateId=function(e){if(!e)throw new Error("element must have an id");if(this._elements[e])throw new Error("element with id "+e+" already added")};function O$(e,t,n,r){var i=n.inverse;return Object.defineProperty(e,"remove",{value:function(o){var a=this.indexOf(o);return a!==-1&&(this.splice(a,1),t.unset(o,i,r)),o}}),Object.defineProperty(e,"contains",{value:function(o){return this.indexOf(o)!==-1}}),Object.defineProperty(e,"add",{value:function(o,a){var s=this.indexOf(o);if(typeof a>"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 M$(e){return e.__refs_collection===!0}function I$(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function Iv(e,t,n){var r=O$(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 D$(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 dn(e,t){if(!(this instanceof dn))return new dn(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}dn.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?Iv(this,t,e):D$(this,t,e)},dn.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return M$(n)||Iv(this,t,e),n},dn.prototype.ensureBound=function(e,t){I$(e,t)||this.bind(e,t)},dn.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},dn.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Yd=new dn({name:"children",enumerable:!0,collection:!0},{name:"parent"}),Dv=new dn({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),Nv=new dn({name:"attachers",collection:!0},{name:"host"}),Bv=new dn({name:"outgoing",collection:!0},{name:"source"}),kv=new dn({name:"incoming",collection:!0},{name:"target"});function mo(){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)}}),Yd.bind(this,"parent"),Dv.bind(this,"labels"),Bv.bind(this,"outgoing"),kv.bind(this,"incoming")}function ya(){mo.call(this),Yd.bind(this,"children"),Nv.bind(this,"host"),Nv.bind(this,"attachers")}ie(ya,mo);function Lv(){mo.call(this),Yd.bind(this,"children")}ie(Lv,ya);function jv(){ya.call(this),Dv.bind(this,"labelTarget")}ie(jv,ya);function Fv(){mo.call(this),Bv.bind(this,"source"),kv.bind(this,"target")}ie(Fv,mo);var N$={connection:Fv,shape:ya,label:jv,root:Lv};function B$(e,t){var n=N$[e];if(!n)throw new Error("unknown type: <"+e+">");return j(new n,t)}function k$(e){return e instanceof mo}function mr(){this._uid=12}mr.prototype.createRoot=function(e){return this.create("root",e)},mr.prototype.createLabel=function(e){return this.create("label",e)},mr.prototype.createShape=function(e){return this.create("shape",e)},mr.prototype.createConnection=function(e){return this.create("connection",e)},mr.prototype.create=function(e,t){return t=j({},t||{}),t.id||(t.id=e+"_"+this._uid++),B$(e,t)};var bl="__fn",Hv=1e3,L$=Array.prototype.slice;function Ft(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}Ft.prototype.on=function(e,t,n,r){if(e=me(e)?e:[e],nt(t)&&(r=n,n=t,t=Hv),!de(t))throw new Error("priority must be a number");var i=n;r&&(i=Dt(n,r),i[bl]=n[bl]||n);var o=this;e.forEach(function(a){o._addListener(a,{priority:t,callback:i,next:null})})},Ft.prototype.once=function(e,t,n,r){var i=this;if(nt(t)&&(r=n,n=t,t=Hv),!de(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[bl]=n,this.on(e,t,o)},Ft.prototype.off=function(e,t){e=me(e)?e:[e];var n=this;e.forEach(function(r){n._removeListener(r,t)})},Ft.prototype.createEvent=function(e){var t=new ba;return t.init(e),t},Ft.prototype.fire=function(e,t){var n,r,i,o;if(o=L$.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 ba?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}},Ft.prototype.handleError=function(e){return this.fire("error",{error:e})===!1},Ft.prototype._destroy=function(){this._listeners={}},Ft.prototype._invokeListeners=function(e,t,n){for(var r;n&&!e.cancelBubble;)r=this._invokeListener(e,t,n),n=n.next;return r},Ft.prototype._invokeListener=function(e,t,n){var r;if(n.callback.__isTomb)return r;try{r=j$(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},Ft.prototype._addListener=function(e,t){var n=this._getListeners(e),r;if(!n){this._setListeners(e,t);return}for(;n;){if(n.priority<t.priority){t.next=n,r?r.next=t:this._setListeners(e,t);return}r=n,n=n.next}r.next=t},Ft.prototype._getListeners=function(e){return this._listeners[e]},Ft.prototype._setListeners=function(e,t){this._listeners[e]=t},Ft.prototype._removeListener=function(e,t){var n=this._getListeners(e),r,i,o;if(!t){this._setListeners(e,null);return}for(;n;)r=n.next,o=n.callback,(o===t||o[bl]===t)&&(i?i.next=r:this._setListeners(e,r)),i=n,n=r};function ba(){}ba.prototype.stopPropagation=function(){this.cancelBubble=!0},ba.prototype.preventDefault=function(){this.defaultPrevented=!0},ba.prototype.init=function(e){j(this,e||{})};function j$(e,t){return e.apply(null,t)}function $i(e){return e.childNodes[0]}function F$(e){return e.parentNode.childNodes[1]}function xl(e,t,n,r,i){var o=fa();o.setTranslate(t,n);var a=fa();a.setRotate(r||0,0,0);var s=fa();s.setScale(1,1),pa(e,[o,a,s])}function gt(e,t,n){var r=fa();r.setTranslate(t,n),pa(e,r)}function zv(e,t){var n=fa();n.setRotate(t,0,0),pa(e,n)}function Yt(e,t){this._eventBus=e,this._elementRegistry=t}Yt.$inject=["eventBus","elementRegistry"],Yt.prototype._getChildrenContainer=function(e){var t=this._elementRegistry.getGraphics(e),n;return e.parent?(n=F$(t),n||(n=le("g"),Ce(n).add("djs-children"),pe(t.parentNode,n))):n=t,n},Yt.prototype._clear=function(e){var t=$i(e);return rl(t),t},Yt.prototype._createContainer=function(e,t,n,r){var i=le("g");Ce(i).add("djs-group"),typeof n<"u"?Vv(i,t,t.childNodes[n]):pe(t,i);var o=le("g");Ce(o).add("djs-element"),Ce(o).add("djs-"+e),r&&Ce(o).add("djs-frame"),pe(i,o);var a=le("g");return Ce(a).add("djs-visual"),pe(o,a),o},Yt.prototype.create=function(e,t,n){var r=this._getChildrenContainer(t.parent);return this._createContainer(e,r,n,hv(t))},Yt.prototype.updateContainments=function(e){var t=this,n=this._elementRegistry,r;r=Lt(e,function(i,o){return o.parent&&(i[o.parent.id]=o.parent),i},{}),N(r,function(i){var o=i.children;if(o){var a=t._getChildrenContainer(i);N(o.slice().reverse(),function(s){var l=n.getGraphics(s);Vv(l.parentNode,a)})}})},Yt.prototype.drawShape=function(e,t,n={}){var r=this._eventBus;return r.fire("render.shape",{gfx:e,element:t,attrs:n})},Yt.prototype.getShapePath=function(e){var t=this._eventBus;return t.fire("render.getShapePath",e)},Yt.prototype.drawConnection=function(e,t,n={}){var r=this._eventBus;return r.fire("render.connection",{gfx:e,element:t,attrs:n})},Yt.prototype.getConnectionPath=function(e){var t=this._eventBus;return t.fire("render.getConnectionPath",e)},Yt.prototype.update=function(e,t,n){if(t.parent){var r=this._clear(n);if(e==="shape")this.drawShape(r,t),gt(n,t.x,t.y);else if(e==="connection")this.drawConnection(r,t);else throw new Error("unknown type: "+e);t.hidden?ee(n,"display","none"):ee(n,"display","block")}},Yt.prototype.remove=function(e){var t=this._elementRegistry.getGraphics(e);it(t.parentNode)};function Vv(e,t,n){var r=n||t.firstChild;e!==r&&t.insertBefore(e,r)}const H$={__depends__:[s$],__init__:["canvas"],canvas:["type",ve],elementRegistry:["type",Kt],elementFactory:["type",mr],eventBus:["type",Ft],graphicsFactory:["type",Yt]};function z$(e){var t=new cv(e);return t.init(),t}function V$(e){e=e||{};var t={config:["value",e]},n=[t,H$].concat(e.modules||[]);return z$(n)}function Gr(e,t){this._injector=t||V$(e),this.get("eventBus").fire("diagram.init")}Gr.prototype.get=function(e,t){return this._injector.get(e,t)},Gr.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},Gr.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},Gr.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};function Xd(){}Xd.prototype.get=function(e){return this.$model.properties.get(this,e)},Xd.prototype.set=function(e,t){this.$model.properties.set(this,e,t)};function Wv(e,t){this.model=e,this.properties=t}Wv.prototype.createType=function(e){var t=this.model,n=this.properties,r=Object.create(Xd.prototype);N(e.properties,function(a){!a.isMany&&a.default!==void 0&&(r[a.name]=a.default)}),n.defineModel(r,t),n.defineDescriptor(r,e);var i=e.ns.name;function o(a){n.define(this,"$type",{value:i,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),N(a,Dt(function(s,l){this.set(l,s)},this))}return o.prototype=r,o.hasType=r.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var W$={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},Gv={String:function(e){return e},Boolean:function(e){return e==="true"},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e)}};function Zd(e,t){var n=Gv[e];return n?n(t):t}function Qd(e){return!!W$[e]}function Uv(e){return!!Gv[e]}function Rt(e,t){var n=e.split(/:/),r,i;if(n.length===1)r=e,i=t;else if(n.length===2)r=n[1],i=n[0];else throw new Error("expected <prefix:localName> or <localName>, got "+e);return e=(i?i+":":"")+r,{name:e,prefix:i,localName:r}}function Xt(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}Xt.prototype.build=function(){return kn(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},Xt.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)},Xt.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},Xt.prototype.redefineProperty=function(e,t,n){var r=e.ns.prefix,i=t.split("#"),o=Rt(i[0],r),a=Rt(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},Xt.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},Xt.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},Xt.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},Xt.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},Xt.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},Xt.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")},Xt.prototype.hasProperty=function(e){return this.propertiesByName[e]},Xt.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,r=this.allTypes,i=e.name;i in n||(N(e.properties,Dt(function(o){o=j({},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 Ur(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,N(e,Dt(this.registerPackage,this))}Ur.prototype.getPackage=function(e){return this.packageMap[e]},Ur.prototype.getPackages=function(){return this.packages},Ur.prototype.registerPackage=function(e){e=j({},e);var t=this.packageMap;qv(t,e,"prefix"),qv(t,e,"uri"),N(e.types,Dt(function(n){this.registerType(n,e)},this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},Ur.prototype.registerType=function(e,t){e=j({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:j(e.meta||{})});var n=Rt(e.name,t.prefix),r=n.name,i={};N(e.properties,Dt(function(o){var a=Rt(o.name,n.prefix),s=a.name;Qd(o.type)||(o.type=Rt(o.type,a.prefix).name),j(o,{ns:a,name:s}),i[s]=o},this)),j(e,{ns:n,name:r,propertiesByName:i}),N(e.extends,Dt(function(o){var a=Rt(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},Ur.prototype.mapTypes=function(e,t,n){var r=Qd(e.name)?{name:e.name}:this.typeMap[e.name],i=this;function o(l,c){var u=Rt(l,Qd(l)?"":e.prefix);i.mapTypes(u,t,c)}function a(l){return o(l,!0)}function s(l){return o(l,!1)}if(!r)throw new Error("unknown type <"+e.name+">");N(r.superClass,n?a:s),t(r,!n),N(r.traits,a)},Ur.prototype.getEffectiveDescriptor=function(e){var t=Rt(e),n=new Xt(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},Ur.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})};function qv(e,t,n){var r=t[n];if(r in e)throw new Error("package with "+n+" <"+r+"> already defined")}function Ri(e){this.model=e}Ri.prototype.set=function(e,t,n){if(!kt(t)||!t.length)throw new TypeError("property name must be a non-empty string");var r=this.getProperty(e,t),i=r&&r.name;G$(n)?r?delete e[i]:delete e.$attrs[Jd(t)]:r?i in e?e[i]=n:Kv(e,r,n):e.$attrs[Jd(t)]=n},Ri.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[Jd(t)];var r=n.name;return!e[r]&&n.isMany&&Kv(e,n,[]),e[r]},Ri.prototype.define=function(e,t,n){if(!n.writable){var r=n.value;n=j({},n,{get:function(){return r}}),delete n.value}Object.defineProperty(e,t,n)},Ri.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},Ri.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},Ri.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 G$(e){return typeof e>"u"}function Kv(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function Jd(e){return e.replace(/^:/,"")}function fn(e,t={}){this.properties=new Ri(this),this.factory=new Wv(this,this.properties),this.registry=new Ur(e,this.properties),this.typeCache={},this.config=t}fn.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},fn.prototype.getType=function(e){var t=this.typeCache,n=kt(e)?e:e.ns.name,r=t[n];return r||(e=this.registry.getEffectiveDescriptor(n),r=t[n]=this.factory.createType(e)),r},fn.prototype.createAny=function(e,t,n){var r=Rt(e),i={$type:e,$instanceOf:function(a){return a===this.$type},get:function(a){return this[a]},set:function(a,s){gP(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}),N(n,function(a,s){pt(a)&&a.value!==void 0?i[a.name]=a.value:i[s]=a}),i},fn.prototype.getPackage=function(e){return this.registry.getPackage(e)},fn.prototype.getPackages=function(){return this.registry.getPackages()},fn.prototype.getElementDescriptor=function(e){return e.$descriptor},fn.prototype.hasType=function(e,t){t===void 0&&(t=e,e=this);var n=e.$model.getElementDescriptor(e);return t in n.allTypesByName},fn.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},fn.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var Yv=String.fromCharCode,U$=Object.prototype.hasOwnProperty,q$=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,xa={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(xa).forEach(function(e){xa[e.toUpperCase()]=xa[e]});function K$(e,t,n,r){return r?U$.call(xa,r)?xa[r]:"&"+r+";":Yv(t||parseInt(n,16))}function Ai(e){return e.length>3&&e.indexOf("&")!==-1?e.replace(q$,K$):e}var Y$="http://www.w3.org/2001/XMLSchema-instance",X$="xsi",Xv="xsi:type",Zv="non-whitespace outside of root node";function go(e){return new Error(e)}function Qv(e){return"missing namespace for prefix <"+e+">"}function _l(e){return{get:e,enumerable:!0}}function Z$(e){var t={},n;for(n in e)t[n]=e[n];return t}function ef(e){return e+"$uri"}function Q$(e){var t={},n,r;for(n in e)r=e[n],t[r]=r,t[ef(r)]=n;return t}function Jv(){return{line:0,column:0}}function J$(e){throw e}function ey(e){if(!this)return new ey(e);var t=e&&e.proxy,n,r,i,o,a=J$,s,l,c,u,d=Jv,f=!1,p=!1,m=null,v=!1,g;function x(y){y instanceof Error||(y=go(y)),m=y,a(y,d)}function w(y){s&&(y instanceof Error||(y=go(y)),s(y,d))}this.on=function(y,_){if(typeof _!="function")throw go("required args <name, cb>");switch(y){case"openTag":r=_;break;case"text":n=_;break;case"closeTag":i=_;break;case"error":a=_;break;case"warn":s=_;break;case"cdata":o=_;break;case"attention":u=_;break;case"question":c=_;break;case"comment":l=_;break;default:throw go("unsupported event: "+y)}return this},this.ns=function(y){if(typeof y>"u"&&(y={}),typeof y!="object")throw go("required args <nsMap={}>");var _={},S;for(S in y)_[S]=y[S];return _[Y$]=X$,p=!0,g=_,this},this.parse=function(y){if(typeof y!="string")throw go("required args <xml=string>");return m=null,b(y),d=Jv,v=!1,m},this.stop=function(){v=!0};function b(y){var _=p?[]:null,S=p?Q$(g):null,C,$=[],M=0,R=!1,I=!1,L=0,k=0,V,W,q,H,Z,U,X,re,F,z="",J=0,Y;function A(){if(Y!==null)return Y;var T,D,B,G=p&&S.xmlns,ae=p&&f?[]:null,se=J,ye=z,dt=ye.length,Dn,qt,Ye,Nn,Me,Ei={},$d={},cn,ue,Ne;e:for(;se<dt;se++)if(cn=!1,ue=ye.charCodeAt(se),!(ue===32||ue<14&&ue>8)){for((ue<65||ue>122||ue>90&&ue<97)&&ue!==95&&ue!==58&&(w("illegal first char attribute name"),cn=!0),Ne=se+1;Ne<dt;Ne++)if(ue=ye.charCodeAt(Ne),!(ue>96&&ue<123||ue>64&&ue<91||ue>47&&ue<59||ue===46||ue===45||ue===95)){if(ue===32||ue<14&&ue>8){w("missing attribute value"),se=Ne;continue e}if(ue===61)break;w("illegal attribute name char"),cn=!0}if(Me=ye.substring(se,Ne),Me==="xmlns:xmlns"&&(w("illegal declaration of xmlns"),cn=!0),ue=ye.charCodeAt(Ne+1),ue===34)Ne=ye.indexOf('"',se=Ne+2),Ne===-1&&(Ne=ye.indexOf("'",se),Ne!==-1&&(w("attribute value quote missmatch"),cn=!0));else if(ue===39)Ne=ye.indexOf("'",se=Ne+2),Ne===-1&&(Ne=ye.indexOf('"',se),Ne!==-1&&(w("attribute value quote missmatch"),cn=!0));else for(w("missing attribute value quotes"),cn=!0,Ne=Ne+1;Ne<dt&&(ue=ye.charCodeAt(Ne+1),!(ue===32||ue<14&&ue>8));Ne++);for(Ne===-1&&(w("missing closing quotes"),Ne=dt,cn=!0),cn||(Ye=ye.substring(se,Ne)),se=Ne;Ne+1<dt&&(ue=ye.charCodeAt(Ne+1),!(ue===32||ue<14&&ue>8));Ne++)se===Ne&&(w("illegal character after attribute end"),cn=!0);if(se=Ne+1,cn)continue e;if(Me in $d){w("attribute <"+Me+"> already defined");continue}if($d[Me]=!0,!p){Ei[Me]=Ye;continue}if(f){if(qt=Me==="xmlns"?"xmlns":Me.charCodeAt(0)===120&&Me.substr(0,6)==="xmlns:"?Me.substr(6):null,qt!==null){if(T=Ai(Ye),D=ef(qt),Nn=g[T],!Nn){if(qt==="xmlns"||D in S&&S[D]!==T)do Nn="ns"+M++;while(typeof S[Nn]<"u");else Nn=qt;g[T]=Nn}S[qt]!==Nn&&(Dn||(S=Z$(S),Dn=!0),S[qt]=Nn,qt==="xmlns"&&(S[ef(Nn)]=T,G=Nn),S[D]=T),Ei[Me]=Ye;continue}ae.push(Me,Ye);continue}if(ue=Me.indexOf(":"),ue===-1){Ei[Me]=Ye;continue}if(!(B=S[Me.substring(0,ue)])){w(Qv(Me.substring(0,ue)));continue}Me=G===B?Me.substr(ue+1):B+Me.substr(ue),Me===Xv&&(ue=Ye.indexOf(":"),ue!==-1?(B=Ye.substring(0,ue),B=S[B]||B,Ye=B+Ye.substring(ue)):Ye=G+":"+Ye),Ei[Me]=Ye}if(f)for(se=0,dt=ae.length;se<dt;se++){if(Me=ae[se++],Ye=ae[se],ue=Me.indexOf(":"),ue!==-1){if(!(B=S[Me.substring(0,ue)])){w(Qv(Me.substring(0,ue)));continue}Me=G===B?Me.substr(ue+1):B+Me.substr(ue),Me===Xv&&(ue=Ye.indexOf(":"),ue!==-1?(B=Ye.substring(0,ue),B=S[B]||B,Ye=B+Ye.substring(ue)):Ye=G+":"+Ye)}Ei[Me]=Ye}return Y=Ei}function E(){for(var T=/(\r\n|\r|\n)/g,D=0,B=0,G=0,ae=k,se,ye;L>=G&&(se=T.exec(y),!(!se||(ae=se[0].length+se.index,ae>L)));)D+=1,G=ae;return L==-1?(B=ae,ye=y.substring(k)):k===0?ye=y.substring(k,L):(B=L-G,ye=k==-1?y.substring(L):y.substring(L,k+1)),{data:ye,line:D,column:B}}for(d=E,t&&(F=Object.create({},{name:_l(function(){return X}),originalName:_l(function(){return re}),attrs:_l(A),ns:_l(function(){return S})}));k!==-1;){if(y.charCodeAt(k)===60?L=k:L=y.indexOf("<",k),L===-1){if($.length)return x("unexpected end of file");if(k===0)return x("missing start tag");k<y.length&&y.substring(k).trim()&&w(Zv);return}if(k!==L){if($.length){if(n&&(n(y.substring(k,L),Ai,d),v))return}else if(y.substring(k,L).trim()&&(w(Zv),v))return}if(H=y.charCodeAt(L+1),H===33){if(q=y.charCodeAt(L+2),q===91&&y.substr(L+3,6)==="CDATA["){if(k=y.indexOf("]]>",L),k===-1)return x("unclosed cdata");if(o&&(o(y.substring(L+9,k),d),v))return;k+=3;continue}if(q===45&&y.charCodeAt(L+3)===45){if(k=y.indexOf("-->",L),k===-1)return x("unclosed comment");if(l&&(l(y.substring(L+4,k),Ai,d),v))return;k+=3;continue}}if(H===63){if(k=y.indexOf("?>",L),k===-1)return x("unclosed question");if(c&&(c(y.substring(L,k+2),d),v))return;k+=2;continue}for(V=L+1;;V++){if(Z=y.charCodeAt(V),isNaN(Z))return k=-1,x("unclosed tag");if(Z===34)q=y.indexOf('"',V+1),V=q!==-1?q:V;else if(Z===39)q=y.indexOf("'",V+1),V=q!==-1?q:V;else if(Z===62){k=V;break}}if(H===33){if(u&&(u(y.substring(L,k+1),Ai,d),v))return;k+=1;continue}if(Y={},H===47){if(R=!1,I=!0,!$.length)return x("missing open tag");if(V=X=$.pop(),q=L+2+V.length,y.substring(L+2,q)!==V)return x("closing tag mismatch");for(;q<k;q++)if(H=y.charCodeAt(q),!(H===32||H>8&&H<14))return x("close tag")}else{if(y.charCodeAt(k-1)===47?(V=X=y.substring(L+1,k-1),R=!0,I=!0):(V=X=y.substring(L+1,k),R=!0,I=!1),!(H>96&&H<123||H>64&&H<91||H===95||H===58))return x("illegal first char nodeName");for(q=1,W=V.length;q<W;q++)if(H=V.charCodeAt(q),!(H>96&&H<123||H>64&&H<91||H>47&&H<59||H===45||H===95||H==46)){if(H===32||H<14&&H>8){X=V.substring(0,q),Y=null;break}return x("invalid nodeName")}I||$.push(X)}if(p){if(C=S,R&&(I||_.push(C),Y===null&&(f=V.indexOf("xmlns",q)!==-1)&&(J=q,z=V,A(),f=!1)),re=X,H=X.indexOf(":"),H!==-1){if(U=S[X.substring(0,H)],!U)return x("missing namespace on <"+re+">");X=X.substr(H+1)}else U=S.xmlns;U&&(X=U+":"+X)}if(R&&(J=q,z=V,r&&(t?r(F,Ai,I,d):r(X,A,Ai,I,d),v)))return;if(I){if(i&&(i(t?F:X,Ai,R,d),v))return;p&&(R?S=C:S=_.pop())}k+=1}}}function ty(e){return e.xml&&e.xml.tagAlias==="lowerCase"}var eR={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},wl="xsi:type";function ny(e){return e.xml&&e.xml.serialize}function ry(e){return ny(e)===wl}function tR(e){return ny(e)==="property"}function nR(e){return e.charAt(0).toUpperCase()+e.slice(1)}function iy(e,t){return ty(t)?e.prefix+":"+nR(e.localName):e.name}function rR(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 iR(e,t){var n=Rt(e),r=t.getPackage(n.prefix);return rR(n,r)}function qr(e){return new Error(e)}function gr(e){return e.$descriptor}function oR(e){j(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(t){this.references.push(t)},this.addElement=function(t){if(!t)throw qr("expected element");var n=this.elementsById,r=gr(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 qr("duplicate ID <"+o+">");n[o]=t}},this.addWarning=function(t){this.warnings.push(t)}}function _a(){}_a.prototype.handleEnd=function(){},_a.prototype.handleText=function(){},_a.prototype.handleNode=function(){};function tf(){}tf.prototype=Object.create(_a.prototype),tf.prototype.handleNode=function(){return this};function vo(){}vo.prototype=Object.create(_a.prototype),vo.prototype.handleText=function(e){this.body=(this.body||"")+e};function wa(e,t){this.property=e,this.context=t}wa.prototype=Object.create(vo.prototype),wa.prototype.handleNode=function(e){if(this.element)throw qr("expected no sub nodes");return this.element=this.createReference(e),this},wa.prototype.handleEnd=function(){this.element.id=this.body},wa.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}};function nf(e,t){this.element=t,this.propertyDesc=e}nf.prototype=Object.create(vo.prototype),nf.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=Zd(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)};function El(){}El.prototype=Object.create(vo.prototype),El.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 At(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}At.prototype=Object.create(El.prototype),At.prototype.addReference=function(e){this.context.addReference(e)},At.prototype.handleText=function(e){var t=this.element,n=gr(t),r=n.bodyProperty;if(!r)throw qr("unexpected body text <"+e+">");vo.prototype.handleText.call(this,e)},At.prototype.handleEnd=function(){var e=this.body,t=this.element,n=gr(t),r=n.bodyProperty;r&&e!==void 0&&(e=Zd(r.type,e),t.set(r.name,e))},At.prototype.createElement=function(e){var t=e.attributes,n=this.type,r=gr(n),i=this.context,o=new n({}),a=this.model,s;return N(t,function(l,c){var u=r.propertiesByName[c],d;u&&u.isReference?u.isMany?(d=l.split(" "),N(d,function(f){i.addReference({element:o,property:u.ns.name,id:f})})):i.addReference({element:o,property:u.ns.name,id:l}):(u?l=Zd(u.type,l):c!=="xmlns"&&(s=Rt(c,r.ns.prefix),a.getPackage(s.prefix)&&i.addWarning({message:"unknown attribute <"+c+">",element:o,property:c,value:l})),o.set(c,l))}),o},At.prototype.getPropertyForNode=function(e){var t=e.name,n=Rt(t),r=this.type,i=this.model,o=gr(r),a=n.name,s=o.propertiesByName[a],l,c;if(s&&!s.isAttr)return ry(s)&&(l=e.attributes[wl],l)?(l=iR(l,i),c=i.getType(l),j({},s,{effectiveType:gr(c).name})):s;var u=i.getPackage(n.prefix);if(u){if(l=iy(n,u),c=i.getType(l),s=Re(o.properties,function(d){return!d.isVirtual&&!d.isReference&&!d.isAttribute&&c.hasType(d.type)}),s)return j({},s,{effectiveType:gr(c).name})}else if(s=Re(o.properties,function(d){return!d.isReference&&!d.isAttribute&&d.type==="Element"}),s)return s;throw qr("unrecognized element <"+n.name+">")},At.prototype.toString=function(){return"ElementDescriptor["+gr(this.type).name+"]"},At.prototype.valueHandler=function(e,t){return new nf(e,t)},At.prototype.referenceHandler=function(e){return new wa(e,this.context)},At.prototype.handler=function(e){return e==="Element"?new yo(this.model,e,this.context):new At(this.model,e,this.context)},At.prototype.handleChild=function(e){var t,n,r,i;if(t=this.getPropertyForNode(e),r=this.element,n=t.effectiveType||t.type,Uv(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?(j(o,{element:r}),this.context.addReference(o)):o.$parent=r),i};function rf(e,t,n){At.call(this,e,t,n)}rf.prototype=Object.create(At.prototype),rf.prototype.createElement=function(e){var t=e.name,n=Rt(t),r=this.model,i=this.type,o=r.getPackage(n.prefix),a=o&&iy(n,o)||t;if(!i.hasType(a))throw qr("unexpected element <"+e.originalName+">");return At.prototype.createElement.call(this,e)};function yo(e,t,n){this.model=e,this.context=n}yo.prototype=Object.create(El.prototype),yo.prototype.createElement=function(e){var t=e.name,n=Rt(t),r=n.prefix,i=e.ns[r+"$uri"],o=e.attributes;return this.model.createAny(t,i,o)},yo.prototype.handleChild=function(e){var t=new yo(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},yo.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)};function of(e){e instanceof fn&&(e={model:e}),j(this,{lax:!1},e)}of.prototype.fromXML=function(e,t,n){var r=t.rootHandler;t instanceof At?(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 oR(j({},t,{rootHandler:r})),s=new ey({proxy:!0}),l=aR();r.context=a,l.push(r);function c(_,S,C){var $=S(),M=$.line,R=$.column,I=$.data;I.charAt(0)==="<"&&I.indexOf(" ")!==-1&&(I=I.slice(0,I.indexOf(" "))+">");var L="unparsable content "+(I?I+" ":"")+`detected
|
|
2
|
+
line: `+M+`
|
|
3
|
+
column: `+R+`
|
|
4
|
+
nested error: `+_.message;if(C)return a.addWarning({message:L,error:_}),!0;throw qr(L)}function u(_,S){return c(_,S,!0)}function d(){var _=a.elementsById,S=a.references,C,$;for(C=0;$=S[C];C++){var M=$.element,R=_[$.id],I=gr(M).propertiesByName[$.property];if(R||a.addWarning({message:"unresolved reference <"+$.id+">",element:$.element,property:$.property,value:$.id}),I.isMany){var L=M.get(I.name),k=L.indexOf($);k===-1&&(k=L.length),R?L[k]=R:L.splice(k,1)}else M.set(I.name,R)}}function f(){l.pop().handleEnd()}var p=/^<\?xml /i,m=/ encoding="([^"]+)"/i,v=/^utf-8$/i;function g(_){if(p.test(_)){var S=m.exec(_),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=l.peek();try{l.push(C.handleNode(_))}catch($){c($,S,o)&&l.push(new tf)}}function w(_,S){try{l.peek().handleText(_)}catch(C){u(C,S)}}function b(_,S){_.trim()&&w(_,S)}var y=i.getPackages().reduce(function(_,S){return _[S.uri]=S.prefix,_},{"http://www.w3.org/XML/1998/namespace":"xml"});return s.ns(y).on("openTag",function(_,S,C,$){var M=_.attrs||{},R=Object.keys(M).reduce(function(L,k){var V=S(M[k]);return L[k]=V,L},{}),I={name:_.name,originalName:_.originalName,attributes:R,ns:_.ns};x(I,$)}).on("question",g).on("closeTag",f).on("cdata",w).on("text",function(_,S,C){b(S(_),C)}).on("error",c).on("warn",u),new Promise(function(_,S){var C;try{s.parse(e),d()}catch(L){C=L}var $=r.element;!C&&!$&&(C=qr("failed to parse document as <"+r.type.$descriptor.name+">"));var M=a.warnings,R=a.references,I=a.elementsById;return C?(C.warnings=M,S(C)):_({rootElement:$,elementsById:I,references:R,warnings:M})})},of.prototype.handler=function(e){return new rf(this.model,e)};function aR(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}var sR=`<?xml version="1.0" encoding="UTF-8"?>
|
|
5
|
+
`,lR=/<|>|'|"|&|\n\r|\n/g,oy=/<|>|&/g;function cR(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,l=this.getNSKey(a);r[l]=this.byUri(s),e&&e.logUsed(a)},this.getUsed=function(a){function s(u){var d=l.getNSKey(u);return r[d]}var l=this,c=[].concat(i,o);return c.filter(s)}}function uR(e){return e.charAt(0).toLowerCase()+e.slice(1)}function dR(e,t){return ty(t)?uR(e):e}function ay(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function sy(e){return kt(e)?e:(e.prefix?e.prefix+":":"")+e.localName}function fR(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 pR(e,t){return t.isGeneric?j({localName:t.ns.localName},e):j({localName:dR(t.ns.localName,t.$pkg)},e)}function hR(e,t){return j({localName:t.ns.localName},e)}function mR(e){var t=e.$descriptor;return _e(t.properties,function(n){var r=n.name;if(n.isVirtual||!It(e,r))return!1;var i=e[r];return i===n.default||i===null?!1:n.isMany?i.length:!0})}var gR={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},vR={"<":"lt",">":"gt","&":"amp"};function ly(e,t,n){return e=kt(e)?e:""+e,e.replace(t,function(r){return"&"+n[r]+";"})}function yR(e){return ly(e,lR,gR)}function bR(e){return ly(e,oy,vR)}function xR(e){return _e(e,function(t){return t.isAttr})}function _R(e){return _e(e,function(t){return!t.isAttr})}function af(e){this.tagName=e}af.prototype.build=function(e){return this.element=e,this},af.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()};function Oi(){}Oi.prototype.serializeValue=Oi.prototype.serializeTo=function(e){e.append(this.escape?bR(this.value):this.value)},Oi.prototype.build=function(e,t){return this.value=t,e.type==="String"&&t.search(oy)!==-1&&(this.escape=!0),this};function sf(e){this.tagName=e}ay(sf,Oi),sf.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()};function je(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}je.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=mR(e),this.parseAttributes(xR(i)),this.parseContainments(_R(i))),this.parseGenericAttributes(e,r),this},je.prototype.nsTagName=function(e){var t=this.logNamespaceUsed(e.ns);return pR(t,e)},je.prototype.nsPropertyTagName=function(e){var t=this.logNamespaceUsed(e.ns);return hR(t,e)},je.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},je.prototype.nsAttributeName=function(e){var t;if(kt(e)?t=Rt(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}:j({localName:t.localName},n)},je.prototype.parseGeneric=function(e){var t=this,n=this.body,r=[];return N(e,function(i,o){var a;o==="$body"?n.push(new Oi().build({type:"String"},i)):o==="$children"?N(i,function(s){n.push(new je(t).build(s))}):o.indexOf("$")!==0&&(a=t.parseNsAttribute(e,o,i),a&&r.push({name:o,value:i}))}),r},je.prototype.parseNsAttribute=function(e,t,n){var r=e.$model,i=Rt(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)}},je.prototype.parseNsAttributes=function(e,t){var n=this,r=e.$attrs,i=[];return N(r,function(o,a){var s=n.parseNsAttribute(e,a,o);s&&i.push(s)}),i},je.prototype.parseGenericAttributes=function(e,t){var n=this;N(t,function(r){if(r.name!==wl)try{n.addAttribute(n.nsAttributeName(r.name),r.value)}catch(i){console.warn("missing namespace information for ",r.name,"=",r.value,"on",e,i)}})},je.prototype.parseContainments=function(e){var t=this,n=this.body,r=this.element;N(e,function(i){var o=r.get(i.name),a=i.isReference,s=i.isMany;if(s||(o=[o]),i.isBody)n.push(new Oi().build(i,o[0]));else if(Uv(i.type))N(o,function(u){n.push(new sf(t.addTagName(t.nsPropertyTagName(i))).build(i,u))});else if(a)N(o,function(u){n.push(new af(t.addTagName(t.nsPropertyTagName(i))).build(u))});else{var l=ry(i),c=tR(i);N(o,function(u){var d;l?d=new Sl(t,i):c?d=new je(t,i):d=new je(t),n.push(d.build(u))})}})},je.prototype.getNamespaces=function(e){var t=this.namespaces,n=this.parent,r;return t||(r=n&&n.getNamespaces(),e||!r?this.namespaces=t=new cR(r):t=r),t},je.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},je.prototype.logNamespaceUsed=function(e,t){var n=this.element,r=n.$model,i=this.getNamespaces(t),o=e.prefix,a=e.uri,s,l,c;if(!o&&!a)return{localName:e.localName};if(c=eR[o]||r&&(r.getPackage(o)||{}).uri,a=a||c||i.uriByPrefix(o),!a)throw new Error("no namespace uri given for prefix <"+o+">");if(e=i.byUri(a),!e){for(s=o,l=1;i.uriByPrefix(s);)s=o+"_"+l++;e=this.logNamespace({prefix:s,uri:a},c===a)}return o&&i.mapPrefix(o,a),e},je.prototype.parseAttributes=function(e){var t=this,n=this.element;N(e,function(r){var i=n.get(r.name);if(r.isReference)if(!r.isMany)i=i.id;else{var o=[];N(i,function(a){o.push(a.id)}),i=o.join(" ")}t.addAttribute(t.nsAttributeName(r),i)})},je.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),sy(e)},je.prototype.addAttribute=function(e,t){var n=this.attrs;kt(t)&&(t=yR(t));var r=qg(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)},je.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=fR(n).concat(t)),N(t,function(r){e.append(" ").append(sy(r.name)).append('="').append(r.value).append('"')})},je.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==Oi;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),N(this.body,function(r){r.serializeTo(e)}),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()};function Sl(e,t){je.call(this,e,t)}ay(Sl,je),Sl.prototype.parseNsAttributes=function(e){var t=je.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(wl),(r.prefix?r.prefix+":":"")+o+n.ns.localName),t},Sl.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri};function wR(){this.value="",this.write=function(e){this.value+=e}}function ER(e,t){var n=[""];this.append=function(r){return e.write(r),this},this.appendNewLine=function(){return t&&e.write(`
|
|
6
|
+
`),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 SR(e){e=j({format:!1,preamble:!0},e||{});function t(n,r){var i=r||new wR,o=new ER(i,e.format);if(e.preamble&&o.append(sR),new je().build(n).serializeTo(o),!r)return i.value}return{toXML:t}}function Cl(e,t){fn.call(this,e,t)}Cl.prototype=Object.create(fn.prototype),Cl.prototype.fromXML=function(e,t,n){kt(t)||(n=t,t="bpmn:Definitions");var r=new of(j({model:this,lax:!0},n)),i=r.handler(t);return r.fromXML(e,i)},Cl.prototype.toXML=function(e,t){var n=new SR(t);return new Promise(function(r,i){try{var o=n.toXML(e);return r({xml:o})}catch(a){return i(a)}})};var CR="BPMN20",TR="http://www.omg.org/spec/BPMN/20100524/MODEL",PR="bpmn",$R=[],RR=[{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"}]}],AR=[{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"}]}],OR={tagAlias:"lowerCase",typePrefix:"t"},MR={name:CR,uri:TR,prefix:PR,associations:$R,types:RR,enumerations:AR,xml:OR},IR="BPMNDI",DR="http://www.omg.org/spec/BPMN/20100524/DI",NR="bpmndi",BR=[{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"]}],kR=[{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"}]}],LR=[],jR={name:IR,uri:DR,prefix:NR,types:BR,enumerations:kR,associations:LR},FR="DC",HR="http://www.omg.org/spec/DD/20100524/DC",zR="dc",VR=[{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}]}],WR=[],GR={name:FR,uri:HR,prefix:zR,types:VR,associations:WR},UR="DI",qR="http://www.omg.org/spec/DD/20100524/DI",KR="di",YR=[{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"}]}],XR=[],ZR={tagAlias:"lowerCase"},QR={name:UR,uri:qR,prefix:KR,types:YR,associations:XR,xml:ZR},JR="bpmn.io colors for BPMN",e2="http://bpmn.io/schema/bpmn/biocolor/1.0",t2="bioc",n2=[{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"}]}],r2=[],i2=[],o2={name:JR,uri:e2,prefix:t2,types:n2,enumerations:r2,associations:i2},a2="BPMN in Color",s2="http://www.omg.org/spec/BPMN/non-normative/color/1.0",l2="color",c2=[{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"}]}],u2=[],d2=[],f2={name:a2,uri:s2,prefix:l2,types:c2,enumerations:u2,associations:d2},p2={bpmn:MR,bpmndi:jR,dc:GR,di:QR,bioc:o2,color:f2};function h2(e,t){var n=j({},p2,e);return new Cl(n,t)}function Et(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}var m2="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 cy(e){It(e,"di")||Object.defineProperty(e,"di",{enumerable:!1,get:function(){throw new Error(m2)}})}function Nt(e,t){return e.$instanceOf(t)}function g2(e){return Re(e.rootElements,function(t){return Nt(t,"bpmn:Process")||Nt(t,"bpmn:Collaboration")})}function v2(e){var t={},n=[],r={};function i(F,z){return function(J){F(J,z)}}function o(F){t[F.id]=F}function a(F){return t[F.id]}function s(F,z){var J=F.gfx;if(J)throw new Error(`already rendered ${Et(F)}`);return e.element(F,r[F.id],z)}function l(F,z){return e.root(F,r[F.id],z)}function c(F,z){try{var J=r[F.id]&&s(F,z);return o(F),J}catch(Y){u(Y.message,{element:F,error:Y}),console.error(`failed to import ${Et(F)}`,Y)}}function u(F,z){e.error(F,z)}var d=this.registerDi=function(z){var J=z.bpmnElement;J?r[J.id]?u(`multiple DI elements defined for ${Et(J)}`,{element:J}):(r[J.id]=z,cy(J)):u(`no bpmnElement referenced in ${Et(z)}`,{element:z})};function f(F){p(F.plane)}function p(F){d(F),N(F.planeElement,m)}function m(F){d(F)}this.handleDefinitions=function(z,J){var Y=z.diagrams;if(J&&Y.indexOf(J)===-1)throw new Error("diagram not part of <bpmn:Definitions />");if(!J&&Y&&Y.length&&(J=Y[0]),!J)throw new Error("no diagram to display");r={},f(J);var A=J.plane;if(!A)throw new Error(`no plane for ${Et(J)}`);var E=A.bpmnElement;if(!E)if(E=g2(z),E)u(`correcting missing bpmnElement on ${Et(A)} to ${Et(E)}`),A.bpmnElement=E,d(A);else throw new Error("no process or collaboration to display");var T=l(E,A);if(Nt(E,"bpmn:Process")||Nt(E,"bpmn:SubProcess"))g(E,T);else if(Nt(E,"bpmn:Collaboration"))X(E,T),x(z.rootElements,T);else throw new Error(`unsupported bpmnElement for ${Et(A)}: ${Et(E)}`);v(n)};var v=this.handleDeferred=function(){for(var z;n.length;)z=n.shift(),z()};function g(F,z){H(F,z),M(F.ioSpecification,z),$(F.artifacts,z),o(F)}function x(F,z){var J=_e(F,function(Y){return!a(Y)&&Nt(Y,"bpmn:Process")&&Y.laneSets});J.forEach(i(g,z))}function w(F,z){c(F,z)}function b(F,z){N(F,i(w,z))}function y(F,z){c(F,z)}function _(F,z){c(F,z)}function S(F,z){c(F,z)}function C(F,z){c(F,z)}function $(F,z){N(F,function(J){Nt(J,"bpmn:Association")?n.push(function(){C(J,z)}):C(J,z)})}function M(F,z){F&&(N(F.dataInputs,i(_,z)),N(F.dataOutputs,i(S,z)))}var R=this.handleSubProcess=function(z,J){H(z,J),$(z.artifacts,J)};function I(F,z){var J=c(F,z);Nt(F,"bpmn:SubProcess")&&R(F,J||z),Nt(F,"bpmn:Activity")&&M(F.ioSpecification,z),n.push(function(){N(F.dataInputAssociations,i(y,z)),N(F.dataOutputAssociations,i(y,z))})}function L(F,z){c(F,z)}function k(F,z){c(F,z)}function V(F,z){n.push(function(){var J=c(F,z);F.childLaneSet&&W(F.childLaneSet,J||z),re(F)})}function W(F,z){N(F.lanes,i(V,z))}function q(F,z){N(F,i(W,z))}function H(F,z){Z(F.flowElements,z),F.laneSets&&q(F.laneSets,z)}function Z(F,z){N(F,function(J){Nt(J,"bpmn:SequenceFlow")?n.push(function(){L(J,z)}):Nt(J,"bpmn:BoundaryEvent")?n.unshift(function(){I(J,z)}):Nt(J,"bpmn:FlowNode")?I(J,z):Nt(J,"bpmn:DataObject")||(Nt(J,"bpmn:DataStoreReference")||Nt(J,"bpmn:DataObjectReference")?k(J,z):u(`unrecognized flowElement ${Et(J)} in context ${Et(z&&z.businessObject)}`,{element:J,context:z}))})}function U(F,z){var J=c(F,z),Y=F.processRef;Y&&g(Y,J||z)}function X(F,z){N(F.participants,i(U,z)),$(F.artifacts,z),n.push(function(){b(F.messageFlows,z)})}function re(F){N(F.flowNodeRef,function(z){var J=z.get("lanes");J&&J.push(F)})}}function P(e,t){var n=Q(e);return n&&typeof n.$instanceOf=="function"&&n.$instanceOf(t)}function be(e,t){return kr(t,function(n){return P(e,n)})}function Q(e){return e&&e.businessObject||e}function Pe(e){return e&&e.di}function y2(e,t,n){var r,i,o,a,s=[];function l(c,u){var d={root:function(v,g){return r.add(v,g)},element:function(v,g,x){return r.add(v,g,x)},error:function(v,g){s.push({message:v,context:g})}},f=new v2(d);u=u||c.diagrams&&c.diagrams[0];var p=b2(c,u);if(!p)throw new Error("no diagram to display");N(p,function(v){f.handleDefinitions(c,v)});var m=u.plane.bpmnElement.id;o.setRootElement(o.findRoot(m+"_plane")||o.findRoot(m))}return new Promise(function(c,u){try{return r=e.get("bpmnImporter"),i=e.get("eventBus"),o=e.get("canvas"),i.fire("import.render.start",{definitions:t}),l(t,n),i.fire("import.render.complete",{error:a,warnings:s}),c({warnings:s})}catch(d){return d.warnings=s,u(d)}})}function b2(e,t){if(!(!t||!t.plane)){var n=t.plane.bpmnElement,r=n;!P(n,"bpmn:Process")&&!P(n,"bpmn:Collaboration")&&(r=x2(n));var i;P(r,"bpmn:Collaboration")?i=r:i=Re(e.rootElements,function(c){if(P(c,"bpmn:Collaboration"))return Re(c.participants,function(u){return u.processRef===r})});var o=[r];i&&(o=xt(i.participants,function(c){return c.processRef}),o.push(i));var a=uy(o),s=[t],l=[n];return N(e.diagrams,function(c){if(c.plane){var u=c.plane.bpmnElement;a.indexOf(u)!==-1&&l.indexOf(u)===-1&&(s.push(c),l.push(u))}}),s}}function uy(e){var t=[];return N(e,function(n){n&&(t.push(n),t=t.concat(uy(n.flowElements)))}),t}function x2(e){for(var t=e;t;){if(P(t,"bpmn:Process"))return t;t=t.$parent}}var _2='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>',dy=_2,fy={verticalAlign:"middle"},py={color:"#404040"},w2={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},E2={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},S2={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"},C2='<div class="bjs-powered-by-lightbox"><div class="backdrop"></div><div class="notice"><a href="https://bpmn.io" target="_blank" rel="noopener" class="link">'+dy+'</a><span>Web-based tooling for BPMN, DMN and forms powered by <a href="https://bpmn.io" target="_blank" rel="noopener">bpmn.io</a>.</span></div></div>',Zn;function T2(){Zn=ke(C2),_t(Zn,w2),_t(Ie("svg",Zn),fy),_t(Ie(".backdrop",Zn),E2),_t(Ie(".notice",Zn),S2),_t(Ie(".link",Zn),py,{margin:"15px 20px 15px 10px",alignSelf:"center"})}function P2(){Zn||(T2(),jt.bind(Zn,".backdrop","click",function(e){document.body.removeChild(Zn)})),document.body.appendChild(Zn)}function Fe(e){e=j({},R2,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),O2(this._container),this._init(this._container,this._moddle,e)}ie(Fe,Gr),Fe.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(f){throw this._emit("import.parse.complete",{error:f}),f}let s=a.rootElement;const l=a.references,c=a.warnings,u=a.elementsById;o=o.concat(c),s=this._emit("import.parse.complete",i({error:null,definitions:s,elementsById:u,references:l,warnings:o}))||s;const d=await this.importDefinitions(s,n);return o=o.concat(d.warnings),this._emit("import.done",{error:null,warnings:o}),{warnings:o}}catch(a){let s=a;throw o=o.concat(s.warnings||[]),Tl(s,o),s=$2(s),this._emit("import.done",{error:s,warnings:s.warnings}),s}},Fe.prototype.importDefinitions=async function(t,n){return this._setDefinitions(t),{warnings:(await this.open(n)).warnings}},Fe.prototype.open=async function(t){const n=this._definitions;let r=t;if(!n){const o=new Error("no XML imported");throw Tl(o,[]),o}if(typeof t=="string"&&(r=A2(n,t),!r)){const o=new Error("BPMNDiagram <"+t+"> not found");throw Tl(o,[]),o}try{this.clear()}catch(o){throw Tl(o,[]),o}const{warnings:i}=await y2(this,n,r);return{warnings:i}},Fe.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},Fe.prototype.saveSVG=async function(){this._emit("saveSVG.start");let t,n;try{const r=this.get("canvas"),i=r.getActiveLayer(),o=Ie(":scope > defs",r._svg),a=lv(i),s=o?"<defs>"+lv(o)+"</defs>":"",l=i.getBBox();t=`<?xml version="1.0" encoding="utf-8"?>
|
|
7
|
+
<!-- created with bpmn-js / http://bpmn.io -->
|
|
8
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
9
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="`+l.width+'" height="'+l.height+'" viewBox="'+l.x+" "+l.y+" "+l.width+" "+l.height+'" version="1.1">'+s+a+"</svg>"}catch(r){n=r}if(this._emit("saveSVG.done",{error:n,svg:t}),n)throw n;return{svg:t}},Fe.prototype._setDefinitions=function(e){this._definitions=e},Fe.prototype.getModules=function(){return this._modules},Fe.prototype.clear=function(){this.getDefinitions()&&Gr.prototype.clear.call(this)},Fe.prototype.destroy=function(){Gr.prototype.destroy.call(this),Kn(this._container)},Fe.prototype.on=function(e,t,n,r){return this.get("eventBus").on(e,t,n,r)},Fe.prototype.off=function(e,t){this.get("eventBus").off(e,t)},Fe.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=Ie(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},Fe.prototype.getDefinitions=function(){return this._definitions},Fe.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},Fe.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=j(un(n,["additionalModules"]),{canvas:j({},n.canvas,{container:e}),modules:a});Gr.call(this,s),n&&n.container&&this.attachTo(n.container)},Fe.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},Fe.prototype._createContainer=function(e){const t=ke('<div class="bjs-container"></div>');return _t(t,{width:hy(e.width),height:hy(e.height),position:e.position}),t},Fe.prototype._createModdle=function(e){const t=j({},this._moddleExtensions,e.moddleExtensions);return new h2(t)},Fe.prototype._modules=[];function Tl(e,t){return e.warnings=t,e}function $2(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 R2={width:"100%",height:"100%",position:"relative"};function hy(e){return e+(de(e)?"px":"")}function A2(e,t){return t&&Re(e.diagrams,function(n){return n.id===t})||null}function O2(e){const n='<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+dy+"</a>",r=ke(n);_t(Ie("svg",r),fy),_t(r,py,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(r),ge.bind(r,"click",function(i){P2(),i.preventDefault()})}function Ea(e){Fe.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)}ie(Ea,Fe),Ea.prototype._createModdle=function(e){var t=Fe.prototype._createModdle.call(this,e);return t.ids=new Un([32,36,1]),t},Ea.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 Se(e,t){return P(e,"bpmn:CallActivity")?!1:P(e,"bpmn:SubProcess")?(t=t||Pe(e),t&&P(t,"bpmndi:BPMNPlane")?!0:t&&!!t.isExpanded):P(e,"bpmn:Participant")?!!Q(e).processRef:!0}function lt(e){if(!(!P(e,"bpmn:Participant")&&!P(e,"bpmn:Lane"))){var t=Pe(e).isHorizontal;return t===void 0?!0:t}}function M2(e){return e&&Q(e).isInterrupting!==!1}function St(e){return e&&!!Q(e).triggeredByEvent}function bo(e,t){var n=Q(e).eventDefinitions;return kr(n,function(r){return P(r,t)})}function I2(e){return bo(e,"bpmn:ErrorEventDefinition")}function D2(e){return bo(e,"bpmn:EscalationEventDefinition")}function N2(e){return bo(e,"bpmn:CompensateEventDefinition")}var Sa={width:90,height:20},my=15;function Mi(e){return P(e,"bpmn:Event")||P(e,"bpmn:Gateway")||P(e,"bpmn:DataStoreReference")||P(e,"bpmn:DataObjectReference")||P(e,"bpmn:DataInput")||P(e,"bpmn:DataOutput")||P(e,"bpmn:SequenceFlow")||P(e,"bpmn:MessageFlow")||P(e,"bpmn:Group")}function Pl(e){return Te(e.label)}function B2(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)],i=k2(e),o=Math.atan((r.y-n.y)/(r.x-n.x)),a=i.x,s=i.y;return Math.abs(o)<Math.PI/2?s-=my:a+=my,{x:a,y:s}}function k2(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)];return{x:n.x+(r.x-n.x)/2,y:n.y+(r.y-n.y)/2}}function lf(e){return e.waypoints?B2(e.waypoints):P(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+Sa.height/2}:{x:e.x+e.width/2,y:e.y+e.height+Sa.height/2}}function L2(e,t){var n,r,i,o=e.label;return o&&o.bounds?(i=o.bounds,r={width:Math.max(Sa.width,i.width),height:i.height},n={x:i.x+i.width/2,y:i.y+i.height/2}):(n=lf(t),r=Sa),j({x:n.x-r.width/2,y:n.y-r.height/2},r)}function gy(e){if(P(e,"bpmn:FlowElement")||P(e,"bpmn:Participant")||P(e,"bpmn:Lane")||P(e,"bpmn:SequenceFlow")||P(e,"bpmn:MessageFlow")||P(e,"bpmn:DataInput")||P(e,"bpmn:DataOutput"))return"name";if(P(e,"bpmn:TextAnnotation"))return"text";if(P(e,"bpmn:Group"))return"categoryValueRef"}function j2(e){var t=e.categoryValueRef;return t&&t.value||""}function Zt(e){var t=e.businessObject,n=gy(t);if(n)return n==="categoryValueRef"?j2(t):t[n]||""}function F2(e,t){var n=e.businessObject,r=gy(n);return r&&(r==="categoryValueRef"?n.categoryValueRef.value=t:n[r]=t),e}var cf="hsl(225, 10%, 15%)",H2="white";function Qn(e,t){return kr(e.eventDefinitions,function(n){return n.$type===t})}function z2(e){return e.$type==="bpmn:IntermediateThrowEvent"||e.$type==="bpmn:EndEvent"}function V2(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection}function we(e,t,n){var r=Pe(e);return n||r.get("color:background-color")||r.get("bioc:fill")||t||H2}function te(e,t,n){var r=Pe(e);return n||r.get("color:border-color")||r.get("bioc:stroke")||t||cf}function Ca(e,t,n,r){var i=Pe(e),o=i.get("label");return r||o&&o.get("color:color")||t||te(e,n)}function W2(e){var t=e.x+e.width/2,n=e.y+e.height/2,r=e.width/2,i=[["M",t,n],["m",0,-r],["a",r,r,0,1,1,0,2*r],["a",r,r,0,1,1,0,-2*r],["z"]];return Ti(i)}function G2(e,t){var n=e.x,r=e.y,i=e.width,o=e.height,a=[["M",n+t,r],["l",i-t*2,0],["a",t,t,0,0,1,t,t],["l",0,o-t*2],["a",t,t,0,0,1,-t,t],["l",t*2-i,0],["a",t,t,0,0,1,-t,-t],["l",0,t*2-o],["a",t,t,0,0,1,t,-t],["z"]];return Ti(a)}function U2(e){var t=e.width,n=e.height,r=e.x,i=e.y,o=t/2,a=n/2,s=[["M",r+o,i],["l",o,a],["l",-o,a],["l",-o,-a],["z"]];return Ti(s)}function q2(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=[["M",t,n],["l",r,0],["l",0,i],["l",-r,0],["z"]];return Ti(o)}function Ta(e,t={}){return{width:pn(e,t),height:Ht(e,t)}}function pn(e,t={}){return It(t,"width")?t.width:e.width}function Ht(e,t={}){return It(t,"height")?t.height:e.height}var K2=new Un,Y2=10,$l=3,X2=1.5,Rl=10,xo=.95,Z2=1,Q2=.25;function Ii(e,t,n,r,i,o,a){fr.call(this,t,a);var s=e&&e.defaultFillColor,l=e&&e.defaultStrokeColor,c=e&&e.defaultLabelColor;function u(A){return n.computeStyle(A,{strokeLinecap:"round",strokeLinejoin:"round",stroke:cf,strokeWidth:2,fill:"white"})}function d(A){return n.computeStyle(A,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:cf,strokeWidth:2})}function f(A,E){var{ref:T={x:0,y:0},scale:D=1,element:B,parentGfx:G=i._svg}=E,ae=le("marker",{id:A,viewBox:"0 0 20 20",refX:T.x,refY:T.y,markerWidth:20*D,markerHeight:20*D,orient:"auto"});pe(ae,B);var se=Ie(":scope > defs",G);se||(se=le("defs"),pe(G,se)),pe(se,ae)}function p(A,E,T,D){var B=K2.nextPrefixed("marker-");return m(A,B,E,T,D),"url(#"+B+")"}function m(A,E,T,D,B){if(T==="sequenceflow-end"){var G=le("path",{d:"M 1 5 L 11 10 L 1 15 Z",...u({fill:B,stroke:B,strokeWidth:1})});f(E,{element:G,ref:{x:11,y:10},scale:.5,parentGfx:A})}if(T==="messageflow-start"){var ae=le("circle",{cx:6,cy:6,r:3.5,...u({fill:D,stroke:B,strokeWidth:1,strokeDasharray:[1e4,1]})});f(E,{element:ae,ref:{x:6,y:6},parentGfx:A})}if(T==="messageflow-end"){var se=le("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...u({fill:D,stroke:B,strokeWidth:1,strokeDasharray:[1e4,1]})});f(E,{element:se,ref:{x:8.5,y:5},parentGfx:A})}if(T==="association-start"){var ye=le("path",{d:"M 11 5 L 1 10 L 11 15",...d({fill:"none",stroke:B,strokeWidth:1.5,strokeDasharray:[1e4,1]})});f(E,{element:ye,ref:{x:1,y:10},scale:.5,parentGfx:A})}if(T==="association-end"){var dt=le("path",{d:"M 1 5 L 11 10 L 1 15",...d({fill:"none",stroke:B,strokeWidth:1.5,strokeDasharray:[1e4,1]})});f(E,{element:dt,ref:{x:11,y:10},scale:.5,parentGfx:A})}if(T==="conditional-flow-marker"){var Dn=le("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...u({fill:D,stroke:B})});f(E,{element:Dn,ref:{x:-1,y:10},scale:.5,parentGfx:A})}if(T==="conditional-default-flow-marker"){var qt=le("path",{d:"M 6 4 L 10 16",...u({stroke:B,fill:"none"})});f(E,{element:qt,ref:{x:0,y:10},scale:.5,parentGfx:A})}}function v(A,E,T,D,B={}){pt(D)&&(B=D,D=0),D=D||0,B=u(B);var G=E/2,ae=T/2,se=le("circle",{cx:G,cy:ae,r:Math.round((E+T)/4-D),...B});return pe(A,se),se}function g(A,E,T,D,B,G){pt(B)&&(G=B,B=0),B=B||0,G=u(G);var ae=le("rect",{x:B,y:B,width:E-B*2,height:T-B*2,rx:D,ry:D,...G});return pe(A,ae),ae}function x(A,E,T,D){var B=E/2,G=T/2,ae=[{x:B,y:0},{x:E,y:G},{x:B,y:T},{x:0,y:G}],se=ae.map(function(dt){return dt.x+","+dt.y}).join(" ");D=u(D);var ye=le("polygon",{...D,points:se});return pe(A,ye),ye}function w(A,E,T,D){T=d(T);var B=dl(E,T,D);return pe(A,B),B}function b(A,E,T){return w(A,E,T,5)}function y(A,E,T){T=d(T);var D=le("path",{...T,d:E});return pe(A,D),D}function _(A,E,T,D){return y(E,T,j({"data-marker":A},D))}function S(A){return Y[A]}function C(A){return function(E,T,D){return S(A)(E,T,D)}}var $={"bpmn:MessageEventDefinition":function(A,E,T={},D){var B=r.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:E.width,containerHeight:E.height,position:{mx:.235,my:.315}}),G=D?te(E,l,T.stroke):we(E,s,T.fill),ae=D?we(E,s,T.fill):te(E,l,T.stroke),se=y(A,B,{fill:G,stroke:ae,strokeWidth:1});return se},"bpmn:TimerEventDefinition":function(A,E,T={}){var D=v(A,E.width,E.height,.2*E.height,{fill:we(E,s,T.fill),stroke:te(E,l,T.stroke),strokeWidth:2}),B=r.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:E.width,containerHeight:E.height,position:{mx:.5,my:.5}});y(A,B,{stroke:te(E,l,T.stroke),strokeWidth:2});for(var G=0;G<12;G++){var ae=r.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:E.width,containerHeight:E.height,position:{mx:.5,my:.5}}),se=E.width/2,ye=E.height/2;y(A,ae,{strokeWidth:1,stroke:te(E,l,T.stroke),transform:"rotate("+G*30+","+ye+","+se+")"})}return D},"bpmn:EscalationEventDefinition":function(A,E,T={},D){var B=r.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:.5,my:.2}}),G=D?te(E,l,T.stroke):we(E,s,T.fill);return y(A,B,{fill:G,stroke:te(E,l,T.stroke),strokeWidth:1})},"bpmn:ConditionalEventDefinition":function(A,E,T={}){var D=r.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:.5,my:.222}});return y(A,D,{fill:we(E,s,T.fill),stroke:te(E,l,T.stroke),strokeWidth:1})},"bpmn:LinkEventDefinition":function(A,E,T={},D){var B=r.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:.57,my:.263}}),G=D?te(E,l,T.stroke):we(E,s,T.fill);return y(A,B,{fill:G,stroke:te(E,l,T.stroke),strokeWidth:1})},"bpmn:ErrorEventDefinition":function(A,E,T={},D){var B=r.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:E.width,containerHeight:E.height,position:{mx:.2,my:.722}}),G=D?te(E,l,T.stroke):we(E,s,T.fill);return y(A,B,{fill:G,stroke:te(E,l,T.stroke),strokeWidth:1})},"bpmn:CancelEventDefinition":function(A,E,T={},D){var B=r.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:.638,my:-.055}}),G=D?te(E,l,T.stroke):"none",ae=y(A,B,{fill:G,stroke:te(E,l,T.stroke),strokeWidth:1});return zv(ae,45),ae},"bpmn:CompensateEventDefinition":function(A,E,T={},D){var B=r.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:.22,my:.5}}),G=D?te(E,l,T.stroke):we(E,s,T.fill);return y(A,B,{fill:G,stroke:te(E,l,T.stroke),strokeWidth:1})},"bpmn:SignalEventDefinition":function(A,E,T={},D){var B=r.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:E.width,containerHeight:E.height,position:{mx:.5,my:.2}}),G=D?te(E,l,T.stroke):we(E,s,T.fill);return y(A,B,{strokeWidth:1,fill:G,stroke:te(E,l,T.stroke)})},"bpmn:MultipleEventDefinition":function(A,E,T={},D){var B=r.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:E.width,containerHeight:E.height,position:{mx:.222,my:.36}}),G=D?te(E,l,T.stroke):we(E,s,T.fill);return y(A,B,{fill:G,strokeWidth:1})},"bpmn:ParallelMultipleEventDefinition":function(A,E,T={}){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 y(A,D,{fill:we(E,s,T.fill),stroke:te(E,l,T.stroke),strokeWidth:1})},"bpmn:TerminateEventDefinition":function(A,E,T={}){var D=v(A,E.width,E.height,8,{fill:te(E,l,T.stroke),stroke:te(E,l,T.stroke),strokeWidth:4});return D}};function M(A,E,T={}){var D=Q(A),B=z2(D);return D.get("eventDefinitions")&&D.get("eventDefinitions").length>1?D.get("parallelMultiple")?$["bpmn:ParallelMultipleEventDefinition"](E,A,T,B):$["bpmn:MultipleEventDefinition"](E,A,T,B):Qn(D,"bpmn:MessageEventDefinition")?$["bpmn:MessageEventDefinition"](E,A,T,B):Qn(D,"bpmn:TimerEventDefinition")?$["bpmn:TimerEventDefinition"](E,A,T,B):Qn(D,"bpmn:ConditionalEventDefinition")?$["bpmn:ConditionalEventDefinition"](E,A,T,B):Qn(D,"bpmn:SignalEventDefinition")?$["bpmn:SignalEventDefinition"](E,A,T,B):Qn(D,"bpmn:EscalationEventDefinition")?$["bpmn:EscalationEventDefinition"](E,A,T,B):Qn(D,"bpmn:LinkEventDefinition")?$["bpmn:LinkEventDefinition"](E,A,T,B):Qn(D,"bpmn:ErrorEventDefinition")?$["bpmn:ErrorEventDefinition"](E,A,T,B):Qn(D,"bpmn:CancelEventDefinition")?$["bpmn:CancelEventDefinition"](E,A,T,B):Qn(D,"bpmn:CompensateEventDefinition")?$["bpmn:CompensateEventDefinition"](E,A,T,B):Qn(D,"bpmn:TerminateEventDefinition")?$["bpmn:TerminateEventDefinition"](E,A,T,B):null}var R={ParticipantMultiplicityMarker:function(A,E,T={}){var D=pn(E,T),B=Ht(E,T),G=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:D,containerHeight:B,position:{mx:(D/2-6)/D,my:(B-15)/B}});_("participant-multiplicity",A,G,{strokeWidth:2,fill:we(E,s,T.fill),stroke:te(E,l,T.stroke)})},SubProcessMarker:function(A,E,T={}){var D=g(A,14,14,0,{strokeWidth:1,fill:we(E,s,T.fill),stroke:te(E,l,T.stroke)});gt(D,E.width/2-7.5,E.height-20);var B=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}});_("sub-process",A,B,{fill:we(E,s,T.fill),stroke:te(E,l,T.stroke)})},ParallelMarker:function(A,E,T){var D=pn(E,T),B=Ht(E,T),G=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:D,containerHeight:B,position:{mx:(D/2+T.parallel)/D,my:(B-20)/B}});_("parallel",A,G,{fill:we(E,s,T.fill),stroke:te(E,l,T.stroke)})},SequentialMarker:function(A,E,T){var D=r.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:(E.width/2+T.seq)/E.width,my:(E.height-19)/E.height}});_("sequential",A,D,{fill:we(E,s,T.fill),stroke:te(E,l,T.stroke)})},CompensationMarker:function(A,E,T){var D=r.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:(E.width/2+T.compensation)/E.width,my:(E.height-13)/E.height}});_("compensation",A,D,{strokeWidth:1,fill:we(E,s,T.fill),stroke:te(E,l,T.stroke)})},LoopMarker:function(A,E,T){var D=pn(E,T),B=Ht(E,T),G=r.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:D,containerHeight:B,position:{mx:(D/2+T.loop)/D,my:(B-7)/B}});_("loop",A,G,{strokeWidth:1.5,fill:"none",stroke:te(E,l,T.stroke),strokeMiterlimit:.5})},AdhocMarker:function(A,E,T){var D=pn(E,T),B=Ht(E,T),G=r.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:D,containerHeight:B,position:{mx:(D/2+T.adhoc)/D,my:(B-15)/B}});_("adhoc",A,G,{strokeWidth:1,fill:te(E,l,T.stroke),stroke:te(E,l,T.stroke)})}};function I(A,E,T,D){R[A](E,T,D)}function L(A,E,T,D={}){D={fill:D.fill,stroke:D.stroke,width:pn(E,D),height:Ht(E,D)};var B=Q(E),G=T&&T.includes("SubProcessMarker");G?D={...D,seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:D={...D,seq:-5,parallel:-6,compensation:-27,loop:0,adhoc:10},N(T,function(ye){I(ye,A,E,D)}),B.get("isForCompensation")&&I("CompensationMarker",A,E,D),P(B,"bpmn:AdHocSubProcess")&&I("AdhocMarker",A,E,D);var ae=B.get("loopCharacteristics"),se=ae&&ae.get("isSequential");ae&&(se===void 0&&I("LoopMarker",A,E,D),se===!1&&I("ParallelMarker",A,E,D),se===!0&&I("SequentialMarker",A,E,D))}function k(A,E,T={}){T=j({size:{width:100}},T);var D=o.createText(E||"",T);return Ce(D).add("djs-label"),pe(A,D),D}function V(A,E,T,D={}){var B=Q(E),G=Ta({x:E.x,y:E.y,width:E.width,height:E.height},D);return k(A,B.name,{align:T,box:G,padding:7,style:{fill:Ca(E,c,l,D.stroke)}})}function W(A,E,T={}){var D={width:90,height:30,x:E.width/2+E.x,y:E.height/2+E.y};return k(A,Zt(E),{box:D,fitBox:!0,style:j({},o.getExternalStyle(),{fill:Ca(E,c,l,T.stroke)})})}function q(A,E,T,D={}){var B=lt(T),G=k(A,E,{box:{height:30,width:B?Ht(T,D):pn(T,D)},align:"center-middle",style:{fill:Ca(T,c,l,D.stroke)}});if(B){var ae=-1*Ht(T,D);xl(G,0,-ae,270)}}function H(A,E,T={}){var{width:D,height:B}=Ta(E,T);return g(A,D,B,Rl,{...T,fill:we(E,s,T.fill),fillOpacity:xo,stroke:te(E,l,T.stroke)})}function Z(A,E,T={}){var D=Q(E),B=we(E,s,T.fill),G=te(E,l,T.stroke);return(D.get("associationDirection")==="One"||D.get("associationDirection")==="Both")&&(T.markerEnd=p(A,"association-end",B,G)),D.get("associationDirection")==="Both"&&(T.markerStart=p(A,"association-start",B,G)),T=$e(T,["markerStart","markerEnd"]),b(A,E.waypoints,{...T,stroke:G,strokeDasharray:"0, 5"})}function U(A,E,T={}){var D=we(E,s,T.fill),B=te(E,l,T.stroke),G=r.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:.474,my:.296}}),ae=y(A,G,{fill:D,fillOpacity:xo,stroke:B}),se=Q(E);if(V2(se)){var ye=r.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:.33,my:(E.height-18)/E.height}});y(A,ye,{strokeWidth:2,fill:D,stroke:B})}return ae}function X(A,E,T={}){return v(A,E.width,E.height,{fillOpacity:xo,...T,fill:we(E,s,T.fill),stroke:te(E,l,T.stroke)})}function re(A,E,T={}){return x(A,E.width,E.height,{fill:we(E,s,T.fill),fillOpacity:xo,stroke:te(E,l,T.stroke)})}function F(A,E,T={}){var D=g(A,pn(E,T),Ht(E,T),0,{fill:we(E,s,T.fill),fillOpacity:T.fillOpacity||xo,stroke:te(E,l,T.stroke),strokeWidth:1.5}),B=Q(E);if(P(B,"bpmn:Lane")){var G=B.get("name");q(A,G,E,T)}return D}function z(A,E,T={}){var D=H(A,E,T);St(E)&&ee(D,{strokeDasharray:"0, 5.5",strokeWidth:2.5});var B=Se(E);return V(A,E,B?"center-top":"center-middle",T),B?L(A,E,void 0,T):L(A,E,["SubProcessMarker"],T),D}function J(A,E,T={}){var D=H(A,E,T);return V(A,E,"center-middle",T),L(A,E,void 0,T),D}var Y=this.handlers={"bpmn:AdHocSubProcess":function(A,E,T={}){return Se(E)?T=$e(T,["fill","stroke","width","height"]):T=$e(T,["fill","stroke"]),z(A,E,T)},"bpmn:Association":function(A,E,T={}){return T=$e(T,["fill","stroke"]),Z(A,E,T)},"bpmn:BoundaryEvent":function(A,E,T={}){var{renderIcon:D=!0}=T;T=$e(T,["fill","stroke"]);var B=Q(E),G=B.get("cancelActivity");T={strokeWidth:1.5,fill:we(E,s,T.fill),fillOpacity:Z2,stroke:te(E,l,T.stroke)},G||(T.strokeDasharray="6");var ae=X(A,E,T);return v(A,E.width,E.height,$l,{...T,fill:"none"}),D&&M(E,A,T),ae},"bpmn:BusinessRuleTask":function(A,E,T={}){T=$e(T,["fill","stroke"]);var D=J(A,E,T),B=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),G=y(A,B);ee(G,{fill:we(E,s,T.fill),stroke:te(E,l,T.stroke),strokeWidth:1});var ae=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),se=y(A,ae);return ee(se,{fill:te(E,l,T.stroke),stroke:te(E,l,T.stroke),strokeWidth:1}),D},"bpmn:CallActivity":function(A,E,T={}){return T=$e(T,["fill","stroke"]),z(A,E,{strokeWidth:5,...T})},"bpmn:ComplexGateway":function(A,E,T={}){T=$e(T,["fill","stroke"]);var D=re(A,E,T),B=r.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:E.width,containerHeight:E.height,position:{mx:.46,my:.26}});return y(A,B,{fill:te(E,l,T.stroke),stroke:te(E,l,T.stroke),strokeWidth:1}),D},"bpmn:DataInput":function(A,E,T={}){T=$e(T,["fill","stroke"]);var D=r.getRawPath("DATA_ARROW"),B=U(A,E,T);return y(A,D,{fill:"none",stroke:te(E,l,T.stroke),strokeWidth:1}),B},"bpmn:DataInputAssociation":function(A,E,T={}){return T=$e(T,["fill","stroke"]),Z(A,E,{...T,markerEnd:p(A,"association-end",we(E,s,T.fill),te(E,l,T.stroke))})},"bpmn:DataObject":function(A,E,T={}){return T=$e(T,["fill","stroke"]),U(A,E,T)},"bpmn:DataObjectReference":C("bpmn:DataObject"),"bpmn:DataOutput":function(A,E,T={}){T=$e(T,["fill","stroke"]);var D=r.getRawPath("DATA_ARROW"),B=U(A,E,T);return y(A,D,{strokeWidth:1,fill:we(E,s,T.fill),stroke:te(E,l,T.stroke)}),B},"bpmn:DataOutputAssociation":function(A,E,T={}){return T=$e(T,["fill","stroke"]),Z(A,E,{...T,markerEnd:p(A,"association-end",we(E,s,T.fill),te(E,l,T.stroke))})},"bpmn:DataStoreReference":function(A,E,T={}){T=$e(T,["fill","stroke"]);var D=r.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:E.width,containerHeight:E.height,position:{mx:0,my:.133}});return y(A,D,{fill:we(E,s,T.fill),fillOpacity:xo,stroke:te(E,l,T.stroke),strokeWidth:2})},"bpmn:EndEvent":function(A,E,T={}){var{renderIcon:D=!0}=T;T=$e(T,["fill","stroke"]);var B=X(A,E,{...T,strokeWidth:4});return D&&M(E,A,T),B},"bpmn:EventBasedGateway":function(A,E,T={}){T=$e(T,["fill","stroke"]);var D=Q(E),B=re(A,E,T);v(A,E.width,E.height,E.height*.2,{fill:we(E,"none",T.fill),stroke:te(E,l,T.stroke),strokeWidth:1});var G=D.get("eventGatewayType"),ae=!!D.get("instantiate");function se(){var dt=r.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:E.width,containerHeight:E.height,position:{mx:.36,my:.44}});y(A,dt,{fill:"none",stroke:te(E,l,T.stroke),strokeWidth:2})}if(G==="Parallel"){var ye=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:E.width,containerHeight:E.height,position:{mx:.474,my:.296}});y(A,ye,{fill:"none",stroke:te(E,l,T.stroke),strokeWidth:1})}else G==="Exclusive"&&(ae||v(A,E.width,E.height,E.height*.26,{fill:"none",stroke:te(E,l,T.stroke),strokeWidth:1}),se());return B},"bpmn:ExclusiveGateway":function(A,E,T={}){T=$e(T,["fill","stroke"]);var D=re(A,E,T),B=r.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:E.width,containerHeight:E.height,position:{mx:.32,my:.3}}),G=Pe(E);return G.get("isMarkerVisible")&&y(A,B,{fill:te(E,l,T.stroke),stroke:te(E,l,T.stroke),strokeWidth:1}),D},"bpmn:Gateway":function(A,E,T={}){return T=$e(T,["fill","stroke"]),re(A,E,T)},"bpmn:Group":function(A,E,T={}){return T=$e(T,["fill","stroke","width","height"]),g(A,E.width,E.height,Rl,{stroke:te(E,l,T.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:pn(E,T),height:Ht(E,T)})},"bpmn:InclusiveGateway":function(A,E,T={}){T=$e(T,["fill","stroke"]);var D=re(A,E,T);return v(A,E.width,E.height,E.height*.24,{fill:we(E,s,T.fill),stroke:te(E,l,T.stroke),strokeWidth:2.5}),D},"bpmn:IntermediateEvent":function(A,E,T={}){var{renderIcon:D=!0}=T;T=$e(T,["fill","stroke"]);var B=X(A,E,{...T,strokeWidth:1.5});return v(A,E.width,E.height,$l,{fill:"none",stroke:te(E,l,T.stroke),strokeWidth:1.5}),D&&M(E,A,T),B},"bpmn:IntermediateCatchEvent":C("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":C("bpmn:IntermediateEvent"),"bpmn:Lane":function(A,E,T={}){return T=$e(T,["fill","stroke","width","height"]),F(A,E,{...T,fillOpacity:Q2})},"bpmn:ManualTask":function(A,E,T={}){T=$e(T,["fill","stroke"]);var D=J(A,E,T),B=r.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return y(A,B,{fill:we(E,s,T.fill),stroke:te(E,l,T.stroke),strokeWidth:.5}),D},"bpmn:MessageFlow":function(A,E,T={}){T=$e(T,["fill","stroke"]);var D=Q(E),B=Pe(E),G=we(E,s,T.fill),ae=te(E,l,T.stroke),se=b(A,E.waypoints,{markerEnd:p(A,"messageflow-end",G,ae),markerStart:p(A,"messageflow-start",G,ae),stroke:ae,strokeDasharray:"10, 11",strokeWidth:1.5});if(D.get("messageRef")){var ye=se.getPointAtLength(se.getTotalLength()/2),dt=r.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:ye.x,y:ye.y}}),Dn={strokeWidth:1};B.get("messageVisibleKind")==="initiating"?(Dn.fill=G,Dn.stroke=ae):(Dn.fill=ae,Dn.stroke=G);var qt=y(A,dt,Dn),Ye=D.get("messageRef"),Nn=Ye.get("name"),Me=k(A,Nn,{align:"center-top",fitBox:!0,style:{fill:ae}}),Ei=qt.getBBox(),$d=Me.getBBox(),cn=ye.x-$d.width/2,ue=ye.y+Ei.height/2+Y2;xl(Me,cn,ue,0)}return se},"bpmn:ParallelGateway":function(A,E,T={}){T=$e(T,["fill","stroke"]);var D=re(A,E,T),B=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:E.width,containerHeight:E.height,position:{mx:.46,my:.2}});return y(A,B,{fill:te(E,l,T.stroke),stroke:te(E,l,T.stroke),strokeWidth:1}),D},"bpmn:Participant":function(A,E,T={}){T=$e(T,["fill","stroke","width","height"]);var D=F(A,E,T),B=Se(E),G=lt(E),ae=Q(E),se=ae.get("name");if(B){var ye=G?[{x:30,y:0},{x:30,y:Ht(E,T)}]:[{x:0,y:30},{x:pn(E,T),y:30}];w(A,ye,{stroke:te(E,l,T.stroke),strokeWidth:X2}),q(A,se,E,T)}else{var dt=Ta(E,T);G||(dt.height=pn(E,T),dt.width=Ht(E,T));var Dn=k(A,se,{box:dt,align:"center-middle",style:{fill:Ca(E,c,l,T.stroke)}});if(!G){var qt=-1*Ht(E,T);xl(Dn,0,-qt,270)}}return ae.get("participantMultiplicity")&&I("ParticipantMultiplicityMarker",A,E,T),D},"bpmn:ReceiveTask":function(A,E,T={}){T=$e(T,["fill","stroke"]);var D=Q(E),B=J(A,E,T),G;return D.get("instantiate")?(v(A,28,28,20*.22,{fill:we(E,s,T.fill),stroke:te(E,l,T.stroke),strokeWidth:1}),G=r.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):G=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),y(A,G,{fill:we(E,s,T.fill),stroke:te(E,l,T.stroke),strokeWidth:1}),B},"bpmn:ScriptTask":function(A,E,T={}){T=$e(T,["fill","stroke"]);var D=J(A,E,T),B=r.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return y(A,B,{fill:we(E,s,T.fill),stroke:te(E,l,T.stroke),strokeWidth:1}),D},"bpmn:SendTask":function(A,E,T={}){T=$e(T,["fill","stroke"]);var D=J(A,E,T),B=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return y(A,B,{fill:te(E,l,T.stroke),stroke:we(E,s,T.fill),strokeWidth:1}),D},"bpmn:SequenceFlow":function(A,E,T={}){T=$e(T,["fill","stroke"]);var D=we(E,s,T.fill),B=te(E,l,T.stroke),G=b(A,E.waypoints,{markerEnd:p(A,"sequenceflow-end",D,B),stroke:B}),ae=Q(E),{source:se}=E;if(se){var ye=Q(se);ae.get("conditionExpression")&&P(ye,"bpmn:Activity")&&ee(G,{markerStart:p(A,"conditional-flow-marker",D,B)}),ye.get("default")&&(P(ye,"bpmn:Gateway")||P(ye,"bpmn:Activity"))&&ye.get("default")===ae&&ee(G,{markerStart:p(A,"conditional-default-flow-marker",D,B)})}return G},"bpmn:ServiceTask":function(A,E,T={}){T=$e(T,["fill","stroke"]);var D=J(A,E,T);v(A,10,10,{fill:we(E,s,T.fill),stroke:"none",transform:"translate(6, 6)"});var B=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});y(A,B,{fill:we(E,s,T.fill),stroke:te(E,l,T.stroke),strokeWidth:1}),v(A,10,10,{fill:we(E,s,T.fill),stroke:"none",transform:"translate(11, 10)"});var G=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return y(A,G,{fill:we(E,s,T.fill),stroke:te(E,l,T.stroke),strokeWidth:1}),D},"bpmn:StartEvent":function(A,E,T={}){var{renderIcon:D=!0}=T;T=$e(T,["fill","stroke"]);var B=Q(E);B.get("isInterrupting")||(T={...T,strokeDasharray:"6"});var G=X(A,E,T);return D&&M(E,A,T),G},"bpmn:SubProcess":function(A,E,T={}){return Se(E)?T=$e(T,["fill","stroke","width","height"]):T=$e(T,["fill","stroke"]),z(A,E,T)},"bpmn:Task":function(A,E,T={}){return T=$e(T,["fill","stroke"]),J(A,E,T)},"bpmn:TextAnnotation":function(A,E,T={}){T=$e(T,["fill","stroke","width","height"]);var{width:D,height:B}=Ta(E,T),G=g(A,D,B,0,0,{fill:"none",stroke:"none"}),ae=r.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:D,containerHeight:B,position:{mx:0,my:0}});y(A,ae,{stroke:te(E,l,T.stroke)});var se=Q(E),ye=se.get("text")||"";return k(A,ye,{align:"left-top",box:Ta(E,T),padding:7,style:{fill:Ca(E,c,l,T.stroke)}}),G},"bpmn:Transaction":function(A,E,T={}){Se(E)?T=$e(T,["fill","stroke","width","height"]):T=$e(T,["fill","stroke"]);var D=z(A,E,{strokeWidth:1.5,...T}),B=n.style(["no-fill","no-events"],{stroke:te(E,l,T.stroke),strokeWidth:1.5}),G=Se(E);return G||(T={}),g(A,pn(E,T),Ht(E,T),Rl-$l,$l,B),D},"bpmn:UserTask":function(A,E,T={}){T=$e(T,["fill","stroke"]);var D=J(A,E,T),B=15,G=12,ae=r.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:B,y:G}});y(A,ae,{fill:we(E,s,T.fill),stroke:te(E,l,T.stroke),strokeWidth:.5});var se=r.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:B,y:G}});y(A,se,{fill:we(E,s,T.fill),stroke:te(E,l,T.stroke),strokeWidth:.5});var ye=r.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:B,y:G}});return y(A,ye,{fill:te(E,l,T.stroke),stroke:te(E,l,T.stroke),strokeWidth:.5}),D},label:function(A,E,T={}){return W(A,E,T)}};this._drawPath=y,this._renderer=S}ie(Ii,fr),Ii.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],Ii.prototype.canRender=function(e){return P(e,"bpmn:BaseElement")},Ii.prototype.drawShape=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)},Ii.prototype.drawConnection=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)},Ii.prototype.getShapePath=function(e){return P(e,"bpmn:Event")?W2(e):P(e,"bpmn:Activity")?G2(e,Rl):P(e,"bpmn:Gateway")?U2(e):q2(e)};function $e(e,t=[]){return t.reduce((n,r)=>(e[r]&&(n[r]=e[r]),n),{})}var J2=0,eA={width:150,height:50};function tA(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function nA(e){return pt(e)?j({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}function rA(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 iA(e,t,n){for(var r=e.shift(),i=r,o;;){if(o=rA(i,n),o.width=i?o.width:0,i===" "||i===""||o.width<Math.round(t)||i.length<2)return oA(e,i,r,o);i=sA(i,o.width,t)}}function oA(e,t,n,r){if(t.length<n.length){var i=n.slice(t.length).trim();e.unshift(i)}return{width:r.width,height:r.height,text:t}}var vy="";function aA(e,t){var n=e.split(/(\s|-|\u00AD)/g),r,i=[],o=0;if(n.length>1)for(;r=n.shift();)if(r.length+o<t)i.push(r),o+=r.length;else{(r==="-"||r===vy)&&i.pop();break}var a=i[i.length-1];return a&&a===vy&&(i[i.length-1]="-"),i.join("")}function sA(e,t,n){var r=Math.max(e.length*(n/t),1),i=aA(e,r);return i||(i=e.slice(0,Math.max(Math.round(r-1),1))),i}function lA(){var e=document.getElementById("helper-svg");return e||(e=le("svg"),ee(e,{id:"helper-svg"}),_t(e,{visibility:"hidden",position:"fixed",width:0,height:0}),document.body.appendChild(e)),e}function Al(e){this._config=j({},{size:eA,padding:J2,style:{},align:"center-top"},e||{})}Al.prototype.createText=function(e,t){return this.layoutText(e,t).element},Al.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},Al.prototype.layoutText=function(e,t){var n=j({},this._config.size,t.box),r=j({},this._config.style,t.style),i=tA(t.align||this._config.align),o=nA(t.padding!==void 0?t.padding:this._config.padding),a=t.fitBox||!1,s=cA(r),l=e.split(/\u00AD?\r?\n/),c=[],u=n.width-o.left-o.right,d=le("text");ee(d,{x:0,y:0}),ee(d,r);var f=lA();for(pe(f,d);l.length;)c.push(iA(l,u,d));i.vertical==="middle"&&(o.top=o.bottom=0);var p=Lt(c,function(w,b,y){return w+(s||b.height)},0)+o.top+o.bottom,m=Lt(c,function(w,b,y){return b.width>w?b.width:w},0),v=o.top;i.vertical==="middle"&&(v+=(n.height-p)/2),v-=(s||c[0].height)/4;var g=le("text");ee(g,r),N(c,function(w){var b;switch(v+=s||w.height,i.horizontal){case"left":b=o.left;break;case"right":b=(a?m:u)-o.right-w.width;break;default:b=Math.max(((a?m:u)-w.width)/2+o.left,0)}var y=le("tspan");ee(y,{x:b,y:v}),y.textContent=w.text,pe(g,y)}),it(d);var x={width:m,height:p};return{dimensions:x,element:g}};function cA(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}var uA=12,dA=1.2,fA=30;function yy(e){var t=j({fontFamily:"Arial, sans-serif",fontSize:uA,fontWeight:"normal",lineHeight:dA},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,r=j({},t,{fontSize:n},e&&e.externalStyle||{}),i=new Al({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(fA,Math.round(s.height))}},this.createText=function(o,a){return i.createText(o,a||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return r}}yy.$inject=["config.textRenderer"];function pA(){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,l=n.containerWidth/r.width*n.xScaleFactor,c=0;c<r.heightElements.length;c++)a["y"+c]=r.heightElements[c]*s;for(var u=0;u<r.widthElements.length;u++)a["x"+u]=r.widthElements[u]*l}var d=vA(r.d,{mx:i,my:o,e:a});return d}}var hA=/\{([^{}]+)\}/g,mA=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;function gA(e,t,n){var r=n;return t.replace(mA,function(i,o,a,s,l){o=o||s,r&&(o in r&&(r=r[o]),typeof r=="function"&&l&&(r=r()))}),r=(r==null||r==n?e:r)+"",r}function vA(e,t){return String(e).replace(hA,function(n,r){return gA(n,r,t)})}const yA={__init__:["bpmnRenderer"],bpmnRenderer:["type",Ii],textRenderer:["type",yy],pathMap:["type",pA]};function bA(e,t){return t=t||{},e.replace(/{([^}]+)}/g,function(n,r){return t[r]||"{"+r+"}"})}const Ol={translate:["value",bA]};function Ml(e,t,n){return j({id:e.id,type:e.$type,businessObject:e,di:t},n)}function xA(e,t,n){var r=e.waypoint;return!r||r.length<2?[fe(t),fe(n)]:r.map(function(i){return{x:i.x,y:i.y}})}function by(e,t,n){return new Error(`element ${Et(t)} referenced by ${Et(e)}#${n} not yet drawn`)}function vr(e,t,n,r,i){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=r,this._textRenderer=i}vr.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],vr.prototype.add=function(e,t,n){var r,i,o;if(P(t,"bpmndi:BPMNPlane")){var a=P(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};r=this._elementFactory.createRoot(Ml(e,t,a)),this._canvas.addRootElement(r)}else if(P(t,"bpmndi:BPMNShape")){var s=!Se(e,t),l=wA(e);i=n&&(n.hidden||n.collapsed);var c=t.bounds;r=this._elementFactory.createShape(Ml(e,t,{collapsed:s,hidden:i,x:Math.round(c.x),y:Math.round(c.y),width:Math.round(c.width),height:Math.round(c.height),isFrame:l})),P(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,r),P(e,"bpmn:Lane")&&(o=0),P(e,"bpmn:DataStoreReference")&&(_A(n,fe(c))||(n=this._canvas.findRoot(n))),this._canvas.addShape(r,n,o)}else if(P(t,"bpmndi:BPMNEdge")){var u=this._getSource(e),d=this._getTarget(e);i=n&&(n.hidden||n.collapsed),r=this._elementFactory.createConnection(Ml(e,t,{hidden:i,source:u,target:d,waypoints:xA(t,u,d)})),P(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(r,n,o)}else throw new Error(`unknown di ${Et(t)} for element ${Et(e)}`);return Mi(e)&&Zt(r)&&this.addLabel(e,t,r),this._eventBus.fire("bpmnElement.added",{element:r}),r},vr.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${Et(e)}#attachedToRef`);var r=this._elementRegistry.get(n.id),i=r&&r.attachers;if(!r)throw by(e,n,"attachedToRef");t.host=r,i||(r.attachers=i=[]),i.indexOf(t)===-1&&i.push(t)},vr.prototype.addLabel=function(e,t,n){var r,i,o;return r=L2(t,n),i=Zt(n),i&&(r=this._textRenderer.getExternalLabelBounds(r,i)),o=this._elementFactory.createLabel(Ml(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!Zt(n),x:Math.round(r.x),y:Math.round(r.y),width:Math.round(r.width),height:Math.round(r.height)})),this._canvas.addShape(o,n.parent)},vr.prototype._getConnectedElement=function(e,t){var n,r,i=e.$type;if(r=e[t+"Ref"],t==="source"&&i==="bpmn:DataInputAssociation"&&(r=r&&r[0]),(t==="source"&&i==="bpmn:DataOutputAssociation"||t==="target"&&i==="bpmn:DataInputAssociation")&&(r=e.$parent),n=r&&this._getElement(r),n)return n;throw r?by(e,r,t+"Ref"):new Error(`${Et(e)}#${t} Ref not specified`)},vr.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},vr.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},vr.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};function _A(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 wA(e){return P(e,"bpmn:Group")}const EA={__depends__:[yA,{__depends__:[Ol],bpmnImporter:["type",vr]}]};function Pa(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(Math.random()*1e9)+"-"}Pa.prototype.next=function(){return this._prefix+ ++this._counter};var SA=new Pa("ov"),CA=500;function ht(e,t,n,r){this._eventBus=t,this._canvas=n,this._elementRegistry=r,this._ids=SA,this._overlayDefaults=j({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=TA(n.getContainer()),this._init()}ht.$inject=["config.overlays","eventBus","canvas","elementRegistry"],ht.prototype.get=function(e){if(kt(e)&&(e={id:e}),kt(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?_e(t.overlays,Bn({type:e.type})):t.overlays.slice():[]}else return e.type?_e(this._overlays,Bn({type:e.type})):e.id?this._overlays[e.id]:null},ht.prototype.add=function(e,t,n){if(pt(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=j({},this._overlayDefaults,n,{id:r,type:t,element:e,html:n.html}),this._addOverlay(n),r},ht.prototype.remove=function(e){var t=this.get(e)||[];me(t)||(t=[t]);var n=this;N(t,function(r){var i=n._getOverlayContainer(r.element,!0);if(r&&(Kn(r.html),Kn(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)}})},ht.prototype.isShown=function(){return this._overlayRoot.style.display!=="none"},ht.prototype.show=function(){Il(this._overlayRoot)},ht.prototype.hide=function(){Il(this._overlayRoot,!1)},ht.prototype.clear=function(){this._overlays={},this._overlayContainers=[],rl(this._overlayRoot)},ht.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,r=t.x,i=t.y;if(t.waypoints){var o=st(t);r=o.x,i=o.y}xy(n,r,i),$t(e.html,"data-container-id",t.id)},ht.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=st(r).width:a=r.width,i=t.right*-1+a}if(t.bottom!==void 0){var s;r.waypoints?s=st(r).height:s=r.height,o=t.bottom*-1+s}xy(n,i||0,o||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},ht.prototype._createOverlayContainer=function(e){var t=ke('<div class="djs-overlays" />');_t(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},ht.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";_y(this._overlayRoot,n)},ht.prototype._getOverlayContainer=function(e,t){var n=Re(this._overlayContainers,function(r){return r.element===e});return!n&&!t?this._createOverlayContainer(e):n},ht.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)),kt(r)&&(r=ke(r)),o=this._getOverlayContainer(n),i=ke('<div class="djs-overlay" data-overlay-id="'+t+'">'),_t(i,{position:"absolute"}),i.appendChild(r),e.type&&Ge(i).add("djs-overlay-"+e.type);var a=this._canvas.findRoot(n),s=this._canvas.getRootElement();Il(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())},ht.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(),l=!0;(r!==s||n&&(ft(i)&&i>t.scale||ft(o)&&o<t.scale))&&(l=!1),Il(a,l),this._updateOverlayScale(e,t)},ht.prototype._updateOverlayScale=function(e,t){var n=e.scale,r,i,o=e.htmlContainer,a,s="";n!==!0&&(n===!1?(r=1,i=1):(r=n.min,i=n.max),ft(r)&&t.scale<r&&(a=(1/t.scale||1)*r),ft(i)&&t.scale>i&&(a=(1/t.scale||1)*i)),ft(a)&&(s="scale("+a+","+a+")"),_y(o,s)},ht.prototype._updateOverlaysVisibilty=function(e){var t=this;N(this._overlays,function(n){t._updateOverlayVisibilty(n,e)})},ht.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});N(o,function(l){t.remove(l.id)});var a=t._getOverlayContainer(i);if(a){Kn(a.html);var s=t._overlayContainers.indexOf(a);s!==-1&&t._overlayContainers.splice(s,1)}}),e.on("element.changed",CA,function(r){var i=r.element,o=t._getOverlayContainer(i,!0);o&&(N(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&&Ge(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 TA(e){var t=ke('<div class="djs-overlay-container" />');return _t(t,{position:"absolute",width:0,height:0}),e.insertBefore(t,e.firstChild),t}function xy(e,t,n){_t(e,{left:t+"px",top:n+"px"})}function Il(e,t){e.style.display=t===!1?"none":""}function _y(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(n){e.style[n+"transform"]=t})}const Dl={__init__:["overlays"],overlays:["type",ht]};function wy(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(pv(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)})}wy.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];const uf={__init__:["changeSupport"],changeSupport:["type",wy]};var PA=1e3;function K(e){this._eventBus=e}K.$inject=["eventBus"];function $A(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}K.prototype.on=function(e,t,n,r,i,o){if((nt(t)||de(t))&&(o=i,i=r,r=n,n=t,t=null),nt(n)&&(o=i,i=r,r=n,n=PA),pt(i)&&(o=i,i=!1),!nt(r))throw new Error("handlerFn must be a function");me(e)||(e=[e]);var a=this._eventBus;N(e,function(s){var l=["commandStack",s,t].filter(function(c){return c}).join(".");a.on(l,n,i?$A(r,o):r,o)})},K.prototype.canExecute=yr("canExecute"),K.prototype.preExecute=yr("preExecute"),K.prototype.preExecuted=yr("preExecuted"),K.prototype.execute=yr("execute"),K.prototype.executed=yr("executed"),K.prototype.postExecute=yr("postExecute"),K.prototype.postExecuted=yr("postExecuted"),K.prototype.revert=yr("revert"),K.prototype.reverted=yr("reverted");function yr(e){return function(n,r,i,o,a){(nt(n)||de(n))&&(a=o,o=i,i=r,r=n,n=null),this.on(n,e,r,i,o,a)}}function df(e,t){t.invoke(K,this),this.executed(function(n){var r=n.context;r.rootElement?e.setRootElement(r.rootElement):r.rootElement=e.getRootElement()}),this.revert(function(n){var r=n.context;r.rootElement&&e.setRootElement(r.rootElement)})}ie(df,K),df.$inject=["canvas","injector"];const RA={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",df]};function $a(e){return CSS.escape(e)}var AA={"&":"&","<":"<",">":">",'"':""","'":"'"};function ff(e){return e=""+e,e&&e.replace(/[&<>"']/g,function(t){return AA[t]})}var Ey="_plane";function Sy(e){var t=e.id;return OA(t)}function br(e){var t=e.id;return P(e,"bpmn:SubProcess")?Cy(t):t}function Di(e){return Cy(e)}function Nl(e){var t=Pe(e);return P(t,"bpmndi:BPMNPlane")}function Cy(e){return e+Ey}function OA(e){return e.replace(new RegExp(Ey+"$"),"")}var MA="bjs-breadcrumbs-shown";function Ty(e,t,n){var r=ke('<ul class="bjs-breadcrumbs"></ul>'),i=n.getContainer(),o=Ge(i);i.appendChild(r);var a=[];e.on("element.changed",function(l){var c=l.element,u=Q(c),d=Re(a,function(f){return f===u});d&&s()});function s(l){l&&(a=IA(l));var c=a.flatMap(function(d){var f=n.findRoot(br(d))||n.findRoot(d.id);if(!f&&P(d,"bpmn:Process")){var p=t.find(function(g){var x=Q(g);return x&&x.get("processRef")===d});f=p&&n.findRoot(p.id)}if(!f)return[];var m=ff(d.name||d.id),v=ke('<li><span class="bjs-crumb"><a title="'+m+'">'+m+"</a></span></li>");return v.addEventListener("click",function(){n.setRootElement(f)}),v});r.innerHTML="";var u=c.length>1;o.toggle(MA,u),c.forEach(function(d){r.appendChild(d)})}e.on("root.set",function(l){s(l.element)})}Ty.$inject=["eventBus","elementRegistry","canvas"];function IA(e){for(var t=Q(e),n=[],r=t;r;r=r.$parent)(P(r,"bpmn:SubProcess")||P(r,"bpmn:Process"))&&n.push(r);return n.reverse()}function Py(e,t){var n=null,r=new DA;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,!(!P(o,"bpmn:SubProcess")&&!s)){s=s||{x:0,y:0,zoom:1};var l=(a.x-s.x)*a.scale,c=(a.y-s.y)*a.scale;(l!==0||c!==0)&&t.scroll({dx:l,dy:c}),s.zoom!==a.scale&&t.zoom(s.zoom,{x:0,y:0})}}),e.on("diagram.clear",function(){r.clear(),n=null})}Py.$inject=["eventBus","canvas"];function DA(){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 $y={x:180,y:160};function Ni(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,function(r,i){n._handleImport(i.definitions)})}Ni.prototype._handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach(function(r){!r.plane||!r.plane.bpmnElement||(t._processToDiagramMap[r.plane.bpmnElement.id]=r)});var n=e.diagrams.filter(r=>r.plane).flatMap(r=>t._createNewDiagrams(r.plane));n.forEach(function(r){t._movePlaneElementsToOrigin(r.plane)})}},Ni.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;P(a,"bpmn:SubProcess")&&!o.isExpanded&&n.push(a),BA(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 l=t._processToDiagramMap[s.id];t._moveToDiPlane(a,l.plane)}}),i},Ni.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=NA(e),r={x:n.x-$y.x,y:n.y-$y.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)})},Ni.prototype._moveToDiPlane=function(e,t){var n=Ry(e),r=n.plane.get("planeElement");r.splice(r.indexOf(e),1),t.get("planeElement").push(e)},Ni.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},Ni.$inject=["eventBus","moddle"];function Ry(e){return P(e,"bpmndi:BPMNDiagram")?e:Ry(e.$parent)}function NA(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=ce(n.bounds);t.top=Math.min(r.top,t.top),t.left=Math.min(r.left,t.left)}}),vl(t)}function BA(e,t){var n=e.$parent;return!(!P(n,"bpmn:SubProcess")||n===t.bpmnElement||be(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))}var Bl=250,kA='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4.81801948,3.50735931 L10.4996894,9.1896894 L10.5,4 L12,4 L12,12 L4,12 L4,10.5 L9.6896894,10.4996894 L3.75735931,4.56801948 C3.46446609,4.27512627 3.46446609,3.80025253 3.75735931,3.50735931 C4.05025253,3.21446609 4.52512627,3.21446609 4.81801948,3.50735931 Z"/></svg>',LA="bjs-drilldown-empty";function Kr(e,t,n,r,i){K.call(this,t),this._canvas=e,this._eventBus=t,this._elementRegistry=n,this._overlays=r,this._translate=i;var o=this;this.executed("shape.toggleCollapse",Bl,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.reverted("shape.toggleCollapse",Bl,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.executed(["shape.create","shape.move","shape.delete"],Bl,function(a){var s=a.oldParent,l=a.newParent||a.parent,c=a.shape;o._canDrillDown(c)&&o._addOverlay(c),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(l),o._updateDrilldownOverlay(c)},!0),this.reverted(["shape.create","shape.move","shape.delete"],Bl,function(a){var s=a.oldParent,l=a.newParent||a.parent,c=a.shape;o._canDrillDown(c)&&o._addOverlay(c),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(l),o._updateDrilldownOverlay(c)},!0),t.on("import.render.complete",function(){n.filter(function(a){return o._canDrillDown(a)}).map(function(a){o._addOverlay(a)})})}ie(Kr,K),Kr.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},Kr.prototype._canDrillDown=function(e){var t=this._canvas;return P(e,"bpmn:SubProcess")&&t.findRoot(br(e))},Kr.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=Q(e),r=t.get({element:n.id,type:"drilldown"})[0];if(r){var i=n&&n.get("flowElements")&&n.get("flowElements").length;Ge(r.html).toggle(LA,!i)}},Kr.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,r=Q(e),i=n.get({element:e,type:"drilldown"});i.length&&this._removeOverlay(e);var o=ke('<button type="button" class="bjs-drilldown">'+kA+"</button>"),a=r.get("name")||r.get("id"),s=this._translate("Open {element}",{element:a});o.setAttribute("title",s),o.addEventListener("click",function(){t.setRootElement(t.findRoot(br(e)))}),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:o}),this._updateOverlayVisibility(e)},Kr.prototype._removeOverlay=function(e){var t=this._overlays;t.remove({element:e,type:"drilldown"})},Kr.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];const jA={__depends__:[Dl,uf,RA],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",Ty],drilldownCentering:["type",Py],drilldownOverlayBehavior:["type",Kr],subprocessCompatibility:["type",Ni]};var FA=500,HA=1e3;function Bi(e,t){this._eventBus=e,this.offset=5;var n=t.cls("djs-outline",["no-fill"]),r=this;function i(o){var a=le("rect");return ee(a,j({x:0,y:0,rx:4,width:100,height:100},n)),a}e.on(["shape.added","shape.changed"],FA,function(o){var a=o.element,s=o.gfx,l=Ie(".djs-outline",s);l||(l=r.getOutline(a)||i(),pe(s,l)),r.updateShapeOutline(l,a)}),e.on(["connection.added","connection.changed"],function(o){var a=o.element,s=o.gfx,l=Ie(".djs-outline",s);l||(l=i(),pe(s,l)),r.updateConnectionOutline(l,a)})}Bi.prototype.updateShapeOutline=function(e,t){var n=!1,r=this._getProviders();r.length&&N(r,function(i){n=n||i.updateOutline(t,e)}),n||ee(e,{x:-this.offset,y:-this.offset,width:t.width+this.offset*2,height:t.height+this.offset*2})},Bi.prototype.updateConnectionOutline=function(e,t){var n=st(t);ee(e,{x:n.x-this.offset,y:n.y-this.offset,width:n.width+this.offset*2,height:n.height+this.offset*2})},Bi.prototype.registerProvider=function(e,t){t||(t=e,e=HA),this._eventBus.on("outline.getProviders",e,function(n){n.providers.push(t)})},Bi.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"outline.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},Bi.prototype.getOutline=function(e){var t,n=this._getProviders();return N(n,function(r){nt(r.getOutline)&&(t=t||r.getOutline(e))}),t},Bi.$inject=["eventBus","styles","elementRegistry"];const pf={__init__:["outline"],outline:["type",Bi]},zA="M44.7648 11.3263L36.9892 2.64074C36.0451 1.58628 34.5651 0.988708 33.1904 0.988708H5.98667C3.22688 0.988708 0.989624 3.34892 0.989624 6.26039V55.0235C0.989624 57.9349 3.22688 60.2952 5.98667 60.2952H40.966C43.7257 60.2952 45.963 57.9349 45.963 55.0235V14.9459C45.963 13.5998 45.6407 12.3048 44.7648 11.3263Z",VA="M1.03845 48.1347C1.03845 49.3511 1.07295 50.758 1.38342 52.064C1.69949 53.3938 2.32428 54.7154 3.56383 55.6428C6.02533 57.4841 10.1161 58.7685 14.8212 59.6067C19.5772 60.4538 25.1388 60.8738 30.6831 60.8738C36.2276 60.8738 41.7891 60.4538 46.545 59.6067C51.2504 58.7687 55.3412 57.4842 57.8028 55.6429C59.0424 54.7156 59.6673 53.3938 59.9834 52.064C60.2938 50.7579 60.3285 49.351 60.3285 48.1344V13.8415C60.3285 12.6249 60.2938 11.218 59.9834 9.91171C59.6673 8.58194 59.0423 7.2602 57.8027 6.33294C55.341 4.49168 51.2503 3.20723 46.545 2.36914C41.7891 1.522 36.2276 1.10204 30.6831 1.10205C25.1388 1.10206 19.5772 1.52206 14.8213 2.36923C10.1162 3.20734 6.02543 4.49183 3.5639 6.33314C2.32433 7.26038 1.69951 8.58206 1.38343 9.91181C1.07295 11.2179 1.03845 12.6247 1.03845 13.8411V48.1347Z",WA={width:36,height:50},GA={width:50,height:50};function Ay(e,t,n){return le("path",{d:e,strokeWidth:2,transform:`translate(${t.x}, ${t.y})`,...n})}const Yr=5;function kl(e,t){this._styles=t,e.registerProvider(this)}kl.$inject=["outline","styles"],kl.prototype.getOutline=function(e){const t=this._styles.cls("djs-outline",["no-fill"]);var n;if(!Te(e))return P(e,"bpmn:Gateway")?(n=le("rect"),j(n.style,{"transform-box":"fill-box",transform:"rotate(45deg)","transform-origin":"center"}),ee(n,j({x:2,y:2,rx:4,width:e.width-4,height:e.height-4},t))):be(e,["bpmn:Task","bpmn:SubProcess","bpmn:Group","bpmn:CallActivity"])?(n=le("rect"),ee(n,j({x:-Yr,y:-Yr,rx:14,width:e.width+Yr*2,height:e.height+Yr*2},t))):P(e,"bpmn:EndEvent")?(n=le("circle"),ee(n,j({cx:e.width/2,cy:e.height/2,r:e.width/2+Yr+1},t))):P(e,"bpmn:Event")?(n=le("circle"),ee(n,j({cx:e.width/2,cy:e.height/2,r:e.width/2+Yr},t))):P(e,"bpmn:DataObjectReference")&&Oy(e,"bpmn:DataObjectReference")?n=Ay(zA,{x:-6,y:-6},t):P(e,"bpmn:DataStoreReference")&&Oy(e,"bpmn:DataStoreReference")&&(n=Ay(VA,{x:-6,y:-6},t)),n},kl.prototype.updateOutline=function(e,t){if(!Te(e))return be(e,["bpmn:SubProcess","bpmn:Group"])?(ee(t,{width:e.width+Yr*2,height:e.height+Yr*2}),!0):!!be(e,["bpmn:Event","bpmn:Gateway","bpmn:DataStoreReference","bpmn:DataObjectReference"])};function Oy(e,t){var n;return t==="bpmn:DataObjectReference"?n=WA:t==="bpmn:DataStoreReference"&&(n=GA),e.width===n.width&&e.height===n.height}const UA={__depends__:[pf],__init__:["outlineProvider"],outlineProvider:["type",kl]};function My(e){!e||typeof e.stopPropagation!="function"||e.stopPropagation()}function _o(e){return e.originalEvent||e.srcEvent}function hf(e){My(e),My(_o(e))}function ki(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 Iy(){return/mac/i.test(navigator.platform)}function Dy(e,t){return(_o(e)||e).button===t}function Xr(e){return Dy(e,0)}function qA(e){return Dy(e,1)}function Ra(e){var t=_o(e)||e;return Xr(e)?Iy()?t.metaKey:t.ctrlKey:!1}function Ll(e){var t=_o(e)||e;return Xr(e)&&t.shiftKey}function KA(e){return!0}function jl(e){return Xr(e)||qA(e)}var Ny=500;function By(e,t,n){var r=this;function i($,M,R){if(!s($,M)){var I,L,k;R?L=t.getGraphics(R):(I=M.delegateTarget||M.target,I&&(L=I,R=t.get(L))),!(!L||!R)&&(k=e.fire($,{element:R,gfx:L,originalEvent:M}),k===!1&&(M.stopPropagation(),M.preventDefault()))}}var o={};function a($){return o[$]}function s($,M){var R=c[$]||Xr;return!R(M)}var l={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},c={"element.contextmenu":KA,"element.mousedown":jl,"element.mouseup":jl,"element.click":jl,"element.dblclick":jl};function u($,M,R){var I=l[$];if(!I)throw new Error("unmapped DOM event name <"+$+">");return i(I,M,R)}var d="svg, .djs-element";function f($,M,R,I){var L=o[R]=function(k){i(R,k)};I&&(c[R]=I),L.$delegate=jt.bind($,d,M,L)}function p($,M,R){var I=a(R);I&&jt.unbind($,M,I.$delegate)}function m($){N(l,function(M,R){f($,R,M)})}function v($){N(l,function(M,R){p($,R,M)})}e.on("canvas.destroy",function($){v($.svg)}),e.on("canvas.init",function($){m($.svg)}),e.on(["shape.added","connection.added"],function($){var M=$.element,R=$.gfx;e.fire("interactionEvents.createHit",{element:M,gfx:R})}),e.on(["shape.changed","connection.changed"],Ny,function($){var M=$.element,R=$.gfx;e.fire("interactionEvents.updateHit",{element:M,gfx:R})}),e.on("interactionEvents.createHit",Ny,function($){var M=$.element,R=$.gfx;r.createDefaultHit(M,R)}),e.on("interactionEvents.updateHit",function($){var M=$.element,R=$.gfx;r.updateDefaultHit(M,R)});var g=_("djs-hit djs-hit-stroke"),x=_("djs-hit djs-hit-click-stroke"),w=_("djs-hit djs-hit-all"),b=_("djs-hit djs-hit-no-move"),y={all:w,"click-stroke":x,stroke:g,"no-move":b};function _($,M){return M=j({stroke:"white",strokeWidth:15},M||{}),n.cls($,["no-fill","no-border"],M)}function S($,M){var R=y[M];if(!R)throw new Error("invalid hit type <"+M+">");return ee($,R),$}function C($,M){pe($,M)}this.removeHits=function($){var M=Dd(".djs-hit",$);N(M,it)},this.createDefaultHit=function($,M){var R=$.waypoints,I=$.isFrame,L;return R?this.createWaypointsHit(M,R):(L=I?"stroke":"all",this.createBoxHit(M,L,{width:$.width,height:$.height}))},this.createWaypointsHit=function($,M){var R=dl(M);return S(R,"stroke"),C($,R),R},this.createBoxHit=function($,M,R){R=j({x:0,y:0},R);var I=le("rect");return S(I,M),ee(I,R),C($,I),I},this.updateDefaultHit=function($,M){var R=Ie(".djs-hit",M);if(R)return $.waypoints?uv(R,$.waypoints):ee(R,{width:$.width,height:$.height}),R},this.fire=i,this.triggerMouseEvent=u,this.mouseHandler=a,this.registerEvent=f,this.unregisterEvent=p}By.$inject=["eventBus","elementRegistry","styles"];const Fl={__init__:["interactionEvents"],interactionEvents:["type",By]};function wo(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)})}wo.$inject=["eventBus","canvas"],wo.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})}},wo.prototype.get=function(){return this._selectedElements},wo.prototype.isSelected=function(e){return this._selectedElements.indexOf(e)!==-1},wo.prototype.select=function(e,t){var n=this._selectedElements,r=n.slice();me(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?N(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 ky="hover",Ly="selected",Hl=6;function mf(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,ky)}),t.on("element.out",function(a){o(a.element,ky)}),t.on("selection.changed",function(a){function s(d){o(d,Ly)}function l(d){i(d,Ly)}var c=a.oldSelection,u=a.newSelection;N(c,function(d){u.indexOf(d)===-1&&s(d)}),N(u,function(d){c.indexOf(d)===-1&&l(d)}),r._updateSelectionOutline(u)}),t.on("element.changed",function(a){n.isSelected(a.element)&&r._updateSelectionOutline(n.get())})}mf.$inject=["canvas","eventBus","selection"],mf.prototype._updateSelectionOutline=function(e){var t=this._canvas.getLayer("selectionOutline");ll(t);var n=e.length>1,r=this._canvas.getContainer();if(Ce(r)[n?"add":"remove"]("djs-multi-select"),!!n){var i=YA(st(e)),o=le("rect");ee(o,j({rx:3},i)),Ce(o).add("djs-selection-outline"),pe(t,o)}};function YA(e){return{x:e.x-Hl,y:e.y-Hl,width:e.width+Hl*2,height:e.height+Hl*2}}function jy(e,t,n,r){e.on("create.end",500,function(i){var o=i.context,a=o.canExecute,s=o.elements,l=o.hints||{},c=l.autoSelect;if(a){if(c===!1)return;me(c)?t.select(c):t.select(s.filter(XA))}}),e.on("connect.end",500,function(i){var o=i.context,a=o.connection;a&&t.select(a)}),e.on("shape.move.end",500,function(i){var o=i.previousSelection||[],a=r.get(i.context.shape.id),s=Re(o,function(l){return a.id===l.id});s||t.select(a)}),e.on("element.click",function(i){if(Xr(i)){var o=i.element;o===n.getRootElement()&&(o=null);var a=t.isSelected(o),s=t.get().length>1,l=Ll(i);if(a&&s)return l?t.deselect(o):t.select(o);a?t.deselect(o):t.select(o,l)}})}jy.$inject=["eventBus","selection","canvas","elementRegistry"];function XA(e){return!e.hidden}const Jn={__init__:["selectionVisuals","selectionBehavior"],__depends__:[Fl,pf],selection:["type",wo],selectionVisuals:["type",mf],selectionBehavior:["type",jy]};function Zr(e){Fe.call(this,e)}ie(Zr,Fe),Zr.prototype._modules=[EA,jA,UA,Dl,Jn,Ol],Zr.prototype._moddleExtensions={};var ZA=["c","C"],QA=["v","V"],JA=["y","Y"],Fy=["z","Z"];function eO(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function Qt(e){return e.altKey?!1:e.ctrlKey||e.metaKey}function ct(e,t){return e=me(e)?e:[e],e.indexOf(t.key)!==-1||e.indexOf(t.code)!==-1}function gf(e){return e.shiftKey}function tO(e){return Qt(e)&&ct(ZA,e)}function nO(e){return Qt(e)&&ct(QA,e)}function rO(e){return Qt(e)&&!gf(e)&&ct(Fy,e)}function iO(e){return Qt(e)&&(ct(JA,e)||ct(Fy,e)&&gf(e))}var zl="keyboard.keydown",oO="keyboard.keyup",Hy="input-handle-modified-keys",aO=1e3;function vt(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()})}vt.$inject=["config.keyboard","eventBus"],vt.prototype._keydownHandler=function(e){this._keyHandler(e,zl)},vt.prototype._keyupHandler=function(e){this._keyHandler(e,oO)},vt.prototype._keyHandler=function(e,t){var n;if(!this._isEventIgnored(e)){var r={keyEvent:e};n=this._eventBus.fire(t||zl,r),n&&e.preventDefault()}},vt.prototype._isEventIgnored=function(e){return e.defaultPrevented?!0:(sO(e.target)||lO(e.target)&&ct([" ","Enter"],e))&&this._isModifiedKeyIgnored(e)},vt.prototype._isModifiedKeyIgnored=function(e){if(!Qt(e))return!0;var t=this._getAllowedModifiers(e.target);return t.indexOf(e.key)===-1},vt.prototype._getAllowedModifiers=function(e){var t=jr(e,"["+Hy+"]",!0);return!t||this._node&&!this._node.contains(t)?[]:t.getAttribute(Hy).split(",")},vt.prototype.bind=function(e){this.unbind(),this._node=e,ge.bind(e,"keydown",this._keydownHandler),ge.bind(e,"keyup",this._keyupHandler),this._fire("bind")},vt.prototype.getBinding=function(){return this._node},vt.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),ge.unbind(e,"keydown",this._keydownHandler),ge.unbind(e,"keyup",this._keyupHandler)),this._node=null},vt.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node})},vt.prototype.addListener=function(e,t,n){nt(e)&&(n=t,t=e,e=aO),this._eventBus.on(n||zl,e,t)},vt.prototype.removeListener=function(e,t){this._eventBus.off(t||zl,e)},vt.prototype.hasModifier=eO,vt.prototype.isCmd=Qt,vt.prototype.isShift=gf,vt.prototype.isKey=ct;function sO(e){return e&&(sl(e,"input, textarea")||e.contentEditable==="true")}function lO(e){return e&&sl(e,"button, input[type=submit], input[type=button], a[href], [aria-role=button]")}var cO=500;function Eo(e,t){var n=this;e.on("editorActions.init",cO,function(r){var i=r.editorActions;n.registerBindings(t,i)})}Eo.$inject=["eventBus","keyboard"],Eo.prototype.registerBindings=function(e,t){function n(r,i){t.isRegistered(r)&&e.addListener(i)}n("undo",function(r){var i=r.keyEvent;if(rO(i))return t.trigger("undo"),!0}),n("redo",function(r){var i=r.keyEvent;if(iO(i))return t.trigger("redo"),!0}),n("copy",function(r){var i=r.keyEvent;if(tO(i))return t.trigger("copy"),!0}),n("paste",function(r){var i=r.keyEvent;if(nO(i))return t.trigger("paste"),!0}),n("stepZoom",function(r){var i=r.keyEvent;if(ct(["+","Add","="],i)&&Qt(i))return t.trigger("stepZoom",{value:1}),!0}),n("stepZoom",function(r){var i=r.keyEvent;if(ct(["-","Subtract"],i)&&Qt(i))return t.trigger("stepZoom",{value:-1}),!0}),n("zoom",function(r){var i=r.keyEvent;if(ct("0",i)&&Qt(i))return t.trigger("zoom",{value:1}),!0}),n("removeSelection",function(r){var i=r.keyEvent;if(ct(["Backspace","Delete","Del"],i))return t.trigger("removeSelection"),!0})};const vf={__init__:["keyboard","keyboardBindings"],keyboard:["type",vt],keyboardBindings:["type",Eo]};var uO={moveSpeed:50,moveSpeedAccelerated:200};function zy(e,t,n){var r=this;this._config=j({},uO,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 l=t.isShift(a)?s.moveSpeedAccelerated:s.moveSpeed,c;switch(a.key){case"ArrowLeft":case"Left":c="left";break;case"ArrowUp":case"Up":c="up";break;case"ArrowRight":case"Right":c="right";break;case"ArrowDown":case"Down":c="down";break}return r.moveCanvas({speed:l,direction:c}),!0}}this.moveCanvas=function(o){var a=0,s=0,l=o.speed,c=l/Math.min(Math.sqrt(n.viewbox().scale),1);switch(o.direction){case"left":a=c;break;case"up":s=c;break;case"right":a=-c;break;case"down":s=-c;break}n.scroll({dx:a,dy:s})}}zy.$inject=["config.keyboardMove","keyboard","canvas"];const Vy={__depends__:[vf],__init__:["keyboardMove"],keyboardMove:["type",zy]};var dO=/^djs-cursor-.*$/;function Vl(e){var t=Ge(document.body);t.removeMatching(dO),e&&t.add("djs-cursor-"+e)}function Wy(){Vl(null)}var fO=5e3;function Gy(e,t){t=t||"element.click";function n(){return!1}return e.once(t,fO,n),function(){e.off(t,n)}}function Aa(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function Ln(e,t){return{x:e.x-t.x,y:e.y-t.y}}var pO=15;function Uy(e,t){var n;e.on("element.mousedown",500,function(a){return o(a.originalEvent)});function r(a){var s=n.start,l=n.button,c=ki(a),u=Ln(c,s);if(!n.dragging&&hO(u)>pO&&(n.dragging=!0,l===0&&Gy(e),Vl("grab")),n.dragging){var d=n.last||n.start;u=Ln(c,d),t.scroll({dx:u.x,dy:u.y}),n.last=c}a.preventDefault()}function i(a){ge.unbind(document,"mousemove",r),ge.unbind(document,"mouseup",i),n=null,Wy()}function o(a){if(!jr(a.target,".djs-draggable")){var s=a.button;if(!(s>=2||a.ctrlKey||a.shiftKey||a.altKey))return n={button:s,start:ki(a)},ge.bind(document,"mousemove",r),ge.bind(document,"mouseup",i),!0}}this.isActive=function(){return!!n}}Uy.$inject=["eventBus","canvas"];function hO(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}const qy={__init__:["moveCanvas"],moveCanvas:["type",Uy]};function yf(e){return Math.log(e)/Math.log(10)}function Ky(e,t){var n=yf(e.min),r=yf(e.max),i=Math.abs(n)+Math.abs(r);return i/t}function mO(e,t){return Math.max(e.min,Math.min(e.max,t))}var gO=Math.sign||function(e){return e>=0?1:-1},bf={min:.2,max:4},Yy=10,vO=.1,yO=.75;function er(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=Dt(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||yO;var r=this;t.on("canvas.init",function(i){r._init(e.enabled!==!1)})}er.$inject=["config.zoomScroll","eventBus","canvas"],er.prototype.scroll=function(t){this._canvas.scroll(t)},er.prototype.reset=function(){this._canvas.zoom("fit-viewport")},er.prototype.zoom=function(t,n){var r=Ky(bf,Yy*2);this._totalDelta+=t,Math.abs(this._totalDelta)>vO&&(this._zoom(t,n,r),this._totalDelta=0)},er.prototype._handleWheel=function(t){if(!jr(t.target,".djs-scrollable",!0)){var n=this._container;t.preventDefault();var r=t.ctrlKey||Iy()&&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(),l={x:t.clientX-s.left,y:t.clientY-s.top};a=Math.sqrt(Math.pow(t.deltaY,2)+Math.pow(t.deltaX,2))*gO(t.deltaY)*o,this.zoom(a,l)}else i?a={dx:o*t.deltaY,dy:0}:a={dx:o*t.deltaX,dy:o*t.deltaY},this.scroll(a)}},er.prototype.stepZoom=function(t,n){var r=Ky(bf,Yy);this._zoom(t,n,r)},er.prototype._zoom=function(e,t,n){var r=this._canvas,i=e>0?1:-1,o=yf(r.zoom()),a=Math.round(o/n)*n;a+=n*i;var s=Math.pow(10,a);r.zoom(mO(bf,s),t)},er.prototype.toggle=function(t){var n=this._container,r=this._handleWheel,i=this._enabled;return typeof t>"u"&&(t=!i),i!==t&&ge[t?"bind":"unbind"](n,"wheel",r,!1),this._enabled=t,t},er.prototype._init=function(e){this.toggle(e)};const Xy={__init__:["zoomScroll"],zoomScroll:["type",er]};function Oa(e){Zr.call(this,e)}ie(Oa,Zr),Oa.prototype._navigationModules=[Vy,qy,Xy],Oa.prototype._modules=[].concat(Zr.prototype._modules,Oa.prototype._navigationModules);function xf(e){return e&&e[e.length-1]}function Zy(e){return e.y}function Qy(e){return e.x}var bO={left:Qy,center:Qy,right:function(e){return e.x+e.width},top:Zy,middle:Zy,bottom:function(e){return e.y+e.height}};function So(e,t){this._modeling=e,this._rules=t}So.$inject=["modeling","rules"],So.prototype._getOrientationDetails=function(e){var t=["top","bottom","middle"],n="x",r="width";return t.indexOf(e)!==-1&&(n="y",r="height"),{axis:n,dimension:r}},So.prototype._isType=function(e,t){return t.indexOf(e)!==-1},So.prototype._alignmentPosition=function(e,t){var n=this._getOrientationDetails(e),r=n.axis,i=n.dimension,o={},a={},s=!1,l,c,u;function d(f,p){return Math.round((f[r]+p[r]+p[i])/2)}if(this._isType(e,["left","top"]))o[e]=t[0][r];else if(this._isType(e,["right","bottom"]))u=xf(t),o[e]=u[r]+u[i];else if(this._isType(e,["center","middle"])){if(N(t,function(f){var p=f[r]+Math.round(f[i]/2);a[p]?a[p].elements.push(f):a[p]={elements:[f],center:p}}),l=qn(a,function(f){return f.elements.length>1&&(s=!0),f.elements.length}),s)return o[e]=xf(l).center,o;c=t[0],t=qn(t,function(f){return f[r]+f[i]}),u=xf(t),o[e]=d(c,u)}return o},So.prototype.trigger=function(e,t){var n=this._modeling,r,i=_e(e,function(l){return!(l.waypoints||l.host||l.labelTarget)});if(r=this._rules.allowed("elements.align",{elements:i}),me(r)&&(i=r),!(i.length<2||!r)){var o=bO[t],a=qn(i,o),s=this._alignmentPosition(t,a);n.alignElements(a,s)}};const xO={__init__:["alignElements"],alignElements:["type",So]},_O=new Pa;function Co(e){this._scheduled={},e.on("diagram.destroy",()=>{Object.keys(this._scheduled).forEach(t=>{this.cancel(t)})})}Co.$inject=["eventBus"],Co.prototype.schedule=function(e,t=_O.next()){this.cancel(t);const n=this._schedule(e,t);return this._scheduled[t]=n,n.promise},Co.prototype._schedule=function(e,t){const{promise:n,resolve:r,reject:i}=wO();return{executionId:requestAnimationFrame(()=>{try{r(e())}catch(a){i(a)}}),promise:n}},Co.prototype.cancel=function(e){const t=this._scheduled[e];t&&(this._cancel(t),this._scheduled[e]=null)},Co.prototype._cancel=function(e){cancelAnimationFrame(e.executionId)};function wO(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}const EO={scheduler:["type",Co]};var SO="djs-element-hidden",Wl=".entry",CO=1e3,Jy=8,TO=300;function Qe(e,t,n,r){this._canvas=e,this._elementRegistry=t,this._eventBus=n,this._scheduler=r,this._current=null,this._init()}Qe.$inject=["canvas","elementRegistry","eventBus","scheduler"],Qe.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=me(i)?i:[i],a=o.filter(function(l){return n.includes(l)});if(a.length){e.close();var s=o.filter(function(l){return e._elementRegistry.get(l.id)});s.length&&e._updateAndOpen(s.length>1?s:s[0])}}}),this._eventBus.on("canvas.viewbox.changed",function(){e._updatePosition()}),this._eventBus.on("element.marker.update",function(t){if(e.isOpen()){var n=t.element,r=e._current,i=me(r.target)?r.target:[r.target];i.includes(n)&&e._updateVisibility()}}),this._container=this._createContainer()},Qe.prototype._createContainer=function(){var e=ke('<div class="djs-context-pad-parent"></div>');return this._canvas.getContainer().appendChild(e),e},Qe.prototype.registerProvider=function(e,t){t||(t=e,e=CO),this._eventBus.on("contextPad.getProviders",e,function(n){n.providers.push(t)})},Qe.prototype.getEntries=function(e){var t=this._getProviders(),n=me(e)?"getMultiElementContextPadEntries":"getContextPadEntries",r={};return N(t,function(i){if(nt(i[n])){var o=i[n](e);nt(o)?r=o(r):N(o,function(a,s){r[s]=a})}}),r},Qe.prototype.trigger=function(e,t,n){var r=this,i,o,a=t.delegateTarget||t.target;if(!a)return t.preventDefault();if(i=$t(a,"data-action"),o=t.originalEvent||t,e==="mouseover"){this._timeout=setTimeout(function(){r._mouseout=r.triggerEntry(i,"hover",o,n)},TO);return}else if(e==="mouseout"){clearTimeout(this._timeout),this._mouseout&&(this._mouseout(),this._mouseout=null);return}return this.triggerEntry(i,e,o,n)},Qe.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(nt(s)){if(t==="click")return s(n,i,r)}else if(s[t])return s[t](n,i,r);n.preventDefault()}}}},Qe.prototype.open=function(e,t){!t&&this.isOpen(e)||(this.close(),this._updateAndOpen(e))},Qe.prototype._getProviders=function(){var e=this._eventBus.createEvent({type:"contextPad.getProviders",providers:[]});return this._eventBus.fire(e),e.providers},Qe.prototype._updateAndOpen=function(e){var t=this.getEntries(e),n=this._createHtml(e),r;N(t,function(i,o){var a=i.group||"default",s=ke(i.html||'<div class="entry" draggable="true"></div>'),l;$t(s,"data-action",o),l=Ie("[data-group="+$a(a)+"]",n),l||(l=ke('<div class="group"></div>'),$t(l,"data-group",a),n.appendChild(l)),l.appendChild(s),i.className&&PO(s,i.className),i.title&&$t(s,"title",i.title),i.imageUrl&&(r=ke("<img>"),$t(r,"src",i.imageUrl),r.style.width="100%",r.style.height="100%",s.appendChild(r))}),Ge(n).add("open"),this._current={entries:t,html:n,target:e},this._updatePosition(),this._updateVisibility(),this._eventBus.fire("contextPad.open",{current:this._current})},Qe.prototype._createHtml=function(e){var t=this,n=ke('<div class="djs-context-pad"></div>');return jt.bind(n,Wl,"click",function(r){t.trigger("click",r)}),jt.bind(n,Wl,"dragstart",function(r){t.trigger("dragstart",r)}),jt.bind(n,Wl,"mouseover",function(r){t.trigger("mouseover",r)}),jt.bind(n,Wl,"mouseout",function(r){t.trigger("mouseout",r)}),ge.bind(n,"mousedown",function(r){r.stopPropagation()}),this._container.appendChild(n),this._eventBus.fire("contextPad.create",{target:e,pad:n}),n},Qe.prototype.getPad=function(e){console.warn(new Error("ContextPad#getPad is deprecated and will be removed in future library versions, cf. https://github.com/bpmn-io/diagram-js/pull/888"));let t;return this.isOpen()&&RO(this._current.target,e)?t=this._current.html:t=this._createHtml(e),{html:t}},Qe.prototype.close=function(){this.isOpen()&&(clearTimeout(this._timeout),this._container.innerHTML="",this._eventBus.fire("contextPad.close",{current:this._current}),this._current=null)},Qe.prototype.isOpen=function(e){var t=this._current;if(!t)return!1;if(!e)return!0;var n=t.target;return me(e)!==me(n)?!1:me(e)?e.length===n.length&&Ci(e,function(r){return n.includes(r)}):n===e},Qe.prototype.isShown=function(){return this.isOpen()&&Ge(this._current.html).has("open")},Qe.prototype.show=function(){this.isOpen()&&(Ge(this._current.html).add("open"),this._updatePosition(),this._eventBus.fire("contextPad.show",{current:this._current}))},Qe.prototype.hide=function(){this.isOpen()&&(Ge(this._current.html).remove("open"),this._eventBus.fire("contextPad.hide",{current:this._current}))},Qe.prototype._getPosition=function(e){if(!me(e)&&Be(e)){var t=this._canvas.viewbox(),n=$O(e),r=n.x*t.scale-t.x*t.scale,i=n.y*t.scale-t.y*t.scale;return{left:r+Jy*this._canvas.zoom(),top:i}}var o=this._canvas.getContainer(),a=o.getBoundingClientRect(),s=this._getTargetBounds(e);return{left:s.right-a.left+Jy*this._canvas.zoom(),top:s.top-a.top}},Qe.prototype._updatePosition=function(){const e=()=>{if(this.isOpen()){var t=this._current.html,n=this._getPosition(this._current.target);"x"in n&&"y"in n?(t.style.left=n.x+"px",t.style.top=n.y+"px"):["top","right","bottom","left"].forEach(function(r){r in n&&(t.style[r]=n[r]+"px")})}};this._scheduler.schedule(e,"ContextPad#_updatePosition")},Qe.prototype._updateVisibility=function(){const e=()=>{if(this.isOpen()){var t=this,n=this._current.target,r=me(n)?n:[n],i=r.some(function(o){return t._canvas.hasMarker(o,SO)});i?t.hide():t.show()}};this._scheduler.schedule(e,"ContextPad#_updateVisibility")},Qe.prototype._getTargetBounds=function(e){var t=this,n=me(e)?e:[e],r=n.map(function(i){return t._canvas.getGraphics(i)});return r.reduce(function(i,o){const a=o.getBoundingClientRect();return i.top=Math.min(i.top,a.top),i.right=Math.max(i.right,a.right),i.bottom=Math.max(i.bottom,a.bottom),i.left=Math.min(i.left,a.left),i.x=i.left,i.y=i.top,i.width=i.right-i.left,i.height=i.bottom-i.top,i},{top:1/0,right:-1/0,bottom:-1/0,left:1/0})};function PO(e,t){var n=Ge(e);t=me(t)?t:t.split(/\s+/g),t.forEach(function(r){n.add(r)})}function $O(e){return e.waypoints[e.waypoints.length-1]}function RO(e,t){return e=me(e)?e:[e],t=me(t)?t:[t],e.length===t.length&&Ci(e,function(n){return t.includes(n)})}const eb={__depends__:[Fl,EO,Dl],contextPad:["type",Qe]};var Gl,He,tb,Li,nb,rb,_f,wf,Ef,Sf,Ma={},ib=[],AO=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Cf=Array.isArray;function Qr(e,t){for(var n in t)e[n]=t[n];return e}function ob(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ab(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?Gl.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 Ul(e,a,r,i,null)}function Ul(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,constructor:void 0,__v:i??++tb,__i:-1,__u:0};return i==null&&He.vnode!=null&&He.vnode(o),o}function ql(e){return e.children}function Kl(e,t){this.props=e,this.context=t}function To(e,t){if(t==null)return e.__?To(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?To(e):null}function sb(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return sb(e)}}function lb(e){(!e.__d&&(e.__d=!0)&&Li.push(e)&&!Yl.__r++||nb!==He.debounceRendering)&&((nb=He.debounceRendering)||rb)(Yl)}function Yl(){var e,t,n,r,i,o,a,s;for(Li.sort(_f);e=Li.shift();)e.__d&&(t=Li.length,r=void 0,o=(i=(n=e).__v).__e,a=[],s=[],n.__P&&((r=Qr({},i)).__v=i.__v+1,He.vnode&&He.vnode(r),Tf(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,a,o??To(i),!!(32&i.__u),s),r.__v=i.__v,r.__.__k[r.__i]=r,pb(a,r,s),r.__e!=o&&sb(r)),Li.length>t&&Li.sort(_f));Yl.__r=0}function cb(e,t,n,r,i,o,a,s,l,c,u){var d,f,p,m,v,g=r&&r.__k||ib,x=t.length;for(n.__d=l,OO(n,t,g),l=n.__d,d=0;d<x;d++)(p=n.__k[d])!=null&&(f=p.__i===-1?Ma:g[p.__i]||Ma,p.__i=d,Tf(e,p,f,i,o,a,s,l,c,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&Pf(f.ref,null,p),u.push(p.ref,p.__c||m,p)),v==null&&m!=null&&(v=m),65536&p.__u||f.__k===p.__k?l=ub(p,l,e):typeof p.type=="function"&&p.__d!==void 0?l=p.__d:m&&(l=m.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=l,n.__e=v}function OO(e,t,n){var r,i,o,a,s,l=t.length,c=n.length,u=c,d=0;for(e.__k=[],r=0;r<l;r++)(i=t[r])!=null&&typeof i!="boolean"&&typeof i!="function"?(a=r+d,(i=e.__k[r]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?Ul(null,i,null,null,null):Cf(i)?Ul(ql,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?Ul(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=e,i.__b=e.__b+1,o=null,(s=i.__i=MO(i,n,a,u))!==-1&&(u--,(o=n[s])&&(o.__u|=131072)),o==null||o.__v===null?(s==-1&&d--,typeof i.type!="function"&&(i.__u|=65536)):s!==a&&(s==a-1?d--:s==a+1?d++:(s>a?d--:d++,i.__u|=65536))):i=e.__k[r]=null;if(u)for(r=0;r<c;r++)(o=n[r])!=null&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=To(o)),hb(o,o))}function ub(e,t,n){var r,i;if(typeof e.type=="function"){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=ub(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=To(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function MO(e,t,n,r){var i=e.key,o=e.type,a=n-1,s=n+1,l=t[n];if(l===null||l&&i==l.key&&o===l.type&&!(131072&l.__u))return n;if(r>(l!=null&&!(131072&l.__u)?1:0))for(;a>=0||s<t.length;){if(a>=0){if((l=t[a])&&!(131072&l.__u)&&i==l.key&&o===l.type)return a;a--}if(s<t.length){if((l=t[s])&&!(131072&l.__u)&&i==l.key&&o===l.type)return s;s++}}return-1}function db(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||AO.test(t)?n:n+"px"}function Xl(e,t,n,r,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||db(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||db(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=wf,e.addEventListener(t,o?Sf:Ef,o)):e.removeEventListener(t,o?Sf:Ef,o);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function fb(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=wf++;else if(t.t<n.u)return;return n(He.event?He.event(t):t)}}}function Tf(e,t,n,r,i,o,a,s,l,c){var u,d,f,p,m,v,g,x,w,b,y,_,S,C,$,M,R=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),o=[s=t.__e=n.__e]),(u=He.__b)&&u(t);e:if(typeof R=="function")try{if(x=t.props,w="prototype"in R&&R.prototype.render,b=(u=R.contextType)&&r[u.__c],y=u?b?b.props.value:u.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:(w?t.__c=d=new R(x,y):(t.__c=d=new Kl(x,y),d.constructor=R,d.render=DO),b&&b.sub(d),d.props=x,d.state||(d.state={}),d.context=y,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),w&&d.__s==null&&(d.__s=d.state),w&&R.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Qr({},d.__s)),Qr(d.__s,R.getDerivedStateFromProps(x,d.__s))),p=d.props,m=d.state,d.__v=t,f)w&&R.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),w&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(w&&R.getDerivedStateFromProps==null&&x!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(x,y),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(x,d.__s,y)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=x,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(I){I&&(I.__=t)}),_=0;_<d._sb.length;_++)d.__h.push(d._sb[_]);d._sb=[],d.__h.length&&a.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(x,d.__s,y),w&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,m,v)})}if(d.context=y,d.props=x,d.__P=e,d.__e=!1,S=He.__r,C=0,w){for(d.state=d.__s,d.__d=!1,S&&S(t),u=d.render(d.props,d.state,d.context),$=0;$<d._sb.length;$++)d.__h.push(d._sb[$]);d._sb=[]}else do d.__d=!1,S&&S(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++C<25);d.state=d.__s,d.getChildContext!=null&&(r=Qr(Qr({},r),d.getChildContext())),w&&!f&&d.getSnapshotBeforeUpdate!=null&&(v=d.getSnapshotBeforeUpdate(p,m)),cb(e,Cf(M=u!=null&&u.type===ql&&u.key==null?u.props.children:u)?M:[M],t,n,r,i,o,a,s,l,c),d.base=t.__e,t.__u&=-161,d.__h.length&&a.push(d),g&&(d.__E=d.__=null)}catch(I){if(t.__v=null,l||o!=null){for(t.__u|=l?160:128;s&&s.nodeType===8&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,t.__e=s}else t.__e=n.__e,t.__k=n.__k;He.__e(I,t,n)}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=IO(n.__e,t,n,r,i,o,a,l,c);(u=He.diffed)&&u(t)}function pb(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)Pf(n[r],n[++r],n[++r]);He.__c&&He.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){He.__e(o,i.__v)}})}function IO(e,t,n,r,i,o,a,s,l){var c,u,d,f,p,m,v,g=n.props,x=t.props,w=t.type;if(w==="svg"?i="http://www.w3.org/2000/svg":w==="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(c=0;c<o.length;c++)if((p=o[c])&&"setAttribute"in p==!!w&&(w?p.localName===w:p.nodeType===3)){e=p,o[c]=null;break}}if(e==null){if(w===null)return document.createTextNode(x);e=document.createElementNS(i,w,x.is&&x),s&&(He.__m&&He.__m(t,o),s=!1),o=null}if(w===null)g===x||s&&e.data===x||(e.data=x);else{if(o=o&&Gl.call(e.childNodes),g=n.props||Ma,!s&&o!=null)for(g={},c=0;c<e.attributes.length;c++)g[(p=e.attributes[c]).name]=p.value;for(c in g)if(p=g[c],c!="children"){if(c=="dangerouslySetInnerHTML")d=p;else if(!(c in x)){if(c=="value"&&"defaultValue"in x||c=="checked"&&"defaultChecked"in x)continue;Xl(e,c,null,p,i)}}for(c in x)p=x[c],c=="children"?f=p:c=="dangerouslySetInnerHTML"?u=p:c=="value"?m=p:c=="checked"?v=p:s&&typeof p!="function"||g[c]===p||Xl(e,c,p,g[c],i);if(u)s||d&&(u.__html===d.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=""),cb(e,Cf(f)?f:[f],t,n,r,w==="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,a,o?o[0]:n.__k&&To(n,0),s,l),o!=null)for(c=o.length;c--;)ob(o[c]);s||(c="value",w==="progress"&&m==null?e.removeAttribute("value"):m!==void 0&&(m!==e[c]||w==="progress"&&!m||w==="option"&&m!==g[c])&&Xl(e,c,m,g[c],i),c="checked",v!==void 0&&v!==e[c]&&Xl(e,c,v,g[c],i))}return e}function Pf(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(i){He.__e(i,n)}}function hb(e,t,n){var r,i;if(He.unmount&&He.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Pf(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){He.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&hb(r[i],t,n||typeof e.type!="function");n||ob(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function DO(e,t,n){return this.constructor(e,n)}function mb(e,t,n){var r,i,o,a;He.__&&He.__(e,t),i=(r=typeof n=="function")?null:t.__k,o=[],a=[],Tf(t,e=(!r&&n||t).__k=ab(ql,null,[e]),i||Ma,Ma,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?Gl.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,a),pb(o,e,a)}Gl=ib.slice,He={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},tb=0,Kl.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Qr({},this.state),typeof e=="function"&&(e=e(Qr({},n),this.props)),e&&Qr(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),lb(this))},Kl.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),lb(this))},Kl.prototype.render=ql,Li=[],rb=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_f=function(e,t){return e.__v.__b-t.__v.__b},Yl.__r=0,wf=0,Ef=fb(!1),Sf=fb(!0);var gb=function(e,t,n,r){var i;t[0]=0;for(var o=1;o<t.length;o++){var a=t[o++],s=t[o]?(t[0]|=a?1:2,n[t[o++]]):t[++o];a===3?r[0]=s:a===4?r[1]=Object.assign(r[1]||{},s):a===5?(r[1]=r[1]||{})[t[++o]]=s:a===6?r[1][t[++o]]+=s+"":a?(i=e.apply(s,gb(e,s,n,["",null])),r.push(i),s[0]?t[0]|=2:(t[o-2]=0,t[o]=i)):r.push(s)}return r},vb=new Map;function NO(e){var t=vb.get(this);return t||(t=new Map,vb.set(this,t)),(t=gb(this,t.get(e)||(t.set(e,t=function(n){for(var r,i,o=1,a="",s="",l=[0],c=function(f){o===1&&(f||(a=a.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?l.push(0,f,a):o===3&&(f||a)?(l.push(3,f,a),o=2):o===2&&a==="..."&&f?l.push(4,f,0):o===2&&a&&!f?l.push(5,0,!0,a):o>=5&&((a||!f&&o===5)&&(l.push(o,0,a,i),o=6),f&&(l.push(o,f,0,i),o=6)),a=""},u=0;u<n.length;u++){u&&(o===1&&c(),c(u));for(var d=0;d<n[u].length;d++)r=n[u][d],o===1?r==="<"?(c(),l=[l],o=3):a+=r:o===4?a==="--"&&r===">"?(o=1,a=""):a=r+a[0]:s?r===s?s="":a+=r:r==='"'||r==="'"?s=r:r===">"?(c(),o=1):o&&(r==="="?(o=5,i=a,a=""):r==="/"&&(o<5||n[u][d+1]===">")?(c(),o===3&&(l=l[0]),o=l,(l=l[0]).push(2,0,o),o=0):r===" "||r===" "||r===`
|
|
10
|
+
`||r==="\r"?(c(),o=2):a+=r),o===3&&a==="!--"&&(o=4,l=l[0])}return c(),l}(e)),t),arguments,[])).length>1?t:t[0]}var qe=NO.bind(ab),Po,Je,$f,yb,Ia=0,bb=[],at=He,xb=at.__b,_b=at.__r,wb=at.diffed,Eb=at.__c,Sb=at.unmount,Cb=at.__;function Zl(e,t){at.__h&&at.__h(Je,e,Ia||t),Ia=0;var n=Je.__H||(Je.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Rf(e){return Ia=1,BO($b,e)}function BO(e,t,n){var r=Zl(Po++,2);if(r.t=e,!r.__c&&(r.__=[$b(void 0,t),function(s){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,s);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=Je,!Je.u)){var i=function(s,l,c){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(f){return!!f.__c});if(u.every(function(f){return!f.__N}))return!o||o.call(this,s,l,c);var d=!1;return u.forEach(function(f){if(f.__N){var p=f.__[0];f.__=f.__N,f.__N=void 0,p!==f.__[0]&&(d=!0)}}),!(!d&&r.__c.props===s)&&(!o||o.call(this,s,l,c))};Je.u=!0;var o=Je.shouldComponentUpdate,a=Je.componentWillUpdate;Je.componentWillUpdate=function(s,l,c){if(this.__e){var u=o;o=void 0,i(s,l,c),o=u}a&&a.call(this,s,l,c)},Je.shouldComponentUpdate=i}return r.__N||r.__}function Af(e,t){var n=Zl(Po++,3);!at.__s&&If(n.__H,t)&&(n.__=e,n.i=t,Je.__H.__h.push(n))}function Of(e,t){var n=Zl(Po++,4);!at.__s&&If(n.__H,t)&&(n.__=e,n.i=t,Je.__h.push(n))}function Tb(e){return Ia=5,$o(function(){return{current:e}},[])}function $o(e,t){var n=Zl(Po++,7);return If(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Da(e,t){return Ia=8,$o(function(){return e},t)}function kO(){for(var e;e=bb.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ql),e.__H.__h.forEach(Mf),e.__H.__h=[]}catch(t){e.__H.__h=[],at.__e(t,e.__v)}}at.__b=function(e){Je=null,xb&&xb(e)},at.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Cb&&Cb(e,t)},at.__r=function(e){_b&&_b(e),Po=0;var t=(Je=e.__c).__H;t&&($f===Je?(t.__h=[],Je.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(t.__h.forEach(Ql),t.__h.forEach(Mf),t.__h=[],Po=0)),$f=Je},at.diffed=function(e){wb&&wb(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(bb.push(t)!==1&&yb===at.requestAnimationFrame||((yb=at.requestAnimationFrame)||LO)(kO)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),$f=Je=null},at.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ql),n.__h=n.__h.filter(function(r){return!r.__||Mf(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],at.__e(r,n.__v)}}),Eb&&Eb(e,t)},at.unmount=function(e){Sb&&Sb(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Ql(r)}catch(i){t=i}}),n.__H=void 0,t&&at.__e(t,n.__v))};var Pb=typeof requestAnimationFrame=="function";function LO(e){var t,n=function(){clearTimeout(r),Pb&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Pb&&(t=requestAnimationFrame(n))}function Ql(e){var t=Je,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Je=t}function Mf(e){var t=Je;e.__c=e.__(),Je=t}function If(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function $b(e,t){return typeof t=="function"?t(e):t}function Rb(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Rb(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Jl(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Rb(e))&&(r&&(r+=" "),r+=t);return r}function jO(e){const{headerEntries:t,onSelect:n,selectedEntry:r,setSelectedEntry:i,title:o}=e,a=$o(()=>FO(t),[t]);return qe`
|
|
11
|
+
<div class="djs-popup-header">
|
|
12
|
+
<h3 class="djs-popup-title" title=${o}>${o}</h3>
|
|
13
|
+
${a.map(s=>qe`
|
|
14
|
+
<ul key=${s.id} class="djs-popup-header-group" data-header-group=${s.id}>
|
|
15
|
+
|
|
16
|
+
${s.entries.map(l=>qe`
|
|
17
|
+
<li key=${l.id}>
|
|
18
|
+
<${l.action?"button":"span"}
|
|
19
|
+
class=${HO(l,l===r)}
|
|
20
|
+
onClick=${c=>l.action&&n(c,l)}
|
|
21
|
+
title=${l.title||l.label}
|
|
22
|
+
data-id=${l.id}
|
|
23
|
+
onMouseEnter=${()=>l.action&&i(l)}
|
|
24
|
+
onMouseLeave=${()=>l.action&&i(null)}
|
|
25
|
+
onFocus=${()=>l.action&&i(l)}
|
|
26
|
+
onBlur=${()=>l.action&&i(null)}
|
|
27
|
+
>
|
|
28
|
+
${l.imageUrl&&qe`<img class="djs-popup-entry-icon" src=${l.imageUrl} alt="" />`||l.imageHtml&&qe`<div class="djs-popup-entry-icon" dangerouslySetInnerHTML=${{__html:l.imageHtml}} />`}
|
|
29
|
+
${l.label?qe`
|
|
30
|
+
<span class="djs-popup-label">${l.label}</span>
|
|
31
|
+
`:null}
|
|
32
|
+
</${l.action?"button":"span"}>
|
|
33
|
+
</li>
|
|
34
|
+
`)}
|
|
35
|
+
</ul>
|
|
36
|
+
`)}
|
|
37
|
+
</div>
|
|
38
|
+
`}function FO(e){return e.reduce((t,n)=>{const r=n.group||"default",i=t.find(o=>o.id===r);return i?i.entries.push(n):t.push({id:r,entries:[n]}),t},[])}function HO(e,t){return Jl("entry",e.className,e.active?"active":"",e.disabled?"disabled":"",t?"selected":"")}function zO(e){const{entry:t,selected:n,onMouseEnter:r,onMouseLeave:i,onAction:o}=e;return qe`
|
|
39
|
+
<li
|
|
40
|
+
class=${Jl("entry",{selected:n})}
|
|
41
|
+
data-id=${t.id}
|
|
42
|
+
title=${t.title||t.label}
|
|
43
|
+
tabIndex="0"
|
|
44
|
+
onClick=${o}
|
|
45
|
+
onFocus=${r}
|
|
46
|
+
onBlur=${i}
|
|
47
|
+
onMouseEnter=${r}
|
|
48
|
+
onMouseLeave=${i}
|
|
49
|
+
onDragStart=${a=>o(a,t,"dragstart")}
|
|
50
|
+
draggable=${!0}
|
|
51
|
+
>
|
|
52
|
+
<div class="djs-popup-entry-content">
|
|
53
|
+
<span
|
|
54
|
+
class=${Jl("djs-popup-entry-name",t.className)}
|
|
55
|
+
>
|
|
56
|
+
${t.imageUrl&&qe`<img class="djs-popup-entry-icon" src=${t.imageUrl} alt="" />`||t.imageHtml&&qe`<div class="djs-popup-entry-icon" dangerouslySetInnerHTML=${{__html:t.imageHtml}} />`}
|
|
57
|
+
|
|
58
|
+
${t.label?qe`
|
|
59
|
+
<span class="djs-popup-label">
|
|
60
|
+
${t.label}
|
|
61
|
+
</span>
|
|
62
|
+
`:null}
|
|
63
|
+
</span>
|
|
64
|
+
${t.description&&qe`
|
|
65
|
+
<span
|
|
66
|
+
class="djs-popup-entry-description"
|
|
67
|
+
title=${t.description}
|
|
68
|
+
>
|
|
69
|
+
${t.description}
|
|
70
|
+
</span>
|
|
71
|
+
`}
|
|
72
|
+
</div>
|
|
73
|
+
${t.documentationRef&&qe`
|
|
74
|
+
<div class="djs-popup-entry-docs">
|
|
75
|
+
<a
|
|
76
|
+
href="${t.documentationRef}"
|
|
77
|
+
onClick=${a=>a.stopPropagation()}
|
|
78
|
+
title="Open element documentation"
|
|
79
|
+
target="_blank"
|
|
80
|
+
rel="noopener"
|
|
81
|
+
>
|
|
82
|
+
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
83
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.6368 10.6375V5.91761H11.9995V10.6382C11.9995 10.9973 11.8623 11.3141 11.5878 11.5885C11.3134 11.863 10.9966 12.0002 10.6375 12.0002H1.36266C0.982345 12.0002 0.660159 11.8681 0.396102 11.6041C0.132044 11.34 1.52588e-05 11.0178 1.52588e-05 10.6375V1.36267C1.52588e-05 0.98236 0.132044 0.660173 0.396102 0.396116C0.660159 0.132058 0.982345 2.95639e-05 1.36266 2.95639e-05H5.91624V1.36267H1.36266V10.6375H10.6368ZM12 0H7.2794L7.27873 1.36197H9.68701L3.06507 7.98391L4.01541 8.93425L10.6373 2.31231V4.72059H12V0Z" fill="#818798"/>
|
|
84
|
+
</svg>
|
|
85
|
+
</a>
|
|
86
|
+
</div>
|
|
87
|
+
`}
|
|
88
|
+
</li>
|
|
89
|
+
`}function VO(e){const{selectedEntry:t,setSelectedEntry:n,entries:r,...i}=e,o=Tb(),a=$o(()=>WO(r),[r]);return Of(()=>{const s=o.current;if(!s)return;const l=s.querySelector(".selected");l&&GO(l)},[t]),qe`
|
|
90
|
+
<div class="djs-popup-results" ref=${o}>
|
|
91
|
+
${a.map(s=>qe`
|
|
92
|
+
${s.name&&qe`
|
|
93
|
+
<div key=${s.id} class="entry-header" title=${s.name}>
|
|
94
|
+
${s.name}
|
|
95
|
+
</div>
|
|
96
|
+
`}
|
|
97
|
+
<ul class="djs-popup-group" data-group=${s.id}>
|
|
98
|
+
${s.entries.map(l=>qe`
|
|
99
|
+
<${zO}
|
|
100
|
+
key=${l.id}
|
|
101
|
+
entry=${l}
|
|
102
|
+
selected=${l===t}
|
|
103
|
+
onMouseEnter=${()=>n(l)}
|
|
104
|
+
onMouseLeave=${()=>n(null)}
|
|
105
|
+
...${i}
|
|
106
|
+
/>
|
|
107
|
+
`)}
|
|
108
|
+
</ul>
|
|
109
|
+
`)}
|
|
110
|
+
</div>
|
|
111
|
+
`}function WO(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 GO(e){typeof e.scrollIntoViewIfNeeded=="function"?e.scrollIntoViewIfNeeded():e.scrollIntoView({scrollMode:"if-needed",block:"nearest"})}function UO(e){const{onClose:t,onSelect:n,className:r,headerEntries:i,position:o,title:a,width:s,scale:l,search:c,emptyPlaceholder:u,entries:d,onOpened:f,onClosed:p}=e,m=$o(()=>ft(c)?d.length>5:!1,[c,d]),[v,g]=Rf(""),x=Da((I,L)=>{if(!m)return I;const k=V=>{if(!L)return(V.rank||0)>=0;if(V.searchable===!1)return!1;const W=[V.description||"",V.label||"",V.search||""].map(q=>q.toLowerCase());return L.toLowerCase().split(/\s/g).every(q=>W.some(H=>H.includes(q)))};return I.filter(k)},[m]),[w,b]=Rf(x(d,v)),[y,_]=Rf(w[0]),S=Da(I=>{(!y||!I.includes(y))&&_(I[0]),b(I)},[y,b,_]);Af(()=>{S(x(d,v))},[v,d]);const C=Da(I=>{let k=w.indexOf(y)+I;k<0&&(k=w.length-1),k>=w.length&&(k=0),_(w[k])},[w,y,_]),$=Da(I=>{if(I.key==="Enter"&&y)return n(I,y);if(I.key==="ArrowUp")return C(-1),I.preventDefault();if(I.key==="ArrowDown")return C(1),I.preventDefault()},[n,y,C]),M=Da(I=>{sl(I.target,"input")&&g(()=>I.target.value)},[g]);Af(()=>(f(),()=>{p()}),[]);const R=$o(()=>a||i.length>0,[a,i]);return qe`
|
|
112
|
+
<${Ab}
|
|
113
|
+
onClose=${t}
|
|
114
|
+
onKeyup=${M}
|
|
115
|
+
onKeydown=${$}
|
|
116
|
+
className=${r}
|
|
117
|
+
position=${o}
|
|
118
|
+
width=${s}
|
|
119
|
+
scale=${l}
|
|
120
|
+
>
|
|
121
|
+
${R&&qe`
|
|
122
|
+
<${jO}
|
|
123
|
+
headerEntries=${i}
|
|
124
|
+
onSelect=${n}
|
|
125
|
+
selectedEntry=${y}
|
|
126
|
+
setSelectedEntry=${_}
|
|
127
|
+
title=${a}
|
|
128
|
+
/>
|
|
129
|
+
`}
|
|
130
|
+
${d.length>0&&qe`
|
|
131
|
+
<div class="djs-popup-body">
|
|
132
|
+
|
|
133
|
+
${m&&qe`
|
|
134
|
+
<div class="djs-popup-search">
|
|
135
|
+
<svg class="djs-popup-search-icon" width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
136
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.0325 8.5H9.625L13.3675 12.25L12.25 13.3675L8.5 9.625V9.0325L8.2975 8.8225C7.4425 9.5575 6.3325 10 5.125 10C2.4325 10 0.25 7.8175 0.25 5.125C0.25 2.4325 2.4325 0.25 5.125 0.25C7.8175 0.25 10 2.4325 10 5.125C10 6.3325 9.5575 7.4425 8.8225 8.2975L9.0325 8.5ZM1.75 5.125C1.75 6.9925 3.2575 8.5 5.125 8.5C6.9925 8.5 8.5 6.9925 8.5 5.125C8.5 3.2575 6.9925 1.75 5.125 1.75C3.2575 1.75 1.75 3.2575 1.75 5.125Z" fill="#22242A"/>
|
|
137
|
+
</svg>
|
|
138
|
+
<input type="text" spellcheck=${!1} aria-label="${a}" />
|
|
139
|
+
</div>
|
|
140
|
+
`}
|
|
141
|
+
|
|
142
|
+
<${VO}
|
|
143
|
+
entries=${w}
|
|
144
|
+
selectedEntry=${y}
|
|
145
|
+
setSelectedEntry=${_}
|
|
146
|
+
onAction=${n}
|
|
147
|
+
/>
|
|
148
|
+
</div>
|
|
149
|
+
`}
|
|
150
|
+
${u&&w.length===0&&qe`
|
|
151
|
+
<div class="djs-popup-no-results">${nt(u)?u(v):u}</div>
|
|
152
|
+
`}
|
|
153
|
+
</${Ab}>
|
|
154
|
+
`}function Ab(e){const{onClose:t,onKeydown:n,onKeyup:r,className:i,children:o,position:a}=e,s=Tb();return Of(()=>{if(typeof a!="function")return;const l=s.current,c=a(l);l.style.left=`${c.x}px`,l.style.top=`${c.y}px`},[s.current,a]),Of(()=>{const l=s.current;if(!l)return;(l.querySelector("input")||l).focus()},[]),Af(()=>{const l=u=>{if(u.key==="Escape")return u.preventDefault(),t()},c=u=>{if(!jr(u.target,".djs-popup",!0))return t()};return document.documentElement.addEventListener("keydown",l),document.body.addEventListener("click",c),()=>{document.documentElement.removeEventListener("keydown",l),document.body.removeEventListener("click",c)}},[]),qe`
|
|
155
|
+
<div
|
|
156
|
+
class=${Jl("djs-popup",i)}
|
|
157
|
+
style=${qO(e)}
|
|
158
|
+
onKeydown=${n}
|
|
159
|
+
onKeyup=${r}
|
|
160
|
+
ref=${s}
|
|
161
|
+
tabIndex="-1"
|
|
162
|
+
>
|
|
163
|
+
${o}
|
|
164
|
+
</div>
|
|
165
|
+
`}function qO(e){return{transform:`scale(${e.scale})`,width:`${e.width}px`,"transform-origin":"top left"}}var KO="data-id",Ob=["contextPad.close","canvas.viewbox.changing","commandStack.changed"],YO=1e3;function ze(e,t,n){this._eventBus=t,this._canvas=n,this._current=null;var r=ft(e&&e.scale)?e.scale:{min:1,max:1};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.refresh()})}ze.$inject=["config.popupMenu","eventBus","canvas"],ze.prototype._render=function(){const{position:e,providerId:t,entries:n,headerEntries:r,emptyPlaceholder:i,options:o}=this._current,a=Object.entries(n).map(([f,p])=>({id:f,...p})),s=Object.entries(r).map(([f,p])=>({id:f,...p})),l=e&&(f=>this._ensureVisible(f,e)),c=this._updateScale(this._current.container);mb(qe`
|
|
166
|
+
<${UO}
|
|
167
|
+
onClose=${f=>this.close(f)}
|
|
168
|
+
onSelect=${(f,p,m)=>this.trigger(f,p,m)}
|
|
169
|
+
position=${l}
|
|
170
|
+
className=${t}
|
|
171
|
+
entries=${a}
|
|
172
|
+
headerEntries=${s}
|
|
173
|
+
emptyPlaceholder=${i}
|
|
174
|
+
scale=${c}
|
|
175
|
+
onOpened=${this._onOpened.bind(this)}
|
|
176
|
+
onClosed=${this._onClosed.bind(this)}
|
|
177
|
+
...${{...o}}
|
|
178
|
+
/>
|
|
179
|
+
`,this._current.container)},ze.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,emptyPlaceholder:a}=this._getContext(e,t);this._current={position:n,providerId:t,target:e,entries:i,headerEntries:o,emptyPlaceholder:a,container:this._createContainer({provider:t}),options:r},this._emit("open"),this._bindAutoClose(),this._render()},ze.prototype.refresh=function(){if(!this.isOpen())return;const{target:e,providerId:t}=this._current,{entries:n,headerEntries:r,emptyPlaceholder:i}=this._getContext(e,t);this._current={...this._current,entries:n,headerEntries:r,emptyPlaceholder:i},this._emit("refresh"),this._render()},ze.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),o=this._getEmptyPlaceholder(n);return{entries:r,headerEntries:i,emptyPlaceholder:o,empty:!(Object.keys(r).length||Object.keys(i).length)}},ze.prototype.close=function(){this.isOpen()&&(this._emit("close"),this.reset(),this._current=null)},ze.prototype.reset=function(){const e=this._current.container;mb(null,e),Kn(e)},ze.prototype._emit=function(e,t){this._eventBus.fire(`popupMenu.${e}`,t)},ze.prototype._onOpened=function(){this._emit("opened")},ze.prototype._onClosed=function(){this._emit("closed")},ze.prototype._createContainer=function(e){var t=this._canvas,n=t.getContainer();const r=ke(`<div class="djs-popup-parent djs-scrollable" data-popup=${e.provider}></div>`);return n.appendChild(r),r},ze.prototype._bindAutoClose=function(){this._eventBus.once(Ob,this.close,this)},ze.prototype._unbindAutoClose=function(){this._eventBus.off(Ob,this.close,this)},ze.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),ft(n)&&e<n&&(i=n),ft(r)&&e>r&&(i=r)),i},ze.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<r.height?(o=t.x,a=10):i.y&&(o=t.x,a=t.y-r.height),t.y<n.top&&(a=t.y+r.height),{x:o,y:a}},ze.prototype.isEmpty=function(e,t){if(!e)throw new Error("target is missing");if(!t)throw new Error("provider ID is missing");const n=this._getProviders(t);return!n||!n.length?!0:this._getContext(e,t).empty},ze.prototype.registerProvider=function(e,t,n){n||(n=t,t=YO),this._eventBus.on("popupMenu.getProviders."+e,t,function(r){r.providers.push(n)})},ze.prototype._getProviders=function(e){var t=this._eventBus.createEvent({type:"popupMenu.getProviders."+e,providers:[]});return this._eventBus.fire(t),t.providers},ze.prototype._getEntries=function(e,t){var n={};return N(t,function(r){if(!r.getPopupMenuEntries){N(r.getEntries(e),function(o){var a=o.id;if(!a)throw new Error("entry ID is missing");n[a]=un(o,["id"])});return}var i=r.getPopupMenuEntries(e);nt(i)?n=i(n):N(i,function(o,a){n[a]=o})}),n},ze.prototype._getHeaderEntries=function(e,t){var n={};return N(t,function(r){if(!r.getPopupMenuHeaderEntries){if(!r.getHeaderEntries)return;N(r.getHeaderEntries(e),function(o){var a=o.id;if(!a)throw new Error("entry ID is missing");n[a]=un(o,["id"])});return}var i=r.getPopupMenuHeaderEntries(e);nt(i)?n=i(n):N(i,function(o,a){n[a]=o})}),n},ze.prototype._getEmptyPlaceholder=function(e){const t=e.find(n=>nt(n.getEmptyPlaceholder));return t&&t.getEmptyPlaceholder()},ze.prototype.isOpen=function(){return!!this._current},ze.prototype.trigger=function(e,t,n="click"){if(e.preventDefault(),!t){let i=jr(e.delegateTarget||e.target,".entry",!0),o=$t(i,KO);t={id:o,...this._getEntry(o)}}const r=t.action;if(this._emit("trigger",{entry:t,event:e})!==!1){if(nt(r)){if(n==="click")return r(e,t)}else if(r[n])return r[n](e,t)}},ze.prototype._getEntry=function(e){var t=this._current.entries[e]||this._current.headerEntries[e];if(!t)throw new Error("entry not found");return t};const Df={__init__:["popupMenu"],popupMenu:["type",ze]};var Mb={align:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2000 2000">
|
|
180
|
+
<line x1="200" y1="150" x2="200" y2="1850" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>
|
|
181
|
+
<rect x="500" y="150" width="1300" height="700" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>
|
|
182
|
+
<rect x="500" y="1150" width="700" height="700" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>
|
|
183
|
+
</svg>`,bottom:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">
|
|
184
|
+
<line x1="150" y1="1650" x2="1650" y2="1650" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>
|
|
185
|
+
<rect x="150" y="350" width="600" height="1300" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>
|
|
186
|
+
<rect x="1050" y="850" width="600" height="800" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>
|
|
187
|
+
</svg>`,center:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">
|
|
188
|
+
<line x1="900" y1="150" x2="900" y2="1650" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>
|
|
189
|
+
<rect x="250" y="150" width="1300" height="600" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>
|
|
190
|
+
<rect x="500" y="1050" width="800" height="600" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>
|
|
191
|
+
</svg>`,left:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">
|
|
192
|
+
<line x1="100" y1="150" x2="100" y2="1650" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>
|
|
193
|
+
<rect x="100" y="150" width="1300" height="600" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>
|
|
194
|
+
<rect x="100" y="1050" width="800" height="600" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>
|
|
195
|
+
</svg>`,right:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">
|
|
196
|
+
<line x1="1650" y1="150" x2="1650" y2="1650" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>
|
|
197
|
+
<rect x="350" y="150" width="1300" height="600" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>
|
|
198
|
+
<rect x="850" y="1050" width="800" height="600" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>
|
|
199
|
+
</svg>`,top:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">
|
|
200
|
+
<line x1="150" y1="150" x2="1650" y2="150" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>
|
|
201
|
+
<rect x="150" y="150" width="600" height="1300" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>
|
|
202
|
+
<rect x="1050" y="150" width="600" height="800" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>
|
|
203
|
+
</svg>`,middle:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">
|
|
204
|
+
<line x1="150" y1="900" x2="1650" y2="900" style="stroke:currentColor;stroke-width:100;stroke-linecap:round;"/>
|
|
205
|
+
<rect x="150" y="250" width="600" height="1300" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>
|
|
206
|
+
<rect x="1050" y="500" width="600" height="800" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>
|
|
207
|
+
</svg>`},XO=900;function Ro(e,t,n,r){e.registerProvider(XO,this),this._contextPad=e,this._popupMenu=t,this._translate=n,this._canvas=r}Ro.$inject=["contextPad","popupMenu","translate","canvas"],Ro.prototype.getMultiElementContextPadEntries=function(e){var t={};return this._isAllowed(e)&&j(t,this._getEntries(e)),t},Ro.prototype._isAllowed=function(e){return!this._popupMenu.isEmpty(e,"align-elements")},Ro.prototype._getEntries=function(){var e=this;return{"align-elements":{group:"align-elements",title:e._translate("Align elements"),html:`<div class="entry">${Mb.align}</div>`,action:{click:function(t,n){var r=e._getMenuPosition(n);j(r,{cursor:{x:t.x,y:t.y}}),e._popupMenu.open(n,"align-elements",r)}}}}},Ro.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 ZO=["left","center","right","top","middle","bottom"];function Na(e,t,n,r){this._alignElements=t,this._translate=n,this._popupMenu=e,this._rules=r,e.registerProvider("align-elements",this)}Na.$inject=["popupMenu","alignElements","translate","rules"],Na.prototype.getPopupMenuEntries=function(e){var t={};return this._isAllowed(e)&&j(t,this._getEntries(e)),t},Na.prototype._isAllowed=function(e){return this._rules.allowed("elements.align",{elements:e})},Na.prototype._getEntries=function(e){var t=this._alignElements,n=this._translate,r=this._popupMenu,i={};return N(ZO,function(o){i["align-elements-"+o]={group:"align",title:n("Align elements "+o),className:"bjs-align-elements-menu-entry",imageHtml:Mb[o],action:function(){t.trigger(e,o),r.close()}}}),i};function hn(e){K.call(this,e),this.init()}hn.$inject=["eventBus"],ie(hn,K),hn.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)})},hn.prototype.init=function(){};function ec(e){hn.call(this,e)}ec.$inject=["eventBus"],ie(ec,hn),ec.prototype.init=function(){this.addRule("elements.align",function(e){var t=e.elements,n=_e(t,function(r){return!(r.waypoints||r.host||r.labelTarget)});return n=fl(n),n.length<2?!1:n})};const QO={__depends__:[xO,eb,Df],__init__:["alignElementsContextPadProvider","alignElementsMenuProvider","bpmnAlignElements"],alignElementsContextPadProvider:["type",Ro],alignElementsMenuProvider:["type",Na],bpmnAlignElements:["type",ec]};var JO=10,Ib=50,eM=250;function Nf(e,t,n,r){for(var i;i=tM(e,n,t);)n=r(t,n,i);return n}function Bf(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",l=a.margin,c=a.minDistance;l<0?i[o]=Math.min(r[o]+l-t[s]/2,n[o]-c+l):i[o]=Math.max(r[o]+r[s]+l+t[s]/2,n[o]+c+l)}}),i}}function tM(e,t,n){var r={x:t.x-n.width/2,y:t.y-n.height/2,width:n.width,height:n.height},i=rM(e);return Re(i,function(o){if(o===n)return!1;var a=wt(o,r,JO);return a==="intersect"})}function nM(e,t){t||(t={});function n(m){return m.source===e?1:-1}var r=t.defaultDistance||Ib,i=t.direction||"e",o=t.filter,a=t.getWeight||n,s=t.maxDistance||eM,l=t.reference||"start";o||(o=aM);function c(m,v){return i==="n"?l==="start"?ce(m).top-ce(v).bottom:l==="center"?ce(m).top-fe(v).y:ce(m).top-ce(v).top:i==="w"?l==="start"?ce(m).left-ce(v).right:l==="center"?ce(m).left-fe(v).x:ce(m).left-ce(v).left:i==="s"?l==="start"?ce(v).top-ce(m).bottom:l==="center"?fe(v).y-ce(m).bottom:ce(v).bottom-ce(m).bottom:l==="start"?ce(v).left-ce(m).right:l==="center"?fe(v).x-ce(m).right:ce(v).right-ce(m).right}var u=e.incoming.filter(o).map(function(m){var v=a(m),g=v<0?c(m.source,e):c(e,m.source);return{id:m.source.id,distance:g,weight:v}}),d=e.outgoing.filter(o).map(function(m){var v=a(m),g=v>0?c(e,m.target):c(m.target,e);return{id:m.target.id,distance:g,weight:v}}),f=u.concat(d).reduce(function(m,v){return m[v.id+"__weight_"+v.weight]=v,m},{}),p=Lt(f,function(m,v){var g=v.distance,x=v.weight;return g<0||g>s||(m[String(g)]||(m[String(g)]=0),m[String(g)]+=1*x,(!m.distance||m[m.distance]<m[String(g)])&&(m.distance=g)),m},{});return p.distance||r}function rM(e){var t=kf(e);return e.host&&(t=t.concat(kf(e.host))),e.attachers&&(t=t.concat(e.attachers.reduce(function(n,r){return n.concat(kf(r))},[]))),t}function kf(e){return oM(e).concat(iM(e))}function iM(e){return e.incoming.map(function(t){return t.source})}function oM(e){return e.outgoing.map(function(t){return t.target})}function aM(){return!0}var sM=100;function Db(e,t,n){e.on("autoPlace",sM,function(r){var i=r.shape,o=r.source;return lM(o,i)}),e.on("autoPlace.end",function(r){n.scrollToElement(r.shape)}),this.append=function(r,i,o){e.fire("autoPlace.start",{source:r,shape:i});var a=e.fire("autoPlace",{source:r,shape:i}),s=t.appendShape(r,i,a,r.parent,o);return e.fire("autoPlace.end",{source:r,shape:s}),s}}Db.$inject=["eventBus","modeling","canvas"];function lM(e,t,n){n||(n={});var r=n.defaultDistance||Ib,i=fe(e),o=ce(e);return{x:o.right+r+t.width/2,y:i.y}}function Nb(e,t){e.on("autoPlace.end",500,function(n){t.select(n.shape)})}Nb.$inject=["eventBus","selection"];const cM={__init__:["autoPlaceSelectionBehavior"],autoPlace:["type",Db],autoPlaceSelectionBehavior:["type",Nb]};function Ao(e,t){for(kt(t)&&(t=[t]);e=e.parent;)if(be(e,t))return e;return null}function Bb(e,t){var n=Ao(e,"bpmn:Process");if(n)return!0;var r=["bpmn:Participant","bpmn:Lane"];if(n=Ao(e,r),n)return lt(n);if(be(e,r))return lt(e);var i;for(i=Q(e);i&&!P(i,"bpmn:Process");i=i.$parent);if(!t)return!0;var o=t.find(function(a){var s=Q(a);return s&&s.get("processRef")===i});return o?lt(o):!0}function kb(e,t,n){var r=Bb(e,n);if(P(t,"bpmn:TextAnnotation"))return dM(e,t,r);if(be(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"]))return fM(e,t,r);if(P(t,"bpmn:FlowNode"))return uM(e,t,r)}function uM(e,t,n){var r=ce(e),i=fe(e),o=n?{directionHint:"e",minDistance:80,baseOrientation:"left",boundaryOrientation:"top",start:"top",end:"bottom"}:{directionHint:"s",minDistance:90,baseOrientation:"top",boundaryOrientation:"left",start:"left",end:"right"},a=nM(e,{filter:function(p){return P(p,"bpmn:SequenceFlow")},direction:o.directionHint}),s=30,l=o.minDistance,c=o.baseOrientation;P(e,"bpmn:BoundaryEvent")&&(c=wt(e,e.host,-25),c.indexOf(o.boundaryOrientation)!==-1&&(s*=-1));var u=n?{x:r.right+a+t.width/2,y:i.y+Lb(c,l,o)}:{x:i.x+Lb(c,l,o),y:r.bottom+a+t.height/2},d={margin:s,minDistance:l},f=n?{y:d}:{x:d};return Nf(e,t,u,Bf(f))}function Lb(e,t,n){return e.includes(n.start)?-1*t:e.includes(n.end)?t:0}function dM(e,t,n){var r=ce(e),i=n?{x:r.right+t.width/2,y:r.top-50-t.height/2}:{x:r.right+50+t.width/2,y:r.bottom+t.height/2};Be(e)&&(i=fe(e),n?(i.x+=100,i.y-=50):(i.x+=100,i.y+=50));var o={margin:n?-30:30,minDistance:20},a=n?{y:o}:{x:o};return Nf(e,t,i,Bf(a))}function fM(e,t,n){var r=ce(e),i=n?{x:r.right-10+t.width/2,y:r.bottom+40+t.width/2}:{x:r.left-40-t.width/2,y:r.bottom-10+t.height/2},o={margin:30,minDistance:30},a=n?{x:o}:{y:o};return Nf(e,t,i,Bf(a))}function jb(e,t){e.on("autoPlace",function(n){var r=n.shape,i=n.source;return kb(i,r,t)})}jb.$inject=["eventBus","elementRegistry"];const Lf={__depends__:[cM],__init__:["bpmnAutoPlace"],bpmnAutoPlace:["type",jb]};function xr(e,t,n,r){K.call(this,e),this._elementRegistry=t,this._modeling=n,this._rules=r;var i=this;this.postExecuted(["shape.create"],function(o){var a=o.context,s=a.hints||{},l=a.shape,c=a.parent||a.newParent;s.autoResize!==!1&&i._expand([l],c)}),this.postExecuted(["elements.move"],function(o){var a=o.context,s=Rd(Ad(a.closure.topLevel)),l=a.hints,c=l?l.autoResize:!0;if(c!==!1){var u=fo(s,function(d){return d.parent.id});N(u,function(d,f){me(c)&&(d=d.filter(function(p){return Re(c,Bn({id:p.id}))})),i._expand(d,f)})}}),this.postExecuted(["shape.toggleCollapse"],function(o){var a=o.context,s=a.hints,l=a.shape;s&&s.autoResize===!1||l.collapsed||i._expand(l.children||[],l)}),this.postExecuted(["shape.resize"],function(o){var a=o.context,s=a.hints,l=a.shape,c=l.parent;s&&s.autoResize===!1||c&&i._expand([l],c)})}xr.$inject=["eventBus","elementRegistry","modeling","rules"],ie(xr,K),xr.prototype._getOptimalBounds=function(e,t){var n=this.getOffset(t),r=this.getPadding(t),i=ce(st(e)),o=ce(t),a={};return i.top-o.top<r.top&&(a.top=i.top-n.top),i.left-o.left<r.left&&(a.left=i.left-n.left),o.right-i.right<r.right&&(a.right=i.right+n.right),o.bottom-i.bottom<r.bottom&&(a.bottom=i.bottom+n.bottom),vl(j({},o,a))},xr.prototype._expand=function(e,t){typeof t=="string"&&(t=this._elementRegistry.get(t));var n=this._rules.allowed("element.autoResize",{elements:e,target:t});if(n){var r=this._getOptimalBounds(e,t);if(pM(r,t)){var i=hM(kn(t,["x","y","width","height"]),r);this.resize(t,r,{autoResize:i});var o=t.parent;o&&this._expand([t],o)}}},xr.prototype.getOffset=function(e){return{top:60,bottom:60,left:100,right:100}},xr.prototype.getPadding=function(e){return{top:2,bottom:2,left:15,right:15}},xr.prototype.resize=function(e,t,n){this._modeling.resizeShape(e,t,null,n)};function pM(e,t){return e.x!==t.x||e.y!==t.y||e.width!==t.width||e.height!==t.height}function hM(e,t){var n="";return e=ce(e),t=ce(t),e.top>t.top&&(n=n.concat("n")),e.right<t.right&&(n=n.concat("w")),e.bottom<t.bottom&&(n=n.concat("s")),e.left>t.left&&(n=n.concat("e")),n}function tc(e){e.invoke(xr,this)}tc.$inject=["injector"],ie(tc,xr),tc.prototype.resize=function(e,t,n){P(e,"bpmn:Participant")?this._modeling.resizeLane(e,t,null,n):this._modeling.resizeShape(e,t,null,n)};function Ba(e){hn.call(this,e);var t=this;this.addRule("element.autoResize",function(n){return t.canResize(n.elements,n.target)})}Ba.$inject=["eventBus"],ie(Ba,hn),Ba.prototype.canResize=function(e,t){return!1};function nc(e,t){Ba.call(this,e),this._modeling=t}ie(nc,Ba),nc.$inject=["eventBus","modeling"],nc.prototype.canResize=function(e,t){if(P(t.di,"bpmndi:BPMNPlane")||!P(t,"bpmn:Participant")&&!P(t,"bpmn:Lane")&&!P(t,"bpmn:SubProcess"))return!1;var n=!0;return N(e,function(r){if(P(r,"bpmn:Lane")||Te(r)){n=!1;return}}),n};const mM={__init__:["bpmnAutoResize","bpmnAutoResizeProvider"],bpmnAutoResize:["type",tc],bpmnAutoResizeProvider:["type",nc]};var Fb=1500;function Hb(e,t,n){var r=this,i=n.get("dragging",!1);function o(a){if(!a.hover){var s=a.originalEvent,l=r._findTargetGfx(s),c=l&&e.get(l);l&&c&&(a.stopPropagation(),i.hover({element:c,gfx:l}),i.move(s))}}i&&t.on("drag.start",function(a){t.once("drag.move",Fb,function(s){o(s)})}),function(){var a,s;t.on("element.hover",function(l){a=l.gfx,s=l.element}),t.on("element.hover",Fb,function(l){s&&t.fire("element.out",{element:s,gfx:a})}),t.on("element.out",function(){a=null,s=null})}(),this._findTargetGfx=function(a){var s,l;if(a instanceof MouseEvent)return s=ki(a),l=document.elementFromPoint(s.x,s.y),gM(l)}}Hb.$inject=["elementRegistry","eventBus","injector"];function gM(e){return jr(e,"svg, .djs-element",!0)}const vM={__init__:["hoverFix"],hoverFix:["type",Hb]};var Oo=Math.round,zb="djs-drag-active";function ji(e){e.preventDefault()}function yM(e){return typeof TouchEvent<"u"&&e instanceof TouchEvent}function bM(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}function Vb(e,t,n,r){var i={threshold:5,trapClick:!0},o;function a(b){var y=t.viewbox(),_=t._container.getBoundingClientRect();return{x:y.x+(b.x-_.left)/y.scale,y:y.y+(b.y-_.top)/y.scale}}function s(b,y){y=y||o;var _=e.createEvent(j({},y.payload,y.data,{isTouch:y.isTouch}));return e.fire("drag."+b,_)===!1?!1:e.fire(y.prefix+"."+b,_)}function l(b){var y=b.filter(function(_){return r.get(_.id)});y.length&&n.select(y)}function c(b,y){var _=o.payload,S=o.displacement,C=o.globalStart,$=ki(b),M=Ln($,C),R=o.localStart,I=a($),L=Ln(I,R);if(!o.active&&(y||bM(M)>o.threshold)){if(j(_,{x:Oo(R.x+S.x),y:Oo(R.y+S.y),dx:0,dy:0},{originalEvent:b}),s("start")===!1)return g();o.active=!0,o.keepSelection||(_.previousSelection=n.get(),n.select(null)),o.cursor&&Vl(o.cursor),t.addMarker(t.getRootElement(),zb)}hf(b),o.active&&(j(_,{x:Oo(I.x+S.x),y:Oo(I.y+S.y),dx:Oo(L.x),dy:Oo(L.y)},{originalEvent:b}),s("move"))}function u(b){var y,_=!0;o.active&&(b&&(o.payload.originalEvent=b,hf(b)),_=s("end")),_===!1&&s("rejected"),y=x(_!==!0),s("ended",y)}function d(b){ct("Escape",b)&&(ji(b),g())}function f(b){var y;o.active&&(y=Gy(e),setTimeout(y,400),ji(b)),u(b)}function p(b){c(b)}function m(b){var y=o.payload;y.hoverGfx=b.gfx,y.hover=b.element,s("hover")}function v(b){s("out");var y=o.payload;y.hoverGfx=null,y.hover=null}function g(b){var y;if(o){var _=o.active;_&&s("cancel"),y=x(b),_&&s("canceled",y)}}function x(b){var y,_;s("cleanup"),Wy(),o.trapClick?_=f:_=u,ge.unbind(document,"mousemove",c),ge.unbind(document,"dragstart",ji),ge.unbind(document,"selectstart",ji),ge.unbind(document,"mousedown",_,!0),ge.unbind(document,"mouseup",_,!0),ge.unbind(document,"keyup",d),ge.unbind(document,"touchstart",p,!0),ge.unbind(document,"touchcancel",g,!0),ge.unbind(document,"touchmove",c,!0),ge.unbind(document,"touchend",u,!0),e.off("element.hover",m),e.off("element.out",v),t.removeMarker(t.getRootElement(),zb);var S=o.payload.previousSelection;return b!==!1&&S&&!n.get().length&&l(S),y=o,o=null,y}function w(b,y,_,S){o&&g(!1),typeof y=="string"&&(S=_,_=y,y=null),S=j({},i,S||{});var C=S.data||{},$,M,R,I,L;S.trapClick?I=f:I=u,b?($=_o(b)||b,M=ki(b),hf(b),$.type==="dragstart"&&ji($)):($=null,M={x:0,y:0}),R=a(M),y||(y=R),L=yM($),o=j({prefix:_,data:C,payload:{},globalStart:M,displacement:Ln(y,R),localStart:R,isTouch:L},S),S.manual||(L?(ge.bind(document,"touchstart",p,!0),ge.bind(document,"touchcancel",g,!0),ge.bind(document,"touchmove",c,!0),ge.bind(document,"touchend",u,!0)):(ge.bind(document,"mousemove",c),ge.bind(document,"dragstart",ji),ge.bind(document,"selectstart",ji),ge.bind(document,"mousedown",I,!0),ge.bind(document,"mouseup",I,!0)),ge.bind(document,"keyup",d),e.on("element.hover",m),e.on("element.out",v)),s("init"),S.autoActivate&&c(b,!0)}e.on("diagram.destroy",g),this.init=w,this.move=c,this.hover=m,this.out=v,this.end=u,this.cancel=g,this.context=function(){return o},this.setOptions=function(b){j(i,b)}}Vb.$inject=["eventBus","canvas","selection","elementRegistry"];const _r={__depends__:[vM,Jn],dragging:["type",Vb]};function Mo(e,t,n){this._canvas=n,this._opts=j({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()})}Mo.$inject=["config.autoScroll","eventBus","canvas"],Mo.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,l=0;l<4;l++)xM(o[l],n.scrollThresholdOut[l],n.scrollThresholdIn[l])&&(l===0?a=n.scrollStep:l==1?s=n.scrollStep:l==2?a=-n.scrollStep:l==3&&(s=-n.scrollStep));(a!==0||s!==0)&&(t.scroll({dx:a,dy:s}),this._scrolling=setTimeout(function(){r.startScroll(e)},n.scrollRepeatTimeout))};function xM(e,t,n){return t<e&&e<n}Mo.prototype.stopScroll=function(){clearTimeout(this._scrolling)},Mo.prototype.setOptions=function(e){this._opts=j({},this._opts,e)},Mo.prototype._toBorderPoint=function(e){var t=this._canvas._container.getBoundingClientRect(),n=ki(e.originalEvent);return{x:n.x-t.left,y:n.y-t.top}};const _M={__depends__:[_r],__init__:["autoScroll"],autoScroll:["type",Mo]};function jf(e){this._commandStack=e.get("commandStack",!1)}jf.$inject=["injector"],jf.prototype.allowed=function(e,t){var n=!0,r=this._commandStack;return r&&(n=r.canExecute(e,t)),n===void 0?!0:n};const tr={__init__:["rules"],rules:["type",jf]};var rc=Math.round,wM=Math.max;function EM(e,t){var n=e.x,r=e.y;return[["M",n,r],["m",0,-t],["a",t,t,0,1,1,0,2*t],["a",t,t,0,1,1,0,-2*t],["z"]]}function SM(e){var t=[];return e.forEach(function(n,r){t.push([r===0?"M":"L",n.x,n.y])}),t}var Wb=10;function CM(e,t){var n,r;for(n=0;r=e[n];n++)if(ga(r,t)<=Wb)return{point:e[n],bendpoint:!0,index:n};return null}function TM(e,t){var n=Ev(EM(t,Wb),SM(e)),r=n[0],i=n[n.length-1],o;return r?r!==i?r.segment2!==i.segment2?(o=wM(r.segment2,i.segment2)-1,{point:e[o],bendpoint:!0,index:o}):{point:{x:rc(r.x+i.x)/2,y:rc(r.y+i.y)/2},index:r.segment2}:{point:{x:rc(r.x),y:rc(r.y)},index:r.segment2}:null}function Ff(e,t){return CM(e,t)||TM(e,t)}function Gb(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}function Ub(e){return Math.atan((e[1].y-e[0].y)/(e[1].x-e[0].x))}function PM(e,t){return t?{x:Math.cos(t)*e.x-Math.sin(t)*e.y,y:Math.sin(t)*e.x+Math.cos(t)*e.y}:e}function $M(e,t,n){var r=[{n:e[0]-n[0],lambda:t[0]},{n:e[1]-n[1],lambda:t[1]}],i=r[0].n*t[0]+r[1].n*t[1],o=r[0].lambda*t[0]+r[1].lambda*t[1];return-i/o}function Hf(e,t){var n=t[0],r=t[1],i={x:r.x-n.x,y:r.y-n.y},o=$M([n.x,n.y],[i.x,i.y],[e.x,e.y]);return{x:n.x+o*i.x,y:n.y+o*i.y}}function qb(e,t){var n=Hf(e,t),r={x:n.x-e.x,y:n.y-e.y};return Gb(r)}function ic(e,t){return Gb({x:e.x-t.x,y:e.y-t.y})}var Kb="djs-bendpoint",Yb="djs-segment-dragger";function RM(e,t){var n=ki(t),r=e._container.getBoundingClientRect(),i;i={x:r.left,y:r.top};var o=e.viewbox();return{x:o.x+(n.x-i.x)/o.scale,y:o.y+(n.y-i.y)/o.scale}}function zf(e,t,n){var r=RM(e,n),i=Ff(t,r);return i}function Vf(e,t){var n=le("g");Ce(n).add(Kb),pe(e,n);var r=le("circle");ee(r,{cx:0,cy:0,r:4}),Ce(r).add("djs-visual"),pe(n,r);var i=le("circle");return ee(i,{cx:0,cy:0,r:10}),Ce(i).add("djs-hit"),pe(n,i),t&&Ce(n).add(t),n}function AM(e,t,n,r){var i=le("g");pe(e,i);var o=18,a=6,s=11,l=MM(t,n,r),c=a+s,u=le("rect");ee(u,{x:-o/2,y:-a/2,width:o,height:a}),Ce(u).add("djs-visual"),pe(i,u);var d=le("rect");return ee(d,{x:-l/2,y:-c/2,width:l,height:c}),Ce(d).add("djs-hit"),pe(i,d),zv(i,r==="v"?90:0),i}function Xb(e,t,n){var r=le("g"),i=Gd(t,n),o=pr(t,n);return pe(e,r),AM(r,t,n,o),Ce(r).add(Yb),Ce(r).add(o==="h"?"horizontal":"vertical"),gt(r,i.x,i.y),r}function Wf(e){return Math.abs(Math.round(e*2/3))}function OM(e,t){var n=IM(e,t);return Hf(e,n)}function MM(e,t,n){var r=t.x-e.x,i=t.y-e.y;return Wf(n==="h"?r:i)}function IM(e,t){for(var n=t.waypoints,r=1/0,i,o=0;o<n.length-1;o++){var a=n[o],s=n[o+1],l=qb(e,[a,s]);l<r&&(r=l,i=o)}return[n[i],n[i+1]]}function Zb(e,t,n,r,i){function o(b,y,_){var S=b.index,C=b.point,$,M,R,I,L,k;return S<=0||b.bendpoint?!1:($=y[S-1],M=y[S],R=Gd($,M),I=pr($,M),L=Math.abs(C.x-R.x),k=Math.abs(C.y-R.y),I&&L<=_&&k<=_)}function a(b,y){var _=b.waypoints,S,C,$,M;return y.index<=0||y.bendpoint||(S={start:_[y.index-1],end:_[y.index]},C=pr(S.start,S.end),!C)?null:(C==="h"?$=S.end.x-S.start.x:$=S.end.y-S.start.y,M=Wf($)/2,M)}function s(b,y){var _=y.waypoints,S=zf(t,_,b),C;if(S)return C=a(y,S),o(S,_,C)?i.start(b,y,S.index):r.start(b,y,S.index,!S.bendpoint),!0}function l(b,y,_){ge.bind(b,y,function(S){n.triggerMouseEvent(y,S,_),S.stopPropagation()})}function c(b,y){var _=t.getLayer("overlays"),S=Ie('.djs-bendpoints[data-element-id="'+$a(b.id)+'"]',_);return!S&&y&&(S=le("g"),ee(S,{"data-element-id":b.id}),Ce(S).add("djs-bendpoints"),pe(_,S),l(S,"mousedown",b),l(S,"click",b),l(S,"dblclick",b)),S}function u(b,y){return Ie('.djs-segment-dragger[data-segment-idx="'+b+'"]',y)}function d(b,y){y.waypoints.forEach(function(_,S){var C=Vf(b);pe(b,C),gt(C,_.x,_.y)}),Vf(b,"floating")}function f(b,y){for(var _=y.waypoints,S,C,$,M=1;M<_.length;M++)S=_[M-1],C=_[M],pr(S,C)&&($=Xb(b,S,C),ee($,{"data-segment-idx":M}),l($,"mousemove",y))}function p(b){N(Dd("."+Kb,b),function(y){it(y)})}function m(b){N(Dd("."+Yb,b),function(y){it(y)})}function v(b){var y=c(b);return y||(y=c(b,!0),d(y,b),f(y,b)),y}function g(b){var y=c(b);y&&(m(y),p(y),f(y,b),d(y,b))}function x(b,y){var _=Ie(".floating",b),S=y.point;_&>(_,S.x,S.y)}function w(b,y,_){var S=u(y.index,b),C=_[y.index-1],$=_[y.index],M=y.point,R=Gd(C,$),I=pr(C,$),L,k;S&&(L=DM(S),k={x:M.x-R.x,y:M.y-R.y},I==="v"&&(k={x:k.y,y:k.x}),gt(L,k.x,k.y))}e.on("connection.changed",function(b){g(b.element)}),e.on("connection.remove",function(b){var y=c(b.element);y&&it(y)}),e.on("element.marker.update",function(b){var y=b.element,_;y.waypoints&&(_=v(y),b.add?Ce(_).add(b.marker):Ce(_).remove(b.marker))}),e.on("element.mousemove",function(b){var y=b.element,_=y.waypoints,S,C;if(_){if(S=c(y,!0),C=zf(t,_,b.originalEvent),!C)return;x(S,C),C.bendpoint||w(S,C,_)}}),e.on("element.mousedown",function(b){if(Xr(b)){var y=b.originalEvent,_=b.element;if(_.waypoints)return s(y,_)}}),e.on("selection.changed",function(b){var y=b.newSelection,_=y[0];_&&_.waypoints&&v(_)}),e.on("element.hover",function(b){var y=b.element;y.waypoints&&(v(y),n.registerEvent(b.gfx,"mousemove","element.mousemove"))}),e.on("element.out",function(b){n.unregisterEvent(b.gfx,"mousemove","element.mousemove")}),e.on("element.updateId",function(b){var y=b.element,_=b.newId;if(y.waypoints){var S=c(y);S&&ee(S,{"data-element-id":_})}}),this.addHandles=v,this.updateHandles=g,this.getBendpointsContainer=c,this.getSegmentDragger=u}Zb.$inject=["eventBus","canvas","interactionEvents","bendpointMove","connectionSegmentMove"];function DM(e){return Ie(".djs-visual",e)}var Qb=Math.round,Fi="reconnectStart",Hi="reconnectEnd",ka="updateWaypoints";function Gf(e,t,n,r,i,o){this._injector=e,this.start=function(a,s,l,c){var u=n.getGraphics(s),d=s.source,f=s.target,p=s.waypoints,m;!c&&l===0?m=Fi:!c&&l===p.length-1?m=Hi:m=ka;var v=m===ka?"connection.updateWaypoints":"connection.reconnect",g=i.allowed(v,{connection:s,source:d,target:f});g===!1&&(g=i.allowed(v,{connection:s,source:f,target:d})),g!==!1&&r.init(a,"bendpoint.move",{data:{connection:s,connectionGfx:u,context:{allowed:g,bendpointIndex:l,connection:s,source:d,target:f,insert:c,type:m}}})},t.on("bendpoint.move.hover",function(a){var s=a.context,l=s.connection,c=l.source,u=l.target,d=a.hover,f=s.type;s.hover=d;var p;if(d){var m=f===ka?"connection.updateWaypoints":"connection.reconnect";if(p=s.allowed=i.allowed(m,{connection:l,source:f===Fi?d:c,target:f===Hi?d:u}),p){s.source=f===Fi?d:c,s.target=f===Hi?d:u;return}p===!1&&(p=s.allowed=i.allowed(m,{connection:l,source:f===Hi?d:u,target:f===Fi?d:c})),p&&(s.source=f===Hi?d:u,s.target=f===Fi?d:c)}}),t.on(["bendpoint.move.out","bendpoint.move.cleanup"],function(a){var s=a.context,l=s.type;s.hover=null,s.source=null,s.target=null,l!==ka&&(s.allowed=!1)}),t.on("bendpoint.move.end",function(a){var s=a.context,l=s.allowed,c=s.bendpointIndex,u=s.connection,d=s.insert,f=u.waypoints.slice(),p=s.source,m=s.target,v=s.type,g=s.hints||{},x={x:Qb(a.x),y:Qb(a.y)};if(!l)return!1;v===ka?(d?f.splice(c,0,x):f[c]=x,g.bendpointMove={insert:d,bendpointIndex:c},f=this.cropWaypoints(u,f),o.updateWaypoints(u,S$(f),g)):(v===Fi?(g.docking="source",oc(s)&&(g.docking="target",g.newWaypoints=f.reverse())):v===Hi&&(g.docking="target",oc(s)&&(g.docking="source",g.newWaypoints=f.reverse())),o.reconnect(u,p,m,x,g))},this)}Gf.$inject=["injector","eventBus","canvas","dragging","rules","modeling"],Gf.prototype.cropWaypoints=function(e,t){var n=this._injector.get("connectionDocking",!1);if(!n)return t;var r=e.waypoints;return e.waypoints=t,e.waypoints=n.getCroppedWaypoints(e),t=e.waypoints,e.waypoints=r,t};function oc(e){var t=e.hover,n=e.source,r=e.target,i=e.type;if(i===Fi)return t&&r&&t===r&&n!==r;if(i===Hi)return t&&n&&t===n&&n!==r}var NM="reconnectStart",BM="reconnectEnd",Jb="updateWaypoints",La="connect-ok",ac="connect-not-ok",e0="connect-hover",t0="djs-updating",n0="djs-dragging",r0=1100;function i0(e,t,n,r){this._injector=t;var i=t.get("connectionPreview",!1);n.on("bendpoint.move.start",function(o){var a=o.context,s=a.bendpointIndex,l=a.connection,c=a.insert,u=l.waypoints,d=u.slice();a.waypoints=u,c&&d.splice(s,0,{x:o.x,y:o.y}),l.waypoints=d;var f=a.draggerGfx=Vf(r.getLayer("overlays"));Ce(f).add("djs-dragging"),r.addMarker(l,n0),r.addMarker(l,t0)}),n.on("bendpoint.move.hover",function(o){var a=o.context,s=a.allowed,l=a.hover,c=a.type;if(l){if(r.addMarker(l,e0),c===Jb)return;s?(r.removeMarker(l,ac),r.addMarker(l,La)):s===!1&&(r.removeMarker(l,La),r.addMarker(l,ac))}}),n.on(["bendpoint.move.out","bendpoint.move.cleanup"],r0,function(o){var a=o.context,s=a.hover,l=a.target;s&&(r.removeMarker(s,e0),r.removeMarker(s,l?La:ac))}),n.on("bendpoint.move.move",function(o){var a=o.context,s=a.allowed,l=a.bendpointIndex,c=a.draggerGfx,u=a.hover,d=a.type,f=a.connection,p=f.source,m=f.target,v=f.waypoints.slice(),g={x:o.x,y:o.y},x=a.hints||{},w={};i&&(x.connectionStart&&(w.connectionStart=x.connectionStart),x.connectionEnd&&(w.connectionEnd=x.connectionEnd),d===NM?oc(a)?(w.connectionEnd=w.connectionEnd||g,w.source=m,w.target=u||p,v=v.reverse()):(w.connectionStart=w.connectionStart||g,w.source=u||p,w.target=m):d===BM?oc(a)?(w.connectionStart=w.connectionStart||g,w.source=u||m,w.target=p,v=v.reverse()):(w.connectionEnd=w.connectionEnd||g,w.source=p,w.target=u||m):(w.noCropping=!0,w.noLayout=!0,v[l]=g),d===Jb&&(v=e.cropWaypoints(f,v)),w.waypoints=v,i.drawPreview(a,s,w)),gt(c,o.x,o.y)},this),n.on(["bendpoint.move.end","bendpoint.move.cancel"],r0,function(o){var a=o.context,s=a.connection,l=a.draggerGfx,c=a.hover,u=a.target,d=a.waypoints;s.waypoints=d,it(l),r.removeMarker(s,t0),r.removeMarker(s,n0),c&&(r.removeMarker(c,La),r.removeMarker(c,u?La:ac)),i&&i.cleanUp(a)})}i0.$inject=["bendpointMove","injector","eventBus","canvas"];var o0="connect-hover",a0="djs-updating";function s0(e,t,n){return Uf(e,t,e[t]+n)}function Uf(e,t,n){return{x:t==="x"?n:e.x,y:t==="y"?n:e.y}}function kM(e,t,n,r){var i=Math.max(t[r],n[r]),o=Math.min(t[r],n[r]),a=20,s=Math.min(Math.max(o+a,e[r]),i-a);return Uf(t,r,s)}function l0(e){return e==="x"?"y":"x"}function c0(e,t,n){var r,i;return e.original?e.original:(r=fe(t),i=l0(n),Uf(e,i,r[i]))}function u0(e,t,n,r,i,o){var a=e.get("connectionDocking",!1);this.start=function(d,f,p){var m,v=n.getGraphics(f),g=p-1,x=p,w=f.waypoints,b=w[g],y=w[x],_=zf(n,w,d),S,C,$;S=pr(b,y),S&&(C=S==="v"?"x":"y",g===0&&(b=c0(b,f.source,C)),x===w.length-1&&(y=c0(y,f.target,C)),_?$=_.point:$={x:(b.x+y.x)/2,y:(b.y+y.y)/2},m={connection:f,segmentStartIndex:g,segmentEndIndex:x,segmentStart:b,segmentEnd:y,axis:C,dragPosition:$},r.init(d,$,"connectionSegment.move",{cursor:C==="x"?"resize-ew":"resize-ns",data:{connection:f,connectionGfx:v,context:m}}))};function s(d,f){if(!a)return f;var p=d.waypoints,m;return d.waypoints=f,m=a.getCroppedWaypoints(d),d.waypoints=p,m}function l(d){i.update("connection",d.connection,d.connectionGfx)}function c(d,f,p){var m=d.newWaypoints,v=d.segmentStartIndex+f,g=m[v],x=d.segmentEndIndex+f,w=m[x],b=l0(d.axis),y=kM(p,g,w,b);gt(d.draggerGfx,y.x,y.y)}function u(d,f){var p=0,m=d.filter(function(v,g){return Wd(d[g-1],d[g+1],v)?(p=g<=f?p-1:p,!1):!0});return{waypoints:m,segmentOffset:p}}t.on("connectionSegment.move.start",function(d){var f=d.context,p=d.connection,m=n.getLayer("overlays");f.originalWaypoints=p.waypoints.slice(),f.draggerGfx=Xb(m,f.segmentStart,f.segmentEnd),Ce(f.draggerGfx).add("djs-dragging"),n.addMarker(p,a0)}),t.on("connectionSegment.move.move",function(d){var f=d.context,p=f.connection,m=f.segmentStartIndex,v=f.segmentEndIndex,g=f.segmentStart,x=f.segmentEnd,w=f.axis,b=f.originalWaypoints.slice(),y=s0(g,w,d["d"+w]),_=s0(x,w,d["d"+w]),S=b.length,C=0;b[m]=y,b[v]=_;var $,M;m<2&&($=wt(p.source,y),m===1?$==="intersect"&&(b.shift(),b[0]=y,C--):$!=="intersect"&&(b.unshift(g),C++)),v>S-3&&(M=wt(p.target,_),v===S-2?M==="intersect"&&(b.pop(),b[b.length-1]=_):M!=="intersect"&&b.push(x)),f.newWaypoints=p.waypoints=s(p,b),c(f,C,d),f.newSegmentStartIndex=m+C,l(d)}),t.on("connectionSegment.move.hover",function(d){d.context.hover=d.hover,n.addMarker(d.hover,o0)}),t.on(["connectionSegment.move.out","connectionSegment.move.cleanup"],function(d){var f=d.context.hover;f&&n.removeMarker(f,o0)}),t.on("connectionSegment.move.cleanup",function(d){var f=d.context,p=f.connection;f.draggerGfx&&it(f.draggerGfx),n.removeMarker(p,a0)}),t.on(["connectionSegment.move.cancel","connectionSegment.move.end"],function(d){var f=d.context,p=f.connection;p.waypoints=f.originalWaypoints,l(d)}),t.on("connectionSegment.move.end",function(d){var f=d.context,p=f.connection,m=f.newWaypoints,v=f.newSegmentStartIndex;m=m.map(function(_){return{original:_.original,x:Math.round(_.x),y:Math.round(_.y)}});var g=u(m,v),x=g.waypoints,w=s(p,x),b=g.segmentOffset,y={segmentMove:{segmentStartIndex:f.segmentStartIndex,newSegmentStartIndex:v+b}};o.updateWaypoints(p,w,y)})}u0.$inject=["injector","eventBus","canvas","dragging","graphicsFactory","modeling"];var LM=Math.abs,d0=Math.round;function jM(e,t,n){n=n===void 0?10:n;var r,i;for(r=0;r<t.length;r++)if(i=t[r],LM(i-e)<=n)return i}function f0(e){return{x:e.x,y:e.y}}function p0(e){return{x:e.x+e.width,y:e.y+e.height}}function mn(e,t){return!e||isNaN(e.x)||isNaN(e.y)?t:{x:d0(e.x+e.width/2),y:d0(e.y+e.height/2)}}function Io(e,t){var n=e.snapped;return n?typeof t=="string"?n[t]:n.x&&n.y:!1}function et(e,t,n){if(typeof t!="string")throw new Error("axis must be in [x, y]");if(typeof n!="number"&&n!==!1)throw new Error("value must be Number or false");var r,i=e[t],o=e.snapped=e.snapped||{};return n===!1?o[t]=!1:(o[t]=!0,r=n-i,e[t]+=r,e["d"+t]+=r),i}function h0(e){return e.children||[]}var FM=Math.abs,m0=Math.round,qf=10;function g0(e){function t(o,a){if(me(o)){for(var s=o.length;s--;)if(FM(o[s]-a)<=qf)return o[s]}else{o=+o;var l=a%o;if(l<qf)return a-l;if(l>o-qf)return a-l+o}return a}function n(o,a){if(o.waypoints)return OM(a,o);if(o.width)return{x:m0(o.width/2+o.x),y:m0(o.height/2+o.y)}}function r(o){var a=o.context,s=a.snapPoints,l=a.connection,c=l.waypoints,u=a.segmentStart,d=a.segmentStartIndex,f=a.segmentEnd,p=a.segmentEndIndex,m=a.axis;if(s)return s;var v=[c[d-1],u,f,c[p+1]];return d<2&&v.unshift(n(l.source,o)),p>c.length-3&&v.unshift(n(l.target,o)),a.snapPoints=s={horizontal:[],vertical:[]},N(v,function(g){g&&(g=g.original||g,m==="y"&&s.horizontal.push(g.y),m==="x"&&s.vertical.push(g.x))}),s}e.on("connectionSegment.move.move",1500,function(o){var a=r(o),s=o.x,l=o.y,c,u;if(a){c=t(a.vertical,s),u=t(a.horizontal,l);var d=s-c,f=l-u;j(o,{dx:o.dx-d,dy:o.dy-f,x:c,y:u}),(d||a.vertical.indexOf(s)!==-1)&&et(o,"x",c),(f||a.horizontal.indexOf(l)!==-1)&&et(o,"y",u)}});function i(o){var a=o.snapPoints,s=o.connection.waypoints,l=o.bendpointIndex;if(a)return a;var c=[s[l-1],s[l+1]];return o.snapPoints=a={horizontal:[],vertical:[]},N(c,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,l=s&&n(s,o);!Be(s)||!l||!l.x||!l.y||(et(o,"x",l.x),et(o,"y",l.y))}),e.on(["bendpoint.move.move","bendpoint.move.end"],1500,function(o){var a=o.context,s=i(a),l=a.hover,c=l&&n(l,o),u=o.x,d=o.y,f,p;if(s){f=t(c?s.vertical.concat([c.x]):s.vertical,u),p=t(c?s.horizontal.concat([c.y]):s.horizontal,d);var m=u-f,v=d-p;j(o,{dx:o.dx-m,dy:o.dy-v,x:o.x-m,y:o.y-v}),(m||s.vertical.indexOf(u)!==-1)&&et(o,"x",f),(v||s.horizontal.indexOf(d)!==-1)&&et(o,"y",p)}})}g0.$inject=["eventBus"];const HM={__depends__:[_r,tr],__init__:["bendpoints","bendpointSnapping","bendpointMovePreview"],bendpoints:["type",Zb],bendpointMove:["type",Gf],bendpointMovePreview:["type",i0],connectionSegmentMove:["type",u0],bendpointSnapping:["type",g0]};function v0(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,l=s.start,c=a.hover,u;if(s.hover=c,u=s.canExecute=i(l,c),!da(u)){if(u!==!1){s.source=l,s.target=c;return}u=s.canExecute=o(l,c),!da(u)&&u!==!1&&(s.source=c,s.target=l)}}),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,l=s.canExecute,c=s.connectionStart,u={x:a.x,y:a.y},d=s.source,f=s.target;if(!l)return!1;var p=null,m={connectionStart:Kf(s)?u:c,connectionEnd:Kf(s)?c:u};pt(l)&&(p=l),s.connection=n.connect(d,f,p,m)}),this.start=function(a,s,l,c){pt(l)||(c=l,l=fe(s)),t.init(a,"connect",{autoActivate:c,data:{shape:s,context:{start:s,connectionStart:l}}})}}v0.$inject=["eventBus","dragging","modeling","rules"];function Kf(e){var t=e.hover,n=e.source,r=e.target;return t&&n&&t===n&&n!==r}var zM=1100,VM=900,y0="connect-ok",b0="connect-not-ok";function x0(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,l=o.source,c=o.start,u=o.startPosition,d=o.target,f=o.connectionStart||u,p=o.connectionEnd||{x:i.x,y:i.y},m=f,v=p;Kf(o)&&(m=p,v=f),r.drawPreview(o,a,{source:l||c,target:d||s,connectionStart:m,connectionEnd:v})}),t.on("connect.hover",VM,function(i){var o=i.context,a=i.hover,s=o.canExecute;s!==null&&n.addMarker(a,s?y0:b0)}),t.on(["connect.out","connect.cleanup"],zM,function(i){var o=i.hover;o&&(n.removeMarker(o,y0),n.removeMarker(o,b0))}),r&&t.on("connect.cleanup",function(i){r.cleanUp(i.context)})}x0.$inject=["injector","eventBus","canvas"];const Yf={__depends__:[Jn,tr,_r],__init__:["connectPreview"],connect:["type",v0],connectPreview:["type",x0]};var WM="djs-dragger";function wr(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)}wr.$inject=["injector","canvas","graphicsFactory","elementFactory"],wr.prototype.drawPreview=function(e,t,n){n=n||{};var r=e.connectionPreviewGfx,i=e.getConnection,o=n.source,a=n.target,s=n.waypoints,l=n.connectionStart,c=n.connectionEnd,u=n.noLayout,d=n.noCropping,f=n.noNoop,p,m=this;if(r||(r=e.connectionPreviewGfx=this.createConnectionPreviewGfx()),ll(r),i||(i=e.getConnection=GM(function(v,g,x){return m.getConnection(v,g,x)})),t&&(p=i(t,o,a)),!p){!f&&this.drawNoopPreview(r,n);return}p.waypoints=s||[],this._layouter&&!u&&(p.waypoints=this._layouter.layoutConnection(p,{source:o,target:a,connectionStart:l,connectionEnd:c,waypoints:n.waypoints||p.waypoints})),(!p.waypoints||!p.waypoints.length)&&(p.waypoints=[o?fe(o):l,a?fe(a):c]),this._connectionDocking&&(o||a)&&!d&&(p.waypoints=this._connectionDocking.getCroppedWaypoints(p,o,a)),this._graphicsFactory.drawConnection(r,p,{stroke:"var(--element-dragger-color)"})},wr.prototype.drawNoopPreview=function(e,t){var n=t.source,r=t.target,i=t.connectionStart||fe(n),o=t.connectionEnd||fe(r),a=this.cropWaypoints(i,o,n,r),s=this.createNoopConnection(a[0],a[1]);pe(e,s)},wr.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&&Kd(o,s,!0)||e,t=r&&Kd(a,s,!1)||t,[e,t]},wr.prototype.cleanUp=function(e){e&&e.connectionPreviewGfx&&it(e.connectionPreviewGfx)},wr.prototype.getConnection=function(e){var t=UM(e);return this._elementFactory.createConnection(t)},wr.prototype.createConnectionPreviewGfx=function(){var e=le("g");return ee(e,{pointerEvents:"none"}),Ce(e).add(WM),pe(this._canvas.getActiveLayer(),e),e},wr.prototype.createNoopConnection=function(e,t){return dl([e,t],{stroke:"#333",strokeDasharray:[1],strokeWidth:2,"pointer-events":"none"})};function GM(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 UM(e){return pt(e)?e:{}}const qM={__init__:["connectionPreview"],connectionPreview:["type",wr]},KM=new Pa("ps");var YM=["marker-start","marker-mid","marker-end"],XM=["circle","ellipse","line","path","polygon","polyline","path","rect"];function Jr(e,t,n,r){this._elementRegistry=e,this._canvas=n,this._styles=r}Jr.$inject=["elementRegistry","eventBus","canvas","styles"],Jr.prototype.cleanUp=function(){console.warn("PreviewSupport#cleanUp is deprecated and will be removed in future versions. You do not need to manually clean up previews anymore. cf. https://github.com/bpmn-io/diagram-js/pull/906")},Jr.prototype.getGfx=function(e){return this._elementRegistry.getGraphics(e)},Jr.prototype.addDragger=function(e,t,n,r="djs-dragger"){n=n||this.getGfx(e);var i=nv(n),o=n.getBoundingClientRect();return this._cloneMarkers($i(i),r),ee(i,this._styles.cls(r,[],{x:o.top,y:o.left})),pe(t,i),ee(i,"data-preview-support-element-id",e.id),i},Jr.prototype.addFrame=function(e,t){var n=le("rect",{class:"djs-resize-overlay",width:e.width,height:e.height,x:e.x,y:e.y});return pe(t,n),ee(n,"data-preview-support-element-id",e.id),n},Jr.prototype._cloneMarkers=function(e,t="djs-dragger",n=e){var r=this;if(e.childNodes)for(var i=0;i<e.childNodes.length;i++)r._cloneMarkers(e.childNodes[i],t,n);eI(e)&&YM.forEach(function(o){if(ee(e,o)){var a=ZM(e,o,r._canvas.getContainer());a&&r._cloneMarker(n,e,a,o,t)}})},Jr.prototype._cloneMarker=function(e,t,n,r,i="djs-dragger"){var o=[n.id,i,KM.next()].join("-"),a=Ie("marker#"+n.id,e);e=e||this._canvas._svg;var s=a||nv(n);s.id=o,Ce(s).add(i);var l=Ie(":scope > defs",e);l||(l=le("defs"),pe(e,l)),pe(l,s);var c=JM(s.id);ee(t,r,c)};function ZM(e,t,n){var r=QM(ee(e,t));return Ie("marker#"+r,n||document)}function QM(e){return e.match(/url\(['"]?#([^'"]*)['"]?\)/)[1]}function JM(e){return"url(#"+e+")"}function eI(e){return XM.indexOf(e.nodeName)!==-1}const Do={__init__:["previewSupport"],previewSupport:["type",Jr]},sc="complex-preview";class _0{constructor(t,n,r){this._canvas=t,this._graphicsFactory=n,this._previewSupport=r,this._markers=[]}create(t){this.cleanUp();const{created:n=[],moved:r=[],removed:i=[],resized:o=[]}=t,a=this._canvas.getLayer(sc);n.filter(s=>!tI(s)).forEach(s=>{let l;Be(s)?(l=this._graphicsFactory._createContainer("connection",le("g")),this._graphicsFactory.drawConnection($i(l),s)):(l=this._graphicsFactory._createContainer("shape",le("g")),this._graphicsFactory.drawShape($i(l),s),gt(l,s.x,s.y)),this._previewSupport.addDragger(s,a,l)}),r.forEach(({element:s,delta:l})=>{this._previewSupport.addDragger(s,a,void 0,"djs-dragging"),this._canvas.addMarker(s,"djs-element-hidden"),this._markers.push([s,"djs-element-hidden"]);const c=this._previewSupport.addDragger(s,a);Be(s)?gt(c,l.x,l.y):gt(c,s.x+l.x,s.y+l.y)}),i.forEach(s=>{this._previewSupport.addDragger(s,a,void 0,"djs-dragging"),this._canvas.addMarker(s,"djs-element-hidden"),this._markers.push([s,"djs-element-hidden"])}),o.forEach(({shape:s,bounds:l})=>{this._canvas.addMarker(s,"djs-hidden"),this._markers.push([s,"djs-hidden"]),this._previewSupport.addDragger(s,a,void 0,"djs-dragging");const c=this._graphicsFactory._createContainer("shape",le("g"));this._graphicsFactory.drawShape($i(c),s,{width:l.width,height:l.height}),gt(c,l.x,l.y),this._previewSupport.addDragger(s,a,c)})}cleanUp(){ll(this._canvas.getLayer(sc)),this._markers.forEach(([t,n])=>this._canvas.removeMarker(t,n)),this._markers=[]}show(){this._canvas.showLayer(sc)}hide(){this._canvas.hideLayer(sc)}}_0.$inject=["canvas","graphicsFactory","previewSupport"];function tI(e){return e.hidden}const nI={__depends__:[Do],__init__:["complexPreview"],complexPreview:["type",_0]};var Xf=["top","bottom","left","right"],lc=10;function Zf(e,t){K.call(this,e),this.postExecuted(["connection.create","connection.layout","connection.updateWaypoints"],function(i){var o=i.context,a=o.connection,s=a.source,l=a.target,c=o.hints||{};c.createElementsBehavior!==!1&&(n(s),n(l))}),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(l){n(l)})});function n(i){if(Pl(i)){var o=oI(i);o&&r(i,o)}}function r(i,o){var a=fe(i),s=i.label,l=fe(s);if(s.parent){var c=ce(i),u;switch(o){case"top":u={x:a.x,y:c.top-lc-s.height/2};break;case"left":u={x:c.left-lc-s.width/2,y:a.y};break;case"bottom":u={x:a.x,y:c.bottom+lc+s.height/2};break;case"right":u={x:c.right+lc+s.width/2,y:a.y};break}var d=Ln(u,l);t.moveShape(s,d)}}}ie(Zf,K),Zf.$inject=["eventBus","modeling"];function rI(e){var t=e.host,n=fe(e),r=wt(n,t),i;r.indexOf("-")>=0?i=r.split("-"):i=[r];var o=Xf.filter(function(a){return i.indexOf(a)===-1});return o}function iI(e){var t=fe(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 w0(t,r)});return n}function oI(e){var t=fe(e.label),n=fe(e),r=w0(n,t);if(aI(r)){var i=iI(e);if(e.host){var o=rI(e);i=i.concat(o)}var a=Xf.filter(function(s){return i.indexOf(s)===-1});if(a.indexOf(r)===-1)return a[0]}}function w0(e,t){return wt(t,e,5)}function aI(e){return Xf.indexOf(e)!==-1}function Qf(e){K.call(this,e),this.preExecute("shape.append",function(t){var n=t.source,r=t.shape;t.position||(P(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)}ie(Qf,K),Qf.$inject=["eventBus"];function Jf(e,t){e.invoke(K,this),this.postExecute("shape.move",function(n){var r=n.newParent,i=n.shape,o=_e(i.incoming.concat(i.outgoing),function(a){return P(a,"bpmn:Association")});N(o,function(a){t.moveConnection(a,{x:0,y:0},r)})},!0)}ie(Jf,K),Jf.$inject=["injector","modeling"];var E0=500;function cc(e,t){t.invoke(K,this),this._bpmnReplace=e;var n=this;this.postExecuted("elements.create",E0,function(r){var i=r.elements;i=i.filter(function(o){var a=o.host;return S0(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",E0,function(r){var i=r.shapes,o=r.newHost;if(i.length===1){var a=i[0];S0(a,o)&&(r.shapes=[n._replaceShape(a,o)])}},!0)}cc.$inject=["bpmnReplace","injector"],ie(cc,K),cc.prototype._replaceShape=function(e,t){var n=sI(e),r={type:"bpmn:BoundaryEvent",host:t};return n&&(r.eventDefinitionType=n.$type),this._bpmnReplace.replaceElement(e,r,{layoutConnection:!1})};function sI(e){var t=Q(e),n=t.eventDefinitions;return n&&n[0]}function S0(e,t){return!Te(e)&&be(e,["bpmn:IntermediateThrowEvent","bpmn:IntermediateCatchEvent"])&&!!t}function ep(e,t){K.call(this,e);function n(r){return _e(r.attachers,function(i){return P(i,"bpmn:BoundaryEvent")})}this.postExecute("connection.create",function(r){var i=r.context.source,o=r.context.target,a=n(o);P(i,"bpmn:EventBasedGateway")&&P(o,"bpmn:ReceiveTask")&&a.length>0&&t.removeElements(a)}),this.postExecute("connection.reconnect",function(r){var i=r.context.oldSource,o=r.context.newSource;P(i,"bpmn:Gateway")&&P(o,"bpmn:EventBasedGateway")&&N(o.outgoing,function(a){var s=a.target,l=n(s);P(s,"bpmn:ReceiveTask")&&l.length>0&&t.removeElements(l)})})}ep.$inject=["eventBus","modeling"],ie(ep,K);function tp(e,t,n){K.call(this,e),this.preExecute("shape.replace",s,!0),this.postExecuted("shape.replace",l,!0),this.preExecute("connection.create",i,!0),this.postExecuted("connection.delete",r,!0),this.postExecuted("connection.reconnect",o,!0),this.postExecuted("element.updateProperties",a,!0);function r(g){const x=g.source,w=g.target;No(x)&&ja(w)&&u(w)}function i(g){const x=g.connection,w=g.source,b=g.target;No(w)&&uc(b)&&(c(b),f(w,[x]))}function o(g){const x=g.newTarget,w=g.oldSource,b=g.oldTarget;if(b!==x){const y=w;ja(b)&&u(b),No(y)&&uc(x)&&c(x)}}function a(g){const{element:x}=g;ja(x)?(d(x),p(x)):uc(x)&&m(x)}function s(g){const{newData:x,oldShape:w}=g;if(No(g.oldShape)&&x.eventDefinitionType!=="bpmn:CompensateEventDefinition"||x.type!=="bpmn:BoundaryEvent"){const b=w.outgoing.find(({target:y})=>ja(y));b&&b.target&&(g._connectionTarget=b.target)}else if(!No(g.oldShape)&&x.eventDefinitionType==="bpmn:CompensateEventDefinition"&&x.type==="bpmn:BoundaryEvent"){const b=w.outgoing.find(({target:y})=>uc(y));b&&b.target&&(g._connectionTarget=b.target),v(w)}}function l(g){const{_connectionTarget:x,newShape:w}=g;x&&t.connect(w,x)}function c(g){t.updateProperties(g,{isForCompensation:!0})}function u(g){t.updateProperties(g,{isForCompensation:void 0})}function d(g){for(const x of g.incoming)n.canConnect(x.source,g)||t.removeConnection(x);for(const x of g.outgoing)n.canConnect(g,x.target)||t.removeConnection(x)}function f(g,x){g.outgoing.filter(y=>P(y,"bpmn:Association")).filter(y=>ja(y.target)&&!x.includes(y)).forEach(y=>t.removeConnection(y))}function p(g){const x=g.attachers.slice();x.length&&t.removeElements(x)}function m(g){const x=g.incoming.filter(w=>No(w.source));t.removeElements(x)}function v(g){const x=g.outgoing.filter(w=>P(w,"bpmn:SequenceFlow"));t.removeElements(x)}}ie(tp,K),tp.$inject=["eventBus","modeling","bpmnRules"];function ja(e){const t=Q(e);return t&&t.get("isForCompensation")}function No(e){return e&&P(e,"bpmn:BoundaryEvent")&&bo(e,"bpmn:CompensateEventDefinition")}function uc(e){return e&&P(e,"bpmn:Activity")&&!St(e)}function np(e){e.invoke(K,this),this.preExecute("shape.create",1500,function(t){var n=t.context,r=n.parent,i=n.shape;P(r,"bpmn:Lane")&&!P(i,"bpmn:Lane")&&(n.parent=Ao(r,"bpmn:Participant"))})}np.$inject=["injector"],ie(np,K);function rp(e,t){K.call(this,e),this.preExecute("shape.create",function(n){var r=n.context,i=r.shape;if(P(i,"bpmn:DataObjectReference")&&i.type!=="label"){var o=t.create("bpmn:DataObject");i.businessObject.dataObjectRef=o}})}rp.$inject=["eventBus","bpmnFactory"],ie(rp,K);var ip=20,op=20,C0=30,dc=2e3;function ap(e,t,n){K.call(this,t),t.on(["create.start","shape.move.start"],dc,function(i){var o=i.context,a=o.shape,s=e.getRootElement();if(!(!P(a,"bpmn:Participant")||!P(s,"bpmn:Process")||!s.children.length)){var l=s.children.filter(function(d){return!P(d,"bpmn:Group")&&!Te(d)&&!Be(d)});if(l.length){var c=st(l),u=lI(a,c);j(a,u),o.createConstraints=cI(a,c)}}}),t.on("create.start",dc,function(i){var o=i.context,a=o.shape,s=e.getRootElement(),l=e.getGraphics(s);function c(u){u.element=s,u.gfx=l}P(a,"bpmn:Participant")&&P(s,"bpmn:Process")&&(t.on("element.hover",dc,c),t.once("create.cleanup",function(){t.off("element.hover",c)}))});function r(){var i=e.getRootElement();return P(i,"bpmn:Collaboration")?i:n.makeCollaboration()}this.preExecute("elements.create",dc,function(i){var o=i.elements,a=i.parent,s=uI(o),l;s&&P(a,"bpmn:Process")&&(i.parent=r(),l=i.hints=i.hints||{},l.participant=s,l.process=a,l.processRef=Q(s).get("processRef"))},!0),this.preExecute("shape.create",function(i){var o=i.parent,a=i.shape;P(a,"bpmn:Participant")&&P(o,"bpmn:Process")&&(i.parent=r(),i.process=o,i.processRef=Q(a).get("processRef"))},!0),this.execute("shape.create",function(i){var o=i.hints||{},a=i.process||o.process,s=i.shape,l=o.participant;a&&(!l||s===l)&&Q(s).set("processRef",Q(a))},!0),this.revert("shape.create",function(i){var o=i.hints||{},a=i.process||o.process,s=i.processRef||o.processRef,l=i.shape,c=o.participant;a&&(!c||l===c)&&Q(l).set("processRef",s)},!0),this.postExecute("shape.create",function(i){var o=i.hints||{},a=i.process||i.hints.process,s=i.shape,l=o.participant;if(a){var c=a.children.slice();l?s===l&&n.moveElements(c,{x:0,y:0},l):n.moveElements(c,{x:0,y:0},s)}},!0)}ap.$inject=["canvas","eventBus","modeling"],ie(ap,K);function lI(e,t){t={width:t.width+ip*2+C0,height:t.height+op*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 cI(e,t){return t=ce(t),{bottom:t.top+e.height/2-op,left:t.right-e.width/2+ip,top:t.bottom-e.height/2+op,right:t.left+e.width/2-ip-C0}}function uI(e){return Re(e,function(t){return P(t,"bpmn:Participant")})}var T0="__targetRef_placeholder";function sp(e,t){K.call(this,e),this.executed(["connection.create","connection.delete","connection.move","connection.reconnect"],P0(o)),this.reverted(["connection.create","connection.delete","connection.move","connection.reconnect"],P0(o));function n(a,s,l){var c=a.get("dataInputAssociations");return Re(c,function(u){return u!==l&&u.targetRef===s})}function r(a,s){var l=a.get("properties"),c=Re(l,function(u){return u.name===T0});return!c&&s&&(c=t.create("bpmn:Property",{name:T0}),ot(l,c)),c}function i(a,s){var l=r(a);l&&(n(a,l,s)||Xe(a.get("properties"),l))}function o(a){var s=a.context,l=s.connection,c=l.businessObject,u=l.target,d=u&&u.businessObject,f=s.newTarget,p=f&&f.businessObject,m=s.oldTarget||s.target,v=m&&m.businessObject,g=l.businessObject,x;v&&v!==d&&i(v,c),p&&p!==d&&i(p,c),d?(x=r(d,!0),g.targetRef=x):g.targetRef=null}}sp.$inject=["eventBus","bpmnFactory"],ie(sp,K);function P0(e){return function(t){var n=t.context,r=n.connection;if(P(r,"bpmn:DataInputAssociation"))return e(t)}}function fc(e){this._bpmnUpdater=e}fc.$inject=["bpmnUpdater"],fc.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),[]},fc.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 lp(e,t,n,r){K.call(this,r),t.registerHandler("dataStore.updateContainment",fc);function i(){return n.filter(function(s){return P(s,"bpmn:Participant")&&Q(s).processRef})[0]}function o(s){return s.children.filter(function(l){return P(l,"bpmn:DataStoreReference")&&!l.labelTarget})}function a(s,l){var c=s.businessObject||s;if(l=l||i(),l){var u=l.businessObject||l;t.execute("dataStore.updateContainment",{dataStoreBo:c,dataStoreDi:Pe(s),newSemanticParent:u.processRef||u,newDiParent:Pe(l)})}}this.preExecute("shape.create",function(s){var l=s.context,c=l.shape;P(c,"bpmn:DataStoreReference")&&c.type!=="label"&&(l.hints||(l.hints={}),l.hints.autoResize=!1)}),this.preExecute("elements.move",function(s){var l=s.context,c=l.shapes,u=c.filter(function(d){return P(d,"bpmn:DataStoreReference")});u.length&&(l.hints||(l.hints={}),l.hints.autoResize=c.filter(function(d){return!P(d,"bpmn:DataStoreReference")}))}),this.postExecute("shape.create",function(s){var l=s.context,c=l.shape,u=c.parent;P(c,"bpmn:DataStoreReference")&&c.type!=="label"&&P(u,"bpmn:Collaboration")&&a(c)}),this.postExecute("shape.move",function(s){var l=s.context,c=l.shape,u=l.oldParent,d=c.parent;if(!P(u,"bpmn:Collaboration")&&P(c,"bpmn:DataStoreReference")&&c.type!=="label"&&P(d,"bpmn:Collaboration")){var f=P(u,"bpmn:Participant")?u:fI(u,"bpmn:Participant");a(c,f)}}),this.postExecute("shape.delete",function(s){var l=s.context,c=l.shape,u=e.getRootElement();be(c,["bpmn:Participant","bpmn:SubProcess"])&&P(u,"bpmn:Collaboration")&&o(u).filter(function(d){return dI(d,c)}).forEach(function(d){a(d)})}),this.postExecute("canvas.updateRoot",function(s){var l=s.context,c=l.oldRoot,u=l.newRoot,d=o(c);d.forEach(function(f){P(u,"bpmn:Process")&&a(f,u)})})}lp.$inject=["canvas","commandStack","elementRegistry","eventBus"],ie(lp,K);function dI(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 fI(e,t){for(;e.parent;){if(P(e.parent,t))return e.parent;e=e.parent}}var pc=Math.max,hc=Math.min,pI=20;function $0(e,t){return{top:e.top-t.top,right:e.right-t.right,bottom:e.bottom-t.bottom,left:e.left-t.left}}function hI(e,t,n){var r=n.x,i=n.y,o={x:e.x,y:e.y,width:e.width,height:e.height};return t.indexOf("n")!==-1?(o.y=e.y+i,o.height=e.height-i):t.indexOf("s")!==-1&&(o.height=e.height+i),t.indexOf("e")!==-1?o.width=e.width+r:t.indexOf("w")!==-1&&(o.x=e.x+r,o.width=e.width-r),o}function mI(e,t){return{x:e.x+(t.left||0),y:e.y+(t.top||0),width:e.width-(t.left||0)+(t.right||0),height:e.height-(t.top||0)+(t.bottom||0)}}function mc(e,t,n){var r=t[e],i=n.min&&n.min[e],o=n.max&&n.max[e];return de(i)&&(r=(/top|left/.test(e)?hc:pc)(r,i)),de(o)&&(r=(/top|left/.test(e)?pc:hc)(r,o)),r}function gI(e,t){if(!t)return e;var n=ce(e);return vl({top:mc("top",n,t),right:mc("right",n,t),bottom:mc("bottom",n,t),left:mc("left",n,t)})}function vI(e,t,n,r){var i=ce(t),o={top:/n/.test(e)?i.bottom-n.height:i.top,left:/w/.test(e)?i.right-n.width:i.left,bottom:/s/.test(e)?i.top+n.height:i.bottom,right:/e/.test(e)?i.left+n.width:i.right},a=r?ce(r):o,s={top:hc(o.top,a.top),left:hc(o.left,a.left),bottom:pc(o.bottom,a.bottom),right:pc(o.right,a.right)};return vl(s)}function Fa(e,t){return typeof e<"u"?e:pI}function yI(e,t){var n,r,i,o;return typeof t=="object"?(n=Fa(t.left),r=Fa(t.right),i=Fa(t.top),o=Fa(t.bottom)):n=r=i=o=Fa(t),{x:e.x-n,y:e.y-i,width:e.width+n+r,height:e.height+i+o}}function bI(e){return!(e.waypoints||e.type==="label")}function R0(e,t){var n;if(e.length===void 0?n=_e(e.children,bI):n=e,n.length)return yI(st(n),t)}var ei=Math.abs;function xI(e,t){return $0(ce(t),ce(e))}var _I=["bpmn:Participant","bpmn:Process","bpmn:SubProcess"],gn=30;function gc(e,t){return t=t||[],e.children.filter(function(n){P(n,"bpmn:Lane")&&(gc(n,t),t.push(n))}),t}function ti(e){return e.children.filter(function(t){return P(t,"bpmn:Lane")})}function vn(e){return Ao(e,_I)||e}function wI(e,t){var n=vn(e),r=P(n,"bpmn:Process")?[]:[n],i=gc(n,r),o=ce(e),a=ce(t),s=xI(e,t),l=[],c=lt(e);return i.forEach(function(u){if(u!==e){var d=c?0:s.top,f=c?s.right:0,p=c?0:s.bottom,m=c?s.left:0,v=ce(u);s.top&&(ei(v.bottom-o.top)<10&&(p=a.top-v.bottom),ei(v.top-o.top)<5&&(d=a.top-v.top)),s.left&&(ei(v.right-o.left)<10&&(f=a.left-v.right),ei(v.left-o.left)<5&&(m=a.left-v.left)),s.bottom&&(ei(v.top-o.bottom)<10&&(d=a.bottom-v.top),ei(v.bottom-o.bottom)<5&&(p=a.bottom-v.bottom)),s.right&&(ei(v.left-o.right)<10&&(m=a.right-v.left),ei(v.right-o.right)<5&&(f=a.right-v.right)),(d||f||p||m)&&l.push({shape:u,newBounds:mI(u,{top:d,right:f,bottom:p,left:m})})}}),l}var EI=500;function cp(e,t){K.call(this,e);function n(r,i){var o=lt(r),a=ti(i),s=[],l=[],c=[],u=[];if(Pi(a,function(g){return o?g.y>r.y?l.push(g):s.push(g):g.x>r.x?u.push(g):c.push(g),g.children}),!!a.length){var d;o?l.length&&s.length?d=r.height/2:d=r.height:u.length&&c.length?d=r.width/2:d=r.width;var f,p,m,v;s.length&&(f=t.calculateAdjustments(s,"y",d,r.y-10),t.makeSpace(f.movingShapes,f.resizingShapes,{x:0,y:d},"s")),l.length&&(p=t.calculateAdjustments(l,"y",-d,r.y+r.height+10),t.makeSpace(p.movingShapes,p.resizingShapes,{x:0,y:-d},"n")),c.length&&(m=t.calculateAdjustments(c,"x",d,r.x-10),t.makeSpace(m.movingShapes,m.resizingShapes,{x:d,y:0},"e")),u.length&&(v=t.calculateAdjustments(u,"x",-d,r.x+r.width+10),t.makeSpace(v.movingShapes,v.resizingShapes,{x:-d,y:0},"w"))}}this.postExecuted("shape.delete",EI,function(r){var i=r.context,o=i.hints,a=i.shape,s=i.oldParent;P(a,"bpmn:Lane")&&(o&&o.nested||n(a,s))})}cp.$inject=["eventBus","spaceTool"],ie(cp,K);var A0=500;function vc(e,t){t.invoke(K,this),this._bpmnReplace=e;var n=this;this.postExecuted("elements.create",A0,function(r){var i=r.elements;i.filter(function(o){var a=o.host;return O0(o,a)}).map(function(o){return i.indexOf(o)}).forEach(function(o){r.elements[o]=n._replaceShape(i[o])})},!0),this.preExecute("elements.move",A0,function(r){var i=r.shapes,o=r.newHost;i.forEach(function(a,s){var l=a.host;O0(a,CI(i,l)?l:o)&&(i[s]=n._replaceShape(a))})},!0)}vc.$inject=["bpmnReplace","injector"],ie(vc,K),vc.prototype._replaceShape=function(e){var t=SI(e),n;return t?n={type:"bpmn:IntermediateCatchEvent",eventDefinitionType:t.$type}:n={type:"bpmn:IntermediateThrowEvent"},this._bpmnReplace.replaceElement(e,n,{layoutConnection:!1})};function SI(e){var t=Q(e),n=t.eventDefinitions;return n&&n[0]}function O0(e,t){return!Te(e)&&P(e,"bpmn:BoundaryEvent")&&!t}function CI(e,t){return e.indexOf(t)!==-1}function up(e,t,n){K.call(this,e);function r(i,o,a){var s=o.waypoints,l,c,u,d,f,p,m,v=i.outgoing.slice(),g=i.incoming.slice(),x;de(a.width)?x=fe(a):x=a;var w=Ff(s,x);if(w){if(l=s.slice(0,w.index),c=s.slice(w.index+(w.bendpoint?1:0)),!l.length||!c.length)return;u=w.bendpoint?s[w.index]:x,(l.length===1||!M0(i,l[l.length-1]))&&l.push(I0(u)),(c.length===1||!M0(i,c[0]))&&c.unshift(I0(u))}d=o.source,f=o.target,t.canConnect(d,i,o)&&(n.reconnectEnd(o,i,l||x),p=o),t.canConnect(i,f,o)&&(p?m=n.connect(i,f,{type:o.type,waypoints:c}):(n.reconnectStart(o,i,c||x),m=o));var b=[].concat(p&&_e(g,function(y){return y.source===p.source})||[],m&&_e(v,function(y){return y.target===m.target})||[]);b.length&&n.removeElements(b)}this.preExecute("elements.move",function(i){var o=i.newParent,a=i.shapes,s=i.delta,l=a[0];if(!(!l||!o)){o&&o.waypoints&&(i.newParent=o=o.parent);var c=fe(l),u={x:c.x+s.x,y:c.y+s.y},d=Re(o.children,function(f){var p=t.canInsert(a,f);return p&&Ff(f.waypoints,u)});d&&(i.targetFlow=d,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)}ie(up,K),up.$inject=["eventBus","bpmnRules","modeling"];function M0(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 I0(e){return j({},e)}function dp(e,t){K.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)&&Bo(i)){var l=[];P(o,"bpmn:EventBasedGateway")?l=a.incoming.filter(c=>c!==i&&Bo(c)):l=a.incoming.filter(c=>c!==i&&Bo(c)&&P(c.source,"bpmn:EventBasedGateway")),l.forEach(function(c){t.removeConnection(c)})}}),this.preExecuted("shape.replace",function(n){var r=n.context,i=r.newShape;if(P(i,"bpmn:EventBasedGateway")){var o=i.outgoing.filter(Bo).reduce(function(a,s){return a.includes(s.target)?a:a.concat(s.target)},[]);o.forEach(function(a){a.incoming.filter(Bo).forEach(function(s){const l=a.incoming.filter(Bo).filter(function(c){return c.source===i});(s.source!==i||l.length>1)&&t.removeConnection(s)})})}})}dp.$inject=["eventBus","modeling"],ie(dp,K);function Bo(e){return P(e,"bpmn:SequenceFlow")}var yc=1500,D0=2e3;function N0(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"],yc,function(r){var i=r.context,o=i.shape||r.shape,a=r.hover;P(a,"bpmn:Lane")&&!be(o,["bpmn:Lane","bpmn:Participant"])&&(r.hover=vn(a),r.hoverGfx=e.getGraphics(r.hover));var s=n.getRootElement();a!==s&&(o.labelTarget||be(o,["bpmn:Group","bpmn:TextAnnotation"]))&&(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"],yc,function(r){var i=r.hover;P(i,"bpmn:Lane")&&(r.hover=vn(i)||i,r.hoverGfx=e.getGraphics(r.hover))}),t.on(["bendpoint.move.hover"],yc,function(r){var i=r.context,o=r.hover,a=i.type;P(o,"bpmn:Lane")&&/reconnect/.test(a)&&(r.hover=vn(o)||o,r.hoverGfx=e.getGraphics(r.hover))}),t.on(["connect.start"],yc,function(r){var i=r.context,o=i.start;P(o,"bpmn:Lane")&&(i.start=vn(o)||o)}),t.on("shape.move.start",D0,function(r){var i=r.shape;P(i,"bpmn:Lane")&&(r.shape=vn(i)||i)}),t.on("spaceTool.move",D0,function(r){var i=r.hover;i&&P(i,"bpmn:Lane")&&(r.hover=vn(i))})}N0.$inject=["elementRegistry","eventBus","canvas"];function TI(e){return e.create("bpmn:Category")}function PI(e){return e.create("bpmn:CategoryValue")}function $I(e,t,n){return ot(t.get("categoryValue"),e),e.$parent=t,ot(n.get("rootElements"),t),t.$parent=n,e}function RI(e){var t=e.$parent;return t&&(Xe(t.get("categoryValue"),e),e.$parent=null),e}function AI(e){var t=e.$parent;return t&&(Xe(t.get("rootElements"),e),e.$parent=null),e}var B0=770;function fp(e,t,n,r,i,o){i.invoke(K,this);function a(){return n.filter(function(m){return P(m,"bpmn:Group")})}function s(m,v){return m.some(function(g){var x=Q(g),w=x.categoryValueRef&&x.categoryValueRef.$parent;return w===v})}function l(m,v){return m.some(function(g){var x=Q(g);return x.categoryValueRef===v})}function c(m,v,g){var x=a().filter(function(w){return w.businessObject!==g});v&&!s(x,v)&&AI(v),m&&!l(x,m)&&RI(m)}function u(m,v){return $I(m,v,t.getDefinitions())}function d(m,v){var g=Q(m),x=g.categoryValueRef;x||(x=g.categoryValueRef=v.categoryValue=v.categoryValue||PI(e));var w=x.$parent;w||(w=x.$parent=v.category=v.category||TI(e)),u(x,w,t.getDefinitions())}function f(m,v){var g=v.category,x=v.categoryValue,w=Q(m);x?(w.categoryValueRef=null,c(x,g,w)):c(null,w.categoryValueRef.$parent,w)}this.execute("label.create",function(m){var v=m.context,g=v.labelTarget;P(g,"bpmn:Group")&&d(g,v)}),this.revert("label.create",function(m){var v=m.context,g=v.labelTarget;P(g,"bpmn:Group")&&f(g,v)}),this.execute("shape.delete",function(m){var v=m.context,g=v.shape,x=Q(g);if(!(!P(g,"bpmn:Group")||g.labelTarget)){var w=v.categoryValue=x.categoryValueRef,b;w&&(b=v.category=w.$parent,c(w,b,x),x.categoryValueRef=null)}}),this.reverted("shape.delete",function(m){var v=m.context,g=v.shape;if(!(!P(g,"bpmn:Group")||g.labelTarget)){var x=v.category,w=v.categoryValue,b=Q(g);w&&(b.categoryValueRef=w,u(w,x))}}),this.execute("shape.create",function(m){var v=m.context,g=v.shape;!P(g,"bpmn:Group")||g.labelTarget||Q(g).categoryValueRef&&d(g,v)}),this.reverted("shape.create",function(m){var v=m.context,g=v.shape;!P(g,"bpmn:Group")||g.labelTarget||Q(g).categoryValueRef&&f(g,v)});function p(m,v){var g=e.create(m.$type);return o.copyElement(m,g,null,v)}r.on("copyPaste.copyElement",B0,function(m){var v=m.descriptor,g=m.element;if(!(!P(g,"bpmn:Group")||g.labelTarget)){var x=Q(g);if(x.categoryValueRef){var w=x.categoryValueRef;v.categoryValue=p(w,!0),w.$parent&&(v.category=p(w.$parent,!0))}}}),r.on("copyPaste.pasteElement",B0,function(m){var v=m.descriptor,g=v.businessObject,x=v.categoryValue,w=v.category;x&&(x=g.categoryValueRef=p(x)),w&&(x.$parent=p(w)),delete v.category,delete v.categoryValue})}fp.$inject=["bpmnFactory","bpmnjs","elementRegistry","eventBus","injector","moddleCopy"],ie(fp,K);function pp(e,t,n,r){var i,o,a,s,l;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,l=(r.x-n.x)*o-(r.y-n.y)*a,s=l/i,{x:Math.round(e.x+s*(t.x-e.x)),y:Math.round(e.y+s*(t.y-e.y))})}function k0(e){function t(r,i,o){var a={x:o.x,y:o.y-50},s={x:o.x-50,y:o.y},l=pp(r,i,o,a),c=pp(r,i,o,s),u;l&&c?L0(l,o)>L0(c,o)?u=c:u=l:u=l||c,r.original=u}function n(r){var i=r.waypoints;t(i[0],i[1],fe(r.source)),t(i[i.length-1],i[i.length-2],fe(r.target))}e.on("bpmnElement.added",function(r){var i=r.element;i.waypoints&&n(i)})}k0.$inject=["eventBus"];function L0(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function hp(e){K.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=Q(r),o=Pe(r);if(be(i,t)){var a=o.get("isHorizontal");a===void 0&&(a=!0),o.set("isHorizontal",a)}})}hp.$inject=["eventBus"],ie(hp,K);var j0=Math.sqrt,F0=Math.min,OI=Math.max,H0=Math.abs;function z0(e){return Math.pow(e,2)}function Ha(e,t){return j0(z0(e.x-t.x)+z0(e.y-t.y))}function MI(e,t){var n=0,r,i,o,a,s,l,c,u,d,f,p;for(n=0;n<t.length-1;n++){if(r=t[n],i=t[n+1],W0(r,i)?c=[r]:(o=Ha(e,r),a=Ha(e,i),l=F0(o,a),c=II(r,i,e,l)),c.length<1)throw new Error("expected between [1, 2] circle -> line intersections");c.length===1&&(u={type:"bendpoint",position:c[0],segmentIndex:n,bendpointIndex:W0(r,c[0])?n:n+1}),c.length===2&&(s=NI(c[0],c[1]),u={type:"segment",position:s,segmentIndex:n,relativeLocation:Ha(r,s)/Ha(r,i)}),d=Ha(u.position,e),(!p||f>d)&&(p=u,f=d)}return p}function II(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,l=i*i+o*o,c=i*a+o*s,u=a*a+s*s-r*r,d=c/l,f=u/l,p=d*d-f;if(p<0&&p>-1e-6&&(p=0),p<0)return[];var m=j0(p),v=-d+m,g=-d-m,x={x:e.x-i*v,y:e.y-o*v};if(p===0)return[x];var w={x:e.x-i*g,y:e.y-o*g};return[x,w].filter(function(b){return DI(b,e,t)})}function DI(e,t,n){return V0(e.x,t.x,n.x)&&V0(e.y,t.y,n.y)}function V0(e,t,n){return e>=F0(t,n)-bc&&e<=OI(t,n)+bc}function NI(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}var bc=.1;function W0(e,t){return H0(e.x-t.x)<=bc&&H0(e.y-t.y)<=bc}function BI(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<s?s:i+o:i}if(r.bendpointMove){var l=r.bendpointMove.insert,c=r.bendpointMove.bendpointIndex,u;if(o===0)return i;if(i>=c&&(u=l?i+1:i-1),i<c&&(u=i,l&&n.type!=="bendpoint"&&c-1===i)){var d=U0(t,c);d<n.relativeLocation&&u++}return u}return o===0?i:r.connectionStart&&i===0?0:r.connectionEnd&&i===e.length-2?t.length-2:Math.floor((t.length-2)/2)}function G0(e,t,n,r){var i=0,o=0,a={point:e,delta:{x:0,y:0}},s=MI(e,n),l=s.segmentIndex,c=BI(n,t,s,r);if(c<0||c>t.length-2||c===null)return a;var u=q0(n,l),d=q0(t,c),f=s.position,p=LI(u,f),m=kI(u,d);if(s.type==="bendpoint"){var v=t.length-n.length,g=s.bendpointIndex,x=n[g];if(t.indexOf(x)!==-1)return a;if(v===0){var w=t[g];return i=w.x-s.position.x,o=w.y-s.position.y,{delta:{x:i,y:o},point:{x:e.x+i,y:e.y+o}}}v<0&&g!==0&&g<n.length-1&&(p=U0(n,g))}var b={x:(d[1].x-d[0].x)*p+d[0].x,y:(d[1].y-d[0].y)*p+d[0].y},y=PM({x:e.x-f.x,y:e.y-f.y},m);return i=b.x+y.x-e.x,o=b.y+y.y-e.y,{point:hr(b),delta:hr({x:i,y:o})}}function U0(e,t){var n=ic(e[t-1],e[t]),r=ic(e[t],e[t+1]),i=n/(n+r);return i}function kI(e,t){var n=Ub(e),r=Ub(t);return r-n}function q0(e,t){return[e[t],e[t+1]]}function LI(e,t){var n=ic(e[0],e[1]),r=ic(e[0],t);return n===0?0:r/n}function jI(e,t,n,r){var i=fe(e);return G0(i,t,n,r).delta}function za(e,t,n){var r=Aa(t),i=Aa(n),o=Ln(e,r),a={x:o.x*(n.width/t.width),y:o.y*(n.height/t.height)};return hr({x:i.x+a.x,y:i.y+a.y})}function K0(e,t,n){var r=Aa(e),i=Aa(t),o=Aa(n),a=Ln(e,r),s=Ln(r,i),l=FI(r,t,n);if(l)return l;var c={x:s.x*(n.width/t.width),y:s.y*(n.height/t.height)},u={x:o.x+c.x,y:o.y+c.y};return hr({x:u.x+a.x-e.x,y:u.y+a.y-e.y})}function FI(e,t,n){var r=ce(t),i=ce(n);if(HI(r,i))return null;var o=wt(t,e),a,s,l;if(o==="top")a={x:0,y:i.bottom-r.bottom};else if(o==="bottom")a={x:0,y:i.top-r.top};else if(o==="right")a={x:i.left-r.left,y:0};else if(o==="left")a={x:i.right-r.right,y:0};else return null;return s={x:e.x+a.x,y:e.y+a.y},l=wt(n,s),l!==o?null:a}function HI(e,t){return zI(e,t)||VI(e,t)}function zI(e,t){return e.right!==t.right&&e.left!==t.left}function VI(e,t){return e.top!==t.top&&e.bottom!==t.bottom}var Y0="name",X0="text";function mp(e,t,n,r){K.call(this,e),this.postExecute("element.updateProperties",i),this.postExecute("element.updateModdleProperties",a=>{Q(a.context.element)===a.context.moddleElement&&i(a)});function i(a){var s=a.context,l=s.element,c=s.properties;if(Y0 in c&&t.updateLabel(l,c[Y0]),X0 in c&&P(l,"bpmn:TextAnnotation")){var u=r.getTextAnnotationBounds({x:l.x,y:l.y,width:l.width,height:l.height},c[X0]||"");t.updateLabel(l,c.text,u)}}this.postExecute(["shape.create","connection.create"],function(a){var s=a.context,l=s.hints||{};if(l.createElementsBehavior!==!1){var c=s.shape||s.connection;Te(c)||!Mi(c)||Zt(c)&&t.updateLabel(c,Zt(c))}}),this.postExecute("shape.delete",function(a){var s=a.context,l=s.labelTarget,c=s.hints||{};l&&c.unsetLabel!==!1&&t.updateLabel(l,null,null,{removeShape:!1})});function o(a){var s=a.context,l=s.connection,c=l.label,u=j({},s.hints),d=s.newWaypoints||l.waypoints,f=s.oldWaypoints;return typeof u.startChanged>"u"&&(u.startChanged=!!u.connectionStart),typeof u.endChanged>"u"&&(u.endChanged=!!u.connectionEnd),jI(c,d,f,u)}this.postExecute(["connection.layout","connection.updateWaypoints"],function(a){var s=a.context,l=s.hints||{};if(l.labelBehavior!==!1){var c=s.connection,u=c.label,d;!u||!u.parent||(d=o(a),t.moveShape(u,d))}}),this.postExecute(["shape.replace"],function(a){var s=a.context,l=s.newShape,c=s.oldShape,u=Q(l);u&&Mi(u)&&c.label&&l.label&&(l.label.x=c.label.x,l.label.y=c.label.y)}),this.postExecute("shape.resize",function(a){var s=a.context,l=s.shape,c=s.newBounds,u=s.oldBounds;if(Pl(l)){var d=l.label,f=fe(d),p=UI(u),m=GI(f,p),v=WI(m,u,c);t.moveShape(d,v)}})}ie(mp,K),mp.$inject=["eventBus","modeling","bpmnFactory","textRenderer"];function WI(e,t,n){var r=za(e,t,n);return hr(Ln(r,e))}function GI(e,t){if(t.length){var n=qI(e,t);return Hf(e,n)}}function UI(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 qI(e,t){var n=t.map(function(i){return{line:i,distance:qb(e,i)}}),r=qn(n,"distance");return r[0].line}function KI(e,t,n,r){return G0(e,t,n,r).point}function gp(e,t){K.call(this,e);function n(r,i){var o=r.context,a=o.connection,s=j({},o.hints),l=o.newWaypoints||a.waypoints,c=o.oldWaypoints;return typeof s.startChanged>"u"&&(s.startChanged=!!s.connectionStart),typeof s.endChanged>"u"&&(s.endChanged=!!s.connectionEnd),KI(i,l,c,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(l){var c=l.waypoints[l.waypoints.length-1],u=n(r,c),d=[].concat(l.waypoints.slice(0,-1),[u]);t.updateWaypoints(l,d)}),a.forEach(function(l){var c=l.waypoints[0],u=n(r,c),d=[].concat([u],l.waypoints.slice(1));t.updateWaypoints(l,d)})}),this.postExecute(["connection.move"],function(r){var i=r.context,o=i.connection,a=o.outgoing,s=o.incoming,l=i.delta;s.forEach(function(c){var u=c.waypoints[c.waypoints.length-1],d={x:u.x+l.x,y:u.y+l.y},f=[].concat(c.waypoints.slice(0,-1),[d]);t.updateWaypoints(c,f)}),a.forEach(function(c){var u=c.waypoints[0],d={x:u.x+l.x,y:u.y+l.y},f=[].concat([d],c.waypoints.slice(1));t.updateWaypoints(c,f)})})}ie(gp,K),gp.$inject=["eventBus","modeling"];function xc(e,t,n){var r=wc(e),i=Q0(r,t),o=r[0];return i.length?i[i.length-1]:za(o.original||o,n,t)}function _c(e,t,n){var r=wc(e),i=Q0(r,t),o=r[r.length-1];return i.length?i[0]:za(o.original||o,n,t)}function vp(e,t,n){var r=wc(e),i=Z0(t,n),o=r[0];return za(o.original||o,i,t)}function yp(e,t,n){var r=wc(e),i=Z0(t,n),o=r[r.length-1];return za(o.original||o,i,t)}function Z0(e,t){return{x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height}}function wc(e){var t=e.waypoints;if(!t.length)throw new Error("connection#"+e.id+": no waypoints");return t}function Q0(e,t){var n=xt(e,XI);return _e(n,function(r){return YI(r,t)})}function YI(e,t){return wt(t,e,1)==="intersect"}function XI(e){return e.original||e}function bp(e,t){K.call(this,e),this.postExecute("shape.replace",function(n){var r=n.oldShape,i=n.newShape;if(ZI(r,i)){var o=QI(r);o.incoming.forEach(function(a){var s=_c(a,i,r);t.reconnectEnd(a,i,s)}),o.outgoing.forEach(function(a){var s=xc(a,i,r);t.reconnectStart(a,i,s)})}},!0)}bp.$inject=["eventBus","modeling"],ie(bp,K);function ZI(e,t){return P(e,"bpmn:Participant")&&Se(e)&&P(t,"bpmn:Participant")&&!Se(t)}function QI(e){var t=ha([e],!1),n=[],r=[];return t.forEach(function(i){i!==e&&(i.incoming.forEach(function(o){P(o,"bpmn:MessageFlow")&&n.push(o)}),i.outgoing.forEach(function(o){P(o,"bpmn:MessageFlow")&&r.push(o)}))},[]),{incoming:n,outgoing:r}}const JI=["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:EscalationEventDefinition","bpmn:ConditionalEventDefinition","bpmn:SignalEventDefinition"];function J0(e){const t=Q(e);if(!P(t,"bpmn:BoundaryEvent")&&!(P(t,"bpmn:StartEvent")&&St(t.$parent)))return!1;const n=t.get("eventDefinitions");return!n||!n.length?!1:JI.some(r=>P(n[0],r))}function ex(e){return P(e,"bpmn:BoundaryEvent")?"cancelActivity":"isInterrupting"}function xp(e,t){e.invoke(K,this),this.postExecuted("shape.replace",function(n){const r=n.context.oldShape,i=n.context.newShape,o=n.context.hints;if(!J0(i))return;const a=ex(i);if(o.targetElement&&o.targetElement[a]!==void 0)return;const l=Q(r).get(a),c=Q(i).get(a);l!==c&&t.updateProperties(i,{[a]:l})})}xp.$inject=["injector","modeling"],ie(xp,K);function _p(e,t){K.call(this,e),this.preExecute("shape.resize",function(n){var r=n.shape,i=Pe(r),o=i&&i.get("label"),a=o&&o.get("bounds");a&&t.updateModdleProperties(r,o,{bounds:void 0})},!0)}ie(_p,K),_p.$inject=["eventBus","modeling"];function wp(e,t,n){K.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(!(!P(o,"bpmn:SequenceFlow")||!P(a,"bpmn:SequenceFlow"))&&t.canConnect(o.source,a.target,o)){var s=eD(o.waypoints,a.waypoints);n.reconnectEnd(o,a.target,s)}}})}ie(wp,K),wp.$inject=["eventBus","bpmnRules","modeling"];function ko(e){return e.original||e}function eD(e,t){var n=pp(ko(e[e.length-2]),ko(e[e.length-1]),ko(t[1]),ko(t[0]));return n?[].concat(e.slice(0,e.length-1),[n],t.slice(1)):[ko(e[0]),ko(t[t.length-1])]}function Ep(e,t){K.call(this,e),this.preExecute("shape.delete",function(n){var r=n.shape,i=r.parent;P(r,"bpmn:Participant")&&(n.collaborationRoot=i)},!0),this.postExecute("shape.delete",function(n){var r=n.collaborationRoot;if(r&&!r.businessObject.participants.length){var i=t.makeProcess(),o=r.children.slice();t.moveElements(o,{x:0,y:0},i)}},!0)}Ep.$inject=["eventBus","modeling"],ie(Ep,K);function Sp(e,t,n,r){K.call(this,e);var i=r.get("dragging",!1);function o(l){var c=l.source,u=l.target,d=l.parent;if(d){var f,p;P(l,"bpmn:SequenceFlow")&&(n.canConnectSequenceFlow(c,u)||(p=!0),n.canConnectMessageFlow(c,u)&&(f="bpmn:MessageFlow")),P(l,"bpmn:MessageFlow")&&(n.canConnectMessageFlow(c,u)||(p=!0),n.canConnectSequenceFlow(c,u)&&(f="bpmn:SequenceFlow")),p&&t.removeConnection(l),f&&t.connect(c,u,{type:f,waypoints:l.waypoints.slice()})}}function a(l){var c=l.context,u=c.connection,d=c.newSource||u.source,f=c.newTarget||u.target,p,m;p=n.canConnect(d,f),!(!p||p.type===u.type)&&(m=t.connect(d,f,{type:p.type,associationDirection:p.associationDirection,waypoints:u.waypoints.slice()}),u.parent&&t.removeConnection(u),c.connection=m,i&&s(u,m))}function s(l,c){var u=i.context(),d=u&&u.payload.previousSelection,f;!d||!d.length||(f=d.indexOf(l),f!==-1&&d.splice(f,1,c))}this.postExecuted("elements.move",function(l){var c=l.closure,u=c.allConnections;N(u,o)},!0),this.preExecute("connection.reconnect",a),this.postExecuted("element.updateProperties",function(l){var c=l.context,u=c.properties,d=c.element,f=d.businessObject,p;u.default&&(p=Re(d.outgoing,Bn({id:d.businessObject.default.id})),p&&t.updateProperties(p,{conditionExpression:void 0})),u.conditionExpression&&f.sourceRef.default===f&&t.updateProperties(d.source,{default:void 0})})}ie(Sp,K),Sp.$inject=["eventBus","modeling","bpmnRules","injector"];function Ec(e,t,n,r,i,o){r.invoke(K,this),this._bpmnReplace=e,this._elementRegistry=n,this._selection=o,this.postExecuted(["elements.create"],500,function(a){var s=a.context,l=s.parent,c=s.elements,u=Lt(c,function(d,f){var p=t.canReplace([f],f.host||f.parent||l);return p?d.concat(p.replacements):d},[]);u.length&&this._replaceElements(c,u)},this),this.postExecuted(["elements.move"],500,function(a){var s=a.context,l=s.newParent,c=s.newHost,u=[];N(s.closure.topLevel,function(f){St(f)?u=u.concat(f.children):u=u.concat(f)}),u.length===1&&c&&(l=c);var d=t.canReplace(u,l);d&&this._replaceElements(u,d.replacements,c)},this),this.postExecute(["shape.replace"],1500,function(a){var s=a.context,l=s.oldShape,c=s.newShape,u=l.attachers,d;u&&u.length&&(d=t.canReplace(u,c),this._replaceElements(u,d.replacements))},this),this.postExecuted(["shape.replace"],1500,function(a){var s=a.context,l=s.oldShape,c=s.newShape;i.unclaimId(l.businessObject.id,l.businessObject),i.updateProperties(c,{id:l.id})})}ie(Ec,K),Ec.prototype._replaceElements=function(e,t){var n=this._elementRegistry,r=this._bpmnReplace,i=this._selection;N(t,function(o){var a={type:o.newElementType},s=n.get(o.oldElementId),l=e.indexOf(s);e[l]=r.replaceElement(s,a,{select:!1})}),t&&i.select(e)},Ec.$inject=["bpmnReplace","bpmnRules","elementRegistry","injector","modeling","selection"];var tD=1500,nD={width:140,height:120},Cp={width:300,height:60},Tp={width:60,height:300},Sc={width:300,height:150},Cc={width:150,height:300},tx={width:140,height:120},nx={width:50,height:30};function rx(e){e.on("resize.start",tD,function(t){var n=t.context,r=n.shape,i=n.direction,o=n.balanced;(P(r,"bpmn:Lane")||P(r,"bpmn:Participant"))&&(n.resizeConstraints=sD(r,i,o)),P(r,"bpmn:SubProcess")&&Se(r)&&(n.minDimensions=tx),P(r,"bpmn:TextAnnotation")&&(n.minDimensions=nx)})}rx.$inject=["eventBus"];var ni=Math.abs,rD=Math.min,iD=Math.max;function ix(e,t,n,r){var i=e[t];e[t]=i===void 0?n:r(n,i)}function Lo(e,t,n){return ix(e,t,n,rD)}function jo(e,t,n){return ix(e,t,n,iD)}var oD={top:20,left:50,right:20,bottom:20},aD={top:50,left:20,right:20,bottom:20};function sD(e,t,n){var r=vn(e),i=!0,o=!0,a=gc(r,[r]),s=ce(e),l={},c={},u=lt(e),d=u?Cp:Tp;/n/.test(t)?c.top=s.bottom-d.height:/e/.test(t)?c.right=s.left+d.width:/s/.test(t)?c.bottom=s.top+d.height:/w/.test(t)&&(c.left=s.right-d.width),a.forEach(function(m){var v=ce(m);u?(v.top<s.top-10&&(i=!1),v.bottom>s.bottom+10&&(o=!1)):(v.left<s.left-10&&(i=!1),v.right>s.right+10&&(o=!1)),/n/.test(t)&&(n&&ni(s.top-v.bottom)<10&&jo(l,"top",v.top+d.height),ni(s.top-v.top)<5&&Lo(c,"top",v.bottom-d.height)),/e/.test(t)&&(n&&ni(s.right-v.left)<10&&Lo(l,"right",v.right-d.width),ni(s.right-v.right)<5&&jo(c,"right",v.left+d.width)),/s/.test(t)&&(n&&ni(s.bottom-v.top)<10&&Lo(l,"bottom",v.bottom-d.height),ni(s.bottom-v.bottom)<5&&jo(c,"bottom",v.top+d.height)),/w/.test(t)&&(n&&ni(s.left-v.right)<10&&jo(l,"left",v.left+d.width),ni(s.left-v.left)<5&&Lo(c,"left",v.right-d.width))});var f=r.children.filter(function(m){return!m.hidden&&!m.waypoints&&(P(m,"bpmn:FlowElement")||P(m,"bpmn:Artifact"))}),p=u?oD:aD;return f.forEach(function(m){var v=ce(m);/n/.test(t)&&(!u||i)&&Lo(c,"top",v.top-p.top),/e/.test(t)&&(u||o)&&jo(c,"right",v.right+p.right),/s/.test(t)&&(!u||o)&&jo(c,"bottom",v.bottom+p.bottom),/w/.test(t)&&(u||i)&&Lo(c,"left",v.left-p.left)}),{min:c,max:l}}var ox=1001;function ax(e,t){e.on("resize.start",ox+500,function(n){var r=n.context,i=r.shape;(P(i,"bpmn:Lane")||P(i,"bpmn:Participant"))&&(r.balanced=!Ra(n))}),e.on("resize.end",ox,function(n){var r=n.context,i=r.shape,o=r.canExecute,a=r.newBounds;if(P(i,"bpmn:Lane")||P(i,"bpmn:Participant"))return o&&(a=$v(a),t.resizeLane(i,a,r.balanced)),!1})}ax.$inject=["eventBus","modeling"];var lD=500;function Pp(e,t,n,r,i){n.invoke(K,this);function o(u){return be(u,["bpmn:ReceiveTask","bpmn:SendTask"])||cD(u,["bpmn:ErrorEventDefinition","bpmn:EscalationEventDefinition","bpmn:MessageEventDefinition","bpmn:SignalEventDefinition"])}function a(u){var d=e.getDefinitions(),f=d.get("rootElements");return!!Re(f,Bn({id:u.id}))}function s(u){if(P(u,"bpmn:ErrorEventDefinition"))return"errorRef";if(P(u,"bpmn:EscalationEventDefinition"))return"escalationRef";if(P(u,"bpmn:MessageEventDefinition"))return"messageRef";if(P(u,"bpmn:SignalEventDefinition"))return"signalRef"}function l(u){if(be(u,["bpmn:ReceiveTask","bpmn:SendTask"]))return u.get("messageRef");var d=u.get("eventDefinitions"),f=d[0];return f.get(s(f))}function c(u,d){if(be(u,["bpmn:ReceiveTask","bpmn:SendTask"]))return u.set("messageRef",d);var f=u.get("eventDefinitions"),p=f[0];return p.set(s(p),d)}this.executed(["shape.create","element.updateProperties","element.updateModdleProperties"],function(u){var d=u.shape||u.element;if(o(d)){var f=Q(d),p=l(f),m;p&&!a(p)&&(m=e.getDefinitions().get("rootElements"),ot(m,p),u.addedRootElement=p)}},!0),this.reverted(["shape.create","element.updateProperties","element.updateModdleProperties"],function(u){var d=u.addedRootElement;if(d){var f=e.getDefinitions().get("rootElements");Xe(f,d)}},!0),t.on("copyPaste.copyElement",function(u){var d=u.descriptor,f=u.element;if(!(f.labelTarget||!o(f))){var p=Q(f),m=l(p);m&&(d.referencedRootElement=m)}}),t.on("copyPaste.pasteElement",lD,function(u){var d=u.descriptor,f=d.businessObject,p=d.referencedRootElement;p&&(a(p)||(p=r.copyElement(p,i.create(p.$type))),c(f,p),delete d.referencedRootElement)})}Pp.$inject=["bpmnjs","eventBus","injector","moddleCopy","bpmnFactory"],ie(Pp,K);function cD(e,t){return me(t)||(t=[t]),kr(t,function(n){return bo(e,n)})}var sx=Math.max;function lx(e){e.on("spaceTool.getMinDimensions",function(t){var n=t.shapes,r=t.axis,i=t.start,o={};return N(n,function(a){var s=a.id;P(a,"bpmn:Participant")&&(o[s]=dD(a,r,i)),P(a,"bpmn:Lane")&&(o[s]=lt(a)?Cp:Tp),P(a,"bpmn:SubProcess")&&Se(a)&&(o[s]=tx),P(a,"bpmn:TextAnnotation")&&(o[s]=nx),P(a,"bpmn:Group")&&(o[s]=nD)}),o})}lx.$inject=["eventBus"];function uD(e){return e==="x"}function dD(e,t,n){var r=lt(e);if(!hD(e))return r?Sc:Cc;var i=uD(t),o={};return i?r?o=Sc:o={width:pD(e,n,i),height:Cc.height}:r?o={width:Sc.width,height:fD(e,n,i)}:o=Cc,o}function fD(e,t,n){var r;return r=mD(e,t,n),sx(Sc.height,r)}function pD(e,t,n){var r;return r=gD(e,t,n),sx(Cc.width,r)}function hD(e){return!!ti(e).length}function mD(e,t,n){var r=ti(e),i;return i=$p(r,t,n),e.height-i.height+Cp.height}function gD(e,t,n){var r=ti(e),i;return i=$p(r,t,n),e.width-i.width+Tp.width}function $p(e,t,n){var r,i,o;for(r=0;r<e.length;r++)if(i=e[r],!n&&t>=i.y&&t<=i.y+i.height||n&&t>=i.x&&t<=i.x+i.width)return o=ti(i),o.length?$p(o,t,n):i}var cx=400,vD=600,ux={x:180,y:160};function ri(e,t,n,r,i,o,a){K.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 l(d){return P(d,"bpmn:SubProcess")&&!Se(d)}function c(d){var f=d.shape,p=d.newRootElement,m=Q(f);p=s._addDiagram(p||m),d.newRootElement=e.addRootElement(p)}function u(d){var f=d.shape,p=Q(f);s._removeDiagram(p);var m=d.newRootElement=a.get(br(p));e.removeRootElement(m)}this.executed("shape.create",function(d){var f=d.shape;l(f)&&c(d)},!0),this.postExecuted("shape.create",function(d){var f=d.shape,p=d.newRootElement;!p||!f.children||(s._showRecursively(f.children),s._moveChildrenToShape(f,p))},!0),this.reverted("shape.create",function(d){var f=d.shape;l(f)&&u(d)},!0),this.preExecuted("shape.delete",function(d){var f=d.shape;if(l(f)){var p=a.get(br(f));p&&n.removeElements(p.children.slice())}},!0),this.executed("shape.delete",function(d){var f=d.shape;l(f)&&u(d)},!0),this.reverted("shape.delete",function(d){var f=d.shape;l(f)&&c(d)},!0),this.preExecuted("shape.replace",function(d){var f=d.oldShape,p=d.newShape;!l(f)||!l(p)||(d.oldRoot=e.removeRootElement(br(f)))},!0),this.postExecuted("shape.replace",function(d){var f=d.newShape,p=d.oldRoot,m=e.findRoot(br(f));if(!(!p||!m)){var v=p.children;n.moveElements(v,{x:0,y:0},m)}},!0),this.executed("element.updateProperties",function(d){var f=d.element;if(P(f,"bpmn:SubProcess")){var p=d.properties,m=d.oldProperties,v=m.id,g=p.id;if(v!==g){if(Nl(f)){a.updateId(f,Di(g)),a.updateId(v,g);return}var x=a.get(Di(v));x&&a.updateId(Di(v),Di(g))}}},!0),this.reverted("element.updateProperties",function(d){var f=d.element;if(P(f,"bpmn:SubProcess")){var p=d.properties,m=d.oldProperties,v=m.id,g=p.id;if(v!==g){if(Nl(f)){a.updateId(f,Di(v)),a.updateId(g,v);return}var x=a.get(Di(g));x&&a.updateId(x,Di(v))}}},!0),t.on("element.changed",function(d){var f=d.element;if(Nl(f)){var p=f,m=a.get(Sy(p));!m||m===p||t.fire("element.changed",{element:m})}}),this.executed("shape.toggleCollapse",cx,function(d){var f=d.shape;P(f,"bpmn:SubProcess")&&(Se(f)?u(d):(c(d),s._showRecursively(f.children)))},!0),this.reverted("shape.toggleCollapse",cx,function(d){var f=d.shape;P(f,"bpmn:SubProcess")&&(Se(f)?u(d):(c(d),s._showRecursively(f.children)))},!0),this.postExecuted("shape.toggleCollapse",vD,function(d){var f=d.shape;if(P(f,"bpmn:SubProcess")){var p=d.newRootElement;p&&(Se(f)?s._moveChildrenToShape(p,f):s._moveChildrenToShape(f,p))}},!0),t.on("copyPaste.createTree",function(d){var f=d.element,p=d.children;if(l(f)){var m=br(f),v=a.get(m);v&&p.push.apply(p,v.children)}}),t.on("copyPaste.copyElement",function(d){var f=d.descriptor,p=d.element,m=d.elements,v=p.parent,g=P(Pe(v),"bpmndi:BPMNPlane");if(g){var x=Sy(v),w=Re(m,function(b){return b.id===x});w&&(f.parent=w.id)}}),t.on("copyPaste.pasteElement",function(d){var f=d.descriptor;f.parent&&(l(f.parent)||f.parent.hidden)&&(f.hidden=!0)})}ie(ri,K),ri.prototype._moveChildrenToShape=function(e,t){var n=this._modeling,r=e.children,i;if(r){r=r.concat(r.reduce(function(c,u){return u.label&&u.label.parent!==e?c.concat(u.label):c},[]));var o=r.filter(function(c){return!c.hidden});if(!o.length){n.moveElements(r,{x:0,y:0},t,{autoResize:!1});return}var a=st(o);if(!t.x)i={x:ux.x-a.x,y:ux.y-a.y};else{var s=fe(t),l=fe(a);i={x:s.x-l.x,y:s.y-l.y}}n.moveElements(r,i,t,{autoResize:!1})}},ri.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},ri.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},ri.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:br(e),type:e.$type,di:r,businessObject:e,collapsed:!0});return o},ri.prototype._removeDiagram=function(e){var t=this._bpmnjs,n=t.getDefinitions().diagrams,r=Re(n,function(i){return i.plane.bpmnElement.id===e.id});return n.splice(n.indexOf(r),1),r},ri.$inject=["canvas","eventBus","modeling","elementFactory","bpmnFactory","bpmnjs","elementRegistry"];function Rp(e,t){e.invoke(K,this),this.postExecuted("shape.replace",function(n){var r=n.context.oldShape,i=n.context.newShape;if(!(!P(i,"bpmn:SubProcess")||!(P(r,"bpmn:Task")||P(r,"bpmn:CallActivity"))||!Se(i))){var o=yD(i);t.createShape({type:"bpmn:StartEvent"},o,i)}})}Rp.$inject=["injector","modeling"],ie(Rp,K);function yD(e){return{x:e.x+e.width/6,y:e.y+e.height/2}}function Ap(e){K.call(this,e),this.preExecute("connection.create",function(t){const{target:n}=t;P(n,"bpmn:TextAnnotation")&&(t.parent=n.parent)},!0),this.preExecute(["shape.create","shape.resize","elements.move"],function(t){const n=t.shapes||[t.shape];n.length===1&&P(n[0],"bpmn:TextAnnotation")&&(t.hints=t.hints||{},t.hints.autoResize=!1)},!0)}ie(Ap,K),Ap.$inject=["eventBus"];function Op(e,t){K.call(this,e),this.postExecuted("shape.toggleCollapse",1500,function(n){var r=n.shape;if(Se(r))return;var i=ha(r);i.forEach(function(a){var s=a.incoming.slice(),l=a.outgoing.slice();N(s,function(c){o(c,!0)}),N(l,function(c){o(c,!1)})});function o(a,s){i.indexOf(a.source)!==-1&&i.indexOf(a.target)!==-1||(s?t.reconnectEnd(a,r,fe(r)):t.reconnectStart(a,r,fe(r)))}},!0)}ie(Op,K),Op.$inject=["eventBus","modeling"];var Mp=500;function Ip(e,t,n){K.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 l=a.children,c=s,u,d;return u=bD(l).concat([a]),d=R0(u),d?(c.width=Math.max(d.width,c.width),c.height=Math.max(d.height,c.height),c.x=d.x+(d.width-c.width)/2,c.y=d.y+(d.height-c.height)/2):(c.x=a.x+(a.width-c.width)/2,c.y=a.y+(a.height-c.height)/2),c}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"],Mp,function(a){var s=a.context,l=s.shape;P(l,"bpmn:SubProcess")&&(l.collapsed?Pe(l).isExpanded=!1:(r(l.children),Pe(l).isExpanded=!0))}),this.reverted(["shape.toggleCollapse"],Mp,function(a){var s=a.context,l=s.shape;l.collapsed?Pe(l).isExpanded=!1:Pe(l).isExpanded=!0}),this.postExecuted(["shape.toggleCollapse"],Mp,function(a){var s=a.context.shape,l=t.getDefaultSize(s),c;s.collapsed?c=o(s,l):c=i(s,l),n.resizeShape(s,c,null,{autoResize:s.collapsed?!1:"nwse"})})}ie(Ip,K),Ip.$inject=["eventBus","elementFactory","modeling"];function bD(e){return e.filter(function(t){return!t.hidden})}function Dp(e,t,n,r){t.invoke(K,this),this.preExecute("shape.delete",function(i){var o=i.context,a=o.shape,s=a.businessObject;Te(a)||(P(a,"bpmn:Participant")&&Se(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;P(i,"bpmn:Collaboration")&&n.ids.unclaim(o.id)})}ie(Dp,K),Dp.$inject=["canvas","injector","moddle","modeling"];function Np(e,t){K.call(this,e),this.preExecute("connection.delete",function(n){var r=n.context,i=r.connection,o=i.source;xD(i,o)&&t.updateProperties(o,{default:null})})}ie(Np,K),Np.$inject=["eventBus","modeling"];function xD(e,t){if(!P(e,"bpmn:SequenceFlow"))return!1;var n=Q(t),r=Q(e);return n.get("default")===r}var _D=500,wD=5e3;function Bp(e,t){K.call(this,e);var n;function r(){return n=n||new ED,n.enter(),n}function i(){if(!n)throw new Error("out of bounds release");return n}function o(){if(!n)throw new Error("out of bounds release");var s=n.leave();return s&&(t.updateLaneRefs(n.flowNodes,n.lanes),n=null),s}var a=["spaceTool","lane.add","lane.resize","lane.split","elements.create","elements.delete","elements.move","shape.create","shape.delete","shape.move","shape.resize"];this.preExecute(a,wD,function(s){r()}),this.postExecuted(a,_D,function(s){o()}),this.preExecute(["shape.create","shape.move","shape.delete","shape.resize"],function(s){var l=s.context,c=l.shape,u=i();c.labelTarget||(P(c,"bpmn:Lane")&&u.addLane(c),P(c,"bpmn:FlowNode")&&u.addFlowNode(c))})}Bp.$inject=["eventBus","modeling"],ie(Bp,K);function ED(){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}}function kp(e,t){K.call(this,e),this.postExecuted("elements.create",function(n){const r=n.context,i=r.elements;for(const o of i)SD(o)&&!TD(o)&&t.updateProperties(o,{isForCompensation:void 0})})}ie(kp,K),kp.$inject=["eventBus","modeling"];function SD(e){const t=Q(e);return t&&t.isForCompensation}function CD(e){return e&&P(e,"bpmn:BoundaryEvent")&&bo(e,"bpmn:CompensateEventDefinition")}function TD(e){return e.incoming.filter(n=>CD(n.source)).length>0}const PD={__init__:["adaptiveLabelPositioningBehavior","appendBehavior","associationBehavior","attachEventBehavior","boundaryEventBehavior","compensateBoundaryEventBehaviour","createBehavior","createDataObjectBehavior","createParticipantBehavior","dataInputAssociationBehavior","dataStoreBehavior","deleteLaneBehavior","detachEventBehavior","dropOnFlowBehavior","eventBasedGatewayBehavior","fixHoverBehavior","groupBehavior","importDockingFix","isHorizontalFix","labelBehavior","layoutConnectionBehavior","messageFlowBehavior","nonInterruptingBehavior","removeElementBehavior","removeEmbeddedLabelBoundsBehavior","removeParticipantBehavior","replaceConnectionBehavior","replaceElementBehaviour","resizeBehavior","resizeLaneBehavior","rootElementReferenceBehavior","spaceToolBehavior","subProcessPlaneBehavior","subProcessStartEventBehavior","textAnnotationBehavior","toggleCollapseConnectionBehaviour","toggleElementCollapseBehaviour","unclaimIdBehavior","updateFlowNodeRefsBehavior","unsetDefaultFlowBehavior","setCompensationActivityAfterPasteBehavior"],adaptiveLabelPositioningBehavior:["type",Zf],appendBehavior:["type",Qf],associationBehavior:["type",Jf],attachEventBehavior:["type",cc],boundaryEventBehavior:["type",ep],compensateBoundaryEventBehaviour:["type",tp],createBehavior:["type",np],createDataObjectBehavior:["type",rp],createParticipantBehavior:["type",ap],dataInputAssociationBehavior:["type",sp],dataStoreBehavior:["type",lp],deleteLaneBehavior:["type",cp],detachEventBehavior:["type",vc],dropOnFlowBehavior:["type",up],eventBasedGatewayBehavior:["type",dp],fixHoverBehavior:["type",N0],groupBehavior:["type",fp],importDockingFix:["type",k0],isHorizontalFix:["type",hp],labelBehavior:["type",mp],layoutConnectionBehavior:["type",gp],messageFlowBehavior:["type",bp],nonInterruptingBehavior:["type",xp],removeElementBehavior:["type",wp],removeEmbeddedLabelBoundsBehavior:["type",_p],removeParticipantBehavior:["type",Ep],replaceConnectionBehavior:["type",Sp],replaceElementBehaviour:["type",Ec],resizeBehavior:["type",rx],resizeLaneBehavior:["type",ax],rootElementReferenceBehavior:["type",Pp],spaceToolBehavior:["type",lx],subProcessPlaneBehavior:["type",ri],subProcessStartEventBehavior:["type",Rp],textAnnotationBehavior:["type",Ap],toggleCollapseConnectionBehaviour:["type",Op],toggleElementCollapseBehaviour:["type",Ip],unclaimIdBehavior:["type",Dp],unsetDefaultFlowBehavior:["type",Np],updateFlowNodeRefsBehavior:["type",Bp],setCompensationActivityAfterPasteBehavior:["type",kp]};function dx(e,t){var n=wt(e,t,-15);return n!=="intersect"?n:null}function yt(e){hn.call(this,e)}ie(yt,hn),yt.$inject=["eventBus"],yt.prototype.init=function(){this.addRule("connection.start",function(e){var t=e.source;return $D(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 Pc(t,n)}finally{i&&(n.parent=null)}}),this.addRule("connection.reconnect",function(e){var t=e.connection,n=e.source,r=e.target;return Pc(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 wx(t,n)}),this.addRule("elements.create",function(e){var t=e.elements,n=e.position,r=e.target;return Be(r)&&!$c(t,r)?!1:Ci(t,function(i){return Be(i)?Pc(i.source,i.target,i):i.host?Va(i,i.host,null,n):zp(i,r,null)})}),this.addRule("elements.move",function(e){var t=e.target,n=e.shapes,r=e.position;return Va(n,t,null,r)||xx(n,t,r)||_x(n,t)||$c(n,t)}),this.addRule("shape.create",function(e){return zp(e.shape,e.target,e.source,e.position)}),this.addRule("shape.attach",function(e){return Va(e.shape,e.target,null,e.position)}),this.addRule("element.copy",function(e){var t=e.element,n=e.elements;return Px(n,t)})},yt.prototype.canConnectMessageFlow=Cx,yt.prototype.canConnectSequenceFlow=Tx,yt.prototype.canConnectDataAssociation=Vp,yt.prototype.canConnectAssociation=Ex,yt.prototype.canConnectCompensationAssociation=Sx,yt.prototype.canMove=_x,yt.prototype.canAttach=Va,yt.prototype.canReplace=xx,yt.prototype.canDrop=Fo,yt.prototype.canInsert=$c,yt.prototype.canCreate=zp,yt.prototype.canConnect=Pc,yt.prototype.canResize=wx,yt.prototype.canCopy=Px;function $D(e){return Lp(e)?null:be(e,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference","bpmn:Group","bpmn:TextAnnotation"])}function Lp(e){return!e||Te(e)}function RD(e,t){return e===t}function fx(e){do{if(P(e,"bpmn:Process"))return Q(e);if(P(e,"bpmn:Participant"))return Q(e).processRef||Q(e)}while(e=e.parent)}function jp(e){return P(e,"bpmn:TextAnnotation")}function Fp(e){return P(e,"bpmn:Group")&&!e.labelTarget}function px(e){return P(e,"bpmn:BoundaryEvent")&&nr(e,"bpmn:CompensateEventDefinition")}function Tc(e){return Q(e).isForCompensation}function AD(e,t){var n=fx(e),r=fx(t);return n===r}function OD(e){return P(e,"bpmn:InteractionNode")&&!P(e,"bpmn:BoundaryEvent")&&(!P(e,"bpmn:Event")||P(e,"bpmn:ThrowEvent")&&gx(e,"bpmn:MessageEventDefinition"))}function MD(e){return P(e,"bpmn:InteractionNode")&&!Tc(e)&&(!P(e,"bpmn:Event")||P(e,"bpmn:CatchEvent")&&gx(e,"bpmn:MessageEventDefinition"))&&!(P(e,"bpmn:BoundaryEvent")&&!nr(e,"bpmn:MessageEventDefinition"))}function hx(e){for(var t=e;t=t.parent;){if(P(t,"bpmn:FlowElementsContainer"))return Q(t);if(P(t,"bpmn:Participant"))return Q(t).processRef}return null}function mx(e,t){var n=hx(e),r=hx(t);return n===r}function nr(e,t){var n=Q(e);return!!Re(n.eventDefinitions||[],function(r){return P(r,t)})}function gx(e,t){var n=Q(e);return(n.eventDefinitions||[]).every(function(r){return P(r,t)})}function ID(e){return P(e,"bpmn:FlowNode")&&!P(e,"bpmn:EndEvent")&&!St(e)&&!(P(e,"bpmn:IntermediateThrowEvent")&&nr(e,"bpmn:LinkEventDefinition"))&&!px(e)&&!Tc(e)}function DD(e){return P(e,"bpmn:FlowNode")&&!P(e,"bpmn:StartEvent")&&!P(e,"bpmn:BoundaryEvent")&&!St(e)&&!(P(e,"bpmn:IntermediateCatchEvent")&&nr(e,"bpmn:LinkEventDefinition"))&&!Tc(e)}function ND(e){return P(e,"bpmn:ReceiveTask")||P(e,"bpmn:IntermediateCatchEvent")&&(nr(e,"bpmn:MessageEventDefinition")||nr(e,"bpmn:TimerEventDefinition")||nr(e,"bpmn:ConditionalEventDefinition")||nr(e,"bpmn:SignalEventDefinition"))}function BD(e){for(var t=[];e;)e=e.parent,e&&t.push(e);return t}function Hp(e,t){var n=BD(t);return n.indexOf(e)!==-1}function Pc(e,t,n){if(Lp(e)||Lp(t))return null;if(!P(n,"bpmn:DataAssociation")){if(Cx(e,t))return{type:"bpmn:MessageFlow"};if(Tx(e,t))return{type:"bpmn:SequenceFlow"}}var r=Vp(e,t);return r||(Sx(e,t)?{type:"bpmn:Association",associationDirection:"One"}:Ex(e,t)?{type:"bpmn:Association",associationDirection:"None"}:!1)}function Fo(e,t){return Te(e)||Fp(e)?!0:P(t,"bpmn:Participant")&&!Se(t)?!1:P(e,"bpmn:Participant")?P(t,"bpmn:Process")||P(t,"bpmn:Collaboration"):be(e,["bpmn:DataInput","bpmn:DataOutput"])&&e.parent?t===e.parent:P(e,"bpmn:Lane")?P(t,"bpmn:Participant")||P(t,"bpmn:Lane"):P(e,"bpmn:BoundaryEvent")&&!kD(e)?!1:P(e,"bpmn:FlowElement")&&!P(e,"bpmn:DataStoreReference")?P(t,"bpmn:FlowElementsContainer")?Se(t):be(t,["bpmn:Participant","bpmn:Lane"]):P(e,"bpmn:DataStoreReference")&&P(t,"bpmn:Collaboration")?kr(Q(t).get("participants"),function(n){return!!n.get("processRef")}):be(e,["bpmn:Artifact","bpmn:DataAssociation","bpmn:DataStoreReference"])?be(t,["bpmn:Collaboration","bpmn:Lane","bpmn:Participant","bpmn:Process","bpmn:SubProcess"]):P(e,"bpmn:MessageFlow")?P(t,"bpmn:Collaboration")||e.source.parent==t||e.target.parent==t:!1}function kD(e){return Q(e).cancelActivity&&(vx(e)||yx(e))}function LD(e){return!Te(e)&&P(e,"bpmn:BoundaryEvent")}function jD(e){return P(e,"bpmn:Lane")}function FD(e){return LD(e)||P(e,"bpmn:IntermediateThrowEvent")&&vx(e)?!0:P(e,"bpmn:IntermediateCatchEvent")&&yx(e)}function vx(e){var t=Q(e);return t&&!(t.eventDefinitions&&t.eventDefinitions.length)}function yx(e){return bx(e,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])}function bx(e,t){return t.some(function(n){return nr(e,n)})}function HD(e){return P(e,"bpmn:ReceiveTask")&&Re(e.incoming,function(t){return P(t.source,"bpmn:EventBasedGateway")})}function Va(e,t,n,r){if(Array.isArray(e)||(e=[e]),e.length!==1)return!1;var i=e[0];return Te(i)||!FD(i)||St(t)||!P(t,"bpmn:Activity")||Tc(t)||r&&!dx(r,t)||HD(t)?!1:"attach"}function xx(e,t,n){if(!t)return!1;var r={replacements:[]};return N(e,function(i){St(t)||P(i,"bpmn:StartEvent")&&i.type!=="label"&&Fo(i,t)&&(M2(i)||r.replacements.push({oldElementId:i.id,newElementType:"bpmn:StartEvent"}),(I2(i)||D2(i)||N2(i))&&r.replacements.push({oldElementId:i.id,newElementType:"bpmn:StartEvent"}),bx(i,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])&&P(t,"bpmn:SubProcess")&&r.replacements.push({oldElementId:i.id,newElementType:"bpmn:StartEvent"})),P(t,"bpmn:Transaction")||nr(i,"bpmn:CancelEventDefinition")&&i.type!=="label"&&(P(i,"bpmn:EndEvent")&&Fo(i,t)&&r.replacements.push({oldElementId:i.id,newElementType:"bpmn:EndEvent"}),P(i,"bpmn:BoundaryEvent")&&Va(i,t,null,n)&&r.replacements.push({oldElementId:i.id,newElementType:"bpmn:BoundaryEvent"}))}),r.replacements.length?r:!1}function _x(e,t){return kr(e,jD)?!1:t?e.every(function(n){return Fo(n,t)}):!0}function zp(e,t,n,r){return t?Te(e)||Fp(e)?!0:RD(n,t)||n&&Hp(n,t)?!1:Fo(e,t)||$c(e,t):!1}function wx(e,t){return P(e,"bpmn:SubProcess")?Se(e)&&(!t||t.width>=100&&t.height>=80):!!(P(e,"bpmn:Lane")||P(e,"bpmn:Participant")||jp(e)||Fp(e))}function zD(e,t){var n=jp(e),r=jp(t);return(n||r)&&n!==r}function Ex(e,t){return Hp(t,e)||Hp(e,t)?!1:zD(e,t)?!0:!!Vp(e,t)}function Sx(e,t){return mx(e,t)&&px(e)&&P(t,"bpmn:Activity")&&!WD(t,e)&&!St(t)}function Cx(e,t){return $x(e)&&!$x(t)?!1:OD(e)&&MD(t)&&!AD(e,t)}function Tx(e,t){return ID(e)&&DD(t)&&mx(e,t)&&!(P(e,"bpmn:EventBasedGateway")&&!ND(t))}function Vp(e,t){return be(e,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&be(t,["bpmn:Activity","bpmn:ThrowEvent"])?{type:"bpmn:DataInputAssociation"}:be(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&be(e,["bpmn:Activity","bpmn:CatchEvent"])?{type:"bpmn:DataOutputAssociation"}:!1}function $c(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:be(t,["bpmn:SequenceFlow","bpmn:MessageFlow"])&&!Te(t)&&P(e,"bpmn:FlowNode")&&!P(e,"bpmn:BoundaryEvent")&&Fo(e,t.parent)}function VD(e,t){return e&&t&&e.indexOf(t)!==-1}function Px(e,t){return Te(t)?!0:!(P(t,"bpmn:Lane")&&!VD(e,t.parent))}function $x(e){return Ao(e,"bpmn:Process")||Ao(e,"bpmn:Collaboration")}function WD(e,t){return e.attachers.includes(t)}const GD={__depends__:[tr],__init__:["bpmnRules"],bpmnRules:["type",yt]};var UD=2e3;function Rx(e,t){e.on("saveXML.start",UD,n);function n(){var r=t.getRootElements();N(r,function(i){var o=Pe(i),a,s;a=ha([i],!1),a=_e(a,function(l){return l!==i&&!l.labelTarget}),s=xt(a,Pe),o.set("planeElement",s)})}}Rx.$inject=["eventBus","canvas"];const qD={__init__:["bpmnDiOrdering"],bpmnDiOrdering:["type",Rx]};function Rc(e){K.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)})}Rc.prototype.getOrdering=function(e,t){return null},ie(Rc,K);function Wp(e,t){Rc.call(this,e);var n=[{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:TextAnnotation",order:{level:9}},{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 r(a){if(a.labelTarget)return{level:10};var s=Re(n,function(l){return be(a,[l.type])});return s&&s.order||{level:1}}function i(a){var s=a.order;if(s||(a.order=s=r(a)),!s)throw new Error(`no order for <${a.id}>`);return s}function o(a,s,l){for(var c=s;c&&!be(c,l);)c=c.parent;if(!c)throw new Error(`no parent for <${a.id}> in <${s&&s.id}>`);return c}this.getOrdering=function(a,s){if(a.labelTarget||P(a,"bpmn:TextAnnotation"))return{parent:t.findRoot(s)||t.getRootElement(),index:-1};var l=i(a);l.containers&&(s=o(a,s,l.containers));var c=s.children.indexOf(a),u=qg(s.children,function(d){return!a.labelTarget&&d.labelTarget?!1:l.level<i(d).level});return u!==-1&&c!==-1&&c<u&&(u-=1),{index:u,parent:s}}}Wp.$inject=["eventBus","canvas"],ie(Wp,Rc);const KD={__init__:["bpmnOrderingProvider"],bpmnOrderingProvider:["type",Wp]};function Wa(){}Wa.prototype.get=function(){return this._data},Wa.prototype.set=function(e){this._data=e},Wa.prototype.clear=function(){var e=this._data;return delete this._data,e},Wa.prototype.isEmpty=function(){return!this._data};const YD={clipboard:["type",Wa]};var XD="drop-ok",Ax="drop-not-ok",Ox="attach-ok",Mx="new-parent",Ix="create",ZD=2e3;function Dx(e,t,n,r,i){function o(l,c,u,d,f){if(!c)return!1;l=_e(l,function(w){var b=w.labelTarget;return!w.parent&&!(Te(w)&&l.indexOf(b)!==-1)});var p=Re(l,function(w){return!Be(w)}),m=!1,v=!1,g=!1;Bx(l)&&(m=i.allowed("shape.attach",{position:u,shape:p,target:c})),m||(Bx(l)?g=i.allowed("shape.create",{position:u,shape:p,source:d,target:c}):g=i.allowed("elements.create",{elements:l,position:u,target:c}));var x=f.connectionTarget;return g||m?(p&&d&&(v=i.allowed("connection.create",{source:x===d?p:d,target:x===d?d:p,hints:{targetParent:c,targetAttach:m}})),{attach:m,connect:v}):g===null||m===null?null:!1}function a(l,c){[Ox,XD,Ax,Mx].forEach(function(u){u===c?e.addMarker(l,u):e.removeMarker(l,u)})}n.on(["create.move","create.hover"],function(l){var c=l.context,u=c.elements,d=l.hover,f=c.source,p=c.hints||{};if(!d){c.canExecute=!1,c.target=null;return}Nx(l);var m={x:l.x,y:l.y},v=c.canExecute=d&&o(u,d,m,f,p);d&&v!==null&&(c.target=d,v&&v.attach?a(d,Ox):a(d,v?Mx:Ax))}),n.on(["create.end","create.out","create.cleanup"],function(l){var c=l.hover;c&&a(c,null)}),n.on("create.end",function(l){var c=l.context,u=c.source,d=c.shape,f=c.elements,p=c.target,m=c.canExecute,v=m&&m.attach,g=m&&m.connect,x=c.hints||{};if(m===!1||!p)return!1;Nx(l);var w={x:l.x,y:l.y};g?d=r.appendShape(u,d,w,p,{attach:v,connection:g===!0?{}:g,connectionTarget:x.connectionTarget}):(f=r.createElements(f,w,p,j({},x,{attach:v})),d=Re(f,function(b){return!Be(b)})),j(c,{elements:f,shape:d}),j(l,{elements:f,shape:d})});function s(){var l=t.context();l&&l.prefix===Ix&&t.cancel()}n.on("create.init",function(){n.on("elements.changed",s),n.once(["create.cancel","create.end"],ZD,function(){n.off("elements.changed",s)})}),this.start=function(l,c,u){me(c)||(c=[c]);var d=Re(c,function(m){return!Be(m)});if(d){u=j({elements:c,hints:{},shape:d},u||{}),N(c,function(m){de(m.x)||(m.x=0),de(m.y)||(m.y=0)});var f=_e(c,function(m){return!m.hidden}),p=st(f);N(c,function(m){Be(m)&&(m.waypoints=xt(m.waypoints,function(v){return{x:v.x-p.x-p.width/2,y:v.y-p.y-p.height/2}})),j(m,{x:m.x-p.x-p.width/2,y:m.y-p.y-p.height/2})}),t.init(l,Ix,{cursor:"grabbing",autoActivate:!0,data:{shape:d,elements:c,context:u}})}}}Dx.$inject=["canvas","dragging","eventBus","modeling","rules"];function Nx(e){var t=e.context,n=t.createConstraints;n&&(n.left&&(e.x=Math.max(e.x,n.left)),n.right&&(e.x=Math.min(e.x,n.right)),n.top&&(e.y=Math.max(e.y,n.top)),n.bottom&&(e.y=Math.min(e.y,n.bottom)))}function Bx(e){return e&&e.length===1&&!Be(e[0])}var QD=750;function kx(e,t,n,r,i){function o(a){var s=le("g");ee(s,i.cls("djs-drag-group",["no-events"]));var l=le("g");return a.forEach(function(c){var u;c.hidden||(c.waypoints?(u=n._createContainer("connection",l),n.drawConnection($i(u),c)):(u=n._createContainer("shape",l),n.drawShape($i(u),c),gt(u,c.x,c.y)),r.addDragger(c,s,u))}),s}t.on("create.move",QD,function(a){var s=a.hover,l=a.context,c=l.elements,u=l.dragGroup;u||(u=l.dragGroup=o(c));var d;s?(u.parentNode||(d=e.getActiveLayer(),pe(d,u)),gt(u,a.x,a.y)):it(u)}),t.on("create.cleanup",function(a){var s=a.context,l=s.dragGroup;l&&it(l)})}kx.$inject=["canvas","eventBus","graphicsFactory","previewSupport","styles"];const Ac={__depends__:[_r,Do,tr,Jn],__init__:["create","createPreview"],create:["type",Dx],createPreview:["type",kx]};function Gp(e){var t=this;this._lastMoveEvent=null;function n(r){t._lastMoveEvent=r}e.on("canvas.init",function(r){var i=t._svg=r.svg;i.addEventListener("mousemove",n)}),e.on("canvas.destroy",function(){t._lastMouseEvent=null,t._svg.removeEventListener("mousemove",n)})}Gp.$inject=["eventBus"],Gp.prototype.getLastMoveEvent=function(){return this._lastMoveEvent||JD(0,0)};function JD(e,t){var n=document.createEvent("MouseEvent"),r=e,i=t,o=e,a=t;return n.initMouseEvent&&n.initMouseEvent("mousemove",!0,!0,window,0,r,i,o,a,!1,!1,!1,!1,0,null),n}const Ga={__init__:["mouse"],mouse:["type",Gp]};function jn(e,t,n,r,i,o,a,s){this._canvas=e,this._create=t,this._clipboard=n,this._elementFactory=r,this._eventBus=i,this._modeling=o,this._mouse=a,this._rules=s,i.on("copyPaste.copyElement",function(l){var c=l.descriptor,u=l.element,d=l.elements;c.priority=1,c.id=u.id;var f=Re(d,function(p){return p===u.parent});f&&(c.parent=u.parent.id),eN(u)&&(c.priority=2,c.host=u.host.id),Be(u)&&(c.priority=3,c.source=u.source.id,c.target=u.target.id,c.waypoints=tN(u)),Te(u)&&(c.priority=4,c.labelTarget=u.labelTarget.id),N(["x","y","width","height"],function(p){de(u[p])&&(c[p]=u[p])}),c.hidden=u.hidden,c.collapsed=u.collapsed}),i.on("copyPaste.pasteElements",function(l){var c=l.hints;j(c,{createElementsBehavior:!1})})}jn.$inject=["canvas","create","clipboard","elementFactory","eventBus","modeling","mouse","rules"],jn.prototype.copy=function(e){var t,n;return me(e)||(e=e?[e]:[]),t=this._eventBus.fire("copyPaste.canCopyElements",{elements:e}),t===!1?n={}:n=this.createTree(me(t)?t:e),this._clipboard.set(n),this._eventBus.fire("copyPaste.elementsCopied",{elements:e,tree:n}),n},jn.prototype.paste=function(e){var t=this._clipboard.get();if(!this._clipboard.isEmpty()){var n=e&&e.hints||{};this._eventBus.fire("copyPaste.pasteElements",{hints:n});var r=this._createElements(t);if(e&&e.element&&e.point)return this._paste(r,e.element,e.point,n);this._create.start(this._mouse.getLastMoveEvent(),r,{hints:n||{}})}},jn.prototype._paste=function(e,t,n,r){N(e,function(o){de(o.x)||(o.x=0),de(o.y)||(o.y=0)});var i=st(e);return N(e,function(o){Be(o)&&(o.waypoints=xt(o.waypoints,function(a){return{x:a.x-i.x-i.width/2,y:a.y-i.y-i.height/2}})),j(o,{x:o.x-i.x-i.width/2,y:o.y-i.y-i.height/2})}),this._modeling.createElements(e,n,t,j({},r))},jn.prototype._createElements=function(e){var t=this,n=this._eventBus,r={},i=[];return N(e,function(o,a){o=qn(o,"priority"),N(o,function(s){var l=j({},un(s,["priority"]));r[s.parent]?l.parent=r[s.parent]:delete l.parent,n.fire("copyPaste.pasteElement",{cache:r,descriptor:l});var c;if(Be(l)){l.source=r[s.source],l.target=r[s.target],c=r[s.id]=t.createConnection(l),i.push(c);return}if(Te(l)){l.labelTarget=r[l.labelTarget],c=r[s.id]=t.createLabel(l),i.push(c);return}l.host&&(l.host=r[l.host]),c=r[s.id]=t.createShape(l),i.push(c)})}),i},jn.prototype.createConnection=function(e){var t=this._elementFactory.createConnection(un(e,["id"]));return t},jn.prototype.createLabel=function(e){var t=this._elementFactory.createLabel(un(e,["id"]));return t},jn.prototype.createShape=function(e){var t=this._elementFactory.createShape(un(e,["id"]));return t},jn.prototype.hasRelations=function(e,t){var n,r,i;return!(Be(e)&&(r=Re(t,Bn({id:e.source.id})),i=Re(t,Bn({id:e.target.id})),!r||!i)||Te(e)&&(n=Re(t,Bn({id:e.labelTarget.id})),!n))},jn.prototype.createTree=function(e){var t=this._rules,n=this,r={},i=[],o=fl(e);function a(c,u){return t.allowed("element.copy",{element:c,elements:u})}function s(c,u){var d=Re(i,function(f){return c===f.element});if(!d){i.push({element:c,depth:u});return}d.depth<u&&(i=l(d,i),i.push({element:d.element,depth:u}))}function l(c,u){var d=u.indexOf(c);return d!==-1&&u.splice(d,1),u}return Pi(o,function(c,u,d){if(Te(c))return;N(c.labels,function(m){s(m,d)});function f(m){m&&m.length&&N(m,function(v){N(v.labels,function(g){s(g,d)}),s(v,d)})}N([c.attachers,c.incoming,c.outgoing],f),s(c,d);var p=[];return c.children&&(p=c.children.slice()),n._eventBus.fire("copyPaste.createTree",{element:c,children:p}),p}),e=xt(i,function(c){return c.element}),i=xt(i,function(c){return c.descriptor={},n._eventBus.fire("copyPaste.copyElement",{descriptor:c.descriptor,element:c.element,elements:e}),c}),i=qn(i,function(c){return c.descriptor.priority}),e=xt(i,function(c){return c.element}),N(i,function(c){var u=c.depth;if(!n.hasRelations(c.element,e)){jx(c.element,e);return}if(!a(c.element,e)){jx(c.element,e);return}r[u]||(r[u]=[]),r[u].push(c.descriptor)}),r};function eN(e){return!!e.host}function tN(e){return xt(e.waypoints,function(t){return t=Lx(t),t.original&&(t.original=Lx(t.original)),t})}function Lx(e){return j({},e)}function jx(e,t){var n=t.indexOf(e);return n===-1?t:t.splice(n,1)}const nN={__depends__:[YD,Ac,Ga,tr],__init__:["copyPaste"],copyPaste:["type",jn]};function Up(e,t,n){me(n)||(n=[n]),N(n,function(r){Si(e[r])||(t[r]=e[r])})}var qp=750;function Fx(e,t,n){function r(l,c){var u=e.create(l.$type);return n.copyElement(l,u,null,c)}t.on("copyPaste.copyElement",qp,function(l){var c=l.descriptor,u=l.element,d=Q(u);if(Te(u))return c;var f=c.businessObject=r(d,!0),p=c.di=r(Pe(u),!0);p.bpmnElement=f,Up(f,c,"name"),Up(p,c,"isExpanded"),d.default&&(c.default=d.default.id)});var i="-bpmn-js-refs";function o(l){return l[i]=l[i]||{}}function a(l,c){l[i]=c}function s(l,c,u){var d=Q(l);return l.default&&(u[l.default]={element:d,property:"default"}),l.host&&(Q(l).attachedToRef=Q(c[l.host])),un(u,Lt(u,function(f,p,m){var v=p.element,g=p.property;return m===l.id&&(v.set(g,d),f.push(l.id)),f},[]))}t.on("copyPaste.pasteElement",function(l){var c=l.cache,u=l.descriptor,d=u.businessObject,f=u.di;if(Te(u)){u.businessObject=Q(c[u.labelTarget]),u.di=Pe(c[u.labelTarget]);return}d=u.businessObject=r(d),f=u.di=r(f),f.bpmnElement=d,Up(u,d,["isExpanded","name"]),u.type=d.$type}),t.on("copyPaste.copyElement",qp,function(l){var c=l.descriptor,u=l.element;if(P(u,"bpmn:Participant")){var d=Q(u);d.processRef&&(c.processRef=r(d.processRef,!0))}}),t.on("copyPaste.pasteElement",function(l){var c=l.descriptor,u=c.processRef;u&&(c.processRef=r(u))}),t.on("copyPaste.pasteElement",qp,function(l){var c=l.cache,u=l.descriptor;a(c,s(u,c,o(c)))})}Fx.$inject=["bpmnFactory","eventBus","moddleCopy"];var rN=["artifacts","dataInputAssociations","dataOutputAssociations","default","flowElements","lanes","incoming","outgoing","categoryValue"];function Ua(e,t,n){this._bpmnFactory=t,this._eventBus=e,this._moddle=n,e.on("moddleCopy.canCopyProperties",function(r){var i=r.propertyNames;if(!(!i||!i.length))return qn(i,function(o){return o==="extensionElements"})}),e.on("moddleCopy.canCopyProperty",function(r){var i=r.parent,o=pt(i)&&i.$descriptor,a=r.propertyName;if(a&&rN.indexOf(a)!==-1||a&&o&&!Re(o.properties,Bn({name:a})))return!1}),e.on("moddleCopy.canSetCopiedProperty",function(r){var i=r.property;if(iN(i,"bpmn:ExtensionElements")&&(!i.values||!i.values.length))return!1})}Ua.$inject=["eventBus","bpmnFactory","moddle"],Ua.prototype.copyElement=function(e,t,n,r=!1){var i=this;n&&!me(n)&&(n=[n]),n=n||Kp(e.$descriptor);var o=this._eventBus.fire("moddleCopy.canCopyProperties",{propertyNames:n,sourceElement:e,targetElement:t,clone:r});return o===!1||(me(o)&&(n=o),N(n,function(a){var s;It(e,a)&&(s=e.get(a));var l=i.copyProperty(s,t,a,r);if(ft(l)){var c=i._eventBus.fire("moddleCopy.canSetCopiedProperty",{parent:t,property:l,propertyName:a});c!==!1&&t.set(a,l)}})),t},Ua.prototype.copyProperty=function(e,t,n,r=!1){var i=this,o=this._eventBus.fire("moddleCopy.canCopyProperty",{parent:t,property:e,propertyName:n,clone:r});if(o!==!1){if(o)return pt(o)&&o.$type&&!o.$parent&&(o.$parent=t),o;var a=this._moddle.getPropertyDescriptor(t,n);if(!a.isReference)return a.isId?e&&this._copyId(e,t,r):me(e)?Lt(e,function(s,l){return o=i.copyProperty(l,t,n,r),o?s.concat(o):s},[]):pt(e)&&e.$type?this._moddle.getElementDescriptor(e).isGeneric?void 0:(o=i._bpmnFactory.create(e.$type),o.$parent=t,o=i.copyElement(e,o,null,r),o):e}},Ua.prototype._copyId=function(e,t,n=!1){if(n)return e;if(!this._moddle.ids.assigned(e))return this._moddle.ids.claim(e,t),e};function Kp(e,t){return Lt(e.properties,function(n,r){return t&&r.default?n:n.concat(r.name)},[])}function iN(e,t){return e&&nt(e.$instanceOf)&&e.$instanceOf(t)}const Hx={__depends__:[nN],__init__:["bpmnCopyPaste","moddleCopy"],bpmnCopyPaste:["type",Fx],moddleCopy:["type",Ua]};var zx=Math.round;function Yp(e,t){this._modeling=e,this._eventBus=t}Yp.$inject=["modeling","eventBus"],Yp.prototype.replaceElement=function(e,t,n){if(e.waypoints)return null;var r=this._modeling,i=this._eventBus;i.fire("replace.start",{element:e,attrs:t,hints:n});var o=t.width||e.width,a=t.height||e.height,s=t.x||e.x,l=t.y||e.y,c=zx(s+o/2),u=zx(l+a/2),d=r.replaceShape(e,j({},t,{x:c,y:u,width:o,height:a}),n);return i.fire("replace.end",{element:e,newElement:d,hints:n}),d};function Vx(e,t){t.on("replace.end",500,function(n){const{newElement:r,hints:i={}}=n;i.select!==!1&&e.select(r)})}Vx.$inject=["selection","eventBus"];const oN={__init__:["replace","replaceSelectionBehavior"],replaceSelectionBehavior:["type",Vx],replace:["type",Yp]};function aN(e,t,n){me(n)||(n=[n]),N(n,function(r){Si(e[r])||(t[r]=e[r])})}var sN=["cancelActivity","instantiate","eventGatewayType","triggeredByEvent","isInterrupting"];function lN(e,t){var n=e&&It(e,"collapsed")?e.collapsed:!Se(e),r;return t&&(It(t,"collapsed")||It(t,"isExpanded"))?r=It(t,"collapsed")?t.collapsed:!t.isExpanded:r=n,n!==r}function Wx(e,t,n,r,i,o){function a(s,l,c){c=c||{};var u=l.type,d=s.businessObject;if(Oc(d)&&u==="bpmn:SubProcess"&&lN(s,l))return r.toggleCollapse(s),s;var f=e.create(u),p={type:u,businessObject:f};p.di={},u==="bpmn:ExclusiveGateway"&&(p.di.isMarkerVisible=!0),aN(s.di,p.di,["fill","stroke","background-color","border-color","color"]);var m=Kp(d.$descriptor),v=Kp(f.$descriptor,!0),g=cN(m,v);j(f,kn(l,sN));var x=_e(g,function(y){return y==="eventDefinitions"?Gx(s,l.eventDefinitionType):y==="loopCharacteristics"?!St(f):It(f,y)||y==="processRef"&&l.isExpanded===!1||y==="triggeredByEvent"?!1:y==="isForCompensation"?!St(f):!0});if(f=n.copyElement(d,f,x),l.eventDefinitionType&&(Gx(f,l.eventDefinitionType)||(p.eventDefinitionType=l.eventDefinitionType,p.eventDefinitionAttrs=l.eventDefinitionAttrs)),P(d,"bpmn:Activity")){if(Oc(d))p.isExpanded=Se(s);else if(l&&It(l,"isExpanded")){p.isExpanded=l.isExpanded;var w=t.getDefaultSize(f,{isExpanded:p.isExpanded});p.width=w.width,p.height=w.height,p.x=s.x-(p.width-s.width)/2,p.y=s.y-(p.height-s.height)/2}Se(s)&&!P(d,"bpmn:Task")&&p.isExpanded&&(p.width=s.width,p.height=s.height)}if(Oc(d)&&!Oc(f)&&(c.moveChildren=!1),P(d,"bpmn:Participant")){l.isExpanded===!0?f.processRef=e.create("bpmn:Process"):c.moveChildren=!1;var b=lt(s);Pe(s).isHorizontal||(Pe(p).isHorizontal=b),p.width=b?s.width:t.getDefaultSize(p).width,p.height=b?t.getDefaultSize(p).height:s.height}return o.allowed("shape.resize",{shape:f})||(p.height=t.getDefaultSize(p).height,p.width=t.getDefaultSize(p).width),f.name=d.name,be(d,["bpmn:ExclusiveGateway","bpmn:InclusiveGateway","bpmn:Activity"])&&be(f,["bpmn:ExclusiveGateway","bpmn:InclusiveGateway","bpmn:Activity"])&&(f.default=d.default),l.host&&!P(d,"bpmn:BoundaryEvent")&&P(f,"bpmn:BoundaryEvent")&&(p.host=l.host),(p.type==="bpmn:DataStoreReference"||p.type==="bpmn:DataObjectReference")&&(p.x=s.x+(s.width-p.width)/2),i.replaceElement(s,p,{...c,targetElement:l})}this.replaceElement=a}Wx.$inject=["bpmnFactory","elementFactory","moddleCopy","modeling","replace","rules"];function Oc(e){return P(e,"bpmn:SubProcess")}function Gx(e,t){var n=Q(e);return t&&n.get("eventDefinitions").some(function(r){return P(r,t)})}function cN(e,t){return e.filter(function(n){return t.includes(n)})}const Ux={__depends__:[Hx,oN,Jn],bpmnReplace:["type",Wx]};var uN=250;function zi(e){this._eventBus=e,this._tools=[],this._active=null}zi.$inject=["eventBus"],zi.prototype.registerTool=function(e,t){var n=this._tools;if(!t)throw new Error(`A tool has to be registered with it's "events"`);n.push(e),this.bindEvents(e,t)},zi.prototype.isActive=function(e){return e&&this._active===e},zi.prototype.length=function(e){return this._tools.length},zi.prototype.setActive=function(e){var t=this._eventBus;this._active!==e&&(this._active=e,t.fire("tool-manager.update",{tool:e}))},zi.prototype.bindEvents=function(e,t){var n=this._eventBus,r=[];n.on(t.tool+".init",function(i){var o=i.context;if(!o.reactivate&&this.isActive(e)){this.setActive(null);return}this.setActive(e)},this),N(t,function(i){r.push(i+".ended"),r.push(i+".canceled")}),n.on(r,uN,function(i){this._active&&(dN(i)||this.setActive(null))},this)};function dN(e){var t=e.originalEvent&&e.originalEvent.target;return t&&jr(t,'.group[data-group="tools"]')}const Mc={__depends__:[_r],__init__:["toolManager"],toolManager:["type",zi]};function fN(e,t){if(e==="x"){if(t>0)return"e";if(t<0)return"w"}if(e==="y"){if(t>0)return"s";if(t<0)return"n"}return null}function pN(e,t){var n=[];return N(e.concat(t),function(r){var i=r.incoming,o=r.outgoing;N(i.concat(o),function(a){var s=a.source,l=a.target;(qa(e,s)||qa(e,l)||qa(t,s)||qa(t,l))&&(qa(n,a)||n.push(a))})}),n}function qa(e,t){return e.indexOf(t)!==-1}function hN(e,t,n){var r=e.x,i=e.y,o=e.width,a=e.height,s=n.x,l=n.y;switch(t){case"n":return{x:r,y:i+l,width:o,height:a-l};case"s":return{x:r,y:i,width:o,height:a+l};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 Xp=Math.abs,mN=Math.round,Er={x:"width",y:"height"},qx="crosshair",ii={n:"top",w:"left",s:"bottom",e:"right"},gN=1500,Ic={n:"s",w:"e",s:"n",e:"w"},Dc=20;function yn(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(l){n.once("spaceTool.selection.ended",function(){s.activateMakeSpace(l.originalEvent)})}),n.on("spaceTool.move",gN,function(l){var c=l.context,u=c.initialized;u||(u=c.initialized=s.init(l,c)),u&&Yx(l)}),n.on("spaceTool.end",function(l){var c=l.context,u=c.axis,d=c.direction,f=c.movingShapes,p=c.resizingShapes,m=c.start;if(c.initialized){Yx(l);var v={x:0,y:0};v[u]=mN(l["d"+u]),s.makeSpace(f,p,v,d,m),n.once("spaceTool.ended",function(g){s.activateSelection(g.originalEvent,!0,!0)})}})}yn.$inject=["canvas","dragging","eventBus","modeling","rules","toolManager","mouse"],yn.prototype.activateSelection=function(e,t,n){this._dragging.init(e,"spaceTool.selection",{autoActivate:t,cursor:qx,data:{context:{reactivate:n}},trapClick:!1})},yn.prototype.activateMakeSpace=function(e){this._dragging.init(e,"spaceTool",{autoActivate:!0,cursor:qx,data:{context:{}}})},yn.prototype.makeSpace=function(e,t,n,r,i){return this._modeling.createSpace(e,t,n,r,i)},yn.prototype.init=function(e,t){var n=Xp(e.dx)>Xp(e.dy)?"x":"y",r=e["d"+n],i=e[n]-r;if(Xp(r)<5)return!1;r<0&&(r*=-1),Ra(e)&&(r*=-1);var o=fN(n,r),a=this._canvas.getRootElement();!Ll(e)&&e.hover&&(a=e.hover);var s=[...ha(a,!0),...a.attachers||[]],l=this.calculateAdjustments(s,n,r,i),c=this._eventBus.fire("spaceTool.getMinDimensions",{axis:n,direction:o,shapes:l.resizingShapes,start:i}),u=vN(l,n,o,i,c);return j(t,l,{axis:n,direction:o,spaceToolConstraints:u,start:i}),Vl("resize-"+(n==="x"?"ew":"ns")),!0},yn.prototype.calculateAdjustments=function(e,t,n,r){var i=this._rules,o=[],a=[],s=[],l=[];function c(f){o.includes(f)||o.push(f);var p=f.label;p&&!o.includes(p)&&o.push(p)}function u(f){a.includes(f)||a.push(f)}N(e,function(f){if(!(!f.parent||Te(f))){if(Be(f)){l.push(f);return}var p=f[t],m=p+f[Er[t]];if(yN(f)&&(n>0&&fe(f)[t]>r||n<0&&fe(f)[t]<r)){s.push(f);return}if(n>0&&p>r||n<0&&m<r){c(f);return}if(p<r&&m>r&&i.allowed("shape.resize",{shape:f})){u(f);return}}}),N(o,function(f){var p=f.attachers;p&&N(p,function(m){c(m)})});var d=o.concat(a);return N(s,function(f){var p=f.host;Vi(d,p)&&c(f)}),d=o.concat(a),N(l,function(f){var p=f.source,m=f.target,v=f.label;Vi(d,p)&&Vi(d,m)&&v&&c(v)}),{movingShapes:o,resizingShapes:a}},yn.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateSelection(e,!!e)},yn.prototype.isActive=function(){var e=this._dragging.context();return e?/^spaceTool/.test(e.prefix):!1};function Kx(e){return{top:e.top-Dc,right:e.right+Dc,bottom:e.bottom+Dc,left:e.left-Dc}}function Yx(e){var t=e.context,n=t.spaceToolConstraints;if(n){var r,i;de(n.left)&&(r=Math.max(e.x,n.left),e.dx=e.dx+r-e.x,e.x=r),de(n.right)&&(r=Math.min(e.x,n.right),e.dx=e.dx+r-e.x,e.x=r),de(n.top)&&(i=Math.max(e.y,n.top),e.dy=e.dy+i-e.y,e.y=i),de(n.bottom)&&(i=Math.min(e.y,n.bottom),e.dy=e.dy+i-e.y,e.y=i)}}function vN(e,t,n,r,i){var o=e.movingShapes,a=e.resizingShapes;if(a.length){var s={},l,c;return N(a,function(u){var d=u.attachers,f=u.children,p=ce(u),m=_e(f,function(R){return!Be(R)&&!Te(R)&&!Vi(o,R)&&!Vi(a,R)}),v=_e(f,function(R){return!Be(R)&&!Te(R)&&Vi(o,R)}),g,x,w,b=[],y=[],_,S,C,$;m.length&&(x=Kx(ce(st(m))),g=r-p[ii[n]]+x[ii[n]],n==="n"?s.bottom=c=de(c)?Math.min(c,g):g:n==="w"?s.right=c=de(c)?Math.min(c,g):g:n==="s"?s.top=l=de(l)?Math.max(l,g):g:n==="e"&&(s.left=l=de(l)?Math.max(l,g):g)),v.length&&(w=Kx(ce(st(v))),g=r-w[ii[Ic[n]]]+p[ii[Ic[n]]],n==="n"?s.bottom=c=de(c)?Math.min(c,g):g:n==="w"?s.right=c=de(c)?Math.min(c,g):g:n==="s"?s.top=l=de(l)?Math.max(l,g):g:n==="e"&&(s.left=l=de(l)?Math.max(l,g):g)),d&&d.length&&(d.forEach(function(R){Vi(o,R)?b.push(R):y.push(R)}),b.length&&(_=ce(st(b.map(fe))),S=p[ii[Ic[n]]]-(_[ii[Ic[n]]]-r)),y.length&&(C=ce(st(y.map(fe))),$=C[ii[n]]-(p[ii[n]]-r)),n==="n"?(g=Math.min(S||1/0,$||1/0),s.bottom=c=de(c)?Math.min(c,g):g):n==="w"?(g=Math.min(S||1/0,$||1/0),s.right=c=de(c)?Math.min(c,g):g):n==="s"?(g=Math.max(S||-1/0,$||-1/0),s.top=l=de(l)?Math.max(l,g):g):n==="e"&&(g=Math.max(S||-1/0,$||-1/0),s.left=l=de(l)?Math.max(l,g):g));var M=i&&i[u.id];M&&(n==="n"?(g=r+u[Er[t]]-M[Er[t]],s.bottom=c=de(c)?Math.min(c,g):g):n==="w"?(g=r+u[Er[t]]-M[Er[t]],s.right=c=de(c)?Math.min(c,g):g):n==="s"?(g=r-u[Er[t]]+M[Er[t]],s.top=l=de(l)?Math.max(l,g):g):n==="e"&&(g=r-u[Er[t]]+M[Er[t]],s.left=l=de(l)?Math.max(l,g):g))}),s}}function Vi(e,t){return e.indexOf(t)!==-1}function yN(e){return!!e.host}var Zp="djs-dragging",Xx="djs-resizing",bN=250,Nc=Math.max;function Zx(e,t,n,r,i){function o(a,s){N(a,function(l){i.addDragger(l,s),n.addMarker(l,Zp)})}e.on("spaceTool.selection.start",function(a){var s=n.getLayer("space"),l=a.context,c={x:"M 0,-10000 L 0,10000",y:"M -10000,0 L 10000,0"},u=le("g");ee(u,r.cls("djs-crosshair-group",["no-events"])),pe(s,u);var d=le("path");ee(d,"d",c.x),Ce(d).add("djs-crosshair"),pe(u,d);var f=le("path");ee(f,"d",c.y),Ce(f).add("djs-crosshair"),pe(u,f),l.crosshairGroup=u}),e.on("spaceTool.selection.move",function(a){var s=a.context.crosshairGroup;gt(s,a.x,a.y)}),e.on("spaceTool.selection.cleanup",function(a){var s=a.context,l=s.crosshairGroup;l&&it(l)}),e.on("spaceTool.move",bN,function(a){var s=a.context,l=s.line,c=s.axis,u=s.movingShapes,d=s.resizingShapes;if(s.initialized){if(!s.dragGroup){var f=n.getLayer("space");l=le("path"),ee(l,"d","M0,0 L0,0"),Ce(l).add("djs-crosshair"),pe(f,l),s.line=l;var p=le("g");ee(p,r.cls("djs-drag-group",["no-events"])),pe(n.getActiveLayer(),p),o(u,p);var m=s.movingConnections=t.filter(function(y){var _=!1;N(u,function(M){N(M.outgoing,function(R){y===R&&(_=!0)})});var S=!1;N(u,function(M){N(M.incoming,function(R){y===R&&(S=!0)})});var C=!1;N(d,function(M){N(M.outgoing,function(R){y===R&&(C=!0)})});var $=!1;return N(d,function(M){N(M.incoming,function(R){y===R&&($=!0)})}),Be(y)&&(_||C)&&(S||$)});o(m,p),s.dragGroup=p}if(!s.frameGroup){var v=le("g");ee(v,r.cls("djs-frame-group",["no-events"])),pe(n.getActiveLayer(),v);var g=[];N(d,function(y){var _=i.addFrame(y,v),S=_.getBBox();g.push({element:_,initialBounds:S}),n.addMarker(y,Xx)}),s.frameGroup=v,s.frames=g}var x={x:"M"+a.x+", -10000 L"+a.x+", 10000",y:"M -10000, "+a.y+" L 10000, "+a.y};ee(l,{d:x[c]});var w={x:"y",y:"x"},b={x:a.dx,y:a.dy};b[w[s.axis]]=0,gt(s.dragGroup,b.x,b.y),N(s.frames,function(y){var _=y.element,S=y.initialBounds,C,$;s.direction==="e"?ee(_,{width:Nc(S.width+b.x,5)}):(C=Nc(S.width-b.x,5),ee(_,{width:C,x:S.x+S.width-C})),s.direction==="s"?ee(_,{height:Nc(S.height+b.y,5)}):($=Nc(S.height-b.y,5),ee(_,{height:$,y:S.y+S.height-$}))})}}),e.on("spaceTool.cleanup",function(a){var s=a.context,l=s.movingShapes,c=s.movingConnections,u=s.resizingShapes,d=s.line,f=s.dragGroup,p=s.frameGroup;N(l,function(m){n.removeMarker(m,Zp)}),N(c,function(m){n.removeMarker(m,Zp)}),f&&(it(d),it(f)),N(u,function(m){n.removeMarker(m,Xx)}),p&&it(p)})}Zx.$inject=["eventBus","elementRegistry","canvas","styles","previewSupport"];const xN={__init__:["spaceToolPreview"],__depends__:[_r,tr,Mc,Do,Ga],spaceTool:["type",yn],spaceToolPreview:["type",Zx]};function Bc(e){e.invoke(yn,this)}Bc.$inject=["injector"],ie(Bc,yn),Bc.prototype.calculateAdjustments=function(e,t,n,r){var i=yn.prototype.calculateAdjustments.call(this,e,t,n,r);return i.resizingShapes=i.resizingShapes.filter(function(o){return!(P(o,"bpmn:TextAnnotation")||_N(o)&&(t==="y"&<(o)||t==="x"&&!lt(o)))}),i};function _N(e){return P(e,"bpmn:Participant")&&!Q(e).processRef}const Qx={__depends__:[xN],spaceTool:["type",Bc]};function Ve(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)}Ve.$inject=["eventBus","injector"],Ve.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()},Ve.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},Ve.prototype.clear=function(e){this._stack.length=0,this._stackIdx=-1,e!==!1&&this._fire("changed",{trigger:"clear"})},Ve.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()}},Ve.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()}},Ve.prototype.register=function(e,t){this._setHandler(e,t)},Ve.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)},Ve.prototype.canUndo=function(){return!!this._getUndoAction()},Ve.prototype.canRedo=function(){return!!this._getRedoAction()},Ve.prototype._getRedoAction=function(){return this._stack[this._stackIdx+1]},Ve.prototype._getUndoAction=function(){return this._stack[this._stackIdx]},Ve.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)})},Ve.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},Ve.prototype._createId=function(){return this._uid++},Ve.prototype._atomicDo=function(e){const t=this._currentExecution;t.atomic=!0;try{e()}finally{t.atomic=!1}},Ve.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()},Ve.prototype._pushAction=function(e){const t=this._currentExecution,n=t.actions,r=n[0];if(t.atomic)throw new Error("illegal invocation in <execute> or <revert> phase (action: "+e.command+")");e.id||(e.id=r&&r.id||this._createId()),n.push(e)},Ve.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:Kg("id",r.reverse())}),r.length=0,this._fire("changed",{trigger:t}),e.trigger=null)},Ve.prototype._markDirty=function(e){const t=this._currentExecution;e&&(e=me(e)?e:[e],t.dirty=t.dirty.concat(e))},Ve.prototype._executedAction=function(e,t){const n=++this._stackIdx;t||this._stack.splice(n,this._stack.length,e)},Ve.prototype._revertedAction=function(e){this._stackIdx--},Ve.prototype._getHandler=function(e){return this._handlerMap[e]},Ve.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",Ve]};function oi(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 EN=250,Jx=1400;function Qp(e,t,n){K.call(this,t);var r=e.get("movePreview",!1);t.on("shape.move.start",Jx,function(i){var o=i.context,a=o.shapes,s=o.validatedShapes;o.shapes=e_(a),o.validatedShapes=e_(s)}),r&&t.on("shape.move.start",EN,function(i){var o=i.context,a=o.shapes,s=[];N(a,function(l){N(l.labels,function(c){!c.hidden&&o.shapes.indexOf(c)===-1&&s.push(c),l.labelTarget&&s.push(l)})}),N(s,function(l){r.makeDraggable(o,l,!0)})}),this.preExecuted("elements.move",Jx,function(i){var o=i.context,a=o.closure,s=a.enclosedElements,l=[];N(s,function(c){N(c.labels,function(u){s[u.id]||l.push(u)})}),a.addAll(l)}),this.preExecute(["connection.delete","shape.delete"],function(i){var o=i.context,a=o.connection||o.shape;oi(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=Vd(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,l=o.labelTargetIndex;s&&(ot(s.labels,a,l),a.labelTarget=s)})}ie(Qp,K),Qp.$inject=["injector","eventBus","modeling"];function e_(e){return _e(e,function(t){return e.indexOf(t.labelTarget)===-1})}const SN={__init__:["labelSupport"],labelSupport:["type",Qp]};var CN=251,t_=1401,n_="attach-ok";function Jp(e,t,n,r,i){K.call(this,t);var o=e.get("movePreview",!1);t.on("shape.move.start",t_,function(a){var s=a.context,l=s.shapes,c=s.validatedShapes;s.shapes=TN(l),s.validatedShapes=PN(c)}),o&&t.on("shape.move.start",CN,function(a){var s=a.context,l=s.shapes,c=eh(l);N(c,function(u){o.makeDraggable(s,u,!0),N(u.labels,function(d){o.makeDraggable(s,d,!0)})})}),o&&t.on("shape.move.start",function(a){var s=a.context,l=s.shapes;if(l.length===1){var c=l[0],u=c.host;u&&(n.addMarker(u,n_),t.once(["shape.move.out","shape.move.cleanup"],function(){n.removeMarker(u,n_)}))}}),this.preExecuted("elements.move",t_,function(a){var s=a.context,l=s.closure,c=s.shapes,u=eh(c);N(u,function(d){l.add(d,l.topLevel[d.host.id])})}),this.postExecuted("elements.move",function(a){var s=a.context,l=s.shapes,c=s.newHost,u;c&&l.length!==1||(c?u=l:u=_e(l,function(d){var f=d.host;return $N(d)&&!RN(l,f)}),N(u,function(d){i.updateAttachment(d,c)}))}),this.postExecuted("elements.move",function(a){var s=a.context.shapes;N(s,function(l){N(l.attachers,function(c){N(c.outgoing.slice(),function(u){var d=r.allowed("connection.reconnect",{connection:u,source:u.source,target:u.target});d||i.removeConnection(u)}),N(c.incoming.slice(),function(u){var d=r.allowed("connection.reconnect",{connection:u,source:u.source,target:u.target});d||i.removeConnection(u)})})})}),this.postExecute("shape.create",function(a){var s=a.context,l=s.shape,c=s.host;c&&i.updateAttachment(l,c)}),this.postExecute("shape.replace",function(a){var s=a.context,l=s.oldShape,c=s.newShape;oi(l.attachers,function(u){var d=r.allowed("elements.move",{target:c,shapes:[u]});d==="attach"?i.updateAttachment(u,c):i.removeShape(u)}),c.attachers.length&&N(c.attachers,function(u){var d=K0(u,l,c);i.moveShape(u,d,u.parent)})}),this.postExecute("shape.resize",function(a){var s=a.context,l=s.shape,c=s.oldBounds,u=s.newBounds,d=l.attachers,f=s.hints||{};f.attachSupport!==!1&&N(d,function(p){var m=K0(p,c,u);i.moveShape(p,m,p.parent),N(p.labels,function(v){i.moveShape(v,m,v.parent)})})}),this.preExecute("shape.delete",function(a){var s=a.context.shape;oi(s.attachers,function(l){i.removeShape(l)}),s.host&&i.updateAttachment(s,null)})}ie(Jp,K),Jp.$inject=["injector","eventBus","canvas","rules","modeling"];function eh(e){return Rd(xt(e,function(t){return t.attachers||[]}))}function TN(e){var t=eh(e);return pP("id",e,t)}function PN(e){var t=fo(e,"id");return _e(e,function(n){for(;n;){if(n.host&&t[n.host.id])return!1;n=n.parent}return!0})}function $N(e){return!!e.host}function RN(e,t){return e.indexOf(t)!==-1}const AN={__depends__:[tr],__init__:["attachSupport"],attachSupport:["type",Jp]};function bn(e){this._model=e}bn.$inject=["moddle"],bn.prototype._needsId=function(e){return be(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"])},bn.prototype._ensureId=function(e){if(e.id){this._model.ids.claim(e.id,e);return}var t;P(e,"bpmn:Activity")?t="Activity":P(e,"bpmn:Event")?t="Event":P(e,"bpmn:Gateway")?t="Gateway":be(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))},bn.prototype.create=function(e,t){var n=this._model.create(e,t||{});return this._ensureId(n),n},bn.prototype.createDiLabel=function(){return this.create("bpmndi:BPMNLabel",{bounds:this.createDiBounds()})},bn.prototype.createDiShape=function(e,t){return this.create("bpmndi:BPMNShape",j({bpmnElement:e,bounds:this.createDiBounds()},t))},bn.prototype.createDiBounds=function(e){return this.create("dc:Bounds",e)},bn.prototype.createDiWaypoints=function(e){var t=this;return xt(e,function(n){return t.createDiWaypoint(n)})},bn.prototype.createDiWaypoint=function(e){return this.create("dc:Point",kn(e,["x","y"]))},bn.prototype.createDiEdge=function(e,t){return this.create("bpmndi:BPMNEdge",j({bpmnElement:e,waypoint:this.createDiWaypoints([])},t))},bn.prototype.createDiPlane=function(e,t){return this.create("bpmndi:BPMNPlane",j({bpmnElement:e},t))};function zt(e,t,n){K.call(this,e),this._bpmnFactory=t;var r=this;function i(p){var m=p.context,v=m.hints||{},g;!m.cropped&&v.createElementsBehavior!==!1&&(g=m.connection,g.waypoints=n.getCroppedWaypoints(g),m.cropped=!0)}this.executed(["connection.layout","connection.create"],i),this.reverted(["connection.layout"],function(p){delete p.context.cropped});function o(p){var m=p.context;r.updateParent(m.shape||m.connection,m.oldParent)}function a(p){var m=p.context,v=m.shape||m.connection,g=m.parent||m.newParent;r.updateParent(v,g)}this.executed(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],Vt(o)),this.reverted(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],Vt(a));function s(p){var m=p.context,v=m.oldRoot,g=v.children;N(g,function(x){P(x,"bpmn:BaseElement")&&r.updateParent(x)})}this.executed(["canvas.updateRoot"],s),this.reverted(["canvas.updateRoot"],s);function l(p){var m=p.context.shape;P(m,"bpmn:BaseElement")&&r.updateBounds(m)}this.executed(["shape.move","shape.create","shape.resize"],Vt(function(p){p.context.shape.type!=="label"&&l(p)})),this.reverted(["shape.move","shape.create","shape.resize"],Vt(function(p){p.context.shape.type!=="label"&&l(p)})),e.on("shape.changed",function(p){p.element.type==="label"&&l({context:{shape:p.element}})});function c(p){r.updateConnection(p.context)}this.executed(["connection.create","connection.move","connection.delete","connection.reconnect"],Vt(c)),this.reverted(["connection.create","connection.move","connection.delete","connection.reconnect"],Vt(c));function u(p){r.updateConnectionWaypoints(p.context.connection)}this.executed(["connection.layout","connection.move","connection.updateWaypoints"],Vt(u)),this.reverted(["connection.layout","connection.move","connection.updateWaypoints"],Vt(u)),this.executed("connection.reconnect",Vt(function(p){var m=p.context,v=m.connection,g=m.oldSource,x=m.newSource,w=Q(v),b=Q(g),y=Q(x);w.conditionExpression&&!be(y,["bpmn:Activity","bpmn:ExclusiveGateway","bpmn:InclusiveGateway"])&&(m.oldConditionExpression=w.conditionExpression,delete w.conditionExpression),g!==x&&b.default===w&&(m.oldDefault=b.default,delete b.default)})),this.reverted("connection.reconnect",Vt(function(p){var m=p.context,v=m.connection,g=m.oldSource,x=m.newSource,w=Q(v),b=Q(g),y=Q(x);m.oldConditionExpression&&(w.conditionExpression=m.oldConditionExpression),m.oldDefault&&(b.default=m.oldDefault,delete y.default)}));function d(p){r.updateAttachment(p.context)}this.executed(["element.updateAttachment"],Vt(d)),this.reverted(["element.updateAttachment"],Vt(d)),this.executed("element.updateLabel",Vt(f)),this.reverted("element.updateLabel",Vt(f));function f(p){const{element:m}=p.context,v=Zt(m),g=Pe(m),x=g&&g.get("label");Mi(m)||Nl(m)||(v&&!x?g.set("label",t.create("bpmndi:BPMNLabel")):!v&&x&&g.set("label",void 0))}}ie(zt,K),zt.$inject=["eventBus","bpmnFactory","connectionDocking"],zt.prototype.updateAttachment=function(e){var t=e.shape,n=t.businessObject,r=t.host;n.attachedToRef=r&&r.businessObject},zt.prototype.updateParent=function(e,t){if(!Te(e)&&!(P(e,"bpmn:DataStoreReference")&&e.parent&&P(e.parent,"bpmn:Collaboration"))){var n=e.parent,r=e.businessObject,i=Pe(e),o=n&&n.businessObject,a=Pe(n);P(e,"bpmn:FlowNode")&&this.updateFlowNodeRefs(r,o,t&&t.businessObject),P(e,"bpmn:DataOutputAssociation")&&(e.source?o=e.source.businessObject:o=null),P(e,"bpmn:DataInputAssociation")&&(e.target?o=e.target.businessObject:o=null),this.updateSemanticParent(r,o),P(e,"bpmn:DataObjectReference")&&r.dataObjectRef&&this.updateSemanticParent(r.dataObjectRef,o),this.updateDiParent(i,a)}},zt.prototype.updateBounds=function(e){var t=Pe(e),n=MN(e);if(n){var r=Ln(n,t.get("bounds"));j(n,{x:e.x+r.x,y:e.y+r.y})}var i=Te(e)?this._getLabel(t):t,o=i.bounds;o||(o=this._bpmnFactory.createDiBounds(),i.set("bounds",o)),j(o,{x:e.x,y:e.y,width:e.width,height:e.height})},zt.prototype.updateFlowNodeRefs=function(e,t,n){if(n!==t){var r,i;P(n,"bpmn:Lane")&&(r=n.get("flowNodeRef"),Xe(r,e)),P(t,"bpmn:Lane")&&(i=t.get("flowNodeRef"),ot(i,e))}},zt.prototype.updateDiConnection=function(e,t,n){var r=Pe(e),i=Pe(t),o=Pe(n);r.sourceElement&&r.sourceElement.bpmnElement!==Q(t)&&(r.sourceElement=t&&i),r.targetElement&&r.targetElement.bpmnElement!==Q(n)&&(r.targetElement=n&&o)},zt.prototype.updateDiParent=function(e,t){if(t&&!P(t,"bpmndi:BPMNPlane")&&(t=t.$parent),e.$parent!==t){var n=(t||e.$parent).get("planeElement");t?(n.push(e),e.$parent=t):(Xe(n,e),e.$parent=null)}};function ON(e){for(;e&&!P(e,"bpmn:Definitions");)e=e.$parent;return e}zt.prototype.getLaneSet=function(e){var t,n;return P(e,"bpmn:Lane")?(t=e.childLaneSet,t||(t=this._bpmnFactory.create("bpmn:LaneSet"),e.childLaneSet=t,t.$parent=e),t):(P(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)},zt.prototype.updateSemanticParent=function(e,t,n){var r;if(e.$parent!==t&&!((P(e,"bpmn:DataInput")||P(e,"bpmn:DataOutput"))&&(P(t,"bpmn:Participant")&&"processRef"in t&&(t=t.processRef),"ioSpecification"in t&&t.ioSpecification===e.$parent))){if(P(e,"bpmn:Lane"))t&&(t=this.getLaneSet(t)),r="lanes";else if(P(e,"bpmn:FlowElement")){if(t){if(P(t,"bpmn:Participant"))t=t.processRef;else if(P(t,"bpmn:Lane"))do t=t.$parent.$parent;while(P(t,"bpmn:Lane"))}r="flowElements"}else if(P(e,"bpmn:Artifact")){for(;t&&!P(t,"bpmn:Process")&&!P(t,"bpmn:SubProcess")&&!P(t,"bpmn:Collaboration");)if(P(t,"bpmn:Participant")){t=t.processRef;break}else t=t.$parent;r="artifacts"}else if(P(e,"bpmn:MessageFlow"))r="messageFlows";else if(P(e,"bpmn:Participant")){r="participants";var i=e.processRef,o;i&&(o=ON(e.$parent||t),e.$parent&&(Xe(o.get("rootElements"),i),i.$parent=null),t&&(ot(o.get("rootElements"),i),i.$parent=o))}else P(e,"bpmn:DataOutputAssociation")?r="dataOutputAssociations":P(e,"bpmn:DataInputAssociation")&&(r="dataInputAssociations");if(!r)throw new Error(`no parent for <${e.id}> in <${t.id}>`);var a;if(e.$parent&&(a=e.$parent.get(r),Xe(a,e)),t?(a=t.get(r),a.push(e),e.$parent=t):e.$parent=null,n){var s=n.get(r);Xe(a,e),t&&(s||(s=[],t.set(r,s)),s.push(e))}}},zt.prototype.updateConnectionWaypoints=function(e){var t=Pe(e);t.set("waypoint",this._bpmnFactory.createDiWaypoints(e.waypoints))},zt.prototype.updateConnection=function(e){var t=e.connection,n=Q(t),r=t.source,i=Q(r),o=t.target,a=Q(t.target),s;if(P(n,"bpmn:DataAssociation"))P(n,"bpmn:DataInputAssociation")?(n.get("sourceRef")[0]=i,s=e.parent||e.newParent||a,this.updateSemanticParent(n,a,s)):P(n,"bpmn:DataOutputAssociation")&&(s=e.parent||e.newParent||i,this.updateSemanticParent(n,i,s),n.targetRef=a);else{var l=P(n,"bpmn:SequenceFlow");n.sourceRef!==i&&(l&&(Xe(n.sourceRef&&n.sourceRef.get("outgoing"),n),i&&i.get("outgoing")&&i.get("outgoing").push(n)),n.sourceRef=i),n.targetRef!==a&&(l&&(Xe(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)},zt.prototype._getLabel=function(e){return e.label||(e.label=this._bpmnFactory.createDiLabel()),e.label};function Vt(e){return function(t){var n=t.context,r=n.shape||n.connection||n.element;P(r,"bpmn:BaseElement")&&e(t)}}function MN(e){if(P(e,"bpmn:Activity")){var t=Pe(e);if(t){var n=t.get("label");if(n)return n.get("bounds")}}}function ai(e,t){mr.call(this),this._bpmnFactory=e,this._moddle=t}ie(ai,mr),ai.$inject=["bpmnFactory","moddle"],ai.prototype._baseCreate=mr.prototype.create,ai.prototype.create=function(e,t){if(e==="label"){var n=t.di||this._bpmnFactory.createDiLabel();return this._baseCreate(e,j({type:"label",di:n},Sa,t))}return this.createElement(e,t)},ai.prototype.createElement=function(e,t){t=j({},t||{});var n,r=t.businessObject,i=t.di;if(!r){if(!t.type)throw new Error("no shape type specified");r=this._bpmnFactory.create(t.type),cy(r)}if(!DN(i)){var o=j({},i||{},{id:r.id+"_di"});e==="root"?i=this._bpmnFactory.createDiPlane(r,o):e==="connection"?i=this._bpmnFactory.createDiEdge(r,o):i=this._bpmnFactory.createDiShape(r,o)}P(r,"bpmn:Group")&&(t=j({isFrame:!0},t)),t=IN(r,t,["processRef","isInterrupting","associationDirection","isForCompensation"]),t.isExpanded&&(t=th(i,t,"isExpanded")),be(r,["bpmn:Lane","bpmn:Participant"])&&(t=th(i,t,"isHorizontal")),P(r,"bpmn:SubProcess")&&(t.collapsed=!Se(r,i)),P(r,"bpmn:ExclusiveGateway")&&(It(i,"isMarkerVisible")?i.isMarkerVisible===void 0&&(i.isMarkerVisible=!1):i.isMarkerVisible=!0),ft(t.triggeredByEvent)&&(r.triggeredByEvent=t.triggeredByEvent,delete t.triggeredByEvent),ft(t.cancelActivity)&&(r.cancelActivity=t.cancelActivity,delete t.cancelActivity);var a,s;return t.eventDefinitionType&&(a=r.get("eventDefinitions")||[],s=this._bpmnFactory.create(t.eventDefinitionType,t.eventDefinitionAttrs),t.eventDefinitionType==="bpmn:ConditionalEventDefinition"&&(s.condition=this._bpmnFactory.create("bpmn:FormalExpression")),a.push(s),s.$parent=r,r.eventDefinitions=a,delete t.eventDefinitionType),n=this.getDefaultSize(r,i),t=j({id:r.id},n,t,{businessObject:r,di:i}),this._baseCreate(e,t)},ai.prototype.getDefaultSize=function(e,t){var n=Q(e);if(t=t||Pe(e),P(n,"bpmn:SubProcess"))return Se(n,t)?{width:350,height:200}:{width:100,height:80};if(P(n,"bpmn:Task"))return{width:100,height:80};if(P(n,"bpmn:Gateway"))return{width:50,height:50};if(P(n,"bpmn:Event"))return{width:36,height:36};if(P(n,"bpmn:Participant")){var r=t.isHorizontal===void 0||t.isHorizontal===!0;return Se(n,t)?r?{width:600,height:250}:{width:250,height:600}:r?{width:400,height:60}:{width:60,height:400}}return P(n,"bpmn:Lane")?{width:400,height:100}:P(n,"bpmn:DataObjectReference")?{width:36,height:50}:P(n,"bpmn:DataStoreReference")?{width:50,height:50}:P(n,"bpmn:TextAnnotation")?{width:100,height:30}:P(n,"bpmn:Group")?{width:300,height:300}:{width:100,height:80}},ai.prototype.createParticipantShape=function(e){return pt(e)||(e={isExpanded:e}),e=j({type:"bpmn:Participant"},e||{}),e.isExpanded!==!1&&(e.processRef=this._bpmnFactory.create("bpmn:Process")),this.createShape(e)};function IN(e,t,n){return N(n,function(r){t=th(e,t,r)}),t}function th(e,t,n){return t[n]===void 0?t:(e[n]=t[n],un(t,[n]))}function DN(e){return be(e,["bpmndi:BPMNShape","bpmndi:BPMNEdge","bpmndi:BPMNDiagram","bpmndi:BPMNPlane"])}function kc(e,t){this._modeling=e,this._canvas=t}kc.$inject=["modeling","canvas"],kc.prototype.preExecute=function(e){var t=this._modeling,n=e.elements,r=e.alignment;N(n,function(i){var o={x:0,y:0};ft(r.left)?o.x=r.left-i.x:ft(r.right)?o.x=r.right-i.width-i.x:ft(r.center)?o.x=r.center-Math.round(i.width/2)-i.x:ft(r.top)?o.y=r.top-i.y:ft(r.bottom)?o.y=r.bottom-i.height-i.y:ft(r.middle)&&(o.y=r.middle-Math.round(i.height/2)-i.y),t.moveElements([i],o,i.parent)})},kc.prototype.postExecute=function(e){};function Lc(e){this._modeling=e}Lc.$inject=["modeling"],Lc.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},Lc.prototype.postExecute=function(e){var t=e.hints||{};NN(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 NN(e,t){return kr(e.outgoing,function(n){return n.target===t})}function jc(e,t){this._canvas=e,this._layouter=t}jc.$inject=["canvas","layouter"],jc.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},jc.prototype.revert=function(e){var t=e.connection;return this._canvas.removeConnection(t),t.source=null,t.target=null,t};var Fc=Math.round;function nh(e){this._modeling=e}nh.$inject=["modeling"],nh.prototype.preExecute=function(e){var t=e.elements,n=e.parent,r=e.parentIndex,i=e.position,o=e.hints,a=this._modeling;N(t,function(d){de(d.x)||(d.x=0),de(d.y)||(d.y=0)});var s=_e(t,function(d){return!d.hidden}),l=st(s);N(t,function(d){Be(d)&&(d.waypoints=xt(d.waypoints,function(f){return{x:Fc(f.x-l.x-l.width/2+i.x),y:Fc(f.y-l.y-l.height/2+i.y)}})),j(d,{x:Fc(d.x-l.x-l.width/2+i.x),y:Fc(d.y-l.y-l.height/2+i.y)})});var c=fl(t),u={};N(t,function(d){if(Be(d)){u[d.id]=de(r)?a.createConnection(u[d.source.id],u[d.target.id],r,d,d.parent||n,o):a.createConnection(u[d.source.id],u[d.target.id],d,d.parent||n,o);return}var f=j({},o);c.indexOf(d)===-1&&(f.autoResize=!1),Te(d)&&(f=un(f,["attach"])),u[d.id]=de(r)?a.createShape(d,kn(d,["x","y","width","height"]),d.parent||n,r,f):a.createShape(d,kn(d,["x","y","width","height"]),d.parent||n,f)}),e.elements=Ad(u)};var r_=Math.round;function si(e){this._canvas=e}si.$inject=["canvas"],si.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?j(t,n):j(t,{x:n.x-r_(t.width/2),y:n.y-r_(t.height/2)}),this._canvas.addShape(t,r,i),t},si.prototype.revert=function(e){var t=e.shape;return this._canvas.removeShape(t),t};function Ka(e){si.call(this,e)}ie(Ka,si),Ka.$inject=["canvas"];var BN=si.prototype.execute;Ka.prototype.execute=function(e){var t=e.shape;return LN(t),t.labelTarget=e.labelTarget,BN.call(this,e)};var kN=si.prototype.revert;Ka.prototype.revert=function(e){return e.shape.labelTarget=null,kN.call(this,e)};function LN(e){["width","height"].forEach(function(t){typeof e[t]>"u"&&(e[t]=0)})}function Ya(e,t){this._canvas=e,this._modeling=t}Ya.$inject=["canvas","modeling"],Ya.prototype.preExecute=function(e){var t=this._modeling,n=e.connection;oi(n.incoming,function(r){t.removeConnection(r,{nested:!0})}),oi(n.outgoing,function(r){t.removeConnection(r,{nested:!0})})},Ya.prototype.execute=function(e){var t=e.connection,n=t.parent;return e.parent=n,e.parentIndex=Vd(n.children,t),e.source=t.source,e.target=t.target,this._canvas.removeConnection(t),t.source=null,t.target=null,t},Ya.prototype.revert=function(e){var t=e.connection,n=e.parent,r=e.parentIndex;return t.source=e.source,t.target=e.target,ot(n.children,t,r),this._canvas.addConnection(t,n),t};function rh(e,t){this._modeling=e,this._elementRegistry=t}rh.$inject=["modeling","elementRegistry"],rh.prototype.postExecute=function(e){var t=this._modeling,n=this._elementRegistry,r=e.elements;N(r,function(i){n.get(i.id)&&(i.waypoints?t.removeConnection(i):t.removeShape(i))})};function Xa(e,t){this._canvas=e,this._modeling=t}Xa.$inject=["canvas","modeling"],Xa.prototype.preExecute=function(e){var t=this._modeling,n=e.shape;oi(n.incoming,function(r){t.removeConnection(r,{nested:!0})}),oi(n.outgoing,function(r){t.removeConnection(r,{nested:!0})}),oi(n.children,function(r){Be(r)?t.removeConnection(r,{nested:!0}):t.removeShape(r,{nested:!0})})},Xa.prototype.execute=function(e){var t=this._canvas,n=e.shape,r=n.parent;return e.oldParent=r,e.oldParentIndex=Vd(r.children,n),t.removeShape(n),n},Xa.prototype.revert=function(e){var t=this._canvas,n=e.shape,r=e.oldParent,i=e.oldParentIndex;return ot(r.children,n,i),t.addShape(n,r),n};function Hc(e){this._modeling=e}Hc.$inject=["modeling"];var i_={x:"y",y:"x"};Hc.prototype.preExecute=function(e){var t=this._modeling,n=e.groups,r=e.axis,i=e.dimension;function o(g,x){g.range.min=Math.min(x[r],g.range.min),g.range.max=Math.max(x[r]+x[i],g.range.max)}function a(g){return g[r]+g[i]/2}function s(g){return g.length-1}function l(g){return g.max-g.min}function c(g,x){var w={y:0};w[r]=g-a(x),w[r]&&(w[i_[r]]=0,t.moveElements([x],w,x.parent))}var u=n[0],d=s(n),f=n[d],p,m,v=0;N(n,function(g,x){var w,b,y;if(g.elements.length<2){x&&x!==n.length-1&&(o(g,g.elements[0]),v+=l(g.range));return}w=qn(g.elements,r),b=w[0],x===d&&(b=w[s(w)]),y=a(b),g.range=null,N(w,function(_){if(c(y,_),g.range===null){g.range={min:_[r],max:_[r]+_[i]};return}o(g,_)}),x&&x!==n.length-1&&(v+=l(g.range))}),m=Math.abs(f.range.min-u.range.max),p=Math.round((m-v)/(n.length-1)),!(p<n.length-1)&&N(n,function(g,x){var w={},b;g===u||g===f||(b=n[x-1],g.range.max=0,N(g.elements,function(y,_){w[i_[r]]=0,w[r]=b.range.max-y[r]+p,g.range.min!==y[r]&&(w[r]+=y[r]-g.range.min),w[r]&&t.moveElements([y],w,y.parent),g.range.max=Math.max(y[r]+y[i],_?g.range.max:0)}))})},Hc.prototype.postExecute=function(e){};function zc(e,t){this._layouter=e,this._canvas=t}zc.$inject=["layouter","canvas"],zc.prototype.execute=function(e){var t=e.connection,n=t.waypoints;return j(e,{oldWaypoints:n}),t.waypoints=this._layouter.layoutConnection(t,e.hints),t},zc.prototype.revert=function(e){var t=e.connection;return t.waypoints=e.oldWaypoints,t};function ih(){}ih.prototype.execute=function(e){var t=e.connection,n=e.delta,r=e.newParent||t.parent,i=e.newParentIndex,o=t.parent;return e.oldParent=o,e.oldParentIndex=Xe(o.children,t),ot(r.children,t,i),t.parent=r,N(t.waypoints,function(a){a.x+=n.x,a.y+=n.y,a.original&&(a.original.x+=n.x,a.original.y+=n.y)}),t},ih.prototype.revert=function(e){var t=e.connection,n=t.parent,r=e.oldParent,i=e.oldParentIndex,o=e.delta;return Xe(n.children,t),ot(r.children,t,i),t.parent=r,N(t.waypoints,function(a){a.x-=o.x,a.y-=o.y,a.original&&(a.original.x-=o.x,a.original.y-=o.y)}),t};function oh(){this.allShapes={},this.allConnections={},this.enclosedElements={},this.enclosedConnections={},this.topLevel={}}oh.prototype.add=function(e,t){return this.addAll([e],t)},oh.prototype.addAll=function(e,t){var n=r$(e,!!t,this);return j(this,n),this};function Za(e){this._modeling=e}Za.prototype.moveRecursive=function(e,t,n){return e?this.moveClosure(this.getClosure(e),t,n):[]},Za.prototype.moveClosure=function(e,t,n,r,i){var o=this._modeling,a=e.allShapes,s=e.allConnections,l=e.enclosedConnections,c=e.topLevel,u=!1;i&&i.parent===n&&(u=!0),N(a,function(d){o.moveShape(d,t,c[d.id]&&!u&&n,{recurse:!1,layout:!1})}),N(s,function(d){var f=!!a[d.source.id],p=!!a[d.target.id];l[d.id]&&f&&p?o.moveConnection(d,t,c[d.id]&&!u&&n):o.layoutConnection(d,{connectionStart:f&&vp(d,d.source,t),connectionEnd:p&&yp(d,d.target,t)})})},Za.prototype.getClosure=function(e){return new oh().addAll(e,!0)};function Vc(e){this._helper=new Za(e)}Vc.$inject=["modeling"],Vc.prototype.preExecute=function(e){e.closure=this._helper.getClosure(e.shapes)},Vc.prototype.postExecute=function(e){var t=e.hints,n;t&&t.primaryShape&&(n=t.primaryShape,t.oldParent=n.parent),this._helper.moveClosure(e.closure,e.delta,e.newParent,e.newHost,n)};function Wi(e){this._modeling=e,this._helper=new Za(e)}Wi.$inject=["modeling"],Wi.prototype.execute=function(e){var t=e.shape,n=e.delta,r=e.newParent||t.parent,i=e.newParentIndex,o=t.parent;return e.oldBounds=kn(t,["x","y","width","height"]),e.oldParent=o,e.oldParentIndex=Xe(o.children,t),ot(r.children,t,i),j(t,{parent:r,x:t.x+n.x,y:t.y+n.y}),t},Wi.prototype.postExecute=function(e){var t=e.shape,n=e.delta,r=e.hints,i=this._modeling;r.layout!==!1&&(N(t.incoming,function(o){i.layoutConnection(o,{connectionEnd:yp(o,t,n)})}),N(t.outgoing,function(o){i.layoutConnection(o,{connectionStart:vp(o,t,n)})})),r.recurse!==!1&&this.moveChildren(e)},Wi.prototype.revert=function(e){var t=e.shape,n=e.oldParent,r=e.oldParentIndex,i=e.delta;return ot(n.children,t,r),j(t,{parent:n,x:t.x-i.x,y:t.y-i.y}),t},Wi.prototype.moveChildren=function(e){var t=e.delta,n=e.shape;this._helper.moveRecursive(n.children,t,null)},Wi.prototype.getNewParent=function(e){return e.newParent||e.shape.parent};function Qa(e){this._modeling=e}Qa.$inject=["modeling"],Qa.prototype.execute=function(e){var t=e.newSource,n=e.newTarget,r=e.connection,i=e.dockingOrPoints;if(!t&&!n)throw new Error("newSource or newTarget required");return me(i)&&(e.oldWaypoints=r.waypoints,r.waypoints=i),t&&(e.oldSource=r.source,r.source=t),n&&(e.oldTarget=r.target,r.target=n),r},Qa.prototype.postExecute=function(e){var t=e.connection,n=e.newSource,r=e.newTarget,i=e.dockingOrPoints,o=e.hints||{},a={};o.connectionStart&&(a.connectionStart=o.connectionStart),o.connectionEnd&&(a.connectionEnd=o.connectionEnd),o.layoutConnection!==!1&&(n&&(!r||o.docking==="source")&&(a.connectionStart=a.connectionStart||o_(me(i)?i[0]:i)),r&&(!n||o.docking==="target")&&(a.connectionEnd=a.connectionEnd||o_(me(i)?i[i.length-1]:i)),o.newWaypoints&&(a.waypoints=o.newWaypoints),this._modeling.layoutConnection(t,a))},Qa.prototype.revert=function(e){var t=e.oldSource,n=e.oldTarget,r=e.oldWaypoints,i=e.connection;return t&&(i.source=t),n&&(i.target=n),r&&(i.waypoints=r),i};function o_(e){return e.original||e}function Sr(e,t){this._modeling=e,this._rules=t}Sr.$inject=["modeling","rules"],Sr.prototype.preExecute=function(e){var t=this,n=this._modeling,r=this._rules,i=e.oldShape,o=e.newData,a=e.hints||{},s;function l(m,v,g){return r.allowed("connection.reconnect",{connection:g,source:m,target:v})}var c={x:o.x,y:o.y},u={x:i.x,y:i.y,width:i.width,height:i.height};s=e.newShape=e.newShape||t.createShape(o,c,i.parent,a),i.host&&n.updateAttachment(s,i.host);var d;a.moveChildren!==!1&&(d=i.children.slice(),n.moveElements(d,{x:0,y:0},s,a));var f=i.incoming.slice(),p=i.outgoing.slice();N(f,function(m){var v=m.source,g=l(v,s,m);g&&t.reconnectEnd(m,s,_c(m,s,u),a)}),N(p,function(m){var v=m.target,g=l(s,v,m);g&&t.reconnectStart(m,s,xc(m,s,u),a)})},Sr.prototype.postExecute=function(e){var t=e.oldShape;this._modeling.removeShape(t)},Sr.prototype.execute=function(e){},Sr.prototype.revert=function(e){},Sr.prototype.createShape=function(e,t,n,r){return this._modeling.createShape(e,t,n,r)},Sr.prototype.reconnectStart=function(e,t,n,r){this._modeling.reconnectStart(e,t,n,r)},Sr.prototype.reconnectEnd=function(e,t,n,r){this._modeling.reconnectEnd(e,t,n,r)};function Ja(e){this._modeling=e}Ja.$inject=["modeling"],Ja.prototype.execute=function(e){var t=e.shape,n=e.newBounds,r=e.minBounds;if(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)throw new Error("newBounds must have {x, y, width, height} properties");if(r&&(n.width<r.width||n.height<r.height))throw new Error("width and height cannot be less than minimum height and width");if(!r&&n.width<10||n.height<10)throw new Error("width and height cannot be less than 10px");return e.oldBounds={width:t.width,height:t.height,x:t.x,y:t.y},j(t,{width:n.width,height:n.height,x:n.x,y:n.y}),t},Ja.prototype.postExecute=function(e){var t=this._modeling,n=e.shape,r=e.oldBounds,i=e.hints||{};i.layout!==!1&&(N(n.incoming,function(o){t.layoutConnection(o,{connectionEnd:_c(o,n,r)})}),N(n.outgoing,function(o){t.layoutConnection(o,{connectionStart:xc(o,n,r)})}))},Ja.prototype.revert=function(e){var t=e.shape,n=e.oldBounds;return j(t,{width:n.width,height:n.height,x:n.x,y:n.y}),t};function li(e){this._modeling=e}li.$inject=["modeling"],li.prototype.preExecute=function(e){var t=e.delta,n=e.direction,r=e.movingShapes,i=e.resizingShapes,o=e.start,a={};this.moveShapes(r,t),N(i,function(s){a[s.id]=FN(s)}),this.resizeShapes(i,t,n),this.updateConnectionWaypoints(pN(r,i),t,n,o,r,i,a)},li.prototype.execute=function(){},li.prototype.revert=function(){},li.prototype.moveShapes=function(e,t){var n=this;N(e,function(r){n._modeling.moveShape(r,t,null,{autoResize:!1,layout:!1,recurse:!1})})},li.prototype.resizeShapes=function(e,t,n){var r=this;N(e,function(i){var o=hN(i,n,t);r._modeling.resizeShape(i,o,null,{attachSupport:!1,autoResize:!1,layout:!1})})},li.prototype.updateConnectionWaypoints=function(e,t,n,r,i,o,a){var s=this,l=i.concat(o);N(e,function(c){var u=c.source,d=c.target,f=jN(c),p=s_(n),m={};ci(l,u)&&ci(l,d)?(f=xt(f,function(v){return l_(v,r,n)&&(v[p]=v[p]+t[p]),v.original&&l_(v.original,r,n)&&(v.original[p]=v.original[p]+t[p]),v}),s._modeling.updateWaypoints(c,f,{labelBehavior:!1})):(ci(l,u)||ci(l,d))&&(ci(i,u)?m.connectionStart=vp(c,u,t):ci(i,d)?m.connectionEnd=yp(c,d,t):ci(o,u)?m.connectionStart=xc(c,u,a[u.id]):ci(o,d)&&(m.connectionEnd=_c(c,d,a[d.id])),s._modeling.layoutConnection(c,m))})};function a_(e){return j({},e)}function jN(e){return xt(e.waypoints,function(t){return t=a_(t),t.original&&(t.original=a_(t.original)),t})}function s_(e){switch(e){case"n":return"y";case"w":return"x";case"s":return"y";case"e":return"x"}}function l_(e,t,n){var r=s_(n);if(/e|s/.test(n))return e[r]>t;if(/n|w/.test(n))return e[r]<t}function ci(e,t){return e.indexOf(t)!==-1}function FN(e){return{x:e.x,y:e.y,height:e.height,width:e.width}}function Wc(e){this._modeling=e}Wc.$inject=["modeling"],Wc.prototype.execute=function(e){var t=e.shape,n=t.children;e.oldChildrenVisibility=c_(n),t.collapsed=!t.collapsed;var r=u_(n,t.collapsed);return[t].concat(r)},Wc.prototype.revert=function(e){var t=e.shape,n=e.oldChildrenVisibility,r=t.children,i=d_(r,n);return t.collapsed=!t.collapsed,[t].concat(i)};function c_(e){var t={};return N(e,function(n){t[n.id]=n.hidden,n.children&&(t=j({},t,c_(n.children)))}),t}function u_(e,t){var n=[];return N(e,function(r){r.hidden=t,n=n.concat(r),r.children&&(n=n.concat(u_(r.children,r.collapsed||t)))}),n}function d_(e,t){var n=[];return N(e,function(r){r.hidden=t[r.id],n=n.concat(r),r.children&&(n=n.concat(d_(r.children,t)))}),n}function Gc(e){this._modeling=e}Gc.$inject=["modeling"],Gc.prototype.execute=function(e){var t=e.shape,n=e.newHost,r=t.host;return e.oldHost=r,e.attacherIdx=f_(r,t),p_(n,t),t.host=n,t},Gc.prototype.revert=function(e){var t=e.shape,n=e.newHost,r=e.oldHost,i=e.attacherIdx;return t.host=r,f_(n,t),p_(r,t,i),t};function f_(e,t){return Xe(e&&e.attachers,t)}function p_(e,t,n){if(e){var r=e.attachers;r||(e.attachers=r=[]),ot(r,t,n)}}function ah(){}ah.prototype.execute=function(e){var t=e.connection,n=e.newWaypoints;return e.oldWaypoints=t.waypoints,t.waypoints=n,t},ah.prototype.revert=function(e){var t=e.connection,n=e.oldWaypoints;return t.waypoints=n,t};function De(e,t,n){this._eventBus=e,this._elementFactory=t,this._commandStack=n;var r=this;e.on("diagram.init",function(){r.registerHandlers(n)})}De.$inject=["eventBus","elementFactory","commandStack"],De.prototype.getHandlers=function(){return{"shape.append":Lc,"shape.create":si,"shape.delete":Xa,"shape.move":Wi,"shape.resize":Ja,"shape.replace":Sr,"shape.toggleCollapse":Wc,spaceTool:li,"label.create":Ka,"connection.create":jc,"connection.delete":Ya,"connection.move":ih,"connection.layout":zc,"connection.updateWaypoints":ah,"connection.reconnect":Qa,"elements.create":nh,"elements.move":Vc,"elements.delete":rh,"elements.distribute":Hc,"elements.align":kc,"element.updateAttachment":Gc}},De.prototype.registerHandlers=function(e){N(this.getHandlers(),function(t,n){e.registerHandler(n,t)})},De.prototype.moveShape=function(e,t,n,r,i){typeof r=="object"&&(i=r,r=null);var o={shape:e,delta:t,newParent:n,newParentIndex:r,hints:i||{}};this._commandStack.execute("shape.move",o)},De.prototype.updateAttachment=function(e,t){var n={shape:e,newHost:t};this._commandStack.execute("element.updateAttachment",n)},De.prototype.moveElements=function(e,t,n,r){r=r||{};var i=r.attach,o=n,a;i===!0?(a=n,o=n.parent):i===!1&&(a=null);var s={shapes:e,delta:t,newParent:o,newHost:a,hints:r};this._commandStack.execute("elements.move",s)},De.prototype.moveConnection=function(e,t,n,r,i){typeof r=="object"&&(i=r,r=void 0);var o={connection:e,delta:t,newParent:n,newParentIndex:r,hints:i||{}};this._commandStack.execute("connection.move",o)},De.prototype.layoutConnection=function(e,t){var n={connection:e,hints:t||{}};this._commandStack.execute("connection.layout",n)},De.prototype.createConnection=function(e,t,n,r,i,o){typeof n=="object"&&(o=i,i=r,r=n,n=void 0),r=this._create("connection",r);var a={source:e,target:t,parent:i,parentIndex:n,connection:r,hints:o};return this._commandStack.execute("connection.create",a),a.connection},De.prototype.createShape=function(e,t,n,r,i){typeof r!="number"&&(i=r,r=void 0),i=i||{};var o=i.attach,a,s;e=this._create("shape",e),o?(a=n.parent,s=n):a=n;var l={position:t,shape:e,parent:a,parentIndex:r,host:s,hints:i};return this._commandStack.execute("shape.create",l),l.shape},De.prototype.createElements=function(e,t,n,r,i){me(e)||(e=[e]),typeof r!="number"&&(i=r,r=void 0),i=i||{};var o={position:t,elements:e,parent:n,parentIndex:r,hints:i};return this._commandStack.execute("elements.create",o),o.elements},De.prototype.createLabel=function(e,t,n,r){n=this._create("label",n);var i={labelTarget:e,position:t,parent:r||e.parent,shape:n};return this._commandStack.execute("label.create",i),i.shape},De.prototype.appendShape=function(e,t,n,r,i){i=i||{},t=this._create("shape",t);var o={source:e,position:n,target:r,shape:t,connection:i.connection,connectionParent:i.connectionParent,hints:i};return this._commandStack.execute("shape.append",o),o.shape},De.prototype.removeElements=function(e){var t={elements:e};this._commandStack.execute("elements.delete",t)},De.prototype.distributeElements=function(e,t,n){var r={groups:e,axis:t,dimension:n};this._commandStack.execute("elements.distribute",r)},De.prototype.removeShape=function(e,t){var n={shape:e,hints:t||{}};this._commandStack.execute("shape.delete",n)},De.prototype.removeConnection=function(e,t){var n={connection:e,hints:t||{}};this._commandStack.execute("connection.delete",n)},De.prototype.replaceShape=function(e,t,n){var r={oldShape:e,newData:t,hints:n||{}};return this._commandStack.execute("shape.replace",r),r.newShape},De.prototype.alignElements=function(e,t){var n={elements:e,alignment:t};this._commandStack.execute("elements.align",n)},De.prototype.resizeShape=function(e,t,n,r){var i={shape:e,newBounds:t,minBounds:n,hints:r};this._commandStack.execute("shape.resize",i)},De.prototype.createSpace=function(e,t,n,r,i){var o={delta:n,direction:r,movingShapes:e,resizingShapes:t,start:i};this._commandStack.execute("spaceTool",o)},De.prototype.updateWaypoints=function(e,t,n){var r={connection:e,newWaypoints:t,hints:n||{}};this._commandStack.execute("connection.updateWaypoints",r)},De.prototype.reconnect=function(e,t,n,r,i){var o={connection:e,newSource:t,newTarget:n,dockingOrPoints:r,hints:i||{}};this._commandStack.execute("connection.reconnect",o)},De.prototype.reconnectStart=function(e,t,n,r){r||(r={}),this.reconnect(e,t,e.target,n,j(r,{docking:"source"}))},De.prototype.reconnectEnd=function(e,t,n,r){r||(r={}),this.reconnect(e,e.source,t,n,j(r,{docking:"target"}))},De.prototype.connect=function(e,t,n,r){return this.createConnection(e,t,n||{},e.parent,r)},De.prototype._create=function(e,t){return k$(t)?t:this._elementFactory.create(e,t)},De.prototype.toggleCollapse=function(e,t){var n={shape:e,hints:t||{}};this._commandStack.execute("shape.toggleCollapse",n)};function es(e){this._elementRegistry=e}es.$inject=["elementRegistry"],es.prototype.execute=function(e){var t=e.element,n=e.moddleElement,r=e.properties;if(!n)throw new Error("<moddleElement> required");var i=e.changed||this._getVisualReferences(n).concat(t),o=e.oldProperties||HN(n,tl(r));return h_(n,r),e.oldProperties=o,e.changed=i,i},es.prototype.revert=function(e){var t=e.oldProperties,n=e.moddleElement,r=e.changed;return h_(n,t),r},es.prototype._getVisualReferences=function(e){var t=this._elementRegistry;return P(e,"bpmn:DataObject")?zN(e,t):[]};function HN(e,t){return Lt(t,function(n,r){return n[r]=e.get(r),n},{})}function h_(e,t){N(t,function(n,r){e.set(r,n)})}function zN(e,t){return t.filter(function(n){return P(n,"bpmn:DataObjectReference")&&Q(n).dataObjectRef===e})}var ts="default",Cr="id",m_="di",VN={width:0,height:0};function ns(e,t,n,r){this._elementRegistry=e,this._moddle=t,this._modeling=n,this._textRenderer=r}ns.$inject=["elementRegistry","moddle","modeling","textRenderer"],ns.prototype.execute=function(e){var t=e.element,n=[t];if(!t)throw new Error("element required");var r=this._elementRegistry,i=this._moddle.ids,o=t.businessObject,a=KN(e.properties),s=e.oldProperties||WN(t,a);return g_(a,o)&&(i.unclaim(o[Cr]),r.updateId(t,a[Cr]),i.claim(a[Cr],o)),ts in a&&(a[ts]&&n.push(r.get(a[ts].id)),o[ts]&&n.push(r.get(o[ts].id))),v_(t,a),e.oldProperties=s,e.changed=n,n},ns.prototype.postExecute=function(e){var t=e.element,n=t.label,r=n&&Q(n).name;if(r){var i=this._textRenderer.getExternalLabelBounds(n,r);this._modeling.resizeShape(n,i,VN)}},ns.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 v_(t,r),g_(n,i)&&(a.unclaim(n[Cr]),o.updateId(t,r[Cr]),a.claim(r[Cr],i)),e.changed};function g_(e,t){return Cr in e&&e[Cr]!==t[Cr]}function WN(e,t){var n=tl(t),r=e.businessObject,i=Pe(e);return Lt(n,function(o,a){return a!==m_?o[a]=r.get(a):o[a]=GN(i,tl(t.di)),o},{})}function GN(e,t){return Lt(t,function(n,r){return n[r]=e&&e.get(r),n},{})}function v_(e,t){var n=e.businessObject,r=Pe(e);N(t,function(i,o){o!==m_?n.set(o,i):r&&UN(r,i)})}function UN(e,t){N(t,function(n,r){e.set(r,n)})}var qN=["default"];function KN(e){var t=j({},e);return qN.forEach(function(n){n in e&&(t[n]=Q(t[n]))}),t}function Uc(e,t){this._canvas=e,this._modeling=t}Uc.$inject=["canvas","modeling"],Uc.prototype.execute=function(e){var t=this._canvas,n=e.newRoot,r=n.businessObject,i=t.getRootElement(),o=i.businessObject,a=o.$parent,s=Pe(i);return t.setRootElement(n),t.removeRootElement(i),ot(a.rootElements,r),r.$parent=a,Xe(a.rootElements,o),o.$parent=null,i.di=null,s.bpmnElement=r,n.di=s,e.oldRoot=i,[]},Uc.prototype.revert=function(e){var t=this._canvas,n=e.newRoot,r=n.businessObject,i=e.oldRoot,o=i.businessObject,a=r.$parent,s=Pe(n);return t.setRootElement(i),t.removeRootElement(n),Xe(a.rootElements,r),r.$parent=null,ot(a.rootElements,o),o.$parent=a,n.di=null,s.bpmnElement=o,i.di=s,[]};function sh(e,t){this._modeling=e,this._spaceTool=t}sh.$inject=["modeling","spaceTool"],sh.prototype.preExecute=function(e){var t=this._spaceTool,n=this._modeling,r=e.shape,i=e.location,o=vn(r),a=o===r,s=a?r:r.parent,l=ti(s),c=lt(r);if(c?i==="left"?i="top":i==="right"&&(i="bottom"):i==="top"?i="left":i==="bottom"&&(i="right"),!l.length){var u=c?{x:r.x+gn,y:r.y,width:r.width-gn,height:r.height}:{x:r.x,y:r.y+gn,width:r.width,height:r.height-gn};n.createShape({type:"bpmn:Lane",isHorizontal:c},u,s)}var d=[];Pi(o,function(y){return d.push(y),y.label&&d.push(y.label),y===r?[]:_e(y.children,function(_){return _!==r})});var f,p,m,v,g;i==="top"?(f=-120,p=r.y,m=p+10,v="n",g="y"):i==="left"?(f=-120,p=r.x,m=p+10,v="w",g="x"):i==="bottom"?(f=120,p=r.y+r.height,m=p-10,v="s",g="y"):i==="right"&&(f=120,p=r.x+r.width,m=p-10,v="e",g="x");var x=t.calculateAdjustments(d,g,f,m),w=c?{x:0,y:f}:{x:f,y:0};t.makeSpace(x.movingShapes,x.resizingShapes,w,v,m);var b=c?{x:r.x+(a?gn:0),y:p-(i==="top"?120:0),width:r.width-(a?gn:0),height:120}:{x:p-(i==="left"?120:0),y:r.y+(a?gn:0),width:120,height:r.height-(a?gn:0)};e.newLane=n.createShape({type:"bpmn:Lane",isHorizontal:c},b,s)};function lh(e){this._modeling=e}lh.$inject=["modeling"],lh.prototype.preExecute=function(e){var t=this._modeling,n=e.shape,r=e.count,i=ti(n),o=i.length;if(o>r)throw new Error(`more than <${r}> child lanes`);var a=lt(n),s=a?n.height:n.width,l=Math.round(s/r),c,u,d,f;for(f=0;f<r;f++)f===r-1?c=s-l*f:c=l,u=a?{x:n.x+gn,y:n.y+f*l,width:n.width-gn,height:c}:{x:n.x+f*l,y:n.y+gn,width:c,height:n.height-gn},f<o?t.resizeShape(i[f],u):(d={type:"bpmn:Lane",isHorizontal:a},t.createShape(d,u,n))};function rs(e,t){this._modeling=e,this._spaceTool=t}rs.$inject=["modeling","spaceTool"],rs.prototype.preExecute=function(e){var t=e.shape,n=e.newBounds,r=e.balanced;r!==!1?this.resizeBalanced(t,n):this.resizeSpace(t,n)},rs.prototype.resizeBalanced=function(e,t){var n=this._modeling,r=wI(e,t);n.resizeShape(e,t),r.forEach(function(i){n.resizeShape(i.shape,i.newBounds)})},rs.prototype.resizeSpace=function(e,t){var n=this._spaceTool,r=ce(e),i=ce(t),o=$0(i,r),a=vn(e),s=[],l=[];Pi(a,function(m){return s.push(m),(P(m,"bpmn:Lane")||P(m,"bpmn:Participant"))&&l.push(m),m.children});var c,u,d,f,p;(o.bottom||o.top)&&(c=o.bottom||o.top,u=e.y+(o.bottom?e.height:0)+(o.bottom?-10:10),d=o.bottom?"s":"n",f=o.top>0||o.bottom<0?-c:c,p=n.calculateAdjustments(s,"y",f,u),n.makeSpace(p.movingShapes,p.resizingShapes,{x:0,y:c},d)),(o.left||o.right)&&(c=o.right||o.left,u=e.x+(o.right?e.width:0)+(o.right?-10:100),d=o.right?"e":"w",f=o.left>0||o.right<0?-c:c,p=n.calculateAdjustments(l,"x",f,u),n.makeSpace(p.movingShapes,p.resizingShapes,{x:c,y:0},d))};var is="flowNodeRef",ch="lanes";function os(e){this._elementRegistry=e}os.$inject=["elementRegistry"],os.prototype._computeUpdates=function(e,t){var n=[],r=[],i={},o=[];function a(u,d){var f=ce(d),p={x:u.x+u.width/2,y:u.y+u.height/2};return p.x>f.left&&p.x<f.right&&p.y>f.top&&p.y<f.bottom}function s(u){n.indexOf(u)===-1&&(o.push(u),n.push(u))}function l(u){var d=vn(u);return i[d.id]||(i[d.id]=gc(d)),i[d.id]}function c(u){if(!u.parent)return[];var d=l(u);return d.filter(function(f){return a(u,f)}).map(function(f){return f.businessObject})}return t.forEach(function(u){var d=vn(u);if(!(!d||n.indexOf(d)!==-1)){var f=d.children.filter(function(p){return P(p,"bpmn:FlowNode")});f.forEach(s),n.push(d)}}),e.forEach(s),o.forEach(function(u){var d=u.businessObject,f=d.get(ch),p=f.slice(),m=c(u);r.push({flowNode:d,remove:p,add:m})}),t.forEach(function(u){var d=u.businessObject;u.parent||d.get(is).forEach(function(f){r.push({flowNode:f,remove:[d],add:[]})})}),r},os.prototype.execute=function(e){var t=e.updates;return t||(t=e.updates=this._computeUpdates(e.flowNodeShapes,e.laneShapes)),t.forEach(function(n){var r=n.flowNode,i=r.get(ch);n.remove.forEach(function(o){Xe(i,o),Xe(o.get(is),r)}),n.add.forEach(function(o){ot(i,o),ot(o.get(is),r)})}),[]},os.prototype.revert=function(e){var t=e.updates;return t.forEach(function(n){var r=n.flowNode,i=r.get(ch);n.add.forEach(function(o){Xe(i,o),Xe(o.get(is),r)}),n.remove.forEach(function(o){ot(i,o),ot(o.get(is),r)})}),[]};function qc(e){this._moddle=e}qc.$inject=["moddle"],qc.prototype.execute=function(e){var t=this._moddle.ids,n=e.id,r=e.element,i=e.claiming;return i?t.claim(n,r):t.unclaim(n),[]},qc.prototype.revert=function(e){var t=this._moddle.ids,n=e.id,r=e.element,i=e.claiming;return i?t.unclaim(n):t.claim(n,r),[]};var YN={fill:void 0,stroke:void 0};function uh(e){this._commandStack=e,this._normalizeColor=function(t){if(t){if(kt(t)){var n=XN(t);if(n)return n}throw new Error(`invalid color value: ${t}`)}}}uh.$inject=["commandStack"],uh.prototype.postExecute=function(e){var t=e.elements,n=e.colors||YN,r=this,i={};"fill"in n&&j(i,{"background-color":this._normalizeColor(n.fill)}),"stroke"in n&&j(i,{"border-color":this._normalizeColor(n.stroke)}),N(t,function(o){var a=Be(o)?kn(i,["border-color"]):i,s=Pe(o);if(ZN(a),Te(o))r._commandStack.execute("element.updateModdleProperties",{element:o,moddleElement:s.label,properties:{color:i["border-color"]}});else{if(!be(s,["bpmndi:BPMNEdge","bpmndi:BPMNShape"]))return;r._commandStack.execute("element.updateProperties",{element:o,properties:{di:a}})}})};function XN(e){var t=document.createElement("canvas").getContext("2d");return t.fillStyle="transparent",t.fillStyle=e,/^#[0-9a-fA-F]{6}$/.test(t.fillStyle)?t.fillStyle:null}function ZN(e){"border-color"in e&&(e.stroke=e["border-color"]),"background-color"in e&&(e.fill=e["background-color"])}var QN={width:0,height:0};function y_(e,t,n){function r(l,c){var u=l.label||l,d=l.labelTarget||l;return F2(u,c),[u,d]}function i(l){var c=l.element,u=c.businessObject,d=l.newLabel;if(!Te(c)&&Mi(c)&&!Pl(c)&&!b_(d)){var f=7,p=lf(c);p={x:p.x,y:p.y+f},e.createLabel(c,p,{id:u.id+"_label",businessObject:u,di:c.di})}}function o(l){return l.oldLabel=Zt(l.element),r(l.element,l.newLabel)}function a(l){return r(l.element,l.oldLabel)}function s(l){var c=l.element,u=c.label||c,d=l.newLabel,f=l.newBounds,p=l.hints||{};if(!(!Te(u)&&!P(u,"bpmn:TextAnnotation"))){if(Te(u)&&b_(d)){p.removeShape!==!1&&e.removeShape(u,{unsetLabel:!1});return}var m=Zt(c);typeof f>"u"&&(f=t.getExternalLabelBounds(u,m)),f&&e.resizeShape(u,f,QN)}}this.preExecute=i,this.execute=o,this.revert=a,this.postExecute=s}y_.$inject=["modeling","textRenderer","bpmnFactory"];function b_(e){return!e||!e.trim()}function Ct(e,t,n,r){De.call(this,e,t,n),this._bpmnRules=r}ie(Ct,De),Ct.$inject=["eventBus","elementFactory","commandStack","bpmnRules"],Ct.prototype.getHandlers=function(){var e=De.prototype.getHandlers.call(this);return e["element.updateModdleProperties"]=es,e["element.updateProperties"]=ns,e["canvas.updateRoot"]=Uc,e["lane.add"]=sh,e["lane.resize"]=rs,e["lane.split"]=lh,e["lane.updateRefs"]=os,e["id.updateClaim"]=qc,e["element.setColor"]=uh,e["element.updateLabel"]=y_,e},Ct.prototype.updateLabel=function(e,t,n,r){this._commandStack.execute("element.updateLabel",{element:e,newLabel:t,newBounds:n,hints:r||{}})},Ct.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)},Ct.prototype.updateModdleProperties=function(e,t,n){this._commandStack.execute("element.updateModdleProperties",{element:e,moddleElement:t,properties:n})},Ct.prototype.updateProperties=function(e,t){this._commandStack.execute("element.updateProperties",{element:e,properties:t})},Ct.prototype.resizeLane=function(e,t,n){this._commandStack.execute("lane.resize",{shape:e,newBounds:t,balanced:n})},Ct.prototype.addLane=function(e,t){var n={shape:e,location:t};return this._commandStack.execute("lane.add",n),n.newLane},Ct.prototype.splitLane=function(e,t){this._commandStack.execute("lane.split",{shape:e,count:t})},Ct.prototype.makeCollaboration=function(){var e=this._create("root",{type:"bpmn:Collaboration"}),t={newRoot:e};return this._commandStack.execute("canvas.updateRoot",t),e},Ct.prototype.makeProcess=function(){var e=this._create("root",{type:"bpmn:Process"}),t={newRoot:e};return this._commandStack.execute("canvas.updateRoot",t),e},Ct.prototype.updateLaneRefs=function(e,t){this._commandStack.execute("lane.updateRefs",{flowNodeShapes:e,laneShapes:t})},Ct.prototype.claimId=function(e,t){this._commandStack.execute("id.updateClaim",{id:e,element:t,claiming:!0})},Ct.prototype.unclaimId=function(e,t){this._commandStack.execute("id.updateClaim",{id:e,element:t})},Ct.prototype.setColor=function(e,t){e.length||(e=[e]),this._commandStack.execute("element.setColor",{elements:e,colors:t})};function x_(){}x_.prototype.layoutConnection=function(e,t){return t=t||{},[t.connectionStart||fe(t.source||e.source),t.connectionEnd||fe(t.target||e.target)]};var Kc=20,JN=5,Yc=Math.round,__=20,e5={"h:h":20,"v:v":20,"h:v":-10,"v:h":-10};function t5(e,t){return!{t:/top/,r:/right/,b:/bottom/,l:/left/,h:/./,v:/./}[t].test(e)}function n5(e,t){return{t:/top/,r:/right/,b:/bottom/,l:/left/,h:/left|right/,v:/top|bottom/}[e].test(t)}function w_(e,t,n){var r=wt(t,e,JN),i=n.split(":")[0],o=Yc((t.x-e.x)/2+e.x),a=Yc((t.y-e.y)/2+e.y),s,l,c=n5(i,r),u=/h|r|l/.test(i),d=!1,f=!1;return c?(s=u?{x:o,y:e.y}:{x:e.x,y:a},l=u?"h:h":"v:v"):(d=t5(r,i),l=u?"h:v":"v:h",d?u?(f=a===e.y,s={x:e.x+Kc*(/l/.test(i)?-1:1),y:f?a+Kc:a}):(f=o===e.x,s={x:f?o+Kc:o,y:e.y+Kc*(/t/.test(i)?-1:1)}):s={x:o,y:a}),{waypoints:dh(e,s,l).concat(s),directions:l,turnNextDirections:f}}function r5(e,t,n){return w_(e,t,n)}function i5(e,t,n){var r=w_(t,e,E_(n));return{waypoints:r.waypoints.slice().reverse(),directions:E_(r.directions),turnNextDirections:r.turnNextDirections}}function o5(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=dh(e.waypoints[e.waypoints.length-1],t.waypoints[0],i);return{waypoints:o,directions:i}}function E_(e){return e.split(":").reverse().join(":")}function a5(e,t,n){var r=Yc((t.x-e.x)/2+e.x),i=Yc((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 dh(e,t,n){if(n=n||"h:h",!m5(n))throw new Error("unknown directions: <"+n+">: must be specified as <start>:<end> with start/end in { h,v,t,r,b,l }");if(C_(n)){var r=r5(e,t,n),i=i5(e,t,n),o=o5(r,i);return[].concat(r.waypoints,o.waypoints,i.waypoints)}return a5(e,t,n)}function s5(e,t,n){var r=dh(e,t,n);return r.unshift(e),r.push(t),P_(r)}function l5(e,t,n,r,i){var o=i&&i.preferredLayouts||[],a=dP(o,"straight")[0]||"h:h",s=e5[a]||0,l=wt(e,t,s),c=h5(l,a);n=n||fe(e),r=r||fe(t);var u=c.split(":"),d=T_(n,e,u[0],g5(l)),f=T_(r,t,u[1],l);return s5(d,f,c)}function c5(e,t,n,r,i,o){me(n)&&(i=n,o=r,n=fe(e),r=fe(t)),o=j({preferredLayouts:[]},o),i=i||[];var a=o.preferredLayouts,s=a.indexOf("straight")!==-1,l;return l=s&&d5(e,t,n,r,o),l||(l=o.connectionEnd&&p5(t,e,r,i),l)||(l=o.connectionStart&&f5(e,t,n,i),l)?l:!o.connectionStart&&!o.connectionEnd&&i&&i.length?i:l5(e,t,n,r,o)}function u5(e,t,n){return e>=t&&e<=n}function S_(e,t,n){var r={x:"width",y:"height"};return u5(t[e],n[e],n[e]+n[r[e]])}function d5(e,t,n,r,i){var o={},a,s;return s=wt(e,t),/^(top|bottom|left|right)$/.test(s)?(/top|bottom/.test(s)&&(a="x"),/left|right/.test(s)&&(a="y"),i.preserveDocking==="target"?S_(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:S_(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 f5(e,t,n,r){return fh(e,t,n,r)}function p5(e,t,n,r){var i=r.slice().reverse();return i=fh(e,t,n,i),i?i.reverse():null}function fh(e,t,n,r){function i(u){return u.length<3?!0:u.length>4?!1:!!Re(u,function(d,f){var p=u[f-1];return p&&ga(d,p)<3})}function o(u,d,f){var p=pr(d,u);switch(p){case"v":return{x:f.x,y:u.y};case"h":return{x:u.x,y:f.y}}return{x:u.x,y:u.y}}function a(u,d,f){var p;for(p=u.length-2;p!==0;p--)if(mv(u[p],d,__)||mv(u[p],f,__))return u.slice(p);return u}if(i(r))return null;var s=r[0],l=r.slice(),c;return l[0]=n,l[1]=o(l[1],s,n),c=a(l,e,t),c!==l&&(l=fh(e,t,n,c)),l&&pr(l)?null:l}function h5(e,t){if(C_(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 C_(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 T_(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 P_(e){return e.reduce(function(t,n,r){var i=t[t.length-1],o=e[r+1];return Wd(i,o,n,0)||t.push(n),t},[])}var v5=-10,y5=40,b5={default:["h:h"],fromGateway:["v:h"],toGateway:["h:v"],loop:{fromTop:["t:r"],fromRight:["r:b"],fromLeft:["l:t"],fromBottom:["b:l"]},boundaryLoop:{alternateHorizontalSide:"b",alternateVerticalSide:"l",default:"v"},messageFlow:["straight","v:v"],subProcess:["straight","h:h"],isHorizontal:!0},x5={default:["v:v"],fromGateway:["h:v"],toGateway:["v:h"],loop:{fromTop:["t:l"],fromRight:["r:t"],fromLeft:["l:b"],fromBottom:["b:r"]},boundaryLoop:{alternateHorizontalSide:"t",alternateVerticalSide:"r",default:"h"},messageFlow:["straight","h:h"],subProcess:["straight","v:v"],isHorizontal:!1},ph={top:"bottom","top-right":"bottom-left","top-left":"bottom-right",right:"left",bottom:"top","bottom-right":"top-left","bottom-left":"top-right",left:"right"},as={top:"t",right:"r",bottom:"b",left:"l"};function Xc(e){this._elementRegistry=e}ie(Xc,x_),Xc.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=this._elementRegistry,l,c;if(o||(o=$_(i&&i[0],n)),a||(a=$_(i&&i[i.length-1],r)),(P(e,"bpmn:Association")||P(e,"bpmn:DataAssociation"))&&i&&!R_(n,r))return[].concat([o],i.slice(1,-1),[a]);var u=Bb(n,s)?b5:x5;return P(e,"bpmn:MessageFlow")?l=w5(n,r,u):(P(e,"bpmn:SequenceFlow")||R_(n,r))&&(n===r?l={preferredLayouts:$5(n,e,u)}:P(n,"bpmn:BoundaryEvent")?l={preferredLayouts:R5(n,r,a,u)}:ss(n)||ss(r)?l={preferredLayouts:u.subProcess,preserveDocking:S5(n)}:P(n,"bpmn:Gateway")?l={preferredLayouts:u.fromGateway}:P(r,"bpmn:Gateway")?l={preferredLayouts:u.toGateway}:l={preferredLayouts:u.default}),l&&(l=j(l,t),c=P_(c5(n,r,o,a,i,l))),c||[o,a]};function _5(e){var t=e.host;return wt(fe(e),t,v5)}function w5(e,t,n){return{preferredLayouts:n.messageFlow,preserveDocking:E5(e,t)}}function E5(e,t){return P(t,"bpmn:Participant")?"source":P(e,"bpmn:Participant")?"target":ss(t)?"source":ss(e)||P(t,"bpmn:Event")?"target":P(e,"bpmn:Event")?"source":null}function S5(e){return ss(e)?"target":"source"}function $_(e,t){return e?e.original||e:fe(t)}function R_(e,t){return P(t,"bpmn:Activity")&&P(e,"bpmn:BoundaryEvent")&&t.businessObject.isForCompensation}function ss(e){return P(e,"bpmn:SubProcess")&&Se(e)}function Gi(e,t){return e===t}function C5(e,t){return t.indexOf(e)!==-1}function Ho(e){var t=/right|left/.exec(e);return t&&t[0]}function zo(e){var t=/top|bottom/.exec(e);return t&&t[0]}function A_(e,t){return ph[e]===t}function T5(e,t){var n=Ho(e),r=ph[n];return t.indexOf(r)!==-1}function P5(e,t){var n=zo(e),r=ph[n];return t.indexOf(r)!==-1}function O_(e){return e==="right"||e==="left"}function $5(e,t,n){var r=t.waypoints,i=r&&r.length&&wt(r[0],e);return i==="top"?n.loop.fromTop:i==="right"?n.loop.fromRight:i==="left"?n.loop.fromLeft:n.loop.fromBottom}function R5(e,t,n,r){var i=fe(e),o=fe(t),a=_5(e),s,l,c=Gi(e.host,t),u=C5(a,["top","right","bottom","left"]),d=wt(o,i,{x:e.width/2+t.width/2,y:e.height/2+t.height/2});return c?A5(a,u,e,t,n,r):(s=O5(a,d,u,r.isHorizontal),l=M5(a,d,u,r.isHorizontal),[s+":"+l])}function A5(e,t,n,r,i,o){var a=t?e:o.isHorizontal?zo(e):Ho(e),s=as[a],l;return t?O_(e)?l=M_("y",n,r,i)?"h":o.boundaryLoop.alternateHorizontalSide:l=M_("x",n,r,i)?"v":o.boundaryLoop.alternateVerticalSide:l=o.boundaryLoop.default,[s+":"+l]}function M_(e,t,n,r){var i=y5;return!(hh(e,r,n,i)||hh(e,r,{x:n.x+n.width,y:n.y+n.height},i)||hh(e,r,fe(t),i))}function hh(e,t,n,r){return Math.abs(t[e]-n[e])<r}function O5(e,t,n,r){if(n)return as[e];var i=zo(e),o=Ho(e),a=zo(t),s=Ho(t);if(r){if(Gi(i,a)||A_(o,s))return as[i]}else if(Gi(o,s)||A_(i,a))return as[o];return as[r?o:i]}function M5(e,t,n,r){return n?O_(e)?T5(e,t)||Gi(e,t)?"h":"v":P5(e,t)||Gi(e,t)?"v":"h":r?Gi(zo(e),zo(t))?"h":"v":Gi(Ho(e),Ho(t))?"v":"h"}Xc.$inject=["elementRegistry"];function I_(e){return j({original:e.point.original||e.point},e.actual)}function ui(e,t){this._elementRegistry=e,this._graphicsFactory=t}ui.$inject=["elementRegistry","graphicsFactory"],ui.prototype.getCroppedWaypoints=function(e,t,n){t=t||e.source,n=n||e.target;var r=this.getDockingPoint(e,t,!0),i=this.getDockingPoint(e,n),o=e.waypoints.slice(r.idx+1,i.idx);return o.unshift(I_(r)),o.push(I_(i)),o},ui.prototype.getDockingPoint=function(e,t,n){var r=e.waypoints,i,o,a;return i=n?0:r.length-1,o=r[i],a=this._getIntersection(t,e,n),{point:o,actual:a||o,idx:i}},ui.prototype._getIntersection=function(e,t,n){var r=this._getShapePath(e),i=this._getConnectionPath(t);return Kd(r,i,n)},ui.prototype._getConnectionPath=function(e){return this._graphicsFactory.getConnectionPath(e)},ui.prototype._getShapePath=function(e){return this._graphicsFactory.getShapePath(e)},ui.prototype._getGfx=function(e){return this._elementRegistry.getGraphics(e)};const D_={__init__:["modeling","bpmnUpdater"],__depends__:[PD,GD,qD,KD,Ux,wN,SN,AN,Jn,uf,Qx],bpmnFactory:["type",bn],bpmnUpdater:["type",zt],elementFactory:["type",ai],modeling:["type",Ct],layouter:["type",Xc],connectionDocking:["type",ui]},N_=Math.round;function Zc(e,t,n,r,i,o){this._complexPreview=e,this._connectionDocking=t,this._elementFactory=n,this._eventBus=r,this._layouter=i,this._rules=o}Zc.prototype.create=function(e,t,n){const r=this._complexPreview,i=this._connectionDocking,o=this._elementFactory,a=this._eventBus,s=this._layouter,l=this._rules,c=o.createShape(j({type:t},n)),u=a.fire("autoPlace",{source:e,shape:c});if(!u)return;j(c,{x:u.x-N_(c.width/2),y:u.y-N_(c.height/2)});const d=l.allowed("connection.create",{source:e,target:c,hints:{targetParent:e.parent}});let f=null;d&&(f=o.createConnection(d),f.waypoints=s.layoutConnection(f,{source:e,target:c}),f.waypoints=i.getCroppedWaypoints(f,e,c)),r.create({created:[c,f].filter(p=>!da(p))})},Zc.prototype.cleanUp=function(){this._complexPreview.cleanUp()},Zc.$inject=["complexPreview","connectionDocking","elementFactory","eventBus","layouter","rules"];const I5={__depends__:[Lf,nI,D_],__init__:["appendPreview"],appendPreview:["type",Zc]};var B_=Math.min,k_=Math.max;function mh(e){e.preventDefault()}function ls(e){e.stopPropagation()}function D5(e){return e.nodeType===Node.TEXT_NODE}function N5(e){return[].slice.call(e)}function Fn(e){this.container=e.container,this.parent=ke('<div class="djs-direct-editing-parent"><div class="djs-direct-editing-content" contenteditable="true"></div></div>'),this.content=Ie("[contenteditable]",this.parent),this.keyHandler=e.keyHandler||function(){},this.resizeHandler=e.resizeHandler||function(){},this.autoResize=Dt(this.autoResize,this),this.handlePaste=Dt(this.handlePaste,this)}Fn.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 l=kn(t,["width","height","maxWidth","maxHeight","minWidth","minHeight","left","top","backgroundColor","position","overflow","border","wordWrap","textAlign","outline","transform"]);j(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"},l);var c=kn(t,["fontFamily","fontSize","fontWeight","lineHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"]);return j(a.style,{boxSizing:"border-box",width:"100%",outline:"none",wordWrap:"break-word"},c),r.centerVertically&&j(a.style,{position:"absolute",top:"50%",transform:"translate(0, -50%)"},c),a.innerText=n,ge.bind(a,"keydown",this.keyHandler),ge.bind(a,"mousedown",ls),ge.bind(a,"paste",i.handlePaste),r.autoResize&&ge.bind(a,"input",this.autoResize),r.resizable&&this.resizable(t),s.appendChild(o),this.setSelection(a.lastChild,a.lastChild&&a.lastChild.length),o},Fn.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)}},Fn.prototype.insertText=function(e){e=B5(e);var t=document.execCommand("insertText",!1,e);t||this._insertTextIE(e)},Fn.prototype._insertTextIE=function(e){var t=this.getSelection(),n=t.startContainer,r=t.endContainer,i=t.startOffset,o=t.endOffset,a=t.commonAncestorContainer,s=N5(a.childNodes),l,c;if(D5(a)){var u=n.textContent;n.textContent=u.substring(0,i)+e+u.substring(o),l=n,c=i+e.length}else if(n===this.content&&r===this.content){var d=document.createTextNode(e);this.content.insertBefore(d,s[i]),l=d,c=d.textContent.length}else{var f=s.indexOf(n),p=s.indexOf(r);s.forEach(function(m,v){v===f?m.textContent=n.textContent.substring(0,i)+e+r.textContent.substring(o):v>f&&v<=p&&Kn(m)}),l=n,c=i+e.length}l&&c!==void 0&&setTimeout(function(){self.setSelection(l,c)})},Fn.prototype.autoResize=function(){var e=this.parent,t=this.content,n=parseInt(this.style.fontSize)||12;if(t.scrollHeight>e.offsetHeight||t.scrollHeight<e.offsetHeight-n){var r=e.getBoundingClientRect(),i=t.scrollHeight;e.style.height=i+"px",this.resizeHandler({width:r.width,height:r.height,dx:0,dy:i-r.height})}},Fn.prototype.resizable=function(){var e=this,t=this.parent,n=this.resizeHandle,r=parseInt(this.style.minWidth)||0,i=parseInt(this.style.minHeight)||0,o=parseInt(this.style.maxWidth)||1/0,a=parseInt(this.style.maxHeight)||1/0;if(!n){n=this.resizeHandle=ke('<div class="djs-direct-editing-resize-handle"></div>');var s,l,c,u,d=function(m){mh(m),ls(m),s=m.clientX,l=m.clientY;var v=t.getBoundingClientRect();c=v.width,u=v.height,ge.bind(document,"mousemove",f),ge.bind(document,"mouseup",p)},f=function(m){mh(m),ls(m);var v=B_(k_(c+m.clientX-s,r),o),g=B_(k_(u+m.clientY-l,i),a);t.style.width=v+"px",t.style.height=g+"px",e.resizeHandler({width:c,height:u,dx:m.clientX-s,dy:m.clientY-l})},p=function(m){mh(m),ls(m),ge.unbind(document,"mousemove",f,!1),ge.unbind(document,"mouseup",p,!1)};ge.bind(n,"mousedown",d)}j(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)},Fn.prototype.destroy=function(){var e=this.parent,t=this.content,n=this.resizeHandle;t.innerText="",e.removeAttribute("style"),t.removeAttribute("style"),ge.unbind(t,"keydown",this.keyHandler),ge.unbind(t,"mousedown",ls),ge.unbind(t,"input",this.autoResize),ge.unbind(t,"paste",this.handlePaste),n&&(n.removeAttribute("style"),Kn(n)),Kn(e)},Fn.prototype.getValue=function(){return this.content.innerText.trim()},Fn.prototype.getSelection=function(){var e=window.getSelection(),t=e.getRangeAt(0);return t},Fn.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 B5(e){return e.replace(/\r\n|\r|\n/g,`
|
|
208
|
+
`)}function xn(e,t){this._eventBus=e,this._providers=[],this._textbox=new Fn({container:t.getContainer(),keyHandler:Dt(this._handleKey,this),resizeHandler:Dt(this._handleResize,this)})}xn.$inject=["eventBus","canvas"],xn.prototype.registerProvider=function(e){this._providers.push(e)},xn.prototype.isActive=function(e){return!!(this._active&&(!e||this._active.element===e))},xn.prototype.cancel=function(){this._active&&(this._fire("cancel"),this.close())},xn.prototype._fire=function(e,t){this._eventBus.fire("directEditing."+e,t||{active:this._active})},xn.prototype.close=function(){this._textbox.destroy(),this._fire("deactivate"),this._active=null,this.resizable=void 0},xn.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()}},xn.prototype.getValue=function(){return this._textbox.getValue()},xn.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()},xn.prototype._handleResize=function(e){this._fire("resize",e)},xn.prototype.activate=function(e){this.isActive()&&this.cancel();var t,n=Re(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 L_={__depends__:[Fl],__init__:["directEditing"],directEditing:["type",xn]};function j_(e){return function(t){var n=t.target,r=Q(e),i=r.eventDefinitions&&r.eventDefinitions[0],o=r.$type===n.type,a=(i&&i.$type)===n.eventDefinitionType,s=!!n.triggeredByEvent==!!r.triggeredByEvent,l=n.isExpanded===void 0||n.isExpanded===Se(e);return!o||!a||!s||!l}}var k5=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message start event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer start event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Conditional start event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Signal start event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],L5=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}}],j5=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message intermediate catch event",actionName:"replace-with-message-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Message intermediate throw event",actionName:"replace-with-message-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-message",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer intermediate catch event",actionName:"replace-with-timer-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation intermediate throw event",actionName:"replace-with-escalation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-escalation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional intermediate catch event",actionName:"replace-with-conditional-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Link intermediate catch event",actionName:"replace-with-link-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-link",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Link intermediate throw event",actionName:"replace-with-link-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-link",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Compensation intermediate throw event",actionName:"replace-with-compensation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-compensation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal intermediate catch event",actionName:"replace-with-signal-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Signal intermediate throw event",actionName:"replace-with-signal-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-signal",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],F5=[{label:"Start event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate throw event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message end event",actionName:"replace-with-message-end",className:"bpmn-icon-end-event-message",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Escalation end event",actionName:"replace-with-escalation-end",className:"bpmn-icon-end-event-escalation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Error end event",actionName:"replace-with-error-end",className:"bpmn-icon-end-event-error",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel end event",actionName:"replace-with-cancel-end",className:"bpmn-icon-end-event-cancel",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Compensation end event",actionName:"replace-with-compensation-end",className:"bpmn-icon-end-event-compensation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal end event",actionName:"replace-with-signal-end",className:"bpmn-icon-end-event-signal",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Terminate end event",actionName:"replace-with-terminate-end",className:"bpmn-icon-end-event-terminate",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:TerminateEventDefinition"}}],H5=[{label:"Exclusive gateway",actionName:"replace-with-exclusive-gateway",className:"bpmn-icon-gateway-xor",target:{type:"bpmn:ExclusiveGateway"}},{label:"Parallel gateway",actionName:"replace-with-parallel-gateway",className:"bpmn-icon-gateway-parallel",target:{type:"bpmn:ParallelGateway"}},{label:"Inclusive gateway",actionName:"replace-with-inclusive-gateway",className:"bpmn-icon-gateway-or",target:{type:"bpmn:InclusiveGateway"}},{label:"Complex gateway",actionName:"replace-with-complex-gateway",className:"bpmn-icon-gateway-complex",target:{type:"bpmn:ComplexGateway"}},{label:"Event-based gateway",actionName:"replace-with-event-based-gateway",className:"bpmn-icon-gateway-eventbased",target:{type:"bpmn:EventBasedGateway",instantiate:!1,eventGatewayType:"Exclusive"}}],z5=[{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Event sub-process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}},{label:"Sub-process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}}],F_=[{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Sub-process",actionName:"replace-with-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}},{label:"Event sub-process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}}],V5=F_,H_=[{label:"Task",actionName:"replace-with-task",className:"bpmn-icon-task",target:{type:"bpmn:Task"}},{label:"User task",actionName:"replace-with-user-task",className:"bpmn-icon-user",target:{type:"bpmn:UserTask"}},{label:"Service task",actionName:"replace-with-service-task",className:"bpmn-icon-service",target:{type:"bpmn:ServiceTask"}},{label:"Send task",actionName:"replace-with-send-task",className:"bpmn-icon-send",target:{type:"bpmn:SendTask"}},{label:"Receive task",actionName:"replace-with-receive-task",className:"bpmn-icon-receive",target:{type:"bpmn:ReceiveTask"}},{label:"Manual task",actionName:"replace-with-manual-task",className:"bpmn-icon-manual",target:{type:"bpmn:ManualTask"}},{label:"Business rule task",actionName:"replace-with-rule-task",className:"bpmn-icon-business-rule",target:{type:"bpmn:BusinessRuleTask"}},{label:"Script task",actionName:"replace-with-script-task",className:"bpmn-icon-script",target:{type:"bpmn:ScriptTask"}},{label:"Call activity",actionName:"replace-with-call-activity",className:"bpmn-icon-call-activity",target:{type:"bpmn:CallActivity"}},{label:"Sub-process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}},{label:"Sub-process (expanded)",actionName:"replace-with-expanded-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}}],W5=[{label:"Data store reference",actionName:"replace-with-data-store-reference",className:"bpmn-icon-data-store",target:{type:"bpmn:DataStoreReference"}}],G5=[{label:"Data object reference",actionName:"replace-with-data-object-reference",className:"bpmn-icon-data-object",target:{type:"bpmn:DataObjectReference"}}],U5=[{label:"Message boundary event",actionName:"replace-with-message-boundary",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!0}},{label:"Timer boundary event",actionName:"replace-with-timer-boundary",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!0}},{label:"Escalation boundary event",actionName:"replace-with-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!0}},{label:"Conditional boundary event",actionName:"replace-with-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!0}},{label:"Error boundary event",actionName:"replace-with-error-boundary",className:"bpmn-icon-intermediate-event-catch-error",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ErrorEventDefinition",cancelActivity:!0}},{label:"Cancel boundary event",actionName:"replace-with-cancel-boundary",className:"bpmn-icon-intermediate-event-catch-cancel",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CancelEventDefinition",cancelActivity:!0}},{label:"Signal boundary event",actionName:"replace-with-signal-boundary",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!0}},{label:"Compensation boundary event",actionName:"replace-with-compensation-boundary",className:"bpmn-icon-intermediate-event-catch-compensation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CompensateEventDefinition",cancelActivity:!0}},{label:"Message boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-message-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!1}},{label:"Timer boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!1}},{label:"Escalation boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!1}},{label:"Conditional boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!1}},{label:"Signal boundary event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!1}}],q5=[{label:"Message start event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!0}},{label:"Timer start event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!0}},{label:"Conditional start event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!0}},{label:"Signal start event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!0}},{label:"Error start event",actionName:"replace-with-error-start",className:"bpmn-icon-start-event-error",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ErrorEventDefinition",isInterrupting:!0}},{label:"Escalation start event",actionName:"replace-with-escalation-start",className:"bpmn-icon-start-event-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!0}},{label:"Compensation start event",actionName:"replace-with-compensation-start",className:"bpmn-icon-start-event-compensation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:CompensateEventDefinition",isInterrupting:!0}},{label:"Message start event (non-interrupting)",actionName:"replace-with-non-interrupting-message-start",className:"bpmn-icon-start-event-non-interrupting-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!1}},{label:"Timer start event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-start",className:"bpmn-icon-start-event-non-interrupting-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!1}},{label:"Conditional start event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-start",className:"bpmn-icon-start-event-non-interrupting-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!1}},{label:"Signal start event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-start",className:"bpmn-icon-start-event-non-interrupting-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!1}},{label:"Escalation start event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-start",className:"bpmn-icon-start-event-non-interrupting-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!1}}],K5=[{label:"Sequence flow",actionName:"replace-with-sequence-flow",className:"bpmn-icon-connection"},{label:"Default flow",actionName:"replace-with-default-flow",className:"bpmn-icon-default-flow"},{label:"Conditional flow",actionName:"replace-with-conditional-flow",className:"bpmn-icon-conditional-flow"}],Y5=[{label:"Expanded pool/participant",actionName:"replace-with-expanded-pool",className:"bpmn-icon-participant",target:{type:"bpmn:Participant",isExpanded:!0}},{label:function(e){var t="Empty pool/participant";return e.children&&e.children.length&&(t+=" (removes content)"),t},actionName:"replace-with-collapsed-pool",className:"bpmn-icon-lane",target:{type:"bpmn:Participant",isExpanded:!1}}];const z_={"start-event-non-interrupting":`
|
|
209
|
+
<svg viewBox="0 0 2048 2048" xmlns="http://www.w3.org/2000/svg">
|
|
210
|
+
<g transform="translate(0 995.64)">
|
|
211
|
+
<path d="m1899 28.357c21.545 567.43-598.38 1023.5-1133.6 835.92-548.09-147.21-801.57-873.95-463.59-1330 302.62-480.3 1071.7-507.54 1407.6-49.847 122.14 153.12 190.07 348.07 189.59 543.91z" fill="none" stroke="currentColor" stroke-dasharray="418.310422, 361.2328165" stroke-linecap="round" stroke-width="100"/>
|
|
212
|
+
</g>
|
|
213
|
+
</svg>`,"intermediate-event-non-interrupting":`
|
|
214
|
+
<svg viewBox="0 0 2048 2048" xmlns="http://www.w3.org/2000/svg">
|
|
215
|
+
<g transform="translate(0 995.64)" fill="none" stroke="currentColor" stroke-linecap="round">
|
|
216
|
+
<circle cx="1024" cy="28.357" r="875" stroke-dasharray="418.310422, 361.2328165" stroke-width="100"/>
|
|
217
|
+
<circle cx="1024" cy="28.357" r="685" stroke-dasharray="348.31044857,261.23283643" stroke-dashoffset="500" stroke-width="100"/>
|
|
218
|
+
</g>
|
|
219
|
+
</svg>`};function Jt(e,t,n,r,i,o,a,s){this._bpmnFactory=e,this._popupMenu=t,this._modeling=n,this._moddle=r,this._bpmnReplace=i,this._rules=o,this._translate=a,this._moddleCopy=s,this._register()}Jt.$inject=["bpmnFactory","popupMenu","modeling","moddle","bpmnReplace","rules","translate","moddleCopy"],Jt.prototype._register=function(){this._popupMenu.registerProvider("bpmn-replace",this)},Jt.prototype.getPopupMenuEntries=function(e){var t=e.businessObject,n=this._rules,r=[];if(me(e)||!n.allowed("shape.replace",{element:e}))return{};var i=j_(e);return P(t,"bpmn:DataObjectReference")?this._createEntries(e,W5):P(t,"bpmn:DataStoreReference")&&!P(e.parent,"bpmn:Collaboration")?this._createEntries(e,G5):P(t,"bpmn:StartEvent")&&!P(t.$parent,"bpmn:SubProcess")?(r=_e(k5,i),this._createEntries(e,r)):P(t,"bpmn:Participant")?(r=_e(Y5,function(o){return Se(e)!==o.target.isExpanded}),this._createEntries(e,r)):P(t,"bpmn:StartEvent")&&St(t.$parent)?(r=_e(q5,function(o){var a=o.target,s=a.isInterrupting!==!1,l=t.isInterrupting===s;return i(o)||!i(o)&&!l}),this._createEntries(e,r)):P(t,"bpmn:StartEvent")&&!St(t.$parent)&&P(t.$parent,"bpmn:SubProcess")?(r=_e(L5,i),this._createEntries(e,r)):P(t,"bpmn:EndEvent")?(r=_e(F5,function(o){var a=o.target;return a.eventDefinitionType=="bpmn:CancelEventDefinition"&&!P(t.$parent,"bpmn:Transaction")?!1:i(o)}),this._createEntries(e,r)):P(t,"bpmn:BoundaryEvent")?(r=_e(U5,function(o){var a=o.target;if(a.eventDefinitionType=="bpmn:CancelEventDefinition"&&!P(t.attachedToRef,"bpmn:Transaction"))return!1;var s=a.cancelActivity!==!1,l=t.cancelActivity==s;return i(o)||!i(o)&&!l}),this._createEntries(e,r)):P(t,"bpmn:IntermediateCatchEvent")||P(t,"bpmn:IntermediateThrowEvent")?(r=_e(j5,i),this._createEntries(e,r)):P(t,"bpmn:Gateway")?(r=_e(H5,i),this._createEntries(e,r)):P(t,"bpmn:Transaction")?(r=_e(F_,i),this._createEntries(e,r)):St(t)&&Se(e)?(r=_e(V5,i),this._createEntries(e,r)):P(t,"bpmn:SubProcess")&&Se(e)?(r=_e(z5,i),this._createEntries(e,r)):P(t,"bpmn:AdHocSubProcess")&&!Se(e)?(r=_e(H_,function(o){var a=o.target,s=a.type==="bpmn:SubProcess",l=a.isExpanded===!0;return j_(a)&&(!s||l)}),this._createEntries(e,r)):P(t,"bpmn:SequenceFlow")?this._createSequenceFlowEntries(e,K5):P(t,"bpmn:FlowNode")?(r=_e(H_,i),P(t,"bpmn:SubProcess")&&!Se(e)&&(r=_e(r,function(o){return o.label!=="Sub-process (collapsed)"})),this._createEntries(e,r)):{}},Jt.prototype.getPopupMenuHeaderEntries=function(e){var t={};return P(e,"bpmn:Activity")&&!St(e)&&(t={...t,...this._getLoopCharacteristicsHeaderEntries(e)}),P(e,"bpmn:DataObjectReference")&&(t={...t,...this._getCollectionHeaderEntries(e)}),P(e,"bpmn:Participant")&&(t={...t,...this._getParticipantMultiplicityHeaderEntries(e)}),P(e,"bpmn:SubProcess")&&!P(e,"bpmn:Transaction")&&!St(e)&&(t={...t,...this._getAdHocHeaderEntries(e)}),J0(e)&&(t={...t,...this._getNonInterruptingHeaderEntries(e)}),t},Jt.prototype._createEntries=function(e,t){var n={},r=this;return N(t,function(i){n[i.actionName]=r._createEntry(i,e)}),n},Jt.prototype._createSequenceFlowEntries=function(e,t){var n=Q(e),r={},i=this._modeling,o=this._moddle,a=this;return N(t,function(s){switch(s.actionName){case"replace-with-default-flow":n.sourceRef.default!==n&&(P(n.sourceRef,"bpmn:ExclusiveGateway")||P(n.sourceRef,"bpmn:InclusiveGateway")||P(n.sourceRef,"bpmn:ComplexGateway")||P(n.sourceRef,"bpmn:Activity"))&&(r={...r,[s.actionName]:a._createEntry(s,e,function(){i.updateProperties(e.source,{default:n})})});break;case"replace-with-conditional-flow":!n.conditionExpression&&P(n.sourceRef,"bpmn:Activity")&&(r={...r,[s.actionName]:a._createEntry(s,e,function(){var l=o.create("bpmn:FormalExpression",{body:""});i.updateProperties(e,{conditionExpression:l})})});break;default:P(n.sourceRef,"bpmn:Activity")&&n.conditionExpression&&(r={...r,[s.actionName]:a._createEntry(s,e,function(){i.updateProperties(e,{conditionExpression:void 0})})}),(P(n.sourceRef,"bpmn:ExclusiveGateway")||P(n.sourceRef,"bpmn:InclusiveGateway")||P(n.sourceRef,"bpmn:ComplexGateway")||P(n.sourceRef,"bpmn:Activity"))&&n.sourceRef.default===n&&(r={...r,[s.actionName]:a._createEntry(s,e,function(){i.updateProperties(e.source,{default:void 0})})})}}),r},Jt.prototype._createEntry=function(e,t,n){var r=this._translate,i=this._bpmnReplace.replaceElement,o=function(){return i(t,e.target)},a=e.label;return a&&typeof a=="function"&&(a=a(t)),n=n||o,{label:r(a),className:e.className,action:n}},Jt.prototype._getLoopCharacteristicsHeaderEntries=function(e){var t=this,n=this._translate;function r(c,u){if(u.active){t._modeling.updateProperties(e,{loopCharacteristics:void 0});return}const d=e.businessObject.get("loopCharacteristics"),f=t._moddle.create(u.options.loopCharacteristics);d&&t._moddleCopy.copyElement(d,f),f.set("isSequential",u.options.isSequential),t._modeling.updateProperties(e,{loopCharacteristics:f})}var i=Q(e),o=i.loopCharacteristics,a,s,l;return o&&(a=o.isSequential,s=o.isSequential===void 0,l=o.isSequential!==void 0&&!o.isSequential),{"toggle-parallel-mi":{className:"bpmn-icon-parallel-mi-marker",title:n("Parallel multi-instance"),active:l,action:r,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!1}},"toggle-sequential-mi":{className:"bpmn-icon-sequential-mi-marker",title:n("Sequential multi-instance"),active:a,action:r,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!0}},"toggle-loop":{className:"bpmn-icon-loop-marker",title:n("Loop"),active:s,action:r,options:{loopCharacteristics:"bpmn:StandardLoopCharacteristics"}}}},Jt.prototype._getCollectionHeaderEntries=function(e){var t=this,n=this._translate,r=e.businessObject.dataObjectRef;if(!r)return{};function i(a,s){t._modeling.updateModdleProperties(e,r,{isCollection:!s.active})}var o=r.isCollection;return{"toggle-is-collection":{className:"bpmn-icon-parallel-mi-marker",title:n("Collection"),active:o,action:i}}},Jt.prototype._getParticipantMultiplicityHeaderEntries=function(e){var t=this,n=this._bpmnFactory,r=this._translate;function i(a,s){var l=s.active,c;l||(c=n.create("bpmn:ParticipantMultiplicity")),t._modeling.updateProperties(e,{participantMultiplicity:c})}var o=e.businessObject.participantMultiplicity;return{"toggle-participant-multiplicity":{className:"bpmn-icon-parallel-mi-marker",title:r("Participant multiplicity"),active:!!o,action:i}}},Jt.prototype._getAdHocHeaderEntries=function(e){var t=this._translate,n=Q(e),r=P(n,"bpmn:AdHocSubProcess"),i=this._bpmnReplace.replaceElement;return{"toggle-adhoc":{className:"bpmn-icon-ad-hoc-marker",title:t("Ad-hoc"),active:r,action:function(o,a){return r?i(e,{type:"bpmn:SubProcess"},{autoResize:!1,layoutConnection:!1}):i(e,{type:"bpmn:AdHocSubProcess"},{autoResize:!1,layoutConnection:!1})}}}},Jt.prototype._getNonInterruptingHeaderEntries=function(e){const t=this._translate,n=Q(e),r=this,i=ex(e),o=P(e,"bpmn:BoundaryEvent")?z_["intermediate-event-non-interrupting"]:z_["start-event-non-interrupting"],a=!n[i];return{"toggle-non-interrupting":{imageHtml:o,title:t("Toggle non-interrupting"),active:a,action:function(){r._modeling.updateProperties(e,{[i]:!!a})}}}};const X5={__depends__:[Df,Ux,Lf],__init__:["replaceMenuProvider"],replaceMenuProvider:["type",Jt]};function cs(e,t,n,r,i,o,a,s,l,c,u,d,f){e=e||{},r.registerProvider(this),this._contextPad=r,this._modeling=i,this._elementFactory=o,this._connect=a,this._create=s,this._popupMenu=l,this._canvas=c,this._rules=u,this._translate=d,this._eventBus=n,this._appendPreview=f,e.autoPlace!==!1&&(this._autoPlace=t.get("autoPlace",!1)),n.on("create.end",250,function(p){var m=p.context,v=m.shape;if(!(!Ra(p)||!r.isOpen(v))){var g=r.getEntries(v);g.replace&&g.replace.action.click(p,v)}}),n.on("contextPad.close",function(){f.cleanUp()})}cs.$inject=["config.contextPad","injector","eventBus","contextPad","modeling","elementFactory","connect","create","popupMenu","canvas","rules","translate","appendPreview"],cs.prototype.getMultiElementContextPadEntries=function(e){var t=this._modeling,n={};return this._isDeleteAllowed(e)&&j(n,{delete:{group:"edit",className:"bpmn-icon-trash",title:this._translate("Delete"),action:{click:function(r,i){t.removeElements(i.slice())}}}}),n},cs.prototype._isDeleteAllowed=function(e){var t=this._rules.allowed("elements.delete",{elements:e});return me(t)?Ci(e,n=>t.includes(n)):t},cs.prototype.getContextPadEntries=function(e){var t=this._contextPad,n=this._modeling,r=this._elementFactory,i=this._connect,o=this._create,a=this._popupMenu,s=this._autoPlace,l=this._translate,c=this._appendPreview,u={};if(e.type==="label")return this._isDeleteAllowed([e])&&j(u,m()),u;var d=e.businessObject;function f(b,y){i.start(b,y)}function p(b,y){n.removeElements([y])}function m(){return{delete:{group:"edit",className:"bpmn-icon-trash",title:l("Delete"),action:{click:p}}}}function v(b){var y=5,_=t.getPad(b).html,S=_.getBoundingClientRect(),C={x:S.left,y:S.bottom+y};return C}function g(b,y,_,S){function C(R,I){var L=r.createShape(j({type:b},S));o.start(R,L,{source:I})}var $=s?function(R,I){var L=r.createShape(j({type:b},S));s.append(I,L)}:C,M=s?function(R,I){return c.create(I,b,S),()=>{c.cleanUp()}}:null;return{group:"model",className:y,title:_,action:{dragstart:C,click:$,hover:M}}}function x(b){return function(y,_){n.splitLane(_,b),t.open(_,!0)}}if(be(d,["bpmn:Lane","bpmn:Participant"])&&Se(e)){var w=ti(e);j(u,{"lane-insert-above":{group:"lane-insert-above",className:"bpmn-icon-lane-insert-above",title:l("Add lane above"),action:{click:function(b,y){n.addLane(y,"top")}}}}),w.length<2&&((lt(e)?e.height>=120:e.width>=120)&&j(u,{"lane-divide-two":{group:"lane-divide",className:"bpmn-icon-lane-divide-two",title:l("Divide into two lanes"),action:{click:x(2)}}}),(lt(e)?e.height>=180:e.width>=180)&&j(u,{"lane-divide-three":{group:"lane-divide",className:"bpmn-icon-lane-divide-three",title:l("Divide into three lanes"),action:{click:x(3)}}})),j(u,{"lane-insert-below":{group:"lane-insert-below",className:"bpmn-icon-lane-insert-below",title:l("Add lane below"),action:{click:function(b,y){n.addLane(y,"bottom")}}}})}return P(d,"bpmn:FlowNode")&&(P(d,"bpmn:EventBasedGateway")?j(u,{"append.receive-task":g("bpmn:ReceiveTask","bpmn-icon-receive-task",l("Append receive task")),"append.message-intermediate-event":g("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-message",l("Append message intermediate catch event"),{eventDefinitionType:"bpmn:MessageEventDefinition"}),"append.timer-intermediate-event":g("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-timer",l("Append timer intermediate catch event"),{eventDefinitionType:"bpmn:TimerEventDefinition"}),"append.condition-intermediate-event":g("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-condition",l("Append conditional intermediate catch event"),{eventDefinitionType:"bpmn:ConditionalEventDefinition"}),"append.signal-intermediate-event":g("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-signal",l("Append signal intermediate catch event"),{eventDefinitionType:"bpmn:SignalEventDefinition"})}):V_(d,"bpmn:BoundaryEvent","bpmn:CompensateEventDefinition")?j(u,{"append.compensation-activity":g("bpmn:Task","bpmn-icon-task",l("Append compensation activity"),{isForCompensation:!0})}):!P(d,"bpmn:EndEvent")&&!d.isForCompensation&&!V_(d,"bpmn:IntermediateThrowEvent","bpmn:LinkEventDefinition")&&!St(d)&&j(u,{"append.end-event":g("bpmn:EndEvent","bpmn-icon-end-event-none",l("Append end event")),"append.gateway":g("bpmn:ExclusiveGateway","bpmn-icon-gateway-none",l("Append gateway")),"append.append-task":g("bpmn:Task","bpmn-icon-task",l("Append task")),"append.intermediate-event":g("bpmn:IntermediateThrowEvent","bpmn-icon-intermediate-event-none",l("Append intermediate/boundary event"))})),a.isEmpty(e,"bpmn-replace")||j(u,{replace:{group:"edit",className:"bpmn-icon-screw-wrench",title:l("Change element"),action:{click:function(b,y){var _=j(v(y),{cursor:{x:b.x,y:b.y}});a.open(y,"bpmn-replace",_,{title:l("Change element"),width:300,search:!0})}}}}),P(d,"bpmn:SequenceFlow")&&j(u,{"append.text-annotation":g("bpmn:TextAnnotation","bpmn-icon-text-annotation",l("Add text annotation"))}),be(d,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference"])&&j(u,{"append.text-annotation":g("bpmn:TextAnnotation","bpmn-icon-text-annotation",l("Add text annotation")),connect:{group:"connect",className:"bpmn-icon-connection-multi",title:l("Connect to other element"),action:{click:f,dragstart:f}}}),P(d,"bpmn:TextAnnotation")&&j(u,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:l("Connect using association"),action:{click:f,dragstart:f}}}),be(d,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&j(u,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:l("Connect using data input association"),action:{click:f,dragstart:f}}}),P(d,"bpmn:Group")&&j(u,{"append.text-annotation":g("bpmn:TextAnnotation","bpmn-icon-text-annotation",l("Add text annotation"))}),this._isDeleteAllowed([e])&&j(u,m()),u};function V_(e,t,n){var r=e.$instanceOf(t),i=!1,o=e.eventDefinitions||[];return N(o,function(a){a.$type===n&&(i=!0)}),r&&i}const Z5={__depends__:[I5,L_,eb,Jn,Yf,Ac,X5],__init__:["contextPadProvider"],contextPadProvider:["type",cs]};var Q5={horizontal:["x","width"],vertical:["y","height"]},W_=5;function Tr(e,t){this._modeling=e,this._filters=[],this.registerFilter(function(n){var r=t.allowed("elements.distribute",{elements:n});return me(r)?r:r?n:[]})}Tr.$inject=["modeling","rules"],Tr.prototype.registerFilter=function(e){if(typeof e!="function")throw new Error("the filter has to be a function");this._filters.push(e)},Tr.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},Tr.prototype._filterElements=function(e){var t=this._filters,n=this._axis,r=this._dimension,i=[].concat(e);return t.length?(N(t,function(o){i=o(i,n,r)}),i):e},Tr.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=qn(e,r);return N(o,function(a,s){var l=n._findRange(a,r,i),c,u=t[t.length-1];u&&n._hasIntersection(u.range,l)?t[t.length-1].elements.push(a):(c={range:l,elements:[a]},t.push(c))}),t},Tr.prototype._setOrientation=function(e){var t=Q5[e];this._axis=t[0],this._dimension=t[1]},Tr.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)},Tr.prototype._findRange=function(e){var t=e[this._axis],n=e[this._dimension];return{min:t+W_,max:t+n-W_}};const J5={__init__:["distributeElements"],distributeElements:["type",Tr]};function Qc(e){hn.call(this,e)}Qc.$inject=["eventBus"],ie(Qc,hn),Qc.prototype.init=function(){this.addRule("elements.distribute",function(e){var t=e.elements;return t=_e(t,function(n){var r=be(n,["bpmn:Association","bpmn:BoundaryEvent","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:Lane","bpmn:MessageFlow","bpmn:SequenceFlow","bpmn:TextAnnotation"]);return!(n.labelTarget||r)}),t=fl(t),t.length<3?!1:t})};var G_={horizontal:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">
|
|
220
|
+
<polyline points="450 400 450 150 1350 150 1350 400" style="fill:none;stroke:currentColor;stroke-width:100;stroke-linejoin:round;"/>
|
|
221
|
+
<rect x="150" y="450" width="600" height="1200" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>
|
|
222
|
+
<rect x="1050" y="450" width="600" height="800" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>
|
|
223
|
+
</svg>`,vertical:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800">
|
|
224
|
+
<polyline points="400 1350 150 1350 150 450 400 450" style="fill:none;stroke:currentColor;stroke-width:100;stroke-linejoin:round;"/>
|
|
225
|
+
<rect x="450" y="150" width="1200" height="600" rx="1" style="fill:none;stroke:currentColor;stroke-width:100;"></rect>
|
|
226
|
+
<rect x="450" y="1050" width="800" height="600" rx="1" style="fill:currentColor;stroke:currentColor;stroke-width:100;opacity:.5;"></rect>
|
|
227
|
+
</svg>`},eB=900;function us(e,t,n,r){this._distributeElements=t,this._translate=n,this._popupMenu=e,this._rules=r,e.registerProvider("align-elements",eB,this)}us.$inject=["popupMenu","distributeElements","translate","rules"],us.prototype.getPopupMenuEntries=function(e){var t={};return this._isAllowed(e)&&j(t,this._getEntries(e)),t},us.prototype._isAllowed=function(e){return this._rules.allowed("elements.distribute",{elements:e})},us.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:G_.horizontal,action:function(o,a){t.trigger(e,"horizontal"),r.close()}},"distribute-elements-vertical":{group:"distribute",title:n("Distribute elements vertically"),imageHtml:G_.vertical,action:function(o,a){t.trigger(e,"vertical"),r.close()}}};return i};const tB={__depends__:[Df,J5],__init__:["bpmnDistributeElements","distributeElementsMenuProvider"],bpmnDistributeElements:["type",Qc],distributeElementsMenuProvider:["type",us]};var U_="is not a registered action",nB="is already registered";function _n(e,t){this._actions={};var n=this;e.on("diagram.init",function(){n._registerDefaultActions(t),e.fire("editorActions.init",{editorActions:n})})}_n.$inject=["eventBus","injector"],_n.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),l=e.get("keyboardMove",!1),c=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 d=s.allowed("elements.delete",{elements:u}),f;d!==!1&&(me(d)?f=d:f=u,f.length&&n.removeElements(f.slice()))}}),l&&this.register("moveCanvas",function(u){l.moveCanvas(u)}),c&&this.register("moveSelection",function(u){c.moveSelection(u.direction,u.accelerated)})},_n.prototype.trigger=function(e,t){if(!this._actions[e])throw gh(e,U_);return this._actions[e](t)},_n.prototype.register=function(e,t){var n=this;if(typeof e=="string")return this._registerAction(e,t);N(e,function(r,i){n._registerAction(i,r)})},_n.prototype._registerAction=function(e,t){if(this.isRegistered(e))throw gh(e,nB);this._actions[e]=t},_n.prototype.unregister=function(e){if(!this.isRegistered(e))throw gh(e,U_);this._actions[e]=void 0},_n.prototype.getActions=function(){return Object.keys(this._actions)},_n.prototype.isRegistered=function(e){return!!this._actions[e]};function gh(e,t){return new Error(e+" "+t)}const rB={__init__:["editorActions"],editorActions:["type",_n]};function Jc(e){e.invoke(_n,this)}ie(Jc,_n),Jc.$inject=["injector"],Jc.prototype._registerDefaultActions=function(e){_n.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),l=e.get("distributeElements",!1),c=e.get("alignElements",!1),u=e.get("directEditing",!1),d=e.get("searchPad",!1),f=e.get("modeling",!1),p=e.get("contextPad",!1);t&&n&&r&&this._registerAction("selectElements",function(){var m=t.getRootElement(),v=n.filter(function(g){return g!==m});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&&l&&this._registerAction("distributeElements",function(m){var v=r.get(),g=m.type;v.length&&l.trigger(v,g)}),r&&c&&this._registerAction("alignElements",function(m){var v=r.get(),g=[],x=m.type;v.length&&(g=_e(v,function(w){return!P(w,"bpmn:Lane")}),c.trigger(g,x))}),r&&f&&this._registerAction("setColor",function(m){var v=r.get();v.length&&f.setColor(v,m)}),r&&u&&this._registerAction("directEditing",function(){var m=r.get();m.length&&u.activate(m[0])}),d&&this._registerAction("find",function(){d.toggle()}),t&&f&&this._registerAction("moveToOrigin",function(){var m=t.getRootElement(),v,g;P(m,"bpmn:Collaboration")?g=n.filter(function(x){return P(x.parent,"bpmn:Collaboration")}):g=n.filter(function(x){return x!==m&&!P(x.parent,"bpmn:SubProcess")}),v=st(g),f.moveElements(g,{x:-v.x,y:-v.y},m)}),r&&p&&this._registerAction("replaceElement",function(m){p.triggerEntry("replace","click",m)})};const iB={__depends__:[rB],editorActions:["type",Jc]};function q_(e){e.on(["create.init","shape.move.init"],function(t){var n=t.context,r=t.shape;be(r,["bpmn:Participant","bpmn:SubProcess","bpmn:TextAnnotation"])&&(n.gridSnappingContext||(n.gridSnappingContext={}),n.gridSnappingContext.snapLocation="top-left")})}q_.$inject=["eventBus"];var eu=10;function vh(e,t,n){return n||(n="round"),Math[n](e/t)*t}var oB=1200,aB=800;function di(e,t,n){var r=!n||n.active!==!1;this._eventBus=t;var i=this;t.on("diagram.init",aB,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"],oB,function(o){var a=o.originalEvent;if(!(!i.active||a&&Qt(a))){var s=o.context,l=s.gridSnappingContext;l||(l=s.gridSnappingContext={}),["x","y"].forEach(function(c){var u={},d=lB(o,c,e);d&&(u.offset=d);var f=sB(o,c);f&&j(u,f),Io(o,c)||i.snapEvent(o,c,u)})}})}di.prototype.snapEvent=function(e,t,n){var r=this.snapValue(e[t],n);et(e,t,r)},di.prototype.getGridSpacing=function(){return eu},di.prototype.snapValue=function(e,t){var n=0;t&&t.offset&&(n=t.offset),e+=n,e=vh(e,eu);var r,i;return t&&t.min&&(r=t.min,de(r)&&(r=vh(r+n,eu,"ceil"),e=Math.max(e,r))),t&&t.max&&(i=t.max,de(i)&&(i=vh(i+n,eu,"floor"),e=Math.min(e,i))),e-=n,e},di.prototype.isActive=function(){return this.active},di.prototype.setActive=function(e){this.active=e,this._eventBus.fire("gridSnapping.toggle",{active:e})},di.prototype.toggleActive=function(){this.setActive(!this.active)},di.$inject=["elementRegistry","eventBus","config.gridSnapping"];function sB(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&&(tu(t)?(a.x.min=r.left,a.x.max=r.right):(a.y.min=r.top,a.y.max=r.bottom));var l=i.min,c=i.max;return l&&(tu(t)?Y_(s)?a.x.max=l.left:a.x.min=l.right:K_(s)?a.y.max=l.top:a.y.min=l.bottom),c&&(tu(t)?Y_(s)?a.x.min=c.left:a.x.max=c.right:K_(s)?a.y.min=c.top:a.y.max=c.bottom),a[t]}function lB(e,t,n){var r=e.context,i=e.shape,o=r.gridSnappingContext,a=o.snapLocation,s=o.snapOffset;return s&&de(s[t])||(s||(s=o.snapOffset={}),de(s[t])||(s[t]=0),!i)||(n.get(i.id)||(tu(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 tu(e){return e==="x"}function K_(e){return e.indexOf("n")!==-1}function Y_(e){return e.indexOf("w")!==-1}function Ui(e,t){K.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,l=i.newBounds;kt(a)?i.newBounds=n.snapComplex(l,a):i.newBounds=n.snapSimple(s,l)}})}Ui.$inject=["eventBus","gridSnapping","modeling"],ie(Ui,K),Ui.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},Ui.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},Ui.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),j(e,o),e},Ui.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),j(e,o),e};var cB=2e3;function X_(e,t){e.on(["spaceTool.move","spaceTool.end"],cB,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)}})}X_.$inject=["eventBus","gridSnapping"];const uB={__depends__:[{__init__:["gridSnappingResizeBehavior","gridSnappingSpaceToolBehavior"],gridSnappingResizeBehavior:["type",Ui],gridSnappingSpaceToolBehavior:["type",X_]}],__init__:["gridSnapping"],gridSnapping:["type",di]};var dB=2e3;function Z_(e,t,n){e.on("autoPlace",dB,function(r){var i=r.source,o=fe(i),a=r.shape,s=kb(i,a,n);return["x","y"].forEach(function(l){var c={};s[l]!==o[l]&&(s[l]>o[l]?c.min=s[l]:c.max=s[l],P(a,"bpmn:TextAnnotation")&&(fB(l)?c.offset=-a.width/2:c.offset=-a.height/2),s[l]=t.snapValue(s[l],c))}),s})}Z_.$inject=["eventBus","gridSnapping","elementRegistry"];function fB(e){return e==="x"}var pB=1750;function Q_(e,t,n){t.on(["create.start","shape.move.start"],pB,function(r){var i=r.context,o=i.shape,a=e.getRootElement();if(!(!P(o,"bpmn:Participant")||!P(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}))}})}Q_.$inject=["canvas","eventBus","gridSnapping"];var hB=3e3;function nu(e,t,n){K.call(this,e),this._gridSnapping=t;var r=this;this.postExecuted(["connection.create","connection.layout"],hB,function(i){var o=i.context,a=o.connection,s=o.hints||{},l=a.waypoints;s.connectionStart||s.connectionEnd||s.createElementsBehavior===!1||mB(l)&&n.updateWaypoints(a,r.snapMiddleSegments(l))})}nu.$inject=["eventBus","gridSnapping","modeling"],ie(nu,K),nu.prototype.snapMiddleSegments=function(e){var t=this._gridSnapping,n;e=e.slice();for(var r=1;r<e.length-2;r++)n=yB(t,e[r],e[r+1]),e[r]=n[0],e[r+1]=n[1];return e};function mB(e){return e.length>3}function gB(e){return e==="h"}function vB(e){return e==="v"}function yB(e,t,n){var r=pr(t,n),i={};return gB(r)&&(i.y=e.snapValue(t.y)),vB(r)&&(i.x=e.snapValue(t.x)),("x"in i||"y"in i)&&(t=j({},t,i),n=j({},n,i)),[t,n]}const bB={__depends__:[uB,{__init__:["gridSnappingAutoPlaceBehavior","gridSnappingParticipantBehavior","gridSnappingLayoutConnectionBehavior"],gridSnappingAutoPlaceBehavior:["type",Z_],gridSnappingParticipantBehavior:["type",Q_],gridSnappingLayoutConnectionBehavior:["type",nu]}],__init__:["bpmnGridSnapping"],bpmnGridSnapping:["type",q_]};var xB=30,J_=30;function ds(e,t){this._interactionEvents=t;var n=this;e.on(["interactionEvents.createHit","interactionEvents.updateHit"],function(r){var i=r.element,o=r.gfx;if(P(i,"bpmn:Lane"))return n._createParticipantHit(i,o);if(P(i,"bpmn:Participant"))return Se(i)?n._createParticipantHit(i,o):n._createDefaultHit(i,o);if(P(i,"bpmn:SubProcess"))return Se(i)?n._createSubProcessHit(i,o):n._createDefaultHit(i,o)})}ds.$inject=["eventBus","interactionEvents"],ds.prototype._createDefaultHit=function(e,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createDefaultHit(e,t),!0},ds.prototype._createParticipantHit=function(e,t){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});var n=lt(e)?{width:xB,height:e.height}:{width:e.width,height:J_};return this._interactionEvents.createBoxHit(t,"all",n),!0},ds.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:J_}),!0};const _B={__init__:["bpmnInteractionEvents"],bpmnInteractionEvents:["type",ds]};function ru(e){e.invoke(Eo,this)}ie(ru,Eo),ru.$inject=["injector"],ru.prototype.registerBindings=function(e,t){Eo.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 wB={__depends__:[vf],__init__:["keyboardBindings"],keyboardBindings:["type",ru]};var EB={moveSpeed:1,moveSpeedAccelerated:10},SB=1500,ew="left",tw="up",nw="right",rw="down",CB={ArrowLeft:ew,Left:ew,ArrowUp:tw,Up:tw,ArrowRight:nw,Right:nw,ArrowDown:rw,Down:rw},TB={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 iw(e,t,n,r,i){var o=this;this._config=j({},EB,e||{}),t.addListener(SB,function(a){var s=a.keyEvent,l=CB[s.key];if(l&&!t.isCmd(s)){var c=t.isShift(s);return o.moveSelection(l,c),!0}}),this.moveSelection=function(a,s){var l=i.get();if(l.length){var c=this._config[s?"moveSpeedAccelerated":"moveSpeed"],u=TB[a](c),d=r.allowed("elements.move",{shapes:l});d&&n.moveElements(l,u)}}}iw.$inject=["config.keyboardMoveSelection","keyboard","modeling","rules","selection"];const PB={__depends__:[vf,Jn],__init__:["keyboardMoveSelection"],keyboardMoveSelection:["type",iw]};var ow=10;function fs(e,t,n,r){this._dragging=r,this._rules=t;var i=this;function o(l,c){var u=l.shape,d=l.direction,f=l.resizeConstraints,p;l.delta=c,p=hI(u,d,c),l.newBounds=gI(p,f),l.canExecute=i.canResize(l)}function a(l){var c=l.resizeConstraints,u=l.minBounds;c===void 0&&(u===void 0&&(u=i.computeMinResizeBox(l)),l.resizeConstraints={min:ce(u)})}function s(l){var c=l.shape,u=l.canExecute,d=l.newBounds;if(u){if(d=$v(d),!$B(c,d))return;n.resizeShape(c,d)}}e.on("resize.start",function(l){a(l.context)}),e.on("resize.move",function(l){var c={x:l.dx,y:l.dy};o(l.context,c)}),e.on("resize.end",function(l){s(l.context)})}fs.prototype.canResize=function(e){var t=this._rules,n=kn(e,["newBounds","shape","delta","direction"]);return t.allowed("shape.resize",n)},fs.prototype.activate=function(e,t,n){var r=this._dragging,i,o;if(typeof n=="string"&&(n={direction:n}),i=j({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,aw(t,o),"resize",{autoActivate:!0,cursor:RB(o),data:{shape:t,context:i}})},fs.prototype.computeMinResizeBox=function(e){var t=e.shape,n=e.direction,r,i;return r=e.minDimensions||{width:ow,height:ow},i=R0(t,e.childrenBoxPadding),vI(n,t,r,i)},fs.$inject=["eventBus","rules","modeling","dragging"];function $B(e,t){return e.x!==t.x||e.y!==t.y||e.width!==t.width||e.height!==t.height}function aw(e,t){var n=fe(e),r=ce(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 RB(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 sw="djs-resizing",lw="resize-not-ok",AB=500;function cw(e,t,n){function r(o){var a=o.shape,s=o.newBounds,l=o.frame;l||(l=o.frame=n.addFrame(a,t.getActiveLayer()),t.addMarker(a,sw)),s.width>5&&ee(l,{x:s.x,width:s.width}),s.height>5&&ee(l,{y:s.y,height:s.height}),o.canExecute?Ce(l).remove(lw):Ce(l).add(lw)}function i(o){var a=o.shape,s=o.frame;s&&it(o.frame),t.removeMarker(a,sw)}e.on("resize.move",AB,function(o){r(o.context)}),e.on("resize.cleanup",function(o){i(o.context)})}cw.$inject=["eventBus","canvas","previewSupport"];var iu=-6,ou=8,au=20,ps="djs-resizer",OB=["n","w","s","e","nw","ne","se","sw"];function fi(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&&N(a,Dt(i.addResizer,i))}),e.on("shape.changed",function(o){var a=o.element;n.isSelected(a)&&(i.removeResizers(),i.addResizer(a))})}fi.prototype.makeDraggable=function(e,t,n){var r=this._resize;function i(o){Xr(o)&&r.activate(o,e,n)}ge.bind(t,"mousedown",i),ge.bind(t,"touchstart",i)},fi.prototype._createResizer=function(e,t,n,r){var i=this._getResizersParent(),o=MB(r),a=le("g");Ce(a).add(ps),Ce(a).add(ps+"-"+e.id),Ce(a).add(ps+"-"+r),pe(i,a);var s=le("rect");ee(s,{x:-ou/2+o.x,y:-ou/2+o.y,width:ou,height:ou}),Ce(s).add(ps+"-visual"),pe(a,s);var l=le("rect");return ee(l,{x:-au/2+o.x,y:-au/2+o.y,width:au,height:au}),Ce(l).add(ps+"-hit"),pe(a,l),xl(a,t,n),a},fi.prototype.createResizer=function(e,t){var n=aw(e,t),r=this._createResizer(e,n.x,n.y,t);this.makeDraggable(e,r,t)},fi.prototype.addResizer=function(e){var t=this;Be(e)||!this._resize.canResize({shape:e})||N(OB,function(n){t.createResizer(e,n)})},fi.prototype.removeResizers=function(){var e=this._getResizersParent();ll(e)},fi.prototype._getResizersParent=function(){return this._canvas.getLayer("resizers")},fi.$inject=["eventBus","canvas","selection","resize"];function MB(e){var t={x:0,y:0};return e.indexOf("e")!==-1?t.x=-iu:e.indexOf("w")!==-1&&(t.x=iu),e.indexOf("s")!==-1?t.y=-iu:e.indexOf("n")!==-1&&(t.y=iu),t}const uw={__depends__:[tr,_r,Do],__init__:["resize","resizePreview","resizeHandles"],resize:["type",fs],resizePreview:["type",cw],resizeHandles:["type",fi]};var IB=2e3;function hs(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(l){s(l.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"],IB,function(l){r.isActive(l.element)&&r.cancel()}),e.on(["commandStack.changed"],function(l){r.isActive()&&r.cancel()}),e.on("directEditing.activate",function(l){o.removeResizers()}),e.on("create.end",500,function(l){var c=l.context,u=c.shape,d=l.context.canExecute,f=l.isTouch;f||d&&(c.hints&&c.hints.createElementsBehavior===!1||s(u))}),e.on("autoPlace.end",500,function(l){s(l.shape)});function s(l,c){(c||be(l,["bpmn:Task","bpmn:TextAnnotation","bpmn:Participant"])||yh(l))&&r.activate(l)}}hs.$inject=["eventBus","bpmnFactory","canvas","directEditing","modeling","resizeHandles","textRenderer"],hs.prototype.activate=function(e){var t=Zt(e);if(t!==void 0){var n={text:t},r=this.getEditingBBox(e);j(n,r);var i={},o=n.style||{};return j(o,{backgroundColor:null,border:null}),(be(e,["bpmn:Task","bpmn:Participant","bpmn:Lane","bpmn:CallActivity"])||yh(e))&&j(i,{centerVertically:!0}),Mi(e)&&(j(i,{autoResize:!0}),j(o,{backgroundColor:"#ffffff",border:"1px solid #ccc"})),P(e,"bpmn:TextAnnotation")&&(j(i,{resizable:!0,autoResize:!0}),j(o,{backgroundColor:"#ffffff",border:"1px solid #ccc"})),j(n,{options:i,style:o}),n}},hs.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(),l=this._textRenderer.getExternalStyle(),c=l.fontSize*a,u=l.lineHeight,d=s.fontSize*a,f=s.lineHeight,p={fontFamily:this._textRenderer.getDefaultStyle().fontFamily,fontWeight:this._textRenderer.getDefaultStyle().fontWeight};if(P(e,"bpmn:Lane")||BB(e)){var m=lt(e),v=m?{width:r.height,height:30*a,x:r.x-r.height/2+15*a,y:i.y-30*a/2}:{width:r.width,height:30*a};j(o,v),j(p,{fontSize:d+"px",lineHeight:f,paddingTop:7*a+"px",paddingBottom:7*a+"px",paddingLeft:5*a+"px",paddingRight:5*a+"px",transform:m?"rotate(-90deg)":null})}if(NB(e)){var g=lt(e),x=g?{width:r.width,height:r.height}:{width:r.height,height:r.width,x:i.x-r.height/2,y:i.y-r.width/2};j(o,x),j(p,{fontSize:d+"px",lineHeight:f,paddingTop:7*a+"px",paddingBottom:7*a+"px",paddingLeft:5*a+"px",paddingRight:5*a+"px",transform:g?null:"rotate(-90deg)"})}(be(e,["bpmn:Task","bpmn:CallActivity"])||yh(e))&&(j(o,{width:r.width,height:r.height}),j(p,{fontSize:d+"px",lineHeight:f,paddingTop:7*a+"px",paddingBottom:7*a+"px",paddingLeft:5*a+"px",paddingRight:5*a+"px"})),DB(e)&&(j(o,{width:r.width,x:r.x}),j(p,{fontSize:d+"px",lineHeight:f,paddingTop:7*a+"px",paddingBottom:7*a+"px",paddingLeft:5*a+"px",paddingRight:5*a+"px"}));var w=90*a,b=7*a,y=4*a;if(n.labelTarget&&(j(o,{width:w,height:r.height+b+y,x:i.x-w/2,y:r.y-b}),j(p,{fontSize:c+"px",lineHeight:u,paddingTop:b+"px",paddingBottom:y+"px"})),Mi(n)&&!Pl(n)&&!Te(n)){var _=lf(e),S=t.getAbsoluteBBox({x:_.x,y:_.y,width:0,height:0}),C=c+b+y;j(o,{width:w,height:C,x:S.x-w/2,y:S.y-C/2}),j(p,{fontSize:c+"px",lineHeight:u,paddingTop:b+"px",paddingBottom:y+"px"})}return P(e,"bpmn:TextAnnotation")&&(j(o,{width:r.width,height:r.height,minWidth:30*a,minHeight:10*a}),j(p,{textAlign:"left",paddingTop:5*a+"px",paddingBottom:7*a+"px",paddingLeft:7*a+"px",paddingRight:5*a+"px",fontSize:d+"px",lineHeight:f})),{bounds:o,style:p}},hs.prototype.update=function(e,t,n,r){var i,o;P(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}),kB(t)&&(t=null),this._modeling.updateLabel(e,t,i)};function yh(e){return P(e,"bpmn:SubProcess")&&!Se(e)}function DB(e){return P(e,"bpmn:SubProcess")&&Se(e)}function NB(e){return P(e,"bpmn:Participant")&&!Se(e)}function BB(e){return P(e,"bpmn:Participant")&&Se(e)}function kB(e){return!e||!e.trim()}var dw="djs-element-hidden",fw="djs-label-hidden";function pw(e,t,n){var r=this,i=t.getDefaultLayer(),o,a,s;e.on("directEditing.activate",function(l){var c=l.active;if(o=c.element.label||c.element,P(o,"bpmn:TextAnnotation")){a=t.getAbsoluteBBox(o),s=le("g");var u=n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:o.width,containerHeight:o.height,position:{mx:0,my:0}}),d=r.path=le("path");ee(d,{d:u,strokeWidth:2,stroke:LB(o)}),pe(s,d),pe(i,s),gt(s,o.x,o.y)}P(o,"bpmn:TextAnnotation")||o.labelTarget?t.addMarker(o,dw):(P(o,"bpmn:Task")||P(o,"bpmn:CallActivity")||P(o,"bpmn:SubProcess")||P(o,"bpmn:Participant")||P(o,"bpmn:Lane"))&&t.addMarker(o,fw)}),e.on("directEditing.resize",function(l){if(P(o,"bpmn:TextAnnotation")){var c=l.height,u=l.dy,d=Math.max(o.height/a.height*(c+u),0),f=n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:o.width,containerHeight:d,position:{mx:0,my:0}});ee(r.path,{d:f})}}),e.on(["directEditing.complete","directEditing.cancel"],function(l){var c=l.active;c&&(t.removeMarker(c.element.label||c.element,dw),t.removeMarker(o,fw)),o=void 0,a=void 0,s&&(it(s),s=void 0)})}pw.$inject=["eventBus","canvas","pathMap"];function LB(e,t){var n=Pe(e);return n.get("stroke")||t||"black"}const jB={__depends__:[uf,uw,L_],__init__:["labelEditingProvider","labelEditingPreview"],labelEditingProvider:["type",hs],labelEditingPreview:["type",pw]};var FB=new Pa("tt");function HB(e){var t=ke('<div class="djs-tooltip-container" />');return _t(t,{position:"absolute",width:"0",height:"0"}),e.insertBefore(t,e.firstChild),t}function zB(e,t,n){_t(e,{left:t+"px",top:n+"px"})}function bh(e,t){e.style.display=t===!1?"none":""}var hw="djs-tooltip",xh="."+hw;function Bt(e,t){this._eventBus=e,this._canvas=t,this._ids=FB,this._tooltipDefaults={show:{minZoom:.7,maxZoom:5}},this._tooltips={},this._tooltipRoot=HB(t.getContainer());var n=this;jt.bind(this._tooltipRoot,xh,"mousedown",function(r){r.stopPropagation()}),jt.bind(this._tooltipRoot,xh,"mouseover",function(r){n.trigger("mouseover",r)}),jt.bind(this._tooltipRoot,xh,"mouseout",function(r){n.trigger("mouseout",r)}),this._init()}Bt.$inject=["eventBus","canvas"],Bt.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=j({},this._tooltipDefaults,e,{id:t}),this._addTooltip(e),e.timeout&&this.setTimeout(e),t},Bt.prototype.trigger=function(e,t){var n=t.delegateTarget||t.target,r=this.get($t(n,"data-tooltip-id"));r&&(e==="mouseover"&&r.timeout&&this.clearTimeout(r),e==="mouseout"&&r.timeout&&(r.timeout=1e3,this.setTimeout(r)))},Bt.prototype.get=function(e){return typeof e!="string"&&(e=e.id),this._tooltips[e]},Bt.prototype.clearTimeout=function(e){if(e=this.get(e),!!e){var t=e.removeTimer;t&&(clearTimeout(t),e.removeTimer=null)}},Bt.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)}},Bt.prototype.remove=function(e){var t=this.get(e);t&&(Kn(t.html),Kn(t.htmlContainer),delete t.htmlContainer,delete this._tooltips[t.id])},Bt.prototype.show=function(){bh(this._tooltipRoot)},Bt.prototype.hide=function(){bh(this._tooltipRoot,!1)},Bt.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},Bt.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)),kt(n)&&(n=ke(n)),r=ke('<div data-tooltip-id="'+t+'" class="'+hw+'">'),_t(r,{position:"absolute"}),r.appendChild(n),e.type&&Ge(r).add("djs-tooltip-"+e.type),e.className&&Ge(r).add(e.className),e.htmlContainer=r,i.appendChild(r),this._tooltips[t]=e,this._updateTooltip(e)},Bt.prototype._updateTooltip=function(e){var t=e.position,n=e.htmlContainer;zB(n,t.x,t.y)},Bt.prototype._updateTooltipVisibilty=function(e){N(this._tooltips,function(t){var n=t.show,r=t.htmlContainer,i=!0;n&&((n.minZoom>e.scale||n.maxZoom<e.scale)&&(i=!1),bh(r,i))})},Bt.prototype._init=function(){var e=this;function t(n){e._updateRoot(n),e._updateTooltipVisibilty(n),e.show()}this._eventBus.on("canvas.viewbox.changing",function(n){e.hide()}),this._eventBus.on("canvas.viewbox.changed",function(n){t(n.viewbox)})};const VB={__init__:["tooltips"],tooltips:["type",Bt]};var WB="flow elements must be children of pools/participants";function mw(e,t,n){function r(i,o,a){t.add({position:{x:i.x+5,y:i.y+5},type:"error",timeout:2e3,html:"<div>"+o+"</div>"})}e.on(["shape.move.rejected","create.rejected"],function(i){var o=i.context,a=o.shape,s=o.target;P(s,"bpmn:Collaboration")&&P(a,"bpmn:FlowNode")&&r(i,n(WB))})}mw.$inject=["eventBus","tooltips","translate"];const GB={__depends__:[VB],__init__:["modelingFeedback"],modelingFeedback:["type",mw]};var UB=500,qB=1250,KB=1500,su=Math.round;function YB(e){return{x:e.x+su(e.width/2),y:e.y+su(e.height/2)}}function gw(e,t,n,r,i){function o(s,l,c,u){return i.allowed("elements.move",{shapes:s,delta:l,position:c,target:u})}e.on("shape.move.start",KB,function(s){var l=s.context,c=s.shape,u=r.get().slice();u.indexOf(c)===-1&&(u=[c]),u=XB(u),j(l,{shapes:u,validatedShapes:u,shape:c})}),e.on("shape.move.start",qB,function(s){var l=s.context,c=l.validatedShapes,u;if(u=l.canExecute=o(c),!u)return!1}),e.on("shape.move.move",UB,function(s){var l=s.context,c=l.validatedShapes,u=s.hover,d={x:s.dx,y:s.dy},f={x:s.x,y:s.y},p;if(p=o(c,d,f,u),l.delta=d,l.canExecute=p,p===null){l.target=null;return}l.target=u}),e.on("shape.move.end",function(s){var l=s.context,c=l.delta,u=l.canExecute,d=u==="attach",f=l.shapes;if(u===!1)return!1;c.x=su(c.x),c.y=su(c.y),!(c.x===0&&c.y===0)&&n.moveElements(f,c,l.target,{primaryShape:l.shape,attach:d})}),e.on("element.mousedown",function(s){if(Xr(s)){var l=_o(s);if(!l)throw new Error("must supply DOM mousedown event");return a(l,s.element)}});function a(s,l,c,u){if(pt(c)&&(u=c,c=!1),!(l.waypoints||!l.parent)&&!Ce(s.target).has("djs-hit-no-move")){var d=YB(l);return t.init(s,d,"shape.move",{cursor:"grabbing",autoActivate:c,data:{shape:l,context:u||{}}}),!0}}this.start=a}gw.$inject=["eventBus","dragging","modeling","selection","rules"];function XB(e){var t=fo(e,"id");return _e(e,function(n){for(;n=n.parent;)if(t[n.id])return!1;return!0})}var vw=499,_h="djs-dragging",yw="drop-ok",bw="drop-not-ok",xw="new-parent",_w="attach-ok";function ww(e,t,n,r){function i(l){var c=o(l),u=ZB(c);return u}function o(l){var c=ha(l,!0),u=c.flatMap(p=>(p.incoming||[]).concat(p.outgoing||[])),d=c.concat(u),f=[...new Set(d)];return f}function a(l,c){[_w,yw,bw,xw].forEach(function(u){u===c?t.addMarker(l,u):t.removeMarker(l,u)})}function s(l,c,u){r.addDragger(c,l.dragGroup),u&&t.addMarker(c,_h),l.allDraggedElements?l.allDraggedElements.push(c):l.allDraggedElements=[c]}e.on("shape.move.start",vw,function(l){var c=l.context,u=c.shapes,d=c.allDraggedElements,f=i(u);if(!c.dragGroup){var p=le("g");ee(p,n.cls("djs-drag-group",["no-events"]));var m=t.getActiveLayer();pe(m,p),c.dragGroup=p}f.forEach(function(v){r.addDragger(v,c.dragGroup)}),d?d=Rd([d,o(u)]):d=o(u),N(d,function(v){t.addMarker(v,_h)}),c.allDraggedElements=d,c.differentParents=QB(u)}),e.on("shape.move.move",vw,function(l){var c=l.context,u=c.dragGroup,d=c.target,f=c.shape.parent,p=c.canExecute;d&&(p==="attach"?a(d,_w):c.canExecute&&f&&d.id!==f.id?a(d,xw):a(d,c.canExecute?yw:bw)),gt(u,l.dx,l.dy)}),e.on(["shape.move.out","shape.move.cleanup"],function(l){var c=l.context,u=c.target;u&&a(u,null)}),e.on("shape.move.cleanup",function(l){var c=l.context,u=c.allDraggedElements,d=c.dragGroup;N(u,function(f){t.removeMarker(f,_h)}),d&&it(d)}),this.makeDraggable=s}ww.$inject=["eventBus","canvas","styles","previewSupport"];function ZB(e){var t=_e(e,function(n){return Be(n)?Re(e,Bn({id:n.source.id}))&&Re(e,Bn({id:n.target.id})):!0});return t}function QB(e){return fP(fo(e,function(t){return t.parent&&t.parent.id}))!==1}const JB={__depends__:[Fl,Jn,pf,tr,_r,Do],__init__:["move","movePreview"],move:["type",gw],movePreview:["type",ww]};var Ew=".djs-palette-toggle",Sw=".entry",e3=Ew+", "+Sw,wh="djs-palette-",t3="shown",Eh="open",Cw="two-column",n3=1e3;function tt(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()})}tt.$inject=["eventBus","canvas"],tt.prototype.registerProvider=function(e,t){t||(t=e,e=n3),this._eventBus.on("palette.getProviders",e,function(n){n.providers.push(t)}),this._rebuild()},tt.prototype.getEntries=function(){var e=this._getProviders();return e.reduce(i3,{})},tt.prototype._rebuild=function(){if(this._diagramInitialized){var e=this._getProviders();e.length&&(this._container||this._init(),this._update())}},tt.prototype._init=function(){var e=this,t=this._eventBus,n=this._getParentContainer(),r=this._container=ke(tt.HTML_MARKUP);n.appendChild(r),Ge(n).add(wh+t3),jt.bind(r,e3,"click",function(i){var o=i.delegateTarget;if(sl(o,Ew))return e.toggle();e.trigger("click",i)}),ge.bind(r,"mousedown",function(i){i.stopPropagation()}),jt.bind(r,Sw,"dragstart",function(i){e.trigger("dragstart",i)}),t.on("canvas.resized",this._layoutChanged,this),t.fire("palette.create",{container:r})},tt.prototype._getProviders=function(e){var t=this._eventBus.createEvent({type:"palette.getProviders",providers:[]});return this._eventBus.fire(t),t.providers},tt.prototype._toggleState=function(e){e=e||{};var t=this._getParentContainer(),n=this._container,r=this._eventBus,i,o=Ge(n),a=Ge(t);"twoColumn"in e?i=e.twoColumn:i=this._needsCollapse(t.clientHeight,this._entries||{}),o.toggle(Cw,i),a.toggle(wh+Cw,i),"open"in e&&(o.toggle(Eh,e.open),a.toggle(wh+Eh,e.open)),r.fire("palette.changed",{twoColumn:i,open:this.isOpen()})},tt.prototype._update=function(){var e=Ie(".djs-palette-entries",this._container),t=this._entries=this.getEntries();rl(e),N(t,function(n,r){var i=n.group||"default",o=Ie("[data-group="+$a(i)+"]",e);o||(o=ke('<div class="group"></div>'),$t(o,"data-group",i),e.appendChild(o));var a=n.html||(n.separator?'<hr class="separator" />':'<div class="entry" draggable="true"></div>'),s=ke(a);if(o.appendChild(s),!n.separator&&($t(s,"data-action",r),n.title&&$t(s,"title",n.title),n.className&&r3(s,n.className),n.imageUrl)){var l=ke("<img>");$t(l,"src",n.imageUrl),s.appendChild(l)}}),this.open()},tt.prototype.trigger=function(e,t,n){var r,i,o=t.delegateTarget||t.target;return o?(r=$t(o,"data-action"),i=t.originalEvent||t,this.triggerEntry(r,e,i,n)):t.preventDefault()},tt.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(nt(a)){if(t==="click")return a(n,r)}else if(a[t])return a[t](n,r);n.preventDefault()}},tt.prototype._layoutChanged=function(){this._toggleState({})},tt.prototype._needsCollapse=function(e,t){var n=50,r=Object.keys(t).length*46;return e<r+n},tt.prototype.close=function(){this._toggleState({open:!1,twoColumn:!1})},tt.prototype.open=function(){this._toggleState({open:!0})},tt.prototype.toggle=function(){this.isOpen()?this.close():this.open()},tt.prototype.isActiveTool=function(e){return e&&this._activeTool===e},tt.prototype.updateToolHighlight=function(e){var t,n;this._toolsContainer||(t=Ie(".djs-palette-entries",this._container),this._toolsContainer=Ie("[data-group=tools]",t)),n=this._toolsContainer,N(n.children,function(r){var i=r.getAttribute("data-action");if(i){var o=Ge(r);i=i.replace("-tool",""),o.contains("entry")&&i===e?o.add("highlighted-entry"):o.remove("highlighted-entry")}})},tt.prototype.isOpen=function(){return Ge(this._container).has(Eh)},tt.prototype._getParentContainer=function(){return this._canvas.getContainer()},tt.HTML_MARKUP='<div class="djs-palette"><div class="djs-palette-entries"></div><div class="djs-palette-toggle"></div></div>';function r3(e,t){var n=Ge(e),r=me(t)?t:t.split(/\s+/g);r.forEach(function(i){n.add(i)})}function i3(e,t){var n=t.getPaletteEntries();return nt(n)?n(e):(N(n,function(r,i){e[i]=r}),e)}const o3={__init__:["palette"],palette:["type",tt]};var Tw="crosshair";function qi(e,t,n,r,i,o,a){this._selection=i,this._dragging=n,this._mouse=a;var s=this,l={create:function(c){var u=t.getActiveLayer(),d;d=c.frame=le("rect"),ee(d,{class:"djs-lasso-overlay",width:1,height:1,x:0,y:0}),pe(u,d)},update:function(c){var u=c.frame,d=c.bbox;ee(u,{x:d.x,y:d.y,width:d.width,height:d.height})},remove:function(c){c.frame&&it(c.frame)}};o.registerTool("lasso",{tool:"lasso.selection",dragging:"lasso"}),e.on("lasso.selection.end",function(c){var u=c.originalEvent.target;!c.hover&&!(u instanceof SVGElement)||e.once("lasso.selection.ended",function(){s.activateLasso(c.originalEvent,!0)})}),e.on("lasso.end",0,function(c){var u=c.context,d=Sh(c),f=r.filter(function(m){return m}),p=Ll(c);s.select(f,d,p?u.selection:[])}),e.on("lasso.start",function(c){var u=c.context;u.bbox=Sh(c),l.create(u),u.selection=i.get()}),e.on("lasso.move",function(c){var u=c.context;u.bbox=Sh(c),l.update(u)}),e.on("lasso.cleanup",function(c){var u=c.context;l.remove(u)}),e.on("element.mousedown",1500,function(c){if(Ll(c))return s.activateLasso(c.originalEvent),!0})}qi.$inject=["eventBus","canvas","dragging","elementRegistry","selection","toolManager","mouse"],qi.prototype.activateLasso=function(e,t){this._dragging.init(e,"lasso",{autoActivate:t,cursor:Tw,data:{context:{}}})},qi.prototype.activateSelection=function(e,t){this._dragging.init(e,"lasso.selection",{trapClick:!1,autoActivate:t,cursor:Tw,data:{context:{}},keepSelection:!0})},qi.prototype.select=function(e,t,n=[]){var r=i$(e,t);this._selection.select([...n,...Ad(r)])},qi.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateSelection(e,!!e)},qi.prototype.isActive=function(){var e=this._dragging.context();return e&&/^lasso/.test(e.prefix)};function Sh(e){var t={x:e.x-e.dx,y:e.y-e.dy},n={x:e.x,y:e.y},r;return t.x<=n.x&&t.y<n.y||t.x<n.x&&t.y<=n.y?r={x:t.x,y:t.y,width:n.x-t.x,height:n.y-t.y}:t.x>=n.x&&t.y<n.y||t.x>n.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.x&&t.y>=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 a3={__depends__:[Mc,Ga],__init__:["lassoTool"],lassoTool:["type",qi]};var Ch=1500,Pw="grab";function Vo(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",Ch,function(l){if(Ra(l))return a.activateMove(l.originalEvent,!0),!1}),s&&s.addListener(Ch,function(l){if(!(!$w(l.keyEvent)||a.isActive())){var c=a._mouse.getLastMoveEvent();a.activateMove(c,!!c)}},"keyboard.keydown"),s&&s.addListener(Ch,function(l){!$w(l.keyEvent)||!a.isActive()||a.toggle()},"keyboard.keyup"),e.on("hand.end",function(l){var c=l.originalEvent.target;if(!l.hover&&!(c instanceof SVGElement))return!1;e.once("hand.ended",function(){a.activateMove(l.originalEvent,{reactivate:!0})})}),e.on("hand.move.move",function(l){var c=t.viewbox().scale;t.scroll({dx:l.dx*c,dy:l.dy*c})}),e.on("hand.move.end",function(l){var c=l.context,u=c.reactivate;return!Ra(l)&&u&&e.once("hand.move.ended",function(d){a.activateHand(d.originalEvent,!0,!0)}),!1})}Vo.$inject=["eventBus","canvas","dragging","injector","toolManager","mouse"],Vo.prototype.activateMove=function(e,t,n){typeof t=="object"&&(n=t,t=!1),this._dragging.init(e,"hand.move",{autoActivate:t,cursor:Pw,data:{context:n||{}}})},Vo.prototype.activateHand=function(e,t,n){this._dragging.init(e,"hand",{trapClick:!1,autoActivate:t,cursor:Pw,data:{context:{reactivate:n}}})},Vo.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();this.activateHand(e,!!e)},Vo.prototype.isActive=function(){var e=this._dragging.context();return e?/^(hand|hand\.move)$/.test(e.prefix):!1};function $w(e){return ct("Space",e)}const s3={__depends__:[Mc,Ga],__init__:["handTool"],handTool:["type",Vo]};var Rw="connect-ok",Aw="connect-not-ok";function Wo(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(l){var c=l.context,u=l.hover,d=c.canStartConnect=s.canStartConnect(u);d!==null&&(c.startTarget=u,r.addMarker(u,d?Rw:Aw))}),e.on(["global-connect.out","global-connect.cleanup"],function(l){var c=l.context.startTarget,u=l.context.canStartConnect;c&&r.removeMarker(c,u?Rw:Aw)}),e.on(["global-connect.ended"],function(l){var c=l.context,u=c.startTarget,d={x:l.x,y:l.y},f=s.canStartConnect(u);if(f)return e.once("element.out",function(){e.once(["connect.ended","connect.canceled"],function(){e.fire("global-connect.drag.ended")}),n.start(null,u,d)}),!1})}Wo.$inject=["eventBus","dragging","connect","canvas","toolManager","rules","mouse"],Wo.prototype.start=function(e,t){this._dragging.init(e,"global-connect",{autoActivate:t,trapClick:!1,data:{context:{}}})},Wo.prototype.toggle=function(){if(this.isActive())return this._dragging.cancel();var e=this._mouse.getLastMoveEvent();return this.start(e,!!e)},Wo.prototype.isActive=function(){var e=this._dragging.context();return e&&/^global-connect/.test(e.prefix)},Wo.prototype.canStartConnect=function(e){return this._rules.allowed("connection.start",{source:e})};const l3={__depends__:[Yf,tr,_r,Mc,Ga],globalConnect:["type",Wo]};function Th(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)}Th.$inject=["palette","create","elementFactory","spaceTool","lassoTool","handTool","globalConnect","translate"],Th.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 l(d,f,p,m,v){function g(x){var w=n.createShape(j({type:d},v));t.start(x,w)}return{group:f,className:p,title:m,action:{dragstart:g,click:g}}}function c(d){var f=n.createShape({type:"bpmn:SubProcess",x:0,y:0,isExpanded:!0}),p=n.createShape({type:"bpmn:StartEvent",x:40,y:82,parent:f});t.start(d,[f,p],{hints:{autoSelect:[f]}})}function u(d){t.start(d,n.createParticipantShape())}return j(e,{"hand-tool":{group:"tools",className:"bpmn-icon-hand-tool",title:s("Activate hand tool"),action:{click:function(d){o.activateHand(d)}}},"lasso-tool":{group:"tools",className:"bpmn-icon-lasso-tool",title:s("Activate lasso tool"),action:{click:function(d){i.activateSelection(d)}}},"space-tool":{group:"tools",className:"bpmn-icon-space-tool",title:s("Activate create/remove space tool"),action:{click:function(d){r.activateSelection(d)}}},"global-connect-tool":{group:"tools",className:"bpmn-icon-connection-multi",title:s("Activate global connect tool"),action:{click:function(d){a.start(d)}}},"tool-separator":{group:"tools",separator:!0},"create.start-event":l("bpmn:StartEvent","event","bpmn-icon-start-event-none",s("Create start event")),"create.intermediate-event":l("bpmn:IntermediateThrowEvent","event","bpmn-icon-intermediate-event-none",s("Create intermediate/boundary event")),"create.end-event":l("bpmn:EndEvent","event","bpmn-icon-end-event-none",s("Create end event")),"create.exclusive-gateway":l("bpmn:ExclusiveGateway","gateway","bpmn-icon-gateway-none",s("Create gateway")),"create.task":l("bpmn:Task","activity","bpmn-icon-task",s("Create task")),"create.data-object":l("bpmn:DataObjectReference","data-object","bpmn-icon-data-object",s("Create data object reference")),"create.data-store":l("bpmn:DataStoreReference","data-store","bpmn-icon-data-store",s("Create data store reference")),"create.subprocess-expanded":{group:"activity",className:"bpmn-icon-subprocess-expanded",title:s("Create expanded sub-process"),action:{dragstart:c,click:c}},"create.participant-expanded":{group:"collaboration",className:"bpmn-icon-participant",title:s("Create pool/participant"),action:{dragstart:u,click:u}},"create.group":l("bpmn:Group","artifact","bpmn-icon-group",s("Create group"))}),e};const c3={__depends__:[o3,Ac,Qx,a3,s3,l3,Ol],__init__:["paletteProvider"],paletteProvider:["type",Th]};var u3=250;function Ph(e,t,n,r,i){K.call(this,e);function o(s){var l=s.canExecute.replacements;N(l,function(c){var u=c.oldElementId,d={type:c.newElementType};if(!s.visualReplacements[u]){var f=t.get(u);j(d,{x:f.x,y:f.y});var p=n.createShape(d);r.addShape(p,f.parent);var m=Ie('[data-element-id="'+$a(f.id)+'"]',s.dragGroup);m&&ee(m,{display:"none"});var v=i.addDragger(p,s.dragGroup);s.visualReplacements[u]=v,r.removeShape(p)}})}function a(s){var l=s.visualReplacements;N(l,function(c,u){var d=Ie('[data-element-id="'+$a(u)+'"]',s.dragGroup);d&&ee(d,{display:"inline"}),c.remove(),l[u]&&delete l[u]})}e.on("shape.move.move",u3,function(s){var l=s.context,c=l.canExecute;l.visualReplacements||(l.visualReplacements={}),c&&c.replacements?o(l):a(l)})}Ph.$inject=["eventBus","elementRegistry","elementFactory","canvas","previewSupport"],ie(Ph,K);const d3={__depends__:[Do],__init__:["bpmnReplacePreview"],bpmnReplacePreview:["type",Ph]};var f3=1250,$h=40,p3=20,h3=10,Ow=20,Mw=["x","y"],m3=Math.abs;function Iw(e){e.on(["connect.hover","connect.move","connect.end"],f3,function(t){var n=t.context,r=n.canExecute,i=n.start,o=n.hover,a=n.source,s=n.target;t.originalEvent&&Qt(t.originalEvent)||(n.initialConnectionStart||(n.initialConnectionStart=n.connectionStart),r&&o&&g3(t,o,x3(o)),o&&b3(r,["bpmn:Association","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:SequenceFlow"])?(n.connectionStart=mn(i),be(o,["bpmn:Event","bpmn:Gateway"])&&Dw(t,mn(o)),be(o,["bpmn:Task","bpmn:SubProcess"])&&v3(t,o),P(a,"bpmn:BoundaryEvent")&&s===a.host&&y3(t)):Nw(r,"bpmn:MessageFlow")?(P(i,"bpmn:Event")&&(n.connectionStart=mn(i)),P(o,"bpmn:Event")&&Dw(t,mn(o))):n.connectionStart=n.initialConnectionStart)})}Iw.$inject=["eventBus"];function g3(e,t,n){Mw.forEach(function(r){var i=Bw(r,t);e[r]<t[r]+n?et(e,r,t[r]+n):e[r]>t[r]+i-n&&et(e,r,t[r]+i-n)})}function v3(e,t){var n=mn(t);Mw.forEach(function(r){_3(e,t,r)&&et(e,r,n[r])})}function y3(e){var t=e.context,n=t.source,r=t.target;if(!w3(t)){var i=mn(n),o=wt(i,r,-10),a=[];/top|bottom/.test(o)&&a.push("x"),/left|right/.test(o)&&a.push("y"),a.forEach(function(s){var l=e[s],c;m3(l-i[s])<$h&&(l>i[s]?c=i[s]+$h:c=i[s]-$h,et(e,s,c))})}}function Dw(e,t){et(e,"x",t.x),et(e,"y",t.y)}function Nw(e,t){return e&&e.type===t}function b3(e,t){return kr(t,function(n){return Nw(e,n)})}function Bw(e,t){return e==="x"?t.width:t.height}function x3(e){return P(e,"bpmn:Task")?h3:p3}function _3(e,t,n){return e[n]>t[n]+Ow&&e[n]<t[n]+Bw(n,t)-Ow}function w3(e){var t=e.hover,n=e.source;return t&&n&&t===n}function pi(){this._targets={},this._snapOrigins={},this._snapLocations=[],this._defaultSnaps={}}pi.prototype.getSnapOrigin=function(e){return this._snapOrigins[e]},pi.prototype.setSnapOrigin=function(e,t){this._snapOrigins[e]=t,this._snapLocations.indexOf(e)===-1&&this._snapLocations.push(e)},pi.prototype.addDefaultSnap=function(e,t){var n=this._defaultSnaps[e];n||(n=this._defaultSnaps[e]=[]),n.push(t)},pi.prototype.getSnapLocations=function(){return this._snapLocations},pi.prototype.setSnapLocations=function(e){this._snapLocations=e},pi.prototype.pointsForTarget=function(e){var t=e.id||e,n=this._targets[t];return n||(n=this._targets[t]=new lu,n.initDefaults(this._defaultSnaps)),n};function lu(){this._snapValues={}}lu.prototype.add=function(e,t){var n=this._snapValues[e];n||(n=this._snapValues[e]={x:[],y:[]}),n.x.indexOf(t.x)===-1&&n.x.push(t.x),n.y.indexOf(t.y)===-1&&n.y.push(t.y)},lu.prototype.snap=function(e,t,n,r){var i=this._snapValues[t];return i&&jM(e[n],i[n],r)},lu.prototype.initDefaults=function(e){var t=this;N(e||{},function(n,r){N(n,function(i){t.add(r,i)})})};var E3=1250;function rr(e,t,n){var r=this;this._elementRegistry=e,t.on(["create.start","shape.move.start"],function(i){r.initSnap(i)}),t.on(["create.move","create.end","shape.move.move","shape.move.end"],E3,function(i){var o=i.context,a=o.shape,s=o.snapContext,l=o.target;if(!(i.originalEvent&&Qt(i.originalEvent))&&!(Io(i)||!l)){var c=s.pointsForTarget(l);c.initialized||(c=r.addSnapTargetPoints(c,a,l),c.initialized=!0),n.snap(i,c)}}),t.on(["create.cleanup","shape.move.cleanup"],function(){n.hide()})}rr.$inject=["elementRegistry","eventBus","snapping"],rr.prototype.initSnap=function(e){var t=this._elementRegistry,n=e.context,r=n.shape,i=n.snapContext;i||(i=n.snapContext=new pi);var o;t.get(r.id)?o=mn(r,e):o={x:e.x+mn(r).x,y:e.y+mn(r).y};var a={x:o.x-r.width/2,y:o.y-r.height/2},s={x:o.x+r.width/2,y:o.y+r.height/2};return i.setSnapOrigin("mid",{x:o.x-e.x,y:o.y-e.y}),Te(r)||(i.setSnapOrigin("top-left",{x:a.x-e.x,y:a.y-e.y}),i.setSnapOrigin("bottom-right",{x:s.x-e.x,y:s.y-e.y})),i},rr.prototype.addSnapTargetPoints=function(e,t,n){var r=this.getSnapTargets(t,n);return N(r,function(i){if(Te(i)){Te(t)&&e.add("mid",mn(i));return}if(Be(i)){if(i.waypoints.length<3)return;var o=i.waypoints.slice(1,-1);N(o,function(a){e.add("mid",a)});return}e.add("mid",mn(i))}),!de(t.x)||!de(t.y)||this._elementRegistry.get(t.id)&&e.add("mid",mn(t)),e},rr.prototype.getSnapTargets=function(e,t){return h0(t).filter(function(n){return!S3(n)})};function S3(e){return!!e.hidden}var kw=1500;function Go(e,t){t.invoke(rr,this),e.on(["create.move","create.end"],kw,$3),e.on(["create.move","create.end","shape.move.move","shape.move.end"],kw,function(n){var r=n.context,i=r.canExecute,o=r.target,a=i&&(i==="attach"||i.attach);a&&!Io(n)&&C3(n,o)})}ie(Go,rr),Go.$inject=["eventBus","injector"],Go.prototype.initSnap=function(e){var t=rr.prototype.initSnap.call(this,e),n=e.shape,r=!!this._elementRegistry.get(n.id);return N(n.outgoing,function(i){var o=i.waypoints[0];o=o.original||o,t.setSnapOrigin(i.id+"-docking",jw(o,r,e))}),N(n.incoming,function(i){var o=i.waypoints[i.waypoints.length-1];o=o.original||o,t.setSnapOrigin(i.id+"-docking",jw(o,r,e))}),P(n,"bpmn:Participant")&&t.setSnapLocations(["top-left","bottom-right","mid"]),t},Go.prototype.addSnapTargetPoints=function(e,t,n){rr.prototype.addSnapTargetPoints.call(this,e,t,n);var r=this.getSnapTargets(t,n);N(r,function(o){(P3(o)||T3([t,o],"bpmn:TextAnnotation"))&&(e.add("top-left",f0(o)),e.add("bottom-right",p0(o)))});var i=this._elementRegistry;return N(t.incoming,function(o){if(i.get(t.id)){Lw(r,o.source)||e.add("mid",fe(o.source));var a=o.waypoints[0];e.add(o.id+"-docking",a.original||a)}}),N(t.outgoing,function(o){if(i.get(t.id)){Lw(r,o.target)||e.add("mid",fe(o.target));var a=o.waypoints[o.waypoints.length-1];e.add(o.id+"-docking",a.original||a)}}),P(n,"bpmn:SequenceFlow")&&(e=this.addSnapTargetPoints(e,t,n.parent)),e},Go.prototype.getSnapTargets=function(e,t){return rr.prototype.getSnapTargets.call(this,e,t).filter(function(n){return!P(n,"bpmn:Lane")})};function C3(e,t){var n=ce(t),r=dx(e,t),i=e.context,o=i.shape,a;o.parent?a={x:0,y:0}:a=fe(o),/top/.test(r)?et(e,"y",n.top-a.y):/bottom/.test(r)&&et(e,"y",n.bottom-a.y),/left/.test(r)?et(e,"x",n.left-a.x):/right/.test(r)&&et(e,"x",n.right-a.x)}function T3(e,t){return e.every(function(n){return P(n,t)})}function P3(e){return P(e,"bpmn:SubProcess")&&Se(e)?!0:P(e,"bpmn:Participant")}function $3(e){var t=e.context,n=t.createConstraints;if(n){var r=n.top,i=n.right,o=n.bottom,a=n.left;(a&&a>=e.x||i&&i<=e.x)&&et(e,"x",e.x),(r&&r>=e.y||o&&o<=e.y)&&et(e,"y",e.y)}}function Lw(e,t){return e.indexOf(t)!==-1}function jw(e,t,n){return t?{x:e.x-n.x,y:e.y-n.y}:{x:e.x,y:e.y}}var R3=1250;function ms(e,t){var n=this;e.on(["resize.start"],function(r){n.initSnap(r)}),e.on(["resize.move","resize.end"],R3,function(r){var i=r.context,o=i.shape,a=o.parent,s=i.direction,l=i.snapContext;if(!(r.originalEvent&&Qt(r.originalEvent))&&!Io(r)){var c=l.pointsForTarget(a);c.initialized||(c=n.addSnapTargetPoints(c,o,a,s),c.initialized=!0),M3(s)&&et(r,"x",r.x),I3(s)&&et(r,"y",r.y),t.snap(r,c)}}),e.on(["resize.cleanup"],function(){t.hide()})}ms.prototype.initSnap=function(e){var t=e.context,n=t.shape,r=t.direction,i=t.snapContext;i||(i=t.snapContext=new pi);var o=Fw(n,r);return i.setSnapOrigin("corner",{x:o.x-e.x,y:o.y-e.y}),i},ms.prototype.addSnapTargetPoints=function(e,t,n,r){var i=this.getSnapTargets(t,n);return N(i,function(o){e.add("corner",p0(o)),e.add("corner",f0(o))}),e.add("corner",Fw(t,r)),e},ms.$inject=["eventBus","snapping"],ms.prototype.getSnapTargets=function(e,t){return h0(t).filter(function(n){return!A3(n,e)&&!Be(n)&&!O3(n)&&!Te(n)})};function Fw(e,t){var n=fe(e),r=ce(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 A3(e,t){return e.host===t}function O3(e){return!!e.hidden}function M3(e){return e==="n"||e==="s"}function I3(e){return e==="e"||e==="w"}var D3=7,N3=1e3;function hi(e){this._canvas=e,this._asyncHide=Yg(Dt(this.hide,this),N3)}hi.$inject=["canvas"],hi.prototype.snap=function(e,t){var n=e.context,r=n.snapContext,i=r.getSnapLocations(),o={x:Io(e,"x"),y:Io(e,"y")};N(i,function(a){var s=r.getSnapOrigin(a),l={x:e.x+s.x,y:e.y+s.y};if(N(["x","y"],function(c){var u;o[c]||(u=t.snap(l,a,c,D3),u!==void 0&&(o[c]={value:u,originValue:u-s[c]}))}),o.x&&o.y)return!1}),this.showSnapLine("vertical",o.x&&o.x.value),this.showSnapLine("horizontal",o.y&&o.y.value),N(["x","y"],function(a){var s=o[a];pt(s)&&et(e,a,s.originValue)})},hi.prototype._createLine=function(e){var t=this._canvas.getLayer("snap"),n=le("path");return ee(n,{d:"M0,0 L0,0"}),Ce(n).add("djs-snap-line"),pe(t,n),{update:function(r){de(r)?e==="horizontal"?ee(n,{d:"M-100000,"+r+" L+100000,"+r,display:""}):ee(n,{d:"M "+r+",-100000 L "+r+", +100000",display:""}):ee(n,{display:"none"})}}},hi.prototype._createSnapLines=function(){this._snapLines={horizontal:this._createLine("horizontal"),vertical:this._createLine("vertical")}},hi.prototype.showSnapLine=function(e,t){var n=this.getSnapLine(e);n&&n.update(t),this._asyncHide()},hi.prototype.getSnapLine=function(e){return this._snapLines||this._createSnapLines(),this._snapLines[e]},hi.prototype.hide=function(){N(this._snapLines,function(e){e.update()})};const B3={__depends__:[{__init__:["createMoveSnapping","resizeSnapping","snapping"],createMoveSnapping:["type",rr],resizeSnapping:["type",ms],snapping:["type",hi]}],__init__:["connectSnapping","createMoveSnapping"],connectSnapping:["type",Iw],createMoveSnapping:["type",Go]};var Hw=300;function he(e,t,n,r){this._open=!1,this._results={},this._eventMaps=[],this._cachedRootElement=null,this._cachedSelection=null,this._cachedViewbox=null,this._canvas=e,this._eventBus=t,this._selection=n,this._translate=r,this._container=this._getBoxHtml(),this._searchInput=Ie(he.INPUT_SELECTOR,this._container),this._resultsContainer=Ie(he.RESULTS_CONTAINER_SELECTOR,this._container),this._canvas.getContainer().appendChild(this._container),t.on(["canvas.destroy","diagram.destroy","drag.init","elements.changed"],this.close,this)}he.$inject=["canvas","eventBus","selection","translate"],he.prototype._bindEvents=function(){var e=this;function t(n,r,i,o){e._eventMaps.push({el:n,type:i,listener:jt.bind(n,r,i,o)})}t(document,"html","click",function(n){e.close(!1)}),t(this._container,he.INPUT_SELECTOR,"click",function(n){n.stopPropagation(),n.delegateTarget.focus()}),t(this._container,he.RESULT_SELECTOR,"mouseover",function(n){n.stopPropagation(),e._scrollToNode(n.delegateTarget),e._preselect(n.delegateTarget)}),t(this._container,he.RESULT_SELECTOR,"click",function(n){n.stopPropagation(),e._select(n.delegateTarget)}),t(this._container,he.INPUT_SELECTOR,"keydown",function(n){ct("ArrowUp",n)&&n.preventDefault(),ct("ArrowDown",n)&&n.preventDefault()}),t(this._container,he.INPUT_SELECTOR,"keyup",function(n){if(ct("Escape",n))return e.close();if(ct("Enter",n)){var r=e._getCurrentResult();return r?e._select(r):e.close(!1)}if(ct("ArrowUp",n))return e._scrollToDirection(!0);if(ct("ArrowDown",n))return e._scrollToDirection();ct(["ArrowLeft","ArrowRight"],n)||e._search(n.delegateTarget.value)})},he.prototype._unbindEvents=function(){this._eventMaps.forEach(function(e){jt.unbind(e.el,e.type,e.listener)})},he.prototype._search=function(e){var t=this;if(this._clearResults(),!(!e||e==="")){var n=this._searchProvider.find(e);if(n=n.filter(function(i){return!t._canvas.getRootElements().includes(i.element)}),!n.length){this._clearMarkers(),this._selection.select(null);return}n.forEach(function(i){var o=i.element.id,a=t._createResultNode(i,o);t._results[o]={element:i.element,node:a}});var r=Ie(he.RESULT_SELECTOR,this._resultsContainer);this._scrollToNode(r),this._preselect(r)}},he.prototype._scrollToDirection=function(e){var t=this._getCurrentResult();if(t){var n=e?t.previousElementSibling:t.nextElementSibling;n&&(this._scrollToNode(n),this._preselect(n))}},he.prototype._scrollToNode=function(e){if(!(!e||e===this._getCurrentResult())){var t=e.offsetTop,n=this._resultsContainer.scrollTop,r=t-this._resultsContainer.clientHeight+e.clientHeight;t<n?this._resultsContainer.scrollTop=t:n<r&&(this._resultsContainer.scrollTop=r)}},he.prototype._clearResults=function(){rl(this._resultsContainer),this._results={},this._eventBus.fire("searchPad.cleared")},he.prototype._clearMarkers=function(){for(var e in this._results)this._canvas.removeMarker(this._results[e].element,"djs-search-preselected")},he.prototype._getCurrentResult=function(){return Ie(he.RESULT_SELECTED_SELECTOR,this._resultsContainer)},he.prototype._createResultNode=function(e,t){var n=ke(he.RESULT_HTML);return e.primaryTokens.length>0&&zw(n,e.primaryTokens,he.RESULT_PRIMARY_HTML),zw(n,e.secondaryTokens,he.RESULT_SECONDARY_HTML),$t(n,he.RESULT_ID_ATTRIBUTE,t),this._resultsContainer.appendChild(n),n},he.prototype.registerProvider=function(e){this._searchProvider=e},he.prototype.open=function(){if(!this._searchProvider)throw new Error("no search provider registered");this.isOpen()||(this._cachedRootElement=this._canvas.getRootElement(),this._cachedSelection=this._selection.get(),this._cachedViewbox=this._canvas.viewbox(),this._bindEvents(),this._open=!0,Ge(this._canvas.getContainer()).add("djs-search-open"),Ge(this._container).add("open"),this._searchInput.focus(),this._eventBus.fire("searchPad.opened"))},he.prototype.close=function(e=!0){this.isOpen()&&(e&&(this._cachedRootElement&&this._canvas.setRootElement(this._cachedRootElement),this._cachedSelection&&this._selection.select(this._cachedSelection),this._cachedViewbox&&this._canvas.viewbox(this._cachedViewbox),this._eventBus.fire("searchPad.restored")),this._cachedRootElement=null,this._cachedSelection=null,this._cachedViewbox=null,this._unbindEvents(),this._open=!1,Ge(this._canvas.getContainer()).remove("djs-search-open"),Ge(this._container).remove("open"),this._clearMarkers(),this._clearResults(),this._searchInput.value="",this._searchInput.blur(),this._eventBus.fire("searchPad.closed"))},he.prototype.toggle=function(){this.isOpen()?this.close():this.open()},he.prototype.isOpen=function(){return this._open},he.prototype._preselect=function(e){var t=this._getCurrentResult();if(e!==t){this._clearMarkers(),t&&Ge(t).remove(he.RESULT_SELECTED_CLASS);var n=$t(e,he.RESULT_ID_ATTRIBUTE),r=this._results[n].element;Ge(e).add(he.RESULT_SELECTED_CLASS),this._canvas.scrollToElement(r,{top:Hw}),this._selection.select(r),this._canvas.addMarker(r,"djs-search-preselected"),this._eventBus.fire("searchPad.preselected",r)}},he.prototype._select=function(e){var t=$t(e,he.RESULT_ID_ATTRIBUTE),n=this._results[t].element;this._cachedSelection=null,this._cachedViewbox=null,this.close(!1),this._canvas.scrollToElement(n,{top:Hw}),this._selection.select(n),this._eventBus.fire("searchPad.selected",n)},he.prototype._getBoxHtml=function(){const e=ke(he.BOX_HTML),t=Ie(he.INPUT_SELECTOR,e);return t&&t.setAttribute("aria-label",this._translate("Search in diagram")),e};function zw(e,t,n){var r=k3(t),i=ke(n);i.innerHTML=r,e.appendChild(i)}function k3(e){var t="";return e.forEach(function(n){n.matched?t+='<b class="'+he.RESULT_HIGHLIGHT_CLASS+'">'+ff(n.matched)+"</b>":t+=ff(n.normal)}),t!==""?t:null}he.CONTAINER_SELECTOR=".djs-search-container",he.INPUT_SELECTOR=".djs-search-input input",he.RESULTS_CONTAINER_SELECTOR=".djs-search-results",he.RESULT_SELECTOR=".djs-search-result",he.RESULT_SELECTED_CLASS="djs-search-result-selected",he.RESULT_SELECTED_SELECTOR="."+he.RESULT_SELECTED_CLASS,he.RESULT_ID_ATTRIBUTE="data-result-id",he.RESULT_HIGHLIGHT_CLASS="djs-search-highlight",he.BOX_HTML=`<div class="djs-search-container djs-scrollable">
|
|
228
|
+
<div class="djs-search-input">
|
|
229
|
+
<svg class="djs-search-icon" width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
230
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.0325 8.5H9.625L13.3675 12.25L12.25 13.3675L8.5 9.625V9.0325L8.2975 8.8225C7.4425 9.5575 6.3325 10 5.125 10C2.4325 10 0.25 7.8175 0.25 5.125C0.25 2.4325 2.4325 0.25 5.125 0.25C7.8175 0.25 10 2.4325 10 5.125C10 6.3325 9.5575 7.4425 8.8225 8.2975L9.0325 8.5ZM1.75 5.125C1.75 6.9925 3.2575 8.5 5.125 8.5C6.9925 8.5 8.5 6.9925 8.5 5.125C8.5 3.2575 6.9925 1.75 5.125 1.75C3.2575 1.75 1.75 3.2575 1.75 5.125Z" fill="#22242A"/>
|
|
231
|
+
</svg>
|
|
232
|
+
<input type="text" spellcheck="false" />
|
|
233
|
+
</div>
|
|
234
|
+
<div class="djs-search-results" />
|
|
235
|
+
</div>`,he.RESULT_HTML='<div class="djs-search-result"></div>',he.RESULT_PRIMARY_HTML='<div class="djs-search-result-primary"></div>',he.RESULT_SECONDARY_HTML='<p class="djs-search-result-secondary"></p>';const L3={__depends__:[Ol,Dl,Jn],searchPad:["type",he]};function Rh(e,t,n){this._elementRegistry=e,this._canvas=n,t.registerProvider(this)}Rh.$inject=["elementRegistry","searchPad","canvas"],Rh.prototype.find=function(e){var t=this._canvas.getRootElements(),n=this._elementRegistry.filter(function(r){return!Te(r)&&!t.includes(r)});return n.reduce(function(r,i){var o=Zt(i),a=Gw(o,e),s=Gw(i.id,e);return cu(a)||cu(s)?[...r,{primaryTokens:a,secondaryTokens:s,element:i}]:r},[]).sort(function(r,i){return Vw(r.primaryTokens,i.primaryTokens)||Vw(r.secondaryTokens,i.secondaryTokens)||Ww(Zt(r.element),Zt(i.element))||Ww(r.element.id,i.element.id)}).map(function(r){return{element:r.element,primaryTokens:r.primaryTokens.map(function(i){return un(i,["index"])}),secondaryTokens:r.secondaryTokens.map(function(i){return un(i,["index"])})}})};function Ah(e){return"matched"in e}function cu(e){return e.find(Ah)}function Vw(e,t){const n=cu(e),r=cu(t);if(n&&!r)return-1;if(!n&&r)return 1;if(!n&&!r)return 0;const i=e.find(Ah),o=t.find(Ah);return i.index<o.index?-1:i.index>o.index?1:0}function Ww(e="",t=""){return e.localeCompare(t)}function Gw(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.slice(0,i),index:0}),n.push({matched:r.slice(i,i+t.length),index:i}),t.length+i<e.length&&n.push({normal:r.slice(i+t.length),index:i+t.length})):n.push({normal:r,index:0}),n}const j3={__depends__:[L3],__init__:["bpmnSearch"],bpmnSearch:["type",Rh]};var F3='<?xml version="1.0" encoding="UTF-8"?><bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" targetNamespace="http://bpmn.io/schema/bpmn" id="Definitions_1"><bpmn:process id="Process_1" isExecutable="false"><bpmn:startEvent id="StartEvent_1"/></bpmn:process><bpmndi:BPMNDiagram id="BPMNDiagram_1"><bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1"><bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"><dc:Bounds height="36.0" width="36.0" x="173.0" y="102.0"/></bpmndi:BPMNShape></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn:definitions>';function wn(e){Ea.call(this,e)}ie(wn,Ea),wn.Viewer=Zr,wn.NavigatedViewer=Oa,wn.prototype.createDiagram=function(){return this.importXML(F3)},wn.prototype._interactionModules=[Vy,qy,Xy],wn.prototype._modelingModules=[QO,Lf,_M,mM,HM,Yf,qM,Z5,Hx,Ac,tB,iB,bB,_B,wB,PB,jB,D_,GB,JB,c3,d3,uw,B3,j3],wn.prototype._modules=[].concat(Zr.prototype._modules,wn.prototype._interactionModules,wn.prototype._modelingModules);function H3(e){return h.getCurrentScope()?(h.onScopeDispose(e),!0):!1}function Oh(e){return typeof e=="function"?e():h.unref(e)}const z3=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const V3=Object.prototype.toString,W3=e=>V3.call(e)==="[object Object]",G3=()=>{};function U3(e,t){function n(...r){return new Promise((i,o)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(i).catch(o)})}return n}const Uw=e=>e();function q3(e=Uw){const t=h.ref(!0);function n(){t.value=!1}function r(){t.value=!0}const i=(...o)=>{t.value&&e(...o)};return{isActive:h.readonly(t),pause:n,resume:r,eventFilter:i}}function K3(e){return h.getCurrentInstance()}function Y3(e,t,n={}){const{eventFilter:r=Uw,...i}=n;return h.watch(e,U3(r,t),i)}function X3(e,t,n={}){const{eventFilter:r,...i}=n,{eventFilter:o,pause:a,resume:s,isActive:l}=q3(r);return{stop:Y3(e,t,{...i,eventFilter:o}),pause:a,resume:s,isActive:l}}function Z3(e,t=!0,n){K3()?h.onMounted(e,n):t?e():h.nextTick(e)}const Mh=z3?window:void 0;function Q3(e){var t;const n=Oh(e);return(t=n==null?void 0:n.$el)!=null?t:n}function qw(...e){let t,n,r,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,i]=e,t=Mh):[t,n,r,i]=e,!t)return G3;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],a=()=>{o.forEach(u=>u()),o.length=0},s=(u,d,f,p)=>(u.addEventListener(d,f,p),()=>u.removeEventListener(d,f,p)),l=h.watch(()=>[Q3(t),Oh(i)],([u,d])=>{if(a(),!u)return;const f=W3(d)?{...d}:d;o.push(...n.flatMap(p=>r.map(m=>s(u,p,m,f))))},{immediate:!0,flush:"post"}),c=()=>{l(),a()};return H3(c),c}const uu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},du="__vueuse_ssr_handlers__",J3=ek();function ek(){return du in uu||(uu[du]=uu[du]||{}),uu[du]}function tk(e,t){return J3[e]||t}function nk(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const rk={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Kw="vueuse-storage";function Yw(e,t,n,r={}){var i;const{flush:o="pre",deep:a=!0,listenToStorageChanges:s=!0,writeDefaults:l=!0,mergeDefaults:c=!1,shallow:u,window:d=Mh,eventFilter:f,onError:p=R=>{console.error(R)},initOnMounted:m}=r,v=(u?h.shallowRef:h.ref)(typeof t=="function"?t():t);if(!n)try{n=tk("getDefaultStorage",()=>{var R;return(R=Mh)==null?void 0:R.localStorage})()}catch(R){p(R)}if(!n)return v;const g=Oh(t),x=nk(g),w=(i=r.serializer)!=null?i:rk[x],{pause:b,resume:y}=X3(v,()=>S(v.value),{flush:o,deep:a,eventFilter:f});d&&s&&Z3(()=>{n instanceof Storage?qw(d,"storage",$):qw(d,Kw,M),m&&$()}),m||$();function _(R,I){if(d){const L={key:e,oldValue:R,newValue:I,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",L):new CustomEvent(Kw,{detail:L}))}}function S(R){try{const I=n.getItem(e);if(R==null)_(I,null),n.removeItem(e);else{const L=w.write(R);I!==L&&(n.setItem(e,L),_(I,L))}}catch(I){p(I)}}function C(R){const I=R?R.newValue:n.getItem(e);if(I==null)return l&&g!=null&&n.setItem(e,w.write(g)),g;if(!R&&c){const L=w.read(I);return typeof c=="function"?c(L,g):x==="object"&&!Array.isArray(L)?{...g,...L}:L}else return typeof I!="string"?I:w.read(I)}function $(R){if(!(R&&R.storageArea!==n)){if(R&&R.key==null){v.value=g;return}if(!(R&&R.key!==e)){b();try{(R==null?void 0:R.newValue)!==w.write(v.value)&&(v.value=C(R))}catch(I){p(I)}finally{R?h.nextTick(y):y()}}}}function M(R){$(R.detail)}return v}const gs=Yw("witlink-http-config",{}),fu=aP.create({baseURL:gs.value.baseUrl,timeout:6e3});h.watch(gs,()=>{gs.value.baseUrl&&(fu.defaults.baseURL=gs.value.baseUrl)});function ik(e){const t=gs.value.token;return t&&(e.headers={...e.headers,"Access-Token":t}),e}function ok(e){const t=e.data;return!(t instanceof Blob)&&(!t||t.code===void 0)?Gn.notification.error({message:"Error in return value",description:"result: "+t}):!(t instanceof Blob)&&t.code<0&&(Gn.notification.error({message:t.code,description:t.message}),t.result=null),e}function ak(e){if(e.response){const t=e.response.data;e.response.status===403?Gn.notification.error({message:"Forbidden",description:t.message}):e.response.status===401&&Gn.notification.error({message:"Unauthorized",description:"Authorization verification failed"})}else Gn.notification.error({message:"Unknow error",description:e+""});return Promise.reject(e)}fu.interceptors.request.use(ik,e=>Promise.reject(e)),fu.interceptors.response.use(ok,ak);function Ih(e){return fu(e).then(t=>t.data)}const Xw={getBpmnByCode:e=>Ih({url:"/workorder/api/flow/bpmn/update-load",method:"get",params:e}),bpmnInsert:e=>Ih({url:"/workorder/api/flow/bpmn/insert",method:"post",data:e}),bpmnUpdate:e=>Ih({url:"/workorder/api/flow/bpmn/update",method:"post",data:e})};function vs(e){"@babel/helpers - typeof";return vs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vs(e)}function sk(e,t){if(vs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(vs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lk(e){var t=sk(e,"string");return vs(t)=="symbol"?t:t+""}function ck(e,t,n){return(t=lk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zw(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 ne(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zw(Object(n),!0).forEach(function(r){ck(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O.apply(null,arguments)}const uk=e=>typeof e=="function",dk=Array.isArray,fk=e=>typeof e=="string",pk=e=>e!==null&&typeof e=="object",hk=/^on[^a-z]/,mk=e=>hk.test(e),Qw=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},gk=/-(\w)/g,Jw=Qw(e=>e.replace(gk,(t,n)=>n?n.toUpperCase():"")),vk=/\B([A-Z])/g,yk=Qw(e=>e.replace(vk,"-$1").toLowerCase()),bk=Object.prototype.hasOwnProperty,e1=(e,t)=>bk.call(e,t);function xk(e,t,n,r){const i=e[n];if(i!=null){const o=e1(i,"default");if(o&&r===void 0){const a=i.default;r=i.type!==Function&&uk(a)?a():a}i.type===Boolean&&(!e1(t,n)&&!o?r=!1:r===""&&(r=!0))}return r}function _k(e){return Object.keys(e).reduce((t,n)=>((n.startsWith("data-")||n.startsWith("aria-"))&&(t[n]=e[n]),t),{})}function xe(){const e=[];for(let t=0;t<arguments.length;t++){const n=t<0||arguments.length<=t?void 0:arguments[t];if(n){if(fk(n))e.push(n);else if(dk(n))for(let r=0;r<n.length;r++){const i=xe(n[r]);i&&e.push(i)}else if(pk(n))for(const r in n)n[r]&&e.push(r)}}return e.join(" ")}var t1=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(i,o){return i[0]===n?(r=o,!0):!1}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},t.prototype.set=function(n,r){var i=e(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,i=e(r,n);~i&&r.splice(i,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,o=this.__entries__;i<o.length;i++){var a=o[i];n.call(r,a[1],a[0])}},t}()}(),Dh=typeof window<"u"&&typeof document<"u"&&window.document===document,pu=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),wk=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(pu):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),Ek=2;function Sk(e,t){var n=!1,r=!1,i=0;function o(){n&&(n=!1,e()),r&&s()}function a(){wk(o)}function s(){var l=Date.now();if(n){if(l-i<Ek)return;r=!0}else n=!0,r=!1,setTimeout(a,t);i=l}return s}var Ck=20,Tk=["top","right","bottom","left","width","height","size","weight"],Pk=typeof MutationObserver<"u",$k=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Sk(this.refresh.bind(this),Ck)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!Dh||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Pk?(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(){!Dh||!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=Tk.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}(),n1=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},Uo=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||pu},r1=mu(0,0,0,0);function hu(e){return parseFloat(e)||0}function i1(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,i){var o=e["border-"+i+"-width"];return r+hu(o)},0)}function Rk(e){for(var t=["top","right","bottom","left"],n={},r=0,i=t;r<i.length;r++){var o=i[r],a=e["padding-"+o];n[o]=hu(a)}return n}function Ak(e){var t=e.getBBox();return mu(0,0,t.width,t.height)}function Ok(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return r1;var r=Uo(e).getComputedStyle(e),i=Rk(r),o=i.left+i.right,a=i.top+i.bottom,s=hu(r.width),l=hu(r.height);if(r.boxSizing==="border-box"&&(Math.round(s+o)!==t&&(s-=i1(r,"left","right")+o),Math.round(l+a)!==n&&(l-=i1(r,"top","bottom")+a)),!Ik(e)){var c=Math.round(s+o)-t,u=Math.round(l+a)-n;Math.abs(c)!==1&&(s-=c),Math.abs(u)!==1&&(l-=u)}return mu(i.left,i.top,s,l)}var Mk=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Uo(e).SVGGraphicsElement}:function(e){return e instanceof Uo(e).SVGElement&&typeof e.getBBox=="function"}}();function Ik(e){return e===Uo(e).document.documentElement}function Dk(e){return Dh?Mk(e)?Ak(e):Ok(e):r1}function Nk(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,a=Object.create(o.prototype);return n1(a,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),a}function mu(e,t,n,r){return{x:e,y:t,width:n,height:r}}var Bk=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=mu(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=Dk(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),kk=function(){function e(t,n){var r=Nk(n);n1(this,{target:t,contentRect:r})}return e}(),Lk=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new t1,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=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 Uo(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new Bk(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 Uo(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 kk(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}(),o1=typeof WeakMap<"u"?new WeakMap:new t1,a1=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=$k.getInstance(),r=new Lk(t,n,this);o1.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){a1.prototype[e]=function(){var t;return(t=o1.get(this))[e].apply(t,arguments)}});var s1=function(){return typeof pu.ResizeObserver<"u"?pu.ResizeObserver:a1}();const jk=e=>e!=null&&e!=="",qo=(e,t)=>{const n=O({},e);return Object.keys(t).forEach(r=>{const i=n[r];if(i)i.type||i.default?i.default=t[r]:i.def?i.def(t[r]):n[r]={type:i,default:t[r]};else throw new Error(`not have ${r} prop`)}),n},Fk=e=>{const t=Object.keys(e),n={},r={},i={};for(let o=0,a=t.length;o<a;o++){const s=t[o];mk(s)?(n[s[2].toLowerCase()+s.slice(3)]=e[s],r[s]=e[s]):i[s]=e[s]}return{onEvents:r,events:n,extraAttrs:i}},Hk=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n={},r=/;(?![^(]*\))/g,i=/:(.+)/;return typeof e=="object"?e:(e.split(r).forEach(function(o){if(o){const a=o.split(i);if(a.length>1){const s=t?Jw(a[0].trim()):a[0].trim();n[s]=a[1].trim()}}}),n)},zk=(e,t)=>e[t]!==void 0,Vk=Symbol("skipFlatten"),en=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=Array.isArray(e)?e:[e],r=[];return n.forEach(i=>{Array.isArray(i)?r.push(...en(i,t)):i&&i.type===h.Fragment?i.key===Vk?r.push(i):r.push(...en(i.children,t)):i&&h.isVNode(i)?t&&!Nh(i)?r.push(i):t||r.push(i):jk(i)&&r.push(i)}),r},Wk=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(h.isVNode(e))return e.type===h.Fragment?t==="default"?en(e.children):[]:e.children&&e.children[t]?en(e.children[t](n)):[];{const r=e.$slots[t]&&e.$slots[t](n);return en(r)}},mi=e=>{var t;let n=((t=e==null?void 0:e.vnode)===null||t===void 0?void 0:t.el)||e&&(e.$el||e);for(;n&&!n.tagName;)n=n.nextSibling;return n},Gk=e=>{const t={};if(e.$&&e.$.vnode){const n=e.$.vnode.props||{};Object.keys(e.$props).forEach(r=>{const i=e.$props[r],o=yk(r);(i!==void 0||o in n)&&(t[r]=i)})}else if(h.isVNode(e)&&typeof e.type=="object"){const n=e.props||{},r={};Object.keys(n).forEach(o=>{r[Jw(o)]=n[o]});const i=e.type.props||{};Object.keys(i).forEach(o=>{const a=xk(i,r,o,r[o]);(a!==void 0||o in r)&&(t[o]=a)})}return t},Uk=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i;if(e.$){const o=e[t];if(o!==void 0)return typeof o=="function"&&r?o(n):o;i=e.$slots[t],i=r&&i?i(n):i}else if(h.isVNode(e)){const o=e.props&&e.props[t];if(o!==void 0&&e.props!==null)return typeof o=="function"&&r?o(n):o;e.type===h.Fragment?i=e.children:e.children&&e.children[t]&&(i=e.children[t],i=r&&i?i(n):i)}return Array.isArray(i)&&(i=en(i),i=i.length===1?i[0]:i,i=i.length===0?void 0:i),i};function l1(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n={};return e.$?n=O(O({},n),e.$attrs):n=O(O({},n),e.props),Fk(n)[t?"onEvents":"events"]}function qk(e,t){let r=((h.isVNode(e)?e.props:e.$attrs)||{}).style||{};return typeof r=="string"&&(r=Hk(r,t)),r}function Kk(e){return e.length===1&&e[0].type===h.Fragment}function Nh(e){return e&&(e.type===h.Comment||e.type===h.Fragment&&e.children.length===0||e.type===h.Text&&e.children.trim()==="")}function Pr(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const t=[];return e.forEach(n=>{Array.isArray(n)?t.push(...n):(n==null?void 0:n.type)===h.Fragment?t.push(...Pr(n.children)):t.push(n)}),t.filter(n=>!Nh(n))}function gu(e){return Array.isArray(e)&&e.length===1&&(e=e[0]),e&&e.__v_isVNode&&typeof e.type!="symbol"}function Yk(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"default";var r,i;return(r=t[n])!==null&&r!==void 0?r:(i=e[n])===null||i===void 0?void 0:i.call(e)}const Xk=h.defineComponent({compatConfig:{MODE:3},name:"ResizeObserver",props:{disabled:Boolean,onResize:Function},emits:["resize"],setup(e,t){let{slots:n}=t;const r=h.reactive({width:0,height:0,offsetHeight:0,offsetWidth:0});let i=null,o=null;const a=()=>{o&&(o.disconnect(),o=null)},s=u=>{const{onResize:d}=e,f=u[0].target,{width:p,height:m}=f.getBoundingClientRect(),{offsetWidth:v,offsetHeight:g}=f,x=Math.floor(p),w=Math.floor(m);if(r.width!==x||r.height!==w||r.offsetWidth!==v||r.offsetHeight!==g){const b={width:x,height:w,offsetWidth:v,offsetHeight:g};O(r,b),d&&Promise.resolve().then(()=>{d(O(O({},b),{offsetWidth:v,offsetHeight:g}),f)})}},l=h.getCurrentInstance(),c=()=>{const{disabled:u}=e;if(u){a();return}const d=mi(l);d!==i&&(a(),i=d),!o&&d&&(o=new s1(s),o.observe(d))};return h.onMounted(()=>{c()}),h.onUpdated(()=>{c()}),h.onUnmounted(()=>{a()}),h.watch(()=>e.disabled,()=>{c()},{flush:"post"}),()=>{var u;return(u=n.default)===null||u===void 0?void 0:u.call(n)[0]}}});let c1=e=>setTimeout(e,16),u1=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(c1=e=>window.requestAnimationFrame(e),u1=e=>window.cancelAnimationFrame(e));let d1=0;const Bh=new Map;function f1(e){Bh.delete(e)}function Tt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;d1+=1;const n=d1;function r(i){if(i===0)f1(n),e();else{const o=c1(()=>{r(i-1)});Bh.set(n,o)}}return r(t),n}Tt.cancel=e=>{const t=Bh.get(e);return f1(t),u1(t)};const gi=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t},kh=e=>{const t=e;return t.install=function(n){n.component(t.displayName||t.name,e)},e};function vu(){return{type:[Function,Array]}}function En(e){return{type:Object,default:e}}function Oe(e){return{type:Boolean,default:e}}function Ue(e){return{type:Function,default:e}}function Hn(e,t){const n={validator:()=>!0,default:e};return n}function Ko(e){return{type:Array,default:e}}function Sn(e){return{type:String,default:e}}function $r(e,t){return e?{type:e,default:t}:Hn(t)}let Ki=!1;try{const e=Object.defineProperty({},"passive",{get(){Ki=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch{}function ys(e,t,n,r){if(e&&e.addEventListener){let i=r;i===void 0&&Ki&&(t==="touchstart"||t==="touchmove"||t==="wheel")&&(i={passive:!1}),e.addEventListener(t,n,i)}return{remove:()=>{e&&e.removeEventListener&&e.removeEventListener(t,n)}}}const Zk="anticon",Qk=Symbol("GlobalFormContextKey"),Jk=()=>h.inject(Qk,{validateMessages:h.computed(()=>{})}),p1=Symbol("configProvider"),h1={getPrefixCls:(e,t)=>t||(e?`ant-${e}`:"ant"),iconPrefixCls:h.computed(()=>Zk),getPopupContainer:h.computed(()=>()=>document.body),direction:h.computed(()=>"ltr")},eL=()=>h.inject(p1,h1),m1=Symbol("DisabledContextKey"),vi=()=>h.inject(m1,h.ref(void 0)),tL=e=>{const t=vi();return h.provide(m1,h.computed(()=>{var n;return(n=e.value)!==null&&n!==void 0?n:t.value})),e},nL={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",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"},rL={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"},g1={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},v1={lang:O({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"]},rL),timePickerLocale:O({},g1)},tn="${label} is not a valid ${type}",yu={locale:"en",Pagination:nL,DatePicker:v1,TimePicker:g1,Calendar:v1,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:tn,method:tn,array:tn,object:tn,number:tn,date:tn,boolean:tn,integer:tn,float:tn,regexp:tn,email:tn,url:tn,hex:tn},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",scanned:"Scanned"}},iL=h.defineComponent({compatConfig:{MODE:3},name:"LocaleReceiver",props:{componentName:String,defaultLocale:{type:[Object,Function]},children:{type:Function}},setup(e,t){let{slots:n}=t;const r=h.inject("localeData",{}),i=h.computed(()=>{const{componentName:a="global",defaultLocale:s}=e,l=s||yu[a||"global"],{antLocale:c}=r,u=a&&c?c[a]:{};return O(O({},typeof l=="function"?l():l),u||{})}),o=h.computed(()=>{const{antLocale:a}=r,s=a&&a.locale;return a&&a.exist&&!s?yu.locale:s});return()=>{const a=e.children||n.default,{antLocale:s}=r;return a==null?void 0:a(i.value,o.value,s)}}});function oL(e,t,n){const r=h.inject("localeData",{});return[h.computed(()=>{const{antLocale:o}=r,a=h.unref(t)||yu[e],s=o?o[e]:{};return O(O(O({},typeof a=="function"?a():a),s||{}),h.unref(n)||{})})]}function Lh(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)}const y1="%";class aL{constructor(t){this.cache=new Map,this.instanceId=t}get(t){return this.cache.get(Array.isArray(t)?t.join(y1):t)||null}update(t,n){const r=Array.isArray(t)?t.join(y1):t,i=this.cache.get(r),o=n(i);o===null?this.cache.delete(r):this.cache.set(r,o)}}const b1="data-token-hash",Yi="data-css-hash",sL="data-cache-path",Yo="__cssinjs_instance__";function bs(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const t=document.body.querySelectorAll(`style[${Yi}]`)||[],{firstChild:n}=document.head;Array.from(t).forEach(i=>{i[Yo]=i[Yo]||e,i[Yo]===e&&document.head.insertBefore(i,n)});const r={};Array.from(document.querySelectorAll(`style[${Yi}]`)).forEach(i=>{var o;const a=i.getAttribute(Yi);r[a]?i[Yo]===e&&((o=i.parentNode)===null||o===void 0||o.removeChild(i)):r[a]=!0})}return new aL(e)}const x1=Symbol("StyleContextKey"),lL=()=>{var e,t,n;const r=h.getCurrentInstance();let i;if(r&&r.appContext){const o=(n=(t=(e=r.appContext)===null||e===void 0?void 0:e.config)===null||t===void 0?void 0:t.globalProperties)===null||n===void 0?void 0:n.__ANTDV_CSSINJS_CACHE__;o?i=o:(i=bs(),r.appContext.config.globalProperties&&(r.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__=i))}else i=bs();return i},_1={cache:bs(),defaultCache:!0,hashPriority:"low"},bu=()=>{const e=lL();return h.inject(x1,h.shallowRef(O(O({},_1),{cache:e})))},cL=e=>{const t=bu(),n=h.shallowRef(O(O({},_1),{cache:bs()}));return h.watch([()=>h.unref(e),t],()=>{const r=O({},t.value),i=h.unref(e);Object.keys(i).forEach(a=>{const s=i[a];i[a]!==void 0&&(r[a]=s)});const{cache:o}=i;r.cache=r.cache||bs(),r.defaultCache=!o&&t.value.defaultCache,n.value=r},{immediate:!0}),h.provide(x1,n),n},uL=()=>({autoClear:Oe(),mock:Sn(),cache:En(),defaultCache:Oe(),hashPriority:Sn(),container:$r(),ssrInline:Oe(),transformers:Ko(),linters:Ko()});kh(h.defineComponent({name:"AStyleProvider",inheritAttrs:!1,props:uL(),setup(e,t){let{slots:n}=t;return cL(e),()=>{var r;return(r=n.default)===null||r===void 0?void 0:r.call(n)}}}));function dL(){return!1}let jh=!1;function fL(){return jh}const pL=process.env.NODE_ENV==="production"?dL:fL;if(process.env.NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){const e=window;if(typeof e.webpackHotUpdate=="function"){const t=e.webpackHotUpdate;e.webpackHotUpdate=function(){return jh=!0,setTimeout(()=>{jh=!1},0),t(...arguments)}}}function w1(e,t,n,r){const i=bu(),o=h.shallowRef(""),a=h.shallowRef();h.watchEffect(()=>{o.value=[e,...t.value].join("%")});const s=pL(),l=c=>{i.value.cache.update(c,u=>{const[d=0,f]=u||[];return d-1===0?(r==null||r(f,!1),null):[d-1,f]})};return h.watch(o,(c,u)=>{u&&l(u),i.value.cache.update(c,d=>{const[f=0,p]=d||[];let m=p;process.env.NODE_ENV!=="production"&&p&&s&&(r==null||r(m,s),m=null);const v=m||n();return[f+1,v]}),a.value=i.value.cache.get(o.value)[1]},{immediate:!0}),h.onBeforeUnmount(()=>{l(o.value)}),a}function ir(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Xi(e,t){return e&&e.contains?e.contains(t):!1}const E1="data-vc-order",hL="vc-util-key",Fh=new Map;function S1(){let{mark:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e?e.startsWith("data-")?e:`data-${e}`:hL}function xu(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function mL(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function C1(e){return Array.from((Fh.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function T1(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!ir())return null;const{csp:n,prepend:r}=t,i=document.createElement("style");i.setAttribute(E1,mL(r)),n!=null&&n.nonce&&(i.nonce=n==null?void 0:n.nonce),i.innerHTML=e;const o=xu(t),{firstChild:a}=o;if(r){if(r==="queue"){const s=C1(o).filter(l=>["prepend","prependQueue"].includes(l.getAttribute(E1)));if(s.length)return o.insertBefore(i,s[s.length-1].nextSibling),i}o.insertBefore(i,a)}else o.appendChild(i);return i}function P1(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=xu(t);return C1(n).find(r=>r.getAttribute(S1(t))===e)}function _u(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=P1(e,t);n&&xu(t).removeChild(n)}function gL(e,t){const n=Fh.get(e);if(!n||!Xi(document,n)){const r=T1("",t),{parentNode:i}=r;Fh.set(e,i),e.removeChild(r)}}function wu(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var r,i,o;const a=xu(n);gL(a,n);const s=P1(t,n);if(s)return!((r=n.csp)===null||r===void 0)&&r.nonce&&s.nonce!==((i=n.csp)===null||i===void 0?void 0:i.nonce)&&(s.nonce=(o=n.csp)===null||o===void 0?void 0:o.nonce),s.innerHTML!==e&&(s.innerHTML=e),s;const l=T1(e,n);return l.setAttribute(S1(n),t),l}function vL(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}class Xo{constructor(){this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r={map:this.cache};return t.forEach(i=>{var o;r?r=(o=r==null?void 0:r.map)===null||o===void 0?void 0:o.get(i):r=void 0}),r!=null&&r.value&&n&&(r.value[1]=this.cacheCallTimes++),r==null?void 0:r.value}get(t){var n;return(n=this.internalGet(t,!0))===null||n===void 0?void 0:n[0]}has(t){return!!this.internalGet(t)}set(t,n){if(!this.has(t)){if(this.size()+1>Xo.MAX_CACHE_SIZE+Xo.MAX_CACHE_OFFSET){const[i]=this.keys.reduce((o,a)=>{const[,s]=o;return this.internalGet(a)[1]<s?[a,this.internalGet(a)[1]]:o},[this.keys[0],this.cacheCallTimes]);this.delete(i)}this.keys.push(t)}let r=this.cache;t.forEach((i,o)=>{if(o===t.length-1)r.set(i,{value:[n,this.cacheCallTimes++]});else{const a=r.get(i);a?a.map||(a.map=new Map):r.set(i,{map:new Map}),r=r.get(i).map}})}deleteByPath(t,n){var r;const i=t.get(n[0]);if(n.length===1)return i.map?t.set(n[0],{map:i.map}):t.delete(n[0]),(r=i.value)===null||r===void 0?void 0:r[0];const o=this.deleteByPath(i.map,n.slice(1));return(!i.map||i.map.size===0)&&!i.value&&t.delete(n[0]),o}delete(t){if(this.has(t))return this.keys=this.keys.filter(n=>!vL(n,t)),this.deleteByPath(this.cache,t)}}Xo.MAX_CACHE_SIZE=20,Xo.MAX_CACHE_OFFSET=5;let Hh={};function Eu(e,t){process.env.NODE_ENV!=="production"&&!e&&console!==void 0&&console.error(`Warning: ${t}`)}function yL(){Hh={}}function bL(e,t,n){!t&&!Hh[n]&&(e(!1,n),Hh[n]=!0)}function zh(e,t){bL(Eu,e,t)}function xL(){}let Rr=xL;process.env.NODE_ENV!=="production"&&(Rr=(e,t,n)=>{zh(e,`[ant-design-vue: ${t}] ${n}`),process.env.NODE_ENV==="test"&&yL()});let $1=0;class R1{constructor(t){this.derivatives=Array.isArray(t)?t:[t],this.id=$1,t.length===0&&Rr(t.length>0,"[Ant Design Vue CSS-in-JS] Theme should have at least one derivative function."),$1+=1}getDerivativeToken(t){return this.derivatives.reduce((n,r)=>r(t,n),void 0)}}const Vh=new Xo;function _L(e){const t=Array.isArray(e)?e:[e];return Vh.has(t)||Vh.set(t,new R1(t)),Vh.get(t)}const A1=new WeakMap;function Su(e){let t=A1.get(e)||"";return t||(Object.keys(e).forEach(n=>{const r=e[n];t+=n,r instanceof R1?t+=r.id:r&&typeof r=="object"?t+=Su(r):t+=r}),A1.set(e,t)),t}function wL(e,t){return Lh(`${t}_${Su(e)}`)}const xs=`random-${Date.now()}-${Math.random()}`.replace(/\./g,""),O1="_bAmBoO_";function EL(e,t,n){var r,i;if(ir()){wu(e,xs);const o=document.createElement("div");o.style.position="fixed",o.style.left="0",o.style.top="0",t==null||t(o),document.body.appendChild(o),process.env.NODE_ENV!=="production"&&(o.innerHTML="Test",o.style.zIndex="9999999");const a=n?n(o):(r=getComputedStyle(o).content)===null||r===void 0?void 0:r.includes(O1);return(i=o.parentNode)===null||i===void 0||i.removeChild(o),_u(xs),a}return!1}let Wh;function SL(){return Wh===void 0&&(Wh=EL(`@layer ${xs} { .${xs} { content: "${O1}"!important; } }`,e=>{e.className=xs})),Wh}const M1={},CL=process.env.NODE_ENV==="production",TL=process.env.NODE_ENV==="prerender",PL=!CL&&!TL?"css-dev-only-do-not-override":"css",Zi=new Map;function $L(e){Zi.set(e,(Zi.get(e)||0)+1)}function RL(e,t){typeof document<"u"&&document.querySelectorAll(`style[${b1}="${e}"]`).forEach(r=>{var i;r[Yo]===t&&((i=r.parentNode)===null||i===void 0||i.removeChild(r))})}const AL=0;function OL(e,t){Zi.set(e,(Zi.get(e)||0)-1);const n=Array.from(Zi.keys()),r=n.filter(i=>(Zi.get(i)||0)<=0);n.length-r.length>AL&&r.forEach(i=>{RL(i,t),Zi.delete(i)})}const ML=(e,t,n,r)=>{const i=n.getDerivativeToken(e);let o=O(O({},i),t);return r&&(o=r(o)),o};function IL(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h.ref({});const r=bu(),i=h.computed(()=>O({},...t.value)),o=h.computed(()=>Su(i.value)),a=h.computed(()=>Su(n.value.override||M1));return w1("token",h.computed(()=>[n.value.salt||"",e.value.id,o.value,a.value]),()=>{const{salt:l="",override:c=M1,formatToken:u,getComputedToken:d}=n.value,f=d?d(i.value,c,e.value):ML(i.value,c,e.value,u),p=wL(f,l);f._tokenKey=p,$L(p);const m=`${PL}-${Lh(p)}`;return f._hashId=m,[f,m]},l=>{var c;OL(l[0]._tokenKey,(c=r.value)===null||c===void 0?void 0:c.cache.instanceId)})}var DL={animationIterationCount:1,aspectRatio: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},I1="comm",D1="rule",N1="decl",NL="@import",BL="@keyframes",kL="@layer",B1=Math.abs,Gh=String.fromCharCode;function k1(e){return e.trim()}function Cu(e,t,n){return e.replace(t,n)}function LL(e,t,n){return e.indexOf(t,n)}function _s(e,t){return e.charCodeAt(t)|0}function Zo(e,t,n){return e.slice(t,n)}function or(e){return e.length}function jL(e){return e.length}function Tu(e,t){return t.push(e),e}var Pu=1,Qo=1,L1=0,Cn=0,ut=0,Jo="";function Uh(e,t,n,r,i,o,a,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:Pu,column:Qo,length:a,return:"",siblings:s}}function FL(){return ut}function HL(){return ut=Cn>0?_s(Jo,--Cn):0,Qo--,ut===10&&(Qo=1,Pu--),ut}function zn(){return ut=Cn<L1?_s(Jo,Cn++):0,Qo++,ut===10&&(Qo=1,Pu++),ut}function yi(){return _s(Jo,Cn)}function $u(){return Cn}function Ru(e,t){return Zo(Jo,e,t)}function ws(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function zL(e){return Pu=Qo=1,L1=or(Jo=e),Cn=0,[]}function VL(e){return Jo="",e}function qh(e){return k1(Ru(Cn-1,Kh(e===91?e+2:e===40?e+1:e)))}function WL(e){for(;(ut=yi())&&ut<33;)zn();return ws(e)>2||ws(ut)>3?"":" "}function GL(e,t){for(;--t&&zn()&&!(ut<48||ut>102||ut>57&&ut<65||ut>70&&ut<97););return Ru(e,$u()+(t<6&&yi()==32&&zn()==32))}function Kh(e){for(;zn();)switch(ut){case e:return Cn;case 34:case 39:e!==34&&e!==39&&Kh(ut);break;case 40:e===41&&Kh(e);break;case 92:zn();break}return Cn}function UL(e,t){for(;zn()&&e+ut!==57;)if(e+ut===84&&yi()===47)break;return"/*"+Ru(t,Cn-1)+"*"+Gh(e===47?e:zn())}function qL(e){for(;!ws(yi());)zn();return Ru(e,Cn)}function KL(e){return VL(Au("",null,null,null,[""],e=zL(e),0,[0],e))}function Au(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,m=0,v=1,g=1,x=1,w=0,b="",y=i,_=o,S=r,C=b;g;)switch(m=w,w=zn()){case 40:if(m!=108&&_s(C,d-1)==58){LL(C+=Cu(qh(w),"&","&\f"),"&\f",B1(c?s[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:C+=qh(w);break;case 9:case 10:case 13:case 32:C+=WL(m);break;case 92:C+=GL($u()-1,7);continue;case 47:switch(yi()){case 42:case 47:Tu(YL(UL(zn(),$u()),t,n,l),l),(ws(m||1)==5||ws(yi()||1)==5)&&or(C)&&Zo(C,-1,void 0)!==" "&&(C+=" ");break;default:C+="/"}break;case 123*v:s[c++]=or(C)*x;case 125*v:case 59:case 0:switch(w){case 0:case 125:g=0;case 59+u:x==-1&&(C=Cu(C,/\f/g,"")),p>0&&(or(C)-d||v===0&&m===47)&&Tu(p>32?F1(C+";",r,n,d-1,l):F1(Cu(C," ","")+";",r,n,d-2,l),l);break;case 59:C+=";";default:if(Tu(S=j1(C,t,n,c,u,i,s,b,y=[],_=[],d,o),o),w===123)if(u===0)Au(C,t,S,S,y,o,d,s,_);else switch(f===99&&_s(C,3)===110?100:f){case 100:case 108:case 109:case 115:Au(e,S,S,r&&Tu(j1(e,S,S,0,0,i,s,b,i,y=[],d,_),_),i,_,d,s,r?y:_);break;default:Au(C,S,S,S,[""],_,0,s,_)}}c=u=p=0,v=x=1,b=C="",d=a;break;case 58:d=1+or(C),p=m;default:if(v<1){if(w==123)--v;else if(w==125&&v++==0&&HL()==125)continue}switch(C+=Gh(w),w*v){case 38:x=u>0?1:(C+="\f",-1);break;case 44:s[c++]=(or(C)-1)*x,x=1;break;case 64:yi()===45&&(C+=qh(zn())),f=yi(),u=d=or(b=C+=qL($u())),w++;break;case 45:m===45&&or(C)==2&&(v=0)}}return o}function j1(e,t,n,r,i,o,a,s,l,c,u,d){for(var f=i-1,p=i===0?o:[""],m=jL(p),v=0,g=0,x=0;v<r;++v)for(var w=0,b=Zo(e,f+1,f=B1(g=a[v])),y=e;w<m;++w)(y=k1(g>0?p[w]+" "+b:Cu(b,/&\f/g,p[w])))&&(l[x++]=y);return Uh(e,t,n,i===0?D1:s,l,c,u,d)}function YL(e,t,n,r){return Uh(e,t,n,I1,Gh(FL()),Zo(e,2,-2),0,r)}function F1(e,t,n,r,i){return Uh(e,t,n,N1,Zo(e,0,r),Zo(e,r+1,-1),r,i)}function Yh(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function XL(e,t,n,r){switch(e.type){case kL:if(e.children.length)break;case NL:case N1:return e.return=e.return||e.value;case I1:return"";case BL:return e.return=e.value+"{"+Yh(e.children,r)+"}";case D1:if(!or(e.value=e.props.join(",")))return""}return or(n=Yh(e.children,r))?e.return=e.value+"{"+n+"}":""}function H1(e,t){const{path:n,parentSelectors:r}=t;zh(!1,`[Ant Design Vue CSS-in-JS] ${n?`Error in '${n}': `:""}${e}${r.length?` Selector info: ${r.join(" -> ")}`:""}`)}const ZL=(e,t,n)=>{if(e==="content"){const r=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;(typeof t!="string"||["normal","none","initial","inherit","unset"].indexOf(t)===-1&&!r.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||t.charAt(0)!=='"'&&t.charAt(0)!=="'"))&&H1(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${t}"'\`.`,n)}},QL=(e,t,n)=>{e==="animation"&&n.hashId&&t!=="none"&&H1(`You seem to be using hashed animation '${t}', in which case 'animationName' with Keyframe as value is recommended.`,n)},z1="data-ant-cssinjs-cache-path",JL="_FILE_STYLE__";let Qi,V1=!0;function e6(){var e;if(!Qi&&(Qi={},ir())){const t=document.createElement("div");t.className=z1,t.style.position="fixed",t.style.visibility="hidden",t.style.top="-9999px",document.body.appendChild(t);let n=getComputedStyle(t).content||"";n=n.replace(/^"/,"").replace(/"$/,""),n.split(";").forEach(i=>{const[o,a]=i.split(":");Qi[o]=a});const r=document.querySelector(`style[${z1}]`);r&&(V1=!1,(e=r.parentNode)===null||e===void 0||e.removeChild(r)),document.body.removeChild(t)}}function t6(e){return e6(),!!Qi[e]}function n6(e){const t=Qi[e];let n=null;if(t&&ir())if(V1)n=JL;else{const r=document.querySelector(`style[${Yi}="${Qi[e]}"]`);r?n=r.innerHTML:delete Qi[e]}return[n,t]}const W1=ir(),G1="_skip_check_",U1="_multi_value_";function q1(e){return Yh(KL(e),XL).replace(/\{%%%\:[^;];}/g,";")}function r6(e){return typeof e=="object"&&e&&(G1 in e||U1 in e)}function i6(e,t,n){if(!t)return e;const r=`.${t}`,i=n==="low"?`:where(${r})`:r;return e.split(",").map(a=>{var s;const l=a.trim().split(/\s+/);let c=l[0]||"";const u=((s=c.match(/^\w+/))===null||s===void 0?void 0:s[0])||"";return c=`${u}${i}${c.slice(u.length)}`,[c,...l.slice(1)].join(" ")}).join(",")}const Xh=new Set;process.env.NODE_ENV;const Zh=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{root:n,injectHash:r,parentSelectors:i}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]};const{hashId:o,layer:a,path:s,hashPriority:l,transformers:c=[],linters:u=[]}=t;let d="",f={};function p(g){const x=g.getName(o);if(!f[x]){const[w]=Zh(g.style,t,{root:!1,parentSelectors:i});f[x]=`@keyframes ${g.getName(o)}${w}`}}function m(g){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return g.forEach(w=>{Array.isArray(w)?m(w,x):w&&x.push(w)}),x}if(m(Array.isArray(e)?e:[e]).forEach(g=>{const x=typeof g=="string"&&!n?{}:g;if(typeof x=="string")d+=`${x}
|
|
236
|
+
`;else if(x._keyframe)p(x);else{const w=c.reduce((b,y)=>{var _;return((_=y==null?void 0:y.visit)===null||_===void 0?void 0:_.call(y,b))||b},x);Object.keys(w).forEach(b=>{var y;const _=w[b];if(typeof _=="object"&&_&&(b!=="animationName"||!_._keyframe)&&!r6(_)){let S=!1,C=b.trim(),$=!1;(n||r)&&o?C.startsWith("@")?S=!0:C=i6(b,o,l):n&&!o&&(C==="&"||C==="")&&(C="",$=!0);const[M,R]=Zh(_,t,{root:$,injectHash:S,parentSelectors:[...i,C]});f=O(O({},f),R),d+=`${C}${M}`}else{let S=function($,M){process.env.NODE_ENV!=="production"&&(typeof _!="object"||!(_!=null&&_[G1]))&&[ZL,QL,...u].forEach(L=>L($,M,{path:s,hashId:o,parentSelectors:i}));const R=$.replace(/[A-Z]/g,L=>`-${L.toLowerCase()}`);let I=M;!DL[$]&&typeof I=="number"&&I!==0&&(I=`${I}px`),$==="animationName"&&(M!=null&&M._keyframe)&&(p(M),I=M.getName(o)),d+=`${R}:${I};`};const C=(y=_==null?void 0:_.value)!==null&&y!==void 0?y:_;typeof _=="object"&&(_!=null&&_[U1])&&Array.isArray(C)?C.forEach($=>{S(b,$)}):S(b,C)}})}}),!n)d=`{${d}}`;else if(a&&SL()){const g=a.split(",");d=`@layer ${g[g.length-1].trim()} {${d}}`,g.length>1&&(d=`@layer ${a}{%%%:%}${d}`)}return[d,f]};function o6(e,t){return Lh(`${e.join("%")}${t}`)}function K1(e,t){const n=bu(),r=h.computed(()=>e.value.token._tokenKey),i=h.computed(()=>[r.value,...e.value.path]);let o=W1;return process.env.NODE_ENV!=="production"&&n.value.mock!==void 0&&(o=n.value.mock==="client"),w1("style",i,()=>{const{path:a,hashId:s,layer:l,nonce:c,clientOnly:u,order:d=0}=e.value,f=i.value.join("|");if(t6(f)){const[C,$]=n6(f);if(C)return[C,r.value,$,{},u,d]}const p=t(),{hashPriority:m,container:v,transformers:g,linters:x,cache:w}=n.value,[b,y]=Zh(p,{hashId:s,hashPriority:m,layer:l,path:a.join("-"),transformers:g,linters:x}),_=q1(b),S=o6(i.value,_);if(o){const C={mark:Yi,prepend:"queue",attachTo:v,priority:d},$=typeof c=="function"?c():c;$&&(C.csp={nonce:$});const M=wu(_,S,C);M[Yo]=w.instanceId,M.setAttribute(b1,r.value),process.env.NODE_ENV!=="production"&&M.setAttribute(sL,i.value.join("|")),Object.keys(y).forEach(R=>{Xh.has(R)||(Xh.add(R),wu(q1(y[R]),`_effect-${R}`,{mark:Yi,prepend:"queue",attachTo:v}))})}return[_,r.value,S,y,u,d]},(a,s)=>{let[,,l]=a;(s||n.value.autoClear)&&W1&&_u(l,{mark:Yi})}),a=>a}class Wt{constructor(t,n){this._keyframe=!0,this.name=t,this.style=n}getName(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t?`${t}-${this.name}`:this.name}}function ea(e){return e.notSplit=!0,e}ea(["borderTop","borderBottom"]),ea(["borderTop"]),ea(["borderBottom"]),ea(["borderLeft","borderRight"]),ea(["borderLeft"]),ea(["borderRight"]);const a6="4.2.5",Ou=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function Pt(e,t){s6(e)&&(e="100%");var n=l6(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Mu(e){return Math.min(1,Math.max(0,e))}function s6(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function l6(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Y1(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Iu(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Ji(e){return e.length===1?"0"+e:String(e)}function c6(e,t,n){return{r:Pt(e,255)*255,g:Pt(t,255)*255,b:Pt(n,255)*255}}function X1(e,t,n){e=Pt(e,255),t=Pt(t,255),n=Pt(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 l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t<n?6:0);break;case t:o=(n-e)/l+2;break;case n:o=(e-t)/l+4;break}o/=6}return{h:o,s:a,l:s}}function Qh(e,t,n){return n<0&&(n+=1),n>1&&(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 u6(e,t,n){var r,i,o;if(e=Pt(e,360),t=Pt(t,100),n=Pt(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=Qh(s,a,e+1/3),i=Qh(s,a,e),o=Qh(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function Jh(e,t,n){e=Pt(e,255),t=Pt(t,255),n=Pt(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4;break}o/=6}return{h:o,s:l,v:a}}function d6(e,t,n){e=Pt(e,360)*6,t=Pt(t,100),n=Pt(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),l=r%6,c=[n,a,o,o,s,n][l],u=[s,n,n,a,o,o][l],d=[o,o,s,n,n,a][l];return{r:c*255,g:u*255,b:d*255}}function em(e,t,n,r){var i=[Ji(Math.round(e).toString(16)),Ji(Math.round(t).toString(16)),Ji(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function f6(e,t,n,r,i){var o=[Ji(Math.round(e).toString(16)),Ji(Math.round(t).toString(16)),Ji(Math.round(n).toString(16)),Ji(p6(r))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function p6(e){return Math.round(parseFloat(e)*255).toString(16)}function Z1(e){return nn(e)/255}function nn(e){return parseInt(e,16)}function h6(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var tm={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=v6(e)),typeof e=="object"&&(Ar(e.r)&&Ar(e.g)&&Ar(e.b)?(t=c6(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ar(e.h)&&Ar(e.s)&&Ar(e.v)?(r=Iu(e.s),i=Iu(e.v),t=d6(e.h,r,i),a=!0,s="hsv"):Ar(e.h)&&Ar(e.s)&&Ar(e.l)&&(r=Iu(e.s),o=Iu(e.l),t=u6(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=Y1(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 m6="[-\\+]?\\d+%?",g6="[-\\+]?\\d*\\.\\d+%?",bi="(?:".concat(g6,")|(?:").concat(m6,")"),nm="[\\s|\\(]+(".concat(bi,")[,|\\s]+(").concat(bi,")[,|\\s]+(").concat(bi,")\\s*\\)?"),rm="[\\s|\\(]+(".concat(bi,")[,|\\s]+(").concat(bi,")[,|\\s]+(").concat(bi,")[,|\\s]+(").concat(bi,")\\s*\\)?"),Vn={CSS_UNIT:new RegExp(bi),rgb:new RegExp("rgb"+nm),rgba:new RegExp("rgba"+rm),hsl:new RegExp("hsl"+nm),hsla:new RegExp("hsla"+rm),hsv:new RegExp("hsv"+nm),hsva:new RegExp("hsva"+rm),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 v6(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(tm[e])e=tm[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Vn.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Vn.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Vn.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Vn.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Vn.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Vn.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Vn.hex8.exec(e),n?{r:nn(n[1]),g:nn(n[2]),b:nn(n[3]),a:Z1(n[4]),format:t?"name":"hex8"}:(n=Vn.hex6.exec(e),n?{r:nn(n[1]),g:nn(n[2]),b:nn(n[3]),format:t?"name":"hex"}:(n=Vn.hex4.exec(e),n?{r:nn(n[1]+n[1]),g:nn(n[2]+n[2]),b:nn(n[3]+n[3]),a:Z1(n[4]+n[4]),format:t?"name":"hex8"}:(n=Vn.hex3.exec(e),n?{r:nn(n[1]+n[1]),g:nn(n[2]+n[2]),b:nn(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Ar(e){return!!Vn.CSS_UNIT.exec(String(e))}var Gt=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=h6(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=Y1(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=Jh(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=Jh(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=X1(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=X1(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),em(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),f6(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(Pt(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(Pt(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="#"+em(this.r,this.g,this.b,!1),n=0,r=Object.entries(tm);n<r.length;n++){var i=r[n],o=i[0],a=i[1];if(t===a)return o}return!1},e.prototype.toString=function(t){var n=!!t;t=t??this.format;var r=!1,i=this.a<1&&this.a>=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=Mu(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=Mu(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=Mu(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=Mu(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<t;a++)i.push(new e({h:(r+a*o)%360,s:n.s,l:n.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}(),Du=2,Q1=.16,y6=.05,b6=.05,x6=.15,J1=5,eE=4,_6=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function tE(e){var t=e.r,n=e.g,r=e.b,i=Jh(t,n,r);return{h:i.h*360,s:i.s,v:i.v}}function Nu(e){var t=e.r,n=e.g,r=e.b;return"#".concat(em(t,n,r,!1))}function w6(e,t,n){var r=n/100,i={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return i}function nE(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Du*t:Math.round(e.h)+Du*t:r=n?Math.round(e.h)+Du*t:Math.round(e.h)-Du*t,r<0?r+=360:r>=360&&(r-=360),r}function rE(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-Q1*t:t===eE?r=e.s+Q1:r=e.s+y6*t,r>1&&(r=1),n&&t===J1&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function iE(e,t,n){var r;return n?r=e.v+b6*t:r=e.v-x6*t,r>1&&(r=1),Number(r.toFixed(2))}function Es(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=ta(e),i=J1;i>0;i-=1){var o=tE(r),a=Nu(ta({h:nE(o,i,!0),s:rE(o,i,!0),v:iE(o,i,!0)}));n.push(a)}n.push(Nu(r));for(var s=1;s<=eE;s+=1){var l=tE(r),c=Nu(ta({h:nE(l,s),s:rE(l,s),v:iE(l,s)}));n.push(c)}return t.theme==="dark"?_6.map(function(u){var d=u.index,f=u.opacity,p=Nu(w6(ta(t.backgroundColor||"#141414"),ta(n[d]),f*100));return p}):n}var im={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Bu={},om={};Object.keys(im).forEach(function(e){Bu[e]=Es(im[e]),Bu[e].primary=Bu[e][5],om[e]=Es(im[e],{theme:"dark",backgroundColor:"#141414"}),om[e].primary=om[e][5]});var E6=Bu.blue;const S6=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function C6(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 oE={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"},am=O(O({},oE),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
237
|
+
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
238
|
+
'Noto Color Emoji'`,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});function T6(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:r}=t;const{colorSuccess:i,colorWarning:o,colorError:a,colorInfo:s,colorPrimary:l,colorBgBase:c,colorTextBase:u}=e,d=n(l),f=n(i),p=n(o),m=n(a),v=n(s),g=r(c,u);return O(O({},g),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:m[1],colorErrorBgHover:m[2],colorErrorBorder:m[3],colorErrorBorderHover:m[4],colorErrorHover:m[5],colorError:m[6],colorErrorActive:m[7],colorErrorTextHover:m[8],colorErrorText:m[9],colorErrorTextActive:m[10],colorWarningBg:p[1],colorWarningBgHover:p[2],colorWarningBorder:p[3],colorWarningBorderHover:p[4],colorWarningHover:p[4],colorWarning:p[6],colorWarningActive:p[7],colorWarningTextHover:p[8],colorWarningText:p[9],colorWarningTextActive:p[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],colorBgMask:new Gt("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const P6=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>16?16:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:i}};function $6(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:i}=e;return O({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:i+1},P6(r))}const Or=(e,t)=>new Gt(e).setAlpha(t).toRgbString(),Ss=(e,t)=>new Gt(e).darken(t).toHexString(),R6=e=>{const t=Es(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]}},A6=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:Or(r,.88),colorTextSecondary:Or(r,.65),colorTextTertiary:Or(r,.45),colorTextQuaternary:Or(r,.25),colorFill:Or(r,.15),colorFillSecondary:Or(r,.06),colorFillTertiary:Or(r,.04),colorFillQuaternary:Or(r,.02),colorBgLayout:Ss(n,4),colorBgContainer:Ss(n,0),colorBgElevated:Ss(n,0),colorBgSpotlight:Or(r,.85),colorBorder:Ss(n,15),colorBorderSecondary:Ss(n,6)}};function O6(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 M6=e=>{const t=O6(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]}};function I6(e){const t=Object.keys(oE).map(n=>{const r=Es(e[n]);return new Array(10).fill(1).reduce((i,o,a)=>(i[`${n}-${a+1}`]=r[a],i),{})}).reduce((n,r)=>(n=O(O({},n),r),n),{});return O(O(O(O(O(O(O({},e),t),T6(e,{generateColorPalettes:R6,generateNeutralColorPalettes:A6})),M6(e.fontSize)),C6(e)),S6(e)),$6(e))}function sm(e){return e>=0&&e<=255}function ku(e,t){const{r:n,g:r,b:i,a:o}=new Gt(e).toRgb();if(o<1)return e;const{r:a,g:s,b:l}=new Gt(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-a*(1-c))/c),d=Math.round((r-s*(1-c))/c),f=Math.round((i-l*(1-c))/c);if(sm(u)&&sm(d)&&sm(f))return new Gt({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new Gt({r:n,g:r,b:i,a:1}).toRgbString()}var D6=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<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function N6(e){const{override:t}=e,n=D6(e,["override"]),r=O({},t);Object.keys(am).forEach(p=>{delete r[p]});const i=O(O({},n),r),o=480,a=576,s=768,l=992,c=1200,u=1600,d=2e3;return O(O(O({},i),{colorLink:i.colorInfoText,colorLinkHover:i.colorInfoHover,colorLinkActive:i.colorInfoActive,colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:ku(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:ku(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:ku(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,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:ku(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:`
|
|
239
|
+
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
240
|
+
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
241
|
+
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
|
242
|
+
`,boxShadowSecondary:`
|
|
243
|
+
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
244
|
+
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
245
|
+
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
246
|
+
`,boxShadowTertiary:`
|
|
247
|
+
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
248
|
+
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
249
|
+
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
|
250
|
+
`,screenXS:o,screenXSMin:o,screenXSMax:a-1,screenSM:a,screenSMMin:a,screenSMMax:s-1,screenMD:s,screenMDMin:s,screenMDMax:l-1,screenLG:l,screenLGMin:l,screenLGMax:c-1,screenXL:c,screenXLMin:c,screenXLMax:u-1,screenXXL:u,screenXXLMin:u,screenXXLMax:d-1,screenXXXL:d,screenXXXLMin:d,boxShadowPopoverArrow:"3px 3px 7px rgba(0, 0, 0, 0.1)",boxShadowCard:`
|
|
251
|
+
0 1px 2px -2px ${new Gt("rgba(0, 0, 0, 0.16)").toRgbString()},
|
|
252
|
+
0 3px 6px 0 ${new Gt("rgba(0, 0, 0, 0.12)").toRgbString()},
|
|
253
|
+
0 5px 12px 4px ${new Gt("rgba(0, 0, 0, 0.09)").toRgbString()}
|
|
254
|
+
`,boxShadowDrawerRight:`
|
|
255
|
+
-6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
256
|
+
-3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
257
|
+
-9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
|
258
|
+
`,boxShadowDrawerLeft:`
|
|
259
|
+
6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
260
|
+
3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
261
|
+
9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
|
262
|
+
`,boxShadowDrawerUp:`
|
|
263
|
+
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
264
|
+
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
265
|
+
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
266
|
+
`,boxShadowDrawerDown:`
|
|
267
|
+
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
268
|
+
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
269
|
+
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
270
|
+
`,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)}const B6=(e,t,n,r,i)=>{const o=e/2,a=0,s=o,l=n*1/Math.sqrt(2),c=o-n*(1-1/Math.sqrt(2)),u=o-t*(1/Math.sqrt(2)),d=n*(Math.sqrt(2)-1)+t*(1/Math.sqrt(2)),f=2*o-u,p=d,m=2*o-l,v=c,g=2*o-a,x=s,w=o*Math.sqrt(2)+n*(Math.sqrt(2)-2),b=n*(Math.sqrt(2)-1);return{pointerEvents:"none",width:e,height:e,overflow:"hidden","&::after":{content:'""',position:"absolute",width:w,height:w,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"},"&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:e,height:e/2,background:r,clipPath:{_multi_value_:!0,value:[`polygon(${b}px 100%, 50% ${b}px, ${2*o-b}px 100%, ${b}px 100%)`,`path('M ${a} ${s} A ${n} ${n} 0 0 0 ${l} ${c} L ${u} ${d} A ${t} ${t} 0 0 1 ${f} ${p} L ${m} ${v} A ${n} ${n} 0 0 0 ${g} ${x} Z')`]},content:'""'}}};function k6(e,t){return Ou.reduce((n,r)=>{const i=e[`${r}-1`],o=e[`${r}-3`],a=e[`${r}-6`],s=e[`${r}-7`];return O(O({},n),t(r,{lightColor:i,lightBorderColor:o,darkColor:a,textColor:s}))},{})}const Tn=e=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:e.fontFamily}),L6=()=>({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"}}),j6=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),F6=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"}}}),H6=(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"}}}}},Lu=e=>({outline:`${e.lineWidthBold}px solid ${e.colorPrimaryBorder}`,outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),z6=e=>({"&:focus-visible":O({},Lu(e))});function Pn(e,t,n){return r=>{const i=h.computed(()=>r==null?void 0:r.value),[o,a,s]=Cs(),{getPrefixCls:l,iconPrefixCls:c}=eL(),u=h.computed(()=>l()),d=h.computed(()=>({theme:o.value,token:a.value,hashId:s.value,path:["Shared",u.value]}));K1(d,()=>[{"&":F6(a.value)}]);const f=h.computed(()=>({theme:o.value,token:a.value,hashId:s.value,path:[e,i.value,c.value]}));return[K1(f,()=>{const{token:p,flush:m}=W6(a.value),v=typeof n=="function"?n(p):n,g=O(O({},v),a.value[e]),x=`.${i.value}`,w=Ot(p,{componentCls:x,prefixCls:i.value,iconCls:`.${c.value}`,antCls:`.${u.value}`},g),b=t(w,{hashId:s.value,prefixCls:i.value,rootPrefixCls:u.value,iconPrefixCls:c.value,overrideComponentToken:a.value[e]});return m(e,g),[H6(a.value,i.value),b]}),s]}}const aE=process.env.NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u";let lm=!0;function Ot(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!aE)return O({},...t);lm=!1;const r={};return t.forEach(i=>{Object.keys(i).forEach(a=>{Object.defineProperty(r,a,{configurable:!0,enumerable:!0,get:()=>i[a]})})}),lm=!0,r}function V6(){}function W6(e){let t,n=e,r=V6;return aE&&(t=new Set,n=new Proxy(e,{get(i,o){return lm&&t.add(o),i[o]}}),r=(i,o)=>{Array.from(t)}),{token:n,keys:t,flush:r}}const G6=_L(I6),U6={token:am,hashed:!0},sE=Symbol("DesignTokenContext"),cm=h.shallowRef(),q6=e=>{h.provide(sE,e),h.watch(e,()=>{cm.value=h.unref(e),h.triggerRef(cm)},{immediate:!0,deep:!0})};h.defineComponent({props:{value:En()},setup(e,t){let{slots:n}=t;return q6(h.computed(()=>e.value)),()=>{var r;return(r=n.default)===null||r===void 0?void 0:r.call(n)}}});function Cs(){const e=h.inject(sE,h.computed(()=>cm.value||U6)),t=h.computed(()=>`${a6}-${e.value.hashed||""}`),n=h.computed(()=>e.value.theme||G6),r=IL(n,h.computed(()=>[am,e.value.token]),h.computed(()=>({salt:t.value,override:O({override:e.value.token},e.value.components),formatToken:N6})));return[n,h.computed(()=>r.value[0]),h.computed(()=>e.value.hashed?r.value[1]:"")]}const um=h.defineComponent({compatConfig:{MODE:3},setup(){const[,e]=Cs(),t=h.computed(()=>new Gt(e.value.colorBgBase).toHsl().l<.5?{opacity:.65}:{});return()=>h.createVNode("svg",{style:t.value,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},[h.createVNode("g",{fill:"none","fill-rule":"evenodd"},[h.createVNode("g",{transform:"translate(24 31.67)"},[h.createVNode("ellipse",{"fill-opacity":".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"},null),h.createVNode("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"},null),h.createVNode("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"},null),h.createVNode("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"},null),h.createVNode("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"},null)]),h.createVNode("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"},null),h.createVNode("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},[h.createVNode("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"},null),h.createVNode("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"},null)])])])}});um.PRESENTED_IMAGE_DEFAULT=!0;const lE=h.defineComponent({compatConfig:{MODE:3},setup(){const[,e]=Cs(),t=h.computed(()=>{const{colorFill:n,colorFillTertiary:r,colorFillQuaternary:i,colorBgContainer:o}=e.value;return{borderColor:new Gt(n).onBackground(o).toHexString(),shadowColor:new Gt(r).onBackground(o).toHexString(),contentColor:new Gt(i).onBackground(o).toHexString()}});return()=>h.createVNode("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},[h.createVNode("g",{transform:"translate(0 1)",fill:"none","fill-rule":"evenodd"},[h.createVNode("ellipse",{fill:t.value.shadowColor,cx:"32",cy:"33",rx:"32",ry:"7"},null),h.createVNode("g",{"fill-rule":"nonzero",stroke:t.value.borderColor},[h.createVNode("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"},null),h.createVNode("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:t.value.contentColor},null)])])])}});lE.PRESENTED_IMAGE_SIMPLE=!0;const K6=e=>{const{componentCls:t,margin:n,marginXS:r,marginXL:i,fontSize:o,lineHeight:a}=e;return{[t]:{marginInline:r,fontSize:o,lineHeight:a,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:"100%"},svg:{height:"100%",margin:"auto"}},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:i,color:e.colorTextDisabled,[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDisabled,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},Y6=Pn("Empty",e=>{const{componentCls:t,controlHeightLG:n}=e,r=Ot(e,{emptyImgCls:`${t}-img`,emptyImgHeight:n*2.5,emptyImgHeightMD:n,emptyImgHeightSM:n*.875});return[K6(r)]});var X6=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<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Z6=()=>({prefixCls:String,imageStyle:En(),image:Hn(),description:Hn()}),dm=h.defineComponent({name:"AEmpty",compatConfig:{MODE:3},inheritAttrs:!1,props:Z6(),setup(e,t){let{slots:n={},attrs:r}=t;const{direction:i,prefixCls:o}=Ke("empty",e),[a,s]=Y6(o);return()=>{var l,c;const u=o.value,d=O(O({},e),r),{image:f=((l=n.image)===null||l===void 0?void 0:l.call(n))||h.h(um),description:p=((c=n.description)===null||c===void 0?void 0:c.call(n))||void 0,imageStyle:m,class:v=""}=d,g=X6(d,["image","description","imageStyle","class"]),x=typeof f=="function"?f():f,w=typeof x=="object"&&"type"in x&&x.type.PRESENTED_IMAGE_SIMPLE;return a(h.createVNode(iL,{componentName:"Empty",children:b=>{const y=typeof p<"u"?p:b.description,_=typeof y=="string"?y:"empty";let S=null;return typeof x=="string"?S=h.createVNode("img",{alt:_,src:x},null):S=x,h.createVNode("div",ne({class:xe(u,v,s.value,{[`${u}-normal`]:w,[`${u}-rtl`]:i.value==="rtl"})},g),[h.createVNode("div",{class:`${u}-image`,style:m},[S]),y&&h.createVNode("p",{class:`${u}-description`},[y]),n.default&&h.createVNode("div",{class:`${u}-footer`},[Pr(n.default())])])}},null))}}});dm.PRESENTED_IMAGE_DEFAULT=()=>h.h(um),dm.PRESENTED_IMAGE_SIMPLE=()=>h.h(lE);const Ts=kh(dm),Q6=e=>{const{prefixCls:t}=Ke("empty",e);return(r=>{switch(r){case"Table":case"List":return h.createVNode(Ts,{image:Ts.PRESENTED_IMAGE_SIMPLE},null);case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return h.createVNode(Ts,{image:Ts.PRESENTED_IMAGE_SIMPLE,class:`${t.value}-small`},null);default:return h.createVNode(Ts,null,null)}})(e.componentName)},cE=Symbol("SizeContextKey"),uE=()=>h.inject(cE,h.ref(void 0)),J6=e=>{const t=uE();return h.provide(cE,h.computed(()=>e.value||t.value)),e},Ke=(e,t)=>{const n=uE(),r=vi(),i=h.inject(p1,O(O({},h1),{renderEmpty:C=>h.h(Q6,{componentName:C})})),o=h.computed(()=>i.getPrefixCls(e,t.prefixCls)),a=h.computed(()=>{var C,$;return(C=t.direction)!==null&&C!==void 0?C:($=i.direction)===null||$===void 0?void 0:$.value}),s=h.computed(()=>{var C;return(C=t.iconPrefixCls)!==null&&C!==void 0?C:i.iconPrefixCls.value}),l=h.computed(()=>i.getPrefixCls()),c=h.computed(()=>{var C;return(C=i.autoInsertSpaceInButton)===null||C===void 0?void 0:C.value}),u=i.renderEmpty,d=i.space,f=i.pageHeader,p=i.form,m=h.computed(()=>{var C,$;return(C=t.getTargetContainer)!==null&&C!==void 0?C:($=i.getTargetContainer)===null||$===void 0?void 0:$.value}),v=h.computed(()=>{var C,$,M;return($=(C=t.getContainer)!==null&&C!==void 0?C:t.getPopupContainer)!==null&&$!==void 0?$:(M=i.getPopupContainer)===null||M===void 0?void 0:M.value}),g=h.computed(()=>{var C,$;return(C=t.dropdownMatchSelectWidth)!==null&&C!==void 0?C:($=i.dropdownMatchSelectWidth)===null||$===void 0?void 0:$.value}),x=h.computed(()=>{var C;return(t.virtual===void 0?((C=i.virtual)===null||C===void 0?void 0:C.value)!==!1:t.virtual!==!1)&&g.value!==!1}),w=h.computed(()=>t.size||n.value),b=h.computed(()=>{var C,$,M;return(C=t.autocomplete)!==null&&C!==void 0?C:(M=($=i.input)===null||$===void 0?void 0:$.value)===null||M===void 0?void 0:M.autocomplete}),y=h.computed(()=>{var C;return(C=t.disabled)!==null&&C!==void 0?C:r.value}),_=h.computed(()=>{var C;return(C=t.csp)!==null&&C!==void 0?C:i.csp}),S=h.computed(()=>{var C,$;return(C=t.wave)!==null&&C!==void 0?C:($=i.wave)===null||$===void 0?void 0:$.value});return{configProvider:i,prefixCls:o,direction:a,size:w,getTargetContainer:m,getPopupContainer:v,space:d,pageHeader:f,form:p,autoInsertSpaceInButton:c,renderEmpty:u,virtual:x,dropdownMatchSelectWidth:g,rootPrefixCls:l,getPrefixCls:i.getPrefixCls,autocomplete:b,csp:_,iconPrefixCls:s,disabled:y,select:i.select,wave:S}};function ar(e,t){const n=O({},e);for(let r=0;r<t.length;r+=1){const i=t[r];delete n[i]}return n}function dE(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function fE(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function fm(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return fE(n.overflowY,t)||fE(n.overflowX,t)||function(r){var i=function(o){if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}}(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)}(e)}return!1}function ju(e,t,n,r,i,o,a,s){return o<e&&a>t||o>e&&a<t?0:o<=e&&s<=n||a>=t&&s>=n?o-e-r:a>t&&s<n||o<e&&s>n?a-t+i:0}var pE=function(e,t){var n=window,r=t.scrollMode,i=t.block,o=t.inline,a=t.boundary,s=t.skipOverflowHiddenElements,l=typeof a=="function"?a:function(ye){return ye!==a};if(!dE(e))throw new TypeError("Invalid target");for(var c,u,d=document.scrollingElement||document.documentElement,f=[],p=e;dE(p)&&l(p);){if((p=(u=(c=p).parentElement)==null?c.getRootNode().host||null:u)===d){f.push(p);break}p!=null&&p===document.body&&fm(p)&&!fm(document.documentElement)||p!=null&&fm(p,s)&&f.push(p)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,v=n.visualViewport?n.visualViewport.height:innerHeight,g=window.scrollX||pageXOffset,x=window.scrollY||pageYOffset,w=e.getBoundingClientRect(),b=w.height,y=w.width,_=w.top,S=w.right,C=w.bottom,$=w.left,M=i==="start"||i==="nearest"?_:i==="end"?C:_+b/2,R=o==="center"?$+y/2:o==="end"?S:$,I=[],L=0;L<f.length;L++){var k=f[L],V=k.getBoundingClientRect(),W=V.height,q=V.width,H=V.top,Z=V.right,U=V.bottom,X=V.left;if(r==="if-needed"&&_>=0&&$>=0&&C<=v&&S<=m&&_>=H&&C<=U&&$>=X&&S<=Z)return I;var re=getComputedStyle(k),F=parseInt(re.borderLeftWidth,10),z=parseInt(re.borderTopWidth,10),J=parseInt(re.borderRightWidth,10),Y=parseInt(re.borderBottomWidth,10),A=0,E=0,T="offsetWidth"in k?k.offsetWidth-k.clientWidth-F-J:0,D="offsetHeight"in k?k.offsetHeight-k.clientHeight-z-Y:0,B="offsetWidth"in k?k.offsetWidth===0?0:q/k.offsetWidth:0,G="offsetHeight"in k?k.offsetHeight===0?0:W/k.offsetHeight:0;if(d===k)A=i==="start"?M:i==="end"?M-v:i==="nearest"?ju(x,x+v,v,z,Y,x+M,x+M+b,b):M-v/2,E=o==="start"?R:o==="center"?R-m/2:o==="end"?R-m:ju(g,g+m,m,F,J,g+R,g+R+y,y),A=Math.max(0,A+x),E=Math.max(0,E+g);else{A=i==="start"?M-H-z:i==="end"?M-U+Y+D:i==="nearest"?ju(H,U,W,z,Y+D,M,M+b,b):M-(H+W/2)+D/2,E=o==="start"?R-X-F:o==="center"?R-(X+q/2)+T/2:o==="end"?R-Z+J+T:ju(X,Z,q,F,J+T,R,R+y,y);var ae=k.scrollLeft,se=k.scrollTop;M+=se-(A=Math.max(0,Math.min(se+A/G,k.scrollHeight-W/G+D))),R+=ae-(E=Math.max(0,Math.min(ae+E/B,k.scrollWidth-q/B+T)))}I.push({el:k,top:A,left:E})}return I};function hE(e){return e===Object(e)&&Object.keys(e).length!==0}function e4(e,t){t===void 0&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach(function(r){var i=r.el,o=r.top,a=r.left;i.scroll&&n?i.scroll({top:o,left:a,behavior:t}):(i.scrollTop=o,i.scrollLeft=a)})}function t4(e){return e===!1?{block:"end",inline:"nearest"}:hE(e)?e:{block:"start",inline:"nearest"}}function n4(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(hE(t)&&typeof t.behavior=="function")return t.behavior(n?pE(e,t):[]);if(n){var r=t4(t);return e4(pE(e,r),r.behavior)}}function r4(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mE(e,t,n){return n&&r4(e,n),e}function Fu(){return(Fu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function gE(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function vE(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}function yE(e){return((t=e)!=null&&typeof t=="object"&&Array.isArray(t)===!1)==1&&Object.prototype.toString.call(e)==="[object Object]";var t}var bE=Object.prototype,xE=bE.toString,i4=bE.hasOwnProperty,_E=/^\s*function (\w+)/;function wE(e){var t,n=(t=e==null?void 0:e.type)!==null&&t!==void 0?t:e;if(n){var r=n.toString().match(_E);return r?r[1]:""}return""}var eo=function(e){var t,n;return yE(e)!==!1&&typeof(t=e.constructor)=="function"&&yE(n=t.prototype)!==!1&&n.hasOwnProperty("isPrototypeOf")!==!1},EE=function(e){return e},Mt=EE;if(process.env.NODE_ENV!=="production"){var o4=typeof console<"u";Mt=o4?function(e){console.warn("[VueTypes warn]: "+e)}:EE}var Ps=function(e,t){return i4.call(e,t)},a4=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},na=Array.isArray||function(e){return xE.call(e)==="[object Array]"},ra=function(e){return xE.call(e)==="[object Function]"},Hu=function(e){return eo(e)&&Ps(e,"_vueTypes_name")},SE=function(e){return eo(e)&&(Ps(e,"type")||["_vueTypes_name","validator","default","required"].some(function(t){return Ps(e,t)}))};function pm(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function to(e,t,n){var r;n===void 0&&(n=!1);var i=!0,o="";r=eo(e)?e:{type:e};var a=Hu(r)?r._vueTypes_name+" - ":"";if(SE(r)&&r.type!==null){if(r.type===void 0||r.type===!0||!r.required&&t===void 0)return i;na(r.type)?(i=r.type.some(function(d){return to(d,t,!0)===!0}),o=r.type.map(function(d){return wE(d)}).join(" or ")):i=(o=wE(r))==="Array"?na(t):o==="Object"?eo(t):o==="String"||o==="Number"||o==="Boolean"||o==="Function"?function(d){if(d==null)return"";var f=d.constructor.toString().match(_E);return f?f[1]:""}(t)===o:t instanceof r.type}if(!i){var s=a+'value "'+t+'" should be of type "'+o+'"';return n===!1?(Mt(s),!1):s}if(Ps(r,"validator")&&ra(r.validator)){var l=Mt,c=[];if(Mt=function(d){c.push(d)},i=r.validator(t),Mt=l,!i){var u=(c.length>1?"* ":"")+c.join(`
|
|
271
|
+
* `);return c.length=0,n===!1?(Mt(u),i):u}}return i}function rn(e,t){var n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get:function(){return this.required=!0,this}},def:{value:function(i){return i!==void 0||this.default?ra(i)||to(this,i,!0)===!0?(this.default=na(i)?function(){return[].concat(i)}:eo(i)?function(){return Object.assign({},i)}:i,this):(Mt(this._vueTypes_name+' - invalid default value: "'+i+'"'),this):this}}}),r=n.validator;return ra(r)&&(n.validator=pm(r,n)),n}function sr(e,t){var n=rn(e,t);return Object.defineProperty(n,"validate",{value:function(r){return ra(this.validator)&&Mt(this._vueTypes_name+` - calling .validate() will overwrite the current custom validator function. Validator info:
|
|
272
|
+
`+JSON.stringify(this)),this.validator=pm(r,this),this}})}function CE(e,t,n){var r,i,o=(r=t,i={},Object.getOwnPropertyNames(r).forEach(function(d){i[d]=Object.getOwnPropertyDescriptor(r,d)}),Object.defineProperties({},i));if(o._vueTypes_name=e,!eo(n))return o;var a,s,l=n.validator,c=vE(n,["validator"]);if(ra(l)){var u=o.validator;u&&(u=(s=(a=u).__original)!==null&&s!==void 0?s:a),o.validator=pm(u?function(d){return u.call(this,d)&&l.call(this,d)}:l,o)}return Object.assign(o,c)}function zu(e){return e.replace(/^(?!\s*$)/gm," ")}var s4=function(){return sr("any",{})},l4=function(){return sr("function",{type:Function})},c4=function(){return sr("boolean",{type:Boolean})},u4=function(){return sr("string",{type:String})},d4=function(){return sr("number",{type:Number})},f4=function(){return sr("array",{type:Array})},p4=function(){return sr("object",{type:Object})},h4=function(){return rn("integer",{type:Number,validator:function(e){return a4(e)}})},m4=function(){return rn("symbol",{validator:function(e){return typeof e=="symbol"}})};function g4(e,t){if(t===void 0&&(t="custom validation failed"),typeof e!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return rn(e.name||"<<anonymous function>>",{validator:function(n){var r=e(n);return r||Mt(this._vueTypes_name+" - "+t),r}})}function v4(e){if(!na(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");var t='oneOf - value should be one of "'+e.join('", "')+'".',n=e.reduce(function(r,i){if(i!=null){var o=i.constructor;r.indexOf(o)===-1&&r.push(o)}return r},[]);return rn("oneOf",{type:n.length>0?n:void 0,validator:function(r){var i=e.indexOf(r)!==-1;return i||Mt(t),i}})}function y4(e){if(!na(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");for(var t=!1,n=[],r=0;r<e.length;r+=1){var i=e[r];if(SE(i)){if(Hu(i)&&i._vueTypes_name==="oneOf"){n=n.concat(i.type);continue}if(ra(i.validator)&&(t=!0),i.type!==!0&&i.type){n=n.concat(i.type);continue}}n.push(i)}return n=n.filter(function(o,a){return n.indexOf(o)===a}),rn("oneOfType",t?{type:n,validator:function(o){var a=[],s=e.some(function(l){var c=to(Hu(l)&&l._vueTypes_name==="oneOf"?l.type||null:l,o,!0);return typeof c=="string"&&a.push(c),c===!0});return s||Mt("oneOfType - provided value does not match any of the "+a.length+` passed-in validators:
|
|
273
|
+
`+zu(a.join(`
|
|
274
|
+
`))),s}}:{type:n})}function b4(e){return rn("arrayOf",{type:Array,validator:function(t){var n,r=t.every(function(i){return(n=to(e,i,!0))===!0});return r||Mt(`arrayOf - value validation error:
|
|
275
|
+
`+zu(n)),r}})}function x4(e){return rn("instanceOf",{type:e})}function _4(e){return rn("objectOf",{type:Object,validator:function(t){var n,r=Object.keys(t).every(function(i){return(n=to(e,t[i],!0))===!0});return r||Mt(`objectOf - value validation error:
|
|
276
|
+
`+zu(n)),r}})}function w4(e){var t=Object.keys(e),n=t.filter(function(i){var o;return!!(!((o=e[i])===null||o===void 0)&&o.required)}),r=rn("shape",{type:Object,validator:function(i){var o=this;if(!eo(i))return!1;var a=Object.keys(i);if(n.length>0&&n.some(function(l){return a.indexOf(l)===-1})){var s=n.filter(function(l){return a.indexOf(l)===-1});return Mt(s.length===1?'shape - required property "'+s[0]+'" is not defined.':'shape - required properties "'+s.join('", "')+'" are not defined.'),!1}return a.every(function(l){if(t.indexOf(l)===-1)return o._vueTypes_isLoose===!0||(Mt('shape - shape definition does not include a "'+l+'" property. Allowed keys: "'+t.join('", "')+'".'),!1);var c=to(e[l],i[l],!0);return typeof c=="string"&&Mt('shape - "'+l+`" property validation error:
|
|
277
|
+
`+zu(c)),c===!0})}});return Object.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get:function(){return this._vueTypes_isLoose=!0,this}}),r}var lr=function(){function e(){}return e.extend=function(t){var n=this;if(na(t))return t.forEach(function(d){return n.extend(d)}),this;var r=t.name,i=t.validate,o=i!==void 0&&i,a=t.getter,s=a!==void 0&&a,l=vE(t,["name","validate","getter"]);if(Ps(this,r))throw new TypeError('[VueTypes error]: Type "'+r+'" already defined');var c,u=l.type;return Hu(u)?(delete l.type,Object.defineProperty(this,r,s?{get:function(){return CE(r,u,l)}}:{value:function(){var d,f=CE(r,u,l);return f.validator&&(f.validator=(d=f.validator).bind.apply(d,[f].concat([].slice.call(arguments)))),f}})):(c=s?{get:function(){var d=Object.assign({},l);return o?sr(r,d):rn(r,d)},enumerable:!0}:{value:function(){var d,f,p=Object.assign({},l);return d=o?sr(r,p):rn(r,p),p.validator&&(d.validator=(f=p.validator).bind.apply(f,[d].concat([].slice.call(arguments)))),d},enumerable:!0},Object.defineProperty(this,r,c))},mE(e,null,[{key:"any",get:function(){return s4()}},{key:"func",get:function(){return l4().def(this.defaults.func)}},{key:"bool",get:function(){return c4().def(this.defaults.bool)}},{key:"string",get:function(){return u4().def(this.defaults.string)}},{key:"number",get:function(){return d4().def(this.defaults.number)}},{key:"array",get:function(){return f4().def(this.defaults.array)}},{key:"object",get:function(){return p4().def(this.defaults.object)}},{key:"integer",get:function(){return h4().def(this.defaults.integer)}},{key:"symbol",get:function(){return m4()}}]),e}();function TE(e){var t;return e===void 0&&(e={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),(t=function(n){function r(){return n.apply(this,arguments)||this}return gE(r,n),mE(r,null,[{key:"sensibleDefaults",get:function(){return Fu({},this.defaults)},set:function(i){this.defaults=i!==!1?Fu({},i!==!0?i:e):{}}}]),r}(lr)).defaults=Fu({},e),t}lr.defaults={},lr.custom=g4,lr.oneOf=v4,lr.instanceOf=x4,lr.oneOfType=y4,lr.arrayOf=b4,lr.objectOf=_4,lr.shape=w4,lr.utils={validate:function(e,t){return to(t,e,!0)===!0},toType:function(e,t,n){return n===void 0&&(n=!1),n?sr(e,t):rn(e,t)}},function(e){function t(){return e.apply(this,arguments)||this}return gE(t,e),t}(TE());const oe=TE({func:void 0,bool:void 0,string:void 0,number:void 0,array:void 0,object:void 0,integer:void 0});oe.extend([{name:"looseBool",getter:!0,type:Boolean,default:void 0},{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VueNode",getter:!0,type:null}]);const Vu=(e,t,n)=>{zh(e,`[ant-design-vue: ${t}] ${n}`)};function E4(){return""}function S4(e){return e?e.ownerDocument:window.document}function PE(){}const C4=()=>({action:oe.oneOfType([oe.string,oe.arrayOf(oe.string)]).def([]),showAction:oe.any.def([]),hideAction:oe.any.def([]),getPopupClassNameFromAlign:oe.any.def(E4),onPopupVisibleChange:Function,afterPopupVisibleChange:oe.func.def(PE),popup:oe.any,arrow:oe.bool.def(!0),popupStyle:{type:Object,default:void 0},prefixCls:oe.string.def("rc-trigger-popup"),popupClassName:oe.string.def(""),popupPlacement:String,builtinPlacements:oe.object,popupTransitionName:String,popupAnimation:oe.any,mouseEnterDelay:oe.number.def(0),mouseLeaveDelay:oe.number.def(.1),zIndex:Number,focusDelay:oe.number.def(0),blurDelay:oe.number.def(.15),getPopupContainer:Function,getDocument:oe.func.def(S4),forceRender:{type:Boolean,default:void 0},destroyPopupOnHide:{type:Boolean,default:!1},mask:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},popupAlign:oe.object.def(()=>({})),popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:{type:Boolean,default:!1},maskTransitionName:String,maskAnimation:String,stretch:String,alignPoint:{type:Boolean,default:void 0},autoDestroy:{type:Boolean,default:!1},mobile:Object,getTriggerDOMNode:Function}),hm={visible:Boolean,prefixCls:String,zIndex:Number,destroyPopupOnHide:Boolean,forceRender:Boolean,arrow:{type:Boolean,default:!0},animation:[String,Object],transitionName:String,stretch:{type:String},align:{type:Object},point:{type:Object},getRootDomNode:{type:Function},getClassNameFromAlign:{type:Function},onAlign:{type:Function},onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function},onTouchstart:{type:Function}},T4=O(O({},hm),{mobile:{type:Object}}),P4=O(O({},hm),{mask:Boolean,mobile:{type:Object},maskAnimation:String,maskTransitionName:String});function $E(e){let{prefixCls:t,animation:n,transitionName:r}=e;return n?{name:`${t}-${n}`}:r?{name:r}:{}}function RE(e){const{prefixCls:t,visible:n,zIndex:r,mask:i,maskAnimation:o,maskTransitionName:a}=e;if(!i)return null;let s={};return(a||o)&&(s=$E({prefixCls:t,transitionName:a,animation:o})),h.createVNode(h.Transition,ne({appear:!0},s),{default:()=>[h.withDirectives(h.createVNode("div",{style:{zIndex:r},class:`${t}-mask`},null),[[h.resolveDirective("if"),n]])]})}RE.displayName="Mask";const $4=h.defineComponent({compatConfig:{MODE:3},name:"MobilePopupInner",inheritAttrs:!1,props:T4,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup(e,t){let{expose:n,slots:r}=t;const i=h.ref();return n({forceAlign:()=>{},getElement:()=>i.value}),()=>{var o;const{zIndex:a,visible:s,prefixCls:l,mobile:{popupClassName:c,popupStyle:u,popupMotion:d={},popupRender:f}={}}=e,p=O({zIndex:a},u);let m=en((o=r.default)===null||o===void 0?void 0:o.call(r));m.length>1&&(m=h.createVNode("div",{class:`${l}-content`},[m])),f&&(m=f(m));const v=xe(l,c);return h.createVNode(h.Transition,ne({ref:i},d),{default:()=>[s?h.createVNode("div",{class:v,style:p},[m]):null]})}}});var R4=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};const AE=["measure","align",null,"motion"],A4=(e,t)=>{const n=h.shallowRef(null),r=h.shallowRef(),i=h.shallowRef(!1);function o(l){i.value||(n.value=l)}function a(){Tt.cancel(r.value)}function s(l){a(),r.value=Tt(()=>{let c=n.value;switch(n.value){case"align":c="motion";break;case"motion":c="stable";break}o(c),l==null||l()})}return h.watch(e,()=>{o("measure")},{immediate:!0,flush:"post"}),h.onMounted(()=>{h.watch(n,()=>{switch(n.value){case"measure":t();break}n.value&&(r.value=Tt(()=>R4(void 0,void 0,void 0,function*(){const l=AE.indexOf(n.value),c=AE[l+1];c&&l!==-1&&o(c)})))},{immediate:!0,flush:"post"})}),h.onBeforeUnmount(()=>{i.value=!0,a()}),[n,s]},O4=e=>{const t=h.shallowRef({width:0,height:0});function n(i){t.value={width:i.offsetWidth,height:i.offsetHeight}}return[h.computed(()=>{const i={};if(e.value){const{width:o,height:a}=t.value;e.value.indexOf("height")!==-1&&a?i.height=`${a}px`:e.value.indexOf("minHeight")!==-1&&a&&(i.minHeight=`${a}px`),e.value.indexOf("width")!==-1&&o?i.width=`${o}px`:e.value.indexOf("minWidth")!==-1&&o&&(i.minWidth=`${o}px`)}return i}),n]};function OE(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 ME(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OE(Object(n),!0).forEach(function(r){M4(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mm(e){"@babel/helpers - typeof";return mm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mm(e)}function M4(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $s,I4={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function Wu(){if($s!==void 0)return $s;$s="";var e=document.createElement("p").style,t="Transform";for(var n in I4)n+t in e&&($s=n);return $s}function IE(){return Wu()?"".concat(Wu(),"TransitionProperty"):"transitionProperty"}function Gu(){return Wu()?"".concat(Wu(),"Transform"):"transform"}function DE(e,t){var n=IE();n&&(e.style[n]=t,n!=="transitionProperty"&&(e.style.transitionProperty=t))}function gm(e,t){var n=Gu();n&&(e.style[n]=t,n!=="transform"&&(e.style.transform=t))}function D4(e){return e.style.transitionProperty||e.style[IE()]}function N4(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("transform")||t.getPropertyValue(Gu());if(n&&n!=="none"){var r=n.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(r[12]||r[4],0),y:parseFloat(r[13]||r[5],0)}}return{x:0,y:0}}var B4=/matrix\((.*)\)/,k4=/matrix3d\((.*)\)/;function L4(e,t){var n=window.getComputedStyle(e,null),r=n.getPropertyValue("transform")||n.getPropertyValue(Gu());if(r&&r!=="none"){var i,o=r.match(B4);if(o)o=o[1],i=o.split(",").map(function(s){return parseFloat(s,10)}),i[4]=t.x,i[5]=t.y,gm(e,"matrix(".concat(i.join(","),")"));else{var a=r.match(k4)[1];i=a.split(",").map(function(s){return parseFloat(s,10)}),i[12]=t.x,i[13]=t.y,gm(e,"matrix3d(".concat(i.join(","),")"))}}else gm(e,"translateX(".concat(t.x,"px) translateY(").concat(t.y,"px) translateZ(0)"))}var j4=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,Rs;function NE(e){var t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}function ia(e,t,n){var r=n;if(mm(t)==="object"){for(var i in t)t.hasOwnProperty(i)&&ia(e,i,t[i]);return}if(typeof r<"u"){typeof r=="number"&&(r="".concat(r,"px")),e.style[t]=r;return}return Rs(e,t)}function F4(e){var t,n,r,i=e.ownerDocument,o=i.body,a=i&&i.documentElement;return t=e.getBoundingClientRect(),n=Math.floor(t.left),r=Math.floor(t.top),n-=a.clientLeft||o.clientLeft||0,r-=a.clientTop||o.clientTop||0,{left:n,top:r}}function BE(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if(typeof n!="number"){var i=e.document;n=i.documentElement[r],typeof n!="number"&&(n=i.body[r])}return n}function kE(e){return BE(e)}function LE(e){return BE(e,!0)}function As(e){var t=F4(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=kE(r),t.top+=LE(r),t}function vm(e){return e!=null&&e==e.window}function jE(e){return vm(e)?e.document:e.nodeType===9?e:e.ownerDocument}function H4(e,t,n){var r=n,i="",o=jE(e);return r=r||o.defaultView.getComputedStyle(e,null),r&&(i=r.getPropertyValue(t)||r[t]),i}var z4=new RegExp("^(".concat(j4,")(?!px)[a-z%]+$"),"i"),V4=/^(top|right|bottom|left)$/,ym="currentStyle",bm="runtimeStyle",no="left",W4="px";function G4(e,t){var n=e[ym]&&e[ym][t];if(z4.test(n)&&!V4.test(t)){var r=e.style,i=r[no],o=e[bm][no];e[bm][no]=e[ym][no],r[no]=t==="fontSize"?"1em":n||0,n=r.pixelLeft+W4,r[no]=i,e[bm][no]=o}return n===""?"auto":n}typeof window<"u"&&(Rs=window.getComputedStyle?H4:G4);function Uu(e,t){return e==="left"?t.useCssRight?"right":e:t.useCssBottom?"bottom":e}function FE(e){if(e==="left")return"right";if(e==="right")return"left";if(e==="top")return"bottom";if(e==="bottom")return"top"}function HE(e,t,n){ia(e,"position")==="static"&&(e.style.position="relative");var r=-999,i=-999,o=Uu("left",n),a=Uu("top",n),s=FE(o),l=FE(a);o!=="left"&&(r=999),a!=="top"&&(i=999);var c="",u=As(e);("left"in t||"top"in t)&&(c=D4(e)||"",DE(e,"none")),"left"in t&&(e.style[s]="",e.style[o]="".concat(r,"px")),"top"in t&&(e.style[l]="",e.style[a]="".concat(i,"px")),NE(e);var d=As(e),f={};for(var p in t)if(t.hasOwnProperty(p)){var m=Uu(p,n),v=p==="left"?r:i,g=u[p]-d[p];m===p?f[m]=v+g:f[m]=v-g}ia(e,f),NE(e),("left"in t||"top"in t)&&DE(e,c);var x={};for(var w in t)if(t.hasOwnProperty(w)){var b=Uu(w,n),y=t[w]-u[w];w===b?x[b]=f[b]+y:x[b]=f[b]-y}ia(e,x)}function U4(e,t){var n=As(e),r=N4(e),i={x:r.x,y:r.y};"left"in t&&(i.x=r.x+t.left-n.left),"top"in t&&(i.y=r.y+t.top-n.top),L4(e,i)}function q4(e,t,n){if(n.ignoreShake){var r=As(e),i=r.left.toFixed(0),o=r.top.toFixed(0),a=t.left.toFixed(0),s=t.top.toFixed(0);if(i===a&&o===s)return}n.useCssRight||n.useCssBottom?HE(e,t,n):n.useCssTransform&&Gu()in document.body.style?U4(e,t):HE(e,t,n)}function xm(e,t){for(var n=0;n<e.length;n++)t(e[n])}function zE(e){return Rs(e,"boxSizing")==="border-box"}var K4=["margin","border","padding"],_m=-1,Y4=2,wm=1,X4=0;function Z4(e,t,n){var r={},i=e.style,o;for(o in t)t.hasOwnProperty(o)&&(r[o]=i[o],i[o]=t[o]);n.call(e);for(o in t)t.hasOwnProperty(o)&&(i[o]=r[o])}function Os(e,t,n){var r=0,i,o,a;for(o=0;o<t.length;o++)if(i=t[o],i)for(a=0;a<n.length;a++){var s=void 0;i==="border"?s="".concat(i).concat(n[a],"Width"):s=i+n[a],r+=parseFloat(Rs(e,s))||0}return r}var cr={getParent:function(t){var n=t;do n.nodeType===11&&n.host?n=n.host:n=n.parentNode;while(n&&n.nodeType!==1&&n.nodeType!==9);return n}};xm(["Width","Height"],function(e){cr["doc".concat(e)]=function(t){var n=t.document;return Math.max(n.documentElement["scroll".concat(e)],n.body["scroll".concat(e)],cr["viewport".concat(e)](n))},cr["viewport".concat(e)]=function(t){var n="client".concat(e),r=t.document,i=r.body,o=r.documentElement,a=o[n];return r.compatMode==="CSS1Compat"&&a||i&&i[n]||a}});function VE(e,t,n){var r=n;if(vm(e))return t==="width"?cr.viewportWidth(e):cr.viewportHeight(e);if(e.nodeType===9)return t==="width"?cr.docWidth(e):cr.docHeight(e);var i=t==="width"?["Left","Right"]:["Top","Bottom"],o=Math.floor(t==="width"?e.getBoundingClientRect().width:e.getBoundingClientRect().height),a=zE(e),s=0;(o==null||o<=0)&&(o=void 0,s=Rs(e,t),(s==null||Number(s)<0)&&(s=e.style[t]||0),s=Math.floor(parseFloat(s))||0),r===void 0&&(r=a?wm:_m);var l=o!==void 0||a,c=o||s;return r===_m?l?c-Os(e,["border","padding"],i):s:l?r===wm?c:c+(r===Y4?-Os(e,["border"],i):Os(e,["margin"],i)):s+Os(e,K4.slice(r),i)}var Q4={position:"absolute",visibility:"hidden",display:"block"};function WE(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=t[0];return i.offsetWidth!==0?r=VE.apply(void 0,t):Z4(i,Q4,function(){r=VE.apply(void 0,t)}),r}xm(["width","height"],function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);cr["outer".concat(t)]=function(r,i){return r&&WE(r,e,i?X4:wm)};var n=e==="width"?["Left","Right"]:["Top","Bottom"];cr[e]=function(r,i){var o=i;if(o!==void 0){if(r){var a=zE(r);return a&&(o+=Os(r,["padding","border"],n)),ia(r,e,o)}return}return r&&WE(r,e,_m)}});function GE(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var Ee={getWindow:function(t){if(t&&t.document&&t.setTimeout)return t;var n=t.ownerDocument||t;return n.defaultView||n.parentWindow},getDocument:jE,offset:function(t,n,r){if(typeof n<"u")q4(t,n,r||{});else return As(t)},isWindow:vm,each:xm,css:ia,clone:function(t){var n,r={};for(n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);var i=t.overflow;if(i)for(n in t)t.hasOwnProperty(n)&&(r.overflow[n]=t.overflow[n]);return r},mix:GE,getWindowScrollLeft:function(t){return kE(t)},getWindowScrollTop:function(t){return LE(t)},merge:function(){for(var t={},n=0;n<arguments.length;n++)Ee.mix(t,n<0||arguments.length<=n?void 0:arguments[n]);return t},viewportWidth:0,viewportHeight:0};GE(Ee,cr);var Em=Ee.getParent;function Sm(e){if(Ee.isWindow(e)||e.nodeType===9)return null;var t=Ee.getDocument(e),n=t.body,r,i=Ee.css(e,"position"),o=i==="fixed"||i==="absolute";if(!o)return e.nodeName.toLowerCase()==="html"?null:Em(e);for(r=Em(e);r&&r!==n&&r.nodeType!==9;r=Em(r))if(i=Ee.css(r,"position"),i!=="static")return r;return null}var UE=Ee.getParent;function J4(e){if(Ee.isWindow(e)||e.nodeType===9)return!1;var t=Ee.getDocument(e),n=t.body,r=null;for(r=UE(e);r&&r!==n&&r!==t;r=UE(r)){var i=Ee.css(r,"position");if(i==="fixed")return!0}return!1}function Cm(e,t){for(var n={left:0,right:1/0,top:0,bottom:1/0},r=Sm(e),i=Ee.getDocument(e),o=i.defaultView||i.parentWindow,a=i.body,s=i.documentElement;r;){if((navigator.userAgent.indexOf("MSIE")===-1||r.clientWidth!==0)&&r!==a&&r!==s&&Ee.css(r,"overflow")!=="visible"){var l=Ee.offset(r);l.left+=r.clientLeft,l.top+=r.clientTop,n.top=Math.max(n.top,l.top),n.right=Math.min(n.right,l.left+r.clientWidth),n.bottom=Math.min(n.bottom,l.top+r.clientHeight),n.left=Math.max(n.left,l.left)}else if(r===a||r===s)break;r=Sm(r)}var c=null;if(!Ee.isWindow(e)&&e.nodeType!==9){c=e.style.position;var u=Ee.css(e,"position");u==="absolute"&&(e.style.position="fixed")}var d=Ee.getWindowScrollLeft(o),f=Ee.getWindowScrollTop(o),p=Ee.viewportWidth(o),m=Ee.viewportHeight(o),v=s.scrollWidth,g=s.scrollHeight,x=window.getComputedStyle(a);if(x.overflowX==="hidden"&&(v=o.innerWidth),x.overflowY==="hidden"&&(g=o.innerHeight),e.style&&(e.style.position=c),t||J4(e))n.left=Math.max(n.left,d),n.top=Math.max(n.top,f),n.right=Math.min(n.right,d+p),n.bottom=Math.min(n.bottom,f+m);else{var w=Math.max(v,d+p);n.right=Math.min(n.right,w);var b=Math.max(g,f+m);n.bottom=Math.min(n.bottom,b)}return n.top>=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function ej(e,t,n,r){var i=Ee.clone(e),o={width:t.width,height:t.height};return r.adjustX&&i.left<n.left&&(i.left=n.left),r.resizeWidth&&i.left>=n.left&&i.left+o.width>n.right&&(o.width-=i.left+o.width-n.right),r.adjustX&&i.left+o.width>n.right&&(i.left=Math.max(n.right-o.width,n.left)),r.adjustY&&i.top<n.top&&(i.top=n.top),r.resizeHeight&&i.top>=n.top&&i.top+o.height>n.bottom&&(o.height-=i.top+o.height-n.bottom),r.adjustY&&i.top+o.height>n.bottom&&(i.top=Math.max(n.bottom-o.height,n.top)),Ee.mix(i,o)}function Tm(e){var t,n,r;if(!Ee.isWindow(e)&&e.nodeType!==9)t=Ee.offset(e),n=Ee.outerWidth(e),r=Ee.outerHeight(e);else{var i=Ee.getWindow(e);t={left:Ee.getWindowScrollLeft(i),top:Ee.getWindowScrollTop(i)},n=Ee.viewportWidth(i),r=Ee.viewportHeight(i)}return t.width=n,t.height=r,t}function qE(e,t){var n=t.charAt(0),r=t.charAt(1),i=e.width,o=e.height,a=e.left,s=e.top;return n==="c"?s+=o/2:n==="b"&&(s+=o),r==="c"?a+=i/2:r==="r"&&(a+=i),{left:a,top:s}}function qu(e,t,n,r,i){var o=qE(t,n[1]),a=qE(e,n[0]),s=[a.left-o.left,a.top-o.top];return{left:Math.round(e.left-s[0]+r[0]-i[0]),top:Math.round(e.top-s[1]+r[1]-i[1])}}function KE(e,t,n){return e.left<n.left||e.left+t.width>n.right}function YE(e,t,n){return e.top<n.top||e.top+t.height>n.bottom}function tj(e,t,n){return e.left>n.right||e.left+t.width<n.left}function nj(e,t,n){return e.top>n.bottom||e.top+t.height<n.top}function Ku(e,t,n){var r=[];return Ee.each(e,function(i){r.push(i.replace(t,function(o){return n[o]}))}),r}function Yu(e,t){return e[t]=-e[t],e}function XE(e,t){var n;return/%$/.test(e)?n=parseInt(e.substring(0,e.length-1),10)/100*t:n=parseInt(e,10),n||0}function ZE(e,t){e[0]=XE(e[0],t.width),e[1]=XE(e[1],t.height)}function QE(e,t,n,r){var i=n.points,o=n.offset||[0,0],a=n.targetOffset||[0,0],s=n.overflow,l=n.source||e;o=[].concat(o),a=[].concat(a),s=s||{};var c={},u=0,d=!!(s&&s.alwaysByViewport),f=Cm(l,d),p=Tm(l);ZE(o,p),ZE(a,t);var m=qu(p,t,i,o,a),v=Ee.merge(p,m);if(f&&(s.adjustX||s.adjustY)&&r){if(s.adjustX&&KE(m,p,f)){var g=Ku(i,/[lr]/gi,{l:"r",r:"l"}),x=Yu(o,0),w=Yu(a,0),b=qu(p,t,g,x,w);tj(b,p,f)||(u=1,i=g,o=x,a=w)}if(s.adjustY&&YE(m,p,f)){var y=Ku(i,/[tb]/gi,{t:"b",b:"t"}),_=Yu(o,1),S=Yu(a,1),C=qu(p,t,y,_,S);nj(C,p,f)||(u=1,i=y,o=_,a=S)}u&&(m=qu(p,t,i,o,a),Ee.mix(v,m));var $=KE(m,p,f),M=YE(m,p,f);if($||M){var R=i;$&&(R=Ku(i,/[lr]/gi,{l:"r",r:"l"})),M&&(R=Ku(i,/[tb]/gi,{t:"b",b:"t"})),i=R,o=n.offset||[0,0],a=n.targetOffset||[0,0]}c.adjustX=s.adjustX&&$,c.adjustY=s.adjustY&&M,(c.adjustX||c.adjustY)&&(v=ej(m,p,f,c))}return v.width!==p.width&&Ee.css(l,"width",Ee.width(l)+v.width-p.width),v.height!==p.height&&Ee.css(l,"height",Ee.height(l)+v.height-p.height),Ee.offset(l,{left:v.left,top:v.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:i,offset:o,targetOffset:a,overflow:c}}function rj(e,t){var n=Cm(e,t),r=Tm(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}function Pm(e,t,n){var r=n.target||t,i=Tm(r),o=!rj(r,n.overflow&&n.overflow.alwaysByViewport);return QE(e,i,n,o)}Pm.__getOffsetParent=Sm,Pm.__getVisibleRectForElement=Cm;function ij(e,t,n){var r,i,o=Ee.getDocument(e),a=o.defaultView||o.parentWindow,s=Ee.getWindowScrollLeft(a),l=Ee.getWindowScrollTop(a),c=Ee.viewportWidth(a),u=Ee.viewportHeight(a);"pageX"in t?r=t.pageX:r=s+t.clientX,"pageY"in t?i=t.pageY:i=l+t.clientY;var d={left:r,top:i,width:0,height:0},f=r>=0&&r<=s+c&&i>=0&&i<=l+u,p=[n.points[0],"cc"];return QE(e,d,ME(ME({},n),{},{points:p}),f)}function on(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=e;if(Array.isArray(e)&&(i=Pr(e)[0]),!i)return null;const o=h.cloneVNode(i,t,r);return o.props=n?O(O({},o.props),t):o.props,Rr(typeof o.props.class!="object","class must be string"),o}const JE=e=>{if(!e)return!1;if(e.offsetParent)return!0;if(e.getBBox){const t=e.getBBox();if(t.width||t.height)return!0}if(e.getBoundingClientRect){const t=e.getBoundingClientRect();if(t.width||t.height)return!0}return!1};function oj(e,t){return e===t?!0:!e||!t?!1:"pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t?e.clientX===t.clientX&&e.clientY===t.clientY:!1}function aj(e,t){e!==document.activeElement&&Xi(t,e)&&typeof e.focus=="function"&&e.focus()}function eS(e,t){let n=null,r=null;function i(a){let[{target:s}]=a;if(!document.documentElement.contains(s))return;const{width:l,height:c}=s.getBoundingClientRect(),u=Math.floor(l),d=Math.floor(c);(n!==u||r!==d)&&Promise.resolve().then(()=>{t({width:u,height:d})}),n=u,r=d}const o=new s1(i);return e&&o.observe(e),()=>{o.disconnect()}}const sj=(e,t)=>{let n=!1,r=null;function i(){clearTimeout(r)}function o(a){if(!n||a===!0){if(e()===!1)return;n=!0,i(),r=setTimeout(()=>{n=!1},t.value)}else i(),r=setTimeout(()=>{n=!1,o()},t.value)}return[o,()=>{n=!1,i()}]};function lj(){this.__data__=[],this.size=0}function $m(e,t){return e===t||e!==e&&t!==t}function Xu(e,t){for(var n=e.length;n--;)if($m(e[n][0],t))return n;return-1}var cj=Array.prototype,uj=cj.splice;function dj(e){var t=this.__data__,n=Xu(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():uj.call(t,n,1),--this.size,!0}function fj(e){var t=this.__data__,n=Xu(t,e);return n<0?void 0:t[n][1]}function pj(e){return Xu(this.__data__,e)>-1}function hj(e,t){var n=this.__data__,r=Xu(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Mr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Mr.prototype.clear=lj,Mr.prototype.delete=dj,Mr.prototype.get=fj,Mr.prototype.has=pj,Mr.prototype.set=hj;function mj(){this.__data__=new Mr,this.size=0}function gj(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function vj(e){return this.__data__.get(e)}function yj(e){return this.__data__.has(e)}var tS=typeof global=="object"&&global&&global.Object===Object&&global,bj=typeof self=="object"&&self&&self.Object===Object&&self,Wn=tS||bj||Function("return this")(),$n=Wn.Symbol,nS=Object.prototype,xj=nS.hasOwnProperty,_j=nS.toString,Ms=$n?$n.toStringTag:void 0;function wj(e){var t=xj.call(e,Ms),n=e[Ms];try{e[Ms]=void 0;var r=!0}catch{}var i=_j.call(e);return r&&(t?e[Ms]=n:delete e[Ms]),i}var Ej=Object.prototype,Sj=Ej.toString;function Cj(e){return Sj.call(e)}var Tj="[object Null]",Pj="[object Undefined]",rS=$n?$n.toStringTag:void 0;function ro(e){return e==null?e===void 0?Pj:Tj:rS&&rS in Object(e)?wj(e):Cj(e)}function Ir(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var $j="[object AsyncFunction]",Rj="[object Function]",Aj="[object GeneratorFunction]",Oj="[object Proxy]";function iS(e){if(!Ir(e))return!1;var t=ro(e);return t==Rj||t==Aj||t==$j||t==Oj}var Rm=Wn["__core-js_shared__"],oS=function(){var e=/[^.]+$/.exec(Rm&&Rm.keys&&Rm.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Mj(e){return!!oS&&oS in e}var Ij=Function.prototype,Dj=Ij.toString;function io(e){if(e!=null){try{return Dj.call(e)}catch{}try{return e+""}catch{}}return""}var Nj=/[\\^$.*+?()[\]{}|]/g,Bj=/^\[object .+?Constructor\]$/,kj=Function.prototype,Lj=Object.prototype,jj=kj.toString,Fj=Lj.hasOwnProperty,Hj=RegExp("^"+jj.call(Fj).replace(Nj,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function zj(e){if(!Ir(e)||Mj(e))return!1;var t=iS(e)?Hj:Bj;return t.test(io(e))}function Vj(e,t){return e==null?void 0:e[t]}function oo(e,t){var n=Vj(e,t);return zj(n)?n:void 0}var Is=oo(Wn,"Map"),Ds=oo(Object,"create");function Wj(){this.__data__=Ds?Ds(null):{},this.size=0}function Gj(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Uj="__lodash_hash_undefined__",qj=Object.prototype,Kj=qj.hasOwnProperty;function Yj(e){var t=this.__data__;if(Ds){var n=t[e];return n===Uj?void 0:n}return Kj.call(t,e)?t[e]:void 0}var Xj=Object.prototype,Zj=Xj.hasOwnProperty;function Qj(e){var t=this.__data__;return Ds?t[e]!==void 0:Zj.call(t,e)}var Jj="__lodash_hash_undefined__";function e8(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ds&&t===void 0?Jj:t,this}function ao(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ao.prototype.clear=Wj,ao.prototype.delete=Gj,ao.prototype.get=Yj,ao.prototype.has=Qj,ao.prototype.set=e8;function t8(){this.size=0,this.__data__={hash:new ao,map:new(Is||Mr),string:new ao}}function n8(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Zu(e,t){var n=e.__data__;return n8(t)?n[typeof t=="string"?"string":"hash"]:n.map}function r8(e){var t=Zu(this,e).delete(e);return this.size-=t?1:0,t}function i8(e){return Zu(this,e).get(e)}function o8(e){return Zu(this,e).has(e)}function a8(e,t){var n=Zu(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Dr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Dr.prototype.clear=t8,Dr.prototype.delete=r8,Dr.prototype.get=i8,Dr.prototype.has=o8,Dr.prototype.set=a8;var s8=200;function l8(e,t){var n=this.__data__;if(n instanceof Mr){var r=n.__data__;if(!Is||r.length<s8-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Dr(r)}return n.set(e,t),this.size=n.size,this}function ur(e){var t=this.__data__=new Mr(e);this.size=t.size}ur.prototype.clear=mj,ur.prototype.delete=gj,ur.prototype.get=vj,ur.prototype.has=yj,ur.prototype.set=l8;var c8="__lodash_hash_undefined__";function u8(e){return this.__data__.set(e,c8),this}function d8(e){return this.__data__.has(e)}function Ns(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Dr;++t<n;)this.add(e[t])}Ns.prototype.add=Ns.prototype.push=u8,Ns.prototype.has=d8;function f8(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Am(e,t){return e.has(t)}var p8=1,h8=2;function aS(e,t,n,r,i,o){var a=n&p8,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,p=n&h8?new Ns:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var m=e[d],v=t[d];if(r)var g=a?r(v,m,d,t,e,o):r(m,v,d,e,t,o);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!f8(t,function(x,w){if(!Am(p,w)&&(m===x||i(m,x,n,r,o)))return p.push(w)})){f=!1;break}}else if(!(m===v||i(m,v,n,r,o))){f=!1;break}}return o.delete(e),o.delete(t),f}var Qu=Wn.Uint8Array;function m8(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function g8(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var v8=1,y8=2,b8="[object Boolean]",x8="[object Date]",_8="[object Error]",w8="[object Map]",E8="[object Number]",S8="[object RegExp]",C8="[object Set]",T8="[object String]",P8="[object Symbol]",$8="[object ArrayBuffer]",R8="[object DataView]",sS=$n?$n.prototype:void 0,Om=sS?sS.valueOf:void 0;function A8(e,t,n,r,i,o,a){switch(n){case R8:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case $8:return!(e.byteLength!=t.byteLength||!o(new Qu(e),new Qu(t)));case b8:case x8:case E8:return $m(+e,+t);case _8:return e.name==t.name&&e.message==t.message;case S8:case T8:return e==t+"";case w8:var s=m8;case C8:var l=r&v8;if(s||(s=g8),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=y8,a.set(e,t);var u=aS(s(e),s(t),r,i,o,a);return a.delete(e),u;case P8:if(Om)return Om.call(e)==Om.call(t)}return!1}function Mm(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Rn=Array.isArray;function lS(e,t,n){var r=t(e);return Rn(e)?r:Mm(r,n(e))}function O8(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function cS(){return[]}var M8=Object.prototype,I8=M8.propertyIsEnumerable,uS=Object.getOwnPropertySymbols,Im=uS?function(e){return e==null?[]:(e=Object(e),O8(uS(e),function(t){return I8.call(e,t)}))}:cS;function D8(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function dr(e){return e!=null&&typeof e=="object"}var N8="[object Arguments]";function dS(e){return dr(e)&&ro(e)==N8}var fS=Object.prototype,B8=fS.hasOwnProperty,k8=fS.propertyIsEnumerable,Ju=dS(function(){return arguments}())?dS:function(e){return dr(e)&&B8.call(e,"callee")&&!k8.call(e,"callee")};function L8(){return!1}var pS=typeof exports=="object"&&exports&&!exports.nodeType&&exports,hS=pS&&typeof module=="object"&&module&&!module.nodeType&&module,j8=hS&&hS.exports===pS,mS=j8?Wn.Buffer:void 0,F8=mS?mS.isBuffer:void 0,Bs=F8||L8,H8=9007199254740991,z8=/^(?:0|[1-9]\d*)$/;function gS(e,t){var n=typeof e;return t=t??H8,!!t&&(n=="number"||n!="symbol"&&z8.test(e))&&e>-1&&e%1==0&&e<t}var V8=9007199254740991;function Dm(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=V8}var W8="[object Arguments]",G8="[object Array]",U8="[object Boolean]",q8="[object Date]",K8="[object Error]",Y8="[object Function]",X8="[object Map]",Z8="[object Number]",Q8="[object Object]",J8="[object RegExp]",eF="[object Set]",tF="[object String]",nF="[object WeakMap]",rF="[object ArrayBuffer]",iF="[object DataView]",oF="[object Float32Array]",aF="[object Float64Array]",sF="[object Int8Array]",lF="[object Int16Array]",cF="[object Int32Array]",uF="[object Uint8Array]",dF="[object Uint8ClampedArray]",fF="[object Uint16Array]",pF="[object Uint32Array]",We={};We[oF]=We[aF]=We[sF]=We[lF]=We[cF]=We[uF]=We[dF]=We[fF]=We[pF]=!0,We[W8]=We[G8]=We[rF]=We[U8]=We[iF]=We[q8]=We[K8]=We[Y8]=We[X8]=We[Z8]=We[Q8]=We[J8]=We[eF]=We[tF]=We[nF]=!1;function hF(e){return dr(e)&&Dm(e.length)&&!!We[ro(e)]}function ed(e){return function(t){return e(t)}}var vS=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ks=vS&&typeof module=="object"&&module&&!module.nodeType&&module,mF=ks&&ks.exports===vS,Nm=mF&&tS.process,oa=function(){try{var e=ks&&ks.require&&ks.require("util").types;return e||Nm&&Nm.binding&&Nm.binding("util")}catch{}}(),yS=oa&&oa.isTypedArray,Bm=yS?ed(yS):hF,gF=Object.prototype,vF=gF.hasOwnProperty;function bS(e,t){var n=Rn(e),r=!n&&Ju(e),i=!n&&!r&&Bs(e),o=!n&&!r&&!i&&Bm(e),a=n||r||i||o,s=a?D8(e.length,String):[],l=s.length;for(var c in e)(t||vF.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||gS(c,l)))&&s.push(c);return s}var yF=Object.prototype;function td(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||yF;return e===n}function xS(e,t){return function(n){return e(t(n))}}var bF=xS(Object.keys,Object),xF=Object.prototype,_F=xF.hasOwnProperty;function _S(e){if(!td(e))return bF(e);var t=[];for(var n in Object(e))_F.call(e,n)&&n!="constructor"&&t.push(n);return t}function Ls(e){return e!=null&&Dm(e.length)&&!iS(e)}function js(e){return Ls(e)?bS(e):_S(e)}function km(e){return lS(e,js,Im)}var wF=1,EF=Object.prototype,SF=EF.hasOwnProperty;function CF(e,t,n,r,i,o){var a=n&wF,s=km(e),l=s.length,c=km(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var f=s[d];if(!(a?f in t:SF.call(t,f)))return!1}var p=o.get(e),m=o.get(t);if(p&&m)return p==t&&m==e;var v=!0;o.set(e,t),o.set(t,e);for(var g=a;++d<l;){f=s[d];var x=e[f],w=t[f];if(r)var b=a?r(w,x,f,t,e,o):r(x,w,f,e,t,o);if(!(b===void 0?x===w||i(x,w,n,r,o):b)){v=!1;break}g||(g=f=="constructor")}if(v&&!g){var y=e.constructor,_=t.constructor;y!=_&&"constructor"in e&&"constructor"in t&&!(typeof y=="function"&&y instanceof y&&typeof _=="function"&&_ instanceof _)&&(v=!1)}return o.delete(e),o.delete(t),v}var Lm=oo(Wn,"DataView"),jm=oo(Wn,"Promise"),Fm=oo(Wn,"Set"),Hm=oo(Wn,"WeakMap"),wS="[object Map]",TF="[object Object]",ES="[object Promise]",SS="[object Set]",CS="[object WeakMap]",TS="[object DataView]",PF=io(Lm),$F=io(Is),RF=io(jm),AF=io(Fm),OF=io(Hm),An=ro;(Lm&&An(new Lm(new ArrayBuffer(1)))!=TS||Is&&An(new Is)!=wS||jm&&An(jm.resolve())!=ES||Fm&&An(new Fm)!=SS||Hm&&An(new Hm)!=CS)&&(An=function(e){var t=ro(e),n=t==TF?e.constructor:void 0,r=n?io(n):"";if(r)switch(r){case PF:return TS;case $F:return wS;case RF:return ES;case AF:return SS;case OF:return CS}return t});var MF=1,PS="[object Arguments]",$S="[object Array]",nd="[object Object]",IF=Object.prototype,RS=IF.hasOwnProperty;function DF(e,t,n,r,i,o){var a=Rn(e),s=Rn(t),l=a?$S:An(e),c=s?$S:An(t);l=l==PS?nd:l,c=c==PS?nd:c;var u=l==nd,d=c==nd,f=l==c;if(f&&Bs(e)){if(!Bs(t))return!1;a=!0,u=!1}if(f&&!u)return o||(o=new ur),a||Bm(e)?aS(e,t,n,r,i,o):A8(e,t,l,n,r,i,o);if(!(n&MF)){var p=u&&RS.call(e,"__wrapped__"),m=d&&RS.call(t,"__wrapped__");if(p||m){var v=p?e.value():e,g=m?t.value():t;return o||(o=new ur),i(v,g,n,r,o)}}return f?(o||(o=new ur),CF(e,t,n,r,i,o)):!1}function rd(e,t,n,r,i){return e===t?!0:e==null||t==null||!dr(e)&&!dr(t)?e!==e&&t!==t:DF(e,t,n,r,rd,i)}function zm(e,t){return rd(e,t)}const NF={align:Object,target:[Object,Function],onAlign:Function,monitorBufferTime:Number,monitorWindowResize:Boolean,disabled:Boolean};function AS(e){return typeof e!="function"?null:e()}function OS(e){return typeof e!="object"||!e?null:e}const BF=h.defineComponent({compatConfig:{MODE:3},name:"Align",props:NF,emits:["align"],setup(e,t){let{expose:n,slots:r}=t;const i=h.ref({}),o=h.ref(),[a,s]=sj(()=>{const{disabled:f,target:p,align:m,onAlign:v}=e;if(!f&&p&&o.value){const g=o.value;let x;const w=AS(p),b=OS(p);i.value.element=w,i.value.point=b,i.value.align=m;const{activeElement:y}=document;return w&&JE(w)?x=Pm(g,w,m):b&&(x=ij(g,b,m)),aj(y,g),v&&x&&v(g,x),!0}return!1},h.computed(()=>e.monitorBufferTime)),l=h.ref({cancel:()=>{}}),c=h.ref({cancel:()=>{}}),u=()=>{const f=e.target,p=AS(f),m=OS(f);o.value!==c.value.element&&(c.value.cancel(),c.value.element=o.value,c.value.cancel=eS(o.value,a)),(i.value.element!==p||!oj(i.value.point,m)||!zm(i.value.align,e.align))&&(a(),l.value.element!==p&&(l.value.cancel(),l.value.element=p,l.value.cancel=eS(p,a)))};h.onMounted(()=>{h.nextTick(()=>{u()})}),h.onUpdated(()=>{h.nextTick(()=>{u()})}),h.watch(()=>e.disabled,f=>{f?s():a()},{immediate:!0,flush:"post"});const d=h.ref(null);return h.watch(()=>e.monitorWindowResize,f=>{f?d.value||(d.value=ys(window,"resize",a)):d.value&&(d.value.remove(),d.value=null)},{flush:"post"}),h.onUnmounted(()=>{l.value.cancel(),c.value.cancel(),d.value&&d.value.remove(),s()}),n({forceAlign:()=>a(!0)}),()=>{const f=r==null?void 0:r.default();return f?on(f[0],{ref:o},!0,!0):null}}});gi("bottomLeft","bottomRight","topLeft","topRight");const MS=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return O(e?{name:e,appear:!0,enterFromClass:`${e}-enter ${e}-enter-prepare ${e}-enter-start`,enterActiveClass:`${e}-enter ${e}-enter-prepare`,enterToClass:`${e}-enter ${e}-enter-active`,leaveFromClass:` ${e}-leave`,leaveActiveClass:`${e}-leave ${e}-leave-active`,leaveToClass:`${e}-leave ${e}-leave-active`}:{css:!1},t)},kF=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return O(e?{name:e,appear:!0,appearActiveClass:`${e}`,appearToClass:`${e}-appear ${e}-appear-active`,enterFromClass:`${e}-appear ${e}-enter ${e}-appear-prepare ${e}-enter-prepare`,enterActiveClass:`${e}`,enterToClass:`${e}-enter ${e}-appear ${e}-appear-active ${e}-enter-active`,leaveActiveClass:`${e} ${e}-leave`,leaveToClass:`${e}-leave-active`}:{css:!1},t)},LF=(e,t,n)=>n!==void 0?n:`${e}-${t}`,jF=h.defineComponent({compatConfig:{MODE:3},name:"PopupInner",inheritAttrs:!1,props:hm,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup(e,t){let{expose:n,attrs:r,slots:i}=t;const o=h.shallowRef(),a=h.shallowRef(),s=h.shallowRef(),[l,c]=O4(h.toRef(e,"stretch")),u=()=>{e.stretch&&c(e.getRootDomNode())},d=h.shallowRef(!1);let f;h.watch(()=>e.visible,S=>{clearTimeout(f),S?f=setTimeout(()=>{d.value=e.visible}):d.value=!1},{immediate:!0});const[p,m]=A4(d,u),v=h.shallowRef(),g=()=>e.point?e.point:e.getRootDomNode,x=()=>{var S;(S=o.value)===null||S===void 0||S.forceAlign()},w=(S,C)=>{var $;const M=e.getClassNameFromAlign(C),R=s.value;s.value!==M&&(s.value=M),p.value==="align"&&(R!==M?Promise.resolve().then(()=>{x()}):m(()=>{var I;(I=v.value)===null||I===void 0||I.call(v)}),($=e.onAlign)===null||$===void 0||$.call(e,S,C))},b=h.computed(()=>{const S=typeof e.animation=="object"?e.animation:$E(e);return["onAfterEnter","onAfterLeave"].forEach(C=>{const $=S[C];S[C]=M=>{m(),p.value="stable",$==null||$(M)}}),S}),y=()=>new Promise(S=>{v.value=S});h.watch([b,p],()=>{!b.value&&p.value==="motion"&&m()},{immediate:!0}),n({forceAlign:x,getElement:()=>a.value.$el||a.value});const _=h.computed(()=>{var S;return!(!((S=e.align)===null||S===void 0)&&S.points&&(p.value==="align"||p.value==="stable"))});return()=>{var S;const{zIndex:C,align:$,prefixCls:M,destroyPopupOnHide:R,onMouseenter:I,onMouseleave:L,onTouchstart:k=()=>{},onMousedown:V}=e,W=p.value,q=[O(O({},l.value),{zIndex:C,opacity:W==="motion"||W==="stable"||!d.value?null:0,pointerEvents:!d.value&&W!=="stable"?"none":null}),r.style];let H=en((S=i.default)===null||S===void 0?void 0:S.call(i,{visible:e.visible}));H.length>1&&(H=h.createVNode("div",{class:`${M}-content`},[H]));const Z=xe(M,r.class,s.value,!e.arrow&&`${M}-arrow-hidden`),X=d.value||!e.visible?MS(b.value.name,b.value):{};return h.createVNode(h.Transition,ne(ne({ref:a},X),{},{onBeforeEnter:y}),{default:()=>!R||e.visible?h.withDirectives(h.createVNode(BF,{target:g(),key:"popup",ref:o,monitorWindowResize:!0,disabled:_.value,align:$,onAlign:w},{default:()=>h.createVNode("div",{class:Z,onMouseenter:I,onMouseleave:L,onMousedown:h.withModifiers(V,["capture"]),[Ki?"onTouchstartPassive":"onTouchstart"]:h.withModifiers(k,["capture"]),style:q},[H])}),[[h.vShow,d.value]]):null})}}}),FF=h.defineComponent({compatConfig:{MODE:3},name:"Popup",inheritAttrs:!1,props:P4,setup(e,t){let{attrs:n,slots:r,expose:i}=t;const o=h.shallowRef(!1),a=h.shallowRef(!1),s=h.shallowRef(),l=h.shallowRef();return h.watch([()=>e.visible,()=>e.mobile],()=>{o.value=e.visible,e.visible&&e.mobile&&(a.value=!0)},{immediate:!0,flush:"post"}),i({forceAlign:()=>{var c;(c=s.value)===null||c===void 0||c.forceAlign()},getElement:()=>{var c;return(c=s.value)===null||c===void 0?void 0:c.getElement()}}),()=>{const c=O(O(O({},e),n),{visible:o.value}),u=a.value?h.createVNode($4,ne(ne({},c),{},{mobile:e.mobile,ref:s}),{default:r.default}):h.createVNode(jF,ne(ne({},c),{},{ref:s}),{default:r.default});return h.createVNode("div",{ref:l},[h.createVNode(RE,c,null),u])}}});function HF(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function IS(e,t,n){const r=e[t]||{};return O(O({},r),n)}function zF(e,t,n,r){const{points:i}=n,o=Object.keys(e);for(let a=0;a<o.length;a+=1){const s=o[a];if(HF(e[s].points,i,r))return`${t}-placement-${s}`}return""}const VF={methods:{setState(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=typeof e=="function"?e(this.$data,this.$props):e;if(this.getDerivedStateFromProps){const r=this.getDerivedStateFromProps(Gk(this),O(O({},this.$data),n));if(r===null)return;n=O(O({},n),r||{})}O(this.$data,n),this._.isMounted&&this.$forceUpdate(),h.nextTick(()=>{t&&t()})},__emit(){const e=[].slice.call(arguments,0);let t=e[0];t=`on${t[0].toUpperCase()}${t.substring(1)}`;const n=this.$props[t]||this.$attrs[t];if(e.length&&n)if(Array.isArray(n))for(let r=0,i=n.length;r<i;r++)n[r](...e.slice(1));else n(...e.slice(1))}}},DS=Symbol("PortalContextKey"),NS=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inTriggerContext:!0};h.provide(DS,{inTriggerContext:t.inTriggerContext,shouldRender:h.computed(()=>{const{sPopupVisible:n,popupRef:r,forceRender:i,autoDestroy:o}=e||{};let a=!1;return(n||r||i)&&(a=!0),!n&&o&&(a=!1),a})})},WF=()=>{NS({},{inTriggerContext:!1});const e=h.inject(DS,{shouldRender:h.computed(()=>!1),inTriggerContext:!1});return{shouldRender:h.computed(()=>e.shouldRender.value||e.inTriggerContext===!1)}},GF=h.defineComponent({compatConfig:{MODE:3},name:"Portal",inheritAttrs:!1,props:{getContainer:oe.func.isRequired,didUpdate:Function},setup(e,t){let{slots:n}=t,r=!0,i;const{shouldRender:o}=WF();function a(){o.value&&(i=e.getContainer())}h.onBeforeMount(()=>{r=!1,a()}),h.onMounted(()=>{i||a()});const s=h.watch(o,()=>{o.value&&!i&&(i=e.getContainer()),i&&s()});return h.onUpdated(()=>{h.nextTick(()=>{var l;o.value&&((l=e.didUpdate)===null||l===void 0||l.call(e,e))})}),()=>{var l;return o.value?r?(l=n.default)===null||l===void 0?void 0:l.call(n):i?h.createVNode(h.Teleport,{to:i},n):null:null}}});let Vm;function UF(e){if(typeof document>"u")return 0;if(Vm===void 0){const t=document.createElement("div");t.style.width="100%",t.style.height="200px";const 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);const i=t.offsetWidth;n.style.overflow="scroll";let o=t.offsetWidth;i===o&&(o=n.clientWidth),document.body.removeChild(n),Vm=i-o}return Vm}const qF=`vc-util-locker-${Date.now()}`;let BS=0;function KF(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}function YF(e){const t=h.computed(()=>!!e&&!!e.value);BS+=1;const n=`${qF}_${BS}`;h.watchEffect(r=>{if(ir()){if(t.value){const i=UF(),o=KF();wu(`
|
|
278
|
+
html body {
|
|
279
|
+
overflow-y: hidden;
|
|
280
|
+
${o?`width: calc(100% - ${i}px);`:""}
|
|
281
|
+
}`,n)}else _u(n);r(()=>{_u(n)})}},{flush:"post"})}let so=0;const id=ir(),kS=e=>{if(!id)return null;if(e){if(typeof e=="string")return document.querySelectorAll(e)[0];if(typeof e=="function")return e();if(typeof e=="object"&&e instanceof window.HTMLElement)return e}return document.body},XF=h.defineComponent({compatConfig:{MODE:3},name:"PortalWrapper",inheritAttrs:!1,props:{wrapperClassName:String,forceRender:{type:Boolean,default:void 0},getContainer:oe.any,visible:{type:Boolean,default:void 0},autoLock:Oe(),didUpdate:Function},setup(e,t){let{slots:n}=t;const r=h.shallowRef(),i=h.shallowRef(),o=h.shallowRef(),a=h.shallowRef(1),s=ir()&&document.createElement("div"),l=()=>{var p,m;r.value===s&&((m=(p=r.value)===null||p===void 0?void 0:p.parentNode)===null||m===void 0||m.removeChild(r.value)),r.value=null};let c=null;const u=function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)||r.value&&!r.value.parentNode?(c=kS(e.getContainer),c?(c.appendChild(r.value),!0):!1):!0},d=()=>id?(r.value||(r.value=s,u(!0)),f(),r.value):null,f=()=>{const{wrapperClassName:p}=e;r.value&&p&&p!==r.value.className&&(r.value.className=p)};return h.onUpdated(()=>{f(),u()}),YF(h.computed(()=>e.autoLock&&e.visible&&ir()&&(r.value===document.body||r.value===s))),h.onMounted(()=>{let p=!1;h.watch([()=>e.visible,()=>e.getContainer],(m,v)=>{let[g,x]=m,[w,b]=v;id&&(c=kS(e.getContainer),c===document.body&&(g&&!w?so+=1:p&&(so-=1))),p&&(typeof x=="function"&&typeof b=="function"?x.toString()!==b.toString():x!==b)&&l(),p=!0},{immediate:!0,flush:"post"}),h.nextTick(()=>{u()||(o.value=Tt(()=>{a.value+=1}))})}),h.onBeforeUnmount(()=>{const{visible:p}=e;id&&c===document.body&&(so=p&&so?so-1:so),l(),Tt.cancel(o.value)}),()=>{const{forceRender:p,visible:m}=e;let v=null;const g={getOpenCount:()=>so,getContainer:d};return a.value&&(p||m||i.value)&&(v=h.createVNode(GF,{getContainer:d,ref:i,didUpdate:e.didUpdate},{default:()=>{var x;return(x=n.default)===null||x===void 0?void 0:x.call(n,g)}})),v}}}),ZF=["onClick","onMousedown","onTouchstart","onMouseenter","onMouseleave","onFocus","onBlur","onContextmenu"],QF=h.defineComponent({compatConfig:{MODE:3},name:"Trigger",mixins:[VF],inheritAttrs:!1,props:C4(),setup(e){const t=h.computed(()=>{const{popupPlacement:i,popupAlign:o,builtinPlacements:a}=e;return i&&a?IS(a,i,o):o}),n=h.shallowRef(null),r=i=>{n.value=i};return{vcTriggerContext:h.inject("vcTriggerContext",{}),popupRef:n,setPopupRef:r,triggerRef:h.shallowRef(null),align:t,focusTime:null,clickOutsideHandler:null,contextmenuOutsideHandler1:null,contextmenuOutsideHandler2:null,touchOutsideHandler:null,attachId:null,delayTimer:null,hasPopupMouseDown:!1,preClickTime:null,preTouchTime:null,mouseDownTimeout:null,childOriginEvents:{}}},data(){const e=this.$props;let t;return this.popupVisible!==void 0?t=!!e.popupVisible:t=!!e.defaultPopupVisible,ZF.forEach(n=>{this[`fire${n}`]=r=>{this.fireEvents(n,r)}}),{prevPopupVisible:t,sPopupVisible:t,point:null}},watch:{popupVisible(e){e!==void 0&&(this.prevPopupVisible=this.sPopupVisible,this.sPopupVisible=e)}},created(){h.provide("vcTriggerContext",{onPopupMouseDown:this.onPopupMouseDown,onPopupMouseenter:this.onPopupMouseenter,onPopupMouseleave:this.onPopupMouseleave}),NS(this)},deactivated(){this.setPopupVisible(!1)},mounted(){this.$nextTick(()=>{this.updatedCal()})},updated(){this.$nextTick(()=>{this.updatedCal()})},beforeUnmount(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),Tt.cancel(this.attachId)},methods:{updatedCal(){const e=this.$props;if(this.$data.sPopupVisible){let n;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextmenuToShow())&&(n=e.getDocument(this.getRootDomNode()),this.clickOutsideHandler=ys(n,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(n=n||e.getDocument(this.getRootDomNode()),this.touchOutsideHandler=ys(n,"touchstart",this.onDocumentClick,Ki?{passive:!1}:!1)),!this.contextmenuOutsideHandler1&&this.isContextmenuToShow()&&(n=n||e.getDocument(this.getRootDomNode()),this.contextmenuOutsideHandler1=ys(n,"scroll",this.onContextmenuClose)),!this.contextmenuOutsideHandler2&&this.isContextmenuToShow()&&(this.contextmenuOutsideHandler2=ys(window,"blur",this.onContextmenuClose))}else this.clearOutsideHandler()},onMouseenter(e){const{mouseEnterDelay:t}=this.$props;this.fireEvents("onMouseenter",e),this.delaySetPopupVisible(!0,t,t?null:e)},onMouseMove(e){this.fireEvents("onMousemove",e),this.setPoint(e)},onMouseleave(e){this.fireEvents("onMouseleave",e),this.delaySetPopupVisible(!1,this.$props.mouseLeaveDelay)},onPopupMouseenter(){const{vcTriggerContext:e={}}=this;e.onPopupMouseenter&&e.onPopupMouseenter(),this.clearDelayTimer()},onPopupMouseleave(e){var t;if(e&&e.relatedTarget&&!e.relatedTarget.setTimeout&&Xi((t=this.popupRef)===null||t===void 0?void 0:t.getElement(),e.relatedTarget))return;this.isMouseLeaveToHide()&&this.delaySetPopupVisible(!1,this.$props.mouseLeaveDelay);const{vcTriggerContext:n={}}=this;n.onPopupMouseleave&&n.onPopupMouseleave(e)},onFocus(e){this.fireEvents("onFocus",e),this.clearDelayTimer(),this.isFocusToShow()&&(this.focusTime=Date.now(),this.delaySetPopupVisible(!0,this.$props.focusDelay))},onMousedown(e){this.fireEvents("onMousedown",e),this.preClickTime=Date.now()},onTouchstart(e){this.fireEvents("onTouchstart",e),this.preTouchTime=Date.now()},onBlur(e){Xi(e.target,e.relatedTarget||document.activeElement)||(this.fireEvents("onBlur",e),this.clearDelayTimer(),this.isBlurToHide()&&this.delaySetPopupVisible(!1,this.$props.blurDelay))},onContextmenu(e){e.preventDefault(),this.fireEvents("onContextmenu",e),this.setPopupVisible(!0,e)},onContextmenuClose(){this.isContextmenuToShow()&&this.close()},onClick(e){if(this.fireEvents("onClick",e),this.focusTime){let n;if(this.preClickTime&&this.preTouchTime?n=Math.min(this.preClickTime,this.preTouchTime):this.preClickTime?n=this.preClickTime:this.preTouchTime&&(n=this.preTouchTime),Math.abs(n-this.focusTime)<20)return;this.focusTime=0}this.preClickTime=0,this.preTouchTime=0,this.isClickToShow()&&(this.isClickToHide()||this.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault(),e&&e.domEvent&&e.domEvent.preventDefault();const t=!this.$data.sPopupVisible;(this.isClickToHide()&&!t||t&&this.isClickToShow())&&this.setPopupVisible(!this.$data.sPopupVisible,e)},onPopupMouseDown(){const{vcTriggerContext:e={}}=this;this.hasPopupMouseDown=!0,clearTimeout(this.mouseDownTimeout),this.mouseDownTimeout=setTimeout(()=>{this.hasPopupMouseDown=!1},0),e.onPopupMouseDown&&e.onPopupMouseDown(...arguments)},onDocumentClick(e){if(this.$props.mask&&!this.$props.maskClosable)return;const t=e.target,n=this.getRootDomNode(),r=this.getPopupDomNode();(!Xi(n,t)||this.isContextMenuOnly())&&!Xi(r,t)&&!this.hasPopupMouseDown&&this.delaySetPopupVisible(!1,.1)},getPopupDomNode(){var e;return((e=this.popupRef)===null||e===void 0?void 0:e.getElement())||null},getRootDomNode(){var e,t,n,r;const{getTriggerDOMNode:i}=this.$props;if(i){const o=((t=(e=this.triggerRef)===null||e===void 0?void 0:e.$el)===null||t===void 0?void 0:t.nodeName)==="#comment"?null:mi(this.triggerRef);return mi(i(o))}try{const o=((r=(n=this.triggerRef)===null||n===void 0?void 0:n.$el)===null||r===void 0?void 0:r.nodeName)==="#comment"?null:mi(this.triggerRef);if(o)return o}catch{}return mi(this)},handleGetPopupClassFromAlign(e){const t=[],n=this.$props,{popupPlacement:r,builtinPlacements:i,prefixCls:o,alignPoint:a,getPopupClassNameFromAlign:s}=n;return r&&i&&t.push(zF(i,o,e,a)),s&&t.push(s(e)),t.join(" ")},getPopupAlign(){const e=this.$props,{popupPlacement:t,popupAlign:n,builtinPlacements:r}=e;return t&&r?IS(r,t,n):n},getComponent(){const e={};this.isMouseEnterToShow()&&(e.onMouseenter=this.onPopupMouseenter),this.isMouseLeaveToHide()&&(e.onMouseleave=this.onPopupMouseleave),e.onMousedown=this.onPopupMouseDown,e[Ki?"onTouchstartPassive":"onTouchstart"]=this.onPopupMouseDown;const{handleGetPopupClassFromAlign:t,getRootDomNode:n,$attrs:r}=this,{prefixCls:i,destroyPopupOnHide:o,popupClassName:a,popupAnimation:s,popupTransitionName:l,popupStyle:c,mask:u,maskAnimation:d,maskTransitionName:f,zIndex:p,stretch:m,alignPoint:v,mobile:g,arrow:x,forceRender:w}=this.$props,{sPopupVisible:b,point:y}=this.$data,_=O(O({prefixCls:i,arrow:x,destroyPopupOnHide:o,visible:b,point:v?y:null,align:this.align,animation:s,getClassNameFromAlign:t,stretch:m,getRootDomNode:n,mask:u,zIndex:p,transitionName:l,maskAnimation:d,maskTransitionName:f,class:a,style:c,onAlign:r.onPopupAlign||PE},e),{ref:this.setPopupRef,mobile:g,forceRender:w});return h.createVNode(FF,_,{default:this.$slots.popup||(()=>Uk(this,"popup"))})},attachParent(e){Tt.cancel(this.attachId);const{getPopupContainer:t,getDocument:n}=this.$props,r=this.getRootDomNode();let i;t?(r||t.length===0)&&(i=t(r)):i=n(this.getRootDomNode()).body,i?i.appendChild(e):this.attachId=Tt(()=>{this.attachParent(e)})},getContainer(){const{$props:e}=this,{getDocument:t}=e,n=t(this.getRootDomNode()).createElement("div");return n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.width="100%",this.attachParent(n),n},setPopupVisible(e,t){const{alignPoint:n,sPopupVisible:r,onPopupVisibleChange:i}=this;this.clearDelayTimer(),r!==e&&(zk(this,"popupVisible")||this.setState({sPopupVisible:e,prevPopupVisible:r}),i&&i(e)),n&&t&&e&&this.setPoint(t)},setPoint(e){const{alignPoint:t}=this.$props;!t||!e||this.setState({point:{pageX:e.pageX,pageY:e.pageY}})},handlePortalUpdate(){this.prevPopupVisible!==this.sPopupVisible&&this.afterPopupVisibleChange(this.sPopupVisible)},delaySetPopupVisible(e,t,n){const r=t*1e3;if(this.clearDelayTimer(),r){const i=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=setTimeout(()=>{this.setPopupVisible(e,i),this.clearDelayTimer()},r)}else this.setPopupVisible(e,n)},clearDelayTimer(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)},clearOutsideHandler(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextmenuOutsideHandler1&&(this.contextmenuOutsideHandler1.remove(),this.contextmenuOutsideHandler1=null),this.contextmenuOutsideHandler2&&(this.contextmenuOutsideHandler2.remove(),this.contextmenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)},createTwoChains(e){let t=()=>{};const n=l1(this);return this.childOriginEvents[e]&&n[e]?this[`fire${e}`]:(t=this.childOriginEvents[e]||n[e]||t,t)},isClickToShow(){const{action:e,showAction:t}=this.$props;return e.indexOf("click")!==-1||t.indexOf("click")!==-1},isContextMenuOnly(){const{action:e}=this.$props;return e==="contextmenu"||e.length===1&&e[0]==="contextmenu"},isContextmenuToShow(){const{action:e,showAction:t}=this.$props;return e.indexOf("contextmenu")!==-1||t.indexOf("contextmenu")!==-1},isClickToHide(){const{action:e,hideAction:t}=this.$props;return e.indexOf("click")!==-1||t.indexOf("click")!==-1},isMouseEnterToShow(){const{action:e,showAction:t}=this.$props;return e.indexOf("hover")!==-1||t.indexOf("mouseenter")!==-1},isMouseLeaveToHide(){const{action:e,hideAction:t}=this.$props;return e.indexOf("hover")!==-1||t.indexOf("mouseleave")!==-1},isFocusToShow(){const{action:e,showAction:t}=this.$props;return e.indexOf("focus")!==-1||t.indexOf("focus")!==-1},isBlurToHide(){const{action:e,hideAction:t}=this.$props;return e.indexOf("focus")!==-1||t.indexOf("blur")!==-1},forcePopupAlign(){var e;this.$data.sPopupVisible&&((e=this.popupRef)===null||e===void 0||e.forceAlign())},fireEvents(e,t){this.childOriginEvents[e]&&this.childOriginEvents[e](t);const n=this.$props[e]||this.$attrs[e];n&&n(t)},close(){this.setPopupVisible(!1)}},render(){const{$attrs:e}=this,t=Pr(Wk(this)),{alignPoint:n,getPopupContainer:r}=this.$props,i=t[0];this.childOriginEvents=l1(i);const o={key:"trigger"};this.isContextmenuToShow()?o.onContextmenu=this.onContextmenu:o.onContextmenu=this.createTwoChains("onContextmenu"),this.isClickToHide()||this.isClickToShow()?(o.onClick=this.onClick,o.onMousedown=this.onMousedown,o[Ki?"onTouchstartPassive":"onTouchstart"]=this.onTouchstart):(o.onClick=this.createTwoChains("onClick"),o.onMousedown=this.createTwoChains("onMousedown"),o[Ki?"onTouchstartPassive":"onTouchstart"]=this.createTwoChains("onTouchstart")),this.isMouseEnterToShow()?(o.onMouseenter=this.onMouseenter,n&&(o.onMousemove=this.onMouseMove)):o.onMouseenter=this.createTwoChains("onMouseenter"),this.isMouseLeaveToHide()?o.onMouseleave=this.onMouseleave:o.onMouseleave=this.createTwoChains("onMouseleave"),this.isFocusToShow()||this.isBlurToHide()?(o.onFocus=this.onFocus,o.onBlur=this.onBlur):(o.onFocus=this.createTwoChains("onFocus"),o.onBlur=c=>{c&&(!c.relatedTarget||!Xi(c.target,c.relatedTarget))&&this.createTwoChains("onBlur")(c)});const a=xe(i&&i.props&&i.props.class,e.class);a&&(o.class=a);const s=on(i,O(O({},o),{ref:"triggerRef"}),!0,!0),l=h.createVNode(XF,{key:"portal",getContainer:r&&(()=>r(this.getRootDomNode())),didUpdate:this.handlePortalUpdate,visible:this.$data.sPopupVisible},{default:this.getComponent});return h.createVNode(h.Fragment,null,[s,l])}});var JF=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<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const e9=h.defineComponent({compatConfig:{MODE:3},props:{disabled:oe.looseBool,type:oe.string,value:oe.any,tag:{type:String,default:"input"},size:oe.string,onChange:Function,onInput:Function,onBlur:Function,onFocus:Function,onKeydown:Function,onCompositionstart:Function,onCompositionend:Function,onKeyup:Function,onPaste:Function,onMousedown:Function},emits:["change","input","blur","keydown","focus","compositionstart","compositionend","keyup","paste","mousedown"],setup(e,t){let{expose:n}=t;const r=h.shallowRef(null);return n({focus:()=>{r.value&&r.value.focus()},blur:()=>{r.value&&r.value.blur()},input:r,setSelectionRange:(l,c,u)=>{var d;(d=r.value)===null||d===void 0||d.setSelectionRange(l,c,u)},select:()=>{var l;(l=r.value)===null||l===void 0||l.select()},getSelectionStart:()=>{var l;return(l=r.value)===null||l===void 0?void 0:l.selectionStart},getSelectionEnd:()=>{var l;return(l=r.value)===null||l===void 0?void 0:l.selectionEnd},getScrollTop:()=>{var l;return(l=r.value)===null||l===void 0?void 0:l.scrollTop}}),()=>{const{tag:l,value:c}=e,u=JF(e,["tag","value"]);return h.createVNode(l,ne(ne({},u),{},{ref:r,value:c}),null)}}});function t9(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return typeof r>"u"||r===null||(t+=`${n}: ${e[n]};`),t},"")}var n9=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<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const LS=h.defineComponent({compatConfig:{MODE:3},inheritAttrs:!1,props:{disabled:oe.looseBool,type:oe.string,value:oe.any,lazy:oe.bool.def(!0),tag:{type:String,default:"input"},size:oe.string,style:oe.oneOfType([String,Object]),class:oe.string},emits:["change","input","blur","keydown","focus","compositionstart","compositionend","keyup","paste","mousedown"],setup(e,t){let{emit:n,attrs:r,expose:i}=t;const o=h.shallowRef(null),a=h.ref(),s=h.ref(!1);h.watch([()=>e.value,s],()=>{s.value||(a.value=e.value)},{immediate:!0});const l=C=>{n("change",C)},c=C=>{s.value=!0,C.target.composing=!0,n("compositionstart",C)},u=C=>{s.value=!1,C.target.composing=!1,n("compositionend",C);const $=document.createEvent("HTMLEvents");$.initEvent("input",!0,!0),C.target.dispatchEvent($),l(C)},d=C=>{if(s.value&&e.lazy){a.value=C.target.value;return}n("input",C)},f=C=>{n("blur",C)},p=C=>{n("focus",C)},m=()=>{o.value&&o.value.focus()},v=()=>{o.value&&o.value.blur()},g=C=>{n("keydown",C)},x=C=>{n("keyup",C)},w=(C,$,M)=>{var R;(R=o.value)===null||R===void 0||R.setSelectionRange(C,$,M)},b=()=>{var C;(C=o.value)===null||C===void 0||C.select()};i({focus:m,blur:v,input:h.computed(()=>{var C;return(C=o.value)===null||C===void 0?void 0:C.input}),setSelectionRange:w,select:b,getSelectionStart:()=>{var C;return(C=o.value)===null||C===void 0?void 0:C.getSelectionStart()},getSelectionEnd:()=>{var C;return(C=o.value)===null||C===void 0?void 0:C.getSelectionEnd()},getScrollTop:()=>{var C;return(C=o.value)===null||C===void 0?void 0:C.getScrollTop()}});const y=C=>{n("mousedown",C)},_=C=>{n("paste",C)},S=h.computed(()=>e.style&&typeof e.style!="string"?t9(e.style):e.style);return()=>{const C=n9(e,["style","lazy"]);return h.createVNode(e9,ne(ne(ne({},C),r),{},{style:S.value,onInput:d,onChange:l,onBlur:f,onFocus:p,ref:o,value:a.value,onCompositionstart:c,onCompositionend:u,onKeyup:x,onKeydown:g,onPaste:_,onMousedown:y}),null)}}});function lo(e){const t=typeof e=="function"?e():e,n=h.ref(t);function r(i){n.value=i}return[n,r]}var r9=Symbol("iconContext"),jS=function(){return h.inject(r9,{prefixCls:h.ref("anticon"),rootClassName:h.ref(""),csp:h.ref()})};function Wm(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function i9(e,t){return e&&e.contains?e.contains(t):!1}var FS="data-vc-order",o9="vc-icon-key",Gm=new Map;function HS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):o9}function Um(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function a9(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function zS(e){return Array.from((Gm.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function VS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Wm())return null;var n=t.csp,r=t.prepend,i=document.createElement("style");i.setAttribute(FS,a9(r)),n&&n.nonce&&(i.nonce=n.nonce),i.innerHTML=e;var o=Um(t),a=o.firstChild;if(r){if(r==="queue"){var s=zS(o).filter(function(l){return["prepend","prependQueue"].includes(l.getAttribute(FS))});if(s.length)return o.insertBefore(i,s[s.length-1].nextSibling),i}o.insertBefore(i,a)}else o.appendChild(i);return i}function s9(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Um(t);return zS(n).find(function(r){return r.getAttribute(HS(t))===e})}function l9(e,t){var n=Gm.get(e);if(!n||!i9(document,n)){var r=VS("",t),i=r.parentNode;Gm.set(e,i),e.removeChild(r)}}function c9(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Um(n);l9(r,n);var i=s9(t,n);if(i)return n.csp&&n.csp.nonce&&i.nonce!==n.csp.nonce&&(i.nonce=n.csp.nonce),i.innerHTML!==e&&(i.innerHTML=e),i;var o=VS(e,n);return o.setAttribute(HS(n),t),o}function WS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){u9(e,i,n[i])})}return e}function u9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d9(e,t){process.env.NODE_ENV!=="production"&&!e&&console!==void 0&&console.error("Warning: ".concat(t))}function f9(e,t){d9(e,"[@ant-design/icons-vue] ".concat(t))}function GS(e){return typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function qm(e,t,n){return n?h.h(e.tag,WS({key:t},n,e.attrs),(e.children||[]).map(function(r,i){return qm(r,"".concat(t,"-").concat(e.tag,"-").concat(i))})):h.h(e.tag,WS({key:t},e.attrs),(e.children||[]).map(function(r,i){return qm(r,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function US(e){return Es(e)[0]}function qS(e){return e?Array.isArray(e)?e:[e]:[]}var p9=`
|
|
282
|
+
.anticon {
|
|
283
|
+
display: inline-block;
|
|
284
|
+
color: inherit;
|
|
285
|
+
font-style: normal;
|
|
286
|
+
line-height: 0;
|
|
287
|
+
text-align: center;
|
|
288
|
+
text-transform: none;
|
|
289
|
+
vertical-align: -0.125em;
|
|
290
|
+
text-rendering: optimizeLegibility;
|
|
291
|
+
-webkit-font-smoothing: antialiased;
|
|
292
|
+
-moz-osx-font-smoothing: grayscale;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.anticon > * {
|
|
296
|
+
line-height: 1;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.anticon svg {
|
|
300
|
+
display: inline-block;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.anticon::before {
|
|
304
|
+
display: none;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.anticon .anticon-icon {
|
|
308
|
+
display: block;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.anticon[tabindex] {
|
|
312
|
+
cursor: pointer;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.anticon-spin::before,
|
|
316
|
+
.anticon-spin {
|
|
317
|
+
display: inline-block;
|
|
318
|
+
-webkit-animation: loadingCircle 1s infinite linear;
|
|
319
|
+
animation: loadingCircle 1s infinite linear;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
@-webkit-keyframes loadingCircle {
|
|
323
|
+
100% {
|
|
324
|
+
-webkit-transform: rotate(360deg);
|
|
325
|
+
transform: rotate(360deg);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
@keyframes loadingCircle {
|
|
330
|
+
100% {
|
|
331
|
+
-webkit-transform: rotate(360deg);
|
|
332
|
+
transform: rotate(360deg);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
`;function KS(e){return e&&e.getRootNode&&e.getRootNode()}function h9(e){return Wm()?KS(e)instanceof ShadowRoot:!1}function m9(e){return h9(e)?KS(e):null}var g9=function(){var t=jS(),n=t.prefixCls,r=t.csp,i=h.getCurrentInstance(),o=p9;n&&(o=o.replace(/anticon/g,n.value)),h.nextTick(function(){if(Wm()){var a=i.vnode.el,s=m9(a);c9(o,"@ant-design-vue-icons",{prepend:!0,csp:r.value,attachTo:s})}})},v9=["icon","primaryColor","secondaryColor"];function y9(e,t){if(e==null)return{};var n=b9(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function b9(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function od(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){x9(e,i,n[i])})}return e}function x9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Fs=h.reactive({primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1});function _9(e){var t=e.primaryColor,n=e.secondaryColor;Fs.primaryColor=t,Fs.secondaryColor=n||US(t),Fs.calculated=!!n}function w9(){return od({},Fs)}var xi=function(t,n){var r=od({},t,n.attrs),i=r.icon,o=r.primaryColor,a=r.secondaryColor,s=y9(r,v9),l=Fs;if(o&&(l={primaryColor:o,secondaryColor:a||US(o)}),f9(GS(i),"icon should be icon definiton, but got ".concat(i)),!GS(i))return null;var c=i;return c&&typeof c.icon=="function"&&(c=od({},c,{icon:c.icon(l.primaryColor,l.secondaryColor)})),qm(c.icon,"svg-".concat(c.name),od({},s,{"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};xi.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},xi.inheritAttrs=!1,xi.displayName="IconBase",xi.getTwoToneColors=w9,xi.setTwoToneColors=_9;function E9(e,t){return P9(e)||T9(e,t)||C9(e,t)||S9()}function S9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
336
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C9(e,t){if(e){if(typeof e=="string")return YS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YS(e,t)}}function YS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function T9(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function P9(e){if(Array.isArray(e))return e}function XS(e){var t=qS(e),n=E9(t,2),r=n[0],i=n[1];return xi.setTwoToneColors({primaryColor:r,secondaryColor:i})}function $9(){var e=xi.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var R9=h.defineComponent({name:"InsertStyles",setup:function(){return g9(),function(){return null}}}),A9=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function O9(e,t){return N9(e)||D9(e,t)||I9(e,t)||M9()}function M9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
337
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I9(e,t){if(e){if(typeof e=="string")return ZS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZS(e,t)}}function ZS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function D9(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function N9(e){if(Array.isArray(e))return e}function QS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Hs(e,i,n[i])})}return e}function Hs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B9(e,t){if(e==null)return{};var n=k9(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function k9(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}XS(E6.primary);var Ut=function(t,n){var r,i=QS({},t,n.attrs),o=i.class,a=i.icon,s=i.spin,l=i.rotate,c=i.tabindex,u=i.twoToneColor,d=i.onClick,f=B9(i,A9),p=jS(),m=p.prefixCls,v=p.rootClassName,g=(r={},Hs(r,v.value,!!v.value),Hs(r,m.value,!0),Hs(r,"".concat(m.value,"-").concat(a.name),!!a.name),Hs(r,"".concat(m.value,"-spin"),!!s||a.name==="loading"),r),x=c;x===void 0&&d&&(x=-1);var w=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,b=qS(u),y=O9(b,2),_=y[0],S=y[1];return h.createVNode("span",QS({role:"img","aria-label":a.name},f,{onClick:d,class:[g,o],tabindex:x}),[h.createVNode(xi,{icon:a,primaryColor:_,secondaryColor:S,style:w},null),h.createVNode(R9,null,null)])};Ut.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:[String,Array]},Ut.displayName="AntdIcon",Ut.inheritAttrs=!1,Ut.getTwoToneColor=$9,Ut.setTwoToneColor=XS;var L9={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};function JS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){j9(e,i,n[i])})}return e}function j9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zs=function(t,n){var r=JS({},t,n.attrs);return h.createVNode(Ut,JS({},r,{icon:L9}),null)};zs.displayName="LoadingOutlined",zs.inheritAttrs=!1;var F9={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};function eC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){H9(e,i,n[i])})}return e}function H9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vs=function(t,n){var r=eC({},t,n.attrs);return h.createVNode(Ut,eC({},r,{icon:F9}),null)};Vs.displayName="CloseCircleFilled",Vs.inheritAttrs=!1;var z9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};function tC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){V9(e,i,n[i])})}return e}function V9(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Km=function(t,n){var r=tC({},t,n.attrs);return h.createVNode(Ut,tC({},r,{icon:z9}),null)};Km.displayName="SearchOutlined",Km.inheritAttrs=!1;function Ym(e){const t=Symbol("contextKey");return{useProvide:(i,o)=>{const a=h.reactive({});return h.provide(t,a),h.watchEffect(()=>{O(a,i,o||{})}),a},useInject:()=>h.inject(t,e)||{}}}const ad=Symbol("ContextProps"),sd=Symbol("InternalContextProps"),W9=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.computed(()=>!0);const n=h.ref(new Map),r=(a,s)=>{n.value.set(a,s),n.value=new Map(n.value)},i=a=>{n.value.delete(a),n.value=new Map(n.value)},o=h.getCurrentInstance();h.watch([t,n],()=>{if(process.env.NODE_ENV!=="production"&&t.value&&n.value.size>1){Vu(!1,"Form.Item",`FormItem can only collect one field item, you haved set ${[...n.value.values()].map(s=>`\`${s.name}\``).join(", ")} ${n.value.size} field items.
|
|
338
|
+
You can set not need to be collected fields into \`a-form-item-rest\``);let a=o;for(;a.parent;)console.warn("at",a.type),a=a.parent}}),h.provide(ad,e),h.provide(sd,{addFormItemField:r,removeFormItemField:i})},Xm={id:h.computed(()=>{}),onFieldBlur:()=>{},onFieldChange:()=>{},clearValidate:()=>{}},Zm={addFormItemField:()=>{},removeFormItemField:()=>{}},co=()=>{const e=h.inject(sd,Zm),t=Symbol("FormItemFieldKey"),n=h.getCurrentInstance();return e.addFormItemField(t,n.type),h.onBeforeUnmount(()=>{e.removeFormItemField(t)}),h.provide(sd,Zm),h.provide(ad,Xm),h.inject(ad,Xm)},Qm=h.defineComponent({compatConfig:{MODE:3},name:"AFormItemRest",setup(e,t){let{slots:n}=t;return h.provide(sd,Zm),h.provide(ad,Xm),()=>{var r;return(r=n.default)===null||r===void 0?void 0:r.call(n)}}}),Nr=Ym({}),nC=h.defineComponent({name:"NoFormStatus",setup(e,t){let{slots:n}=t;return Nr.useProvide({}),()=>{var r;return(r=n.default)===null||r===void 0?void 0:r.call(n)}}});function Ws(e,t,n){return xe({[`${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 Jm=(e,t)=>t||e,G9=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},U9=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item`]:{"&:empty":{display:"none"}}}}},q9=Pn("Space",e=>[U9(e),G9(e)]);var K9="[object Symbol]";function ld(e){return typeof e=="symbol"||dr(e)&&ro(e)==K9}function cd(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Y9=1/0,rC=$n?$n.prototype:void 0,iC=rC?rC.toString:void 0;function oC(e){if(typeof e=="string")return e;if(Rn(e))return cd(e,oC)+"";if(ld(e))return iC?iC.call(e):"";var t=e+"";return t=="0"&&1/e==-Y9?"-0":t}var X9=/\s/;function Z9(e){for(var t=e.length;t--&&X9.test(e.charAt(t)););return t}var Q9=/^\s+/;function J9(e){return e&&e.slice(0,Z9(e)+1).replace(Q9,"")}var aC=NaN,eH=/^[-+]0x[0-9a-f]+$/i,tH=/^0b[01]+$/i,nH=/^0o[0-7]+$/i,rH=parseInt;function eg(e){if(typeof e=="number")return e;if(ld(e))return aC;if(Ir(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ir(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=J9(e);var n=tH.test(e);return n||nH.test(e)?rH(e.slice(2),n?2:8):eH.test(e)?aC:+e}var sC=1/0,iH=17976931348623157e292;function oH(e){if(!e)return e===0?e:0;if(e=eg(e),e===sC||e===-sC){var t=e<0?-1:1;return t*iH}return e===e?e:0}function aH(e){var t=oH(e),n=t%1;return t===t?n?t-n:t:0}function tg(e){return e}var lC=Object.create,sH=function(){function e(){}return function(t){if(!Ir(t))return{};if(lC)return lC(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function lH(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function cH(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var uH=800,dH=16,fH=Date.now;function pH(e){var t=0,n=0;return function(){var r=fH(),i=dH-(r-n);if(n=r,i>0){if(++t>=uH)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function hH(e){return function(){return e}}var ud=function(){try{var e=oo(Object,"defineProperty");return e({},"",{}),e}catch{}}(),mH=ud?function(e,t){return ud(e,"toString",{configurable:!0,enumerable:!1,value:hH(t),writable:!0})}:tg,cC=pH(mH);function gH(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function uC(e,t,n,r){for(var i=e.length,o=n+-1;++o<i;)if(t(e[o],o,e))return o;return-1}function vH(e){return e!==e}function yH(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function bH(e,t,n){return t===t?yH(e,t,n):uC(e,vH,n)}function xH(e,t){var n=e==null?0:e.length;return!!n&&bH(e,t,0)>-1}function dC(e,t,n){t=="__proto__"&&ud?ud(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var _H=Object.prototype,wH=_H.hasOwnProperty;function fC(e,t,n){var r=e[t];(!(wH.call(e,t)&&$m(r,n))||n===void 0&&!(t in e))&&dC(e,t,n)}function Gs(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=void 0;l===void 0&&(l=e[s]),i?dC(n,s,l):fC(n,s,l)}return n}var pC=Math.max;function hC(e,t,n){return t=pC(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=pC(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),lH(e,this,s)}}function EH(e,t){return cC(hC(e,t,tg),e+"")}function SH(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var CH=Object.prototype,TH=CH.hasOwnProperty;function PH(e){if(!Ir(e))return SH(e);var t=td(e),n=[];for(var r in e)r=="constructor"&&(t||!TH.call(e,r))||n.push(r);return n}function ng(e){return Ls(e)?bS(e,!0):PH(e)}var $H=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,RH=/^\w*$/;function rg(e,t){if(Rn(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||ld(e)?!0:RH.test(e)||!$H.test(e)||t!=null&&e in Object(t)}var AH="Expected a function";function ig(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(AH);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ig.Cache||Dr),n}ig.Cache=Dr;var OH=500;function MH(e){var t=ig(e,function(r){return n.size===OH&&n.clear(),r}),n=t.cache;return t}var IH=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,DH=/\\(\\)?/g,NH=MH(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(IH,function(n,r,i,o){t.push(i?o.replace(DH,"$1"):r||n)}),t});function BH(e){return e==null?"":oC(e)}function dd(e,t){return Rn(e)?e:rg(e,t)?[e]:NH(BH(e))}var kH=1/0;function Us(e){if(typeof e=="string"||ld(e))return e;var t=e+"";return t=="0"&&1/e==-kH?"-0":t}function og(e,t){t=dd(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Us(t[n++])];return n&&n==r?e:void 0}function LH(e,t,n){var r=e==null?void 0:og(e,t);return r===void 0?n:r}var mC=$n?$n.isConcatSpreadable:void 0;function jH(e){return Rn(e)||Ju(e)||!!(mC&&e&&e[mC])}function FH(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=jH),i||(i=[]);++o<a;){var s=e[o];n(s)?Mm(i,s):i[i.length]=s}return i}function HH(e){var t=e==null?0:e.length;return t?FH(e):[]}function zH(e){return cC(hC(e,void 0,HH),e+"")}var ag=xS(Object.getPrototypeOf,Object),VH="[object Object]",WH=Function.prototype,GH=Object.prototype,gC=WH.toString,UH=GH.hasOwnProperty,qH=gC.call(Object);function vC(e){if(!dr(e)||ro(e)!=VH)return!1;var t=ag(e);if(t===null)return!0;var n=UH.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&gC.call(n)==qH}function KH(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}function YH(e,t){return e&&Gs(t,js(t),e)}function XH(e,t){return e&&Gs(t,ng(t),e)}var yC=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bC=yC&&typeof module=="object"&&module&&!module.nodeType&&module,ZH=bC&&bC.exports===yC,xC=ZH?Wn.Buffer:void 0,_C=xC?xC.allocUnsafe:void 0;function QH(e,t){if(t)return e.slice();var n=e.length,r=_C?_C(n):new e.constructor(n);return e.copy(r),r}function JH(e,t){return Gs(e,Im(e),t)}var ez=Object.getOwnPropertySymbols,wC=ez?function(e){for(var t=[];e;)Mm(t,Im(e)),e=ag(e);return t}:cS;function tz(e,t){return Gs(e,wC(e),t)}function EC(e){return lS(e,ng,wC)}var nz=Object.prototype,rz=nz.hasOwnProperty;function iz(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&rz.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function sg(e){var t=new e.constructor(e.byteLength);return new Qu(t).set(new Qu(e)),t}function oz(e,t){var n=t?sg(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var az=/\w*$/;function sz(e){var t=new e.constructor(e.source,az.exec(e));return t.lastIndex=e.lastIndex,t}var SC=$n?$n.prototype:void 0,CC=SC?SC.valueOf:void 0;function lz(e){return CC?Object(CC.call(e)):{}}function cz(e,t){var n=t?sg(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var uz="[object Boolean]",dz="[object Date]",fz="[object Map]",pz="[object Number]",hz="[object RegExp]",mz="[object Set]",gz="[object String]",vz="[object Symbol]",yz="[object ArrayBuffer]",bz="[object DataView]",xz="[object Float32Array]",_z="[object Float64Array]",wz="[object Int8Array]",Ez="[object Int16Array]",Sz="[object Int32Array]",Cz="[object Uint8Array]",Tz="[object Uint8ClampedArray]",Pz="[object Uint16Array]",$z="[object Uint32Array]";function Rz(e,t,n){var r=e.constructor;switch(t){case yz:return sg(e);case uz:case dz:return new r(+e);case bz:return oz(e,n);case xz:case _z:case wz:case Ez:case Sz:case Cz:case Tz:case Pz:case $z:return cz(e,n);case fz:return new r;case pz:case gz:return new r(e);case hz:return sz(e);case mz:return new r;case vz:return lz(e)}}function Az(e){return typeof e.constructor=="function"&&!td(e)?sH(ag(e)):{}}var Oz="[object Map]";function Mz(e){return dr(e)&&An(e)==Oz}var TC=oa&&oa.isMap,Iz=TC?ed(TC):Mz,Dz="[object Set]";function Nz(e){return dr(e)&&An(e)==Dz}var PC=oa&&oa.isSet,Bz=PC?ed(PC):Nz,kz=1,Lz=2,jz=4,$C="[object Arguments]",Fz="[object Array]",Hz="[object Boolean]",zz="[object Date]",Vz="[object Error]",RC="[object Function]",Wz="[object GeneratorFunction]",Gz="[object Map]",Uz="[object Number]",AC="[object Object]",qz="[object RegExp]",Kz="[object Set]",Yz="[object String]",Xz="[object Symbol]",Zz="[object WeakMap]",Qz="[object ArrayBuffer]",Jz="[object DataView]",eV="[object Float32Array]",tV="[object Float64Array]",nV="[object Int8Array]",rV="[object Int16Array]",iV="[object Int32Array]",oV="[object Uint8Array]",aV="[object Uint8ClampedArray]",sV="[object Uint16Array]",lV="[object Uint32Array]",Le={};Le[$C]=Le[Fz]=Le[Qz]=Le[Jz]=Le[Hz]=Le[zz]=Le[eV]=Le[tV]=Le[nV]=Le[rV]=Le[iV]=Le[Gz]=Le[Uz]=Le[AC]=Le[qz]=Le[Kz]=Le[Yz]=Le[Xz]=Le[oV]=Le[aV]=Le[sV]=Le[lV]=!0,Le[Vz]=Le[RC]=Le[Zz]=!1;function qs(e,t,n,r,i,o){var a,s=t&kz,l=t&Lz,c=t&jz;if(n&&(a=i?n(e,r,i,o):n(e)),a!==void 0)return a;if(!Ir(e))return e;var u=Rn(e);if(u){if(a=iz(e),!s)return cH(e,a)}else{var d=An(e),f=d==RC||d==Wz;if(Bs(e))return QH(e,s);if(d==AC||d==$C||f&&!i){if(a=l||f?{}:Az(e),!s)return l?tz(e,XH(a,e)):JH(e,YH(a,e))}else{if(!Le[d])return i?e:{};a=Rz(e,d,s)}}o||(o=new ur);var p=o.get(e);if(p)return p;o.set(e,a),Bz(e)?e.forEach(function(g){a.add(qs(g,t,n,g,e,o))}):Iz(e)&&e.forEach(function(g,x){a.set(x,qs(g,t,n,x,e,o))});var m=c?l?EC:km:l?ng:js,v=u?void 0:m(e);return gH(v||e,function(g,x){v&&(x=g,g=e[x]),fC(a,x,qs(g,t,n,x,e,o))}),a}var cV=1,uV=4;function fd(e){return qs(e,cV|uV)}var dV=1,fV=2;function pV(e,t,n,r){var i=n.length,o=i;if(e==null)return!o;for(e=Object(e);i--;){var a=n[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){a=n[i];var s=a[0],l=e[s],c=a[1];if(a[2]){if(l===void 0&&!(s in e))return!1}else{var u=new ur,d;if(!(d===void 0?rd(c,l,dV|fV,r,u):d))return!1}}return!0}function OC(e){return e===e&&!Ir(e)}function hV(e){for(var t=js(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,OC(i)]}return t}function MC(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function mV(e){var t=hV(e);return t.length==1&&t[0][2]?MC(t[0][0],t[0][1]):function(n){return n===e||pV(n,e,t)}}function gV(e,t){return e!=null&&t in Object(e)}function vV(e,t,n){t=dd(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var a=Us(t[r]);if(!(o=e!=null&&n(e,a)))break;e=e[a]}return o||++r!=i?o:(i=e==null?0:e.length,!!i&&Dm(i)&&gS(a,i)&&(Rn(e)||Ju(e)))}function yV(e,t){return e!=null&&vV(e,t,gV)}var bV=1,xV=2;function _V(e,t){return rg(e)&&OC(t)?MC(Us(e),t):function(n){var r=LH(n,e);return r===void 0&&r===t?yV(n,e):rd(t,r,bV|xV)}}function wV(e){return function(t){return t==null?void 0:t[e]}}function EV(e){return function(t){return og(t,e)}}function SV(e){return rg(e)?wV(Us(e)):EV(e)}function IC(e){return typeof e=="function"?e:e==null?tg:typeof e=="object"?Rn(e)?_V(e[0],e[1]):mV(e):SV(e)}var lg=function(){return Wn.Date.now()},CV="Expected a function",TV=Math.max,PV=Math.min;function $V(e,t,n){var r,i,o,a,s,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(CV);t=eg(t)||0,Ir(n)&&(u=!!n.leading,d="maxWait"in n,o=d?TV(eg(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f);function p(S){var C=r,$=i;return r=i=void 0,c=S,a=e.apply($,C),a}function m(S){return c=S,s=setTimeout(x,t),u?p(S):a}function v(S){var C=S-l,$=S-c,M=t-C;return d?PV(M,o-$):M}function g(S){var C=S-l,$=S-c;return l===void 0||C>=t||C<0||d&&$>=o}function x(){var S=lg();if(g(S))return w(S);s=setTimeout(x,v(S))}function w(S){return s=void 0,f&&r?p(S):(r=i=void 0,a)}function b(){s!==void 0&&clearTimeout(s),c=0,r=l=i=s=void 0}function y(){return s===void 0?a:w(lg())}function _(){var S=lg(),C=g(S);if(r=arguments,i=this,l=S,C){if(s===void 0)return m(l);if(d)return clearTimeout(s),s=setTimeout(x,t),p(l)}return s===void 0&&(s=setTimeout(x,t)),a}return _.cancel=b,_.flush=y,_}function RV(e){return dr(e)&&Ls(e)}function AV(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function OV(e){return function(t,n,r){var i=Object(t);if(!Ls(t)){var o=IC(n);t=js(t),n=function(s){return o(i[s],s,i)}}var a=e(t,n,r);return a>-1?i[o?t[a]:a]:void 0}}var MV=Math.max;function IV(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:aH(n);return i<0&&(i=MV(r+i,0)),uC(e,IC(t),i)}var DV=OV(IV),NV=Math.min;function BV(e,t,n){for(var r=xH,i=e[0].length,o=e.length,a=o,s=Array(o),l=1/0,c=[];a--;){var u=e[a];a&&t&&(u=cd(u,ed(t))),l=NV(u.length,l),s[a]=i>=120&&u.length>=120?new Ns(a&&u):void 0}u=e[0];var d=-1,f=s[0];e:for(;++d<i&&c.length<l;){var p=u[d],m=p;if(p=p!==0?p:0,!(f?Am(f,m):r(c,m))){for(a=o;--a;){var v=s[a];if(!(v?Am(v,m):r(e[a],m)))continue e}f&&f.push(m),c.push(p)}}return c}function kV(e){return RV(e)?e:[]}var LV=EH(function(e){var t=cd(e,kV);return t.length&&t[0]===e[0]?BV(t):[]});function jV(e,t){return t.length<2?e:og(e,KH(t,0,-1))}var FV="[object Map]",HV="[object Set]",zV=Object.prototype,VV=zV.hasOwnProperty;function DC(e){if(e==null)return!0;if(Ls(e)&&(Rn(e)||typeof e=="string"||typeof e.splice=="function"||Bs(e)||Bm(e)||Ju(e)))return!e.length;var t=An(e);if(t==FV||t==HV)return!e.size;if(td(e))return!_S(e).length;for(var n in e)if(VV.call(e,n))return!1;return!0}function WV(e,t){return t=dd(t,e),e=jV(e,t),e==null||delete e[Us(AV(t))]}function GV(e){return vC(e)?void 0:e}var UV=1,qV=2,KV=4,YV=zH(function(e,t){var n={};if(e==null)return n;var r=!1;t=cd(t,function(o){return o=dd(o,e),r||(r=o.length>1),o}),Gs(e,EC(e),n),r&&(n=qs(n,UV|qV|KV,GV));for(var i=t.length;i--;)WV(n,t[i]);return n});const XV=()=>({compactSize:String,compactDirection:oe.oneOf(gi("horizontal","vertical")).def("horizontal"),isFirstItem:Oe(),isLastItem:Oe()}),pd=Ym(null),NC=(e,t)=>{const n=pd.useInject(),r=h.computed(()=>{if(!n||DC(n))return"";const{compactDirection:i,isFirstItem:o,isLastItem:a}=n,s=i==="vertical"?"-vertical-":"-";return xe({[`${e.value}-compact${s}item`]:!0,[`${e.value}-compact${s}first-item`]:o,[`${e.value}-compact${s}last-item`]:a,[`${e.value}-compact${s}item-rtl`]:t.value==="rtl"})});return{compactSize:h.computed(()=>n==null?void 0:n.compactSize),compactDirection:h.computed(()=>n==null?void 0:n.compactDirection),compactItemClassnames:r}},BC=h.defineComponent({name:"NoCompactStyle",setup(e,t){let{slots:n}=t;return pd.useProvide(null),()=>{var r;return(r=n.default)===null||r===void 0?void 0:r.call(n)}}}),ZV=()=>({prefixCls:String,size:{type:String},direction:oe.oneOf(gi("horizontal","vertical")).def("horizontal"),align:oe.oneOf(gi("start","end","center","baseline")),block:{type:Boolean,default:void 0}}),QV=h.defineComponent({name:"CompactItem",props:XV(),setup(e,t){let{slots:n}=t;return pd.useProvide(e),()=>{var r;return(r=n.default)===null||r===void 0?void 0:r.call(n)}}});h.defineComponent({name:"ASpaceCompact",inheritAttrs:!1,props:ZV(),setup(e,t){let{attrs:n,slots:r}=t;const{prefixCls:i,direction:o}=Ke("space-compact",e),a=pd.useInject(),[s,l]=q9(i),c=h.computed(()=>xe(i.value,l.value,{[`${i.value}-rtl`]:o.value==="rtl",[`${i.value}-block`]:e.block,[`${i.value}-vertical`]:e.direction==="vertical"}));return()=>{var u;const d=en(((u=r.default)===null||u===void 0?void 0:u.call(r))||[]);return d.length===0?null:s(h.createVNode("div",ne(ne({},n),{},{class:[c.value,n.class]}),[d.map((f,p)=>{var m;const v=f&&f.key||`${i.value}-item-${p}`,g=!a||DC(a);return h.createVNode(QV,{key:v,compactSize:(m=e.size)!==null&&m!==void 0?m:"middle",compactDirection:e.direction,isFirstItem:p===0&&(g||(a==null?void 0:a.isFirstItem)),isLastItem:p===d.length-1&&(g||(a==null?void 0:a.isLastItem))},{default:()=>[f]})})]))}}});const JV=e=>({animationDuration:e,animationFillMode:"both"}),e7=e=>({animationDuration:e,animationFillMode:"both"}),t7=function(e,t,n,r){const o=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[`
|
|
339
|
+
${o}${e}-enter,
|
|
340
|
+
${o}${e}-appear
|
|
341
|
+
`]:O(O({},JV(r)),{animationPlayState:"paused"}),[`${o}${e}-leave`]:O(O({},e7(r)),{animationPlayState:"paused"}),[`
|
|
342
|
+
${o}${e}-enter${e}-enter-active,
|
|
343
|
+
${o}${e}-appear${e}-appear-active
|
|
344
|
+
`]:{animationName:t,animationPlayState:"running"},[`${o}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},cg=new Wt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),n7=new Wt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),kC=new Wt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),LC=new Wt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),r7=new Wt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),i7=new Wt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),o7=new Wt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),a7=new Wt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),s7=new Wt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),l7=new Wt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),c7=new Wt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),u7=new Wt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),d7={zoom:{inKeyframes:cg,outKeyframes:n7},"zoom-big":{inKeyframes:kC,outKeyframes:LC},"zoom-big-fast":{inKeyframes:kC,outKeyframes:LC},"zoom-left":{inKeyframes:o7,outKeyframes:a7},"zoom-right":{inKeyframes:s7,outKeyframes:l7},"zoom-up":{inKeyframes:r7,outKeyframes:i7},"zoom-down":{inKeyframes:c7,outKeyframes:u7}},f7=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:i,outKeyframes:o}=d7[t];return[t7(r,i,o,e.motionDurationFast),{[`
|
|
345
|
+
${r}-enter,
|
|
346
|
+
${r}-appear
|
|
347
|
+
`]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},jC=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
|
|
348
|
+
opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
|
|
349
|
+
opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}});function p7(e,t,n){const{focusElCls:r,focus:i,borderElCls:o}=n,a=o?"> *":"",s=["hover",i?"focus":null,"active"].filter(Boolean).map(l=>`&:${l} ${a}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:-e.lineWidth},"&-item":O(O({[s]:{zIndex:2}},r?{[`&${r}`]:{zIndex:2}}:{}),{[`&[disabled] ${a}`]:{zIndex:0}})}}function h7(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 FC(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0};const{componentCls:n}=e,r=`${n}-compact`;return{[r]:O(O({},p7(e,r,t)),h7(n,r,t))}}var m7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function HC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){g7(e,i,n[i])})}return e}function g7(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ug=function(t,n){var r=HC({},t,n.attrs);return h.createVNode(Ut,HC({},r,{icon:m7}),null)};ug.displayName="CheckCircleFilled",ug.inheritAttrs=!1;var v7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};function zC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){y7(e,i,n[i])})}return e}function y7(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dg=function(t,n){var r=zC({},t,n.attrs);return h.createVNode(Ut,zC({},r,{icon:v7}),null)};dg.displayName="ExclamationCircleFilled",dg.inheritAttrs=!1;const hd=["xxxl","xxl","xl","lg","md","sm","xs"],b7=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`,xxxl:`{min-width: ${e.screenXXXL}px}`});function x7(){const[,e]=Cs();return h.computed(()=>{const t=b7(e.value),n=new Map;let r=-1,i={};return{matchHandlers:{},dispatch(o){return i=o,n.forEach(a=>a(i)),n.size>=1},subscribe(o){return n.size||this.register(),r+=1,n.set(r,o),o(i),r},unsubscribe(o){n.delete(o),n.size||this.unregister()},unregister(){Object.keys(t).forEach(o=>{const a=t[o],s=this.matchHandlers[a];s==null||s.mql.removeListener(s==null?void 0:s.listener)}),n.clear()},register(){Object.keys(t).forEach(o=>{const a=t[o],s=c=>{let{matches:u}=c;this.dispatch(O(O({},i),{[o]:u}))},l=window.matchMedia(a);l.addListener(s),this.matchHandlers[a]={mql:l,listener:s},s(l)})},responsiveMap:t}})}const On={adjustX:1,adjustY:1},Mn=[0,0],VC={left:{points:["cr","cl"],overflow:On,offset:[-4,0],targetOffset:Mn},right:{points:["cl","cr"],overflow:On,offset:[4,0],targetOffset:Mn},top:{points:["bc","tc"],overflow:On,offset:[0,-4],targetOffset:Mn},bottom:{points:["tc","bc"],overflow:On,offset:[0,4],targetOffset:Mn},topLeft:{points:["bl","tl"],overflow:On,offset:[0,-4],targetOffset:Mn},leftTop:{points:["tr","tl"],overflow:On,offset:[-4,0],targetOffset:Mn},topRight:{points:["br","tr"],overflow:On,offset:[0,-4],targetOffset:Mn},rightTop:{points:["tl","tr"],overflow:On,offset:[4,0],targetOffset:Mn},bottomRight:{points:["tr","br"],overflow:On,offset:[0,4],targetOffset:Mn},rightBottom:{points:["bl","br"],overflow:On,offset:[4,0],targetOffset:Mn},bottomLeft:{points:["tl","bl"],overflow:On,offset:[0,4],targetOffset:Mn},leftBottom:{points:["br","bl"],overflow:On,offset:[-4,0],targetOffset:Mn}},_7={prefixCls:String,id:String,overlayInnerStyle:oe.any},w7=h.defineComponent({compatConfig:{MODE:3},name:"TooltipContent",props:_7,setup(e,t){let{slots:n}=t;return()=>{var r;return h.createVNode("div",{class:`${e.prefixCls}-inner`,id:e.id,role:"tooltip",style:e.overlayInnerStyle},[(r=n.overlay)===null||r===void 0?void 0:r.call(n)])}}});var E7=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<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function WC(){}const S7=h.defineComponent({compatConfig:{MODE:3},name:"Tooltip",inheritAttrs:!1,props:{trigger:oe.any.def(["hover"]),defaultVisible:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},placement:oe.string.def("right"),transitionName:String,animation:oe.any,afterVisibleChange:oe.func.def(()=>{}),overlayStyle:{type:Object,default:void 0},overlayClassName:String,prefixCls:oe.string.def("rc-tooltip"),mouseEnterDelay:oe.number.def(.1),mouseLeaveDelay:oe.number.def(.1),getPopupContainer:Function,destroyTooltipOnHide:{type:Boolean,default:!1},align:oe.object.def(()=>({})),arrowContent:oe.any.def(null),tipId:String,builtinPlacements:oe.object,overlayInnerStyle:{type:Object,default:void 0},popupVisible:{type:Boolean,default:void 0},onVisibleChange:Function,onPopupAlign:Function,arrow:{type:Boolean,default:!0}},setup(e,t){let{slots:n,attrs:r,expose:i}=t;const o=h.shallowRef(),a=()=>{const{prefixCls:u,tipId:d,overlayInnerStyle:f}=e;return[e.arrow?h.createVNode("div",{class:`${u}-arrow`,key:"arrow"},[Yk(n,e,"arrowContent")]):null,h.createVNode(w7,{key:"content",prefixCls:u,id:d,overlayInnerStyle:f},{overlay:n.overlay})]};i({getPopupDomNode:()=>o.value.getPopupDomNode(),triggerDOM:o,forcePopupAlign:()=>{var u;return(u=o.value)===null||u===void 0?void 0:u.forcePopupAlign()}});const l=h.shallowRef(!1),c=h.shallowRef(!1);return h.watchEffect(()=>{const{destroyTooltipOnHide:u}=e;if(typeof u=="boolean")l.value=u;else if(u&&typeof u=="object"){const{keepParent:d}=u;l.value=d===!0,c.value=d===!1}}),()=>{const{overlayClassName:u,trigger:d,mouseEnterDelay:f,mouseLeaveDelay:p,overlayStyle:m,prefixCls:v,afterVisibleChange:g,transitionName:x,animation:w,placement:b,align:y,destroyTooltipOnHide:_,defaultVisible:S}=e,C=E7(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible"]),$=O({},C);e.visible!==void 0&&($.popupVisible=e.visible);const M=O(O(O({popupClassName:u,prefixCls:v,action:d,builtinPlacements:VC,popupPlacement:b,popupAlign:y,afterPopupVisibleChange:g,popupTransitionName:x,popupAnimation:w,defaultPopupVisible:S,destroyPopupOnHide:l.value,autoDestroy:c.value,mouseLeaveDelay:p,popupStyle:m,mouseEnterDelay:f},$),r),{onPopupVisibleChange:e.onVisibleChange||WC,onPopupAlign:e.onPopupAlign||WC,ref:o,arrow:!!e.arrow,popup:a()});return h.createVNode(QF,M,{default:n.default})}}}),C7=()=>({trigger:[String,Array],open:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},placement:String,color:String,transitionName:String,overlayStyle:En(),overlayInnerStyle:En(),overlayClassName:String,openClassName:String,prefixCls:String,mouseEnterDelay:Number,mouseLeaveDelay:Number,getPopupContainer:Function,arrowPointAtCenter:{type:Boolean,default:void 0},arrow:{type:[Boolean,Object],default:!0},autoAdjustOverflow:{type:[Boolean,Object],default:void 0},destroyTooltipOnHide:{type:Boolean,default:void 0},align:En(),builtinPlacements:En(),children:Array,onVisibleChange:Function,"onUpdate:visible":Function,onOpenChange:Function,"onUpdate:open":Function}),T7={adjustX:1,adjustY:1},GC={adjustX:0,adjustY:0},P7=[0,0];function UC(e){return typeof e=="boolean"?e?T7:GC:O(O({},GC),e)}function $7(e){const{arrowWidth:t=4,horizontalArrowShift:n=16,verticalArrowShift:r=8,autoAdjustOverflow:i,arrowPointAtCenter:o}=e,a={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(n+t),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(r+t)]},topRight:{points:["br","tc"],offset:[n+t,-4]},rightTop:{points:["tl","cr"],offset:[4,-(r+t)]},bottomRight:{points:["tr","bc"],offset:[n+t,4]},rightBottom:{points:["bl","cr"],offset:[4,r+t]},bottomLeft:{points:["tl","bc"],offset:[-(n+t),4]},leftBottom:{points:["br","cl"],offset:[-4,r+t]}};return Object.keys(a).forEach(s=>{a[s]=o?O(O({},a[s]),{overflow:UC(i),targetOffset:P7}):O(O({},VC[s]),{overflow:UC(i)}),a[s].ignoreShake=!0}),a}function qC(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];for(let t=0,n=e.length;t<n;t++)if(e[t]!==void 0)return e[t]}const R7=Ou.map(e=>`${e}-inverse`);function A7(e){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[...R7,...Ou].includes(e):Ou.includes(e)}function O7(e,t){const n=A7(t),r=xe({[`${e}-${t}`]:t&&n}),i={},o={};return t&&!n&&(i.background=t,o["--antd-arrow-background-color"]=t),{className:r,overlayStyle:i,arrowStyle:o}}function md(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return e.map(n=>`${t}${n}`).join(",")}const KC=8;function M7(e){const t=KC,{sizePopupArrow:n,contentRadius:r,borderRadiusOuter:i,limitVerticalRadius:o}=e,a=n/2-Math.ceil(i*(Math.sqrt(2)-1)),s=(r>12?r+2:12)-a,l=o?t-a:s;return{dropdownArrowOffset:s,dropdownArrowOffsetVertical:l}}function I7(e,t){const{componentCls:n,sizePopupArrow:r,marginXXS:i,borderRadiusXS:o,borderRadiusOuter:a,boxShadowPopoverArrow:s}=e,{colorBg:l,showArrowCls:c,contentRadius:u=e.borderRadiusLG,limitVerticalRadius:d}=t,{dropdownArrowOffsetVertical:f,dropdownArrowOffset:p}=M7({sizePopupArrow:r,contentRadius:u,borderRadiusOuter:a,limitVerticalRadius:d}),m=r/2+i;return{[n]:{[`${n}-arrow`]:[O(O({position:"absolute",zIndex:1,display:"block"},B6(r,o,a,l,s)),{"&:before":{background:l}})],[[`&-placement-top ${n}-arrow`,`&-placement-topLeft ${n}-arrow`,`&-placement-topRight ${n}-arrow`].join(",")]:{bottom:0,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:p}},[`&-placement-topRight ${n}-arrow`]:{right:{_skip_check_:!0,value:p}},[[`&-placement-bottom ${n}-arrow`,`&-placement-bottomLeft ${n}-arrow`,`&-placement-bottomRight ${n}-arrow`].join(",")]:{top:0,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:p}},[`&-placement-bottomRight ${n}-arrow`]:{right:{_skip_check_:!0,value:p}},[[`&-placement-left ${n}-arrow`,`&-placement-leftTop ${n}-arrow`,`&-placement-leftBottom ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:0},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:f},[`&-placement-leftBottom ${n}-arrow`]:{bottom:f},[[`&-placement-right ${n}-arrow`,`&-placement-rightTop ${n}-arrow`,`&-placement-rightBottom ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:0},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:f},[`&-placement-rightBottom ${n}-arrow`]:{bottom:f},[md(["&-placement-topLeft","&-placement-top","&-placement-topRight"].map(v=>v+=":not(&-arrow-hidden)"),c)]:{paddingBottom:m},[md(["&-placement-bottomLeft","&-placement-bottom","&-placement-bottomRight"].map(v=>v+=":not(&-arrow-hidden)"),c)]:{paddingTop:m},[md(["&-placement-leftTop","&-placement-left","&-placement-leftBottom"].map(v=>v+=":not(&-arrow-hidden)"),c)]:{paddingRight:{_skip_check_:!0,value:m}},[md(["&-placement-rightTop","&-placement-right","&-placement-rightBottom"].map(v=>v+=":not(&-arrow-hidden)"),c)]:{paddingLeft:{_skip_check_:!0,value:m}}}}}const D7=e=>{const{componentCls:t,tooltipMaxWidth:n,tooltipColor:r,tooltipBg:i,tooltipBorderRadius:o,zIndexPopup:a,controlHeight:s,boxShadowSecondary:l,paddingSM:c,paddingXS:u,tooltipRadiusOuter:d}=e;return[{[t]:O(O(O(O({},Tn(e)),{position:"absolute",zIndex:a,display:"block","&":[{width:"max-content"},{width:"intrinsic"}],maxWidth:n,visibility:"visible","&-hidden":{display:"none"},"--antd-arrow-background-color":i,[`${t}-inner`]:{minWidth:s,minHeight:s,padding:`${c/2}px ${u}px`,color:r,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:o,boxShadow:l},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${t}-inner`]:{borderRadius:Math.min(o,KC)}},[`${t}-content`]:{position:"relative"}}),k6(e,(f,p)=>{let{darkColor:m}=p;return{[`&${t}-${f}`]:{[`${t}-inner`]:{backgroundColor:m},[`${t}-arrow`]:{"--antd-arrow-background-color":m}}}})),{"&-rtl":{direction:"rtl"}})},I7(Ot(e,{borderRadiusOuter:d}),{colorBg:"var(--antd-arrow-background-color)",showArrowCls:"",contentRadius:o,limitVerticalRadius:!0}),{[`${t}-pure`]:{position:"relative",maxWidth:"none"}}]},N7=(e,t)=>Pn("Tooltip",r=>{if((t==null?void 0:t.value)===!1)return[];const{borderRadius:i,colorTextLightSolid:o,colorBgDefault:a,borderRadiusOuter:s}=r,l=Ot(r,{tooltipMaxWidth:250,tooltipColor:o,tooltipBorderRadius:i,tooltipBg:a,tooltipRadiusOuter:s>4?4:s});return[D7(l),f7(r,"zoom-big-fast")]},r=>{let{zIndexPopupBase:i,colorBgSpotlight:o}=r;return{zIndexPopup:i+70,colorBgDefault:o}})(e),B7=(e,t)=>{const n={},r=O({},e);return t.forEach(i=>{e&&i in e&&(n[i]=e[i],delete r[i])}),{picked:n,omitted:r}},k7=()=>O(O({},C7()),{title:oe.any}),L7=h.defineComponent({compatConfig:{MODE:3},name:"ATooltip",inheritAttrs:!1,props:qo(k7(),{trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),slots:Object,setup(e,t){let{slots:n,emit:r,attrs:i,expose:o}=t;process.env.NODE_ENV!=="production"&&[["visible","open"],["onVisibleChange","onOpenChange"]].forEach(R=>{let[I,L]=R;Rr(e[I]===void 0,"Tooltip",`\`${I}\` is deprecated, please use \`${L}\` instead.`)});const{prefixCls:a,getPopupContainer:s,direction:l,rootPrefixCls:c}=Ke("tooltip",e),u=h.computed(()=>{var R;return(R=e.open)!==null&&R!==void 0?R:e.visible}),d=h.ref(qC([e.open,e.visible])),f=h.ref();let p;h.watch(u,R=>{Tt.cancel(p),p=Tt(()=>{d.value=!!R})});const m=()=>{var R;const I=(R=e.title)!==null&&R!==void 0?R:n.title;return!I&&I!==0},v=R=>{const I=m();u.value===void 0&&(d.value=I?!1:R),I||(r("update:visible",R),r("visibleChange",R),r("update:open",R),r("openChange",R))};o({getPopupDomNode:()=>f.value.getPopupDomNode(),open:d,forcePopupAlign:()=>{var R;return(R=f.value)===null||R===void 0?void 0:R.forcePopupAlign()}});const x=h.computed(()=>{var R;const{builtinPlacements:I,autoAdjustOverflow:L,arrow:k,arrowPointAtCenter:V}=e;let W=V;return typeof k=="object"&&(W=(R=k.pointAtCenter)!==null&&R!==void 0?R:V),I||$7({arrowPointAtCenter:W,autoAdjustOverflow:L})}),w=R=>R||R==="",b=R=>{const I=R.type;if(typeof I=="object"&&R.props&&((I.__ANT_BUTTON===!0||I==="button")&&w(R.props.disabled)||I.__ANT_SWITCH===!0&&(w(R.props.disabled)||w(R.props.loading))||I.__ANT_RADIO===!0&&w(R.props.disabled))){const{picked:L,omitted:k}=B7(qk(R),["position","left","right","top","bottom","float","display","zIndex"]),V=O(O({display:"inline-block"},L),{cursor:"not-allowed",lineHeight:1,width:R.props&&R.props.block?"100%":void 0}),W=O(O({},k),{pointerEvents:"none"}),q=on(R,{style:W},!0);return h.createVNode("span",{style:V,class:`${a.value}-disabled-compatible-wrapper`},[q])}return R},y=()=>{var R,I;return(R=e.title)!==null&&R!==void 0?R:(I=n.title)===null||I===void 0?void 0:I.call(n)},_=(R,I)=>{const L=x.value,k=Object.keys(L).find(V=>{var W,q;return L[V].points[0]===((W=I.points)===null||W===void 0?void 0:W[0])&&L[V].points[1]===((q=I.points)===null||q===void 0?void 0:q[1])});if(k){const V=R.getBoundingClientRect(),W={top:"50%",left:"50%"};k.indexOf("top")>=0||k.indexOf("Bottom")>=0?W.top=`${V.height-I.offset[1]}px`:(k.indexOf("Top")>=0||k.indexOf("bottom")>=0)&&(W.top=`${-I.offset[1]}px`),k.indexOf("left")>=0||k.indexOf("Right")>=0?W.left=`${V.width-I.offset[0]}px`:(k.indexOf("right")>=0||k.indexOf("Left")>=0)&&(W.left=`${-I.offset[0]}px`),R.style.transformOrigin=`${W.left} ${W.top}`}},S=h.computed(()=>O7(a.value,e.color)),C=h.computed(()=>i["data-popover-inject"]),[$,M]=N7(a,h.computed(()=>!C.value));return()=>{var R,I;const{openClassName:L,overlayClassName:k,overlayStyle:V,overlayInnerStyle:W}=e;let q=(I=Pr((R=n.default)===null||R===void 0?void 0:R.call(n)))!==null&&I!==void 0?I:null;q=q.length===1?q[0]:q;let H=d.value;if(u.value===void 0&&m()&&(H=!1),!q)return null;const Z=b(gu(q)&&!Kk(q)?q:h.createVNode("span",null,[q])),U=xe({[L||`${a.value}-open`]:!0,[Z.props&&Z.props.class]:Z.props&&Z.props.class}),X=xe(k,{[`${a.value}-rtl`]:l.value==="rtl"},S.value.className,M.value),re=O(O({},S.value.overlayStyle),W),F=S.value.arrowStyle,z=O(O(O({},i),e),{prefixCls:a.value,arrow:!!e.arrow,getPopupContainer:s==null?void 0:s.value,builtinPlacements:x.value,visible:H,ref:f,overlayClassName:X,overlayStyle:O(O({},F),V),overlayInnerStyle:re,onVisibleChange:v,onPopupAlign:_,transitionName:LF(c.value,"zoom-big-fast",e.transitionName)});return $(h.createVNode(S7,z,{default:()=>[d.value?on(Z,{class:U}):Z],arrowContent:()=>h.createVNode("span",{class:`${a.value}-arrow-content`},null),overlay:y}))}}}),j7=kh(L7),F7=e=>{const{componentCls:t,colorPrimary:n}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0}}}}},H7=Pn("Wave",e=>[F7(e)]);function z7(e){const t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return t&&t[1]&&t[2]&&t[3]?!(t[1]===t[2]&&t[2]===t[3]):!0}function fg(e){return e&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&z7(e)&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"}function V7(e){const{borderTopColor:t,borderColor:n,backgroundColor:r}=getComputedStyle(e);return fg(t)?t:fg(n)?n:fg(r)?r:null}function pg(e){return Number.isNaN(e)?0:e}const W7=h.defineComponent({props:{target:En(),className:String},setup(e){const t=h.shallowRef(null),[n,r]=lo(null),[i,o]=lo([]),[a,s]=lo(0),[l,c]=lo(0),[u,d]=lo(0),[f,p]=lo(0),[m,v]=lo(!1);function g(){const{target:C}=e,$=getComputedStyle(C);r(V7(C));const M=$.position==="static",{borderLeftWidth:R,borderTopWidth:I}=$;s(M?C.offsetLeft:pg(-parseFloat(R))),c(M?C.offsetTop:pg(-parseFloat(I))),d(C.offsetWidth),p(C.offsetHeight);const{borderTopLeftRadius:L,borderTopRightRadius:k,borderBottomLeftRadius:V,borderBottomRightRadius:W}=$;o([L,k,W,V].map(q=>pg(parseFloat(q))))}let x,w,b;const y=()=>{clearTimeout(b),Tt.cancel(w),x==null||x.disconnect()},_=()=>{var C;const $=(C=t.value)===null||C===void 0?void 0:C.parentElement;$&&(h.render(null,$),$.parentElement&&$.parentElement.removeChild($))};h.onMounted(()=>{y(),b=setTimeout(()=>{_()},5e3);const{target:C}=e;C&&(w=Tt(()=>{g(),v(!0)}),typeof ResizeObserver<"u"&&(x=new ResizeObserver(g),x.observe(C)))}),h.onBeforeUnmount(()=>{y()});const S=C=>{C.propertyName==="opacity"&&_()};return()=>{if(!m.value)return null;const C={left:`${a.value}px`,top:`${l.value}px`,width:`${u.value}px`,height:`${f.value}px`,borderRadius:i.value.map($=>`${$}px`).join(" ")};return n&&(C["--wave-color"]=n.value),h.createVNode(h.Transition,{appear:!0,name:"wave-motion",appearFromClass:"wave-motion-appear",appearActiveClass:"wave-motion-appear",appearToClass:"wave-motion-appear wave-motion-appear-active"},{default:()=>[h.createVNode("div",{ref:t,class:e.className,style:C,onTransitionend:S},null)]})}}});function G7(e,t){const n=document.createElement("div");return n.style.position="absolute",n.style.left="0px",n.style.top="0px",e==null||e.insertBefore(n,e==null?void 0:e.firstChild),h.render(h.createVNode(W7,{target:e,className:t},null),n),()=>{h.render(null,n),n.parentElement&&n.parentElement.removeChild(n)}}function U7(e,t){const n=h.getCurrentInstance();let r;function i(){var o;const a=mi(n);r==null||r(),!(!((o=t==null?void 0:t.value)===null||o===void 0)&&o.disabled||!a)&&(r=G7(a,e.value))}return h.onBeforeUnmount(()=>{r==null||r()}),i}const q7=h.defineComponent({compatConfig:{MODE:3},name:"Wave",props:{disabled:Boolean},setup(e,t){let{slots:n}=t;const r=h.getCurrentInstance(),{prefixCls:i,wave:o}=Ke("wave",e),[,a]=H7(i),s=U7(h.computed(()=>xe(i.value,a.value)),o);let l;const c=()=>{mi(r).removeEventListener("click",l,!0)};return h.onMounted(()=>{h.watch(()=>e.disabled,()=>{c(),h.nextTick(()=>{const u=mi(r);u==null||u.removeEventListener("click",l,!0),!(!u||u.nodeType!==1||e.disabled)&&(l=d=>{d.target.tagName==="INPUT"||!JE(d.target)||!u.getAttribute||u.getAttribute("disabled")||u.disabled||u.className.includes("disabled")||u.className.includes("-leave")||s()},u.addEventListener("click",l,!0))})},{immediate:!0,flush:"post"})}),h.onBeforeUnmount(()=>{c()}),()=>{var u;return(u=n.default)===null||u===void 0?void 0:u.call(n)[0]}}}),K7=()=>({prefixCls:String,type:String,htmlType:{type:String,default:"button"},shape:{type:String},size:{type:String},loading:{type:[Boolean,Object],default:()=>!1},disabled:{type:Boolean,default:void 0},ghost:{type:Boolean,default:void 0},block:{type:Boolean,default:void 0},danger:{type:Boolean,default:void 0},icon:oe.any,href:String,target:String,title:String,onClick:vu(),onMousedown:vu()}),YC=e=>{e&&(e.style.width="0px",e.style.opacity="0",e.style.transform="scale(0)")},XC=e=>{h.nextTick(()=>{e&&(e.style.width=`${e.scrollWidth}px`,e.style.opacity="1",e.style.transform="scale(1)")})},ZC=e=>{e&&e.style&&(e.style.width=null,e.style.opacity=null,e.style.transform=null)},Y7=h.defineComponent({compatConfig:{MODE:3},name:"LoadingIcon",props:{prefixCls:String,loading:[Boolean,Object],existIcon:Boolean},setup(e){return()=>{const{existIcon:t,prefixCls:n,loading:r}=e;if(t)return h.createVNode("span",{class:`${n}-loading-icon`},[h.createVNode(zs,null,null)]);const i=!!r;return h.createVNode(h.Transition,{name:`${n}-loading-icon-motion`,onBeforeEnter:YC,onEnter:XC,onAfterEnter:ZC,onBeforeLeave:XC,onLeave:o=>{setTimeout(()=>{YC(o)})},onAfterLeave:ZC},{default:()=>[i?h.createVNode("span",{class:`${n}-loading-icon`},[h.createVNode(zs,null,null)]):null]})}}}),QC=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),X7=e=>{const{componentCls:t,fontSize:n,lineWidth:r,colorPrimaryHover:i,colorErrorHover:o}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:-r,[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover,\n &:focus,\n &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},QC(`${t}-primary`,i),QC(`${t}-danger`,o)]}};function Z7(e,t){return{[`&-item:not(${t}-last-item)`]:{marginBottom:-e.lineWidth},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function Q7(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function J7(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:O(O({},Z7(e,t)),Q7(e.componentCls,t))}}const eW=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{outline:"none",position:"relative",display:"inline-block",fontWeight:400,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",backgroundColor:"transparent",border:`${e.lineWidth}px ${e.lineType} transparent`,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",lineHeight:e.lineHeight,color:e.colorText,"> span":{display:"inline-block"},[`> ${n} + span, > span + ${n}`]:{marginInlineStart:e.marginXS},"> a":{color:"currentColor"},"&:not(:disabled)":O({},z6(e)),[`&-icon-only${t}-compact-item`]:{flex:"none"},[`&-compact-item${t}-primary`]:{[`&:not([disabled]) + ${t}-compact-item${t}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-e.lineWidth,insetInlineStart:-e.lineWidth,display:"inline-block",width:e.lineWidth,height:`calc(100% + ${e.lineWidth*2}px)`,backgroundColor:e.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{[`&${t}-primary`]:{[`&:not([disabled]) + ${t}-compact-vertical-item${t}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-e.lineWidth,insetInlineStart:-e.lineWidth,display:"inline-block",width:`calc(100% + ${e.lineWidth*2}px)`,height:e.lineWidth,backgroundColor:e.colorPrimaryHover,content:'""'}}}}}}},Br=(e,t)=>({"&:not(:disabled)":{"&:hover":e,"&:active":t}}),tW=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),nW=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.controlHeight/2,paddingInlineEnd:e.controlHeight/2}),hg=e=>({cursor:"not-allowed",borderColor:e.colorBorder,color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,boxShadow:"none"}),gd=(e,t,n,r,i,o,a)=>({[`&${e}-background-ghost`]:O(O({color:t||void 0,backgroundColor:"transparent",borderColor:n||void 0,boxShadow:"none"},Br(O({backgroundColor:"transparent"},o),O({backgroundColor:"transparent"},a))),{"&:disabled":{cursor:"not-allowed",color:r||void 0,borderColor:i||void 0}})}),mg=e=>({"&:disabled":O({},hg(e))}),JC=e=>O({},mg(e)),vd=e=>({"&:disabled":{cursor:"not-allowed",color:e.colorTextDisabled}}),eT=e=>O(O(O(O(O({},JC(e)),{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`}),Br({color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),gd(e.componentCls,e.colorBgContainer,e.colorBgContainer,e.colorTextDisabled,e.colorBorder)),{[`&${e.componentCls}-dangerous`]:O(O(O({color:e.colorError,borderColor:e.colorError},Br({color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),gd(e.componentCls,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder)),mg(e))}),rW=e=>O(O(O(O(O({},JC(e)),{color:e.colorTextLightSolid,backgroundColor:e.colorPrimary,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`}),Br({color:e.colorTextLightSolid,backgroundColor:e.colorPrimaryHover},{color:e.colorTextLightSolid,backgroundColor:e.colorPrimaryActive})),gd(e.componentCls,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),{[`&${e.componentCls}-dangerous`]:O(O(O({backgroundColor:e.colorError,boxShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`},Br({backgroundColor:e.colorErrorHover},{backgroundColor:e.colorErrorActive})),gd(e.componentCls,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),mg(e))}),iW=e=>O(O({},eT(e)),{borderStyle:"dashed"}),oW=e=>O(O(O({color:e.colorLink},Br({color:e.colorLinkHover},{color:e.colorLinkActive})),vd(e)),{[`&${e.componentCls}-dangerous`]:O(O({color:e.colorError},Br({color:e.colorErrorHover},{color:e.colorErrorActive})),vd(e))}),aW=e=>O(O(O({},Br({color:e.colorText,backgroundColor:e.colorBgTextHover},{color:e.colorText,backgroundColor:e.colorBgTextActive})),vd(e)),{[`&${e.componentCls}-dangerous`]:O(O({color:e.colorError},vd(e)),Br({color:e.colorErrorHover,backgroundColor:e.colorErrorBg},{color:e.colorErrorHover,backgroundColor:e.colorErrorBg}))}),sW=e=>O(O({},hg(e)),{[`&${e.componentCls}:hover`]:O({},hg(e))}),lW=e=>{const{componentCls:t}=e;return{[`${t}-default`]:eT(e),[`${t}-primary`]:rW(e),[`${t}-dashed`]:iW(e),[`${t}-link`]:oW(e),[`${t}-text`]:aW(e),[`${t}-disabled`]:sW(e)}},gg=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:n,iconCls:r,controlHeight:i,fontSize:o,lineHeight:a,lineWidth:s,borderRadius:l,buttonPaddingHorizontal:c}=e,u=Math.max(0,(i-o*a)/2-s),d=c-s,f=`${n}-icon-only`;return[{[`${n}${t}`]:{fontSize:o,height:i,padding:`${u}px ${d}px`,borderRadius:l,[`&${f}`]:{width:i,paddingInlineStart:0,paddingInlineEnd:0,[`&${n}-round`]:{width:"auto"},"> span":{transform:"scale(1.143)"}},[`&${n}-loading`]:{opacity:e.opacityLoading,cursor:"default"},[`${n}-loading-icon`]:{transition:`width ${e.motionDurationSlow} ${e.motionEaseInOut}, opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`&:not(${f}) ${n}-loading-icon > ${r}`]:{marginInlineEnd:e.marginXS}}},{[`${n}${n}-circle${t}`]:tW(e)},{[`${n}${n}-round${t}`]:nW(e)}]},cW=e=>gg(e),uW=e=>{const t=Ot(e,{controlHeight:e.controlHeightSM,padding:e.paddingXS,buttonPaddingHorizontal:8,borderRadius:e.borderRadiusSM});return gg(t,`${e.componentCls}-sm`)},dW=e=>{const t=Ot(e,{controlHeight:e.controlHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG});return gg(t,`${e.componentCls}-lg`)},fW=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},pW=Pn("Button",e=>{const{controlTmpOutline:t,paddingContentHorizontal:n}=e,r=Ot(e,{colorOutlineDefault:t,buttonPaddingHorizontal:n});return[eW(r),uW(r),cW(r),dW(r),fW(r),lW(r),X7(r),FC(e,{focus:!1}),J7(e)]}),hW=()=>({prefixCls:String,size:{type:String}}),tT=Ym(),vg=h.defineComponent({compatConfig:{MODE:3},name:"AButtonGroup",props:hW(),setup(e,t){let{slots:n}=t;const{prefixCls:r,direction:i}=Ke("btn-group",e),[,,o]=Cs();tT.useProvide(h.reactive({size:h.computed(()=>e.size)}));const a=h.computed(()=>{const{size:s}=e;let l="";switch(s){case"large":l="lg";break;case"small":l="sm";break;case"middle":case void 0:break;default:Vu(!s,"Button.Group","Invalid prop `size`.")}return{[`${r.value}`]:!0,[`${r.value}-${l}`]:l,[`${r.value}-rtl`]:i.value==="rtl",[o.value]:!0}});return()=>{var s;return h.createVNode("div",{class:a.value},[en((s=n.default)===null||s===void 0?void 0:s.call(n))])}}}),nT=/^[\u4e00-\u9fa5]{2}$/,rT=nT.test.bind(nT);function yd(e){return e==="text"||e==="link"}const aa=h.defineComponent({compatConfig:{MODE:3},name:"AButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:qo(K7(),{type:"default"}),slots:Object,setup(e,t){let{slots:n,attrs:r,emit:i,expose:o}=t;const{prefixCls:a,autoInsertSpaceInButton:s,direction:l,size:c}=Ke("btn",e),[u,d]=pW(a),f=tT.useInject(),p=vi(),m=h.computed(()=>{var W;return(W=e.disabled)!==null&&W!==void 0?W:p.value}),v=h.shallowRef(null),g=h.shallowRef(void 0);let x=!1;const w=h.shallowRef(!1),b=h.shallowRef(!1),y=h.computed(()=>s.value!==!1),{compactSize:_,compactItemClassnames:S}=NC(a,l),C=h.computed(()=>typeof e.loading=="object"&&e.loading.delay?e.loading.delay||!0:!!e.loading);h.watch(C,W=>{clearTimeout(g.value),typeof C.value=="number"?g.value=setTimeout(()=>{w.value=W},C.value):w.value=W},{immediate:!0});const $=h.computed(()=>{const{type:W,shape:q="default",ghost:H,block:Z,danger:U}=e,X=a.value,re={large:"lg",small:"sm",middle:void 0},F=_.value||(f==null?void 0:f.size)||c.value,z=F&&re[F]||"";return[S.value,{[d.value]:!0,[`${X}`]:!0,[`${X}-${q}`]:q!=="default"&&q,[`${X}-${W}`]:W,[`${X}-${z}`]:z,[`${X}-loading`]:w.value,[`${X}-background-ghost`]:H&&!yd(W),[`${X}-two-chinese-chars`]:b.value&&y.value,[`${X}-block`]:Z,[`${X}-dangerous`]:!!U,[`${X}-rtl`]:l.value==="rtl"}]}),M=()=>{const W=v.value;if(!W||s.value===!1)return;const q=W.textContent;x&&rT(q)?b.value||(b.value=!0):b.value&&(b.value=!1)},R=W=>{if(w.value||m.value){W.preventDefault();return}i("click",W)},I=W=>{i("mousedown",W)},L=(W,q)=>{const H=q?" ":"";if(W.type===h.Text){let Z=W.children.trim();return rT(Z)&&(Z=Z.split("").join(H)),h.createVNode("span",null,[Z])}return W};return h.watchEffect(()=>{Vu(!(e.ghost&&yd(e.type)),"Button","`link` or `text` button can't be a `ghost` button.")}),h.onMounted(M),h.onUpdated(M),h.onBeforeUnmount(()=>{g.value&&clearTimeout(g.value)}),o({focus:()=>{var W;(W=v.value)===null||W===void 0||W.focus()},blur:()=>{var W;(W=v.value)===null||W===void 0||W.blur()}}),()=>{var W,q;const{icon:H=(W=n.icon)===null||W===void 0?void 0:W.call(n)}=e,Z=en((q=n.default)===null||q===void 0?void 0:q.call(n));x=Z.length===1&&!H&&!yd(e.type);const{type:U,htmlType:X,href:re,title:F,target:z}=e,J=w.value?"loading":H,Y=O(O({},r),{title:F,disabled:m.value,class:[$.value,r.class,{[`${a.value}-icon-only`]:Z.length===0&&!!J}],onClick:R,onMousedown:I});m.value||delete Y.disabled;const A=H&&!w.value?H:h.createVNode(Y7,{existIcon:!!H,prefixCls:a.value,loading:!!w.value},null),E=Z.map(D=>L(D,x&&y.value));if(re!==void 0)return u(h.createVNode("a",ne(ne({},Y),{},{href:re,target:z,ref:v}),[A,E]));let T=h.createVNode("button",ne(ne({},Y),{},{ref:v,type:X}),[A,E]);if(!yd(U)){const D=function(){return T}();T=h.createVNode(q7,{ref:"wave",disabled:!!w.value},{default:()=>[D]})}return u(T)}}});aa.Group=vg,aa.install=function(e){return e.component(aa.name,aa),e.component(vg.name,vg),e};var mW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};function iT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){gW(e,i,n[i])})}return e}function gW(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yg=function(t,n){var r=iT({},t,n.attrs);return h.createVNode(Ut,iT({},r,{icon:mW}),null)};yg.displayName="RightOutlined",yg.inheritAttrs=!1;function oT(e,t){return e.classList?e.classList.contains(t):` ${e.className} `.indexOf(` ${t} `)>-1}function aT(e,t){e.classList?e.classList.add(t):oT(e,t)||(e.className=`${e.className} ${t}`)}function sT(e,t){if(e.classList)e.classList.remove(t);else if(oT(e,t)){const n=e.className;e.className=` ${n} `.replace(` ${t} `," ")}}const lT=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"ant-motion-collapse",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return{name:e,appear:t,css:!0,onBeforeEnter:n=>{n.style.height="0px",n.style.opacity="0",aT(n,e)},onEnter:n=>{h.nextTick(()=>{n.style.height=`${n.scrollHeight}px`,n.style.opacity="1"})},onAfterEnter:n=>{n&&(sT(n,e),n.style.height=null,n.style.opacity=null)},onBeforeLeave:n=>{aT(n,e),n.style.height=`${n.offsetHeight}px`,n.style.opacity=null},onLeave:n=>{setTimeout(()=>{n.style.height="0px",n.style.opacity="0"})},onAfterLeave:n=>{n&&(sT(n,e),n.style&&(n.style.height=null,n.style.opacity=null))}}};var vW=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<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const yW={prefixCls:String,name:String,id:String,type:String,defaultChecked:{type:[Boolean,Number],default:void 0},checked:{type:[Boolean,Number],default:void 0},disabled:Boolean,tabindex:{type:[Number,String]},readonly:Boolean,autofocus:Boolean,value:oe.any,required:Boolean},cT=h.defineComponent({compatConfig:{MODE:3},name:"Checkbox",inheritAttrs:!1,props:qo(yW,{prefixCls:"rc-checkbox",type:"checkbox",defaultChecked:!1}),emits:["click","change"],setup(e,t){let{attrs:n,emit:r,expose:i}=t;const o=h.ref(e.checked===void 0?e.defaultChecked:e.checked),a=h.ref();h.watch(()=>e.checked,()=>{o.value=e.checked}),i({focus(){var u;(u=a.value)===null||u===void 0||u.focus()},blur(){var u;(u=a.value)===null||u===void 0||u.blur()}});const s=h.ref(),l=u=>{if(e.disabled)return;e.checked===void 0&&(o.value=u.target.checked),u.shiftKey=s.value;const d={target:O(O({},e),{checked:u.target.checked}),stopPropagation(){u.stopPropagation()},preventDefault(){u.preventDefault()},nativeEvent:u};e.checked!==void 0&&(a.value.checked=!!e.checked),r("change",d),s.value=!1},c=u=>{r("click",u),s.value=u.shiftKey};return()=>{const{prefixCls:u,name:d,id:f,type:p,disabled:m,readonly:v,tabindex:g,autofocus:x,value:w,required:b}=e,y=vW(e,["prefixCls","name","id","type","disabled","readonly","tabindex","autofocus","value","required"]),{class:_,onFocus:S,onBlur:C,onKeydown:$,onKeypress:M,onKeyup:R}=n,I=O(O({},y),n),L=Object.keys(I).reduce((W,q)=>((q.startsWith("data-")||q.startsWith("aria-")||q==="role")&&(W[q]=I[q]),W),{}),k=xe(u,_,{[`${u}-checked`]:o.value,[`${u}-disabled`]:m}),V=O(O({name:d,id:f,type:p,readonly:v,disabled:m,tabindex:g,class:`${u}-input`,checked:!!o.value,autofocus:x,value:w},L),{onChange:l,onClick:c,onFocus:S,onBlur:C,onKeydown:$,onKeypress:M,onKeyup:R,required:b});return h.createVNode("span",{class:k},[h.createVNode("input",ne({ref:a},V),null),h.createVNode("span",{class:`${u}-inner`},null)])}}}),uT=Symbol("radioGroupContextKey"),bW=e=>{h.provide(uT,e)},xW=()=>h.inject(uT,void 0),dT=Symbol("radioOptionTypeContextKey"),_W=e=>{h.provide(dT,e)},wW=()=>h.inject(dT,void 0),EW=new Wt("antRadioEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),SW=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:O(O({},Tn(e)),{display:"inline-block",fontSize:0,[`&${r}-rtl`]:{direction:"rtl"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},CW=e=>{const{componentCls:t,radioWrapperMarginRight:n,radioCheckedColor:r,radioSize:i,motionDurationSlow:o,motionDurationMid:a,motionEaseInOut:s,motionEaseInOutCirc:l,radioButtonBg:c,colorBorder:u,lineWidth:d,radioDotSize:f,colorBgContainerDisabled:p,colorTextDisabled:m,paddingXS:v,radioDotDisabledColor:g,lineType:x,radioDotDisabledSize:w,wireframe:b,colorWhite:y}=e,_=`${t}-inner`;return{[`${t}-wrapper`]:O(O({},Tn(e)),{position:"relative",display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer",[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${t}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${d}px ${x} ${r}`,borderRadius:"50%",visibility:"hidden",animationName:EW,animationDuration:o,animationTimingFunction:s,animationFillMode:"both",content:'""'},[t]:O(O({},Tn(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center"}),[`${t}-wrapper:hover &,
|
|
350
|
+
&:hover ${_}`]:{borderColor:r},[`${t}-input:focus-visible + ${_}`]:O({},Lu(e)),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:"visible"},[`${t}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:i,height:i,marginBlockStart:i/-2,marginInlineStart:i/-2,backgroundColor:b?r:y,borderBlockStart:0,borderInlineStart:0,borderRadius:i,transform:"scale(0)",opacity:0,transition:`all ${o} ${l}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:i,height:i,backgroundColor:c,borderColor:u,borderStyle:"solid",borderWidth:d,borderRadius:"50%",transition:`all ${a}`},[`${t}-input`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,insetBlockEnd:0,insetInlineStart:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[_]:{borderColor:r,backgroundColor:b?c:r,"&::after":{transform:`scale(${f/i})`,opacity:1,transition:`all ${o} ${l}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[_]:{backgroundColor:p,borderColor:u,cursor:"not-allowed","&::after":{backgroundColor:g}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:m,cursor:"not-allowed"},[`&${t}-checked`]:{[_]:{"&::after":{transform:`scale(${w/i})`}}}},[`span${t} + *`]:{paddingInlineStart:v,paddingInlineEnd:v}})}},TW=e=>{const{radioButtonColor:t,controlHeight:n,componentCls:r,lineWidth:i,lineType:o,colorBorder:a,motionDurationSlow:s,motionDurationMid:l,radioButtonPaddingHorizontal:c,fontSize:u,radioButtonBg:d,fontSizeLG:f,controlHeightLG:p,controlHeightSM:m,paddingXS:v,borderRadius:g,borderRadiusSM:x,borderRadiusLG:w,radioCheckedColor:b,radioButtonCheckedBg:y,radioButtonHoverColor:_,radioButtonActiveColor:S,radioSolidCheckedColor:C,colorTextDisabled:$,colorBgContainerDisabled:M,radioDisabledButtonCheckedColor:R,radioDisabledButtonCheckedBg:I}=e;return{[`${r}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:u,lineHeight:`${n-i*2}px`,background:d,border:`${i}px ${o} ${a}`,borderBlockStartWidth:i+.02,borderInlineStartWidth:0,borderInlineEndWidth:i,cursor:"pointer",transition:[`color ${l}`,`background ${l}`,`border-color ${l}`,`box-shadow ${l}`].join(","),a:{color:t},[`> ${r}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-i,insetInlineStart:-i,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:i,paddingInline:0,backgroundColor:a,transition:`background-color ${s}`,content:'""'}},"&:first-child":{borderInlineStart:`${i}px ${o} ${a}`,borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g},"&:first-child:last-child":{borderRadius:g},[`${r}-group-large &`]:{height:p,fontSize:f,lineHeight:`${p-i*2}px`,"&:first-child":{borderStartStartRadius:w,borderEndStartRadius:w},"&:last-child":{borderStartEndRadius:w,borderEndEndRadius:w}},[`${r}-group-small &`]:{height:m,paddingInline:v-i,paddingBlock:0,lineHeight:`${m-i*2}px`,"&:first-child":{borderStartStartRadius:x,borderEndStartRadius:x},"&:last-child":{borderStartEndRadius:x,borderEndEndRadius:x}},"&:hover":{position:"relative",color:b},"&:has(:focus-visible)":O({},Lu(e)),[`${r}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:b,background:y,borderColor:b,"&::before":{backgroundColor:b},"&:first-child":{borderColor:b},"&:hover":{color:_,borderColor:_,"&::before":{backgroundColor:_}},"&:active":{color:S,borderColor:S,"&::before":{backgroundColor:S}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:C,background:b,borderColor:b,"&:hover":{color:C,background:_,borderColor:_},"&:active":{color:C,background:S,borderColor:S}},"&-disabled":{color:$,backgroundColor:M,borderColor:a,cursor:"not-allowed","&:first-child, &:hover":{color:$,backgroundColor:M,borderColor:a}},[`&-disabled${r}-button-wrapper-checked`]:{color:R,backgroundColor:I,borderColor:a,boxShadow:"none"}}}},fT=Pn("Radio",e=>{const{padding:t,lineWidth:n,controlItemBgActiveDisabled:r,colorTextDisabled:i,colorBgContainer:o,fontSizeLG:a,controlOutline:s,colorPrimaryHover:l,colorPrimaryActive:c,colorText:u,colorPrimary:d,marginXS:f,controlOutlineWidth:p,colorTextLightSolid:m,wireframe:v}=e,g=`0 0 0 ${p}px ${s}`,x=g,w=a,b=4,y=w-b*2,_=v?y:w-(b+n)*2,S=d,C=u,$=l,M=c,R=t-n,k=Ot(e,{radioFocusShadow:g,radioButtonFocusShadow:x,radioSize:w,radioDotSize:_,radioDotDisabledSize:y,radioCheckedColor:S,radioDotDisabledColor:i,radioSolidCheckedColor:m,radioButtonBg:o,radioButtonCheckedBg:o,radioButtonColor:C,radioButtonHoverColor:$,radioButtonActiveColor:M,radioButtonPaddingHorizontal:R,radioDisabledButtonCheckedBg:r,radioDisabledButtonCheckedColor:i,radioWrapperMarginRight:f});return[SW(k),CW(k),TW(k)]});var PW=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<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const pT=()=>({prefixCls:String,checked:Oe(),disabled:Oe(),isGroup:Oe(),value:oe.any,name:String,id:String,autofocus:Oe(),onChange:Ue(),onFocus:Ue(),onBlur:Ue(),onClick:Ue(),"onUpdate:checked":Ue(),"onUpdate:value":Ue()}),an=h.defineComponent({compatConfig:{MODE:3},name:"ARadio",inheritAttrs:!1,props:pT(),setup(e,t){let{emit:n,expose:r,slots:i,attrs:o}=t;const a=co(),s=Nr.useInject(),l=wW(),c=xW(),u=vi(),d=h.computed(()=>{var $;return($=v.value)!==null&&$!==void 0?$:u.value}),f=h.ref(),{prefixCls:p,direction:m,disabled:v}=Ke("radio",e),g=h.computed(()=>(c==null?void 0:c.optionType.value)==="button"||l==="button"?`${p.value}-button`:p.value),x=vi(),[w,b]=fT(p);r({focus:()=>{f.value.focus()},blur:()=>{f.value.blur()}});const S=$=>{const M=$.target.checked;n("update:checked",M),n("update:value",M),n("change",$),a.onFieldChange()},C=$=>{n("change",$),c&&c.onChange&&c.onChange($)};return()=>{var $;const M=c,{prefixCls:R,id:I=a.id.value}=e,L=PW(e,["prefixCls","id"]),k=O(O({prefixCls:g.value,id:I},ar(L,["onUpdate:checked","onUpdate:value"])),{disabled:($=v.value)!==null&&$!==void 0?$:x.value});M?(k.name=M.name.value,k.onChange=C,k.checked=e.value===M.value.value,k.disabled=d.value||M.disabled.value):k.onChange=S;const V=xe({[`${g.value}-wrapper`]:!0,[`${g.value}-wrapper-checked`]:k.checked,[`${g.value}-wrapper-disabled`]:k.disabled,[`${g.value}-wrapper-rtl`]:m.value==="rtl",[`${g.value}-wrapper-in-form-item`]:s.isFormItemInput},o.class,b.value);return w(h.createVNode("label",ne(ne({},o),{},{class:V}),[h.createVNode(cT,ne(ne({},k),{},{type:"radio",ref:f}),null),i.default&&h.createVNode("span",null,[i.default()])]))}}}),$W=()=>({prefixCls:String,value:oe.any,size:Sn(),options:Ko(),disabled:Oe(),name:String,buttonStyle:Sn("outline"),id:String,optionType:Sn("default"),onChange:Ue(),"onUpdate:value":Ue()}),hT=h.defineComponent({compatConfig:{MODE:3},name:"ARadioGroup",inheritAttrs:!1,props:$W(),setup(e,t){let{slots:n,emit:r,attrs:i}=t;const o=co(),{prefixCls:a,direction:s,size:l}=Ke("radio",e),[c,u]=fT(a),d=h.ref(e.value),f=h.ref(!1);return h.watch(()=>e.value,m=>{d.value=m,f.value=!1}),bW({onChange:m=>{const v=d.value,{value:g}=m.target;"value"in e||(d.value=g),!f.value&&g!==v&&(f.value=!0,r("update:value",g),r("change",m),o.onFieldChange()),h.nextTick(()=>{f.value=!1})},value:d,disabled:h.computed(()=>e.disabled),name:h.computed(()=>e.name),optionType:h.computed(()=>e.optionType)}),()=>{var m;const{options:v,buttonStyle:g,id:x=o.id.value}=e,w=`${a.value}-group`,b=xe(w,`${w}-${g}`,{[`${w}-${l.value}`]:l.value,[`${w}-rtl`]:s.value==="rtl"},i.class,u.value);let y=null;return v&&v.length>0?y=v.map(_=>{if(typeof _=="string"||typeof _=="number")return h.createVNode(an,{key:_,prefixCls:a.value,disabled:e.disabled,value:_,checked:d.value===_},{default:()=>[_]});const{value:S,disabled:C,label:$}=_;return h.createVNode(an,{key:`radio-group-value-options-${S}`,prefixCls:a.value,disabled:C||e.disabled,value:S,checked:d.value===S},{default:()=>[$]})}):y=(m=n.default)===null||m===void 0?void 0:m.call(n),c(h.createVNode("div",ne(ne({},i),{},{class:b,id:x}),[y]))}}}),RW=h.defineComponent({compatConfig:{MODE:3},name:"ARadioButton",inheritAttrs:!1,props:pT(),setup(e,t){let{slots:n,attrs:r}=t;const{prefixCls:i}=Ke("radio",e);return _W("button"),()=>{var o;return h.createVNode(an,ne(ne(ne({},r),e),{},{prefixCls:i.value}),{default:()=>[(o=n.default)===null||o===void 0?void 0:o.call(n)]})}}});an.Group=hT,an.Button=RW,an.install=function(e){return e.component(an.name,an),e.component(an.Group.name,an.Group),e.component(an.Button.name,an.Button),e};const AW=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),bg=e=>({borderColor:e.inputBorderHoverColor,borderInlineEndWidth:e.lineWidth}),xg=e=>({borderColor:e.inputBorderHoverColor,boxShadow:`0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`,borderInlineEndWidth:e.lineWidth,outline:0}),OW=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":O({},bg(Ot(e,{inputBorderHoverColor:e.colorBorder})))}),mT=e=>{const{inputPaddingVerticalLG:t,fontSizeLG:n,lineHeightLG:r,borderRadiusLG:i,inputPaddingHorizontalLG:o}=e;return{padding:`${t}px ${o}px`,fontSize:n,lineHeight:r,borderRadius:i}},gT=e=>({padding:`${e.inputPaddingVerticalSM}px ${e.controlPaddingHorizontalSM-1}px`,borderRadius:e.borderRadiusSM}),vT=(e,t)=>{const{componentCls:n,colorError:r,colorWarning:i,colorErrorOutline:o,colorWarningOutline:a,colorErrorBorderHover:s,colorWarningBorderHover:l}=e;return{[`&-status-error:not(${t}-disabled):not(${t}-borderless)${t}`]:{borderColor:r,"&:hover":{borderColor:s},"&:focus, &-focused":O({},xg(Ot(e,{inputBorderActiveColor:r,inputBorderHoverColor:r,controlOutline:o}))),[`${n}-prefix`]:{color:r}},[`&-status-warning:not(${t}-disabled):not(${t}-borderless)${t}`]:{borderColor:i,"&:hover":{borderColor:l},"&:focus, &-focused":O({},xg(Ot(e,{inputBorderActiveColor:i,inputBorderHoverColor:i,controlOutline:a}))),[`${n}-prefix`]:{color:i}}}},yT=e=>O(O({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${e.inputPaddingVertical}px ${e.inputPaddingHorizontal}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}`},AW(e.colorTextPlaceholder)),{"&:hover":O({},bg(e)),"&:focus, &-focused":O({},xg(e)),"&-disabled, &[disabled]":O({},OW(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":O({},mT(e)),"&-sm":O({},gT(e)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),MW=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`]:O({},mT(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:O({},gT(e)),[`> ${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.inputPaddingHorizontal}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,textAlign:"center",backgroundColor:e.colorFillAlter,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`-${e.inputPaddingVertical+1}px -${e.inputPaddingHorizontal}px`,[`&${n}-select-single:not(${n}-select-customize-input)`]:{[`${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.inputPaddingHorizontal}px`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${t}`]:{float:"inline-start",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`]:O(O({display:"block"},j6()),{[`${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`]:{display:"inline-flex"},[`& > ${n}-picker-range`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-e.lineWidth,borderInlineEndWidth:e.lineWidth},[`${t}`]:{float:"none"},[`& > ${n}-select > ${n}-select-selector,
|
|
351
|
+
& > ${n}-select-auto-complete ${t},
|
|
352
|
+
& > ${n}-cascader-picker ${t},
|
|
353
|
+
& > ${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,
|
|
354
|
+
& > ${n}-select:first-child > ${n}-select-selector,
|
|
355
|
+
& > ${n}-select-auto-complete:first-child ${t},
|
|
356
|
+
& > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
|
|
357
|
+
& > ${n}-select:last-child > ${n}-select-selector,
|
|
358
|
+
& > ${n}-cascader-picker:last-child ${t},
|
|
359
|
+
& > ${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}}}}),[`&&-sm ${n}-btn`]:{fontSize:e.fontSizeSM,height:e.controlHeightSM,lineHeight:"normal"},[`&&-lg ${n}-btn`]:{fontSize:e.fontSizeLG,height:e.controlHeightLG,lineHeight:"normal"},[`&&-lg ${n}-select-single ${n}-select-selector`]:{height:`${e.controlHeightLG}px`,[`${n}-select-selection-item, ${n}-select-selection-placeholder`]:{lineHeight:`${e.controlHeightLG-2}px`},[`${n}-select-selection-search-input`]:{height:`${e.controlHeightLG}px`}},[`&&-sm ${n}-select-single ${n}-select-selector`]:{height:`${e.controlHeightSM}px`,[`${n}-select-selection-item, ${n}-select-selection-placeholder`]:{lineHeight:`${e.controlHeightSM-2}px`},[`${n}-select-selection-search-input`]:{height:`${e.controlHeightSM}px`}}}},IW=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:r}=e,o=(n-r*2-16)/2;return{[t]:O(O(O(O({},Tn(e)),yT(e)),vT(e,t)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:o,paddingBottom:o}}})}},DW=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`}},"&-textarea-with-clear-btn":{padding:"0 !important",border:"0 !important",[`${t}-clear-icon`]:{position:"absolute",insetBlockStart:e.paddingXS,insetInlineEnd:e.paddingXS,zIndex:1}}}},NW=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:o,colorIconHover:a,iconCls:s}=e;return{[`${t}-affix-wrapper`]:O(O(O(O(O({},yT(e)),{display:"inline-flex",[`&:not(${t}-affix-wrapper-disabled):hover`]:O(O({},bg(e)),{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","&:focus":{boxShadow:"none !important"}},"&::before":{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}}}),DW(e)),{[`${s}${t}-password-icon`]:{color:o,cursor:"pointer",transition:`all ${i}`,"&:hover":{color:a}}}),vT(e,`${t}-affix-wrapper`))}},BW=e=>{const{componentCls:t,colorError:n,colorSuccess:r,borderRadiusLG:i,borderRadiusSM:o}=e;return{[`${t}-group`]:O(O(O({},Tn(e)),MW(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:i}},"&-sm":{[`${t}-group-addon`]:{borderRadius:o}},"&-status-error":{[`${t}-group-addon`]:{color:n,borderColor:n}},"&-status-warning":{[`${t}-group-addon:last-child`]:{color:r,borderColor:r}}}})}},kW=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},[`${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,
|
|
360
|
+
> ${t},
|
|
361
|
+
${t}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}};function LW(e){return Ot(e,{inputAffixPadding:e.paddingXXS,inputPaddingVertical:Math.max(Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2*10)/10-e.lineWidth,3),inputPaddingVerticalLG:Math.ceil((e.controlHeightLG-e.fontSizeLG*e.lineHeightLG)/2*10)/10-e.lineWidth,inputPaddingVerticalSM:Math.max(Math.round((e.controlHeightSM-e.fontSize*e.lineHeight)/2*10)/10-e.lineWidth,0),inputPaddingHorizontal:e.paddingSM-e.lineWidth,inputPaddingHorizontalSM:e.paddingXS-e.lineWidth,inputPaddingHorizontalLG:e.controlPaddingHorizontal-e.lineWidth,inputBorderHoverColor:e.colorPrimaryHover,inputBorderActiveColor:e.colorPrimaryHover})}const jW=e=>{const{componentCls:t,inputPaddingHorizontal:n,paddingLG:r}=e,i=`${t}-textarea`;return{[i]:{position:"relative",[`${i}-suffix`]:{position:"absolute",top:0,insetInlineEnd:n,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto"},"&-status-error,\n &-status-warning,\n &-status-success,\n &-status-validating":{[`&${i}-has-feedback`]:{[`${t}`]:{paddingInlineEnd:r}}},"&-show-count":{[`> ${t}`]:{height:"100%"},"&::after":{color:e.colorTextDescription,whiteSpace:"nowrap",content:"attr(data-count)",pointerEvents:"none",float:"right"}},"&-rtl":{"&::after":{float:"left"}}}}},_g=Pn("Input",e=>{const t=LW(e);return[IW(t),jW(t),NW(t),BW(t),kW(t),FC(t)]}),FW=()=>({prefixCls:String,activeKey:$r([Array,Number,String]),defaultActiveKey:$r([Array,Number,String]),accordion:Oe(),destroyInactivePanel:Oe(),bordered:Oe(),expandIcon:Ue(),openAnimation:oe.object,expandIconPosition:Sn(),collapsible:Sn(),ghost:Oe(),onChange:Ue(),"onUpdate:activeKey":Ue()}),bT=()=>({openAnimation:oe.object,prefixCls:String,header:oe.any,headerClass:String,showArrow:Oe(),isActive:Oe(),destroyInactivePanel:Oe(),disabled:Oe(),accordion:Oe(),forceRender:Oe(),expandIcon:Ue(),extra:oe.any,panelKey:$r(),collapsible:Sn(),role:String,onItemClick:Ue()}),HW=e=>{const{componentCls:t,collapseContentBg:n,padding:r,collapseContentPaddingHorizontal:i,collapseHeaderBg:o,collapseHeaderPadding:a,collapsePanelBorderRadius:s,lineWidth:l,lineType:c,colorBorder:u,colorText:d,colorTextHeading:f,colorTextDisabled:p,fontSize:m,lineHeight:v,marginSM:g,paddingSM:x,motionDurationSlow:w,fontSizeIcon:b}=e,y=`${l}px ${c} ${u}`;return{[t]:O(O({},Tn(e)),{backgroundColor:o,border:y,borderBottom:0,borderRadius:`${s}px`,"&-rtl":{direction:"rtl"},[`& > ${t}-item`]:{borderBottom:y,"&:last-child":{[`
|
|
362
|
+
&,
|
|
363
|
+
& > ${t}-header`]:{borderRadius:`0 0 ${s}px ${s}px`}},[`> ${t}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:a,color:f,lineHeight:v,cursor:"pointer",transition:`all ${w}, visibility 0s`,[`> ${t}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${t}-expand-icon`]:{height:m*v,display:"flex",alignItems:"center",paddingInlineEnd:g},[`${t}-arrow`]:O(O({},L6()),{fontSize:b,svg:{transition:`transform ${w}`}}),[`${t}-header-text`]:{marginInlineEnd:"auto"}},[`${t}-header-collapsible-only`]:{cursor:"default",[`${t}-header-text`]:{flex:"none",cursor:"pointer"},[`${t}-expand-icon`]:{cursor:"pointer"}},[`${t}-icon-collapsible-only`]:{cursor:"default",[`${t}-expand-icon`]:{cursor:"pointer"}},[`&${t}-no-arrow`]:{[`> ${t}-header`]:{paddingInlineStart:x}}},[`${t}-content`]:{color:d,backgroundColor:n,borderTop:y,[`& > ${t}-content-box`]:{padding:`${r}px ${i}px`},"&-hidden":{display:"none"}},[`${t}-item:last-child`]:{[`> ${t}-content`]:{borderRadius:`0 0 ${s}px ${s}px`}},[`& ${t}-item-disabled > ${t}-header`]:{"\n &,\n & > .arrow\n ":{color:p,cursor:"not-allowed"}},[`&${t}-icon-position-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:g}}}}})}},zW=e=>{const{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow svg`;return{[`${t}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},VW=e=>{const{componentCls:t,collapseHeaderBg:n,paddingXXS:r,colorBorder:i}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${i}`},[`
|
|
364
|
+
> ${t}-item:last-child,
|
|
365
|
+
> ${t}-item:last-child ${t}-header
|
|
366
|
+
`]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${t}-item > ${t}-content > ${t}-content-box`]:{paddingTop:r}}}},WW=e=>{const{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-content`]:{backgroundColor:"transparent",border:0,[`> ${t}-content-box`]:{paddingBlock:n}}}}}},GW=Pn("Collapse",e=>{const t=Ot(e,{collapseContentBg:e.colorBgContainer,collapseHeaderBg:e.colorFillAlter,collapseHeaderPadding:`${e.paddingSM}px ${e.padding}px`,collapsePanelBorderRadius:e.borderRadiusLG,collapseContentPaddingHorizontal:16});return[HW(t),VW(t),WW(t),zW(t),jC(t)]});function xT(e){let t=e;if(!Array.isArray(t)){const n=typeof t;t=n==="number"||n==="string"?[t]:[]}return t.map(n=>String(n))}const Ks=h.defineComponent({compatConfig:{MODE:3},name:"ACollapse",inheritAttrs:!1,props:qo(FW(),{accordion:!1,destroyInactivePanel:!1,bordered:!0,expandIconPosition:"start"}),slots:Object,setup(e,t){let{attrs:n,slots:r,emit:i}=t;const o=h.ref(xT(qC([e.activeKey,e.defaultActiveKey])));h.watch(()=>e.activeKey,()=>{o.value=xT(e.activeKey)},{deep:!0});const{prefixCls:a,direction:s,rootPrefixCls:l}=Ke("collapse",e),[c,u]=GW(a),d=h.computed(()=>{const{expandIconPosition:x}=e;return x!==void 0?x:s.value==="rtl"?"end":"start"}),f=x=>{const{expandIcon:w=r.expandIcon}=e,b=w?w(x):h.createVNode(yg,{rotate:x.isActive?90:void 0},null);return h.createVNode("div",{class:[`${a.value}-expand-icon`,u.value],onClick:()=>["header","icon"].includes(e.collapsible)&&m(x.panelKey)},[gu(Array.isArray(w)?b[0]:b)?on(b,{class:`${a.value}-arrow`},!1):b])},p=x=>{e.activeKey===void 0&&(o.value=x);const w=e.accordion?x[0]:x;i("update:activeKey",w),i("change",w)},m=x=>{let w=o.value;if(e.accordion)w=w[0]===x?[]:[x];else{w=[...w];const b=w.indexOf(x);b>-1?w.splice(b,1):w.push(x)}p(w)},v=(x,w)=>{var b,y,_;if(Nh(x))return;const S=o.value,{accordion:C,destroyInactivePanel:$,collapsible:M,openAnimation:R}=e,I=R||lT(`${l.value}-motion-collapse`),L=String((b=x.key)!==null&&b!==void 0?b:w),{header:k=(_=(y=x.children)===null||y===void 0?void 0:y.header)===null||_===void 0?void 0:_.call(y),headerClass:V,collapsible:W,disabled:q}=x.props||{};let H=!1;C?H=S[0]===L:H=S.indexOf(L)>-1;let Z=W??M;(q||q==="")&&(Z="disabled");const U={key:L,panelKey:L,header:k,headerClass:V,isActive:H,prefixCls:a.value,destroyInactivePanel:$,openAnimation:I,accordion:C,onItemClick:Z==="disabled"?null:m,expandIcon:f,collapsible:Z};return on(x,U)},g=()=>{var x;return en((x=r.default)===null||x===void 0?void 0:x.call(r)).map(v)};return()=>{const{accordion:x,bordered:w,ghost:b}=e,y=xe(a.value,{[`${a.value}-borderless`]:!w,[`${a.value}-icon-position-${d.value}`]:!0,[`${a.value}-rtl`]:s.value==="rtl",[`${a.value}-ghost`]:!!b,[n.class]:!!n.class},u.value);return c(h.createVNode("div",ne(ne({class:y},_k(n)),{},{style:n.style,role:x?"tablist":null}),[g()]))}}}),UW=h.defineComponent({compatConfig:{MODE:3},name:"PanelContent",props:bT(),setup(e,t){let{slots:n}=t;const r=h.shallowRef(!1);return h.watchEffect(()=>{(e.isActive||e.forceRender)&&(r.value=!0)}),()=>{var i;if(!r.value)return null;const{prefixCls:o,isActive:a,role:s}=e;return h.createVNode("div",{class:xe(`${o}-content`,{[`${o}-content-active`]:a,[`${o}-content-inactive`]:!a}),role:s},[h.createVNode("div",{class:`${o}-content-box`},[(i=n.default)===null||i===void 0?void 0:i.call(n)])])}}}),bd=h.defineComponent({compatConfig:{MODE:3},name:"ACollapsePanel",inheritAttrs:!1,props:qo(bT(),{showArrow:!0,isActive:!1,onItemClick(){},headerClass:"",forceRender:!1}),slots:Object,setup(e,t){let{slots:n,emit:r,attrs:i}=t;Vu(e.disabled===void 0,"Collapse.Panel",'`disabled` is deprecated. Please use `collapsible="disabled"` instead.');const{prefixCls:o}=Ke("collapse",e),a=()=>{r("itemClick",e.panelKey)},s=l=>{(l.key==="Enter"||l.keyCode===13||l.which===13)&&a()};return()=>{var l,c;const{header:u=(l=n.header)===null||l===void 0?void 0:l.call(n),headerClass:d,isActive:f,showArrow:p,destroyInactivePanel:m,accordion:v,forceRender:g,openAnimation:x,expandIcon:w=n.expandIcon,extra:b=(c=n.extra)===null||c===void 0?void 0:c.call(n),collapsible:y}=e,_=y==="disabled",S=o.value,C=xe(`${S}-header`,{[d]:d,[`${S}-header-collapsible-only`]:y==="header",[`${S}-icon-collapsible-only`]:y==="icon"}),$=xe({[`${S}-item`]:!0,[`${S}-item-active`]:f,[`${S}-item-disabled`]:_,[`${S}-no-arrow`]:!p,[`${i.class}`]:!!i.class});let M=h.createVNode("i",{class:"arrow"},null);p&&typeof w=="function"&&(M=w(e));const R=h.withDirectives(h.createVNode(UW,{prefixCls:S,isActive:f,forceRender:g,role:v?"tabpanel":null},{default:n.default}),[[h.vShow,f]]),I=O({appear:!1,css:!1},x);return h.createVNode("div",ne(ne({},i),{},{class:$}),[h.createVNode("div",{class:C,onClick:()=>!["header","icon"].includes(y)&&a(),role:v?"tab":"button",tabindex:_?-1:0,"aria-expanded":f,onKeypress:s},[p&&M,h.createVNode("span",{onClick:()=>y==="header"&&a(),class:`${S}-header-text`},[u]),b&&h.createVNode("div",{class:`${S}-extra`},[b])]),h.createVNode(h.Transition,I,{default:()=>[!m||f?R:null]})])}}});Ks.Panel=bd,Ks.install=function(e){return e.component(Ks.name,Ks),e.component(bd.name,bd),e};const qW=()=>ir()&&window.document.documentElement;let xd;const KW=()=>{if(!qW())return!1;if(xd!==void 0)return xd;const e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),xd=e.scrollHeight===1,document.body.removeChild(e),xd},YW=()=>{const e=h.shallowRef(!1);return h.onMounted(()=>{e.value=KW()}),e},_T=Symbol("rowContextKey"),XW=e=>{h.provide(_T,e)},ZW=()=>h.inject(_T,{gutter:h.computed(()=>{}),wrap:h.computed(()=>{}),supportFlexGap:h.computed(()=>{})}),QW=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around ":{justifyContent:"space-around"},"&-space-evenly ":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},JW=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},eG=(e,t)=>{const{componentCls:n,gridColumns:r}=e,i={};for(let o=r;o>=0;o--)o===0?(i[`${n}${t}-${o}`]={display:"none"},i[`${n}-push-${o}`]={insetInlineStart:"auto"},i[`${n}-pull-${o}`]={insetInlineEnd:"auto"},i[`${n}${t}-push-${o}`]={insetInlineStart:"auto"},i[`${n}${t}-pull-${o}`]={insetInlineEnd:"auto"},i[`${n}${t}-offset-${o}`]={marginInlineEnd:0},i[`${n}${t}-order-${o}`]={order:0}):(i[`${n}${t}-${o}`]={display:"block",flex:`0 0 ${o/r*100}%`,maxWidth:`${o/r*100}%`},i[`${n}${t}-push-${o}`]={insetInlineStart:`${o/r*100}%`},i[`${n}${t}-pull-${o}`]={insetInlineEnd:`${o/r*100}%`},i[`${n}${t}-offset-${o}`]={marginInlineStart:`${o/r*100}%`},i[`${n}${t}-order-${o}`]={order:o});return i},wg=(e,t)=>eG(e,t),tG=(e,t,n)=>({[`@media (min-width: ${t}px)`]:O({},wg(e,n))}),nG=Pn("Grid",e=>[QW(e)]),rG=Pn("Grid",e=>{const t=Ot(e,{gridColumns:24}),n={"-sm":t.screenSMMin,"-md":t.screenMDMin,"-lg":t.screenLGMin,"-xl":t.screenXLMin,"-xxl":t.screenXXLMin};return[JW(t),wg(t,""),wg(t,"-xs"),Object.keys(n).map(r=>tG(t,n[r],r)).reduce((r,i)=>O(O({},r),i),{})]}),iG=()=>({align:$r([String,Object]),justify:$r([String,Object]),prefixCls:String,gutter:$r([Number,Array,Object],0),wrap:{type:Boolean,default:void 0}}),oG=h.defineComponent({compatConfig:{MODE:3},name:"ARow",inheritAttrs:!1,props:iG(),setup(e,t){let{slots:n,attrs:r}=t;const{prefixCls:i,direction:o}=Ke("row",e),[a,s]=nG(i);let l;const c=x7(),u=h.ref({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),d=h.ref({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),f=b=>h.computed(()=>{if(typeof e[b]=="string")return e[b];if(typeof e[b]!="object")return"";for(let y=0;y<hd.length;y++){const _=hd[y];if(!d.value[_])continue;const S=e[b][_];if(S!==void 0)return S}return""}),p=f("align"),m=f("justify"),v=YW();h.onMounted(()=>{l=c.value.subscribe(b=>{d.value=b;const y=e.gutter||0;(!Array.isArray(y)&&typeof y=="object"||Array.isArray(y)&&(typeof y[0]=="object"||typeof y[1]=="object"))&&(u.value=b)})}),h.onBeforeUnmount(()=>{c.value.unsubscribe(l)});const g=h.computed(()=>{const b=[void 0,void 0],{gutter:y=0}=e;return(Array.isArray(y)?y:[y,void 0]).forEach((S,C)=>{if(typeof S=="object")for(let $=0;$<hd.length;$++){const M=hd[$];if(u.value[M]&&S[M]!==void 0){b[C]=S[M];break}}else b[C]=S}),b});XW({gutter:g,supportFlexGap:v,wrap:h.computed(()=>e.wrap)});const x=h.computed(()=>xe(i.value,{[`${i.value}-no-wrap`]:e.wrap===!1,[`${i.value}-${m.value}`]:m.value,[`${i.value}-${p.value}`]:p.value,[`${i.value}-rtl`]:o.value==="rtl"},r.class,s.value)),w=h.computed(()=>{const b=g.value,y={},_=b[0]!=null&&b[0]>0?`${b[0]/-2}px`:void 0,S=b[1]!=null&&b[1]>0?`${b[1]/-2}px`:void 0;return _&&(y.marginLeft=_,y.marginRight=_),v.value?y.rowGap=`${b[1]}px`:S&&(y.marginTop=S,y.marginBottom=S),y});return()=>{var b;return a(h.createVNode("div",ne(ne({},r),{},{class:x.value,style:O(O({},w.value),r.style)}),[(b=n.default)===null||b===void 0?void 0:b.call(n)]))}}});function uo(){return uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uo.apply(this,arguments)}function aG(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ys(e,t)}function Eg(e){return Eg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Eg(e)}function Ys(e,t){return Ys=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Ys(e,t)}function sG(){if(typeof Reflect>"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 _d(e,t,n){return sG()?_d=Reflect.construct.bind():_d=function(i,o,a){var s=[null];s.push.apply(s,o);var l=Function.bind.apply(i,s),c=new l;return a&&Ys(c,a.prototype),c},_d.apply(null,arguments)}function lG(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Sg(e){var t=typeof Map=="function"?new Map:void 0;return Sg=function(r){if(r===null||!lG(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 _d(r,arguments,Eg(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Ys(i,r)},Sg(e)}var cG=/%[sdj%]/g,wT=function(){};typeof process<"u"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof document<"u"&&(wT=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 Cg(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 sn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,o=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var a=e.replace(cG,function(s){if(s==="%%")return"%";if(i>=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 uG(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function mt(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||uG(t)&&typeof e=="string"&&!e)}function dG(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 ET(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<i?t(e[s],o):n([])}o([])}function fG(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n]||[])}),t}var ST=function(e){aG(t,e);function t(n,r){var i;return i=e.call(this,"Async Validation Error")||this,i.errors=n,i.fields=r,i}return t}(Sg(Error));function pG(e,t,n,r,i){if(t.first){var o=new Promise(function(f,p){var m=function(x){return r(x),x.length?p(new ST(x,Cg(x))):f(i)},v=fG(e);ET(v,n,m)});return o.catch(function(f){return f}),o}var a=t.firstFields===!0?Object.keys(e):t.firstFields||[],s=Object.keys(e),l=s.length,c=0,u=[],d=new Promise(function(f,p){var m=function(g){if(u.push.apply(u,g),c++,c===l)return r(u),u.length?p(new ST(u,Cg(u))):f(i)};s.length||(r(u),f(i)),s.forEach(function(v){var g=e[v];a.indexOf(v)!==-1?ET(g,n,m):dG(g,n,m)})});return d.catch(function(f){return f}),d}function hG(e){return!!(e&&e.message!==void 0)}function mG(e,t){for(var n=e,r=0;r<t.length;r++){if(n==null)return n;n=n[t[r]]}return n}function CT(e,t){return function(n){var r;return e.fullFields?r=mG(t,e.fullFields):r=t[n.field||e.fullField],hG(n)?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||e.fullField}}}function TT(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];typeof r=="object"&&typeof e[n]=="object"?e[n]=uo({},e[n],r):e[n]=r}}return e}var PT=function(t,n,r,i,o,a){t.required&&(!r.hasOwnProperty(t.field)||mt(n,a||t.type))&&i.push(sn(o.messages.required,t.fullField))},gG=function(t,n,r,i,o){(/^\s+$/.test(n)||n==="")&&i.push(sn(o.messages.whitespace,t.fullField))},wd,vG=function(){if(wd)return wd;var e="[a-fA-F\\d:]",t=function(y){return y&&y.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",i=(`
|
|
367
|
+
(?:
|
|
368
|
+
(?:`+r+":){7}(?:"+r+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
369
|
+
(?:`+r+":){6}(?:"+n+"|:"+r+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
|
|
370
|
+
(?:`+r+":){5}(?::"+n+"|(?::"+r+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
|
|
371
|
+
(?:`+r+":){4}(?:(?::"+r+"){0,1}:"+n+"|(?::"+r+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
|
|
372
|
+
(?:`+r+":){3}(?:(?::"+r+"){0,2}:"+n+"|(?::"+r+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
|
|
373
|
+
(?:`+r+":){2}(?:(?::"+r+"){0,3}:"+n+"|(?::"+r+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
|
|
374
|
+
(?:`+r+":){1}(?:(?::"+r+"){0,4}:"+n+"|(?::"+r+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
375
|
+
(?::(?:(?::`+r+"){0,5}:"+n+"|(?::"+r+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
|
376
|
+
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
377
|
+
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),o=new RegExp("(?:^"+n+"$)|(?:^"+i+"$)"),a=new RegExp("^"+n+"$"),s=new RegExp("^"+i+"$"),l=function(y){return y&&y.exact?o:new RegExp("(?:"+t(y)+n+t(y)+")|(?:"+t(y)+i+t(y)+")","g")};l.v4=function(b){return b&&b.exact?a:new RegExp(""+t(b)+n+t(b),"g")},l.v6=function(b){return b&&b.exact?s:new RegExp(""+t(b)+i+t(b),"g")};var c="(?:(?:[a-z]+:)?//)",u="(?:\\S+(?::\\S*)?@)?",d=l.v4().source,f=l.v6().source,p="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",m="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",v="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",g="(?::\\d{2,5})?",x='(?:[/?#][^\\s"]*)?',w="(?:"+c+"|www\\.)"+u+"(?:localhost|"+d+"|"+f+"|"+p+m+v+")"+g+x;return wd=new RegExp("(?:^"+w+"$)","i"),wd},$T={email:/^(([^<>()\[\]\\.,;:\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},Xs={integer:function(t){return Xs.number(t)&&parseInt(t,10)===t},float:function(t){return Xs.number(t)&&!Xs.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"&&!Xs.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match($T.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(vG())},hex:function(t){return typeof t=="string"&&!!t.match($T.hex)}},yG=function(t,n,r,i,o){if(t.required&&n===void 0){PT(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?Xs[s](n)||i.push(sn(o.messages.types[s],t.fullField,t.type)):s&&typeof n!==t.type&&i.push(sn(o.messages.types[s],t.fullField,t.type))},bG=function(t,n,r,i,o){var a=typeof t.len=="number",s=typeof t.min=="number",l=typeof t.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,f=typeof n=="number",p=typeof n=="string",m=Array.isArray(n);if(f?d="number":p?d="string":m&&(d="array"),!d)return!1;m&&(u=n.length),p&&(u=n.replace(c,"_").length),a?u!==t.len&&i.push(sn(o.messages[d].len,t.fullField,t.len)):s&&!l&&u<t.min?i.push(sn(o.messages[d].min,t.fullField,t.min)):l&&!s&&u>t.max?i.push(sn(o.messages[d].max,t.fullField,t.max)):s&&l&&(u<t.min||u>t.max)&&i.push(sn(o.messages[d].range,t.fullField,t.min,t.max))},sa="enum",xG=function(t,n,r,i,o){t[sa]=Array.isArray(t[sa])?t[sa]:[],t[sa].indexOf(n)===-1&&i.push(sn(o.messages[sa],t.fullField,t[sa].join(", ")))},_G=function(t,n,r,i,o){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||i.push(sn(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(sn(o.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},Ae={required:PT,whitespace:gG,type:yG,range:bG,enum:xG,pattern:_G},wG=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(mt(n,"string")&&!t.required)return r();Ae.required(t,n,i,a,o,"string"),mt(n,"string")||(Ae.type(t,n,i,a,o),Ae.range(t,n,i,a,o),Ae.pattern(t,n,i,a,o),t.whitespace===!0&&Ae.whitespace(t,n,i,a,o))}r(a)},EG=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(mt(n)&&!t.required)return r();Ae.required(t,n,i,a,o),n!==void 0&&Ae.type(t,n,i,a,o)}r(a)},SG=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(n===""&&(n=void 0),mt(n)&&!t.required)return r();Ae.required(t,n,i,a,o),n!==void 0&&(Ae.type(t,n,i,a,o),Ae.range(t,n,i,a,o))}r(a)},CG=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(mt(n)&&!t.required)return r();Ae.required(t,n,i,a,o),n!==void 0&&Ae.type(t,n,i,a,o)}r(a)},TG=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(mt(n)&&!t.required)return r();Ae.required(t,n,i,a,o),mt(n)||Ae.type(t,n,i,a,o)}r(a)},PG=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(mt(n)&&!t.required)return r();Ae.required(t,n,i,a,o),n!==void 0&&(Ae.type(t,n,i,a,o),Ae.range(t,n,i,a,o))}r(a)},$G=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(mt(n)&&!t.required)return r();Ae.required(t,n,i,a,o),n!==void 0&&(Ae.type(t,n,i,a,o),Ae.range(t,n,i,a,o))}r(a)},RG=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();Ae.required(t,n,i,a,o,"array"),n!=null&&(Ae.type(t,n,i,a,o),Ae.range(t,n,i,a,o))}r(a)},AG=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(mt(n)&&!t.required)return r();Ae.required(t,n,i,a,o),n!==void 0&&Ae.type(t,n,i,a,o)}r(a)},OG="enum",MG=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(mt(n)&&!t.required)return r();Ae.required(t,n,i,a,o),n!==void 0&&Ae[OG](t,n,i,a,o)}r(a)},IG=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(mt(n,"string")&&!t.required)return r();Ae.required(t,n,i,a,o),mt(n,"string")||Ae.pattern(t,n,i,a,o)}r(a)},DG=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(mt(n,"date")&&!t.required)return r();if(Ae.required(t,n,i,a,o),!mt(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),Ae.type(t,l,i,a,o),l&&Ae.range(t,l.getTime(),i,a,o)}}r(a)},NG=function(t,n,r,i,o){var a=[],s=Array.isArray(n)?"array":typeof n;Ae.required(t,n,i,a,o,s),r(a)},Tg=function(t,n,r,i,o){var a=t.type,s=[],l=t.required||!t.required&&i.hasOwnProperty(t.field);if(l){if(mt(n,a)&&!t.required)return r();Ae.required(t,n,i,s,o,a),mt(n,a)||Ae.type(t,n,i,s,o)}r(s)},BG=function(t,n,r,i,o){var a=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(mt(n)&&!t.required)return r();Ae.required(t,n,i,a,o)}r(a)},Zs={string:wG,method:EG,number:SG,boolean:CG,regexp:TG,integer:PG,float:$G,array:RG,object:AG,enum:MG,pattern:IG,date:DG,url:Tg,hex:Tg,email:Tg,required:NG,any:BG};function Pg(){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 $g=Pg(),Qs=function(){function e(n){this.rules=null,this._messages=$g,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=TT(Pg(),r)),this._messages},t.validate=function(r,i,o){var a=this;i===void 0&&(i={}),o===void 0&&(o=function(){});var s=r,l=i,c=o;if(typeof l=="function"&&(c=l,l={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,s),Promise.resolve(s);function u(v){var g=[],x={};function w(y){if(Array.isArray(y)){var _;g=(_=g).concat.apply(_,y)}else g.push(y)}for(var b=0;b<v.length;b++)w(v[b]);g.length?(x=Cg(g),c(g,x)):c(null,s)}if(l.messages){var d=this.messages();d===$g&&(d=Pg()),TT(d,l.messages),l.messages=d}else l.messages=this.messages();var f={},p=l.keys||Object.keys(this.rules);p.forEach(function(v){var g=a.rules[v],x=s[v];g.forEach(function(w){var b=w;typeof b.transform=="function"&&(s===r&&(s=uo({},s)),x=s[v]=b.transform(x)),typeof b=="function"?b={validator:b}:b=uo({},b),b.validator=a.getValidationMethod(b),b.validator&&(b.field=v,b.fullField=b.fullField||v,b.type=a.getType(b),f[v]=f[v]||[],f[v].push({rule:b,value:x,source:s,field:v}))})});var m={};return pG(f,l,function(v,g){var x=v.rule,w=(x.type==="object"||x.type==="array")&&(typeof x.fields=="object"||typeof x.defaultField=="object");w=w&&(x.required||!x.required&&v.value),x.field=v.field;function b(S,C){return uo({},C,{fullField:x.fullField+"."+S,fullFields:x.fullFields?[].concat(x.fullFields,[S]):[S]})}function y(S){S===void 0&&(S=[]);var C=Array.isArray(S)?S:[S];!l.suppressWarning&&C.length&&e.warning("async-validator:",C),C.length&&x.message!==void 0&&(C=[].concat(x.message));var $=C.map(CT(x,s));if(l.first&&$.length)return m[x.field]=1,g($);if(!w)g($);else{if(x.required&&!v.value)return x.message!==void 0?$=[].concat(x.message).map(CT(x,s)):l.error&&($=[l.error(x,sn(l.messages.required,x.field))]),g($);var M={};x.defaultField&&Object.keys(v.value).map(function(L){M[L]=x.defaultField}),M=uo({},M,v.rule.fields);var R={};Object.keys(M).forEach(function(L){var k=M[L],V=Array.isArray(k)?k:[k];R[L]=V.map(b.bind(null,L))});var I=new e(R);I.messages(l.messages),v.rule.options&&(v.rule.options.messages=l.messages,v.rule.options.error=l.error),I.validate(v.value,v.rule.options||l,function(L){var k=[];$&&$.length&&k.push.apply(k,$),L&&L.length&&k.push.apply(k,L),g(k.length?k:null)})}}var _;if(x.asyncValidator)_=x.asyncValidator(x,v.value,y,v.source,l);else if(x.validator){try{_=x.validator(x,v.value,y,v.source,l)}catch(S){console.error==null||console.error(S),l.suppressValidatorError||setTimeout(function(){throw S},0),y(S.message)}_===!0?y():_===!1?y(typeof x.message=="function"?x.message(x.fullField||x.field):x.message||(x.fullField||x.field)+" fails"):_ instanceof Array?y(_):_ instanceof Error&&y(_.message)}_&&_.then&&_.then(function(){return y()},function(S){return y(S)})},function(v){u(v)},s)},t.getType=function(r){if(r.type===void 0&&r.pattern instanceof RegExp&&(r.type="pattern"),typeof r.validator!="function"&&r.type&&!Zs.hasOwnProperty(r.type))throw new Error(sn("Unknown rule type %s",r.type));return r.type||"string"},t.getValidationMethod=function(r){if(typeof r.validator=="function")return r.validator;var i=Object.keys(r),o=i.indexOf("message");return o!==-1&&i.splice(o,1),i.length===1&&i[0]==="required"?Zs.required:Zs[this.getType(r)]||void 0},e}();Qs.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Zs[t]=n},Qs.warning=wT,Qs.messages=$g,Qs.validators=Zs;function _i(e){return e==null?[]:Array.isArray(e)?e:[e]}function RT(e,t){let n=e;for(let r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function AT(e,t,n,r){if(!t.length)return n;const[i,...o]=t;let a;return!e&&typeof i=="number"?a=[]:Array.isArray(e)?a=[...e]:a=O({},e),r&&n===void 0&&o.length===1?delete a[i][o[0]]:a[i]=AT(a[i],o,n,r),a}function kG(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&r&&n===void 0&&!RT(e,t.slice(0,-1))?e:AT(e,t,n,r)}function Rg(e){return _i(e)}function LG(e,t){return RT(e,t)}function jG(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return kG(e,t,n,r)}function FG(e,t){return e&&e.some(n=>zG(n,t))}function OT(e){return typeof e=="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function MT(e,t){const n=Array.isArray(e)?[...e]:O({},e);return t&&Object.keys(t).forEach(r=>{const i=n[r],o=t[r],a=OT(i)&&OT(o);n[r]=a?MT(i,o||{}):o}),n}function HG(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((i,o)=>MT(i,o),e)}function IT(e,t){let n={};return t.forEach(r=>{const i=LG(e,r);n=jG(n,r,i)}),n}function zG(e,t){return!e||!t||e.length!==t.length?!1:e.every((n,r)=>t[r]===n)}const ln="'${name}' is not a valid ${type}",Ed={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:ln,method:ln,array:ln,object:ln,number:ln,date:ln,boolean:ln,integer:ln,float:ln,regexp:ln,email:ln,url:ln,hex:ln},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}};var Sd=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};const VG=Qs;function WG(e,t){return e.replace(/\$\{\w+\}/g,n=>{const r=n.slice(2,-1);return t[r]})}function Ag(e,t,n,r,i){return Sd(this,void 0,void 0,function*(){const o=O({},n);delete o.ruleIndex,delete o.trigger;let a=null;o&&o.type==="array"&&o.defaultField&&(a=o.defaultField,delete o.defaultField);const s=new VG({[e]:[o]}),l=HG({},Ed,r.validateMessages);s.messages(l);let c=[];try{yield Promise.resolve(s.validate({[e]:t},O({},r)))}catch(f){f.errors?c=f.errors.map((p,m)=>{let{message:v}=p;return gu(v)?h.cloneVNode(v,{key:`error_${m}`}):v}):(console.error(f),c=[l.default()])}if(!c.length&&a)return(yield Promise.all(t.map((p,m)=>Ag(`${e}.${m}`,p,a,r,i)))).reduce((p,m)=>[...p,...m],[]);const u=O(O(O({},n),{name:e,enum:(n.enum||[]).join(", ")}),i);return c.map(f=>typeof f=="string"?WG(f,u):f)})}function DT(e,t,n,r,i,o){const a=e.join("."),s=n.map((c,u)=>{const d=c.validator,f=O(O({},c),{ruleIndex:u});return d&&(f.validator=(p,m,v)=>{let g=!1;const w=d(p,m,function(){for(var b=arguments.length,y=new Array(b),_=0;_<b;_++)y[_]=arguments[_];Promise.resolve().then(()=>{Eu(!g,"Your validator function has already return a promise. `callback` will be ignored."),g||v(...y)})});g=w&&typeof w.then=="function"&&typeof w.catch=="function",Eu(g,"`callback` is deprecated. Please return a promise instead."),g&&w.then(()=>{v()}).catch(b=>{v(b||" ")})}),f}).sort((c,u)=>{let{warningOnly:d,ruleIndex:f}=c,{warningOnly:p,ruleIndex:m}=u;return!!d==!!p?f-m:d?1:-1});let l;if(i===!0)l=new Promise((c,u)=>Sd(this,void 0,void 0,function*(){for(let d=0;d<s.length;d+=1){const f=s[d],p=yield Ag(a,t,f,r,o);if(p.length){u([{errors:p,rule:f}]);return}}c([])}));else{const c=s.map(u=>Ag(a,t,u,r,o).then(d=>({errors:d,rule:u})));l=(i?UG(c):GG(c)).then(u=>Promise.reject(u))}return l.catch(c=>c),l}function GG(e){return Sd(this,void 0,void 0,function*(){return Promise.all(e).then(t=>[].concat(...t))})}function UG(e){return Sd(this,void 0,void 0,function*(){let t=0;return new Promise(n=>{e.forEach(r=>{r.then(i=>{i.errors.length&&n([i]),t+=1,t===e.length&&n([])})})})})}const NT=Symbol("formContextKey"),BT=e=>{h.provide(NT,e)},Og=()=>h.inject(NT,{name:h.computed(()=>{}),labelAlign:h.computed(()=>"right"),vertical:h.computed(()=>!1),addField:(e,t)=>{},removeField:e=>{},model:h.computed(()=>{}),rules:h.computed(()=>{}),colon:h.computed(()=>{}),labelWrap:h.computed(()=>{}),labelCol:h.computed(()=>{}),requiredMark:h.computed(()=>!1),validateTrigger:h.computed(()=>{}),onValidate:()=>{},validateMessages:h.computed(()=>Ed)}),kT=Symbol("formItemPrefixContextKey"),qG=e=>{h.provide(kT,e)},KG=()=>h.inject(kT,{prefixCls:h.computed(()=>"")});function YG(e){return typeof e=="number"?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}const XG=()=>({span:[String,Number],order:[String,Number],offset:[String,Number],push:[String,Number],pull:[String,Number],xs:{type:[String,Number,Object],default:void 0},sm:{type:[String,Number,Object],default:void 0},md:{type:[String,Number,Object],default:void 0},lg:{type:[String,Number,Object],default:void 0},xl:{type:[String,Number,Object],default:void 0},xxl:{type:[String,Number,Object],default:void 0},prefixCls:String,flex:[String,Number]}),ZG=["xs","sm","md","lg","xl","xxl"],LT=h.defineComponent({compatConfig:{MODE:3},name:"ACol",inheritAttrs:!1,props:XG(),setup(e,t){let{slots:n,attrs:r}=t;const{gutter:i,supportFlexGap:o,wrap:a}=ZW(),{prefixCls:s,direction:l}=Ke("col",e),[c,u]=rG(s),d=h.computed(()=>{const{span:p,order:m,offset:v,push:g,pull:x}=e,w=s.value;let b={};return ZG.forEach(y=>{let _={};const S=e[y];typeof S=="number"?_.span=S:typeof S=="object"&&(_=S||{}),b=O(O({},b),{[`${w}-${y}-${_.span}`]:_.span!==void 0,[`${w}-${y}-order-${_.order}`]:_.order||_.order===0,[`${w}-${y}-offset-${_.offset}`]:_.offset||_.offset===0,[`${w}-${y}-push-${_.push}`]:_.push||_.push===0,[`${w}-${y}-pull-${_.pull}`]:_.pull||_.pull===0,[`${w}-rtl`]:l.value==="rtl"})}),xe(w,{[`${w}-${p}`]:p!==void 0,[`${w}-order-${m}`]:m,[`${w}-offset-${v}`]:v,[`${w}-push-${g}`]:g,[`${w}-pull-${x}`]:x},b,r.class,u.value)}),f=h.computed(()=>{const{flex:p}=e,m=i.value,v={};if(m&&m[0]>0){const g=`${m[0]/2}px`;v.paddingLeft=g,v.paddingRight=g}if(m&&m[1]>0&&!o.value){const g=`${m[1]/2}px`;v.paddingTop=g,v.paddingBottom=g}return p&&(v.flex=YG(p),a.value===!1&&!v.minWidth&&(v.minWidth=0)),v});return()=>{var p;return c(h.createVNode("div",ne(ne({},r),{},{class:d.value,style:[f.value,r.style]}),[(p=n.default)===null||p===void 0?void 0:p.call(n)]))}}});var QG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};function jT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){JG(e,i,n[i])})}return e}function JG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Mg=function(t,n){var r=jT({},t,n.attrs);return h.createVNode(Ut,jT({},r,{icon:QG}),null)};Mg.displayName="QuestionCircleOutlined",Mg.inheritAttrs=!1;const Ig=(e,t)=>{let{slots:n,emit:r,attrs:i}=t;var o,a,s,l,c;const{prefixCls:u,htmlFor:d,labelCol:f,labelAlign:p,colon:m,required:v,requiredMark:g}=O(O({},e),i),[x]=oL("Form"),w=(o=e.label)!==null&&o!==void 0?o:(a=n.label)===null||a===void 0?void 0:a.call(n);if(!w)return null;const{vertical:b,labelAlign:y,labelCol:_,labelWrap:S,colon:C}=Og(),$=f||(_==null?void 0:_.value)||{},M=p||(y==null?void 0:y.value),R=`${u}-item-label`,I=xe(R,M==="left"&&`${R}-left`,$.class,{[`${R}-wrap`]:!!S.value});let L=w;const k=m===!0||(C==null?void 0:C.value)!==!1&&m!==!1;if(k&&!b.value&&typeof w=="string"&&w.trim()!==""&&(L=w.replace(/[:|:]\s*$/,"")),e.tooltip||n.tooltip){const q=h.createVNode("span",{class:`${u}-item-tooltip`},[h.createVNode(j7,{title:e.tooltip},{default:()=>[h.createVNode(Mg,null,null)]})]);L=h.createVNode(h.Fragment,null,[L,n.tooltip?(s=n.tooltip)===null||s===void 0?void 0:s.call(n,{class:`${u}-item-tooltip`}):q])}g==="optional"&&!v&&(L=h.createVNode(h.Fragment,null,[L,h.createVNode("span",{class:`${u}-item-optional`},[((l=x.value)===null||l===void 0?void 0:l.optional)||((c=yu.Form)===null||c===void 0?void 0:c.optional)])]));const W=xe({[`${u}-item-required`]:v,[`${u}-item-required-mark-optional`]:g==="optional",[`${u}-item-no-colon`]:!k});return h.createVNode(LT,ne(ne({},$),{},{class:I}),{default:()=>[h.createVNode("label",{for:d,class:W,title:typeof w=="string"?w:"",onClick:q=>r("click",q)},[L])]})};Ig.displayName="FormItemLabel",Ig.inheritAttrs=!1;const eU=e=>{const{componentCls:t}=e,n=`${t}-show-help`,r=`${t}-show-help-item`;return{[n]:{transition:`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[r]:{overflow:"hidden",transition:`height ${e.motionDurationSlow} ${e.motionEaseInOut},
|
|
378
|
+
opacity ${e.motionDurationSlow} ${e.motionEaseInOut},
|
|
379
|
+
transform ${e.motionDurationSlow} ${e.motionEaseInOut} !important`,[`&${r}-appear, &${r}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${r}-leave-active`]:{transform:"translateY(-5px)"}}}}},tU=e=>({legend:{display:"block",width:"100%",marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`},label:{fontSize:e.fontSize},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${e.controlOutlineWidth}px ${e.controlOutline}`},output:{display:"block",paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),FT=(e,t)=>{const{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},nU=e=>{const{componentCls:t}=e;return{[e.componentCls]:O(O(O({},Tn(e)),tU(e)),{[`${t}-text`]:{display:"inline-block",paddingInlineEnd:e.paddingSM},"&-small":O({},FT(e,e.controlHeightSM)),"&-large":O({},FT(e,e.controlHeightLG))})}},rU=e=>{const{formItemCls:t,iconCls:n,componentCls:r,rootPrefixCls:i}=e;return{[t]:O(O({},Tn(e)),{marginBottom:e.marginLG,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
380
|
+
&-hidden.${i}-row`]:{display:"none"},"&-has-warning":{[`${t}-split`]:{color:e.colorError}},"&-has-error":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{display:"inline-block",flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${e.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:e.controlHeight,color:e.colorTextHeading,fontSize:e.fontSize,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:"top"},[`&${t}-required:not(${t}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:e.marginXXS,color:e.colorError,fontSize:e.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${r}-hide-required-mark &`]:{display:"none"}},[`${t}-optional`]:{display:"inline-block",marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`${r}-hide-required-mark &`]:{display:"none"}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:e.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:e.marginXXS/2,marginInlineEnd:e.marginXS},[`&${t}-no-colon::after`]:{content:'" "'}}},[`${t}-control`]:{display:"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${i}-col-'"]):not([class*="' ${i}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:e.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[t]:{"&-explain, &-extra":{clear:"both",color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:e.controlHeightSM,transition:`color ${e.motionDurationMid} ${e.motionEaseOut}`},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},[`&-with-help ${t}-explain`]:{height:"auto",opacity:1},[`${t}-feedback-icon`]:{fontSize:e.fontSize,textAlign:"center",visibility:"visible",animationName:cg,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:"none","&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}})}},iU=e=>{const{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${t}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:"1 1 0",minWidth:0},[`${n}-label.${r}-col-24 + ${n}-control`]:{minWidth:"unset"}}}},oU=e=>{const{componentCls:t,formItemCls:n}=e;return{[`${t}-inline`]:{display:"flex",flexWrap:"wrap",[n]:{flex:"none",flexWrap:"nowrap",marginInlineEnd:e.margin,marginBottom:0,"&-with-help":{marginBottom:e.marginLG},[`> ${n}-label,
|
|
381
|
+
> ${n}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${n}-label`]:{flex:"none"},[`${t}-text`]:{display:"inline-block"},[`${n}-has-feedback`]:{display:"inline-block"}}}}},la=e=>({margin:0,padding:`0 0 ${e.paddingXS}px`,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{display:"none"}}}),aU=e=>{const{componentCls:t,formItemCls:n}=e;return{[`${n} ${n}-label`]:la(e),[t]:{[n]:{flexWrap:"wrap",[`${n}-label,
|
|
382
|
+
${n}-control`]:{flex:"0 0 100%",maxWidth:"100%"}}}}},sU=e=>{const{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${t}-vertical`]:{[n]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${t}-item-control`]:{width:"100%"}}},[`${t}-vertical ${n}-label,
|
|
383
|
+
.${r}-col-24${n}-label,
|
|
384
|
+
.${r}-col-xl-24${n}-label`]:la(e),[`@media (max-width: ${e.screenXSMax}px)`]:[aU(e),{[t]:{[`.${r}-col-xs-24${n}-label`]:la(e)}}],[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{[`.${r}-col-sm-24${n}-label`]:la(e)}},[`@media (max-width: ${e.screenMDMax}px)`]:{[t]:{[`.${r}-col-md-24${n}-label`]:la(e)}},[`@media (max-width: ${e.screenLGMax}px)`]:{[t]:{[`.${r}-col-lg-24${n}-label`]:la(e)}}}},Dg=Pn("Form",(e,t)=>{let{rootPrefixCls:n}=t;const r=Ot(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:n});return[nU(r),rU(r),eU(r),iU(r),oU(r),sU(r),jC(r),cg]}),lU=h.defineComponent({compatConfig:{MODE:3},name:"ErrorList",inheritAttrs:!1,props:["errors","help","onErrorVisibleChanged","helpStatus","warnings"],setup(e,t){let{attrs:n}=t;const{prefixCls:r,status:i}=KG(),o=h.computed(()=>`${r.value}-item-explain`),a=h.computed(()=>!!(e.errors&&e.errors.length)),s=h.ref(i.value),[,l]=Dg(r);return h.watch([a,i],()=>{a.value&&(s.value=i.value)}),()=>{var c,u;const d=lT(`${r.value}-show-help-item`),f=kF(`${r.value}-show-help-item`,d);return f.role="alert",f.class=[l.value,o.value,n.class,`${r.value}-show-help`],h.createVNode(h.Transition,ne(ne({},MS(`${r.value}-show-help`)),{},{onAfterEnter:()=>e.onErrorVisibleChanged(!0),onAfterLeave:()=>e.onErrorVisibleChanged(!1)}),{default:()=>[h.withDirectives(h.createVNode(h.TransitionGroup,ne(ne({},f),{},{tag:"div"}),{default:()=>[(u=e.errors)===null||u===void 0?void 0:u.map((p,m)=>h.createVNode("div",{key:m,class:s.value?`${o.value}-${s.value}`:""},[p]))]}),[[h.vShow,!!(!((c=e.errors)===null||c===void 0)&&c.length)]])]})}}}),cU=h.defineComponent({compatConfig:{MODE:3},slots:Object,inheritAttrs:!1,props:["prefixCls","errors","hasFeedback","onDomErrorVisibleChange","wrapperCol","help","extra","status","marginBottom","onErrorVisibleChanged"],setup(e,t){let{slots:n}=t;const r=Og(),{wrapperCol:i}=r,o=O({},r);return delete o.labelCol,delete o.wrapperCol,BT(o),qG({prefixCls:h.computed(()=>e.prefixCls),status:h.computed(()=>e.status)}),()=>{var a,s,l;const{prefixCls:c,wrapperCol:u,marginBottom:d,onErrorVisibleChanged:f,help:p=(a=n.help)===null||a===void 0?void 0:a.call(n),errors:m=Pr((s=n.errors)===null||s===void 0?void 0:s.call(n)),extra:v=(l=n.extra)===null||l===void 0?void 0:l.call(n)}=e,g=`${c}-item`,x=u||(i==null?void 0:i.value)||{},w=xe(`${g}-control`,x.class);return h.createVNode(LT,ne(ne({},x),{},{class:w}),{default:()=>{var b;return h.createVNode(h.Fragment,null,[h.createVNode("div",{class:`${g}-control-input`},[h.createVNode("div",{class:`${g}-control-input-content`},[(b=n.default)===null||b===void 0?void 0:b.call(n)])]),d!==null||m.length?h.createVNode("div",{style:{display:"flex",flexWrap:"nowrap"}},[h.createVNode(lU,{errors:m,help:p,class:`${g}-explain-connected`,onErrorVisibleChanged:f},null),!!d&&h.createVNode("div",{style:{width:0,height:`${d}px`}},null)]):null,v?h.createVNode("div",{class:`${g}-extra`},[v]):null])}})}}});function uU(e){const t=h.shallowRef(e.value.slice());let n=null;return h.watchEffect(()=>{clearTimeout(n),n=setTimeout(()=>{t.value=e.value},e.value.length?0:10)}),t}gi("success","warning","error","validating","");const dU={success:ug,warning:dg,error:Vs,validating:zs};function Ng(e,t,n){let r=e;const i=t;let o=0;try{for(let a=i.length;o<a-1&&!(!r&&!n);++o){const s=i[o];if(s in r)r=r[s];else{if(n)throw Error("please transfer a valid name path to form item!");break}}if(n&&!r)throw Error("please transfer a valid name path to form item!")}catch{console.error("please transfer a valid name path to form item!")}return{o:r,k:i[o],v:r?r[i[o]]:void 0}}const fU=()=>({htmlFor:String,prefixCls:String,label:oe.any,help:oe.any,extra:oe.any,labelCol:{type:Object},wrapperCol:{type:Object},hasFeedback:{type:Boolean,default:!1},colon:{type:Boolean,default:void 0},labelAlign:String,prop:{type:[String,Number,Array]},name:{type:[String,Number,Array]},rules:[Array,Object],autoLink:{type:Boolean,default:!0},required:{type:Boolean,default:void 0},validateFirst:{type:Boolean,default:void 0},validateStatus:oe.oneOf(gi("","success","warning","error","validating")),validateTrigger:{type:[String,Array]},messageVariables:{type:Object},hidden:Boolean,noStyle:Boolean,tooltip:String});let pU=0;const hU="form_item",HT=h.defineComponent({compatConfig:{MODE:3},name:"AFormItem",inheritAttrs:!1,__ANT_NEW_FORM_ITEM:!0,props:fU(),slots:Object,setup(e,t){let{slots:n,attrs:r,expose:i}=t;Eu(e.prop===void 0,"`prop` is deprecated. Please use `name` instead.");const o=`form-item-${++pU}`,{prefixCls:a}=Ke("form",e),[s,l]=Dg(a),c=h.shallowRef(),u=Og(),d=h.computed(()=>e.name||e.prop),f=h.shallowRef([]),p=h.shallowRef(!1),m=h.shallowRef(),v=h.computed(()=>{const Y=d.value;return Rg(Y)}),g=h.computed(()=>{if(v.value.length){const Y=u.name.value,A=v.value.join("_");return Y?`${Y}_${A}`:`${hU}_${A}`}else return}),x=()=>{const Y=u.model.value;if(!(!Y||!d.value))return Ng(Y,v.value,!0).v},w=h.computed(()=>x()),b=h.shallowRef(fd(w.value)),y=h.computed(()=>{let Y=e.validateTrigger!==void 0?e.validateTrigger:u.validateTrigger.value;return Y=Y===void 0?"change":Y,_i(Y)}),_=h.computed(()=>{let Y=u.rules.value;const A=e.rules,E=e.required!==void 0?{required:!!e.required,trigger:y.value}:[],T=Ng(Y,v.value);Y=Y?T.o[T.k]||T.v:[];const D=[].concat(A||Y||[]);return DV(D,B=>B.required)?D:D.concat(E)}),S=h.computed(()=>{const Y=_.value;let A=!1;return Y&&Y.length&&Y.every(E=>E.required?(A=!0,!1):!0),A||e.required}),C=h.shallowRef();h.watchEffect(()=>{C.value=e.validateStatus});const $=h.computed(()=>{let Y={};return typeof e.label=="string"?Y.label=e.label:e.name&&(Y.label=String(e.name)),e.messageVariables&&(Y=O(O({},Y),e.messageVariables)),Y}),M=Y=>{if(v.value.length===0)return;const{validateFirst:A=!1}=e,{triggerName:E}=Y||{};let T=_.value;if(E&&(T=T.filter(B=>{const{trigger:G}=B;return!G&&!y.value.length?!0:_i(G||y.value).includes(E)})),!T.length)return Promise.resolve();const D=DT(v.value,w.value,T,O({validateMessages:u.validateMessages.value},Y),A,$.value);return C.value="validating",f.value=[],D.catch(B=>B).then(function(){let B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(C.value==="validating"){const G=B.filter(ae=>ae&&ae.errors.length);C.value=G.length?"error":"success",f.value=G.map(ae=>ae.errors),u.onValidate(d.value,!f.value.length,f.value.length?h.toRaw(f.value[0]):null)}}),D},R=()=>{M({triggerName:"blur"})},I=()=>{if(p.value){p.value=!1;return}M({triggerName:"change"})},L=()=>{C.value=e.validateStatus,p.value=!1,f.value=[]},k=()=>{var Y;C.value=e.validateStatus,p.value=!0,f.value=[];const A=u.model.value||{},E=w.value,T=Ng(A,v.value,!0);Array.isArray(E)?T.o[T.k]=[].concat((Y=b.value)!==null&&Y!==void 0?Y:[]):T.o[T.k]=b.value,h.nextTick(()=>{p.value=!1})},V=h.computed(()=>e.htmlFor===void 0?g.value:e.htmlFor),W=()=>{const Y=V.value;if(!Y||!m.value)return;const A=m.value.$el.querySelector(`[id="${Y}"]`);A&&A.focus&&A.focus()};i({onFieldBlur:R,onFieldChange:I,clearValidate:L,resetField:k}),W9({id:g,onFieldBlur:()=>{e.autoLink&&R()},onFieldChange:()=>{e.autoLink&&I()},clearValidate:L},h.computed(()=>!!(e.autoLink&&u.model.value&&d.value)));let q=!1;h.watch(d,Y=>{Y?q||(q=!0,u.addField(o,{fieldValue:w,fieldId:g,fieldName:d,resetField:k,clearValidate:L,namePath:v,validateRules:M,rules:_})):(q=!1,u.removeField(o))},{immediate:!0}),h.onBeforeUnmount(()=>{u.removeField(o)});const H=uU(f),Z=h.computed(()=>e.validateStatus!==void 0?e.validateStatus:H.value.length?"error":C.value),U=h.computed(()=>({[`${a.value}-item`]:!0,[l.value]:!0,[`${a.value}-item-has-feedback`]:Z.value&&e.hasFeedback,[`${a.value}-item-has-success`]:Z.value==="success",[`${a.value}-item-has-warning`]:Z.value==="warning",[`${a.value}-item-has-error`]:Z.value==="error",[`${a.value}-item-is-validating`]:Z.value==="validating",[`${a.value}-item-hidden`]:e.hidden})),X=h.reactive({});Nr.useProvide(X),h.watchEffect(()=>{let Y;if(e.hasFeedback){const A=Z.value&&dU[Z.value];Y=A?h.createVNode("span",{class:xe(`${a.value}-item-feedback-icon`,`${a.value}-item-feedback-icon-${Z.value}`)},[h.createVNode(A,null,null)]):null}O(X,{status:Z.value,hasFeedback:e.hasFeedback,feedbackIcon:Y,isFormItemInput:!0})});const re=h.shallowRef(null),F=h.shallowRef(!1),z=()=>{if(c.value){const Y=getComputedStyle(c.value);re.value=parseInt(Y.marginBottom,10)}};h.onMounted(()=>{h.watch(F,()=>{F.value&&z()},{flush:"post",immediate:!0})});const J=Y=>{Y||(re.value=null)};return()=>{var Y,A;if(e.noStyle)return(Y=n.default)===null||Y===void 0?void 0:Y.call(n);const E=(A=e.help)!==null&&A!==void 0?A:n.help?Pr(n.help()):null,T=!!(E!=null&&Array.isArray(E)&&E.length||H.value.length);return F.value=T,s(h.createVNode("div",{class:[U.value,T?`${a.value}-item-with-help`:"",r.class],ref:c},[h.createVNode(oG,ne(ne({},r),{},{class:`${a.value}-item-row`,key:"row"}),{default:()=>{var D,B;return h.createVNode(h.Fragment,null,[h.createVNode(Ig,ne(ne({},e),{},{htmlFor:V.value,required:S.value,requiredMark:u.requiredMark.value,prefixCls:a.value,onClick:W,label:e.label}),{label:n.label,tooltip:n.tooltip}),h.createVNode(cU,ne(ne({},e),{},{errors:E!=null?_i(E):H.value,marginBottom:re.value,prefixCls:a.value,status:Z.value,ref:m,help:E,extra:(D=e.extra)!==null&&D!==void 0?D:(B=n.extra)===null||B===void 0?void 0:B.call(n),onErrorVisibleChanged:J}),{default:n.default})])}}),!!re.value&&h.createVNode("div",{class:`${a.value}-margin-offset`,style:{marginBottom:`-${re.value}px`}},null)]))}}});function zT(e){let t=!1,n=e.length;const r=[];return e.length?new Promise((i,o)=>{e.forEach((a,s)=>{a.catch(l=>(t=!0,l)).then(l=>{n-=1,r[s]=l,!(n>0)&&(t&&o(r),i(r))})})}):Promise.resolve([])}function VT(e){let t=!1;return e&&e.length&&e.every(n=>n.required?(t=!0,!1):!0),t}function WT(e){return e==null?[]:Array.isArray(e)?e:[e]}function Bg(e,t,n){let r=e;t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,"");const i=t.split(".");let o=0;for(let a=i.length;o<a-1&&!(!r&&!n);++o){const s=i[o];if(s in r)r=r[s];else{if(n)throw new Error("please transfer a valid name path to validate!");break}}return{o:r,k:i[o],v:r?r[i[o]]:null,isValid:r&&i[o]in r}}function mU(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.ref({}),n=arguments.length>2?arguments[2]:void 0;const r=fd(h.unref(e)),i=h.reactive({}),o=h.shallowRef([]),a=b=>{O(h.unref(e),O(O({},fd(r)),b)),h.nextTick(()=>{Object.keys(i).forEach(y=>{i[y]={autoLink:!1,required:VT(h.unref(t)[y])}})})},s=function(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],y=arguments.length>1?arguments[1]:void 0;return y.length?b.filter(_=>{const S=WT(_.trigger||"change");return LV(S,y).length}):b};let l=null;const c=function(b){let y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=arguments.length>2?arguments[2]:void 0;const S=[],C={};for(let R=0;R<b.length;R++){const I=b[R],L=Bg(h.unref(e),I,_);if(!L.isValid)continue;C[I]=L.v;const k=s(h.unref(t)[I],WT(y&&y.trigger));k.length&&S.push(u(I,L.v,k,y||{}).then(()=>({name:I,errors:[],warnings:[]})).catch(V=>{const W=[],q=[];return V.forEach(H=>{let{rule:{warningOnly:Z},errors:U}=H;Z?q.push(...U):W.push(...U)}),W.length?Promise.reject({name:I,errors:W,warnings:q}):{name:I,errors:W,warnings:q}}))}const $=zT(S);l=$;const M=$.then(()=>l===$?Promise.resolve(C):Promise.reject([])).catch(R=>{const I=R.filter(L=>L&&L.errors.length);return I.length?Promise.reject({values:C,errorFields:I,outOfDate:l!==$}):Promise.resolve(C)});return M.catch(R=>R),M},u=function(b,y,_){let S=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const C=DT([b],y,_,O({validateMessages:Ed},S),!!S.validateFirst);return i[b]?(i[b].validateStatus="validating",C.catch($=>$).then(function(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];var M;if(i[b].validateStatus==="validating"){const R=$.filter(I=>I&&I.errors.length);i[b].validateStatus=R.length?"error":"success",i[b].help=R.length?R.map(I=>I.errors):null,(M=n==null?void 0:n.onValidate)===null||M===void 0||M.call(n,b,!R.length,R.length?h.toRaw(i[b].help[0]):null)}}),C):C.catch($=>$)},d=(b,y)=>{let _=[],S=!0;b?Array.isArray(b)?_=b:_=[b]:(S=!1,_=o.value);const C=c(_,y||{},S);return C.catch($=>$),C},f=b=>{let y=[];b?Array.isArray(b)?y=b:y=[b]:y=o.value,y.forEach(_=>{i[_]&&O(i[_],{validateStatus:"",help:null})})},p=b=>{const y={autoLink:!1},_=[],S=Array.isArray(b)?b:[b];for(let C=0;C<S.length;C++){const $=S[C];($==null?void 0:$.validateStatus)==="error"&&(y.validateStatus="error",$.help&&_.push($.help)),y.required=y.required||($==null?void 0:$.required)}return y.help=_,y};let m=r,v=!0;const g=b=>{const y=[];o.value.forEach(_=>{const S=Bg(b,_,!1),C=Bg(m,_,!1);(v&&(n==null?void 0:n.immediate)&&S.isValid||!zm(S.v,C.v))&&y.push(_)}),d(y,{trigger:"change"}),v=!1,m=fd(h.toRaw(b))},x=n==null?void 0:n.debounce;let w=!0;return h.watch(t,()=>{o.value=t?Object.keys(h.unref(t)):[],!w&&n&&n.validateOnRuleChange&&d(),w=!1},{deep:!0,immediate:!0}),h.watch(o,()=>{const b={};o.value.forEach(y=>{b[y]=O({},i[y],{autoLink:!1,required:VT(h.unref(t)[y])}),delete i[y]});for(const y in i)Object.prototype.hasOwnProperty.call(i,y)&&delete i[y];O(i,b)},{immediate:!0}),h.watch(e,x&&x.wait?$V(g,x.wait,YV(x,["wait"])):g,{immediate:n&&!!n.immediate,deep:!0}),{modelRef:e,rulesRef:t,initialModel:r,validateInfos:i,resetFields:a,validate:d,validateField:u,mergeValidateInfo:p,clearValidate:f}}const gU=()=>({layout:oe.oneOf(gi("horizontal","inline","vertical")),labelCol:En(),wrapperCol:En(),colon:Oe(),labelAlign:Sn(),labelWrap:Oe(),prefixCls:String,requiredMark:$r([String,Boolean]),hideRequiredMark:Oe(),model:oe.object,rules:En(),validateMessages:En(),validateOnRuleChange:Oe(),scrollToFirstError:Hn(),onSubmit:Ue(),name:String,validateTrigger:$r([String,Array]),size:Sn(),disabled:Oe(),onValuesChange:Ue(),onFieldsChange:Ue(),onFinish:Ue(),onFinishFailed:Ue(),onValidate:Ue()});function vU(e,t){return zm(_i(e),_i(t))}const wi=h.defineComponent({compatConfig:{MODE:3},name:"AForm",inheritAttrs:!1,props:qo(gU(),{layout:"horizontal",hideRequiredMark:!1,colon:!0}),Item:HT,useForm:mU,setup(e,t){let{emit:n,slots:r,expose:i,attrs:o}=t;const{prefixCls:a,direction:s,form:l,size:c,disabled:u}=Ke("form",e),d=h.computed(()=>e.requiredMark===""||e.requiredMark),f=h.computed(()=>{var H;return d.value!==void 0?d.value:l&&((H=l.value)===null||H===void 0?void 0:H.requiredMark)!==void 0?l.value.requiredMark:!e.hideRequiredMark});J6(c),tL(u);const p=h.computed(()=>{var H,Z;return(H=e.colon)!==null&&H!==void 0?H:(Z=l.value)===null||Z===void 0?void 0:Z.colon}),{validateMessages:m}=Jk(),v=h.computed(()=>O(O(O({},Ed),m.value),e.validateMessages)),[g,x]=Dg(a),w=h.computed(()=>xe(a.value,{[`${a.value}-${e.layout}`]:!0,[`${a.value}-hide-required-mark`]:f.value===!1,[`${a.value}-rtl`]:s.value==="rtl",[`${a.value}-${c.value}`]:c.value},x.value)),b=h.ref(),y={},_=(H,Z)=>{y[H]=Z},S=H=>{delete y[H]},C=H=>{const Z=!!H,U=Z?_i(H).map(Rg):[];return Z?Object.values(y).filter(X=>U.findIndex(re=>vU(re,X.fieldName.value))>-1):Object.values(y)},$=H=>{if(!e.model){Rr(!1,"Form","model is required for resetFields to work.");return}C(H).forEach(Z=>{Z.resetField()})},M=H=>{C(H).forEach(Z=>{Z.clearValidate()})},R=H=>{const{scrollToFirstError:Z}=e;if(n("finishFailed",H),Z&&H.errorFields.length){let U={};typeof Z=="object"&&(U=Z),L(H.errorFields[0].name,U)}},I=function(){return W(...arguments)},L=function(H){let Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const U=C(H?[H]:void 0);if(U.length){const X=U[0].fieldId.value,re=X?document.getElementById(X):null;re&&n4(re,O({scrollMode:"if-needed",block:"nearest"},Z))}},k=function(){let H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(H===!0){const Z=[];return Object.values(y).forEach(U=>{let{namePath:X}=U;Z.push(X.value)}),IT(e.model,Z)}else return IT(e.model,H)},V=(H,Z)=>{if(Rr(!(H instanceof Function),"Form","validateFields/validateField/validate not support callback, please use promise instead"),!e.model)return Rr(!1,"Form","model is required for validateFields to work."),Promise.reject("Form `model` is required for validateFields to work.");const U=!!H,X=U?_i(H).map(Rg):[],re=[];Object.values(y).forEach(J=>{var Y;if(U||X.push(J.namePath.value),!(!((Y=J.rules)===null||Y===void 0)&&Y.value.length))return;const A=J.namePath.value;if(!U||FG(X,A)){const E=J.validateRules(O({validateMessages:v.value},Z));re.push(E.then(()=>({name:A,errors:[],warnings:[]})).catch(T=>{const D=[],B=[];return T.forEach(G=>{let{rule:{warningOnly:ae},errors:se}=G;ae?B.push(...se):D.push(...se)}),D.length?Promise.reject({name:A,errors:D,warnings:B}):{name:A,errors:D,warnings:B}}))}});const F=zT(re);b.value=F;const z=F.then(()=>b.value===F?Promise.resolve(k(X)):Promise.reject([])).catch(J=>{const Y=J.filter(A=>A&&A.errors.length);return Promise.reject({values:k(X),errorFields:Y,outOfDate:b.value!==F})});return z.catch(J=>J),z},W=function(){return V(...arguments)},q=H=>{H.preventDefault(),H.stopPropagation(),n("submit",H),e.model&&V().then(U=>{n("finish",U)}).catch(U=>{R(U)})};return i({resetFields:$,clearValidate:M,validateFields:V,getFieldsValue:k,validate:I,scrollToField:L}),BT({model:h.computed(()=>e.model),name:h.computed(()=>e.name),labelAlign:h.computed(()=>e.labelAlign),labelCol:h.computed(()=>e.labelCol),labelWrap:h.computed(()=>e.labelWrap),wrapperCol:h.computed(()=>e.wrapperCol),vertical:h.computed(()=>e.layout==="vertical"),colon:p,requiredMark:f,validateTrigger:h.computed(()=>e.validateTrigger),rules:h.computed(()=>e.rules),addField:_,removeField:S,onValidate:(H,Z,U)=>{n("validate",H,Z,U)},validateMessages:v}),h.watch(()=>e.rules,()=>{e.validateOnRuleChange&&V()}),()=>{var H;return g(h.createVNode("form",ne(ne({},o),{},{onSubmit:q,class:[w.value,o.class]}),[(H=r.default)===null||H===void 0?void 0:H.call(r)]))}}});wi.useInjectFormItemContext=co,wi.ItemRest=Qm,wi.install=function(e){return e.component(wi.name,wi),e.component(wi.Item.name,wi.Item),e.component(Qm.name,Qm),e};const yU=new Wt("antCheckboxEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),bU=e=>{const{checkboxCls:t}=e,n=`${t}-wrapper`;return[{[`${t}-group`]:O(O({},Tn(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:O(O({},Tn(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:O(O({},Tn(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:O({},Lu(e))},[`${t}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.checkboxSize/14*5,height:e.checkboxSize/14*8,border:`${e.lineWidthBold}px solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[t]:{"&-indeterminate":{[`${t}-inner`]:{"&:after":{top:"50%",insetInlineStart:"50%",width:e.fontSizeLG/2,height:e.fontSizeLG/2,backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${n}:hover ${t}:after`]:{visibility:"visible"},[`
|
|
385
|
+
${n}:not(${n}-disabled),
|
|
386
|
+
${t}:not(${t}-disabled)
|
|
387
|
+
`]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}},"&:after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderRadius:e.borderRadiusSM,visibility:"hidden",border:`${e.lineWidthBold}px solid ${e.colorPrimary}`,animationName:yU,animationDuration:e.motionDurationSlow,animationTimingFunction:"ease-in-out",animationFillMode:"backwards",content:'""',transition:`all ${e.motionDurationSlow}`}},[`
|
|
388
|
+
${n}-checked:not(${n}-disabled),
|
|
389
|
+
${t}-checked:not(${t}-disabled)
|
|
390
|
+
`]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}:after`]:{borderColor:e.colorPrimaryHover}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function xU(e,t){const n=Ot(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return[bU(n)]}const GT=Pn("Checkbox",(e,t)=>{let{prefixCls:n}=t;return[xU(n,e)]}),_U=()=>({name:String,prefixCls:String,options:Ko([]),disabled:Boolean,id:String}),wU=()=>O(O({},_U()),{defaultValue:Ko(),value:Ko(),onChange:Ue(),"onUpdate:value":Ue()}),EU=()=>({prefixCls:String,defaultChecked:Oe(),checked:Oe(),disabled:Oe(),isGroup:Oe(),value:oe.any,name:String,id:String,indeterminate:Oe(),type:Sn("checkbox"),autofocus:Oe(),onChange:Ue(),"onUpdate:checked":Ue(),onClick:Ue(),skipGroup:Oe(!1)}),SU=()=>O(O({},EU()),{indeterminate:Oe(!1)}),UT=Symbol("CheckboxGroupContext");var qT=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<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const ca=h.defineComponent({compatConfig:{MODE:3},name:"ACheckbox",inheritAttrs:!1,__ANT_CHECKBOX:!0,props:SU(),setup(e,t){let{emit:n,attrs:r,slots:i,expose:o}=t;const a=co(),s=Nr.useInject(),{prefixCls:l,direction:c,disabled:u}=Ke("checkbox",e),d=vi(),[f,p]=GT(l),m=h.inject(UT,void 0),v=Symbol("checkboxUniId"),g=h.computed(()=>(m==null?void 0:m.disabled.value)||u.value);h.watchEffect(()=>{!e.skipGroup&&m&&m.registerValue(v,e.value)}),h.onBeforeUnmount(()=>{m&&m.cancelValue(v)}),h.onMounted(()=>{Rr(!!(e.checked!==void 0||m||e.value===void 0),"Checkbox","`value` is not validate prop, do you mean `checked`?")});const x=_=>{const S=_.target.checked;n("update:checked",S),n("change",_),a.onFieldChange()},w=h.ref();return o({focus:()=>{var _;(_=w.value)===null||_===void 0||_.focus()},blur:()=>{var _;(_=w.value)===null||_===void 0||_.blur()}}),()=>{var _;const S=en((_=i.default)===null||_===void 0?void 0:_.call(i)),{indeterminate:C,skipGroup:$,id:M=a.id.value}=e,R=qT(e,["indeterminate","skipGroup","id"]),{onMouseenter:I,onMouseleave:L,onInput:k,class:V,style:W}=r,q=qT(r,["onMouseenter","onMouseleave","onInput","class","style"]),H=O(O(O(O({},R),{id:M,prefixCls:l.value}),q),{disabled:g.value});m&&!$?(H.onChange=function(){for(var re=arguments.length,F=new Array(re),z=0;z<re;z++)F[z]=arguments[z];n("change",...F),m.toggleOption({label:S,value:e.value})},H.name=m.name.value,H.checked=m.mergedValue.value.includes(e.value),H.disabled=g.value||d.value,H.indeterminate=C):H.onChange=x;const Z=xe({[`${l.value}-wrapper`]:!0,[`${l.value}-rtl`]:c.value==="rtl",[`${l.value}-wrapper-checked`]:H.checked,[`${l.value}-wrapper-disabled`]:H.disabled,[`${l.value}-wrapper-in-form-item`]:s.isFormItemInput},V,p.value),U=xe({[`${l.value}-indeterminate`]:C},p.value),X=C?"mixed":void 0;return f(h.createVNode("label",{class:Z,style:W,onMouseenter:I,onMouseleave:L},[h.createVNode(cT,ne(ne({"aria-checked":X},H),{},{class:U,ref:w}),null),S.length?h.createVNode("span",null,[S]):null]))}}}),Cd=h.defineComponent({compatConfig:{MODE:3},name:"ACheckboxGroup",inheritAttrs:!1,props:wU(),setup(e,t){let{slots:n,attrs:r,emit:i,expose:o}=t;const a=co(),{prefixCls:s,direction:l}=Ke("checkbox",e),c=h.computed(()=>`${s.value}-group`),[u,d]=GT(c),f=h.ref((e.value===void 0?e.defaultValue:e.value)||[]);h.watch(()=>e.value,()=>{f.value=e.value||[]});const p=h.computed(()=>e.options.map(y=>typeof y=="string"||typeof y=="number"?{label:y,value:y}:y)),m=h.ref(Symbol()),v=h.ref(new Map),g=y=>{v.value.delete(y),m.value=Symbol()},x=(y,_)=>{v.value.set(y,_),m.value=Symbol()},w=h.ref(new Map);h.watch(m,()=>{const y=new Map;for(const _ of v.value.values())y.set(_,!0);w.value=y});const b=y=>{const _=f.value.indexOf(y.value),S=[...f.value];_===-1?S.push(y.value):S.splice(_,1),e.value===void 0&&(f.value=S);const C=S.filter($=>w.value.has($)).sort(($,M)=>{const R=p.value.findIndex(L=>L.value===$),I=p.value.findIndex(L=>L.value===M);return R-I});i("update:value",C),i("change",C),a.onFieldChange()};return h.provide(UT,{cancelValue:g,registerValue:x,toggleOption:b,mergedValue:f,name:h.computed(()=>e.name),disabled:h.computed(()=>e.disabled)}),o({mergedValue:f}),()=>{var y;const{id:_=a.id.value}=e;let S=null;return p.value&&p.value.length>0&&(S=p.value.map(C=>{var $;return h.createVNode(ca,{prefixCls:s.value,key:C.value.toString(),disabled:"disabled"in C?C.disabled:e.disabled,indeterminate:C.indeterminate,value:C.value,checked:f.value.indexOf(C.value)!==-1,onChange:C.onChange,class:`${c.value}-item`},{default:()=>[n.label!==void 0?($=n.label)===null||$===void 0?void 0:$.call(n,C):C.label]})})),u(h.createVNode("div",ne(ne({},r),{},{class:[c.value,{[`${c.value}-rtl`]:l.value==="rtl"},r.class,d.value],id:_}),[S||((y=n.default)===null||y===void 0?void 0:y.call(n))]))}}});ca.Group=Cd,ca.install=function(e){return e.component(ca.name,ca),e.component(Cd.name,Cd),e};const Js=e=>e!=null&&(Array.isArray(e)?Pr(e).length:!0);function kg(e){return Js(e.prefix)||Js(e.suffix)||Js(e.allowClear)}function Td(e){return Js(e.addonBefore)||Js(e.addonAfter)}function Lg(e){return typeof e>"u"||e===null?"":String(e)}function el(e,t,n,r){if(!n)return;const i=t;if(t.type==="click"){Object.defineProperty(i,"target",{writable:!0}),Object.defineProperty(i,"currentTarget",{writable:!0});const o=e.cloneNode(!0);i.target=o,i.currentTarget=o,o.value="",n(i);return}if(r!==void 0){Object.defineProperty(i,"target",{writable:!0}),Object.defineProperty(i,"currentTarget",{writable:!0}),i.target=e,i.currentTarget=e,e.value=r,n(i);return}n(i)}function KT(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)}}}const CU=()=>({addonBefore:oe.any,addonAfter:oe.any,prefix:oe.any,suffix:oe.any,clearIcon:oe.any,affixWrapperClassName:String,groupClassName:String,wrapperClassName:String,inputClassName:String,allowClear:{type:Boolean,default:void 0}}),YT=()=>O(O({},CU()),{value:{type:[String,Number,Symbol],default:void 0},defaultValue:{type:[String,Number,Symbol],default:void 0},inputElement:oe.any,prefixCls:String,disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},triggerFocus:Function,readonly:{type:Boolean,default:void 0},handleReset:Function,hidden:{type:Boolean,default:void 0}}),XT=()=>O(O({},YT()),{id:String,placeholder:{type:[String,Number]},autocomplete:String,type:Sn("text"),name:String,size:{type:String},autofocus:{type:Boolean,default:void 0},lazy:{type:Boolean,default:!0},maxlength:Number,loading:{type:Boolean,default:void 0},bordered:{type:Boolean,default:void 0},showCount:{type:[Boolean,Object]},htmlSize:Number,onPressEnter:Function,onKeydown:Function,onKeyup:Function,onFocus:Function,onBlur:Function,onChange:Function,onInput:Function,"onUpdate:value":Function,onCompositionstart:Function,onCompositionend:Function,valueModifiers:Object,hidden:{type:Boolean,default:void 0},status:String}),TU=h.defineComponent({name:"BaseInput",inheritAttrs:!1,props:YT(),setup(e,t){let{slots:n,attrs:r}=t;const i=h.ref(),o=s=>{var l;if(!((l=i.value)===null||l===void 0)&&l.contains(s.target)){const{triggerFocus:c}=e;c==null||c()}},a=()=>{var s;const{allowClear:l,value:c,disabled:u,readonly:d,handleReset:f,suffix:p=n.suffix,prefixCls:m}=e;if(!l)return null;const v=!u&&!d&&c,g=`${m}-clear-icon`,x=((s=n.clearIcon)===null||s===void 0?void 0:s.call(n))||"*";return h.createVNode("span",{onClick:f,onMousedown:w=>w.preventDefault(),class:xe({[`${g}-hidden`]:!v,[`${g}-has-suffix`]:!!p},g),role:"button",tabindex:-1},[x])};return()=>{var s,l;const{focused:c,value:u,disabled:d,allowClear:f,readonly:p,hidden:m,prefixCls:v,prefix:g=(s=n.prefix)===null||s===void 0?void 0:s.call(n),suffix:x=(l=n.suffix)===null||l===void 0?void 0:l.call(n),addonAfter:w=n.addonAfter,addonBefore:b=n.addonBefore,inputElement:y,affixWrapperClassName:_,wrapperClassName:S,groupClassName:C}=e;let $=on(y,{value:u,hidden:m});if(kg({prefix:g,suffix:x,allowClear:f})){const M=`${v}-affix-wrapper`,R=xe(M,{[`${M}-disabled`]:d,[`${M}-focused`]:c,[`${M}-readonly`]:p,[`${M}-input-with-clear-btn`]:x&&f&&u},!Td({addonAfter:w,addonBefore:b})&&r.class,_),I=(x||f)&&h.createVNode("span",{class:`${v}-suffix`},[a(),x]);$=h.createVNode("span",{class:R,style:r.style,hidden:!Td({addonAfter:w,addonBefore:b})&&m,onMousedown:o,ref:i},[g&&h.createVNode("span",{class:`${v}-prefix`},[g]),on(y,{style:null,value:u,hidden:null}),I])}if(Td({addonAfter:w,addonBefore:b})){const M=`${v}-group`,R=`${M}-addon`,I=xe(`${v}-wrapper`,M,S),L=xe(`${v}-group-wrapper`,r.class,C);return h.createVNode("span",{class:L,style:r.style,hidden:m},[h.createVNode("span",{class:I},[b&&h.createVNode("span",{class:R},[b]),on($,{style:null,hidden:null}),w&&h.createVNode("span",{class:R},[w])])])}return $}}});var PU=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<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const $U=h.defineComponent({name:"VCInput",inheritAttrs:!1,props:XT(),setup(e,t){let{slots:n,attrs:r,expose:i,emit:o}=t;const a=h.shallowRef(e.value===void 0?e.defaultValue:e.value),s=h.shallowRef(!1),l=h.shallowRef(),c=h.shallowRef();h.watch(()=>e.value,()=>{a.value=e.value}),h.watch(()=>e.disabled,()=>{e.disabled&&(s.value=!1)});const u=C=>{l.value&&KT(l.value.input,C)},d=()=>{var C;(C=l.value.input)===null||C===void 0||C.blur()},f=(C,$,M)=>{var R;(R=l.value.input)===null||R===void 0||R.setSelectionRange(C,$,M)},p=()=>{var C;(C=l.value.input)===null||C===void 0||C.select()};i({focus:u,blur:d,input:h.computed(()=>{var C;return(C=l.value.input)===null||C===void 0?void 0:C.input}),stateValue:a,setSelectionRange:f,select:p});const m=C=>{o("change",C)},v=(C,$)=>{a.value!==C&&(e.value===void 0?a.value=C:h.nextTick(()=>{var M;l.value.input.value!==a.value&&((M=c.value)===null||M===void 0||M.$forceUpdate())}),h.nextTick(()=>{$&&$()}))},g=C=>{const{value:$}=C.target;if(a.value===$)return;const M=C.target.value;el(l.value.input,C,m),v(M)},x=C=>{C.keyCode===13&&o("pressEnter",C),o("keydown",C)},w=C=>{s.value=!0,o("focus",C)},b=C=>{s.value=!1,o("blur",C)},y=C=>{el(l.value.input,C,m),v("",()=>{u()})},_=()=>{var C,$;const{addonBefore:M=n.addonBefore,addonAfter:R=n.addonAfter,disabled:I,valueModifiers:L={},htmlSize:k,autocomplete:V,prefixCls:W,inputClassName:q,prefix:H=(C=n.prefix)===null||C===void 0?void 0:C.call(n),suffix:Z=($=n.suffix)===null||$===void 0?void 0:$.call(n),allowClear:U,type:X="text"}=e,re=ar(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","size","bordered","htmlSize","lazy","showCount","valueModifiers","showCount","affixWrapperClassName","groupClassName","inputClassName","wrapperClassName"]),F=O(O(O({},re),r),{autocomplete:V,onChange:g,onInput:g,onFocus:w,onBlur:b,onKeydown:x,class:xe(W,{[`${W}-disabled`]:I},q,!Td({addonAfter:R,addonBefore:M})&&!kg({prefix:H,suffix:Z,allowClear:U})&&r.class),ref:l,key:"ant-input",size:k,type:X,lazy:e.lazy});return L.lazy&&delete F.onInput,F.autofocus||delete F.autofocus,h.createVNode(LS,ar(F,["size"]),null)},S=()=>{var C;const{maxlength:$,suffix:M=(C=n.suffix)===null||C===void 0?void 0:C.call(n),showCount:R,prefixCls:I}=e,L=Number($)>0;if(M||R){const k=[...Lg(a.value)].length,V=typeof R=="object"?R.formatter({count:k,maxlength:$}):`${k}${L?` / ${$}`:""}`;return h.createVNode(h.Fragment,null,[!!R&&h.createVNode("span",{class:xe(`${I}-show-count-suffix`,{[`${I}-show-count-has-suffix`]:!!M})},[V]),M])}return null};return h.onMounted(()=>{process.env.NODE_ENV==="test"&&e.autofocus&&u()}),()=>{const{prefixCls:C,disabled:$}=e,M=PU(e,["prefixCls","disabled"]);return h.createVNode(TU,ne(ne(ne({},M),r),{},{ref:c,prefixCls:C,inputElement:_(),handleReset:y,value:Lg(a.value),focused:s.value,triggerFocus:u,suffix:S(),disabled:$}),n)}}}),Pd=()=>ar(XT(),["wrapperClassName","groupClassName","inputClassName","affixWrapperClassName"]),ZT=()=>O(O({},ar(Pd(),["prefix","addonBefore","addonAfter","suffix"])),{rows:Number,autosize:{type:[Boolean,Object],default:void 0},autoSize:{type:[Boolean,Object],default:void 0},onResize:{type:Function},onCompositionstart:vu(),onCompositionend:vu(),valueModifiers:Object});var RU=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<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const bt=h.defineComponent({compatConfig:{MODE:3},name:"AInput",inheritAttrs:!1,props:Pd(),setup(e,t){let{slots:n,attrs:r,expose:i,emit:o}=t;const a=h.ref(),s=co(),l=Nr.useInject(),c=h.computed(()=>Jm(l.status,e.status)),{direction:u,prefixCls:d,size:f,autocomplete:p}=Ke("input",e),{compactSize:m,compactItemClassnames:v}=NC(d,u),g=h.computed(()=>m.value||f.value),[x,w]=_g(d),b=vi();i({focus:k=>{var V;(V=a.value)===null||V===void 0||V.focus(k)},blur:()=>{var k;(k=a.value)===null||k===void 0||k.blur()},input:a,setSelectionRange:(k,V,W)=>{var q;(q=a.value)===null||q===void 0||q.setSelectionRange(k,V,W)},select:()=>{var k;(k=a.value)===null||k===void 0||k.select()}});const $=h.ref([]),M=()=>{$.value.push(setTimeout(()=>{var k,V,W,q;!((k=a.value)===null||k===void 0)&&k.input&&((V=a.value)===null||V===void 0?void 0:V.input.getAttribute("type"))==="password"&&(!((W=a.value)===null||W===void 0)&&W.input.hasAttribute("value"))&&((q=a.value)===null||q===void 0||q.input.removeAttribute("value"))}))};h.onMounted(()=>{M()}),h.onBeforeUpdate(()=>{$.value.forEach(k=>clearTimeout(k))}),h.onBeforeUnmount(()=>{$.value.forEach(k=>clearTimeout(k))});const R=k=>{M(),o("blur",k),s.onFieldBlur()},I=k=>{M(),o("focus",k)},L=k=>{o("update:value",k.target.value),o("change",k),o("input",k),s.onFieldChange()};return()=>{var k,V,W,q,H,Z;const{hasFeedback:U,feedbackIcon:X}=l,{allowClear:re,bordered:F=!0,prefix:z=(k=n.prefix)===null||k===void 0?void 0:k.call(n),suffix:J=(V=n.suffix)===null||V===void 0?void 0:V.call(n),addonAfter:Y=(W=n.addonAfter)===null||W===void 0?void 0:W.call(n),addonBefore:A=(q=n.addonBefore)===null||q===void 0?void 0:q.call(n),id:E=(H=s.id)===null||H===void 0?void 0:H.value}=e,T=RU(e,["allowClear","bordered","prefix","suffix","addonAfter","addonBefore","id"]),D=(U||J)&&h.createVNode(h.Fragment,null,[J,U&&X]),B=d.value,G=kg({prefix:z,suffix:J})||!!U,ae=n.clearIcon||(()=>h.createVNode(Vs,null,null));return x(h.createVNode($U,ne(ne(ne({},r),ar(T,["onUpdate:value","onChange","onInput"])),{},{onChange:L,id:E,disabled:(Z=e.disabled)!==null&&Z!==void 0?Z:b.value,ref:a,prefixCls:B,autocomplete:p.value,onBlur:R,onFocus:I,prefix:z,suffix:D,allowClear:re,addonAfter:Y&&h.createVNode(BC,null,{default:()=>[h.createVNode(nC,null,{default:()=>[Y]})]}),addonBefore:A&&h.createVNode(BC,null,{default:()=>[h.createVNode(nC,null,{default:()=>[A]})]}),class:[r.class,v.value],inputClassName:xe({[`${B}-sm`]:g.value==="small",[`${B}-lg`]:g.value==="large",[`${B}-rtl`]:u.value==="rtl",[`${B}-borderless`]:!F},!G&&Ws(B,c.value),w.value),affixWrapperClassName:xe({[`${B}-affix-wrapper-sm`]:g.value==="small",[`${B}-affix-wrapper-lg`]:g.value==="large",[`${B}-affix-wrapper-rtl`]:u.value==="rtl",[`${B}-affix-wrapper-borderless`]:!F},Ws(`${B}-affix-wrapper`,c.value,U),w.value),wrapperClassName:xe({[`${B}-group-rtl`]:u.value==="rtl"},w.value),groupClassName:xe({[`${B}-group-wrapper-sm`]:g.value==="small",[`${B}-group-wrapper-lg`]:g.value==="large",[`${B}-group-wrapper-rtl`]:u.value==="rtl"},Ws(`${B}-group-wrapper`,c.value,U),w.value)}),O(O({},n),{clearIcon:ae})))}}}),AU=h.defineComponent({compatConfig:{MODE:3},name:"AInputGroup",inheritAttrs:!1,props:{prefixCls:String,size:{type:String},compact:{type:Boolean,default:void 0}},setup(e,t){let{slots:n,attrs:r}=t;const{prefixCls:i,direction:o,getPrefixCls:a}=Ke("input-group",e),s=Nr.useInject();Nr.useProvide(s,{isFormItemInput:!1});const l=h.computed(()=>a("input")),[c,u]=_g(l),d=h.computed(()=>{const f=i.value;return{[`${f}`]:!0,[u.value]:!0,[`${f}-lg`]:e.size==="large",[`${f}-sm`]:e.size==="small",[`${f}-compact`]:e.compact,[`${f}-rtl`]:o.value==="rtl"}});return()=>{var f;return c(h.createVNode("span",ne(ne({},r),{},{class:xe(d.value,r.class)}),[(f=n.default)===null||f===void 0?void 0:f.call(n)]))}}});var OU=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<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const MU=h.defineComponent({compatConfig:{MODE:3},name:"AInputSearch",inheritAttrs:!1,props:O(O({},Pd()),{inputPrefixCls:String,enterButton:oe.any,onSearch:{type:Function}}),setup(e,t){let{slots:n,attrs:r,expose:i,emit:o}=t;const a=h.shallowRef(),s=h.shallowRef(!1);i({focus:()=>{var _;(_=a.value)===null||_===void 0||_.focus()},blur:()=>{var _;(_=a.value)===null||_===void 0||_.blur()}});const u=_=>{o("update:value",_.target.value),_&&_.target&&_.type==="click"&&o("search",_.target.value,_),o("change",_)},d=_=>{var S;document.activeElement===((S=a.value)===null||S===void 0?void 0:S.input)&&_.preventDefault()},f=_=>{var S,C;o("search",(C=(S=a.value)===null||S===void 0?void 0:S.input)===null||C===void 0?void 0:C.stateValue,_)},p=_=>{s.value||e.loading||f(_)},m=_=>{s.value=!0,o("compositionstart",_)},v=_=>{s.value=!1,o("compositionend",_)},{prefixCls:g,getPrefixCls:x,direction:w,size:b}=Ke("input-search",e),y=h.computed(()=>x("input",e.inputPrefixCls));return()=>{var _,S,C,$;const{disabled:M,loading:R,addonAfter:I=(_=n.addonAfter)===null||_===void 0?void 0:_.call(n),suffix:L=(S=n.suffix)===null||S===void 0?void 0:S.call(n)}=e,k=OU(e,["disabled","loading","addonAfter","suffix"]);let{enterButton:V=($=(C=n.enterButton)===null||C===void 0?void 0:C.call(n))!==null&&$!==void 0?$:!1}=e;V=V||V==="";const W=typeof V=="boolean"?h.createVNode(Km,null,null):null,q=`${g.value}-button`,H=Array.isArray(V)?V[0]:V;let Z;const U=H.type&&vC(H.type)&&H.type.__ANT_BUTTON;if(U||H.tagName==="button")Z=on(H,O({onMousedown:d,onClick:f,key:"enterButton"},U?{class:q,size:b.value}:{}),!1);else{const re=W&&!V;Z=h.createVNode(aa,{class:q,type:V?"primary":void 0,size:b.value,disabled:M,key:"enterButton",onMousedown:d,onClick:f,loading:R,icon:re?W:null},{default:()=>[re?null:W||V]})}I&&(Z=[Z,I]);const X=xe(g.value,{[`${g.value}-rtl`]:w.value==="rtl",[`${g.value}-${b.value}`]:!!b.value,[`${g.value}-with-button`]:!!V},r.class);return h.createVNode(bt,ne(ne(ne({ref:a},ar(k,["onUpdate:value","onSearch","enterButton"])),r),{},{onPressEnter:p,onCompositionstart:m,onCompositionend:v,size:b.value,prefixCls:y.value,addonAfter:Z,suffix:L,onChange:u,class:X,disabled:M}),n)}}}),QT=e=>e!=null&&(Array.isArray(e)?Pr(e).length:!0);function IU(e){return QT(e.addonBefore)||QT(e.addonAfter)}const DU=["text","input"],NU=h.defineComponent({compatConfig:{MODE:3},name:"ClearableLabeledInput",inheritAttrs:!1,props:{prefixCls:String,inputType:oe.oneOf(gi("text","input")),value:Hn(),defaultValue:Hn(),allowClear:{type:Boolean,default:void 0},element:Hn(),handleReset:Function,disabled:{type:Boolean,default:void 0},direction:{type:String},size:{type:String},suffix:Hn(),prefix:Hn(),addonBefore:Hn(),addonAfter:Hn(),readonly:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},bordered:{type:Boolean,default:!0},triggerFocus:{type:Function},hidden:Boolean,status:String,hashId:String},setup(e,t){let{slots:n,attrs:r}=t;const i=Nr.useInject(),o=s=>{const{value:l,disabled:c,readonly:u,handleReset:d,suffix:f=n.suffix}=e,p=!c&&!u&&l,m=`${s}-clear-icon`;return h.createVNode(Vs,{onClick:d,onMousedown:v=>v.preventDefault(),class:xe({[`${m}-hidden`]:!p,[`${m}-has-suffix`]:!!f},m),role:"button"},null)},a=(s,l)=>{const{value:c,allowClear:u,direction:d,bordered:f,hidden:p,status:m,addonAfter:v=n.addonAfter,addonBefore:g=n.addonBefore,hashId:x}=e,{status:w,hasFeedback:b}=i;if(!u)return on(l,{value:c,disabled:e.disabled});const y=xe(`${s}-affix-wrapper`,`${s}-affix-wrapper-textarea-with-clear-btn`,Ws(`${s}-affix-wrapper`,Jm(w,m),b),{[`${s}-affix-wrapper-rtl`]:d==="rtl",[`${s}-affix-wrapper-borderless`]:!f,[`${r.class}`]:!IU({addonAfter:v,addonBefore:g})&&r.class},x);return h.createVNode("span",{class:y,style:r.style,hidden:p},[on(l,{style:null,value:c,disabled:e.disabled}),o(s)])};return()=>{var s;const{prefixCls:l,inputType:c,element:u=(s=n.element)===null||s===void 0?void 0:s.call(n)}=e;return c===DU[0]?a(l,u):null}}}),BU=`
|
|
391
|
+
min-height:0 !important;
|
|
392
|
+
max-height:none !important;
|
|
393
|
+
height:0 !important;
|
|
394
|
+
visibility:hidden !important;
|
|
395
|
+
overflow:hidden !important;
|
|
396
|
+
position:absolute !important;
|
|
397
|
+
z-index:-1000 !important;
|
|
398
|
+
top:0 !important;
|
|
399
|
+
right:0 !important;
|
|
400
|
+
pointer-events: none !important;
|
|
401
|
+
`,kU=["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"],jg={};let In;function LU(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&jg[n])return jg[n];const 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")),l={sizingStyle:kU.map(c=>`${c}:${r.getPropertyValue(c)}`).join(";"),paddingSize:o,borderSize:a,boxSizing:i};return t&&n&&(jg[n]=l),l}function jU(e){let 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;In||(In=document.createElement("textarea"),In.setAttribute("tab-index","-1"),In.setAttribute("aria-hidden","true"),document.body.appendChild(In)),e.getAttribute("wrap")?In.setAttribute("wrap",e.getAttribute("wrap")):In.removeAttribute("wrap");const{paddingSize:i,borderSize:o,boxSizing:a,sizingStyle:s}=LU(e,t);In.setAttribute("style",`${s};${BU}`),In.value=e.value||e.placeholder||"";let l,c,u,d=In.scrollHeight;if(a==="border-box"?d+=o:a==="content-box"&&(d-=i),n!==null||r!==null){In.value=" ";const p=In.scrollHeight-i;n!==null&&(l=p*n,a==="border-box"&&(l=l+i+o),d=Math.max(l,d)),r!==null&&(c=p*r,a==="border-box"&&(c=c+i+o),u=d>c?"":"hidden",d=Math.min(c,d))}const f={height:`${d}px`,overflowY:u,resize:"none"};return l&&(f.minHeight=`${l}px`),c&&(f.maxHeight=`${c}px`),f}const Fg=0,Hg=1,zg=2,FU=h.defineComponent({compatConfig:{MODE:3},name:"ResizableTextArea",inheritAttrs:!1,props:ZT(),setup(e,t){let{attrs:n,emit:r,expose:i}=t,o,a;const s=h.ref(),l=h.ref({}),c=h.ref(zg);h.onBeforeUnmount(()=>{Tt.cancel(o),Tt.cancel(a)});const u=()=>{try{if(s.value&&document.activeElement===s.value.input){const S=s.value.getSelectionStart(),C=s.value.getSelectionEnd(),$=s.value.getScrollTop();s.value.setSelectionRange(S,C),s.value.setScrollTop($)}}catch{}},d=h.ref(),f=h.ref();h.watchEffect(()=>{const S=e.autoSize||e.autosize;S?(d.value=S.minRows,f.value=S.maxRows):(d.value=void 0,f.value=void 0)});const p=h.computed(()=>!!(e.autoSize||e.autosize)),m=()=>{c.value=Fg};h.watch([()=>e.value,d,f,p],()=>{p.value&&m()},{immediate:!0});const v=h.ref();h.watch([c,s],()=>{if(s.value)if(c.value===Fg)c.value=Hg;else if(c.value===Hg){const S=jU(s.value.input,!1,d.value,f.value);c.value=zg,v.value=S}else u()},{immediate:!0,flush:"post"});const g=h.getCurrentInstance(),x=h.ref(),w=()=>{Tt.cancel(x.value)},b=S=>{c.value===zg&&(r("resize",S),p.value&&(w(),x.value=Tt(()=>{m()})))};h.onBeforeUnmount(()=>{w()}),i({resizeTextarea:()=>{m()},textArea:h.computed(()=>{var S;return(S=s.value)===null||S===void 0?void 0:S.input}),instance:g}),Rr(e.autosize===void 0,"Input.TextArea","autosize is deprecated, please use autoSize instead.");const _=()=>{const{prefixCls:S,disabled:C}=e,$=ar(e,["prefixCls","onPressEnter","autoSize","autosize","defaultValue","allowClear","type","maxlength","valueModifiers"]),M=xe(S,n.class,{[`${S}-disabled`]:C}),R=p.value?v.value:null,I=[n.style,l.value,R],L=O(O(O({},$),n),{style:I,class:M});return(c.value===Fg||c.value===Hg)&&I.push({overflowX:"hidden",overflowY:"hidden"}),L.autofocus||delete L.autofocus,L.rows===0&&delete L.rows,h.createVNode(Xk,{onResize:b,disabled:!p.value},{default:()=>[h.createVNode(LS,ne(ne({},L),{},{ref:s,tag:"textarea"}),null)]})};return()=>_()}});function JT(e,t){return[...e||""].slice(0,t).join("")}function eP(e,t,n,r){let i=n;return e?i=JT(n,r):[...t||""].length<n.length&&[...n||""].length>r&&(i=t),i}const HU=h.defineComponent({compatConfig:{MODE:3},name:"ATextarea",inheritAttrs:!1,props:ZT(),setup(e,t){let{attrs:n,expose:r,emit:i}=t;var o;const a=co(),s=Nr.useInject(),l=h.computed(()=>Jm(s.status,e.status)),c=h.shallowRef((o=e.value)!==null&&o!==void 0?o:e.defaultValue),u=h.shallowRef(),d=h.shallowRef(""),{prefixCls:f,size:p,direction:m}=Ke("input",e),[v,g]=_g(f),x=vi(),w=h.computed(()=>e.showCount===""||e.showCount||!1),b=h.computed(()=>Number(e.maxlength)>0),y=h.shallowRef(!1),_=h.shallowRef(),S=h.shallowRef(0),C=U=>{y.value=!0,_.value=d.value,S.value=U.currentTarget.selectionStart,i("compositionstart",U)},$=U=>{var X;y.value=!1;let re=U.currentTarget.value;if(b.value){const F=S.value>=e.maxlength+1||S.value===((X=_.value)===null||X===void 0?void 0:X.length);re=eP(F,_.value,re,e.maxlength)}re!==d.value&&(L(re),el(U.currentTarget,U,W,re)),i("compositionend",U)},M=h.getCurrentInstance();h.watch(()=>e.value,()=>{var U;"value"in M.vnode.props,c.value=(U=e.value)!==null&&U!==void 0?U:""});const R=U=>{var X;KT((X=u.value)===null||X===void 0?void 0:X.textArea,U)},I=()=>{var U,X;(X=(U=u.value)===null||U===void 0?void 0:U.textArea)===null||X===void 0||X.blur()},L=(U,X)=>{c.value!==U&&(e.value===void 0?c.value=U:h.nextTick(()=>{var re,F,z;u.value.textArea.value!==d.value&&((z=(re=u.value)===null||re===void 0?void 0:(F=re.instance).update)===null||z===void 0||z.call(F))}),h.nextTick(()=>{X&&X()}))},k=U=>{U.keyCode===13&&i("pressEnter",U),i("keydown",U)},V=U=>{const{onBlur:X}=e;X==null||X(U),a.onFieldBlur()},W=U=>{i("update:value",U.target.value),i("change",U),i("input",U),a.onFieldChange()},q=U=>{el(u.value.textArea,U,W),L("",()=>{R()})},H=U=>{let X=U.target.value;if(c.value!==X){if(b.value){const re=U.target,F=re.selectionStart>=e.maxlength+1||re.selectionStart===X.length||!re.selectionStart;X=eP(F,d.value,X,e.maxlength)}el(U.currentTarget,U,W,X),L(X)}},Z=()=>{var U,X;const{class:re}=n,{bordered:F=!0}=e,z=O(O(O({},ar(e,["allowClear"])),n),{class:[{[`${f.value}-borderless`]:!F,[`${re}`]:re&&!w.value,[`${f.value}-sm`]:p.value==="small",[`${f.value}-lg`]:p.value==="large"},Ws(f.value,l.value),g.value],disabled:x.value,showCount:null,prefixCls:f.value,onInput:H,onChange:H,onBlur:V,onKeydown:k,onCompositionstart:C,onCompositionend:$});return!((U=e.valueModifiers)===null||U===void 0)&&U.lazy&&delete z.onInput,h.createVNode(FU,ne(ne({},z),{},{id:(X=z==null?void 0:z.id)!==null&&X!==void 0?X:a.id.value,ref:u,maxlength:e.maxlength,lazy:e.lazy}),null)};return r({focus:R,blur:I,resizableTextArea:u}),h.watchEffect(()=>{let U=Lg(c.value);!y.value&&b.value&&(e.value===null||e.value===void 0)&&(U=JT(U,e.maxlength)),d.value=U}),()=>{var U;const{maxlength:X,bordered:re=!0,hidden:F}=e,{style:z,class:J}=n,Y=O(O(O({},e),n),{prefixCls:f.value,inputType:"text",handleReset:q,direction:m.value,bordered:re,style:w.value?void 0:z,hashId:g.value,disabled:(U=e.disabled)!==null&&U!==void 0?U:x.value});let A=h.createVNode(NU,ne(ne({},Y),{},{value:d.value,status:e.status}),{element:Z});if(w.value||s.hasFeedback){const E=[...d.value].length;let T="";typeof w.value=="object"?T=w.value.formatter({value:d.value,count:E,maxlength:X}):T=`${E}${b.value?` / ${X}`:""}`,A=h.createVNode("div",{hidden:F,class:xe(`${f.value}-textarea`,{[`${f.value}-textarea-rtl`]:m.value==="rtl",[`${f.value}-textarea-show-count`]:w.value,[`${f.value}-textarea-in-form-item`]:s.isFormItemInput},`${f.value}-textarea-show-count`,J,g.value),style:z,"data-count":typeof T!="object"?T:void 0},[A,s.hasFeedback&&h.createVNode("span",{class:`${f.value}-textarea-suffix`},[s.feedbackIcon])])}return v(A)}}});var zU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};function tP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){VU(e,i,n[i])})}return e}function VU(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vg=function(t,n){var r=tP({},t,n.attrs);return h.createVNode(Ut,tP({},r,{icon:zU}),null)};Vg.displayName="EyeOutlined",Vg.inheritAttrs=!1;var WU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};function nP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){GU(e,i,n[i])})}return e}function GU(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wg=function(t,n){var r=nP({},t,n.attrs);return h.createVNode(Ut,nP({},r,{icon:WU}),null)};Wg.displayName="EyeInvisibleOutlined",Wg.inheritAttrs=!1;var UU=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<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const qU={click:"onClick",hover:"onMouseover"},KU=e=>e?h.createVNode(Vg,null,null):h.createVNode(Wg,null,null),YU=h.defineComponent({compatConfig:{MODE:3},name:"AInputPassword",inheritAttrs:!1,props:O(O({},Pd()),{prefixCls:String,inputPrefixCls:String,action:{type:String,default:"click"},visibilityToggle:{type:Boolean,default:!0},visible:{type:Boolean,default:void 0},"onUpdate:visible":Function,iconRender:Function}),setup(e,t){let{slots:n,attrs:r,expose:i,emit:o}=t;const a=h.shallowRef(!1),s=()=>{const{disabled:g}=e;g||(a.value=!a.value,o("update:visible",a.value))};h.watchEffect(()=>{e.visible!==void 0&&(a.value=!!e.visible)});const l=h.shallowRef();i({focus:()=>{var g;(g=l.value)===null||g===void 0||g.focus()},blur:()=>{var g;(g=l.value)===null||g===void 0||g.blur()}});const d=g=>{const{action:x,iconRender:w=n.iconRender||KU}=e,b=qU[x]||"",y=w(a.value),_={[b]:s,class:`${g}-icon`,key:"passwordIcon",onMousedown:S=>{S.preventDefault()},onMouseup:S=>{S.preventDefault()}};return on(gu(y)?y:h.createVNode("span",null,[y]),_)},{prefixCls:f,getPrefixCls:p}=Ke("input-password",e),m=h.computed(()=>p("input",e.inputPrefixCls)),v=()=>{const{size:g,visibilityToggle:x}=e,w=UU(e,["size","visibilityToggle"]),b=x&&d(f.value),y=xe(f.value,r.class,{[`${f.value}-${g}`]:!!g}),_=O(O(O({},ar(w,["suffix","iconRender","action"])),r),{type:a.value?"text":"password",class:y,prefixCls:m.value,suffix:b});return g&&(_.size=g),h.createVNode(bt,ne({ref:l},_),n)};return()=>v()}});bt.Group=AU,bt.Search=MU,bt.TextArea=HU,bt.Password=YU,bt.install=function(e){return e.component(bt.name,bt),e.component(bt.Group.name,bt.Group),e.component(bt.Search.name,bt.Search),e.component(bt.TextArea.name,bt.TextArea),e.component(bt.Password.name,bt.Password),e};const XU={class:"properties-panel"},ZU=h.defineComponent({__name:"BpmnPropertiesPanel",props:{modeler:{type:wn},isEdit:{type:Boolean}},setup(e){const t=e,n=h.ref(""),r=h.ref("1"),i=h.ref({});let o,a,s;h.watch(()=>t.modeler,()=>{t.modeler&&(o=t.modeler,c())}),h.watch(i,(d,f)=>{d===f&&u()},{deep:!0});function l(d){if(!(d!=null&&d.businessObject)||s===d)return;s=d;const f=d.businessObject;n.value=f.$type;const p={id:f.id,name:f.name,...f.$attrs,approvalSign:f.$attrs["camunda:countersign"]==="true"?"countersign":"orSign",approvalCheckbox:[]};p["camunda:advice"]==="true"&&p.approvalCheckbox.push("advice"),p["camunda:attachment"]==="true"&&p.approvalCheckbox.push("attachment"),i.value=p}function c(){a=o.get("modeling"),o.on("element.click",d=>{l(d.element)}),o.on("selection.changed",d=>{if(d.newSelection.length)l(d.newSelection[0]);else{const f=o.get("canvas").getRootElement();l(f)}})}function u(){const d=i.value;function f(m){return m?"true":"false"}const p={id:d.id,name:d.name,"camunda:orSign":f(d.approvalSign==="orSign"),"camunda:countersign":f(d.approvalSign==="countersign"),"camunda:advice":f(d.approvalCheckbox.includes("advice")),"camunda:attachment":f(d.approvalCheckbox.includes("attachment"))};a.updateProperties(s,p)}return(d,f)=>{const p=bt,m=HT,v=wi,g=bd,x=Ks,w=an,b=hT,y=ca,_=Cd;return h.openBlock(),h.createElementBlock("div",XU,[h.unref(n)==="bpmn:Process"?(h.openBlock(),h.createBlock(x,{key:0,activeKey:h.unref(r),"onUpdate:activeKey":f[4]||(f[4]=S=>h.isRef(r)?r.value=S:null)},{default:h.withCtx(()=>[h.createVNode(g,{key:"1",header:"常规"},{default:h.withCtx(()=>[h.createVNode(v,{layout:"vertical",model:h.unref(i)},{default:h.withCtx(()=>[h.createVNode(m,{label:"编号"},{default:h.withCtx(()=>[h.createVNode(p,{value:h.unref(i).id,"onUpdate:value":f[0]||(f[0]=S=>h.unref(i).id=S),placeholder:"input placeholder",readonly:e.isEdit},null,8,["value","readonly"])]),_:1}),h.createVNode(m,{label:"名称"},{default:h.withCtx(()=>[h.createVNode(p,{value:h.unref(i).name,"onUpdate:value":f[1]||(f[1]=S=>h.unref(i).name=S),placeholder:"input placeholder"},null,8,["value"])]),_:1}),h.createVNode(m,{label:"版本号"},{default:h.withCtx(()=>[h.createVNode(p,{value:h.unref(i)["camunda:versionTag"],"onUpdate:value":f[2]||(f[2]=S=>h.unref(i)["camunda:versionTag"]=S),disabled:""},null,8,["value"])]),_:1})]),_:1},8,["model"])]),_:1}),h.createVNode(g,{key:"4",header:"规则设计"},{default:h.withCtx(()=>[h.createVNode(v,{layout:"vertical",model:h.unref(i)},{default:h.withCtx(()=>[h.createVNode(m,{label:"统一规则设计"},{default:h.withCtx(()=>[h.createVNode(p,{value:h.unref(i)["camunda:jobPriority"],"onUpdate:value":f[3]||(f[3]=S=>h.unref(i)["camunda:jobPriority"]=S),placeholder:"input placeholder",readonly:""},null,8,["value"])]),_:1})]),_:1},8,["model"])]),_:1})]),_:1},8,["activeKey"])):h.unref(n)==="bpmn:UserTask"?(h.openBlock(),h.createBlock(x,{key:1,activeKey:h.unref(r),"onUpdate:activeKey":f[13]||(f[13]=S=>h.isRef(r)?r.value=S:null)},{default:h.withCtx(()=>[h.createVNode(g,{key:"1",header:"常规"},{default:h.withCtx(()=>[h.createVNode(v,{layout:"vertical",model:h.unref(i)},{default:h.withCtx(()=>[h.createVNode(m,{label:"编号"},{default:h.withCtx(()=>[h.createVNode(p,{value:h.unref(i).id,"onUpdate:value":f[5]||(f[5]=S=>h.unref(i).id=S),placeholder:"input placeholder",readonly:""},null,8,["value"])]),_:1}),h.createVNode(m,{label:"名称"},{default:h.withCtx(()=>[h.createVNode(p,{value:h.unref(i).name,"onUpdate:value":f[6]||(f[6]=S=>h.unref(i).name=S),placeholder:"input placeholder",readonly:""},null,8,["value"])]),_:1}),h.createVNode(m,{label:"任务执行人"},{default:h.withCtx(()=>[h.createVNode(p,{value:h.unref(i)["camunda:versionTag"],"onUpdate:value":f[7]||(f[7]=S=>h.unref(i)["camunda:versionTag"]=S),placeholder:"input placeholder",disabled:""},null,8,["value"])]),_:1}),h.createVNode(m,{label:"分支机构"},{default:h.withCtx(()=>[h.createVNode(p,{value:h.unref(i)["camunda:versionTag"],"onUpdate:value":f[8]||(f[8]=S=>h.unref(i)["camunda:versionTag"]=S),placeholder:"input placeholder",disabled:""},null,8,["value"])]),_:1}),h.createVNode(m,{label:"操作员"},{default:h.withCtx(()=>[h.createVNode(p,{value:h.unref(i)["camunda:versionTag"],"onUpdate:value":f[9]||(f[9]=S=>h.unref(i)["camunda:versionTag"]=S),placeholder:"input placeholder",disabled:""},null,8,["value"])]),_:1}),h.createVNode(m,{label:"角色"},{default:h.withCtx(()=>[h.createVNode(p,{value:h.unref(i)["camunda:versionTag"],"onUpdate:value":f[10]||(f[10]=S=>h.unref(i)["camunda:versionTag"]=S),placeholder:"input placeholder",disabled:""},null,8,["value"])]),_:1})]),_:1},8,["model"])]),_:1}),h.createVNode(g,{key:"2",header:"本环节可多人审批时"},{default:h.withCtx(()=>[h.createVNode(b,{value:h.unref(i).approvalSign,"onUpdate:value":f[11]||(f[11]=S=>h.unref(i).approvalSign=S)},{default:h.withCtx(()=>[h.createVNode(w,{value:"orSign"},{default:h.withCtx(()=>f[22]||(f[22]=[h.createTextVNode("或签")])),_:1}),h.createVNode(w,{value:"countersign"},{default:h.withCtx(()=>f[23]||(f[23]=[h.createTextVNode("会签")])),_:1})]),_:1},8,["value"])]),_:1}),h.createVNode(g,{key:"3",header:"本环节审批时"},{default:h.withCtx(()=>[h.createVNode(_,{value:h.unref(i).approvalCheckbox,"onUpdate:value":f[12]||(f[12]=S=>h.unref(i).approvalCheckbox=S)},{default:h.withCtx(()=>[h.createVNode(y,{value:"advice"},{default:h.withCtx(()=>f[24]||(f[24]=[h.createTextVNode("必须填写意见")])),_:1}),h.createVNode(y,{value:"attachment"},{default:h.withCtx(()=>f[25]||(f[25]=[h.createTextVNode("必须上传附件")])),_:1})]),_:1},8,["value"])]),_:1})]),_:1},8,["activeKey"])):h.unref(n)==="bpmn:EndEvent"?(h.openBlock(),h.createBlock(x,{key:2,activeKey:h.unref(r),"onUpdate:activeKey":f[18]||(f[18]=S=>h.isRef(r)?r.value=S:null)},{default:h.withCtx(()=>[h.createVNode(g,{key:"1",header:"常规"},{default:h.withCtx(()=>[h.createVNode(v,{layout:"vertical",model:h.unref(i)},{default:h.withCtx(()=>[h.createVNode(m,{label:"编号"},{default:h.withCtx(()=>[h.createVNode(p,{value:h.unref(i).id,"onUpdate:value":f[14]||(f[14]=S=>h.unref(i).id=S),placeholder:"input placeholder",readonly:""},null,8,["value"])]),_:1}),h.createVNode(m,{label:"名称"},{default:h.withCtx(()=>[h.createVNode(p,{value:h.unref(i).name,"onUpdate:value":f[15]||(f[15]=S=>h.unref(i).name=S),placeholder:"input placeholder",readonly:""},null,8,["value"])]),_:1})]),_:1},8,["model"])]),_:1}),h.createVNode(g,{key:"2",header:"本环节可多人审批时"},{default:h.withCtx(()=>[h.createVNode(b,{value:h.unref(i).approvalSign,"onUpdate:value":f[16]||(f[16]=S=>h.unref(i).approvalSign=S)},{default:h.withCtx(()=>[h.createVNode(w,{value:"orSign"},{default:h.withCtx(()=>f[26]||(f[26]=[h.createTextVNode("或签")])),_:1}),h.createVNode(w,{value:"countersign"},{default:h.withCtx(()=>f[27]||(f[27]=[h.createTextVNode("会签")])),_:1})]),_:1},8,["value"])]),_:1}),h.createVNode(g,{key:"3",header:"本环节审批时"},{default:h.withCtx(()=>[h.createVNode(_,{value:h.unref(i).approvalCheckbox,"onUpdate:value":f[17]||(f[17]=S=>h.unref(i).approvalCheckbox=S)},{default:h.withCtx(()=>[h.createVNode(y,{value:"advice"},{default:h.withCtx(()=>f[28]||(f[28]=[h.createTextVNode("必须填写意见")])),_:1}),h.createVNode(y,{value:"attachment"},{default:h.withCtx(()=>f[29]||(f[29]=[h.createTextVNode("必须上传附件")])),_:1})]),_:1},8,["value"])]),_:1})]),_:1},8,["activeKey"])):(h.openBlock(),h.createBlock(x,{key:3,activeKey:h.unref(r),"onUpdate:activeKey":f[21]||(f[21]=S=>h.isRef(r)?r.value=S:null)},{default:h.withCtx(()=>[h.createVNode(g,{key:"1",header:"常规"},{default:h.withCtx(()=>[h.createVNode(v,{layout:"vertical",model:h.unref(i)},{default:h.withCtx(()=>[h.createVNode(m,{label:"编号"},{default:h.withCtx(()=>[h.createVNode(p,{value:h.unref(i).id,"onUpdate:value":f[19]||(f[19]=S=>h.unref(i).id=S),placeholder:"input placeholder"},null,8,["value"])]),_:1}),h.createVNode(m,{label:"名称"},{default:h.withCtx(()=>[h.createVNode(p,{value:h.unref(i).name,"onUpdate:value":f[20]||(f[20]=S=>h.unref(i).name=S),placeholder:"input placeholder"},null,8,["value"])]),_:1})]),_:1},8,["model"])]),_:1})]),_:1},8,["activeKey"]))])}}}),Gg=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},rP=Gg(ZU,[["__scopeId","data-v-f8236665"]]),QU={class:"properties-toolbar"},iP=Gg(h.defineComponent({__name:"BpmnToolbar",props:{modeler:{type:wn}},emits:["save"],setup(e,{emit:t}){const n=e,r=t;let i,o,a;const s=h.ref(!1),l=h.ref(!1);h.watch(()=>n.modeler,()=>{n.modeler&&(i=n.modeler,c())});function c(){i.get("modeling"),o=i.get("commandStack"),a=i.get("canvas"),i.on("element.changed",v=>{s.value=o.canUndo(),l.value=o.canRedo()})}function u(){o.undo()}function d(){o.redo()}function f(){a.zoom("fit-viewport")}function p(){i.clear(),o.clear(),s.value=!1,l.value=!1,i.createDiagram()}function m(){r("save")}return(v,g)=>{const x=aa;return h.openBlock(),h.createElementBlock("div",QU,[h.createVNode(x,{type:"primary",disabled:!h.unref(s),onClick:g[0]||(g[0]=w=>u())},{default:h.withCtx(()=>g[5]||(g[5]=[h.createTextVNode("撤销 ")])),_:1},8,["disabled"]),h.createVNode(x,{type:"primary",disabled:!h.unref(l),onClick:g[1]||(g[1]=w=>d())},{default:h.withCtx(()=>g[6]||(g[6]=[h.createTextVNode("恢复 ")])),_:1},8,["disabled"]),h.createVNode(x,{type:"primary",onClick:g[2]||(g[2]=w=>f())},{default:h.withCtx(()=>g[7]||(g[7]=[h.createTextVNode("自适应")])),_:1}),h.createVNode(x,{type:"primary",onClick:g[3]||(g[3]=w=>p())},{default:h.withCtx(()=>g[8]||(g[8]=[h.createTextVNode("清空")])),_:1}),h.createVNode(x,{type:"primary",onClick:g[4]||(g[4]=w=>m())},{default:h.withCtx(()=>g[9]||(g[9]=[h.createTextVNode("保存")])),_:1})])}}}),[["__scopeId","data-v-9ec3663f"]]),JU={class:"wrapper"},Ug={Bpmn:Gg(h.defineComponent({__name:"index",setup(e){const t=h.ref(!0),n=h.shallowRef();function r(){n.value=new wn({container:"#canvas"})}function i(){Xw.getBpmnByCode({code:"A1728888290458018515"}).then(a=>{var s;if(a.code===0){const l=a.result.text;(s=n.value)==null||s.importXML(l)}})}h.onMounted(()=>{var a;r(),t.value?i():(a=n.value)==null||a.createDiagram()});function o(){var a;(a=n.value)==null||a.saveXML({format:!0}).then(({error:s,xml:l})=>{if(s){Gn.notification.error({message:"Unknow error",description:"err"});return}const c={text:l};Xw.bpmnUpdate(c).then(()=>{})})}return(a,s)=>(h.openBlock(),h.createElementBlock("div",JU,[s[0]||(s[0]=h.createElementVNode("div",{id:"canvas"},null,-1)),h.createVNode(iP,{modeler:h.unref(n),onSave:o},null,8,["modeler"]),h.createVNode(rP,{modeler:h.unref(n),isEdit:h.unref(t)},null,8,["modeler","isEdit"])]))}}),[["__scopeId","data-v-671acdd9"]]),BpmnPropertiesPanel:rP,BpmnToolbar:iP},oP=Yw("witlink-http-config",{});function eq(e){oP.value.token=e.token}function tq(e,t){t.baseUrl&&(oP.value.baseUrl=t.baseUrl),Object.keys(Ug).forEach(n=>{e.component(n,Ug[n])})}return{install:tq,setHttpConfig:eq,...Ug}});
|