@zenuml/core 3.24.27 → 3.24.28
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/{StylePanel.4294907d.js → StylePanel.5e129b41.js} +2 -2
- package/dist/{close.49b39642.js → close.935867a5.js} +2 -2
- package/dist/{collapse-expanded.691e880b.js → collapse-expanded.33a62cb5.js} +2 -2
- package/dist/{collapse-unexpanded.fdc9ad9a.js → collapse-unexpanded.3fb97ca2.js} +2 -2
- package/dist/{core.38c54a25.js → core.976bd627.js} +4 -4
- package/dist/{debug.c1295aaf.js → debug.9bd9930e.js} +2 -2
- package/dist/{message-arrow.0ad30f2c.js → message-arrow.9fcb0229.js} +2 -2
- package/dist/{non-selected-cycle.e6a57d10.js → non-selected-cycle.ac954789.js} +2 -2
- package/dist/{numbering.e135c05a.js → numbering.585e9b2d.js} +2 -2
- package/dist/{privacy.4e2c96d8.js → privacy.49124784.js} +2 -2
- package/dist/{selected-cycle.c8f03d0b.js → selected-cycle.913c6a67.js} +2 -2
- package/dist/{theme.5ebff3ee.js → theme.9a9b014c.js} +2 -2
- package/dist/{tip.5b9d139c.js → tip.69307bf9.js} +2 -2
- package/dist/zenuml.esm.mjs +1 -1
- package/dist/zenuml.js +1 -1
- package/dist/{zoom-in.04c65d99.js → zoom-in.af5ed295.js} +2 -2
- package/dist/{zoom-out.eb606204.js → zoom-out.5ffc2ec1.js} +2 -2
- package/package.json +1 -1
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 Xl(){const t=C2(0),e=C2(0),n=()=>{t.value=document.documentElement.scrollTop,e.value=document.documentElement.scrollLeft};return e1(()=>{n(),document.addEventListener("scroll",n)}),_1(()=>{document.removeEventListener("scroll",n)}),[t,e]}const $t=10,yR=1,Ql=20;function RR(){let t=document.getElementById("zenuml-intersection-detector-container"),e=Array.from(document.getElementsByClassName("zenuml-intersection-detector"));return t&&e.length===$t?{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($t).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 Jl(){const t=C2(0);let e;return e1(()=>{const{detectorContainer:n,detectors:i}=RR(),s=document.documentElement.scrollHeight-Ql,r=document.documentElement.scrollWidth-Ql;n.style.height=s+"px",n.style.width=r+"px";const o=Math.ceil(document.documentElement.scrollHeight/$t),l=[...Array(o+1).keys()].map(L=>L/o);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>yR||L.target===i[0])&&(t.value=L.intersectionRect.top)},{threshold:l}),i.forEach(L=>{e.observe(L)})}),_1(()=>{e.disconnect()}),t}function Vt(t){let e=0,n=t;for(;n;)e+=n.offsetTop,n=n.offsetParent;return e}const w5=/[!@#$%^&*()+-,.?''":{}|<>/\s]/,w7=t=>{const e=C2(!1);function n(l){e.value=l}async function i(l){l.preventDefault(),l.stopPropagation(),n(!0),await x4();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 x4(),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}},AR={class:"flex items-center justify-center"},kR=["contenteditable"],ZR=R("span",null,":",-1),TR=["contenteditable"],SR=X2({__name:"ParticipantLabel",props:{labelText:null,labelPositions:null,assignee:null,assigneePositions:null},setup(t){var f,w;const e=t,n=["Missing Constructor","ZenUML"],{labelText:i,labelPositions:s,assigneePositions:r}=L9(e),o=S1(),l=O(()=>o.state.mode),L=O(()=>o.getters.code),a=O(()=>o.getters.onContentChange||(()=>{}));function c(v){o.dispatch("updateCode",{code:v}),a.value(v)}function C(v){return function(p){var Z;p.preventDefault(),p.stopPropagation();const g=p.target;if(!(g instanceof HTMLElement))return;let m=(Z=g.innerText.trim())!=null?Z:"";if(m===""||m===i.value){g.innerText=i.value;return}if(m.includes(" ")&&(m=m.replace(/\s+/g," ")),w5.test(m)&&(m=m.replace(/"/g,""),m=`"${m}"`,w5.lastIndex=0),!v||v.length===0)return;let _=L.value;for(const E of v){const[k,b]=E;_=_.slice(0,k)+m+_.slice(b)}c(_)}}const u=w7(C((f=s==null?void 0:s.value)!=null?f:[])),h=w7(C((w=r==null?void 0:r.value)!=null?w:[]));return(v,p)=>(S(),B("div",AR,[t.assignee?(S(),B(z2,{key:0},[R("label",{title:"Double click to edit",class:R2(["name leading-4 cursor-text right hover:text-skin-message-hover hover:bg-skin-message-hover",{"py-1 cursor-text":N(h).editing}]),contenteditable:N(h).editing&&N(l)===N(e3).Dynamic,onDblclick:p[0]||(p[0]=(...g)=>N(h).handleDblClick&&N(h).handleDblClick(...g)),onBlur:p[1]||(p[1]=(...g)=>N(h).handleBlur&&N(h).handleBlur(...g)),onKeyup:p[2]||(p[2]=(...g)=>N(h).handleKeyup&&N(h).handleKeyup(...g)),onKeydown:p[3]||(p[3]=(...g)=>N(h).handleKeydown&&N(h).handleKeydown(...g))},K2(t.assignee),43,kR),ZR],64)):d2("",!0),R("label",{title:"Double click to edit",class:R2(["name 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(e3).Dynamic&&n.indexOf(N(i))===-1,onDblclick:p[4]||(p[4]=(...g)=>N(u).handleDblClick&&N(u).handleDblClick(...g)),onBlur:p[5]||(p[5]=(...g)=>N(u).handleBlur&&N(u).handleBlur(...g)),onKeyup:p[6]||(p[6]=(...g)=>N(u).handleKeyup&&N(u).handleKeyup(...g)),onKeydown:p[7]||(p[7]=(...g)=>N(u).handleKeydown&&N(u).handleKeydown(...g))},K2(N(i)),43,TR)]))}}),bR=10,ER={name:"Participant",components:{ParticipantLabel:SR},setup(t){const e=S1(),n=C2(null);if(e.state.mode===e3.Static)return{translate:0,participant:n};const i=O(()=>{const L=e.getters.participants.GetPositions(t.entity.name);return Array.from(L!=null?L:[]).sort((c,C)=>C[0]-c[0])}),s=O(()=>{const L=e.getters.participants.GetAssigneePositions(t.entity.name);return Array.from(L!=null?L:[]).sort((c,C)=>C[0]-c[0])}),r=Jl(),[o]=Xl();return{translate:O(()=>{var u;const L=t.offsetTop2||0;let a=r.value+o.value;r.value>bR&&(e==null?void 0: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?Vt(e==null?void 0:e.state.diagramElement):0;return a<L+C?0:Math.min(a-C,c-Tl)-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===E1},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?Ht.actor:Ht[(t=this.entity.type)==null?void 0:t.toLowerCase()]},backgroundColor(){try{return this.entity.color?this.entity.color&&Cm(this.entity.color):void 0}catch{return}}},methods:{onSelect(){this.$store.commit("onSelect",this.entity.name)},updateFontColor(){if(!this.entity.color){this.color="inherit";return}let t=window.getComputedStyle(this.$refs.participant).getPropertyValue("background-color");if(!t){this.color="inherit";return}let e=cm(t);this.color=e>128?"#000":"#fff"}}},IR=["innerHTML","aria-description"],OR={key:1},FR=["innerHTML","aria-description"],NR={class:"h-5 group flex flex-col justify-center"},DR={key:0,class:"interface leading-4"};function PR(t,e,n,i,s,r){const o=w2("ParticipantLabel");return r.isDefaultStarter?(S(),B("div",{key:0,class:R2(["participant bg-skin-participant shadow-participant border-transparent 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:y2({transform:`translateY(${i.translate}px)`}),onClick:e[0]||(e[0]=(...l)=>r.onSelect&&r.onSelect(...l))},[R("div",{innerHTML:r.icon,class:"text-skin-base bg-skin-participant px-1 absolute rounded left-1/2 transform -translate-x-1/2 h-8 [&>svg]:w-full [&>svg]:h-full","aria-description":`icon for ${n.entity.name}`},null,8,IR)],6)):(S(),B("div",OR,[R("div",{class:R2(["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:y2({backgroundColor:r.backgroundColor,color:s.color,transform:`translateY(${i.translate}px)`}),onClick:e[1]||(e[1]=(...l)=>r.onSelect&&r.onSelect(...l))},[r.icon?(S(),B("div",{key:0,innerHTML:r.icon,class:"text-skin-base bg-skin-participant px-1 absolute rounded left-1/2 transform -translate-x-1/2 -translate-y-full h-8 [&>svg]:w-full [&>svg]:h-full","aria-description":`icon for ${n.entity.name}`},null,8,FR)):d2("",!0),R("div",NR,[r.stereotype?(S(),B("label",DR,"\xAB"+K2(r.stereotype)+"\xBB",1)):d2("",!0),j(o,{labelText:r.labelText,labelPositions:i.labelPositions,assignee:n.entity.assignee,assigneePositions:i.assigneePositions},null,8,["labelText","labelPositions","assignee","assigneePositions"])])],6)]))}const eL=Y2(ER,[["render",PR]]),pz="",x5=G5.child({name:"LifeLine"}),BR={name:"life-line",components:{Participant:eL},props:["entity","context","groupLeft","inGroup","renderParticipants","renderLifeLine"],data:()=>({translateX:0,top:0}),computed:{...I3(["centerOf"]),...y9(["scale"]),debug(){return!!localStorage.zenumlDebug},left(){return this.centerOf(this.entity.name)-8-(this.groupLeft||0)}},mounted(){x5.debug(`LifeLine mounted for ${this.entity.name}`),this.$nextTick(()=>{this.setTop(),x5.debug(`nextTick after updated for ${this.entity.name}`)}),g7.on("participant_set_top",()=>this.$nextTick(()=>this.setTop()))},updated(){x5.debug(`updated for ${this.entity.name}`),this.$nextTick(()=>{this.setTop(),x5.debug(`nextTick after updated for ${this.entity.name}`)})},methods:{onSelect(){this.$store.commit("onSelect",this.entity.name)},setTop(){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&&n.attributes["data-type"].value==="creation"&&i){x5.debug(`First message to ${this.entity.name} is creation`);const s=this.$el.getBoundingClientRect().y,r=n.getBoundingClientRect().y;this.top=(r-s)/this.scale}else this.top=0}}},zR=["id","entity-type"],UR={key:1,class:"line w0 mx-auto flex-grow w-px"};function WR(t,e,n,i,s,r){var l;const o=w2("participant");return S(),B("div",{id:n.entity.name,"entity-type":(l=n.entity.type)==null?void 0:l.toLowerCase(),class:R2(["lifeline absolute flex flex-col mx-2 h-full",{"transform -translate-x-1/2":n.renderParticipants}]),style:y2({paddingTop:t.top+"px",left:r.left+"px"})},[n.renderParticipants?(S(),T2(o,{key:0,entity:n.entity,offsetTop2:t.top},null,8,["entity","offsetTop2"])):d2("",!0),n.renderLifeLine?(S(),B("div",UR)):d2("",!0)],14,zR)}const tL=Y2(BR,[["render",WR],["__scopeId","data-v-25231267"]]),nL=8,HR={name:"lifeline-group",props:["context","renderParticipants","renderLifeLine"],computed:{...I3(["centerOf"]),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,e=Math.max(h7(t,T9.ParticipantName),100);return this.centerOf(t)-e/2-nL},right(){const t=this.entities.slice(0).pop().name,e=Math.max(h7(t,T9.ParticipantName),100);return this.centerOf(t)+e/2+nL},entities(){return p5(this.context).Array()}},components:{LifeLine:tL}},$R={class:"lifeline-group relative flex-grow"};function VR(t,e,n,i,s,r){const o=w2("life-line");return r.entities.length>0?(S(),B("div",{key:0,class:"lifeline-group-container absolute flex flex-col h-full",style:y2({left:`${r.left}px`,width:`${r.right-r.left}px`})},[R("div",{class:R2(["flex flex-col flex-grow",{shadow:!n.renderParticipants,"shadow-slate-500/50":!n.renderParticipants}])},[R("div",$R,[(S(!0),B(z2,null,z3(r.entities,l=>(S(),T2(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))])],2)],4)):d2("",!0)}const GR=Y2(HR,[["render",VR]]),iL=G5.child({name:"LifeLineLayer"}),jR=70,qR=10,KR={name:"life-line-layer",props:["context","renderParticipants","renderLifeLine","leftGap"],setup(){const e=S1(),n=O(()=>e.state.mode);if(n.value===e3.static)return{translate:0,RenderMode:e3,mode:n};const i=Jl(),[s]=Xl();return{translate:O(()=>{var a;let o=i.value+s.value;i.value>qR&&(e==null?void 0: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?Vt(e==null?void 0:e.state.diagramElement):0;return o<=0+L?0:Math.min(o-L,l-jR)-0}),RenderMode:e3,mode:n}},computed:{...I3(["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]===E1?{...Ko,name:E1,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 wl,i=e instanceof xl;return n||i})}},methods:{...no(["increaseGeneration"]),getParticipantEntity(t){return p5(t).First()}},updated(){iL.debug("LifeLineLayer updated")},mounted(){iL.debug("LifeLineLayer mounted")},components:{LifeLine:tL,LifeLineGroup:GR}},YR=["data-participant-names"],XR={class:"z-lifeline-container relative grow"};function QR(t,e,n,i,s,r){const o=w2("life-line"),l=w2("life-line-group");return S(),B("div",{class:"life-line-layer lifeline-layer z-30 absolute h-full flex flex-col top-0","data-participant-names":r.participantNames,style:y2({"min-width":i.mode===i.RenderMode.Dynamic?"200px":"auto",width:`calc(100% - ${n.leftGap}px)`,pointerEvents:n.renderParticipants?"none":"all"})},[R("div",{style:y2({transform:`translateY(${i.translate>0?i.translate-1:i.translate}px)`}),class:"pt-8 after:bg-gradient-to-b after:from-skin-frame after:via-skin-frame after:to-skin-frame/0 after:block after:absolute after:top-0 after:w-full after:h-[72px]"},null,4),R("div",XR,[r.starterOnTheLeft?(S(),T2(o,{key:0,entity:r.starterParticipant,class:"starter",renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["entity","renderParticipants","renderLifeLine"])):d2("",!0),(S(!0),B(z2,null,z3(r.explicitGroupAndParticipants,(L,a)=>(S(),B(z2,null,[L instanceof t.GroupContext?(S(),T2(l,{key:a,context:L,renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["context","renderParticipants","renderLifeLine"])):d2("",!0),L instanceof t.ParticipantContext?(S(),T2(o,{key:a,entity:r.getParticipantEntity(L),renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["entity","renderParticipants","renderLifeLine"])):d2("",!0)],64))),256)),(S(!0),B(z2,null,z3(r.implicitParticipants,L=>(S(),T2(o,{key:L.name,entity:L,renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["entity","renderParticipants","renderLifeLine"]))),128))])],12,YR)}const Gt=Y2(KR,[["render",QR]]),JR={class:"message-layer relative z-30 pt-24 pb-10"},sL=X2({__name:"MessageLayer",props:{context:null},setup(t){const e=J9(()=>Promise.resolve().then(()=>oP)),n=G5.child({name:"MessageLayer"}),i=S1(),s=O(()=>i.getters.centerOf),r=O(()=>i.getters.rootContext),o=O(()=>s.value(l.value)+1),l=O(()=>{const L=d7(r.value);return L.length===0?null:L[0].from||E1});return e1(()=>{n.debug("MessageLayer mounted")}),q0(()=>{n.debug("MessageLayer updated")}),(L,a)=>{const c=w2("block");return S(),B("div",JR,[N(l)?(S(),T2(c,{key:0,context:t.context,style:y2({"padding-left":N(o)+"px"}),origin:N(l)},null,8,["context","style","origin"])):d2("",!0),j(N(e))])}}}),mz="";function x7(t){return[t.Origin()||E1,...p5(t).Names()]}const eA=T.tree.ParseTreeWalker.DEFAULT;class jt extends I{constructor(n){super();s2(this,"_orderedParticipants");s2(this,"frameRoot",null);s2(this,"parents",[]);this._orderedParticipants=n}getLocalParticipants(n){return[n.Origin()||E1,...p5(n).ImplicitArray().map(i=>i.name)]}getLeft(n){const i=x7(n);return this._orderedParticipants.find(s=>i.includes(s))||""}getRight(n){return this._orderedParticipants.slice().reverse().find(i=>x7(n).includes(i))||""}enterFragment(n,i){var r;const s={type:i,left:this.getLeft(n),right:this.getRight(n),children:[]};this.frameRoot||(this.frameRoot=s),this.parents.length>0&&((r=this.parents[this.parents.length-1].children)==null||r.push(s)),this.parents.push(s)}exitFragment(){this.parents.pop()}enterTcf(n){this.enterFragment(n,"tcf")}enterOpt(n){this.enterFragment(n,"opt")}enterPar(n){this.enterFragment(n,"par")}enterAlt(n){this.enterFragment(n,"alt")}enterLoop(n){this.enterFragment(n,"loop")}enterSection(n){this.enterFragment(n,"section")}enterCritical(n){this.enterFragment(n,"critical")}enterRef(n){this.enterFragment(n,"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(n){return n.children.map(i=>{eA.walk(this,i)}),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 Kt(t){return t?{type:t.type,left:Rl*qt(t,"LEFT"),right:Rl*qt(t,"RIGHT")}:{left:0,right:0}}function rL(t,e){const n=e.orderedParticipantNames(),i=x7(t),s=n.find(C=>i.includes(C))||"",r=n.slice().reverse().find(C=>i.includes(C))||"",l=new jt(n).getFrame(t),L=Kt(l),a=tA(t,r,e),c=e.distance(s,r)+e.half(s)+e.half(r);return Math.max(c,Al)+L.left+L.right+a}function tA(t,e,n){const s=d7(t).filter(r=>r.from===r.to).map(r=>n.getMessageWidth(r)-n.distance(r.from||E1,e)-n.half(e));return Math.max.apply(null,[0,...s])}const Yt=X2({__name:"SeqDiagram",setup(t){const e=S1(),n=O(()=>e.state.theme),i=O(()=>e.state.mode),s=O(()=>e.getters.rootContext),r=O(()=>e.getters.coordinates),o=O(()=>rL(s.value,r.value)-l.value),l=O(()=>{const a=r.value.orderedParticipantNames(),C=new jt(a).getFrame(s.value);return C?Kt(C).left:0}),L=C2(null);return e.commit("diagramElement",L),(a,c)=>(S(),B("div",{class:R2(["zenuml sequence-diagram relative box-border text-left overflow-visible px-2.5",N(n)]),ref_key:"diagramRef",ref:L},[R("div",{style:y2({paddingLeft:`${N(l)}px`}),class:"relative container"},[N(i)===N(e3).Dynamic?(S(),B(z2,{key:0},[j(Gt,{leftGap:N(l),context:N(s).head(),renderParticipants:!1,renderLifeLine:!0},null,8,["leftGap","context"]),j(sL,{context:N(s).block(),style:y2({width:`${N(o)}px`})},null,8,["context","style"]),j(Gt,{leftGap:N(l),context:N(s).head(),renderParticipants:!0,renderLifeLine:!1},null,8,["leftGap","context"])],64)):d2("",!0),N(i)===N(e3).Static?(S(),B(z2,{key:1},[j(Gt,{leftGap:N(l),context:N(s).head(),renderParticipants:!0,renderLifeLine:!0},null,8,["leftGap","context"]),j(sL,{context:N(s).block(),style:y2({width:`${N(o)}px`})},null,8,["context","style"])],64)):d2("",!0)],4)],2))}}),wz="",nA={name:"IconList",props:["types"],computed:{},methods:{icon(t){return Ht[t==null?void 0:t.toLowerCase()]}}},iA={role:"list",class:"mt-3 grid grid-cols-4 gap-5 sm:gap-6 sm:grid-cols-6 lg:grid-cols-8"},sA={class:"h-12 flex items-center justify-center bg-gray-50 text-sm font-medium rounded-t-md"},rA=["innerHTML","alt"],oA={class:"flex items-center justify-center border-t border-r border-b border-gray-200 bg-white rounded-b-md"},lA={class:"px-2 py-2 text-xs"},LA={class:"text-gray-900 font-medium hover:text-gray-600"};function aA(t,e,n,i,s,r){return S(),B("ul",iA,[(S(!0),B(z2,null,z3(n.types,o=>(S(),B("li",{key:o,class:"col-span-1 flex flex-col shadow-sm rounded-md"},[R("div",sA,[r.icon?(S(),B("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,rA)):d2("",!0)]),R("div",oA,[R("div",lA,[R("span",LA,"@"+K2(o),1)])])]))),128))])}const cA={name:"TipsDialog",components:{Icon:q4,IconList:Y2(nA,[["render",aA]])},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)}}}},CA={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block"},uA=R("div",{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":"true"},null,-1),hA=R("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"\u200B",-1),dA={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"},fA={class:"bg-white px-4 py-5 border-b border-gray-200 sm:px-6"},gA=R("h3",{class:"text-xl leading-6 font-medium text-gray-900 inline-block"}," ZenUML Tips ",-1),pA=R("span",{class:"sr-only"},"Close menu",-1),mA={class:"relative bg-white pb-32 mt-4 overflow-hidden"},wA={class:"relative"},xA={class:"lg:mx-auto lg:max-w-11/12 lg:px-8"},vA=T8(`<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 Xl(){const t=C2(0),e=C2(0),n=()=>{t.value=document.documentElement.scrollTop,e.value=document.documentElement.scrollLeft};return e1(()=>{n(),document.addEventListener("scroll",n)}),_1(()=>{document.removeEventListener("scroll",n)}),[t,e]}const $t=10,yR=1,Ql=20;function RR(){let t=document.getElementById("zenuml-intersection-detector-container"),e=Array.from(document.getElementsByClassName("zenuml-intersection-detector"));return t&&e.length===$t?{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($t).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 Jl(){const t=C2(0);let e;return e1(()=>{const{detectorContainer:n,detectors:i}=RR(),s=document.documentElement.scrollHeight-Ql,r=document.documentElement.scrollWidth-Ql;n.style.height=s+"px",n.style.width=r+"px";const o=Math.ceil(document.documentElement.scrollHeight/$t),l=[...Array(o+1).keys()].map(L=>L/o);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>yR||L.target===i[0])&&(t.value=L.intersectionRect.top)},{threshold:l}),i.forEach(L=>{e.observe(L)})}),_1(()=>{e.disconnect()}),t}function Vt(t){let e=0,n=t;for(;n;)e+=n.offsetTop,n=n.offsetParent;return e}const w5=/[!@#$%^&*()+-,.?''":{}|<>/\s]/,w7=t=>{const e=C2(!1);function n(l){e.value=l}async function i(l){l.preventDefault(),l.stopPropagation(),n(!0),await x4();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 x4(),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}},AR={class:"flex items-center justify-center"},kR=["contenteditable"],ZR=R("span",null,":",-1),TR=["contenteditable"],SR=X2({__name:"ParticipantLabel",props:{labelText:null,labelPositions:null,assignee:null,assigneePositions:null},setup(t){var f,w;const e=t,n=["Missing Constructor","ZenUML"],{labelText:i,labelPositions:s,assigneePositions:r}=L9(e),o=S1(),l=O(()=>o.state.mode),L=O(()=>o.getters.code),a=O(()=>o.getters.onContentChange||(()=>{}));function c(v){o.dispatch("updateCode",{code:v}),a.value(v)}function C(v){return function(p){var Z;p.preventDefault(),p.stopPropagation();const g=p.target;if(!(g instanceof HTMLElement))return;let m=(Z=g.innerText.trim())!=null?Z:"";if(m===""||m===i.value){g.innerText=i.value;return}if(m.includes(" ")&&(m=m.replace(/\s+/g," ")),w5.test(m)&&(m=m.replace(/"/g,""),m=`"${m}"`,w5.lastIndex=0),!v||v.length===0)return;let _=L.value;for(const E of v){const[k,b]=E;_=_.slice(0,k)+m+_.slice(b)}c(_)}}const u=w7(C((f=s==null?void 0:s.value)!=null?f:[])),h=w7(C((w=r==null?void 0:r.value)!=null?w:[]));return(v,p)=>(S(),B("div",AR,[t.assignee?(S(),B(z2,{key:0},[R("label",{title:"Double click to edit",class:R2(["name leading-4 cursor-text right hover:text-skin-message-hover hover:bg-skin-message-hover",{"py-1 cursor-text":N(h).editing}]),contenteditable:N(h).editing&&N(l)===N(e3).Dynamic,onDblclick:p[0]||(p[0]=(...g)=>N(h).handleDblClick&&N(h).handleDblClick(...g)),onBlur:p[1]||(p[1]=(...g)=>N(h).handleBlur&&N(h).handleBlur(...g)),onKeyup:p[2]||(p[2]=(...g)=>N(h).handleKeyup&&N(h).handleKeyup(...g)),onKeydown:p[3]||(p[3]=(...g)=>N(h).handleKeydown&&N(h).handleKeydown(...g))},K2(t.assignee),43,kR),ZR],64)):d2("",!0),R("label",{title:"Double click to edit",class:R2(["name 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(e3).Dynamic&&n.indexOf(N(i))===-1,onDblclick:p[4]||(p[4]=(...g)=>N(u).handleDblClick&&N(u).handleDblClick(...g)),onBlur:p[5]||(p[5]=(...g)=>N(u).handleBlur&&N(u).handleBlur(...g)),onKeyup:p[6]||(p[6]=(...g)=>N(u).handleKeyup&&N(u).handleKeyup(...g)),onKeydown:p[7]||(p[7]=(...g)=>N(u).handleKeydown&&N(u).handleKeydown(...g))},K2(N(i)),43,TR)]))}}),bR=10,ER={name:"Participant",components:{ParticipantLabel:SR},setup(t){const e=S1(),n=C2(null);if(e.state.mode===e3.Static)return{translate:0,participant:n};const i=O(()=>{const L=e.getters.participants.GetPositions(t.entity.name);return Array.from(L!=null?L:[]).sort((c,C)=>C[0]-c[0])}),s=O(()=>{const L=e.getters.participants.GetAssigneePositions(t.entity.name);return Array.from(L!=null?L:[]).sort((c,C)=>C[0]-c[0])}),r=Jl(),[o]=Xl();return{translate:O(()=>{var u;const L=t.offsetTop2||0;let a=r.value+o.value;r.value>bR&&(e==null?void 0: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?Vt(e==null?void 0:e.state.diagramElement):0;return a<L+C?0:Math.min(a-C,c-Tl)-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===E1},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?Ht.actor:Ht[(t=this.entity.type)==null?void 0:t.toLowerCase()]},backgroundColor(){try{return this.entity.color?this.entity.color&&Cm(this.entity.color):void 0}catch{return}}},methods:{onSelect(){this.$store.commit("onSelect",this.entity.name)},updateFontColor(){if(!this.entity.color){this.color="inherit";return}let t=window.getComputedStyle(this.$refs.participant).getPropertyValue("background-color");if(!t){this.color="inherit";return}let e=cm(t);this.color=e>128?"#000":"#fff"}}},IR=["innerHTML","aria-description"],OR={key:1},FR=["innerHTML","aria-description"],NR={class:"h-5 group flex flex-col justify-center"},DR={key:0,class:"interface leading-4"};function PR(t,e,n,i,s,r){const o=w2("ParticipantLabel");return r.isDefaultStarter?(S(),B("div",{key:0,class:R2(["participant bg-skin-participant shadow-participant border-transparent 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:y2({transform:`translateY(${i.translate}px)`}),onClick:e[0]||(e[0]=(...l)=>r.onSelect&&r.onSelect(...l))},[R("div",{innerHTML:r.icon,class:"text-skin-base bg-skin-participant px-1 absolute rounded left-1/2 transform -translate-x-1/2 h-8 [&>svg]:w-full [&>svg]:h-full","aria-description":`icon for ${n.entity.name}`},null,8,IR)],6)):(S(),B("div",OR,[R("div",{class:R2(["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:y2({backgroundColor:r.backgroundColor,color:s.color,transform:`translateY(${i.translate}px)`}),onClick:e[1]||(e[1]=(...l)=>r.onSelect&&r.onSelect(...l))},[r.icon?(S(),B("div",{key:0,innerHTML:r.icon,class:"text-skin-base bg-skin-participant px-1 absolute rounded left-1/2 transform -translate-x-1/2 -translate-y-full h-8 [&>svg]:w-full [&>svg]:h-full","aria-description":`icon for ${n.entity.name}`},null,8,FR)):d2("",!0),R("div",NR,[r.stereotype?(S(),B("label",DR,"\xAB"+K2(r.stereotype)+"\xBB",1)):d2("",!0),j(o,{labelText:r.labelText,labelPositions:i.labelPositions,assignee:n.entity.assignee,assigneePositions:i.assigneePositions},null,8,["labelText","labelPositions","assignee","assigneePositions"])])],6)]))}const eL=Y2(ER,[["render",PR]]),pz="",x5=G5.child({name:"LifeLine"}),BR={name:"life-line",components:{Participant:eL},props:["entity","context","groupLeft","inGroup","renderParticipants","renderLifeLine"],data:()=>({translateX:0,top:0}),computed:{...I3(["centerOf"]),...y9(["scale"]),debug(){return!!localStorage.zenumlDebug},left(){return this.centerOf(this.entity.name)-8-(this.groupLeft||0)}},mounted(){x5.debug(`LifeLine mounted for ${this.entity.name}`),this.$nextTick(()=>{this.setTop(),x5.debug(`nextTick after updated for ${this.entity.name}`)}),g7.on("participant_set_top",()=>this.$nextTick(()=>this.setTop()))},updated(){x5.debug(`updated for ${this.entity.name}`),this.$nextTick(()=>{this.setTop(),x5.debug(`nextTick after updated for ${this.entity.name}`)})},methods:{onSelect(){this.$store.commit("onSelect",this.entity.name)},setTop(){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&&n.attributes["data-type"].value==="creation"&&i){x5.debug(`First message to ${this.entity.name} is creation`);const s=this.$el.getBoundingClientRect().y,r=n.getBoundingClientRect().y;this.top=(r-s)/this.scale}else this.top=0}}},zR=["id","entity-type"],UR={key:1,class:"line w0 mx-auto flex-grow w-px"};function WR(t,e,n,i,s,r){var l;const o=w2("participant");return S(),B("div",{id:n.entity.name,"entity-type":(l=n.entity.type)==null?void 0:l.toLowerCase(),class:R2(["lifeline absolute flex flex-col mx-2 h-full",{"transform -translate-x-1/2":n.renderParticipants}]),style:y2({paddingTop:t.top+"px",left:r.left+"px"})},[n.renderParticipants?(S(),T2(o,{key:0,entity:n.entity,offsetTop2:t.top},null,8,["entity","offsetTop2"])):d2("",!0),n.renderLifeLine?(S(),B("div",UR)):d2("",!0)],14,zR)}const tL=Y2(BR,[["render",WR],["__scopeId","data-v-25231267"]]),nL=8,HR={name:"lifeline-group",props:["context","renderParticipants","renderLifeLine"],computed:{...I3(["centerOf"]),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,e=Math.max(h7(t,T9.ParticipantName),100);return this.centerOf(t)-e/2-nL},right(){const t=this.entities.slice(0).pop().name,e=Math.max(h7(t,T9.ParticipantName),100);return this.centerOf(t)+e/2+nL},entities(){return p5(this.context).Array()}},components:{LifeLine:tL}},$R={class:"lifeline-group relative flex-grow"};function VR(t,e,n,i,s,r){const o=w2("life-line");return r.entities.length>0?(S(),B("div",{key:0,class:"lifeline-group-container absolute flex flex-col h-full",style:y2({left:`${r.left}px`,width:`${r.right-r.left}px`})},[R("div",{class:R2(["flex flex-col flex-grow",{shadow:!n.renderParticipants,"shadow-slate-500/50":!n.renderParticipants}])},[R("div",$R,[(S(!0),B(z2,null,z3(r.entities,l=>(S(),T2(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))])],2)],4)):d2("",!0)}const GR=Y2(HR,[["render",VR]]),iL=G5.child({name:"LifeLineLayer"}),jR=70,qR=10,KR={name:"life-line-layer",props:["context","renderParticipants","renderLifeLine","leftGap"],setup(){const e=S1(),n=O(()=>e.state.mode);if(n.value===e3.static)return{translate:0,RenderMode:e3,mode:n};const i=Jl(),[s]=Xl();return{translate:O(()=>{var a;let o=i.value+s.value;i.value>qR&&(e==null?void 0: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?Vt(e==null?void 0:e.state.diagramElement):0;return o<=0+L?0:Math.min(o-L,l-jR)-0}),RenderMode:e3,mode:n}},computed:{...I3(["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]===E1?{...Ko,name:E1,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 wl,i=e instanceof xl;return n||i})}},methods:{...no(["increaseGeneration"]),getParticipantEntity(t){return p5(t).First()}},updated(){iL.debug("LifeLineLayer updated")},mounted(){iL.debug("LifeLineLayer mounted")},components:{LifeLine:tL,LifeLineGroup:GR}},YR=["data-participant-names"],XR={class:"z-lifeline-container relative grow"};function QR(t,e,n,i,s,r){const o=w2("life-line"),l=w2("life-line-group");return S(),B("div",{class:"life-line-layer lifeline-layer z-30 absolute h-full flex flex-col top-0","data-participant-names":r.participantNames,style:y2({"min-width":i.mode===i.RenderMode.Dynamic?"200px":"auto",width:`calc(100% - ${n.leftGap}px)`,pointerEvents:n.renderParticipants?"none":"all"})},[R("div",{style:y2({transform:`translateY(${i.translate>0?i.translate-1:i.translate}px)`}),class:"pt-8 after:bg-gradient-to-b after:from-skin-frame after:via-skin-frame after:to-skin-frame/0 after:block after:absolute after:top-0 after:w-full after:h-[72px]"},null,4),R("div",XR,[r.starterOnTheLeft?(S(),T2(o,{key:0,entity:r.starterParticipant,class:"starter",renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["entity","renderParticipants","renderLifeLine"])):d2("",!0),(S(!0),B(z2,null,z3(r.explicitGroupAndParticipants,(L,a)=>(S(),B(z2,null,[L instanceof t.GroupContext?(S(),T2(l,{key:a,context:L,renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["context","renderParticipants","renderLifeLine"])):d2("",!0),L instanceof t.ParticipantContext?(S(),T2(o,{key:a,entity:r.getParticipantEntity(L),renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["entity","renderParticipants","renderLifeLine"])):d2("",!0)],64))),256)),(S(!0),B(z2,null,z3(r.implicitParticipants,L=>(S(),T2(o,{key:L.name,entity:L,renderParticipants:n.renderParticipants,renderLifeLine:n.renderLifeLine},null,8,["entity","renderParticipants","renderLifeLine"]))),128))])],12,YR)}const Gt=Y2(KR,[["render",QR]]),JR={class:"message-layer relative z-30 pt-24 pb-10"},sL=X2({__name:"MessageLayer",props:{context:null},setup(t){const e=J9(()=>Promise.resolve().then(()=>oP)),n=G5.child({name:"MessageLayer"}),i=S1(),s=O(()=>i.getters.centerOf),r=O(()=>i.getters.rootContext),o=O(()=>s.value(l.value)+1),l=O(()=>{const L=d7(r.value);return L.length===0?null:L[0].from||E1});return e1(()=>{n.debug("MessageLayer mounted")}),q0(()=>{n.debug("MessageLayer updated")}),(L,a)=>{const c=w2("block");return S(),B("div",JR,[N(l)?(S(),T2(c,{key:0,context:t.context,style:y2({"padding-left":N(o)+"px"}),origin:N(l)},null,8,["context","style","origin"])):d2("",!0),j(N(e))])}}}),mz="";function x7(t){return[t.Origin()||E1,...p5(t).Names()]}const eA=T.tree.ParseTreeWalker.DEFAULT;class jt extends I{constructor(n){super();s2(this,"_orderedParticipants");s2(this,"frameRoot",null);s2(this,"parents",[]);this._orderedParticipants=n}getLocalParticipants(n){return[n.Origin()||E1,...p5(n).ImplicitArray().map(i=>i.name)]}getLeft(n){const i=x7(n);return this._orderedParticipants.find(s=>i.includes(s))||""}getRight(n){return this._orderedParticipants.slice().reverse().find(i=>x7(n).includes(i))||""}enterFragment(n,i){var r;const s={type:i,left:this.getLeft(n),right:this.getRight(n),children:[]};this.frameRoot||(this.frameRoot=s),this.parents.length>0&&((r=this.parents[this.parents.length-1].children)==null||r.push(s)),this.parents.push(s)}exitFragment(){this.parents.pop()}enterTcf(n){this.enterFragment(n,"tcf")}enterOpt(n){this.enterFragment(n,"opt")}enterPar(n){this.enterFragment(n,"par")}enterAlt(n){this.enterFragment(n,"alt")}enterLoop(n){this.enterFragment(n,"loop")}enterSection(n){this.enterFragment(n,"section")}enterCritical(n){this.enterFragment(n,"critical")}enterRef(n){this.enterFragment(n,"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(n){return n.children.map(i=>{eA.walk(this,i)}),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 Kt(t){return t?{type:t.type,left:Rl*qt(t,"LEFT"),right:Rl*qt(t,"RIGHT")}:{left:0,right:0}}function rL(t,e){const n=e.orderedParticipantNames(),i=x7(t),s=n.find(C=>i.includes(C))||"",r=n.slice().reverse().find(C=>i.includes(C))||"",l=new jt(n).getFrame(t),L=Kt(l),a=tA(t,r,e),c=e.distance(s,r)+e.half(s)+e.half(r);return Math.max(c,Al)+L.left+L.right+a}function tA(t,e,n){const s=d7(t).filter(r=>r.from===r.to).map(r=>n.getMessageWidth(r)-n.distance(r.from||E1,e)-n.half(e));return Math.max.apply(null,[0,...s])}const Yt=X2({__name:"SeqDiagram",setup(t){const e=S1(),n=O(()=>e.state.theme),i=O(()=>e.state.mode),s=O(()=>e.getters.rootContext),r=O(()=>e.getters.coordinates),o=O(()=>rL(s.value,r.value)-l.value),l=O(()=>{const a=r.value.orderedParticipantNames(),C=new jt(a).getFrame(s.value);return C?Kt(C).left:0}),L=C2(null);return e.commit("diagramElement",L),(a,c)=>(S(),B("div",{class:R2(["zenuml sequence-diagram relative box-border text-left overflow-visible px-2.5",N(n)]),ref_key:"diagramRef",ref:L},[R("div",{style:y2({paddingLeft:`${N(l)}px`}),class:"relative z-container"},[N(i)===N(e3).Dynamic?(S(),B(z2,{key:0},[j(Gt,{leftGap:N(l),context:N(s).head(),renderParticipants:!1,renderLifeLine:!0},null,8,["leftGap","context"]),j(sL,{context:N(s).block(),style:y2({width:`${N(o)}px`})},null,8,["context","style"]),j(Gt,{leftGap:N(l),context:N(s).head(),renderParticipants:!0,renderLifeLine:!1},null,8,["leftGap","context"])],64)):d2("",!0),N(i)===N(e3).Static?(S(),B(z2,{key:1},[j(Gt,{leftGap:N(l),context:N(s).head(),renderParticipants:!0,renderLifeLine:!0},null,8,["leftGap","context"]),j(sL,{context:N(s).block(),style:y2({width:`${N(o)}px`})},null,8,["context","style"])],64)):d2("",!0)],4)],2))}}),wz="",nA={name:"IconList",props:["types"],computed:{},methods:{icon(t){return Ht[t==null?void 0:t.toLowerCase()]}}},iA={role:"list",class:"mt-3 grid grid-cols-4 gap-5 sm:gap-6 sm:grid-cols-6 lg:grid-cols-8"},sA={class:"h-12 flex items-center justify-center bg-gray-50 text-sm font-medium rounded-t-md"},rA=["innerHTML","alt"],oA={class:"flex items-center justify-center border-t border-r border-b border-gray-200 bg-white rounded-b-md"},lA={class:"px-2 py-2 text-xs"},LA={class:"text-gray-900 font-medium hover:text-gray-600"};function aA(t,e,n,i,s,r){return S(),B("ul",iA,[(S(!0),B(z2,null,z3(n.types,o=>(S(),B("li",{key:o,class:"col-span-1 flex flex-col shadow-sm rounded-md"},[R("div",sA,[r.icon?(S(),B("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,rA)):d2("",!0)]),R("div",oA,[R("div",lA,[R("span",LA,"@"+K2(o),1)])])]))),128))])}const cA={name:"TipsDialog",components:{Icon:q4,IconList:Y2(nA,[["render",aA]])},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)}}}},CA={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block"},uA=R("div",{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","aria-hidden":"true"},null,-1),hA=R("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"\u200B",-1),dA={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"},fA={class:"bg-white px-4 py-5 border-b border-gray-200 sm:px-6"},gA=R("h3",{class:"text-xl leading-6 font-medium text-gray-900 inline-block"}," ZenUML Tips ",-1),pA=R("span",{class:"sr-only"},"Close menu",-1),mA={class:"relative bg-white pb-32 mt-4 overflow-hidden"},wA={class:"relative"},xA={class:"lg:mx-auto lg:max-w-11/12 lg:px-8"},vA=T8(`<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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as c, c as e, a as o } from "./core.
|
|
1
|
+
import { o as c, c as e, a as o } from "./core.976bd627.js";
|
|
2
2
|
const s = {
|
|
3
3
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4
4
|
viewBox: "0 0 1024 1024"
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
_ as default,
|
|
21
21
|
l as render
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=zoom-in.
|
|
23
|
+
//# sourceMappingURL=zoom-in.af5ed295.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as t, c, a as o } from "./core.
|
|
1
|
+
import { o as t, c, a as o } from "./core.976bd627.js";
|
|
2
2
|
const e = {
|
|
3
3
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4
4
|
viewBox: "0 0 1024 1024"
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
h as default,
|
|
21
21
|
s as render
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=zoom-out.
|
|
23
|
+
//# sourceMappingURL=zoom-out.5ffc2ec1.js.map
|