@zenuml/core 3.31.1 → 3.31.2

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/dist/zenuml.js CHANGED
@@ -3183,7 +3183,7 @@
3183
3183
  <path d="M15.027 20.771h-12.881c-0.484-1.541-0.724-3.151-0.719-4.771 0-1.667 0.24-3.265 0.719-4.771h21.147c2.64-0.011 4.781 2.131 4.776 4.771 0.015 2.625-2.109 4.765-4.735 4.771zM14.427 22.375h-11.692c1.229 2.823 3.265 5.224 5.853 6.907 2.589 1.719 5.636 2.636 8.745 2.625 5.531 0 10.375-2.828 13.24-7.068-1.521-1.573-3.609-2.469-5.803-2.479zM24.771 9.64c2.271 0 4.333-0.957 5.803-2.468-3.24-4.828-8.855-7.511-14.652-7-5.791 0.516-10.848 4.14-13.187 9.468z"/>
3184
3184
  </svg>`,auth0:`<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
3185
3185
  <svg width="800px" height="800px" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="none"><path fill="#000000" d="M12.549 1h-4.55l1.407 4.38h4.548l-3.68 2.61 1.406 4.405c2.37-1.725 3.143-4.336 2.274-7.016L12.55 1zM2.045 5.38h4.55L8 1H3.45L2.045 5.38c-.868 2.68-.094 5.29 2.275 7.015L5.725 7.99l-3.68-2.612zm2.275 7.015L8 15l3.68-2.605L8 9.745l-3.68 2.65z"/></svg>`,redis:`<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
3186
- <svg fill="#000000" width="800px" height="800px" viewBox="0 -2 28 28" xmlns="http://www.w3.org/2000/svg"><path d="m27.994 14.729c-.012.267-.365.566-1.091.945-1.495.778-9.236 3.967-10.883 4.821-.589.419-1.324.67-2.116.67-.641 0-1.243-.164-1.768-.452l.019.01c-1.304-.622-9.539-3.95-11.023-4.659-.741-.35-1.119-.653-1.132-.933v2.83c0 .282.39.583 1.132.933 1.484.709 9.722 4.037 11.023 4.659.504.277 1.105.44 1.744.44.795 0 1.531-.252 2.132-.681l-.011.008c1.647-.859 9.388-4.041 10.883-4.821.76-.396 1.096-.7 1.096-.982s0-2.791 0-2.791z"/><path d="m27.992 10.115c-.013.267-.365.565-1.09.944-1.495.778-9.236 3.967-10.883 4.821-.59.421-1.326.672-2.121.672-.639 0-1.24-.163-1.763-.449l.019.01c-1.304-.627-9.539-3.955-11.023-4.664-.741-.35-1.119-.653-1.132-.933v2.83c0 .282.39.583 1.132.933 1.484.709 9.721 4.037 11.023 4.659.506.278 1.108.442 1.749.442.793 0 1.527-.251 2.128-.677l-.011.008c1.647-.859 9.388-4.043 10.883-4.821.76-.397 1.096-.7 1.096-.984s0-2.791 0-2.791z"/><path d="m27.992 5.329c.014-.285-.358-.534-1.107-.81-1.451-.533-9.152-3.596-10.624-4.136-.528-.242-1.144-.383-1.794-.383-.734 0-1.426.18-2.035.498l.024-.012c-1.731.622-9.924 3.835-11.381 4.405-.729.287-1.086.552-1.073.834v2.83c0 .282.39.583 1.132.933 1.484.709 9.721 4.038 11.023 4.66.504.277 1.105.439 1.744.439.795 0 1.531-.252 2.133-.68l-.011.008c1.647-.859 9.388-4.043 10.883-4.821.76-.397 1.096-.7 1.096-.984s0-2.791 0-2.791h-.009zm-17.967 2.684 6.488-.996-1.96 2.874zm14.351-2.588-4.253 1.68-3.835-1.523 4.246-1.679 3.838 1.517zm-11.265-2.785-.628-1.157 1.958.765 1.846-.604-.499 1.196 1.881.7-2.426.252-.543 1.311-.879-1.457-2.8-.252 2.091-.754zm-4.827 1.632c1.916 0 3.467.602 3.467 1.344s-1.559 1.344-3.467 1.344-3.474-.603-3.474-1.344 1.553-1.344 3.474-1.344z"/></svg>`};function ML(){const t=a2(0),e=a2(0),n=()=>{t.value=document.documentElement.scrollTop,e.value=document.documentElement.scrollLeft};return J2(()=>{n(),document.addEventListener("scroll",n)}),_1(()=>{document.removeEventListener("scroll",n)}),[t,e]}const jt=10,ek=1,yL=20;function tk(){let t=document.getElementById("zenuml-intersection-detector-container"),e=Array.from(document.getElementsByClassName("zenuml-intersection-detector"));return t&&e.length===jt?{detectorContainer:t,detectors:e}:(t=document.createElement("div"),t.id="zenuml-intersection-detector-container",Object.assign(t.style,{position:"absolute",top:"0",left:"0",opacity:"0",pointerEvents:"none"}),e=new Array(jt).fill(0).map(()=>{const n=document.createElement("div");return n.className="zenuml-intersection-detector",Object.assign(n.style,{position:"absolute",top:"0",left:"0",width:"100%"}),t==null||t.appendChild(n),n}),document.body.appendChild(t),{detectorContainer:t,detectors:e})}function RL(){const t=a2(0);let e;return J2(()=>{const{detectorContainer:n,detectors:i}=tk(),s=document.documentElement.scrollHeight-yL,r=document.documentElement.scrollWidth-yL;n.style.height=s+"px",n.style.width=r+"px";const o=Math.ceil(document.documentElement.scrollHeight/jt),l=[...Array(o+1).keys()].map(L=>L/o).filter(L=>L>=0&&L<=1);i.forEach((L,a)=>{L.style.top=a*o+"px",L.style.height=o+"px"}),e=new IntersectionObserver(([L])=>{(L.intersectionRect.top-L.boundingClientRect.top>ek||L.target===i[0])&&(t.value=L.intersectionRect.top)},{threshold:l}),i.forEach(L=>{e.observe(L)})}),_1(()=>{e==null||e.disconnect()}),t}function qt(t){let e=0,n=t;for(;n;)e+=n.offsetTop,n=n.offsetParent;return e}const p5=/[!@#$%^&*()+-,.?''":{}|<>/\s]/,x7=t=>{const e=a2(!1);function n(l){e.value=l}async function i(l){l.preventDefault(),l.stopPropagation(),n(!0),await _4();const L=document.createRange();if(!l.target)return;L.selectNodeContents(l.target),L.collapse(!1);const a=window.getSelection();a&&(a==null||a.removeAllRanges(),a==null||a.addRange(L))}async function s(l){await _4(),e.value&&(n(!1),t(l))}function r(l){l.key==="Enter"&&(l.preventDefault(),l.stopPropagation())}function o(l){(l.key==="Enter"||l.key==="Escape"||l.key==="Tab")&&(n(!1),t(l))}return{editing:e,handleDblClick:i,handleBlur:s,handleKeydown:r,handleKeyup:o}},nk={class:"flex items-center justify-center"},ik=["contenteditable"],sk=v("span",null,":",-1),rk=["contenteditable"],ok=G2({__name:"ParticipantLabel",props:{labelText:null,labelPositions:null,assignee:null,assigneePositions:null},setup(t){const e=t,n=["Missing Constructor","ZenUML"],{labelText:i,labelPositions:s,assigneePositions:r}=l9(e),o=I3(),l=I(()=>o.state.mode),L=I(()=>o.getters.code),a=I(()=>o.getters.onContentChange||(()=>{}));function c(f){o.dispatch("updateCode",{code:f}),a.value(f)}function C(f){return function(m){m.preventDefault(),m.stopPropagation();const _=m.target;if(!(_ instanceof HTMLElement))return;let p=_.innerText.trim()??"";if(p===""||p===i.value){_.innerText=i.value;return}if(p.includes(" ")&&(p=p.replace(/\s+/g," ")),p5.test(p)&&(p=p.replace(/"/g,""),p=`"${p}"`,p5.lastIndex=0),!f||f.length===0)return;let g=L.value;for(const w of f){const[y,k]=w;g=g.slice(0,y)+p+g.slice(k)}c(g)}}const u=x7(C((s==null?void 0:s.value)??[])),d=x7(C((r==null?void 0:r.value)??[]));return(f,m)=>(b(),U("div",nk,[t.assignee?(b(),U(B2,{key:0},[v("label",{title:"Double click to edit",class:M2(["name px-1 leading-4 cursor-text right hover:text-skin-message-hover hover:bg-skin-message-hover",{"py-1 cursor-text":N(d).editing}]),contenteditable:N(d).editing&&N(l)===N(J1).Dynamic,onDblclick:m[0]||(m[0]=(..._)=>N(d).handleDblClick&&N(d).handleDblClick(..._)),onBlur:m[1]||(m[1]=(..._)=>N(d).handleBlur&&N(d).handleBlur(..._)),onKeyup:m[2]||(m[2]=(..._)=>N(d).handleKeyup&&N(d).handleKeyup(..._)),onKeydown:m[3]||(m[3]=(..._)=>N(d).handleKeydown&&N(d).handleKeydown(..._))},h1(t.assignee),43,ik),sk],64)):x2("",!0),v("label",{title:"Double click to edit",class:M2(["name px-1 leading-4 cursor-text right hover:text-skin-message-hover hover:bg-skin-message-hover",{"py-1 cursor-text":N(u).editing}]),contenteditable:N(u).editing&&N(l)===N(J1).Dynamic&&n.indexOf(N(i))===-1,onDblclick:m[4]||(m[4]=(..._)=>N(u).handleDblClick&&N(u).handleDblClick(..._)),onBlur:m[5]||(m[5]=(..._)=>N(u).handleBlur&&N(u).handleBlur(..._)),onKeyup:m[6]||(m[6]=(..._)=>N(u).handleKeyup&&N(u).handleKeyup(..._)),onKeydown:m[7]||(m[7]=(..._)=>N(u).handleKeydown&&N(u).handleKeydown(..._))},h1(N(i)),43,rk)]))}}),lk=10,Lk={name:"Participant",components:{ParticipantLabel:ok},setup(t){const e=I3(),n=a2(null);if(e.state.mode===J1.Static)return{translate:0,participant:n};const i=I(()=>{const L=e.getters.participants.GetPositions(t.entity.name);return Array.from(L??[]).sort((c,C)=>C[0]-c[0])}),s=I(()=>{const L=e.getters.participants.GetAssigneePositions(t.entity.name);return Array.from(L??[]).sort((c,C)=>C[0]-c[0])}),r=RL(),[o]=ML();return{translate:I(()=>{var u;const L=t.offsetTop2||0;let a=r.value+o.value;r.value>lk&&(e!=null&&e.state.stickyOffset)&&(a+=e==null?void 0:e.state.stickyOffset);const c=((u=e==null?void 0:e.state.diagramElement)==null?void 0:u.clientHeight)||0,C=e!=null&&e.state.diagramElement?qt(e==null?void 0:e.state.diagramElement):0;return a<L+C?0:Math.min(a-C,c-Sl)-L}),participant:n,labelPositions:i,assigneePositions:s}},props:{entity:{type:Object,required:!0},offsetTop2:{type:Number,default:0}},data(){return{color:void 0}},mounted(){this.updateFontColor()},updated(){this.updateFontColor()},computed:{isDefaultStarter(){return this.entity.name===X1},selected(){return this.$store.state.selected.includes(this.entity.name)},stereotype(){return this.entity.stereotype},labelText(){return this.entity.assignee?this.entity.name.split(":")[1]:this.entity.label||this.entity.name},comment(){return this.entity.comment},icon(){var t;return this.isDefaultStarter?Gt.actor:Gt[(t=this.entity.type)==null?void 0:t.toLowerCase()]},backgroundColor(){try{return this.entity.color?this.entity.color&&Uw(this.entity.color):void 0}catch{return}}},methods:{onSelect(){this.$store.commit("onSelect",this.entity.name)},updateFontColor(){if(!this.entity.color){this.color=void 0;return}let t=window.getComputedStyle(this.$refs.participant).getPropertyValue("background-color");if(!t){this.color=void 0;return}let e=zw(t);this.color=e>128?"#000":"#fff"}}},ak={class:"flex items-center justify-center"},ck=["innerHTML","aria-description"],Ck={key:1,class:"h-5 group flex flex-col justify-center"},uk={key:0,class:"interface leading-4"};function hk(t,e,n,i,s,r){const o=r2("ParticipantLabel");return b(),U("div",{class:M2(["participant bg-skin-participant shadow-participant border-skin-participant text-skin-participant rounded text-base leading-4 flex flex-col justify-center z-10 h-10 top-8",{selected:r.selected}]),ref:"participant",style:v2({backgroundColor:r.isDefaultStarter?void 0:r.backgroundColor,color:r.isDefaultStarter?void 0:s.color,transform:`translateY(${i.translate}px)`}),onClick:e[0]||(e[0]=(...l)=>r.onSelect&&r.onSelect(...l))},[v("div",ak,[r.icon?(b(),U("div",{key:0,innerHTML:r.icon,class:"h-6 w-6 mr-1 flex-shrink-0 [&>svg]:w-full [&>svg]:h-full","aria-description":`icon for ${n.entity.name}`},null,8,ck)):x2("",!0),r.isDefaultStarter?x2("",!0):(b(),U("div",Ck,[r.stereotype?(b(),U("label",uk,"«"+h1(r.stereotype)+"»",1)):x2("",!0),B(o,{labelText:r.labelText,labelPositions:i.labelPositions,assignee:n.entity.assignee,assigneePositions:i.assigneePositions},null,8,["labelText","labelPositions","assignee","assigneePositions"])]))])],6)}const AL=Y2(Lk,[["render",hk]]),CW="",m5=V5.child({name:"LifeLine"}),dk={name:"life-line",components:{Participant:AL},props:["entity","context","groupLeft","inGroup","renderParticipants","renderLifeLine"],data:()=>({translateX:0,top:24}),computed:{...M3(["centerOf"]),...D8(["scale"]),debug(){return!!localStorage.zenumlDebug},left(){return this.centerOf(this.entity.name)-(this.groupLeft||0)}},mounted(){m5.debug(`LifeLine mounted for ${this.entity.name}`),this.$nextTick(()=>{this.setTop(),m5.debug(`nextTick after updated for ${this.entity.name}`)}),p7.on("participant_set_top",()=>this.$nextTick(()=>this.setTop()))},updated(){m5.debug(`updated for ${this.entity.name}`),this.$nextTick(()=>{this.setTop(),m5.debug(`nextTick after updated for ${this.entity.name}`)})},methods:{onSelect(){this.$store.commit("onSelect",this.entity.name)},setTop(){var s;const t=this.entity.name.replace(/([ #;&,.+*~\':"!^$[\]()=>|\/@])/g,"\\$1"),e=this.$store.getters.diagramElement,n=e==null?void 0:e.querySelector(`[data-to="${t}"]`),i=(n==null?void 0:n.offsetParent)!=null;if(n&&((s=n.attributes["data-type"])==null?void 0:s.value)==="creation"&&i){m5.debug(`First message to ${this.entity.name} is creation`);const r=this.$el.getBoundingClientRect().y,o=n.getBoundingClientRect().y;this.top=(o-r)/this.scale}}}},fk=["id","entity-type"],gk={key:1,class:"line w0 mx-auto flex-grow w-px"};function pk(t,e,n,i,s,r){var l;const o=r2("participant");return b(),U("div",{id:n.entity.name,"entity-type":(l=n.entity.type)==null?void 0:l.toLowerCase(),class:M2(["lifeline absolute flex flex-col h-full",{"transform -translate-x-1/2":n.renderParticipants}]),style:v2({paddingTop:t.top+"px",left:r.left+"px"})},[n.renderParticipants?(b(),Z2(o,{key:0,entity:n.entity,offsetTop2:t.top},null,8,["entity","offsetTop2"])):x2("",!0),n.renderLifeLine?(b(),U("div",gk)):x2("",!0)],14,fk)}const kL=Y2(dk,[["render",pk],["__scopeId","data-v-f23e44f2"]]),ZL=2,mk={name:"lifeline-group",props:["context","renderParticipants","renderLifeLine"],computed:{...M3(["coordinates"]),name(){var t,e;return(e=(t=this.context)==null?void 0:t.name())==null?void 0:e.getFormattedText()},left(){const t=this.entities[0].name;return this.coordinates.left(t)+ZL},right(){const t=this.entities.slice(0).pop().name;return this.coordinates.right(t)-ZL},entities(){return d5(this.context).Array()}},methods:{},components:{LifeLine:kL}},wk={key:0,class:"z-10 absolute flex items-center justify-center w-full bg-skin-frame"},xk={class:"font-semibold text-skin-lifeline-group-name"},_k={class:"lifeline-group relative flex-grow"};function vk(t,e,n,i,s,r){const o=r2("life-line");return r.entities.length>0?(b(),U("div",{key:0,class:M2(["lifeline-group-container absolute flex flex-col flex-grow h-full",{"outline-dashed outline-skin-primary":n.renderLifeLine}]),style:v2({left:`${r.left}px`,width:`${r.right-r.left}px`})},[n.renderParticipants&&r.name?(b(),U("div",wk,[v("span",xk,h1(r.name),1)])):x2("",!0),v("div",_k,[(b(!0),U(B2,null,B3(r.entities,l=>(b(),Z2(o,{inGroup:"true",key:l.name,ref_for:!0,ref:l.name,entity:l,"group-left":r.left,"render-life-line":n.renderLifeLine,renderParticipants:n.renderParticipants},null,8,["entity","group-left","render-life-line","renderParticipants"]))),128))])],6)):x2("",!0)}const Mk=Y2(mk,[["render",vk]]),TL=V5.child({name:"LifeLineLayer"}),yk=70,Rk=10,Ak={name:"life-line-layer",props:["context","renderParticipants","renderLifeLine","leftGap"],setup(){const e=I3(),n=I(()=>e.state.mode);if(n.value===J1.static)return{translate:0,RenderMode:J1,mode:n};const i=RL(),[s]=ML();return{translate:I(()=>{var a;let o=i.value+s.value;i.value>Rk&&(e!=null&&e.state.stickyOffset)&&(o+=e==null?void 0:e.state.stickyOffset);const l=((a=e==null?void 0:e.state.diagramElement)==null?void 0:a.clientHeight)||0,L=e!=null&&e.state.diagramElement?qt(e==null?void 0:e.state.diagramElement):0;return o<=0+L?0:Math.min(o-L,l-yk)-0}),RenderMode:J1,mode:n}},computed:{...M3(["coordinates","participants","GroupContext","ParticipantContext","centerOf"]),participantNames(){return this.participants.Names()},debug(){return!!localStorage.zenumlDebug},starterParticipant(){const t=this.coordinates.orderedParticipantNames();return t.length===0?null:t[0]===X1?{...Jo,name:X1,explicit:!1,isStarter:!0}:null},starterOnTheLeft(){var t;return!!this.starterParticipant&&!((t=this.starterParticipant)!=null&&t.explicit)},implicitParticipants(){return this.participants.ImplicitArray()},explicitGroupAndParticipants(){var t;return(t=this.context)==null?void 0:t.children.filter(e=>{const n=e instanceof yl,i=e instanceof Rl;return n||i})}},methods:{...so(["increaseGeneration"]),getParticipantEntity(t){return d5(t).First()}},updated(){TL.debug("LifeLineLayer updated")},mounted(){TL.debug("LifeLineLayer mounted")},components:{LifeLine:kL,LifeLineGroup:Mk}},kk=["data-participant-names"],Zk={class:"z-lifeline-container relative grow"};function Tk(t,e,n,i,s,r){const o=r2("life-line"),l=r2("life-line-group");return b(),U("div",{class:"life-line-layer lifeline-layer z-30 absolute h-full flex flex-col top-0 pt-2","data-participant-names":r.participantNames,style:v2({"min-width":i.mode===i.RenderMode.Dynamic?"200px":"auto",width:`calc(100% - ${n.leftGap}px)`,pointerEvents:n.renderParticipants?"none":"all"})},[v("div",Zk,[r.starterOnTheLeft?(b(),Z2(o,{key:0,entity:r.starterParticipant,class:"starter",renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["entity","renderParticipants","renderLifeLine"])):x2("",!0),(b(!0),U(B2,null,B3(r.explicitGroupAndParticipants,(L,a)=>(b(),U(B2,null,[L instanceof t.GroupContext?(b(),Z2(l,{key:a,context:L,renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["context","renderParticipants","renderLifeLine"])):x2("",!0),L instanceof t.ParticipantContext?(b(),Z2(o,{key:a,entity:r.getParticipantEntity(L),renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["entity","renderParticipants","renderLifeLine"])):x2("",!0)],64))),256)),(b(!0),U(B2,null,B3(r.implicitParticipants,L=>(b(),Z2(o,{key:L.name,entity:L,renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["entity","renderParticipants","renderLifeLine"]))),128))])],12,kk)}const Kt=Y2(Ak,[["render",Tk]]),bk={class:"message-layer relative z-30 pt-24 pb-10"},bL=G2({__name:"MessageLayer",props:{context:null},setup(t){const e=W0(()=>Promise.resolve().then(()=>iB)),n=V5.child({name:"MessageLayer"}),i=I3(),s=I(()=>i.getters.centerOf),r=I(()=>i.getters.rootContext),o=I(()=>s.value(l.value)+1),l=I(()=>{const L=f7(r.value);return L.length===0?X1:L[0].from||X1});return J2(()=>{n.debug("MessageLayer mounted")}),V0(()=>{n.debug("MessageLayer updated")}),(L,a)=>{const c=r2("block");return b(),U("div",bk,[B(c,{context:t.context,style:v2({"padding-left":N(o)+"px"}),origin:N(l)},null,8,["context","style","origin"]),B(N(e))])}}}),uW="";function _7(t){return[t.Origin()||X1,...d5(t).Names()]}const Sk=Z.tree.ParseTreeWalker.DEFAULT;class Yt extends T{constructor(e){super(),this.frameRoot=null,this.parents=[],this._orderedParticipants=e}getLocalParticipants(e){return[e.Origin()||X1,...d5(e).ImplicitArray().map(n=>n.name)]}getLeft(e){const n=_7(e);return this._orderedParticipants.find(i=>n.includes(i))||""}getRight(e){return this._orderedParticipants.slice().reverse().find(n=>_7(e).includes(n))||""}enterFragment(e,n){var s;const i={type:n,left:this.getLeft(e),right:this.getRight(e),children:[]};this.frameRoot||(this.frameRoot=i),this.parents.length>0&&((s=this.parents[this.parents.length-1].children)==null||s.push(i)),this.parents.push(i)}exitFragment(){this.parents.pop()}enterTcf(e){this.enterFragment(e,"tcf")}enterOpt(e){this.enterFragment(e,"opt")}enterPar(e){this.enterFragment(e,"par")}enterAlt(e){this.enterFragment(e,"alt")}enterLoop(e){this.enterFragment(e,"loop")}enterSection(e){this.enterFragment(e,"section")}enterCritical(e){this.enterFragment(e,"critical")}enterRef(e){this.enterFragment(e,"ref")}exitTcf(){this.exitFragment()}exitOpt(){this.exitFragment()}exitPar(){this.exitFragment()}exitAlt(){this.exitFragment()}exitLoop(){this.exitFragment()}exitSection(){this.exitFragment()}exitCritical(){this.exitFragment()}exitRef(){this.exitFragment()}getFrame(e){return e.children.map(n=>{Sk.walk(this,n)}),this.frameRoot}}function Qt(t,e){if(!t.children||t.children.length===0)return 1;let n=0;for(const i of t.children)e==="LEFT"&&i.left!==t.left||e==="RIGHT"&&i.right!==t.right||(n=Math.max(n,Qt(i,e)));return n+1}function Xt(t){return t?{type:t.type,left:Zl*Qt(t,"LEFT"),right:Zl*Qt(t,"RIGHT")}:{left:0,right:0}}function SL(t,e){const n=e.orderedParticipantNames(),i=_7(t),s=n.find(C=>i.includes(C))||"",r=n.slice().reverse().find(C=>i.includes(C))||"",l=new Yt(n).getFrame(t),L=Xt(l),a=Ek(t,r,e),c=e.distance(s,r)+e.half(s)+e.half(r);return Math.max(c,Tl)+L.left+L.right+a}function Ek(t,e,n){const s=f7(t).filter(r=>r.from===r.to).map(r=>n.getMessageWidth(r)-n.distance(r.from||X1,e)-n.half(e));return Math.max.apply(null,[0,...s])}const Jt=G2({__name:"SeqDiagram",setup(t){const e=I3(),n=I(()=>e.state.theme),i=I(()=>e.state.mode),s=I(()=>e.getters.rootContext),r=I(()=>e.getters.coordinates),o=I(()=>SL(s.value,r.value)-l.value),l=I(()=>{const a=r.value.orderedParticipantNames(),C=new Yt(a).getFrame(s.value);return C?Xt(C).left:0}),L=a2(null);return e.commit("diagramElement",L),(a,c)=>(b(),U("div",{class:M2(["zenuml sequence-diagram relative box-border text-left overflow-visible px-2.5",N(n)]),ref_key:"diagramRef",ref:L},[v("div",{style:v2({paddingLeft:`${N(l)}px`}),class:"relative z-container"},[N(i)===N(J1).Dynamic?(b(),U(B2,{key:0},[B(Kt,{leftGap:N(l),context:N(s).head(),renderParticipants:!1,renderLifeLine:!0},null,8,["leftGap","context"]),B(bL,{context:N(s).block(),style:v2({width:`${N(o)}px`})},null,8,["context","style"]),B(Kt,{leftGap:N(l),context:N(s).head(),renderParticipants:!0,renderLifeLine:!1},null,8,["leftGap","context"])],64)):x2("",!0),N(i)===N(J1).Static?(b(),U(B2,{key:1},[B(Kt,{leftGap:N(l),context:N(s).head(),renderParticipants:!0,renderLifeLine:!0},null,8,["leftGap","context"]),B(bL,{context:N(s).block(),style:v2({width:`${N(o)}px`})},null,8,["context","style"])],64)):x2("",!0)],4)],2))}}),hW="",Ik={name:"IconList",props:["types"],computed:{},methods:{icon(t){return Gt[t==null?void 0:t.toLowerCase()]}}},Fk={role:"list",class:"mt-3 grid grid-cols-4 gap-5 sm:gap-6 sm:grid-cols-6 lg:grid-cols-8"},Ok={class:"h-12 flex items-center justify-center bg-gray-50 text-sm font-medium rounded-t-md"},Nk=["innerHTML","alt"],Dk={class:"flex items-center justify-center border-t border-r border-b border-gray-200 bg-white rounded-b-md"},Pk={class:"px-2 py-2 text-xs"},Bk={class:"text-gray-900 font-medium hover:text-gray-600"};function zk(t,e,n,i,s,r){return b(),U("ul",Fk,[(b(!0),U(B2,null,B3(n.types,o=>(b(),U("li",{key:o,class:"col-span-1 flex flex-col shadow-sm rounded-md"},[v("div",Ok,[r.icon?(b(),U("i",{key:0,innerHTML:r.icon(o),class:"object-contain h-8 w-8 m-auto [&>svg]:w-full [&>svg]:h-full",alt:`icon for ${o}`},null,8,Nk)):x2("",!0)]),v("div",Dk,[v("div",Pk,[v("span",Bk,"@"+h1(o),1)])])]))),128))])}const Uk={name:"TipsDialog",components:{Icon:e3,IconList:Y2(Ik,[["render",zk]])},computed:{standardTypes(){return["Actor","Boundary","Control","Database","Entity"]},awsServices(){return["CloudWatch","CloudFront","Cognito","DynamoDB","EBS","EC2","ECS","EFS","ElastiCache","ElasticBeantalk","ElasticFileSystem","Glacier","IAM","Kinesis","Lambda","LightSail","RDS","Redshift","S3","SNS","SQS","Sagemaker","VPC"]},azureServices(){return["AzureActiveDirectory","AzureBackup","AzureCDN","AzureDataFactory","AzureDevOps","AzureFunction","AzureSQL","CosmosDB","LogicApps","VirtualMachine"]},googleServices(){return["BigTable","BigQuery","CloudCDN","CloudDNS","CloudInterconnect","CloudLoadBalancing","CloudSQL","CloudStorage","DataLab","DataProc","GoogleIAM","GoogleSecurity","GoogleVPC","PubSub","SecurityScanner","StackDriver","VisionAPI"]}},methods:{closeTipsDialog(){var t;this.$store.state.showTips=!1;try{(t=this.$gtag)==null||t.event("close",{event_category:"help",event_label:"tips dialog"})}catch(e){console.error(e)}}}},Wk={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block"},$k=v("div",{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":"true"},null,-1),Hk=v("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"​",-1),Vk={class:"z-40 inline-block align-bottom bg-white rounded-lg px-4 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:p-2"},Gk={class:"bg-white px-4 py-5 border-b border-gray-200 sm:px-6"},jk=v("h3",{class:"text-xl leading-6 font-medium text-gray-900 inline-block"}," ZenUML Tips ",-1),qk=v("span",{class:"sr-only"},"Close menu",-1),Kk={class:"relative bg-white pb-32 mt-4 overflow-hidden"},Yk={class:"relative"},Qk={class:"lg:mx-auto lg:max-w-11/12 lg:px-8"},Xk=Z8(`<div class="grid lg:grid-cols-3 sm:grid-cols-2 grid-cols-1"><div><div class="px-4 max-w-full mx-auto sm:px-6 lg:max-w-none lg:mx-0"><h2 class="mt-4 mb-4 text-lg leading-6 font-medium text-gray-900"> Declare Participants </h2><pre class="text-xs w-full bg-gray-50 text-gray-600 p-2 rounded-lg"><code>// Define a Starter (optional)
3186
+ <svg fill="#000000" width="800px" height="800px" viewBox="0 -2 28 28" xmlns="http://www.w3.org/2000/svg"><path d="m27.994 14.729c-.012.267-.365.566-1.091.945-1.495.778-9.236 3.967-10.883 4.821-.589.419-1.324.67-2.116.67-.641 0-1.243-.164-1.768-.452l.019.01c-1.304-.622-9.539-3.95-11.023-4.659-.741-.35-1.119-.653-1.132-.933v2.83c0 .282.39.583 1.132.933 1.484.709 9.722 4.037 11.023 4.659.504.277 1.105.44 1.744.44.795 0 1.531-.252 2.132-.681l-.011.008c1.647-.859 9.388-4.041 10.883-4.821.76-.396 1.096-.7 1.096-.982s0-2.791 0-2.791z"/><path d="m27.992 10.115c-.013.267-.365.565-1.09.944-1.495.778-9.236 3.967-10.883 4.821-.59.421-1.326.672-2.121.672-.639 0-1.24-.163-1.763-.449l.019.01c-1.304-.627-9.539-3.955-11.023-4.664-.741-.35-1.119-.653-1.132-.933v2.83c0 .282.39.583 1.132.933 1.484.709 9.721 4.037 11.023 4.659.506.278 1.108.442 1.749.442.793 0 1.527-.251 2.128-.677l-.011.008c1.647-.859 9.388-4.043 10.883-4.821.76-.397 1.096-.7 1.096-.984s0-2.791 0-2.791z"/><path d="m27.992 5.329c.014-.285-.358-.534-1.107-.81-1.451-.533-9.152-3.596-10.624-4.136-.528-.242-1.144-.383-1.794-.383-.734 0-1.426.18-2.035.498l.024-.012c-1.731.622-9.924 3.835-11.381 4.405-.729.287-1.086.552-1.073.834v2.83c0 .282.39.583 1.132.933 1.484.709 9.721 4.038 11.023 4.66.504.277 1.105.439 1.744.439.795 0 1.531-.252 2.133-.68l-.011.008c1.647-.859 9.388-4.043 10.883-4.821.76-.397 1.096-.7 1.096-.984s0-2.791 0-2.791h-.009zm-17.967 2.684 6.488-.996-1.96 2.874zm14.351-2.588-4.253 1.68-3.835-1.523 4.246-1.679 3.838 1.517zm-11.265-2.785-.628-1.157 1.958.765 1.846-.604-.499 1.196 1.881.7-2.426.252-.543 1.311-.879-1.457-2.8-.252 2.091-.754zm-4.827 1.632c1.916 0 3.467.602 3.467 1.344s-1.559 1.344-3.467 1.344-3.474-.603-3.474-1.344 1.553-1.344 3.474-1.344z"/></svg>`};function ML(){const t=a2(0),e=a2(0),n=()=>{t.value=document.documentElement.scrollTop,e.value=document.documentElement.scrollLeft};return J2(()=>{n(),document.addEventListener("scroll",n)}),_1(()=>{document.removeEventListener("scroll",n)}),[t,e]}const jt=10,ek=1,yL=20;function tk(){let t=document.getElementById("zenuml-intersection-detector-container"),e=Array.from(document.getElementsByClassName("zenuml-intersection-detector"));return t&&e.length===jt?{detectorContainer:t,detectors:e}:(t=document.createElement("div"),t.id="zenuml-intersection-detector-container",Object.assign(t.style,{position:"absolute",top:"0",left:"0",opacity:"0",pointerEvents:"none"}),e=new Array(jt).fill(0).map(()=>{const n=document.createElement("div");return n.className="zenuml-intersection-detector",Object.assign(n.style,{position:"absolute",top:"0",left:"0",width:"100%"}),t==null||t.appendChild(n),n}),document.body.appendChild(t),{detectorContainer:t,detectors:e})}function RL(){const t=a2(0);let e;return J2(()=>{const{detectorContainer:n,detectors:i}=tk(),s=document.documentElement.scrollHeight-yL,r=document.documentElement.scrollWidth-yL;n.style.height=s+"px",n.style.width=r+"px";const o=Math.ceil(document.documentElement.scrollHeight/jt),l=[...Array(o+1).keys()].map(L=>L/o).filter(L=>L>=0&&L<=1);i.forEach((L,a)=>{L.style.top=a*o+"px",L.style.height=o+"px"}),e=new IntersectionObserver(([L])=>{(L.intersectionRect.top-L.boundingClientRect.top>ek||L.target===i[0])&&(t.value=L.intersectionRect.top)},{threshold:l}),i.forEach(L=>{e.observe(L)})}),_1(()=>{e==null||e.disconnect()}),t}function qt(t){let e=0,n=t;for(;n;)e+=n.offsetTop,n=n.offsetParent;return e}const p5=/[!@#$%^&*()+-,.?''":{}|<>/\s]/,x7=t=>{const e=a2(!1);function n(l){e.value=l}async function i(l){l.preventDefault(),l.stopPropagation(),n(!0),await _4();const L=document.createRange();if(!l.target)return;L.selectNodeContents(l.target),L.collapse(!1);const a=window.getSelection();a&&(a==null||a.removeAllRanges(),a==null||a.addRange(L))}async function s(l){await _4(),e.value&&(n(!1),t(l))}function r(l){l.key==="Enter"&&(l.preventDefault(),l.stopPropagation())}function o(l){(l.key==="Enter"||l.key==="Escape"||l.key==="Tab")&&(n(!1),t(l))}return{editing:e,handleDblClick:i,handleBlur:s,handleKeydown:r,handleKeyup:o}},nk={class:"flex items-center justify-center"},ik=["contenteditable"],sk=v("span",null,":",-1),rk=["contenteditable"],ok=G2({__name:"ParticipantLabel",props:{labelText:null,labelPositions:null,assignee:null,assigneePositions:null},setup(t){const e=t,n=["Missing Constructor","ZenUML"],{labelText:i,labelPositions:s,assigneePositions:r}=l9(e),o=I3(),l=I(()=>o.state.mode),L=I(()=>o.getters.code),a=I(()=>o.getters.onContentChange||(()=>{}));function c(f){o.dispatch("updateCode",{code:f}),a.value(f)}function C(f){return function(m){m.preventDefault(),m.stopPropagation();const _=m.target;if(!(_ instanceof HTMLElement))return;let p=_.innerText.trim()??"";if(p===""||p===i.value){_.innerText=i.value;return}if(p.includes(" ")&&(p=p.replace(/\s+/g," ")),p5.test(p)&&(p=p.replace(/"/g,""),p=`"${p}"`,p5.lastIndex=0),!f||f.length===0)return;let g=L.value;for(const w of f){const[y,k]=w;g=g.slice(0,y)+p+g.slice(k)}c(g)}}const u=x7(C((s==null?void 0:s.value)??[])),d=x7(C((r==null?void 0:r.value)??[]));return(f,m)=>(b(),U("div",nk,[t.assignee?(b(),U(B2,{key:0},[v("label",{title:"Double click to edit",class:M2(["name px-1 leading-4 cursor-text right hover:text-skin-message-hover hover:bg-skin-message-hover",{"py-1 cursor-text":N(d).editing}]),contenteditable:N(d).editing&&N(l)===N(J1).Dynamic,onDblclick:m[0]||(m[0]=(..._)=>N(d).handleDblClick&&N(d).handleDblClick(..._)),onBlur:m[1]||(m[1]=(..._)=>N(d).handleBlur&&N(d).handleBlur(..._)),onKeyup:m[2]||(m[2]=(..._)=>N(d).handleKeyup&&N(d).handleKeyup(..._)),onKeydown:m[3]||(m[3]=(..._)=>N(d).handleKeydown&&N(d).handleKeydown(..._))},h1(t.assignee),43,ik),sk],64)):x2("",!0),v("label",{title:"Double click to edit",class:M2(["name px-1 leading-4 cursor-text right hover:text-skin-message-hover hover:bg-skin-message-hover",{"py-1 cursor-text":N(u).editing}]),contenteditable:N(u).editing&&N(l)===N(J1).Dynamic&&n.indexOf(N(i))===-1,onDblclick:m[4]||(m[4]=(..._)=>N(u).handleDblClick&&N(u).handleDblClick(..._)),onBlur:m[5]||(m[5]=(..._)=>N(u).handleBlur&&N(u).handleBlur(..._)),onKeyup:m[6]||(m[6]=(..._)=>N(u).handleKeyup&&N(u).handleKeyup(..._)),onKeydown:m[7]||(m[7]=(..._)=>N(u).handleKeydown&&N(u).handleKeydown(..._))},h1(N(i)),43,rk)]))}}),lk=10,Lk={name:"Participant",components:{ParticipantLabel:ok},setup(t){const e=I3(),n=a2(null);if(e.state.mode===J1.Static)return{stickyVerticalOffset:0,participant:n};const i=I(()=>{const L=e.getters.participants.GetPositions(t.entity.name);return Array.from(L??[]).sort((c,C)=>C[0]-c[0])}),s=I(()=>{const L=e.getters.participants.GetAssigneePositions(t.entity.name);return Array.from(L??[]).sort((c,C)=>C[0]-c[0])}),r=RL(),[o]=ML();return{stickyVerticalOffset:I(()=>{var u;const L=t.offsetTop2||0;let a=r.value+o.value;r.value>lk&&(e!=null&&e.state.stickyOffset)&&(a+=e==null?void 0:e.state.stickyOffset);const c=((u=e==null?void 0:e.state.diagramElement)==null?void 0:u.clientHeight)||0,C=e!=null&&e.state.diagramElement?qt(e==null?void 0:e.state.diagramElement):0;return a<L+C?0:Math.min(a-C,c-Sl-50)-L}),participant:n,labelPositions:i,assigneePositions:s}},props:{entity:{type:Object,required:!0},offsetTop2:{type:Number,default:0}},data(){return{color:void 0}},mounted(){this.updateFontColor()},updated(){this.updateFontColor()},computed:{isDefaultStarter(){return this.entity.name===X1},selected(){return this.$store.state.selected.includes(this.entity.name)},stereotype(){return this.entity.stereotype},labelText(){return this.entity.assignee?this.entity.name.split(":")[1]:this.entity.label||this.entity.name},comment(){return this.entity.comment},icon(){var t;return this.isDefaultStarter?Gt.actor:Gt[(t=this.entity.type)==null?void 0:t.toLowerCase()]},backgroundColor(){try{return this.entity.color?this.entity.color&&Uw(this.entity.color):void 0}catch{return}}},methods:{onSelect(){this.$store.commit("onSelect",this.entity.name)},updateFontColor(){if(!this.entity.color){this.color=void 0;return}let t=window.getComputedStyle(this.$refs.participant).getPropertyValue("background-color");if(!t){this.color=void 0;return}let e=zw(t);this.color=e>128?"#000":"#fff"}}},ak={class:"flex items-center justify-center"},ck=["innerHTML","aria-description"],Ck={key:1,class:"h-5 group flex flex-col justify-center"},uk={key:0,class:"interface leading-4"};function hk(t,e,n,i,s,r){const o=r2("ParticipantLabel");return b(),U("div",{class:M2(["participant bg-skin-participant shadow-participant border-skin-participant text-skin-participant rounded text-base leading-4 flex flex-col justify-center z-10 h-10 top-8",{selected:r.selected}]),ref:"participant",style:v2({backgroundColor:r.isDefaultStarter?void 0:r.backgroundColor,color:r.isDefaultStarter?void 0:s.color,transform:`translateY(${i.stickyVerticalOffset}px)`}),onClick:e[0]||(e[0]=(...l)=>r.onSelect&&r.onSelect(...l))},[v("div",ak,[r.icon?(b(),U("div",{key:0,innerHTML:r.icon,class:"h-6 w-6 mr-1 flex-shrink-0 [&>svg]:w-full [&>svg]:h-full","aria-description":`icon for ${n.entity.name}`},null,8,ck)):x2("",!0),r.isDefaultStarter?x2("",!0):(b(),U("div",Ck,[r.stereotype?(b(),U("label",uk,"«"+h1(r.stereotype)+"»",1)):x2("",!0),B(o,{labelText:r.labelText,labelPositions:i.labelPositions,assignee:n.entity.assignee,assigneePositions:i.assigneePositions},null,8,["labelText","labelPositions","assignee","assigneePositions"])]))])],6)}const AL=Y2(Lk,[["render",hk]]),CW="",m5=V5.child({name:"LifeLine"}),dk={name:"life-line",components:{Participant:AL},props:["entity","context","groupLeft","inGroup","renderParticipants","renderLifeLine"],data:()=>({translateX:0,top:24}),computed:{...M3(["centerOf"]),...D8(["scale"]),debug(){return!!localStorage.zenumlDebug},left(){return this.centerOf(this.entity.name)-(this.groupLeft||0)}},mounted(){m5.debug(`LifeLine mounted for ${this.entity.name}`),this.$nextTick(()=>{this.setTop(),m5.debug(`nextTick after updated for ${this.entity.name}`)}),p7.on("participant_set_top",()=>this.$nextTick(()=>this.setTop()))},updated(){m5.debug(`updated for ${this.entity.name}`),this.$nextTick(()=>{this.setTop(),m5.debug(`nextTick after updated for ${this.entity.name}`)})},methods:{onSelect(){this.$store.commit("onSelect",this.entity.name)},setTop(){var s;const t=this.entity.name.replace(/([ #;&,.+*~\':"!^$[\]()=>|\/@])/g,"\\$1"),e=this.$store.getters.diagramElement,n=e==null?void 0:e.querySelector(`[data-to="${t}"]`),i=(n==null?void 0:n.offsetParent)!=null;if(n&&((s=n.attributes["data-type"])==null?void 0:s.value)==="creation"&&i){m5.debug(`First message to ${this.entity.name} is creation`);const r=this.$el.getBoundingClientRect().y,o=n.getBoundingClientRect().y;this.top=(o-r)/this.scale}}}},fk=["id","entity-type"],gk={key:1,class:"line w0 mx-auto flex-grow w-px"};function pk(t,e,n,i,s,r){var l;const o=r2("participant");return b(),U("div",{id:n.entity.name,"entity-type":(l=n.entity.type)==null?void 0:l.toLowerCase(),class:M2(["lifeline absolute flex flex-col h-full",{"transform -translate-x-1/2":n.renderParticipants}]),style:v2({paddingTop:t.top+"px",left:r.left+"px"})},[n.renderParticipants?(b(),Z2(o,{key:0,entity:n.entity,offsetTop2:t.top},null,8,["entity","offsetTop2"])):x2("",!0),n.renderLifeLine?(b(),U("div",gk)):x2("",!0)],14,fk)}const kL=Y2(dk,[["render",pk],["__scopeId","data-v-f23e44f2"]]),ZL=2,mk={name:"lifeline-group",props:["context","renderParticipants","renderLifeLine"],computed:{...M3(["coordinates"]),name(){var t,e;return(e=(t=this.context)==null?void 0:t.name())==null?void 0:e.getFormattedText()},left(){const t=this.entities[0].name;return this.coordinates.left(t)+ZL},right(){const t=this.entities.slice(0).pop().name;return this.coordinates.right(t)-ZL},entities(){return d5(this.context).Array()}},methods:{},components:{LifeLine:kL}},wk={key:0,class:"z-10 absolute flex items-center justify-center w-full bg-skin-frame"},xk={class:"font-semibold text-skin-lifeline-group-name"},_k={class:"lifeline-group relative flex-grow"};function vk(t,e,n,i,s,r){const o=r2("life-line");return r.entities.length>0?(b(),U("div",{key:0,class:M2(["lifeline-group-container absolute flex flex-col flex-grow h-full",{"outline-dashed outline-skin-primary":n.renderLifeLine}]),style:v2({left:`${r.left}px`,width:`${r.right-r.left}px`})},[n.renderParticipants&&r.name?(b(),U("div",wk,[v("span",xk,h1(r.name),1)])):x2("",!0),v("div",_k,[(b(!0),U(B2,null,B3(r.entities,l=>(b(),Z2(o,{inGroup:"true",key:l.name,ref_for:!0,ref:l.name,entity:l,"group-left":r.left,"render-life-line":n.renderLifeLine,renderParticipants:n.renderParticipants},null,8,["entity","group-left","render-life-line","renderParticipants"]))),128))])],6)):x2("",!0)}const Mk=Y2(mk,[["render",vk]]),TL=V5.child({name:"LifeLineLayer"}),yk=70,Rk=10,Ak={name:"life-line-layer",props:["context","renderParticipants","renderLifeLine","leftGap"],setup(){const e=I3(),n=I(()=>e.state.mode);if(n.value===J1.static)return{translate:0,RenderMode:J1,mode:n};const i=RL(),[s]=ML();return{translate:I(()=>{var a;let o=i.value+s.value;i.value>Rk&&(e!=null&&e.state.stickyOffset)&&(o+=e==null?void 0:e.state.stickyOffset);const l=((a=e==null?void 0:e.state.diagramElement)==null?void 0:a.clientHeight)||0,L=e!=null&&e.state.diagramElement?qt(e==null?void 0:e.state.diagramElement):0;return o<=0+L?0:Math.min(o-L,l-yk)-0}),RenderMode:J1,mode:n}},computed:{...M3(["coordinates","participants","GroupContext","ParticipantContext","centerOf"]),participantNames(){return this.participants.Names()},debug(){return!!localStorage.zenumlDebug},starterParticipant(){const t=this.coordinates.orderedParticipantNames();return t.length===0?null:t[0]===X1?{...Jo,name:X1,explicit:!1,isStarter:!0}:null},starterOnTheLeft(){var t;return!!this.starterParticipant&&!((t=this.starterParticipant)!=null&&t.explicit)},implicitParticipants(){return this.participants.ImplicitArray()},explicitGroupAndParticipants(){var t;return(t=this.context)==null?void 0:t.children.filter(e=>{const n=e instanceof yl,i=e instanceof Rl;return n||i})}},methods:{...so(["increaseGeneration"]),getParticipantEntity(t){return d5(t).First()}},updated(){TL.debug("LifeLineLayer updated")},mounted(){TL.debug("LifeLineLayer mounted")},components:{LifeLine:kL,LifeLineGroup:Mk}},kk=["data-participant-names"],Zk={class:"z-lifeline-container relative grow"};function Tk(t,e,n,i,s,r){const o=r2("life-line"),l=r2("life-line-group");return b(),U("div",{class:"life-line-layer lifeline-layer z-30 absolute h-full flex flex-col top-0 pt-2","data-participant-names":r.participantNames,style:v2({"min-width":i.mode===i.RenderMode.Dynamic?"200px":"auto",width:`calc(100% - ${n.leftGap}px)`,pointerEvents:n.renderParticipants?"none":"all"})},[v("div",Zk,[r.starterOnTheLeft?(b(),Z2(o,{key:0,entity:r.starterParticipant,class:"starter",renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["entity","renderParticipants","renderLifeLine"])):x2("",!0),(b(!0),U(B2,null,B3(r.explicitGroupAndParticipants,(L,a)=>(b(),U(B2,null,[L instanceof t.GroupContext?(b(),Z2(l,{key:a,context:L,renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["context","renderParticipants","renderLifeLine"])):x2("",!0),L instanceof t.ParticipantContext?(b(),Z2(o,{key:a,entity:r.getParticipantEntity(L),renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["entity","renderParticipants","renderLifeLine"])):x2("",!0)],64))),256)),(b(!0),U(B2,null,B3(r.implicitParticipants,L=>(b(),Z2(o,{key:L.name,entity:L,renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["entity","renderParticipants","renderLifeLine"]))),128))])],12,kk)}const Kt=Y2(Ak,[["render",Tk]]),bk={class:"message-layer relative z-30 pt-24 pb-10"},bL=G2({__name:"MessageLayer",props:{context:null},setup(t){const e=W0(()=>Promise.resolve().then(()=>iB)),n=V5.child({name:"MessageLayer"}),i=I3(),s=I(()=>i.getters.centerOf),r=I(()=>i.getters.rootContext),o=I(()=>s.value(l.value)+1),l=I(()=>{const L=f7(r.value);return L.length===0?X1:L[0].from||X1});return J2(()=>{n.debug("MessageLayer mounted")}),V0(()=>{n.debug("MessageLayer updated")}),(L,a)=>{const c=r2("block");return b(),U("div",bk,[B(c,{context:t.context,style:v2({"padding-left":N(o)+"px"}),origin:N(l)},null,8,["context","style","origin"]),B(N(e))])}}}),uW="";function _7(t){return[t.Origin()||X1,...d5(t).Names()]}const Sk=Z.tree.ParseTreeWalker.DEFAULT;class Yt extends T{constructor(e){super(),this.frameRoot=null,this.parents=[],this._orderedParticipants=e}getLocalParticipants(e){return[e.Origin()||X1,...d5(e).ImplicitArray().map(n=>n.name)]}getLeft(e){const n=_7(e);return this._orderedParticipants.find(i=>n.includes(i))||""}getRight(e){return this._orderedParticipants.slice().reverse().find(n=>_7(e).includes(n))||""}enterFragment(e,n){var s;const i={type:n,left:this.getLeft(e),right:this.getRight(e),children:[]};this.frameRoot||(this.frameRoot=i),this.parents.length>0&&((s=this.parents[this.parents.length-1].children)==null||s.push(i)),this.parents.push(i)}exitFragment(){this.parents.pop()}enterTcf(e){this.enterFragment(e,"tcf")}enterOpt(e){this.enterFragment(e,"opt")}enterPar(e){this.enterFragment(e,"par")}enterAlt(e){this.enterFragment(e,"alt")}enterLoop(e){this.enterFragment(e,"loop")}enterSection(e){this.enterFragment(e,"section")}enterCritical(e){this.enterFragment(e,"critical")}enterRef(e){this.enterFragment(e,"ref")}exitTcf(){this.exitFragment()}exitOpt(){this.exitFragment()}exitPar(){this.exitFragment()}exitAlt(){this.exitFragment()}exitLoop(){this.exitFragment()}exitSection(){this.exitFragment()}exitCritical(){this.exitFragment()}exitRef(){this.exitFragment()}getFrame(e){return e.children.map(n=>{Sk.walk(this,n)}),this.frameRoot}}function Qt(t,e){if(!t.children||t.children.length===0)return 1;let n=0;for(const i of t.children)e==="LEFT"&&i.left!==t.left||e==="RIGHT"&&i.right!==t.right||(n=Math.max(n,Qt(i,e)));return n+1}function Xt(t){return t?{type:t.type,left:Zl*Qt(t,"LEFT"),right:Zl*Qt(t,"RIGHT")}:{left:0,right:0}}function SL(t,e){const n=e.orderedParticipantNames(),i=_7(t),s=n.find(C=>i.includes(C))||"",r=n.slice().reverse().find(C=>i.includes(C))||"",l=new Yt(n).getFrame(t),L=Xt(l),a=Ek(t,r,e),c=e.distance(s,r)+e.half(s)+e.half(r);return Math.max(c,Tl)+L.left+L.right+a}function Ek(t,e,n){const s=f7(t).filter(r=>r.from===r.to).map(r=>n.getMessageWidth(r)-n.distance(r.from||X1,e)-n.half(e));return Math.max.apply(null,[0,...s])}const Jt=G2({__name:"SeqDiagram",setup(t){const e=I3(),n=I(()=>e.state.theme),i=I(()=>e.state.mode),s=I(()=>e.getters.rootContext),r=I(()=>e.getters.coordinates),o=I(()=>SL(s.value,r.value)-l.value),l=I(()=>{const a=r.value.orderedParticipantNames(),C=new Yt(a).getFrame(s.value);return C?Xt(C).left:0}),L=a2(null);return e.commit("diagramElement",L),(a,c)=>(b(),U("div",{class:M2(["zenuml sequence-diagram relative box-border text-left overflow-visible px-2.5",N(n)]),ref_key:"diagramRef",ref:L},[v("div",{style:v2({paddingLeft:`${N(l)}px`}),class:"relative z-container"},[N(i)===N(J1).Dynamic?(b(),U(B2,{key:0},[B(Kt,{leftGap:N(l),context:N(s).head(),renderParticipants:!1,renderLifeLine:!0},null,8,["leftGap","context"]),B(bL,{context:N(s).block(),style:v2({width:`${N(o)}px`})},null,8,["context","style"]),B(Kt,{leftGap:N(l),context:N(s).head(),renderParticipants:!0,renderLifeLine:!1},null,8,["leftGap","context"])],64)):x2("",!0),N(i)===N(J1).Static?(b(),U(B2,{key:1},[B(Kt,{leftGap:N(l),context:N(s).head(),renderParticipants:!0,renderLifeLine:!0},null,8,["leftGap","context"]),B(bL,{context:N(s).block(),style:v2({width:`${N(o)}px`})},null,8,["context","style"])],64)):x2("",!0)],4)],2))}}),hW="",Ik={name:"IconList",props:["types"],computed:{},methods:{icon(t){return Gt[t==null?void 0:t.toLowerCase()]}}},Fk={role:"list",class:"mt-3 grid grid-cols-4 gap-5 sm:gap-6 sm:grid-cols-6 lg:grid-cols-8"},Ok={class:"h-12 flex items-center justify-center bg-gray-50 text-sm font-medium rounded-t-md"},Nk=["innerHTML","alt"],Dk={class:"flex items-center justify-center border-t border-r border-b border-gray-200 bg-white rounded-b-md"},Pk={class:"px-2 py-2 text-xs"},Bk={class:"text-gray-900 font-medium hover:text-gray-600"};function zk(t,e,n,i,s,r){return b(),U("ul",Fk,[(b(!0),U(B2,null,B3(n.types,o=>(b(),U("li",{key:o,class:"col-span-1 flex flex-col shadow-sm rounded-md"},[v("div",Ok,[r.icon?(b(),U("i",{key:0,innerHTML:r.icon(o),class:"object-contain h-8 w-8 m-auto [&>svg]:w-full [&>svg]:h-full",alt:`icon for ${o}`},null,8,Nk)):x2("",!0)]),v("div",Dk,[v("div",Pk,[v("span",Bk,"@"+h1(o),1)])])]))),128))])}const Uk={name:"TipsDialog",components:{Icon:e3,IconList:Y2(Ik,[["render",zk]])},computed:{standardTypes(){return["Actor","Boundary","Control","Database","Entity"]},awsServices(){return["CloudWatch","CloudFront","Cognito","DynamoDB","EBS","EC2","ECS","EFS","ElastiCache","ElasticBeantalk","ElasticFileSystem","Glacier","IAM","Kinesis","Lambda","LightSail","RDS","Redshift","S3","SNS","SQS","Sagemaker","VPC"]},azureServices(){return["AzureActiveDirectory","AzureBackup","AzureCDN","AzureDataFactory","AzureDevOps","AzureFunction","AzureSQL","CosmosDB","LogicApps","VirtualMachine"]},googleServices(){return["BigTable","BigQuery","CloudCDN","CloudDNS","CloudInterconnect","CloudLoadBalancing","CloudSQL","CloudStorage","DataLab","DataProc","GoogleIAM","GoogleSecurity","GoogleVPC","PubSub","SecurityScanner","StackDriver","VisionAPI"]}},methods:{closeTipsDialog(){var t;this.$store.state.showTips=!1;try{(t=this.$gtag)==null||t.event("close",{event_category:"help",event_label:"tips dialog"})}catch(e){console.error(e)}}}},Wk={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block"},$k=v("div",{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":"true"},null,-1),Hk=v("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"​",-1),Vk={class:"z-40 inline-block align-bottom bg-white rounded-lg px-4 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:p-2"},Gk={class:"bg-white px-4 py-5 border-b border-gray-200 sm:px-6"},jk=v("h3",{class:"text-xl leading-6 font-medium text-gray-900 inline-block"}," ZenUML Tips ",-1),qk=v("span",{class:"sr-only"},"Close menu",-1),Kk={class:"relative bg-white pb-32 mt-4 overflow-hidden"},Yk={class:"relative"},Qk={class:"lg:mx-auto lg:max-w-11/12 lg:px-8"},Xk=Z8(`<div class="grid lg:grid-cols-3 sm:grid-cols-2 grid-cols-1"><div><div class="px-4 max-w-full mx-auto sm:px-6 lg:max-w-none lg:mx-0"><h2 class="mt-4 mb-4 text-lg leading-6 font-medium text-gray-900"> Declare Participants </h2><pre class="text-xs w-full bg-gray-50 text-gray-600 p-2 rounded-lg"><code>// Define a Starter (optional)
3187
3187
  @Starter(A)
3188
3188
 
3189
3189
  // Show icons
@@ -3303,7 +3303,7 @@ A.method() {
3303
3303
  <line x1="13" y1="16.75" x2="31" y2="16.75" stroke="#34D399" stroke-width="0.5"/>
3304
3304
  <line x1="13" y1="30.75" x2="51" y2="30.75" stroke="#34D399" stroke-width="0.5"/>
3305
3305
  </svg>
3306
- `,wW="",Ib={key:0,class:"dot"},Fb=v("div",{class:"fixed inset-0 bg-black bg-opacity-25"},null,-1),Ob={class:"fixed inset-0 overflow-y-auto"},Nb={class:"flex min-h-full items-center justify-center p-4 text-center"},Db={class:"px-6"},Pb=v("p",{class:"text-gray-500 text-sm"},"Customize your UI theme",-1),Bb={class:"mt-4 ml-[-0.5rem] px-2 max-h-72 overflow-y-auto"},zb={class:"pb-4"},Ub={class:"space-y-2"},Wb={class:"flex w-full items-center justify-between"},$b={class:"flex items-center text-sm text-gray-900"},Hb=["innerHTML"],Vb={class:"pt-6 px-6 border-t flex items-center gap-2"},Gb=["checked"],jb=v("label",{for:"scopeTheming",class:"select-none"},"Apply to this diagram only",-1),qb={__name:"ThemeSelect",setup(t){const e=a2(!1),n=[{name:"Legacy",id:"theme-default",icon:Tb},{name:"Clear Light",id:"theme-clean-light",icon:bb},{name:"Clear Dark",id:"theme-clean-dark",icon:Sb},{name:"Neon Dark",id:"theme-neon",icon:Eb}],i=I3(),s=I(()=>i.state.theme||n[0].id),r=I(()=>i.state.enableScopedTheming||!1),o=a2(i.state.themeIconDot),l=()=>{e.value=!1,C("theme-close-modal")},L=()=>{e.value=!0,o.value=!0,i.commit("setThemeIconDot",!0),C("theme-open-modal")},a=u=>{i.commit("setTheme",u),C("theme-select")},c=u=>{i.commit("setEnableScopedTheming",u),C("theme-enable-scoped")},C=u=>{Ew(i,{theme:s.value,enableScopedTheming:r.value},u,"sequence")};return(u,d)=>(b(),U(B2,null,[v("button",{type:"button",class:"flex items-center icon-container",onClick:L},[B(e3,{name:"theme"}),o.value?x2("",!0):(b(),U("span",Ib))]),B(N(vn),{appear:"",show:e.value,as:"template"},{default:l3(()=>[B(N(db),{as:"div",onClose:l,class:"relative z-10"},{default:l3(()=>[B(N(I7),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0","enter-to":"opacity-100",leave:"duration-200 ease-in","leave-from":"opacity-100","leave-to":"opacity-0"},{default:l3(()=>[Fb],void 0,!0),_:1}),v("div",Ob,[v("div",Nb,[B(N(I7),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0 scale-95","enter-to":"opacity-100 scale-100",leave:"duration-200 ease-in","leave-from":"opacity-100 scale-100","leave-to":"opacity-0 scale-95"},{default:l3(()=>[B(N(fb),{class:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white py-6 text-left align-middle shadow-xl transition-all"},{default:l3(()=>[v("div",Db,[B(N(gb),{as:"h3",class:"text-lg font-semibold leading-6 text-gray-900"},{default:l3(()=>[t4(" Theme ")],void 0,!0),_:1}),Pb,v("div",Bb,[v("div",zb,[B(N(wb),{"model-value":N(s),"onUpdate:modelValue":a},{default:l3(()=>[B(N(pa),{class:"sr-only"},{default:l3(()=>[t4("Server size")],void 0,!0),_:1}),v("div",Ub,[(b(),U(B2,null,B3(n,f=>B(N(_b),{as:"template",key:f.id,value:f.id},{default:l3(({checked:m})=>[v("div",{class:M2([[m?"border-2 text-gray-900 border-primary":"border-2 border-transparent"],"relative flex items-center cursor-pointer rounded-lg px-4 py-3 shadow-md"])},[v("div",Wb,[v("div",$b,[m?(b(),Z2(e3,{key:0,name:"selected-cycle","icon-class":"h-5 w-5 fill-none"})):(b(),Z2(e3,{key:1,name:"non-selected-cycle","icon-class":"h-5 w-5"})),B(N(pa),{as:"p",class:M2(["text-gray-900","font-medium ml-2"])},{default:l3(()=>[t4(h1(f.name),1)],void 0,!0),_:2},1032,["class"])])]),v("span",{class:"inline-block w-20 border rounded-md overflow-hidden",innerHTML:f.icon},null,8,Hb)],2)]),_:2},1032,["value"])),64))])],void 0,!0),_:1},8,["model-value"])])])]),v("div",Vb,[v("input",{type:"checkbox",id:"scopeTheming",checked:N(r),onChange:d[0]||(d[0]=f=>c(f.target.checked))},null,40,Gb),jb])],void 0,!0),_:1})],void 0,!0),_:1})])])],void 0,!0),_:1})],void 0,!0),_:1},8,["show"])],64))}},Kb={name:"DiagramFrame",setup(){return{RenderMode:J1}},computed:{...D8(["showTips","scale","theme","numbering","enableMultiTheme","mode"]),...M3(["rootContext"]),title(){var t;return this.rootContext||console.error("`rootContext` is empty. Please make sure `store` is properly configured."),(t=this.rootContext)==null?void 0:t.title()}},mounted(){this.$el.__vue__=this},methods:{...so(["setScale","toggleNumbering"]),showTipsDialog(){var t;this.$store.state.showTips=!0;try{(t=this.$gtag)==null||t.event("view",{event_category:"help",event_label:"tips dialog"})}catch(e){console.error(e)}},toPng(){return fT(this.$refs.export,{backgroundColor:"white",filter:t=>{var e;return!((e=t==null?void 0:t.classList)!=null&&e.contains("hide-export"))}})},toSvg(){return GL(this.$refs.export,{backgroundColor:"white",filter:t=>{var e;return!((e=t==null?void 0:t.classList)!=null&&e.contains("hide-export"))}})},toBlob(){return pT(this.$refs.export,{backgroundColor:"white",filter:t=>{var e;return!((e=t==null?void 0:t.classList)!=null&&e.contains("hide-export"))}})},toJpeg(){return gT(this.$refs.export,{backgroundColor:"white",filter:t=>{var e;return!((e=t==null?void 0:t.classList)!=null&&e.contains("hide-export"))}})},zoomIn(){const t=Math.min(1,this.scale+.1);this.setScale(t)},zoomOut(){this.setScale(this.scale-.1)},setTheme(t){this.theme=t},setStyle(t){const e="zenuml-style";let n=document.getElementById(e);n||(n=document.createElement("style"),n.id=e,document.head.append(n)),n.textContent=t},setRemoteCss(t){const e=new URL(t).hostname;if(e==="https://github.com"||e==="https://githubusercontent.com"){fetch(t.replace("github.com","raw.githubusercontent.com").replace("blob/","")).then(s=>s.text()).then(s=>{this.setStyle(s)});return}const n="zenuml-remote-css";let i=document.getElementById(n);i||(i=document.createElement("link"),i.id=n,i.rel="stylesheet",document.head.append(i)),i.href=t}},components:{Icon:e3,Debug:RT,WidthProvider:RZ,TipsDialog:oZ,DiagramTitle:bw,SeqDiagram:Jt,Privacy:Aw,ThemeSelect:qb}},Yb={class:"frame text-skin-base bg-skin-frame border-skin-frame relative m-1 origin-top-left whitespace-nowrap border rounded"},Qb={ref:"content"},Xb={class:"header text-skin-title bg-skin-title border-skin-frame border-b p-1 flex justify-between rounded-t"},Jb={class:"left hide-export"},eS={class:"right flex-grow flex justify-between"},tS={key:0,class:"fixed z-40 inset-0 overflow-y-auto","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true"},nS={class:"footer rounded text-skin-control bg-skin-title px-4 py-1 flex justify-between items-center gap-3"},iS={class:"flex items-center gap-3 color-base"},sS={class:"flex items-center"},rS=["checked"],oS={for:"order-display",title:"Numbering the diagram",class:"select-none"},lS={class:"zoom-controls flex hide-export gap-1"},LS={class:"w-12 block text-center"},aS=v("a",{target:"_blank",href:"https://zenuml.com",class:"brand text-xs hover:underline"},"ZenUML.com",-1);function cS(t,e,n,i,s,r){const o=r2("debug"),l=r2("diagram-title"),L=r2("privacy"),a=r2("TipsDialog"),c=r2("seq-diagram"),C=r2("Icon"),u=r2("ThemeSelect"),d=r2("width-provider");return b(),U("div",{ref:"export",class:M2(["zenuml p-1 bg-skin-canvas",t.theme]),style:{display:"inline-block"}},[B(o),v("div",Yb,[v("div",Qb,[v("div",Xb,[v("div",Jb,[N6(t.$slots,"default")]),v("div",eS,[B(l,{context:r.title},null,8,["context"]),B(L,{class:"hide-export flex items-center"})])]),v("div",null,[t.showTips?(b(),U("div",tS,[B(a)])):x2("",!0)]),B(c,{ref:"diagram",style:v2({transform:`scale(${t.scale})`}),class:"origin-top-left"},null,8,["style"])],512),v("div",nS,[t.mode===i.RenderMode.Dynamic?(b(),U(B2,{key:0},[v("div",iS,[v("button",{class:"bottom-1 flex items-center left-1 hide-export",onClick:e[0]||(e[0]=f=>r.showTipsDialog())},[B(C,{name:"tip","icon-class":"filter grayscale w-4 h-4"})]),t.enableMultiTheme?(b(),Z2(u,{key:0})):x2("",!0),v("div",sS,[v("input",{type:"checkbox",id:"order-display",class:"mr-1",checked:t.numbering,onInput:e[1]||(e[1]=f=>t.toggleNumbering(!t.numbering))},null,40,rS),v("label",oS,[B(C,{name:"numbering","icon-class":"w-6 h-6"})])])]),v("div",lS,[v("button",{class:"zoom-in",onClick:e[2]||(e[2]=f=>r.zoomIn())},[B(C,{name:"zoom-in","icon-class":"w-4 h-4"})]),v("label",LS,h1(Number(t.scale*100).toFixed(0))+"%",1),v("button",{class:"zoom-out",onClick:e[3]||(e[3]=f=>r.zoomOut())},[B(C,{name:"zoom-out","icon-class":"w-4 h-4"})])]),aS],64)):x2("",!0)]),B(d)])],2)}const _a=Y2(Kb,[["render",cS]]),CS="3.31.1",xW="",_W="",vW="",MW="",yW="",RW="",AW="",kW="";function va(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let w0=va();function uS(t){w0=t}const hS=/[&<>"']/,dS=/[&<>"']/g,fS=/[<>"']|&(?!#?\w+;)/,gS=/[<>"']|&(?!#?\w+;)/g,pS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ma=t=>pS[t];function R1(t,e){if(e){if(hS.test(t))return t.replace(dS,Ma)}else if(fS.test(t))return t.replace(gS,Ma);return t}const mS=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ya(t){return t.replace(mS,(e,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const wS=/(^|[^\[])\^/g;function n1(t,e){t=t.source||t,e=e||"";const n={replace:(i,s)=>(s=s.source||s,s=s.replace(wS,"$1"),t=t.replace(i,s),n),getRegex:()=>new RegExp(t,e)};return n}const xS=/[^\w:]/g,_S=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Ra(t,e,n){if(t){let i;try{i=decodeURIComponent(ya(n)).replace(xS,"").toLowerCase()}catch{return null}if(i.indexOf("javascript:")===0||i.indexOf("vbscript:")===0||i.indexOf("data:")===0)return null}e&&!_S.test(n)&&(n=RS(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const F7={},vS=/^[^:]+:\/*[^/]*$/,MS=/^([^:]+:)[\s\S]*$/,yS=/^([^:]+:\/*[^/]*)[\s\S]*$/;function RS(t,e){F7[" "+t]||(vS.test(t)?F7[" "+t]=t+"/":F7[" "+t]=N7(t,"/",!0)),t=F7[" "+t];const n=t.indexOf(":")===-1;return e.substring(0,2)==="//"?n?e:t.replace(MS,"$1")+e:e.charAt(0)==="/"?n?e:t.replace(yS,"$1")+e:t+e}const O7={exec:function(){}};function W3(t){let e=1,n,i;for(;e<arguments.length;e++){n=arguments[e];for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}function Aa(t,e){const n=t.replace(/\|/g,(r,o,l)=>{let L=!1,a=o;for(;--a>=0&&l[a]==="\\";)L=!L;return L?"|":" |"}),i=n.split(/ \|/);let s=0;if(i[0].trim()||i.shift(),i[i.length-1].trim()||i.pop(),i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(/\\\|/g,"|");return i}function N7(t,e,n){const i=t.length;if(i===0)return"";let s=0;for(;s<i;){const r=t.charAt(i-s-1);if(r===e&&!n)s++;else if(r!==e&&n)s++;else break}return t.substr(0,i-s)}function AS(t,e){if(t.indexOf(e[1])===-1)return-1;const n=t.length;let i=0,s=0;for(;s<n;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])i++;else if(t[s]===e[1]&&(i--,i<0))return s;return-1}function ka(t){t&&t.sanitize&&!t.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function Za(t,e){if(e<1)return"";let n="";for(;e>1;)e&1&&(n+=t),e>>=1,t+=t;return n+t}function Ta(t,e,n,i){const s=e.href,r=e.title?R1(e.title):null,o=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){i.state.inLink=!0;const l={type:"link",raw:n,href:s,title:r,text:o,tokens:i.inlineTokens(o,[])};return i.state.inLink=!1,l}else return{type:"image",raw:n,href:s,title:r,text:R1(o)}}function kS(t,e){const n=t.match(/^(\s+)(?:```)/);if(n===null)return e;const i=n[1];return e.split(`
3306
+ `,wW="",Ib={key:0,class:"dot"},Fb=v("div",{class:"fixed inset-0 bg-black bg-opacity-25"},null,-1),Ob={class:"fixed inset-0 overflow-y-auto"},Nb={class:"flex min-h-full items-center justify-center p-4 text-center"},Db={class:"px-6"},Pb=v("p",{class:"text-gray-500 text-sm"},"Customize your UI theme",-1),Bb={class:"mt-4 ml-[-0.5rem] px-2 max-h-72 overflow-y-auto"},zb={class:"pb-4"},Ub={class:"space-y-2"},Wb={class:"flex w-full items-center justify-between"},$b={class:"flex items-center text-sm text-gray-900"},Hb=["innerHTML"],Vb={class:"pt-6 px-6 border-t flex items-center gap-2"},Gb=["checked"],jb=v("label",{for:"scopeTheming",class:"select-none"},"Apply to this diagram only",-1),qb={__name:"ThemeSelect",setup(t){const e=a2(!1),n=[{name:"Legacy",id:"theme-default",icon:Tb},{name:"Clear Light",id:"theme-clean-light",icon:bb},{name:"Clear Dark",id:"theme-clean-dark",icon:Sb},{name:"Neon Dark",id:"theme-neon",icon:Eb}],i=I3(),s=I(()=>i.state.theme||n[0].id),r=I(()=>i.state.enableScopedTheming||!1),o=a2(i.state.themeIconDot),l=()=>{e.value=!1,C("theme-close-modal")},L=()=>{e.value=!0,o.value=!0,i.commit("setThemeIconDot",!0),C("theme-open-modal")},a=u=>{i.commit("setTheme",u),C("theme-select")},c=u=>{i.commit("setEnableScopedTheming",u),C("theme-enable-scoped")},C=u=>{Ew(i,{theme:s.value,enableScopedTheming:r.value},u,"sequence")};return(u,d)=>(b(),U(B2,null,[v("button",{type:"button",class:"flex items-center icon-container",onClick:L},[B(e3,{name:"theme"}),o.value?x2("",!0):(b(),U("span",Ib))]),B(N(vn),{appear:"",show:e.value,as:"template"},{default:l3(()=>[B(N(db),{as:"div",onClose:l,class:"relative z-10"},{default:l3(()=>[B(N(I7),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0","enter-to":"opacity-100",leave:"duration-200 ease-in","leave-from":"opacity-100","leave-to":"opacity-0"},{default:l3(()=>[Fb],void 0,!0),_:1}),v("div",Ob,[v("div",Nb,[B(N(I7),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0 scale-95","enter-to":"opacity-100 scale-100",leave:"duration-200 ease-in","leave-from":"opacity-100 scale-100","leave-to":"opacity-0 scale-95"},{default:l3(()=>[B(N(fb),{class:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white py-6 text-left align-middle shadow-xl transition-all"},{default:l3(()=>[v("div",Db,[B(N(gb),{as:"h3",class:"text-lg font-semibold leading-6 text-gray-900"},{default:l3(()=>[t4(" Theme ")],void 0,!0),_:1}),Pb,v("div",Bb,[v("div",zb,[B(N(wb),{"model-value":N(s),"onUpdate:modelValue":a},{default:l3(()=>[B(N(pa),{class:"sr-only"},{default:l3(()=>[t4("Server size")],void 0,!0),_:1}),v("div",Ub,[(b(),U(B2,null,B3(n,f=>B(N(_b),{as:"template",key:f.id,value:f.id},{default:l3(({checked:m})=>[v("div",{class:M2([[m?"border-2 text-gray-900 border-primary":"border-2 border-transparent"],"relative flex items-center cursor-pointer rounded-lg px-4 py-3 shadow-md"])},[v("div",Wb,[v("div",$b,[m?(b(),Z2(e3,{key:0,name:"selected-cycle","icon-class":"h-5 w-5 fill-none"})):(b(),Z2(e3,{key:1,name:"non-selected-cycle","icon-class":"h-5 w-5"})),B(N(pa),{as:"p",class:M2(["text-gray-900","font-medium ml-2"])},{default:l3(()=>[t4(h1(f.name),1)],void 0,!0),_:2},1032,["class"])])]),v("span",{class:"inline-block w-20 border rounded-md overflow-hidden",innerHTML:f.icon},null,8,Hb)],2)]),_:2},1032,["value"])),64))])],void 0,!0),_:1},8,["model-value"])])])]),v("div",Vb,[v("input",{type:"checkbox",id:"scopeTheming",checked:N(r),onChange:d[0]||(d[0]=f=>c(f.target.checked))},null,40,Gb),jb])],void 0,!0),_:1})],void 0,!0),_:1})])])],void 0,!0),_:1})],void 0,!0),_:1},8,["show"])],64))}},Kb={name:"DiagramFrame",setup(){return{RenderMode:J1}},computed:{...D8(["showTips","scale","theme","numbering","enableMultiTheme","mode"]),...M3(["rootContext"]),title(){var t;return this.rootContext||console.error("`rootContext` is empty. Please make sure `store` is properly configured."),(t=this.rootContext)==null?void 0:t.title()}},mounted(){this.$el.__vue__=this},methods:{...so(["setScale","toggleNumbering"]),showTipsDialog(){var t;this.$store.state.showTips=!0;try{(t=this.$gtag)==null||t.event("view",{event_category:"help",event_label:"tips dialog"})}catch(e){console.error(e)}},toPng(){return fT(this.$refs.export,{backgroundColor:"white",filter:t=>{var e;return!((e=t==null?void 0:t.classList)!=null&&e.contains("hide-export"))}})},toSvg(){return GL(this.$refs.export,{backgroundColor:"white",filter:t=>{var e;return!((e=t==null?void 0:t.classList)!=null&&e.contains("hide-export"))}})},toBlob(){return pT(this.$refs.export,{backgroundColor:"white",filter:t=>{var e;return!((e=t==null?void 0:t.classList)!=null&&e.contains("hide-export"))}})},toJpeg(){return gT(this.$refs.export,{backgroundColor:"white",filter:t=>{var e;return!((e=t==null?void 0:t.classList)!=null&&e.contains("hide-export"))}})},zoomIn(){const t=Math.min(1,this.scale+.1);this.setScale(t)},zoomOut(){this.setScale(this.scale-.1)},setTheme(t){this.theme=t},setStyle(t){const e="zenuml-style";let n=document.getElementById(e);n||(n=document.createElement("style"),n.id=e,document.head.append(n)),n.textContent=t},setRemoteCss(t){const e=new URL(t).hostname;if(e==="https://github.com"||e==="https://githubusercontent.com"){fetch(t.replace("github.com","raw.githubusercontent.com").replace("blob/","")).then(s=>s.text()).then(s=>{this.setStyle(s)});return}const n="zenuml-remote-css";let i=document.getElementById(n);i||(i=document.createElement("link"),i.id=n,i.rel="stylesheet",document.head.append(i)),i.href=t}},components:{Icon:e3,Debug:RT,WidthProvider:RZ,TipsDialog:oZ,DiagramTitle:bw,SeqDiagram:Jt,Privacy:Aw,ThemeSelect:qb}},Yb={class:"frame text-skin-base bg-skin-frame border-skin-frame relative m-1 origin-top-left whitespace-nowrap border rounded"},Qb={ref:"content"},Xb={class:"header text-skin-title bg-skin-title border-skin-frame border-b p-1 flex justify-between rounded-t"},Jb={class:"left hide-export"},eS={class:"right flex-grow flex justify-between"},tS={key:0,class:"fixed z-40 inset-0 overflow-y-auto","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true"},nS={class:"footer rounded text-skin-control bg-skin-title px-4 py-1 flex justify-between items-center gap-3"},iS={class:"flex items-center gap-3 color-base"},sS={class:"flex items-center"},rS=["checked"],oS={for:"order-display",title:"Numbering the diagram",class:"select-none"},lS={class:"zoom-controls flex hide-export gap-1"},LS={class:"w-12 block text-center"},aS=v("a",{target:"_blank",href:"https://zenuml.com",class:"brand text-xs hover:underline"},"ZenUML.com",-1);function cS(t,e,n,i,s,r){const o=r2("debug"),l=r2("diagram-title"),L=r2("privacy"),a=r2("TipsDialog"),c=r2("seq-diagram"),C=r2("Icon"),u=r2("ThemeSelect"),d=r2("width-provider");return b(),U("div",{ref:"export",class:M2(["zenuml p-1 bg-skin-canvas",t.theme]),style:{display:"inline-block"}},[B(o),v("div",Yb,[v("div",Qb,[v("div",Xb,[v("div",Jb,[N6(t.$slots,"default")]),v("div",eS,[B(l,{context:r.title},null,8,["context"]),B(L,{class:"hide-export flex items-center"})])]),v("div",null,[t.showTips?(b(),U("div",tS,[B(a)])):x2("",!0)]),B(c,{ref:"diagram",style:v2({transform:`scale(${t.scale})`}),class:"origin-top-left"},null,8,["style"])],512),v("div",nS,[t.mode===i.RenderMode.Dynamic?(b(),U(B2,{key:0},[v("div",iS,[v("button",{class:"bottom-1 flex items-center left-1 hide-export",onClick:e[0]||(e[0]=f=>r.showTipsDialog())},[B(C,{name:"tip","icon-class":"filter grayscale w-4 h-4"})]),t.enableMultiTheme?(b(),Z2(u,{key:0})):x2("",!0),v("div",sS,[v("input",{type:"checkbox",id:"order-display",class:"mr-1",checked:t.numbering,onInput:e[1]||(e[1]=f=>t.toggleNumbering(!t.numbering))},null,40,rS),v("label",oS,[B(C,{name:"numbering","icon-class":"w-6 h-6"})])])]),v("div",lS,[v("button",{class:"zoom-in",onClick:e[2]||(e[2]=f=>r.zoomIn())},[B(C,{name:"zoom-in","icon-class":"w-4 h-4"})]),v("label",LS,h1(Number(t.scale*100).toFixed(0))+"%",1),v("button",{class:"zoom-out",onClick:e[3]||(e[3]=f=>r.zoomOut())},[B(C,{name:"zoom-out","icon-class":"w-4 h-4"})])]),aS],64)):x2("",!0)]),B(d)])],2)}const _a=Y2(Kb,[["render",cS]]),CS="3.31.2",xW="",_W="",vW="",MW="",yW="",RW="",AW="",kW="";function va(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let w0=va();function uS(t){w0=t}const hS=/[&<>"']/,dS=/[&<>"']/g,fS=/[<>"']|&(?!#?\w+;)/,gS=/[<>"']|&(?!#?\w+;)/g,pS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ma=t=>pS[t];function R1(t,e){if(e){if(hS.test(t))return t.replace(dS,Ma)}else if(fS.test(t))return t.replace(gS,Ma);return t}const mS=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ya(t){return t.replace(mS,(e,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const wS=/(^|[^\[])\^/g;function n1(t,e){t=t.source||t,e=e||"";const n={replace:(i,s)=>(s=s.source||s,s=s.replace(wS,"$1"),t=t.replace(i,s),n),getRegex:()=>new RegExp(t,e)};return n}const xS=/[^\w:]/g,_S=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Ra(t,e,n){if(t){let i;try{i=decodeURIComponent(ya(n)).replace(xS,"").toLowerCase()}catch{return null}if(i.indexOf("javascript:")===0||i.indexOf("vbscript:")===0||i.indexOf("data:")===0)return null}e&&!_S.test(n)&&(n=RS(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const F7={},vS=/^[^:]+:\/*[^/]*$/,MS=/^([^:]+:)[\s\S]*$/,yS=/^([^:]+:\/*[^/]*)[\s\S]*$/;function RS(t,e){F7[" "+t]||(vS.test(t)?F7[" "+t]=t+"/":F7[" "+t]=N7(t,"/",!0)),t=F7[" "+t];const n=t.indexOf(":")===-1;return e.substring(0,2)==="//"?n?e:t.replace(MS,"$1")+e:e.charAt(0)==="/"?n?e:t.replace(yS,"$1")+e:t+e}const O7={exec:function(){}};function W3(t){let e=1,n,i;for(;e<arguments.length;e++){n=arguments[e];for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}function Aa(t,e){const n=t.replace(/\|/g,(r,o,l)=>{let L=!1,a=o;for(;--a>=0&&l[a]==="\\";)L=!L;return L?"|":" |"}),i=n.split(/ \|/);let s=0;if(i[0].trim()||i.shift(),i[i.length-1].trim()||i.pop(),i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(/\\\|/g,"|");return i}function N7(t,e,n){const i=t.length;if(i===0)return"";let s=0;for(;s<i;){const r=t.charAt(i-s-1);if(r===e&&!n)s++;else if(r!==e&&n)s++;else break}return t.substr(0,i-s)}function AS(t,e){if(t.indexOf(e[1])===-1)return-1;const n=t.length;let i=0,s=0;for(;s<n;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])i++;else if(t[s]===e[1]&&(i--,i<0))return s;return-1}function ka(t){t&&t.sanitize&&!t.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function Za(t,e){if(e<1)return"";let n="";for(;e>1;)e&1&&(n+=t),e>>=1,t+=t;return n+t}function Ta(t,e,n,i){const s=e.href,r=e.title?R1(e.title):null,o=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){i.state.inLink=!0;const l={type:"link",raw:n,href:s,title:r,text:o,tokens:i.inlineTokens(o,[])};return i.state.inLink=!1,l}else return{type:"image",raw:n,href:s,title:r,text:R1(o)}}function kS(t,e){const n=t.match(/^(\s+)(?:```)/);if(n===null)return e;const i=n[1];return e.split(`
3307
3307
  `).map(s=>{const r=s.match(/^\s+/);if(r===null)return s;const[o]=r;return o.length>=i.length?s.slice(i.length):s}).join(`
3308
3308
  `)}class Mn{constructor(e){this.options=e||w0}space(e){const n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){const n=this.rules.block.code.exec(e);if(n){const i=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:N7(i,`
3309
3309
  `)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const i=n[0],s=kS(i,n[3]||"");return{type:"code",raw:i,lang:n[2]?n[2].trim():n[2],text:s}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let i=n[2].trim();if(/#$/.test(i)){const r=N7(i,"#");(this.options.pedantic||!r||/ $/.test(r))&&(i=r.trim())}const s={type:"heading",raw:n[0],depth:n[1].length,text:i,tokens:[]};return this.lexer.inline(s.text,s.tokens),s}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[0]}}blockquote(e){const n=this.rules.block.blockquote.exec(e);if(n){const i=n[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:n[0],tokens:this.lexer.blockTokens(i,[]),text:i}}}list(e){let n=this.rules.block.list.exec(e);if(n){let i,s,r,o,l,L,a,c,C,u,d,f,m=n[1].trim();const _=m.length>1,p={type:"list",raw:"",ordered:_,start:_?+m.slice(0,-1):"",loose:!1,items:[]};m=_?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=_?m:"[*+-]");const g=new RegExp(`^( {0,3}${m})((?: [^\\n]*)?(?:\\n|$))`);for(;e&&(f=!1,!(!(n=g.exec(e))||this.rules.block.hr.test(e)));){if(i=n[0],e=e.substring(i.length),c=n[2].split(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenuml/core",
3
- "version": "3.31.1",
3
+ "version": "3.31.2",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "repository": {