{"use strict";Qs.formatArgs=Axe;Qs.save=_xe;Qs.load=Lxe;Qs.useColors=Cxe;Qs.storage=Dxe();Qs.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Qs.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Cxe(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}o(Cxe,"useColors");function Axe(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+qb.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}o(Axe,"formatArgs");Qs.log=console.debug||console.log||(()=>{});function _xe(t){try{t?Qs.storage.setItem("debug",t):Qs.storage.removeItem("debug")}catch{}}o(_xe,"save");function Lxe(){let t;try{t=Qs.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}o(Lxe,"load");function Dxe(){try{return localStorage}catch{}}o(Dxe,"localstorage");qb.exports=tz()(Qs);var{formatters:Nxe}=qb.exports;Nxe.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var $at,nz=M(()=>{"use strict";FF();WF();jF();KF();QF();$at=Ji(rz(),1)});var zS,FS,iz,Xb,Rxe,_o,su=M(()=>{"use strict";ut();nz();zS={body:' {"use strict";Us.formatArgs=Rxe;Us.save=Mxe;Us.load=Ixe;Us.useColors=Nxe;Us.storage=Oxe();Us.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Us.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Nxe(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}o(Nxe,"useColors");function Rxe(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Rb.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}o(Rxe,"formatArgs");Us.log=console.debug||console.log||(()=>{});function Mxe(t){try{t?Us.storage.setItem("debug",t):Us.storage.removeItem("debug")}catch{}}o(Mxe,"save");function Ixe(){let t;try{t=Us.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}o(Ixe,"load");function Oxe(){try{return localStorage}catch{}}o(Oxe,"localstorage");Rb.exports=WF()(Us);var{formatters:Pxe}=Rb.exports;Pxe.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var dst,qF=M(()=>{"use strict";_F();OF();zF();GF();$F();dst=ka(YF(),1)});var RS,NS,XF,Mb,Bxe,wo,Kc=M(()=>{"use strict";ht();qF();RS={body:' ra))l.moveTo(0,0);else if(v>qp-ra)l.moveTo(m*Mh(g),m*Ll(g)),l.arc(0,0,m,g,y,!x),p>ra&&(l.moveTo(p*Mh(y),p*Ll(y)),l.arc(0,0,p,y,g,x));else{var b=g,w=y,_=g,T=y,E=v,L=v,S=s.apply(this,arguments)/2,A=S>ra&&(n?+n.apply(this,arguments):Ed(p*p+m*m)),I=G3(t_(m-p)/2,+r.apply(this,arguments)),D=I,k=I,R,C;if(A>ra){var O=r_(A/p*Ll(S)),N=r_(A/m*Ll(S));(E-=O*2)>ra?(O*=x?1:-1,_+=O,T-=O):(E=0,_=T=(g+y)/2),(L-=N*2)>ra?(N*=x?1:-1,b+=N,w-=N):(L=0,b=w=(g+y)/2)}var P=m*Mh(b),F=m*Ll(b),B=p*Mh(T),G=p*Ll(T);if(I>ra){var z=m*Mh(w),W=m*Ll(w),Z=p*Mh(_),j=p*Ll(_),oe;if(v
/gi,q4e=o(t=>t?M$(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),X4e=(()=>{let t=!1;return()=>{t||(j4e(),t=!0)}})();o(j4e,"setupDompurifyHooks");R$=o(t=>(X4e(),Ap.default.sanitize(t)),"removeScript"),D$=o((t,e)=>{if(e.flowchart?.htmlLabels!==!1){let r=e.securityLevel;r==="antiscript"||r==="strict"?t=R$(t):r!=="loose"&&(t=M$(t),t=t.replace(/
"),"placeholderToBreak"),M$=o(t=>t.replace(ad,"#br#"),"breakToPlaceholder"),e3e=o(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},"getUrl"),xr=o(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),t3e=o(function(...t){let e=t.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),r3e=o(function(...t){let e=t.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),yu=o(function(t){let e=t.split(/(,)/),r=[];for(let n=0;n
/gi,y3e=o(t=>t?P$(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),v3e=(()=>{let t=!1;return()=>{t||(x3e(),t=!0)}})();o(x3e,"setupDompurifyHooks");O$=o(t=>(v3e(),ah.sanitize(t)),"removeScript"),M$=o((t,e)=>{if(e.flowchart?.htmlLabels!==!1){let r=e.securityLevel;r==="antiscript"||r==="strict"?t=O$(t):r!=="loose"&&(t=P$(t),t=t.replace(/
"),"placeholderToBreak"),P$=o(t=>t.replace(jf,"#br#"),"breakToPlaceholder"),E3e=o(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},"getUrl"),xr=o(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),S3e=o(function(...t){let e=t.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),C3e=o(function(...t){let e=t.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),ou=o(function(t){let e=t.split(/(,)/),r=[];for(let n=0;n0)for(var r=new Array(i),n=0,i,a;n{"use strict";iV()});var X4,k7,E7=M(()=>{"use strict";X4="http://www.w3.org/1999/xhtml",k7={svg:"http://www.w3.org/2000/svg",xhtml:X4,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function pc(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),k7.hasOwnProperty(e)?{space:k7[e],local:t}:t}var j4=M(()=>{"use strict";E7();o(pc,"default")});function t5e(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===X4&&e.documentElement.namespaceURI===X4?e.createElement(t):e.createElementNS(r,t)}}function r5e(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ey(t){var e=pc(t);return(e.local?r5e:t5e)(e)}var S7=M(()=>{"use strict";j4();E7();o(t5e,"creatorInherit");o(r5e,"creatorFixed");o(Ey,"default")});function n5e(){}function Eh(t){return t==null?n5e:function(){return this.querySelector(t)}}var K4=M(()=>{"use strict";o(n5e,"none");o(Eh,"default")});function C7(t){typeof t!="function"&&(t=Eh(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{"use strict";wl();o(G7,"default")});function $7(){for(var t=this._groups,e=-1,r=t.length;++e0;){if(h=ky(s,l,r),h===u)return n[i]=s,n[a]=l,e(n);if(h>0)s=Math.floor(s/h)*h,l=Math.ceil(l/h)*h;else if(h<0)s=Math.ceil(s*h)/h,l=Math.floor(l*h)/h;else break;u=h}return t},t}function Cl(){var t=Xy();return t.copy=function(){return _3(t,Cl())},Dh.apply(t,arguments),uTe(t)}var JH=M(()=>{"use strict";kh();M8();qy();ZH();o(uTe,"linearish");o(Cl,"linear")});function O8(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],a=t[n],s;return a{"use strict";o(O8,"nice")});function vn(t,e,r,n){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return o(i,"interval"),i.floor=a=>(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{let s=i(a),l=i.ceil(a);return a-s0))return u;let h;do u.push(h=new Date(+a)),e(a,l),t(a);while(hvn(s=>{if(s>=s)for(;t(s),!a(s);)s.setTime(s-1)},(s,l)=>{if(s>=s)if(l<0)for(;++l<=0;)for(;e(s,-1),!a(s););else for(;--l>=0;)for(;e(s,1),!a(s););}),r&&(i.count=(a,s)=>(P8.setTime(+a),B8.setTime(+s),t(P8),t(B8),Math.floor(r(P8,B8))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}var P8,B8,Eu=M(()=>{"use strict";P8=new Date,B8=new Date;o(vn,"timeInterval")});var yc,tW,F8=M(()=>{"use strict";Eu();yc=vn(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);yc.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?vn(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):yc);tW=yc.range});var to,rW,z8=M(()=>{"use strict";Eu();to=vn(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*1e3)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds()),rW=to.range});var Su,hTe,L3,fTe,G8=M(()=>{"use strict";Eu();Su=vn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getMinutes()),hTe=Su.range,L3=vn(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*6e4)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()),fTe=L3.range});var Cu,dTe,D3,pTe,$8=M(()=>{"use strict";Eu();Cu=vn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*1e3-t.getMinutes()*6e4)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getHours()),dTe=Cu.range,D3=vn(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*36e5)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()),pTe=D3.range});var Oo,mTe,Ky,gTe,N3,yTe,V8=M(()=>{"use strict";Eu();Oo=vn(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1),mTe=Oo.range,Ky=vn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1),gTe=Ky.range,N3=vn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)),yTe=N3.range});function bd(t){return vn(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5)}function wd(t){return vn(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/6048e5)}var Al,Nh,R3,M3,xc,I3,O3,iW,vTe,xTe,bTe,wTe,TTe,kTe,Td,Hp,aW,sW,Rh,oW,lW,cW,ETe,STe,CTe,ATe,_Te,LTe,U8=M(()=>{"use strict";Eu();o(bd,"timeWeekday");Al=bd(0),Nh=bd(1),R3=bd(2),M3=bd(3),xc=bd(4),I3=bd(5),O3=bd(6),iW=Al.range,vTe=Nh.range,xTe=R3.range,bTe=M3.range,wTe=xc.range,TTe=I3.range,kTe=O3.range;o(wd,"utcWeekday");Td=wd(0),Hp=wd(1),aW=wd(2),sW=wd(3),Rh=wd(4),oW=wd(5),lW=wd(6),cW=Td.range,ETe=Hp.range,STe=aW.range,CTe=sW.range,ATe=Rh.range,_Te=oW.range,LTe=lW.range});var Au,DTe,P3,NTe,H8=M(()=>{"use strict";Eu();Au=vn(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),DTe=Au.range,P3=vn(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),NTe=P3.range});var ro,RTe,_l,MTe,W8=M(()=>{"use strict";Eu();ro=vn(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());ro.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:vn(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});RTe=ro.range,_l=vn(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());_l.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:vn(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});MTe=_l.range});function hW(t,e,r,n,i,a){let s=[[to,1,1e3],[to,5,5*1e3],[to,15,15*1e3],[to,30,30*1e3],[a,1,6e4],[a,5,5*6e4],[a,15,15*6e4],[a,30,30*6e4],[i,1,36e5],[i,3,3*36e5],[i,6,6*36e5],[i,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[e,1,2592e6],[e,3,3*2592e6],[t,1,31536e6]];function l(h,f,d){let p=f{"use strict";kh();F8();z8();G8();$8();V8();U8();H8();W8();o(hW,"ticker");[OTe,PTe]=hW(_l,P3,Td,N3,D3,L3),[Y8,q8]=hW(ro,Au,Al,Oo,Cu,Su)});var B3=M(()=>{"use strict";F8();z8();G8();$8();V8();U8();H8();W8();fW()});function X8(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function j8(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Qy(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function K8(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,s=t.shortDays,l=t.months,u=t.shortMonths,h=Zy(i),f=Jy(i),d=Zy(a),p=Jy(a),m=Zy(s),g=Jy(s),y=Zy(l),v=Jy(l),x=Zy(u),b=Jy(u),w={a:P,A:F,b:B,B:G,c:null,d:vW,e:vW,f:ake,g:mke,G:yke,H:rke,I:nke,j:ike,L:kW,m:ske,M:oke,p:z,q:W,Q:wW,s:TW,S:lke,u:cke,U:uke,V:hke,w:fke,W:dke,x:null,X:null,y:pke,Y:gke,Z:vke,"%":bW},_={a:Z,A:j,b:oe,B:K,c:null,d:xW,e:xW,f:Tke,g:Rke,G:Ike,H:xke,I:bke,j:wke,L:SW,m:kke,M:Eke,p:ee,q:J,Q:wW,s:TW,S:Ske,u:Cke,U:Ake,V:_ke,w:Lke,W:Dke,x:null,X:null,y:Nke,Y:Mke,Z:Oke,"%":bW},T={a:I,A:D,b:k,B:R,c:C,d:gW,e:gW,f:ZTe,g:mW,G:pW,H:yW,I:yW,j:XTe,L:QTe,m:qTe,M:jTe,p:A,q:YTe,Q:eke,s:tke,S:KTe,u:$Te,U:VTe,V:UTe,w:GTe,W:HTe,x:O,X:N,y:mW,Y:pW,Z:WTe,"%":JTe};w.x=E(r,w),w.X=E(n,w),w.c=E(e,w),_.x=E(r,_),_.X=E(n,_),_.c=E(e,_);function E(H,q){return function(Q){var ae=[],ue=-1,ce=0,te=H.length,Ne,se,ke;for(Q instanceof Date||(Q=new Date(+Q));++ue{"use strict";dm();im();o(zSe,"copyObject");Uo=zSe});function GSe(t,e){for(var r=-1,n=Array(t);++r
"},r),qe.lineBreakRegex.test(t)))return t;let n=t.split(" ").filter(Boolean),i=[],a="";return n.forEach((s,l)=>{let u=so(`${s} `,r),h=so(a,r);if(u>e){let{hyphenatedStrings:p,remainingWord:m}=ACe(s,e,"-",r);i.push(a,...p),a=m}else h+u>=e?(i.push(a),a=s):a=[a,s].filter(Boolean).join(" ");l+1===n.length&&i.push(a)}),i.filter(s=>s!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),ACe=tm((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);let i=[...t],a=[],s="";return i.forEach((l,u)=>{let h=`${s}${l}`;if(so(h,n)>=e){let d=u+1,p=i.length===d,m=`${h}${r}`;a.push(p?h:m),s=""}else s=h}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);o(S5,"calculateTextHeight");o(so,"calculateTextWidth");a9=tm((t,e)=>{let{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};let[,a]=Ho(r),s=["sans-serif",n],l=t.split(qe.lineBreakRegex),u=[],h=Ve("body");if(!h.remove)return{width:0,height:0,lineHeight:0};let f=h.append("svg");for(let p of s){let m=0,g={width:0,height:0,lineHeight:0};for(let y of l){let v=SCe();v.text=y||Z_;let x=CCe(f,v).style("font-size",a).style("font-weight",i).style("font-family",p),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),m=Math.round(b.height),g.height+=m,g.lineHeight=Math.round(Math.max(g.lineHeight,m))}u.push(g)}f.remove();let d=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[d]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),Q_=class{constructor(e=!1,r){this.count=0;this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{o(this,"InitIDGenerator")}},_Ce=o(function(t){return E5=E5||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),E5.innerHTML=t,unescape(E5.textContent)},"entityDecode");o(s9,"isDetailedError");LCe=o((t,e,r,n)=>{if(!n)return;let i=t.node()?.getBBox();i&&t.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),Ho=o(t=>{if(typeof t=="number")return[t,t+"px"];let e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");o(Ds,"cleanAndMerge");Ut={assignWithDepth:Vn,wrapLabel:i9,calculateTextHeight:S5,calculateTextWidth:so,calculateTextDimensions:a9,cleanAndMerge:Ds,detectInit:gCe,detectDirective:_X,isSubstringInArray:yCe,interpolateToCurve:J_,calcLabelPosition:wCe,calcCardinalityPosition:TCe,calcTerminalLabelPosition:kCe,formatUrl:vCe,getStylesFromArray:t9,generateId:r9,random:n9,runFunc:xCe,entityDecode:_Ce,insertTitle:LCe,parseFontSize:Ho,InitIDGenerator:Q_},NX=o(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){let n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"\uFB02\xB0\xB0"+n+"\xB6\xDF":"\uFB02\xB0"+n+"\xB6\xDF"}),e},"encodeEntities"),Ma=o(function(t){return t.replace(/fl°°/g,"").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),C5=o((t,e,{counter:r=0,prefix:n,suffix:i})=>`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`,"getEdgeId");o(Gn,"handleUndefinedAttr")});function Ol(t,e,r,n,i){if(!e[t].width)if(r)e[t].text=i9(e[t].text,i,n),e[t].textLines=e[t].text.split(qe.lineBreakRegex).length,e[t].width=i,e[t].height=S5(e[t].text,n);else{let a=e[t].text.split(qe.lineBreakRegex);e[t].textLines=a.length;let s=0;e[t].height=0,e[t].width=0;for(let l of a)e[t].width=Math.max(so(l,n),e[t].width),s=S5(l,n),e[t].height=e[t].height+s}}function PX(t,e,r,n,i){let a=new D5(i);a.data.widthLimit=r.data.widthLimit/Math.min(o9,n.length);for(let[s,l]of n.entries()){let u=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=u,u=l.image.Y+l.image.height);let h=l.wrap&&Gt.wrap,f=A5(Gt);if(f.fontSize=f.fontSize+2,f.fontWeight="bold",Ol("label",l,h,f,a.data.widthLimit),l.label.Y=u+8,u=l.label.Y+l.label.height,l.type&&l.type.text!==""){l.type.text="["+l.type.text+"]";let g=A5(Gt);Ol("type",l,h,g,a.data.widthLimit),l.type.Y=u+5,u=l.type.Y+l.type.height}if(l.descr&&l.descr.text!==""){let g=A5(Gt);g.fontSize=g.fontSize-2,Ol("descr",l,h,g,a.data.widthLimit),l.descr.Y=u+20,u=l.descr.Y+l.descr.height}if(s==0||s%o9===0){let g=r.data.startx+Gt.diagramMarginX,y=r.data.stopy+Gt.diagramMarginY+u;a.setData(g,g,y,y)}else{let g=a.data.stopx!==a.data.startx?a.data.stopx+Gt.diagramMarginX:a.data.startx,y=a.data.starty;a.setData(g,g,y,y)}a.name=l.alias;let d=i.db.getC4ShapeArray(l.alias),p=i.db.getC4ShapeKeys(l.alias);p.length>0&&OX(a,t,d,p),e=l.alias;let m=i.db.getBoundarys(e);m.length>0&&PX(t,e,a,m,i),l.alias!=="global"&&IX(t,l,a),r.data.stopy=Math.max(a.data.stopy+Gt.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(a.data.stopx+Gt.c4ShapeMargin,r.data.stopx),_5=Math.max(_5,r.data.stopx),L5=Math.max(L5,r.data.stopy)}}var _5,L5,MX,o9,Gt,D5,l9,Tv,A5,DCe,IX,OX,Ns,RX,NCe,RCe,MCe,c9,BX=M(()=>{"use strict";pr();RY();ut();US();fr();u7();Vt();gp();hr();ai();_5=0,L5=0,MX=4,o9=2;ey.yy=Ty;Gt={},D5=class{static{o(this,"Bounds")}constructor(e){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,l9(e.db.getConfig())}setData(e,r,n,i){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=r,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=i}updateVal(e,r,n,i){e[r]===void 0?e[r]=n:e[r]=i(n,e[r])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let r=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+e.margin*2,n=r+e.width,i=this.nextData.starty+e.margin*2,a=i+e.height;(r>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>MX)&&(r=this.nextData.startx+e.margin+Gt.nextLinePaddingX,i=this.nextData.stopy+e.margin*2,this.nextData.stopx=n=r+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=a=i+e.height,this.nextData.cnt=1),e.x=r,e.y=i,this.updateVal(this.data,"startx",r,Math.min),this.updateVal(this.data,"starty",i,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",a,Math.max),this.updateVal(this.nextData,"startx",r,Math.min),this.updateVal(this.nextData,"starty",i,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",a,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},l9(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},l9=o(function(t){Vn(Gt,t),t.fontFamily&&(Gt.personFontFamily=Gt.systemFontFamily=Gt.messageFontFamily=t.fontFamily),t.fontSize&&(Gt.personFontSize=Gt.systemFontSize=Gt.messageFontSize=t.fontSize),t.fontWeight&&(Gt.personFontWeight=Gt.systemFontWeight=Gt.messageFontWeight=t.fontWeight)},"setConf"),Tv=o((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),A5=o(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),DCe=o(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");o(Ol,"calcC4ShapeTextWH");IX=o(function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=Gt.c4ShapeMargin-35;let n=e.wrap&&Gt.wrap,i=A5(Gt);i.fontSize=i.fontSize+2,i.fontWeight="bold";let a=so(e.label.text,i);Ol("label",e,n,i,a),Rl.drawBoundary(t,e,Gt)},"drawBoundary"),OX=o(function(t,e,r,n){let i=0;for(let a of n){i=0;let s=r[a],l=Tv(Gt,s.typeC4Shape.text);switch(l.fontSize=l.fontSize-2,s.typeC4Shape.width=so("\xAB"+s.typeC4Shape.text+"\xBB",l),s.typeC4Shape.height=l.fontSize+2,s.typeC4Shape.Y=Gt.c4ShapePadding,i=s.typeC4Shape.Y+s.typeC4Shape.height-4,s.image={width:0,height:0,Y:0},s.typeC4Shape.text){case"person":case"external_person":s.image.width=48,s.image.height=48,s.image.Y=i,i=s.image.Y+s.image.height;break}s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=i,i=s.image.Y+s.image.height);let u=s.wrap&&Gt.wrap,h=Gt.width-Gt.c4ShapePadding*2,f=Tv(Gt,s.typeC4Shape.text);if(f.fontSize=f.fontSize+2,f.fontWeight="bold",Ol("label",s,u,f,h),s.label.Y=i+8,i=s.label.Y+s.label.height,s.type&&s.type.text!==""){s.type.text="["+s.type.text+"]";let m=Tv(Gt,s.typeC4Shape.text);Ol("type",s,u,m,h),s.type.Y=i+5,i=s.type.Y+s.type.height}else if(s.techn&&s.techn.text!==""){s.techn.text="["+s.techn.text+"]";let m=Tv(Gt,s.techn.text);Ol("techn",s,u,m,h),s.techn.Y=i+5,i=s.techn.Y+s.techn.height}let d=i,p=s.label.width;if(s.descr&&s.descr.text!==""){let m=Tv(Gt,s.typeC4Shape.text);Ol("descr",s,u,m,h),s.descr.Y=i+20,i=s.descr.Y+s.descr.height,p=Math.max(s.label.width,s.descr.width),d=i-s.descr.textLines*5}p=p+Gt.c4ShapePadding,s.width=Math.max(s.width||Gt.width,p,Gt.width),s.height=Math.max(s.height||Gt.height,d,Gt.height),s.margin=s.margin||Gt.c4ShapeMargin,t.insert(s),Rl.drawC4Shape(e,s,Gt)}t.bumpLastMargin(Gt.c4ShapeMargin)},"drawC4ShapeArray"),Ns=class{static{o(this,"Point")}constructor(e,r){this.x=e,this.y=r}},RX=o(function(t,e){let r=t.x,n=t.y,i=e.x,a=e.y,s=r+t.width/2,l=n+t.height/2,u=Math.abs(r-i),h=Math.abs(n-a),f=h/u,d=t.height/t.width,p=null;return n==a&&ri?p=new Ns(r,l):r==i&&na&&(p=new Ns(s,n)),r>i&&n=f?p=new Ns(r,l+f*t.width/2):p=new Ns(s-u/h*t.height/2,n+t.height):r=f?p=new Ns(r+t.width,l+f*t.width/2):p=new Ns(s+u/h*t.height/2,n+t.height):ra?d>=f?p=new Ns(r+t.width,l-f*t.width/2):p=new Ns(s+t.height/2*u/h,n):r>i&&n>a&&(d>=f?p=new Ns(r,l-t.width/2*f):p=new Ns(s-t.height/2*u/h,n)),p},"getIntersectPoint"),NCe=o(function(t,e){let r={x:0,y:0};r.x=e.x+e.width/2,r.y=e.y+e.height/2;let n=RX(t,r);r.x=t.x+t.width/2,r.y=t.y+t.height/2;let i=RX(e,r);return{startPoint:n,endPoint:i}},"getIntersectPoints"),RCe=o(function(t,e,r,n){let i=0;for(let a of e){i=i+1;let s=a.wrap&&Gt.wrap,l=DCe(Gt);n.db.getC4Type()==="C4Dynamic"&&(a.label.text=i+": "+a.label.text);let h=so(a.label.text,l);Ol("label",a,s,l,h),a.techn&&a.techn.text!==""&&(h=so(a.techn.text,l),Ol("techn",a,s,l,h)),a.descr&&a.descr.text!==""&&(h=so(a.descr.text,l),Ol("descr",a,s,l,h));let f=r(a.from),d=r(a.to),p=NCe(f,d);a.startPoint=p.startPoint,a.endPoint=p.endPoint}Rl.drawRels(t,e,Gt)},"drawRels");o(PX,"drawInsideBoundary");MCe=o(function(t,e,r,n){Gt=pe().c4;let i=pe().securityLevel,a;i==="sandbox"&&(a=Ve("#i"+e));let s=i==="sandbox"?Ve(a.nodes()[0].contentDocument.body):Ve("body"),l=n.db;n.db.setWrap(Gt.wrap),MX=l.getC4ShapeInRow(),o9=l.getC4BoundaryInRow(),Y.debug(`C:${JSON.stringify(Gt,null,2)}`);let u=i==="sandbox"?s.select(`[id="${e}"]`):Ve(`[id="${e}"]`);Rl.insertComputerIcon(u),Rl.insertDatabaseIcon(u),Rl.insertClockIcon(u);let h=new D5(n);h.setData(Gt.diagramMarginX,Gt.diagramMarginX,Gt.diagramMarginY,Gt.diagramMarginY),h.data.widthLimit=screen.availWidth,_5=Gt.diagramMarginX,L5=Gt.diagramMarginY;let f=n.db.getTitle(),d=n.db.getBoundarys("");PX(u,"",h,d,n),Rl.insertArrowHead(u),Rl.insertArrowEnd(u),Rl.insertArrowCrossHead(u),Rl.insertArrowFilledHead(u),RCe(u,n.db.getRels(),n.db.getC4Shape,n),h.data.stopx=_5,h.data.stopy=L5;let p=h.data,g=p.stopy-p.starty+2*Gt.diagramMarginY,v=p.stopx-p.startx+2*Gt.diagramMarginX;f&&u.append("text").text(f).attr("x",(p.stopx-p.startx)/2-4*Gt.diagramMarginX).attr("y",p.starty+Gt.diagramMarginY),Zr(u,g,v,Gt.useMaxWidth);let x=f?60:0;u.attr("viewBox",p.startx-Gt.diagramMarginX+" -"+(Gt.diagramMarginY+x)+" "+v+" "+(g+x)),Y.debug("models:",p)},"draw"),c9={drawPersonOrSystemArray:OX,drawBoundary:IX,setConf:l9,draw:MCe}});var ICe,FX,zX=M(()=>{"use strict";ICe=o(t=>`.person {
+`},"getStyles"),B$=o((t,e)=>{e!==void 0&&(k4[t]=e)},"addStylesForDiagram"),F$=N3e});var iy={};vr(iy,{clear:()=>_r,getAccDescription:()=>Fr,getAccTitle:()=>Pr,getDiagramTitle:()=>Jr,setAccDescription:()=>Br,setAccTitle:()=>Rr,setDiagramTitle:()=>ln});var ZC,JC,e7,t7,_r,Rr,Pr,Br,Fr,ln,Jr,ki=M(()=>{"use strict";fr();Ua();ZC="",JC="",e7="",t7=o(t=>Tr(t,Sr()),"sanitizeText"),_r=o(()=>{ZC="",e7="",JC=""},"clear"),Rr=o(t=>{ZC=t7(t).replace(/^\s+/g,"")},"setAccTitle"),Pr=o(()=>ZC,"getAccTitle"),Br=o(t=>{e7=t7(t).replace(/\n\s+/g,`
+`)},"setAccDescription"),Fr=o(()=>e7,"getAccDescription"),ln=o(t=>{JC=t7(t)},"setDiagramTitle"),Jr=o(()=>JC,"getDiagramTitle")});var z$,R3e,de,n7,S4,i7,a7,M3e,E4,Qf,ay,r7,Vt=M(()=>{"use strict";$f();ht();Ua();fr();ni();QC();ki();z$=Y,R3e=M1,de=Sr,n7=Yb,S4=ih,i7=o(t=>Tr(t,de()),"sanitizeText"),a7=_o,M3e=o(()=>iy,"getCommonDb"),E4={},Qf=o((t,e,r)=>{E4[t]&&z$.warn(`Diagram with id ${t} already registered. Overwriting.`),E4[t]=e,r&&OS(t,r),B$(t,e.styles),e.injectUtils?.(z$,R3e,de,i7,a7,M3e(),()=>{})},"registerDiagram"),ay=o(t=>{if(t in E4)return E4[t];throw new r7(t)},"getDiagram"),r7=class extends Error{static{o(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}}});var pl,fh,Xa,dl,nc,sy,s7,o7,C4,A4,G$,I3e,O3e,P3e,B3e,F3e,z3e,G3e,$3e,V3e,U3e,H3e,W3e,Y3e,q3e,X3e,j3e,K3e,$$,Q3e,Z3e,V$,J3e,e5e,t5e,r5e,dh,n5e,i5e,a5e,s5e,o5e,oy,l7=M(()=>{"use strict";Vt();fr();ki();pl=[],fh=[""],Xa="global",dl="",nc=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],sy=[],s7="",o7=!1,C4=4,A4=2,I3e=o(function(){return G$},"getC4Type"),O3e=o(function(t){G$=Tr(t,de())},"setC4Type"),P3e=o(function(t,e,r,n,i,a,s,l,u){if(t==null||e===void 0||e===null||r===void 0||r===null||n===void 0||n===null)return;let h={},f=sy.find(d=>d.from===e&&d.to===r);if(f?h=f:sy.push(h),h.type=t,h.from=e,h.to=r,h.label={text:n},i==null)h.techn={text:""};else if(typeof i=="object"){let[d,p]=Object.entries(i)[0];h[d]={text:p}}else h.techn={text:i};if(a==null)h.descr={text:""};else if(typeof a=="object"){let[d,p]=Object.entries(a)[0];h[d]={text:p}}else h.descr={text:a};if(typeof s=="object"){let[d,p]=Object.entries(s)[0];h[d]=p}else h.sprite=s;if(typeof l=="object"){let[d,p]=Object.entries(l)[0];h[d]=p}else h.tags=l;if(typeof u=="object"){let[d,p]=Object.entries(u)[0];h[d]=p}else h.link=u;h.wrap=dh()},"addRel"),B3e=o(function(t,e,r,n,i,a,s){if(e===null||r===null)return;let l={},u=pl.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,pl.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.descr={text:""};else if(typeof n=="object"){let[h,f]=Object.entries(n)[0];l[h]={text:f}}else l.descr={text:n};if(typeof i=="object"){let[h,f]=Object.entries(i)[0];l[h]=f}else l.sprite=i;if(typeof a=="object"){let[h,f]=Object.entries(a)[0];l[h]=f}else l.tags=a;if(typeof s=="object"){let[h,f]=Object.entries(s)[0];l[h]=f}else l.link=s;l.typeC4Shape={text:t},l.parentBoundary=Xa,l.wrap=dh()},"addPersonOrSystem"),F3e=o(function(t,e,r,n,i,a,s,l){if(e===null||r===null)return;let u={},h=pl.find(f=>f.alias===e);if(h&&e===h.alias?u=h:(u.alias=e,pl.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.techn={text:""};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];u[f]={text:d}}else u.techn={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.descr={text:i};if(typeof a=="object"){let[f,d]=Object.entries(a)[0];u[f]=d}else u.sprite=a;if(typeof s=="object"){let[f,d]=Object.entries(s)[0];u[f]=d}else u.tags=s;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d}else u.link=l;u.wrap=dh(),u.typeC4Shape={text:t},u.parentBoundary=Xa},"addContainer"),z3e=o(function(t,e,r,n,i,a,s,l){if(e===null||r===null)return;let u={},h=pl.find(f=>f.alias===e);if(h&&e===h.alias?u=h:(u.alias=e,pl.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.techn={text:""};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];u[f]={text:d}}else u.techn={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.descr={text:i};if(typeof a=="object"){let[f,d]=Object.entries(a)[0];u[f]=d}else u.sprite=a;if(typeof s=="object"){let[f,d]=Object.entries(s)[0];u[f]=d}else u.tags=s;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d}else u.link=l;u.wrap=dh(),u.typeC4Shape={text:t},u.parentBoundary=Xa},"addComponent"),G3e=o(function(t,e,r,n,i){if(t===null||e===null)return;let a={},s=nc.find(l=>l.alias===t);if(s&&t===s.alias?a=s:(a.alias=t,nc.push(a)),e==null?a.label={text:""}:a.label={text:e},r==null)a.type={text:"system"};else if(typeof r=="object"){let[l,u]=Object.entries(r)[0];a[l]={text:u}}else a.type={text:r};if(typeof n=="object"){let[l,u]=Object.entries(n)[0];a[l]=u}else a.tags=n;if(typeof i=="object"){let[l,u]=Object.entries(i)[0];a[l]=u}else a.link=i;a.parentBoundary=Xa,a.wrap=dh(),dl=Xa,Xa=t,fh.push(dl)},"addPersonOrSystemBoundary"),$3e=o(function(t,e,r,n,i){if(t===null||e===null)return;let a={},s=nc.find(l=>l.alias===t);if(s&&t===s.alias?a=s:(a.alias=t,nc.push(a)),e==null?a.label={text:""}:a.label={text:e},r==null)a.type={text:"container"};else if(typeof r=="object"){let[l,u]=Object.entries(r)[0];a[l]={text:u}}else a.type={text:r};if(typeof n=="object"){let[l,u]=Object.entries(n)[0];a[l]=u}else a.tags=n;if(typeof i=="object"){let[l,u]=Object.entries(i)[0];a[l]=u}else a.link=i;a.parentBoundary=Xa,a.wrap=dh(),dl=Xa,Xa=t,fh.push(dl)},"addContainerBoundary"),V3e=o(function(t,e,r,n,i,a,s,l){if(e===null||r===null)return;let u={},h=nc.find(f=>f.alias===e);if(h&&e===h.alias?u=h:(u.alias=e,nc.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.type={text:"node"};else if(typeof n=="object"){let[f,d]=Object.entries(n)[0];u[f]={text:d}}else u.type={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[f,d]=Object.entries(i)[0];u[f]={text:d}}else u.descr={text:i};if(typeof s=="object"){let[f,d]=Object.entries(s)[0];u[f]=d}else u.tags=s;if(typeof l=="object"){let[f,d]=Object.entries(l)[0];u[f]=d}else u.link=l;u.nodeType=t,u.parentBoundary=Xa,u.wrap=dh(),dl=Xa,Xa=e,fh.push(dl)},"addDeploymentNode"),U3e=o(function(){Xa=dl,fh.pop(),dl=fh.pop(),fh.push(dl)},"popBoundaryParseStack"),H3e=o(function(t,e,r,n,i,a,s,l,u,h,f){let d=pl.find(p=>p.alias===e);if(!(d===void 0&&(d=nc.find(p=>p.alias===e),d===void 0))){if(r!=null)if(typeof r=="object"){let[p,m]=Object.entries(r)[0];d[p]=m}else d.bgColor=r;if(n!=null)if(typeof n=="object"){let[p,m]=Object.entries(n)[0];d[p]=m}else d.fontColor=n;if(i!=null)if(typeof i=="object"){let[p,m]=Object.entries(i)[0];d[p]=m}else d.borderColor=i;if(a!=null)if(typeof a=="object"){let[p,m]=Object.entries(a)[0];d[p]=m}else d.shadowing=a;if(s!=null)if(typeof s=="object"){let[p,m]=Object.entries(s)[0];d[p]=m}else d.shape=s;if(l!=null)if(typeof l=="object"){let[p,m]=Object.entries(l)[0];d[p]=m}else d.sprite=l;if(u!=null)if(typeof u=="object"){let[p,m]=Object.entries(u)[0];d[p]=m}else d.techn=u;if(h!=null)if(typeof h=="object"){let[p,m]=Object.entries(h)[0];d[p]=m}else d.legendText=h;if(f!=null)if(typeof f=="object"){let[p,m]=Object.entries(f)[0];d[p]=m}else d.legendSprite=f}},"updateElStyle"),W3e=o(function(t,e,r,n,i,a,s){let l=sy.find(u=>u.from===e&&u.to===r);if(l!==void 0){if(n!=null)if(typeof n=="object"){let[u,h]=Object.entries(n)[0];l[u]=h}else l.textColor=n;if(i!=null)if(typeof i=="object"){let[u,h]=Object.entries(i)[0];l[u]=h}else l.lineColor=i;if(a!=null)if(typeof a=="object"){let[u,h]=Object.entries(a)[0];l[u]=parseInt(h)}else l.offsetX=parseInt(a);if(s!=null)if(typeof s=="object"){let[u,h]=Object.entries(s)[0];l[u]=parseInt(h)}else l.offsetY=parseInt(s)}},"updateRelStyle"),Y3e=o(function(t,e,r){let n=C4,i=A4;if(typeof e=="object"){let a=Object.values(e)[0];n=parseInt(a)}else n=parseInt(e);if(typeof r=="object"){let a=Object.values(r)[0];i=parseInt(a)}else i=parseInt(r);n>=1&&(C4=n),i>=1&&(A4=i)},"updateLayoutConfig"),q3e=o(function(){return C4},"getC4ShapeInRow"),X3e=o(function(){return A4},"getC4BoundaryInRow"),j3e=o(function(){return Xa},"getCurrentBoundaryParse"),K3e=o(function(){return dl},"getParentBoundaryParse"),$$=o(function(t){return t==null?pl:pl.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),Q3e=o(function(t){return pl.find(e=>e.alias===t)},"getC4Shape"),Z3e=o(function(t){return Object.keys($$(t))},"getC4ShapeKeys"),V$=o(function(t){return t==null?nc:nc.filter(e=>e.parentBoundary===t)},"getBoundaries"),J3e=V$,e5e=o(function(){return sy},"getRels"),t5e=o(function(){return s7},"getTitle"),r5e=o(function(t){o7=t},"setWrap"),dh=o(function(){return o7},"autoWrap"),n5e=o(function(){pl=[],nc=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],dl="",Xa="global",fh=[""],sy=[],fh=[""],s7="",o7=!1,C4=4,A4=2},"clear"),i5e={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},a5e={FILLED:0,OPEN:1},s5e={LEFTOF:0,RIGHTOF:1,OVER:2},o5e=o(function(t){s7=Tr(t,de())},"setTitle"),oy={addPersonOrSystem:B3e,addPersonOrSystemBoundary:G3e,addContainer:F3e,addContainerBoundary:$3e,addComponent:z3e,addDeploymentNode:V3e,popBoundaryParseStack:U3e,addRel:P3e,updateElStyle:H3e,updateRelStyle:W3e,updateLayoutConfig:Y3e,autoWrap:dh,setWrap:r5e,getC4ShapeArray:$$,getC4Shape:Q3e,getC4ShapeKeys:Z3e,getBoundaries:V$,getBoundarys:J3e,getCurrentBoundaryParse:j3e,getParentBoundaryParse:K3e,getRels:e5e,getTitle:t5e,getC4Type:I3e,getC4ShapeInRow:q3e,getC4BoundaryInRow:X3e,setAccTitle:Rr,getAccTitle:Pr,getAccDescription:Fr,setAccDescription:Br,getConfig:o(()=>de().c4,"getConfig"),clear:n5e,LINETYPE:i5e,ARROWTYPE:a5e,PLACEMENT:s5e,setTitle:o5e,setC4Type:O3e}});function Zf(t,e){return t==null||e==null?NaN:t0)for(var r=new Array(i),n=0,i,a;n{"use strict";oV()});var P4,w7,T7=M(()=>{"use strict";P4="http://www.w3.org/1999/xhtml",w7={svg:"http://www.w3.org/2000/svg",xhtml:P4,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function ic(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),w7.hasOwnProperty(e)?{space:w7[e],local:t}:t}var B4=M(()=>{"use strict";T7();o(ic,"default")});function S5e(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===P4&&e.documentElement.namespaceURI===P4?e.createElement(t):e.createElementNS(r,t)}}function C5e(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function cy(t){var e=ic(t);return(e.local?C5e:S5e)(e)}var k7=M(()=>{"use strict";B4();T7();o(S5e,"creatorInherit");o(C5e,"creatorFixed");o(cy,"default")});function A5e(){}function mh(t){return t==null?A5e:function(){return this.querySelector(t)}}var F4=M(()=>{"use strict";o(A5e,"none");o(mh,"default")});function E7(t){typeof t!="function"&&(t=mh(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{"use strict";ml();o(F7,"default")});function z7(){for(var t=this._groups,e=-1,r=t.length;++e