@zenuml/core 2.0.33 → 2.0.35
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/Integration/vanilla-js/index.html +1 -3
- package/dist/zenuml.esm.mjs +4 -1
- package/dist/zenuml.js +2 -2
- package/package.json +2 -17
- package/pnpm-lock.yaml +40 -2129
- package/vite.config.lib.js +0 -15
|
@@ -6,9 +6,7 @@
|
|
|
6
6
|
<script>
|
|
7
7
|
window.process = {env: 'production'};
|
|
8
8
|
</script>
|
|
9
|
-
<script src="https://unpkg.com/@zenuml/core@2.0.
|
|
10
|
-
<link rel="stylesheet" href="https://unpkg.com/@zenuml/core@2.0.31/dist/style.css" />
|
|
11
|
-
|
|
9
|
+
<script src="https://unpkg.com/@zenuml/core@2.0.33/dist/zenuml.js"></script>
|
|
12
10
|
</head>
|
|
13
11
|
<body class="zenuml">
|
|
14
12
|
<div id="app"></div>
|
package/dist/zenuml.esm.mjs
CHANGED
|
@@ -25786,6 +25786,9 @@ const $C = /* @__PURE__ */ ve(NC, [["render", FC]]), BC = {
|
|
|
25786
25786
|
return this.rootContext || console.error("`rootContext` is empty. Please make sure `store` is properly configured."), (n = this.rootContext) == null ? void 0 : n.title();
|
|
25787
25787
|
}
|
|
25788
25788
|
},
|
|
25789
|
+
mounted() {
|
|
25790
|
+
this.$el.__vue__ = this;
|
|
25791
|
+
},
|
|
25789
25792
|
methods: {
|
|
25790
25793
|
...q1(["setScale"]),
|
|
25791
25794
|
showTipsDialog() {
|
|
@@ -30023,7 +30026,7 @@ class gw {
|
|
|
30023
30026
|
return this._theme;
|
|
30024
30027
|
}
|
|
30025
30028
|
async getPng() {
|
|
30026
|
-
return this.
|
|
30029
|
+
return this.el.children[0].__vue__.toPng();
|
|
30027
30030
|
}
|
|
30028
30031
|
}
|
|
30029
30032
|
const xw = {
|
package/dist/zenuml.js
CHANGED
|
@@ -501,7 +501,7 @@ A.method() {
|
|
|
501
501
|
A.method() {
|
|
502
502
|
@return A->B: message
|
|
503
503
|
}</code></pre></div></div>`,1),g_={class:"px-4 max-w-7xl mx-auto sm:px-6 lg:max-w-none lg:mx-0"},x_=b("h2",{class:"mt-8 mb-4 text-lg leading-6 font-medium text-gray-900"}," Builtin Icons ",-1),m_=b("p",{class:"text-sm text-gray-500"},[pi(" Use "),b("span",{class:"rounded inline-block bg-gray-50 text-gray-600"},[b("code",{class:"text-xs"},"@Actor TheParticipant")]),pi(" to define the type of the participant. ")],-1),L_=b("hr",{class:"mt-4"},null,-1),__=b("hr",{class:"mt-4"},null,-1),y_=b("hr",{class:"mt-4"},null,-1);function C_(n,e,t,s,r,i){const o=ue("IconList");return I(),W("div",s_,[r_,i_,b("div",o_,[b("div",null,[b("div",a_,[l_,b("button",{type:"button",onClick:e[0]||(e[0]=a=>i.closeTipsDialog()),class:"float-right bg-white rounded-md inline-flex items-center justify-center text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-indigo-500"},c_)]),b("div",u_,[b("div",h_,[b("div",f_,[b("div",d_,[p_,b("div",g_,[x_,m_,fe(o,{types:i.standardTypes},null,8,["types"]),L_,fe(o,{types:i.awsServices},null,8,["types"]),__,fe(o,{types:i.azureServices},null,8,["types"]),y_,fe(o,{types:i.googleServices},null,8,["types"])])])])])])])])])}const E_=Ce(n_,[["render",C_]]),cw="",b_={name:"point",props:["fill","rtl"]},$h=n=>(Kt("data-v-ca07199a"),n=n(),Yt(),n),v_={key:0,class:"arrow stroke-2",height:"10",width:"10"},w_=[$h(()=>b("polyline",{class:"right head fill-current stroke-current",points:"0,0 10,5 0,10"},null,-1))],T_={key:1,class:"arrow stroke-2",height:"10",width:"10"},A_=[$h(()=>b("polyline",{class:"left head fill-current stroke-current",points:"10,0 0,5 10,10"},null,-1))];function S_(n,e,t,s,r,i){return I(),W("div",{class:lt(["point text-skin-message-arrow",{fill:t.fill,"no-fill":!t.fill,"right-to-left":t.rtl}])},[t.rtl?ye("",!0):(I(),W("svg",v_,w_)),t.rtl?(I(),W("svg",T_,A_)):ye("",!0)],2)}const R_={name:"message",props:["content","rtl","type","color"],computed:{isAsync:function(){return this.type==="async"},borderStyle(){switch(this.type){case"sync":case"async":return"solid";case"creation":case"return":return"dashed"}return""},fill(){switch(this.type){case"sync":case"async":return!0;case"creation":case"return":return!1}return!1}},components:{Point:Ce(b_,[["render",S_],["__scopeId","data-v-ca07199a"]])}};function k_(n,e,t,s,r,i){const o=ue("point");return I(),W("div",{class:lt(["message border-skin-message-arrow border-b-2 flex items-end",{"flex-row-reverse":t.rtl,return:t.type==="return","right-to-left":t.rtl,"text-left":i.isAsync,"text-center":!i.isAsync}]),style:xe({"border-bottom-style":i.borderStyle})},[b("div",{class:"name flex-grow text-sm truncate hover:whitespace-normal hover:text-skin-message-hover hover:bg-skin-message-hover",style:xe([{color:t.color},{"padding-left":"5px",float:"left"}])},qe(t.content),5),fe(o,{class:"flex-shrink-0 transform translate-y-1/2 -my-px",fill:i.fill,rtl:t.rtl},null,8,["fill","rtl"])],6)}const Sr=Ce(R_,[["render",k_]]),O_={name:"WidthProvider",components:{Message:Sr},data:function(){return{text:"abcd"}},methods:{width:function(n,e){return console.log(n,e),this.text=n,this.$el.clientWidth}},mounted(){this.$store.state.widthProvider=this}},N_={class:"invisible"};function I_(n,e,t,s,r,i){const o=ue("message");return I(),W("div",N_,[fe(o,{content:n.text,rtl:"false",type:"sync"},null,8,["content"])])}const P_=Ce(O_,[["render",I_]]);function M_(n,e){if(n.match(/^[a-z]+:\/\//i))return n;if(n.match(/^\/\//))return window.location.protocol+n;if(n.match(/^[a-z]+:/i))return n;const t=document.implementation.createHTMLDocument(),s=t.createElement("base"),r=t.createElement("a");return t.head.appendChild(s),t.body.appendChild(r),e&&(s.href=e),r.href=n,r.href}const D_=(()=>{let n=0;const e=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(n+=1,`u${e()}${n}`)})();function Sn(n){const e=[];for(let t=0,s=n.length;t<s;t++)e.push(n[t]);return e}function lo(n,e){const s=(n.ownerDocument.defaultView||window).getComputedStyle(n).getPropertyValue(e);return s?parseFloat(s.replace("px","")):0}function F_(n){const e=lo(n,"border-left-width"),t=lo(n,"border-right-width");return n.clientWidth+e+t}function $_(n){const e=lo(n,"border-top-width"),t=lo(n,"border-bottom-width");return n.clientHeight+e+t}function Bh(n,e={}){const t=e.width||F_(n),s=e.height||$_(n);return{width:t,height:s}}function B_(){let n,e;try{e=process}catch{}const t=e&&e.env?e.env.devicePixelRatio:null;return t&&(n=parseInt(t,10),Number.isNaN(n)&&(n=1)),n||window.devicePixelRatio||1}const Tt=16384;function U_(n){(n.width>Tt||n.height>Tt)&&(n.width>Tt&&n.height>Tt?n.width>n.height?(n.height*=Tt/n.width,n.width=Tt):(n.width*=Tt/n.height,n.height=Tt):n.width>Tt?(n.height*=Tt/n.width,n.width=Tt):(n.width*=Tt/n.height,n.height=Tt))}function V_(n,e={}){return n.toBlob?new Promise(t=>{n.toBlob(t,e.type?e.type:"image/png",e.quality?e.quality:1)}):new Promise(t=>{const s=window.atob(n.toDataURL(e.type?e.type:void 0,e.quality?e.quality:void 0).split(",")[1]),r=s.length,i=new Uint8Array(r);for(let o=0;o<r;o+=1)i[o]=s.charCodeAt(o);t(new Blob([i],{type:e.type?e.type:"image/png"}))})}function co(n){return new Promise((e,t)=>{const s=new Image;s.decode=()=>e(s),s.onload=()=>e(s),s.onerror=t,s.crossOrigin="anonymous",s.decoding="async",s.src=n})}async function H_(n){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(n)).then(encodeURIComponent).then(e=>`data:image/svg+xml;charset=utf-8,${e}`)}async function G_(n,e,t){const s="http://www.w3.org/2000/svg",r=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return r.setAttribute("width",`${e}`),r.setAttribute("height",`${t}`),r.setAttribute("viewBox",`0 0 ${e} ${t}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),r.appendChild(i),i.appendChild(n),H_(r)}function j_(n){const e=n.getPropertyValue("content");return`${n.cssText} content: '${e.replace(/'|"/g,"")}';`}function z_(n){return Sn(n).map(e=>{const t=n.getPropertyValue(e),s=n.getPropertyPriority(e);return`${e}: ${t}${s?" !important":""};`}).join(" ")}function Z_(n,e,t){const s=`.${n}:${e}`,r=t.cssText?j_(t):z_(t);return document.createTextNode(`${s}{${r}}`)}function Uh(n,e,t){const s=window.getComputedStyle(n,t),r=s.getPropertyValue("content");if(r===""||r==="none")return;const i=D_();try{e.className=`${e.className} ${i}`}catch{return}const o=document.createElement("style");o.appendChild(Z_(i,t,s)),e.appendChild(o)}function q_(n,e){Uh(n,e,":before"),Uh(n,e,":after")}const Vh="application/font-woff",Hh="image/jpeg",W_={woff:Vh,woff2:Vh,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Hh,jpeg:Hh,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function K_(n){const e=/\.([^./]*?)$/g.exec(n);return e?e[1]:""}function Ya(n){const e=K_(n).toLowerCase();return W_[e]||""}function Y_(n){return n.split(/,/)[1]}function Xa(n){return n.search(/^(data:)/)!==-1}function Gh(n,e){return`data:${e};base64,${n}`}async function jh(n,e,t){const s=await fetch(n,e);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const r=await s.blob();return new Promise((i,o)=>{const a=new FileReader;a.onerror=o,a.onloadend=()=>{try{i(t({res:s,result:a.result}))}catch(l){o(l)}},a.readAsDataURL(r)})}const Qa={};function X_(n,e,t){let s=n.replace(/\?.*/,"");return t&&(s=n),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),e?`[${e}]${s}`:s}async function Ja(n,e,t){const s=X_(n,e,t.includeQueryParams);if(Qa[s]!=null)return Qa[s];t.cacheBust&&(n+=(/\?/.test(n)?"&":"?")+new Date().getTime());let r;try{const i=await jh(n,t.fetchRequestInit,({res:o,result:a})=>(e||(e=o.headers.get("Content-Type")||""),Y_(a)));r=Gh(i,e)}catch(i){r=t.imagePlaceholder||"";let o=`Failed to fetch resource: ${n}`;i&&(o=typeof i=="string"?i:i.message),o&&console.warn(o)}return Qa[s]=r,r}async function Q_(n){const e=n.toDataURL();return e==="data:,"?n.cloneNode(!1):co(e)}async function J_(n,e){if(n.currentSrc){const i=document.createElement("canvas"),o=i.getContext("2d");i.width=n.clientWidth,i.height=n.clientHeight,o==null||o.drawImage(n,0,0,i.width,i.height);const a=i.toDataURL();return co(a)}const t=n.poster,s=Ya(t),r=await Ja(t,s,e);return co(r)}async function ey(n){var e;try{if(!((e=n==null?void 0:n.contentDocument)===null||e===void 0)&&e.body)return await uo(n.contentDocument.body,{},!0)}catch{}return n.cloneNode(!1)}async function ty(n,e){return n instanceof HTMLCanvasElement?Q_(n):n instanceof HTMLVideoElement?J_(n,e):n instanceof HTMLIFrameElement?ey(n):n.cloneNode(!1)}const ny=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SLOT";async function sy(n,e,t){var s;const r=ny(n)&&n.assignedNodes?Sn(n.assignedNodes()):Sn(((s=n.shadowRoot)!==null&&s!==void 0?s:n).childNodes);return r.length===0||n instanceof HTMLVideoElement||await r.reduce((i,o)=>i.then(()=>uo(o,t)).then(a=>{a&&e.appendChild(a)}),Promise.resolve()),e}function ry(n,e){const t=e.style;if(!t)return;const s=window.getComputedStyle(n);s.cssText?(t.cssText=s.cssText,t.transformOrigin=s.transformOrigin):Sn(s).forEach(r=>{let i=s.getPropertyValue(r);r==="font-size"&&i.endsWith("px")&&(i=`${Math.floor(parseFloat(i.substring(0,i.length-2)))-.1}px`),t.setProperty(r,i,s.getPropertyPriority(r))})}function iy(n,e){n instanceof HTMLTextAreaElement&&(e.innerHTML=n.value),n instanceof HTMLInputElement&&e.setAttribute("value",n.value)}function oy(n,e){if(n instanceof HTMLSelectElement){const t=e,s=Array.from(t.children).find(r=>n.value===r.getAttribute("value"));s&&s.setAttribute("selected","")}}function ay(n,e){return e instanceof Element&&(ry(n,e),q_(n,e),iy(n,e),oy(n,e)),e}async function ly(n,e){const t=n.querySelectorAll?n.querySelectorAll("use"):[];if(t.length===0)return n;const s={};for(let i=0;i<t.length;i++){const a=t[i].getAttribute("xlink:href");if(a){const l=n.querySelector(a),c=document.querySelector(a);!l&&c&&!s[a]&&(s[a]=await uo(c,e,!0))}}const r=Object.values(s);if(r.length){const i="http://www.w3.org/1999/xhtml",o=document.createElementNS(i,"svg");o.setAttribute("xmlns",i),o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.overflow="hidden",o.style.display="none";const a=document.createElementNS(i,"defs");o.appendChild(a);for(let l=0;l<r.length;l++)a.appendChild(r[l]);n.appendChild(o)}return n}async function uo(n,e,t){return!t&&e.filter&&!e.filter(n)?null:Promise.resolve(n).then(s=>ty(s,e)).then(s=>sy(n,s,e)).then(s=>ay(n,s)).then(s=>ly(s,e))}const zh=/url\((['"]?)([^'"]+?)\1\)/g,cy=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,uy=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function hy(n){const e=n.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`,"g")}function fy(n){const e=[];return n.replace(zh,(t,s,r)=>(e.push(r),t)),e.filter(t=>!Xa(t))}async function dy(n,e,t,s,r){try{const i=t?M_(e,t):e,o=Ya(e);let a;if(r){const l=await r(i);a=Gh(l,o)}else a=await Ja(i,o,s);return n.replace(hy(e),`$1${a}$3`)}catch{}return n}function py(n,{preferredFontFormat:e}){return e?n.replace(uy,t=>{for(;;){const[s,,r]=cy.exec(t)||[];if(!r)return"";if(r===e)return`src: ${s};`}}):n}function Zh(n){return n.search(zh)!==-1}async function qh(n,e,t){if(!Zh(n))return n;const s=py(n,t);return fy(s).reduce((i,o)=>i.then(a=>dy(a,o,e,t)),Promise.resolve(s))}async function gy(n,e){var t;const s=(t=n.style)===null||t===void 0?void 0:t.getPropertyValue("background");if(s){const r=await qh(s,null,e);n.style.setProperty("background",r,n.style.getPropertyPriority("background"))}}async function xy(n,e){if(!(n instanceof HTMLImageElement&&!Xa(n.src))&&!(n instanceof SVGImageElement&&!Xa(n.href.baseVal)))return;const t=n instanceof HTMLImageElement?n.src:n.href.baseVal,s=await Ja(t,Ya(t),e);await new Promise((r,i)=>{n.onload=r,n.onerror=i;const o=n;o.decode&&(o.decode=r),n instanceof HTMLImageElement?(n.srcset="",n.src=s):n.href.baseVal=s})}async function my(n,e){const s=Sn(n.childNodes).map(r=>Wh(r,e));await Promise.all(s).then(()=>n)}async function Wh(n,e){n instanceof Element&&(await gy(n,e),await xy(n,e),await my(n,e))}function Ly(n,e){const{style:t}=n;e.backgroundColor&&(t.backgroundColor=e.backgroundColor),e.width&&(t.width=`${e.width}px`),e.height&&(t.height=`${e.height}px`);const s=e.style;return s!=null&&Object.keys(s).forEach(r=>{t[r]=s[r]}),n}const Kh={};async function Yh(n){let e=Kh[n];if(e!=null)return e;const s=await(await fetch(n)).text();return e={url:n,cssText:s},Kh[n]=e,e}async function Xh(n,e){let t=n.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(t.match(/url\([^)]+\)/g)||[]).map(async o=>{let a=o.replace(s,"$1");return a.startsWith("https://")||(a=new URL(a,n.url).href),jh(a,e.fetchRequestInit,({result:l})=>(t=t.replace(o,`url(${l})`),[o,l]))});return Promise.all(i).then(()=>t)}function Qh(n){if(n==null)return[];const e=[],t=/(\/\*[\s\S]*?\*\/)/gi;let s=n.replace(t,"");const r=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const l=r.exec(s);if(l===null)break;e.push(l[0])}s=s.replace(r,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",a=new RegExp(o,"gi");for(;;){let l=i.exec(s);if(l===null){if(l=a.exec(s),l===null)break;i.lastIndex=a.lastIndex}else a.lastIndex=i.lastIndex;e.push(l[0])}return e}async function _y(n,e){const t=[],s=[];return n.forEach(r=>{if("cssRules"in r)try{Sn(r.cssRules||[]).forEach((i,o)=>{if(i.type===CSSRule.IMPORT_RULE){let a=o+1;const l=i.href,c=Yh(l).then(u=>Xh(u,e)).then(u=>Qh(u).forEach(f=>{try{r.insertRule(f,f.startsWith("@import")?a+=1:r.cssRules.length)}catch(p){console.error("Error inserting rule from remote css",{rule:f,error:p})}})).catch(u=>{console.error("Error loading remote css",u.toString())});s.push(c)}})}catch(i){const o=n.find(a=>a.href==null)||document.styleSheets[0];r.href!=null&&s.push(Yh(r.href).then(a=>Xh(a,e)).then(a=>Qh(a).forEach(l=>{o.insertRule(l,r.cssRules.length)})).catch(a=>{console.error("Error loading remote stylesheet",a.toString())})),console.error("Error inlining remote css file",i.toString())}}),Promise.all(s).then(()=>(n.forEach(r=>{if("cssRules"in r)try{Sn(r.cssRules||[]).forEach(i=>{t.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${r.href}`,i.toString())}}),t))}function yy(n){return n.filter(e=>e.type===CSSRule.FONT_FACE_RULE).filter(e=>Zh(e.style.getPropertyValue("src")))}async function Cy(n,e){if(n.ownerDocument==null)throw new Error("Provided element is not within a Document");const t=Sn(n.ownerDocument.styleSheets),s=await _y(t,e);return yy(s)}async function Ey(n,e){const t=await Cy(n,e);return(await Promise.all(t.map(r=>{const i=r.parentStyleSheet?r.parentStyleSheet.href:null;return qh(r.cssText,i,e)}))).join(`
|
|
504
|
-
`)}async function by(n,e){const t=e.fontEmbedCSS!=null?e.fontEmbedCSS:e.skipFonts?null:await Ey(n,e);if(t){const s=document.createElement("style"),r=document.createTextNode(t);s.appendChild(r),n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s)}}async function Jh(n,e={}){const{width:t,height:s}=Bh(n,e),r=await uo(n,e,!0);return await by(r,e),await Wh(r,e),Ly(r,e),await G_(r,t,s)}async function el(n,e={}){const{width:t,height:s}=Bh(n,e),r=await Jh(n,e),i=await co(r),o=document.createElement("canvas"),a=o.getContext("2d"),l=e.pixelRatio||B_(),c=e.canvasWidth||t,u=e.canvasHeight||s;return o.width=c*l,o.height=u*l,e.skipAutoScale||U_(o),o.style.width=`${c}`,o.style.height=`${u}`,e.backgroundColor&&(a.fillStyle=e.backgroundColor,a.fillRect(0,0,o.width,o.height)),a.drawImage(i,0,0,o.width,o.height),o}async function vy(n,e={}){return(await el(n,e)).toDataURL()}async function wy(n,e={}){return(await el(n,e)).toDataURL("image/jpeg",e.quality||1)}async function Ty(n,e={}){const t=await el(n,e);return await V_(t)}const Ay="process.env.VUE_APP_GIT_HASH",Sy="process.env.VUE_APP_GIT_BRANCH",Ry={name:"Debug",data(){return{commitHash:Ay,gitBranch:Sy}},computed:{debug(){return!!localStorage.zenumlDebug}}},ky={class:"flex flex-nowrap m-2 text-sm"},Oy={class:"ml-4 text-xs inline-flex items-center font-bold leading-sm px-3 py-1 bg-green-200 text-green-700 rounded-sm"},Ny=Wc('<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="6" y1="3" x2="6" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path></svg>',1),Iy={class:"inline-block px-2"};function Py(n,e,t,s,r,i){return Dd((I(),W("div",null,[b("div",ky,[b("div",Oy,[Ny,b("span",Iy,qe(r.gitBranch)+":"+qe(r.commitHash),1)])])],512)),[[K3,i.debug]])}const My=Ce(Ry,[["render",Py]]),Dy={name:"DiagramFrame",computed:{...L1(["showTips","scale","theme"]),...Ct(["rootContext"]),title(){var n;return this.rootContext||console.error("`rootContext` is empty. Please make sure `store` is properly configured."),(n=this.rootContext)==null?void 0:n.title()}},methods:{..._1(["setScale"]),showTipsDialog(){var n;this.$store.state.showTips=!0;try{(n=this.$gtag)==null||n.event("view",{event_category:"help",event_label:"tips dialog"})}catch(e){console.error(e)}},toPng(){return vy(this.$refs.export,{backgroundColor:"white",filter:n=>{var e;return!((e=n==null?void 0:n.classList)!=null&&e.contains("hide-export"))}})},toSvg(){return Jh(this.$refs.export,{backgroundColor:"white",filter:n=>{var e;return!((e=n==null?void 0:n.classList)!=null&&e.contains("hide-export"))}})},toBlob(){return Ty(this.$refs.export,{backgroundColor:"white",filter:n=>{var e;return!((e=n==null?void 0:n.classList)!=null&&e.contains("hide-export"))}})},toJpeg(){return wy(this.$refs.export,{backgroundColor:"white",filter:n=>{var e;return!((e=n==null?void 0:n.classList)!=null&&e.contains("hide-export"))}})},zoomIn(){this.setScale(this.scale+.1)},zoomOut(){this.setScale(this.scale-.1)},setTheme(n){this.theme=n},setStyle(n){const e="zenuml-style";let t=document.getElementById(e);t||(t=document.createElement("style"),t.id=e,document.head.append(t)),t.textContent=n},setRemoteCss(n){const e=new URL(n).hostname;if(e==="https://github.com"||e==="https://githubusercontent.com"){fetch(n.replace("github.com","raw.githubusercontent.com").replace("blob/","")).then(r=>r.text()).then(r=>{this.setStyle(r)});return}const t="zenuml-remote-css";let s=document.getElementById(t);s||(s=document.createElement("link"),s.id=t,s.rel="stylesheet",document.head.append(s)),s.href=n}},components:{Debug:My,WidthProvider:P_,TipsDialog:E_,DiagramTitle:eL,SeqDiagram:Ka,Privacy:Ym}},Fy={ref:"content"},$y={class:"header text-skin-title bg-skin-title border-skin-frame border-b p-1 flex justify-between rounded-t"},By={class:"left hide-export"},Uy={class:"right flex-grow flex justify-between"},Vy={key:0,class:"fixed z-40 inset-0 overflow-y-auto","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true"},Hy={class:"footer p-1 flex justify-between"},Gy={class:"filter grayscale",style:{width:"1em",height:"1em","vertical-align":"middle",fill:"currentColor",overflow:"hidden"},viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},jy=[b("path",{d:"M514 912c-219.9 0-398.8-178.9-398.8-398.9 0-219.9 178.9-398.8 398.8-398.8s398.9 178.9 398.9 398.8c-0.1 220-179 398.9-398.9 398.9z m0-701.5c-166.9 0-302.7 135.8-302.7 302.7S347.1 815.9 514 815.9s302.7-135.8 302.7-302.7S680.9 210.5 514 210.5z",fill:"#BDD2EF"},null,-1),b("path",{d:"M431.1 502.4c-0.1 0.3 0.3 0.4 0.4 0.2 6.9-11.7 56.5-89.1 23.4 167.3-17.4 134.7 122.9 153.6 142.3-7.9 0.1-1-1.3-1.4-1.7-0.4-11.9 37.2-49.6 104.9-4.7-155.2 18.6-107.2-127.6-146-159.7-4z",fill:"#2867CE"},null,-1),b("path",{d:"M541.3 328m-68 0a68 68 0 1 0 136 0 68 68 0 1 0-136 0Z",fill:"#2867CE"},null,-1)],zy=b("a",{target:"_blank",href:"https://zenuml.com",class:"brand text-skin-link absolute bottom-1 right-1 text-xs"},"ZenUML.com",-1);function Zy(n,e,t,s,r,i){const o=ue("debug"),a=ue("diagram-title"),l=ue("privacy"),c=ue("TipsDialog"),u=ue("seq-diagram"),f=ue("width-provider");return I(),W("div",{ref:"export",class:lt(["zenuml p-1 bg-skin-canvas",n.theme]),style:{display:"inline-block"}},[fe(o),b("div",{class:"frame text-skin-frame bg-skin-frame border-skin-frame relative m-1 origin-top-left whitespace-nowrap border rounded",style:xe({transform:`scale(${n.scale})`})},[b("div",Fy,[b("div",$y,[b("div",By,[Fd(n.$slots,"default")]),b("div",Uy,[fe(a,{context:i.title},null,8,["context"]),fe(l,{class:"hide-export flex items-center"})])]),b("div",null,[n.showTips?(I(),W("div",Vy,[fe(c)])):ye("",!0)]),fe(u,{ref:"diagram"},null,512)],512),b("div",Hy,[b("button",{class:"bottom-1 left-1 hide-export",onClick:e[0]||(e[0]=p=>i.showTipsDialog())},[(I(),W("svg",Gy,jy))]),b("div",{class:"zoom-controls bg-skin-base text-skin-control flex justify-between w-28 hide-export",style:xe({transform:`scale(${1/n.scale})`})},[b("button",{class:"zoom-in px-1",onClick:e[1]||(e[1]=p=>i.zoomIn())},"+"),b("label",null,qe(Number(n.scale*100).toFixed(0))+" %",1),b("button",{class:"zoom-out px-1",onClick:e[2]||(e[2]=p=>i.zoomOut())},"-")],4),fe(f),zy])],4)],2)}const e2=Ce(Dy,[["render",Zy]]),xw="",mw="",Lw="",_w="",yw="",Cw="",Ew="";function t2(){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 Ds=t2();function qy(n){Ds=n}const Wy=/[&<>"']/,Ky=/[&<>"']/g,Yy=/[<>"']|&(?!#?\w+;)/,Xy=/[<>"']|&(?!#?\w+;)/g,Qy={"&":"&","<":"<",">":">",'"':""","'":"'"},n2=n=>Qy[n];function Ke(n,e){if(e){if(Wy.test(n))return n.replace(Ky,n2)}else if(Yy.test(n))return n.replace(Xy,n2);return n}const Jy=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s2(n){return n.replace(Jy,(e,t)=>(t=t.toLowerCase(),t==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const eC=/(^|[^\[])\^/g;function Oe(n,e){n=n.source||n,e=e||"";const t={replace:(s,r)=>(r=r.source||r,r=r.replace(eC,"$1"),n=n.replace(s,r),t),getRegex:()=>new RegExp(n,e)};return t}const tC=/[^\w:]/g,nC=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function r2(n,e,t){if(n){let s;try{s=decodeURIComponent(s2(t)).replace(tC,"").toLowerCase()}catch{return null}if(s.indexOf("javascript:")===0||s.indexOf("vbscript:")===0||s.indexOf("data:")===0)return null}e&&!nC.test(t)&&(t=oC(e,t));try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const ho={},sC=/^[^:]+:\/*[^/]*$/,rC=/^([^:]+:)[\s\S]*$/,iC=/^([^:]+:\/*[^/]*)[\s\S]*$/;function oC(n,e){ho[" "+n]||(sC.test(n)?ho[" "+n]=n+"/":ho[" "+n]=po(n,"/",!0)),n=ho[" "+n];const t=n.indexOf(":")===-1;return e.substring(0,2)==="//"?t?e:n.replace(rC,"$1")+e:e.charAt(0)==="/"?t?e:n.replace(iC,"$1")+e:n+e}const fo={exec:function(){}};function Vt(n){let e=1,t,s;for(;e<arguments.length;e++){t=arguments[e];for(s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[s]=t[s])}return n}function i2(n,e){const t=n.replace(/\|/g,(i,o,a)=>{let l=!1,c=o;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),s=t.split(/ \|/);let r=0;if(s[0].trim()||s.shift(),s[s.length-1].trim()||s.pop(),s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(/\\\|/g,"|");return s}function po(n,e,t){const s=n.length;if(s===0)return"";let r=0;for(;r<s;){const i=n.charAt(s-r-1);if(i===e&&!t)r++;else if(i!==e&&t)r++;else break}return n.substr(0,s-r)}function aC(n,e){if(n.indexOf(e[1])===-1)return-1;const t=n.length;let s=0,r=0;for(;r<t;r++)if(n[r]==="\\")r++;else if(n[r]===e[0])s++;else if(n[r]===e[1]&&(s--,s<0))return r;return-1}function o2(n){n&&n.sanitize&&!n.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 a2(n,e){if(e<1)return"";let t="";for(;e>1;)e&1&&(t+=n),e>>=1,n+=n;return t+n}function l2(n,e,t,s){const r=e.href,i=e.title?Ke(e.title):null,o=n[1].replace(/\\([\[\]])/g,"$1");if(n[0].charAt(0)!=="!"){s.state.inLink=!0;const a={type:"link",raw:t,href:r,title:i,text:o,tokens:s.inlineTokens(o,[])};return s.state.inLink=!1,a}else return{type:"image",raw:t,href:r,title:i,text:Ke(o)}}function lC(n,e){const t=n.match(/^(\s+)(?:```)/);if(t===null)return e;const s=t[1];return e.split(`
|
|
504
|
+
`)}async function by(n,e){const t=e.fontEmbedCSS!=null?e.fontEmbedCSS:e.skipFonts?null:await Ey(n,e);if(t){const s=document.createElement("style"),r=document.createTextNode(t);s.appendChild(r),n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s)}}async function Jh(n,e={}){const{width:t,height:s}=Bh(n,e),r=await uo(n,e,!0);return await by(r,e),await Wh(r,e),Ly(r,e),await G_(r,t,s)}async function el(n,e={}){const{width:t,height:s}=Bh(n,e),r=await Jh(n,e),i=await co(r),o=document.createElement("canvas"),a=o.getContext("2d"),l=e.pixelRatio||B_(),c=e.canvasWidth||t,u=e.canvasHeight||s;return o.width=c*l,o.height=u*l,e.skipAutoScale||U_(o),o.style.width=`${c}`,o.style.height=`${u}`,e.backgroundColor&&(a.fillStyle=e.backgroundColor,a.fillRect(0,0,o.width,o.height)),a.drawImage(i,0,0,o.width,o.height),o}async function vy(n,e={}){return(await el(n,e)).toDataURL()}async function wy(n,e={}){return(await el(n,e)).toDataURL("image/jpeg",e.quality||1)}async function Ty(n,e={}){const t=await el(n,e);return await V_(t)}const Ay="process.env.VUE_APP_GIT_HASH",Sy="process.env.VUE_APP_GIT_BRANCH",Ry={name:"Debug",data(){return{commitHash:Ay,gitBranch:Sy}},computed:{debug(){return!!localStorage.zenumlDebug}}},ky={class:"flex flex-nowrap m-2 text-sm"},Oy={class:"ml-4 text-xs inline-flex items-center font-bold leading-sm px-3 py-1 bg-green-200 text-green-700 rounded-sm"},Ny=Wc('<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="6" y1="3" x2="6" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path></svg>',1),Iy={class:"inline-block px-2"};function Py(n,e,t,s,r,i){return Dd((I(),W("div",null,[b("div",ky,[b("div",Oy,[Ny,b("span",Iy,qe(r.gitBranch)+":"+qe(r.commitHash),1)])])],512)),[[K3,i.debug]])}const My=Ce(Ry,[["render",Py]]),Dy={name:"DiagramFrame",computed:{...L1(["showTips","scale","theme"]),...Ct(["rootContext"]),title(){var n;return this.rootContext||console.error("`rootContext` is empty. Please make sure `store` is properly configured."),(n=this.rootContext)==null?void 0:n.title()}},mounted(){this.$el.__vue__=this},methods:{..._1(["setScale"]),showTipsDialog(){var n;this.$store.state.showTips=!0;try{(n=this.$gtag)==null||n.event("view",{event_category:"help",event_label:"tips dialog"})}catch(e){console.error(e)}},toPng(){return vy(this.$refs.export,{backgroundColor:"white",filter:n=>{var e;return!((e=n==null?void 0:n.classList)!=null&&e.contains("hide-export"))}})},toSvg(){return Jh(this.$refs.export,{backgroundColor:"white",filter:n=>{var e;return!((e=n==null?void 0:n.classList)!=null&&e.contains("hide-export"))}})},toBlob(){return Ty(this.$refs.export,{backgroundColor:"white",filter:n=>{var e;return!((e=n==null?void 0:n.classList)!=null&&e.contains("hide-export"))}})},toJpeg(){return wy(this.$refs.export,{backgroundColor:"white",filter:n=>{var e;return!((e=n==null?void 0:n.classList)!=null&&e.contains("hide-export"))}})},zoomIn(){this.setScale(this.scale+.1)},zoomOut(){this.setScale(this.scale-.1)},setTheme(n){this.theme=n},setStyle(n){const e="zenuml-style";let t=document.getElementById(e);t||(t=document.createElement("style"),t.id=e,document.head.append(t)),t.textContent=n},setRemoteCss(n){const e=new URL(n).hostname;if(e==="https://github.com"||e==="https://githubusercontent.com"){fetch(n.replace("github.com","raw.githubusercontent.com").replace("blob/","")).then(r=>r.text()).then(r=>{this.setStyle(r)});return}const t="zenuml-remote-css";let s=document.getElementById(t);s||(s=document.createElement("link"),s.id=t,s.rel="stylesheet",document.head.append(s)),s.href=n}},components:{Debug:My,WidthProvider:P_,TipsDialog:E_,DiagramTitle:eL,SeqDiagram:Ka,Privacy:Ym}},Fy={ref:"content"},$y={class:"header text-skin-title bg-skin-title border-skin-frame border-b p-1 flex justify-between rounded-t"},By={class:"left hide-export"},Uy={class:"right flex-grow flex justify-between"},Vy={key:0,class:"fixed z-40 inset-0 overflow-y-auto","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true"},Hy={class:"footer p-1 flex justify-between"},Gy={class:"filter grayscale",style:{width:"1em",height:"1em","vertical-align":"middle",fill:"currentColor",overflow:"hidden"},viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},jy=[b("path",{d:"M514 912c-219.9 0-398.8-178.9-398.8-398.9 0-219.9 178.9-398.8 398.8-398.8s398.9 178.9 398.9 398.8c-0.1 220-179 398.9-398.9 398.9z m0-701.5c-166.9 0-302.7 135.8-302.7 302.7S347.1 815.9 514 815.9s302.7-135.8 302.7-302.7S680.9 210.5 514 210.5z",fill:"#BDD2EF"},null,-1),b("path",{d:"M431.1 502.4c-0.1 0.3 0.3 0.4 0.4 0.2 6.9-11.7 56.5-89.1 23.4 167.3-17.4 134.7 122.9 153.6 142.3-7.9 0.1-1-1.3-1.4-1.7-0.4-11.9 37.2-49.6 104.9-4.7-155.2 18.6-107.2-127.6-146-159.7-4z",fill:"#2867CE"},null,-1),b("path",{d:"M541.3 328m-68 0a68 68 0 1 0 136 0 68 68 0 1 0-136 0Z",fill:"#2867CE"},null,-1)],zy=b("a",{target:"_blank",href:"https://zenuml.com",class:"brand text-skin-link absolute bottom-1 right-1 text-xs"},"ZenUML.com",-1);function Zy(n,e,t,s,r,i){const o=ue("debug"),a=ue("diagram-title"),l=ue("privacy"),c=ue("TipsDialog"),u=ue("seq-diagram"),f=ue("width-provider");return I(),W("div",{ref:"export",class:lt(["zenuml p-1 bg-skin-canvas",n.theme]),style:{display:"inline-block"}},[fe(o),b("div",{class:"frame text-skin-frame bg-skin-frame border-skin-frame relative m-1 origin-top-left whitespace-nowrap border rounded",style:xe({transform:`scale(${n.scale})`})},[b("div",Fy,[b("div",$y,[b("div",By,[Fd(n.$slots,"default")]),b("div",Uy,[fe(a,{context:i.title},null,8,["context"]),fe(l,{class:"hide-export flex items-center"})])]),b("div",null,[n.showTips?(I(),W("div",Vy,[fe(c)])):ye("",!0)]),fe(u,{ref:"diagram"},null,512)],512),b("div",Hy,[b("button",{class:"bottom-1 left-1 hide-export",onClick:e[0]||(e[0]=p=>i.showTipsDialog())},[(I(),W("svg",Gy,jy))]),b("div",{class:"zoom-controls bg-skin-base text-skin-control flex justify-between w-28 hide-export",style:xe({transform:`scale(${1/n.scale})`})},[b("button",{class:"zoom-in px-1",onClick:e[1]||(e[1]=p=>i.zoomIn())},"+"),b("label",null,qe(Number(n.scale*100).toFixed(0))+" %",1),b("button",{class:"zoom-out px-1",onClick:e[2]||(e[2]=p=>i.zoomOut())},"-")],4),fe(f),zy])],4)],2)}const e2=Ce(Dy,[["render",Zy]]),xw="",mw="",Lw="",_w="",yw="",Cw="",Ew="";function t2(){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 Ds=t2();function qy(n){Ds=n}const Wy=/[&<>"']/,Ky=/[&<>"']/g,Yy=/[<>"']|&(?!#?\w+;)/,Xy=/[<>"']|&(?!#?\w+;)/g,Qy={"&":"&","<":"<",">":">",'"':""","'":"'"},n2=n=>Qy[n];function Ke(n,e){if(e){if(Wy.test(n))return n.replace(Ky,n2)}else if(Yy.test(n))return n.replace(Xy,n2);return n}const Jy=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function s2(n){return n.replace(Jy,(e,t)=>(t=t.toLowerCase(),t==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const eC=/(^|[^\[])\^/g;function Oe(n,e){n=n.source||n,e=e||"";const t={replace:(s,r)=>(r=r.source||r,r=r.replace(eC,"$1"),n=n.replace(s,r),t),getRegex:()=>new RegExp(n,e)};return t}const tC=/[^\w:]/g,nC=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function r2(n,e,t){if(n){let s;try{s=decodeURIComponent(s2(t)).replace(tC,"").toLowerCase()}catch{return null}if(s.indexOf("javascript:")===0||s.indexOf("vbscript:")===0||s.indexOf("data:")===0)return null}e&&!nC.test(t)&&(t=oC(e,t));try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const ho={},sC=/^[^:]+:\/*[^/]*$/,rC=/^([^:]+:)[\s\S]*$/,iC=/^([^:]+:\/*[^/]*)[\s\S]*$/;function oC(n,e){ho[" "+n]||(sC.test(n)?ho[" "+n]=n+"/":ho[" "+n]=po(n,"/",!0)),n=ho[" "+n];const t=n.indexOf(":")===-1;return e.substring(0,2)==="//"?t?e:n.replace(rC,"$1")+e:e.charAt(0)==="/"?t?e:n.replace(iC,"$1")+e:n+e}const fo={exec:function(){}};function Vt(n){let e=1,t,s;for(;e<arguments.length;e++){t=arguments[e];for(s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[s]=t[s])}return n}function i2(n,e){const t=n.replace(/\|/g,(i,o,a)=>{let l=!1,c=o;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),s=t.split(/ \|/);let r=0;if(s[0].trim()||s.shift(),s[s.length-1].trim()||s.pop(),s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(/\\\|/g,"|");return s}function po(n,e,t){const s=n.length;if(s===0)return"";let r=0;for(;r<s;){const i=n.charAt(s-r-1);if(i===e&&!t)r++;else if(i!==e&&t)r++;else break}return n.substr(0,s-r)}function aC(n,e){if(n.indexOf(e[1])===-1)return-1;const t=n.length;let s=0,r=0;for(;r<t;r++)if(n[r]==="\\")r++;else if(n[r]===e[0])s++;else if(n[r]===e[1]&&(s--,s<0))return r;return-1}function o2(n){n&&n.sanitize&&!n.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 a2(n,e){if(e<1)return"";let t="";for(;e>1;)e&1&&(t+=n),e>>=1,n+=n;return t+n}function l2(n,e,t,s){const r=e.href,i=e.title?Ke(e.title):null,o=n[1].replace(/\\([\[\]])/g,"$1");if(n[0].charAt(0)!=="!"){s.state.inLink=!0;const a={type:"link",raw:t,href:r,title:i,text:o,tokens:s.inlineTokens(o,[])};return s.state.inLink=!1,a}else return{type:"image",raw:t,href:r,title:i,text:Ke(o)}}function lC(n,e){const t=n.match(/^(\s+)(?:```)/);if(t===null)return e;const s=t[1];return e.split(`
|
|
505
505
|
`).map(r=>{const i=r.match(/^\s+/);if(i===null)return r;const[o]=i;return o.length>=s.length?r.slice(s.length):r}).join(`
|
|
506
506
|
`)}class tl{constructor(e){this.options=e||Ds}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const s=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?s:po(s,`
|
|
507
507
|
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const s=t[0],r=lC(s,t[3]||"");return{type:"code",raw:s,lang:t[2]?t[2].trim():t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let s=t[2].trim();if(/#$/.test(s)){const i=po(s,"#");(this.options.pedantic||!i||/ $/.test(i))&&(s=i.trim())}const r={type:"heading",raw:t[0],depth:t[1].length,text:s,tokens:[]};return this.lexer.inline(r.text,r.tokens),r}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const s=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(s,[]),text:s}}}list(e){let t=this.rules.block.list.exec(e);if(t){let s,r,i,o,a,l,c,u,f,p,g,T,A=t[1].trim();const Y=A.length>1,q={type:"list",raw:"",ordered:Y,start:Y?+A.slice(0,-1):"",loose:!1,items:[]};A=Y?`\\d{1,9}\\${A.slice(-1)}`:`\\${A}`,this.options.pedantic&&(A=Y?A:"[*+-]");const K=new RegExp(`^( {0,3}${A})((?: [^\\n]*)?(?:\\n|$))`);for(;e&&(T=!1,!(!(t=K.exec(e))||this.rules.block.hr.test(e)));){if(s=t[0],e=e.substring(s.length),u=t[2].split(`
|
|
@@ -558,5 +558,5 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Mt=w,Se=j);const At={c
|
|
|
558
558
|
</code>
|
|
559
559
|
`:`<code>${n}</code>`}};Q.setOptions({highlight:function(n,e){if(!e)return as.highlightAuto(n).value;const t=as.getLanguage(e)?e:"plaintext";return as.highlight(t,n).value},breaks:!0}),Q.use({renderer:LE});const _E={name:"comment",props:["comment","commentObj"],computed:{markedComment(){var n,e;return((n=this.commentObj)==null?void 0:n.text)&&Q.parse((e=this.commentObj)==null?void 0:e.text)||this.comment&&Q.parse(this.comment)},color(){var n;return(n=this.commentObj)==null?void 0:n.color}}},yE=["innerHTML"];function CE(n,e,t,s,r,i){return I(),W("div",{class:"comments text-skin-comment min-w-[100px] flex justify-around text-left text-sm opacity-50 hover:opacity-100",style:xe({color:i.color})},[b("div",{innerHTML:i.markedComment},null,8,yE)],4)}const Or=Ce(_E,[["render",CE],["__scopeId","data-v-15224042"]]),Tw="",Aw="",EE={name:"occurrence",props:["context","selfCallIndent","participant","rtl"],data:function(){return{center:0}},computed:{...Ct(["centerOf","messageLayerLeft"]),...L1(["code"]),computedCenter:function(){try{return this.centerOf(this.participant)}catch(n){return console.error(n),0}}}},bE=["data-belongs-to","data-x-offset","data-debug-center-of"];function vE(n,e,t,s,r,i){const o=ue("block");return I(),W("div",{class:lt(["occurrence border-skin-occurrence bg-skin-occurrence rounded-sm border-2 relative left-full",{"right-to-left":t.rtl}]),"data-el-type":"occurrence","data-belongs-to":t.participant,"data-x-offset":n.center,"data-debug-center-of":i.computedCenter},[this.context.braceBlock()?(I(),Re(o,{key:0,context:t.context.braceBlock().block(),selfCallIndent:t.selfCallIndent},null,8,["context","selfCallIndent"])):ye("",!0)],10,bE)}const S2=Ce(EE,[["render",vE],["__scopeId","data-v-054f42d1"]]);class $s{constructor(e,t,s,r){U(this,"start");U(this,"stop");this.start={line:e,col:t},this.stop={line:s,col:r}}static from(e){const t=e.start,s=e.stop;return new $s(t.line,t.column,s.line,s.column+s.text.length)}}const R2=Hs.child({name:"Creation"}),wE={name:"creation",props:["context","comment","selfCallIndent"],computed:{...Ct(["cursor","onElementClick","distance"]),from(){return this.context.Origin()},creation(){return this.context.creation()},interactionWidth(){let n=Math.abs(this.distance(this.to,this.from)),e=this.selfCallIndent||0;return n+(this.rightToLeft?e:-e)},rightToLeft(){return this.distance(this.to,this.from)<0},signature(){return this.creation.SignatureText()},assignee(){function n(r){return r&&r.getFormattedText()||""}let e=this.creation.creationBody().assignment();if(!e)return"";let t=n(e.assignee());const s=n(e.type());return t+(s?":"+s:"")},to(){return this.creation.Owner()},isCurrent(){return this.creation.isCurrent(this.cursor)}},mounted(){this.layoutMessageContainer(),R2.log(`mounted for ${this.to}`)},updated(){this.layoutMessageContainer(),R2.debug(`mounted for ${this.to}`)},methods:{layoutMessageContainer(){(()=>{if(!this.$refs.participantPlaceHolder||!this.$refs.messageContainer)return;const e=this.$refs.participantPlaceHolder.offsetWidth/2;this.$refs.messageContainer.style.width=`calc(100% + ${e+6}px`,this.rightToLeft&&(this.$refs.messageContainer.style.transform=`translateX( ${-(e+6)}px`)})()},onClick(){this.onElementClick($s.from(this.context))}},components:{Participant:Ih,Comment:Or,Occurrence:S2,Message:Sr}},TE=["data-signature"],AE=["data-to"],SE={ref:"participantPlaceHolder",class:"invisible right-0 flex flex-col justify-center flex-shrink-0"};function RE(n,e,t,s,r,i){const o=ue("comment"),a=ue("message"),l=ue("participant"),c=ue("occurrence");return I(),W("div",{class:lt(["interaction creation sync text-center transform",{"right-to-left":i.rightToLeft,"-translate-x-full":i.rightToLeft,highlight:i.isCurrent}]),onClick:e[0]||(e[0]=mi((...u)=>i.onClick&&i.onClick(...u),["stop"])),"data-signature":i.signature,style:xe({width:i.interactionWidth+"px"})},[t.comment?(I(),Re(o,{key:0,comment:t.comment},null,8,["comment"])):ye("",!0),b("div",{ref:"messageContainer",class:lt(["message-container pointer-events-none flex items-center h-10",{"flex-row-reverse":i.rightToLeft}]),"data-type":"creation","data-to":i.to},[fe(a,{ref:"messageEl",class:"invocation w-full transform -translate-y-1/2 pointer-events-auto",content:i.signature,rtl:i.rightToLeft,type:"creation"},null,8,["content","rtl"]),b("div",SE,[fe(l,{entity:{name:i.to}},null,8,["entity"])],512)],10,AE),fe(c,{context:i.creation,class:"pointer-events-auto",participant:i.to},null,8,["context","participant"]),i.assignee?(I(),Re(a,{key:1,class:"return transform -translate-y-full pointer-events-auto",content:i.assignee,rtl:!i.rightToLeft,type:"return"},null,8,["content","rtl"])):ye("",!0)],14,TE)}const kE=Ce(wE,[["render",RE]]),OE={name:"self-invocation",props:["content","assignee"]},NE={class:"message self text-sm flex items-start",style:{"border-width":"0"}},IE=b("svg",{class:"arrow text-skin-message-arrow",width:"30",height:"24"},[b("polyline",{class:"line stroke-current fill-none stroke-2",points:"0,2 28,2 28,15 14,15"}),b("polyline",{class:"head stroke-current fill-current stroke-2",points:"18,9 8,15 18,21"})],-1),PE={class:"name px-px hover:text-skin-message-hover hover:bg-skin-message-hover"},ME={key:0};function DE(n,e,t,s,r,i){return I(),W("div",NE,[IE,b("label",PE,[t.assignee?(I(),W("span",ME,qe(t.assignee)+" = ",1)):ye("",!0),pi(" "+qe(t.content),1)])])}const FE=Ce(OE,[["render",DE]]),Sw="",$E={name:"interaction",props:["context","selfCallIndent","commentObj"],computed:{...Ct(["participants","distance2","cursor","onElementClick"]),hasComment(){var n,e;return((n=this.commentObj)==null?void 0:n.text)!==""||((e=this.commentObj)==null?void 0:e.color)!==""},color(){var n;return(n=this.commentObj)==null?void 0:n.color},message:function(){var n;return(n=this.context)==null?void 0:n.message()},providedFrom:function(){var n,e;return(e=(n=this.context)==null?void 0:n.message())==null?void 0:e.ProvidedFrom()},from:function(){return this.providedFrom||this.origin},outOfBand:function(){return!!this.providedFrom&&this.providedFrom!==this.origin},assignee:function(){var e;let n=(e=this.message)==null?void 0:e.Assignment();return n?n.getText():""},signature:function(){var n;return(n=this.message)==null?void 0:n.SignatureText()},translateX:function(){if(!this.rightToLeft&&!this.outOfBand)return 0;const e=this.rightToLeft?this.to:this.providedFrom,t=this.distance2(this.origin,e),s=this.selfCallIndent||0;return t+0-s},rightToLeft:function(){return this.distance2(this.from,this.to)<0},isCurrent:function(){var n;return(n=this.message)==null?void 0:n.isCurrent(this.cursor)},showStarter(){return this.participants.Starter().name!=="_STARTER_"},isRootBlock(){var n,e;return((e=(n=this.context)==null?void 0:n.parentCtx)==null?void 0:e.parentCtx)instanceof Om},origin:function(){var n;return(n=this.context)==null?void 0:n.Origin()},passOnOffset:function(){return this.isSelf?(this.selfCallIndent||0)+6:0},interactionWidth:function(){if(this.context&&this.isSelf)return 0;let n=this.outOfBand?0:this.selfCallIndent||0;return Math.abs(this.distance2(this.from,this.to)-n)},to:function(){var n,e;return(e=(n=this.context)==null?void 0:n.message())==null?void 0:e.Owner()},isSelf:function(){return!this.to||this.to===this.from},invocation:function(){return this.isSelf?"SelfInvocation":"Message"}},methods:{onClick(){this.onElementClick($s.from(this.context))}},components:{Message:Sr,SelfInvocation:FE,Comment:Or,Occurrence:S2}},BE=["data-to","data-signature"];function UE(n,e,t,s,r,i){const o=ue("comment"),a=ue("occurrence"),l=ue("message");return I(),W("div",{class:lt(["interaction sync inline-block",{highlight:i.isCurrent,self:i.isSelf}]),onClick:e[0]||(e[0]=mi((...c)=>i.onClick&&i.onClick(...c),["stop"])),"data-to":i.to,"data-type":"interaction","data-signature":i.signature,style:xe({width:!i.isSelf&&i.interactionWidth+"px",transform:"translateX("+i.translateX+"px)"})},[i.showStarter&&i.isRootBlock||i.outOfBand?(I(),W("div",{key:0,class:lt(["occurrence source border-2",{"right-to-left":i.rightToLeft}])},null,2)):ye("",!0),i.hasComment?(I(),Re(o,{key:1,commentObj:t.commentObj},null,8,["commentObj"])):ye("",!0),(I(),Re(qo(i.invocation),{class:"text-center",color:i.color,content:i.signature,assignee:i.assignee,rtl:i.rightToLeft,type:"sync"},null,8,["color","content","assignee","rtl"])),fe(a,{context:i.message,participant:i.to,selfCallIndent:i.passOnOffset,rtl:i.rightToLeft},null,8,["context","participant","selfCallIndent","rtl"]),i.assignee&&!i.isSelf?(I(),Re(l,{key:2,class:"return transform -translate-y-full",content:i.assignee,rtl:!i.rightToLeft,type:"return"},null,8,["content","rtl"])):ye("",!0)],14,BE)}const VE=Ce($E,[["render",UE],["__scopeId","data-v-86ce6a08"]]),Rw="",HE={name:"self-invocation-async",props:["content"]},GE=n=>(Kt("data-v-25f755f6"),n=n(),Yt(),n),jE={class:"message self flex items-start",style:{"border-width":"0"}},zE=GE(()=>b("svg",{class:"arrow text-skin-message-arrow",width:"34",height:"34"},[b("polyline",{class:"stroke-current stroke-2 fill-none",points:"0,2 28,2 28,25 1,25"}),b("polyline",{class:"head stroke-current stroke-2 fill-none",points:"11,19 1,25 11,31"})],-1)),ZE={class:"name px-px hover:text-skin-message-hover hover:bg-skin-message-hover"};function qE(n,e,t,s,r,i){return I(),W("div",jE,[zE,b("label",ZE,qe(t.content),1)])}const WE=Ce(HE,[["render",qE],["__scopeId","data-v-25f755f6"]]),kw="";function hl(n){return n==null}const KE={name:"interaction-async",props:["context","comment","selfCallIndent"],computed:{...Ct(["distance","cursor","onElementClick"]),from:function(){return this.context.Origin()},asyncMessage:function(){var n;return(n=this.context)==null?void 0:n.asyncMessage()},interactionWidth:function(){var n;return this.isSelf?10*(((n=this.signature)==null?void 0:n.length)||0)+100:Math.abs(this.distance(this.target,this.source))},translateX:function(){return this.rightToLeft?this.distance(this.target,this.from):this.distance(this.source,this.from)},rightToLeft:function(){return this.distance(this.target,this.source)<0},signature:function(){var n,e;return(e=(n=this.asyncMessage)==null?void 0:n.content())==null?void 0:e.getFormattedText()},source:function(){var n,e;return((e=(n=this.asyncMessage)==null?void 0:n.from())==null?void 0:e.getFormattedText())||this.from},target:function(){var n,e;return(e=(n=this.asyncMessage)==null?void 0:n.to())==null?void 0:e.getFormattedText()},isCurrent:function(){const n=this.asyncMessage.start.start,e=this.asyncMessage.stop.stop+1;return hl(this.cursor)||hl(n)||hl(e)?!1:this.cursor>=n&&this.cursor<=e},isSelf:function(){return this.source===this.target},invocation:function(){return this.isSelf?"SelfInvocationAsync":"Message"}},methods:{onClick(){this.onElementClick($s.from(this.context))}},components:{Comment:Or,SelfInvocationAsync:WE,Message:Sr}},YE=["data-signature"];function XE(n,e,t,s,r,i){const o=ue("comment");return I(),W("div",{class:lt(["interaction async",{"right-to-left":i.rightToLeft,highlight:i.isCurrent}]),onClick:e[0]||(e[0]=mi((...a)=>i.onClick&&i.onClick(...a),["stop"])),"data-signature":i.signature,style:xe({width:i.interactionWidth+"px",transform:"translateX("+i.translateX+"px)"})},[t.comment?(I(),Re(o,{key:0,comment:t.comment},null,8,["comment"])):ye("",!0),(I(),Re(qo(i.invocation),{content:i.signature,rtl:i.rightToLeft,type:"async"},null,8,["content","rtl"]))],14,YE)}const QE=Ce(KE,[["render",XE],["__scopeId","data-v-4d783075"]]),Ow="",JE={name:"fragment-alt",props:["context","comment","selfCallIndent","commentObj"],mixins:[Ar],computed:{from:function(){return this.context.Origin()},alt:function(){return this.context.alt()},blockInIfBlock:function(){var n,e,t;return(t=(e=(n=this.alt)==null?void 0:n.ifBlock())==null?void 0:e.braceBlock())==null?void 0:t.block()},condition:function(){var n;return this.conditionFromIfElseBlock((n=this.alt)==null?void 0:n.ifBlock())},elseBlock:function(){var n,e,t;return(t=(e=(n=this.alt)==null?void 0:n.elseBlock())==null?void 0:e.braceBlock())==null?void 0:t.block()}},methods:{conditionFromIfElseBlock(n){var e,t;return(t=(e=n==null?void 0:n.parExpr())==null?void 0:e.condition())==null?void 0:t.getFormattedText()},blockInElseIfBlock(n){var e;return(e=n==null?void 0:n.braceBlock())==null?void 0:e.block()}}},fl=n=>(Kt("data-v-c5cae879"),n=n(),Yt(),n),eb={class:"segment"},tb=fl(()=>b("div",{class:"header bg-skin-fragment-header text-skin-fragment-header text-base leading-4 rounded-t"},[b("div",{class:"name font-semibold p-1 border-b"},[b("label",{class:"p-0"},"Alt")])],-1)),nb={class:"segment"},sb={class:"text-skin-fragment"},rb={class:"condition p-1"},ib=fl(()=>b("label",{class:"else-if hidden"},"else if",-1)),ob={class:"condition p-1"},ab={key:0,class:"segment mt-2 border-t border-solid"},lb=fl(()=>b("div",{class:"text-skin-fragment"},[b("label",{class:"p-1"},"[else]")],-1));function cb(n,e,t,s,r,i){const o=ue("comment"),a=ue("block");return I(),W("div",{class:"fragment alt border-skin-fragment rounded",style:xe(n.fragmentStyle)},[b("div",eb,[t.comment?(I(),Re(o,{key:0,comment:t.comment,commentObj:t.commentObj},null,8,["comment","commentObj"])):ye("",!0),tb,b("div",nb,[b("div",sb,[b("label",rb,"["+qe(i.condition)+"]",1)]),i.blockInIfBlock?(I(),Re(a,{key:0,style:xe({paddingLeft:`${n.offsetX}px`}),context:i.blockInIfBlock,selfCallIndent:t.selfCallIndent},null,8,["style","context","selfCallIndent"])):ye("",!0)])]),(I(!0),W(Ve,null,Zn(i.alt.elseIfBlock(),(l,c)=>(I(),W("div",{key:c+500,class:"segment mt-2 border-t border-solid"},[(I(),W("div",{class:"text-skin-fragment",key:c+1e3},[ib,b("label",ob,"["+qe(i.conditionFromIfElseBlock(l))+"]",1)])),(I(),Re(a,{style:xe({paddingLeft:`${n.offsetX}px`}),context:i.blockInElseIfBlock(l),selfCallIndent:t.selfCallIndent,key:c+2e3},null,8,["style","context","selfCallIndent"]))]))),128)),i.elseBlock?(I(),W("div",ab,[lb,fe(a,{style:xe({paddingLeft:`${n.offsetX}px`}),context:i.elseBlock,selfCallIndent:t.selfCallIndent},null,8,["style","context","selfCallIndent"])])):ye("",!0)],4)}const ub=Ce(JE,[["render",cb],["__scopeId","data-v-c5cae879"]]),Nw="",Iw="",hb={name:"fragment-par",props:["context","comment","selfCallIndent"],mixins:[Ar],computed:{from:function(){return this.context.Origin()},par:function(){return this.context.par()}}},fb=(n=>(Kt("data-v-bc96f29d"),n=n(),Yt(),n))(()=>b("div",{class:"header bg-skin-fragment-header text-skin-fragment-header text-base leading-4 rounded-t"},[b("div",{class:"name font-semibold p-1 border-b"},[b("label",null,"Par")])],-1));function db(n,e,t,s,r,i){const o=ue("comment"),a=ue("block");return I(),W("div",{class:"fragment par border-skin-fragment rounded",style:xe(n.fragmentStyle)},[t.comment?(I(),Re(o,{key:0,comment:t.comment},null,8,["comment"])):ye("",!0),fb,fe(a,{style:xe({paddingLeft:`${n.offsetX}px`}),context:i.par.braceBlock().block(),selfCallIndent:t.selfCallIndent},null,8,["style","context","selfCallIndent"])],4)}const pb=Ce(hb,[["render",db],["__scopeId","data-v-bc96f29d"]]),Mw="",gb={name:"fragment-loop",props:["context","comment","selfCallIndent"],mixins:[Ar],computed:{from:function(){return this.context.Origin()},loop:function(){return this.context.loop()},blockInLoop:function(){var n,e;return(e=(n=this.loop)==null?void 0:n.braceBlock())==null?void 0:e.block()},condition:function(){var n,e,t;return(t=(e=(n=this.loop)==null?void 0:n.parExpr())==null?void 0:e.condition())==null?void 0:t.getFormattedText()}}},xb=(n=>(Kt("data-v-62b3ca90"),n=n(),Yt(),n))(()=>b("div",{class:"header text-skin-fragment-header bg-skin-fragment-header text-base leading-4"},[b("div",{class:"name font-semibold p-1 border-b"},[b("label",{class:"p-0"},"Loop")])],-1)),mb={class:"segment"},Lb={class:"text-skin-fragment"},_b={class:"condition p-1"};function yb(n,e,t,s,r,i){const o=ue("comment"),a=ue("block");return I(),W("div",{class:"fragment loop border-skin-fragment rounded",style:xe(n.fragmentStyle)},[t.comment?(I(),Re(o,{key:0,comment:t.comment},null,8,["comment"])):ye("",!0),xb,b("div",mb,[b("div",Lb,[b("label",_b,"["+qe(i.condition)+"]",1)]),fe(a,{style:xe({paddingLeft:`${n.offsetX}px`}),context:i.blockInLoop,selfCallIndent:t.selfCallIndent},null,8,["style","context","selfCallIndent"])])],4)}const Cb=Ce(gb,[["render",yb],["__scopeId","data-v-62b3ca90"]]),Fw="",Eb={name:"fragment-opt",props:["context","comment","selfCallIndent"],mixins:[Ar],computed:{from:function(){return this.context.Origin()},opt:function(){return this.context.opt()}}},bb=(n=>(Kt("data-v-e9cc75db"),n=n(),Yt(),n))(()=>b("div",{class:"header bg-skin-fragment-header text-skin-fragment-header text-base leading-4"},[b("div",{class:"name font-semibold p-1 border-b"},[b("label",null,"Opt")])],-1));function vb(n,e,t,s,r,i){const o=ue("comment"),a=ue("block");return I(),W("div",{class:"fragment opt border-skin-fragment rounded",style:xe(n.fragmentStyle)},[t.comment?(I(),Re(o,{key:0,comment:t.comment},null,8,["comment"])):ye("",!0),bb,fe(a,{style:xe({paddingLeft:`${n.offsetX}px`}),context:i.opt.braceBlock().block(),selfCallIndent:t.selfCallIndent},null,8,["style","context","selfCallIndent"])],4)}const wb=Ce(Eb,[["render",vb],["__scopeId","data-v-e9cc75db"]]),Bw="",Tb={name:"fragment-tcf",props:["context","comment","selfCallIndent"],mixins:[Ar],computed:{from:function(){return this.context.Origin()},tcf:function(){return this.context.tcf()},blockInTryBlock:function(){var n,e,t;return(t=(e=(n=this.tcf)==null?void 0:n.tryBlock())==null?void 0:e.braceBlock())==null?void 0:t.block()},finallyBlock:function(){var n,e,t;return(t=(e=(n=this.tcf)==null?void 0:n.finallyBlock())==null?void 0:e.braceBlock())==null?void 0:t.block()}},methods:{exception(n){var e;return(e=n==null?void 0:n.invocation())==null?void 0:e.parameters().getText()},blockInCatchBlock(n){var e;return(e=n==null?void 0:n.braceBlock())==null?void 0:e.block()}}},dl=n=>(Kt("data-v-107670fe"),n=n(),Yt(),n),Ab={class:"segment"},Sb=dl(()=>b("div",{class:"header bg-skin-fragment-header text-skin-fragment-header text-base leading-4 rounded-t"},[b("div",{class:"name font-semibold p-1 border-b"},[b("label",null,"Try")])],-1)),Rb=dl(()=>b("label",{class:"keyword catch p-1"},"catch",-1)),kb={class:"exception p-1"},Ob={key:0,class:"segment mt-2 border-t border-solid"},Nb=dl(()=>b("div",{class:"header text-skin-fragment finally"},[b("label",{class:"keyword finally p-1"},"finally")],-1));function Ib(n,e,t,s,r,i){const o=ue("comment"),a=ue("block");return I(),W("div",{class:"fragment tcf border-skin-fragment rounded",style:xe(n.fragmentStyle)},[b("div",Ab,[t.comment?(I(),Re(o,{key:0,comment:t.comment},null,8,["comment"])):ye("",!0),Sb,i.blockInTryBlock?(I(),Re(a,{key:1,style:xe({paddingLeft:`${n.offsetX}px`}),context:i.blockInTryBlock,selfCallIndent:t.selfCallIndent},null,8,["style","context","selfCallIndent"])):ye("",!0)]),(I(!0),W(Ve,null,Zn(i.tcf.catchBlock(),(l,c)=>(I(),W("div",{key:c+500,class:"segment mt-2 border-t border-solid"},[(I(),W("div",{class:"header text-skin-fragment",key:c+1e3},[Rb,b("label",kb,qe(i.exception(l)),1)])),(I(),Re(a,{style:xe({paddingLeft:`${n.offsetX}px`}),context:i.blockInCatchBlock(l),selfCallIndent:t.selfCallIndent,key:c+2e3},null,8,["style","context","selfCallIndent"]))]))),128)),i.finallyBlock?(I(),W("div",Ob,[Nb,fe(a,{style:xe({paddingLeft:`${n.offsetX}px`}),context:i.finallyBlock,selfCallIndent:t.selfCallIndent},null,8,["style","context","selfCallIndent"])])):ye("",!0)],4)}const Pb=Ce(Tb,[["render",Ib],["__scopeId","data-v-107670fe"]]),Mb={name:"return",props:["context","comment"],computed:{...Ct(["distance","cursor","onElementClick"]),from:function(){return this.context.Origin()},asyncMessage:function(){var n;return(n=this.context)==null?void 0:n.ret().asyncMessage()},width:function(){return this.isSelf?ro(this.signature,Ps.MessageContent):Math.abs(this.distance(this.target,this.source))},left:function(){return this.rightToLeft?this.distance(this.target,this.from)+2:this.distance(this.source,this.from)+2},rightToLeft:function(){return this.distance(this.target,this.source)<0},signature:function(){var n,e,t,s,r;return((e=(n=this.asyncMessage)==null?void 0:n.content())==null?void 0:e.getFormattedText())||((r=(s=(t=this.context)==null?void 0:t.ret())==null?void 0:s.expr())==null?void 0:r.getFormattedText())},source:function(){var n,e;return((e=(n=this.asyncMessage)==null?void 0:n.from())==null?void 0:e.getFormattedText())||this.from},target:function(){var n,e,t,s;return((e=(n=this.asyncMessage)==null?void 0:n.to())==null?void 0:e.getFormattedText())||((s=(t=this.context)==null?void 0:t.ret())==null?void 0:s.ReturnTo())},isCurrent:function(){return!1},isSelf:function(){return this.source===this.target}},methods:{onClick(){this.onElementClick($s.from(this.context))}},components:{Comment:Or,Message:Sr}},Db=["data-signature"],Fb={key:1,class:"flex items-center"},$b=b("svg",{class:"w-3 h-3 flex-shrink-0 fill-current m-1",viewBox:"0 0 512 512"},[b("path",{class:"cls-1",d:"M256 0C114.84 0 0 114.84 0 256s114.84 256 256 256 256-114.84 256-256S397.16 0 256 0Zm0 469.33c-117.63 0-213.33-95.7-213.33-213.33S138.37 42.67 256 42.67 469.33 138.37 469.33 256 373.63 469.33 256 469.33Z"}),b("path",{class:"cls-1",d:"M288 192h-87.16l27.58-27.58a21.33 21.33 0 1 0-30.17-30.17l-64 64a21.33 21.33 0 0 0 0 30.17l64 64a21.33 21.33 0 0 0 30.17-30.17l-27.58-27.58H288a53.33 53.33 0 0 1 0 106.67h-32a21.33 21.33 0 0 0 0 42.66h32a96 96 0 0 0 0-192Z"})],-1),Bb={class:"name text-sm"};function Ub(n,e,t,s,r,i){const o=ue("comment"),a=ue("Message");return I(),W("div",{class:lt(["interaction return relative",{"right-to-left":i.rightToLeft,highlight:i.isCurrent}]),onClick:e[0]||(e[0]=mi((...l)=>i.onClick&&i.onClick(...l),["stop"])),"data-signature":i.signature,style:xe({width:i.width+"px",left:i.left+"px"})},[t.comment?(I(),Re(o,{key:0,comment:t.comment},null,8,["comment"])):ye("",!0),i.isSelf?(I(),W("div",Fb,[$b,b("span",Bb,qe(i.signature),1)])):ye("",!0),i.isSelf?ye("",!0):(I(),Re(a,{key:2,content:i.signature,rtl:i.rightToLeft,type:"return"},null,8,["content","rtl"]))],14,Db)}const Vb=Ce(Mb,[["render",Ub]]),Uw="",Hb={name:"divider",props:["context"],computed:{...Ct(["participants","centerOf"]),width(){let n=this.participants.Names().pop();return this.centerOf(n)+10},from:function(){return this.context.Origin()},centerOfFrom(){return this.centerOf(this.from)},name:function(){return this.context.divider().Note()}}},k2=n=>(Kt("data-v-9e567e69"),n=n(),Yt(),n),Gb=k2(()=>b("div",{class:"left bg-skin-divider"},null,-1)),jb={class:"name"},zb=k2(()=>b("div",{class:"right bg-skin-divider"},null,-1));function Zb(n,e,t,s,r,i){return I(),W("div",{class:"divider",style:xe({width:i.width+"px",transform:"translateX("+(-1*i.centerOfFrom+10)+"px)"})},[Gb,b("div",jb,qe(i.name),1),zb],4)}const qb=Ce(Hb,[["render",Zb],["__scopeId","data-v-9e567e69"]]);class Wb{constructor(e){U(this,"text");U(this,"color");const t=e.split(`
|
|
560
560
|
`);this.color=t.find(r=>r.trimStart().startsWith("[red]"))?"red":void 0;const s=t.map(r=>r.replace("[red]",""));this.text=s.join(`
|
|
561
|
-
`),this.text=this.text.trimEnd()}}const Kb={name:"statement",props:["context","selfCallIndent"],computed:{comment:function(){return this.context.getComment()?this.context.getComment():""},commentObj:function(){return new Wb(this.comment)},subStatement:function(){let n=this,e={loop:"FragmentLoop",alt:"FragmentAlt",par:"FragmentPar",opt:"FragmentOpt",tcf:"FragmentTryCatchFinally",creation:"Creation",message:"Interaction",asyncMessage:"InteractionAsync",divider:"Divider",ret:"Return"},t=Object.keys(e).find(s=>n.context[s]()!==null);return e[t]}},components:{Creation:kE,Interaction:VE,InteractionAsync:QE,FragmentAlt:ub,FragmentPar:pb,FragmentOpt:wb,FragmentTryCatchFinally:Pb,FragmentLoop:Cb,Divider:qb,Return:Vb}};function Yb(n,e,t,s,r,i){return I(),Re(qo(i.subStatement),{class:"text-left text-sm text-skin-message",context:t.context,comment:i.comment,commentObj:i.commentObj,selfCallIndent:t.selfCallIndent},null,8,["context","comment","commentObj","selfCallIndent"])}const Xb={name:"block",props:["context","selfCallIndent"],computed:{statements:function(){var n;return(n=this.context)==null?void 0:n.stat()}},components:{Statement:Ce(Kb,[["render",Yb]])}},Qb={class:"block"};function Jb(n,e,t,s,r,i){const o=ue("statement");return I(),W("div",Qb,[(I(!0),W(Ve,null,Zn(i.statements,(a,l)=>(I(),W("div",{class:"statement-container mt-1",key:l},[fe(o,{context:a,selfCallIndent:t.selfCallIndent},null,8,["context","selfCallIndent"])]))),128))])}const ev=Ce(Xb,[["render",Jb]]),tv=Hs.child({name:"core"});class nv{constructor(e,t=!1){U(this,"el");U(this,"_code");U(this,"_theme");U(this,"store");U(this,"app");this.el=e,this.store=A0(Ah()),this.app=u0(t?Ka:e2),this.app.component("Comment",Or),this.app.component("Block",ev),this.app.use(this.store),this.app.mount(this.el)}async render(e,t){return tv.debug("rendering",e,t),this._code=e||this._code,this._theme=t||this._theme,this.store.state.theme=this._theme||"default",await this.store.dispatch("updateCode",{code:this._code}),Promise.resolve(this)}get code(){return this._code}get theme(){return this._theme}async getPng(){return this.
|
|
561
|
+
`),this.text=this.text.trimEnd()}}const Kb={name:"statement",props:["context","selfCallIndent"],computed:{comment:function(){return this.context.getComment()?this.context.getComment():""},commentObj:function(){return new Wb(this.comment)},subStatement:function(){let n=this,e={loop:"FragmentLoop",alt:"FragmentAlt",par:"FragmentPar",opt:"FragmentOpt",tcf:"FragmentTryCatchFinally",creation:"Creation",message:"Interaction",asyncMessage:"InteractionAsync",divider:"Divider",ret:"Return"},t=Object.keys(e).find(s=>n.context[s]()!==null);return e[t]}},components:{Creation:kE,Interaction:VE,InteractionAsync:QE,FragmentAlt:ub,FragmentPar:pb,FragmentOpt:wb,FragmentTryCatchFinally:Pb,FragmentLoop:Cb,Divider:qb,Return:Vb}};function Yb(n,e,t,s,r,i){return I(),Re(qo(i.subStatement),{class:"text-left text-sm text-skin-message",context:t.context,comment:i.comment,commentObj:i.commentObj,selfCallIndent:t.selfCallIndent},null,8,["context","comment","commentObj","selfCallIndent"])}const Xb={name:"block",props:["context","selfCallIndent"],computed:{statements:function(){var n;return(n=this.context)==null?void 0:n.stat()}},components:{Statement:Ce(Kb,[["render",Yb]])}},Qb={class:"block"};function Jb(n,e,t,s,r,i){const o=ue("statement");return I(),W("div",Qb,[(I(!0),W(Ve,null,Zn(i.statements,(a,l)=>(I(),W("div",{class:"statement-container mt-1",key:l},[fe(o,{context:a,selfCallIndent:t.selfCallIndent},null,8,["context","selfCallIndent"])]))),128))])}const ev=Ce(Xb,[["render",Jb]]),tv=Hs.child({name:"core"});class nv{constructor(e,t=!1){U(this,"el");U(this,"_code");U(this,"_theme");U(this,"store");U(this,"app");this.el=e,this.store=A0(Ah()),this.app=u0(t?Ka:e2),this.app.component("Comment",Or),this.app.component("Block",ev),this.app.use(this.store),this.app.mount(this.el)}async render(e,t){return tv.debug("rendering",e,t),this._code=e||this._code,this._theme=t||this._theme,this.store.state.theme=this._theme||"default",await this.store.dispatch("updateCode",{code:this._code}),Promise.resolve(this)}get code(){return this._code}get theme(){return this._theme}async getPng(){return this.el.children[0].__vue__.toPng()}}const sv={createApp:u0,createStore:A0,Store:Ah,SeqDiagram:Ka,DiagramFrame:e2};yt.VueSequence=sv,yt.default=nv,Object.defineProperties(yt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
562
562
|
//# sourceMappingURL=zenuml.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenuml/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.35",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/ZenUml/core.git"
|
|
@@ -9,14 +9,10 @@
|
|
|
9
9
|
"dev": "vite dev --port 8080",
|
|
10
10
|
"build:site": "vite build",
|
|
11
11
|
"build": "vite build -c vite.config.lib.js",
|
|
12
|
-
"build:report": "vue-cli-service build --report --target lib --inline-vue --name zenuml/core ./src/core.ts",
|
|
13
|
-
"test:unit": "jest",
|
|
14
12
|
"test": "vitest",
|
|
15
|
-
"test:unit:watch": "pnpm run antlr && vue-cli-service test:unit --watch",
|
|
16
13
|
"cy": "cypress run",
|
|
17
14
|
"cy:open": "cypress open",
|
|
18
15
|
"cy:smoke": "cypress run --spec cypress/e2e/smoke.spec.js",
|
|
19
|
-
"lint": "vue-cli-service lint",
|
|
20
16
|
"antlr:setup": "python3 -m pip install antlr4-tools",
|
|
21
17
|
"antlr:generate": "pwd && cd ./src/g4-units/hello-world && antlr4 Hello.g4",
|
|
22
18
|
"antlr:javac": "pwd && cd ./src/g4-units/hello-world && CLASSPATH=\"../../../antlr/antlr-4.11.1-complete.jar:$CLASSPATH\" javac *.java",
|
|
@@ -25,8 +21,6 @@
|
|
|
25
21
|
"antlr:clear": "rm -rf src/generated-parser/*",
|
|
26
22
|
"antlr:lexer": "java -Duser.dir=$(pwd)/src/g4 -cp $(pwd)/antlr/antlr-4.11.1-complete.jar org.antlr.v4.Tool -o ./src/generated-parser -Dlanguage=JavaScript sequenceLexer.g4",
|
|
27
23
|
"antlr:parser": "java -Duser.dir=$(pwd)/src/g4 -cp $(pwd)/antlr/antlr-4.11.1-complete.jar org.antlr.v4.Tool -o ./src/generated-parser -Dlanguage=JavaScript sequenceParser.g4",
|
|
28
|
-
"build-crx": "vue-cli-service build --mode production --target lib --name zenuml/core ./src/index.js",
|
|
29
|
-
"start": "vue-cli-service serve",
|
|
30
24
|
"git:branch:clean:gone": "git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -d",
|
|
31
25
|
"git:branch:clean:merged": "git branch --merged|egrep -v \"(\\*|master|main|dev|skip_branch_name)\" | xargs git branch -d",
|
|
32
26
|
"git:branch:safe-delete": "echo '> git log --graph --left-right --cherry --oneline another-branch...main'",
|
|
@@ -53,7 +47,6 @@
|
|
|
53
47
|
"ramda": "^0.28.0",
|
|
54
48
|
"tailwindcss": "^3.2.4",
|
|
55
49
|
"vue": "^3.2.45",
|
|
56
|
-
"vue-gtag": "^1.16.1",
|
|
57
50
|
"vuex": "^4.1.0"
|
|
58
51
|
},
|
|
59
52
|
"devDependencies": {
|
|
@@ -61,7 +54,6 @@
|
|
|
61
54
|
"@babel/preset-env": "^7.20.2",
|
|
62
55
|
"@types/antlr4": "^4.11.2",
|
|
63
56
|
"@types/color-string": "^1.5.2",
|
|
64
|
-
"@types/jest": "^27.5.2",
|
|
65
57
|
"@types/lodash": "^4.14.168",
|
|
66
58
|
"@types/node": "latest",
|
|
67
59
|
"@typescript-eslint/eslint-plugin": "^5.46.1",
|
|
@@ -69,24 +61,20 @@
|
|
|
69
61
|
"@vitejs/plugin-vue": "^4.0.0",
|
|
70
62
|
"@vue/compiler-sfc": "^3.2.45",
|
|
71
63
|
"@vue/test-utils": "^2.2.6",
|
|
72
|
-
"@vue/vue2-jest": "^27.0.0",
|
|
73
64
|
"autoprefixer": "^10.4.13",
|
|
74
65
|
"babel-eslint": "^10.1.0",
|
|
75
|
-
"babel-jest": "^27.5.1",
|
|
76
66
|
"concurrently": "^7.5.0",
|
|
77
67
|
"cypress": "10",
|
|
78
68
|
"cypress-plugin-snapshots": "^1.4.4",
|
|
79
69
|
"eslint": "^8.30.0",
|
|
80
70
|
"eslint-plugin-vue": "^8.7.1",
|
|
81
71
|
"global-jsdom": "^8.6.0",
|
|
82
|
-
"jest": "^27.5.1",
|
|
83
72
|
"jsdom": "^20.0.2",
|
|
84
73
|
"node-sass": "^6.0.0",
|
|
85
74
|
"regenerator-runtime": "^0.13.7",
|
|
86
75
|
"sass": "^1.26.5",
|
|
87
76
|
"svg-url-loader": "^6.0.0",
|
|
88
77
|
"terser-webpack-plugin": "^3.0.6",
|
|
89
|
-
"ts-jest": "^27.1.5",
|
|
90
78
|
"ts-node": "^10.9.1",
|
|
91
79
|
"typescript": "^4.7.4",
|
|
92
80
|
"vite": "^3.2.3",
|
|
@@ -111,10 +99,7 @@
|
|
|
111
99
|
"files": [
|
|
112
100
|
"**/__tests__/*.{j,t}s?(x)",
|
|
113
101
|
"**/*.spec.{j,t}s?(x)"
|
|
114
|
-
]
|
|
115
|
-
"env": {
|
|
116
|
-
"jest": true
|
|
117
|
-
}
|
|
102
|
+
]
|
|
118
103
|
}
|
|
119
104
|
]
|
|
120
105
|
},
|