@leadal/flowstream-ui-plus 0.0.4 → 0.0.6
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 +14 -5
- package/dist/flowstream-ui-plus.js +2834 -2808
- package/dist/flowstream-ui-plus.umd.cjs +10 -10
- package/dist/index.d.ts +27 -8
- package/dist/style.css +1 -1
- package/docs//346/216/245/345/205/245/346/226/207/346/241/243.md +13 -4
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
(function(ue,ge){typeof exports=="object"&&typeof module<"u"?ge(exports,require("element-plus"),require("vue")):typeof define=="function"&&define.amd?define(["exports","element-plus","vue"],ge):(ue=typeof globalThis<"u"?globalThis:ue||self,ge(ue.FlowstreamUIPlus={},ue.ElementPlus,ue.Vue))})(this,(function(ue,ge,l){"use strict";/*! Element Plus Icons Vue v2.3.2 */var Zs=l.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"})]))}}),Qs=Zs,el=l.defineComponent({name:"ArrowUp",__name:"arrow-up",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),tl=el,nl=l.defineComponent({name:"Back",__name:"back",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),l.createElementVNode("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}}),Yi=nl,rl=l.defineComponent({name:"Check",__name:"check",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),Ki=rl,il=l.defineComponent({name:"CircleClose",__name:"circle-close",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),l.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),ol=il,al=l.defineComponent({name:"Delete",__name:"delete",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),sl=al,ll=l.defineComponent({name:"Document",__name:"document",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),cl=ll,ul=l.defineComponent({name:"Promotion",__name:"promotion",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"m64 448 832-320-128 704-446.08-243.328L832 192 242.816 545.472zm256 512V657.024L512 768z"})]))}}),fl=ul,dl=l.defineComponent({name:"RefreshLeft",__name:"refresh-left",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),Nn=dl,pl=l.defineComponent({name:"RefreshRight",__name:"refresh-right",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88"})]))}}),Pn=pl,hl=l.defineComponent({name:"Switch",__name:"switch",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M118.656 438.656a32 32 0 0 1 0-45.248L416 96l4.48-3.776A32 32 0 0 1 461.248 96l3.712 4.48a32.064 32.064 0 0 1-3.712 40.832L218.56 384H928a32 32 0 1 1 0 64H141.248a32 32 0 0 1-22.592-9.344M64 608a32 32 0 0 1 32-32h786.752a32 32 0 0 1 22.656 54.592L608 928l-4.48 3.776a32.064 32.064 0 0 1-40.832-49.024L805.632 640H96a32 32 0 0 1-32-32"})]))}}),Gi=hl,ml=l.defineComponent({name:"VideoPause",__name:"video-pause",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-96-544q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32m192 0q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32"})]))}}),yl=ml,gl=l.defineComponent({name:"VideoPlay",__name:"video-play",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-48-247.616L668.608 512 464 375.616zm10.624-342.656 249.472 166.336a48 48 0 0 1 0 79.872L474.624 718.272A48 48 0 0 1 400 678.336V345.6a48 48 0 0 1 74.624-39.936z"})]))}}),Xi=gl;const vl={key:1,"aria-hidden":"true"},wl=["href"],bl=l.defineComponent({name:"SvgIcon",inheritAttrs:!1,__name:"SvgIcon",props:{iconClass:{},className:{}},setup(e){const t=e,n={back:Yi,delete:sl,save:cl,enable:Xi,start:Xi,hang:yl,restore:Pn,revocation:Nn,taskWithdraw:Nn,taskRecyle:Pn,terminate:ol,jump:Gi,taskJump:Gi,taskComplete:Ki,taskSend:fl,taskRollback:Yi,taskClaim:Ki,turnBefore:Nn,taskTurnBefore:Nn,turnAfter:Pn,taskTurnAfter:Pn},r=l.computed(()=>n[t.iconClass]);return(i,o)=>(l.openBlock(),l.createElementBlock("span",l.mergeProps({class:"workflow-svg-icon"},i.$attrs),[r.value?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r.value),{key:0})):(l.openBlock(),l.createElementBlock("svg",vl,[l.createElementVNode("use",{href:`#icon-${e.iconClass}`},null,8,wl)]))],16))}}),wt=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},El=wt(bl,[["__scopeId","data-v-7aad397e"]]),_l={class:"ui-flow-btn"},Ji=wt(l.defineComponent({name:"UiFlowButton",__name:"FlowButton",props:{type:{},label:{}},emits:["click"],setup(e,{emit:t}){const n=e,r=t,i=[{label:"保存",value:"save",icon:"save"},{label:"启动",value:"start",icon:"enable"},{label:"撤回",value:"revocation",icon:"taskWithdraw"},{label:"撤回",value:"taskWithdraw",icon:"taskWithdraw"},{label:"收回",value:"taskRecyle",icon:"taskRecyle"},{label:"挂起",value:"hang",icon:"hang"},{label:"恢复",value:"restore",icon:"restore"},{label:"恢复",value:"processActivate",icon:"restore"},{label:"终止",value:"terminate",icon:"terminate"},{label:"终止",value:"processTerminate",icon:"terminate"},{label:"挂起",value:"processSuspend",icon:"hang"},{label:"挂起",value:"processSupspend",icon:"hang"},{label:"跳转",value:"jump",icon:"jump"},{label:"跳转",value:"taskJump",icon:"jump"},{label:"办毕",value:"taskComplete",icon:"taskComplete"},{label:"发送",value:"taskSend",icon:"taskSend"},{label:"退回",value:"taskRollback",icon:"taskRollback"},{label:"拾取",value:"taskClaim",icon:"taskClaim"},{label:"前加签",value:"turnBefore",icon:"turnBefore"},{label:"前加签",value:"taskTurnBefore",icon:"turnBefore"},{label:"后加签",value:"turnAfter",icon:"turnAfter"},{label:"后加签",value:"taskTurnAfter",icon:"turnAfter"}],o=l.computed(()=>i.find(s=>s.value===n.type));function a(){var s;r("click",(s=o.value)==null?void 0:s.value)}return(s,f)=>{const d=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("span",_l,[o.value?(l.openBlock(),l.createBlock(d,{key:0,link:"",type:"primary",onClick:a},{default:l.withCtx(()=>[l.createVNode(El,{"icon-class":o.value.icon},null,8,["icon-class"]),l.createTextVNode(" "+l.toDisplayString(e.label||o.value.label),1)]),_:1})):(l.openBlock(),l.createBlock(d,{key:1,link:"",type:"primary",onClick:a},{default:l.withCtx(()=>[l.renderSlot(s.$slots,"default",{},void 0,!0)]),_:3}))])}}}),[["__scopeId","data-v-bb21bafe"]]);function Zi(e,t){return function(){return e.apply(t,arguments)}}const{toString:xl}=Object.prototype,{getPrototypeOf:Kt}=Object,{iterator:cn,toStringTag:Qi}=Symbol,Dn=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),un=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Dn(n,t))return!0;n=Kt(n)}return!1},Sl=(e,t)=>e!=null&&un(e,t)?e[t]:void 0,Er=(e=>t=>{const n=xl.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ke=e=>(e=e.toLowerCase(),t=>Er(t)===e),In=e=>t=>typeof t===e,{isArray:Dt}=Array,It=In("undefined");function Gt(e){return e!==null&&!It(e)&&e.constructor!==null&&!It(e.constructor)&&Ve(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const eo=Ke("ArrayBuffer");function Al(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&eo(e.buffer),t}const kl=In("string"),Ve=In("function"),to=In("number"),Xt=e=>e!==null&&typeof e=="object",Cl=e=>e===!0||e===!1,On=e=>{if(!Xt(e))return!1;const t=Kt(e);return(t===null||t===Object.prototype||Kt(t)===null)&&!un(e,Qi)&&!un(e,cn)},Rl=e=>{if(!Xt(e)||Gt(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Tl=Ke("Date"),Nl=Ke("File"),Pl=e=>!!(e&&typeof e.uri<"u"),Dl=e=>e&&typeof e.getParts<"u",Il=Ke("Blob"),Ol=Ke("FileList"),Bl=Ke("Set"),Ml=e=>Xt(e)&&Ve(e.pipe);function Ll(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const no=Ll(),ro=typeof no.FormData<"u"?no.FormData:void 0,Fl=e=>{if(!e)return!1;if(ro&&e instanceof ro)return!0;const t=Kt(e);if(!t||t===Object.prototype||!Ve(e.append))return!1;const n=Er(e);return n==="formdata"||n==="object"&&Ve(e.toString)&&e.toString()==="[object FormData]"},$l=Ke("URLSearchParams"),[Vl,jl,Ul,zl]=["ReadableStream","Request","Response","Headers"].map(Ke),Hl=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Dt(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(Gt(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let s;for(r=0;r<a;r++)s=o[r],t.call(null,e[s],s,e)}}function io(e,t){if(Gt(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Ot=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,oo=e=>!It(e)&&e!==Ot;function _r(...e){const{caseless:t,skipUndefined:n}=oo(this)&&this||{},r={},i=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const s=t&&typeof a=="string"&&io(r,a)||a,f=Dn(r,s)?r[s]:void 0;On(f)&&On(o)?r[s]=_r(f,o):On(o)?r[s]=_r({},o):Dt(o)?r[s]=o.slice():(!n||!It(o))&&(r[s]=o)};for(let o=0,a=e.length;o<a;o++){const s=e[o];if(!s||Gt(s)||(fn(s,i),typeof s!="object"||Dt(s)))continue;const f=Object.getOwnPropertySymbols(s);for(let d=0;d<f.length;d++){const h=f[d];nc.call(s,h)&&i(s[h],h)}}return r}const Wl=(e,t,n,{allOwnKeys:r}={})=>(fn(t,(i,o)=>{n&&Ve(i)?Object.defineProperty(e,o,{__proto__:null,value:Zi(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),ql=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Yl=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Kl=(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&Kt(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Gl=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Xl=e=>{if(!e)return null;if(Dt(e))return e;let t=e.length;if(!to(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Jl=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Kt(Uint8Array)),Zl=(e,t)=>{const r=(e&&e[cn]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},Ql=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ec=Ke("HTMLFormElement"),tc=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),{propertyIsEnumerable:nc}=Object.prototype,rc=Ke("RegExp"),ao=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};fn(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},ic=e=>{ao(e,(t,n)=>{if(Ve(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Ve(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},oc=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Dt(e)?r(e):r(String(e).split(t)),n},ac=()=>{},sc=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function lc(e){return!!(e&&Ve(e.append)&&e[Qi]==="FormData"&&e[cn])}const cc=e=>{const t=new WeakSet,n=r=>{if(Xt(r)){if(t.has(r))return;if(Gt(r))return r;if(!("toJSON"in r)){t.add(r);let i;if(Bl(r)){i=[];for(const o of r){const a=n(o);!It(a)&&i.push(a)}}else i=Dt(r)?[]:{},fn(r,(o,a)=>{const s=n(o);!It(s)&&(i[a]=s)});return t.delete(r),i}}return r};return n(e)},uc=Ke("AsyncFunction"),fc=e=>e&&(Xt(e)||Ve(e))&&Ve(e.then)&&Ve(e.catch),so=((e,t)=>e?setImmediate:t?((n,r)=>(Ot.addEventListener("message",({source:i,data:o})=>{i===Ot&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Ot.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ve(Ot.postMessage)),dc=typeof queueMicrotask<"u"?queueMicrotask.bind(Ot):typeof process<"u"&&process.nextTick||so,lo=e=>e!=null&&Ve(e[cn]),w={isArray:Dt,isArrayBuffer:eo,isBuffer:Gt,isFormData:Fl,isArrayBufferView:Al,isString:kl,isNumber:to,isBoolean:Cl,isObject:Xt,isPlainObject:On,isEmptyObject:Rl,isReadableStream:Vl,isRequest:jl,isResponse:Ul,isHeaders:zl,isUndefined:It,isDate:Tl,isFile:Nl,isReactNativeBlob:Pl,isReactNative:Dl,isBlob:Il,isRegExp:rc,isFunction:Ve,isStream:Ml,isURLSearchParams:$l,isTypedArray:Jl,isFileList:Ol,forEach:fn,merge:_r,extend:Wl,trim:Hl,stripBOM:ql,inherits:Yl,toFlatObject:Kl,kindOf:Er,kindOfTest:Ke,endsWith:Gl,toArray:Xl,forEachEntry:Zl,matchAll:Ql,isHTMLForm:ec,hasOwnProperty:Dn,hasOwnProp:Dn,hasOwnInPrototypeChain:un,getSafeProp:Sl,reduceDescriptors:ao,freezeMethods:ic,toObjectSet:oc,toCamelCase:tc,noop:ac,toFiniteNumber:sc,findKey:io,global:Ot,isContextDefined:oo,isSpecCompliantForm:lc,toJSONObject:cc,isAsyncFn:uc,isThenable:fc,setImmediate:so,asap:dc,isIterable:lo,isSafeIterable:e=>e!=null&&un(e,cn)&&lo(e)},pc=w.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),hc=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
2
|
-
`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim();const s=w.hasOwnProp(t,n);!n||s&&w.hasOwnProp(pc,n)||(n==="set-cookie"?s?t[n].push(r):t[n]=[r]:t[n]=s?t[n]+", "+r:r)}),t};function mc(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const yc=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),gc=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function xr(e,t){return w.isArray(e)?e.map(n=>xr(n,t)):mc(String(e).replace(t,""))}const vc=e=>xr(e,yc),wc=e=>xr(e,gc);function co(e){const t=Object.create(null);return w.forEach(e.toJSON(),(n,r)=>{t[r]=wc(n)}),t}const uo=Symbol("internals");function dn(e){return e&&String(e).trim().toLowerCase()}function Bn(e){return e===!1||e==null?e:w.isArray(e)?e.map(Bn):vc(String(e))}function bc(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Ec=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Sr(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function _c(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let r=1;r<t;r++){const i=e.charCodeAt(r);if(i===34||i===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function xc(e){const t=Object.create(null),n=String(e);let r=0,i=!1,o=!1;function a(s){const f=Sr(n.slice(r,s)),d=f.indexOf("=");if(d<1)return;const h=Sr(f.slice(0,d));if(!Ec.test(h))return;const m=h.toLowerCase();if(m==="__proto__"||m==="constructor"||m==="prototype")return;const
|
|
3
|
-
`)}getSetCookie(){const t=this.get("set-cookie");return w.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return xc(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[uo]=this[uo]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=dn(a);r[s]||(kc(i,a),r[s]=!0)}return w.isArray(t)?t.forEach(o):o(t),this}};Be.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),w.reduceDescriptors(Be.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),w.freezeMethods(Be);const Mn="[REDACTED ****]";function Cc(e){if(w.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(w.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Rc(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],i=o=>{if(o===null||typeof o!="object"||w.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof Be&&(o=o.toJSON()),r.push(o);let a;if(w.isArray(o))a=[],o.forEach((s,f)=>{const d=i(s);w.isUndefined(d)||(a[f]=d)});else{if(!w.isPlainObject(o)&&Cc(o))return r.pop(),o;a=Object.create(null);for(const[s,f]of Object.entries(o)){const d=n.has(s.toLowerCase())?Mn:i(f);w.isUndefined(d)||(a[s]=d)}}return r.pop(),a};return i(e)}function fo(e){try{return String(e)}catch{return""}}function Tc(e){return e.errors.map(n=>{try{return n&&n.message?fo(n.message):fo(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let ie=class Xs extends Error{static from(t,n,r,i,o,a){let s=t.message;!s&&w.isArray(t.errors)&&t.errors.length&&(s=Tc(t));const f=new Xs(s,n||t.code,r,i,o);return Object.defineProperty(f,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),f.name=t.name,t.status!=null&&f.status==null&&(f.status=t.status),a&&Object.assign(f,a),f}constructor(t,n,r,i,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,n=t&&w.hasOwnProp(t,"redact")?t.redact:void 0,r=w.isArray(n)&&n.length>0?Rc(t,n):w.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};ie.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",ie.ERR_BAD_OPTION="ERR_BAD_OPTION",ie.ECONNABORTED="ECONNABORTED",ie.ETIMEDOUT="ETIMEDOUT",ie.ECONNREFUSED="ECONNREFUSED",ie.ERR_NETWORK="ERR_NETWORK",ie.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",ie.ERR_DEPRECATED="ERR_DEPRECATED",ie.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",ie.ERR_BAD_REQUEST="ERR_BAD_REQUEST",ie.ERR_CANCELED="ERR_CANCELED",ie.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",ie.ERR_INVALID_URL="ERR_INVALID_URL",ie.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Nc=null,po=100;function kr(e){return w.isPlainObject(e)||w.isArray(e)}function ho(e){return w.endsWith(e,"[]")?e.slice(0,-2):e}function Cr(e,t,n){return e?e.concat(t).map(function(i,o){return i=ho(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function Pc(e){return w.isArray(e)&&!e.some(kr)}const Dc=w.toFlatObject(w,{},null,function(t){return/^is[A-Z]/.test(t)});function Ln(e,t,n){if(!w.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=w.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(I,y){return!w.isUndefined(y[I])});const r=n.metaTokens,i=n.visitor||G,o=n.dots,a=n.indexes,s=n.Blob||typeof Blob<"u"&&Blob,f=n.maxDepth===void 0?po:n.maxDepth,d=s&&w.isSpecCompliantForm(t),h=[];if(!w.isFunction(i))throw new TypeError("visitor must be a function");function m(S){if(S===null)return"";if(w.isDate(S))return S.toISOString();if(w.isBoolean(S))return S.toString();if(!d&&w.isBlob(S))throw new ie("Blob is not supported. Use a Buffer instead.");if(w.isArrayBuffer(S)||w.isTypedArray(S)){if(d&&typeof s=="function")return new s([S]);throw new ie("Blob is not supported. Use a Buffer instead.",ie.ERR_NOT_SUPPORT)}return S}function A(S){if(S>f)throw new ie("Object is too deeply nested ("+S+" levels). Max depth: "+f,ie.ERR_FORM_DATA_DEPTH_EXCEEDED)}function V(S,I){if(f===1/0)return JSON.stringify(S);const y=[];return JSON.stringify(S,function(k,T){if(!w.isObject(T))return T;for(;y.length&&y[y.length-1]!==this;)y.pop();return y.push(T),A(I+y.length-1),T})}function G(S,I,y){let v=S;if(w.isReactNative(t)&&w.isReactNativeBlob(S))return t.append(Cr(y,I,o),m(S)),!1;if(S&&!y&&typeof S=="object"){if(w.endsWith(I,"{}"))I=r?I:I.slice(0,-2),S=V(S,1);else if(w.isArray(S)&&Pc(S)||(w.isFileList(S)||w.endsWith(I,"[]"))&&(v=w.toArray(S)))return I=ho(I),v.forEach(function(T,E){!(w.isUndefined(T)||T===null)&&t.append(a===!0?Cr([I],E,o):a===null?I:I+"[]",m(T))}),!1}return kr(S)?!0:(t.append(Cr(y,I,o),m(S)),!1)}const $=Object.assign(Dc,{defaultVisitor:G,convertValue:m,isVisitable:kr});function M(S,I,y=0){if(!w.isUndefined(S)){if(A(y),h.indexOf(S)!==-1)throw new Error("Circular reference detected in "+I.join("."));h.push(S),w.forEach(S,function(k,T){(!(w.isUndefined(k)||k===null)&&i.call(t,k,w.isString(T)?T.trim():T,I,$))===!0&&M(k,I?I.concat(T):[T],y+1)}),h.pop()}}if(!w.isObject(e))throw new TypeError("data must be an object");return M(e),t}function mo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Rr(e,t){this._pairs=[],e&&Ln(e,this,t)}const yo=Rr.prototype;yo.append=function(t,n){this._pairs.push([t,n])},yo.toString=function(t){const n=t?r=>t.call(this,r,mo):mo;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Ic(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function go(e,t,n){if(!t)return e;e=e||"";const r=w.isFunction(n)?{serialize:n}:n,i=w.getSafeProp(r,"encode")||Ic,o=w.getSafeProp(r,"serialize");let a;if(o?a=o(t,r):a=w.isURLSearchParams(t)?t.toString():new Rr(t,r).toString(i),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class vo{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){w.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Tr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Oc={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Rr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Nr=typeof window<"u"&&typeof document<"u",Pr=typeof navigator=="object"&&navigator||void 0,Bc=Nr&&(!Pr||["ReactNative","NativeScript","NS"].indexOf(Pr.product)<0),Mc=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Lc=Nr&&window.location.href||"http://localhost",De={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Nr,hasStandardBrowserEnv:Bc,hasStandardBrowserWebWorkerEnv:Mc,navigator:Pr,origin:Lc},Symbol.toStringTag,{value:"Module"})),...Oc};function Fc(e,t){return Ln(e,new De.classes.URLSearchParams,{visitor:function(n,r,i,o){return De.isNode&&w.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const wo=po;function bo(e){if(e>wo)throw new ie("FormData field is too deeply nested ("+e+" levels). Max depth: "+wo,ie.ERR_FORM_DATA_DEPTH_EXCEEDED)}function $c(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)bo(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function Vc(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function Eo(e){function t(n,r,i,o){bo(o);let a=n[o++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),f=o>=n.length;return a=!a&&w.isArray(i)?i.length:a,f?(w.hasOwnProp(i,a)?i[a]=w.isArray(i[a])?i[a].concat(r):[i[a],r]:i[a]=r,!s):((!w.hasOwnProp(i,a)||!w.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&w.isArray(i[a])&&(i[a]=Vc(i[a])),!s)}if(w.isFormData(e)&&w.isFunction(e.entries)){const n={};return w.forEachEntry(e,(r,i)=>{t($c(r),i,n,0)}),n}return null}const Jt=(e,t)=>e!=null&&w.hasOwnProp(e,t)?e[t]:void 0;function jc(e,t,n){if(w.isString(e))try{return(t||JSON.parse)(e),w.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const pn={transitional:Tr,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=w.isObject(t);if(o&&w.isHTMLForm(t)&&(t=new FormData(t)),w.isFormData(t))return i?JSON.stringify(Eo(t)):t;if(w.isArrayBuffer(t)||w.isBuffer(t)||w.isStream(t)||w.isFile(t)||w.isBlob(t)||w.isReadableStream(t))return t;if(w.isArrayBufferView(t))return t.buffer;if(w.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){const f=Jt(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Fc(t,f).toString();if((s=w.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=Jt(this,"env"),h=d&&d.FormData;return Ln(s?{"files[]":t}:t,h&&new h,f)}}return o||i?(n.setContentType("application/json",!1),jc(t)):t}],transformResponse:[function(t){const n=Jt(this,"transitional")||pn.transitional,r=n&&n.forcedJSONParsing,i=Jt(this,"responseType"),o=i==="json";if(w.isResponse(t)||w.isReadableStream(t))return t;if(t&&w.isString(t)&&(r&&!i||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,Jt(this,"parseReviver"))}catch(f){if(s)throw f.name==="SyntaxError"?ie.from(f,ie.ERR_BAD_RESPONSE,this,null,Jt(this,"response")):f}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:De.classes.FormData,Blob:De.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};w.forEach(["delete","get","head","post","put","patch","query"],e=>{pn.headers[e]={}});function Dr(e,t){const n=this||pn,r=t||n,i=Be.from(r.headers);let o=r.data;return w.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function _o(e){return!!(e&&e.__CANCEL__)}let hn=class extends ie{constructor(t,n,r){super(t??"canceled",ie.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function xo(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ie("Request failed with status code "+n.status,n.status>=400&&n.status<500?ie.ERR_BAD_REQUEST:ie.ERR_BAD_RESPONSE,n.config,n.request,n))}function Uc(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function zc(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(f){const d=Date.now(),h=r[o];a||(a=d),n[i]=f,r[i]=d;let m=o,A=0;for(;m!==i;)A+=n[m++],m=m%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),d-a<t)return;const V=h&&d-h;return V?Math.round(A*1e3/V):void 0}}function Hc(e,t){let n=0,r=1e3/t,i,o;const a=(d,h=Date.now())=>{n=h,i=null,o&&(clearTimeout(o),o=null),e(...d)};return[(...d)=>{const h=Date.now(),m=h-n;m>=r?a(d,h):(i=d,o||(o=setTimeout(()=>{o=null,a(i)},r-m)))},()=>i&&a(i)]}const Fn=(e,t,n=3)=>{let r=0;const i=zc(50,250);return Hc(o=>{if(!o||typeof o.loaded!="number")return;const a=o.loaded,s=o.lengthComputable?o.total:void 0,f=Math.max(0,s!=null?Math.min(a,s):a),d=Math.max(0,f-r),h=i(d);r=Math.max(r,f);const m={loaded:f,total:s,progress:s?f/s:void 0,bytes:d,rate:h||void 0,estimated:h&&s?(s-f)/h:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(m)},n)},So=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ao=(e,t=w.asap)=>(...n)=>t(()=>e(...n)),Wc=De.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,De.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(De.origin),De.navigator&&/(msie|trident)/i.test(De.navigator.userAgent)):()=>!0,qc=De.hasStandardBrowserEnv?{write(e,t,n,r,i,o,a){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];w.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),w.isString(r)&&s.push(`path=${r}`),w.isString(i)&&s.push(`domain=${i}`),o===!0&&s.push("secure"),w.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),i=r.indexOf("=");if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Yc(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Kc(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const Gc=/^https?:(?!\/\/)/i,Xc=/[\t\n\r]/g;function Jc(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Zc(e){return Jc(e).replace(Xc,"")}function Qc(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${Mn}`)}function eu(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Mn}@`),n=t.indexOf("#"),i=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Mn}`);return n===-1?i:`${i}#${Qc(t.slice(n+1))}`}function ko(e,t){if(typeof e=="string"){const n=Zc(e);if(Gc.test(n))throw new ie(`Invalid URL ${JSON.stringify(eu(n))}: missing "//" after protocol`,ie.ERR_INVALID_URL,t)}}function Co(e,t,n,r){ko(t,r);let i=!Yc(t);return e&&(i||n===!1)?(ko(e,r),Kc(e,t)):t}const Ro=e=>e instanceof Be?{...e}:e,tu=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function Bt(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(h,m,A,V){return w.isPlainObject(h)&&w.isPlainObject(m)?w.merge.call({caseless:V},h,m):w.isPlainObject(m)?w.merge({},m):w.isArray(m)?m.slice():m}function i(h,m,A,V){if(w.isUndefined(m)){if(!w.isUndefined(h))return r(void 0,h,A,V)}else return r(h,m,A,V)}function o(h,m){if(!w.isUndefined(m))return r(void 0,m)}function a(h,m){if(w.isUndefined(m)){if(!w.isUndefined(h))return r(void 0,h)}else return r(void 0,m)}function s(h){const m=w.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!w.isUndefined(m))if(w.isPlainObject(m)){if(w.hasOwnProp(m,h))return m[h]}else return;const A=w.hasOwnProp(e,"transitional")?e.transitional:void 0;if(w.isPlainObject(A)&&w.hasOwnProp(A,h))return A[h]}function f(h,m,A){if(w.hasOwnProp(t,A))return r(h,m);if(w.hasOwnProp(e,A))return r(void 0,h)}const d={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:f,headers:(h,m,A)=>i(Ro(h),Ro(m),A,!0)};return w.forEach(tu({...e,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const A=w.hasOwnProp(d,m)?d[m]:i,V=w.hasOwnProp(e,m)?e[m]:void 0,G=w.hasOwnProp(t,m)?t[m]:void 0,$=A(V,G,m);w.isUndefined($)&&A!==f||(n[m]=$)}),w.hasOwnProp(t,"validateStatus")&&w.isUndefined(t.validateStatus)&&s("validateStatusUndefinedResolves")===!1&&(w.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const nu=["content-type","content-length"];function ru(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,i])=>{nu.includes(r.toLowerCase())&&e.set(r,i)})}const iu=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function To(e){const t=Bt({},e),n=A=>w.hasOwnProp(t,A)?t[A]:void 0,r=n("data");let i=n("withXSRFToken");const o=n("xsrfHeaderName"),a=n("xsrfCookieName");let s=n("headers");const f=n("auth"),d=n("baseURL"),h=n("allowAbsoluteUrls"),m=n("url");if(t.headers=s=Be.from(s),t.url=go(Co(d,m,h,t),n("params"),n("paramsSerializer")),f){const A=w.getSafeProp(f,"username")||"",V=w.getSafeProp(f,"password")||"";try{s.set("Authorization","Basic "+btoa(A+":"+(V?iu(V):"")))}catch(G){throw ie.from(G,ie.ERR_BAD_OPTION_VALUE,e)}}if(w.isFormData(r)&&(De.hasStandardBrowserEnv||De.hasStandardBrowserWebWorkerEnv||w.isReactNative(r)?s.setContentType(void 0):w.isFunction(r.getHeaders)&&ru(s,r.getHeaders(),n("formDataHeaderPolicy"))),De.hasStandardBrowserEnv&&(w.isFunction(i)&&(i=i(t)),i===!0||i==null&&Wc(t.url))){const V=o&&a&&qc.read(a);V&&s.set(o,V)}return t}const ou=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=To(e);let o=i.data;const a=Be.from(i.headers).normalize();let{responseType:s,onUploadProgress:f,onDownloadProgress:d}=i,h,m,A,V,G;function $(){V&&V(),G&&G(),i.cancelToken&&i.cancelToken.unsubscribe(h),i.signal&&i.signal.removeEventListener("abort",h)}let M=new XMLHttpRequest;M.open(i.method.toUpperCase(),i.url,!0),M.timeout=i.timeout;function S(){if(!M)return;const y=Be.from("getAllResponseHeaders"in M&&M.getAllResponseHeaders()),k={data:!s||s==="text"||s==="json"?M.responseText:M.response,status:M.status,statusText:M.statusText,headers:y,config:e,request:M};xo(function(E){n(E),$()},function(E){r(E),$()},k),M=null}"onloadend"in M?M.onloadend=S:M.onreadystatechange=function(){!M||M.readyState!==4||M.status===0&&!(M.responseURL&&M.responseURL.startsWith("file:"))||setTimeout(S)},M.onabort=function(){M&&(r(new ie("Request aborted",ie.ECONNABORTED,e,M)),$(),M=null)},M.onerror=function(v){const k=v&&v.message?v.message:"Network Error",T=new ie(k,ie.ERR_NETWORK,e,M);T.event=v||null,r(T),$(),M=null},M.ontimeout=function(){let v=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const k=i.transitional||Tr;i.timeoutErrorMessage&&(v=i.timeoutErrorMessage),r(new ie(v,k.clarifyTimeoutError?ie.ETIMEDOUT:ie.ECONNABORTED,e,M)),$(),M=null},o===void 0&&a.setContentType(null),"setRequestHeader"in M&&w.forEach(co(a),function(v,k){M.setRequestHeader(k,v)}),w.isUndefined(i.withCredentials)||(M.withCredentials=!!i.withCredentials),s&&s!=="json"&&(M.responseType=i.responseType),d&&([A,G]=Fn(d,!0),M.addEventListener("progress",A)),f&&M.upload&&([m,V]=Fn(f),M.upload.addEventListener("progress",m),M.upload.addEventListener("loadend",V)),(i.cancelToken||i.signal)&&(h=y=>{M&&(r(!y||y.type?new hn(null,e,M):y),M.abort(),$(),M=null)},i.cancelToken&&i.cancelToken.subscribe(h),i.signal&&(i.signal.aborted?h():i.signal.addEventListener("abort",h)));const I=Uc(i.url);if(I&&!De.protocols.includes(I)){r(new ie("Unsupported protocol "+I+":",ie.ERR_BAD_REQUEST,e)),$();return}M.send(o||null)})},au=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const i=function(f){if(!r){r=!0,a();const d=f instanceof Error?f:this.reason;n.abort(d instanceof ie?d:new hn(d instanceof Error?d.message:d))}};let o=t&&setTimeout(()=>{o=null,i(new ie(`timeout of ${t}ms exceeded`,ie.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(i):f.removeEventListener("abort",i)}),e=null)};e.forEach(f=>{if(!r){if(f.aborted){i.call(f);return}f.addEventListener("abort",i,{once:!0})}});const{signal:s}=n;return s.unsubscribe=()=>w.asap(a),s},su=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},lu=async function*(e,t){for await(const n of cu(e))yield*su(n,t)},cu=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},No=(e,t,n,r)=>{const i=lu(e,t);let o=0,a,s=f=>{a||(a=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:d,value:h}=await i.next();if(d){s(),f.close();return}let m=h.byteLength;if(n){let A=o+=m;n(A)}f.enqueue(new Uint8Array(h))}catch(d){throw s(d),d}},cancel(f){return s(f),i.return()}},{highWaterMark:2})},Po=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Do=(e,t,n)=>t+2<n&&Po(e.charCodeAt(t+1))&&Po(e.charCodeAt(t+2)),Io=e=>e<=57?e-48:(e&223)-55,uu=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,fu=e=>e===9||e===10||e===12||e===13||e===32,du=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},pu=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},hu=e=>{const t=e.length;let n=0,r=0,i=!1;for(let o=0;o<t;o++){let a=e.charCodeAt(o);if(a===37&&Do(e,o,t)&&(a=Io(e.charCodeAt(o+1))*16+Io(e.charCodeAt(o+2)),o+=2),!fu(a)){if(a===61){r++;continue}if(!uu(a)||r>0){i=!0;continue}n++}}return i||r>2||r>0&&(n+r)%4!==0||n%4===1?pu(e):du(n)},mu=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),i=e.slice(n+1);if(/;base64/i.test(r))return t(i);let a=0;for(let s=0,f=i.length;s<f;s++){const d=i.charCodeAt(s);if(d===37&&Do(i,s,f))a+=1,s+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&s+1<f){const h=i.charCodeAt(s+1);h>=56320&&h<=57343?(a+=4,s++):a+=3}else a+=3}return a};function yu(e){const t=typeof e=="string"?e.indexOf("#"):-1;return mu(t===-1?e:e.slice(0,t),hu)}const Ir="1.19.0",Oo=64*1024,{isFunction:$n}=w,gu=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Bo=e=>{if(!w.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Mo=(e,...t)=>{try{return!!e(...t)}catch{return!1}},vu=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},wu=e=>{const t=w.global!==void 0&&w.global!==null?w.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=w.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:o,Response:a}=e,s=i?$n(i):typeof fetch=="function",f=$n(o),d=$n(a);if(!s)return!1;const h=s&&$n(n),m=s&&(typeof r=="function"?(S=>I=>S.encode(I))(new r):async S=>new Uint8Array(await new o(S).arrayBuffer())),A=f&&h&&Mo(()=>{let S=!1;const I=new o(De.origin,{body:new n,method:"POST",get duplex(){return S=!0,"half"}}),y=I.headers.has("Content-Type");return I.body!=null&&I.body.cancel(),S&&!y}),V=d&&h&&Mo(()=>w.isReadableStream(new a("").body)),G={stream:V&&(S=>S.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!G[S]&&(G[S]=(I,y)=>{let v=I&&I[S];if(v)return v.call(I);throw new ie(`Response type '${S}' is not supported`,ie.ERR_NOT_SUPPORT,y)})});const $=async S=>{if(S==null)return 0;if(w.isBlob(S))return S.size;if(w.isSpecCompliantForm(S))return(await new o(De.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(w.isArrayBufferView(S)||w.isArrayBuffer(S))return S.byteLength;if(w.isURLSearchParams(S)&&(S=S+""),w.isString(S))return(await m(S)).byteLength},M=async(S,I)=>{const y=w.toFiniteNumber(S.getContentLength());return y??$(I)};return async S=>{let{url:I,method:y,data:v,signal:k,cancelToken:T,timeout:E,onDownloadProgress:x,onUploadProgress:H,responseType:B,headers:_,withCredentials:q="same-origin",fetchOptions:ae,maxContentLength:J,maxBodyLength:K}=To(S);const X=w.isNumber(J)&&J>-1,re=w.isNumber(K)&&K>-1,Q=se=>w.hasOwnProp(S,se)?S[se]:void 0;let O=i||fetch;B=B?(B+"").toLowerCase():"text";let D=au([k,T&&T.toAbortSignal()],E),F=null;const C=D&&D.unsubscribe&&(()=>{D.unsubscribe()});let R,j=null;const de=()=>new ie("Request body larger than maxBodyLength limit",ie.ERR_BAD_REQUEST,S,F);try{let se;const p=Q("auth");if(p){const W=w.getSafeProp(p,"username")||"",te=w.getSafeProp(p,"password")||"";se={username:W,password:te}}if(vu(I)){const W=new URL(I,De.origin);if(!se&&(W.username||W.password)){const te=Bo(W.username),U=Bo(W.password);se={username:te,password:U}}(W.username||W.password)&&(W.username="",W.password="",I=W.href)}if(se&&(_.delete("authorization"),_.set("Authorization","Basic "+btoa(gu((se.username||"")+":"+(se.password||""))))),X&&typeof I=="string"&&I.startsWith("data:")&&yu(I)>J)throw new ie("maxContentLength size of "+J+" exceeded",ie.ERR_BAD_RESPONSE,S,F);if(re&&y!=="get"&&y!=="head"){const W=await $(v);if(typeof W=="number"&&isFinite(W)&&(R=W,W>K))throw de()}const u=re&&(w.isReadableStream(v)||w.isStream(v)),c=(W,te,U)=>No(W,Oo,z=>{if(re&&z>K)throw j=de();te&&te(z)},U);if(A&&y!=="get"&&y!=="head"&&(H||u)){if(R=R??await M(_,v),R!==0||u){let W=new o(I,{method:"POST",body:v,duplex:"half"}),te;if(w.isFormData(v)&&(te=W.headers.get("content-type"))&&_.setContentType(te),W.body){const[U,z]=H&&So(R,Fn(Ao(H)))||[];v=c(W.body,U,z)}}}else if(u&&!f&&h&&y!=="get"&&y!=="head")v=c(v);else if(u&&f&&!A&&y!=="get"&&y!=="head")throw new ie("Stream request bodies are not supported by the current fetch implementation",ie.ERR_NOT_SUPPORT,S,F);w.isString(q)||(q=q?"include":"omit");const g=f&&"credentials"in o.prototype;if(w.isFormData(v)){const W=_.getContentType();W&&/^multipart\/form-data/i.test(W)&&!/boundary=/i.test(W)&&_.delete("content-type")}_.set("User-Agent","axios/"+Ir,!1);const b={...ae,signal:D,method:y.toUpperCase(),headers:co(_.normalize()),body:v,duplex:"half",credentials:g?q:void 0};F=f&&new o(I,b);let P=await(f?O(F,ae):O(I,b));const ee=Be.from(P.headers);if(X){const W=w.toFiniteNumber(ee.getContentLength());if(W!=null&&W>J)throw new ie("maxContentLength size of "+J+" exceeded",ie.ERR_BAD_RESPONSE,S,F)}const N=V&&(B==="stream"||B==="response");if(V&&P.body&&(x||X||N&&C)){const W={};["status","statusText","headers"].forEach(pe=>{W[pe]=P[pe]});const te=w.toFiniteNumber(ee.getContentLength()),[U,z]=x&&So(te,Fn(Ao(x),!0))||[];let Z=0;const L=pe=>{if(X&&(Z=pe,Z>J))throw new ie("maxContentLength size of "+J+" exceeded",ie.ERR_BAD_RESPONSE,S,F);U&&U(pe)};P=new a(No(P.body,Oo,L,()=>{z&&z(),C&&C()}),W)}B=B||"text";let Y=await G[w.findKey(G,B)||"text"](P,S);if(X&&!V&&!N){let W;if(Y!=null&&(typeof Y.byteLength=="number"?W=Y.byteLength:typeof Y.size=="number"?W=Y.size:typeof Y=="string"&&(W=typeof r=="function"?new r().encode(Y).byteLength:Y.length)),typeof W=="number"&&W>J)throw new ie("maxContentLength size of "+J+" exceeded",ie.ERR_BAD_RESPONSE,S,F)}return!N&&C&&C(),await new Promise((W,te)=>{xo(W,te,{data:Y,headers:Be.from(P.headers),status:P.status,statusText:P.statusText,config:S,request:F})})}catch(se){if(C&&C(),D&&D.aborted&&D.reason instanceof ie){const p=D.reason;throw p.config=S,F&&(p.request=F),se!==p&&Object.defineProperty(p,"cause",{__proto__:null,value:se,writable:!0,enumerable:!1,configurable:!0}),p}if(j)throw F&&!j.request&&(j.request=F),j;if(se instanceof ie)throw F&&!se.request&&(se.request=F),se;if(se&&se.name==="TypeError"&&/Load failed|fetch/i.test(se.message)){const p=new ie("Network Error",ie.ERR_NETWORK,S,F,se&&se.response);throw Object.defineProperty(p,"cause",{__proto__:null,value:se.cause||se,writable:!0,enumerable:!1,configurable:!0}),p}throw ie.from(se,se&&se.code,S,F,se&&se.response)}}},bu=new Map,Lo=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let a=o.length,s=a,f,d,h=bu;for(;s--;)f=o[s],d=h.get(f),d===void 0&&h.set(f,d=s?new Map:wu(t)),h=d;return d};Lo();const Or={http:Nc,xhr:ou,fetch:{get:Lo}};w.forEach(Or,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Fo=e=>`- ${e}`,Eu=e=>w.isFunction(e)||e===null||e===!1;function _u(e,t){e=w.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let a=0;a<n;a++){r=e[a];let s;if(i=r,!Eu(r)&&(i=Or[(s=String(r)).toLowerCase()],i===void 0))throw new ie(`Unknown adapter '${s}'`);if(i&&(w.isFunction(i)||(i=i.get(t))))break;o[s||"#"+a]=i}if(!i){const a=Object.entries(o).map(([f,d])=>`adapter ${f} `+(d===!1?"is not supported by the environment":"is not available in the build"));let s=n?a.length>1?`since :
|
|
1
|
+
(function(fe,ve){typeof exports=="object"&&typeof module<"u"?ve(exports,require("element-plus"),require("vue")):typeof define=="function"&&define.amd?define(["exports","element-plus","vue"],ve):(fe=typeof globalThis<"u"?globalThis:fe||self,ve(fe.FlowstreamUIPlus={},fe.ElementPlus,fe.Vue))})(this,(function(fe,ve,l){"use strict";/*! Element Plus Icons Vue v2.3.2 */var Zs=l.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"})]))}}),Qs=Zs,el=l.defineComponent({name:"ArrowUp",__name:"arrow-up",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),tl=el,nl=l.defineComponent({name:"Back",__name:"back",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),l.createElementVNode("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}}),Yi=nl,rl=l.defineComponent({name:"Check",__name:"check",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),Ki=rl,il=l.defineComponent({name:"CircleClose",__name:"circle-close",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),l.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),ol=il,al=l.defineComponent({name:"Delete",__name:"delete",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),sl=al,ll=l.defineComponent({name:"Document",__name:"document",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),cl=ll,ul=l.defineComponent({name:"Promotion",__name:"promotion",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"m64 448 832-320-128 704-446.08-243.328L832 192 242.816 545.472zm256 512V657.024L512 768z"})]))}}),fl=ul,dl=l.defineComponent({name:"RefreshLeft",__name:"refresh-left",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),Nn=dl,pl=l.defineComponent({name:"RefreshRight",__name:"refresh-right",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88"})]))}}),Pn=pl,hl=l.defineComponent({name:"Switch",__name:"switch",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M118.656 438.656a32 32 0 0 1 0-45.248L416 96l4.48-3.776A32 32 0 0 1 461.248 96l3.712 4.48a32.064 32.064 0 0 1-3.712 40.832L218.56 384H928a32 32 0 1 1 0 64H141.248a32 32 0 0 1-22.592-9.344M64 608a32 32 0 0 1 32-32h786.752a32 32 0 0 1 22.656 54.592L608 928l-4.48 3.776a32.064 32.064 0 0 1-40.832-49.024L805.632 640H96a32 32 0 0 1-32-32"})]))}}),Gi=hl,ml=l.defineComponent({name:"VideoPause",__name:"video-pause",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-96-544q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32m192 0q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32"})]))}}),yl=ml,gl=l.defineComponent({name:"VideoPlay",__name:"video-play",setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[l.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-48-247.616L668.608 512 464 375.616zm10.624-342.656 249.472 166.336a48 48 0 0 1 0 79.872L474.624 718.272A48 48 0 0 1 400 678.336V345.6a48 48 0 0 1 74.624-39.936z"})]))}}),Xi=gl;const vl={key:1,"aria-hidden":"true"},wl=["href"],bl=l.defineComponent({name:"SvgIcon",inheritAttrs:!1,__name:"SvgIcon",props:{iconClass:{},className:{}},setup(e){const t=e,n={back:Yi,delete:sl,save:cl,enable:Xi,start:Xi,hang:yl,restore:Pn,revocation:Nn,taskWithdraw:Nn,taskRecyle:Pn,terminate:ol,jump:Gi,taskJump:Gi,taskComplete:Ki,taskSend:fl,taskRollback:Yi,taskClaim:Ki,turnBefore:Nn,taskTurnBefore:Nn,turnAfter:Pn,taskTurnAfter:Pn},r=l.computed(()=>n[t.iconClass]);return(i,o)=>(l.openBlock(),l.createElementBlock("span",l.mergeProps({class:"workflow-svg-icon"},i.$attrs),[r.value?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r.value),{key:0})):(l.openBlock(),l.createElementBlock("svg",vl,[l.createElementVNode("use",{href:`#icon-${e.iconClass}`},null,8,wl)]))],16))}}),wt=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},El=wt(bl,[["__scopeId","data-v-7aad397e"]]),_l={class:"ui-flow-btn"},Ji=wt(l.defineComponent({name:"UiFlowButton",__name:"FlowButton",props:{type:{},label:{}},emits:["click"],setup(e,{emit:t}){const n=e,r=t,i=[{label:"保存",value:"save",icon:"save"},{label:"启动",value:"start",icon:"enable"},{label:"撤回",value:"revocation",icon:"taskWithdraw"},{label:"撤回",value:"taskWithdraw",icon:"taskWithdraw"},{label:"收回",value:"taskRecyle",icon:"taskRecyle"},{label:"挂起",value:"hang",icon:"hang"},{label:"恢复",value:"restore",icon:"restore"},{label:"恢复",value:"processActivate",icon:"restore"},{label:"终止",value:"terminate",icon:"terminate"},{label:"终止",value:"processTerminate",icon:"terminate"},{label:"挂起",value:"processSuspend",icon:"hang"},{label:"挂起",value:"processSupspend",icon:"hang"},{label:"跳转",value:"jump",icon:"jump"},{label:"跳转",value:"taskJump",icon:"jump"},{label:"办毕",value:"taskComplete",icon:"taskComplete"},{label:"发送",value:"taskSend",icon:"taskSend"},{label:"退回",value:"taskRollback",icon:"taskRollback"},{label:"拾取",value:"taskClaim",icon:"taskClaim"},{label:"前加签",value:"turnBefore",icon:"turnBefore"},{label:"前加签",value:"taskTurnBefore",icon:"turnBefore"},{label:"后加签",value:"turnAfter",icon:"turnAfter"},{label:"后加签",value:"taskTurnAfter",icon:"turnAfter"}],o=l.computed(()=>i.find(s=>s.value===n.type));function a(){var s;r("click",((s=o.value)==null?void 0:s.value)||n.type)}return(s,f)=>{const d=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("span",_l,[o.value?(l.openBlock(),l.createBlock(d,{key:0,link:"",type:"primary",onClick:a},{default:l.withCtx(()=>[l.createVNode(El,{"icon-class":o.value.icon},null,8,["icon-class"]),l.createTextVNode(" "+l.toDisplayString(e.label||o.value.label),1)]),_:1})):(l.openBlock(),l.createBlock(d,{key:1,link:"",type:"primary",onClick:a},{default:l.withCtx(()=>[l.renderSlot(s.$slots,"default",{},()=>[l.createTextVNode(l.toDisplayString(e.label||e.type),1)],!0)]),_:3}))])}}}),[["__scopeId","data-v-12932ad8"]]);function Zi(e,t){return function(){return e.apply(t,arguments)}}const{toString:xl}=Object.prototype,{getPrototypeOf:Kt}=Object,{iterator:cn,toStringTag:Qi}=Symbol,Dn=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),un=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Dn(n,t))return!0;n=Kt(n)}return!1},Sl=(e,t)=>e!=null&&un(e,t)?e[t]:void 0,Er=(e=>t=>{const n=xl.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ke=e=>(e=e.toLowerCase(),t=>Er(t)===e),In=e=>t=>typeof t===e,{isArray:Dt}=Array,It=In("undefined");function Gt(e){return e!==null&&!It(e)&&e.constructor!==null&&!It(e.constructor)&&Ve(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const eo=Ke("ArrayBuffer");function Al(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&eo(e.buffer),t}const kl=In("string"),Ve=In("function"),to=In("number"),Xt=e=>e!==null&&typeof e=="object",Cl=e=>e===!0||e===!1,On=e=>{if(!Xt(e))return!1;const t=Kt(e);return(t===null||t===Object.prototype||Kt(t)===null)&&!un(e,Qi)&&!un(e,cn)},Rl=e=>{if(!Xt(e)||Gt(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Tl=Ke("Date"),Nl=Ke("File"),Pl=e=>!!(e&&typeof e.uri<"u"),Dl=e=>e&&typeof e.getParts<"u",Il=Ke("Blob"),Ol=Ke("FileList"),Bl=Ke("Set"),Ml=e=>Xt(e)&&Ve(e.pipe);function Ll(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const no=Ll(),ro=typeof no.FormData<"u"?no.FormData:void 0,Fl=e=>{if(!e)return!1;if(ro&&e instanceof ro)return!0;const t=Kt(e);if(!t||t===Object.prototype||!Ve(e.append))return!1;const n=Er(e);return n==="formdata"||n==="object"&&Ve(e.toString)&&e.toString()==="[object FormData]"},$l=Ke("URLSearchParams"),[Vl,jl,Ul,zl]=["ReadableStream","Request","Response","Headers"].map(Ke),Hl=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Dt(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(Gt(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let s;for(r=0;r<a;r++)s=o[r],t.call(null,e[s],s,e)}}function io(e,t){if(Gt(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Ot=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,oo=e=>!It(e)&&e!==Ot;function _r(...e){const{caseless:t,skipUndefined:n}=oo(this)&&this||{},r={},i=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const s=t&&typeof a=="string"&&io(r,a)||a,f=Dn(r,s)?r[s]:void 0;On(f)&&On(o)?r[s]=_r(f,o):On(o)?r[s]=_r({},o):Dt(o)?r[s]=o.slice():(!n||!It(o))&&(r[s]=o)};for(let o=0,a=e.length;o<a;o++){const s=e[o];if(!s||Gt(s)||(fn(s,i),typeof s!="object"||Dt(s)))continue;const f=Object.getOwnPropertySymbols(s);for(let d=0;d<f.length;d++){const h=f[d];nc.call(s,h)&&i(s[h],h)}}return r}const Wl=(e,t,n,{allOwnKeys:r}={})=>(fn(t,(i,o)=>{n&&Ve(i)?Object.defineProperty(e,o,{__proto__:null,value:Zi(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),ql=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Yl=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Kl=(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&Kt(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Gl=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Xl=e=>{if(!e)return null;if(Dt(e))return e;let t=e.length;if(!to(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Jl=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Kt(Uint8Array)),Zl=(e,t)=>{const r=(e&&e[cn]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},Ql=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ec=Ke("HTMLFormElement"),tc=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),{propertyIsEnumerable:nc}=Object.prototype,rc=Ke("RegExp"),ao=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};fn(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},ic=e=>{ao(e,(t,n)=>{if(Ve(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Ve(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},oc=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Dt(e)?r(e):r(String(e).split(t)),n},ac=()=>{},sc=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function lc(e){return!!(e&&Ve(e.append)&&e[Qi]==="FormData"&&e[cn])}const cc=e=>{const t=new WeakSet,n=r=>{if(Xt(r)){if(t.has(r))return;if(Gt(r))return r;if(!("toJSON"in r)){t.add(r);let i;if(Bl(r)){i=[];for(const o of r){const a=n(o);!It(a)&&i.push(a)}}else i=Dt(r)?[]:{},fn(r,(o,a)=>{const s=n(o);!It(s)&&(i[a]=s)});return t.delete(r),i}}return r};return n(e)},uc=Ke("AsyncFunction"),fc=e=>e&&(Xt(e)||Ve(e))&&Ve(e.then)&&Ve(e.catch),so=((e,t)=>e?setImmediate:t?((n,r)=>(Ot.addEventListener("message",({source:i,data:o})=>{i===Ot&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Ot.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ve(Ot.postMessage)),dc=typeof queueMicrotask<"u"?queueMicrotask.bind(Ot):typeof process<"u"&&process.nextTick||so,lo=e=>e!=null&&Ve(e[cn]),w={isArray:Dt,isArrayBuffer:eo,isBuffer:Gt,isFormData:Fl,isArrayBufferView:Al,isString:kl,isNumber:to,isBoolean:Cl,isObject:Xt,isPlainObject:On,isEmptyObject:Rl,isReadableStream:Vl,isRequest:jl,isResponse:Ul,isHeaders:zl,isUndefined:It,isDate:Tl,isFile:Nl,isReactNativeBlob:Pl,isReactNative:Dl,isBlob:Il,isRegExp:rc,isFunction:Ve,isStream:Ml,isURLSearchParams:$l,isTypedArray:Jl,isFileList:Ol,forEach:fn,merge:_r,extend:Wl,trim:Hl,stripBOM:ql,inherits:Yl,toFlatObject:Kl,kindOf:Er,kindOfTest:Ke,endsWith:Gl,toArray:Xl,forEachEntry:Zl,matchAll:Ql,isHTMLForm:ec,hasOwnProperty:Dn,hasOwnProp:Dn,hasOwnInPrototypeChain:un,getSafeProp:Sl,reduceDescriptors:ao,freezeMethods:ic,toObjectSet:oc,toCamelCase:tc,noop:ac,toFiniteNumber:sc,findKey:io,global:Ot,isContextDefined:oo,isSpecCompliantForm:lc,toJSONObject:cc,isAsyncFn:uc,isThenable:fc,setImmediate:so,asap:dc,isIterable:lo,isSafeIterable:e=>e!=null&&un(e,cn)&&lo(e)},pc=w.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),hc=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
2
|
+
`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim();const s=w.hasOwnProp(t,n);!n||s&&w.hasOwnProp(pc,n)||(n==="set-cookie"?s?t[n].push(r):t[n]=[r]:t[n]=s?t[n]+", "+r:r)}),t};function mc(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const yc=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),gc=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function xr(e,t){return w.isArray(e)?e.map(n=>xr(n,t)):mc(String(e).replace(t,""))}const vc=e=>xr(e,yc),wc=e=>xr(e,gc);function co(e){const t=Object.create(null);return w.forEach(e.toJSON(),(n,r)=>{t[r]=wc(n)}),t}const uo=Symbol("internals");function dn(e){return e&&String(e).trim().toLowerCase()}function Bn(e){return e===!1||e==null?e:w.isArray(e)?e.map(Bn):vc(String(e))}function bc(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Ec=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Sr(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function _c(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let r=1;r<t;r++){const i=e.charCodeAt(r);if(i===34||i===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function xc(e){const t=Object.create(null),n=String(e);let r=0,i=!1,o=!1;function a(s){const f=Sr(n.slice(r,s)),d=f.indexOf("=");if(d<1)return;const h=Sr(f.slice(0,d));if(!Ec.test(h))return;const m=h.toLowerCase();if(m==="__proto__"||m==="constructor"||m==="prototype")return;const k=Sr(f.slice(d+1));t[m]=_c(k)}for(let s=0;s<n.length;s++){const f=n.charCodeAt(s);i?o?o=!1:f===92?o=!0:f===34&&(i=!1):f===34?i=!0:(f===44||f===59)&&(a(s),r=s+1)}return a(n.length),t}const Sc=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ar(e,t,n,r,i){if(w.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!w.isString(t)){if(w.isString(r))return t.indexOf(r)!==-1;if(w.isRegExp(r))return r.test(t)}}function Ac(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function kc(e,t){const n=w.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}let Be=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(s,f,d){const h=dn(f);if(!h)return;const m=w.findKey(i,h);(!m||i[m]===void 0||d===!0||d===void 0&&i[m]!==!1)&&(i[m||f]=Bn(s))}const a=(s,f)=>w.forEach(s,(d,h)=>o(d,h,f));if(w.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(w.isString(t)&&(t=t.trim())&&!Sc(t))a(hc(t),n);else if(w.isObject(t)&&w.isSafeIterable(t)){let s=Object.create(null),f,d;for(const h of t){if(!w.isArray(h))throw new TypeError("Object iterator must return a key-value pair");d=h[0],w.hasOwnProp(s,d)?(f=s[d],s[d]=w.isArray(f)?[...f,h[1]]:[f,h[1]]):s[d]=h[1]}a(s,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=dn(t),t){const r=w.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return bc(i);if(w.isFunction(n))return n.call(this,i,r);if(w.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=dn(t),t){const r=w.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ar(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=dn(a),a){const s=w.findKey(r,a);s&&(!n||Ar(r,r[s],s,n))&&(delete r[s],i=!0)}}return w.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||Ar(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return w.forEach(this,(i,o)=>{const a=w.findKey(r,o);if(a){n[a]=Bn(i),delete n[o];return}const s=t?Ac(o):String(o).trim();s!==o&&delete n[o],n[s]=Bn(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return w.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&w.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
3
|
+
`)}getSetCookie(){const t=this.get("set-cookie");return w.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return xc(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[uo]=this[uo]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=dn(a);r[s]||(kc(i,a),r[s]=!0)}return w.isArray(t)?t.forEach(o):o(t),this}};Be.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),w.reduceDescriptors(Be.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),w.freezeMethods(Be);const Mn="[REDACTED ****]";function Cc(e){if(w.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(w.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Rc(e,t){const n=new Set(t.map(o=>String(o).toLowerCase())),r=[],i=o=>{if(o===null||typeof o!="object"||w.isBuffer(o))return o;if(r.indexOf(o)!==-1)return;o instanceof Be&&(o=o.toJSON()),r.push(o);let a;if(w.isArray(o))a=[],o.forEach((s,f)=>{const d=i(s);w.isUndefined(d)||(a[f]=d)});else{if(!w.isPlainObject(o)&&Cc(o))return r.pop(),o;a=Object.create(null);for(const[s,f]of Object.entries(o)){const d=n.has(s.toLowerCase())?Mn:i(f);w.isUndefined(d)||(a[s]=d)}}return r.pop(),a};return i(e)}function fo(e){try{return String(e)}catch{return""}}function Tc(e){return e.errors.map(n=>{try{return n&&n.message?fo(n.message):fo(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let ne=class Xs extends Error{static from(t,n,r,i,o,a){let s=t.message;!s&&w.isArray(t.errors)&&t.errors.length&&(s=Tc(t));const f=new Xs(s,n||t.code,r,i,o);return Object.defineProperty(f,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),f.name=t.name,t.status!=null&&f.status==null&&(f.status=t.status),a&&Object.assign(f,a),f}constructor(t,n,r,i,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,n=t&&w.hasOwnProp(t,"redact")?t.redact:void 0,r=w.isArray(n)&&n.length>0?Rc(t,n):w.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};ne.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",ne.ERR_BAD_OPTION="ERR_BAD_OPTION",ne.ECONNABORTED="ECONNABORTED",ne.ETIMEDOUT="ETIMEDOUT",ne.ECONNREFUSED="ECONNREFUSED",ne.ERR_NETWORK="ERR_NETWORK",ne.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",ne.ERR_DEPRECATED="ERR_DEPRECATED",ne.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",ne.ERR_BAD_REQUEST="ERR_BAD_REQUEST",ne.ERR_CANCELED="ERR_CANCELED",ne.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",ne.ERR_INVALID_URL="ERR_INVALID_URL",ne.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Nc=null,po=100;function kr(e){return w.isPlainObject(e)||w.isArray(e)}function ho(e){return w.endsWith(e,"[]")?e.slice(0,-2):e}function Cr(e,t,n){return e?e.concat(t).map(function(i,o){return i=ho(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function Pc(e){return w.isArray(e)&&!e.some(kr)}const Dc=w.toFlatObject(w,{},null,function(t){return/^is[A-Z]/.test(t)});function Ln(e,t,n){if(!w.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=w.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(B,y){return!w.isUndefined(y[B])});const r=n.metaTokens,i=n.visitor||G,o=n.dots,a=n.indexes,s=n.Blob||typeof Blob<"u"&&Blob,f=n.maxDepth===void 0?po:n.maxDepth,d=s&&w.isSpecCompliantForm(t),h=[];if(!w.isFunction(i))throw new TypeError("visitor must be a function");function m(S){if(S===null)return"";if(w.isDate(S))return S.toISOString();if(w.isBoolean(S))return S.toString();if(!d&&w.isBlob(S))throw new ne("Blob is not supported. Use a Buffer instead.");if(w.isArrayBuffer(S)||w.isTypedArray(S)){if(d&&typeof s=="function")return new s([S]);throw new ne("Blob is not supported. Use a Buffer instead.",ne.ERR_NOT_SUPPORT)}return S}function k(S){if(S>f)throw new ne("Object is too deeply nested ("+S+" levels). Max depth: "+f,ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function z(S,B){if(f===1/0)return JSON.stringify(S);const y=[];return JSON.stringify(S,function(A,N){if(!w.isObject(N))return N;for(;y.length&&y[y.length-1]!==this;)y.pop();return y.push(N),k(B+y.length-1),N})}function G(S,B,y){let v=S;if(w.isReactNative(t)&&w.isReactNativeBlob(S))return t.append(Cr(y,B,o),m(S)),!1;if(S&&!y&&typeof S=="object"){if(w.endsWith(B,"{}"))B=r?B:B.slice(0,-2),S=z(S,1);else if(w.isArray(S)&&Pc(S)||(w.isFileList(S)||w.endsWith(B,"[]"))&&(v=w.toArray(S)))return B=ho(B),v.forEach(function(N,x){!(w.isUndefined(N)||N===null)&&t.append(a===!0?Cr([B],x,o):a===null?B:B+"[]",m(N))}),!1}return kr(S)?!0:(t.append(Cr(y,B,o),m(S)),!1)}const V=Object.assign(Dc,{defaultVisitor:G,convertValue:m,isVisitable:kr});function F(S,B,y=0){if(!w.isUndefined(S)){if(k(y),h.indexOf(S)!==-1)throw new Error("Circular reference detected in "+B.join("."));h.push(S),w.forEach(S,function(A,N){(!(w.isUndefined(A)||A===null)&&i.call(t,A,w.isString(N)?N.trim():N,B,V))===!0&&F(A,B?B.concat(N):[N],y+1)}),h.pop()}}if(!w.isObject(e))throw new TypeError("data must be an object");return F(e),t}function mo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Rr(e,t){this._pairs=[],e&&Ln(e,this,t)}const yo=Rr.prototype;yo.append=function(t,n){this._pairs.push([t,n])},yo.toString=function(t){const n=t?r=>t.call(this,r,mo):mo;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Ic(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function go(e,t,n){if(!t)return e;e=e||"";const r=w.isFunction(n)?{serialize:n}:n,i=w.getSafeProp(r,"encode")||Ic,o=w.getSafeProp(r,"serialize");let a;if(o?a=o(t,r):a=w.isURLSearchParams(t)?t.toString():new Rr(t,r).toString(i),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class vo{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){w.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Tr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Oc={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Rr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Nr=typeof window<"u"&&typeof document<"u",Pr=typeof navigator=="object"&&navigator||void 0,Bc=Nr&&(!Pr||["ReactNative","NativeScript","NS"].indexOf(Pr.product)<0),Mc=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Lc=Nr&&window.location.href||"http://localhost",De={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Nr,hasStandardBrowserEnv:Bc,hasStandardBrowserWebWorkerEnv:Mc,navigator:Pr,origin:Lc},Symbol.toStringTag,{value:"Module"})),...Oc};function Fc(e,t){return Ln(e,new De.classes.URLSearchParams,{visitor:function(n,r,i,o){return De.isNode&&w.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const wo=po;function bo(e){if(e>wo)throw new ne("FormData field is too deeply nested ("+e+" levels). Max depth: "+wo,ne.ERR_FORM_DATA_DEPTH_EXCEEDED)}function $c(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)bo(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function Vc(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function Eo(e){function t(n,r,i,o){bo(o);let a=n[o++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),f=o>=n.length;return a=!a&&w.isArray(i)?i.length:a,f?(w.hasOwnProp(i,a)?i[a]=w.isArray(i[a])?i[a].concat(r):[i[a],r]:i[a]=r,!s):((!w.hasOwnProp(i,a)||!w.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&w.isArray(i[a])&&(i[a]=Vc(i[a])),!s)}if(w.isFormData(e)&&w.isFunction(e.entries)){const n={};return w.forEachEntry(e,(r,i)=>{t($c(r),i,n,0)}),n}return null}const Jt=(e,t)=>e!=null&&w.hasOwnProp(e,t)?e[t]:void 0;function jc(e,t,n){if(w.isString(e))try{return(t||JSON.parse)(e),w.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const pn={transitional:Tr,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=w.isObject(t);if(o&&w.isHTMLForm(t)&&(t=new FormData(t)),w.isFormData(t))return i?JSON.stringify(Eo(t)):t;if(w.isArrayBuffer(t)||w.isBuffer(t)||w.isStream(t)||w.isFile(t)||w.isBlob(t)||w.isReadableStream(t))return t;if(w.isArrayBufferView(t))return t.buffer;if(w.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){const f=Jt(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Fc(t,f).toString();if((s=w.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=Jt(this,"env"),h=d&&d.FormData;return Ln(s?{"files[]":t}:t,h&&new h,f)}}return o||i?(n.setContentType("application/json",!1),jc(t)):t}],transformResponse:[function(t){const n=Jt(this,"transitional")||pn.transitional,r=n&&n.forcedJSONParsing,i=Jt(this,"responseType"),o=i==="json";if(w.isResponse(t)||w.isReadableStream(t))return t;if(t&&w.isString(t)&&(r&&!i||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,Jt(this,"parseReviver"))}catch(f){if(s)throw f.name==="SyntaxError"?ne.from(f,ne.ERR_BAD_RESPONSE,this,null,Jt(this,"response")):f}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:De.classes.FormData,Blob:De.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};w.forEach(["delete","get","head","post","put","patch","query"],e=>{pn.headers[e]={}});function Dr(e,t){const n=this||pn,r=t||n,i=Be.from(r.headers);let o=r.data;return w.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function _o(e){return!!(e&&e.__CANCEL__)}let hn=class extends ne{constructor(t,n,r){super(t??"canceled",ne.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function xo(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ne("Request failed with status code "+n.status,n.status>=400&&n.status<500?ne.ERR_BAD_REQUEST:ne.ERR_BAD_RESPONSE,n.config,n.request,n))}function Uc(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function zc(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(f){const d=Date.now(),h=r[o];a||(a=d),n[i]=f,r[i]=d;let m=o,k=0;for(;m!==i;)k+=n[m++],m=m%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),d-a<t)return;const z=h&&d-h;return z?Math.round(k*1e3/z):void 0}}function Hc(e,t){let n=0,r=1e3/t,i,o;const a=(d,h=Date.now())=>{n=h,i=null,o&&(clearTimeout(o),o=null),e(...d)};return[(...d)=>{const h=Date.now(),m=h-n;m>=r?a(d,h):(i=d,o||(o=setTimeout(()=>{o=null,a(i)},r-m)))},()=>i&&a(i)]}const Fn=(e,t,n=3)=>{let r=0;const i=zc(50,250);return Hc(o=>{if(!o||typeof o.loaded!="number")return;const a=o.loaded,s=o.lengthComputable?o.total:void 0,f=Math.max(0,s!=null?Math.min(a,s):a),d=Math.max(0,f-r),h=i(d);r=Math.max(r,f);const m={loaded:f,total:s,progress:s?f/s:void 0,bytes:d,rate:h||void 0,estimated:h&&s?(s-f)/h:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(m)},n)},So=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ao=(e,t=w.asap)=>(...n)=>t(()=>e(...n)),Wc=De.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,De.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(De.origin),De.navigator&&/(msie|trident)/i.test(De.navigator.userAgent)):()=>!0,qc=De.hasStandardBrowserEnv?{write(e,t,n,r,i,o,a){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];w.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),w.isString(r)&&s.push(`path=${r}`),w.isString(i)&&s.push(`domain=${i}`),o===!0&&s.push("secure"),w.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),i=r.indexOf("=");if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Yc(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Kc(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const Gc=/^https?:(?!\/\/)/i,Xc=/[\t\n\r]/g;function Jc(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Zc(e){return Jc(e).replace(Xc,"")}function Qc(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${Mn}`)}function eu(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Mn}@`),n=t.indexOf("#"),i=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Mn}`);return n===-1?i:`${i}#${Qc(t.slice(n+1))}`}function ko(e,t){if(typeof e=="string"){const n=Zc(e);if(Gc.test(n))throw new ne(`Invalid URL ${JSON.stringify(eu(n))}: missing "//" after protocol`,ne.ERR_INVALID_URL,t)}}function Co(e,t,n,r){ko(t,r);let i=!Yc(t);return e&&(i||n===!1)?(ko(e,r),Kc(e,t)):t}const Ro=e=>e instanceof Be?{...e}:e,tu=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function Bt(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(h,m,k,z){return w.isPlainObject(h)&&w.isPlainObject(m)?w.merge.call({caseless:z},h,m):w.isPlainObject(m)?w.merge({},m):w.isArray(m)?m.slice():m}function i(h,m,k,z){if(w.isUndefined(m)){if(!w.isUndefined(h))return r(void 0,h,k,z)}else return r(h,m,k,z)}function o(h,m){if(!w.isUndefined(m))return r(void 0,m)}function a(h,m){if(w.isUndefined(m)){if(!w.isUndefined(h))return r(void 0,h)}else return r(void 0,m)}function s(h){const m=w.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!w.isUndefined(m))if(w.isPlainObject(m)){if(w.hasOwnProp(m,h))return m[h]}else return;const k=w.hasOwnProp(e,"transitional")?e.transitional:void 0;if(w.isPlainObject(k)&&w.hasOwnProp(k,h))return k[h]}function f(h,m,k){if(w.hasOwnProp(t,k))return r(h,m);if(w.hasOwnProp(e,k))return r(void 0,h)}const d={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:f,headers:(h,m,k)=>i(Ro(h),Ro(m),k,!0)};return w.forEach(tu({...e,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const k=w.hasOwnProp(d,m)?d[m]:i,z=w.hasOwnProp(e,m)?e[m]:void 0,G=w.hasOwnProp(t,m)?t[m]:void 0,V=k(z,G,m);w.isUndefined(V)&&k!==f||(n[m]=V)}),w.hasOwnProp(t,"validateStatus")&&w.isUndefined(t.validateStatus)&&s("validateStatusUndefinedResolves")===!1&&(w.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const nu=["content-type","content-length"];function ru(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,i])=>{nu.includes(r.toLowerCase())&&e.set(r,i)})}const iu=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function To(e){const t=Bt({},e),n=k=>w.hasOwnProp(t,k)?t[k]:void 0,r=n("data");let i=n("withXSRFToken");const o=n("xsrfHeaderName"),a=n("xsrfCookieName");let s=n("headers");const f=n("auth"),d=n("baseURL"),h=n("allowAbsoluteUrls"),m=n("url");if(t.headers=s=Be.from(s),t.url=go(Co(d,m,h,t),n("params"),n("paramsSerializer")),f){const k=w.getSafeProp(f,"username")||"",z=w.getSafeProp(f,"password")||"";try{s.set("Authorization","Basic "+btoa(k+":"+(z?iu(z):"")))}catch(G){throw ne.from(G,ne.ERR_BAD_OPTION_VALUE,e)}}if(w.isFormData(r)&&(De.hasStandardBrowserEnv||De.hasStandardBrowserWebWorkerEnv||w.isReactNative(r)?s.setContentType(void 0):w.isFunction(r.getHeaders)&&ru(s,r.getHeaders(),n("formDataHeaderPolicy"))),De.hasStandardBrowserEnv&&(w.isFunction(i)&&(i=i(t)),i===!0||i==null&&Wc(t.url))){const z=o&&a&&qc.read(a);z&&s.set(o,z)}return t}const ou=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=To(e);let o=i.data;const a=Be.from(i.headers).normalize();let{responseType:s,onUploadProgress:f,onDownloadProgress:d}=i,h,m,k,z,G;function V(){z&&z(),G&&G(),i.cancelToken&&i.cancelToken.unsubscribe(h),i.signal&&i.signal.removeEventListener("abort",h)}let F=new XMLHttpRequest;F.open(i.method.toUpperCase(),i.url,!0),F.timeout=i.timeout;function S(){if(!F)return;const y=Be.from("getAllResponseHeaders"in F&&F.getAllResponseHeaders()),A={data:!s||s==="text"||s==="json"?F.responseText:F.response,status:F.status,statusText:F.statusText,headers:y,config:e,request:F};xo(function(x){n(x),V()},function(x){r(x),V()},A),F=null}"onloadend"in F?F.onloadend=S:F.onreadystatechange=function(){!F||F.readyState!==4||F.status===0&&!(F.responseURL&&F.responseURL.startsWith("file:"))||setTimeout(S)},F.onabort=function(){F&&(r(new ne("Request aborted",ne.ECONNABORTED,e,F)),V(),F=null)},F.onerror=function(v){const A=v&&v.message?v.message:"Network Error",N=new ne(A,ne.ERR_NETWORK,e,F);N.event=v||null,r(N),V(),F=null},F.ontimeout=function(){let v=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const A=i.transitional||Tr;i.timeoutErrorMessage&&(v=i.timeoutErrorMessage),r(new ne(v,A.clarifyTimeoutError?ne.ETIMEDOUT:ne.ECONNABORTED,e,F)),V(),F=null},o===void 0&&a.setContentType(null),"setRequestHeader"in F&&w.forEach(co(a),function(v,A){F.setRequestHeader(A,v)}),w.isUndefined(i.withCredentials)||(F.withCredentials=!!i.withCredentials),s&&s!=="json"&&(F.responseType=i.responseType),d&&([k,G]=Fn(d,!0),F.addEventListener("progress",k)),f&&F.upload&&([m,z]=Fn(f),F.upload.addEventListener("progress",m),F.upload.addEventListener("loadend",z)),(i.cancelToken||i.signal)&&(h=y=>{F&&(r(!y||y.type?new hn(null,e,F):y),F.abort(),V(),F=null)},i.cancelToken&&i.cancelToken.subscribe(h),i.signal&&(i.signal.aborted?h():i.signal.addEventListener("abort",h)));const B=Uc(i.url);if(B&&!De.protocols.includes(B)){r(new ne("Unsupported protocol "+B+":",ne.ERR_BAD_REQUEST,e)),V();return}F.send(o||null)})},au=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const i=function(f){if(!r){r=!0,a();const d=f instanceof Error?f:this.reason;n.abort(d instanceof ne?d:new hn(d instanceof Error?d.message:d))}};let o=t&&setTimeout(()=>{o=null,i(new ne(`timeout of ${t}ms exceeded`,ne.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(i):f.removeEventListener("abort",i)}),e=null)};e.forEach(f=>{if(!r){if(f.aborted){i.call(f);return}f.addEventListener("abort",i,{once:!0})}});const{signal:s}=n;return s.unsubscribe=()=>w.asap(a),s},su=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},lu=async function*(e,t){for await(const n of cu(e))yield*su(n,t)},cu=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},No=(e,t,n,r)=>{const i=lu(e,t);let o=0,a,s=f=>{a||(a=!0,r&&r(f))};return new ReadableStream({async pull(f){try{const{done:d,value:h}=await i.next();if(d){s(),f.close();return}let m=h.byteLength;if(n){let k=o+=m;n(k)}f.enqueue(new Uint8Array(h))}catch(d){throw s(d),d}},cancel(f){return s(f),i.return()}},{highWaterMark:2})},Po=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Do=(e,t,n)=>t+2<n&&Po(e.charCodeAt(t+1))&&Po(e.charCodeAt(t+2)),Io=e=>e<=57?e-48:(e&223)-55,uu=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,fu=e=>e===9||e===10||e===12||e===13||e===32,du=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},pu=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},hu=e=>{const t=e.length;let n=0,r=0,i=!1;for(let o=0;o<t;o++){let a=e.charCodeAt(o);if(a===37&&Do(e,o,t)&&(a=Io(e.charCodeAt(o+1))*16+Io(e.charCodeAt(o+2)),o+=2),!fu(a)){if(a===61){r++;continue}if(!uu(a)||r>0){i=!0;continue}n++}}return i||r>2||r>0&&(n+r)%4!==0||n%4===1?pu(e):du(n)},mu=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),i=e.slice(n+1);if(/;base64/i.test(r))return t(i);let a=0;for(let s=0,f=i.length;s<f;s++){const d=i.charCodeAt(s);if(d===37&&Do(i,s,f))a+=1,s+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&s+1<f){const h=i.charCodeAt(s+1);h>=56320&&h<=57343?(a+=4,s++):a+=3}else a+=3}return a};function yu(e){const t=typeof e=="string"?e.indexOf("#"):-1;return mu(t===-1?e:e.slice(0,t),hu)}const Ir="1.19.0",Oo=64*1024,{isFunction:$n}=w,gu=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Bo=e=>{if(!w.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Mo=(e,...t)=>{try{return!!e(...t)}catch{return!1}},vu=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},wu=e=>{const t=w.global!==void 0&&w.global!==null?w.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=w.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:o,Response:a}=e,s=i?$n(i):typeof fetch=="function",f=$n(o),d=$n(a);if(!s)return!1;const h=s&&$n(n),m=s&&(typeof r=="function"?(S=>B=>S.encode(B))(new r):async S=>new Uint8Array(await new o(S).arrayBuffer())),k=f&&h&&Mo(()=>{let S=!1;const B=new o(De.origin,{body:new n,method:"POST",get duplex(){return S=!0,"half"}}),y=B.headers.has("Content-Type");return B.body!=null&&B.body.cancel(),S&&!y}),z=d&&h&&Mo(()=>w.isReadableStream(new a("").body)),G={stream:z&&(S=>S.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!G[S]&&(G[S]=(B,y)=>{let v=B&&B[S];if(v)return v.call(B);throw new ne(`Response type '${S}' is not supported`,ne.ERR_NOT_SUPPORT,y)})});const V=async S=>{if(S==null)return 0;if(w.isBlob(S))return S.size;if(w.isSpecCompliantForm(S))return(await new o(De.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(w.isArrayBufferView(S)||w.isArrayBuffer(S))return S.byteLength;if(w.isURLSearchParams(S)&&(S=S+""),w.isString(S))return(await m(S)).byteLength},F=async(S,B)=>{const y=w.toFiniteNumber(S.getContentLength());return y??V(B)};return async S=>{let{url:B,method:y,data:v,signal:A,cancelToken:N,timeout:x,onDownloadProgress:E,onUploadProgress:H,responseType:L,headers:_,withCredentials:q="same-origin",fetchOptions:se,maxContentLength:Z,maxBodyLength:K}=To(S);const X=w.isNumber(Z)&&Z>-1,ee=w.isNumber(K)&&K>-1,J=ae=>w.hasOwnProp(S,ae)?S[ae]:void 0;let M=i||fetch;L=L?(L+"").toLowerCase():"text";let I=au([A,N&&N.toAbortSignal()],x),$=null;const C=I&&I.unsubscribe&&(()=>{I.unsubscribe()});let R,U=null;const pe=()=>new ne("Request body larger than maxBodyLength limit",ne.ERR_BAD_REQUEST,S,$);try{let ae;const p=J("auth");if(p){const j=w.getSafeProp(p,"username")||"",Y=w.getSafeProp(p,"password")||"";ae={username:j,password:Y}}if(vu(B)){const j=new URL(B,De.origin);if(!ae&&(j.username||j.password)){const Y=Bo(j.username),T=Bo(j.password);ae={username:Y,password:T}}(j.username||j.password)&&(j.username="",j.password="",B=j.href)}if(ae&&(_.delete("authorization"),_.set("Authorization","Basic "+btoa(gu((ae.username||"")+":"+(ae.password||""))))),X&&typeof B=="string"&&B.startsWith("data:")&&yu(B)>Z)throw new ne("maxContentLength size of "+Z+" exceeded",ne.ERR_BAD_RESPONSE,S,$);if(ee&&y!=="get"&&y!=="head"){const j=await V(v);if(typeof j=="number"&&isFinite(j)&&(R=j,j>K))throw pe()}const u=ee&&(w.isReadableStream(v)||w.isStream(v)),c=(j,Y,T)=>No(j,Oo,W=>{if(ee&&W>K)throw U=pe();Y&&Y(W)},T);if(k&&y!=="get"&&y!=="head"&&(H||u)){if(R=R??await F(_,v),R!==0||u){let j=new o(B,{method:"POST",body:v,duplex:"half"}),Y;if(w.isFormData(v)&&(Y=j.headers.get("content-type"))&&_.setContentType(Y),j.body){const[T,W]=H&&So(R,Fn(Ao(H)))||[];v=c(j.body,T,W)}}}else if(u&&!f&&h&&y!=="get"&&y!=="head")v=c(v);else if(u&&f&&!k&&y!=="get"&&y!=="head")throw new ne("Stream request bodies are not supported by the current fetch implementation",ne.ERR_NOT_SUPPORT,S,$);w.isString(q)||(q=q?"include":"omit");const g=f&&"credentials"in o.prototype;if(w.isFormData(v)){const j=_.getContentType();j&&/^multipart\/form-data/i.test(j)&&!/boundary=/i.test(j)&&_.delete("content-type")}_.set("User-Agent","axios/"+Ir,!1);const b={...se,signal:I,method:y.toUpperCase(),headers:co(_.normalize()),body:v,duplex:"half",credentials:g?q:void 0};$=f&&new o(B,b);let D=await(f?M($,se):M(B,b));const Q=Be.from(D.headers);if(X){const j=w.toFiniteNumber(Q.getContentLength());if(j!=null&&j>Z)throw new ne("maxContentLength size of "+Z+" exceeded",ne.ERR_BAD_RESPONSE,S,$)}const ue=z&&(L==="stream"||L==="response");if(z&&D.body&&(E||X||ue&&C)){const j={};["status","statusText","headers"].forEach(ie=>{j[ie]=D[ie]});const Y=w.toFiniteNumber(Q.getContentLength()),[T,W]=E&&So(Y,Fn(Ao(E),!0))||[];let re=0;const O=ie=>{if(X&&(re=ie,re>Z))throw new ne("maxContentLength size of "+Z+" exceeded",ne.ERR_BAD_RESPONSE,S,$);T&&T(ie)};D=new a(No(D.body,Oo,O,()=>{W&&W(),C&&C()}),j)}L=L||"text";let P=await G[w.findKey(G,L)||"text"](D,S);if(X&&!z&&!ue){let j;if(P!=null&&(typeof P.byteLength=="number"?j=P.byteLength:typeof P.size=="number"?j=P.size:typeof P=="string"&&(j=typeof r=="function"?new r().encode(P).byteLength:P.length)),typeof j=="number"&&j>Z)throw new ne("maxContentLength size of "+Z+" exceeded",ne.ERR_BAD_RESPONSE,S,$)}return!ue&&C&&C(),await new Promise((j,Y)=>{xo(j,Y,{data:P,headers:Be.from(D.headers),status:D.status,statusText:D.statusText,config:S,request:$})})}catch(ae){if(C&&C(),I&&I.aborted&&I.reason instanceof ne){const p=I.reason;throw p.config=S,$&&(p.request=$),ae!==p&&Object.defineProperty(p,"cause",{__proto__:null,value:ae,writable:!0,enumerable:!1,configurable:!0}),p}if(U)throw $&&!U.request&&(U.request=$),U;if(ae instanceof ne)throw $&&!ae.request&&(ae.request=$),ae;if(ae&&ae.name==="TypeError"&&/Load failed|fetch/i.test(ae.message)){const p=new ne("Network Error",ne.ERR_NETWORK,S,$,ae&&ae.response);throw Object.defineProperty(p,"cause",{__proto__:null,value:ae.cause||ae,writable:!0,enumerable:!1,configurable:!0}),p}throw ne.from(ae,ae&&ae.code,S,$,ae&&ae.response)}}},bu=new Map,Lo=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let a=o.length,s=a,f,d,h=bu;for(;s--;)f=o[s],d=h.get(f),d===void 0&&h.set(f,d=s?new Map:wu(t)),h=d;return d};Lo();const Or={http:Nc,xhr:ou,fetch:{get:Lo}};w.forEach(Or,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Fo=e=>`- ${e}`,Eu=e=>w.isFunction(e)||e===null||e===!1;function _u(e,t){e=w.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let a=0;a<n;a++){r=e[a];let s;if(i=r,!Eu(r)&&(i=Or[(s=String(r)).toLowerCase()],i===void 0))throw new ne(`Unknown adapter '${s}'`);if(i&&(w.isFunction(i)||(i=i.get(t))))break;o[s||"#"+a]=i}if(!i){const a=Object.entries(o).map(([f,d])=>`adapter ${f} `+(d===!1?"is not supported by the environment":"is not available in the build"));let s=n?a.length>1?`since :
|
|
4
4
|
`+a.map(Fo).join(`
|
|
5
|
-
`):" "+Fo(a[0]):"as no adapter specified";throw new
|
|
5
|
+
`):" "+Fo(a[0]):"as no adapter specified";throw new ne("There is no suitable adapter to dispatch the request "+s,ne.ERR_NOT_SUPPORT)}return i}const $o={getAdapter:_u,adapters:Or};function Br(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new hn(null,e)}function Mr(e){return Br(e),e.headers=Be.from(e.headers),e.data=Dr.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),$o.getAdapter(e.adapter||pn.adapter,e)(e).then(function(r){Br(e),e.response=r;try{r.data=Dr.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=Be.from(r.headers),r},function(r){if(!_o(r)&&(Br(e),r&&r.response)){e.response=r.response;try{r.response.data=Dr.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=Be.from(r.response.headers)}return Promise.reject(r)})}const Vn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Vn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Vo={};Vn.transitional=function(t,n,r){function i(o,a){return"[Axios v"+Ir+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new ne(i(a," has been removed"+(n?" in "+n:"")),ne.ERR_DEPRECATED);return n&&!Vo[a]&&(Vo[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,s):!0}},Vn.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function xu(e,t,n){if(typeof e!="object"||e===null)throw new ne("options must be an object",ne.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(a){const s=e[o],f=s===void 0||a(s,o,e);if(f!==!0)throw new ne("option "+o+" must be "+f,ne.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ne("Unknown option "+o,ne.ERR_BAD_OPTION)}}const jn={assertOptions:xu,validators:Vn},Me=jn.validators;let Mt=class{constructor(t){this.defaults=t||{},this.interceptors={request:new vo,response:new vo}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=(()=>{if(!i.stack)return"";const a=i.stack.indexOf(`
|
|
6
6
|
`);return a===-1?"":i.stack.slice(a+1)})();try{if(!r.stack)r.stack=o;else if(o){const a=o.indexOf(`
|
|
7
7
|
`),s=a===-1?-1:o.indexOf(`
|
|
8
8
|
`,a+1),f=s===-1?"":o.slice(s+1);String(r.stack).endsWith(f)||(r.stack+=`
|
|
9
|
-
`+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Bt(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&jn.assertOptions(r,{silentJSONParsing:Me.transitional(Me.boolean),forcedJSONParsing:Me.transitional(Me.boolean),clarifyTimeoutError:Me.transitional(Me.boolean),legacyInterceptorReqResOrdering:Me.transitional(Me.boolean),advertiseZstdAcceptEncoding:Me.transitional(Me.boolean),validateStatusUndefinedResolves:Me.transitional(Me.boolean)},!1),i!=null&&(w.isFunction(i)?n.paramsSerializer={serialize:i}:jn.assertOptions(i,{encode:Me.function,serialize:Me.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),jn.assertOptions(n,{baseUrl:Me.spelling("baseURL"),withXsrfToken:Me.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&w.merge(o.common,o[n.method]);o&&w.forEach(["delete","get","head","post","put","patch","query","common"],G=>{delete o[G]}),n.headers=Be.concat(a,o);const s=[];let f=!0;this.interceptors.request.forEach(function($){if(typeof $.runWhen=="function"&&$.runWhen(n)===!1)return;f=f&&$.synchronous;const M=n.transitional||Tr;M&&M.legacyInterceptorReqResOrdering?s.unshift($.fulfilled,$.rejected):s.push($.fulfilled,$.rejected)});const d=[];this.interceptors.response.forEach(function($){d.push($.fulfilled,$.rejected)});let h,m=0,A;if(!f){const G=[Mr.bind(this),void 0];for(G.unshift(...s),G.push(...d),A=G.length,h=Promise.resolve(n);m<A;)h=h.then(G[m++],G[m++]);return h}A=s.length;let V=n;for(;m<A;){const G=s[m++],$=s[m++];try{V=G?G(V):V}catch(M){if(!$){h=Promise.reject(M);break}try{const S=$.call(this,M);w.isThenable(S)&&(h=Promise.resolve(S).then(()=>Mr.call(this,V)))}catch(S){h=Promise.reject(S)}break}}if(!h)try{h=Mr.call(this,V)}catch(G){h=Promise.reject(G)}for(m=0,A=d.length;m<A;)h=h.then(d[m++],d[m++]);return h}getUri(t){t=Bt(this.defaults,t);const n=Co(t.baseURL,t.url,t.allowAbsoluteUrls,t);return go(n,t.params,t.paramsSerializer)}};w.forEach(["delete","get","head","options"],function(t){Mt.prototype[t]=function(n,r){return this.request(Bt(r||{},{method:t,url:n,data:r&&w.hasOwnProp(r,"data")?r.data:void 0}))}}),w.forEach(["post","put","patch","query"],function(t){function n(r){return function(o,a,s){return this.request(Bt(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}Mt.prototype[t]=n(),t!=="query"&&(Mt.prototype[t+"Form"]=n(!0))});let Su=class Js{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new hn(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Js(function(i){t=i}),cancel:t}}};function Au(e){return function(n){return e.apply(null,n)}}function ku(e){return w.isObject(e)&&e.isAxiosError===!0}const Lr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Lr).forEach(([e,t])=>{Lr[t]=e});function jo(e){const t=new Mt(e),n=Zi(Mt.prototype.request,t);return w.extend(n,Mt.prototype,t,{allOwnKeys:!0}),w.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return jo(Bt(e,i))},n}const ke=jo(pn);ke.Axios=Mt,ke.CanceledError=hn,ke.CancelToken=Su,ke.isCancel=_o,ke.VERSION=Ir,ke.toFormData=Ln,ke.AxiosError=ie,ke.Cancel=ke.CanceledError,ke.all=function(t){return Promise.all(t)},ke.spread=Au,ke.isAxiosError=ku,ke.mergeConfig=Bt,ke.AxiosHeaders=Be,ke.formToJSON=e=>Eo(w.isHTMLForm(e)?new FormData(e):e),ke.getAdapter=$o.getAdapter,ke.HttpStatusCode=Lr,ke.default=ke;const{Axios:by,AxiosError:Ey,CanceledError:_y,isCancel:xy,CancelToken:Sy,VERSION:Ay,all:ky,Cancel:Cy,isAxiosError:Ry,spread:Ty,toFormData:Ny,AxiosHeaders:Py,HttpStatusCode:Dy,formToJSON:Iy,getAdapter:Oy,mergeConfig:By,create:My}=ke,dt={baseURL:"",timeout:6e4,getToken:void 0};function Uo(e={}){e.baseURL!==void 0&&(dt.baseURL=e.baseURL),e.timeout!==void 0&&(dt.timeout=e.timeout),e.getToken!==void 0&&(dt.getToken=e.getToken)}const Cu="";function Ru(e){return(e||"").replace(/\/$/,"")||Cu}const Un=ke.create({timeout:dt.timeout});Un.interceptors.request.use(e=>{var n;e.baseURL=Ru(dt.baseURL||e.baseURL),e.timeout=dt.timeout;const t=(n=dt.getToken)==null?void 0:n.call(dt);return t&&(e.headers.Authorization=t),e}),Un.interceptors.response.use(e=>{const t=e.config,n=e.data;return t.responseType==="blob"?e:t.noCode?n:n&&![0,200].includes(n.code)?Promise.reject(new Error(n.msg||n.message||"服务错误")):n},e=>Promise.reject(e));function ye(e){return Un.request(e)}const zo=e=>ye({url:"/server/repository/flowdef/event/latest",method:"post",data:e}),Fr=e=>ye({url:"/server/app/event/list",method:"get",data:e}),$r=e=>ye({url:"/server/repository/flowdef/event/query",method:"post",data:e}),Vr=(e,t)=>ye({url:`/console/plugin/simulate/event/page/draft/${e.currentPage}/${e.pageSize}`,method:"post",data:t}),Ho=e=>ye({url:"/console/plugin/simulate/event/delete",method:"post",data:e}),Wo=e=>ye({url:"/console/plugin/simulate",method:"post",data:e}),qo=e=>ye({url:"/server/runtime/event/start",method:"post",data:e}),jr=e=>ye({url:"/server/runtime/event/quickStart",method:"post",data:e}),zn=e=>ye({url:"/server/runtime/event/delete",method:"post",data:e}),Yo=e=>ye({url:"/server/runtime/event/messageEventReceived",method:"post",data:e}),Hn=e=>ye({url:"/server/work/event/query",method:"post",data:e}),Ur=e=>ye({url:"/server/history/workinst/event/query",method:"post",data:e}),zr=e=>ye({url:"/server/operate/def/event/get",method:"post",data:e}),Hr=e=>ye({url:"/server/task/event/claim",method:"post",data:e}),Wr=e=>ye({url:"/server/task/event/withdraw",method:"post",data:e}),qr=e=>ye({url:"/server/task/event/rollback",method:"post",data:e}),Yr=e=>ye({url:"/server/task/event/recyle",method:"post",data:e}),Kr=e=>ye({url:"/server/task/event/complete",method:"post",data:e}),Gr=e=>ye({url:"/server/task/event/turnBefore",method:"post",data:e}),Xr=e=>ye({url:"/server/task/event/turnAfter",method:"post",data:e}),Jr=e=>ye({url:"/server/runtime/event/suspend",method:"post",data:e}),Zr=e=>ye({url:"/server/runtime/event/activate",method:"post",data:e}),Qr=e=>ye({url:"/server/runtime/event/terminate",method:"post",data:e}),ei=e=>ye({url:`/console/flowdef/event/download/procdefId/${e.procdefId}/extname/bpmn`,method:"get",noCode:!0}),ti=e=>ye({url:"/server/task/event/send",method:"post",data:e}),Wn=e=>ye({url:"/server/model/event/get/firsthandle",method:"post",data:e}),Ko=Wn,qn=e=>ye({url:"/server/assignment/event/query",method:"post",data:e}),ni=(e="")=>ye({url:`/console/plugin/identify/usertree/organ/event/tree/${e}`,method:"get"}),ri=e=>ye({url:"/server/model/event/get/succeding",method:"post",data:e}),ii=e=>ye({url:"/server/task/event/jump",method:"post",data:e}),oi=e=>ye({url:"/server/model/event/get/usertasks",method:"post",data:e}),Tu=Object.freeze(Object.defineProperty({__proto__:null,activateFlow:Zr,claimTask:Hr,completeTask:Kr,deleteDraftTask:Ho,deleteProcessInstance:zn,doneTaskList:Ur,downloadBpmn:ei,draftFlowList:zo,draftTaskList:Vr,flowStartNodeList:Ko,getAppList:Fr,getFirstHandleNodes:Wn,getFlowList:$r,getOptList:zr,jumpTask:ii,nextSendNode:ri,nodeAssistant:qn,organUserTree:ni,quickStart:jr,receiveMessageEvent:Yo,recycleTask:Yr,revocationTask:Wr,rollbackTask:qr,saveDraft:Wo,sendTask:ti,startDraft:qo,startNodes:oi,suspendFlow:Jr,terminateFlow:Qr,todoTaskList:Hn,turnAfterTask:Xr,turnBeforeTask:Gr},Symbol.toStringTag,{value:"Module"})),Go=3e3;function Yn(e){if(e!==void 0)return e;if(typeof window>"u"||typeof document>"u")return Go;let t=Go-2;return document.querySelectorAll([".ui-overlay",".ui-overlay-message-box",".ui-modal",".el-overlay",".el-overlay-message-box"].join(",")).forEach(r=>{const i=Number.parseInt(window.getComputedStyle(r).zIndex,10);Number.isFinite(i)&&(t=Math.max(t,i))}),t+2}const Nu={class:"ui-flow-jump"},Pu={class:"dialog-footer"},Xo=wt(l.defineComponent({name:"UiFlowJump",__name:"FlowJump",props:{processDefinitionId:{},workId:{default:""},processInstanceId:{default:""},dealUser:{default:()=>({})},modelValue:{type:Boolean,default:!1},showTrigger:{type:Boolean,default:!0},dialogTitle:{default:"跳转"},dialogWidth:{default:"960px"},zIndex:{}},emits:["update:modelValue","click","open","close","beforeJump","afterJump","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(!1),a=l.ref(),s=l.ref(!1),f=l.ref(!1),d=l.ref(!1),h=l.ref([]),m=l.ref([]),A=l.ref(""),V=l.ref("");let G=0;const $=l.computed(()=>String(r.dealUser.userId||r.dealUser.id||"")),M=l.computed(()=>String(r.dealUser.name||$.value)),S={children:"children",label:"label",value:"value",disabled:"disabled",isLeaf:O=>O.hasChild===!1};function I(O){return O?String(O.id||O.activityId||""):""}function y(O){return O?String(O.activityName||O.name||O.id||O.activityId||""):""}function v(O){return Array.isArray(O)?O.map(D=>{const F=D||{},C=I(F);return{...F,id:C,name:y(F)}}).filter(D=>D.id):[]}function k(O){return O.map(D=>{const F=D||{},C=String(F.id||F.userId||""),R=String(F.ntype||"user"),j=Array.isArray(F.childs)?F.childs:Array.isArray(F.children)?F.children:void 0;return{...F,id:C,value:C,label:String(F.caption||F.name||F.id||F.userId||""),caption:String(F.caption||F.name||F.id||F.userId||""),ntype:R,hasChild:!!(F.hasChild||j!=null&&j.length),disabled:R!=="user",children:j?k(j):void 0}}).filter(D=>D.id)}function T(){return $.value?[{id:$.value,value:$.value,label:M.value,caption:M.value,name:M.value,ntype:"user",hasChild:!1,disabled:!1}]:[]}async function E(){const O=String(r.processDefinitionId||""),D=++G;if(!O)return h.value=[],h.value;f.value=!0;try{const F=await oi({processDefinitionId:O}),C=v(F==null?void 0:F.data);return D!==G||O!==String(r.processDefinitionId||"")?C:(h.value=C,h.value)}catch(F){throw D===G&&(h.value=[]),i("error",F),F}finally{D===G&&(f.value=!1)}}async function x(O="",D){const F=await qn({processDefinitionId:r.processDefinitionId,activityId:A.value,ntype:D,parentId:O});return k(Array.isArray(F.data)?F.data:[])}async function H(){if(m.value=[],V.value="",!A.value)return[];d.value=!0;try{const O=await x();m.value=O.length?O:T()}catch{m.value=T()}finally{d.value=!1}return m.value.length===1&&m.value[0].ntype==="user"&&(V.value=m.value[0].id),m.value}async function B(O,D){if(O.level===0){D(m.value);return}if(O.data.hasChild===!1||O.data.ntype==="user"){D([]);return}if(Array.isArray(O.data.children)&&O.data.children.length){D(O.data.children);return}try{const F=await x(String(O.data.id),String(O.data.ntype||""));D(F)}catch(F){i("error",F),D([])}}async function _(){await H()}function q(O,D){const F=O?I(O):A.value,C=String(D||V.value||$.value);return{workId:r.workId,flowNodeAssignee:{activityId:F,assignees:[{name:C,userId:C}]},variables:{}}}async function ae(O){const D=O||q();i("beforeJump",D),s.value=!0;try{const F=await ii(D);return i("afterJump",F,D),F}catch(F){throw i("error",F),F}finally{s.value=!1}}async function J(){if(!r.workId){ge.ElMessage.warning("当前任务缺少 workId,无法执行跳转");return}if(!A.value){ge.ElMessage.warning("请选择开始节点");return}if(!V.value){ge.ElMessage.warning("请选择办理人");return}try{await ae(),o.value=!1,ge.ElMessage.success("跳转任务成功")}catch{}}async function K(){a.value=Yn(r.zIndex),o.value=!0,A.value="",V.value="",m.value=[],i("open");try{await E()}catch{}}function X(){o.value=!1}function re(){i("close")}function Q(){i("click"),K()}return l.watch(()=>r.modelValue,O=>{O&&!o.value&&K(),!O&&o.value&&(o.value=!1)}),l.watch(o,O=>i("update:modelValue",O)),l.watch(()=>r.processDefinitionId,()=>{A.value="",V.value="",m.value=[],r.processDefinitionId?E().catch(()=>{}):h.value=[]}),l.watch($,()=>{o.value&&A.value&&H()}),l.onMounted(()=>{r.modelValue?K():r.processDefinitionId&&E().catch(()=>{})}),t({visible:o,effectiveZIndex:a,loading:s,nodeLoading:f,assigneeLoading:d,startNodeList:h,selectedActivityId:A,selectedAssigneeId:V,open:K,close:X,getStartNodes:E,assembleData:q,jump:ae}),(O,D)=>{const F=l.resolveComponent("el-button"),C=l.resolveComponent("el-option"),R=l.resolveComponent("el-select"),j=l.resolveComponent("el-form-item"),de=l.resolveComponent("el-tree-select"),se=l.resolveComponent("el-form"),p=l.resolveComponent("el-dialog");return l.openBlock(),l.createElementBlock("div",Nu,[e.showTrigger?(l.openBlock(),l.createBlock(F,{key:0,type:"primary",loading:s.value,onClick:Q},{default:l.withCtx(()=>[l.renderSlot(O.$slots,"default",{},()=>[D[3]||(D[3]=l.createTextVNode("跳转",-1))],!0)]),_:3},8,["loading"])):l.createCommentVNode("",!0),l.createVNode(p,{modelValue:o.value,"onUpdate:modelValue":D[2]||(D[2]=u=>o.value=u),"append-to-body":"",class:"ui-flow-jump-dialog","close-on-click-modal":!1,title:e.dialogTitle,width:e.dialogWidth,"z-index":a.value,onClosed:re},{footer:l.withCtx(()=>[l.createElementVNode("div",Pu,[l.createVNode(F,{type:"primary",loading:s.value,onClick:J},{default:l.withCtx(()=>[...D[4]||(D[4]=[l.createTextVNode("确认",-1)])]),_:1},8,["loading"]),l.createVNode(F,{disabled:s.value,onClick:X},{default:l.withCtx(()=>[...D[5]||(D[5]=[l.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:l.withCtx(()=>[l.createVNode(se,{class:"jump-form","label-width":"108px"},{default:l.withCtx(()=>[l.createVNode(j,{label:"开始节点",required:""},{default:l.withCtx(()=>[l.createVNode(R,{modelValue:A.value,"onUpdate:modelValue":D[0]||(D[0]=u=>A.value=u),clearable:"",filterable:"",loading:f.value,teleported:!1,placeholder:"请选择",style:{width:"100%"},onChange:_},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(h.value,u=>(l.openBlock(),l.createBlock(C,{key:I(u),label:y(u),value:I(u)},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),l.createVNode(j,{label:"办理人",required:""},{default:l.withCtx(()=>[l.createVNode(de,{modelValue:V.value,"onUpdate:modelValue":D[1]||(D[1]=u=>V.value=u),"check-strictly":"",clearable:"",data:m.value,disabled:!A.value,load:B,loading:d.value,props:S,lazy:"","node-key":"id",teleported:!1,placeholder:"请选择","render-after-expand":!1,style:{width:"100%"}},null,8,["modelValue","data","disabled","loading"])]),_:1})]),_:1})]),_:1},8,["modelValue","title","width","z-index"])])}}}),[["__scopeId","data-v-6ee553e3"]]),Du={class:"ui-flow-send"},Iu={class:"send-panel"},Ou={class:"current-activity"},Bu={class:"node-groups"},Mu=["onClick"],Lu={class:"send-center"},Fu={class:"assignee-transfer"},$u={class:"assignee-box"},Vu={class:"tree-node"},ju={key:1,class:"candidate-list"},Uu={class:"assignee-box selected-list"},zu={key:0,class:"node-state"},Hu={class:"opinion-panel"},Wu={class:"dialog-footer"},ai=wt(l.defineComponent({name:"UiFlowSend",__name:"FlowSend",props:{processDefinitionId:{},activity:{},workId:{},processInstanceId:{default:""},variables:{default:()=>({})},assignmentQueryParams:{default:()=>({})},dealUser:{default:()=>({})},bpmnXml:{default:""},showTrigger:{type:Boolean,default:!0},dialogTitle:{default:"发送"},dialogWidth:{default:"1200px"},zIndex:{},defaultOpinion:{default:""},modelValue:{type:Boolean,default:!1},forceSingleAssignee:{type:Boolean,default:!1},deleteInstanceOnCancel:{type:Boolean,default:!1}},emits:["update:modelValue","click","open","close","nextNodesResolved","beforeSend","afterSend","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(!1),a=l.ref(),s=l.ref(!1),f=l.ref(!1),d=l.ref(!1),h=l.ref(!1),m=l.ref([]),A=l.ref([]),V=l.ref([]),G=l.ref([]),$=l.ref([]),M=l.ref(!1),S=l.ref(""),I=l.ref("nextNode"),y=l.ref(""),v=l.ref([]),k=l.ref(!1),T=l.ref(0),E=l.ref(),x=l.ref(!1),H={children:"childs",label:"caption",isLeaf:U=>U.hasChild===!1},B=l.computed(()=>String(r.dealUser.userId||r.dealUser.id||"")),_=l.computed(()=>A.value.find(U=>q(U)===S.value));function q(U){return U?String(U.id||U.activityId||""):""}function ae(U){return`${U.activity}:${U.id}`}function J(U){return typeof U=="boolean"?"boolean":typeof U=="number"?Number.isInteger(U)?"integer":"double":U instanceof Date?"date":"string"}function K(){v.value=Object.entries(r.variables).map(([U,z])=>({variableName:U,variableType:J(z),variableValue:z})),k.value=!1}function X(){return v.value.reduce((U,z)=>(z.variableName&&(U[z.variableName]=z.variableValue),U),{})}function re(){S.value="",m.value=[],A.value=[],V.value=[],G.value=[],$.value=[],M.value=!1}function Q(U){if(!r.bpmnXml||!U||typeof DOMParser>"u")return;const z=new DOMParser().parseFromString(r.bpmnXml,"text/xml");return Array.from(z.getElementsByTagName("*")).find(Z=>Z.getAttribute("id")===U)}function O(U){if(r.forceSingleAssignee)return!0;const z=Q(U);if(!z)return!0;if(Array.from(z.children||[]).some(Re=>Re.localName==="multiInstanceLoopCharacteristics"))return!1;const L=["assigneUser","candidateUser"],pe=Array.from(z.getElementsByTagName("*")).filter(Re=>Re.localName==="properties"&&L.includes(Re.getAttribute("type")||"")).flatMap(Re=>Array.from(Re.getElementsByTagName("*")).filter(Ye=>Ye.localName==="property"));if(pe.some(Re=>{const Ye=Re.getAttribute("assignType");return!!(Ye&&Ye!=="user")}))return!1;const we=pe.map(Re=>Re.getAttribute("value")).filter(Boolean),et=z.getAttribute("camunda:assignee")||"";return et&&!et.includes("${")&&we.push(...et.split(",").filter(Boolean)),new Set(we).size<=1}function D(U){var z;return((z=A.value.find(Z=>q(Z)===U))==null?void 0:z.isSingleAssignee)!==!1}function F(U,z){const Z=q(z),L=String(z.activityName||z.name||Z);return U.map(pe=>{const we=pe||{};return{...we,id:String(we.id||""),caption:String(we.caption||we.name||we.id||""),ntype:String(we.ntype||"user"),hasChild:we.hasChild,activity:Z,activityName:L,disabled:we.ntype!=="user",childs:Array.isArray(we.childs)?F(we.childs,z):void 0}})}async function C(U,z){h.value=!0;try{const Z=await qn({...r.assignmentQueryParams,processDefinitionId:r.processDefinitionId,activityId:q(U),userId:B.value,...z?{parentId:z}:{}}),L=F(Array.isArray(Z.data)?Z.data:[],U);return z?L:S.value!==q(U)?[]:(M.value=L.some(pe=>["router","organ"].includes(pe.ntype||"")),M.value?(G.value=L,V.value=[],await l.nextTick(),c(L)):(G.value=[],V.value=L),L)}catch(Z){throw i("error",Z),Z}finally{h.value=!1}}async function R(U,z){if(U.level===0){z(G.value);return}if(U.data.hasChild===!1||!_.value){z([]);return}if(Array.isArray(U.data.childs)&&U.data.childs.length){z(U.data.childs),await l.nextTick(),c(U.data.childs);return}try{const Z=await C(_.value,String(U.data.id));z(Z),await l.nextTick(),c(Z)}catch{z([])}}async function j(U=X()){const z=++T.value;f.value=!0,d.value=!1,re();try{const Z=await ri({processDefinitionId:r.processDefinitionId,activityId:r.activity.activityId,processInstanceId:r.processInstanceId,workId:r.workId,variables:U});if(z!==T.value)return[];m.value=Z.data||[],A.value=m.value.filter(pe=>pe.flowElementType==="USER_TASK").map(pe=>({...pe,isSingleAssignee:O(q(pe))})),d.value=!0,k.value=!1,i("nextNodesResolved",m.value);const L=A.value[0];if(L){S.value=q(L);try{await C(L)}catch{}}return m.value}catch(Z){throw z===T.value&&(d.value=!1),i("error",Z),Z}finally{z===T.value&&(f.value=!1)}}async function de(U){S.value=q(U),V.value=[],G.value=[],M.value=!1;try{await C(U)}catch{}}function se(U){return $.value.some(z=>ae(z)===ae(U))}function p(U,z){const Z=ae(U);z?(D(U.activity)&&($.value=$.value.filter(L=>L.activity!==U.activity)),$.value.some(L=>ae(L)===Z)||$.value.push({...U})):$.value=$.value.filter(L=>ae(L)!==Z)}function u(U,z){U.ntype==="user"&&(z&&D(U.activity)&&$.value.filter(L=>L.activity===U.activity).forEach(L=>{var pe;return(pe=E.value)==null?void 0:pe.setChecked(L.id,!1,!1)}),p(U,z))}function c(U){U.forEach(z=>{var Z,L;z.ntype==="user"&&se(z)&&((Z=E.value)==null||Z.setChecked(z.id,!0,!1)),(L=z.childs)!=null&&L.length&&c(z.childs)})}function g(U){var z;$.value=$.value.filter(Z=>ae(Z)!==ae(U)),M.value&&((z=E.value)==null||z.setChecked(U.id,!1,!1))}function b(){const U=$.value.reduce((z,Z)=>{let L=z.get(Z.activity);return L||(L={activityId:Z.activity,assignees:[]},z.set(Z.activity,L)),L.assignees.some(pe=>pe.userId===Z.id)||L.assignees.push({name:Z.id,userId:Z.id}),z},new Map);return{workId:r.workId,flowNodeAssignees:Array.from(U.values()),variables:X(),opinion:y.value}}async function P(U){const z=U||b();i("beforeSend",z),s.value=!0;try{const Z=await ti(z);return i("afterSend",Z,z),Z}catch(Z){throw i("error",Z),Z}finally{s.value=!1}}async function ee(){if(f.value){ge.ElMessage.warning("正在计算下一环节,请稍后再发送");return}if(k.value||!d.value){I.value="variables",ge.ElMessage.warning("流程变量已变化,请重新计算下一环节");return}const U=A.value.find(z=>!$.value.some(Z=>Z.activity===q(z)));if(U){S.value=q(U),I.value="nextNode",ge.ElMessage.warning(`请选择“${U.activityName||U.name||q(U)}”的办理人`),await de(U);return}try{await P(),x.value=!0,o.value=!1,ge.ElMessage.success("发送成功")}catch{}}async function N(){a.value=Yn(r.zIndex),o.value=!0,x.value=!1,y.value=r.defaultOpinion,I.value="nextNode",K(),i("open");try{await j(X())}catch{}}function Y(){o.value=!1}function W(){i("close"),!(!r.deleteInstanceOnCancel||x.value)&&r.processInstanceId&&zn({processInstanceId:r.processInstanceId}).catch(U=>i("error",U))}function te(){i("click"),N()}return l.watch(()=>r.modelValue,U=>{U&&!o.value&&N(),!U&&o.value&&(o.value=!1)}),l.watch(o,U=>i("update:modelValue",U)),l.onMounted(()=>{r.modelValue&&N()}),t({visible:o,effectiveZIndex:a,loading:s,nodeLoading:f,nodeResolved:d,nextNodes:m,open:N,close:Y,getNextNode:j,assembleData:b,send:P}),(U,z)=>{const Z=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",Du,[e.showTrigger?(l.openBlock(),l.createBlock(l.unref(ge.ElButton),{key:0,type:"primary",loading:s.value,onClick:te},{default:l.withCtx(()=>[l.renderSlot(U.$slots,"default",{},()=>[z[3]||(z[3]=l.createTextVNode("发送",-1))],!0)]),_:3},8,["loading"])):l.createCommentVNode("",!0),l.createVNode(l.unref(ge.ElDialog),{modelValue:o.value,"onUpdate:modelValue":z[2]||(z[2]=L=>o.value=L),"append-to-body":"",class:"ui-flow-send-dialog","close-on-click-modal":!1,title:e.dialogTitle,width:e.dialogWidth,"z-index":a.value,onClosed:W},{footer:l.withCtx(()=>[l.createElementVNode("div",Wu,[l.createVNode(l.unref(ge.ElButton),{type:"primary",loading:s.value,onClick:ee},{default:l.withCtx(()=>[...z[10]||(z[10]=[l.createTextVNode("确认",-1)])]),_:1},8,["loading"]),l.createVNode(l.unref(ge.ElButton),{disabled:s.value,onClick:Y},{default:l.withCtx(()=>[...z[11]||(z[11]=[l.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:l.withCtx(()=>[l.createElementVNode("div",Iu,[l.createElementVNode("div",Ou,[z[4]||(z[4]=l.createTextVNode(" 当前环节:",-1)),l.createElementVNode("strong",null,l.toDisplayString(e.activity.activityName||e.activity.activityId),1)]),l.createElementVNode("aside",Bu,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(A.value,L=>(l.openBlock(),l.createElementBlock("button",{key:q(L),class:l.normalizeClass(["node-group",{active:S.value===q(L)}]),type:"button",onClick:pe=>de(L)},[z[5]||(z[5]=l.createElementVNode("span",{class:"group-avatar"},"♟",-1)),l.createElementVNode("span",null,l.toDisplayString(L.activityName||L.name||q(L)),1)],10,Mu))),128)),d.value&&!A.value.length?(l.openBlock(),l.createBlock(l.unref(ge.ElEmpty),{key:0,description:"没有下一用户任务","image-size":44})):l.createCommentVNode("",!0)]),l.createElementVNode("section",Lu,[l.createElementVNode("div",Fu,[l.withDirectives((l.openBlock(),l.createElementBlock("div",$u,[M.value?(l.openBlock(),l.createBlock(l.unref(ge.ElTree),{key:0,ref_key:"assigneeTreeRef",ref:E,class:"assignee-tree",data:G.value,load:R,props:H,"check-on-click-node":"","check-strictly":"",lazy:"","node-key":"id","show-checkbox":"",onCheckChange:u},{default:l.withCtx(({data:L})=>[l.createElementVNode("span",Vu,[l.createElementVNode("span",null,l.toDisplayString(L.ntype==="user"?"●":"▣"),1),l.createElementVNode("span",null,l.toDisplayString(L.caption||L.id),1)])]),_:1},8,["data"])):(l.openBlock(),l.createElementBlock("div",ju,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(V.value,L=>(l.openBlock(),l.createBlock(l.unref(ge.ElCheckbox),{key:ae(L),"model-value":se(L),class:"candidate-item",onChange:pe=>p(L,!!pe)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(L.caption||L.name||L.id),1)]),_:2},1032,["model-value","onChange"]))),128)),!h.value&&!V.value.length?(l.openBlock(),l.createBlock(l.unref(ge.ElEmpty),{key:0,description:"暂无可选办理人","image-size":44})):l.createCommentVNode("",!0)]))])),[[Z,h.value]]),z[7]||(z[7]=l.createElementVNode("div",{class:"transfer-arrows","aria-hidden":"true"},[l.createElementVNode("span",null,"→"),l.createElementVNode("span",null,"←")],-1)),l.createElementVNode("div",Uu,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList($.value,L=>(l.openBlock(),l.createElementBlock("div",{key:ae(L),class:"selected-user"},[l.createElementVNode("span",null,l.toDisplayString(L.caption||L.name||L.id),1),l.createVNode(l.unref(ge.ElButton),{link:"",type:"danger",onClick:pe=>g(L)},{default:l.withCtx(()=>[...z[6]||(z[6]=[l.createTextVNode("移除",-1)])]),_:1},8,["onClick"])]))),128)),$.value.length?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(l.unref(ge.ElEmpty),{key:0,description:"暂未选择办理人","image-size":44}))])]),l.createVNode(l.unref(ge.ElTabs),{modelValue:I.value,"onUpdate:modelValue":z[0]||(z[0]=L=>I.value=L),type:"card",class:"send-tabs"},{default:l.withCtx(()=>[l.createVNode(l.unref(ge.ElTabPane),{label:"下一环节",name:"nextNode"},{default:l.withCtx(()=>[f.value?(l.openBlock(),l.createElementBlock("div",zu,"正在根据流程变量计算下一环节...")):(l.openBlock(),l.createBlock(l.unref(ge.ElTable),{key:1,data:$.value,border:"",height:"190"},{empty:l.withCtx(()=>[l.createElementVNode("span",null,l.toDisplayString(A.value.length?"请选择办理人":"暂无数据"),1)]),default:l.withCtx(()=>[l.createVNode(l.unref(ge.ElTableColumn),{prop:"activityName",label:"办理环节","min-width":"150"}),l.createVNode(l.unref(ge.ElTableColumn),{prop:"caption",label:"办理人","min-width":"130"},{default:l.withCtx(L=>{var pe,we,et;return[l.createTextVNode(l.toDisplayString(((pe=L==null?void 0:L.row)==null?void 0:pe.caption)||((we=L==null?void 0:L.row)==null?void 0:we.name)||((et=L==null?void 0:L.row)==null?void 0:et.id)||""),1)]}),_:1}),l.createVNode(l.unref(ge.ElTableColumn),{label:"办理方式",width:"120"},{default:l.withCtx(L=>[l.createTextVNode(l.toDisplayString(L!=null&&L.row?D(L.row.activity)?"单人单办":"多人办理":""),1)]),_:1}),l.createVNode(l.unref(ge.ElTableColumn),{label:"操作",width:"90",align:"center"},{default:l.withCtx(L=>[L!=null&&L.row?(l.openBlock(),l.createBlock(l.unref(ge.ElButton),{key:0,link:"",type:"danger",onClick:pe=>g(L.row)},{default:l.withCtx(()=>[...z[8]||(z[8]=[l.createTextVNode("删除",-1)])]),_:1},8,["onClick"])):l.createCommentVNode("",!0)]),_:1})]),_:1},8,["data"]))]),_:1})]),_:1},8,["modelValue"])]),l.createElementVNode("aside",Hu,[z[9]||(z[9]=l.createElementVNode("label",null,"填写意见:",-1)),l.createVNode(l.unref(ge.ElInput),{modelValue:y.value,"onUpdate:modelValue":z[1]||(z[1]=L=>y.value=L),maxlength:"500",placeholder:"请输入意见",resize:"none","show-word-limit":"",type:"textarea"},null,8,["modelValue"])])])]),_:1},8,["modelValue","title","width","z-index"])])}}}),[["__scopeId","data-v-398deb1e"]]),qu={class:"button-group-wrapper"},Yu={key:0,class:"button-state"},Ku={key:0,class:"line"},Gu={class:"sign-selector"},Xu={class:"selected-sign-user"},Ju={class:"sign-dialog-footer"},Zu=wt(l.defineComponent({name:"UiFlowButtons",__name:"FlowButtons",props:{processInstanceId:{default:""},processDefinitionId:{default:""},activityId:{default:""},activityName:{default:""},workId:{default:""},taskId:{default:""},dealUserId:{default:""},dealUserName:{default:""},variables:{default:()=>({})},assignmentQueryParams:{default:()=>({})},autoResolveWork:{type:Boolean,default:!0},autoHandleDialogs:{type:Boolean,default:!0},forceSingleAssignee:{type:Boolean,default:!1},dialogZIndex:{},beforeAction:{},afterAction:{}},emits:["executeAction","afterAction","workResolved","error"],setup(e,{expose:t,emit:n}){let r=0;const i=e,o=n,a=l.ref([]),s=l.ref(!1),f=l.ref(),d=l.ref(!1),h=l.ref(!1),m=l.ref(),A=l.ref(),V=l.ref(!1),G=l.ref("turnBefore"),$=l.ref(!1),M=l.ref(!1),S=l.ref([]),I=l.ref(),y=l.computed(()=>G.value==="turnBefore"?"前加签":"后加签"),v={children:"children",label:"caption",disabled:"disabled",isLeaf:"isLeaf"};function k(N,...Y){for(const W of Y){const te=N==null?void 0:N[W];if(te!=null&&String(te))return String(te)}return""}function T(N){if(Array.isArray(N))return N;if(!N||typeof N!="object")return[];const Y=N;for(const W of["records","list","content","rows"])if(Array.isArray(Y[W]))return Y[W];return[]}const E=l.computed(()=>i.workId||k(f.value,"workId","id")),x=l.computed(()=>i.processInstanceId||k(f.value,"processInstanceId")),H=l.computed(()=>i.processDefinitionId||k(f.value,"processDefinitionId")),B=l.computed(()=>i.taskId||k(f.value,"taskId","taskInstanceId")),_=l.computed(()=>i.activityId||k(f.value,"activityId")),q=l.computed(()=>i.activityName||k(f.value,"activityName")),ae=l.computed(()=>({id:i.dealUserId,userId:i.dealUserId,name:i.dealUserName||i.dealUserId}));function J(N="",Y=""){return{action:N,actionLabel:Y,workId:E.value,processInstanceId:x.value||void 0,processDefinitionId:H.value||void 0,taskId:B.value||void 0,activityId:_.value||void 0,activityName:q.value||void 0,workData:f.value}}const K=l.computed(()=>{const N=m.value;if(!((N==null?void 0:N.action)!=="taskSend"||!N.workId||!N.processDefinitionId||!N.activityId))return{workId:N.workId,processDefinitionId:N.processDefinitionId,processInstanceId:N.processInstanceId||"",activity:{activityId:N.activityId,activityName:N.activityName}}}),X=l.computed(()=>{const N=m.value;if(!(!["jump","taskJump"].includes((N==null?void 0:N.action)||"")||!(N!=null&&N.workId)||!N.processDefinitionId))return{workId:N.workId,processDefinitionId:N.processDefinitionId,processInstanceId:N.processInstanceId||""}});async function re(){if(i.workId)return f.value=void 0,J();if(!i.autoResolveWork)return J();if(!i.processInstanceId||!i.dealUserId)throw new Error("FlowButtons 缺少 workId;自动解析待办时必须传入 processInstanceId 和 dealUserId");const N=await Hn({currentPage:1,pageSize:100,assignee:i.dealUserId,assigne:i.dealUserId,userId:i.dealUserId,processInstanceId:i.processInstanceId}),W=T(N.data).find(U=>k(U,"processInstanceId")===i.processInstanceId);if(!W)throw new Error("当前用户在该流程实例中没有可办理的待办任务");f.value=W;const te=J();return o("workResolved",te),te}function Q(N){return N.map(Y=>{const W=Y||{},te=String(W.id||W.userId||""),U=String(W.ntype||""),z=Array.isArray(W.childs)?W.childs:Array.isArray(W.children)?W.children:void 0;return{...W,id:te,caption:String(W.caption||W.name||te),ntype:U,hasChild:!!(W.hasChild||z!=null&&z.length),isLeaf:U==="user"||!W.hasChild&&!(z!=null&&z.length),disabled:U!=="user",children:z?Q(z):void 0}}).filter(Y=>Y.id)}async function O(N=""){const Y=await ni(N);return Q(Array.isArray(Y.data)?Y.data:[])}async function D(N,Y){const W=N.level===0?"":String(N.data.id||"");if(N.level>0&&(N.data.ntype==="user"||N.data.hasChild===!1)){Y([]);return}$.value=!0;try{const te=await O(W);N.level===0&&(S.value=te),Y(te)}catch(te){o("error",te),Y([])}finally{$.value=!1}}function F(N){N.ntype==="user"&&(I.value=N)}function C(){I.value=void 0,S.value=[]}function R(N){if(!B.value){ge.ElMessage.error("当前待办缺少任务实例 ID,无法加签");return}G.value=N,A.value=Yn(i.dialogZIndex),V.value=!0}async function j(){var Y;if(!((Y=I.value)!=null&&Y.id)){ge.ElMessage.warning("请选择一名机构人员");return}const N=G.value;M.value=!0;try{const te=await(N==="turnBefore"?Gr:Xr)({workId:E.value,taskId:B.value,assignee:I.value.id});V.value=!1,se(N,te,J(N,y.value))}catch(W){o("error",W)}finally{M.value=!1}}async function de(){s.value=!0,a.value=[];try{if(await re(),!E.value)return a.value;const N=await zr({workId:E.value});return a.value=Array.isArray(N.data)?N.data:[],a.value}finally{s.value=!1}}function se(N,Y,W){var te;(te=i.afterAction)==null||te.call(i,N,Y,W),o("afterAction",N,Y,W)}function p(N,Y){o("executeAction",N,Y)}function u(N){return{processActivate:"restore",processTerminate:"terminate",processSuspend:"hang",processSupspend:"hang"}[N]||N}async function c(N,Y,W){var pe;const te=Yn(i.dialogZIndex),U=`ui-flow-confirm-overlay-${++r}`,z=ge.ElMessageBox.confirm(`是否${Y}此任务?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",modalClass:U});await l.nextTick(),(pe=document.querySelector(`.${U}`))==null||pe.style.setProperty("z-index",String(te),"important"),await z;const Z={workId:W.workId};let L;switch(u(N)){case"revocation":case"taskWithdraw":L=await Wr(Z);break;case"taskRecyle":L=await Yr(Z);break;case"hang":L=await Jr({processInstanceIds:[W.processInstanceId||""]});break;case"restore":L=await Zr(Z);break;case"terminate":L=await Qr(Z);break;case"taskComplete":L=await Kr({...Z,variables:i.variables});break;case"taskRollback":L=await qr(Z);break;case"taskClaim":if(!i.dealUserId){p(N,W);return}L=await Hr({...Z,assignee:i.dealUserId});break;default:p(N,W);return}se(N,L,W),u(N)==="taskClaim"&&await de()}async function g(N){var Y;try{const W=N.name;E.value||await de();const te=J(W,N.label);if(!te.workId)throw new Error("当前待办缺少 workId,无法执行流程操作");if(await((Y=i.beforeAction)==null?void 0:Y.call(i,W,te))===!1)return;if(["turnBefore","taskTurnBefore"].includes(W)){R("turnBefore");return}if(["turnAfter","taskTurnAfter"].includes(W)){R("turnAfter");return}if(W==="taskSend"&&i.autoHandleDialogs){if(!te.processDefinitionId||!te.activityId)throw new Error("当前待办缺少 processDefinitionId 或 activityId,无法发送");m.value=te,d.value=!0;return}if(["jump","taskJump"].includes(W)&&i.autoHandleDialogs){if(!te.processDefinitionId)throw new Error("当前待办缺少 processDefinitionId,无法跳转");m.value=te,h.value=!0;return}if(["save","start","taskSend","jump","taskJump"].includes(W)){p(W,te);return}await c(W,N.label,te)}catch(W){W!=="cancel"&&W!=="close"&&o("error",W)}}function b(N,Y){const W={...m.value||J("taskSend","发送"),requestData:Y};se("taskSend",N,W),m.value=void 0}function P(N,Y){const W={...m.value||J("taskJump","跳转"),requestData:Y};se(W.action,N,W),m.value=void 0}function ee(N){o("error",N)}return l.watch(()=>[i.workId,i.processInstanceId,i.dealUserId],()=>{d.value=!1,h.value=!1,m.value=void 0,de().catch(N=>o("error",N))},{immediate:!0}),t({loading:s,optList:a,resolvedWorkData:f,getAvailableActions:de,resolveCurrentWork:re,executeAction:g}),(N,Y)=>{const W=l.resolveComponent("el-tree"),te=l.resolveComponent("el-button"),U=l.resolveComponent("el-dialog"),z=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",qu,[s.value?(l.openBlock(),l.createElementBlock("span",Yu,"正在加载流程操作...")):(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(a.value,(Z,L)=>(l.openBlock(),l.createElementBlock("div",{key:Z.name||L,class:"flex-start-r"},[l.renderSlot(N.$slots,"prefix",{action:Z},void 0,!0),l.renderSlot(N.$slots,"default",{action:Z},void 0,!0),l.createVNode(Ji,{type:Z.name,label:Z.label,onClick:pe=>g(Z)},null,8,["type","label","onClick"]),L!==a.value.length-1?(l.openBlock(),l.createElementBlock("div",Ku)):l.createCommentVNode("",!0),l.renderSlot(N.$slots,"suffix",{action:Z},void 0,!0)]))),128)),l.createVNode(U,{modelValue:V.value,"onUpdate:modelValue":Y[1]||(Y[1]=Z=>V.value=Z),"append-to-body":"",class:"ui-flow-sign-dialog","close-on-click-modal":!1,title:y.value,width:"760px","z-index":A.value,onClosed:C},{footer:l.withCtx(()=>[l.createElementVNode("div",Ju,[l.createVNode(te,{type:"primary",loading:M.value,onClick:j},{default:l.withCtx(()=>[...Y[6]||(Y[6]=[l.createTextVNode("确认",-1)])]),_:1},8,["loading"]),l.createVNode(te,{disabled:M.value,onClick:Y[0]||(Y[0]=Z=>V.value=!1)},{default:l.withCtx(()=>[...Y[7]||(Y[7]=[l.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:l.withCtx(()=>{var Z,L;return[l.withDirectives((l.openBlock(),l.createElementBlock("div",Gu,[Y[5]||(Y[5]=l.createElementVNode("p",{class:"sign-tip"},"仅可选择一名机构人员",-1)),l.createVNode(W,{data:S.value,load:D,props:v,"highlight-current":"",lazy:"","node-key":"id",onNodeClick:F},null,8,["data"]),l.createElementVNode("div",Xu,[Y[4]||(Y[4]=l.createTextVNode(" 已选择:",-1)),l.createElementVNode("strong",null,l.toDisplayString(((Z=I.value)==null?void 0:Z.caption)||((L=I.value)==null?void 0:L.name)||"暂无"),1)])])),[[z,$.value]])]}),_:1},8,["modelValue","title","z-index"]),K.value?(l.openBlock(),l.createBlock(ai,{key:2,modelValue:d.value,"onUpdate:modelValue":Y[2]||(Y[2]=Z=>d.value=Z),activity:K.value.activity,"assignment-query-params":e.assignmentQueryParams,"deal-user":ae.value,"force-single-assignee":e.forceSingleAssignee,"process-definition-id":K.value.processDefinitionId,"process-instance-id":K.value.processInstanceId,"show-trigger":!1,variables:e.variables,"work-id":K.value.workId,"z-index":e.dialogZIndex,onAfterSend:b,onError:ee},null,8,["modelValue","activity","assignment-query-params","deal-user","force-single-assignee","process-definition-id","process-instance-id","variables","work-id","z-index"])):l.createCommentVNode("",!0),X.value?(l.openBlock(),l.createBlock(Xo,{key:3,modelValue:h.value,"onUpdate:modelValue":Y[3]||(Y[3]=Z=>h.value=Z),"deal-user":ae.value,"process-definition-id":X.value.processDefinitionId,"process-instance-id":X.value.processInstanceId,"show-trigger":!1,"work-id":X.value.workId,"z-index":e.dialogZIndex,onAfterJump:P,onError:ee},null,8,["modelValue","deal-user","process-definition-id","process-instance-id","work-id","z-index"])):l.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-dcc93ede"]]);function Qu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kn={exports:{}},ef=Kn.exports,Jo;function tf(){return Jo||(Jo=1,(function(e,t){(function(n,r){e.exports=r()})(ef,(function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",f="hour",d="day",h="week",m="month",A="quarter",V="year",G="date",$="Invalid Date",M=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(J){var K=["th","st","nd","rd"],X=J%100;return"["+J+(K[(X-20)%10]||K[X]||K[0])+"]"}},y=function(J,K,X){var re=String(J);return!re||re.length>=K?J:""+Array(K+1-re.length).join(X)+J},v={s:y,z:function(J){var K=-J.utcOffset(),X=Math.abs(K),re=Math.floor(X/60),Q=X%60;return(K<=0?"+":"-")+y(re,2,"0")+":"+y(Q,2,"0")},m:function J(K,X){if(K.date()<X.date())return-J(X,K);var re=12*(X.year()-K.year())+(X.month()-K.month()),Q=K.clone().add(re,m),O=X-Q<0,D=K.clone().add(re+(O?-1:1),m);return+(-(re+(X-Q)/(O?Q-D:D-Q))||0)},a:function(J){return J<0?Math.ceil(J)||0:Math.floor(J)},p:function(J){return{M:m,y:V,w:h,d,D:G,h:f,m:s,s:a,ms:o,Q:A}[J]||String(J||"").toLowerCase().replace(/s$/,"")},u:function(J){return J===void 0}},k="en",T={};T[k]=I;var E="$isDayjsObject",x=function(J){return J instanceof q||!(!J||!J[E])},H=function J(K,X,re){var Q;if(!K)return k;if(typeof K=="string"){var O=K.toLowerCase();T[O]&&(Q=O),X&&(T[O]=X,Q=O);var D=K.split("-");if(!Q&&D.length>1)return J(D[0])}else{var F=K.name;T[F]=K,Q=F}return!re&&Q&&(k=Q),Q||!re&&k},B=function(J,K){if(x(J))return J.clone();var X=typeof K=="object"?K:{};return X.date=J,X.args=arguments,new q(X)},_=v;_.l=H,_.i=x,_.w=function(J,K){return B(J,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var q=(function(){function J(X){this.$L=H(X.locale,null,!0),this.parse(X),this.$x=this.$x||X.x||{},this[E]=!0}var K=J.prototype;return K.parse=function(X){this.$d=(function(re){var Q=re.date,O=re.utc;if(Q===null)return new Date(NaN);if(_.u(Q))return new Date;if(Q instanceof Date)return new Date(Q);if(typeof Q=="string"&&!/Z$/i.test(Q)){var D=Q.match(M);if(D){var F=D[2]-1||0,C=(D[7]||"0").substring(0,3);return O?new Date(Date.UTC(D[1],F,D[3]||1,D[4]||0,D[5]||0,D[6]||0,C)):new Date(D[1],F,D[3]||1,D[4]||0,D[5]||0,D[6]||0,C)}}return new Date(Q)})(X),this.init()},K.init=function(){var X=this.$d;this.$y=X.getFullYear(),this.$M=X.getMonth(),this.$D=X.getDate(),this.$W=X.getDay(),this.$H=X.getHours(),this.$m=X.getMinutes(),this.$s=X.getSeconds(),this.$ms=X.getMilliseconds()},K.$utils=function(){return _},K.isValid=function(){return this.$d.toString()!==$},K.isSame=function(X,re){var Q=B(X);return this.startOf(re)<=Q&&Q<=this.endOf(re)},K.isAfter=function(X,re){return B(X)<this.startOf(re)},K.isBefore=function(X,re){return this.endOf(re)<B(X)},K.$g=function(X,re,Q){return _.u(X)?this[re]:this.set(Q,X)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(X,re){var Q=this,O=!!_.u(re)||re,D=_.p(X),F=function(c,g){var b=_.w(Q.$u?Date.UTC(Q.$y,g,c):new Date(Q.$y,g,c),Q);return O?b:b.endOf(d)},C=function(c,g){return _.w(Q.toDate()[c].apply(Q.toDate("s"),(O?[0,0,0,0]:[23,59,59,999]).slice(g)),Q)},R=this.$W,j=this.$M,de=this.$D,se="set"+(this.$u?"UTC":"");switch(D){case V:return O?F(1,0):F(31,11);case m:return O?F(1,j):F(0,j+1);case h:var p=this.$locale().weekStart||0,u=(R<p?R+7:R)-p;return F(O?de-u:de+(6-u),j);case d:case G:return C(se+"Hours",0);case f:return C(se+"Minutes",1);case s:return C(se+"Seconds",2);case a:return C(se+"Milliseconds",3);default:return this.clone()}},K.endOf=function(X){return this.startOf(X,!1)},K.$set=function(X,re){var Q,O=_.p(X),D="set"+(this.$u?"UTC":""),F=(Q={},Q[d]=D+"Date",Q[G]=D+"Date",Q[m]=D+"Month",Q[V]=D+"FullYear",Q[f]=D+"Hours",Q[s]=D+"Minutes",Q[a]=D+"Seconds",Q[o]=D+"Milliseconds",Q)[O],C=O===d?this.$D+(re-this.$W):re;if(O===m||O===V){var R=this.clone().set(G,1);R.$d[F](C),R.init(),this.$d=R.set(G,Math.min(this.$D,R.daysInMonth())).$d}else F&&this.$d[F](C);return this.init(),this},K.set=function(X,re){return this.clone().$set(X,re)},K.get=function(X){return this[_.p(X)]()},K.add=function(X,re){var Q,O=this;X=Number(X);var D=_.p(re),F=function(j){var de=B(O);return _.w(de.date(de.date()+Math.round(j*X)),O)};if(D===m)return this.set(m,this.$M+X);if(D===V)return this.set(V,this.$y+X);if(D===d)return F(1);if(D===h)return F(7);var C=(Q={},Q[s]=r,Q[f]=i,Q[a]=n,Q)[D]||1,R=this.$d.getTime()+X*C;return _.w(R,this)},K.subtract=function(X,re){return this.add(-1*X,re)},K.format=function(X){var re=this,Q=this.$locale();if(!this.isValid())return Q.invalidDate||$;var O=X||"YYYY-MM-DDTHH:mm:ssZ",D=_.z(this),F=this.$H,C=this.$m,R=this.$M,j=Q.weekdays,de=Q.months,se=Q.meridiem,p=function(g,b,P,ee){return g&&(g[b]||g(re,O))||P[b].slice(0,ee)},u=function(g){return _.s(F%12||12,g,"0")},c=se||function(g,b,P){var ee=g<12?"AM":"PM";return P?ee.toLowerCase():ee};return O.replace(S,(function(g,b){return b||(function(P){switch(P){case"YY":return String(re.$y).slice(-2);case"YYYY":return _.s(re.$y,4,"0");case"M":return R+1;case"MM":return _.s(R+1,2,"0");case"MMM":return p(Q.monthsShort,R,de,3);case"MMMM":return p(de,R);case"D":return re.$D;case"DD":return _.s(re.$D,2,"0");case"d":return String(re.$W);case"dd":return p(Q.weekdaysMin,re.$W,j,2);case"ddd":return p(Q.weekdaysShort,re.$W,j,3);case"dddd":return j[re.$W];case"H":return String(F);case"HH":return _.s(F,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return c(F,C,!0);case"A":return c(F,C,!1);case"m":return String(C);case"mm":return _.s(C,2,"0");case"s":return String(re.$s);case"ss":return _.s(re.$s,2,"0");case"SSS":return _.s(re.$ms,3,"0");case"Z":return D}return null})(g)||D.replace(":","")}))},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(X,re,Q){var O,D=this,F=_.p(re),C=B(X),R=(C.utcOffset()-this.utcOffset())*r,j=this-C,de=function(){return _.m(D,C)};switch(F){case V:O=de()/12;break;case m:O=de();break;case A:O=de()/3;break;case h:O=(j-R)/6048e5;break;case d:O=(j-R)/864e5;break;case f:O=j/i;break;case s:O=j/r;break;case a:O=j/n;break;default:O=j}return Q?O:_.a(O)},K.daysInMonth=function(){return this.endOf(m).$D},K.$locale=function(){return T[this.$L]},K.locale=function(X,re){if(!X)return this.$L;var Q=this.clone(),O=H(X,re,!0);return O&&(Q.$L=O),Q},K.clone=function(){return _.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},J})(),ae=q.prototype;return B.prototype=ae,[["$ms",o],["$s",a],["$m",s],["$H",f],["$W",d],["$M",m],["$y",V],["$D",G]].forEach((function(J){ae[J[1]]=function(K){return this.$g(K,J[0],J[1])}})),B.extend=function(J,K){return J.$i||(J(K,q,B),J.$i=!0),B},B.locale=H,B.isDayjs=x,B.unix=function(J){return B(1e3*J)},B.en=T[k],B.Ls=T,B.p={},B}))})(Kn)),Kn.exports}var nf=tf();const Gn=Qu(nf),rf={class:"colBtns"},of={key:0,class:"table-pagination"},af={class:"left-pagination"},sf={class:"right-pagination"},Zo=wt(l.defineComponent({name:"UiFlowBaseGrid",inheritAttrs:!1,__name:"FlowGrid",props:{data:{default:()=>[]},tableLabel:{default:()=>[]},pageConfig:{default:()=>({currentPage:1,total:0,pageSize:20})},hidePage:{type:Boolean,default:!1},hideSelection:{type:Boolean,default:!1},hideNumber:{type:Boolean,default:!0},operation:{type:Boolean,default:!1},tableHeight:{default:"calc(100% - 45px)"},isFixed:{type:Boolean,default:!1},btnWidth:{default:0},size:{default:"default"}},emits:["page-change","size-change","row-click","row-dblclick"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.useSlots(),a=l.ref(),s=l.ref(),f=l.ref("100%"),d=l.ref(0),h=l.computed(()=>r.tableLabel.filter(E=>{var x;return!((x=E.hiddenCondition)!=null&&x.call(E,E))})),m=l.computed(()=>r.size==="medium"?"default":r.size);function A(E){return E<9?`0${E+1}`:E+1}function V(){var E;(E=s.value)==null||E.clearSelection()}function G(E,x){var H;(H=s.value)==null||H.toggleRowSelection(E,x)}function $(){var E;(E=s.value)==null||E.toggleAllSelection()}function M(E){var x;(x=s.value)==null||x.setCurrentRow(E)}function S(E){i("page-change",E)}function I(E){i("size-change",E)}function y(){f.value=r.hidePage?"100%":"calc(100% - 45px)"}async function v(){var H;if(!r.operation||r.btnWidth)return;await l.nextTick();const E=((H=a.value)==null?void 0:H.querySelectorAll(".colBtns"))||[];let x=o.operation?120:0;E.forEach(B=>{x=Math.max(x,B.scrollWidth+40)}),d.value=x}function k(E,x,H){var B;r.hideSelection||(B=s.value)==null||B.toggleRowSelection(E),i("row-click",E,x,H)}function T(E,x,H){i("row-dblclick",E,x,H)}return l.watch(()=>[r.hidePage,r.data.length],()=>{y(),v()}),l.onMounted(()=>{window.addEventListener("resize",y),y(),v()}),l.onBeforeUnmount(()=>window.removeEventListener("resize",y)),t({tableRef:s,clearSelection:V,toggleRowSelection:G,toggleAllSelection:$,setCurrentRow:M,computeHeight:y}),(E,x)=>{const H=l.resolveComponent("el-table-column"),B=l.resolveComponent("el-table"),_=l.resolveComponent("el-pagination");return l.openBlock(),l.createElementBlock("div",{ref_key:"rootRef",ref:a,class:l.normalizeClass({"no-fixed":!e.isFixed}),style:l.normalizeStyle({height:e.tableHeight||"100%"})},[l.createVNode(B,l.mergeProps({ref_key:"tableRef",ref:s},E.$attrs,{"cell-style":{height:"50px"},data:e.data,"header-cell-style":{background:"#fafafa",color:"#45484B",height:"50px"},height:f.value,size:m.value,border:"","cell-class-name":"c-table-cell","current-row-key":"id","header-row-class-name":"c-table-header",onRowClick:k,onRowDblclick:T}),{default:l.withCtx(()=>[e.hideSelection?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(H,{key:0,align:"center",type:"selection",width:"60"})),e.hideNumber?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(H,{key:1,index:A,align:"center",label:"序号",type:"index",width:"60"})),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(h.value,q=>(l.openBlock(),l.createBlock(H,{key:q.prop,formatter:q.formatter,label:q.label,"min-width":q.minWidth,prop:q.prop,"show-overflow-tooltip":q.showTooltip,sortable:q.sortable,width:q.width,align:"center"},null,8,["formatter","label","min-width","prop","show-overflow-tooltip","sortable","width"]))),128)),l.renderSlot(E.$slots,"default",{},void 0,!0),e.operation?(l.openBlock(),l.createBlock(H,{key:2,fixed:e.isFixed?"right":!1,width:e.btnWidth||d.value||void 0,align:"center",label:"操作"},{default:l.withCtx(q=>[l.createElementVNode("div",rf,[l.renderSlot(E.$slots,"operation",{row:q.row},void 0,!0)])]),_:3},8,["fixed","width"])):l.createCommentVNode("",!0)]),_:3},16,["data","height","size"]),e.hidePage?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",of,[l.createElementVNode("div",af,[l.renderSlot(E.$slots,"pagination-left",{},void 0,!0)]),l.createElementVNode("div",sf,[l.createVNode(_,{"current-page":e.pageConfig.currentPage,"page-size":e.pageConfig.pageSize,"page-sizes":[10,20,30,40],total:e.pageConfig.total,background:"",layout:"total, sizes, prev, pager, next, jumper",onCurrentChange:S,onSizeChange:I},null,8,["current-page","page-size","total"])])]))],6)}}}),[["__scopeId","data-v-557ddd2c"]]),lf={executing:"审批中",completed:"已完成",deleted:"已删除",canceled:"已取消",withdrawed:"已撤回",recyled:"已回收",rollbacked:"已退回",jumped:"已跳转"},cf=[{label:"业务标题",prop:"businessName",minWidth:"180px"},{label:"当前环节",prop:"activityName",minWidth:"180px"},{label:"发送人",prop:"assigneesNames",minWidth:"150px"},{label:"发送时间",prop:"startTime",width:"180px",formatter:e=>e.startTime?Gn(e.startTime).format("YYYY-MM-DD HH:mm:ss"):""}],uf=[{label:"业务标题",prop:"title",minWidth:"180px"},{label:"当前环节",prop:"currentActivity",minWidth:"180px",formatter:e=>e.currentActivity||"无"},{label:"创建人",prop:"createUserName",minWidth:"150px"},{label:"创建时间",prop:"createdTime",width:"180px"}];function ff(e){return{...e,workId:e.workId||e.id,processDefinitionId:e.processDefinitionId,processInstanceId:e.processInstanceId,activityId:e.activityId,activityName:e.activityName}}const df=l.defineComponent({name:"UiFlowGrid",__name:"FlowList",props:{type:{},dealUserId:{default:""},appId:{default:""},appModuleId:{default:""}},emits:["onHandle","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(),a=l.ref([]),s=l.ref(!1),f=l.reactive({currentPage:1,pageSize:20,total:0}),d=l.computed(()=>r.type==="draft"?uf:cf);function h(y){return lf[y]||y||""}function m(y,v){i("onHandle",{action:y,workData:ff(v)})}function A(y){i("onHandle",{action:"view",workData:{...y,processDefinitionId:y.processDefinitionId,workId:y.id,workName:y.title}})}function V(y){return`${y}_${Gn().format("YYYYMMDDHHmmss")}`}function G(y){const v=V(y.name);i("onHandle",{action:"create",workData:{processDefinitionId:y.processDefinitionId,flowName:y.name,title:v,workName:v}})}function $(y){r.type==="todo"&&m("view",y),r.type==="done"&&m("handle",y)}function M(y){f.currentPage=y,I()}function S(y){f.pageSize=y,f.currentPage=1,I()}async function I(){s.value=!0;try{if(r.type==="todo"||r.type==="done"){const v=await(r.type==="todo"?Hn:Ur)({currentPage:f.currentPage,pageSize:f.pageSize,assignee:r.dealUserId});a.value=v.data||[],f.total=Number(v.count||0)}else{const v=(await Vr(f,{appId:r.appId,appModuleId:r.appModuleId,createUserId:r.dealUserId})).data||{};a.value=v.records||[],f.total=Number(v.total||0)}}catch(y){throw i("error",y),y}finally{s.value=!1}}return l.watch(()=>[r.type,r.dealUserId,r.appId,r.appModuleId],()=>{f.currentPage=1,I()}),l.onMounted(I),t({data:a,loading:s,pageConfig:f,gridRef:o,loadTableData:I,onRowDblclick:$,create:G,buildDefaultBusinessTitle:V}),(y,v)=>{const k=l.resolveComponent("el-table-column"),T=l.resolveComponent("el-button");return l.openBlock(),l.createBlock(Zo,{ref_key:"gridRef",ref:o,data:a.value,"hide-number":!1,"hide-selection":!0,"is-fixed":!0,"page-config":f,"table-label":d.value,operation:"","table-height":"100%",onPageChange:M,onRowDblclick:$,onSizeChange:S},{operation:l.withCtx(({row:E})=>[e.type==="todo"?(l.openBlock(),l.createBlock(T,{key:0,link:"",type:"primary",onClick:l.withModifiers(x=>m("view",E),["stop"])},{default:l.withCtx(()=>[...v[0]||(v[0]=[l.createTextVNode(" 办理 ",-1)])]),_:1},8,["onClick"])):e.type==="done"?(l.openBlock(),l.createBlock(T,{key:1,link:"",type:"primary",onClick:l.withModifiers(x=>m("handle",E),["stop"])},{default:l.withCtx(()=>[...v[1]||(v[1]=[l.createTextVNode(" 查看 ",-1)])]),_:1},8,["onClick"])):e.type==="draft"&&E.state==="audit"?(l.openBlock(),l.createBlock(T,{key:2,link:"",type:"primary",onClick:l.withModifiers(x=>A(E),["stop"])},{default:l.withCtx(()=>[...v[2]||(v[2]=[l.createTextVNode(" 查看 ",-1)])]),_:1},8,["onClick"])):l.createCommentVNode("",!0)]),default:l.withCtx(()=>[e.type==="done"||e.type==="draft"?(l.openBlock(),l.createBlock(k,{key:0,align:"center",label:"状态",width:"120"},{default:l.withCtx(({row:E})=>[l.createTextVNode(l.toDisplayString(e.type==="done"?h(E.stateName):E.stateLabel),1)]),_:1})):l.createCommentVNode("",!0)]),_:1},8,["data","page-config","table-label"])}}});function nt(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}const mn=Object.prototype.toString,pf=Object.prototype.hasOwnProperty;function si(e){return e===void 0}function Zt(e){return e!==void 0}function Qo(e){return e==null}function Ge(e){return mn.call(e)==="[object Array]"}function bt(e){return mn.call(e)==="[object Object]"}function Et(e){return mn.call(e)==="[object Number]"}function Lt(e){const t=mn.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"||t==="[object Proxy]"}function rt(e){return mn.call(e)==="[object String]"}function Qt(e,t){return!Qo(e)&&pf.call(e,t)}function Qe(e,t){const n=li(t);let r;return oe(e,function(i,o){if(n(i,o))return r=i,!1}),r}function hf(e,t){const n=li(t);let r=Ge(e)?-1:void 0;return oe(e,function(i,o){if(n(i,o))return r=o,!1}),r}function en(e,t){const n=li(t);let r=[];return oe(e,function(i,o){n(i,o)&&r.push(i)}),r}function oe(e,t){let n,r;if(si(e))return;const i=Ge(e)?gf:yf;for(let o in e)if(Qt(e,o)&&(n=e[o],r=t(n,i(o)),r===!1))return n}function tn(e,t,n){return oe(e,function(r,i){n=t(n,r,i)}),n}function ea(e,t){return!!tn(e,function(n,r,i){return n&&t(r,i)},!0)}function ta(e,t){return!!Qe(e,t)}function mf(e,t){let n=[];return oe(e,function(r,i){n.push(t(r,i))}),n}function na(e){return function(t){return ea(e,function(n,r){return t[r]===n})}}function li(e){return Lt(e)?e:t=>t===e}function yf(e){return e}function gf(e){return Number(e)}function ra(e,t){let n,r,i,o;function a(m){let A=Date.now(),V=m?0:o+t-A;if(V>0)return s(V);e.apply(i,r),f()}function s(m){n=setTimeout(a,m)}function f(){n&&clearTimeout(n),n=o=r=i=void 0}function d(){n&&a(!0),f()}function h(...m){o=Date.now(),r=m,i=this,n||s(t)}return h.flush=d,h.cancel=f,h}function _t(e,t){return e.bind(t)}function le(e,...t){return Object.assign(e,...t)}function vf(e,t,n){let r=e;return oe(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];Zt(a)&&Qo(s)&&(s=r[i]=isNaN(+a)?{}:[]),si(a)?si(n)?delete r[i]:r[i]=n:r=s}),e}function wf(e,t){let n={},r=Object(e);return oe(t,function(i){i in r&&(n[i]=e[i])}),n}function bf(e,t){let n={},r=Object(e);return oe(r,function(i,o){t.indexOf(o)===-1&&(n[o]=i)}),n}var Ef=1e3;function pt(e,t){var n=this;t=t||Ef,e.on(["render.shape","render.connection"],t,function(r,i){var o=r.type,a=i.element,s=i.gfx,f=i.attrs;if(n.canRender(a))return o==="render.shape"?n.drawShape(s,a,f):n.drawConnection(s,a,f)}),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)})}pt.prototype.canRender=function(e){},pt.prototype.drawShape=function(e,t){},pt.prototype.drawConnection=function(e,t){},pt.prototype.getShapePath=function(e){},pt.prototype.getConnectionPath=function(e){};function ce(e,t){var n=_e(e);return n&&typeof n.$instanceOf=="function"&&n.$instanceOf(t)}function _f(e,t){return ta(t,function(n){return ce(e,n)})}function _e(e){return e&&e.businessObject||e}function Ft(e){return e&&e.di}function $t(e,t){return ce(e,"bpmn:CallActivity")?!1:ce(e,"bpmn:SubProcess")?(t=t||Ft(e),t&&ce(t,"bpmndi:BPMNPlane")?!0:t&&!!t.isExpanded):ce(e,"bpmn:Participant")?!!_e(e).processRef:!0}function ia(e){if(!(!ce(e,"bpmn:Participant")&&!ce(e,"bpmn:Lane"))){var t=Ft(e).isHorizontal;return t===void 0?!0:t}}function xf(e){return e&&!!_e(e).triggeredByEvent}function Sf(e){return bt(e)&&Qt(e,"waypoints")}function Af(e){return bt(e)&&Qt(e,"labelTarget")}var yn={width:90,height:20},oa=15;function kf(e){return ce(e,"bpmn:Event")||ce(e,"bpmn:Gateway")||ce(e,"bpmn:DataStoreReference")||ce(e,"bpmn:DataObjectReference")||ce(e,"bpmn:DataInput")||ce(e,"bpmn:DataOutput")||ce(e,"bpmn:SequenceFlow")||ce(e,"bpmn:MessageFlow")||ce(e,"bpmn:Group")}function Cf(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)],i=Rf(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-=oa:a+=oa,{x:a,y:s}}function Rf(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 Tf(e){return e.waypoints?Cf(e.waypoints):ce(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+yn.height/2}:{x:e.x+e.width/2,y:e.y+e.height+yn.height/2}}function Nf(e,t){var n,r,i,o=e.label;return o&&o.bounds?(i=o.bounds,r={width:Math.max(yn.width,i.width),height:i.height},n={x:i.x+i.width/2,y:i.y+i.height/2}):(n=Tf(t),r=yn),le({x:n.x-r.width/2,y:n.y-r.height/2},r)}function Pf(e){if(ce(e,"bpmn:FlowElement")||ce(e,"bpmn:Participant")||ce(e,"bpmn:Lane")||ce(e,"bpmn:SequenceFlow")||ce(e,"bpmn:MessageFlow")||ce(e,"bpmn:DataInput")||ce(e,"bpmn:DataOutput"))return"name";if(ce(e,"bpmn:TextAnnotation"))return"text";if(ce(e,"bpmn:Group"))return"categoryValueRef"}function Df(e){var t=e.categoryValueRef;return t&&t.value||""}function Xn(e){var t=e.businessObject,n=Pf(t);if(n)return n==="categoryValueRef"?Df(t):t[n]||""}function gn(e,t){t=!!t,Ge(e)||(e=[e]);var n,r,i,o;return oe(e,function(a){var s=a;a.waypoints&&!t&&(s=gn(a.waypoints,!0));var f=s.x,d=s.y,h=s.height||0,m=s.width||0;(f<n||n===void 0)&&(n=f),(d<r||r===void 0)&&(r=d),(f+m>i||i===void 0)&&(i=f+m),(d+h>o||o===void 0)&&(o=d+h)}),{x:n,y:r,height:o-r,width:i-n}}function aa(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function sa(e){return!!(e&&e.isFrame)}var la=7;function If(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch{}return e}function Of(e,t){return t.appendChild(If(e,t))}function Pe(e,t){return Of(t,e),e}var ci=2,ca={"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":ci,"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":ci,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function Bf(e,t){return ca[t]?e.style[t]:e.getAttributeNS(null,t)}function ua(e,t,n){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=ca[r];i?(i===ci&&typeof n=="number"&&(n=String(n)+"px"),e.style[r]=n):e.setAttributeNS(null,t,n)}function Mf(e,t){var n=Object.keys(t),r,i;for(r=0,i;i=n[r];r++)ua(e,i,t[i])}function Se(e,t,n){if(typeof t=="string")if(n!==void 0)ua(e,t,n);else return Bf(e,t);else Mf(e,t);return e}const Lf=Object.prototype.toString;function it(e){return new xt(e)}function xt(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}xt.prototype.add=function(e){return this.list.add(e),this},xt.prototype.remove=function(e){return Lf.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)},xt.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},xt.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},xt.prototype.array=function(){return Array.from(this.list)},xt.prototype.has=xt.prototype.contains=function(e){return this.list.contains(e)};var ui={svg:"http://www.w3.org/2000/svg"},fa='<svg xmlns="'+ui.svg+'"';function Ff(e){var t=!1;e.substring(0,4)==="<svg"?e.indexOf(ui.svg)===-1&&(e=fa+e.substring(4)):(e=fa+">"+e+"</svg>",t=!0);var n=$f(e);if(!t)return n;for(var r=document.createDocumentFragment(),i=n.firstChild;i.firstChild;)r.appendChild(i.firstChild);return r}function $f(e){var t;return t=new DOMParser,t.async=!1,t.parseFromString(e,"text/xml")}function xe(e,t){var n;return e=e.trim(),e.charAt(0)==="<"?(n=Ff(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(ui.svg,e),t&&Se(n,t),n}var fi=null;function da(){return fi===null&&(fi=xe("svg")),fi}function pa(e,t){var n,r,i=Object.keys(t);for(n=0;r=i[n];n++)e[r]=t[r];return e}function Vf(e,t,n,r,i,o){var a=da().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return pa(a,e);case 6:return pa(a,{a:e,b:t,c:n,d:r,e:i,f:o})}}function vn(e){return da().createSVGTransform()}var ha=/([&<>]{1})/g,jf=/([&<>\n\r"]{1})/g,Uf={"&":"&","<":"<",">":">",'"':"'"};function di(e,t){function n(r,i){return Uf[i]||i}return e.replace(t,n)}function ma(e,t){var n,r,i,o,a;switch(e.nodeType){case 3:t.push(di(e.textContent,ha));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,'="',di(o.value,jf),'"');if(e.hasChildNodes()){for(t.push(">"),a=e.childNodes,n=0,r=a.length;n<r;++n)ma(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("<!--",di(e.nodeValue,ha),"-->");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function zf(e){for(var t=e.firstChild,n=[];t;)ma(t,n),t=t.nextSibling;return n.join("")}function ya(e,t){return zf(e)}function Jn(e){var t=e.parentNode;return t&&t.removeChild(e),e}function Hf(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function Wf(e,t){var n,r;for(e.clear(),n=0;r=t[n];n++)e.appendItem(Hf(e,r))}function wn(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),Wf(n,t)),n.consolidate()}function Vt(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function qf(e){return["M",e.x,e.y]}function pi(e){return["L",e.x,e.y]}function Yf(e,t,n){return["C",e.x,e.y,t.x,t.y,n.x,n.y]}function Kf(e,t){const n=e.length,r=[qf(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(pi(a));continue}const f=Math.min(t,hi(a.x-o.x,a.y-o.y),hi(s.x-a.x,s.y-a.y));if(!f){r.push(pi(a));continue}const d=Zn(a,o,f),h=Zn(a,o,f*.5),m=Zn(a,s,f),A=Zn(a,s,f*.5);r.push(pi(d)),r.push(Yf(h,A,m))}return r}function Zn(e,t,n){const r=t.x-e.x,i=t.y-e.y,o=hi(r,i),a=n/o;return{x:e.x+r*a,y:e.y+i*a}}function hi(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function mi(e,t,n){Et(t)&&(n=t,t=null),t||(t={});const r=xe("path",t);return Et(n)&&(r.dataset.cornerRadius=String(n)),ga(r,e)}function ga(e,t){const n=parseInt(e.dataset.cornerRadius,10)||0;return Se(e,{d:Vt(Kf(t,n))}),e}var yi="hsl(225, 10%, 15%)",Gf="white";function ot(e,t){return ta(e.eventDefinitions,function(n){return n.$type===t})}function Xf(e){return e.$type==="bpmn:IntermediateThrowEvent"||e.$type==="bpmn:EndEvent"}function Jf(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection}function he(e,t,n){var r=Ft(e);return n||r.get("color:background-color")||r.get("bioc:fill")||t||Gf}function ne(e,t,n){var r=Ft(e);return n||r.get("color:border-color")||r.get("bioc:stroke")||t||yi}function bn(e,t,n,r){var i=Ft(e),o=i.get("label");return r||o&&o.get("color:color")||t||ne(e,n)}function Zf(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 Vt(i)}function va(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 Vt(a)}function Qf(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 Vt(s)}function ed(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 Vt(o)}function En(e,t={}){return{width:Xe(e,t),height:je(e,t)}}function Xe(e,t={}){return Qt(t,"width")?t.width:e.width}function je(e,t={}){return Qt(t,"height")?t.height:e.height}const Ce={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:[0,"",""]};Ce.td=Ce.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],Ce.option=Ce.optgroup=[1,'<select multiple="multiple">',"</select>"],Ce.thead=Ce.tbody=Ce.colgroup=Ce.caption=Ce.tfoot=[1,"<table>","</table>"],Ce.polyline=Ce.ellipse=Ce.polygon=Ce.circle=Ce.text=Ce.line=Ce.path=Ce.rect=Ce.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function at(e,t=globalThis.document){var d;if(typeof e!="string")throw new TypeError("String expected");const n=/^<!--(.*?)-->$/s.exec(e);if(n)return t.createComment(n[1]);const r=(d=/<([\w:]+)/.exec(e))==null?void 0:d[1];if(!r)return t.createTextNode(e);if(e=e.trim(),r==="body"){const h=t.createElement("html");h.innerHTML=e;const{lastChild:m}=h;return m.remove(),m}let[i,o,a]=Object.hasOwn(Ce,r)?Ce[r]:Ce._default,s=t.createElement("div");for(s.innerHTML=o+e+a;i--;)s=s.lastChild;if(s.firstChild===s.lastChild){const{firstChild:h}=s;return h.remove(),h}const f=t.createDocumentFragment();return f.append(...s.childNodes),f}function td(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)}function ze(e,...t){const n=e.style;return oe(t,function(r){r&&oe(r,function(i,o){n[o]=i})}),e}function wa(e,t,n){return arguments.length==2?e.getAttribute(t):n===null?e.removeAttribute(t):(e.setAttribute(t,n),e)}const nd=Object.prototype.toString;function jt(e){return new St(e)}function St(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}St.prototype.add=function(e){return this.list.add(e),this},St.prototype.remove=function(e){return nd.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)},St.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},St.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},St.prototype.array=function(){return Array.from(this.list)},St.prototype.has=St.prototype.contains=function(e){return this.list.contains(e)};function ba(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function Ea(e,t,n){var r=n?e:e.parentNode;return r&&typeof r.closest=="function"&&r.closest(t)||null}function rd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qn={},_a;function id(){if(_a)return Qn;_a=1;var e,t,n;function r(){e=window.addEventListener?"addEventListener":"attachEvent",t=window.removeEventListener?"removeEventListener":"detachEvent",n=e!=="addEventListener"?"on":""}return Qn.bind=function(i,o,a,s){return e||r(),i[e](n+o,a,s||!1),a},Qn.unbind=function(i,o,a,s){return t||r(),i[t](n+o,a,s||!1),a},Qn}var xa=id(),od=rd(xa),At=td({__proto__:null,default:od},[xa]),Sa=["focus","blur"];function ad(e,t,n,r,i){return Sa.indexOf(n)!==-1&&(i=!0),At.bind(e,n,function(o){var a=o.target||o.srcElement;o.delegateTarget=Ea(a,t,!0),o.delegateTarget&&r.call(e,o)},i)}function sd(e,t,n,r){return Sa.indexOf(t)!==-1&&(r=!0),At.unbind(e,t,n,r)}var gi={bind:ad,unbind:sd};function ht(e,t){return t=t||document,t.querySelector(e)}function ld(e,t){return t=t||document,t.querySelectorAll(e)}function er(e){e.parentNode&&e.parentNode.removeChild(e)}function vi(e,t,n,r,i){var o=vn();o.setTranslate(t,n);var a=vn();a.setRotate(r||0,0,0);var s=vn();s.setScale(1,1),wn(e,[o,a,s])}function Aa(e,t,n){var r=vn();r.setTranslate(t,n),wn(e,r)}function cd(e,t){var n=vn();n.setRotate(t,0,0),wn(e,n)}function ud(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wi={exports:{}},ka;function fd(){if(ka)return wi.exports;ka=1;var e=wi.exports=function(t,n){if(n||(n=16),t===void 0&&(t=128),t<=0)return"0";for(var r=Math.log(Math.pow(2,t))/Math.log(n),i=2;r===1/0;i*=2)r=Math.log(Math.pow(2,t/i))/Math.log(n)*i;for(var o=r-Math.floor(r),a="",i=0;i<Math.floor(r);i++){var s=Math.floor(Math.random()*n).toString(n);a=s+a}if(o){var f=Math.pow(n,o),s=Math.floor(Math.random()*f).toString(n);a=s+a}var d=parseInt(a,n);return d!==1/0&&d>=Math.pow(2,t)?e(t,n):a};return e.rack=function(t,n,r){var i=function(a){var s=0;do{if(s++>10)if(r)t+=r;else throw new Error("too many ID collisions, use more bits");var f=e(t,n)}while(Object.hasOwnProperty.call(o,f));return o[f]=a,f},o=i.hats={};return i.get=function(a){return i.hats[a]},i.set=function(a,s){return i.hats[a]=s,i},i.bits=t||128,i.base=n||16,i},wi.exports}var dd=fd(),pd=ud(dd);function mt(e){if(!(this instanceof mt))return new mt(e);e=e||[128,36,1],this._seed=e.length?pd.rack(e[0],e[1],e[2]):e}mt.prototype.next=function(e){return this._seed(e||!0)},mt.prototype.nextPrefixed=function(e,t){var n;do n=e+this.next(!0);while(this.assigned(n));return this.claim(n,t),n},mt.prototype.claim=function(e,t){this._seed.set(e,t||!0)},mt.prototype.assigned=function(e){return this._seed.get(e)||!1},mt.prototype.unclaim=function(e){delete this._seed.hats[e]},mt.prototype.clear=function(){var e=this._seed.hats,t;for(t in e)this.unclaim(t)};var hd=new mt,md=10,tr=3,yd=1.5,nr=10,gd=4,nn=.95,vd=1,wd=.25;function Ut(e,t,n,r,i,o,a){pt.call(this,t,a);var s=e&&e.defaultFillColor,f=e&&e.defaultStrokeColor,d=e&&e.defaultLabelColor;function h(p){return n.computeStyle(p,{strokeLinecap:"round",strokeLinejoin:"round",stroke:yi,strokeWidth:2,fill:"white"})}function m(p){return n.computeStyle(p,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:yi,strokeWidth:2})}function A(p,u){var{ref:c={x:0,y:0},scale:g=1,element:b,parentGfx:P=i._svg}=u,ee=xe("marker",{id:p,viewBox:"0 0 20 20",refX:c.x,refY:c.y,markerWidth:20*g,markerHeight:20*g,orient:"auto"});Pe(ee,b);var N=ht(":scope > defs",P);N||(N=xe("defs"),Pe(P,N)),Pe(N,ee)}function V(p,u,c,g){var b=hd.nextPrefixed("marker-");return G(p,b,u,c,g),"url(#"+b+")"}function G(p,u,c,g,b){if(c==="sequenceflow-end"){var P=xe("path",{d:"M 1 5 L 11 10 L 1 15 Z",...h({fill:b,stroke:b,strokeWidth:1})});A(u,{element:P,ref:{x:11,y:10},scale:.5,parentGfx:p})}if(c==="messageflow-start"){var ee=xe("circle",{cx:6,cy:6,r:3.5,...h({fill:g,stroke:b,strokeWidth:1,strokeDasharray:[1e4,1]})});A(u,{element:ee,ref:{x:6,y:6},parentGfx:p})}if(c==="messageflow-end"){var N=xe("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...h({fill:g,stroke:b,strokeWidth:1,strokeDasharray:[1e4,1]})});A(u,{element:N,ref:{x:8.5,y:5},parentGfx:p})}if(c==="association-start"){var Y=xe("path",{d:"M 11 5 L 1 10 L 11 15",...m({fill:"none",stroke:b,strokeWidth:1.5,strokeDasharray:[1e4,1]})});A(u,{element:Y,ref:{x:1,y:10},scale:.5,parentGfx:p})}if(c==="association-end"){var W=xe("path",{d:"M 1 5 L 11 10 L 1 15",...m({fill:"none",stroke:b,strokeWidth:1.5,strokeDasharray:[1e4,1]})});A(u,{element:W,ref:{x:11,y:10},scale:.5,parentGfx:p})}if(c==="conditional-flow-marker"){var te=xe("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...h({fill:g,stroke:b})});A(u,{element:te,ref:{x:-1,y:10},scale:.5,parentGfx:p})}if(c==="conditional-default-flow-marker"){var U=xe("path",{d:"M 6 4 L 10 16",...h({stroke:b,fill:"none"})});A(u,{element:U,ref:{x:0,y:10},scale:.5,parentGfx:p})}}function $(p,u,c,g,b={}){bt(g)&&(b=g,g=0),g=g||0,b=h(b);var P=u/2,ee=c/2,N=xe("circle",{cx:P,cy:ee,r:Math.round((u+c)/4-g),...b});return Pe(p,N),N}function M(p,u,c,g,b,P){bt(b)&&(P=b,b=0),b=b||0,P=h(P);var ee=xe("rect",{x:b,y:b,width:u-b*2,height:c-b*2,rx:g,ry:g,...P});return Pe(p,ee),ee}function S(p,u,c,g){var b=u/2,P=c/2,ee=[{x:b,y:0},{x:u,y:P},{x:b,y:c},{x:0,y:P}],N=ee.map(function(W){return W.x+","+W.y}).join(" ");g=h(g);var Y=xe("polygon",{...g,points:N});return Pe(p,Y),Y}function I(p,u,c,g){c=m(c);var b=mi(u,c,g);return Pe(p,b),b}function y(p,u,c){return I(p,u,c,5)}function v(p,u,c){c=m(c);var g=xe("path",{...c,d:u});return Pe(p,g),g}function k(p,u,c,g){return v(u,c,le({"data-marker":p},g))}function T(p){return se[p]}function E(p){return function(u,c,g){return T(p)(u,c,g)}}var x={"bpmn:MessageEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.235,my:.315}}),P=g?ne(u,f,c.stroke):he(u,s,c.fill),ee=g?he(u,s,c.fill):ne(u,f,c.stroke),N=v(p,b,{fill:P,stroke:ee,strokeWidth:1});return N},"bpmn:TimerEventDefinition":function(p,u,c={}){var g=c.width||u.width,b=c.height||u.height,P=c.width?1:2,ee=$(p,g,b,.2*b,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:P}),N=r.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:g,containerHeight:b,position:{mx:.5,my:.5}});v(p,N,{stroke:ne(u,f,c.stroke),strokeWidth:P});for(var Y=0;Y<12;Y++){var W=r.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:g,containerHeight:b,position:{mx:.5,my:.5}}),te=g/2,U=b/2;v(p,W,{strokeWidth:1,stroke:ne(u,f,c.stroke),transform:"rotate("+Y*30+","+U+","+te+")"})}return ee},"bpmn:EscalationEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.5,my:.2}}),P=g?ne(u,f,c.stroke):he(u,s,c.fill);return v(p,b,{fill:P,stroke:ne(u,f,c.stroke),strokeWidth:1})},"bpmn:ConditionalEventDefinition":function(p,u,c={}){var g=r.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.5,my:.222}});return v(p,g,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:1})},"bpmn:LinkEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:.57,my:.263}}),P=g?ne(u,f,c.stroke):he(u,s,c.fill);return v(p,b,{fill:P,stroke:ne(u,f,c.stroke),strokeWidth:1})},"bpmn:ErrorEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.2,my:.722}}),P=g?ne(u,f,c.stroke):he(u,s,c.fill);return v(p,b,{fill:P,stroke:ne(u,f,c.stroke),strokeWidth:1})},"bpmn:CancelEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:.638,my:-.055}}),P=g?ne(u,f,c.stroke):"none",ee=v(p,b,{fill:P,stroke:ne(u,f,c.stroke),strokeWidth:1});return cd(ee,45),ee},"bpmn:CompensateEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.22,my:.5}}),P=g?ne(u,f,c.stroke):he(u,s,c.fill);return v(p,b,{fill:P,stroke:ne(u,f,c.stroke),strokeWidth:1})},"bpmn:SignalEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.5,my:.2}}),P=g?ne(u,f,c.stroke):he(u,s,c.fill);return v(p,b,{strokeWidth:1,fill:P,stroke:ne(u,f,c.stroke)})},"bpmn:MultipleEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.211,my:.36}}),P=g?ne(u,f,c.stroke):he(u,s,c.fill);return v(p,b,{fill:P,stroke:ne(u,f,c.stroke),strokeWidth:1})},"bpmn:ParallelMultipleEventDefinition":function(p,u,c={}){var g=r.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.458,my:.194}});return v(p,g,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:1})},"bpmn:TerminateEventDefinition":function(p,u,c={}){var g=$(p,u.width,u.height,8,{fill:ne(u,f,c.stroke),stroke:ne(u,f,c.stroke),strokeWidth:4});return g}};function H(p,u,c={},g){var b=_e(p),P=Xf(b),ee=g||p;return b.get("eventDefinitions")&&b.get("eventDefinitions").length>1?b.get("parallelMultiple")?x["bpmn:ParallelMultipleEventDefinition"](u,ee,c,P):x["bpmn:MultipleEventDefinition"](u,ee,c,P):ot(b,"bpmn:MessageEventDefinition")?x["bpmn:MessageEventDefinition"](u,ee,c,P):ot(b,"bpmn:TimerEventDefinition")?x["bpmn:TimerEventDefinition"](u,ee,c,P):ot(b,"bpmn:ConditionalEventDefinition")?x["bpmn:ConditionalEventDefinition"](u,ee,c,P):ot(b,"bpmn:SignalEventDefinition")?x["bpmn:SignalEventDefinition"](u,ee,c,P):ot(b,"bpmn:EscalationEventDefinition")?x["bpmn:EscalationEventDefinition"](u,ee,c,P):ot(b,"bpmn:LinkEventDefinition")?x["bpmn:LinkEventDefinition"](u,ee,c,P):ot(b,"bpmn:ErrorEventDefinition")?x["bpmn:ErrorEventDefinition"](u,ee,c,P):ot(b,"bpmn:CancelEventDefinition")?x["bpmn:CancelEventDefinition"](u,ee,c,P):ot(b,"bpmn:CompensateEventDefinition")?x["bpmn:CompensateEventDefinition"](u,ee,c,P):ot(b,"bpmn:TerminateEventDefinition")?x["bpmn:TerminateEventDefinition"](u,ee,c,P):null}var B={ParticipantMultiplicityMarker:function(p,u,c={}){var g=Xe(u,c),b=je(u,c),P=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:g,containerHeight:b,position:{mx:(g/2-6)/g,my:(b-15)/b}});k("participant-multiplicity",p,P,{strokeWidth:2,fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke)})},SubProcessMarker:function(p,u,c={}){var g=M(p,14,14,0,{strokeWidth:1,fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke)});Aa(g,u.width/2-7.5,u.height-20);var b=r.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:u.width,containerHeight:u.height,position:{mx:(u.width/2-7.5)/u.width,my:(u.height-20)/u.height}});k("sub-process",p,b,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke)})},ParallelMarker:function(p,u,c){var g=Xe(u,c),b=je(u,c),P=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:g,containerHeight:b,position:{mx:(g/2+c.parallel)/g,my:(b-20)/b}});k("parallel",p,P,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke)})},SequentialMarker:function(p,u,c){var g=r.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:(u.width/2+c.seq)/u.width,my:(u.height-19)/u.height}});k("sequential",p,g,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke)})},CompensationMarker:function(p,u,c){var g=r.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:(u.width/2+c.compensation)/u.width,my:(u.height-13)/u.height}});k("compensation",p,g,{strokeWidth:1,fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke)})},LoopMarker:function(p,u,c){var g=Xe(u,c),b=je(u,c),P=r.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:g,containerHeight:b,position:{mx:(g/2+c.loop)/g,my:(b-7)/b}});k("loop",p,P,{strokeWidth:1.5,fill:"none",stroke:ne(u,f,c.stroke),strokeMiterlimit:.5})},AdhocMarker:function(p,u,c){var g=Xe(u,c),b=je(u,c),P=r.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:g,containerHeight:b,position:{mx:(g/2+c.adhoc)/g,my:(b-15)/b}});k("adhoc",p,P,{strokeWidth:1,fill:ne(u,f,c.stroke),stroke:ne(u,f,c.stroke)})}};function _(p,u,c,g){B[p](u,c,g)}function q(p,u,c=[],g={}){g={fill:g.fill,stroke:g.stroke,width:Xe(u,g),height:je(u,g)};var b=_e(u),P=c.includes("SubProcessMarker");P?g={...g,seq:-21,parallel:-22,compensation:-25,loop:-18,adhoc:10}:g={...g,seq:-5,parallel:-6,compensation:-7,loop:0,adhoc:-8},b.get("isForCompensation")&&c.push("CompensationMarker"),ce(b,"bpmn:AdHocSubProcess")&&(c.push("AdhocMarker"),P||le(g,{compensation:g.compensation-18}));var ee=b.get("loopCharacteristics"),N=ee&&ee.get("isSequential");ee&&(le(g,{compensation:g.compensation-18}),c.includes("AdhocMarker")&&le(g,{seq:-23,loop:-18,parallel:-24}),N===void 0&&c.push("LoopMarker"),N===!1&&c.push("ParallelMarker"),N===!0&&c.push("SequentialMarker")),c.includes("CompensationMarker")&&c.length===1&&le(g,{compensation:-8}),oe(c,function(Y){_(Y,p,u,g)})}function ae(p,u,c={}){c=le({size:{width:100}},c);var g=o.createText(u||"",c);return it(g).add("djs-label"),Pe(p,g),g}function J(p,u,c,g={}){var b=_e(u),P=En({x:u.x,y:u.y,width:u.width,height:u.height},g);return ae(p,b.name,{align:c,box:P,padding:7,style:{fill:bn(u,d,f,g.stroke)}})}function K(p,u,c={}){var g={width:u.width,height:u.height,x:u.width/2+u.x,y:u.height/2+u.y};return ae(p,Xn(u),{box:g,style:le({},o.getExternalStyle(),{fill:bn(u,d,f,c.stroke)})})}function X(p,u,c,g={}){var b=ia(c),P=ae(p,u,{box:{height:30,width:b?je(c,g):Xe(c,g)},align:"center-middle",style:{fill:bn(c,d,f,g.stroke)}});if(b){var ee=-1*je(c,g);vi(P,0,-ee,270)}}function re(p,u,c={}){var{width:g,height:b}=En(u,c);return M(p,g,b,nr,{...c,fill:he(u,s,c.fill),fillOpacity:nn,stroke:ne(u,f,c.stroke)})}function Q(p,u,c={}){var g=_e(u),b=he(u,s,c.fill),P=ne(u,f,c.stroke);return(g.get("associationDirection")==="One"||g.get("associationDirection")==="Both")&&(c.markerEnd=V(p,"association-end",b,P)),g.get("associationDirection")==="Both"&&(c.markerStart=V(p,"association-start",b,P)),c=me(c,["markerStart","markerEnd"]),y(p,u.waypoints,{...c,stroke:P,strokeDasharray:"0, 5"})}function O(p,u,c={}){var g=he(u,s,c.fill),b=ne(u,f,c.stroke),P=r.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:.474,my:.296}}),ee=v(p,P,{fill:g,fillOpacity:nn,stroke:b}),N=_e(u);if(Jf(N)){var Y=r.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:.33,my:(u.height-18)/u.height}});v(p,Y,{strokeWidth:2,fill:g,stroke:b})}return ee}function D(p,u,c={}){return $(p,u.width,u.height,{fillOpacity:nn,...c,fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke)})}function F(p,u,c={}){return S(p,u.width,u.height,{fill:he(u,s,c.fill),fillOpacity:nn,stroke:ne(u,f,c.stroke)})}function C(p,u,c={}){var g=M(p,Xe(u,c),je(u,c),0,{fill:he(u,s,c.fill),fillOpacity:c.fillOpacity||nn,stroke:ne(u,f,c.stroke),strokeWidth:1.5}),b=_e(u);if(ce(b,"bpmn:Lane")){var P=b.get("name");X(p,P,u,c)}return g}function R(p,u,c={}){var g=re(p,u,c),b=$t(u);if(xf(u)&&(Se(g,{strokeDasharray:"0, 5.5",strokeWidth:2.5}),!b)){var P=_e(u).flowElements||[],ee=P.filter(N=>ce(N,"bpmn:StartEvent"));ee.length===1&&j(ee[0],p,c,u)}return J(p,u,b?"center-top":"center-middle",c),b?q(p,u,void 0,c):q(p,u,["SubProcessMarker"],c),g}function j(p,u,c,g){var b=22,P={fill:he(g,s,c.fill),stroke:ne(g,f,c.stroke),width:b,height:b},ee=_e(p).isInterrupting,N=ee?0:3,Y=ee?1:1.2,W=20,te=(b-W)/2,U="translate("+te+","+te+")";$(u,W,W,{fill:P.fill,stroke:P.stroke,strokeWidth:Y,strokeDasharray:N,transform:U}),H(p,u,P,g)}function de(p,u,c={}){var g=re(p,u,c);return J(p,u,"center-middle",c),q(p,u,void 0,c),g}var se=this.handlers={"bpmn:AdHocSubProcess":function(p,u,c={}){return $t(u)?c=me(c,["fill","stroke","width","height"]):c=me(c,["fill","stroke"]),R(p,u,c)},"bpmn:Association":function(p,u,c={}){return c=me(c,["fill","stroke"]),Q(p,u,c)},"bpmn:BoundaryEvent":function(p,u,c={}){var{renderIcon:g=!0}=c;c=me(c,["fill","stroke"]);var b=_e(u),P=b.get("cancelActivity");c={strokeWidth:1.5,fill:he(u,s,c.fill),fillOpacity:vd,stroke:ne(u,f,c.stroke)},P||(c.strokeDasharray="6");var ee=D(p,u,c);return $(p,u.width,u.height,tr,{...c,fill:"none"}),g&&H(u,p,c),ee},"bpmn:BusinessRuleTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=de(p,u,c),b=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),P=v(p,b);Se(P,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:1});var ee=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),N=v(p,ee);return Se(N,{fill:ne(u,f,c.stroke),stroke:ne(u,f,c.stroke),strokeWidth:1}),g},"bpmn:CallActivity":function(p,u,c={}){return c=me(c,["fill","stroke"]),R(p,u,{strokeWidth:5,...c})},"bpmn:ComplexGateway":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=F(p,u,c),b=r.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:u.width,containerHeight:u.height,position:{mx:.46,my:.26}});return v(p,b,{fill:ne(u,f,c.stroke),stroke:ne(u,f,c.stroke),strokeWidth:1}),g},"bpmn:DataInput":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=r.getRawPath("DATA_ARROW"),b=O(p,u,c);return v(p,g,{fill:"none",stroke:ne(u,f,c.stroke),strokeWidth:1}),b},"bpmn:DataInputAssociation":function(p,u,c={}){return c=me(c,["fill","stroke"]),Q(p,u,{...c,markerEnd:V(p,"association-end",he(u,s,c.fill),ne(u,f,c.stroke))})},"bpmn:DataObject":function(p,u,c={}){return c=me(c,["fill","stroke"]),O(p,u,c)},"bpmn:DataObjectReference":E("bpmn:DataObject"),"bpmn:DataOutput":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=r.getRawPath("DATA_ARROW"),b=O(p,u,c);return v(p,g,{strokeWidth:1,fill:ne(u,f,c.stroke),stroke:ne(u,f,c.stroke)}),b},"bpmn:DataOutputAssociation":function(p,u,c={}){return c=me(c,["fill","stroke"]),Q(p,u,{...c,markerEnd:V(p,"association-end",he(u,s,c.fill),ne(u,f,c.stroke))})},"bpmn:DataStoreReference":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=r.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:0,my:.133}});return v(p,g,{fill:he(u,s,c.fill),fillOpacity:nn,stroke:ne(u,f,c.stroke),strokeWidth:2})},"bpmn:EndEvent":function(p,u,c={}){var{renderIcon:g=!0}=c;c=me(c,["fill","stroke"]);var b=D(p,u,{...c,strokeWidth:4});return g&&H(u,p,c),b},"bpmn:EventBasedGateway":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=_e(u),b=F(p,u,c);$(p,u.width,u.height,u.height*.2,{fill:he(u,"none",c.fill),stroke:ne(u,f,c.stroke),strokeWidth:1});var P=g.get("eventGatewayType"),ee=!!g.get("instantiate");function N(){var W=r.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:u.width,containerHeight:u.height,position:{mx:.36,my:.44}});v(p,W,{fill:"none",stroke:ne(u,f,c.stroke),strokeWidth:2})}if(P==="Parallel"){var Y=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:u.width,containerHeight:u.height,position:{mx:.474,my:.296}});v(p,Y,{fill:"none",stroke:ne(u,f,c.stroke),strokeWidth:1})}else P==="Exclusive"&&(ee||$(p,u.width,u.height,u.height*.26,{fill:"none",stroke:ne(u,f,c.stroke),strokeWidth:1}),N());return b},"bpmn:ExclusiveGateway":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=F(p,u,c),b=r.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:u.width,containerHeight:u.height,position:{mx:.32,my:.3}}),P=Ft(u);return P.get("isMarkerVisible")&&v(p,b,{fill:ne(u,f,c.stroke),stroke:ne(u,f,c.stroke),strokeWidth:1}),g},"bpmn:Gateway":function(p,u,c={}){return c=me(c,["fill","stroke"]),F(p,u,c)},"bpmn:Group":function(p,u,c={}){return c=me(c,["fill","stroke","width","height"]),M(p,u.width,u.height,nr,{stroke:ne(u,f,c.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:Xe(u,c),height:je(u,c)})},"bpmn:InclusiveGateway":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=F(p,u,c);return $(p,u.width,u.height,u.height*.24,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:2.5}),g},"bpmn:IntermediateEvent":function(p,u,c={}){var{renderIcon:g=!0}=c;c=me(c,["fill","stroke"]);var b=D(p,u,{...c,strokeWidth:1.5});return $(p,u.width,u.height,tr,{fill:"none",stroke:ne(u,f,c.stroke),strokeWidth:1.5}),g&&H(u,p,c),b},"bpmn:IntermediateCatchEvent":E("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":E("bpmn:IntermediateEvent"),"bpmn:Lane":function(p,u,c={}){return c=me(c,["fill","stroke","width","height"]),C(p,u,{...c,fillOpacity:wd})},"bpmn:ManualTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=de(p,u,c),b=r.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return v(p,b,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:.5}),g},"bpmn:MessageFlow":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=_e(u),b=Ft(u),P=he(u,s,c.fill),ee=ne(u,f,c.stroke),N=y(p,u.waypoints,{markerEnd:V(p,"messageflow-end",P,ee),markerStart:V(p,"messageflow-start",P,ee),stroke:ee,strokeDasharray:"10, 11",strokeWidth:1.5});if(g.get("messageRef")){var Y=N.getPointAtLength(N.getTotalLength()/2),W=r.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:Y.x,y:Y.y}}),te={strokeWidth:1};b.get("messageVisibleKind")==="initiating"?(te.fill=P,te.stroke=ee):(te.fill=ee,te.stroke=P);var U=v(p,W,te),z=g.get("messageRef"),Z=z.get("name"),L=ae(p,Z,{align:"center-top",fitBox:!0,style:{fill:ee}}),pe=U.getBBox(),we=L.getBBox(),et=Y.x-we.width/2,Re=Y.y+pe.height/2+md;vi(L,et,Re,0)}return N},"bpmn:ParallelGateway":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=F(p,u,c),b=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:u.width,containerHeight:u.height,position:{mx:.46,my:.2}});return v(p,b,{fill:ne(u,f,c.stroke),stroke:ne(u,f,c.stroke),strokeWidth:1}),g},"bpmn:Participant":function(p,u,c={}){c=me(c,["fill","stroke","width","height"]);var g=C(p,u,c),b=$t(u),P=ia(u),ee=_e(u),N=ee.get("name");if(b){var Y=P?[{x:30,y:0},{x:30,y:je(u,c)}]:[{x:0,y:30},{x:Xe(u,c),y:30}];I(p,Y,{stroke:ne(u,f,c.stroke),strokeWidth:yd}),X(p,N,u,c)}else{var W=En(u,c);P||(W.height=Xe(u,c),W.width=je(u,c));var te=ae(p,N,{box:W,align:"center-middle",style:{fill:bn(u,d,f,c.stroke)}});if(!P){var U=-1*je(u,c);vi(te,0,-U,270)}}return ee.get("participantMultiplicity")&&_("ParticipantMultiplicityMarker",p,u,c),g},"bpmn:ReceiveTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=_e(u),b=de(p,u,c),P;return g.get("instantiate")?($(p,28,28,20*.22,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:1}),P=r.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):P=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),v(p,P,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:1}),b},"bpmn:ScriptTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=de(p,u,c),b=r.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return v(p,b,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:1}),g},"bpmn:SendTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=de(p,u,c),b=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return v(p,b,{fill:ne(u,f,c.stroke),stroke:he(u,s,c.fill),strokeWidth:1}),g},"bpmn:SequenceFlow":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=he(u,s,c.fill),b=ne(u,f,c.stroke),P=y(p,u.waypoints,{markerEnd:V(p,"sequenceflow-end",g,b),stroke:b}),ee=_e(u),{source:N}=u;if(N){var Y=_e(N);ee.get("conditionExpression")&&ce(Y,"bpmn:Activity")&&Se(P,{markerStart:V(p,"conditional-flow-marker",g,b)}),Y.get("default")&&(ce(Y,"bpmn:Gateway")||ce(Y,"bpmn:Activity"))&&Y.get("default")===ee&&Se(P,{markerStart:V(p,"conditional-default-flow-marker",g,b)})}return P},"bpmn:ServiceTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=de(p,u,c);$(p,10,10,{fill:he(u,s,c.fill),stroke:"none",transform:"translate(6, 6)"});var b=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});v(p,b,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:1}),$(p,10,10,{fill:he(u,s,c.fill),stroke:"none",transform:"translate(11, 10)"});var P=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return v(p,P,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:1}),g},"bpmn:StartEvent":function(p,u,c={}){var{renderIcon:g=!0}=c;c=me(c,["fill","stroke"]);var b=_e(u);b.get("isInterrupting")||(c={...c,strokeDasharray:"6"});var P=D(p,u,c);return g&&H(u,p,c),P},"bpmn:SubProcess":function(p,u,c={}){return $t(u)?c=me(c,["fill","stroke","width","height"]):c=me(c,["fill","stroke"]),R(p,u,c)},"bpmn:Task":function(p,u,c={}){return c=me(c,["fill","stroke"]),de(p,u,c)},"bpmn:TextAnnotation":function(p,u,c={}){c=me(c,["fill","stroke"]);var{width:g,height:b}=En(u,c),P=M(p,g,b,0,0,{fill:"none",stroke:"none"}),ee=r.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:g,containerHeight:b,position:{mx:0,my:0}});v(p,ee,{stroke:ne(u,f,c.stroke)});var N=_e(u),Y=N.get("text")||"";return ae(p,Y,{align:"left-top",box:En(u,c),padding:la,style:{fill:bn(u,d,f,c.stroke)}}),P},"bpmn:Transaction":function(p,u,c={}){$t(u)?c=me(c,["fill","stroke","width","height"]):c=me(c,["fill","stroke"]);var g=R(p,u,{strokeWidth:1.5,...c}),b=n.style(["no-fill","no-events"],{stroke:ne(u,f,c.stroke),strokeWidth:1.5}),P=$t(u);return P||(c={}),M(p,Xe(u,c),je(u,c),nr-tr,tr,b),g},"bpmn:UserTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=de(p,u,c),b=15,P=12,ee=r.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:b,y:P}});v(p,ee,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:.5});var N=r.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:b,y:P}});v(p,N,{fill:he(u,s,c.fill),stroke:ne(u,f,c.stroke),strokeWidth:.5});var Y=r.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:b,y:P}});return v(p,Y,{fill:ne(u,f,c.stroke),stroke:ne(u,f,c.stroke),strokeWidth:.5}),g},label:function(p,u,c={}){return K(p,u,c)}};this._drawPath=v,this._renderer=T}nt(Ut,pt),Ut.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],Ut.prototype.canRender=function(e){return ce(e,"bpmn:BaseElement")},Ut.prototype.drawShape=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)},Ut.prototype.drawConnection=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)},Ut.prototype.getShapePath=function(e){return Af(e)?va(e,gd):ce(e,"bpmn:Event")?Zf(e):ce(e,"bpmn:Activity")?va(e,nr):ce(e,"bpmn:Gateway")?Qf(e):ed(e)};function me(e,t=[]){return t.reduce((n,r)=>(e[r]&&(n[r]=e[r]),n),{})}var bd=0,Ed={width:150,height:50};function _d(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function xd(e){return bt(e)?le({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}var bi=null;function Sd(){return bi||(bi=document.createElement("canvas").getContext("2d")),bi}function Ad(e){var t=[];return e.fontStyle&&t.push(e.fontStyle),e.fontVariant&&t.push(e.fontVariant),e.fontWeight&&t.push(e.fontWeight),e.fontStretch&&t.push(e.fontStretch),t.push(Ca(e.fontSize)||"12px"),t.push(e.fontFamily||"sans-serif"),t.join(" ")}function Ca(e){if(e!=null)return typeof e=="number"||/^-?\d+(\.\d+)?$/.test(e)?e+"px":e}function kd(e,t){var n=Sd();if(!n)return{width:0,height:0};n.font=Ad(t),"letterSpacing"in n&&(n.letterSpacing=Ca(t.letterSpacing)||"0px");var r=e==="",i=r?"dummy":e.replace(/\s+$/,""),o=n.measureText(i);return{width:r?0:o.width,height:"fontBoundingBoxAscent"in o?o.fontBoundingBoxAscent+o.fontBoundingBoxDescent:o.actualBoundingBoxAscent+o.actualBoundingBoxDescent}}function Cd(e,t,n){for(var r=e.shift(),i=r,o;;){if(o=kd(i,n),o.width=i?o.width:0,i===" "||i===""||o.width<Math.round(t)||i.length<2)return Rd(e,i,r,o);i=Nd(i,o.width,t)}}function Rd(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 Ra="";function Td(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===Ra)&&i.pop();break}var a=i[i.length-1];return a&&a===Ra&&(i[i.length-1]="-"),i.join("")}function Nd(e,t,n){var r=Math.max(e.length*(n/t),1),i=Td(e,r);return i||(i=e.slice(0,Math.max(Math.round(r-1),1))),i}function rr(e){this._config=le({},{size:Ed,padding:bd,style:{},align:"center-top"},e||{})}rr.prototype.createText=function(e,t){return this.layoutText(e,t).element},rr.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},rr.prototype.layoutText=function(e,t){for(var n=le({},this._config.size,t.box),r=le({},this._config.style,t.style),i=_d(t.align||this._config.align),o=xd(t.padding!==void 0?t.padding:this._config.padding),a=t.fitBox||!1,s=Pd(r),f=e.split(/\u00AD?\r?\n/),d=[],h=n.width-o.left-o.right;f.length;)d.push(Cd(f,h,r));i.vertical==="middle"&&(o.top=o.bottom=0);var m=tn(d,function(M,S,I){return M+(s||S.height)},0)+o.top+o.bottom,A=tn(d,function(M,S,I){return S.width>M?S.width:M},0),V=o.top;i.vertical==="middle"&&(V+=(n.height-m)/2),V-=(s||d[0].height)/4;var G=xe("text");Se(G,r),oe(d,function(M){var S;switch(V+=s||M.height,i.horizontal){case"left":S=o.left;break;case"right":S=(a?A:h)-o.right-M.width;break;default:S=Math.max(((a?A:h)-M.width)/2+o.left,0)}var I=xe("tspan");Se(I,{x:S,y:V}),I.textContent=M.text,Pe(G,I)});var $={width:A,height:m};return{dimensions:$,element:G}};function Pd(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}var Dd=12,Id=1.2,Od=40;function Ta(e){var t=le({fontFamily:"Arial, sans-serif",fontSize:Dd,fontWeight:"normal",lineHeight:Id},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,r=le({},t,{fontSize:n},e&&e.externalStyle||{}),i=new rr({style:t});this.getExternalLabelBounds=function(a,s){var f={width:Math.max(a.width,yn.width),height:30},d=o(s,f,{style:r});return{x:Math.round(a.x+a.width/2-d.width/2),y:a.y,width:Math.ceil(d.width),height:Math.ceil(d.height)}},this.getTextAnnotationBounds=function(a,s){var f=o(s,a,{style:t,align:"left-top",padding:la});return{x:a.x,y:a.y,width:a.width,height:Math.max(Od,Math.round(f.height))}},this.getDimensions=function(a,s){return i.getDimensions(a,s||{})};function o(a,s,f){return i.getDimensions(a,le({box:s},f))}this.createText=function(a,s){return i.createText(a,s||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return r}}Ta.$inject=["config.textRenderer"];function Bd(){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,f=n.containerWidth/r.width*n.xScaleFactor,d=0;d<r.heightElements.length;d++)a["y"+d]=r.heightElements[d]*s;for(var h=0;h<r.widthElements.length;h++)a["x"+h]=r.widthElements[h]*f}var m=$d(r.d,{mx:i,my:o,e:a});return m}}var Md=/\{([^{}]+)\}/g,Ld=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;function Fd(e,t,n){var r=n;return t.replace(Ld,function(i,o,a,s,f){o=o||s,r&&(o in r&&(r=r[o]),typeof r=="function"&&f&&(r=r()))}),r=(r==null||r==n?e:r)+"",r}function $d(e,t){return String(e).replace(Md,function(n,r){return Fd(n,r,t)})}const Vd={__init__:["bpmnRenderer"],bpmnRenderer:["type",Ut],textRenderer:["type",Ta],pathMap:["type",Bd]};function jd(e,t){return t=t||{},e.replace(/{([^}]+)}/g,function(n,r){return t[r]||"{"+r+"}"})}const Na={translate:["value",jd]};function Ud(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function Ei(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function zd(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function Hd(e){return Ud({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function Wd(e){for(var t=e.waypoints,n=t.reduce(function(d,h,m){var A=t[m-1];if(A){var V=d[d.length-1],G=V&&V.endLength||0,$=qd(A,h);d.push({start:A,end:h,startLength:G,endLength:G+$,length:$})}return d},[]),r=n.reduce(function(d,h){return d+h.length},0),i=r/2,o=0,a=n[o];a.endLength<i;)a=n[++o];var s=(i-a.startLength)/a.length,f={x:a.start.x+(a.end.x-a.start.x)*s,y:a.start.y+(a.end.y-a.start.y)*s};return f}function _i(e){return Sf(e)?Wd(e):Hd(e)}function qd(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ie(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function ir(e,t,n){return le({id:e.id,type:e.$type,businessObject:e,di:t},n)}function Yd(e,t,n){var r=e.waypoint;return!r||r.length<2?[_i(t),_i(n)]:r.map(function(i){return{x:i.x,y:i.y}})}function Pa(e,t,n){return new Error(`element ${Ie(t)} referenced by ${Ie(e)}#${n} not yet drawn`)}function yt(e,t,n,r,i){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=r,this._textRenderer=i}yt.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],yt.prototype.add=function(e,t,n){var r,i,o;if(ce(t,"bpmndi:BPMNPlane")){var a=ce(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};r=this._elementFactory.createRoot(ir(e,t,a)),this._canvas.addRootElement(r)}else if(ce(t,"bpmndi:BPMNShape")){var s=!$t(e,t),f=Gd(e);i=n&&(n.hidden||n.collapsed);var d=t.bounds;r=this._elementFactory.createShape(ir(e,t,{collapsed:s,hidden:i,x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),isFrame:f})),ce(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,r),ce(e,"bpmn:Lane")&&(o=0),ce(e,"bpmn:DataStoreReference")&&(Kd(n,_i(d))||(n=this._canvas.findRoot(n))),this._canvas.addShape(r,n,o)}else if(ce(t,"bpmndi:BPMNEdge")){var h=this._getSource(e),m=this._getTarget(e);i=n&&(n.hidden||n.collapsed),r=this._elementFactory.createConnection(ir(e,t,{hidden:i,source:h,target:m,waypoints:Yd(t,h,m)})),ce(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(r,n,o)}else throw new Error(`unknown di ${Ie(t)} for element ${Ie(e)}`);return kf(e)&&Xn(r)&&this.addLabel(e,t,r),this._eventBus.fire("bpmnElement.added",{element:r}),r},yt.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${Ie(e)}#attachedToRef`);var r=this._elementRegistry.get(n.id),i=r&&r.attachers;if(!r)throw Pa(e,n,"attachedToRef");t.host=r,i||(r.attachers=i=[]),i.indexOf(t)===-1&&i.push(t)},yt.prototype.addLabel=function(e,t,n){var r,i,o;return r=Nf(t,n),i=Xn(n),i&&(r=this._textRenderer.getExternalLabelBounds(r,i)),o=this._elementFactory.createLabel(ir(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!Xn(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)},yt.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?Pa(e,r,t+"Ref"):new Error(`${Ie(e)}#${t} Ref not specified`)},yt.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},yt.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},yt.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};function Kd(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 Gd(e){return ce(e,"bpmn:Group")}const Xd={__depends__:[Vd,{__depends__:[Na],bpmnImporter:["type",yt]}]};function Da(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(Math.random()*1e9)+"-"}Da.prototype.next=function(){return this._prefix+ ++this._counter};var Jd=new Da("ov"),Zd=500;function Te(e,t,n,r){this._eventBus=t,this._canvas=n,this._elementRegistry=r,this._ids=Jd,this._overlayDefaults=le({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=Qd(n.getContainer()),this._init()}Te.$inject=["config.overlays","eventBus","canvas","elementRegistry"],Te.prototype.get=function(e){if(rt(e)&&(e={id:e}),rt(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?en(t.overlays,na({type:e.type})):t.overlays.slice():[]}else return e.type?en(this._overlays,na({type:e.type})):e.id?this._overlays[e.id]:null},Te.prototype.add=function(e,t,n){if(bt(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=le({},this._overlayDefaults,n,{id:r,type:t,element:e,html:n.html}),this._addOverlay(n),r},Te.prototype.remove=function(e){var t=this.get(e)||[];Ge(t)||(t=[t]);var n=this;oe(t,function(r){var i=n._getOverlayContainer(r.element,!0);if(r&&(er(r.html),er(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)}})},Te.prototype.isShown=function(){return this._overlayRoot.style.display!=="none"},Te.prototype.show=function(){or(this._overlayRoot)},Te.prototype.hide=function(){or(this._overlayRoot,!1)},Te.prototype.clear=function(){this._overlays={},this._overlayContainers=[],ba(this._overlayRoot)},Te.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,r=t.x,i=t.y;if(t.waypoints){var o=gn(t);r=o.x,i=o.y}Ia(n,r,i),wa(e.html,"data-container-id",t.id)},Te.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=gn(r).width:a=r.width,i=t.right*-1+a}if(t.bottom!==void 0){var s;r.waypoints?s=gn(r).height:s=r.height,o=t.bottom*-1+s}Ia(n,i||0,o||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Te.prototype._createOverlayContainer=function(e){var t=at('<div class="djs-overlays" />');ze(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},Te.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";Oa(this._overlayRoot,n)},Te.prototype._getOverlayContainer=function(e,t){var n=Qe(this._overlayContainers,function(r){return r.element===e});return!n&&!t?this._createOverlayContainer(e):n},Te.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)),rt(r)&&(r=at(r)),o=this._getOverlayContainer(n),i=at('<div class="djs-overlay" data-overlay-id="'+t+'">'),ze(i,{position:"absolute"}),i.appendChild(r),e.type&&jt(i).add("djs-overlay-"+e.type);var a=this._canvas.findRoot(n),s=this._canvas.getRootElement();or(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())},Te.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(),f=!0;(r!==s||n&&(Zt(i)&&i>t.scale||Zt(o)&&o<t.scale))&&(f=!1),or(a,f),this._updateOverlayScale(e,t)},Te.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),Zt(r)&&t.scale<r&&(a=(1/t.scale||1)*r),Zt(i)&&t.scale>i&&(a=(1/t.scale||1)*i)),Zt(a)&&(s="scale("+a+","+a+")"),Oa(o,s)},Te.prototype._updateOverlaysVisibilty=function(e){var t=this;oe(this._overlays,function(n){t._updateOverlayVisibilty(n,e)})},Te.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});oe(o,function(f){t.remove(f.id)});var a=t._getOverlayContainer(i);if(a){er(a.html);var s=t._overlayContainers.indexOf(a);s!==-1&&t._overlayContainers.splice(s,1)}}),e.on("element.changed",Zd,function(r){var i=r.element,o=t._getOverlayContainer(i,!0);o&&(oe(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&&jt(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 Qd(e){var t=at('<div class="djs-overlay-container" />');return ze(t,{position:"absolute",width:0,height:0}),e.insertBefore(t,e.firstChild),t}function Ia(e,t,n){ze(e,{left:t+"px",top:n+"px"})}function or(e,t){e.style.display=t===!1?"none":""}function Oa(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(n){e.style[n+"transform"]=t})}const Ba={__init__:["overlays"],overlays:["type",Te]};function Ma(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(aa(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)})}Ma.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];const ep={__init__:["changeSupport"],changeSupport:["type",Ma]};var tp=1e3;function Fe(e){this._eventBus=e}Fe.$inject=["eventBus"];function np(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}Fe.prototype.on=function(e,t,n,r,i,o){if((Lt(t)||Et(t))&&(o=i,i=r,r=n,n=t,t=null),Lt(n)&&(o=i,i=r,r=n,n=tp),bt(i)&&(o=i,i=!1),!Lt(r))throw new Error("handlerFn must be a function");Ge(e)||(e=[e]);var a=this._eventBus;oe(e,function(s){var f=["commandStack",s,t].filter(function(d){return d}).join(".");a.on(f,n,i?np(r,o):r,o)})},Fe.prototype.canExecute=gt("canExecute"),Fe.prototype.preExecute=gt("preExecute"),Fe.prototype.preExecuted=gt("preExecuted"),Fe.prototype.execute=gt("execute"),Fe.prototype.executed=gt("executed"),Fe.prototype.postExecute=gt("postExecute"),Fe.prototype.postExecuted=gt("postExecuted"),Fe.prototype.revert=gt("revert"),Fe.prototype.reverted=gt("reverted");function gt(e){return function(n,r,i,o,a){(Lt(n)||Et(n))&&(a=o,o=i,i=r,r=n,n=null),this.on(n,e,r,i,o,a)}}function xi(e,t){t.invoke(Fe,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)})}nt(xi,Fe),xi.$inject=["canvas","injector"];const rp={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",xi]};var ip={"&":"&","<":"<",">":">",'"':""","'":"'"};function op(e){return e=""+e,e&&e.replace(/[&<>"']/g,function(t){return ip[t]})}var ap="_plane";function Si(e){var t=e.id;return ce(e,"bpmn:SubProcess")?sp(t):t}function sp(e){return e+ap}var lp="bjs-breadcrumbs-shown";function La(e,t,n){var r=at('<ul class="bjs-breadcrumbs"></ul>'),i=n.getContainer(),o=jt(i);i.appendChild(r);var a=[];e.on("element.changed",function(f){var d=f.element,h=_e(d),m=Qe(a,function(A){return A===h});m&&s()});function s(f){f&&(a=cp(f));var d=a.flatMap(function(m){var A=n.findRoot(Si(m))||n.findRoot(m.id);if(!A&&ce(m,"bpmn:Process")){var V=t.find(function(M){var S=_e(M);return S&&S.get("processRef")===m});A=V&&n.findRoot(V.id)}if(!A)return[];var G=op(m.name||m.id),$=at('<li><span class="bjs-crumb"><a title="'+G+'">'+G+"</a></span></li>");return $.addEventListener("click",function(){n.setRootElement(A)}),$});r.innerHTML="";var h=d.length>1;o.toggle(lp,h),d.forEach(function(m){r.appendChild(m)})}e.on("root.set",function(f){s(f.element)})}La.$inject=["eventBus","elementRegistry","canvas"];function cp(e){for(var t=_e(e),n=[],r=t;r;r=r.$parent)(ce(r,"bpmn:SubProcess")||ce(r,"bpmn:Process"))&&n.push(r);return n.reverse()}function Fa(e,t){var n=null,r=new up;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,!(!ce(o,"bpmn:SubProcess")&&!s)){s=s||{x:0,y:0,zoom:1};var f=(a.x-s.x)*a.scale,d=(a.y-s.y)*a.scale;(f!==0||d!==0)&&t.scroll({dx:f,dy:d}),s.zoom!==a.scale&&t.zoom(s.zoom,{x:0,y:0})}}),e.on("diagram.clear",function(){r.clear(),n=null})}Fa.$inject=["eventBus","canvas"];function up(){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 $a={x:180,y:160};function zt(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,function(r,i){n._handleImport(i.definitions)})}zt.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)})}},zt.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;ce(a,"bpmn:SubProcess")&&!o.isExpanded&&n.push(a),dp(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 f=t._processToDiagramMap[s.id];t._moveToDiPlane(a,f.plane)}}),i},zt.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=fp(e),r={x:n.x-$a.x,y:n.y-$a.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)})},zt.prototype._moveToDiPlane=function(e,t){var n=Va(e),r=n.plane.get("planeElement");r.splice(r.indexOf(e),1),t.get("planeElement").push(e)},zt.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},zt.$inject=["eventBus","moddle"];function Va(e){return ce(e,"bpmndi:BPMNDiagram")?e:Va(e.$parent)}function fp(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=Ei(n.bounds);t.top=Math.min(r.top,t.top),t.left=Math.min(r.left,t.left)}}),zd(t)}function dp(e,t){var n=e.$parent;return!(!ce(n,"bpmn:SubProcess")||n===t.bpmnElement||_f(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))}var ar=250,pp='<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>',hp="bjs-drilldown-empty";function kt(e,t,n,r,i){Fe.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",ar,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.reverted("shape.toggleCollapse",ar,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.executed(["shape.create","shape.move","shape.delete"],ar,function(a){var s=a.oldParent,f=a.newParent||a.parent,d=a.shape;o._canDrillDown(d)&&o._addOverlay(d),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(f),o._updateDrilldownOverlay(d)},!0),this.reverted(["shape.create","shape.move","shape.delete"],ar,function(a){var s=a.oldParent,f=a.newParent||a.parent,d=a.shape;o._canDrillDown(d)&&o._addOverlay(d),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(f),o._updateDrilldownOverlay(d)},!0),t.on("import.render.complete",function(){n.filter(function(a){return o._canDrillDown(a)}).map(function(a){o._addOverlay(a)})})}nt(kt,Fe),kt.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},kt.prototype._canDrillDown=function(e){var t=this._canvas;return ce(e,"bpmn:SubProcess")&&t.findRoot(Si(e))},kt.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=_e(e),r=t.get({element:n.id,type:"drilldown"})[0];if(r){var i=n&&n.get("flowElements")&&n.get("flowElements").length;jt(r.html).toggle(hp,!i)}},kt.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,r=_e(e),i=n.get({element:e,type:"drilldown"});i.length&&this._removeOverlay(e);var o=at('<button type="button" class="bjs-drilldown">'+pp+"</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(Si(e)))}),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:o}),this._updateOverlayVisibility(e)},kt.prototype._removeOverlay=function(e){var t=this._overlays;t.remove({element:e,type:"drilldown"})},kt.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];const mp={__depends__:[Ba,ep,rp],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",La],drilldownCentering:["type",Fa],drilldownOverlayBehavior:["type",kt],subprocessCompatibility:["type",zt]};function ja(e){return e.originalEvent||e.srcEvent}function Ua(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 yp(){return/mac/i.test(navigator.platform)}function za(e,t){return(ja(e)||e).button===t}function sr(e){return za(e,0)}function gp(e){return za(e,1)}function vp(e){var t=ja(e)||e;return sr(e)&&t.shiftKey}function wp(e){return!0}function lr(e){return sr(e)||gp(e)}var Ha=500;function Wa(e,t,n){var r=this;function i(x,H,B){if(!s(x,H)){var _,q,ae;B?q=t.getGraphics(B):(_=H.delegateTarget||H.target,_&&(q=_,B=t.get(q))),!(!q||!B)&&(ae=e.fire(x,{element:B,gfx:q,originalEvent:H}),ae===!1&&(H.stopPropagation(),H.preventDefault()))}}var o={};function a(x){return o[x]}function s(x,H){var B=d[x]||sr;return!B(H)}var f={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},d={"element.contextmenu":wp,"element.mousedown":lr,"element.mouseup":lr,"element.click":lr,"element.dblclick":lr};function h(x,H,B){var _=f[x];if(!_)throw new Error("unmapped DOM event name <"+x+">");return i(_,H,B)}var m="svg, .djs-element";function A(x,H,B,_){var q=o[B]=function(ae){i(B,ae)};_&&(d[B]=_),q.$delegate=gi.bind(x,m,H,q)}function V(x,H,B){var _=a(B);_&&gi.unbind(x,H,_.$delegate)}function G(x){oe(f,function(H,B){A(x,B,H)})}function $(x){oe(f,function(H,B){V(x,B,H)})}e.on("canvas.destroy",function(x){$(x.svg)}),e.on("canvas.init",function(x){G(x.svg)}),e.on(["shape.added","connection.added"],function(x){var H=x.element,B=x.gfx;e.fire("interactionEvents.createHit",{element:H,gfx:B})}),e.on(["shape.changed","connection.changed"],Ha,function(x){var H=x.element,B=x.gfx;e.fire("interactionEvents.updateHit",{element:H,gfx:B})}),e.on("interactionEvents.createHit",Ha,function(x){var H=x.element,B=x.gfx;r.createDefaultHit(H,B)}),e.on("interactionEvents.updateHit",function(x){var H=x.element,B=x.gfx;r.updateDefaultHit(H,B)});var M=k("djs-hit djs-hit-stroke"),S=k("djs-hit djs-hit-click-stroke"),I=k("djs-hit djs-hit-all"),y=k("djs-hit djs-hit-no-move"),v={all:I,"click-stroke":S,stroke:M,"no-move":y};function k(x,H){return H=le({stroke:"white",strokeWidth:15},H||{}),n.cls(x,["no-fill","no-border"],H)}function T(x,H){var B=v[H];if(!B)throw new Error("invalid hit type <"+H+">");return Se(x,B),x}function E(x,H){Pe(x,H)}this.removeHits=function(x){var H=ld(".djs-hit",x);oe(H,Jn)},this.createDefaultHit=function(x,H){var B=x.waypoints,_=x.isFrame,q;return B?this.createWaypointsHit(H,B):(q=_?"stroke":"all",this.createBoxHit(H,q,{width:x.width,height:x.height}))},this.createWaypointsHit=function(x,H){var B=mi(H);return T(B,"stroke"),E(x,B),B},this.createBoxHit=function(x,H,B){B=le({x:0,y:0},B);var _=xe("rect");return T(_,H),Se(_,B),E(x,_),_},this.updateDefaultHit=function(x,H){var B=ht(".djs-hit",H);if(B)return x.waypoints?ga(B,x.waypoints):Se(B,{width:x.width,height:x.height}),B},this.fire=i,this.triggerMouseEvent=h,this.mouseHandler=a,this.registerEvent=A,this.unregisterEvent=V}Wa.$inject=["eventBus","elementRegistry","styles"];const bp={__init__:["interactionEvents"],interactionEvents:["type",Wa]};function rn(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=new Set;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)})}rn.$inject=["eventBus","canvas"],rn.prototype.deselect=function(e){if(this._selectedElements.has(e)){var t=this.get();this._selectedElements.delete(e),this._eventBus.fire("selection.changed",{oldSelection:t,newSelection:this.get()})}},rn.prototype.get=function(){return Array.from(this._selectedElements)},rn.prototype.isSelected=function(e){return this._selectedElements.has(e)},rn.prototype.select=function(e,t){var n=this.get();Ge(e)||(e=e?[e]:[]);var r=this._canvas,i=r.getRootElement();e=e.filter(function(o){var a=r.findRoot(o);return i===a}),t?oe(e,o=>{this._selectedElements.add(o)}):this._selectedElements=new Set(e),this._eventBus.fire("selection.changed",{oldSelection:n,newSelection:this.get()})};var qa="hover",Ya="selected";function Ka(e,t){this._canvas=e;function n(i,o){e.addMarker(i,o)}function r(i,o){e.removeMarker(i,o)}t.on("element.hover",function(i){n(i.element,qa)}),t.on("element.out",function(i){r(i.element,qa)}),t.on("selection.changed",function(i){function o(d){r(d,Ya)}function a(d){n(d,Ya)}var s=new Set(i.oldSelection),f=new Set(i.newSelection);for(let d of s)f.has(d)||o(d);for(let d of f)s.has(d)||a(d)})}Ka.$inject=["canvas","eventBus"];function Ga(e,t,n,r){e.on("create.end",500,function(i){var o=i.context,a=o.canExecute,s=o.elements,f=o.hints||{},d=f.autoSelect;if(a){if(d===!1)return;Ge(d)?t.select(d):t.select(s.filter(Ep))}}),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=Qe(o,function(f){return a.id===f.id});s||t.select(a)}),e.on("element.click",function(i){if(sr(i)){var o=i.element;o===n.getRootElement()&&(o=null);var a=t.isSelected(o),s=t.get().length>1,f=vp(i);if(a&&s)return f?t.deselect(o):t.select(o);a?t.deselect(o):t.select(o,f)}})}Ga.$inject=["eventBus","selection","canvas","elementRegistry"];function Ep(e){return!e.hidden}const _p={__init__:["selectionVisuals","selectionBehavior"],__depends__:[bp],selection:["type",rn],selectionVisuals:["type",Ka],selectionBehavior:["type",Ga]},xp=/^class[ {]/;function Sp(e){return xp.test(e.toString())}function Ai(e){return Array.isArray(e)}function ki(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function cr(...e){e.length===1&&Ai(e[0])&&(e=e[0]),e=[...e];const t=e.pop();return t.$inject=e,t}const Ap=/constructor\s*[^(]*\(\s*([^)]*)\)/m,kp=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,Cp=/\/\*([^*]*)\*\//m;function Rp(e){if(typeof e!="function")throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(Sp(e)?Ap:kp);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map(r=>{const i=r.match(Cp);return(i&&i[1]||r).trim()})||[]}function Xa(e,t){const n=t||{get:function(y,v){if(r.push(y),v===!1)return null;throw s(`No provider for "${y}"!`)}},r=[],i=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),a=o.injector=this,s=function(y){const v=r.join(" -> ");return r.length=0,new Error(v?`${y} (Resolving: ${v})`:y)};function f(y,v){if(!i[y]&&y.includes(".")){const k=y.split(".");let T=f(k.shift());for(;k.length;)T=T[k.shift()];return T}if(ki(o,y))return o[y];if(ki(i,y)){if(r.indexOf(y)!==-1)throw r.push(y),s("Cannot resolve circular dependency!");return r.push(y),o[y]=i[y][0](i[y][1]),r.pop(),o[y]}return n.get(y,v)}function d(y,v){if(typeof v>"u"&&(v={}),typeof y!="function")if(Ai(y))y=cr(y.slice());else throw s(`Cannot invoke "${y}". Expected a function!`);const T=(y.$inject||Rp(y)).map(E=>ki(v,E)?v[E]:f(E));return{fn:y,dependencies:T}}function h(y){const{fn:v,dependencies:k}=d(y),T=Function.prototype.bind.call(v,null,...k);return new T}function m(y,v,k){const{fn:T,dependencies:E}=d(y,k);return T.apply(v,E)}function A(y){return cr(v=>y.get(v))}function V(y,v){if(v&&v.length){const k=Object.create(null),T=Object.create(null),E=[],x=[],H=[];let B,_,q,ae;for(let J in i)B=i[J],v.indexOf(J)!==-1&&(B[2]==="private"?(_=E.indexOf(B[3]),_===-1?(q=B[3].createChild([],v),ae=A(q),E.push(B[3]),x.push(q),H.push(ae),k[J]=[ae,J,"private",q]):k[J]=[H[_],J,"private",x[_]]):k[J]=[B[2],B[1]],T[J]=!0),(B[2]==="factory"||B[2]==="type")&&B[1].$scope&&v.forEach(K=>{B[1].$scope.indexOf(K)!==-1&&(k[J]=[B[2],B[1]],T[K]=!0)});v.forEach(J=>{if(!T[J])throw new Error('No provider for "'+J+'". Cannot use provider from the parent!')}),y.unshift(k)}return new Xa(y,a)}const G={factory:m,type:h,value:function(y){return y}};function $(y,v){const k=y.__init__||[];return function(){k.forEach(T=>{typeof T=="string"?v.get(T):v.invoke(T)})}}function M(y){const v=y.__exports__;if(v){const k=y.__modules__,T=Object.keys(y).reduce((_,q)=>(q!=="__exports__"&&q!=="__modules__"&&q!=="__init__"&&q!=="__depends__"&&(_[q]=y[q]),_),Object.create(null)),E=(k||[]).concat(T),x=V(E),H=cr(function(_){return x.get(_)});v.forEach(function(_){i[_]=[H,_,"private",x]});const B=(y.__init__||[]).slice();return B.unshift(function(){x.init()}),y=Object.assign({},y,{__init__:B}),$(y,x)}return Object.keys(y).forEach(function(k){if(k==="__init__"||k==="__depends__")return;const T=y[k];if(T[2]==="private"){i[k]=T;return}const E=T[0],x=T[1];i[k]=[G[E],Tp(E,x),E]}),$(y,a)}function S(y,v){return y.indexOf(v)!==-1||(y=(v.__depends__||[]).reduce(S,y),y.indexOf(v)!==-1)?y:y.concat(v)}function I(y){const v=y.reduce(S,[]).map(M);let k=!1;return function(){k||(k=!0,v.forEach(T=>T()))}}this.get=f,this.invoke=m,this.instantiate=h,this.createChild=V,this.init=I(e)}function Tp(e,t){return e!=="value"&&Ai(t)&&(t=cr(t.slice())),t}var Np=1;function Ct(e,t){pt.call(this,e,Np),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})}nt(Ct,pt),Ct.prototype.canRender=function(){return!0},Ct.prototype.drawShape=function(t,n,r){var i=xe("rect");return Se(i,{x:0,y:0,width:n.width||0,height:n.height||0}),sa(n)?Se(i,le({},this.FRAME_STYLE,r||{})):Se(i,le({},this.SHAPE_STYLE,r||{})),Pe(t,i),i},Ct.prototype.drawConnection=function(t,n,r){var i=mi(n.waypoints,le({},this.CONNECTION_STYLE,r||{}));return Pe(t,i),i},Ct.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 Vt(a)},Ct.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 Vt(o)},Ct.$inject=["eventBus","styles"];function Pp(){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 le(o,{class:n})},this.style=function(n,r){!Ge(n)&&!r&&(r=n,n=[]);var i=tn(n,function(o,a){return le(o,e[a]||{})},{});return r?le(i,r):i},this.computeStyle=function(n,r,i){return Ge(r)||(i=r,r=[]),t.style(r||[],le({},i,n||{}))}}const Dp={__init__:["defaultRenderer"],defaultRenderer:["type",Ct],styles:["type",Pp]};function Ip(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return n!==-1&&e.splice(n,1),n}function Op(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 ur(e,t){return Math.round(e*t)/t}function Ja(e){return Et(e)?e+"px":e}function Bp(e){for(;e.parent;)e=e.parent;return e}function Mp(e){e=le({},{width:"100%",height:"100%"},e);const t=e.container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),ze(n,{position:"relative",overflow:"hidden",width:Ja(e.width),height:Ja(e.height)}),t.appendChild(n),n}function Za(e,t,n){const r=xe("g");it(r).add(t);const i=n!==void 0?n:e.childNodes.length-1;return e.insertBefore(r,e.childNodes[i]||null),r}const Lp="base",Qa=0,Fp=1,$p={shape:["x","y","width","height"],connection:["waypoints"]};function fe(e,t,n,r){this._eventBus=t,this._elementRegistry=r,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(e||{})}fe.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],fe.prototype._init=function(e){const t=this._eventBus,n=this._container=Mp(e),r=this._svg=xe("svg");Se(r,{width:"100%",height:"100%"}),wa(r,"tabindex",0),e.autoFocus&&t.on("element.hover",()=>{this.restoreFocus()}),t.on("element.mousedown",500,o=>{this.focus()}),r.addEventListener("focusin",()=>{this._setFocused(!0)}),r.addEventListener("focusout",()=>{this._setFocused(!1)}),r.addEventListener("mouseover",()=>{this._eventBus.fire("canvas.mouseover")}),r.addEventListener("mouseout",()=>{this._eventBus.fire("canvas.mouseout")}),Pe(n,r);const i=this._viewport=Za(r,"viewport");e.deferUpdate&&(this._viewboxChanged=ra(this._viewboxChanged,300)),this._restoreFocus=ra(this._restoreFocus,0),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)},fe.prototype._destroy=function(){this._restoreFocus.cancel(),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},fe.prototype._setFocused=function(e){e!=this._focused&&(this._focused=e,this._eventBus.fire("canvas.focus.changed",{focused:e}))},fe.prototype._clear=function(){this._elementRegistry.getAll().forEach(t=>{const n=aa(t);n==="root"?this.removeRootElement(t):this._removeElement(t,n)}),this._planes=[],this._rootElement=null,delete this._cachedViewbox},fe.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)},fe.prototype.restoreFocus=function(){this._restoreFocus()},fe.prototype._restoreFocus=function(){document.activeElement===document.body&&this.focus()},fe.prototype.isFocused=function(){return this._focused},fe.prototype.getDefaultLayer=function(){return this.getLayer(Lp,Qa)},fe.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},fe.prototype._getChildIndex=function(e){return tn(this._layers,function(t,n){return n.visible&&e>=n.index&&t++,t},0)},fe.prototype._createLayer=function(e,t){typeof t>"u"&&(t=Fp);const n=this._getChildIndex(t);return{group:Za(this._viewport,"layer-"+e,n),index:t,visible:!0}},fe.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},fe.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&&(Jn(n),t.visible=!1),n},fe.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],Jn(t.group))},fe.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},fe.prototype.findRoot=function(e){const t=this._resolveElements(e);let n;for(const r of t){const i=this._findPlaneForRoot(Bp(r));if(!i||n&&i.rootElement!==n)return;n=i.rootElement}return n},fe.prototype.getRootElements=function(){return this._planes.map(function(e){return e.rootElement})},fe.prototype._findPlaneForRoot=function(e){return Qe(this._planes,function(t){return t.rootElement===e})},fe.prototype._resolveElement=function(e){return typeof e=="string"?this._elementRegistry.get(e):e},fe.prototype._resolveElements=function(e){return Ge(e)||(e=[e]),e.map(t=>this._resolveElement(t)).filter(Boolean)},fe.prototype.getContainer=function(){return this._container},fe.prototype._updateMarker=function(e,t,n){let r;e=this._resolveElement(e),e.markers=e.markers||new Set,r=this._elementRegistry._elements[e.id],r&&(oe([r.gfx,r.secondaryGfx],function(i){i&&(n?(e.markers.add(t),it(i).add(t)):(e.markers.delete(t),it(i).remove(t)))}),this._eventBus.fire("element.marker.update",{element:e,gfx:r.gfx,marker:t,add:!!n}))},fe.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},fe.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},fe.prototype.hasMarker=function(e,t){return e=this._resolveElement(e),e.markers?e.markers.has(t):!1},fe.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},fe.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},fe.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,Qa);return this.hideLayer(n),this._addRoot(e,r),this._planes.push({rootElement:e,layer:r}),e},fe.prototype.removeRootElement=function(e){if(e=this._resolveElement(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},fe.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},fe.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)},fe.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})},fe.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})},fe.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=$p[e];if(!ea(n,function(i){return typeof t[i]<"u"}))throw new Error("must supply { "+n.join(", ")+" } with "+e)},fe.prototype._setParent=function(e,t,n){Op(t.children,e,n),e.parent=t},fe.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},fe.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},fe.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},fe.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),Ip(e.parent&&e.parent.children,e),e.parent=null,i.fire(t+".removed",{element:e}),n.remove(e),e},fe.prototype.removeShape=function(e){return this._removeElement(e,"shape")},fe.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},fe.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},fe.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},fe.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},fe.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,f,d;if(e)this._changeViewbox(function(){s=Math.min(n.width/e.width,n.height/e.height);const h=this._svg.createSVGMatrix().scale(s).translate(-e.x,-e.y);wn(t,h)});else return o=this._rootElement?this.getActiveLayer():null,r=o&&o.getBBox()||{},a=wn(t),i=a?a.matrix:Vf(),s=ur(i.a,1e3),f=ur(-i.e||0,1e3),d=ur(-i.f||0,1e3),e=this._cachedViewbox={x:f?f/s:0,y:d?d/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},fe.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox(function(){e=le({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),es(t,n)}),{x:n.e,y:n.f}},fe.prototype.scrollToElement=function(e,t){let n=100;const r=this._resolveElements(e);if(!r.length)return;const i=this.findRoot(r);if(!i)return;i!==this.getRootElement()&&this.setRootElement(i);const o=r.filter(G=>G!=i);if(!o.length)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 a=gn(o),s=Ei(a),f=this.viewbox(),d=this.zoom();let h,m;f.y+=t.top/d,f.x+=t.left/d,f.width-=(t.right+t.left)/d,f.height-=(t.bottom+t.top)/d;const A=Ei(f);if(!(a.width<f.width&&a.height<f.height))h=a.x-f.x,m=a.y-f.y;else{const G=Math.max(0,s.right-A.right),$=Math.min(0,s.left-A.left),M=Math.max(0,s.bottom-A.bottom),S=Math.min(0,s.top-A.top);h=G||$,m=M||S}this.scroll({dx:-h*d,dy:-m*d})},fe.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)}),ur(r.a,1e3)};function es(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}fe.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},fe.prototype._setZoom=function(e,t){const n=this._svg,r=this._viewport,i=n.createSVGMatrix(),o=n.createSVGPoint();let a,s,f,d,h;f=r.getCTM();const m=f.a;return t?(a=le(o,t),s=a.matrixTransform(f.inverse()),d=i.translate(s.x,s.y).scale(1/m*e).translate(-s.x,-s.y),h=f.multiply(d)):h=i.scale(e),es(this._viewport,h),h},fe.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},fe.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}},fe.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var on="data-element-id";function He(e){this._elements={},this._eventBus=e}He.$inject=["eventBus"],He.prototype.add=function(e,t,n){var r=e.id;this._validateId(r),Se(t,on,r),n&&Se(n,on,r),this._elements[r]={element:e,gfx:t,secondaryGfx:n}},He.prototype.remove=function(e){var t=this._elements,n=e.id||e,r=n&&t[n];r&&(Se(r.gfx,on,""),r.secondaryGfx&&Se(r.secondaryGfx,on,""),delete t[n])},He.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)},He.prototype.updateGraphics=function(e,t,n){var r=e.id||e,i=this._elements[r];return n?i.secondaryGfx=t:i.gfx=t,t&&Se(t,on,r),t},He.prototype.get=function(e){var t;typeof e=="string"?t=e:t=e&&Se(e,on);var n=this._elements[t];return n&&n.element},He.prototype.filter=function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(n)}),t},He.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}},He.prototype.getAll=function(){return this.filter(function(e){return e})},He.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)})},He.prototype.getGraphics=function(e,t){var n=e.id||e,r=this._elements[n];return r&&(t?r.secondaryGfx:r.gfx)},He.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 Vp(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 jp(e){return e.__refs_collection===!0}function Up(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function ts(e,t,n){var r=Vp(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 zp(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 Je(e,t){if(!(this instanceof Je))return new Je(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}Je.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?ts(this,t,e):zp(this,t,e)},Je.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return jp(n)||ts(this,t,e),n},Je.prototype.ensureBound=function(e,t){Up(e,t)||this.bind(e,t)},Je.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},Je.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Ci=new Je({name:"children",enumerable:!0,collection:!0},{name:"parent"}),ns=new Je({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),rs=new Je({name:"attachers",collection:!0},{name:"host"}),is=new Je({name:"outgoing",collection:!0},{name:"source"}),os=new Je({name:"incoming",collection:!0},{name:"target"});function _n(){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)}}),Ci.bind(this,"parent"),ns.bind(this,"labels"),is.bind(this,"outgoing"),os.bind(this,"incoming")}function xn(){_n.call(this),Ci.bind(this,"children"),rs.bind(this,"host"),rs.bind(this,"attachers")}nt(xn,_n);function as(){_n.call(this),Ci.bind(this,"children")}nt(as,xn);function ss(){xn.call(this),ns.bind(this,"labelTarget")}nt(ss,xn);function ls(){_n.call(this),is.bind(this,"source"),os.bind(this,"target")}nt(ls,_n);var Hp={connection:ls,shape:xn,label:ss,root:as};function Wp(e,t){var n=Hp[e];if(!n)throw new Error("unknown type: <"+e+">");return le(new n,t)}function an(){this._uid=12}an.prototype.createRoot=function(e){return this.create("root",e)},an.prototype.createLabel=function(e){return this.create("label",e)},an.prototype.createShape=function(e){return this.create("shape",e)},an.prototype.createConnection=function(e){return this.create("connection",e)},an.prototype.create=function(e,t){return t=le({},t||{}),t.id||(t.id=e+"_"+this._uid++),Wp(e,t)};var fr="__fn",cs=1e3,qp=Array.prototype.slice;function Ue(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}Ue.prototype.on=function(e,t,n,r){if(e=Ge(e)?e:[e],Lt(t)&&(r=n,n=t,t=cs),!Et(t))throw new Error("priority must be a number");var i=n;r&&(i=_t(n,r),i[fr]=n[fr]||n);var o=this;e.forEach(function(a){o._addListener(a,{priority:t,callback:i,next:null})})},Ue.prototype.once=function(e,t,n,r){var i=this;if(Lt(t)&&(r=n,n=t,t=cs),!Et(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[fr]=n,this.on(e,t,o)},Ue.prototype.off=function(e,t){e=Ge(e)?e:[e];var n=this;e.forEach(function(r){n._removeListener(r,t)})},Ue.prototype.createEvent=function(e){var t=new Sn;return t.init(e),t},Ue.prototype.fire=function(e,t){var n,r,i,o;if(o=qp.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 Sn?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}},Ue.prototype.handleError=function(e){return this.fire("error",{error:e})===!1},Ue.prototype._destroy=function(){this._listeners={}},Ue.prototype._invokeListeners=function(e,t,n){for(var r;n&&!e.cancelBubble;)r=this._invokeListener(e,t,n),n=n.next;return r},Ue.prototype._invokeListener=function(e,t,n){var r;if(n.callback.__isTomb)return r;try{r=Yp(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},Ue.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},Ue.prototype._getListeners=function(e){return this._listeners[e]},Ue.prototype._setListeners=function(e,t){this._listeners[e]=t},Ue.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[fr]===t)&&(i?i.next=r:this._setListeners(e,r)),i=n,n=r};function Sn(){}Sn.prototype.stopPropagation=function(){this.cancelBubble=!0},Sn.prototype.preventDefault=function(){this.defaultPrevented=!0},Sn.prototype.init=function(e){le(this,e||{})};function Yp(e,t){return e.apply(null,t)}function Kp(e){return e.childNodes[0]}function Gp(e){return e.parentNode.childNodes[1]}function We(e,t){this._eventBus=e,this._elementRegistry=t}We.$inject=["eventBus","elementRegistry"],We.prototype._getChildrenContainer=function(e){var t=this._elementRegistry.getGraphics(e),n;return e.parent?(n=Gp(t),n||(n=xe("g"),it(n).add("djs-children"),Pe(t.parentNode,n))):n=t,n},We.prototype._clear=function(e){var t=Kp(e);return ba(t),t},We.prototype._createContainer=function(e,t,n,r){var i=xe("g");it(i).add("djs-group"),typeof n<"u"?Xp(i,t,t.childNodes[n]):Pe(t,i);var o=xe("g");it(o).add("djs-element"),it(o).add("djs-"+e),r&&it(o).add("djs-frame"),Pe(i,o);var a=xe("g");return it(a).add("djs-visual"),Pe(o,a),o},We.prototype.create=function(e,t,n){var r=this._getChildrenContainer(t.parent);return this._createContainer(e,r,n,sa(t))},We.prototype.updateContainments=function(e){var t=this,n=this._elementRegistry,r;r=tn(e,function(i,o){return o.parent&&(i[o.parent.id]=o.parent),i},{}),oe(r,function(i){var o=i.children;if(o){var a=t._getChildrenContainer(i),s=a.firstChild;oe(o,function(f){var d=n.getGraphics(f).parentNode;d===s?s=s.nextSibling:a.insertBefore(d,s)})}})},We.prototype.drawShape=function(e,t,n={}){var r=this._eventBus;return r.fire("render.shape",{gfx:e,element:t,attrs:n})},We.prototype.getShapePath=function(e){var t=this._eventBus;return t.fire("render.getShapePath",e)},We.prototype.drawConnection=function(e,t,n={}){var r=this._eventBus;return r.fire("render.connection",{gfx:e,element:t,attrs:n})},We.prototype.getConnectionPath=function(e){var t=this._eventBus;return t.fire("render.getConnectionPath",e)},We.prototype.update=function(e,t,n){if(t.parent){var r=this._clear(n);if(e==="shape")this.drawShape(r,t),Aa(n,t.x,t.y);else if(e==="connection")this.drawConnection(r,t);else throw new Error("unknown type: "+e);t.hidden?Se(n,"display","none"):Se(n,"display","block")}},We.prototype.remove=function(e){var t=this._elementRegistry.getGraphics(e);Jn(t.parentNode)};function Xp(e,t,n){var r=n||t.firstChild;e!==r&&t.insertBefore(e,r)}const Jp={__depends__:[Dp],__init__:["canvas"],canvas:["type",fe],elementRegistry:["type",He],elementFactory:["type",an],eventBus:["type",Ue],graphicsFactory:["type",We]};function Zp(e){var t=new Xa(e);return t.init(),t}function Qp(e){e=e||{};var t={config:["value",e]},n=[t,Jp].concat(e.modules||[]);return Zp(n)}function Rt(e,t){this._injector=t||Qp(e),this.get("eventBus").fire("diagram.init")}Rt.prototype.get=function(e,t){return this._injector.get(e,t)},Rt.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},Rt.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},Rt.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};function Ri(){}Ri.prototype.get=function(e){return this.$model.properties.get(this,e)},Ri.prototype.set=function(e,t){this.$model.properties.set(this,e,t)};function us(e,t){this.model=e,this.properties=t}us.prototype.createType=function(e){var t=this.model,n=this.properties,r=Object.create(Ri.prototype);oe(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}),oe(a,_t(function(s,f){this.set(f,s)},this))}return o.prototype=r,o.hasType=r.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var eh=le(Object.create(null),{String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0}),fs=le(Object.create(null),{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 Ti(e,t){var n=fs[e];return n?n(t):t}function Ni(e){return!!eh[e]}function ds(e){return!!fs[e]}function Oe(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 qe(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName=Object.create(null),this.properties=[],this.propertiesByName=Object.create(null)}qe.prototype.build=function(){return wf(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},qe.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)},qe.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},qe.prototype.redefineProperty=function(e,t,n){var r=e.ns.prefix,i=t.split("#"),o=Oe(i[0],r),a=Oe(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},qe.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},qe.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},qe.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},qe.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},qe.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},qe.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")},qe.prototype.hasProperty=function(e){return this.propertiesByName[e]},qe.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,r=this.allTypes,i=e.name;i in n||(oe(e.properties,_t(function(o){o=le({},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 Tt(e,t){this.packageMap=Object.create(null),this.typeMap=Object.create(null),this.packages=[],this.properties=t,oe(e,_t(this.registerPackage,this))}Tt.prototype.getPackage=function(e){return this.packageMap[e]},Tt.prototype.getPackages=function(){return this.packages},Tt.prototype.registerPackage=function(e){e=le({},e);var t=this.packageMap;ps(t,e,"prefix"),ps(t,e,"uri"),oe(e.types,_t(function(n){this.registerType(n,e)},this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},Tt.prototype.registerType=function(e,t){e=le({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:le({},e.meta||{})});var n=Oe(e.name,t.prefix),r=n.name,i=Object.create(null);oe(e.properties,_t(function(o){var a=Oe(o.name,n.prefix),s=a.name;Ni(o.type)||(o.type=Oe(o.type,a.prefix).name),le(o,{ns:a,name:s}),i[s]=o},this)),le(e,{ns:n,name:r,propertiesByName:i}),oe(e.extends,_t(function(o){var a=Oe(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},Tt.prototype.mapTypes=function(e,t,n){var r=Ni(e.name)?{name:e.name}:this.typeMap[e.name],i=this;function o(f,d){var h=Oe(f,Ni(f)?"":e.prefix);i.mapTypes(h,t,d)}function a(f){return o(f,!0)}function s(f){return o(f,!1)}if(!r)throw new Error("unknown type <"+e.name+">");oe(r.superClass,n?a:s),t(r,!n),oe(r.traits,a)},Tt.prototype.getEffectiveDescriptor=function(e){var t=Oe(e),n=new qe(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},Tt.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})};function ps(e,t,n){var r=t[n];if(r in e)throw new Error("package with "+n+" <"+r+"> already defined")}function Ht(e){this.model=e}Ht.prototype.set=function(e,t,n){if(!rt(t)||!t.length)throw new TypeError("property name must be a non-empty string");var r=this.getProperty(e,t),i=r&&r.name;th(n)?r?delete e[i]:delete e.$attrs[Pi(t)]:r?i in e?e[i]=n:hs(e,r,n):e.$attrs[Pi(t)]=n},Ht.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[Pi(t)];var r=n.name;return!e[r]&&n.isMany&&hs(e,n,[]),e[r]},Ht.prototype.define=function(e,t,n){if(!n.writable){var r=n.value;n=le({},n,{get:function(){return r}}),delete n.value}Object.defineProperty(e,t,n)},Ht.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},Ht.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},Ht.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 th(e){return typeof e>"u"}function hs(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function Pi(e){return e.replace(/^:/,"")}function Ze(e,t={}){this.properties=new Ht(this),this.factory=new us(this,this.properties),this.registry=new Tt(e,this.properties),this.typeCache=Object.create(null),this.config=t}Ze.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},Ze.prototype.getType=function(e){var t=this.typeCache,n=rt(e)?e:e.ns.name,r=t[n];return r||(e=this.registry.getEffectiveDescriptor(n),r=t[n]=this.factory.createType(e)),r},Ze.prototype.createAny=function(e,t,n){var r=Oe(e),i={$type:e,$instanceOf:function(a){return a===this.$type},get:function(a){return this[a]},set:function(a,s){vf(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}),oe(n,function(a,s){bt(a)&&a.value!==void 0?i[a.name]=a.value:i[s]=a}),i},Ze.prototype.getPackage=function(e){return this.registry.getPackage(e)},Ze.prototype.getPackages=function(){return this.registry.getPackages()},Ze.prototype.getElementDescriptor=function(e){return e.$descriptor},Ze.prototype.hasType=function(e,t){t===void 0&&(t=e,e=this);var n=e.$model.getElementDescriptor(e);return t in n.allTypesByName},Ze.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},Ze.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var ms=String.fromCharCode,nh=Object.prototype.hasOwnProperty,rh=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,An={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(An).forEach(function(e){An[e.toUpperCase()]=An[e]});function ih(e,t,n,r){return r?nh.call(An,r)?An[r]:"&"+r+";":ms(t||parseInt(n,16))}function Wt(e){return e.length>3&&e.indexOf("&")!==-1?e.replace(rh,ih):e}var ys="non-whitespace outside of root node";function Nt(e){return new Error(e)}function oh(e){return"missing namespace for prefix <"+e+">"}function dr(e){return{get:e,enumerable:!0}}function ah(e){var t=Object.create(null),n;for(n in e)t[n]=e[n];return t}var gs=Symbol("nameCache");function Di(e){return e+"$uri"}function sh(e){var t=Object.create(null),n,r;for(n in e)r=e[n],t[r]=r,t[Di(r)]=n;return t}function pr(){return{line:0,column:0}}function lh(e){throw e}function vs(e){if(!this)return new vs(e);var t=e&&e.proxy,n,r,i,o,a=lh,s,f,d,h,m=pr,A=!1,V=!1,G="",$=!1,M=!1,S=null,I=!1,y,v,k,T;function E(_){_ instanceof Error||(_=Nt(_)),S=_,a(_,m)}function x(_){s&&(_ instanceof Error||(_=Nt(_)),s(_,m))}this.on=function(_,q){if(typeof q!="function")throw Nt("required args <name, cb>");switch(_){case"openTag":r=q;break;case"text":n=q;break;case"closeTag":i=q;break;case"error":a=q;break;case"warn":s=q;break;case"cdata":o=q;break;case"attention":h=q;break;case"question":d=q;break;case"comment":f=q;break;default:throw Nt("unsupported event: "+_)}return this},this.ns=function(_){if(typeof _>"u"&&(_={}),typeof _!="object")throw Nt("required args <nsMap={}>");var q=Object.create(null),ae;for(ae in _)q[ae]=_[ae];return M=!0,T=q,this};function H(){y=M?[]:null,v=M?sh(T):null,k=[],m=pr,I=!1,S=null,V=!1,G=""}this.parse=function(_){if(typeof _!="string")throw Nt("required args <xml=string>");if(A)throw Nt("parse during stream; call end() first");return H(),B(_),m=pr,I=!1,S},this.write=function(_){if(typeof _!="string")throw Nt("required args <xml=string>");return A||(H(),A=!0),S||(G=B(G+_,!0)||""),this},this.end=function(){return A||H(),A=!1,S||B(G),G="",m=pr,I=!1,S},this.stop=function(){I=!0};function B(_,q=!1){var ae=null,J=null,K,X=0,re=!1,Q=!1,O=0,D=0,F,C,R,j,de,se,p,u,c,g="",b=0,P;function ee(te,U){var z=te.indexOf(":");if(z===-1)return te;var Z=v[te.substring(0,z)];return Z?U===Z?te.substr(z+1):Z+te.substr(z):(x(oh(te.substring(0,z))),null)}function N(){if(P!==null)return P;var te,U,z=M&&v.xmlns,Z=M&&$?[]:null,L=b,pe=g,we=pe.length,et,Re,Ye,ft,Ne,Tn={},Gs=new Set,tt,ve,be;e:for(;L<we;L++)if(tt=!1,ve=pe.charCodeAt(L),!(ve===32||ve<14&&ve>8)){for((ve<65||ve>122||ve>90&&ve<97)&&ve!==95&&ve!==58&&(x("illegal first char attribute name"),tt=!0),be=L+1;be<we;be++)if(ve=pe.charCodeAt(be),!(ve>96&&ve<123||ve>64&&ve<91||ve>47&&ve<59||ve===46||ve===45||ve===95)){if(ve===32||ve<14&&ve>8){x("missing attribute value"),L=be;continue e}if(ve===61)break;x("illegal attribute name char"),tt=!0}if(Ne=pe.substring(L,be),Ne==="xmlns:xmlns"&&(x("illegal declaration of xmlns"),tt=!0),ve=pe.charCodeAt(be+1),ve===34)be=pe.indexOf('"',L=be+2),be===-1&&(be=pe.indexOf("'",L),be!==-1&&(x("attribute value quote missmatch"),tt=!0));else if(ve===39)be=pe.indexOf("'",L=be+2),be===-1&&(be=pe.indexOf('"',L),be!==-1&&(x("attribute value quote missmatch"),tt=!0));else for(x("missing attribute value quotes"),tt=!0,be=be+1;be<we&&(ve=pe.charCodeAt(be+1),!(ve===32||ve<14&&ve>8));be++);for(be===-1&&(x("missing closing quotes"),be=we,tt=!0),tt||(Ye=pe.substring(L,be)),L=be;be+1<we&&(ve=pe.charCodeAt(be+1),!(ve===32||ve<14&&ve>8));be++)L===be&&(x("illegal character after attribute end"),tt=!0);if(L=be+1,tt)continue e;if(Gs.has(Ne)){x("attribute <"+Ne+"> already defined");continue}if(Gs.add(Ne),!M){Tn[Ne]=Ye;continue}if($){if(Re=Ne==="xmlns"?"xmlns":Ne.charCodeAt(0)===120&&Ne.substr(0,6)==="xmlns:"?Ne.substr(6):null,Re!==null){if(te=Wt(Ye),U=Di(Re),ft=T[te],!ft){if(Re==="xmlns"||U in v&&v[U]!==te)do ft="ns"+X++;while(typeof v[ft]<"u");else ft=Re;T[te]=ft}v[Re]!==ft&&(et||(v=ah(v),et=!0),v[Re]=ft,Re==="xmlns"&&(v[Di(ft)]=te,z=ft),v[U]=te),Tn[Ne]=Ye;continue}Z.push(Ne,Ye);continue}Ne=ee(Ne,z),Ne!==null&&(Tn[Ne]=Ye)}if($)for(L=0,we=Z.length;L<we;L++)Ne=ee(Z[L++],z),Ye=Z[L],Ne!==null&&(Tn[Ne]=Ye);return P=Tn}function Y(){for(var te=/(\r\n|\r|\n)/g,U=0,z=0,Z=0,L=D,pe,we;O>=Z&&(pe=te.exec(_),!(!pe||(L=pe[0].length+pe.index,L>O)));)U+=1,Z=L;return O==-1?(z=L,we=_.substring(D)):D===0?we=_.substring(D,O):(z=O-Z,we=D==-1?_.substring(O):_.substring(O,D+1)),{data:we,line:U,column:z}}for(m=Y,t&&(c=Object.create({},{name:dr(function(){return p}),originalName:dr(function(){return u}),attrs:dr(N),ns:dr(function(){return v})}));D!==-1;){if(_.charCodeAt(D)===60?O=D:O=_.indexOf("<",D),O===-1){if(q)return _.substring(D);if(k.length)return E("unexpected end of file");if(!V)return E("missing start tag");D<_.length&&_.substring(D).trim()&&x(ys);return}if(V||(V=!0),D!==O){if(k.length){if(n&&(n(_.substring(D,O),Wt,m),I))return}else if(_.substring(D,O).trim()&&(x(ys),I))return}if(j=_.charCodeAt(O+1),j===33){if(R=_.charCodeAt(O+2),R===91&&_.substr(O+3,6)==="CDATA["){if(D=_.indexOf("]]>",O),D===-1)return q?_.substring(O):E("unclosed cdata");if(o&&(o(_.substring(O+9,D),m),I))return;D+=3;continue}if(R===45&&_.charCodeAt(O+3)===45){if(D=_.indexOf("-->",O),D===-1)return q?_.substring(O):E("unclosed comment");if(f&&(f(_.substring(O+4,D),Wt,m),I))return;D+=3;continue}}if(j===63){if(D=_.indexOf("?>",O),D===-1)return q?_.substring(O):E("unclosed question");if(d&&(d(_.substring(O,D+2),m),I))return;D+=2;continue}for(F=O+1;;F++){if(de=_.charCodeAt(F),isNaN(de))return q?_.substring(O):(D=-1,E("unclosed tag"));if(de===34)R=_.indexOf('"',F+1),F=R!==-1?R:F;else if(de===39)R=_.indexOf("'",F+1),F=R!==-1?R:F;else if(de===62){D=F;break}}if(j===33){if(h&&(h(_.substring(O,D+1),Wt,m),I))return;D+=1;continue}if(P={},j===47){if(re=!1,Q=!0,!k.length)return E("missing open tag");if(F=p=k.pop(),R=O+2+F.length,_.substring(O+2,R)!==F)return E("closing tag mismatch");for(;R<D;R++)if(j=_.charCodeAt(R),!(j===32||j>8&&j<14))return E("close tag")}else{if(_.charCodeAt(D-1)===47?(F=p=_.substring(O+1,D-1),re=!0,Q=!0):(F=p=_.substring(O+1,D),re=!0,Q=!1),!(j>96&&j<123||j>64&&j<91||j===95||j===58))return E("illegal first char nodeName");for(R=1,C=F.length;R<C;R++)if(j=F.charCodeAt(R),!(j>96&&j<123||j>64&&j<91||j>47&&j<59||j===45||j===95||j==46)){if(j===32||j<14&&j>8){p=F.substring(0,R),P=null;break}return E("invalid nodeName")}Q||k.push(p)}if(M){K=v,re&&(Q||y.push(K),P===null&&($=F.indexOf("xmlns",R)!==-1)&&(b=R,g=F,N(),$=!1)),u=p,J!==v&&(ae=v[gs],ae===void 0&&(ae=v[gs]=Object.create(null)),J=v);var W=ae[p];if(W!==void 0)p=W;else{if(j=p.indexOf(":"),j!==-1){if(se=v[p.substring(0,j)],!se)return E("missing namespace on <"+u+">");p=p.substr(j+1)}else se=v.xmlns;se&&(p=se+":"+p),ae[u]=p}}if(re&&(b=R,g=F,r&&(t?r(c,Wt,Q,m):r(p,N,Wt,Q,m),I)))return;if(Q){if(i&&(i(t?c:p,Wt,re,m),I))return;M&&(re?v=K:v=y.pop())}D+=1}}}function ws(e){return e.xml&&e.xml.tagAlias==="lowerCase"}var Ii={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},bs="property";function Es(e){return e.xml&&e.xml.serialize}function ch(e){const t=Es(e);return t!==bs&&(t||null)}function uh(e){return e.charAt(0).toUpperCase()+e.slice(1)}function _s(e,t){return ws(t)?e.prefix+":"+uh(e.localName):e.name}function fh(e,t){var n=e.name,r=e.localName,i=t&&t.xml&&t.xml.typePrefix;return i&&r.indexOf(i)===0?e.prefix+":"+r.slice(i.length):n}function dh(e,t,n){const r=Oe(e,t.xmlns),i=`${t[r.prefix]||r.prefix}:${r.localName}`,o=Oe(i);var a=n.getPackage(o.prefix);return fh(o,a)}function Pt(e){return new Error(e)}function vt(e){return e.$descriptor}function ph(e){le(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(t){this.references.push(t)},this.addElement=function(t){if(!t)throw Pt("expected element");var n=this.elementsById,r=vt(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 Pt("duplicate ID <"+o+">");n[o]=t}},this.addWarning=function(t){this.warnings.push(t)}}function kn(){}kn.prototype.handleEnd=function(){},kn.prototype.handleText=function(){},kn.prototype.handleNode=function(){};function Oi(){}Oi.prototype=Object.create(kn.prototype),Oi.prototype.handleNode=function(){return this};function sn(){}sn.prototype=Object.create(kn.prototype),sn.prototype.handleText=function(e){this.body=(this.body||"")+e};function Cn(e,t){this.property=e,this.context=t}Cn.prototype=Object.create(sn.prototype),Cn.prototype.handleNode=function(e){if(this.element)throw Pt("expected no sub nodes");return this.element=this.createReference(e),this},Cn.prototype.handleEnd=function(){this.element.id=this.body},Cn.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}};function Bi(e,t){this.element=t,this.propertyDesc=e}Bi.prototype=Object.create(sn.prototype),Bi.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=Ti(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)};function hr(){}hr.prototype=Object.create(sn.prototype),hr.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 Le(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}Le.prototype=Object.create(hr.prototype),Le.prototype.addReference=function(e){this.context.addReference(e)},Le.prototype.handleText=function(e){var t=this.element,n=vt(t),r=n.bodyProperty;if(!r)throw Pt("unexpected body text <"+e+">");sn.prototype.handleText.call(this,e)},Le.prototype.handleEnd=function(){var e=this.body,t=this.element,n=vt(t),r=n.bodyProperty;r&&e!==void 0&&(e=Ti(r.type,e),t.set(r.name,e))},Le.prototype.createElement=function(e){var t=e.attributes,n=this.type,r=vt(n),i=this.context,o=new n({}),a=this.model,s;return oe(t,function(f,d){var h=r.propertiesByName[d],m;h&&h.isReference?h.isMany?(m=f.split(" "),oe(m,function(A){i.addReference({element:o,property:h.ns.name,id:A})})):i.addReference({element:o,property:h.ns.name,id:f}):(h?f=Ti(h.type,f):d==="xmlns"?d=":"+d:(s=Oe(d,r.ns.prefix),a.getPackage(s.prefix)&&i.addWarning({message:"unknown attribute <"+d+">",element:o,property:d,value:f})),o.set(d,f))}),o},Le.prototype.getPropertyForNode=function(e){var t=e.name,n=Oe(t),r=this.type,i=this.model,o=vt(r),a=n.name,s=o.propertiesByName[a];if(s&&!s.isAttr){const d=ch(s);if(d){const h=e.attributes[d];if(h){const m=dh(h,e.ns,i),A=i.getType(m);return le({},s,{effectiveType:vt(A).name})}}return s}var f=i.getPackage(n.prefix);if(f){const d=_s(n,f),h=i.getType(d);if(s=Qe(o.properties,function(m){return!m.isVirtual&&!m.isReference&&!m.isAttribute&&h.hasType(m.type)}),s)return le({},s,{effectiveType:vt(h).name})}else if(s=Qe(o.properties,function(d){return!d.isReference&&!d.isAttribute&&d.type==="Element"}),s)return s;throw Pt("unrecognized element <"+n.name+">")},Le.prototype.toString=function(){return"ElementDescriptor["+vt(this.type).name+"]"},Le.prototype.valueHandler=function(e,t){return new Bi(e,t)},Le.prototype.referenceHandler=function(e){return new Cn(e,this.context)},Le.prototype.handler=function(e){return e==="Element"?new ln(this.model,e,this.context):new Le(this.model,e,this.context)},Le.prototype.handleChild=function(e){var t,n,r,i;if(t=this.getPropertyForNode(e),r=this.element,n=t.effectiveType||t.type,ds(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?(le(o,{element:r}),this.context.addReference(o)):o.$parent=r),i};function Mi(e,t,n){Le.call(this,e,t,n)}Mi.prototype=Object.create(Le.prototype),Mi.prototype.createElement=function(e){var t=e.name,n=Oe(t),r=this.model,i=this.type,o=r.getPackage(n.prefix),a=o&&_s(n,o)||t;if(!i.hasType(a))throw Pt("unexpected element <"+e.originalName+">");return Le.prototype.createElement.call(this,e)};function ln(e,t,n){this.model=e,this.context=n}ln.prototype=Object.create(hr.prototype),ln.prototype.createElement=function(e){var t=e.name,n=Oe(t),r=n.prefix,i=e.ns[r+"$uri"],o=e.attributes;return this.model.createAny(t,i,o)},ln.prototype.handleChild=function(e){var t=new ln(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},ln.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)};function Li(e){e instanceof Ze&&(e={model:e}),le(this,{lax:!1},e)}Li.prototype.fromXML=function(e,t,n){var r=t.rootHandler;t instanceof Le?(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 ph(le({},t,{rootHandler:r})),s=new vs({proxy:!0}),f=hh();r.context=a,f.push(r);function d(k,T,E){var x=T(),H=x.line,B=x.column,_=x.data;_.charAt(0)==="<"&&_.indexOf(" ")!==-1&&(_=_.slice(0,_.indexOf(" "))+">");var q="unparsable content "+(_?_+" ":"")+`detected
|
|
9
|
+
`+o)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Bt(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&jn.assertOptions(r,{silentJSONParsing:Me.transitional(Me.boolean),forcedJSONParsing:Me.transitional(Me.boolean),clarifyTimeoutError:Me.transitional(Me.boolean),legacyInterceptorReqResOrdering:Me.transitional(Me.boolean),advertiseZstdAcceptEncoding:Me.transitional(Me.boolean),validateStatusUndefinedResolves:Me.transitional(Me.boolean)},!1),i!=null&&(w.isFunction(i)?n.paramsSerializer={serialize:i}:jn.assertOptions(i,{encode:Me.function,serialize:Me.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),jn.assertOptions(n,{baseUrl:Me.spelling("baseURL"),withXsrfToken:Me.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&w.merge(o.common,o[n.method]);o&&w.forEach(["delete","get","head","post","put","patch","query","common"],G=>{delete o[G]}),n.headers=Be.concat(a,o);const s=[];let f=!0;this.interceptors.request.forEach(function(V){if(typeof V.runWhen=="function"&&V.runWhen(n)===!1)return;f=f&&V.synchronous;const F=n.transitional||Tr;F&&F.legacyInterceptorReqResOrdering?s.unshift(V.fulfilled,V.rejected):s.push(V.fulfilled,V.rejected)});const d=[];this.interceptors.response.forEach(function(V){d.push(V.fulfilled,V.rejected)});let h,m=0,k;if(!f){const G=[Mr.bind(this),void 0];for(G.unshift(...s),G.push(...d),k=G.length,h=Promise.resolve(n);m<k;)h=h.then(G[m++],G[m++]);return h}k=s.length;let z=n;for(;m<k;){const G=s[m++],V=s[m++];try{z=G?G(z):z}catch(F){if(!V){h=Promise.reject(F);break}try{const S=V.call(this,F);w.isThenable(S)&&(h=Promise.resolve(S).then(()=>Mr.call(this,z)))}catch(S){h=Promise.reject(S)}break}}if(!h)try{h=Mr.call(this,z)}catch(G){h=Promise.reject(G)}for(m=0,k=d.length;m<k;)h=h.then(d[m++],d[m++]);return h}getUri(t){t=Bt(this.defaults,t);const n=Co(t.baseURL,t.url,t.allowAbsoluteUrls,t);return go(n,t.params,t.paramsSerializer)}};w.forEach(["delete","get","head","options"],function(t){Mt.prototype[t]=function(n,r){return this.request(Bt(r||{},{method:t,url:n,data:r&&w.hasOwnProp(r,"data")?r.data:void 0}))}}),w.forEach(["post","put","patch","query"],function(t){function n(r){return function(o,a,s){return this.request(Bt(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}Mt.prototype[t]=n(),t!=="query"&&(Mt.prototype[t+"Form"]=n(!0))});let Su=class Js{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new hn(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Js(function(i){t=i}),cancel:t}}};function Au(e){return function(n){return e.apply(null,n)}}function ku(e){return w.isObject(e)&&e.isAxiosError===!0}const Lr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Lr).forEach(([e,t])=>{Lr[t]=e});function jo(e){const t=new Mt(e),n=Zi(Mt.prototype.request,t);return w.extend(n,Mt.prototype,t,{allOwnKeys:!0}),w.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return jo(Bt(e,i))},n}const ke=jo(pn);ke.Axios=Mt,ke.CanceledError=hn,ke.CancelToken=Su,ke.isCancel=_o,ke.VERSION=Ir,ke.toFormData=Ln,ke.AxiosError=ne,ke.Cancel=ke.CanceledError,ke.all=function(t){return Promise.all(t)},ke.spread=Au,ke.isAxiosError=ku,ke.mergeConfig=Bt,ke.AxiosHeaders=Be,ke.formToJSON=e=>Eo(w.isHTMLForm(e)?new FormData(e):e),ke.getAdapter=$o.getAdapter,ke.HttpStatusCode=Lr,ke.default=ke;const{Axios:Ey,AxiosError:_y,CanceledError:xy,isCancel:Sy,CancelToken:Ay,VERSION:ky,all:Cy,Cancel:Ry,isAxiosError:Ty,spread:Ny,toFormData:Py,AxiosHeaders:Dy,HttpStatusCode:Iy,formToJSON:Oy,getAdapter:By,mergeConfig:My,create:Ly}=ke,dt={baseURL:"",timeout:6e4,getToken:void 0};function Uo(e={}){e.baseURL!==void 0&&(dt.baseURL=e.baseURL),e.timeout!==void 0&&(dt.timeout=e.timeout),e.getToken!==void 0&&(dt.getToken=e.getToken)}const Cu="";function Ru(e){return(e||"").replace(/\/$/,"")||Cu}const Un=ke.create({timeout:dt.timeout});Un.interceptors.request.use(e=>{var n;e.baseURL=Ru(dt.baseURL||e.baseURL),e.timeout=dt.timeout;const t=(n=dt.getToken)==null?void 0:n.call(dt);return t&&(e.headers.Authorization=t),e}),Un.interceptors.response.use(e=>{const t=e.config,n=e.data;return t.responseType==="blob"?e:t.noCode?n:n&&![0,200].includes(n.code)?Promise.reject(new Error(n.msg||n.message||"服务错误")):n},e=>Promise.reject(e));function ge(e){return Un.request(e)}const zo=e=>ge({url:"/server/repository/flowdef/event/latest",method:"post",data:e}),Fr=e=>ge({url:"/server/app/event/list",method:"get",data:e}),$r=e=>ge({url:"/server/repository/flowdef/event/query",method:"post",data:e}),Vr=(e,t)=>ge({url:`/console/plugin/simulate/event/page/draft/${e.currentPage}/${e.pageSize}`,method:"post",data:t}),Ho=e=>ge({url:"/console/plugin/simulate/event/delete",method:"post",data:e}),Wo=e=>ge({url:"/console/plugin/simulate",method:"post",data:e}),qo=e=>ge({url:"/server/runtime/event/start",method:"post",data:e}),jr=e=>ge({url:"/server/runtime/event/quickStart",method:"post",data:e}),zn=e=>ge({url:"/server/runtime/event/delete",method:"post",data:e}),Yo=e=>ge({url:"/server/runtime/event/messageEventReceived",method:"post",data:e}),Hn=e=>ge({url:"/server/work/event/query",method:"post",data:e}),Ur=e=>ge({url:"/server/history/workinst/event/query",method:"post",data:e}),zr=e=>ge({url:"/server/operate/def/event/get",method:"post",data:e}),Hr=e=>ge({url:"/server/task/event/claim",method:"post",data:e}),Wr=e=>ge({url:"/server/task/event/withdraw",method:"post",data:e}),qr=e=>ge({url:"/server/task/event/rollback",method:"post",data:e}),Yr=e=>ge({url:"/server/task/event/recyle",method:"post",data:e}),Kr=e=>ge({url:"/server/task/event/complete",method:"post",data:e}),Gr=e=>ge({url:"/server/task/event/turnBefore",method:"post",data:e}),Xr=e=>ge({url:"/server/task/event/turnAfter",method:"post",data:e}),Jr=e=>ge({url:"/server/runtime/event/suspend",method:"post",data:e}),Zr=e=>ge({url:"/server/runtime/event/activate",method:"post",data:e}),Qr=e=>ge({url:"/server/runtime/event/terminate",method:"post",data:e}),ei=e=>ge({url:`/console/flowdef/event/download/procdefId/${e.procdefId}/extname/bpmn`,method:"get",noCode:!0}),ti=e=>ge({url:"/server/task/event/send",method:"post",data:e}),Wn=e=>ge({url:"/server/model/event/get/firsthandle",method:"post",data:e}),Ko=Wn,qn=e=>ge({url:"/server/assignment/event/query",method:"post",data:e}),ni=(e="")=>ge({url:`/console/plugin/identify/usertree/organ/event/tree/${e}`,method:"get"}),ri=e=>ge({url:"/server/model/event/get/succeding",method:"post",data:e}),ii=e=>ge({url:"/server/task/event/jump",method:"post",data:e}),oi=e=>ge({url:"/server/model/event/get/usertasks",method:"post",data:e}),Tu=Object.freeze(Object.defineProperty({__proto__:null,activateFlow:Zr,claimTask:Hr,completeTask:Kr,deleteDraftTask:Ho,deleteProcessInstance:zn,doneTaskList:Ur,downloadBpmn:ei,draftFlowList:zo,draftTaskList:Vr,flowStartNodeList:Ko,getAppList:Fr,getFirstHandleNodes:Wn,getFlowList:$r,getOptList:zr,jumpTask:ii,nextSendNode:ri,nodeAssistant:qn,organUserTree:ni,quickStart:jr,receiveMessageEvent:Yo,recycleTask:Yr,revocationTask:Wr,rollbackTask:qr,saveDraft:Wo,sendTask:ti,startDraft:qo,startNodes:oi,suspendFlow:Jr,terminateFlow:Qr,todoTaskList:Hn,turnAfterTask:Xr,turnBeforeTask:Gr},Symbol.toStringTag,{value:"Module"})),Go=3e3;function Yn(e){if(e!==void 0)return e;if(typeof window>"u"||typeof document>"u")return Go;let t=Go-2;return document.querySelectorAll([".ui-overlay",".ui-overlay-message-box",".ui-modal",".el-overlay",".el-overlay-message-box"].join(",")).forEach(r=>{const i=Number.parseInt(window.getComputedStyle(r).zIndex,10);Number.isFinite(i)&&(t=Math.max(t,i))}),t+2}const Nu={class:"ui-flow-jump"},Pu={class:"dialog-footer"},Xo=wt(l.defineComponent({name:"UiFlowJump",__name:"FlowJump",props:{processDefinitionId:{},workId:{default:""},processInstanceId:{default:""},dealUser:{default:()=>({})},assignmentQueryParams:{default:()=>({})},modelValue:{type:Boolean,default:!1},showTrigger:{type:Boolean,default:!0},dialogTitle:{default:"跳转"},dialogWidth:{default:"960px"},zIndex:{}},emits:["update:modelValue","click","open","close","beforeJump","afterJump","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(!1),a=l.ref(),s=l.ref(!1),f=l.ref(!1),d=l.ref(!1),h=l.ref([]),m=l.ref([]),k=l.ref(""),z=l.ref("");let G=0;const V=l.computed(()=>String(r.dealUser.userId||r.dealUser.id||"")),F=l.computed(()=>String(r.dealUser.name||V.value)),S={children:"children",label:"label",value:"value",disabled:"disabled",isLeaf:M=>M.hasChild===!1};function B(M){return M?String(M.id||M.activityId||""):""}function y(M){return M?String(M.activityName||M.name||M.id||M.activityId||""):""}function v(M){return Array.isArray(M)?M.map(I=>{const $=I||{},C=B($);return{...$,id:C,name:y($)}}).filter(I=>I.id):[]}function A(M){return M.map(I=>{const $=I||{},C=String($.id||$.userId||""),R=String($.ntype||"user"),U=Array.isArray($.childs)?$.childs:Array.isArray($.children)?$.children:void 0;return{...$,id:C,value:C,label:String($.caption||$.name||$.id||$.userId||""),caption:String($.caption||$.name||$.id||$.userId||""),ntype:R,hasChild:!!($.hasChild||U!=null&&U.length),disabled:R!=="user",children:U?A(U):void 0}}).filter(I=>I.id)}function N(){return V.value?[{id:V.value,value:V.value,label:F.value,caption:F.value,name:F.value,ntype:"user",hasChild:!1,disabled:!1}]:[]}async function x(){const M=String(r.processDefinitionId||""),I=++G;if(!M)return h.value=[],h.value;f.value=!0;try{const $=await oi({processDefinitionId:M}),C=v($==null?void 0:$.data);return I!==G||M!==String(r.processDefinitionId||"")?C:(h.value=C,h.value)}catch($){throw I===G&&(h.value=[]),i("error",$),$}finally{I===G&&(f.value=!1)}}async function E(M="",I){const $=await qn({processDefinitionId:String(r.processDefinitionId),activityId:k.value,ntype:I||"",parentId:M,userId:V.value,extendParams:{...r.assignmentQueryParams}});return A(Array.isArray($.data)?$.data:[])}async function H(){if(m.value=[],z.value="",!k.value)return[];d.value=!0;try{const M=await E();m.value=M.length?M:N()}catch{m.value=N()}finally{d.value=!1}return m.value.length===1&&m.value[0].ntype==="user"&&(z.value=m.value[0].id),m.value}async function L(M,I){if(M.level===0){I(m.value);return}if(M.data.hasChild===!1||M.data.ntype==="user"){I([]);return}if(Array.isArray(M.data.children)&&M.data.children.length){I(M.data.children);return}try{const $=await E(String(M.data.id),String(M.data.ntype||""));I($)}catch($){i("error",$),I([])}}async function _(){await H()}function q(M,I){const $=M?B(M):k.value,C=String(I||z.value||V.value);return{workId:r.workId,flowNodeAssignee:{activityId:$,assignees:[{name:C,userId:C}]},variables:{}}}async function se(M){const I=M||q();i("beforeJump",I),s.value=!0;try{const $=await ii(I);return i("afterJump",$,I),$}catch($){throw i("error",$),$}finally{s.value=!1}}async function Z(){if(!r.workId){ve.ElMessage.warning("当前任务缺少 workId,无法执行跳转");return}if(!k.value){ve.ElMessage.warning("请选择开始节点");return}if(!z.value){ve.ElMessage.warning("请选择办理人");return}try{await se(),o.value=!1,ve.ElMessage.success("跳转任务成功")}catch{}}async function K(){a.value=Yn(r.zIndex),o.value=!0,k.value="",z.value="",m.value=[],i("open");try{await x()}catch{}}function X(){o.value=!1}function ee(){i("close")}function J(){i("click"),K()}return l.watch(()=>r.modelValue,M=>{M&&!o.value&&K(),!M&&o.value&&(o.value=!1)}),l.watch(o,M=>i("update:modelValue",M)),l.watch(()=>r.processDefinitionId,()=>{k.value="",z.value="",m.value=[],r.processDefinitionId?x().catch(()=>{}):h.value=[]}),l.watch(V,()=>{o.value&&k.value&&H()}),l.onMounted(()=>{r.modelValue?K():r.processDefinitionId&&x().catch(()=>{})}),t({visible:o,effectiveZIndex:a,loading:s,nodeLoading:f,assigneeLoading:d,startNodeList:h,selectedActivityId:k,selectedAssigneeId:z,open:K,close:X,getStartNodes:x,assembleData:q,jump:se}),(M,I)=>{const $=l.resolveComponent("el-button"),C=l.resolveComponent("el-option"),R=l.resolveComponent("el-select"),U=l.resolveComponent("el-form-item"),pe=l.resolveComponent("el-tree-select"),ae=l.resolveComponent("el-form"),p=l.resolveComponent("el-dialog");return l.openBlock(),l.createElementBlock("div",Nu,[e.showTrigger?(l.openBlock(),l.createBlock($,{key:0,type:"primary",loading:s.value,onClick:J},{default:l.withCtx(()=>[l.renderSlot(M.$slots,"default",{},()=>[I[3]||(I[3]=l.createTextVNode("跳转",-1))],!0)]),_:3},8,["loading"])):l.createCommentVNode("",!0),l.createVNode(p,{modelValue:o.value,"onUpdate:modelValue":I[2]||(I[2]=u=>o.value=u),"append-to-body":"",class:"ui-flow-jump-dialog","close-on-click-modal":!1,title:e.dialogTitle,width:e.dialogWidth,"z-index":a.value,onClosed:ee},{footer:l.withCtx(()=>[l.createElementVNode("div",Pu,[l.createVNode($,{type:"primary",loading:s.value,onClick:Z},{default:l.withCtx(()=>[...I[4]||(I[4]=[l.createTextVNode("确认",-1)])]),_:1},8,["loading"]),l.createVNode($,{disabled:s.value,onClick:X},{default:l.withCtx(()=>[...I[5]||(I[5]=[l.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:l.withCtx(()=>[l.createVNode(ae,{class:"jump-form","label-width":"108px"},{default:l.withCtx(()=>[l.createVNode(U,{label:"开始节点",required:""},{default:l.withCtx(()=>[l.createVNode(R,{modelValue:k.value,"onUpdate:modelValue":I[0]||(I[0]=u=>k.value=u),clearable:"",filterable:"",loading:f.value,teleported:!1,placeholder:"请选择",style:{width:"100%"},onChange:_},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(h.value,u=>(l.openBlock(),l.createBlock(C,{key:B(u),label:y(u),value:B(u)},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),l.createVNode(U,{label:"办理人",required:""},{default:l.withCtx(()=>[l.createVNode(pe,{modelValue:z.value,"onUpdate:modelValue":I[1]||(I[1]=u=>z.value=u),"check-strictly":"",clearable:"",data:m.value,disabled:!k.value,load:L,loading:d.value,props:S,lazy:"","node-key":"id",teleported:!1,placeholder:"请选择","render-after-expand":!1,style:{width:"100%"}},null,8,["modelValue","data","disabled","loading"])]),_:1})]),_:1})]),_:1},8,["modelValue","title","width","z-index"])])}}}),[["__scopeId","data-v-40cc6874"]]),Du={class:"ui-flow-send"},Iu={class:"send-panel"},Ou={class:"current-activity"},Bu={class:"node-groups"},Mu=["onClick"],Lu={class:"send-center"},Fu={class:"assignee-transfer"},$u={class:"assignee-box"},Vu={class:"tree-node"},ju={key:1,class:"candidate-list"},Uu={class:"assignee-box selected-list"},zu={key:0,class:"node-state"},Hu={class:"opinion-panel"},Wu={class:"dialog-footer"},ai=wt(l.defineComponent({name:"UiFlowSend",__name:"FlowSend",props:{processDefinitionId:{},activity:{},workId:{},processInstanceId:{default:""},variables:{default:()=>({})},assignmentQueryParams:{default:()=>({})},dealUser:{default:()=>({})},bpmnXml:{default:""},showTrigger:{type:Boolean,default:!0},dialogTitle:{default:"发送"},dialogWidth:{default:"1200px"},zIndex:{},defaultOpinion:{default:""},modelValue:{type:Boolean,default:!1},forceSingleAssignee:{type:Boolean,default:!1},deleteInstanceOnCancel:{type:Boolean,default:!1}},emits:["update:modelValue","click","open","close","nextNodesResolved","beforeSend","afterSend","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(!1),a=l.ref(),s=l.ref(!1),f=l.ref(!1),d=l.ref(!1),h=l.ref(!1),m=l.ref([]),k=l.ref([]),z=l.ref([]),G=l.ref([]),V=l.ref([]),F=l.ref(!1),S=l.ref(""),B=l.ref("nextNode"),y=l.ref(""),v=l.ref([]),A=l.ref(!1),N=l.ref(0),x=l.ref(),E=l.ref(!1),H={children:"childs",label:"caption",isLeaf:T=>T.hasChild===!1},L=l.computed(()=>String(r.dealUser.userId||r.dealUser.id||"")),_=l.computed(()=>k.value.find(T=>q(T)===S.value));function q(T){return T?String(T.id||T.activityId||""):""}function se(T){return`${T.activity}:${T.id}`}function Z(T){return typeof T=="boolean"?"boolean":typeof T=="number"?Number.isInteger(T)?"integer":"double":T instanceof Date?"date":"string"}function K(){v.value=Object.entries(r.variables).map(([T,W])=>({variableName:T,variableType:Z(W),variableValue:W})),A.value=!1}function X(){return v.value.reduce((T,W)=>(W.variableName&&(T[W.variableName]=W.variableValue),T),{})}function ee(){S.value="",m.value=[],k.value=[],z.value=[],G.value=[],V.value=[],F.value=!1}function J(T){if(!r.bpmnXml||!T||typeof DOMParser>"u")return;const W=new DOMParser().parseFromString(r.bpmnXml,"text/xml");return Array.from(W.getElementsByTagName("*")).find(re=>re.getAttribute("id")===T)}function M(T){if(r.forceSingleAssignee)return!0;const W=J(T);if(!W)return!0;if(Array.from(W.children||[]).some(Re=>Re.localName==="multiInstanceLoopCharacteristics"))return!1;const O=["assigneUser","candidateUser"],ie=Array.from(W.getElementsByTagName("*")).filter(Re=>Re.localName==="properties"&&O.includes(Re.getAttribute("type")||"")).flatMap(Re=>Array.from(Re.getElementsByTagName("*")).filter(Ye=>Ye.localName==="property"));if(ie.some(Re=>{const Ye=Re.getAttribute("assignType");return!!(Ye&&Ye!=="user")}))return!1;const ye=ie.map(Re=>Re.getAttribute("value")).filter(Boolean),et=W.getAttribute("camunda:assignee")||"";return et&&!et.includes("${")&&ye.push(...et.split(",").filter(Boolean)),new Set(ye).size<=1}function I(T){var W;return((W=k.value.find(re=>q(re)===T))==null?void 0:W.isSingleAssignee)!==!1}function $(T,W){const re=q(W),O=String(W.activityName||W.name||re);return T.map(ie=>{const ye=ie||{};return{...ye,id:String(ye.id||""),caption:String(ye.caption||ye.name||ye.id||""),ntype:String(ye.ntype||"user"),hasChild:ye.hasChild,activity:re,activityName:O,disabled:ye.ntype!=="user",childs:Array.isArray(ye.childs)?$(ye.childs,W):void 0}})}async function C(T,W="",re=""){h.value=!0;try{const O=await qn({processDefinitionId:String(r.processDefinitionId),activityId:q(T),parentId:W,ntype:re,userId:L.value,extendParams:{...r.assignmentQueryParams}}),ie=$(Array.isArray(O.data)?O.data:[],T);return W?ie:S.value!==q(T)?[]:(F.value=ie.some(ye=>["router","organ"].includes(ye.ntype||"")),F.value?(G.value=ie,z.value=[],await l.nextTick(),c(ie)):(G.value=[],z.value=ie),ie)}catch(O){throw i("error",O),O}finally{h.value=!1}}async function R(T,W){if(T.level===0){W(G.value);return}if(T.data.hasChild===!1||!_.value){W([]);return}if(Array.isArray(T.data.childs)&&T.data.childs.length){W(T.data.childs),await l.nextTick(),c(T.data.childs);return}try{const re=await C(_.value,String(T.data.id),String(T.data.ntype||""));W(re),await l.nextTick(),c(re)}catch{W([])}}async function U(T=X()){const W=++N.value;f.value=!0,d.value=!1,ee();try{const re=await ri({processDefinitionId:r.processDefinitionId,activityId:r.activity.activityId,processInstanceId:r.processInstanceId,workId:r.workId,variables:T});if(W!==N.value)return[];m.value=re.data||[],k.value=m.value.filter(ie=>ie.flowElementType==="USER_TASK").map(ie=>({...ie,isSingleAssignee:M(q(ie))})),d.value=!0,A.value=!1,i("nextNodesResolved",m.value);const O=k.value[0];if(O){S.value=q(O);try{await C(O)}catch{}}return m.value}catch(re){throw W===N.value&&(d.value=!1),i("error",re),re}finally{W===N.value&&(f.value=!1)}}async function pe(T){S.value=q(T),z.value=[],G.value=[],F.value=!1;try{await C(T)}catch{}}function ae(T){return V.value.some(W=>se(W)===se(T))}function p(T,W){const re=se(T);W?(I(T.activity)&&(V.value=V.value.filter(O=>O.activity!==T.activity)),V.value.some(O=>se(O)===re)||V.value.push({...T})):V.value=V.value.filter(O=>se(O)!==re)}function u(T,W){T.ntype==="user"&&(W&&I(T.activity)&&V.value.filter(O=>O.activity===T.activity).forEach(O=>{var ie;return(ie=x.value)==null?void 0:ie.setChecked(O.id,!1,!1)}),p(T,W))}function c(T){T.forEach(W=>{var re,O;W.ntype==="user"&&ae(W)&&((re=x.value)==null||re.setChecked(W.id,!0,!1)),(O=W.childs)!=null&&O.length&&c(W.childs)})}function g(T){var W;V.value=V.value.filter(re=>se(re)!==se(T)),F.value&&((W=x.value)==null||W.setChecked(T.id,!1,!1))}function b(){const T=V.value.reduce((W,re)=>{let O=W.get(re.activity);return O||(O={activityId:re.activity,assignees:[]},W.set(re.activity,O)),O.assignees.some(ie=>ie.userId===re.id)||O.assignees.push({name:re.id,userId:re.id}),W},new Map);return{workId:r.workId,flowNodeAssignees:Array.from(T.values()),variables:X(),opinion:y.value}}async function D(T){const W=T||b();i("beforeSend",W),s.value=!0;try{const re=await ti(W);return i("afterSend",re,W),re}catch(re){throw i("error",re),re}finally{s.value=!1}}async function Q(){if(f.value){ve.ElMessage.warning("正在计算下一环节,请稍后再发送");return}if(A.value||!d.value){B.value="variables",ve.ElMessage.warning("流程变量已变化,请重新计算下一环节");return}const T=k.value.find(W=>!V.value.some(re=>re.activity===q(W)));if(T){S.value=q(T),B.value="nextNode",ve.ElMessage.warning(`请选择“${T.activityName||T.name||q(T)}”的办理人`),await pe(T);return}try{await D(),E.value=!0,o.value=!1,ve.ElMessage.success("发送成功")}catch{}}async function ue(){a.value=Yn(r.zIndex),o.value=!0,E.value=!1,y.value=r.defaultOpinion,B.value="nextNode",K(),i("open");try{await U(X())}catch{}}function P(){o.value=!1}function j(){i("close"),!(!r.deleteInstanceOnCancel||E.value)&&r.processInstanceId&&zn({processInstanceId:r.processInstanceId}).catch(T=>i("error",T))}function Y(){i("click"),ue()}return l.watch(()=>r.modelValue,T=>{T&&!o.value&&ue(),!T&&o.value&&(o.value=!1)}),l.watch(o,T=>i("update:modelValue",T)),l.onMounted(()=>{r.modelValue&&ue()}),t({visible:o,effectiveZIndex:a,loading:s,nodeLoading:f,nodeResolved:d,nextNodes:m,open:ue,close:P,getNextNode:U,assembleData:b,send:D}),(T,W)=>{const re=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",Du,[e.showTrigger?(l.openBlock(),l.createBlock(l.unref(ve.ElButton),{key:0,type:"primary",loading:s.value,onClick:Y},{default:l.withCtx(()=>[l.renderSlot(T.$slots,"default",{},()=>[W[3]||(W[3]=l.createTextVNode("发送",-1))],!0)]),_:3},8,["loading"])):l.createCommentVNode("",!0),l.createVNode(l.unref(ve.ElDialog),{modelValue:o.value,"onUpdate:modelValue":W[2]||(W[2]=O=>o.value=O),"append-to-body":"",class:"ui-flow-send-dialog","close-on-click-modal":!1,title:e.dialogTitle,width:e.dialogWidth,"z-index":a.value,onClosed:j},{footer:l.withCtx(()=>[l.createElementVNode("div",Wu,[l.createVNode(l.unref(ve.ElButton),{type:"primary",loading:s.value,onClick:Q},{default:l.withCtx(()=>[...W[10]||(W[10]=[l.createTextVNode("确认",-1)])]),_:1},8,["loading"]),l.createVNode(l.unref(ve.ElButton),{disabled:s.value,onClick:P},{default:l.withCtx(()=>[...W[11]||(W[11]=[l.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:l.withCtx(()=>[l.createElementVNode("div",Iu,[l.createElementVNode("div",Ou,[W[4]||(W[4]=l.createTextVNode(" 当前环节:",-1)),l.createElementVNode("strong",null,l.toDisplayString(e.activity.activityName||e.activity.activityId),1)]),l.createElementVNode("aside",Bu,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(k.value,O=>(l.openBlock(),l.createElementBlock("button",{key:q(O),class:l.normalizeClass(["node-group",{active:S.value===q(O)}]),type:"button",onClick:ie=>pe(O)},[W[5]||(W[5]=l.createElementVNode("span",{class:"group-avatar"},"♟",-1)),l.createElementVNode("span",null,l.toDisplayString(O.activityName||O.name||q(O)),1)],10,Mu))),128)),d.value&&!k.value.length?(l.openBlock(),l.createBlock(l.unref(ve.ElEmpty),{key:0,description:"没有下一用户任务","image-size":44})):l.createCommentVNode("",!0)]),l.createElementVNode("section",Lu,[l.createElementVNode("div",Fu,[l.withDirectives((l.openBlock(),l.createElementBlock("div",$u,[F.value?(l.openBlock(),l.createBlock(l.unref(ve.ElTree),{key:0,ref_key:"assigneeTreeRef",ref:x,class:"assignee-tree",data:G.value,load:R,props:H,"check-on-click-node":"","check-strictly":"",lazy:"","node-key":"id","show-checkbox":"",onCheckChange:u},{default:l.withCtx(({data:O})=>[l.createElementVNode("span",Vu,[l.createElementVNode("span",null,l.toDisplayString(O.ntype==="user"?"●":"▣"),1),l.createElementVNode("span",null,l.toDisplayString(O.caption||O.id),1)])]),_:1},8,["data"])):(l.openBlock(),l.createElementBlock("div",ju,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(z.value,O=>(l.openBlock(),l.createBlock(l.unref(ve.ElCheckbox),{key:se(O),"model-value":ae(O),class:"candidate-item",onChange:ie=>p(O,!!ie)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(O.caption||O.name||O.id),1)]),_:2},1032,["model-value","onChange"]))),128)),!h.value&&!z.value.length?(l.openBlock(),l.createBlock(l.unref(ve.ElEmpty),{key:0,description:"暂无可选办理人","image-size":44})):l.createCommentVNode("",!0)]))])),[[re,h.value]]),W[7]||(W[7]=l.createElementVNode("div",{class:"transfer-arrows","aria-hidden":"true"},[l.createElementVNode("span",null,"→"),l.createElementVNode("span",null,"←")],-1)),l.createElementVNode("div",Uu,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(V.value,O=>(l.openBlock(),l.createElementBlock("div",{key:se(O),class:"selected-user"},[l.createElementVNode("span",null,l.toDisplayString(O.caption||O.name||O.id),1),l.createVNode(l.unref(ve.ElButton),{link:"",type:"danger",onClick:ie=>g(O)},{default:l.withCtx(()=>[...W[6]||(W[6]=[l.createTextVNode("移除",-1)])]),_:1},8,["onClick"])]))),128)),V.value.length?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(l.unref(ve.ElEmpty),{key:0,description:"暂未选择办理人","image-size":44}))])]),l.createVNode(l.unref(ve.ElTabs),{modelValue:B.value,"onUpdate:modelValue":W[0]||(W[0]=O=>B.value=O),type:"card",class:"send-tabs"},{default:l.withCtx(()=>[l.createVNode(l.unref(ve.ElTabPane),{label:"下一环节",name:"nextNode"},{default:l.withCtx(()=>[f.value?(l.openBlock(),l.createElementBlock("div",zu,"正在根据流程变量计算下一环节...")):(l.openBlock(),l.createBlock(l.unref(ve.ElTable),{key:1,data:V.value,border:"",height:"190"},{empty:l.withCtx(()=>[l.createElementVNode("span",null,l.toDisplayString(k.value.length?"请选择办理人":"暂无数据"),1)]),default:l.withCtx(()=>[l.createVNode(l.unref(ve.ElTableColumn),{prop:"activityName",label:"办理环节","min-width":"150"}),l.createVNode(l.unref(ve.ElTableColumn),{prop:"caption",label:"办理人","min-width":"130"},{default:l.withCtx(O=>{var ie,ye,et;return[l.createTextVNode(l.toDisplayString(((ie=O==null?void 0:O.row)==null?void 0:ie.caption)||((ye=O==null?void 0:O.row)==null?void 0:ye.name)||((et=O==null?void 0:O.row)==null?void 0:et.id)||""),1)]}),_:1}),l.createVNode(l.unref(ve.ElTableColumn),{label:"办理方式",width:"120"},{default:l.withCtx(O=>[l.createTextVNode(l.toDisplayString(O!=null&&O.row?I(O.row.activity)?"单人单办":"多人办理":""),1)]),_:1}),l.createVNode(l.unref(ve.ElTableColumn),{label:"操作",width:"90",align:"center"},{default:l.withCtx(O=>[O!=null&&O.row?(l.openBlock(),l.createBlock(l.unref(ve.ElButton),{key:0,link:"",type:"danger",onClick:ie=>g(O.row)},{default:l.withCtx(()=>[...W[8]||(W[8]=[l.createTextVNode("删除",-1)])]),_:1},8,["onClick"])):l.createCommentVNode("",!0)]),_:1})]),_:1},8,["data"]))]),_:1})]),_:1},8,["modelValue"])]),l.createElementVNode("aside",Hu,[W[9]||(W[9]=l.createElementVNode("label",null,"填写意见:",-1)),l.createVNode(l.unref(ve.ElInput),{modelValue:y.value,"onUpdate:modelValue":W[1]||(W[1]=O=>y.value=O),maxlength:"500",placeholder:"请输入意见",resize:"none","show-word-limit":"",type:"textarea"},null,8,["modelValue"])])])]),_:1},8,["modelValue","title","width","z-index"])])}}}),[["__scopeId","data-v-c7d02702"]]),qu={class:"button-group-wrapper"},Yu={key:0,class:"button-state"},Ku={key:0,class:"line"},Gu={key:2,class:"button-group-append"},Xu={class:"sign-selector"},Ju={class:"selected-sign-user"},Zu={class:"sign-dialog-footer"},Qu=wt(l.defineComponent({name:"UiFlowButtons",__name:"FlowButtons",props:{processInstanceId:{default:""},processDefinitionId:{default:""},activityId:{default:""},activityName:{default:""},workId:{default:""},taskId:{default:""},dealUserId:{default:""},dealUserName:{default:""},variables:{default:()=>({})},assignmentQueryParams:{default:()=>({})},autoResolveWork:{type:Boolean,default:!0},autoHandleDialogs:{type:Boolean,default:!0},forceSingleAssignee:{type:Boolean,default:!1},dialogZIndex:{},beforeAction:{},afterAction:{}},emits:["executeAction","afterAction","workResolved","error"],setup(e,{expose:t,emit:n}){let r=0;const i=e,o=n,a=l.ref([]),s=l.ref(!1),f=l.ref(),d=l.ref(!1),h=l.ref(!1),m=l.ref(),k=l.ref(),z=l.ref(!1),G=l.ref("turnBefore"),V=l.ref(!1),F=l.ref(!1),S=l.ref([]),B=l.ref(),y=l.computed(()=>G.value==="turnBefore"?"前加签":"后加签"),v={children:"children",label:"caption",disabled:"disabled",isLeaf:"isLeaf"};function A(P,...j){for(const Y of j){const T=P==null?void 0:P[Y];if(T!=null&&String(T))return String(T)}return""}function N(P){if(Array.isArray(P))return P;if(!P||typeof P!="object")return[];const j=P;for(const Y of["records","list","content","rows"])if(Array.isArray(j[Y]))return j[Y];return[]}function x(P){const j=A(P,"name","operateName","code","value");if(!j)return;const Y=A(P,"label","operateLabel","caption","title")||j;return{...P,name:j,label:Y}}const E=l.computed(()=>i.workId||A(f.value,"workId","id")),H=l.computed(()=>i.processInstanceId||A(f.value,"processInstanceId")),L=l.computed(()=>i.processDefinitionId||A(f.value,"processDefinitionId")),_=l.computed(()=>i.taskId||A(f.value,"taskId","taskInstanceId")),q=l.computed(()=>i.activityId||A(f.value,"activityId")),se=l.computed(()=>i.activityName||A(f.value,"activityName")),Z=l.computed(()=>({id:i.dealUserId,userId:i.dealUserId,name:i.dealUserName||i.dealUserId}));function K(P="",j=""){return{action:P,actionLabel:j,workId:E.value,processInstanceId:H.value||void 0,processDefinitionId:L.value||void 0,taskId:_.value||void 0,activityId:q.value||void 0,activityName:se.value||void 0,workData:f.value}}const X=l.computed(()=>{const P=m.value;if(!((P==null?void 0:P.action)!=="taskSend"||!P.workId||!P.processDefinitionId||!P.activityId))return{workId:P.workId,processDefinitionId:P.processDefinitionId,processInstanceId:P.processInstanceId||"",activity:{activityId:P.activityId,activityName:P.activityName}}}),ee=l.computed(()=>{const P=m.value;if(!(!["jump","taskJump"].includes((P==null?void 0:P.action)||"")||!(P!=null&&P.workId)||!P.processDefinitionId))return{workId:P.workId,processDefinitionId:P.processDefinitionId,processInstanceId:P.processInstanceId||""}});async function J(){if(i.workId)return f.value=void 0,K();if(!i.autoResolveWork)return K();if(!i.processInstanceId||!i.dealUserId)throw new Error("FlowButtons 缺少 workId;自动解析待办时必须传入 processInstanceId 和 dealUserId");const P=await Hn({currentPage:1,pageSize:100,assignee:i.dealUserId,assigne:i.dealUserId,userId:i.dealUserId,processInstanceId:i.processInstanceId}),Y=N(P.data).find(W=>A(W,"processInstanceId")===i.processInstanceId);if(!Y)throw new Error("当前用户在该流程实例中没有可办理的待办任务");f.value=Y;const T=K();return o("workResolved",T),T}function M(P){return P.map(j=>{const Y=j||{},T=String(Y.id||Y.userId||""),W=String(Y.ntype||""),re=Array.isArray(Y.childs)?Y.childs:Array.isArray(Y.children)?Y.children:void 0;return{...Y,id:T,caption:String(Y.caption||Y.name||T),ntype:W,hasChild:!!(Y.hasChild||re!=null&&re.length),isLeaf:W==="user"||!Y.hasChild&&!(re!=null&&re.length),disabled:W!=="user",children:re?M(re):void 0}}).filter(j=>j.id)}async function I(P=""){const j=await ni(P);return M(Array.isArray(j.data)?j.data:[])}async function $(P,j){const Y=P.level===0?"":String(P.data.id||"");if(P.level>0&&(P.data.ntype==="user"||P.data.hasChild===!1)){j([]);return}V.value=!0;try{const T=await I(Y);P.level===0&&(S.value=T),j(T)}catch(T){o("error",T),j([])}finally{V.value=!1}}function C(P){P.ntype==="user"&&(B.value=P)}function R(){B.value=void 0,S.value=[]}function U(P){if(!_.value){ve.ElMessage.error("当前待办缺少任务实例 ID,无法加签");return}G.value=P,k.value=Yn(i.dialogZIndex),z.value=!0}async function pe(){var j;if(!((j=B.value)!=null&&j.id)){ve.ElMessage.warning("请选择一名机构人员");return}const P=G.value;F.value=!0;try{const T=await(P==="turnBefore"?Gr:Xr)({workId:E.value,taskId:_.value,assignee:B.value.id});z.value=!1,p(P,T,K(P,y.value))}catch(Y){o("error",Y)}finally{F.value=!1}}async function ae(){s.value=!0,a.value=[];try{if(await J(),!E.value)return a.value;const P=await zr({workId:E.value});return a.value=(Array.isArray(P.data)?P.data:[]).map(j=>x(j||{})).filter(j=>!!j),a.value}finally{s.value=!1}}function p(P,j,Y){var T;(T=i.afterAction)==null||T.call(i,P,j,Y),o("afterAction",P,j,Y)}function u(P,j){o("executeAction",P,j)}function c(P){return{processActivate:"restore",processTerminate:"terminate",processSuspend:"hang",processSupspend:"hang"}[P]||P}async function g(P,j,Y){var ye;const T=Yn(i.dialogZIndex),W=`ui-flow-confirm-overlay-${++r}`,re=ve.ElMessageBox.confirm(`是否${j}此任务?`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",modalClass:W});await l.nextTick(),(ye=document.querySelector(`.${W}`))==null||ye.style.setProperty("z-index",String(T),"important"),await re;const O={workId:Y.workId};let ie;switch(c(P)){case"revocation":case"taskWithdraw":ie=await Wr(O);break;case"taskRecyle":ie=await Yr(O);break;case"hang":ie=await Jr({processInstanceIds:[Y.processInstanceId||""]});break;case"restore":ie=await Zr(O);break;case"terminate":ie=await Qr(O);break;case"taskComplete":ie=await Kr({...O,variables:i.variables});break;case"taskRollback":ie=await qr(O);break;case"taskClaim":if(!i.dealUserId){u(P,Y);return}ie=await Hr({...O,assignee:i.dealUserId});break;default:u(P,Y);return}p(P,ie,Y),c(P)==="taskClaim"&&await ae()}async function b(P){var j;try{const Y=P.name;E.value||await ae();const T=K(Y,P.label);if(!T.workId)throw new Error("当前待办缺少 workId,无法执行流程操作");if(await((j=i.beforeAction)==null?void 0:j.call(i,Y,T))===!1)return;if(["turnBefore","taskTurnBefore"].includes(Y)){U("turnBefore");return}if(["turnAfter","taskTurnAfter"].includes(Y)){U("turnAfter");return}if(Y==="taskSend"&&i.autoHandleDialogs){if(!T.processDefinitionId||!T.activityId)throw new Error("当前待办缺少 processDefinitionId 或 activityId,无法发送");m.value=T,d.value=!0;return}if(["jump","taskJump"].includes(Y)&&i.autoHandleDialogs){if(!T.processDefinitionId)throw new Error("当前待办缺少 processDefinitionId,无法跳转");m.value=T,h.value=!0;return}if(["save","start","taskSend","jump","taskJump"].includes(Y)){u(Y,T);return}await g(Y,P.label,T)}catch(Y){Y!=="cancel"&&Y!=="close"&&o("error",Y)}}function D(P,j){const Y={...m.value||K("taskSend","发送"),requestData:j};p("taskSend",P,Y),m.value=void 0}function Q(P,j){const Y={...m.value||K("taskJump","跳转"),requestData:j};p(Y.action,P,Y),m.value=void 0}function ue(P){o("error",P)}return l.watch(()=>[i.workId,i.processInstanceId,i.dealUserId],()=>{d.value=!1,h.value=!1,m.value=void 0,ae().catch(P=>o("error",P))},{immediate:!0}),t({loading:s,optList:a,resolvedWorkData:f,getAvailableActions:ae,resolveCurrentWork:J,executeAction:b}),(P,j)=>{const Y=l.resolveComponent("el-tree"),T=l.resolveComponent("el-button"),W=l.resolveComponent("el-dialog"),re=l.resolveDirective("loading");return l.openBlock(),l.createElementBlock("div",qu,[s.value?(l.openBlock(),l.createElementBlock("span",Yu,"正在加载流程操作...")):(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(a.value,(O,ie)=>(l.openBlock(),l.createElementBlock("div",{key:O.name||ie,class:"flex-start-r"},[l.renderSlot(P.$slots,"prefix",{action:O},void 0,!0),l.renderSlot(P.$slots,"default",{action:O},void 0,!0),l.createVNode(Ji,{type:O.name,label:O.label,onClick:ye=>b(O)},null,8,["type","label","onClick"]),ie!==a.value.length-1?(l.openBlock(),l.createElementBlock("div",Ku)):l.createCommentVNode("",!0),l.renderSlot(P.$slots,"suffix",{action:O},void 0,!0)]))),128)),P.$slots.append?(l.openBlock(),l.createElementBlock("div",Gu,[l.renderSlot(P.$slots,"append",{actions:a.value,loading:s.value},void 0,!0)])):l.createCommentVNode("",!0),l.createVNode(W,{modelValue:z.value,"onUpdate:modelValue":j[1]||(j[1]=O=>z.value=O),"append-to-body":"",class:"ui-flow-sign-dialog","close-on-click-modal":!1,title:y.value,width:"760px","z-index":k.value,onClosed:R},{footer:l.withCtx(()=>[l.createElementVNode("div",Zu,[l.createVNode(T,{type:"primary",loading:F.value,onClick:pe},{default:l.withCtx(()=>[...j[6]||(j[6]=[l.createTextVNode("确认",-1)])]),_:1},8,["loading"]),l.createVNode(T,{disabled:F.value,onClick:j[0]||(j[0]=O=>z.value=!1)},{default:l.withCtx(()=>[...j[7]||(j[7]=[l.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:l.withCtx(()=>{var O,ie;return[l.withDirectives((l.openBlock(),l.createElementBlock("div",Xu,[j[5]||(j[5]=l.createElementVNode("p",{class:"sign-tip"},"仅可选择一名机构人员",-1)),l.createVNode(Y,{data:S.value,load:$,props:v,"highlight-current":"",lazy:"","node-key":"id",onNodeClick:C},null,8,["data"]),l.createElementVNode("div",Ju,[j[4]||(j[4]=l.createTextVNode(" 已选择:",-1)),l.createElementVNode("strong",null,l.toDisplayString(((O=B.value)==null?void 0:O.caption)||((ie=B.value)==null?void 0:ie.name)||"暂无"),1)])])),[[re,V.value]])]}),_:1},8,["modelValue","title","z-index"]),X.value?(l.openBlock(),l.createBlock(ai,{key:3,modelValue:d.value,"onUpdate:modelValue":j[2]||(j[2]=O=>d.value=O),activity:X.value.activity,"assignment-query-params":e.assignmentQueryParams,"deal-user":Z.value,"force-single-assignee":e.forceSingleAssignee,"process-definition-id":X.value.processDefinitionId,"process-instance-id":X.value.processInstanceId,"show-trigger":!1,variables:e.variables,"work-id":X.value.workId,"z-index":e.dialogZIndex,onAfterSend:D,onError:ue},null,8,["modelValue","activity","assignment-query-params","deal-user","force-single-assignee","process-definition-id","process-instance-id","variables","work-id","z-index"])):l.createCommentVNode("",!0),ee.value?(l.openBlock(),l.createBlock(Xo,{key:4,modelValue:h.value,"onUpdate:modelValue":j[3]||(j[3]=O=>h.value=O),"assignment-query-params":e.assignmentQueryParams,"deal-user":Z.value,"process-definition-id":ee.value.processDefinitionId,"process-instance-id":ee.value.processInstanceId,"show-trigger":!1,"work-id":ee.value.workId,"z-index":e.dialogZIndex,onAfterJump:Q,onError:ue},null,8,["modelValue","assignment-query-params","deal-user","process-definition-id","process-instance-id","work-id","z-index"])):l.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-1b840912"]]);function ef(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kn={exports:{}},tf=Kn.exports,Jo;function nf(){return Jo||(Jo=1,(function(e,t){(function(n,r){e.exports=r()})(tf,(function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",f="hour",d="day",h="week",m="month",k="quarter",z="year",G="date",V="Invalid Date",F=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,B={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Z){var K=["th","st","nd","rd"],X=Z%100;return"["+Z+(K[(X-20)%10]||K[X]||K[0])+"]"}},y=function(Z,K,X){var ee=String(Z);return!ee||ee.length>=K?Z:""+Array(K+1-ee.length).join(X)+Z},v={s:y,z:function(Z){var K=-Z.utcOffset(),X=Math.abs(K),ee=Math.floor(X/60),J=X%60;return(K<=0?"+":"-")+y(ee,2,"0")+":"+y(J,2,"0")},m:function Z(K,X){if(K.date()<X.date())return-Z(X,K);var ee=12*(X.year()-K.year())+(X.month()-K.month()),J=K.clone().add(ee,m),M=X-J<0,I=K.clone().add(ee+(M?-1:1),m);return+(-(ee+(X-J)/(M?J-I:I-J))||0)},a:function(Z){return Z<0?Math.ceil(Z)||0:Math.floor(Z)},p:function(Z){return{M:m,y:z,w:h,d,D:G,h:f,m:s,s:a,ms:o,Q:k}[Z]||String(Z||"").toLowerCase().replace(/s$/,"")},u:function(Z){return Z===void 0}},A="en",N={};N[A]=B;var x="$isDayjsObject",E=function(Z){return Z instanceof q||!(!Z||!Z[x])},H=function Z(K,X,ee){var J;if(!K)return A;if(typeof K=="string"){var M=K.toLowerCase();N[M]&&(J=M),X&&(N[M]=X,J=M);var I=K.split("-");if(!J&&I.length>1)return Z(I[0])}else{var $=K.name;N[$]=K,J=$}return!ee&&J&&(A=J),J||!ee&&A},L=function(Z,K){if(E(Z))return Z.clone();var X=typeof K=="object"?K:{};return X.date=Z,X.args=arguments,new q(X)},_=v;_.l=H,_.i=E,_.w=function(Z,K){return L(Z,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var q=(function(){function Z(X){this.$L=H(X.locale,null,!0),this.parse(X),this.$x=this.$x||X.x||{},this[x]=!0}var K=Z.prototype;return K.parse=function(X){this.$d=(function(ee){var J=ee.date,M=ee.utc;if(J===null)return new Date(NaN);if(_.u(J))return new Date;if(J instanceof Date)return new Date(J);if(typeof J=="string"&&!/Z$/i.test(J)){var I=J.match(F);if(I){var $=I[2]-1||0,C=(I[7]||"0").substring(0,3);return M?new Date(Date.UTC(I[1],$,I[3]||1,I[4]||0,I[5]||0,I[6]||0,C)):new Date(I[1],$,I[3]||1,I[4]||0,I[5]||0,I[6]||0,C)}}return new Date(J)})(X),this.init()},K.init=function(){var X=this.$d;this.$y=X.getFullYear(),this.$M=X.getMonth(),this.$D=X.getDate(),this.$W=X.getDay(),this.$H=X.getHours(),this.$m=X.getMinutes(),this.$s=X.getSeconds(),this.$ms=X.getMilliseconds()},K.$utils=function(){return _},K.isValid=function(){return this.$d.toString()!==V},K.isSame=function(X,ee){var J=L(X);return this.startOf(ee)<=J&&J<=this.endOf(ee)},K.isAfter=function(X,ee){return L(X)<this.startOf(ee)},K.isBefore=function(X,ee){return this.endOf(ee)<L(X)},K.$g=function(X,ee,J){return _.u(X)?this[ee]:this.set(J,X)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(X,ee){var J=this,M=!!_.u(ee)||ee,I=_.p(X),$=function(c,g){var b=_.w(J.$u?Date.UTC(J.$y,g,c):new Date(J.$y,g,c),J);return M?b:b.endOf(d)},C=function(c,g){return _.w(J.toDate()[c].apply(J.toDate("s"),(M?[0,0,0,0]:[23,59,59,999]).slice(g)),J)},R=this.$W,U=this.$M,pe=this.$D,ae="set"+(this.$u?"UTC":"");switch(I){case z:return M?$(1,0):$(31,11);case m:return M?$(1,U):$(0,U+1);case h:var p=this.$locale().weekStart||0,u=(R<p?R+7:R)-p;return $(M?pe-u:pe+(6-u),U);case d:case G:return C(ae+"Hours",0);case f:return C(ae+"Minutes",1);case s:return C(ae+"Seconds",2);case a:return C(ae+"Milliseconds",3);default:return this.clone()}},K.endOf=function(X){return this.startOf(X,!1)},K.$set=function(X,ee){var J,M=_.p(X),I="set"+(this.$u?"UTC":""),$=(J={},J[d]=I+"Date",J[G]=I+"Date",J[m]=I+"Month",J[z]=I+"FullYear",J[f]=I+"Hours",J[s]=I+"Minutes",J[a]=I+"Seconds",J[o]=I+"Milliseconds",J)[M],C=M===d?this.$D+(ee-this.$W):ee;if(M===m||M===z){var R=this.clone().set(G,1);R.$d[$](C),R.init(),this.$d=R.set(G,Math.min(this.$D,R.daysInMonth())).$d}else $&&this.$d[$](C);return this.init(),this},K.set=function(X,ee){return this.clone().$set(X,ee)},K.get=function(X){return this[_.p(X)]()},K.add=function(X,ee){var J,M=this;X=Number(X);var I=_.p(ee),$=function(U){var pe=L(M);return _.w(pe.date(pe.date()+Math.round(U*X)),M)};if(I===m)return this.set(m,this.$M+X);if(I===z)return this.set(z,this.$y+X);if(I===d)return $(1);if(I===h)return $(7);var C=(J={},J[s]=r,J[f]=i,J[a]=n,J)[I]||1,R=this.$d.getTime()+X*C;return _.w(R,this)},K.subtract=function(X,ee){return this.add(-1*X,ee)},K.format=function(X){var ee=this,J=this.$locale();if(!this.isValid())return J.invalidDate||V;var M=X||"YYYY-MM-DDTHH:mm:ssZ",I=_.z(this),$=this.$H,C=this.$m,R=this.$M,U=J.weekdays,pe=J.months,ae=J.meridiem,p=function(g,b,D,Q){return g&&(g[b]||g(ee,M))||D[b].slice(0,Q)},u=function(g){return _.s($%12||12,g,"0")},c=ae||function(g,b,D){var Q=g<12?"AM":"PM";return D?Q.toLowerCase():Q};return M.replace(S,(function(g,b){return b||(function(D){switch(D){case"YY":return String(ee.$y).slice(-2);case"YYYY":return _.s(ee.$y,4,"0");case"M":return R+1;case"MM":return _.s(R+1,2,"0");case"MMM":return p(J.monthsShort,R,pe,3);case"MMMM":return p(pe,R);case"D":return ee.$D;case"DD":return _.s(ee.$D,2,"0");case"d":return String(ee.$W);case"dd":return p(J.weekdaysMin,ee.$W,U,2);case"ddd":return p(J.weekdaysShort,ee.$W,U,3);case"dddd":return U[ee.$W];case"H":return String($);case"HH":return _.s($,2,"0");case"h":return u(1);case"hh":return u(2);case"a":return c($,C,!0);case"A":return c($,C,!1);case"m":return String(C);case"mm":return _.s(C,2,"0");case"s":return String(ee.$s);case"ss":return _.s(ee.$s,2,"0");case"SSS":return _.s(ee.$ms,3,"0");case"Z":return I}return null})(g)||I.replace(":","")}))},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(X,ee,J){var M,I=this,$=_.p(ee),C=L(X),R=(C.utcOffset()-this.utcOffset())*r,U=this-C,pe=function(){return _.m(I,C)};switch($){case z:M=pe()/12;break;case m:M=pe();break;case k:M=pe()/3;break;case h:M=(U-R)/6048e5;break;case d:M=(U-R)/864e5;break;case f:M=U/i;break;case s:M=U/r;break;case a:M=U/n;break;default:M=U}return J?M:_.a(M)},K.daysInMonth=function(){return this.endOf(m).$D},K.$locale=function(){return N[this.$L]},K.locale=function(X,ee){if(!X)return this.$L;var J=this.clone(),M=H(X,ee,!0);return M&&(J.$L=M),J},K.clone=function(){return _.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},Z})(),se=q.prototype;return L.prototype=se,[["$ms",o],["$s",a],["$m",s],["$H",f],["$W",d],["$M",m],["$y",z],["$D",G]].forEach((function(Z){se[Z[1]]=function(K){return this.$g(K,Z[0],Z[1])}})),L.extend=function(Z,K){return Z.$i||(Z(K,q,L),Z.$i=!0),L},L.locale=H,L.isDayjs=E,L.unix=function(Z){return L(1e3*Z)},L.en=N[A],L.Ls=N,L.p={},L}))})(Kn)),Kn.exports}var rf=nf();const Gn=ef(rf),of={class:"colBtns"},af={key:0,class:"table-pagination"},sf={class:"left-pagination"},lf={class:"right-pagination"},Zo=wt(l.defineComponent({name:"UiFlowBaseGrid",inheritAttrs:!1,__name:"FlowGrid",props:{data:{default:()=>[]},tableLabel:{default:()=>[]},pageConfig:{default:()=>({currentPage:1,total:0,pageSize:20})},hidePage:{type:Boolean,default:!1},hideSelection:{type:Boolean,default:!1},hideNumber:{type:Boolean,default:!0},operation:{type:Boolean,default:!1},tableHeight:{default:"calc(100% - 45px)"},isFixed:{type:Boolean,default:!1},btnWidth:{default:0},size:{default:"default"}},emits:["page-change","size-change","row-click","row-dblclick"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.useSlots(),a=l.ref(),s=l.ref(),f=l.ref("100%"),d=l.ref(0),h=l.computed(()=>r.tableLabel.filter(x=>{var E;return!((E=x.hiddenCondition)!=null&&E.call(x,x))})),m=l.computed(()=>r.size==="medium"?"default":r.size);function k(x){return x<9?`0${x+1}`:x+1}function z(){var x;(x=s.value)==null||x.clearSelection()}function G(x,E){var H;(H=s.value)==null||H.toggleRowSelection(x,E)}function V(){var x;(x=s.value)==null||x.toggleAllSelection()}function F(x){var E;(E=s.value)==null||E.setCurrentRow(x)}function S(x){i("page-change",x)}function B(x){i("size-change",x)}function y(){f.value=r.hidePage?"100%":"calc(100% - 45px)"}async function v(){var H;if(!r.operation||r.btnWidth)return;await l.nextTick();const x=((H=a.value)==null?void 0:H.querySelectorAll(".colBtns"))||[];let E=o.operation?120:0;x.forEach(L=>{E=Math.max(E,L.scrollWidth+40)}),d.value=E}function A(x,E,H){var L;r.hideSelection||(L=s.value)==null||L.toggleRowSelection(x),i("row-click",x,E,H)}function N(x,E,H){i("row-dblclick",x,E,H)}return l.watch(()=>[r.hidePage,r.data.length],()=>{y(),v()}),l.onMounted(()=>{window.addEventListener("resize",y),y(),v()}),l.onBeforeUnmount(()=>window.removeEventListener("resize",y)),t({tableRef:s,clearSelection:z,toggleRowSelection:G,toggleAllSelection:V,setCurrentRow:F,computeHeight:y}),(x,E)=>{const H=l.resolveComponent("el-table-column"),L=l.resolveComponent("el-table"),_=l.resolveComponent("el-pagination");return l.openBlock(),l.createElementBlock("div",{ref_key:"rootRef",ref:a,class:l.normalizeClass({"no-fixed":!e.isFixed}),style:l.normalizeStyle({height:e.tableHeight||"100%"})},[l.createVNode(L,l.mergeProps({ref_key:"tableRef",ref:s},x.$attrs,{"cell-style":{height:"50px"},data:e.data,"header-cell-style":{background:"#fafafa",color:"#45484B",height:"50px"},height:f.value,size:m.value,border:"","cell-class-name":"c-table-cell","current-row-key":"id","header-row-class-name":"c-table-header",onRowClick:A,onRowDblclick:N}),{default:l.withCtx(()=>[e.hideSelection?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(H,{key:0,align:"center",type:"selection",width:"60"})),e.hideNumber?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(H,{key:1,index:k,align:"center",label:"序号",type:"index",width:"60"})),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(h.value,q=>(l.openBlock(),l.createBlock(H,{key:q.prop,formatter:q.formatter,label:q.label,"min-width":q.minWidth,prop:q.prop,"show-overflow-tooltip":q.showTooltip,sortable:q.sortable,width:q.width,align:"center"},null,8,["formatter","label","min-width","prop","show-overflow-tooltip","sortable","width"]))),128)),l.renderSlot(x.$slots,"default",{},void 0,!0),e.operation?(l.openBlock(),l.createBlock(H,{key:2,fixed:e.isFixed?"right":!1,width:e.btnWidth||d.value||void 0,align:"center",label:"操作"},{default:l.withCtx(q=>[l.createElementVNode("div",of,[l.renderSlot(x.$slots,"operation",{row:q.row},void 0,!0)])]),_:3},8,["fixed","width"])):l.createCommentVNode("",!0)]),_:3},16,["data","height","size"]),e.hidePage?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",af,[l.createElementVNode("div",sf,[l.renderSlot(x.$slots,"pagination-left",{},void 0,!0)]),l.createElementVNode("div",lf,[l.createVNode(_,{"current-page":e.pageConfig.currentPage,"page-size":e.pageConfig.pageSize,"page-sizes":[10,20,30,40],total:e.pageConfig.total,background:"",layout:"total, sizes, prev, pager, next, jumper",onCurrentChange:S,onSizeChange:B},null,8,["current-page","page-size","total"])])]))],6)}}}),[["__scopeId","data-v-557ddd2c"]]),cf={executing:"审批中",completed:"已完成",deleted:"已删除",canceled:"已取消",withdrawed:"已撤回",recyled:"已回收",rollbacked:"已退回",jumped:"已跳转"},uf=[{label:"业务标题",prop:"businessName",minWidth:"180px"},{label:"当前环节",prop:"activityName",minWidth:"180px"},{label:"发送人",prop:"assigneesNames",minWidth:"150px"},{label:"发送时间",prop:"startTime",width:"180px",formatter:e=>e.startTime?Gn(e.startTime).format("YYYY-MM-DD HH:mm:ss"):""}],ff=[{label:"业务标题",prop:"title",minWidth:"180px"},{label:"当前环节",prop:"currentActivity",minWidth:"180px",formatter:e=>e.currentActivity||"无"},{label:"创建人",prop:"createUserName",minWidth:"150px"},{label:"创建时间",prop:"createdTime",width:"180px"}];function df(e){return{...e,workId:e.workId||e.id,processDefinitionId:e.processDefinitionId,processInstanceId:e.processInstanceId,activityId:e.activityId,activityName:e.activityName}}const pf=l.defineComponent({name:"UiFlowGrid",__name:"FlowList",props:{type:{},dealUserId:{default:""},appId:{default:""},appModuleId:{default:""}},emits:["onHandle","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(),a=l.ref([]),s=l.ref(!1),f=l.reactive({currentPage:1,pageSize:20,total:0}),d=l.computed(()=>r.type==="draft"?ff:uf);function h(y){return cf[y]||y||""}function m(y,v){i("onHandle",{action:y,workData:df(v)})}function k(y){i("onHandle",{action:"view",workData:{...y,processDefinitionId:y.processDefinitionId,workId:y.id,workName:y.title}})}function z(y){return`${y}_${Gn().format("YYYYMMDDHHmmss")}`}function G(y){const v=z(y.name);i("onHandle",{action:"create",workData:{processDefinitionId:y.processDefinitionId,flowName:y.name,title:v,workName:v}})}function V(y){r.type==="todo"&&m("view",y),r.type==="done"&&m("handle",y)}function F(y){f.currentPage=y,B()}function S(y){f.pageSize=y,f.currentPage=1,B()}async function B(){s.value=!0;try{if(r.type==="todo"||r.type==="done"){const v=await(r.type==="todo"?Hn:Ur)({currentPage:f.currentPage,pageSize:f.pageSize,assignee:r.dealUserId});a.value=v.data||[],f.total=Number(v.count||0)}else{const v=(await Vr(f,{appId:r.appId,appModuleId:r.appModuleId,createUserId:r.dealUserId})).data||{};a.value=v.records||[],f.total=Number(v.total||0)}}catch(y){throw i("error",y),y}finally{s.value=!1}}return l.watch(()=>[r.type,r.dealUserId,r.appId,r.appModuleId],()=>{f.currentPage=1,B()}),l.onMounted(B),t({data:a,loading:s,pageConfig:f,gridRef:o,loadTableData:B,onRowDblclick:V,create:G,buildDefaultBusinessTitle:z}),(y,v)=>{const A=l.resolveComponent("el-table-column"),N=l.resolveComponent("el-button");return l.openBlock(),l.createBlock(Zo,{ref_key:"gridRef",ref:o,data:a.value,"hide-number":!1,"hide-selection":!0,"is-fixed":!0,"page-config":f,"table-label":d.value,operation:"","table-height":"100%",onPageChange:F,onRowDblclick:V,onSizeChange:S},{operation:l.withCtx(({row:x})=>[e.type==="todo"?(l.openBlock(),l.createBlock(N,{key:0,link:"",type:"primary",onClick:l.withModifiers(E=>m("view",x),["stop"])},{default:l.withCtx(()=>[...v[0]||(v[0]=[l.createTextVNode(" 办理 ",-1)])]),_:1},8,["onClick"])):e.type==="done"?(l.openBlock(),l.createBlock(N,{key:1,link:"",type:"primary",onClick:l.withModifiers(E=>m("handle",x),["stop"])},{default:l.withCtx(()=>[...v[1]||(v[1]=[l.createTextVNode(" 查看 ",-1)])]),_:1},8,["onClick"])):e.type==="draft"&&x.state==="audit"?(l.openBlock(),l.createBlock(N,{key:2,link:"",type:"primary",onClick:l.withModifiers(E=>k(x),["stop"])},{default:l.withCtx(()=>[...v[2]||(v[2]=[l.createTextVNode(" 查看 ",-1)])]),_:1},8,["onClick"])):l.createCommentVNode("",!0)]),default:l.withCtx(()=>[e.type==="done"||e.type==="draft"?(l.openBlock(),l.createBlock(A,{key:0,align:"center",label:"状态",width:"120"},{default:l.withCtx(({row:x})=>[l.createTextVNode(l.toDisplayString(e.type==="done"?h(x.stateName):x.stateLabel),1)]),_:1})):l.createCommentVNode("",!0)]),_:1},8,["data","page-config","table-label"])}}});function nt(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}const mn=Object.prototype.toString,hf=Object.prototype.hasOwnProperty;function si(e){return e===void 0}function Zt(e){return e!==void 0}function Qo(e){return e==null}function Ge(e){return mn.call(e)==="[object Array]"}function bt(e){return mn.call(e)==="[object Object]"}function Et(e){return mn.call(e)==="[object Number]"}function Lt(e){const t=mn.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"||t==="[object Proxy]"}function rt(e){return mn.call(e)==="[object String]"}function Qt(e,t){return!Qo(e)&&hf.call(e,t)}function Qe(e,t){const n=li(t);let r;return oe(e,function(i,o){if(n(i,o))return r=i,!1}),r}function mf(e,t){const n=li(t);let r=Ge(e)?-1:void 0;return oe(e,function(i,o){if(n(i,o))return r=o,!1}),r}function en(e,t){const n=li(t);let r=[];return oe(e,function(i,o){n(i,o)&&r.push(i)}),r}function oe(e,t){let n,r;if(si(e))return;const i=Ge(e)?vf:gf;for(let o in e)if(Qt(e,o)&&(n=e[o],r=t(n,i(o)),r===!1))return n}function tn(e,t,n){return oe(e,function(r,i){n=t(n,r,i)}),n}function ea(e,t){return!!tn(e,function(n,r,i){return n&&t(r,i)},!0)}function ta(e,t){return!!Qe(e,t)}function yf(e,t){let n=[];return oe(e,function(r,i){n.push(t(r,i))}),n}function na(e){return function(t){return ea(e,function(n,r){return t[r]===n})}}function li(e){return Lt(e)?e:t=>t===e}function gf(e){return e}function vf(e){return Number(e)}function ra(e,t){let n,r,i,o;function a(m){let k=Date.now(),z=m?0:o+t-k;if(z>0)return s(z);e.apply(i,r),f()}function s(m){n=setTimeout(a,m)}function f(){n&&clearTimeout(n),n=o=r=i=void 0}function d(){n&&a(!0),f()}function h(...m){o=Date.now(),r=m,i=this,n||s(t)}return h.flush=d,h.cancel=f,h}function _t(e,t){return e.bind(t)}function le(e,...t){return Object.assign(e,...t)}function wf(e,t,n){let r=e;return oe(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];Zt(a)&&Qo(s)&&(s=r[i]=isNaN(+a)?{}:[]),si(a)?si(n)?delete r[i]:r[i]=n:r=s}),e}function bf(e,t){let n={},r=Object(e);return oe(t,function(i){i in r&&(n[i]=e[i])}),n}function Ef(e,t){let n={},r=Object(e);return oe(r,function(i,o){t.indexOf(o)===-1&&(n[o]=i)}),n}var _f=1e3;function pt(e,t){var n=this;t=t||_f,e.on(["render.shape","render.connection"],t,function(r,i){var o=r.type,a=i.element,s=i.gfx,f=i.attrs;if(n.canRender(a))return o==="render.shape"?n.drawShape(s,a,f):n.drawConnection(s,a,f)}),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)})}pt.prototype.canRender=function(e){},pt.prototype.drawShape=function(e,t){},pt.prototype.drawConnection=function(e,t){},pt.prototype.getShapePath=function(e){},pt.prototype.getConnectionPath=function(e){};function ce(e,t){var n=_e(e);return n&&typeof n.$instanceOf=="function"&&n.$instanceOf(t)}function xf(e,t){return ta(t,function(n){return ce(e,n)})}function _e(e){return e&&e.businessObject||e}function Ft(e){return e&&e.di}function $t(e,t){return ce(e,"bpmn:CallActivity")?!1:ce(e,"bpmn:SubProcess")?(t=t||Ft(e),t&&ce(t,"bpmndi:BPMNPlane")?!0:t&&!!t.isExpanded):ce(e,"bpmn:Participant")?!!_e(e).processRef:!0}function ia(e){if(!(!ce(e,"bpmn:Participant")&&!ce(e,"bpmn:Lane"))){var t=Ft(e).isHorizontal;return t===void 0?!0:t}}function Sf(e){return e&&!!_e(e).triggeredByEvent}function Af(e){return bt(e)&&Qt(e,"waypoints")}function kf(e){return bt(e)&&Qt(e,"labelTarget")}var yn={width:90,height:20},oa=15;function Cf(e){return ce(e,"bpmn:Event")||ce(e,"bpmn:Gateway")||ce(e,"bpmn:DataStoreReference")||ce(e,"bpmn:DataObjectReference")||ce(e,"bpmn:DataInput")||ce(e,"bpmn:DataOutput")||ce(e,"bpmn:SequenceFlow")||ce(e,"bpmn:MessageFlow")||ce(e,"bpmn:Group")}function Rf(e){var t=e.length/2-1,n=e[Math.floor(t)],r=e[Math.ceil(t+.01)],i=Tf(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-=oa:a+=oa,{x:a,y:s}}function Tf(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 Nf(e){return e.waypoints?Rf(e.waypoints):ce(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+yn.height/2}:{x:e.x+e.width/2,y:e.y+e.height+yn.height/2}}function Pf(e,t){var n,r,i,o=e.label;return o&&o.bounds?(i=o.bounds,r={width:Math.max(yn.width,i.width),height:i.height},n={x:i.x+i.width/2,y:i.y+i.height/2}):(n=Nf(t),r=yn),le({x:n.x-r.width/2,y:n.y-r.height/2},r)}function Df(e){if(ce(e,"bpmn:FlowElement")||ce(e,"bpmn:Participant")||ce(e,"bpmn:Lane")||ce(e,"bpmn:SequenceFlow")||ce(e,"bpmn:MessageFlow")||ce(e,"bpmn:DataInput")||ce(e,"bpmn:DataOutput"))return"name";if(ce(e,"bpmn:TextAnnotation"))return"text";if(ce(e,"bpmn:Group"))return"categoryValueRef"}function If(e){var t=e.categoryValueRef;return t&&t.value||""}function Xn(e){var t=e.businessObject,n=Df(t);if(n)return n==="categoryValueRef"?If(t):t[n]||""}function gn(e,t){t=!!t,Ge(e)||(e=[e]);var n,r,i,o;return oe(e,function(a){var s=a;a.waypoints&&!t&&(s=gn(a.waypoints,!0));var f=s.x,d=s.y,h=s.height||0,m=s.width||0;(f<n||n===void 0)&&(n=f),(d<r||r===void 0)&&(r=d),(f+m>i||i===void 0)&&(i=f+m),(d+h>o||o===void 0)&&(o=d+h)}),{x:n,y:r,height:o-r,width:i-n}}function aa(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function sa(e){return!!(e&&e.isFrame)}var la=7;function Of(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch{}return e}function Bf(e,t){return t.appendChild(Of(e,t))}function Pe(e,t){return Bf(t,e),e}var ci=2,ca={"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":ci,"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":ci,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function Mf(e,t){return ca[t]?e.style[t]:e.getAttributeNS(null,t)}function ua(e,t,n){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=ca[r];i?(i===ci&&typeof n=="number"&&(n=String(n)+"px"),e.style[r]=n):e.setAttributeNS(null,t,n)}function Lf(e,t){var n=Object.keys(t),r,i;for(r=0,i;i=n[r];r++)ua(e,i,t[i])}function Se(e,t,n){if(typeof t=="string")if(n!==void 0)ua(e,t,n);else return Mf(e,t);else Lf(e,t);return e}const Ff=Object.prototype.toString;function it(e){return new xt(e)}function xt(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}xt.prototype.add=function(e){return this.list.add(e),this},xt.prototype.remove=function(e){return Ff.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)},xt.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},xt.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},xt.prototype.array=function(){return Array.from(this.list)},xt.prototype.has=xt.prototype.contains=function(e){return this.list.contains(e)};var ui={svg:"http://www.w3.org/2000/svg"},fa='<svg xmlns="'+ui.svg+'"';function $f(e){var t=!1;e.substring(0,4)==="<svg"?e.indexOf(ui.svg)===-1&&(e=fa+e.substring(4)):(e=fa+">"+e+"</svg>",t=!0);var n=Vf(e);if(!t)return n;for(var r=document.createDocumentFragment(),i=n.firstChild;i.firstChild;)r.appendChild(i.firstChild);return r}function Vf(e){var t;return t=new DOMParser,t.async=!1,t.parseFromString(e,"text/xml")}function xe(e,t){var n;return e=e.trim(),e.charAt(0)==="<"?(n=$f(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(ui.svg,e),t&&Se(n,t),n}var fi=null;function da(){return fi===null&&(fi=xe("svg")),fi}function pa(e,t){var n,r,i=Object.keys(t);for(n=0;r=i[n];n++)e[r]=t[r];return e}function jf(e,t,n,r,i,o){var a=da().createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return pa(a,e);case 6:return pa(a,{a:e,b:t,c:n,d:r,e:i,f:o})}}function vn(e){return da().createSVGTransform()}var ha=/([&<>]{1})/g,Uf=/([&<>\n\r"]{1})/g,zf={"&":"&","<":"<",">":">",'"':"'"};function di(e,t){function n(r,i){return zf[i]||i}return e.replace(t,n)}function ma(e,t){var n,r,i,o,a;switch(e.nodeType){case 3:t.push(di(e.textContent,ha));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,'="',di(o.value,Uf),'"');if(e.hasChildNodes()){for(t.push(">"),a=e.childNodes,n=0,r=a.length;n<r;++n)ma(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("<!--",di(e.nodeValue,ha),"-->");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function Hf(e){for(var t=e.firstChild,n=[];t;)ma(t,n),t=t.nextSibling;return n.join("")}function ya(e,t){return Hf(e)}function Jn(e){var t=e.parentNode;return t&&t.removeChild(e),e}function Wf(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function qf(e,t){var n,r;for(e.clear(),n=0;r=t[n];n++)e.appendItem(Wf(e,r))}function wn(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),qf(n,t)),n.consolidate()}function Vt(e){return e.flat().join(",").replace(/,?([A-Za-z]),?/g,"$1")}function Yf(e){return["M",e.x,e.y]}function pi(e){return["L",e.x,e.y]}function Kf(e,t,n){return["C",e.x,e.y,t.x,t.y,n.x,n.y]}function Gf(e,t){const n=e.length,r=[Yf(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(pi(a));continue}const f=Math.min(t,hi(a.x-o.x,a.y-o.y),hi(s.x-a.x,s.y-a.y));if(!f){r.push(pi(a));continue}const d=Zn(a,o,f),h=Zn(a,o,f*.5),m=Zn(a,s,f),k=Zn(a,s,f*.5);r.push(pi(d)),r.push(Kf(h,k,m))}return r}function Zn(e,t,n){const r=t.x-e.x,i=t.y-e.y,o=hi(r,i),a=n/o;return{x:e.x+r*a,y:e.y+i*a}}function hi(e,t){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2))}function mi(e,t,n){Et(t)&&(n=t,t=null),t||(t={});const r=xe("path",t);return Et(n)&&(r.dataset.cornerRadius=String(n)),ga(r,e)}function ga(e,t){const n=parseInt(e.dataset.cornerRadius,10)||0;return Se(e,{d:Vt(Gf(t,n))}),e}var yi="hsl(225, 10%, 15%)",Xf="white";function ot(e,t){return ta(e.eventDefinitions,function(n){return n.$type===t})}function Jf(e){return e.$type==="bpmn:IntermediateThrowEvent"||e.$type==="bpmn:EndEvent"}function Zf(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection}function he(e,t,n){var r=Ft(e);return n||r.get("color:background-color")||r.get("bioc:fill")||t||Xf}function te(e,t,n){var r=Ft(e);return n||r.get("color:border-color")||r.get("bioc:stroke")||t||yi}function bn(e,t,n,r){var i=Ft(e),o=i.get("label");return r||o&&o.get("color:color")||t||te(e,n)}function Qf(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 Vt(i)}function va(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 Vt(a)}function ed(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 Vt(s)}function td(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 Vt(o)}function En(e,t={}){return{width:Xe(e,t),height:je(e,t)}}function Xe(e,t={}){return Qt(t,"width")?t.width:e.width}function je(e,t={}){return Qt(t,"height")?t.height:e.height}const Ce={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:[0,"",""]};Ce.td=Ce.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],Ce.option=Ce.optgroup=[1,'<select multiple="multiple">',"</select>"],Ce.thead=Ce.tbody=Ce.colgroup=Ce.caption=Ce.tfoot=[1,"<table>","</table>"],Ce.polyline=Ce.ellipse=Ce.polygon=Ce.circle=Ce.text=Ce.line=Ce.path=Ce.rect=Ce.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function at(e,t=globalThis.document){var d;if(typeof e!="string")throw new TypeError("String expected");const n=/^<!--(.*?)-->$/s.exec(e);if(n)return t.createComment(n[1]);const r=(d=/<([\w:]+)/.exec(e))==null?void 0:d[1];if(!r)return t.createTextNode(e);if(e=e.trim(),r==="body"){const h=t.createElement("html");h.innerHTML=e;const{lastChild:m}=h;return m.remove(),m}let[i,o,a]=Object.hasOwn(Ce,r)?Ce[r]:Ce._default,s=t.createElement("div");for(s.innerHTML=o+e+a;i--;)s=s.lastChild;if(s.firstChild===s.lastChild){const{firstChild:h}=s;return h.remove(),h}const f=t.createDocumentFragment();return f.append(...s.childNodes),f}function nd(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)}function ze(e,...t){const n=e.style;return oe(t,function(r){r&&oe(r,function(i,o){n[o]=i})}),e}function wa(e,t,n){return arguments.length==2?e.getAttribute(t):n===null?e.removeAttribute(t):(e.setAttribute(t,n),e)}const rd=Object.prototype.toString;function jt(e){return new St(e)}function St(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}St.prototype.add=function(e){return this.list.add(e),this},St.prototype.remove=function(e){return rd.call(e)=="[object RegExp]"?this.removeMatching(e):(this.list.remove(e),this)},St.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},St.prototype.toggle=function(e,t){return typeof t<"u"?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this},St.prototype.array=function(){return Array.from(this.list)},St.prototype.has=St.prototype.contains=function(e){return this.list.contains(e)};function ba(e){for(var t;t=e.firstChild;)e.removeChild(t);return e}function Ea(e,t,n){var r=n?e:e.parentNode;return r&&typeof r.closest=="function"&&r.closest(t)||null}function id(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qn={},_a;function od(){if(_a)return Qn;_a=1;var e,t,n;function r(){e=window.addEventListener?"addEventListener":"attachEvent",t=window.removeEventListener?"removeEventListener":"detachEvent",n=e!=="addEventListener"?"on":""}return Qn.bind=function(i,o,a,s){return e||r(),i[e](n+o,a,s||!1),a},Qn.unbind=function(i,o,a,s){return t||r(),i[t](n+o,a,s||!1),a},Qn}var xa=od(),ad=id(xa),At=nd({__proto__:null,default:ad},[xa]),Sa=["focus","blur"];function sd(e,t,n,r,i){return Sa.indexOf(n)!==-1&&(i=!0),At.bind(e,n,function(o){var a=o.target||o.srcElement;o.delegateTarget=Ea(a,t,!0),o.delegateTarget&&r.call(e,o)},i)}function ld(e,t,n,r){return Sa.indexOf(t)!==-1&&(r=!0),At.unbind(e,t,n,r)}var gi={bind:sd,unbind:ld};function ht(e,t){return t=t||document,t.querySelector(e)}function cd(e,t){return t=t||document,t.querySelectorAll(e)}function er(e){e.parentNode&&e.parentNode.removeChild(e)}function vi(e,t,n,r,i){var o=vn();o.setTranslate(t,n);var a=vn();a.setRotate(r||0,0,0);var s=vn();s.setScale(1,1),wn(e,[o,a,s])}function Aa(e,t,n){var r=vn();r.setTranslate(t,n),wn(e,r)}function ud(e,t){var n=vn();n.setRotate(t,0,0),wn(e,n)}function fd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wi={exports:{}},ka;function dd(){if(ka)return wi.exports;ka=1;var e=wi.exports=function(t,n){if(n||(n=16),t===void 0&&(t=128),t<=0)return"0";for(var r=Math.log(Math.pow(2,t))/Math.log(n),i=2;r===1/0;i*=2)r=Math.log(Math.pow(2,t/i))/Math.log(n)*i;for(var o=r-Math.floor(r),a="",i=0;i<Math.floor(r);i++){var s=Math.floor(Math.random()*n).toString(n);a=s+a}if(o){var f=Math.pow(n,o),s=Math.floor(Math.random()*f).toString(n);a=s+a}var d=parseInt(a,n);return d!==1/0&&d>=Math.pow(2,t)?e(t,n):a};return e.rack=function(t,n,r){var i=function(a){var s=0;do{if(s++>10)if(r)t+=r;else throw new Error("too many ID collisions, use more bits");var f=e(t,n)}while(Object.hasOwnProperty.call(o,f));return o[f]=a,f},o=i.hats={};return i.get=function(a){return i.hats[a]},i.set=function(a,s){return i.hats[a]=s,i},i.bits=t||128,i.base=n||16,i},wi.exports}var pd=dd(),hd=fd(pd);function mt(e){if(!(this instanceof mt))return new mt(e);e=e||[128,36,1],this._seed=e.length?hd.rack(e[0],e[1],e[2]):e}mt.prototype.next=function(e){return this._seed(e||!0)},mt.prototype.nextPrefixed=function(e,t){var n;do n=e+this.next(!0);while(this.assigned(n));return this.claim(n,t),n},mt.prototype.claim=function(e,t){this._seed.set(e,t||!0)},mt.prototype.assigned=function(e){return this._seed.get(e)||!1},mt.prototype.unclaim=function(e){delete this._seed.hats[e]},mt.prototype.clear=function(){var e=this._seed.hats,t;for(t in e)this.unclaim(t)};var md=new mt,yd=10,tr=3,gd=1.5,nr=10,vd=4,nn=.95,wd=1,bd=.25;function Ut(e,t,n,r,i,o,a){pt.call(this,t,a);var s=e&&e.defaultFillColor,f=e&&e.defaultStrokeColor,d=e&&e.defaultLabelColor;function h(p){return n.computeStyle(p,{strokeLinecap:"round",strokeLinejoin:"round",stroke:yi,strokeWidth:2,fill:"white"})}function m(p){return n.computeStyle(p,["no-fill"],{strokeLinecap:"round",strokeLinejoin:"round",stroke:yi,strokeWidth:2})}function k(p,u){var{ref:c={x:0,y:0},scale:g=1,element:b,parentGfx:D=i._svg}=u,Q=xe("marker",{id:p,viewBox:"0 0 20 20",refX:c.x,refY:c.y,markerWidth:20*g,markerHeight:20*g,orient:"auto"});Pe(Q,b);var ue=ht(":scope > defs",D);ue||(ue=xe("defs"),Pe(D,ue)),Pe(ue,Q)}function z(p,u,c,g){var b=md.nextPrefixed("marker-");return G(p,b,u,c,g),"url(#"+b+")"}function G(p,u,c,g,b){if(c==="sequenceflow-end"){var D=xe("path",{d:"M 1 5 L 11 10 L 1 15 Z",...h({fill:b,stroke:b,strokeWidth:1})});k(u,{element:D,ref:{x:11,y:10},scale:.5,parentGfx:p})}if(c==="messageflow-start"){var Q=xe("circle",{cx:6,cy:6,r:3.5,...h({fill:g,stroke:b,strokeWidth:1,strokeDasharray:[1e4,1]})});k(u,{element:Q,ref:{x:6,y:6},parentGfx:p})}if(c==="messageflow-end"){var ue=xe("path",{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z",...h({fill:g,stroke:b,strokeWidth:1,strokeDasharray:[1e4,1]})});k(u,{element:ue,ref:{x:8.5,y:5},parentGfx:p})}if(c==="association-start"){var P=xe("path",{d:"M 11 5 L 1 10 L 11 15",...m({fill:"none",stroke:b,strokeWidth:1.5,strokeDasharray:[1e4,1]})});k(u,{element:P,ref:{x:1,y:10},scale:.5,parentGfx:p})}if(c==="association-end"){var j=xe("path",{d:"M 1 5 L 11 10 L 1 15",...m({fill:"none",stroke:b,strokeWidth:1.5,strokeDasharray:[1e4,1]})});k(u,{element:j,ref:{x:11,y:10},scale:.5,parentGfx:p})}if(c==="conditional-flow-marker"){var Y=xe("path",{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z",...h({fill:g,stroke:b})});k(u,{element:Y,ref:{x:-1,y:10},scale:.5,parentGfx:p})}if(c==="conditional-default-flow-marker"){var T=xe("path",{d:"M 6 4 L 10 16",...h({stroke:b,fill:"none"})});k(u,{element:T,ref:{x:0,y:10},scale:.5,parentGfx:p})}}function V(p,u,c,g,b={}){bt(g)&&(b=g,g=0),g=g||0,b=h(b);var D=u/2,Q=c/2,ue=xe("circle",{cx:D,cy:Q,r:Math.round((u+c)/4-g),...b});return Pe(p,ue),ue}function F(p,u,c,g,b,D){bt(b)&&(D=b,b=0),b=b||0,D=h(D);var Q=xe("rect",{x:b,y:b,width:u-b*2,height:c-b*2,rx:g,ry:g,...D});return Pe(p,Q),Q}function S(p,u,c,g){var b=u/2,D=c/2,Q=[{x:b,y:0},{x:u,y:D},{x:b,y:c},{x:0,y:D}],ue=Q.map(function(j){return j.x+","+j.y}).join(" ");g=h(g);var P=xe("polygon",{...g,points:ue});return Pe(p,P),P}function B(p,u,c,g){c=m(c);var b=mi(u,c,g);return Pe(p,b),b}function y(p,u,c){return B(p,u,c,5)}function v(p,u,c){c=m(c);var g=xe("path",{...c,d:u});return Pe(p,g),g}function A(p,u,c,g){return v(u,c,le({"data-marker":p},g))}function N(p){return ae[p]}function x(p){return function(u,c,g){return N(p)(u,c,g)}}var E={"bpmn:MessageEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.235,my:.315}}),D=g?te(u,f,c.stroke):he(u,s,c.fill),Q=g?he(u,s,c.fill):te(u,f,c.stroke),ue=v(p,b,{fill:D,stroke:Q,strokeWidth:1});return ue},"bpmn:TimerEventDefinition":function(p,u,c={}){var g=c.width||u.width,b=c.height||u.height,D=c.width?1:2,Q=V(p,g,b,.2*b,{fill:he(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:D}),ue=r.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:g,containerHeight:b,position:{mx:.5,my:.5}});v(p,ue,{stroke:te(u,f,c.stroke),strokeWidth:D});for(var P=0;P<12;P++){var j=r.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:g,containerHeight:b,position:{mx:.5,my:.5}}),Y=g/2,T=b/2;v(p,j,{strokeWidth:1,stroke:te(u,f,c.stroke),transform:"rotate("+P*30+","+T+","+Y+")"})}return Q},"bpmn:EscalationEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.5,my:.2}}),D=g?te(u,f,c.stroke):he(u,s,c.fill);return v(p,b,{fill:D,stroke:te(u,f,c.stroke),strokeWidth:1})},"bpmn:ConditionalEventDefinition":function(p,u,c={}){var g=r.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.5,my:.222}});return v(p,g,{fill:he(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:1})},"bpmn:LinkEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:.57,my:.263}}),D=g?te(u,f,c.stroke):he(u,s,c.fill);return v(p,b,{fill:D,stroke:te(u,f,c.stroke),strokeWidth:1})},"bpmn:ErrorEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.2,my:.722}}),D=g?te(u,f,c.stroke):he(u,s,c.fill);return v(p,b,{fill:D,stroke:te(u,f,c.stroke),strokeWidth:1})},"bpmn:CancelEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:.638,my:-.055}}),D=g?te(u,f,c.stroke):"none",Q=v(p,b,{fill:D,stroke:te(u,f,c.stroke),strokeWidth:1});return ud(Q,45),Q},"bpmn:CompensateEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.22,my:.5}}),D=g?te(u,f,c.stroke):he(u,s,c.fill);return v(p,b,{fill:D,stroke:te(u,f,c.stroke),strokeWidth:1})},"bpmn:SignalEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.5,my:.2}}),D=g?te(u,f,c.stroke):he(u,s,c.fill);return v(p,b,{strokeWidth:1,fill:D,stroke:te(u,f,c.stroke)})},"bpmn:MultipleEventDefinition":function(p,u,c={},g){var b=r.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.211,my:.36}}),D=g?te(u,f,c.stroke):he(u,s,c.fill);return v(p,b,{fill:D,stroke:te(u,f,c.stroke),strokeWidth:1})},"bpmn:ParallelMultipleEventDefinition":function(p,u,c={}){var g=r.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:c.width||u.width,containerHeight:c.height||u.height,position:{mx:.458,my:.194}});return v(p,g,{fill:he(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:1})},"bpmn:TerminateEventDefinition":function(p,u,c={}){var g=V(p,u.width,u.height,8,{fill:te(u,f,c.stroke),stroke:te(u,f,c.stroke),strokeWidth:4});return g}};function H(p,u,c={},g){var b=_e(p),D=Jf(b),Q=g||p;return b.get("eventDefinitions")&&b.get("eventDefinitions").length>1?b.get("parallelMultiple")?E["bpmn:ParallelMultipleEventDefinition"](u,Q,c,D):E["bpmn:MultipleEventDefinition"](u,Q,c,D):ot(b,"bpmn:MessageEventDefinition")?E["bpmn:MessageEventDefinition"](u,Q,c,D):ot(b,"bpmn:TimerEventDefinition")?E["bpmn:TimerEventDefinition"](u,Q,c,D):ot(b,"bpmn:ConditionalEventDefinition")?E["bpmn:ConditionalEventDefinition"](u,Q,c,D):ot(b,"bpmn:SignalEventDefinition")?E["bpmn:SignalEventDefinition"](u,Q,c,D):ot(b,"bpmn:EscalationEventDefinition")?E["bpmn:EscalationEventDefinition"](u,Q,c,D):ot(b,"bpmn:LinkEventDefinition")?E["bpmn:LinkEventDefinition"](u,Q,c,D):ot(b,"bpmn:ErrorEventDefinition")?E["bpmn:ErrorEventDefinition"](u,Q,c,D):ot(b,"bpmn:CancelEventDefinition")?E["bpmn:CancelEventDefinition"](u,Q,c,D):ot(b,"bpmn:CompensateEventDefinition")?E["bpmn:CompensateEventDefinition"](u,Q,c,D):ot(b,"bpmn:TerminateEventDefinition")?E["bpmn:TerminateEventDefinition"](u,Q,c,D):null}var L={ParticipantMultiplicityMarker:function(p,u,c={}){var g=Xe(u,c),b=je(u,c),D=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:g,containerHeight:b,position:{mx:(g/2-6)/g,my:(b-15)/b}});A("participant-multiplicity",p,D,{strokeWidth:2,fill:he(u,s,c.fill),stroke:te(u,f,c.stroke)})},SubProcessMarker:function(p,u,c={}){var g=F(p,14,14,0,{strokeWidth:1,fill:he(u,s,c.fill),stroke:te(u,f,c.stroke)});Aa(g,u.width/2-7.5,u.height-20);var b=r.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:u.width,containerHeight:u.height,position:{mx:(u.width/2-7.5)/u.width,my:(u.height-20)/u.height}});A("sub-process",p,b,{fill:he(u,s,c.fill),stroke:te(u,f,c.stroke)})},ParallelMarker:function(p,u,c){var g=Xe(u,c),b=je(u,c),D=r.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:g,containerHeight:b,position:{mx:(g/2+c.parallel)/g,my:(b-20)/b}});A("parallel",p,D,{fill:he(u,s,c.fill),stroke:te(u,f,c.stroke)})},SequentialMarker:function(p,u,c){var g=r.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:(u.width/2+c.seq)/u.width,my:(u.height-19)/u.height}});A("sequential",p,g,{fill:he(u,s,c.fill),stroke:te(u,f,c.stroke)})},CompensationMarker:function(p,u,c){var g=r.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:(u.width/2+c.compensation)/u.width,my:(u.height-13)/u.height}});A("compensation",p,g,{strokeWidth:1,fill:he(u,s,c.fill),stroke:te(u,f,c.stroke)})},LoopMarker:function(p,u,c){var g=Xe(u,c),b=je(u,c),D=r.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:g,containerHeight:b,position:{mx:(g/2+c.loop)/g,my:(b-7)/b}});A("loop",p,D,{strokeWidth:1.5,fill:"none",stroke:te(u,f,c.stroke),strokeMiterlimit:.5})},AdhocMarker:function(p,u,c){var g=Xe(u,c),b=je(u,c),D=r.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:g,containerHeight:b,position:{mx:(g/2+c.adhoc)/g,my:(b-15)/b}});A("adhoc",p,D,{strokeWidth:1,fill:te(u,f,c.stroke),stroke:te(u,f,c.stroke)})}};function _(p,u,c,g){L[p](u,c,g)}function q(p,u,c=[],g={}){g={fill:g.fill,stroke:g.stroke,width:Xe(u,g),height:je(u,g)};var b=_e(u),D=c.includes("SubProcessMarker");D?g={...g,seq:-21,parallel:-22,compensation:-25,loop:-18,adhoc:10}:g={...g,seq:-5,parallel:-6,compensation:-7,loop:0,adhoc:-8},b.get("isForCompensation")&&c.push("CompensationMarker"),ce(b,"bpmn:AdHocSubProcess")&&(c.push("AdhocMarker"),D||le(g,{compensation:g.compensation-18}));var Q=b.get("loopCharacteristics"),ue=Q&&Q.get("isSequential");Q&&(le(g,{compensation:g.compensation-18}),c.includes("AdhocMarker")&&le(g,{seq:-23,loop:-18,parallel:-24}),ue===void 0&&c.push("LoopMarker"),ue===!1&&c.push("ParallelMarker"),ue===!0&&c.push("SequentialMarker")),c.includes("CompensationMarker")&&c.length===1&&le(g,{compensation:-8}),oe(c,function(P){_(P,p,u,g)})}function se(p,u,c={}){c=le({size:{width:100}},c);var g=o.createText(u||"",c);return it(g).add("djs-label"),Pe(p,g),g}function Z(p,u,c,g={}){var b=_e(u),D=En({x:u.x,y:u.y,width:u.width,height:u.height},g);return se(p,b.name,{align:c,box:D,padding:7,style:{fill:bn(u,d,f,g.stroke)}})}function K(p,u,c={}){var g={width:u.width,height:u.height,x:u.width/2+u.x,y:u.height/2+u.y};return se(p,Xn(u),{box:g,style:le({},o.getExternalStyle(),{fill:bn(u,d,f,c.stroke)})})}function X(p,u,c,g={}){var b=ia(c),D=se(p,u,{box:{height:30,width:b?je(c,g):Xe(c,g)},align:"center-middle",style:{fill:bn(c,d,f,g.stroke)}});if(b){var Q=-1*je(c,g);vi(D,0,-Q,270)}}function ee(p,u,c={}){var{width:g,height:b}=En(u,c);return F(p,g,b,nr,{...c,fill:he(u,s,c.fill),fillOpacity:nn,stroke:te(u,f,c.stroke)})}function J(p,u,c={}){var g=_e(u),b=he(u,s,c.fill),D=te(u,f,c.stroke);return(g.get("associationDirection")==="One"||g.get("associationDirection")==="Both")&&(c.markerEnd=z(p,"association-end",b,D)),g.get("associationDirection")==="Both"&&(c.markerStart=z(p,"association-start",b,D)),c=me(c,["markerStart","markerEnd"]),y(p,u.waypoints,{...c,stroke:D,strokeDasharray:"0, 5"})}function M(p,u,c={}){var g=he(u,s,c.fill),b=te(u,f,c.stroke),D=r.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:.474,my:.296}}),Q=v(p,D,{fill:g,fillOpacity:nn,stroke:b}),ue=_e(u);if(Zf(ue)){var P=r.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:.33,my:(u.height-18)/u.height}});v(p,P,{strokeWidth:2,fill:g,stroke:b})}return Q}function I(p,u,c={}){return V(p,u.width,u.height,{fillOpacity:nn,...c,fill:he(u,s,c.fill),stroke:te(u,f,c.stroke)})}function $(p,u,c={}){return S(p,u.width,u.height,{fill:he(u,s,c.fill),fillOpacity:nn,stroke:te(u,f,c.stroke)})}function C(p,u,c={}){var g=F(p,Xe(u,c),je(u,c),0,{fill:he(u,s,c.fill),fillOpacity:c.fillOpacity||nn,stroke:te(u,f,c.stroke),strokeWidth:1.5}),b=_e(u);if(ce(b,"bpmn:Lane")){var D=b.get("name");X(p,D,u,c)}return g}function R(p,u,c={}){var g=ee(p,u,c),b=$t(u);if(Sf(u)&&(Se(g,{strokeDasharray:"0, 5.5",strokeWidth:2.5}),!b)){var D=_e(u).flowElements||[],Q=D.filter(ue=>ce(ue,"bpmn:StartEvent"));Q.length===1&&U(Q[0],p,c,u)}return Z(p,u,b?"center-top":"center-middle",c),b?q(p,u,void 0,c):q(p,u,["SubProcessMarker"],c),g}function U(p,u,c,g){var b=22,D={fill:he(g,s,c.fill),stroke:te(g,f,c.stroke),width:b,height:b},Q=_e(p).isInterrupting,ue=Q?0:3,P=Q?1:1.2,j=20,Y=(b-j)/2,T="translate("+Y+","+Y+")";V(u,j,j,{fill:D.fill,stroke:D.stroke,strokeWidth:P,strokeDasharray:ue,transform:T}),H(p,u,D,g)}function pe(p,u,c={}){var g=ee(p,u,c);return Z(p,u,"center-middle",c),q(p,u,void 0,c),g}var ae=this.handlers={"bpmn:AdHocSubProcess":function(p,u,c={}){return $t(u)?c=me(c,["fill","stroke","width","height"]):c=me(c,["fill","stroke"]),R(p,u,c)},"bpmn:Association":function(p,u,c={}){return c=me(c,["fill","stroke"]),J(p,u,c)},"bpmn:BoundaryEvent":function(p,u,c={}){var{renderIcon:g=!0}=c;c=me(c,["fill","stroke"]);var b=_e(u),D=b.get("cancelActivity");c={strokeWidth:1.5,fill:he(u,s,c.fill),fillOpacity:wd,stroke:te(u,f,c.stroke)},D||(c.strokeDasharray="6");var Q=I(p,u,c);return V(p,u.width,u.height,tr,{...c,fill:"none"}),g&&H(u,p,c),Q},"bpmn:BusinessRuleTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=pe(p,u,c),b=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),D=v(p,b);Se(D,{fill:he(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:1});var Q=r.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),ue=v(p,Q);return Se(ue,{fill:te(u,f,c.stroke),stroke:te(u,f,c.stroke),strokeWidth:1}),g},"bpmn:CallActivity":function(p,u,c={}){return c=me(c,["fill","stroke"]),R(p,u,{strokeWidth:5,...c})},"bpmn:ComplexGateway":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=$(p,u,c),b=r.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:u.width,containerHeight:u.height,position:{mx:.46,my:.26}});return v(p,b,{fill:te(u,f,c.stroke),stroke:te(u,f,c.stroke),strokeWidth:1}),g},"bpmn:DataInput":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=r.getRawPath("DATA_ARROW"),b=M(p,u,c);return v(p,g,{fill:"none",stroke:te(u,f,c.stroke),strokeWidth:1}),b},"bpmn:DataInputAssociation":function(p,u,c={}){return c=me(c,["fill","stroke"]),J(p,u,{...c,markerEnd:z(p,"association-end",he(u,s,c.fill),te(u,f,c.stroke))})},"bpmn:DataObject":function(p,u,c={}){return c=me(c,["fill","stroke"]),M(p,u,c)},"bpmn:DataObjectReference":x("bpmn:DataObject"),"bpmn:DataOutput":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=r.getRawPath("DATA_ARROW"),b=M(p,u,c);return v(p,g,{strokeWidth:1,fill:te(u,f,c.stroke),stroke:te(u,f,c.stroke)}),b},"bpmn:DataOutputAssociation":function(p,u,c={}){return c=me(c,["fill","stroke"]),J(p,u,{...c,markerEnd:z(p,"association-end",he(u,s,c.fill),te(u,f,c.stroke))})},"bpmn:DataStoreReference":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=r.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:u.width,containerHeight:u.height,position:{mx:0,my:.133}});return v(p,g,{fill:he(u,s,c.fill),fillOpacity:nn,stroke:te(u,f,c.stroke),strokeWidth:2})},"bpmn:EndEvent":function(p,u,c={}){var{renderIcon:g=!0}=c;c=me(c,["fill","stroke"]);var b=I(p,u,{...c,strokeWidth:4});return g&&H(u,p,c),b},"bpmn:EventBasedGateway":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=_e(u),b=$(p,u,c);V(p,u.width,u.height,u.height*.2,{fill:he(u,"none",c.fill),stroke:te(u,f,c.stroke),strokeWidth:1});var D=g.get("eventGatewayType"),Q=!!g.get("instantiate");function ue(){var j=r.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:u.width,containerHeight:u.height,position:{mx:.36,my:.44}});v(p,j,{fill:"none",stroke:te(u,f,c.stroke),strokeWidth:2})}if(D==="Parallel"){var P=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:u.width,containerHeight:u.height,position:{mx:.474,my:.296}});v(p,P,{fill:"none",stroke:te(u,f,c.stroke),strokeWidth:1})}else D==="Exclusive"&&(Q||V(p,u.width,u.height,u.height*.26,{fill:"none",stroke:te(u,f,c.stroke),strokeWidth:1}),ue());return b},"bpmn:ExclusiveGateway":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=$(p,u,c),b=r.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:u.width,containerHeight:u.height,position:{mx:.32,my:.3}}),D=Ft(u);return D.get("isMarkerVisible")&&v(p,b,{fill:te(u,f,c.stroke),stroke:te(u,f,c.stroke),strokeWidth:1}),g},"bpmn:Gateway":function(p,u,c={}){return c=me(c,["fill","stroke"]),$(p,u,c)},"bpmn:Group":function(p,u,c={}){return c=me(c,["fill","stroke","width","height"]),F(p,u.width,u.height,nr,{stroke:te(u,f,c.stroke),strokeWidth:1.5,strokeDasharray:"10, 6, 0, 6",fill:"none",pointerEvents:"none",width:Xe(u,c),height:je(u,c)})},"bpmn:InclusiveGateway":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=$(p,u,c);return V(p,u.width,u.height,u.height*.24,{fill:he(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:2.5}),g},"bpmn:IntermediateEvent":function(p,u,c={}){var{renderIcon:g=!0}=c;c=me(c,["fill","stroke"]);var b=I(p,u,{...c,strokeWidth:1.5});return V(p,u.width,u.height,tr,{fill:"none",stroke:te(u,f,c.stroke),strokeWidth:1.5}),g&&H(u,p,c),b},"bpmn:IntermediateCatchEvent":x("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":x("bpmn:IntermediateEvent"),"bpmn:Lane":function(p,u,c={}){return c=me(c,["fill","stroke","width","height"]),C(p,u,{...c,fillOpacity:bd})},"bpmn:ManualTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=pe(p,u,c),b=r.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});return v(p,b,{fill:he(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:.5}),g},"bpmn:MessageFlow":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=_e(u),b=Ft(u),D=he(u,s,c.fill),Q=te(u,f,c.stroke),ue=y(p,u.waypoints,{markerEnd:z(p,"messageflow-end",D,Q),markerStart:z(p,"messageflow-start",D,Q),stroke:Q,strokeDasharray:"10, 11",strokeWidth:1.5});if(g.get("messageRef")){var P=ue.getPointAtLength(ue.getTotalLength()/2),j=r.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:P.x,y:P.y}}),Y={strokeWidth:1};b.get("messageVisibleKind")==="initiating"?(Y.fill=D,Y.stroke=Q):(Y.fill=Q,Y.stroke=D);var T=v(p,j,Y),W=g.get("messageRef"),re=W.get("name"),O=se(p,re,{align:"center-top",fitBox:!0,style:{fill:Q}}),ie=T.getBBox(),ye=O.getBBox(),et=P.x-ye.width/2,Re=P.y+ie.height/2+yd;vi(O,et,Re,0)}return ue},"bpmn:ParallelGateway":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=$(p,u,c),b=r.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:u.width,containerHeight:u.height,position:{mx:.46,my:.2}});return v(p,b,{fill:te(u,f,c.stroke),stroke:te(u,f,c.stroke),strokeWidth:1}),g},"bpmn:Participant":function(p,u,c={}){c=me(c,["fill","stroke","width","height"]);var g=C(p,u,c),b=$t(u),D=ia(u),Q=_e(u),ue=Q.get("name");if(b){var P=D?[{x:30,y:0},{x:30,y:je(u,c)}]:[{x:0,y:30},{x:Xe(u,c),y:30}];B(p,P,{stroke:te(u,f,c.stroke),strokeWidth:gd}),X(p,ue,u,c)}else{var j=En(u,c);D||(j.height=Xe(u,c),j.width=je(u,c));var Y=se(p,ue,{box:j,align:"center-middle",style:{fill:bn(u,d,f,c.stroke)}});if(!D){var T=-1*je(u,c);vi(Y,0,-T,270)}}return Q.get("participantMultiplicity")&&_("ParticipantMultiplicityMarker",p,u,c),g},"bpmn:ReceiveTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=_e(u),b=pe(p,u,c),D;return g.get("instantiate")?(V(p,28,28,20*.22,{fill:he(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:1}),D=r.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):D=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),v(p,D,{fill:he(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:1}),b},"bpmn:ScriptTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=pe(p,u,c),b=r.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});return v(p,b,{fill:he(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:1}),g},"bpmn:SendTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=pe(p,u,c),b=r.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});return v(p,b,{fill:te(u,f,c.stroke),stroke:he(u,s,c.fill),strokeWidth:1}),g},"bpmn:SequenceFlow":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=he(u,s,c.fill),b=te(u,f,c.stroke),D=y(p,u.waypoints,{markerEnd:z(p,"sequenceflow-end",g,b),stroke:b}),Q=_e(u),{source:ue}=u;if(ue){var P=_e(ue);Q.get("conditionExpression")&&ce(P,"bpmn:Activity")&&Se(D,{markerStart:z(p,"conditional-flow-marker",g,b)}),P.get("default")&&(ce(P,"bpmn:Gateway")||ce(P,"bpmn:Activity"))&&P.get("default")===Q&&Se(D,{markerStart:z(p,"conditional-default-flow-marker",g,b)})}return D},"bpmn:ServiceTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=pe(p,u,c);V(p,10,10,{fill:he(u,s,c.fill),stroke:"none",transform:"translate(6, 6)"});var b=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}});v(p,b,{fill:he(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:1}),V(p,10,10,{fill:he(u,s,c.fill),stroke:"none",transform:"translate(11, 10)"});var D=r.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}});return v(p,D,{fill:he(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:1}),g},"bpmn:StartEvent":function(p,u,c={}){var{renderIcon:g=!0}=c;c=me(c,["fill","stroke"]);var b=_e(u);b.get("isInterrupting")||(c={...c,strokeDasharray:"6"});var D=I(p,u,c);return g&&H(u,p,c),D},"bpmn:SubProcess":function(p,u,c={}){return $t(u)?c=me(c,["fill","stroke","width","height"]):c=me(c,["fill","stroke"]),R(p,u,c)},"bpmn:Task":function(p,u,c={}){return c=me(c,["fill","stroke"]),pe(p,u,c)},"bpmn:TextAnnotation":function(p,u,c={}){c=me(c,["fill","stroke"]);var{width:g,height:b}=En(u,c),D=F(p,g,b,0,0,{fill:"none",stroke:"none"}),Q=r.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:g,containerHeight:b,position:{mx:0,my:0}});v(p,Q,{stroke:te(u,f,c.stroke)});var ue=_e(u),P=ue.get("text")||"";return se(p,P,{align:"left-top",box:En(u,c),padding:la,style:{fill:bn(u,d,f,c.stroke)}}),D},"bpmn:Transaction":function(p,u,c={}){$t(u)?c=me(c,["fill","stroke","width","height"]):c=me(c,["fill","stroke"]);var g=R(p,u,{strokeWidth:1.5,...c}),b=n.style(["no-fill","no-events"],{stroke:te(u,f,c.stroke),strokeWidth:1.5}),D=$t(u);return D||(c={}),F(p,Xe(u,c),je(u,c),nr-tr,tr,b),g},"bpmn:UserTask":function(p,u,c={}){c=me(c,["fill","stroke"]);var g=pe(p,u,c),b=15,D=12,Q=r.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:b,y:D}});v(p,Q,{fill:he(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:.5});var ue=r.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:b,y:D}});v(p,ue,{fill:he(u,s,c.fill),stroke:te(u,f,c.stroke),strokeWidth:.5});var P=r.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:b,y:D}});return v(p,P,{fill:te(u,f,c.stroke),stroke:te(u,f,c.stroke),strokeWidth:.5}),g},label:function(p,u,c={}){return K(p,u,c)}};this._drawPath=v,this._renderer=N}nt(Ut,pt),Ut.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],Ut.prototype.canRender=function(e){return ce(e,"bpmn:BaseElement")},Ut.prototype.drawShape=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)},Ut.prototype.drawConnection=function(e,t,n={}){var{type:r}=t,i=this._renderer(r);return i(e,t,n)},Ut.prototype.getShapePath=function(e){return kf(e)?va(e,vd):ce(e,"bpmn:Event")?Qf(e):ce(e,"bpmn:Activity")?va(e,nr):ce(e,"bpmn:Gateway")?ed(e):td(e)};function me(e,t=[]){return t.reduce((n,r)=>(e[r]&&(n[r]=e[r]),n),{})}var Ed=0,_d={width:150,height:50};function xd(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function Sd(e){return bt(e)?le({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}var bi=null;function Ad(){return bi||(bi=document.createElement("canvas").getContext("2d")),bi}function kd(e){var t=[];return e.fontStyle&&t.push(e.fontStyle),e.fontVariant&&t.push(e.fontVariant),e.fontWeight&&t.push(e.fontWeight),e.fontStretch&&t.push(e.fontStretch),t.push(Ca(e.fontSize)||"12px"),t.push(e.fontFamily||"sans-serif"),t.join(" ")}function Ca(e){if(e!=null)return typeof e=="number"||/^-?\d+(\.\d+)?$/.test(e)?e+"px":e}function Cd(e,t){var n=Ad();if(!n)return{width:0,height:0};n.font=kd(t),"letterSpacing"in n&&(n.letterSpacing=Ca(t.letterSpacing)||"0px");var r=e==="",i=r?"dummy":e.replace(/\s+$/,""),o=n.measureText(i);return{width:r?0:o.width,height:"fontBoundingBoxAscent"in o?o.fontBoundingBoxAscent+o.fontBoundingBoxDescent:o.actualBoundingBoxAscent+o.actualBoundingBoxDescent}}function Rd(e,t,n){for(var r=e.shift(),i=r,o;;){if(o=Cd(i,n),o.width=i?o.width:0,i===" "||i===""||o.width<Math.round(t)||i.length<2)return Td(e,i,r,o);i=Pd(i,o.width,t)}}function Td(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 Ra="";function Nd(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===Ra)&&i.pop();break}var a=i[i.length-1];return a&&a===Ra&&(i[i.length-1]="-"),i.join("")}function Pd(e,t,n){var r=Math.max(e.length*(n/t),1),i=Nd(e,r);return i||(i=e.slice(0,Math.max(Math.round(r-1),1))),i}function rr(e){this._config=le({},{size:_d,padding:Ed,style:{},align:"center-top"},e||{})}rr.prototype.createText=function(e,t){return this.layoutText(e,t).element},rr.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},rr.prototype.layoutText=function(e,t){for(var n=le({},this._config.size,t.box),r=le({},this._config.style,t.style),i=xd(t.align||this._config.align),o=Sd(t.padding!==void 0?t.padding:this._config.padding),a=t.fitBox||!1,s=Dd(r),f=e.split(/\u00AD?\r?\n/),d=[],h=n.width-o.left-o.right;f.length;)d.push(Rd(f,h,r));i.vertical==="middle"&&(o.top=o.bottom=0);var m=tn(d,function(F,S,B){return F+(s||S.height)},0)+o.top+o.bottom,k=tn(d,function(F,S,B){return S.width>F?S.width:F},0),z=o.top;i.vertical==="middle"&&(z+=(n.height-m)/2),z-=(s||d[0].height)/4;var G=xe("text");Se(G,r),oe(d,function(F){var S;switch(z+=s||F.height,i.horizontal){case"left":S=o.left;break;case"right":S=(a?k:h)-o.right-F.width;break;default:S=Math.max(((a?k:h)-F.width)/2+o.left,0)}var B=xe("tspan");Se(B,{x:S,y:z}),B.textContent=F.text,Pe(G,B)});var V={width:k,height:m};return{dimensions:V,element:G}};function Dd(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}var Id=12,Od=1.2,Bd=40;function Ta(e){var t=le({fontFamily:"Arial, sans-serif",fontSize:Id,fontWeight:"normal",lineHeight:Od},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,r=le({},t,{fontSize:n},e&&e.externalStyle||{}),i=new rr({style:t});this.getExternalLabelBounds=function(a,s){var f={width:Math.max(a.width,yn.width),height:30},d=o(s,f,{style:r});return{x:Math.round(a.x+a.width/2-d.width/2),y:a.y,width:Math.ceil(d.width),height:Math.ceil(d.height)}},this.getTextAnnotationBounds=function(a,s){var f=o(s,a,{style:t,align:"left-top",padding:la});return{x:a.x,y:a.y,width:a.width,height:Math.max(Bd,Math.round(f.height))}},this.getDimensions=function(a,s){return i.getDimensions(a,s||{})};function o(a,s,f){return i.getDimensions(a,le({box:s},f))}this.createText=function(a,s){return i.createText(a,s||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return r}}Ta.$inject=["config.textRenderer"];function Md(){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,f=n.containerWidth/r.width*n.xScaleFactor,d=0;d<r.heightElements.length;d++)a["y"+d]=r.heightElements[d]*s;for(var h=0;h<r.widthElements.length;h++)a["x"+h]=r.widthElements[h]*f}var m=Vd(r.d,{mx:i,my:o,e:a});return m}}var Ld=/\{([^{}]+)\}/g,Fd=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;function $d(e,t,n){var r=n;return t.replace(Fd,function(i,o,a,s,f){o=o||s,r&&(o in r&&(r=r[o]),typeof r=="function"&&f&&(r=r()))}),r=(r==null||r==n?e:r)+"",r}function Vd(e,t){return String(e).replace(Ld,function(n,r){return $d(n,r,t)})}const jd={__init__:["bpmnRenderer"],bpmnRenderer:["type",Ut],textRenderer:["type",Ta],pathMap:["type",Md]};function Ud(e,t){return t=t||{},e.replace(/{([^}]+)}/g,function(n,r){return t[r]||"{"+r+"}"})}const Na={translate:["value",Ud]};function zd(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function Ei(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function Hd(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function Wd(e){return zd({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function qd(e){for(var t=e.waypoints,n=t.reduce(function(d,h,m){var k=t[m-1];if(k){var z=d[d.length-1],G=z&&z.endLength||0,V=Yd(k,h);d.push({start:k,end:h,startLength:G,endLength:G+V,length:V})}return d},[]),r=n.reduce(function(d,h){return d+h.length},0),i=r/2,o=0,a=n[o];a.endLength<i;)a=n[++o];var s=(i-a.startLength)/a.length,f={x:a.start.x+(a.end.x-a.start.x)*s,y:a.start.y+(a.end.y-a.start.y)*s};return f}function _i(e){return Af(e)?qd(e):Wd(e)}function Yd(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ie(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}function ir(e,t,n){return le({id:e.id,type:e.$type,businessObject:e,di:t},n)}function Kd(e,t,n){var r=e.waypoint;return!r||r.length<2?[_i(t),_i(n)]:r.map(function(i){return{x:i.x,y:i.y}})}function Pa(e,t,n){return new Error(`element ${Ie(t)} referenced by ${Ie(e)}#${n} not yet drawn`)}function yt(e,t,n,r,i){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=r,this._textRenderer=i}yt.$inject=["eventBus","canvas","elementFactory","elementRegistry","textRenderer"],yt.prototype.add=function(e,t,n){var r,i,o;if(ce(t,"bpmndi:BPMNPlane")){var a=ce(e,"bpmn:SubProcess")?{id:e.id+"_plane"}:{};r=this._elementFactory.createRoot(ir(e,t,a)),this._canvas.addRootElement(r)}else if(ce(t,"bpmndi:BPMNShape")){var s=!$t(e,t),f=Xd(e);i=n&&(n.hidden||n.collapsed);var d=t.bounds;r=this._elementFactory.createShape(ir(e,t,{collapsed:s,hidden:i,x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),isFrame:f})),ce(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,r),ce(e,"bpmn:Lane")&&(o=0),ce(e,"bpmn:DataStoreReference")&&(Gd(n,_i(d))||(n=this._canvas.findRoot(n))),this._canvas.addShape(r,n,o)}else if(ce(t,"bpmndi:BPMNEdge")){var h=this._getSource(e),m=this._getTarget(e);i=n&&(n.hidden||n.collapsed),r=this._elementFactory.createConnection(ir(e,t,{hidden:i,source:h,target:m,waypoints:Kd(t,h,m)})),ce(e,"bpmn:DataAssociation")&&(n=this._canvas.findRoot(n)),this._canvas.addConnection(r,n,o)}else throw new Error(`unknown di ${Ie(t)} for element ${Ie(e)}`);return Cf(e)&&Xn(r)&&this.addLabel(e,t,r),this._eventBus.fire("bpmnElement.added",{element:r}),r},yt.prototype._attachBoundary=function(e,t){var n=e.attachedToRef;if(!n)throw new Error(`missing ${Ie(e)}#attachedToRef`);var r=this._elementRegistry.get(n.id),i=r&&r.attachers;if(!r)throw Pa(e,n,"attachedToRef");t.host=r,i||(r.attachers=i=[]),i.indexOf(t)===-1&&i.push(t)},yt.prototype.addLabel=function(e,t,n){var r,i,o;return r=Pf(t,n),i=Xn(n),i&&(r=this._textRenderer.getExternalLabelBounds(r,i)),o=this._elementFactory.createLabel(ir(e,t,{id:e.id+"_label",labelTarget:n,type:"label",hidden:n.hidden||!Xn(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)},yt.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?Pa(e,r,t+"Ref"):new Error(`${Ie(e)}#${t} Ref not specified`)},yt.prototype._getSource=function(e){return this._getConnectedElement(e,"source")},yt.prototype._getTarget=function(e){return this._getConnectedElement(e,"target")},yt.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};function Gd(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 Xd(e){return ce(e,"bpmn:Group")}const Jd={__depends__:[jd,{__depends__:[Na],bpmnImporter:["type",yt]}]};function Da(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(Math.random()*1e9)+"-"}Da.prototype.next=function(){return this._prefix+ ++this._counter};var Zd=new Da("ov"),Qd=500;function Te(e,t,n,r){this._eventBus=t,this._canvas=n,this._elementRegistry=r,this._ids=Zd,this._overlayDefaults=le({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=ep(n.getContainer()),this._init()}Te.$inject=["config.overlays","eventBus","canvas","elementRegistry"],Te.prototype.get=function(e){if(rt(e)&&(e={id:e}),rt(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?en(t.overlays,na({type:e.type})):t.overlays.slice():[]}else return e.type?en(this._overlays,na({type:e.type})):e.id?this._overlays[e.id]:null},Te.prototype.add=function(e,t,n){if(bt(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=le({},this._overlayDefaults,n,{id:r,type:t,element:e,html:n.html}),this._addOverlay(n),r},Te.prototype.remove=function(e){var t=this.get(e)||[];Ge(t)||(t=[t]);var n=this;oe(t,function(r){var i=n._getOverlayContainer(r.element,!0);if(r&&(er(r.html),er(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)}})},Te.prototype.isShown=function(){return this._overlayRoot.style.display!=="none"},Te.prototype.show=function(){or(this._overlayRoot)},Te.prototype.hide=function(){or(this._overlayRoot,!1)},Te.prototype.clear=function(){this._overlays={},this._overlayContainers=[],ba(this._overlayRoot)},Te.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,r=t.x,i=t.y;if(t.waypoints){var o=gn(t);r=o.x,i=o.y}Ia(n,r,i),wa(e.html,"data-container-id",t.id)},Te.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=gn(r).width:a=r.width,i=t.right*-1+a}if(t.bottom!==void 0){var s;r.waypoints?s=gn(r).height:s=r.height,o=t.bottom*-1+s}Ia(n,i||0,o||0),this._updateOverlayVisibilty(e,this._canvas.viewbox())},Te.prototype._createOverlayContainer=function(e){var t=at('<div class="djs-overlays" />');ze(t,{position:"absolute"}),this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},Te.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";Oa(this._overlayRoot,n)},Te.prototype._getOverlayContainer=function(e,t){var n=Qe(this._overlayContainers,function(r){return r.element===e});return!n&&!t?this._createOverlayContainer(e):n},Te.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)),rt(r)&&(r=at(r)),o=this._getOverlayContainer(n),i=at('<div class="djs-overlay" data-overlay-id="'+t+'">'),ze(i,{position:"absolute"}),i.appendChild(r),e.type&&jt(i).add("djs-overlay-"+e.type);var a=this._canvas.findRoot(n),s=this._canvas.getRootElement();or(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())},Te.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(),f=!0;(r!==s||n&&(Zt(i)&&i>t.scale||Zt(o)&&o<t.scale))&&(f=!1),or(a,f),this._updateOverlayScale(e,t)},Te.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),Zt(r)&&t.scale<r&&(a=(1/t.scale||1)*r),Zt(i)&&t.scale>i&&(a=(1/t.scale||1)*i)),Zt(a)&&(s="scale("+a+","+a+")"),Oa(o,s)},Te.prototype._updateOverlaysVisibilty=function(e){var t=this;oe(this._overlays,function(n){t._updateOverlayVisibilty(n,e)})},Te.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});oe(o,function(f){t.remove(f.id)});var a=t._getOverlayContainer(i);if(a){er(a.html);var s=t._overlayContainers.indexOf(a);s!==-1&&t._overlayContainers.splice(s,1)}}),e.on("element.changed",Qd,function(r){var i=r.element,o=t._getOverlayContainer(i,!0);o&&(oe(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&&jt(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 ep(e){var t=at('<div class="djs-overlay-container" />');return ze(t,{position:"absolute",width:0,height:0}),e.insertBefore(t,e.firstChild),t}function Ia(e,t,n){ze(e,{left:t+"px",top:n+"px"})}function or(e,t){e.style.display=t===!1?"none":""}function Oa(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach(function(n){e.style[n+"transform"]=t})}const Ba={__init__:["overlays"],overlays:["type",Te]};function Ma(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(aa(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)})}Ma.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];const tp={__init__:["changeSupport"],changeSupport:["type",Ma]};var np=1e3;function Fe(e){this._eventBus=e}Fe.$inject=["eventBus"];function rp(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}Fe.prototype.on=function(e,t,n,r,i,o){if((Lt(t)||Et(t))&&(o=i,i=r,r=n,n=t,t=null),Lt(n)&&(o=i,i=r,r=n,n=np),bt(i)&&(o=i,i=!1),!Lt(r))throw new Error("handlerFn must be a function");Ge(e)||(e=[e]);var a=this._eventBus;oe(e,function(s){var f=["commandStack",s,t].filter(function(d){return d}).join(".");a.on(f,n,i?rp(r,o):r,o)})},Fe.prototype.canExecute=gt("canExecute"),Fe.prototype.preExecute=gt("preExecute"),Fe.prototype.preExecuted=gt("preExecuted"),Fe.prototype.execute=gt("execute"),Fe.prototype.executed=gt("executed"),Fe.prototype.postExecute=gt("postExecute"),Fe.prototype.postExecuted=gt("postExecuted"),Fe.prototype.revert=gt("revert"),Fe.prototype.reverted=gt("reverted");function gt(e){return function(n,r,i,o,a){(Lt(n)||Et(n))&&(a=o,o=i,i=r,r=n,n=null),this.on(n,e,r,i,o,a)}}function xi(e,t){t.invoke(Fe,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)})}nt(xi,Fe),xi.$inject=["canvas","injector"];const ip={__init__:["rootElementsBehavior"],rootElementsBehavior:["type",xi]};var op={"&":"&","<":"<",">":">",'"':""","'":"'"};function ap(e){return e=""+e,e&&e.replace(/[&<>"']/g,function(t){return op[t]})}var sp="_plane";function Si(e){var t=e.id;return ce(e,"bpmn:SubProcess")?lp(t):t}function lp(e){return e+sp}var cp="bjs-breadcrumbs-shown";function La(e,t,n){var r=at('<ul class="bjs-breadcrumbs"></ul>'),i=n.getContainer(),o=jt(i);i.appendChild(r);var a=[];e.on("element.changed",function(f){var d=f.element,h=_e(d),m=Qe(a,function(k){return k===h});m&&s()});function s(f){f&&(a=up(f));var d=a.flatMap(function(m){var k=n.findRoot(Si(m))||n.findRoot(m.id);if(!k&&ce(m,"bpmn:Process")){var z=t.find(function(F){var S=_e(F);return S&&S.get("processRef")===m});k=z&&n.findRoot(z.id)}if(!k)return[];var G=ap(m.name||m.id),V=at('<li><span class="bjs-crumb"><a title="'+G+'">'+G+"</a></span></li>");return V.addEventListener("click",function(){n.setRootElement(k)}),V});r.innerHTML="";var h=d.length>1;o.toggle(cp,h),d.forEach(function(m){r.appendChild(m)})}e.on("root.set",function(f){s(f.element)})}La.$inject=["eventBus","elementRegistry","canvas"];function up(e){for(var t=_e(e),n=[],r=t;r;r=r.$parent)(ce(r,"bpmn:SubProcess")||ce(r,"bpmn:Process"))&&n.push(r);return n.reverse()}function Fa(e,t){var n=null,r=new fp;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,!(!ce(o,"bpmn:SubProcess")&&!s)){s=s||{x:0,y:0,zoom:1};var f=(a.x-s.x)*a.scale,d=(a.y-s.y)*a.scale;(f!==0||d!==0)&&t.scroll({dx:f,dy:d}),s.zoom!==a.scale&&t.zoom(s.zoom,{x:0,y:0})}}),e.on("diagram.clear",function(){r.clear(),n=null})}Fa.$inject=["eventBus","canvas"];function fp(){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 $a={x:180,y:160};function zt(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,function(r,i){n._handleImport(i.definitions)})}zt.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)})}},zt.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;ce(a,"bpmn:SubProcess")&&!o.isExpanded&&n.push(a),pp(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 f=t._processToDiagramMap[s.id];t._moveToDiPlane(a,f.plane)}}),i},zt.prototype._movePlaneElementsToOrigin=function(e){var t=e.get("planeElement"),n=dp(e),r={x:n.x-$a.x,y:n.y-$a.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)})},zt.prototype._moveToDiPlane=function(e,t){var n=Va(e),r=n.plane.get("planeElement");r.splice(r.indexOf(e),1),t.get("planeElement").push(e)},zt.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},zt.$inject=["eventBus","moddle"];function Va(e){return ce(e,"bpmndi:BPMNDiagram")?e:Va(e.$parent)}function dp(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=Ei(n.bounds);t.top=Math.min(r.top,t.top),t.left=Math.min(r.left,t.left)}}),Hd(t)}function pp(e,t){var n=e.$parent;return!(!ce(n,"bpmn:SubProcess")||n===t.bpmnElement||xf(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))}var ar=250,hp='<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>',mp="bjs-drilldown-empty";function kt(e,t,n,r,i){Fe.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",ar,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.reverted("shape.toggleCollapse",ar,function(a){var s=a.shape;o._canDrillDown(s)?o._addOverlay(s):o._removeOverlay(s)},!0),this.executed(["shape.create","shape.move","shape.delete"],ar,function(a){var s=a.oldParent,f=a.newParent||a.parent,d=a.shape;o._canDrillDown(d)&&o._addOverlay(d),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(f),o._updateDrilldownOverlay(d)},!0),this.reverted(["shape.create","shape.move","shape.delete"],ar,function(a){var s=a.oldParent,f=a.newParent||a.parent,d=a.shape;o._canDrillDown(d)&&o._addOverlay(d),o._updateDrilldownOverlay(s),o._updateDrilldownOverlay(f),o._updateDrilldownOverlay(d)},!0),t.on("import.render.complete",function(){n.filter(function(a){return o._canDrillDown(a)}).map(function(a){o._addOverlay(a)})})}nt(kt,Fe),kt.prototype._updateDrilldownOverlay=function(e){var t=this._canvas;if(e){var n=t.findRoot(e);n&&this._updateOverlayVisibility(n)}},kt.prototype._canDrillDown=function(e){var t=this._canvas;return ce(e,"bpmn:SubProcess")&&t.findRoot(Si(e))},kt.prototype._updateOverlayVisibility=function(e){var t=this._overlays,n=_e(e),r=t.get({element:n.id,type:"drilldown"})[0];if(r){var i=n&&n.get("flowElements")&&n.get("flowElements").length;jt(r.html).toggle(mp,!i)}},kt.prototype._addOverlay=function(e){var t=this._canvas,n=this._overlays,r=_e(e),i=n.get({element:e,type:"drilldown"});i.length&&this._removeOverlay(e);var o=at('<button type="button" class="bjs-drilldown">'+hp+"</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(Si(e)))}),n.add(e,"drilldown",{position:{bottom:-7,right:-8},html:o}),this._updateOverlayVisibility(e)},kt.prototype._removeOverlay=function(e){var t=this._overlays;t.remove({element:e,type:"drilldown"})},kt.$inject=["canvas","eventBus","elementRegistry","overlays","translate"];const yp={__depends__:[Ba,tp,ip],__init__:["drilldownBreadcrumbs","drilldownOverlayBehavior","drilldownCentering","subprocessCompatibility"],drilldownBreadcrumbs:["type",La],drilldownCentering:["type",Fa],drilldownOverlayBehavior:["type",kt],subprocessCompatibility:["type",zt]};function ja(e){return e.originalEvent||e.srcEvent}function Ua(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 gp(){return/mac/i.test(navigator.platform)}function za(e,t){return(ja(e)||e).button===t}function sr(e){return za(e,0)}function vp(e){return za(e,1)}function wp(e){var t=ja(e)||e;return sr(e)&&t.shiftKey}function bp(e){return!0}function lr(e){return sr(e)||vp(e)}var Ha=500;function Wa(e,t,n){var r=this;function i(E,H,L){if(!s(E,H)){var _,q,se;L?q=t.getGraphics(L):(_=H.delegateTarget||H.target,_&&(q=_,L=t.get(q))),!(!q||!L)&&(se=e.fire(E,{element:L,gfx:q,originalEvent:H}),se===!1&&(H.stopPropagation(),H.preventDefault()))}}var o={};function a(E){return o[E]}function s(E,H){var L=d[E]||sr;return!L(H)}var f={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},d={"element.contextmenu":bp,"element.mousedown":lr,"element.mouseup":lr,"element.click":lr,"element.dblclick":lr};function h(E,H,L){var _=f[E];if(!_)throw new Error("unmapped DOM event name <"+E+">");return i(_,H,L)}var m="svg, .djs-element";function k(E,H,L,_){var q=o[L]=function(se){i(L,se)};_&&(d[L]=_),q.$delegate=gi.bind(E,m,H,q)}function z(E,H,L){var _=a(L);_&&gi.unbind(E,H,_.$delegate)}function G(E){oe(f,function(H,L){k(E,L,H)})}function V(E){oe(f,function(H,L){z(E,L,H)})}e.on("canvas.destroy",function(E){V(E.svg)}),e.on("canvas.init",function(E){G(E.svg)}),e.on(["shape.added","connection.added"],function(E){var H=E.element,L=E.gfx;e.fire("interactionEvents.createHit",{element:H,gfx:L})}),e.on(["shape.changed","connection.changed"],Ha,function(E){var H=E.element,L=E.gfx;e.fire("interactionEvents.updateHit",{element:H,gfx:L})}),e.on("interactionEvents.createHit",Ha,function(E){var H=E.element,L=E.gfx;r.createDefaultHit(H,L)}),e.on("interactionEvents.updateHit",function(E){var H=E.element,L=E.gfx;r.updateDefaultHit(H,L)});var F=A("djs-hit djs-hit-stroke"),S=A("djs-hit djs-hit-click-stroke"),B=A("djs-hit djs-hit-all"),y=A("djs-hit djs-hit-no-move"),v={all:B,"click-stroke":S,stroke:F,"no-move":y};function A(E,H){return H=le({stroke:"white",strokeWidth:15},H||{}),n.cls(E,["no-fill","no-border"],H)}function N(E,H){var L=v[H];if(!L)throw new Error("invalid hit type <"+H+">");return Se(E,L),E}function x(E,H){Pe(E,H)}this.removeHits=function(E){var H=cd(".djs-hit",E);oe(H,Jn)},this.createDefaultHit=function(E,H){var L=E.waypoints,_=E.isFrame,q;return L?this.createWaypointsHit(H,L):(q=_?"stroke":"all",this.createBoxHit(H,q,{width:E.width,height:E.height}))},this.createWaypointsHit=function(E,H){var L=mi(H);return N(L,"stroke"),x(E,L),L},this.createBoxHit=function(E,H,L){L=le({x:0,y:0},L);var _=xe("rect");return N(_,H),Se(_,L),x(E,_),_},this.updateDefaultHit=function(E,H){var L=ht(".djs-hit",H);if(L)return E.waypoints?ga(L,E.waypoints):Se(L,{width:E.width,height:E.height}),L},this.fire=i,this.triggerMouseEvent=h,this.mouseHandler=a,this.registerEvent=k,this.unregisterEvent=z}Wa.$inject=["eventBus","elementRegistry","styles"];const Ep={__init__:["interactionEvents"],interactionEvents:["type",Wa]};function rn(e,t){this._eventBus=e,this._canvas=t,this._selectedElements=new Set;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)})}rn.$inject=["eventBus","canvas"],rn.prototype.deselect=function(e){if(this._selectedElements.has(e)){var t=this.get();this._selectedElements.delete(e),this._eventBus.fire("selection.changed",{oldSelection:t,newSelection:this.get()})}},rn.prototype.get=function(){return Array.from(this._selectedElements)},rn.prototype.isSelected=function(e){return this._selectedElements.has(e)},rn.prototype.select=function(e,t){var n=this.get();Ge(e)||(e=e?[e]:[]);var r=this._canvas,i=r.getRootElement();e=e.filter(function(o){var a=r.findRoot(o);return i===a}),t?oe(e,o=>{this._selectedElements.add(o)}):this._selectedElements=new Set(e),this._eventBus.fire("selection.changed",{oldSelection:n,newSelection:this.get()})};var qa="hover",Ya="selected";function Ka(e,t){this._canvas=e;function n(i,o){e.addMarker(i,o)}function r(i,o){e.removeMarker(i,o)}t.on("element.hover",function(i){n(i.element,qa)}),t.on("element.out",function(i){r(i.element,qa)}),t.on("selection.changed",function(i){function o(d){r(d,Ya)}function a(d){n(d,Ya)}var s=new Set(i.oldSelection),f=new Set(i.newSelection);for(let d of s)f.has(d)||o(d);for(let d of f)s.has(d)||a(d)})}Ka.$inject=["canvas","eventBus"];function Ga(e,t,n,r){e.on("create.end",500,function(i){var o=i.context,a=o.canExecute,s=o.elements,f=o.hints||{},d=f.autoSelect;if(a){if(d===!1)return;Ge(d)?t.select(d):t.select(s.filter(_p))}}),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=Qe(o,function(f){return a.id===f.id});s||t.select(a)}),e.on("element.click",function(i){if(sr(i)){var o=i.element;o===n.getRootElement()&&(o=null);var a=t.isSelected(o),s=t.get().length>1,f=wp(i);if(a&&s)return f?t.deselect(o):t.select(o);a?t.deselect(o):t.select(o,f)}})}Ga.$inject=["eventBus","selection","canvas","elementRegistry"];function _p(e){return!e.hidden}const xp={__init__:["selectionVisuals","selectionBehavior"],__depends__:[Ep],selection:["type",rn],selectionVisuals:["type",Ka],selectionBehavior:["type",Ga]},Sp=/^class[ {]/;function Ap(e){return Sp.test(e.toString())}function Ai(e){return Array.isArray(e)}function ki(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function cr(...e){e.length===1&&Ai(e[0])&&(e=e[0]),e=[...e];const t=e.pop();return t.$inject=e,t}const kp=/constructor\s*[^(]*\(\s*([^)]*)\)/m,Cp=/^(?:async\s+)?(?:function\s*[^(]*)?(?:\(\s*([^)]*)\)|(\w+))/m,Rp=/\/\*([^*]*)\*\//m;function Tp(e){if(typeof e!="function")throw new Error(`Cannot annotate "${e}". Expected a function!`);const t=e.toString().match(Ap(e)?kp:Cp);if(!t)return[];const n=t[1]||t[2];return n&&n.split(",").map(r=>{const i=r.match(Rp);return(i&&i[1]||r).trim()})||[]}function Xa(e,t){const n=t||{get:function(y,v){if(r.push(y),v===!1)return null;throw s(`No provider for "${y}"!`)}},r=[],i=this._providers=Object.create(n._providers||null),o=this._instances=Object.create(null),a=o.injector=this,s=function(y){const v=r.join(" -> ");return r.length=0,new Error(v?`${y} (Resolving: ${v})`:y)};function f(y,v){if(!i[y]&&y.includes(".")){const A=y.split(".");let N=f(A.shift());for(;A.length;)N=N[A.shift()];return N}if(ki(o,y))return o[y];if(ki(i,y)){if(r.indexOf(y)!==-1)throw r.push(y),s("Cannot resolve circular dependency!");return r.push(y),o[y]=i[y][0](i[y][1]),r.pop(),o[y]}return n.get(y,v)}function d(y,v){if(typeof v>"u"&&(v={}),typeof y!="function")if(Ai(y))y=cr(y.slice());else throw s(`Cannot invoke "${y}". Expected a function!`);const N=(y.$inject||Tp(y)).map(x=>ki(v,x)?v[x]:f(x));return{fn:y,dependencies:N}}function h(y){const{fn:v,dependencies:A}=d(y),N=Function.prototype.bind.call(v,null,...A);return new N}function m(y,v,A){const{fn:N,dependencies:x}=d(y,A);return N.apply(v,x)}function k(y){return cr(v=>y.get(v))}function z(y,v){if(v&&v.length){const A=Object.create(null),N=Object.create(null),x=[],E=[],H=[];let L,_,q,se;for(let Z in i)L=i[Z],v.indexOf(Z)!==-1&&(L[2]==="private"?(_=x.indexOf(L[3]),_===-1?(q=L[3].createChild([],v),se=k(q),x.push(L[3]),E.push(q),H.push(se),A[Z]=[se,Z,"private",q]):A[Z]=[H[_],Z,"private",E[_]]):A[Z]=[L[2],L[1]],N[Z]=!0),(L[2]==="factory"||L[2]==="type")&&L[1].$scope&&v.forEach(K=>{L[1].$scope.indexOf(K)!==-1&&(A[Z]=[L[2],L[1]],N[K]=!0)});v.forEach(Z=>{if(!N[Z])throw new Error('No provider for "'+Z+'". Cannot use provider from the parent!')}),y.unshift(A)}return new Xa(y,a)}const G={factory:m,type:h,value:function(y){return y}};function V(y,v){const A=y.__init__||[];return function(){A.forEach(N=>{typeof N=="string"?v.get(N):v.invoke(N)})}}function F(y){const v=y.__exports__;if(v){const A=y.__modules__,N=Object.keys(y).reduce((_,q)=>(q!=="__exports__"&&q!=="__modules__"&&q!=="__init__"&&q!=="__depends__"&&(_[q]=y[q]),_),Object.create(null)),x=(A||[]).concat(N),E=z(x),H=cr(function(_){return E.get(_)});v.forEach(function(_){i[_]=[H,_,"private",E]});const L=(y.__init__||[]).slice();return L.unshift(function(){E.init()}),y=Object.assign({},y,{__init__:L}),V(y,E)}return Object.keys(y).forEach(function(A){if(A==="__init__"||A==="__depends__")return;const N=y[A];if(N[2]==="private"){i[A]=N;return}const x=N[0],E=N[1];i[A]=[G[x],Np(x,E),x]}),V(y,a)}function S(y,v){return y.indexOf(v)!==-1||(y=(v.__depends__||[]).reduce(S,y),y.indexOf(v)!==-1)?y:y.concat(v)}function B(y){const v=y.reduce(S,[]).map(F);let A=!1;return function(){A||(A=!0,v.forEach(N=>N()))}}this.get=f,this.invoke=m,this.instantiate=h,this.createChild=z,this.init=B(e)}function Np(e,t){return e!=="value"&&Ai(t)&&(t=cr(t.slice())),t}var Pp=1;function Ct(e,t){pt.call(this,e,Pp),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})}nt(Ct,pt),Ct.prototype.canRender=function(){return!0},Ct.prototype.drawShape=function(t,n,r){var i=xe("rect");return Se(i,{x:0,y:0,width:n.width||0,height:n.height||0}),sa(n)?Se(i,le({},this.FRAME_STYLE,r||{})):Se(i,le({},this.SHAPE_STYLE,r||{})),Pe(t,i),i},Ct.prototype.drawConnection=function(t,n,r){var i=mi(n.waypoints,le({},this.CONNECTION_STYLE,r||{}));return Pe(t,i),i},Ct.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 Vt(a)},Ct.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 Vt(o)},Ct.$inject=["eventBus","styles"];function Dp(){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 le(o,{class:n})},this.style=function(n,r){!Ge(n)&&!r&&(r=n,n=[]);var i=tn(n,function(o,a){return le(o,e[a]||{})},{});return r?le(i,r):i},this.computeStyle=function(n,r,i){return Ge(r)||(i=r,r=[]),t.style(r||[],le({},i,n||{}))}}const Ip={__init__:["defaultRenderer"],defaultRenderer:["type",Ct],styles:["type",Dp]};function Op(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return n!==-1&&e.splice(n,1),n}function Bp(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 ur(e,t){return Math.round(e*t)/t}function Ja(e){return Et(e)?e+"px":e}function Mp(e){for(;e.parent;)e=e.parent;return e}function Lp(e){e=le({},{width:"100%",height:"100%"},e);const t=e.container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container djs-parent"),ze(n,{position:"relative",overflow:"hidden",width:Ja(e.width),height:Ja(e.height)}),t.appendChild(n),n}function Za(e,t,n){const r=xe("g");it(r).add(t);const i=n!==void 0?n:e.childNodes.length-1;return e.insertBefore(r,e.childNodes[i]||null),r}const Fp="base",Qa=0,$p=1,Vp={shape:["x","y","width","height"],connection:["waypoints"]};function de(e,t,n,r){this._eventBus=t,this._elementRegistry=r,this._graphicsFactory=n,this._rootsIdx=0,this._layers={},this._planes=[],this._rootElement=null,this._focused=!1,this._init(e||{})}de.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],de.prototype._init=function(e){const t=this._eventBus,n=this._container=Lp(e),r=this._svg=xe("svg");Se(r,{width:"100%",height:"100%"}),wa(r,"tabindex",0),e.autoFocus&&t.on("element.hover",()=>{this.restoreFocus()}),t.on("element.mousedown",500,o=>{this.focus()}),r.addEventListener("focusin",()=>{this._setFocused(!0)}),r.addEventListener("focusout",()=>{this._setFocused(!1)}),r.addEventListener("mouseover",()=>{this._eventBus.fire("canvas.mouseover")}),r.addEventListener("mouseout",()=>{this._eventBus.fire("canvas.mouseout")}),Pe(n,r);const i=this._viewport=Za(r,"viewport");e.deferUpdate&&(this._viewboxChanged=ra(this._viewboxChanged,300)),this._restoreFocus=ra(this._restoreFocus,0),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)},de.prototype._destroy=function(){this._restoreFocus.cancel(),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},de.prototype._setFocused=function(e){e!=this._focused&&(this._focused=e,this._eventBus.fire("canvas.focus.changed",{focused:e}))},de.prototype._clear=function(){this._elementRegistry.getAll().forEach(t=>{const n=aa(t);n==="root"?this.removeRootElement(t):this._removeElement(t,n)}),this._planes=[],this._rootElement=null,delete this._cachedViewbox},de.prototype.focus=function(){this._svg.focus({preventScroll:!0}),this._setFocused(!0)},de.prototype.restoreFocus=function(){this._restoreFocus()},de.prototype._restoreFocus=function(){document.activeElement===document.body&&this.focus()},de.prototype.isFocused=function(){return this._focused},de.prototype.getDefaultLayer=function(){return this.getLayer(Fp,Qa)},de.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},de.prototype._getChildIndex=function(e){return tn(this._layers,function(t,n){return n.visible&&e>=n.index&&t++,t},0)},de.prototype._createLayer=function(e,t){typeof t>"u"&&(t=$p);const n=this._getChildIndex(t);return{group:Za(this._viewport,"layer-"+e,n),index:t,visible:!0}},de.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},de.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&&(Jn(n),t.visible=!1),n},de.prototype._removeLayer=function(e){const t=this._layers[e];t&&(delete this._layers[e],Jn(t.group))},de.prototype.getActiveLayer=function(){const e=this._findPlaneForRoot(this.getRootElement());return e?e.layer:null},de.prototype.findRoot=function(e){const t=this._resolveElements(e);let n;for(const r of t){const i=this._findPlaneForRoot(Mp(r));if(!i||n&&i.rootElement!==n)return;n=i.rootElement}return n},de.prototype.getRootElements=function(){return this._planes.map(function(e){return e.rootElement})},de.prototype._findPlaneForRoot=function(e){return Qe(this._planes,function(t){return t.rootElement===e})},de.prototype._resolveElement=function(e){return typeof e=="string"?this._elementRegistry.get(e):e},de.prototype._resolveElements=function(e){return Ge(e)||(e=[e]),e.map(t=>this._resolveElement(t)).filter(Boolean)},de.prototype.getContainer=function(){return this._container},de.prototype._updateMarker=function(e,t,n){let r;e=this._resolveElement(e),e.markers=e.markers||new Set,r=this._elementRegistry._elements[e.id],r&&(oe([r.gfx,r.secondaryGfx],function(i){i&&(n?(e.markers.add(t),it(i).add(t)):(e.markers.delete(t),it(i).remove(t)))}),this._eventBus.fire("element.marker.update",{element:e,gfx:r.gfx,marker:t,add:!!n}))},de.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},de.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},de.prototype.hasMarker=function(e,t){return e=this._resolveElement(e),e.markers?e.markers.has(t):!1},de.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},de.prototype.getRootElement=function(){const e=this._rootElement;return e||this._planes.length?e:this.setRootElement(this.addRootElement(null))},de.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,Qa);return this.hideLayer(n),this._addRoot(e,r),this._planes.push({rootElement:e,layer:r}),e},de.prototype.removeRootElement=function(e){if(e=this._resolveElement(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},de.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},de.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)},de.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})},de.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})},de.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=Vp[e];if(!ea(n,function(i){return typeof t[i]<"u"}))throw new Error("must supply { "+n.join(", ")+" } with "+e)},de.prototype._setParent=function(e,t,n){Bp(t.children,e,n),e.parent=t},de.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},de.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},de.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},de.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),Op(e.parent&&e.parent.children,e),e.parent=null,i.fire(t+".removed",{element:e}),n.remove(e),e},de.prototype.removeShape=function(e){return this._removeElement(e,"shape")},de.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},de.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},de.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},de.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},de.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,f,d;if(e)this._changeViewbox(function(){s=Math.min(n.width/e.width,n.height/e.height);const h=this._svg.createSVGMatrix().scale(s).translate(-e.x,-e.y);wn(t,h)});else return o=this._rootElement?this.getActiveLayer():null,r=o&&o.getBBox()||{},a=wn(t),i=a?a.matrix:jf(),s=ur(i.a,1e3),f=ur(-i.e||0,1e3),d=ur(-i.f||0,1e3),e=this._cachedViewbox={x:f?f/s:0,y:d?d/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},de.prototype.scroll=function(e){const t=this._viewport;let n=t.getCTM();return e&&this._changeViewbox(function(){e=le({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),es(t,n)}),{x:n.e,y:n.f}},de.prototype.scrollToElement=function(e,t){let n=100;const r=this._resolveElements(e);if(!r.length)return;const i=this.findRoot(r);if(!i)return;i!==this.getRootElement()&&this.setRootElement(i);const o=r.filter(G=>G!=i);if(!o.length)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 a=gn(o),s=Ei(a),f=this.viewbox(),d=this.zoom();let h,m;f.y+=t.top/d,f.x+=t.left/d,f.width-=(t.right+t.left)/d,f.height-=(t.bottom+t.top)/d;const k=Ei(f);if(!(a.width<f.width&&a.height<f.height))h=a.x-f.x,m=a.y-f.y;else{const G=Math.max(0,s.right-k.right),V=Math.min(0,s.left-k.left),F=Math.max(0,s.bottom-k.bottom),S=Math.min(0,s.top-k.top);h=G||V,m=F||S}this.scroll({dx:-h*d,dy:-m*d})},de.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)}),ur(r.a,1e3)};function es(e,t){const n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}de.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},de.prototype._setZoom=function(e,t){const n=this._svg,r=this._viewport,i=n.createSVGMatrix(),o=n.createSVGPoint();let a,s,f,d,h;f=r.getCTM();const m=f.a;return t?(a=le(o,t),s=a.matrixTransform(f.inverse()),d=i.translate(s.x,s.y).scale(1/m*e).translate(-s.x,-s.y),h=f.multiply(d)):h=i.scale(e),es(this._viewport,h),h},de.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},de.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}},de.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};var on="data-element-id";function He(e){this._elements={},this._eventBus=e}He.$inject=["eventBus"],He.prototype.add=function(e,t,n){var r=e.id;this._validateId(r),Se(t,on,r),n&&Se(n,on,r),this._elements[r]={element:e,gfx:t,secondaryGfx:n}},He.prototype.remove=function(e){var t=this._elements,n=e.id||e,r=n&&t[n];r&&(Se(r.gfx,on,""),r.secondaryGfx&&Se(r.secondaryGfx,on,""),delete t[n])},He.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)},He.prototype.updateGraphics=function(e,t,n){var r=e.id||e,i=this._elements[r];return n?i.secondaryGfx=t:i.gfx=t,t&&Se(t,on,r),t},He.prototype.get=function(e){var t;typeof e=="string"?t=e:t=e&&Se(e,on);var n=this._elements[t];return n&&n.element},He.prototype.filter=function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(n)}),t},He.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}},He.prototype.getAll=function(){return this.filter(function(e){return e})},He.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)})},He.prototype.getGraphics=function(e,t){var n=e.id||e,r=this._elements[n];return r&&(t?r.secondaryGfx:r.gfx)},He.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 jp(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 Up(e){return e.__refs_collection===!0}function zp(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function ts(e,t,n){var r=jp(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 Hp(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 Je(e,t){if(!(this instanceof Je))return new Je(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}Je.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?ts(this,t,e):Hp(this,t,e)},Je.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return Up(n)||ts(this,t,e),n},Je.prototype.ensureBound=function(e,t){zp(e,t)||this.bind(e,t)},Je.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},Je.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)};var Ci=new Je({name:"children",enumerable:!0,collection:!0},{name:"parent"}),ns=new Je({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),rs=new Je({name:"attachers",collection:!0},{name:"host"}),is=new Je({name:"outgoing",collection:!0},{name:"source"}),os=new Je({name:"incoming",collection:!0},{name:"target"});function _n(){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)}}),Ci.bind(this,"parent"),ns.bind(this,"labels"),is.bind(this,"outgoing"),os.bind(this,"incoming")}function xn(){_n.call(this),Ci.bind(this,"children"),rs.bind(this,"host"),rs.bind(this,"attachers")}nt(xn,_n);function as(){_n.call(this),Ci.bind(this,"children")}nt(as,xn);function ss(){xn.call(this),ns.bind(this,"labelTarget")}nt(ss,xn);function ls(){_n.call(this),is.bind(this,"source"),os.bind(this,"target")}nt(ls,_n);var Wp={connection:ls,shape:xn,label:ss,root:as};function qp(e,t){var n=Wp[e];if(!n)throw new Error("unknown type: <"+e+">");return le(new n,t)}function an(){this._uid=12}an.prototype.createRoot=function(e){return this.create("root",e)},an.prototype.createLabel=function(e){return this.create("label",e)},an.prototype.createShape=function(e){return this.create("shape",e)},an.prototype.createConnection=function(e){return this.create("connection",e)},an.prototype.create=function(e,t){return t=le({},t||{}),t.id||(t.id=e+"_"+this._uid++),qp(e,t)};var fr="__fn",cs=1e3,Yp=Array.prototype.slice;function Ue(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}Ue.prototype.on=function(e,t,n,r){if(e=Ge(e)?e:[e],Lt(t)&&(r=n,n=t,t=cs),!Et(t))throw new Error("priority must be a number");var i=n;r&&(i=_t(n,r),i[fr]=n[fr]||n);var o=this;e.forEach(function(a){o._addListener(a,{priority:t,callback:i,next:null})})},Ue.prototype.once=function(e,t,n,r){var i=this;if(Lt(t)&&(r=n,n=t,t=cs),!Et(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[fr]=n,this.on(e,t,o)},Ue.prototype.off=function(e,t){e=Ge(e)?e:[e];var n=this;e.forEach(function(r){n._removeListener(r,t)})},Ue.prototype.createEvent=function(e){var t=new Sn;return t.init(e),t},Ue.prototype.fire=function(e,t){var n,r,i,o;if(o=Yp.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 Sn?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}},Ue.prototype.handleError=function(e){return this.fire("error",{error:e})===!1},Ue.prototype._destroy=function(){this._listeners={}},Ue.prototype._invokeListeners=function(e,t,n){for(var r;n&&!e.cancelBubble;)r=this._invokeListener(e,t,n),n=n.next;return r},Ue.prototype._invokeListener=function(e,t,n){var r;if(n.callback.__isTomb)return r;try{r=Kp(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},Ue.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},Ue.prototype._getListeners=function(e){return this._listeners[e]},Ue.prototype._setListeners=function(e,t){this._listeners[e]=t},Ue.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[fr]===t)&&(i?i.next=r:this._setListeners(e,r)),i=n,n=r};function Sn(){}Sn.prototype.stopPropagation=function(){this.cancelBubble=!0},Sn.prototype.preventDefault=function(){this.defaultPrevented=!0},Sn.prototype.init=function(e){le(this,e||{})};function Kp(e,t){return e.apply(null,t)}function Gp(e){return e.childNodes[0]}function Xp(e){return e.parentNode.childNodes[1]}function We(e,t){this._eventBus=e,this._elementRegistry=t}We.$inject=["eventBus","elementRegistry"],We.prototype._getChildrenContainer=function(e){var t=this._elementRegistry.getGraphics(e),n;return e.parent?(n=Xp(t),n||(n=xe("g"),it(n).add("djs-children"),Pe(t.parentNode,n))):n=t,n},We.prototype._clear=function(e){var t=Gp(e);return ba(t),t},We.prototype._createContainer=function(e,t,n,r){var i=xe("g");it(i).add("djs-group"),typeof n<"u"?Jp(i,t,t.childNodes[n]):Pe(t,i);var o=xe("g");it(o).add("djs-element"),it(o).add("djs-"+e),r&&it(o).add("djs-frame"),Pe(i,o);var a=xe("g");return it(a).add("djs-visual"),Pe(o,a),o},We.prototype.create=function(e,t,n){var r=this._getChildrenContainer(t.parent);return this._createContainer(e,r,n,sa(t))},We.prototype.updateContainments=function(e){var t=this,n=this._elementRegistry,r;r=tn(e,function(i,o){return o.parent&&(i[o.parent.id]=o.parent),i},{}),oe(r,function(i){var o=i.children;if(o){var a=t._getChildrenContainer(i),s=a.firstChild;oe(o,function(f){var d=n.getGraphics(f).parentNode;d===s?s=s.nextSibling:a.insertBefore(d,s)})}})},We.prototype.drawShape=function(e,t,n={}){var r=this._eventBus;return r.fire("render.shape",{gfx:e,element:t,attrs:n})},We.prototype.getShapePath=function(e){var t=this._eventBus;return t.fire("render.getShapePath",e)},We.prototype.drawConnection=function(e,t,n={}){var r=this._eventBus;return r.fire("render.connection",{gfx:e,element:t,attrs:n})},We.prototype.getConnectionPath=function(e){var t=this._eventBus;return t.fire("render.getConnectionPath",e)},We.prototype.update=function(e,t,n){if(t.parent){var r=this._clear(n);if(e==="shape")this.drawShape(r,t),Aa(n,t.x,t.y);else if(e==="connection")this.drawConnection(r,t);else throw new Error("unknown type: "+e);t.hidden?Se(n,"display","none"):Se(n,"display","block")}},We.prototype.remove=function(e){var t=this._elementRegistry.getGraphics(e);Jn(t.parentNode)};function Jp(e,t,n){var r=n||t.firstChild;e!==r&&t.insertBefore(e,r)}const Zp={__depends__:[Ip],__init__:["canvas"],canvas:["type",de],elementRegistry:["type",He],elementFactory:["type",an],eventBus:["type",Ue],graphicsFactory:["type",We]};function Qp(e){var t=new Xa(e);return t.init(),t}function eh(e){e=e||{};var t={config:["value",e]},n=[t,Zp].concat(e.modules||[]);return Qp(n)}function Rt(e,t){this._injector=t||eh(e),this.get("eventBus").fire("diagram.init")}Rt.prototype.get=function(e,t){return this._injector.get(e,t)},Rt.prototype.invoke=function(e,t,n){return this._injector.invoke(e,t,n)},Rt.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},Rt.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};function Ri(){}Ri.prototype.get=function(e){return this.$model.properties.get(this,e)},Ri.prototype.set=function(e,t){this.$model.properties.set(this,e,t)};function us(e,t){this.model=e,this.properties=t}us.prototype.createType=function(e){var t=this.model,n=this.properties,r=Object.create(Ri.prototype);oe(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}),oe(a,_t(function(s,f){this.set(f,s)},this))}return o.prototype=r,o.hasType=r.$instanceOf=this.model.hasType,n.defineModel(o,t),n.defineDescriptor(o,e),o};var th=le(Object.create(null),{String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0}),fs=le(Object.create(null),{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 Ti(e,t){var n=fs[e];return n?n(t):t}function Ni(e){return!!th[e]}function ds(e){return!!fs[e]}function Oe(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 qe(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName=Object.create(null),this.properties=[],this.propertiesByName=Object.create(null)}qe.prototype.build=function(){return bf(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},qe.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)},qe.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},qe.prototype.redefineProperty=function(e,t,n){var r=e.ns.prefix,i=t.split("#"),o=Oe(i[0],r),a=Oe(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},qe.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},qe.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},qe.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},qe.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},qe.prototype.assertNotTrait=function(e){if((e.extends||[]).length)throw new Error(`cannot create <${e.name}> extending <${e.extends}>`)},qe.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")},qe.prototype.hasProperty=function(e){return this.propertiesByName[e]},qe.prototype.addTrait=function(e,t){t&&this.assertNotTrait(e);var n=this.allTypesByName,r=this.allTypes,i=e.name;i in n||(oe(e.properties,_t(function(o){o=le({},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 Tt(e,t){this.packageMap=Object.create(null),this.typeMap=Object.create(null),this.packages=[],this.properties=t,oe(e,_t(this.registerPackage,this))}Tt.prototype.getPackage=function(e){return this.packageMap[e]},Tt.prototype.getPackages=function(){return this.packages},Tt.prototype.registerPackage=function(e){e=le({},e);var t=this.packageMap;ps(t,e,"prefix"),ps(t,e,"uri"),oe(e.types,_t(function(n){this.registerType(n,e)},this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},Tt.prototype.registerType=function(e,t){e=le({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:le({},e.meta||{})});var n=Oe(e.name,t.prefix),r=n.name,i=Object.create(null);oe(e.properties,_t(function(o){var a=Oe(o.name,n.prefix),s=a.name;Ni(o.type)||(o.type=Oe(o.type,a.prefix).name),le(o,{ns:a,name:s}),i[s]=o},this)),le(e,{ns:n,name:r,propertiesByName:i}),oe(e.extends,_t(function(o){var a=Oe(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},Tt.prototype.mapTypes=function(e,t,n){var r=Ni(e.name)?{name:e.name}:this.typeMap[e.name],i=this;function o(f,d){var h=Oe(f,Ni(f)?"":e.prefix);i.mapTypes(h,t,d)}function a(f){return o(f,!0)}function s(f){return o(f,!1)}if(!r)throw new Error("unknown type <"+e.name+">");oe(r.superClass,n?a:s),t(r,!n),oe(r.traits,a)},Tt.prototype.getEffectiveDescriptor=function(e){var t=Oe(e),n=new qe(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},Tt.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})};function ps(e,t,n){var r=t[n];if(r in e)throw new Error("package with "+n+" <"+r+"> already defined")}function Ht(e){this.model=e}Ht.prototype.set=function(e,t,n){if(!rt(t)||!t.length)throw new TypeError("property name must be a non-empty string");var r=this.getProperty(e,t),i=r&&r.name;nh(n)?r?delete e[i]:delete e.$attrs[Pi(t)]:r?i in e?e[i]=n:hs(e,r,n):e.$attrs[Pi(t)]=n},Ht.prototype.get=function(e,t){var n=this.getProperty(e,t);if(!n)return e.$attrs[Pi(t)];var r=n.name;return!e[r]&&n.isMany&&hs(e,n,[]),e[r]},Ht.prototype.define=function(e,t,n){if(!n.writable){var r=n.value;n=le({},n,{get:function(){return r}}),delete n.value}Object.defineProperty(e,t,n)},Ht.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},Ht.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},Ht.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 nh(e){return typeof e>"u"}function hs(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function Pi(e){return e.replace(/^:/,"")}function Ze(e,t={}){this.properties=new Ht(this),this.factory=new us(this,this.properties),this.registry=new Tt(e,this.properties),this.typeCache=Object.create(null),this.config=t}Ze.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},Ze.prototype.getType=function(e){var t=this.typeCache,n=rt(e)?e:e.ns.name,r=t[n];return r||(e=this.registry.getEffectiveDescriptor(n),r=t[n]=this.factory.createType(e)),r},Ze.prototype.createAny=function(e,t,n){var r=Oe(e),i={$type:e,$instanceOf:function(a){return a===this.$type},get:function(a){return this[a]},set:function(a,s){wf(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}),oe(n,function(a,s){bt(a)&&a.value!==void 0?i[a.name]=a.value:i[s]=a}),i},Ze.prototype.getPackage=function(e){return this.registry.getPackage(e)},Ze.prototype.getPackages=function(){return this.registry.getPackages()},Ze.prototype.getElementDescriptor=function(e){return e.$descriptor},Ze.prototype.hasType=function(e,t){t===void 0&&(t=e,e=this);var n=e.$model.getElementDescriptor(e);return t in n.allTypesByName},Ze.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},Ze.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};var ms=String.fromCharCode,rh=Object.prototype.hasOwnProperty,ih=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,An={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(An).forEach(function(e){An[e.toUpperCase()]=An[e]});function oh(e,t,n,r){return r?rh.call(An,r)?An[r]:"&"+r+";":ms(t||parseInt(n,16))}function Wt(e){return e.length>3&&e.indexOf("&")!==-1?e.replace(ih,oh):e}var ys="non-whitespace outside of root node";function Nt(e){return new Error(e)}function ah(e){return"missing namespace for prefix <"+e+">"}function dr(e){return{get:e,enumerable:!0}}function sh(e){var t=Object.create(null),n;for(n in e)t[n]=e[n];return t}var gs=Symbol("nameCache");function Di(e){return e+"$uri"}function lh(e){var t=Object.create(null),n,r;for(n in e)r=e[n],t[r]=r,t[Di(r)]=n;return t}function pr(){return{line:0,column:0}}function ch(e){throw e}function vs(e){if(!this)return new vs(e);var t=e&&e.proxy,n,r,i,o,a=ch,s,f,d,h,m=pr,k=!1,z=!1,G="",V=!1,F=!1,S=null,B=!1,y,v,A,N;function x(_){_ instanceof Error||(_=Nt(_)),S=_,a(_,m)}function E(_){s&&(_ instanceof Error||(_=Nt(_)),s(_,m))}this.on=function(_,q){if(typeof q!="function")throw Nt("required args <name, cb>");switch(_){case"openTag":r=q;break;case"text":n=q;break;case"closeTag":i=q;break;case"error":a=q;break;case"warn":s=q;break;case"cdata":o=q;break;case"attention":h=q;break;case"question":d=q;break;case"comment":f=q;break;default:throw Nt("unsupported event: "+_)}return this},this.ns=function(_){if(typeof _>"u"&&(_={}),typeof _!="object")throw Nt("required args <nsMap={}>");var q=Object.create(null),se;for(se in _)q[se]=_[se];return F=!0,N=q,this};function H(){y=F?[]:null,v=F?lh(N):null,A=[],m=pr,B=!1,S=null,z=!1,G=""}this.parse=function(_){if(typeof _!="string")throw Nt("required args <xml=string>");if(k)throw Nt("parse during stream; call end() first");return H(),L(_),m=pr,B=!1,S},this.write=function(_){if(typeof _!="string")throw Nt("required args <xml=string>");return k||(H(),k=!0),S||(G=L(G+_,!0)||""),this},this.end=function(){return k||H(),k=!1,S||L(G),G="",m=pr,B=!1,S},this.stop=function(){B=!0};function L(_,q=!1){var se=null,Z=null,K,X=0,ee=!1,J=!1,M=0,I=0,$,C,R,U,pe,ae,p,u,c,g="",b=0,D;function Q(Y,T){var W=Y.indexOf(":");if(W===-1)return Y;var re=v[Y.substring(0,W)];return re?T===re?Y.substr(W+1):re+Y.substr(W):(E(ah(Y.substring(0,W))),null)}function ue(){if(D!==null)return D;var Y,T,W=F&&v.xmlns,re=F&&V?[]:null,O=b,ie=g,ye=ie.length,et,Re,Ye,ft,Ne,Tn={},Gs=new Set,tt,we,be;e:for(;O<ye;O++)if(tt=!1,we=ie.charCodeAt(O),!(we===32||we<14&&we>8)){for((we<65||we>122||we>90&&we<97)&&we!==95&&we!==58&&(E("illegal first char attribute name"),tt=!0),be=O+1;be<ye;be++)if(we=ie.charCodeAt(be),!(we>96&&we<123||we>64&&we<91||we>47&&we<59||we===46||we===45||we===95)){if(we===32||we<14&&we>8){E("missing attribute value"),O=be;continue e}if(we===61)break;E("illegal attribute name char"),tt=!0}if(Ne=ie.substring(O,be),Ne==="xmlns:xmlns"&&(E("illegal declaration of xmlns"),tt=!0),we=ie.charCodeAt(be+1),we===34)be=ie.indexOf('"',O=be+2),be===-1&&(be=ie.indexOf("'",O),be!==-1&&(E("attribute value quote missmatch"),tt=!0));else if(we===39)be=ie.indexOf("'",O=be+2),be===-1&&(be=ie.indexOf('"',O),be!==-1&&(E("attribute value quote missmatch"),tt=!0));else for(E("missing attribute value quotes"),tt=!0,be=be+1;be<ye&&(we=ie.charCodeAt(be+1),!(we===32||we<14&&we>8));be++);for(be===-1&&(E("missing closing quotes"),be=ye,tt=!0),tt||(Ye=ie.substring(O,be)),O=be;be+1<ye&&(we=ie.charCodeAt(be+1),!(we===32||we<14&&we>8));be++)O===be&&(E("illegal character after attribute end"),tt=!0);if(O=be+1,tt)continue e;if(Gs.has(Ne)){E("attribute <"+Ne+"> already defined");continue}if(Gs.add(Ne),!F){Tn[Ne]=Ye;continue}if(V){if(Re=Ne==="xmlns"?"xmlns":Ne.charCodeAt(0)===120&&Ne.substr(0,6)==="xmlns:"?Ne.substr(6):null,Re!==null){if(Y=Wt(Ye),T=Di(Re),ft=N[Y],!ft){if(Re==="xmlns"||T in v&&v[T]!==Y)do ft="ns"+X++;while(typeof v[ft]<"u");else ft=Re;N[Y]=ft}v[Re]!==ft&&(et||(v=sh(v),et=!0),v[Re]=ft,Re==="xmlns"&&(v[Di(ft)]=Y,W=ft),v[T]=Y),Tn[Ne]=Ye;continue}re.push(Ne,Ye);continue}Ne=Q(Ne,W),Ne!==null&&(Tn[Ne]=Ye)}if(V)for(O=0,ye=re.length;O<ye;O++)Ne=Q(re[O++],W),Ye=re[O],Ne!==null&&(Tn[Ne]=Ye);return D=Tn}function P(){for(var Y=/(\r\n|\r|\n)/g,T=0,W=0,re=0,O=I,ie,ye;M>=re&&(ie=Y.exec(_),!(!ie||(O=ie[0].length+ie.index,O>M)));)T+=1,re=O;return M==-1?(W=O,ye=_.substring(I)):I===0?ye=_.substring(I,M):(W=M-re,ye=I==-1?_.substring(M):_.substring(M,I+1)),{data:ye,line:T,column:W}}for(m=P,t&&(c=Object.create({},{name:dr(function(){return p}),originalName:dr(function(){return u}),attrs:dr(ue),ns:dr(function(){return v})}));I!==-1;){if(_.charCodeAt(I)===60?M=I:M=_.indexOf("<",I),M===-1){if(q)return _.substring(I);if(A.length)return x("unexpected end of file");if(!z)return x("missing start tag");I<_.length&&_.substring(I).trim()&&E(ys);return}if(z||(z=!0),I!==M){if(A.length){if(n&&(n(_.substring(I,M),Wt,m),B))return}else if(_.substring(I,M).trim()&&(E(ys),B))return}if(U=_.charCodeAt(M+1),U===33){if(R=_.charCodeAt(M+2),R===91&&_.substr(M+3,6)==="CDATA["){if(I=_.indexOf("]]>",M),I===-1)return q?_.substring(M):x("unclosed cdata");if(o&&(o(_.substring(M+9,I),m),B))return;I+=3;continue}if(R===45&&_.charCodeAt(M+3)===45){if(I=_.indexOf("-->",M),I===-1)return q?_.substring(M):x("unclosed comment");if(f&&(f(_.substring(M+4,I),Wt,m),B))return;I+=3;continue}}if(U===63){if(I=_.indexOf("?>",M),I===-1)return q?_.substring(M):x("unclosed question");if(d&&(d(_.substring(M,I+2),m),B))return;I+=2;continue}for($=M+1;;$++){if(pe=_.charCodeAt($),isNaN(pe))return q?_.substring(M):(I=-1,x("unclosed tag"));if(pe===34)R=_.indexOf('"',$+1),$=R!==-1?R:$;else if(pe===39)R=_.indexOf("'",$+1),$=R!==-1?R:$;else if(pe===62){I=$;break}}if(U===33){if(h&&(h(_.substring(M,I+1),Wt,m),B))return;I+=1;continue}if(D={},U===47){if(ee=!1,J=!0,!A.length)return x("missing open tag");if($=p=A.pop(),R=M+2+$.length,_.substring(M+2,R)!==$)return x("closing tag mismatch");for(;R<I;R++)if(U=_.charCodeAt(R),!(U===32||U>8&&U<14))return x("close tag")}else{if(_.charCodeAt(I-1)===47?($=p=_.substring(M+1,I-1),ee=!0,J=!0):($=p=_.substring(M+1,I),ee=!0,J=!1),!(U>96&&U<123||U>64&&U<91||U===95||U===58))return x("illegal first char nodeName");for(R=1,C=$.length;R<C;R++)if(U=$.charCodeAt(R),!(U>96&&U<123||U>64&&U<91||U>47&&U<59||U===45||U===95||U==46)){if(U===32||U<14&&U>8){p=$.substring(0,R),D=null;break}return x("invalid nodeName")}J||A.push(p)}if(F){K=v,ee&&(J||y.push(K),D===null&&(V=$.indexOf("xmlns",R)!==-1)&&(b=R,g=$,ue(),V=!1)),u=p,Z!==v&&(se=v[gs],se===void 0&&(se=v[gs]=Object.create(null)),Z=v);var j=se[p];if(j!==void 0)p=j;else{if(U=p.indexOf(":"),U!==-1){if(ae=v[p.substring(0,U)],!ae)return x("missing namespace on <"+u+">");p=p.substr(U+1)}else ae=v.xmlns;ae&&(p=ae+":"+p),se[u]=p}}if(ee&&(b=R,g=$,r&&(t?r(c,Wt,J,m):r(p,ue,Wt,J,m),B)))return;if(J){if(i&&(i(t?c:p,Wt,ee,m),B))return;F&&(ee?v=K:v=y.pop())}I+=1}}}function ws(e){return e.xml&&e.xml.tagAlias==="lowerCase"}var Ii={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"},bs="property";function Es(e){return e.xml&&e.xml.serialize}function uh(e){const t=Es(e);return t!==bs&&(t||null)}function fh(e){return e.charAt(0).toUpperCase()+e.slice(1)}function _s(e,t){return ws(t)?e.prefix+":"+fh(e.localName):e.name}function dh(e,t){var n=e.name,r=e.localName,i=t&&t.xml&&t.xml.typePrefix;return i&&r.indexOf(i)===0?e.prefix+":"+r.slice(i.length):n}function ph(e,t,n){const r=Oe(e,t.xmlns),i=`${t[r.prefix]||r.prefix}:${r.localName}`,o=Oe(i);var a=n.getPackage(o.prefix);return dh(o,a)}function Pt(e){return new Error(e)}function vt(e){return e.$descriptor}function hh(e){le(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(t){this.references.push(t)},this.addElement=function(t){if(!t)throw Pt("expected element");var n=this.elementsById,r=vt(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 Pt("duplicate ID <"+o+">");n[o]=t}},this.addWarning=function(t){this.warnings.push(t)}}function kn(){}kn.prototype.handleEnd=function(){},kn.prototype.handleText=function(){},kn.prototype.handleNode=function(){};function Oi(){}Oi.prototype=Object.create(kn.prototype),Oi.prototype.handleNode=function(){return this};function sn(){}sn.prototype=Object.create(kn.prototype),sn.prototype.handleText=function(e){this.body=(this.body||"")+e};function Cn(e,t){this.property=e,this.context=t}Cn.prototype=Object.create(sn.prototype),Cn.prototype.handleNode=function(e){if(this.element)throw Pt("expected no sub nodes");return this.element=this.createReference(e),this},Cn.prototype.handleEnd=function(){this.element.id=this.body},Cn.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}};function Bi(e,t){this.element=t,this.propertyDesc=e}Bi.prototype=Object.create(sn.prototype),Bi.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=Ti(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)};function hr(){}hr.prototype=Object.create(sn.prototype),hr.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 Le(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}Le.prototype=Object.create(hr.prototype),Le.prototype.addReference=function(e){this.context.addReference(e)},Le.prototype.handleText=function(e){var t=this.element,n=vt(t),r=n.bodyProperty;if(!r)throw Pt("unexpected body text <"+e+">");sn.prototype.handleText.call(this,e)},Le.prototype.handleEnd=function(){var e=this.body,t=this.element,n=vt(t),r=n.bodyProperty;r&&e!==void 0&&(e=Ti(r.type,e),t.set(r.name,e))},Le.prototype.createElement=function(e){var t=e.attributes,n=this.type,r=vt(n),i=this.context,o=new n({}),a=this.model,s;return oe(t,function(f,d){var h=r.propertiesByName[d],m;h&&h.isReference?h.isMany?(m=f.split(" "),oe(m,function(k){i.addReference({element:o,property:h.ns.name,id:k})})):i.addReference({element:o,property:h.ns.name,id:f}):(h?f=Ti(h.type,f):d==="xmlns"?d=":"+d:(s=Oe(d,r.ns.prefix),a.getPackage(s.prefix)&&i.addWarning({message:"unknown attribute <"+d+">",element:o,property:d,value:f})),o.set(d,f))}),o},Le.prototype.getPropertyForNode=function(e){var t=e.name,n=Oe(t),r=this.type,i=this.model,o=vt(r),a=n.name,s=o.propertiesByName[a];if(s&&!s.isAttr){const d=uh(s);if(d){const h=e.attributes[d];if(h){const m=ph(h,e.ns,i),k=i.getType(m);return le({},s,{effectiveType:vt(k).name})}}return s}var f=i.getPackage(n.prefix);if(f){const d=_s(n,f),h=i.getType(d);if(s=Qe(o.properties,function(m){return!m.isVirtual&&!m.isReference&&!m.isAttribute&&h.hasType(m.type)}),s)return le({},s,{effectiveType:vt(h).name})}else if(s=Qe(o.properties,function(d){return!d.isReference&&!d.isAttribute&&d.type==="Element"}),s)return s;throw Pt("unrecognized element <"+n.name+">")},Le.prototype.toString=function(){return"ElementDescriptor["+vt(this.type).name+"]"},Le.prototype.valueHandler=function(e,t){return new Bi(e,t)},Le.prototype.referenceHandler=function(e){return new Cn(e,this.context)},Le.prototype.handler=function(e){return e==="Element"?new ln(this.model,e,this.context):new Le(this.model,e,this.context)},Le.prototype.handleChild=function(e){var t,n,r,i;if(t=this.getPropertyForNode(e),r=this.element,n=t.effectiveType||t.type,ds(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?(le(o,{element:r}),this.context.addReference(o)):o.$parent=r),i};function Mi(e,t,n){Le.call(this,e,t,n)}Mi.prototype=Object.create(Le.prototype),Mi.prototype.createElement=function(e){var t=e.name,n=Oe(t),r=this.model,i=this.type,o=r.getPackage(n.prefix),a=o&&_s(n,o)||t;if(!i.hasType(a))throw Pt("unexpected element <"+e.originalName+">");return Le.prototype.createElement.call(this,e)};function ln(e,t,n){this.model=e,this.context=n}ln.prototype=Object.create(hr.prototype),ln.prototype.createElement=function(e){var t=e.name,n=Oe(t),r=n.prefix,i=e.ns[r+"$uri"],o=e.attributes;return this.model.createAny(t,i,o)},ln.prototype.handleChild=function(e){var t=new ln(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},ln.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)};function Li(e){e instanceof Ze&&(e={model:e}),le(this,{lax:!1},e)}Li.prototype.fromXML=function(e,t,n){var r=t.rootHandler;t instanceof Le?(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 hh(le({},t,{rootHandler:r})),s=new vs({proxy:!0}),f=mh();r.context=a,f.push(r);function d(A,N,x){var E=N(),H=E.line,L=E.column,_=E.data;_.charAt(0)==="<"&&_.indexOf(" ")!==-1&&(_=_.slice(0,_.indexOf(" "))+">");var q="unparsable content "+(_?_+" ":"")+`detected
|
|
10
10
|
line: `+H+`
|
|
11
|
-
column: `+
|
|
12
|
-
nested error: `+
|
|
13
|
-
`,
|
|
14
|
-
`),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 Ph(e){e=le({format:!1,preamble:!0},e||{});function t(n,r){var i=r||new Th,o=new Nh(i,e.format);e.preamble&&o.append(mh);var a=new Ee,s=n.$model;if(a.getNamespaces().mapDefaultPrefixes(Dh(s)),a.build(n).serializeTo(o),!r)return i.value}return{toXML:t}}function Dh(e){const t=e.config&&e.config.nsMap||{},n={};for(const r in Ii)n[r]=Ii[r];for(const r in t){const i=t[r];n[i]=r}for(const r of e.getPackages())n[r.prefix]=r.uri;return n}function yr(e,t){Ze.call(this,e,t)}yr.prototype=Object.create(Ze.prototype),yr.prototype.fromXML=function(e,t,n){rt(t)||(n=t,t="bpmn:Definitions");var r=new Li(le({model:this,lax:!0},n)),i=r.handler(t);return r.fromXML(e,i)},yr.prototype.toXML=function(e,t){var n=new Ph(t);return new Promise(function(r,i){try{var o=n.toXML(e);return r({xml:o})}catch(a){return i(a)}})};var Ih="BPMN20",Oh="http://www.omg.org/spec/BPMN/20100524/MODEL",Bh="bpmn",Mh=[],Lh=[{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",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"}]}],Fh=[{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"}]}],$h={tagAlias:"lowerCase",typePrefix:"t"},Vh={name:Ih,uri:Oh,prefix:Bh,associations:Mh,types:Lh,enumerations:Fh,xml:$h},jh="BPMNDI",Uh="http://www.omg.org/spec/BPMN/20100524/DI",zh="bpmndi",Hh=[{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"]}],Wh=[{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"}]}],qh=[],Yh={name:jh,uri:Uh,prefix:zh,types:Hh,enumerations:Wh,associations:qh},Kh="DC",Gh="http://www.omg.org/spec/DD/20100524/DC",Xh="dc",Jh=[{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}]}],Zh=[],Qh={name:Kh,uri:Gh,prefix:Xh,types:Jh,associations:Zh},em="DI",tm="http://www.omg.org/spec/DD/20100524/DI",nm="di",rm=[{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"}]}],im=[],om={tagAlias:"lowerCase"},am={name:em,uri:tm,prefix:nm,types:rm,associations:im,xml:om},sm="bpmn.io colors for BPMN",lm="http://bpmn.io/schema/bpmn/biocolor/1.0",cm="bioc",um=[{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"}]}],fm=[],dm=[],pm={name:sm,uri:lm,prefix:cm,types:um,enumerations:fm,associations:dm},hm="BPMN in Color",mm="http://www.omg.org/spec/BPMN/non-normative/color/1.0",ym="color",gm=[{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"}]}],vm=[],wm=[],bm={name:hm,uri:mm,prefix:ym,types:gm,enumerations:vm,associations:wm};const Em={bpmn:Vh,bpmndi:Yh,dc:Qh,di:am,bioc:pm,color:bm};function _m(e,t){const n=le({},Em,e);return new yr(n,t)}function $e(e,t){return e.$instanceOf(t)}function xm(e){return Qe(e.rootElements,function(t){return $e(t,"bpmn:Process")||$e(t,"bpmn:Collaboration")})}function Sm(e){var t={},n=[],r={};function i(C,R){return function(j){C(j,R)}}function o(C){t[C.id]=C}function a(C){return t[C.id]}function s(C,R){var j=C.gfx;if(j)throw new Error(`already rendered ${Ie(C)}`);return e.element(C,r[C.id],R)}function f(C,R){return e.root(C,r[C.id],R)}function d(C,R){try{var j=r[C.id]&&s(C,R);return o(C),j}catch(de){h(de.message,{element:C,error:de}),console.error(`failed to import ${Ie(C)}`,de)}}function h(C,R){e.error(C,R)}var m=this.registerDi=function(R){var j=R.bpmnElement;j?r[j.id]?h(`multiple DI elements defined for ${Ie(j)}`,{element:j}):r[j.id]=R:h(`no bpmnElement referenced in ${Ie(R)}`,{element:R})};function A(C){V(C.plane)}function V(C){m(C),oe(C.planeElement,G)}function G(C){m(C)}this.handleDefinitions=function(R,j){var de=R.diagrams;if(j&&de.indexOf(j)===-1)throw new Error("diagram not part of <bpmn:Definitions />");if(!j&&de&&de.length&&(j=de[0]),!j)throw new Error("no diagram to display");r={},A(j);var se=j.plane;if(!se)throw new Error(`no plane for ${Ie(j)}`);var p=se.bpmnElement;if(!p)if(p=xm(R),p)h(`correcting missing bpmnElement on ${Ie(se)} to ${Ie(p)}`),se.bpmnElement=p,m(se);else throw new Error("no process or collaboration to display");var u=f(p,se);if($e(p,"bpmn:Process")||$e(p,"bpmn:SubProcess"))M(p,u);else if($e(p,"bpmn:Collaboration"))D(p,u),S(R.rootElements,u);else throw new Error(`unsupported bpmnElement for ${Ie(se)}: ${Ie(p)}`);$(n)};var $=this.handleDeferred=function(){for(var R;n.length;)R=n.shift(),R()};function M(C,R){re(C,R),H(C.ioSpecification,R),x(C.artifacts,R),o(C)}function S(C,R){var j=en(C,function(de){return!a(de)&&$e(de,"bpmn:Process")&&de.laneSets});j.forEach(i(M,R))}function I(C,R){d(C,R)}function y(C,R){oe(C,i(I,R))}function v(C,R){d(C,R)}function k(C,R){d(C,R)}function T(C,R){d(C,R)}function E(C,R){d(C,R)}function x(C,R){oe(C,function(j){$e(j,"bpmn:Association")?n.push(function(){E(j,R)}):E(j,R)})}function H(C,R){C&&(oe(C.dataInputs,i(k,R)),oe(C.dataOutputs,i(T,R)))}var B=this.handleSubProcess=function(R,j){re(R,j),x(R.artifacts,j)};function _(C,R){var j=d(C,R);$e(C,"bpmn:SubProcess")&&B(C,j||R),$e(C,"bpmn:Activity")&&H(C.ioSpecification,R),n.push(function(){oe(C.dataInputAssociations,i(v,R)),oe(C.dataOutputAssociations,i(v,R))})}function q(C,R){d(C,R)}function ae(C,R){d(C,R)}function J(C,R){n.push(function(){var j=d(C,R);C.childLaneSet&&K(C.childLaneSet,j||R),F(C)})}function K(C,R){oe(C.lanes,i(J,R))}function X(C,R){oe(C,i(K,R))}function re(C,R){Q(C.flowElements,R),C.laneSets&&X(C.laneSets,R)}function Q(C,R){oe(C,function(j){$e(j,"bpmn:SequenceFlow")?n.push(function(){q(j,R)}):$e(j,"bpmn:BoundaryEvent")?n.unshift(function(){_(j,R)}):$e(j,"bpmn:FlowNode")?_(j,R):$e(j,"bpmn:DataObject")||($e(j,"bpmn:DataStoreReference")||$e(j,"bpmn:DataObjectReference")?ae(j,R):h(`unrecognized flowElement ${Ie(j)} in context ${Ie(R&&R.businessObject)}`,{element:j,context:R}))})}function O(C,R){var j=d(C,R),de=C.processRef;de&&M(de,j||R)}function D(C,R){oe(C.participants,i(O,R)),n.push(function(){y(C.messageFlows,R)}),x(C.artifacts,R)}function F(C){oe(C.flowNodeRef,function(R){var j=R.get("lanes");j&&j.push(C)})}}function Am(e,t,n){var r,i,o,a,s=[];function f(d,h){var m={root:function($,M){return r.add($,M)},element:function($,M,S){return r.add($,M,S)},error:function($,M){s.push({message:$,context:M})}},A=new Sm(m);h=h||d.diagrams&&d.diagrams[0];var V=km(d,h);if(!V)throw new Error("no diagram to display");oe(V,function($){A.handleDefinitions(d,$)});var G=h.plane.bpmnElement.id;o.setRootElement(o.findRoot(G+"_plane")||o.findRoot(G))}return new Promise(function(d,h){try{return r=e.get("bpmnImporter"),i=e.get("eventBus"),o=e.get("canvas"),i.fire("import.render.start",{definitions:t}),f(t,n),i.fire("import.render.complete",{error:a,warnings:s}),d({warnings:s})}catch(m){return m.warnings=s,h(m)}})}function km(e,t){if(!(!t||!t.plane)){var n=t.plane.bpmnElement,r=n;!ce(n,"bpmn:Process")&&!ce(n,"bpmn:Collaboration")&&(r=Cm(n));var i;ce(r,"bpmn:Collaboration")?i=r:i=Qe(e.rootElements,function(d){if(ce(d,"bpmn:Collaboration"))return Qe(d.participants,function(h){return h.processRef===r})});var o=[r];i&&(o=mf(i.participants,function(d){return d.processRef}),o.push(i));var a=Cs(o),s=[t],f=[n];return oe(e.diagrams,function(d){if(d.plane){var h=d.plane.bpmnElement;a.indexOf(h)!==-1&&f.indexOf(h)===-1&&(s.push(d),f.push(h))}}),s}}function Cs(e){var t=[];return oe(e,function(n){n&&(t.push(n),t=t.concat(Cs(n.flowElements)))}),t}function Cm(e){for(var t=e;t;){if(ce(t,"bpmn:Process"))return t;t=t.$parent}}var Rm='<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>',Rs=Rm,Ts={verticalAlign:"middle"},Ns={color:"#404040"},Tm={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},Nm={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},Pm={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"},Dm='<div class="bjs-powered-by-lightbox"><div class="backdrop"></div><div class="notice"><a href="https://bpmn.io" target="_blank" rel="noopener" class="link">'+Rs+'</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>',lt;function Im(){lt=at(Dm),ze(lt,Tm),ze(ht("svg",lt),Ts),ze(ht(".backdrop",lt),Nm),ze(ht(".notice",lt),Pm),ze(ht(".link",lt),Ns,{margin:"15px 20px 15px 10px",alignSelf:"center"})}function Om(){lt||(Im(),gi.bind(lt,".backdrop","click",function(e){document.body.removeChild(lt)})),document.body.appendChild(lt)}const gr=5,Ps="djs-outline-hidden";function Ae(e){e=le({},Mm,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),this._init(this._container,this._moddle,e),Fm(this._container)}nt(Ae,Rt),Ae.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(A){throw this._emit("import.parse.complete",{error:A}),A}let s=a.rootElement;const f=a.references,d=a.warnings,h=a.elementsById;o=o.concat(d),s=this._emit("import.parse.complete",i({error:null,definitions:s,elementsById:h,references:f,warnings:o}))||s;const m=await this.importDefinitions(s,n);return o=o.concat(m.warnings),this._emit("import.done",{error:null,warnings:o}),{warnings:o}}catch(a){let s=a;throw o=o.concat(s.warnings||[]),vr(s,o),s=Bm(s),this._emit("import.done",{error:s,warnings:s.warnings}),s}},Ae.prototype.importDefinitions=async function(t,n){return this._setDefinitions(t),{warnings:(await this.open(n)).warnings}},Ae.prototype.open=async function(t){const n=this._definitions;let r=t;if(!n){const o=new Error("no XML imported");throw vr(o,[]),o}if(typeof t=="string"&&(r=Lm(n,t),!r)){const o=new Error("BPMNDiagram <"+t+"> not found");throw vr(o,[]),o}try{this.clear()}catch(o){throw vr(o,[]),o}const{warnings:i}=await Am(this,n,r);return{warnings:i}},Ae.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},Ae.prototype.saveSVG=async function(){this._emit("saveSVG.start");let t,n;try{const r=this.get("canvas"),i=r.getActiveLayer(),o=ht(":scope > defs",r._svg),a=ya(i),s=o?"<defs>"+ya(o)+"</defs>":"",f=r.getContainer();jt(f).add(Ps);let d;try{d=i.getBBox()}finally{jt(f).remove(Ps)}const h=d.x-gr,m=d.y-gr,A=d.width+gr*2,V=d.height+gr*2;t=`<?xml version="1.0" encoding="utf-8"?>
|
|
11
|
+
column: `+L+`
|
|
12
|
+
nested error: `+A.message;if(x)return a.addWarning({message:q,error:A}),!0;throw Pt(q)}function h(A,N){return d(A,N,!0)}function m(){var A=a.elementsById,N=a.references,x,E;for(x=0;E=N[x];x++){var H=E.element,L=A[E.id],_=vt(H).propertiesByName[E.property];if(L||a.addWarning({message:"unresolved reference <"+E.id+">",element:E.element,property:E.property,value:E.id}),_.isMany){var q=H.get(_.name),se=q.indexOf(E);se===-1&&(se=q.length),L?q[se]=L:q.splice(se,1)}else H.set(_.name,L)}}function k(){f.pop().handleEnd()}var z=/^<\?xml /i,G=/ encoding="([^"]+)"/i,V=/^utf-8$/i;function F(A){if(z.test(A)){var N=G.exec(A),x=N&&N[1];!x||V.test(x)||a.addWarning({message:"unsupported document encoding <"+x+">, falling back to UTF-8"})}}function S(A,N){var x=f.peek();try{f.push(x.handleNode(A))}catch(E){d(E,N,o)&&f.push(new Oi)}}function B(A,N){try{f.peek().handleText(A)}catch(x){h(x,N)}}function y(A,N){A.trim()&&B(A,N)}var v=i.getPackages().reduce(function(A,N){return A[N.uri]=N.prefix,A},Object.entries(Ii).reduce(function(A,[N,x]){return A[x]=N,A},i.config&&i.config.nsMap||{}));return s.ns(v).on("openTag",function(A,N,x,E){var H=A.attrs||{},L=Object.keys(H).reduce(function(q,se){var Z=N(H[se]);return q[se]=Z,q},{}),_={name:A.name,originalName:A.originalName,attributes:L,ns:A.ns};S(_,E)}).on("question",F).on("closeTag",k).on("cdata",B).on("text",function(A,N,x){y(N(A),x)}).on("error",d).on("warn",h),new Promise(function(A,N){var x;try{s.parse(e),m()}catch(q){x=q}var E=r.element;!x&&!E&&(x=Pt("failed to parse document as <"+r.type.$descriptor.name+">"));var H=a.warnings,L=a.references,_=a.elementsById;return x?(x.warnings=H,N(x)):A({rootElement:E,elementsById:_,references:L,warnings:H})})},Li.prototype.handler=function(e){return new Mi(this.model,e)};function mh(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}var yh=`<?xml version="1.0" encoding="UTF-8"?>
|
|
13
|
+
`,gh=/<|>|'|"|&|\n\r|\n/g,xs=/<|>|&/g;function st(e){this.prefixMap={},this.uriMap={},this.used={},this.wellknown=[],this.custom=[],this.parent=e,this.defaultPrefixMap=e&&e.defaultPrefixMap||{}}st.prototype.mapDefaultPrefixes=function(e){this.defaultPrefixMap=e},st.prototype.defaultUriByPrefix=function(e){return this.defaultPrefixMap[e]},st.prototype.byUri=function(e){return this.uriMap[e]||this.parent&&this.parent.byUri(e)},st.prototype.add=function(e,t){this.uriMap[e.uri]=e,t?this.wellknown.push(e):this.custom.push(e),this.mapPrefix(e.prefix,e.uri)},st.prototype.uriByPrefix=function(e){return this.prefixMap[e||"xmlns"]||this.parent&&this.parent.uriByPrefix(e)},st.prototype.mapPrefix=function(e,t){this.prefixMap[e||"xmlns"]=t},st.prototype.getNSKey=function(e){return e.prefix!==void 0?e.uri+"|"+e.prefix:e.uri},st.prototype.logUsed=function(e){var t=e.uri,n=this.getNSKey(e);this.used[n]=this.byUri(t),this.parent&&this.parent.logUsed(e)},st.prototype.getUsed=function(e){var t=[].concat(this.wellknown,this.custom);return t.filter(n=>{var r=this.getNSKey(n);return this.used[r]})};function vh(e){return e.charAt(0).toLowerCase()+e.slice(1)}function wh(e,t){return ws(t)?vh(e):e}function Ss(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function As(e){return rt(e)?e:(e.prefix?e.prefix+":":"")+e.localName}function bh(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 Eh(e,t){return t.isGeneric?le({localName:t.ns.localName},e):le({localName:wh(t.ns.localName,t.$pkg)},e)}function _h(e,t){return le({localName:t.ns.localName},e)}function xh(e){var t=e.$descriptor;return en(t.properties,function(n){var r=n.name;if(n.isVirtual||!Qt(e,r))return!1;var i=e[r];return i===n.default||i===null?!1:n.isMany?i.length:!0})}var Sh={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},Ah={"<":"lt",">":"gt","&":"amp"};function ks(e,t,n){return e=rt(e)?e:""+e,e.replace(t,function(r){return"&"+n[r]+";"})}function kh(e){return ks(e,gh,Sh)}function Ch(e){return ks(e,xs,Ah)}function Rh(e){return en(e,function(t){return t.isAttr})}function Th(e){return en(e,function(t){return!t.isAttr})}function Fi(e){this.tagName=e}Fi.prototype.build=function(e){return this.element=e,this},Fi.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()};function qt(){}qt.prototype.serializeValue=qt.prototype.serializeTo=function(e){e.append(this.escape?Ch(this.value):this.value)},qt.prototype.build=function(e,t){return this.value=t,e.type==="String"&&t.search(xs)!==-1&&(this.escape=!0),this};function $i(e){this.tagName=e}Ss($i,qt),$i.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()};function Ee(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}Ee.prototype.build=function(e){this.element=e;var t=e.$descriptor,n=this.propertyDescriptor,r,i,o=t.isGeneric;return o?r=this.parseGenericNsAttributes(e):r=this.parseNsAttributes(e),n?this.ns=this.nsPropertyTagName(n):this.ns=this.nsTagName(t),this.tagName=this.addTagName(this.ns),o?this.parseGenericContainments(e):(i=xh(e),this.parseAttributes(Rh(i)),this.parseContainments(Th(i))),this.parseGenericAttributes(e,r),this},Ee.prototype.nsTagName=function(e){var t=this.logNamespaceUsed(e.ns);return Eh(t,e)},Ee.prototype.nsPropertyTagName=function(e){var t=this.logNamespaceUsed(e.ns);return _h(t,e)},Ee.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},Ee.prototype.nsAttributeName=function(e){var t;if(rt(e)?t=Oe(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}:le({localName:t.localName},n)},Ee.prototype.parseGenericNsAttributes=function(e){return Object.entries(e).filter(([t,n])=>!t.startsWith("$")&&this.parseNsAttribute(e,t,n)).map(([t,n])=>({name:t,value:n}))},Ee.prototype.parseGenericContainments=function(e){var t=e.$body;t&&this.body.push(new qt().build({type:"String"},t));var n=e.$children;n&&oe(n,r=>{this.body.push(new Ee(this).build(r))})},Ee.prototype.parseNsAttribute=function(e,t,n){var r=e.$model,i=Oe(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)}},Ee.prototype.parseNsAttributes=function(e){var t=this,n=e.$attrs,r=[];return oe(n,function(i,o){var a=t.parseNsAttribute(e,o,i);a&&r.push(a)}),r},Ee.prototype.parseGenericAttributes=function(e,t){var n=this;oe(t,function(r){try{n.addAttribute(n.nsAttributeName(r.name),r.value)}catch(i){typeof console<"u"&&console.warn(`missing namespace information for <${r.name}=${r.value}> on`,e,i)}})},Ee.prototype.parseContainments=function(e){var t=this,n=this.body,r=this.element;oe(e,function(i){var o=r.get(i.name),a=i.isReference,s=i.isMany;if(s||(o=[o]),i.isBody)n.push(new qt().build(i,o[0]));else if(ds(i.type))oe(o,function(d){n.push(new $i(t.addTagName(t.nsPropertyTagName(i))).build(i,d))});else if(a)oe(o,function(d){n.push(new Fi(t.addTagName(t.nsPropertyTagName(i))).build(d))});else{var f=Es(i);oe(o,function(d){var h;f?f===bs?h=new Ee(t,i):h=new mr(t,i,f):h=new Ee(t),n.push(h.build(d))})}})},Ee.prototype.getNamespaces=function(e){var t=this.namespaces,n=this.parent,r;return t||(r=n&&n.getNamespaces(),e||!r?this.namespaces=t=new st(r):t=r),t},Ee.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},Ee.prototype.logNamespaceUsed=function(e,t){var n=this.getNamespaces(t),r=e.prefix,i=e.uri,o,a,s;if(!r&&!i)return{localName:e.localName};if(s=n.defaultUriByPrefix(r),i=i||s||n.uriByPrefix(r),!i)throw new Error("no namespace uri given for prefix <"+r+">");if(e=n.byUri(i),!e&&!r&&(e=this.logNamespace({uri:i},s===i,!0)),!e){for(o=r,a=1;n.uriByPrefix(o);)o=r+"_"+a++;e=this.logNamespace({prefix:o,uri:i},s===i)}return r&&n.mapPrefix(r,i),e},Ee.prototype.parseAttributes=function(e){var t=this,n=this.element;oe(e,function(r){var i=n.get(r.name);if(r.isReference)if(!r.isMany)i=i.id;else{var o=[];oe(i,function(a){o.push(a.id)}),i=o.join(" ")}t.addAttribute(t.nsAttributeName(r),i)})},Ee.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),As(e)},Ee.prototype.addAttribute=function(e,t){var n=this.attrs;rt(t)&&(t=kh(t));var r=mf(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)},Ee.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=bh(n).concat(t)),oe(t,function(r){e.append(" ").append(As(r.name)).append('="').append(r.value).append('"')})},Ee.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==qt;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),oe(this.body,function(r){r.serializeTo(e)}),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()};function mr(e,t,n){Ee.call(this,e,t),this.serialization=n}Ss(mr,Ee),mr.prototype.parseNsAttributes=function(e){var t=Ee.prototype.parseNsAttributes.call(this,e).filter(a=>a.name!==this.serialization),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(this.serialization),(r.prefix?r.prefix+":":"")+o+n.ns.localName),t},mr.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri};function Nh(){this.value="",this.write=function(e){this.value+=e}}function Ph(e,t){var n=[""];this.append=function(r){return e.write(r),this},this.appendNewLine=function(){return t&&e.write(`
|
|
14
|
+
`),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 Dh(e){e=le({format:!1,preamble:!0},e||{});function t(n,r){var i=r||new Nh,o=new Ph(i,e.format);e.preamble&&o.append(yh);var a=new Ee,s=n.$model;if(a.getNamespaces().mapDefaultPrefixes(Ih(s)),a.build(n).serializeTo(o),!r)return i.value}return{toXML:t}}function Ih(e){const t=e.config&&e.config.nsMap||{},n={};for(const r in Ii)n[r]=Ii[r];for(const r in t){const i=t[r];n[i]=r}for(const r of e.getPackages())n[r.prefix]=r.uri;return n}function yr(e,t){Ze.call(this,e,t)}yr.prototype=Object.create(Ze.prototype),yr.prototype.fromXML=function(e,t,n){rt(t)||(n=t,t="bpmn:Definitions");var r=new Li(le({model:this,lax:!0},n)),i=r.handler(t);return r.fromXML(e,i)},yr.prototype.toXML=function(e,t){var n=new Dh(t);return new Promise(function(r,i){try{var o=n.toXML(e);return r({xml:o})}catch(a){return i(a)}})};var Oh="BPMN20",Bh="http://www.omg.org/spec/BPMN/20100524/MODEL",Mh="bpmn",Lh=[],Fh=[{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",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"}]}],$h=[{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"}]}],Vh={tagAlias:"lowerCase",typePrefix:"t"},jh={name:Oh,uri:Bh,prefix:Mh,associations:Lh,types:Fh,enumerations:$h,xml:Vh},Uh="BPMNDI",zh="http://www.omg.org/spec/BPMN/20100524/DI",Hh="bpmndi",Wh=[{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"]}],qh=[{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"}]}],Yh=[],Kh={name:Uh,uri:zh,prefix:Hh,types:Wh,enumerations:qh,associations:Yh},Gh="DC",Xh="http://www.omg.org/spec/DD/20100524/DC",Jh="dc",Zh=[{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}]}],Qh=[],em={name:Gh,uri:Xh,prefix:Jh,types:Zh,associations:Qh},tm="DI",nm="http://www.omg.org/spec/DD/20100524/DI",rm="di",im=[{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"}]}],om=[],am={tagAlias:"lowerCase"},sm={name:tm,uri:nm,prefix:rm,types:im,associations:om,xml:am},lm="bpmn.io colors for BPMN",cm="http://bpmn.io/schema/bpmn/biocolor/1.0",um="bioc",fm=[{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"}]}],dm=[],pm=[],hm={name:lm,uri:cm,prefix:um,types:fm,enumerations:dm,associations:pm},mm="BPMN in Color",ym="http://www.omg.org/spec/BPMN/non-normative/color/1.0",gm="color",vm=[{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"}]}],wm=[],bm=[],Em={name:mm,uri:ym,prefix:gm,types:vm,enumerations:wm,associations:bm};const _m={bpmn:jh,bpmndi:Kh,dc:em,di:sm,bioc:hm,color:Em};function xm(e,t){const n=le({},_m,e);return new yr(n,t)}function $e(e,t){return e.$instanceOf(t)}function Sm(e){return Qe(e.rootElements,function(t){return $e(t,"bpmn:Process")||$e(t,"bpmn:Collaboration")})}function Am(e){var t={},n=[],r={};function i(C,R){return function(U){C(U,R)}}function o(C){t[C.id]=C}function a(C){return t[C.id]}function s(C,R){var U=C.gfx;if(U)throw new Error(`already rendered ${Ie(C)}`);return e.element(C,r[C.id],R)}function f(C,R){return e.root(C,r[C.id],R)}function d(C,R){try{var U=r[C.id]&&s(C,R);return o(C),U}catch(pe){h(pe.message,{element:C,error:pe}),console.error(`failed to import ${Ie(C)}`,pe)}}function h(C,R){e.error(C,R)}var m=this.registerDi=function(R){var U=R.bpmnElement;U?r[U.id]?h(`multiple DI elements defined for ${Ie(U)}`,{element:U}):r[U.id]=R:h(`no bpmnElement referenced in ${Ie(R)}`,{element:R})};function k(C){z(C.plane)}function z(C){m(C),oe(C.planeElement,G)}function G(C){m(C)}this.handleDefinitions=function(R,U){var pe=R.diagrams;if(U&&pe.indexOf(U)===-1)throw new Error("diagram not part of <bpmn:Definitions />");if(!U&&pe&&pe.length&&(U=pe[0]),!U)throw new Error("no diagram to display");r={},k(U);var ae=U.plane;if(!ae)throw new Error(`no plane for ${Ie(U)}`);var p=ae.bpmnElement;if(!p)if(p=Sm(R),p)h(`correcting missing bpmnElement on ${Ie(ae)} to ${Ie(p)}`),ae.bpmnElement=p,m(ae);else throw new Error("no process or collaboration to display");var u=f(p,ae);if($e(p,"bpmn:Process")||$e(p,"bpmn:SubProcess"))F(p,u);else if($e(p,"bpmn:Collaboration"))I(p,u),S(R.rootElements,u);else throw new Error(`unsupported bpmnElement for ${Ie(ae)}: ${Ie(p)}`);V(n)};var V=this.handleDeferred=function(){for(var R;n.length;)R=n.shift(),R()};function F(C,R){ee(C,R),H(C.ioSpecification,R),E(C.artifacts,R),o(C)}function S(C,R){var U=en(C,function(pe){return!a(pe)&&$e(pe,"bpmn:Process")&&pe.laneSets});U.forEach(i(F,R))}function B(C,R){d(C,R)}function y(C,R){oe(C,i(B,R))}function v(C,R){d(C,R)}function A(C,R){d(C,R)}function N(C,R){d(C,R)}function x(C,R){d(C,R)}function E(C,R){oe(C,function(U){$e(U,"bpmn:Association")?n.push(function(){x(U,R)}):x(U,R)})}function H(C,R){C&&(oe(C.dataInputs,i(A,R)),oe(C.dataOutputs,i(N,R)))}var L=this.handleSubProcess=function(R,U){ee(R,U),E(R.artifacts,U)};function _(C,R){var U=d(C,R);$e(C,"bpmn:SubProcess")&&L(C,U||R),$e(C,"bpmn:Activity")&&H(C.ioSpecification,R),n.push(function(){oe(C.dataInputAssociations,i(v,R)),oe(C.dataOutputAssociations,i(v,R))})}function q(C,R){d(C,R)}function se(C,R){d(C,R)}function Z(C,R){n.push(function(){var U=d(C,R);C.childLaneSet&&K(C.childLaneSet,U||R),$(C)})}function K(C,R){oe(C.lanes,i(Z,R))}function X(C,R){oe(C,i(K,R))}function ee(C,R){J(C.flowElements,R),C.laneSets&&X(C.laneSets,R)}function J(C,R){oe(C,function(U){$e(U,"bpmn:SequenceFlow")?n.push(function(){q(U,R)}):$e(U,"bpmn:BoundaryEvent")?n.unshift(function(){_(U,R)}):$e(U,"bpmn:FlowNode")?_(U,R):$e(U,"bpmn:DataObject")||($e(U,"bpmn:DataStoreReference")||$e(U,"bpmn:DataObjectReference")?se(U,R):h(`unrecognized flowElement ${Ie(U)} in context ${Ie(R&&R.businessObject)}`,{element:U,context:R}))})}function M(C,R){var U=d(C,R),pe=C.processRef;pe&&F(pe,U||R)}function I(C,R){oe(C.participants,i(M,R)),n.push(function(){y(C.messageFlows,R)}),E(C.artifacts,R)}function $(C){oe(C.flowNodeRef,function(R){var U=R.get("lanes");U&&U.push(C)})}}function km(e,t,n){var r,i,o,a,s=[];function f(d,h){var m={root:function(V,F){return r.add(V,F)},element:function(V,F,S){return r.add(V,F,S)},error:function(V,F){s.push({message:V,context:F})}},k=new Am(m);h=h||d.diagrams&&d.diagrams[0];var z=Cm(d,h);if(!z)throw new Error("no diagram to display");oe(z,function(V){k.handleDefinitions(d,V)});var G=h.plane.bpmnElement.id;o.setRootElement(o.findRoot(G+"_plane")||o.findRoot(G))}return new Promise(function(d,h){try{return r=e.get("bpmnImporter"),i=e.get("eventBus"),o=e.get("canvas"),i.fire("import.render.start",{definitions:t}),f(t,n),i.fire("import.render.complete",{error:a,warnings:s}),d({warnings:s})}catch(m){return m.warnings=s,h(m)}})}function Cm(e,t){if(!(!t||!t.plane)){var n=t.plane.bpmnElement,r=n;!ce(n,"bpmn:Process")&&!ce(n,"bpmn:Collaboration")&&(r=Rm(n));var i;ce(r,"bpmn:Collaboration")?i=r:i=Qe(e.rootElements,function(d){if(ce(d,"bpmn:Collaboration"))return Qe(d.participants,function(h){return h.processRef===r})});var o=[r];i&&(o=yf(i.participants,function(d){return d.processRef}),o.push(i));var a=Cs(o),s=[t],f=[n];return oe(e.diagrams,function(d){if(d.plane){var h=d.plane.bpmnElement;a.indexOf(h)!==-1&&f.indexOf(h)===-1&&(s.push(d),f.push(h))}}),s}}function Cs(e){var t=[];return oe(e,function(n){n&&(t.push(n),t=t.concat(Cs(n.flowElements)))}),t}function Rm(e){for(var t=e;t;){if(ce(t,"bpmn:Process"))return t;t=t.$parent}}var Tm='<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>',Rs=Tm,Ts={verticalAlign:"middle"},Ns={color:"#404040"},Nm={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},Pm={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},Dm={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"},Im='<div class="bjs-powered-by-lightbox"><div class="backdrop"></div><div class="notice"><a href="https://bpmn.io" target="_blank" rel="noopener" class="link">'+Rs+'</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>',lt;function Om(){lt=at(Im),ze(lt,Nm),ze(ht("svg",lt),Ts),ze(ht(".backdrop",lt),Pm),ze(ht(".notice",lt),Dm),ze(ht(".link",lt),Ns,{margin:"15px 20px 15px 10px",alignSelf:"center"})}function Bm(){lt||(Om(),gi.bind(lt,".backdrop","click",function(e){document.body.removeChild(lt)})),document.body.appendChild(lt)}const gr=5,Ps="djs-outline-hidden";function Ae(e){e=le({},Lm,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),this._init(this._container,this._moddle,e),$m(this._container)}nt(Ae,Rt),Ae.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(k){throw this._emit("import.parse.complete",{error:k}),k}let s=a.rootElement;const f=a.references,d=a.warnings,h=a.elementsById;o=o.concat(d),s=this._emit("import.parse.complete",i({error:null,definitions:s,elementsById:h,references:f,warnings:o}))||s;const m=await this.importDefinitions(s,n);return o=o.concat(m.warnings),this._emit("import.done",{error:null,warnings:o}),{warnings:o}}catch(a){let s=a;throw o=o.concat(s.warnings||[]),vr(s,o),s=Mm(s),this._emit("import.done",{error:s,warnings:s.warnings}),s}},Ae.prototype.importDefinitions=async function(t,n){return this._setDefinitions(t),{warnings:(await this.open(n)).warnings}},Ae.prototype.open=async function(t){const n=this._definitions;let r=t;if(!n){const o=new Error("no XML imported");throw vr(o,[]),o}if(typeof t=="string"&&(r=Fm(n,t),!r)){const o=new Error("BPMNDiagram <"+t+"> not found");throw vr(o,[]),o}try{this.clear()}catch(o){throw vr(o,[]),o}const{warnings:i}=await km(this,n,r);return{warnings:i}},Ae.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},Ae.prototype.saveSVG=async function(){this._emit("saveSVG.start");let t,n;try{const r=this.get("canvas"),i=r.getActiveLayer(),o=ht(":scope > defs",r._svg),a=ya(i),s=o?"<defs>"+ya(o)+"</defs>":"",f=r.getContainer();jt(f).add(Ps);let d;try{d=i.getBBox()}finally{jt(f).remove(Ps)}const h=d.x-gr,m=d.y-gr,k=d.width+gr*2,z=d.height+gr*2;t=`<?xml version="1.0" encoding="utf-8"?>
|
|
15
15
|
<!-- created with bpmn-js / http://bpmn.io -->
|
|
16
16
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
17
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="`+A+'" height="'+V+'" viewBox="'+h+" "+m+" "+A+" "+V+'" 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}},Ae.prototype._setDefinitions=function(e){this._definitions=e},Ae.prototype.getModules=function(){return this._modules},Ae.prototype.clear=function(){this.getDefinitions()&&Rt.prototype.clear.call(this)},Ae.prototype.destroy=function(){Rt.prototype.destroy.call(this),er(this._container)},Ae.prototype.on=function(e,t,n,r){return this.get("eventBus").on(e,t,n,r)},Ae.prototype.off=function(e,t){this.get("eventBus").off(e,t)},Ae.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach(),e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),typeof e=="string"&&(e=ht(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},Ae.prototype.getDefinitions=function(){return this._definitions},Ae.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},Ae.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=le(bf(n,["additionalModules"]),{canvas:le({},n.canvas,{container:e}),modules:a});Rt.call(this,s),n&&n.container&&this.attachTo(n.container)},Ae.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},Ae.prototype._createContainer=function(e){const t=at('<div class="bjs-container"></div>');return ze(t,{width:Ds(e.width),height:Ds(e.height),position:e.position}),t},Ae.prototype._createModdle=function(e){const t=le({},this._moddleExtensions,e.moddleExtensions);return new _m(t)},Ae.prototype._modules=[];function vr(e,t){return e.warnings=t,e}function Bm(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 Mm={width:"100%",height:"100%",position:"relative"};function Ds(e){return e+(Et(e)?"px":"")}function Lm(e,t){return t&&Qe(e.diagrams,function(n){return n.id===t})||null}function Fm(e){const n='<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+Rs+"</a>",r=at(n);ze(ht("svg",r),Ts),ze(r,Ns,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(r),At.bind(r,"click",function(i){Om(),i.preventDefault()})}function wr(e){Ae.call(this,e)}nt(wr,Ae),wr.prototype._modules=[Xd,mp,Ba,_p,Na],wr.prototype._moddleExtensions={};function Is(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vi(e){return Math.log(e)/Math.log(10)}function Os(e,t){var n=Vi(e.min),r=Vi(e.max),i=Math.abs(n)+Math.abs(r);return i/t}function $m(e,t){return Math.max(e.min,Math.min(e.max,t))}var Vm=Math.sign||function(e){return e>=0?1:-1},ji={min:.2,max:4},Bs=10,jm=.1,Um=.75;function ct(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=_t(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||Um;var r=this;t.on("canvas.mouseover",function(){r._init(e.enabled!==!1)}),t.on("canvas.mouseout",function(){r._init(!1)})}ct.$inject=["config.zoomScroll","eventBus","canvas"],ct.prototype.scroll=function(t){this._canvas.scroll(t)},ct.prototype.reset=function(){this._canvas.zoom("fit-viewport")},ct.prototype.zoom=function(t,n){var r=Os(ji,Bs*2);this._totalDelta+=t,Math.abs(this._totalDelta)>jm&&(this._zoom(t,n,r),this._totalDelta=0)},ct.prototype._handleWheel=function(t){if(this._enabled){var n=this._container;t.preventDefault();var r=t.ctrlKey||yp()&&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(),f={x:t.clientX-s.left,y:t.clientY-s.top};a=Math.sqrt(Math.pow(t.deltaY,2)+Math.pow(t.deltaX,2))*Vm(t.deltaY)*o,this.zoom(a,f)}else i?a={dx:o*t.deltaY,dy:0}:a={dx:o*t.deltaX,dy:o*t.deltaY},this.scroll(a)}},ct.prototype.stepZoom=function(t,n){var r=Os(ji,Bs);this._zoom(t,n,r)},ct.prototype._zoom=function(e,t,n){var r=this._canvas,i=e>0?1:-1,o=Vi(r.zoom()),a=Math.round(o/n)*n;a+=n*i;var s=Math.pow(10,a);r.zoom($m(ji,s),t)},ct.prototype.toggle=function(t){var n=this._container,r=this._handleWheel,i=this._enabled;return typeof t>"u"&&(t=!i),i!==t&&At[t?"bind":"unbind"](n,"wheel",r,!1),this._enabled=t,t},ct.prototype._init=function(e){this.toggle(e)};const zm={__init__:["zoomScroll"],zoomScroll:["type",ct]};var Hm=/^djs-cursor-.*$/;function Ms(e){var t=jt(document.body);t.removeMatching(Hm),e&&t.add("djs-cursor-"+e)}function Wm(){Ms(null)}var qm=5e3;function Ym(e,t){t=t||"element.click";function n(){return!1}return e.once(t,qm,n),function(){e.off(t,n)}}var Km=15;function Ls(e,t){var n;function r(s){return a(s.originalEvent)}e.on("canvas.focus.changed",function(s){s.focused?e.on("element.mousedown",500,r):e.off("element.mousedown",r)});function i(s){var f=n.start,d=n.button,h=Ua(s),m=Is(h,f);if(!n.dragging&&Gm(m)>Km&&(n.dragging=!0,d===0&&Ym(e),Ms("grab")),n.dragging){var A=n.last||n.start;m=Is(h,A),t.scroll({dx:m.x,dy:m.y}),n.last=h}s.preventDefault()}function o(s){At.unbind(document,"mousemove",i),At.unbind(document,"mouseup",o),n=null,Wm()}function a(s){if(!Ea(s.target,".djs-draggable")){var f=s.button;if(!(f>=2||s.ctrlKey||s.shiftKey||s.altKey))return n={button:f,start:Ua(s)},At.bind(document,"mousemove",i),At.bind(document,"mouseup",o),!0}}this.isActive=function(){return!!n}}Ls.$inject=["eventBus","canvas"];function Gm(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}const Xm={__init__:["moveCanvas"],moveCanvas:["type",Ls]},Jm={name:"Camunda",uri:"http://camunda.org/schema/1.0/bpmn",prefix:"camunda",xml:{tagAlias:"lowerCase"},associations:[],types:JSON.parse('[{"name":"Definitions","isAbstract":true,"extends":["bpmn:Definitions"],"properties":[{"name":"diagramRelationId","isAttr":true,"type":"String"}]},{"name":"InOutBinding","superClass":["Element"],"isAbstract":true,"properties":[{"name":"source","isAttr":true,"type":"String"},{"name":"sourceExpression","isAttr":true,"type":"String"},{"name":"target","isAttr":true,"type":"String"},{"name":"businessKey","isAttr":true,"type":"String"},{"name":"local","isAttr":true,"type":"Boolean","default":false},{"name":"variables","isAttr":true,"type":"String"}]},{"name":"In","superClass":["InOutBinding"],"meta":{"allowedIn":["bpmn:CallActivity","bpmn:SignalEventDefinition"]}},{"name":"Out","superClass":["InOutBinding"],"meta":{"allowedIn":["bpmn:CallActivity"]}},{"name":"AsyncCapable","isAbstract":true,"extends":["bpmn:Activity","bpmn:Gateway","bpmn:Event"],"properties":[{"name":"async","isAttr":true,"type":"Boolean","default":false},{"name":"asyncBefore","isAttr":true,"type":"Boolean","default":false},{"name":"asyncAfter","isAttr":true,"type":"Boolean","default":false},{"name":"exclusive","isAttr":true,"type":"Boolean","default":true}]},{"name":"JobPriorized","isAbstract":true,"extends":["bpmn:Process","camunda:AsyncCapable"],"properties":[{"name":"jobPriority","isAttr":true,"type":"String"}]},{"name":"SignalEventDefinitionExtension","isAbstract":true,"extends":["bpmn:SignalEventDefinition"],"properties":[{"name":"async","isAttr":true,"type":"Boolean","default":false}]},{"name":"ErrorEventDefinitionExtension","isAbstract":true,"extends":["bpmn:ErrorEventDefinition"],"properties":[{"name":"errorCodeVariable","isAttr":true,"type":"String"},{"name":"errorMessageVariable","isAttr":true,"type":"String"}]},{"name":"ErrorEventDefinition","superClass":["bpmn:ErrorEventDefinition","Element"],"properties":[{"name":"expression","isAttr":true,"type":"String"}],"meta":{"allowedIn":["bpmn:ServiceTask"]}},{"name":"Error","isAbstract":true,"extends":["bpmn:Error"],"properties":[{"name":"camunda:errorMessage","isAttr":true,"type":"String"}]},{"name":"PotentialStarter","superClass":["Element"],"properties":[{"name":"resourceAssignmentExpression","type":"bpmn:ResourceAssignmentExpression"}]},{"name":"FormSupported","isAbstract":true,"extends":["bpmn:StartEvent","bpmn:UserTask"],"properties":[{"name":"formHandlerClass","isAttr":true,"type":"String"},{"name":"formKey","isAttr":true,"type":"String"},{"name":"formRef","isAttr":true,"type":"String"},{"name":"formRefBinding","isAttr":true,"type":"String"},{"name":"formRefVersion","isAttr":true,"type":"String"}]},{"name":"TemplateSupported","isAbstract":true,"extends":["bpmn:Collaboration","bpmn:Process","bpmn:FlowElement"],"properties":[{"name":"modelerTemplate","isAttr":true,"type":"String"},{"name":"modelerTemplateVersion","isAttr":true,"type":"Integer"}]},{"name":"Initiator","isAbstract":true,"extends":["bpmn:StartEvent"],"properties":[{"name":"initiator","isAttr":true,"type":"String"}]},{"name":"ScriptTask","isAbstract":true,"extends":["bpmn:ScriptTask"],"properties":[{"name":"resultVariable","isAttr":true,"type":"String"},{"name":"resource","isAttr":true,"type":"String"}]},{"name":"Process","isAbstract":true,"extends":["bpmn:Process"],"properties":[{"name":"candidateStarterGroups","isAttr":true,"type":"String"},{"name":"candidateStarterUsers","isAttr":true,"type":"String"},{"name":"versionTag","isAttr":true,"type":"String"},{"name":"historyTimeToLive","isAttr":true,"type":"String"},{"name":"isStartableInTasklist","isAttr":true,"type":"Boolean","default":true}]},{"name":"EscalationEventDefinitionExtension","isAbstract":true,"extends":["bpmn:EscalationEventDefinition"],"properties":[{"name":"escalationCodeVariable","isAttr":true,"type":"String"}]},{"name":"FormalExpression","isAbstract":true,"extends":["bpmn:FormalExpression"],"properties":[{"name":"resource","isAttr":true,"type":"String"}]},{"name":"Assignable","extends":["bpmn:UserTask"],"properties":[{"name":"assignee","isAttr":true,"type":"String"},{"name":"candidateUsers","isAttr":true,"type":"String"},{"name":"candidateGroups","isAttr":true,"type":"String"},{"name":"dueDate","isAttr":true,"type":"String"},{"name":"followUpDate","isAttr":true,"type":"String"},{"name":"priority","isAttr":true,"type":"String"}]},{"name":"CallActivity","extends":["bpmn:CallActivity"],"properties":[{"name":"calledElementBinding","isAttr":true,"type":"String","default":"latest"},{"name":"calledElementVersion","isAttr":true,"type":"String"},{"name":"calledElementVersionTag","isAttr":true,"type":"String"},{"name":"calledElementTenantId","isAttr":true,"type":"String"},{"name":"caseRef","isAttr":true,"type":"String"},{"name":"caseBinding","isAttr":true,"type":"String","default":"latest"},{"name":"caseVersion","isAttr":true,"type":"String"},{"name":"caseTenantId","isAttr":true,"type":"String"},{"name":"variableMappingClass","isAttr":true,"type":"String"},{"name":"variableMappingDelegateExpression","isAttr":true,"type":"String"}]},{"name":"ServiceTaskLike","extends":["bpmn:ServiceTask","bpmn:BusinessRuleTask","bpmn:SendTask","bpmn:MessageEventDefinition"],"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"resultVariable","isAttr":true,"type":"String"}]},{"name":"DmnCapable","extends":["bpmn:BusinessRuleTask"],"properties":[{"name":"decisionRef","isAttr":true,"type":"String"},{"name":"decisionRefBinding","isAttr":true,"type":"String","default":"latest"},{"name":"decisionRefVersion","isAttr":true,"type":"String"},{"name":"mapDecisionResult","isAttr":true,"type":"String","default":"resultList"},{"name":"decisionRefTenantId","isAttr":true,"type":"String"}]},{"name":"ExternalCapable","extends":["camunda:ServiceTaskLike"],"properties":[{"name":"type","isAttr":true,"type":"String"},{"name":"topic","isAttr":true,"type":"String"}]},{"name":"TaskPriorized","extends":["bpmn:Process","camunda:ExternalCapable"],"properties":[{"name":"taskPriority","isAttr":true,"type":"String"}]},{"name":"Properties","superClass":["Element"],"meta":{"allowedIn":["*"]},"properties":[{"name":"values","type":"Property","isMany":true}]},{"name":"Property","superClass":["Element"],"properties":[{"name":"id","type":"String","isAttr":true},{"name":"name","type":"String","isAttr":true},{"name":"value","type":"String","isAttr":true}]},{"name":"Connector","superClass":["Element"],"meta":{"allowedIn":["camunda:ServiceTaskLike"]},"properties":[{"name":"inputOutput","type":"InputOutput"},{"name":"connectorId","type":"String"}]},{"name":"InputOutput","superClass":["Element"],"meta":{"allowedIn":["bpmn:FlowNode","camunda:Connector"]},"properties":[{"name":"inputOutput","type":"InputOutput"},{"name":"connectorId","type":"String"},{"name":"inputParameters","isMany":true,"type":"InputParameter"},{"name":"outputParameters","isMany":true,"type":"OutputParameter"}]},{"name":"InputOutputParameter","properties":[{"name":"name","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"},{"name":"definition","type":"InputOutputParameterDefinition"}]},{"name":"InputOutputParameterDefinition","isAbstract":true},{"name":"List","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"items","isMany":true,"type":"InputOutputParameterDefinition"}]},{"name":"Map","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"entries","isMany":true,"type":"Entry"}]},{"name":"Entry","properties":[{"name":"key","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"},{"name":"definition","type":"InputOutputParameterDefinition"}]},{"name":"Value","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"id","isAttr":true,"type":"String"},{"name":"name","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"}]},{"name":"Script","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"scriptFormat","isAttr":true,"type":"String"},{"name":"resource","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"}]},{"name":"Field","superClass":["Element"],"meta":{"allowedIn":["camunda:ServiceTaskLike","camunda:ExecutionListener","camunda:TaskListener"]},"properties":[{"name":"name","isAttr":true,"type":"String"},{"name":"expression","type":"String"},{"name":"stringValue","isAttr":true,"type":"String"},{"name":"string","type":"String"}]},{"name":"InputParameter","superClass":["InputOutputParameter"]},{"name":"OutputParameter","superClass":["InputOutputParameter"]},{"name":"Collectable","isAbstract":true,"extends":["bpmn:MultiInstanceLoopCharacteristics"],"superClass":["camunda:AsyncCapable"],"properties":[{"name":"collection","isAttr":true,"type":"String"},{"name":"elementVariable","isAttr":true,"type":"String"}]},{"name":"FailedJobRetryTimeCycle","superClass":["Element"],"meta":{"allowedIn":["camunda:AsyncCapable","bpmn:MultiInstanceLoopCharacteristics"]},"properties":[{"name":"body","isBody":true,"type":"String"}]},{"name":"ExecutionListener","superClass":["Element"],"meta":{"allowedIn":["bpmn:Task","bpmn:ServiceTask","bpmn:UserTask","bpmn:BusinessRuleTask","bpmn:ScriptTask","bpmn:ReceiveTask","bpmn:ManualTask","bpmn:ExclusiveGateway","bpmn:SequenceFlow","bpmn:ParallelGateway","bpmn:InclusiveGateway","bpmn:EventBasedGateway","bpmn:StartEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:EndEvent","bpmn:BoundaryEvent","bpmn:CallActivity","bpmn:SubProcess","bpmn:Process"]},"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"event","isAttr":true,"type":"String"},{"name":"script","type":"Script"},{"name":"fields","type":"Field","isMany":true}]},{"name":"TaskListener","superClass":["Element"],"meta":{"allowedIn":["bpmn:UserTask"]},"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"event","isAttr":true,"type":"String"},{"name":"script","type":"Script"},{"name":"fields","type":"Field","isMany":true},{"name":"id","type":"String","isAttr":true},{"name":"eventDefinitions","type":"bpmn:TimerEventDefinition","isMany":true}]},{"name":"FormProperty","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent","bpmn:UserTask"]},"properties":[{"name":"id","type":"String","isAttr":true},{"name":"name","type":"String","isAttr":true},{"name":"type","type":"String","isAttr":true},{"name":"required","type":"String","isAttr":true},{"name":"readable","type":"String","isAttr":true},{"name":"writable","type":"String","isAttr":true},{"name":"variable","type":"String","isAttr":true},{"name":"expression","type":"String","isAttr":true},{"name":"datePattern","type":"String","isAttr":true},{"name":"default","type":"String","isAttr":true},{"name":"values","type":"Value","isMany":true}]},{"name":"FormData","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent","bpmn:UserTask"]},"properties":[{"name":"fields","type":"FormField","isMany":true},{"name":"businessKey","type":"String","isAttr":true}]},{"name":"FormField","superClass":["Element"],"properties":[{"name":"id","type":"String","isAttr":true},{"name":"label","type":"String","isAttr":true},{"name":"type","type":"String","isAttr":true},{"name":"datePattern","type":"String","isAttr":true},{"name":"defaultValue","type":"String","isAttr":true},{"name":"properties","type":"Properties"},{"name":"validation","type":"Validation"},{"name":"values","type":"Value","isMany":true}]},{"name":"Validation","superClass":["Element"],"properties":[{"name":"constraints","type":"Constraint","isMany":true}]},{"name":"Constraint","superClass":["Element"],"properties":[{"name":"name","type":"String","isAttr":true},{"name":"config","type":"String","isAttr":true}]},{"name":"ConditionalEventDefinitionExtension","isAbstract":true,"extends":["bpmn:ConditionalEventDefinition"],"properties":[{"name":"variableName","isAttr":true,"type":"String"},{"name":"variableEvents","isAttr":true,"type":"String"}]}]'),emumerations:[]},Zm={class:"task-track"},Qm={class:"subject-container"},ey={class:"track-table"},ty=wt(l.defineComponent({name:"UiFlowTaskTrack",__name:"TaskTrack",props:l.mergeModels({data:{default:()=>[]}},{isHide:{type:Boolean,default:!1},isHideModifiers:{}}),emits:["update:isHide"],setup(e){const t=l.useModel(e,"isHide"),n={currentPage:1,pageSize:20,total:0},r=[{label:"办理环节",prop:"activityName",minWidth:"200px"},{label:"办理人",prop:"assigneesNames",minWidth:"200px"},{label:"办理方式",prop:"dealTypeLabel",width:"180px"},{label:"开始时间",prop:"startTime",width:"180px",formatter:i=>i.startTime?Gn(i.startTime).format("YYYY-MM-DD HH:mm:ss"):""},{label:"结束时间",prop:"endTime",width:"180px",formatter:i=>i.endTime?Gn(i.endTime).format("YYYY-MM-DD HH:mm:ss"):""},{label:"滞留时长",prop:"duration",width:"140px",formatter:i=>typeof i.duration=="string"?i.duration.split(",").join(""):i.duration||""},{label:"处理状态",prop:"stateLabel",width:"100px"}];return(i,o)=>{const a=l.resolveComponent("el-icon");return l.openBlock(),l.createElementBlock("div",Zm,[l.createElementVNode("div",Qm,[o[1]||(o[1]=l.createElementVNode("div",{class:"subject-heading"},[l.createElementVNode("div",{class:"subject-line"}),l.createElementVNode("div",{class:"subject-title"},"办理轨迹")],-1)),l.createElementVNode("button",{class:"hide-btn",type:"button",onClick:o[0]||(o[0]=s=>t.value=!t.value)},[l.createVNode(a,null,{default:l.withCtx(()=>[t.value?(l.openBlock(),l.createBlock(l.unref(tl),{key:0})):(l.openBlock(),l.createBlock(l.unref(Qs),{key:1}))]),_:1}),l.createElementVNode("span",null,l.toDisplayString(t.value?"显示":"隐藏"),1)])]),l.withDirectives(l.createElementVNode("div",ey,[l.createVNode(Zo,{data:e.data,"hide-number":!1,"hide-page":!0,"hide-selection":!0,"page-config":n,"table-label":r,"table-height":"100%"},null,8,["data"])],512),[[l.vShow,!t.value]])])}}}),[["__scopeId","data-v-8c8b5c11"]]),Ui=e=>ye({url:"/server/runtime/event/get",method:"post",data:e}),zi=e=>ye({url:"/server/history/trackinst/event/query",method:"post",data:e}),ny=Object.freeze(Object.defineProperty({__proto__:null,activateFlow:e=>ye({url:"/server/runtime/event/activate",method:"post",data:e}),flowMonitorLine:Ui,flowTrack:zi,suspendFlow:e=>ye({url:"/server/runtime/event/suspend",method:"post",data:e}),terminateFlow:e=>ye({url:"/server/runtime/event/terminate",method:"post",data:e})},Symbol.toStringTag,{value:"Module"})),ry={class:"flow-diagram"},iy=wt(l.defineComponent({name:"UiFlowDiagram",__name:"FlowDiagram",props:{processDefinitionId:{},processInstanceId:{}},emits:["loaded","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(),a=l.shallowRef(),s=l.ref(),f=l.ref([]),d=l.ref(!1);let h=0;function m(){var y;o.value&&((y=a.value)==null||y.destroy(),a.value=l.markRaw(new wr({container:o.value,additionalModules:[zm,Xm],moddleExtensions:{camunda:Jm}})))}function A(y,v,k=!1){if(!y||!a.value)return;const E=a.value.get("canvas").getGraphics(y);if(!E)return;let x=".djs-visual rect, .djs-visual path";k&&(x+=", .djs-visual circle"),E.querySelectorAll(x).forEach(H=>{H.style.fill=v,H.style.stroke="#333"}),E.querySelectorAll(".djs-visual text").forEach(H=>{H.style.fill="#333"})}function V(y,v,k){var J;const T=y.style.getPropertyValue(v)||y.getAttribute(v),E=(J=T==null?void 0:T.match(/#([^)'"\s]+)/))==null?void 0:J[1],x=y.ownerSVGElement;if(!E||!x)return;const H=Array.from(x.querySelectorAll("marker")).find(K=>K.id===E);if(!(H!=null&&H.parentElement))return;const B=k.replace(/[^a-zA-Z0-9]/g,""),_=`${E}-flowstream-${B}`;let q=Array.from(x.querySelectorAll("marker")).find(K=>K.id===_);q||(q=H.cloneNode(!0),q.id=_,q.querySelectorAll("path, polygon, polyline").forEach(K=>{K.style.fill=k,K.style.stroke=k}),H.parentElement.appendChild(q));const ae=`url(#${_})`;y.style.setProperty(v,ae),y.setAttribute(v,ae)}function G(y,v){if(!y||!a.value)return;const T=a.value.get("canvas").getGraphics(y);T&&T.querySelectorAll(".djs-visual > path").forEach(E=>{E.style.fill="none",E.style.stroke=v,V(E,"marker-start",v),V(E,"marker-end",v)})}function $(y){const v=y.filter(x=>x.type==="bpmn:StartEvent");if(v.length!==1)return[];const k=[],T=new Set;let E=v[0];for(;E&&!T.has(E.id);){T.add(E.id);const x=(E.outgoing||[]).filter(q=>q.type==="bpmn:SequenceFlow");if(!x.length)return k;if(x.length!==1)return[];const H=x[0],B=H.target,_=((B==null?void 0:B.incoming)||[]).filter(q=>q.type==="bpmn:SequenceFlow");if(!B||_.length!==1)return[];k.push(H),E=B}return[]}function M(y){var T;const v=((T=s.value)==null?void 0:T.sequenceFlowStates)||[];if(!v.length)return;const k=v.map(E=>y.get(E.sequenceFlowId||E.id)).filter(E=>(E==null?void 0:E.type)==="bpmn:SequenceFlow");if(k.length){k.forEach(E=>G(E,"#98e5b5"));return}$(y).slice(0,v.length).forEach(E=>G(E,"#98e5b5"))}function S(){var k;if(!a.value)return;const y=a.value.get("elementRegistry"),v=new Set;(((k=s.value)==null?void 0:k.flowNodeStates)||[]).forEach(T=>{v.add(T.id),A(y.get(T.id),T.state==="executing"?"#ffd37e":"#98e5b5")}),y.filter(T=>T.type==="bpmn:StartEvent").forEach(T=>{v.add(T.id),A(T,"#98e5b5",!0)}),y.filter(T=>T.type==="bpmn:EndEvent").forEach(T=>{v.add(T.id),A(T,"#f14b12",!0)}),y.forEach(T=>{var E;!v.has(T.id)&&((E=T.type)!=null&&E.includes("Task"))&&A(T,"#eee")}),M(y)}async function I(){const y=++h;try{await l.nextTick(),m();const[v,k,T]=await Promise.all([ei({procdefId:r.processDefinitionId}),Ui({processInstanceId:r.processInstanceId,fetchFlowNodeState:!0,fetchSequenceFlowState:!0}),zi({processInstanceId:r.processInstanceId})]);if(y!==h||!a.value)return;s.value=k.data||{},f.value=T.data||[],await a.value.importXML(v),a.value.get("canvas").zoom("fit-viewport",!0),S(),i("loaded")}catch(v){i("error",v)}}return l.watch(()=>[r.processDefinitionId,r.processInstanceId],I),l.onMounted(I),l.onBeforeUnmount(()=>{var y;h++,(y=a.value)==null||y.destroy(),a.value=void 0}),t({refresh:I,viewer:a,trackData:f,isTrackHidden:d}),(y,v)=>(l.openBlock(),l.createElementBlock("div",ry,[l.createElementVNode("div",{ref_key:"canvasRef",ref:o,class:"canvas"},null,512),v[1]||(v[1]=l.createStaticVNode('<div class="legend" data-v-c4f4a933><div class="legend-item undo" data-v-c4f4a933><div class="legend-circle" data-v-c4f4a933></div><span data-v-c4f4a933>未办理环节</span></div><div class="legend-item doing" data-v-c4f4a933><div class="legend-circle" data-v-c4f4a933></div><span data-v-c4f4a933>当前环节</span></div><div class="legend-item done" data-v-c4f4a933><div class="legend-circle" data-v-c4f4a933></div><span data-v-c4f4a933>已办理环节</span></div></div>',1)),l.createVNode(ty,{"is-hide":d.value,"onUpdate:isHide":v[0]||(v[0]=k=>d.value=k),class:"bottom-container",data:f.value,style:l.normalizeStyle({height:d.value?"55px":"360px"})},null,8,["is-hide","data","style"])]))}}),[["__scopeId","data-v-c4f4a933"]]),Fs=l.defineComponent({name:"UiFlowStart",__name:"FlowStart",props:{dialogTitle:{default:"发送"},dialogWidth:{default:"1200px"},defaultOpinion:{default:""},bpmnXml:{default:""},singleAssignee:{type:Boolean,default:!0},assignmentQueryParams:{default:()=>({})},beforeSend:{}},emits:["started","afterSend","close","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(),a=l.ref(!1),s=l.ref(!1),f=l.ref(!1),d=l.ref(),h=l.ref();async function m(I){if(s.value)throw new Error("流程正在启动,请勿重复提交");s.value=!0;let y;try{const k=(await Wn({processDefinitionId:I.processDefinitionId})).data||[];if(k.length!==1)throw new Error(k.length?`流程存在 ${k.length} 个首办节点,无法自动启动`:"流程未找到首办节点,无法启动");if(y=(await jr(I)).data,!(y!=null&&y.processInstanceId)||!y.processDefinitionId||!y.workId)throw new Error("流程引擎未返回流程实例 ID、流程定义 ID 或起草人待办 ID");const E=k[0];if(a.value=!1,d.value={startArgs:I,startResult:y,activity:{activityId:E.id,activityName:E.name||E.activityName},variables:I.variables||{},dealUser:{id:I.draftUserId,userId:I.draftUserId,name:I.draftUserName}},f.value=!1,h.value=void 0,await l.nextTick(),!o.value)throw new Error("发送组件尚未就绪")}catch(v){throw s.value=!1,i("error",{phase:"start",error:v}),v}try{return i("started",y),await A(),y}finally{s.value=!1}}async function A(){if(!d.value)throw new Error("没有可继续发送的流程上下文");try{if(r.beforeSend&&await r.beforeSend(d.value)===!1)return a.value=!1,!1;if(await l.nextTick(),!o.value)throw new Error("发送组件尚未就绪");return await o.value.open(),!0}catch(I){throw i("error",{phase:"beforeSend",error:I}),I}}function V(){var y,v;if(a.value){(y=o.value)==null||y.close();return}const I=(v=d.value)==null?void 0:v.startResult;I&&(!f.value&&I.processInstanceId&&zn({processInstanceId:I.processInstanceId}).catch(k=>i("error",{phase:"send",error:k})),d.value=void 0,i("close",I))}function G(I){h.value=I}function $(I){!d.value||!h.value||(f.value=!0,i("afterSend",{startResult:d.value.startResult,sendData:h.value,sendResult:I}))}function M(I){i("error",{phase:"send",error:I})}function S(){var y;const I=(y=d.value)==null?void 0:y.startResult;i("close",I),f.value&&(d.value=void 0,f.value=!1)}return t({start:m,open:A,close:V,starting:s,sendVisible:a,context:d,sendRef:o}),(I,y)=>d.value?(l.openBlock(),l.createBlock(ai,{key:0,ref_key:"sendRef",ref:o,modelValue:a.value,"onUpdate:modelValue":y[0]||(y[0]=v=>a.value=v),"process-definition-id":d.value.startResult.processDefinitionId,"process-instance-id":d.value.startResult.processInstanceId,activity:d.value.activity,"assignment-query-params":e.assignmentQueryParams,"work-id":d.value.startResult.workId,variables:d.value.variables,"deal-user":d.value.dealUser,"bpmn-xml":e.bpmnXml,"force-single-assignee":e.singleAssignee,"delete-instance-on-cancel":"","show-trigger":!1,"dialog-title":e.dialogTitle,"dialog-width":e.dialogWidth,"default-opinion":e.defaultOpinion,onBeforeSend:G,onAfterSend:$,onClose:S,onError:M},null,8,["modelValue","process-definition-id","process-instance-id","activity","assignment-query-params","work-id","variables","deal-user","bpmn-xml","force-single-assignee","dialog-title","dialog-width","default-opinion"])):l.createCommentVNode("",!0)}});let Hi,ut,Wi=!1;function oy(e){Hi=e}function ay(e){return e instanceof Error?e.message:typeof e=="string"?e:"流程操作失败"}function $s(e){return{...e,message:ay(e.error)}}async function sy(e,t){return e?await e(t)!==!1:!0}function Rn(e,t){if(e)try{Promise.resolve(e(t)).catch(n=>{console.error("[FlowStream] runtimeService 回调执行失败",n)})}catch(n){console.error("[FlowStream] runtimeService 回调执行失败",n)}}function Vs(e){e.disposed||(e.disposed=!0,l.render(null,e.container),e.container.remove(),ut===e&&(ut=void 0))}function ly(e){var t;return(t=e.component)==null?void 0:t.exposed}function js(){if(!(ut!=null&&ut.exposed)||ut.disposed)throw new Error("当前没有已启动且可继续发送的流程");return ut}const qi={start:(async e=>{if(typeof document>"u")throw new Error("flowstream.runtimeService.start() 只能在浏览器环境中调用");if(!Hi)throw new Error("调用 runtimeService.start() 前必须先执行 app.use(flowstream)");if(Wi||ut&&!ut.disposed)throw new Error("当前已有已启动但尚未发送完成的流程,请调用 runtimeService.open() 继续办理");const{dialogTitle:t="发送",dialogWidth:n="1200px",defaultOpinion:r="",bpmnXml:i="",singleAssignee:o=!0,assignmentQueryParams:a={},onBeforeStart:s,onBeforeSend:f,onStarted:d,onAfterSend:h,onClose:m,onError:A,...V}=e;Wi=!0;try{if(!await sy(s,V))return!1}catch(S){throw A&&Rn(A,$s({phase:"beforeStart",error:S})),S}finally{Wi=!1}const G=document.createElement("div");G.className="ui-flow-runtime-service-host",document.body.appendChild(G);const $={container:G,vnode:void 0,sendCompleted:!1,disposed:!1},M=l.createVNode(Fs,{dialogTitle:t,dialogWidth:n,defaultOpinion:r,bpmnXml:i,singleAssignee:o,assignmentQueryParams:a,beforeSend:f,onStarted:S=>{$.startResult=S,Rn(d,S)},onAfterSend:S=>{$.sendCompleted=!0,Rn(h,S)},onClose:S=>{m&&Rn(m,S),l.nextTick(()=>Vs($))},onError:S=>{A&&Rn(A,$s(S))}});M.appContext=Hi,$.vnode=M,ut=$;try{if(l.render(M,G),await l.nextTick(),$.exposed=ly(M),!$.exposed)throw new Error("流程启动服务挂载失败");return await $.exposed.start(V)}catch(S){throw $.startResult||Vs($),S}}),async open(){return js().exposed.open()},close(){js().exposed.close()},async getApps(e){return(await Fr(e)).data||[]},async getFlows(e){return(await $r(e)).data||[]}};function Yt(e){const t=e;return t.install=n=>{e.name&&!n.component(e.name)&&n.component(e.name,e)},t}const cy={...ny,...Tu},Us=Yt(Ji),zs=Yt(Zu),Hs=Yt(df),Ws=Yt(Xo),qs=Yt(ai),Ys=Yt(iy),Ks=Yt(Fs),uy={FlowButton:Us,FlowButtons:zs,FlowGrid:Hs,FlowJump:Ws,FlowSend:qs,FlowDiagram:Ys,FlowStart:Ks},br={runtimeService:qi,getRuntimeService(){return qi},install(e,t={}){Uo(t),oy(e._context),e.use(ge),Object.values(uy).forEach(n=>{e.component(n.name)||e.component(n.name,n)})}},fy=br,dy=br;ue.FlowButton=Us,ue.FlowButtons=zs,ue.FlowDiagram=Ys,ue.FlowGrid=Hs,ue.FlowJump=Ws,ue.FlowSend=qs,ue.FlowStart=Ks,ue.FlowstreamUIPlus=br,ue.LeadalFlowVue3=fy,ue.WorkflowComponentsVue3=dy,ue.activateFlow=Zr,ue.claimTask=Hr,ue.completeTask=Kr,ue.configureWorkflow=Uo,ue.default=br,ue.deleteDraftTask=Ho,ue.deleteProcessInstance=zn,ue.doneTaskList=Ur,ue.downloadBpmn=ei,ue.draftFlowList=zo,ue.draftTaskList=Vr,ue.flowApi=cy,ue.flowMonitorLine=Ui,ue.flowStartNodeList=Ko,ue.flowTrack=zi,ue.getAppList=Fr,ue.getFirstHandleNodes=Wn,ue.getFlowList=$r,ue.getOptList=zr,ue.jumpTask=ii,ue.nextSendNode=ri,ue.nodeAssistant=qn,ue.organUserTree=ni,ue.quickStart=jr,ue.receiveMessageEvent=Yo,ue.recycleTask=Yr,ue.revocationTask=Wr,ue.rollbackTask=qr,ue.runtimeService=qi,ue.saveDraft=Wo,ue.sendTask=ti,ue.startDraft=qo,ue.startNodes=oi,ue.suspendFlow=Jr,ue.terminateFlow=Qr,ue.todoTaskList=Hn,ue.turnAfterTask=Xr,ue.turnBeforeTask=Gr,ue.workflowHttp=Un,Object.defineProperties(ue,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
17
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="`+k+'" height="'+z+'" viewBox="'+h+" "+m+" "+k+" "+z+'" 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}},Ae.prototype._setDefinitions=function(e){this._definitions=e},Ae.prototype.getModules=function(){return this._modules},Ae.prototype.clear=function(){this.getDefinitions()&&Rt.prototype.clear.call(this)},Ae.prototype.destroy=function(){Rt.prototype.destroy.call(this),er(this._container)},Ae.prototype.on=function(e,t,n,r){return this.get("eventBus").on(e,t,n,r)},Ae.prototype.off=function(e,t){this.get("eventBus").off(e,t)},Ae.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach(),e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),typeof e=="string"&&(e=ht(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},Ae.prototype.getDefinitions=function(){return this._definitions},Ae.prototype.detach=function(){const e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},Ae.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=le(Ef(n,["additionalModules"]),{canvas:le({},n.canvas,{container:e}),modules:a});Rt.call(this,s),n&&n.container&&this.attachTo(n.container)},Ae.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},Ae.prototype._createContainer=function(e){const t=at('<div class="bjs-container"></div>');return ze(t,{width:Ds(e.width),height:Ds(e.height),position:e.position}),t},Ae.prototype._createModdle=function(e){const t=le({},this._moddleExtensions,e.moddleExtensions);return new xm(t)},Ae.prototype._modules=[];function vr(e,t){return e.warnings=t,e}function Mm(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 Lm={width:"100%",height:"100%",position:"relative"};function Ds(e){return e+(Et(e)?"px":"")}function Fm(e,t){return t&&Qe(e.diagrams,function(n){return n.id===t})||null}function $m(e){const n='<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+Rs+"</a>",r=at(n);ze(ht("svg",r),Ts),ze(r,Ns,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),e.appendChild(r),At.bind(r,"click",function(i){Bm(),i.preventDefault()})}function wr(e){Ae.call(this,e)}nt(wr,Ae),wr.prototype._modules=[Jd,yp,Ba,xp,Na],wr.prototype._moddleExtensions={};function Is(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vi(e){return Math.log(e)/Math.log(10)}function Os(e,t){var n=Vi(e.min),r=Vi(e.max),i=Math.abs(n)+Math.abs(r);return i/t}function Vm(e,t){return Math.max(e.min,Math.min(e.max,t))}var jm=Math.sign||function(e){return e>=0?1:-1},ji={min:.2,max:4},Bs=10,Um=.1,zm=.75;function ct(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=_t(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||zm;var r=this;t.on("canvas.mouseover",function(){r._init(e.enabled!==!1)}),t.on("canvas.mouseout",function(){r._init(!1)})}ct.$inject=["config.zoomScroll","eventBus","canvas"],ct.prototype.scroll=function(t){this._canvas.scroll(t)},ct.prototype.reset=function(){this._canvas.zoom("fit-viewport")},ct.prototype.zoom=function(t,n){var r=Os(ji,Bs*2);this._totalDelta+=t,Math.abs(this._totalDelta)>Um&&(this._zoom(t,n,r),this._totalDelta=0)},ct.prototype._handleWheel=function(t){if(this._enabled){var n=this._container;t.preventDefault();var r=t.ctrlKey||gp()&&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(),f={x:t.clientX-s.left,y:t.clientY-s.top};a=Math.sqrt(Math.pow(t.deltaY,2)+Math.pow(t.deltaX,2))*jm(t.deltaY)*o,this.zoom(a,f)}else i?a={dx:o*t.deltaY,dy:0}:a={dx:o*t.deltaX,dy:o*t.deltaY},this.scroll(a)}},ct.prototype.stepZoom=function(t,n){var r=Os(ji,Bs);this._zoom(t,n,r)},ct.prototype._zoom=function(e,t,n){var r=this._canvas,i=e>0?1:-1,o=Vi(r.zoom()),a=Math.round(o/n)*n;a+=n*i;var s=Math.pow(10,a);r.zoom(Vm(ji,s),t)},ct.prototype.toggle=function(t){var n=this._container,r=this._handleWheel,i=this._enabled;return typeof t>"u"&&(t=!i),i!==t&&At[t?"bind":"unbind"](n,"wheel",r,!1),this._enabled=t,t},ct.prototype._init=function(e){this.toggle(e)};const Hm={__init__:["zoomScroll"],zoomScroll:["type",ct]};var Wm=/^djs-cursor-.*$/;function Ms(e){var t=jt(document.body);t.removeMatching(Wm),e&&t.add("djs-cursor-"+e)}function qm(){Ms(null)}var Ym=5e3;function Km(e,t){t=t||"element.click";function n(){return!1}return e.once(t,Ym,n),function(){e.off(t,n)}}var Gm=15;function Ls(e,t){var n;function r(s){return a(s.originalEvent)}e.on("canvas.focus.changed",function(s){s.focused?e.on("element.mousedown",500,r):e.off("element.mousedown",r)});function i(s){var f=n.start,d=n.button,h=Ua(s),m=Is(h,f);if(!n.dragging&&Xm(m)>Gm&&(n.dragging=!0,d===0&&Km(e),Ms("grab")),n.dragging){var k=n.last||n.start;m=Is(h,k),t.scroll({dx:m.x,dy:m.y}),n.last=h}s.preventDefault()}function o(s){At.unbind(document,"mousemove",i),At.unbind(document,"mouseup",o),n=null,qm()}function a(s){if(!Ea(s.target,".djs-draggable")){var f=s.button;if(!(f>=2||s.ctrlKey||s.shiftKey||s.altKey))return n={button:f,start:Ua(s)},At.bind(document,"mousemove",i),At.bind(document,"mouseup",o),!0}}this.isActive=function(){return!!n}}Ls.$inject=["eventBus","canvas"];function Xm(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}const Jm={__init__:["moveCanvas"],moveCanvas:["type",Ls]},Zm={name:"Camunda",uri:"http://camunda.org/schema/1.0/bpmn",prefix:"camunda",xml:{tagAlias:"lowerCase"},associations:[],types:JSON.parse('[{"name":"Definitions","isAbstract":true,"extends":["bpmn:Definitions"],"properties":[{"name":"diagramRelationId","isAttr":true,"type":"String"}]},{"name":"InOutBinding","superClass":["Element"],"isAbstract":true,"properties":[{"name":"source","isAttr":true,"type":"String"},{"name":"sourceExpression","isAttr":true,"type":"String"},{"name":"target","isAttr":true,"type":"String"},{"name":"businessKey","isAttr":true,"type":"String"},{"name":"local","isAttr":true,"type":"Boolean","default":false},{"name":"variables","isAttr":true,"type":"String"}]},{"name":"In","superClass":["InOutBinding"],"meta":{"allowedIn":["bpmn:CallActivity","bpmn:SignalEventDefinition"]}},{"name":"Out","superClass":["InOutBinding"],"meta":{"allowedIn":["bpmn:CallActivity"]}},{"name":"AsyncCapable","isAbstract":true,"extends":["bpmn:Activity","bpmn:Gateway","bpmn:Event"],"properties":[{"name":"async","isAttr":true,"type":"Boolean","default":false},{"name":"asyncBefore","isAttr":true,"type":"Boolean","default":false},{"name":"asyncAfter","isAttr":true,"type":"Boolean","default":false},{"name":"exclusive","isAttr":true,"type":"Boolean","default":true}]},{"name":"JobPriorized","isAbstract":true,"extends":["bpmn:Process","camunda:AsyncCapable"],"properties":[{"name":"jobPriority","isAttr":true,"type":"String"}]},{"name":"SignalEventDefinitionExtension","isAbstract":true,"extends":["bpmn:SignalEventDefinition"],"properties":[{"name":"async","isAttr":true,"type":"Boolean","default":false}]},{"name":"ErrorEventDefinitionExtension","isAbstract":true,"extends":["bpmn:ErrorEventDefinition"],"properties":[{"name":"errorCodeVariable","isAttr":true,"type":"String"},{"name":"errorMessageVariable","isAttr":true,"type":"String"}]},{"name":"ErrorEventDefinition","superClass":["bpmn:ErrorEventDefinition","Element"],"properties":[{"name":"expression","isAttr":true,"type":"String"}],"meta":{"allowedIn":["bpmn:ServiceTask"]}},{"name":"Error","isAbstract":true,"extends":["bpmn:Error"],"properties":[{"name":"camunda:errorMessage","isAttr":true,"type":"String"}]},{"name":"PotentialStarter","superClass":["Element"],"properties":[{"name":"resourceAssignmentExpression","type":"bpmn:ResourceAssignmentExpression"}]},{"name":"FormSupported","isAbstract":true,"extends":["bpmn:StartEvent","bpmn:UserTask"],"properties":[{"name":"formHandlerClass","isAttr":true,"type":"String"},{"name":"formKey","isAttr":true,"type":"String"},{"name":"formRef","isAttr":true,"type":"String"},{"name":"formRefBinding","isAttr":true,"type":"String"},{"name":"formRefVersion","isAttr":true,"type":"String"}]},{"name":"TemplateSupported","isAbstract":true,"extends":["bpmn:Collaboration","bpmn:Process","bpmn:FlowElement"],"properties":[{"name":"modelerTemplate","isAttr":true,"type":"String"},{"name":"modelerTemplateVersion","isAttr":true,"type":"Integer"}]},{"name":"Initiator","isAbstract":true,"extends":["bpmn:StartEvent"],"properties":[{"name":"initiator","isAttr":true,"type":"String"}]},{"name":"ScriptTask","isAbstract":true,"extends":["bpmn:ScriptTask"],"properties":[{"name":"resultVariable","isAttr":true,"type":"String"},{"name":"resource","isAttr":true,"type":"String"}]},{"name":"Process","isAbstract":true,"extends":["bpmn:Process"],"properties":[{"name":"candidateStarterGroups","isAttr":true,"type":"String"},{"name":"candidateStarterUsers","isAttr":true,"type":"String"},{"name":"versionTag","isAttr":true,"type":"String"},{"name":"historyTimeToLive","isAttr":true,"type":"String"},{"name":"isStartableInTasklist","isAttr":true,"type":"Boolean","default":true}]},{"name":"EscalationEventDefinitionExtension","isAbstract":true,"extends":["bpmn:EscalationEventDefinition"],"properties":[{"name":"escalationCodeVariable","isAttr":true,"type":"String"}]},{"name":"FormalExpression","isAbstract":true,"extends":["bpmn:FormalExpression"],"properties":[{"name":"resource","isAttr":true,"type":"String"}]},{"name":"Assignable","extends":["bpmn:UserTask"],"properties":[{"name":"assignee","isAttr":true,"type":"String"},{"name":"candidateUsers","isAttr":true,"type":"String"},{"name":"candidateGroups","isAttr":true,"type":"String"},{"name":"dueDate","isAttr":true,"type":"String"},{"name":"followUpDate","isAttr":true,"type":"String"},{"name":"priority","isAttr":true,"type":"String"}]},{"name":"CallActivity","extends":["bpmn:CallActivity"],"properties":[{"name":"calledElementBinding","isAttr":true,"type":"String","default":"latest"},{"name":"calledElementVersion","isAttr":true,"type":"String"},{"name":"calledElementVersionTag","isAttr":true,"type":"String"},{"name":"calledElementTenantId","isAttr":true,"type":"String"},{"name":"caseRef","isAttr":true,"type":"String"},{"name":"caseBinding","isAttr":true,"type":"String","default":"latest"},{"name":"caseVersion","isAttr":true,"type":"String"},{"name":"caseTenantId","isAttr":true,"type":"String"},{"name":"variableMappingClass","isAttr":true,"type":"String"},{"name":"variableMappingDelegateExpression","isAttr":true,"type":"String"}]},{"name":"ServiceTaskLike","extends":["bpmn:ServiceTask","bpmn:BusinessRuleTask","bpmn:SendTask","bpmn:MessageEventDefinition"],"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"resultVariable","isAttr":true,"type":"String"}]},{"name":"DmnCapable","extends":["bpmn:BusinessRuleTask"],"properties":[{"name":"decisionRef","isAttr":true,"type":"String"},{"name":"decisionRefBinding","isAttr":true,"type":"String","default":"latest"},{"name":"decisionRefVersion","isAttr":true,"type":"String"},{"name":"mapDecisionResult","isAttr":true,"type":"String","default":"resultList"},{"name":"decisionRefTenantId","isAttr":true,"type":"String"}]},{"name":"ExternalCapable","extends":["camunda:ServiceTaskLike"],"properties":[{"name":"type","isAttr":true,"type":"String"},{"name":"topic","isAttr":true,"type":"String"}]},{"name":"TaskPriorized","extends":["bpmn:Process","camunda:ExternalCapable"],"properties":[{"name":"taskPriority","isAttr":true,"type":"String"}]},{"name":"Properties","superClass":["Element"],"meta":{"allowedIn":["*"]},"properties":[{"name":"values","type":"Property","isMany":true}]},{"name":"Property","superClass":["Element"],"properties":[{"name":"id","type":"String","isAttr":true},{"name":"name","type":"String","isAttr":true},{"name":"value","type":"String","isAttr":true}]},{"name":"Connector","superClass":["Element"],"meta":{"allowedIn":["camunda:ServiceTaskLike"]},"properties":[{"name":"inputOutput","type":"InputOutput"},{"name":"connectorId","type":"String"}]},{"name":"InputOutput","superClass":["Element"],"meta":{"allowedIn":["bpmn:FlowNode","camunda:Connector"]},"properties":[{"name":"inputOutput","type":"InputOutput"},{"name":"connectorId","type":"String"},{"name":"inputParameters","isMany":true,"type":"InputParameter"},{"name":"outputParameters","isMany":true,"type":"OutputParameter"}]},{"name":"InputOutputParameter","properties":[{"name":"name","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"},{"name":"definition","type":"InputOutputParameterDefinition"}]},{"name":"InputOutputParameterDefinition","isAbstract":true},{"name":"List","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"items","isMany":true,"type":"InputOutputParameterDefinition"}]},{"name":"Map","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"entries","isMany":true,"type":"Entry"}]},{"name":"Entry","properties":[{"name":"key","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"},{"name":"definition","type":"InputOutputParameterDefinition"}]},{"name":"Value","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"id","isAttr":true,"type":"String"},{"name":"name","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"}]},{"name":"Script","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"scriptFormat","isAttr":true,"type":"String"},{"name":"resource","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"}]},{"name":"Field","superClass":["Element"],"meta":{"allowedIn":["camunda:ServiceTaskLike","camunda:ExecutionListener","camunda:TaskListener"]},"properties":[{"name":"name","isAttr":true,"type":"String"},{"name":"expression","type":"String"},{"name":"stringValue","isAttr":true,"type":"String"},{"name":"string","type":"String"}]},{"name":"InputParameter","superClass":["InputOutputParameter"]},{"name":"OutputParameter","superClass":["InputOutputParameter"]},{"name":"Collectable","isAbstract":true,"extends":["bpmn:MultiInstanceLoopCharacteristics"],"superClass":["camunda:AsyncCapable"],"properties":[{"name":"collection","isAttr":true,"type":"String"},{"name":"elementVariable","isAttr":true,"type":"String"}]},{"name":"FailedJobRetryTimeCycle","superClass":["Element"],"meta":{"allowedIn":["camunda:AsyncCapable","bpmn:MultiInstanceLoopCharacteristics"]},"properties":[{"name":"body","isBody":true,"type":"String"}]},{"name":"ExecutionListener","superClass":["Element"],"meta":{"allowedIn":["bpmn:Task","bpmn:ServiceTask","bpmn:UserTask","bpmn:BusinessRuleTask","bpmn:ScriptTask","bpmn:ReceiveTask","bpmn:ManualTask","bpmn:ExclusiveGateway","bpmn:SequenceFlow","bpmn:ParallelGateway","bpmn:InclusiveGateway","bpmn:EventBasedGateway","bpmn:StartEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:EndEvent","bpmn:BoundaryEvent","bpmn:CallActivity","bpmn:SubProcess","bpmn:Process"]},"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"event","isAttr":true,"type":"String"},{"name":"script","type":"Script"},{"name":"fields","type":"Field","isMany":true}]},{"name":"TaskListener","superClass":["Element"],"meta":{"allowedIn":["bpmn:UserTask"]},"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"event","isAttr":true,"type":"String"},{"name":"script","type":"Script"},{"name":"fields","type":"Field","isMany":true},{"name":"id","type":"String","isAttr":true},{"name":"eventDefinitions","type":"bpmn:TimerEventDefinition","isMany":true}]},{"name":"FormProperty","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent","bpmn:UserTask"]},"properties":[{"name":"id","type":"String","isAttr":true},{"name":"name","type":"String","isAttr":true},{"name":"type","type":"String","isAttr":true},{"name":"required","type":"String","isAttr":true},{"name":"readable","type":"String","isAttr":true},{"name":"writable","type":"String","isAttr":true},{"name":"variable","type":"String","isAttr":true},{"name":"expression","type":"String","isAttr":true},{"name":"datePattern","type":"String","isAttr":true},{"name":"default","type":"String","isAttr":true},{"name":"values","type":"Value","isMany":true}]},{"name":"FormData","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent","bpmn:UserTask"]},"properties":[{"name":"fields","type":"FormField","isMany":true},{"name":"businessKey","type":"String","isAttr":true}]},{"name":"FormField","superClass":["Element"],"properties":[{"name":"id","type":"String","isAttr":true},{"name":"label","type":"String","isAttr":true},{"name":"type","type":"String","isAttr":true},{"name":"datePattern","type":"String","isAttr":true},{"name":"defaultValue","type":"String","isAttr":true},{"name":"properties","type":"Properties"},{"name":"validation","type":"Validation"},{"name":"values","type":"Value","isMany":true}]},{"name":"Validation","superClass":["Element"],"properties":[{"name":"constraints","type":"Constraint","isMany":true}]},{"name":"Constraint","superClass":["Element"],"properties":[{"name":"name","type":"String","isAttr":true},{"name":"config","type":"String","isAttr":true}]},{"name":"ConditionalEventDefinitionExtension","isAbstract":true,"extends":["bpmn:ConditionalEventDefinition"],"properties":[{"name":"variableName","isAttr":true,"type":"String"},{"name":"variableEvents","isAttr":true,"type":"String"}]}]'),emumerations:[]},Qm={class:"task-track"},ey={class:"subject-container"},ty={class:"track-table"},ny=wt(l.defineComponent({name:"UiFlowTaskTrack",__name:"TaskTrack",props:l.mergeModels({data:{default:()=>[]}},{isHide:{type:Boolean,default:!1},isHideModifiers:{}}),emits:["update:isHide"],setup(e){const t=l.useModel(e,"isHide"),n={currentPage:1,pageSize:20,total:0},r=[{label:"办理环节",prop:"activityName",minWidth:"200px"},{label:"办理人",prop:"assigneesNames",minWidth:"200px"},{label:"办理方式",prop:"dealTypeLabel",width:"180px"},{label:"开始时间",prop:"startTime",width:"180px",formatter:i=>i.startTime?Gn(i.startTime).format("YYYY-MM-DD HH:mm:ss"):""},{label:"结束时间",prop:"endTime",width:"180px",formatter:i=>i.endTime?Gn(i.endTime).format("YYYY-MM-DD HH:mm:ss"):""},{label:"滞留时长",prop:"duration",width:"140px",formatter:i=>typeof i.duration=="string"?i.duration.split(",").join(""):i.duration||""},{label:"处理状态",prop:"stateLabel",width:"100px"}];return(i,o)=>{const a=l.resolveComponent("el-icon");return l.openBlock(),l.createElementBlock("div",Qm,[l.createElementVNode("div",ey,[o[1]||(o[1]=l.createElementVNode("div",{class:"subject-heading"},[l.createElementVNode("div",{class:"subject-line"}),l.createElementVNode("div",{class:"subject-title"},"办理轨迹")],-1)),l.createElementVNode("button",{class:"hide-btn",type:"button",onClick:o[0]||(o[0]=s=>t.value=!t.value)},[l.createVNode(a,null,{default:l.withCtx(()=>[t.value?(l.openBlock(),l.createBlock(l.unref(tl),{key:0})):(l.openBlock(),l.createBlock(l.unref(Qs),{key:1}))]),_:1}),l.createElementVNode("span",null,l.toDisplayString(t.value?"显示":"隐藏"),1)])]),l.withDirectives(l.createElementVNode("div",ty,[l.createVNode(Zo,{data:e.data,"hide-number":!1,"hide-page":!0,"hide-selection":!0,"page-config":n,"table-label":r,"table-height":"100%"},null,8,["data"])],512),[[l.vShow,!t.value]])])}}}),[["__scopeId","data-v-8c8b5c11"]]),Ui=e=>ge({url:"/server/runtime/event/get",method:"post",data:e}),zi=e=>ge({url:"/server/history/trackinst/event/query",method:"post",data:e}),ry=Object.freeze(Object.defineProperty({__proto__:null,activateFlow:e=>ge({url:"/server/runtime/event/activate",method:"post",data:e}),flowMonitorLine:Ui,flowTrack:zi,suspendFlow:e=>ge({url:"/server/runtime/event/suspend",method:"post",data:e}),terminateFlow:e=>ge({url:"/server/runtime/event/terminate",method:"post",data:e})},Symbol.toStringTag,{value:"Module"})),iy={class:"flow-diagram"},oy=wt(l.defineComponent({name:"UiFlowDiagram",__name:"FlowDiagram",props:{processDefinitionId:{},processInstanceId:{}},emits:["loaded","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(),a=l.shallowRef(),s=l.ref(),f=l.ref([]),d=l.ref(!1);let h=0;function m(){var y;o.value&&((y=a.value)==null||y.destroy(),a.value=l.markRaw(new wr({container:o.value,additionalModules:[Hm,Jm],moddleExtensions:{camunda:Zm}})))}function k(y,v,A=!1){if(!y||!a.value)return;const x=a.value.get("canvas").getGraphics(y);if(!x)return;let E=".djs-visual rect, .djs-visual path";A&&(E+=", .djs-visual circle"),x.querySelectorAll(E).forEach(H=>{H.style.fill=v,H.style.stroke="#333"}),x.querySelectorAll(".djs-visual text").forEach(H=>{H.style.fill="#333"})}function z(y,v,A){var Z;const N=y.style.getPropertyValue(v)||y.getAttribute(v),x=(Z=N==null?void 0:N.match(/#([^)'"\s]+)/))==null?void 0:Z[1],E=y.ownerSVGElement;if(!x||!E)return;const H=Array.from(E.querySelectorAll("marker")).find(K=>K.id===x);if(!(H!=null&&H.parentElement))return;const L=A.replace(/[^a-zA-Z0-9]/g,""),_=`${x}-flowstream-${L}`;let q=Array.from(E.querySelectorAll("marker")).find(K=>K.id===_);q||(q=H.cloneNode(!0),q.id=_,q.querySelectorAll("path, polygon, polyline").forEach(K=>{K.style.fill=A,K.style.stroke=A}),H.parentElement.appendChild(q));const se=`url(#${_})`;y.style.setProperty(v,se),y.setAttribute(v,se)}function G(y,v){if(!y||!a.value)return;const N=a.value.get("canvas").getGraphics(y);N&&N.querySelectorAll(".djs-visual > path").forEach(x=>{x.style.fill="none",x.style.stroke=v,z(x,"marker-start",v),z(x,"marker-end",v)})}function V(y){const v=y.filter(E=>E.type==="bpmn:StartEvent");if(v.length!==1)return[];const A=[],N=new Set;let x=v[0];for(;x&&!N.has(x.id);){N.add(x.id);const E=(x.outgoing||[]).filter(q=>q.type==="bpmn:SequenceFlow");if(!E.length)return A;if(E.length!==1)return[];const H=E[0],L=H.target,_=((L==null?void 0:L.incoming)||[]).filter(q=>q.type==="bpmn:SequenceFlow");if(!L||_.length!==1)return[];A.push(H),x=L}return[]}function F(y){var N;const v=((N=s.value)==null?void 0:N.sequenceFlowStates)||[];if(!v.length)return;const A=v.map(x=>y.get(x.sequenceFlowId||x.id)).filter(x=>(x==null?void 0:x.type)==="bpmn:SequenceFlow");if(A.length){A.forEach(x=>G(x,"#98e5b5"));return}V(y).slice(0,v.length).forEach(x=>G(x,"#98e5b5"))}function S(){var A;if(!a.value)return;const y=a.value.get("elementRegistry"),v=new Set;(((A=s.value)==null?void 0:A.flowNodeStates)||[]).forEach(N=>{v.add(N.id),k(y.get(N.id),N.state==="executing"?"#ffd37e":"#98e5b5")}),y.filter(N=>N.type==="bpmn:StartEvent").forEach(N=>{v.add(N.id),k(N,"#98e5b5",!0)}),y.filter(N=>N.type==="bpmn:EndEvent").forEach(N=>{v.add(N.id),k(N,"#f14b12",!0)}),y.forEach(N=>{var x;!v.has(N.id)&&((x=N.type)!=null&&x.includes("Task"))&&k(N,"#eee")}),F(y)}async function B(){const y=++h;try{await l.nextTick(),m();const[v,A,N]=await Promise.all([ei({procdefId:r.processDefinitionId}),Ui({processInstanceId:r.processInstanceId,fetchFlowNodeState:!0,fetchSequenceFlowState:!0}),zi({processInstanceId:r.processInstanceId})]);if(y!==h||!a.value)return;s.value=A.data||{},f.value=N.data||[],await a.value.importXML(v),a.value.get("canvas").zoom("fit-viewport",!0),S(),i("loaded")}catch(v){i("error",v)}}return l.watch(()=>[r.processDefinitionId,r.processInstanceId],B),l.onMounted(B),l.onBeforeUnmount(()=>{var y;h++,(y=a.value)==null||y.destroy(),a.value=void 0}),t({refresh:B,viewer:a,trackData:f,isTrackHidden:d}),(y,v)=>(l.openBlock(),l.createElementBlock("div",iy,[l.createElementVNode("div",{ref_key:"canvasRef",ref:o,class:"canvas"},null,512),v[1]||(v[1]=l.createStaticVNode('<div class="legend" data-v-c4f4a933><div class="legend-item undo" data-v-c4f4a933><div class="legend-circle" data-v-c4f4a933></div><span data-v-c4f4a933>未办理环节</span></div><div class="legend-item doing" data-v-c4f4a933><div class="legend-circle" data-v-c4f4a933></div><span data-v-c4f4a933>当前环节</span></div><div class="legend-item done" data-v-c4f4a933><div class="legend-circle" data-v-c4f4a933></div><span data-v-c4f4a933>已办理环节</span></div></div>',1)),l.createVNode(ny,{"is-hide":d.value,"onUpdate:isHide":v[0]||(v[0]=A=>d.value=A),class:"bottom-container",data:f.value,style:l.normalizeStyle({height:d.value?"55px":"360px"})},null,8,["is-hide","data","style"])]))}}),[["__scopeId","data-v-c4f4a933"]]),Fs=l.defineComponent({name:"UiFlowStart",__name:"FlowStart",props:{dialogTitle:{default:"发送"},dialogWidth:{default:"1200px"},defaultOpinion:{default:""},bpmnXml:{default:""},singleAssignee:{type:Boolean,default:!0},assignmentQueryParams:{default:()=>({})},beforeSend:{}},emits:["started","afterSend","close","error"],setup(e,{expose:t,emit:n}){const r=e,i=n,o=l.ref(),a=l.ref(!1),s=l.ref(!1),f=l.ref(!1),d=l.ref(),h=l.ref();async function m(B){if(s.value)throw new Error("流程正在启动,请勿重复提交");s.value=!0;let y;try{const A=(await Wn({processDefinitionId:B.processDefinitionId})).data||[];if(A.length!==1)throw new Error(A.length?`流程存在 ${A.length} 个首办节点,无法自动启动`:"流程未找到首办节点,无法启动");if(y=(await jr(B)).data,!(y!=null&&y.processInstanceId)||!y.processDefinitionId||!y.workId)throw new Error("流程引擎未返回流程实例 ID、流程定义 ID 或起草人待办 ID");const x=A[0];if(a.value=!1,d.value={startArgs:B,startResult:y,activity:{activityId:x.id,activityName:x.name||x.activityName},variables:B.variables||{},dealUser:{id:B.draftUserId,userId:B.draftUserId,name:B.draftUserName}},f.value=!1,h.value=void 0,await l.nextTick(),!o.value)throw new Error("发送组件尚未就绪")}catch(v){throw s.value=!1,i("error",{phase:"start",error:v}),v}try{return i("started",y),await k(),y}finally{s.value=!1}}async function k(){if(!d.value)throw new Error("没有可继续发送的流程上下文");try{if(r.beforeSend&&await r.beforeSend(d.value)===!1)return a.value=!1,!1;if(await l.nextTick(),!o.value)throw new Error("发送组件尚未就绪");return await o.value.open(),!0}catch(B){throw i("error",{phase:"beforeSend",error:B}),B}}function z(){var y,v;if(a.value){(y=o.value)==null||y.close();return}const B=(v=d.value)==null?void 0:v.startResult;B&&(!f.value&&B.processInstanceId&&zn({processInstanceId:B.processInstanceId}).catch(A=>i("error",{phase:"send",error:A})),d.value=void 0,i("close",B))}function G(B){h.value=B}function V(B){!d.value||!h.value||(f.value=!0,i("afterSend",{startResult:d.value.startResult,sendData:h.value,sendResult:B}))}function F(B){i("error",{phase:"send",error:B})}function S(){var y;const B=(y=d.value)==null?void 0:y.startResult;i("close",B),f.value&&(d.value=void 0,f.value=!1)}return t({start:m,open:k,close:z,starting:s,sendVisible:a,context:d,sendRef:o}),(B,y)=>d.value?(l.openBlock(),l.createBlock(ai,{key:0,ref_key:"sendRef",ref:o,modelValue:a.value,"onUpdate:modelValue":y[0]||(y[0]=v=>a.value=v),"process-definition-id":d.value.startResult.processDefinitionId,"process-instance-id":d.value.startResult.processInstanceId,activity:d.value.activity,"assignment-query-params":e.assignmentQueryParams,"work-id":d.value.startResult.workId,variables:d.value.variables,"deal-user":d.value.dealUser,"bpmn-xml":e.bpmnXml,"force-single-assignee":e.singleAssignee,"delete-instance-on-cancel":"","show-trigger":!1,"dialog-title":e.dialogTitle,"dialog-width":e.dialogWidth,"default-opinion":e.defaultOpinion,onBeforeSend:G,onAfterSend:V,onClose:S,onError:F},null,8,["modelValue","process-definition-id","process-instance-id","activity","assignment-query-params","work-id","variables","deal-user","bpmn-xml","force-single-assignee","dialog-title","dialog-width","default-opinion"])):l.createCommentVNode("",!0)}});let Hi,ut,Wi=!1;function ay(e){Hi=e}function sy(e){return e instanceof Error?e.message:typeof e=="string"?e:"流程操作失败"}function $s(e){return{...e,message:sy(e.error)}}async function ly(e,t){return e?await e(t)!==!1:!0}function Rn(e,t){if(e)try{Promise.resolve(e(t)).catch(n=>{console.error("[FlowStream] runtimeService 回调执行失败",n)})}catch(n){console.error("[FlowStream] runtimeService 回调执行失败",n)}}function Vs(e){e.disposed||(e.disposed=!0,l.render(null,e.container),e.container.remove(),ut===e&&(ut=void 0))}function cy(e){var t;return(t=e.component)==null?void 0:t.exposed}function js(){if(!(ut!=null&&ut.exposed)||ut.disposed)throw new Error("当前没有已启动且可继续发送的流程");return ut}const qi={start:(async e=>{if(typeof document>"u")throw new Error("flowstream.runtimeService.start() 只能在浏览器环境中调用");if(!Hi)throw new Error("调用 runtimeService.start() 前必须先执行 app.use(flowstream)");if(Wi||ut&&!ut.disposed)throw new Error("当前已有已启动但尚未发送完成的流程,请调用 runtimeService.open() 继续办理");const{dialogTitle:t="发送",dialogWidth:n="1200px",defaultOpinion:r="",bpmnXml:i="",singleAssignee:o=!0,assignmentQueryParams:a={},onBeforeStart:s,onBeforeSend:f,onStarted:d,onAfterSend:h,onClose:m,onError:k,...z}=e;Wi=!0;try{if(!await ly(s,z))return!1}catch(S){throw k&&Rn(k,$s({phase:"beforeStart",error:S})),S}finally{Wi=!1}const G=document.createElement("div");G.className="ui-flow-runtime-service-host",document.body.appendChild(G);const V={container:G,vnode:void 0,sendCompleted:!1,disposed:!1},F=l.createVNode(Fs,{dialogTitle:t,dialogWidth:n,defaultOpinion:r,bpmnXml:i,singleAssignee:o,assignmentQueryParams:a,beforeSend:f,onStarted:S=>{V.startResult=S,Rn(d,S)},onAfterSend:S=>{V.sendCompleted=!0,Rn(h,S)},onClose:S=>{m&&Rn(m,S),l.nextTick(()=>Vs(V))},onError:S=>{k&&Rn(k,$s(S))}});F.appContext=Hi,V.vnode=F,ut=V;try{if(l.render(F,G),await l.nextTick(),V.exposed=cy(F),!V.exposed)throw new Error("流程启动服务挂载失败");return await V.exposed.start(z)}catch(S){throw V.startResult||Vs(V),S}}),async open(){return js().exposed.open()},close(){js().exposed.close()},async getApps(e){return(await Fr(e)).data||[]},async getFlows(e){return(await $r(e)).data||[]}};function Yt(e){const t=e;return t.install=n=>{e.name&&!n.component(e.name)&&n.component(e.name,e)},t}const uy={...ry,...Tu},Us=Yt(Ji),zs=Yt(Qu),Hs=Yt(pf),Ws=Yt(Xo),qs=Yt(ai),Ys=Yt(oy),Ks=Yt(Fs),fy={FlowButton:Us,FlowButtons:zs,FlowGrid:Hs,FlowJump:Ws,FlowSend:qs,FlowDiagram:Ys,FlowStart:Ks},br={runtimeService:qi,getRuntimeService(){return qi},install(e,t={}){Uo(t),ay(e._context),e.use(ve),Object.values(fy).forEach(n=>{e.component(n.name)||e.component(n.name,n)})}},dy=br,py=br;fe.FlowButton=Us,fe.FlowButtons=zs,fe.FlowDiagram=Ys,fe.FlowGrid=Hs,fe.FlowJump=Ws,fe.FlowSend=qs,fe.FlowStart=Ks,fe.FlowstreamUIPlus=br,fe.LeadalFlowVue3=dy,fe.WorkflowComponentsVue3=py,fe.activateFlow=Zr,fe.claimTask=Hr,fe.completeTask=Kr,fe.configureWorkflow=Uo,fe.default=br,fe.deleteDraftTask=Ho,fe.deleteProcessInstance=zn,fe.doneTaskList=Ur,fe.downloadBpmn=ei,fe.draftFlowList=zo,fe.draftTaskList=Vr,fe.flowApi=uy,fe.flowMonitorLine=Ui,fe.flowStartNodeList=Ko,fe.flowTrack=zi,fe.getAppList=Fr,fe.getFirstHandleNodes=Wn,fe.getFlowList=$r,fe.getOptList=zr,fe.jumpTask=ii,fe.nextSendNode=ri,fe.nodeAssistant=qn,fe.organUserTree=ni,fe.quickStart=jr,fe.receiveMessageEvent=Yo,fe.recycleTask=Yr,fe.revocationTask=Wr,fe.rollbackTask=qr,fe.runtimeService=qi,fe.saveDraft=Wo,fe.sendTask=ti,fe.startDraft=qo,fe.startNodes=oi,fe.suspendFlow=Jr,fe.terminateFlow=Qr,fe.todoTaskList=Hn,fe.turnAfterTask=Xr,fe.turnBeforeTask=Gr,fe.workflowHttp=Un,Object.defineProperties(fe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|