dimcode 0.0.6-beta.12 → 0.0.6-beta.13
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/assets/gui/200.html +1 -1
- package/assets/gui/404.html +1 -1
- package/assets/gui/_nuxt/{vp7V_yoz.js → B1-PJYWH.js} +1 -1
- package/assets/gui/_nuxt/{B7HD8AVl.js → B45VLnWj.js} +1 -1
- package/assets/gui/_nuxt/{8aOojt4c.js → B5FXSUaH.js} +1 -1
- package/assets/gui/_nuxt/{DnQfmNyQ.js → B8Q-DreI.js} +1 -1
- package/assets/gui/_nuxt/{p_ICMfZU.js → BGGDiT67.js} +1 -1
- package/assets/gui/_nuxt/{DxluJqXT.js → BHTMZHSU.js} +1 -1
- package/assets/gui/_nuxt/{D4dMqe9s.js → BNUt2BvU.js} +1 -1
- package/assets/gui/_nuxt/{Dj1xw3tM.js → BSycTytT.js} +1 -1
- package/assets/gui/_nuxt/{CVP1z2kv.js → BW7XEYaa.js} +1 -1
- package/assets/gui/_nuxt/{CAme3Fxh.js → Bfj_mN6E.js} +1 -1
- package/assets/gui/_nuxt/{KIJvCToJ.js → Bip_u-4G.js} +1 -1
- package/assets/gui/_nuxt/BjnVA5ld.js +1 -0
- package/assets/gui/_nuxt/{Bgjyjj_Q.js → BoWMK5wq.js} +1 -1
- package/assets/gui/_nuxt/Bp8rDhST.js +1 -0
- package/assets/gui/_nuxt/{gBBiMBPJ.js → Br6oVHoE.js} +3 -3
- package/assets/gui/_nuxt/{BM2h07xU.js → Bs7Gutnx.js} +1 -1
- package/assets/gui/_nuxt/{D_wE_VQF.js → Bt5qFGQZ.js} +1 -1
- package/assets/gui/_nuxt/{CxE7cVCo.js → Btu8KrP7.js} +1 -1
- package/assets/gui/_nuxt/{DFS1qZ1O.js → BvNUcNrD.js} +2 -2
- package/assets/gui/_nuxt/{BPVjZi5d.js → BxFaOjBs.js} +1 -1
- package/assets/gui/_nuxt/C3xSkDls.js +15 -0
- package/assets/gui/_nuxt/C7_OZRS0.js +1 -0
- package/assets/gui/_nuxt/{wJQJMAkQ.js → CC3G6jyE.js} +1 -1
- package/assets/gui/_nuxt/{BqEoqvC-.js → CJ7-Mf84.js} +1 -1
- package/assets/gui/_nuxt/{CpnBu6h_.js → CMOpjdPV.js} +1 -1
- package/assets/gui/_nuxt/{Dq1qE73E.js → CS7inUdO.js} +1 -1
- package/assets/gui/_nuxt/{D9MU2mrz.js → CUe0quIq.js} +1 -1
- package/assets/gui/_nuxt/{BPztHYF7.js → CWFL75Vj.js} +1 -1
- package/assets/gui/_nuxt/{CAuva6j7.js → CZ2S79GP.js} +1 -1
- package/assets/gui/_nuxt/{Be50z1my.js → CjvcAzGt.js} +1 -1
- package/assets/gui/_nuxt/{CUqTiK5D.js → Cnj9yY3A.js} +1 -1
- package/assets/gui/_nuxt/{BAc2FnCt.js → CtCaJz7N.js} +1 -1
- package/assets/gui/_nuxt/{uMdp84a3.js → CwjAQDXm.js} +1 -1
- package/assets/gui/_nuxt/{CUkJduai.js → D-2RxthJ.js} +1 -1
- package/assets/gui/_nuxt/{CQ2d2Y8u.js → D55D-gSq.js} +2 -2
- package/assets/gui/_nuxt/{BhmAmx9l.js → D5mZhIOc.js} +69 -69
- package/assets/gui/_nuxt/{CfcSxu_H.js → D8IUtoH8.js} +1 -1
- package/assets/gui/_nuxt/DAV6AwhM.js +1 -0
- package/assets/gui/_nuxt/{ORwv0lZH.js → DHZk-SFG.js} +2 -2
- package/assets/gui/_nuxt/DKD3OJCW.js +1 -0
- package/assets/gui/_nuxt/{D9DbHqny.js → DQhFQpbT.js} +1 -1
- package/assets/gui/_nuxt/{BeK8_ssh.js → DQp5YEVQ.js} +1 -1
- package/assets/gui/_nuxt/{C_agIDCF.js → DWWz4ndF.js} +1 -1
- package/assets/gui/_nuxt/{Ls_DMybU.js → D_tP9lCL.js} +1 -1
- package/assets/gui/_nuxt/{C7y8YcFo.js → DqPo_RUe.js} +3 -3
- package/assets/gui/_nuxt/Dsaurf6B.js +4 -0
- package/assets/gui/_nuxt/DtUiEJUF.js +1 -0
- package/assets/gui/_nuxt/{CJlKAu71.js → DvsG7qqb.js} +1 -1
- package/assets/gui/_nuxt/{DpZYRxI5.js → E7Ix3tcC.js} +37 -37
- package/assets/gui/_nuxt/{CnD4h6yP.js → Rl4On6n0.js} +2 -2
- package/assets/gui/_nuxt/{DhXJpUyf.js → XbL3y5x-.js} +1 -1
- package/assets/gui/_nuxt/builds/latest.json +1 -1
- package/assets/gui/_nuxt/builds/meta/a2e13936-b4de-41a5-b95a-4af89fcab88a.json +1 -0
- package/assets/gui/_nuxt/{Dow1_wBM.js → ddcTOw__.js} +1 -1
- package/assets/gui/_nuxt/entry.DIMbkOYy.css +1 -0
- package/assets/gui/_nuxt/error-404.DF6r4GP7.css +1 -0
- package/assets/gui/_nuxt/error-500.Bo5pzFPU.css +1 -0
- package/assets/gui/_nuxt/{BInTq0GU.js → fKF2Z4TD.js} +1 -1
- package/assets/gui/_nuxt/{CMWA289k.js → grRL7Kp3.js} +4 -4
- package/assets/gui/_nuxt/{Cg8xUD7v.js → gtxKAzOr.js} +1 -1
- package/assets/gui/_nuxt/{0OuYuFdd.js → kTUG9xEK.js} +1 -1
- package/assets/gui/_nuxt/{CrbZGhCE.js → tOohp15w.js} +1 -1
- package/assets/gui/index.html +1 -1
- package/assets/native/build.zig +16 -0
- package/assets/native/src/lib.zig +23 -0
- package/dist/cli.mjs +954 -952
- package/dist/models/aihubmix.json +19523 -0
- package/package.json +2 -2
- package/assets/gui/_nuxt/BHYi2vsY.js +0 -1
- package/assets/gui/_nuxt/BZDo2VM_.js +0 -1
- package/assets/gui/_nuxt/BfJMBsjM.js +0 -4
- package/assets/gui/_nuxt/ClSDL2YO.js +0 -1
- package/assets/gui/_nuxt/DFavkkde.js +0 -15
- package/assets/gui/_nuxt/DuCT_U5Q.js +0 -1
- package/assets/gui/_nuxt/P3nlUD3z.js +0 -1
- package/assets/gui/_nuxt/builds/meta/cecb4fd8-68ea-430e-beb5-870957f3d8cf.json +0 -1
- package/assets/gui/_nuxt/entry.Co3CW4ar.css +0 -1
- package/assets/gui/_nuxt/error-404.BAwq3L4-.css +0 -1
- package/assets/gui/_nuxt/error-500.DFXMopWe.css +0 -1
- package/assets/gui/_nuxt/vJah6lOS.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as a,d as o}from"./
|
|
1
|
+
import{_ as a,d as o}from"./D5mZhIOc.js";var d=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as a,c as s,a as e,C as t}from"./Btu8KrP7.js";import{_ as i}from"./D5mZhIOc.js";import"./BSycTytT.js";import"./D8IUtoH8.js";import"./B8Q-DreI.js";import"./E7Ix3tcC.js";var u={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{u as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as rt,d as ut,A as st,
|
|
1
|
+
import{e as rt,d as ut,A as st,r as M,G as Ee,c as Et,w as W,g as Nt,C as B,l as ke,f as H,D as ct,j as F,E as g,F as Ke,m as U,k as Qe,n as u,q as Ne,H as Ye,I as ze,J as zt,v as et,z as oe,K as Tt,L as tt,Y as $t,M as nt,N as Ht,o as Dt,O as Lt,P as jt,Q as Yt,R as ye,Z as Vt}from"./E7Ix3tcC.js";import{e as ae}from"./DvJDa2y1.js";var Wt=Object.defineProperty,It=Object.defineProperties,qt=Object.getOwnPropertyDescriptors,ot=Object.getOwnPropertySymbols,Rt=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,lt=(p,m,k)=>m in p?Wt(p,m,{enumerable:!0,configurable:!0,writable:!0,value:k}):p[m]=k,Te=(p,m)=>{for(var k in m||(m={}))Rt.call(m,k)&<(p,k,m[k]);if(ot)for(var k of ot(m))At.call(m,k)&<(p,k,m[k]);return p},it=(p,m)=>It(p,qt(m)),Y=(p,m,k)=>new Promise((l,I)=>{var N=d=>{try{f(k.next(d))}catch(X){I(X)}},b=d=>{try{f(k.throw(d))}catch(X){I(X)}},f=d=>d.done?l(d.value):Promise.resolve(d.value).then(N,b);f((k=k.apply(p,m)).next())});const Xt={class:"markstream-vue"},Gt={class:"html-preview-frame__header"},Jt={class:"html-preview-frame__title"},Ut={class:"html-preview-frame__label"},Zt=["srcdoc"],Kt=rt(ut({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},onClose:{type:Function},title:{}},setup(p){const m=p,{t:k}=st(),l=B(()=>{const N=m.code||"",b=N.trim().toLowerCase();return b.startsWith("<!doctype")||b.startsWith("<html")||b.startsWith("<body")?N:`<!doctype html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
@@ -19,4 +19,4 @@ import{e as rt,d as ut,A as st,q as M,G as Ee,c as Et,w as W,f as Nt,C as ct,g a
|
|
|
19
19
|
<body>
|
|
20
20
|
${N}
|
|
21
21
|
</body>
|
|
22
|
-
</html>`});function I(N){var b;N.key!=="Escape"&&N.key!=="Esc"||(b=m.onClose)==null||b.call(m)}return Dt(()=>{typeof window<"u"&&window.addEventListener("keydown",I)}),ct(()=>{typeof window<"u"&&window.removeEventListener("keydown",I)}),(N,b)=>(F(),ke(jt,{to:"body"},[u("div",Xt,[u("div",{class:oe(["html-preview-frame__backdrop",{"html-preview-frame__backdrop--dark":m.isDark}]),onClick:b[2]||(b[2]=f=>{var d;return(d=m.onClose)==null?void 0:d.call(m)})},[u("div",{class:oe(["html-preview-frame",{"html-preview-frame--dark":m.isDark}]),onClick:b[1]||(b[1]=Lt(()=>{},["stop"]))},[u("div",Gt,[u("div",Jt,[b[3]||(b[3]=u("span",{class:"html-preview-frame__dot"},null,-1)),u("span",Ut,Ye(m.title||g(k)("common.preview")||"Preview"),1)]),u("button",{type:"button",class:oe(["html-preview-frame__close",{"html-preview-frame__close--dark":m.isDark}]),onClick:b[0]||(b[0]=f=>{var d;return(d=m.onClose)==null?void 0:d.call(m)})}," × ",2)]),u("iframe",{class:"html-preview-frame__iframe",sandbox:"allow-scripts allow-same-origin",srcdoc:l.value},null,8,Zt)],2)],2)])]))}}),[["__scopeId","data-v-296dd89d"]]);let te=null,$e=null,re=null,ne=null,He=null,De=null;const Le=new WeakMap;let Qt=0;const en={key:0,class:"code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",style:{color:"var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))","background-color":"var(--vscode-editor-background, var(--markstream-code-fallback-bg))"}},tn={class:"flex items-center gap-x-2 flex-1 overflow-hidden"},nn=["innerHTML"],on={class:"text-sm font-medium font-mono truncate"},ln={class:"flex items-center gap-x-2"},an=["aria-pressed"],rn=["disabled"],un=["disabled"],sn=["disabled"],cn=["aria-label"],dn={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},vn={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},mn=["aria-pressed"],fn={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},pn={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},hn=["aria-label"],wn={class:"code-editor-layer"},gn={class:"code-loading-placeholder"},yn={class:"sr-only","aria-live":"polite",role:"status"},at="__markstreamMonacoPassiveTouch__",je=rt(ut({__name:"CodeBlockNode",props:{node:{},isDark:{type:Boolean},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:void 0},lightTheme:{default:void 0},isShowPreview:{type:Boolean,default:!0},monacoOptions:{},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},themes:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},customId:{}},emits:["previewCode","copy"],setup(p,{emit:m}){var k;const l=p,I=m;typeof window<"u"&&(function(){var t;try{const e=window;if(e[at])return;const n=(t=window.Element)==null?void 0:t.prototype,o=n?.addEventListener;if(!n||!o)return;n.addEventListener=function(i,a,c){return i==="touchstart"&&(function(r,y){if(!r)return!1;const s=r;return!(typeof s.closest!="function"||!s.closest(".monaco-editor, .monaco-diff-editor")||y&&typeof y=="object"&&"passive"in y)})(this,c)?o.call(this,i,a,(function(r){return r==null?{passive:!0}:typeof r=="boolean"?{capture:r,passive:!0}:typeof r=="object"?"passive"in r?r:it(Te({},r),{passive:!0}):{passive:!0}})(c)):o.call(this,i,a,c)},e[at]=!0}catch{}})();const N=Ht(),b=B(()=>{const t=N?.vnode.props;return!(!t||!t.onPreviewCode&&!t.onPreviewCode)}),{t:f}=st(),d=M(null),X=M(null),Z=M(!1),D=M(Ee(l.node.language)),le=B(()=>Vt(D.value)),S=M(!1),O=M(!1),ue=M(!1),K=M(!1),se=M(!1),G=M(null);let be=0;const dt=Et(),ie=M(null),q=M(typeof window>"u");typeof window<"u"&&W(()=>X.value,t=>{var e;if((e=ie.value)==null||e.destroy(),ie.value=null,!t)return void(q.value=!1);const n=dt(t,{rootMargin:"400px"});ie.value=n,q.value=n.isVisible.value,n.whenVisible.then(()=>{q.value=!0})},{immediate:!0}),Nt(()=>{var t;(t=ie.value)==null||t.destroy(),ie.value=null});let L=null,ce=null,xe=()=>{},Me=()=>{},de=()=>null,j=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),$=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),Ce=()=>{},ve=()=>{},Q=null,Ve=()=>{var t;return String((t=l.node.language)!=null?t:"plaintext")},Be=()=>Y(null,null,function*(){});const P=B(()=>l.node.diff),We=B(()=>P.value?"diff":"single"),vt=M(We.value),me=M(!1),mt=B(()=>{var t;const e=(t=l.monacoOptions)==null?void 0:t.wordWrap;return e==null||String(e)!=="off"}),Ie=B(()=>typeof window<"u"&&!me.value&&!K.value),fe=M(!1);typeof window<"u"&&Y(null,null,function*(){try{const t=yield Yt();if(!t)return void(me.value=!0);const e=t.useMonaco,n=t.detectLanguage;if(typeof n=="function"&&(Ve=n),typeof e=="function"){const o=Je();if(o&&l.themes&&Array.isArray(l.themes)&&!l.themes.includes(o))throw new Error("Preferred theme not in provided themes array");const i=e(it(Te({wordWrap:"on",wrappingIndent:"same",themes:l.themes,theme:o},l.monacoOptions||{}),{onThemeChange(){Fe()}}));L=i.createEditor||L,ce=i.createDiffEditor||ce,xe=i.updateCode||xe,Me=i.updateDiff||Me,de=i.getEditor||de,j=i.getEditorView||j,$=i.getDiffEditorView||$,Ce=i.cleanupEditor||Ce,ve=i.safeClean||i.cleanupEditor||ve,Be=i.setTheme||Be,se.value=!0,d.value&&(yield he(d.value))}}catch{me.value=!0}});const z=M(typeof((k=l.monacoOptions)==null?void 0:k.fontSize)=="number"?l.monacoOptions.fontSize:Number.NaN),h=M(z.value),ft=B(()=>{const t=z.value,e=h.value;return typeof t=="number"&&Number.isFinite(t)&&t>0&&typeof e=="number"&&Number.isFinite(e)&&e>0}),qe=B(()=>{var t;const e=(t=l.monacoOptions)==null?void 0:t.fontSize;if(typeof e=="number"&&Number.isFinite(e)&&e>0)return e;const n=h.value;return typeof n=="number"&&Number.isFinite(n)&&n>0?n:12}),pt=B(()=>{var t;const e=(t=l.monacoOptions)==null?void 0:t.lineHeight;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:Math.round(1.5*qe.value)}),ht=B(()=>{var t;const e=(t=l.monacoOptions)==null?void 0:t.tabSize;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:4}),wt=B(()=>{var t;const e=(t=l.monacoOptions)==null?void 0:t.fontFamily;return Te({fontSize:`${qe.value}px`,lineHeight:`${pt.value}px`,tabSize:ht.value},typeof e=="string"&&e.trim()?{"--markstream-code-font-family":e.trim()}:{})});function Re(){var t,e,n,o,i;try{const a=P.value?(n=(e=(t=$())==null?void 0:t.getModifiedEditor)==null?void 0:e.call(t))!=null?n:$():j(),c=de(),r=(o=c?.EditorOption)==null?void 0:o.fontInfo;if(a&&r!=null){const y=(i=a.getOption)==null?void 0:i.call(a,r),s=y?.fontSize;if(typeof s=="number"&&Number.isFinite(s)&&s>0)return s}}catch{}try{const a=d.value;if(a){const c=a.querySelector(".view-lines .view-line");if(c)try{if(typeof window<"u"&&typeof window.getComputedStyle=="function"){const r=window.getComputedStyle(c).fontSize,y=r&&r.match(/^(\d+(?:\.\d+)?)/);if(y)return Number.parseFloat(y[1])}}catch{}}}catch{}return null}function Se(t){var e,n;try{const a=de(),c=(e=a?.EditorOption)==null?void 0:e.lineHeight;if(c!=null){const r=(n=t?.getOption)==null?void 0:n.call(t,c);if(typeof r=="number"&&r>0)return r}}catch{}const o=(function(){try{const a=d.value;if(!a)return null;const c=a.querySelector(".view-lines .view-line");if(c){const r=Math.ceil(c.getBoundingClientRect().height);if(r>0)return r}}catch{}return null})();if(o&&o>0)return o;const i=Number.isFinite(h.value)&&h.value>0?h.value:12;return Math.max(12,Math.round(1.35*i))}function Oe(){var t;if(Number.isFinite(h.value)&&h.value>0&&Number.isFinite(z.value))return h.value;const e=Re();return typeof((t=l.monacoOptions)==null?void 0:t.fontSize)=="number"?(z.value=l.monacoOptions.fontSize,h.value=l.monacoOptions.fontSize,h.value):e&&e>0?(z.value=e,h.value=e,e):(z.value=12,h.value=12,12)}function Ae(){var t,e,n,o,i,a,c,r,y,s,v,V,R,x;try{const w=P.value?$():j();if(!w)return null;if(P.value&&w?.getOriginalEditor&&w?.getModifiedEditor){const C=(t=w.getOriginalEditor)==null?void 0:t.call(w),E=(e=w.getModifiedEditor)==null?void 0:e.call(w);(n=C?.layout)==null||n.call(C),(o=E?.layout)==null||o.call(E);const ge=((i=C?.getContentHeight)==null?void 0:i.call(C))||0,Ue=((a=E?.getContentHeight)==null?void 0:a.call(E))||0,Ze=Math.max(ge,Ue);if(Ze>0)return Math.ceil(Ze+1);const Ot=((y=(r=(c=C?.getModel)==null?void 0:c.call(C))==null?void 0:r.getLineCount)==null?void 0:y.call(r))||1,Ft=((V=(v=(s=E?.getModel)==null?void 0:s.call(E))==null?void 0:v.getLineCount)==null?void 0:V.call(v))||1,_t=Math.max(Ot,Ft),Pt=Math.max(Se(C),Se(E));return Math.ceil(_t*(Pt+1.5)+0+1)}if(w?.getContentHeight){(R=w?.layout)==null||R.call(w);const C=w.getContentHeight();if(C>0)return Math.ceil(C+1)}const A=(x=w?.getModel)==null?void 0:x.call(w);let we=1;A&&typeof A.getLineCount=="function"&&(we=A.getLineCount());const Pe=Se(w);return Math.ceil(we*(Pe+1.5)+0+1)}catch{return null}}function Fe(){var t,e,n,o,i,a,c,r;const y=d.value,s=X.value;if(!y||!s)return;const v=y.querySelector(".monaco-editor")||y,V=v.querySelector(".monaco-editor-background")||v,R=v.querySelector(".view-lines")||v;let x=null,w=null,A=null;try{typeof window<"u"&&typeof window.getComputedStyle=="function"&&(x=window.getComputedStyle(v),w=V===v?x:window.getComputedStyle(V),A=R===v?x:window.getComputedStyle(R))}catch{x=null,w=null,A=null}const we=String((t=x?.getPropertyValue("--vscode-editor-foreground"))!=null?t:"").trim(),Pe=String((e=x?.getPropertyValue("--vscode-editor-background"))!=null?e:"").trim(),C=String((o=(n=x?.getPropertyValue("--vscode-editor-selectionBackground"))!=null?n:x?.getPropertyValue("--vscode-editor-hoverHighlightBackground"))!=null?o:"").trim(),E=we||String((a=(i=A?.color)!=null?i:x?.color)!=null?a:"").trim(),ge=Pe||String((r=(c=w?.backgroundColor)!=null?c:x?.backgroundColor)!=null?r:"").trim();E&&s.style.setProperty("--vscode-editor-foreground",E),ge&&s.style.setProperty("--vscode-editor-background",ge),C&&s.style.setProperty("--vscode-editor-selectionBackground",C)}function J(){try{const t=d.value;if(!t)return;const e=t.getBoundingClientRect(),n=window.scrollY+e.top,o=Ae();if(o!=null&&o>0){const i=e.height;t.style.height=`${Math.ceil(o)}px`,t.style.maxHeight="none";const a=Math.ceil(o)-i;a!==0&&n<window.scrollY&&window.scrollBy(0,a)}}catch{}}function ee(){var t;try{const e=d.value;if(!e)return;const n=e.getBoundingClientRect(),o=window.scrollY+n.top,i=n.height,a=(function(){var s,v;const V=(v=(s=l.monacoOptions)==null?void 0:s.MAX_HEIGHT)!=null?v:500;if(typeof V=="number")return V;const R=String(V).match(/^(\d+(?:\.\d+)?)/);return R?Number.parseFloat(R[1]):500})();if(be>0&&(be--,G.value!=null)){const s=Math.min(G.value,a);e.style.height=`${Math.ceil(s)}px`,e.style.maxHeight=`${Math.ceil(a)}px`,e.style.overflow="auto";const v=Math.ceil(s)-i;return void(v!==0&&o<window.scrollY&&window.scrollBy(0,v))}const c=Ae();if(c!=null&&c>0){const s=Math.min(c,a);e.style.height=`${Math.ceil(s)}px`,e.style.maxHeight=`${Math.ceil(a)}px`,e.style.overflow="auto";const v=Math.ceil(s)-i;return void(v!==0&&o<window.scrollY&&window.scrollBy(0,v))}if(G.value!=null){const s=Math.min(G.value,a);e.style.height=`${Math.ceil(s)}px`,e.style.maxHeight=`${Math.ceil(a)}px`,e.style.overflow="auto";const v=Math.ceil(s)-i;return void(v!==0&&o<window.scrollY&&window.scrollBy(0,v))}const r=Math.ceil(((t=e.getBoundingClientRect)==null?void 0:t.call(e).height)||0);if(r>0){const s=Math.min(r,a);e.style.height=`${Math.ceil(s)}px`,e.style.maxHeight=`${Math.ceil(a)}px`,e.style.overflow="auto";const v=Math.ceil(s)-i;return void(v!==0&&o<window.scrollY&&window.scrollBy(0,v))}const y=Number.parseFloat(e.style.height);if(!Number.isNaN(y)&&y>0){const s=Math.ceil(Math.min(y,a));e.style.height=`${s}px`;const v=s-i;v!==0&&o<window.scrollY&&window.scrollBy(0,v)}else{const s=Math.ceil(a);e.style.height=`${s}px`;const v=s-i;v!==0&&o<window.scrollY&&window.scrollBy(0,v)}e.style.maxHeight=`${Math.ceil(a)}px`,e.style.overflow="auto"}catch{}}const _e=B(()=>l.isShowPreview&&(D.value==="html"||D.value==="svg"));W(()=>l.node.language,t=>{D.value=Ee(t)}),W(()=>l.node.code,t=>Y(null,null,function*(){var e,n;if(l.stream!==!1){if(D.value||(D.value=Ee(Ve(t))),L&&!ue.value&&d.value)try{yield he(d.value)}catch{}P.value?Me(String((e=l.node.originalCode)!=null?e:""),String((n=l.node.updatedCode)!=null?n:""),le.value):xe(t,le.value),S.value&&ae(()=>J())}}));const gt=B(()=>{const t=D.value;return t?tt[t]||t.charAt(0).toUpperCase()+t.slice(1):tt[""]}),yt=B(()=>Tt(D.value||"")),kt=B(()=>{const t={},e=i=>{if(i!=null)return typeof i=="number"?`${i}px`:String(i)},n=e(l.minWidth),o=e(l.maxWidth);return n&&(t.minWidth=n),o&&(t.maxWidth=o),t});function bt(){return Y(this,null,function*(){try{typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(l.node.code)),Z.value=!0,I("copy",l.node.code),setTimeout(()=>{Z.value=!1},1e3)}catch(t){console.error("复制失败:",t)}})}function Xe(t){return!t||t.disabled}function T(t,e,n="top"){if(Xe(t.currentTarget))return;const o=t,i=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;nt(t.currentTarget,e,n,!1,i,l.isDark)}function _(){$t()}function Ge(t){if(Xe(t.currentTarget))return;const e=Z.value?f("common.copied")||"Copied":f("common.copy")||"Copy",n=t,o=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;nt(t.currentTarget,e,"top",!1,o,l.isDark)}function xt(){S.value=!S.value;const t=P.value?$():j(),e=d.value;t&&e&&(S.value?(pe(!0),e.style.maxHeight="none",e.style.overflow="visible",J()):(pe(!1),e.style.overflow="auto",ee()))}function Mt(){var t,e,n;if(O.value=!O.value,O.value){if(d.value){const o=Math.ceil(((e=(t=d.value).getBoundingClientRect)==null?void 0:e.call(t).height)||0);o>0&&(G.value=o)}pe(!1)}else{S.value&&pe(!0),d.value&&G.value!=null&&(d.value.style.height=`${G.value}px`);const o=P.value?$():j();try{(n=o?.layout)==null||n.call(o)}catch{}be=2,ae(()=>{S.value?J():ee()})}}function Ct(){if(!_e.value)return;const t=D.value;if(b.value){const e=t==="html"?"text/html":"image/svg+xml",n=t==="html"?f("artifacts.htmlPreviewTitle")||"HTML Preview":f("artifacts.svgPreviewTitle")||"SVG Preview";return void I("previewCode",{node:l.node,artifactType:e,artifactTitle:n,id:`temp-${t}-${Date.now()}`})}t==="html"&&(fe.value=!fe.value)}function pe(t){var e,n;try{if(P.value){const o=$();(e=o?.updateOptions)==null||e.call(o,{automaticLayout:t})}else{const o=j();(n=o?.updateOptions)==null||n.call(o,{automaticLayout:t})}}catch{}}function he(t){return L?Q||(ue.value=!0,Q=Y(null,null,function*(){yield(function(n){return Y(this,null,function*(){var o,i,a;if(!L)return;P.value?(ve(),ce?yield ce(n,String((o=l.node.originalCode)!=null?o:""),String((i=l.node.updatedCode)!=null?i:""),le.value):yield L(n,l.node.code,le.value)):yield L(n,l.node.code,le.value);const c=P.value?$():j();if(typeof((a=l.monacoOptions)==null?void 0:a.fontSize)=="number")c?.updateOptions({fontSize:l.monacoOptions.fontSize,automaticLayout:!1}),z.value=l.monacoOptions.fontSize,h.value=l.monacoOptions.fontSize;else{const r=Re();r&&r>0?(z.value=r,h.value=r):(z.value=12,h.value=12)}S.value||O.value||ee(),l.loading===!1&&(yield ye(),ae(()=>{S.value&&!O.value?J():O.value||ee()})),yield ye(),K.value=!0,Fe()})})(t)}).finally(()=>{Q=null}),Q):null}W(()=>h.value,(t,e)=>{const n=P.value?$():j();n&&typeof t=="number"&&Number.isFinite(t)&&t>0&&(n.updateOptions({fontSize:t}),S.value&&!O.value&&J())},{flush:"post",immediate:!1});const Bt=W(()=>[d.value,P.value,l.stream,l.loading,se.value,q.value],t=>Y(null,[t],function*([e,n,o,i,a,c]){if(!e||!L||!c||o===!1&&i!==!1)return;const r=he(e);if(r){try{yield r}catch{K.value=!1}Bt()}}));function Je(){return l.isDark?l.darkTheme:l.lightTheme}W(We,(t,e)=>Y(null,null,function*(){if(t!==e&&(vt.value=t,L&&d.value&&ue.value&&(l.stream!==!1||l.loading===!1)&&q.value))try{K.value=!1,ue.value=!1,Q=null,ve(),yield ye(),yield he(d.value)}catch{K.value=!1}})),W(()=>[l.isDark,l.darkTheme,l.lightTheme,se.value],()=>{se.value&&(function(){const t=Je();t&&(function(e,n){const o=(function(i){if(i==null)return null;if(typeof i=="string")return i;if(typeof i=="object"&&i&&"name"in i)return String(i.name);if(typeof i=="object"){const a=Le.get(i);if(a)return a;try{const r=JSON.stringify(i);if(r)return Le.set(i,r),r}catch{}const c="__theme_"+ ++Qt;return Le.set(i,c),c}return String(i)})(n);return o?(De=e,te||He!==o?te?(ne===o||$e===o||(re=n,ne=o),te):(re=n,ne=o,te=Y(null,null,function*(){for(;ne&&re!=null;){const i=re,a=ne;if(re=null,ne=null,He!==a)try{$e=a,yield(De??e)(i),He=a}catch{}}}).finally(()=>{te=null,$e=null}),te):Promise.resolve()):Promise.resolve()})(Be,t).then(()=>{K.value&&ae(()=>Fe())})})()}),W(()=>[l.monacoOptions,q.value],()=>{var t,e;if(!L||!q.value)return;const n=P.value?$():j(),o=typeof((t=l.monacoOptions)==null?void 0:t.fontSize)=="number"?l.monacoOptions.fontSize:Number.isFinite(h.value)?h.value:void 0;typeof o=="number"&&Number.isFinite(o)&&o>0&&((e=n?.updateOptions)==null||e.call(n,{fontSize:o})),S.value&&!O.value?J():O.value||ee()},{deep:!0});const St=W(()=>[l.loading,q.value],t=>Y(null,[t],function*([e,n]){n&&(e||(yield ye(),ae(()=>{O.value||(S.value?J():ee()),St()})))}),{immediate:!0,flush:"post"});return ct(()=>{Ce()}),(t,e)=>me.value?(F(),ke(g(Ke),{key:0,node:p.node,loading:l.loading},null,8,["node","loading"])):(F(),H("div",{key:1,ref_key:"container",ref:X,style:ze(kt.value),class:oe(["code-block-container my-4 rounded-lg border overflow-hidden shadow-sm",[l.isDark?"border-gray-700/30 bg-gray-900":"border-gray-200 bg-white",{"is-rendering":l.loading,"is-dark":l.isDark}]])},[l.showHeader?(F(),H("div",en,[Ne(t.$slots,"header-left",{},()=>[u("div",tn,[u("span",{class:"icon-slot h-4 w-4 flex-shrink-0",innerHTML:yt.value},null,8,nn),u("span",on,Ye(gt.value),1)])],!0),Ne(t.$slots,"header-right",{},()=>[u("div",ln,[u("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-pressed":O.value,onClick:Mt,onMouseenter:e[0]||(e[0]=n=>T(n,O.value?g(f)("common.expand")||"Expand":g(f)("common.collapse")||"Collapse")),onFocus:e[1]||(e[1]=n=>T(n,O.value?g(f)("common.expand")||"Expand":g(f)("common.collapse")||"Collapse")),onMouseleave:_,onBlur:_},[(F(),H("svg",{style:ze({rotate:O.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[...e[17]||(e[17]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,an),l.showFontSizeButtons&&l.enableFontSizeControl?(F(),H(zt,{key:0},[u("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:!!Number.isFinite(h.value)&&h.value<=10,onClick:e[2]||(e[2]=n=>(function(){const o=Oe(),i=Math.max(10,o-1);h.value=i})()),onMouseenter:e[3]||(e[3]=n=>T(n,g(f)("common.decrease")||"Decrease")),onFocus:e[4]||(e[4]=n=>T(n,g(f)("common.decrease")||"Decrease")),onMouseleave:_,onBlur:_},[...e[18]||(e[18]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)])],40,rn),u("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:!ft.value||h.value===z.value,onClick:e[5]||(e[5]=n=>(Oe(),void(Number.isFinite(z.value)&&(h.value=z.value)))),onMouseenter:e[6]||(e[6]=n=>T(n,g(f)("common.reset")||"Reset")),onFocus:e[7]||(e[7]=n=>T(n,g(f)("common.reset")||"Reset")),onMouseleave:_,onBlur:_},[...e[19]||(e[19]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),u("path",{d:"M3 3v5h5"})])],-1)])],40,un),u("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:!!Number.isFinite(h.value)&&h.value>=36,onClick:e[8]||(e[8]=n=>(function(){const o=Oe(),i=Math.min(36,o+1);h.value=i})()),onMouseenter:e[9]||(e[9]=n=>T(n,g(f)("common.increase")||"Increase")),onFocus:e[10]||(e[10]=n=>T(n,g(f)("common.increase")||"Increase")),onMouseleave:_,onBlur:_},[...e[20]||(e[20]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)])],40,sn)],64)):U("",!0),l.showCopyButton?(F(),H("button",{key:1,type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-label":Z.value?g(f)("common.copied")||"Copied":g(f)("common.copy")||"Copy",onClick:bt,onMouseenter:e[11]||(e[11]=n=>Ge(n)),onFocus:e[12]||(e[12]=n=>Ge(n)),onMouseleave:_,onBlur:_},[Z.value?(F(),H("svg",vn,[...e[22]||(e[22]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(F(),H("svg",dn,[...e[21]||(e[21]=[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),u("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,cn)):U("",!0),l.showExpandButton?(F(),H("button",{key:2,type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-pressed":S.value,onClick:xt,onMouseenter:e[13]||(e[13]=n=>T(n,S.value?g(f)("common.collapse")||"Collapse":g(f)("common.expand")||"Expand")),onFocus:e[14]||(e[14]=n=>T(n,S.value?g(f)("common.collapse")||"Collapse":g(f)("common.expand")||"Expand")),onMouseleave:_,onBlur:_},[S.value?(F(),H("svg",fn,[...e[23]||(e[23]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])):(F(),H("svg",pn,[...e[24]||(e[24]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])]))],40,mn)):U("",!0),_e.value&&l.showPreviewButton?(F(),H("button",{key:3,type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-label":g(f)("common.preview")||"Preview",onClick:Ct,onMouseenter:e[15]||(e[15]=n=>T(n,g(f)("common.preview")||"Preview")),onFocus:e[16]||(e[16]=n=>T(n,g(f)("common.preview")||"Preview")),onMouseleave:_,onBlur:_},[...e[25]||(e[25]=[u("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24"},[u("g",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"},[u("path",{d:"M23.628 7.41c-.12-1.172-.08-3.583-.9-4.233c-1.921-1.51-6.143-1.11-8.815-1.19c-3.481-.15-7.193.14-10.625.24a.34.34 0 0 0 0 .67c3.472-.05 7.074-.29 10.575-.09c2.471.15 6.653-.14 8.254 1.16c.4.33.41 2.732.49 3.582a42 42 0 0 1 .08 9.005a13.8 13.8 0 0 1-.45 3.001c-2.42 1.4-19.69 2.381-20.72.55a21 21 0 0 1-.65-4.632a41.5 41.5 0 0 1 .12-7.964c.08 0 7.334.33 12.586.24c2.331 0 4.682-.13 6.764-.21a.33.33 0 0 0 0-.66c-7.714-.16-12.897-.43-19.31.05c.11-1.38.48-3.922.38-4.002a.3.3 0 0 0-.42 0c-.37.41-.29 1.77-.36 2.251s-.14 1.07-.2 1.6a45 45 0 0 0-.36 8.645a21.8 21.8 0 0 0 .66 5.002c1.46 2.702 17.248 1.461 20.95.43c1.45-.4 1.69-.8 1.871-1.95c.575-3.809.602-7.68.08-11.496"}),u("path",{d:"M4.528 5.237a.84.84 0 0 0-.21-1c-.77-.41-1.71.39-1 1.1a.83.83 0 0 0 1.21-.1m2.632-.25c.14-.14.19-.84-.2-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.2-.09m2.88 0a.83.83 0 0 0-.21-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.21-.09m-4.29 8.735c0 .08.23 2.471.31 2.561a.371.371 0 0 0 .63-.14c0-.09 0 0 .15-1.72a10 10 0 0 0-.11-2.232a5.3 5.3 0 0 1-.26-1.37a.3.3 0 0 0-.54-.24a6.8 6.8 0 0 0-.2 2.33c-1.281-.38-1.121.13-1.131-.42a15 15 0 0 0-.19-1.93c-.16-.17-.36-.17-.51.14a20 20 0 0 0-.43 3.471c.04.773.18 1.536.42 2.272c.26.4.7.22.7-.1c0-.09-.16-.09 0-1.862c.06-1.18-.23-.3 1.16-.76m5.033-2.552c.32-.07.41-.28.39-.37c0-.55-3.322-.34-3.462-.24s-.2.18-.18.28s0 .11 0 .16a3.8 3.8 0 0 0 1.591.361v.82a15 15 0 0 0-.13 3.132c0 .2-.09.94.17 1.16a.34.34 0 0 0 .48 0c.125-.35.196-.718.21-1.09a8 8 0 0 0 .14-3.232c0-.13.05-.7-.1-.89a8 8 0 0 0 .89-.09m5.544-.181a.69.69 0 0 0-.89-.44a2.8 2.8 0 0 0-1.252 1.001a2.3 2.3 0 0 0-.41-.83a1 1 0 0 0-1.6.27a7 7 0 0 0-.35 2.07c0 .571 0 2.642.06 2.762c.14 1.09 1 .51.63.13a17.6 17.6 0 0 1 .38-3.962c.32-1.18.32.2.39.51s.11 1.081.73 1.081s.48-.93 1.401-1.78q.075 1.345 0 2.69a15 15 0 0 0 0 1.811a.34.34 0 0 0 .68 0q.112-.861.11-1.73a16.7 16.7 0 0 0 .12-3.582m1.441-.201c-.05.16-.3 3.002-.31 3.202a6.3 6.3 0 0 0 .21 1.741c.33 1 1.21 1.07 2.291.82a3.7 3.7 0 0 0 1.14-.23c.21-.22.10-.59-.41-.64q-.817.096-1.64.07c-.44-.07-.34 0-.67-4.442q.015-.185 0-.37a.316.316 0 0 0-.23-.38a.316.316 0 0 0-.38.23"})])],-1)])],40,hn)):U("",!0)])],!0)])):U("",!0),Qe(u("div",wn,[u("div",{ref_key:"codeEditor",ref:d,class:oe(["code-editor-container",[p.stream?"":"code-height-placeholder",{"is-hidden":Ie.value}]])},null,2),Ie.value?(F(),ke(g(Ke),{key:0,class:oe(["code-pre-fallback",{"is-wrap":mt.value}]),style:ze(wt.value),node:p.node},null,8,["class","style","node"])):U("",!0)],512),[[et,!(O.value||!p.stream&&p.loading)]]),fe.value&&!b.value&&_e.value&&D.value==="html"?(F(),ke(Kt,{key:1,code:p.node.code,"is-dark":l.isDark,"on-close":()=>fe.value=!1},null,8,["code","is-dark","on-close"])):U("",!0),Qe(u("div",gn,[Ne(t.$slots,"loading",{loading:p.loading,stream:p.stream},()=>[e[26]||(e[26]=u("div",{class:"loading-skeleton"},[u("div",{class:"skeleton-line"}),u("div",{class:"skeleton-line"}),u("div",{class:"skeleton-line short"})],-1))],!0)],512),[[et,!p.stream&&p.loading]]),u("span",yn,Ye(Z.value?g(f)("common.copied")||"Copied":""),1)],6))}}),[["__scopeId","data-v-bf41db7f"]]);je.install=p=>{p.component(je.__name,je)};export{je as default};
|
|
22
|
+
</html>`});function I(N){var b;N.key!=="Escape"&&N.key!=="Esc"||(b=m.onClose)==null||b.call(m)}return Dt(()=>{typeof window<"u"&&window.addEventListener("keydown",I)}),ct(()=>{typeof window<"u"&&window.removeEventListener("keydown",I)}),(N,b)=>(F(),ke(jt,{to:"body"},[u("div",Xt,[u("div",{class:oe(["html-preview-frame__backdrop",{"html-preview-frame__backdrop--dark":m.isDark}]),onClick:b[2]||(b[2]=f=>{var d;return(d=m.onClose)==null?void 0:d.call(m)})},[u("div",{class:oe(["html-preview-frame",{"html-preview-frame--dark":m.isDark}]),onClick:b[1]||(b[1]=Lt(()=>{},["stop"]))},[u("div",Gt,[u("div",Jt,[b[3]||(b[3]=u("span",{class:"html-preview-frame__dot"},null,-1)),u("span",Ut,Ye(m.title||g(k)("common.preview")||"Preview"),1)]),u("button",{type:"button",class:oe(["html-preview-frame__close",{"html-preview-frame__close--dark":m.isDark}]),onClick:b[0]||(b[0]=f=>{var d;return(d=m.onClose)==null?void 0:d.call(m)})}," × ",2)]),u("iframe",{class:"html-preview-frame__iframe",sandbox:"allow-scripts allow-same-origin",srcdoc:l.value},null,8,Zt)],2)],2)])]))}}),[["__scopeId","data-v-296dd89d"]]);let te=null,$e=null,re=null,ne=null,He=null,De=null;const Le=new WeakMap;let Qt=0;const en={key:0,class:"code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",style:{color:"var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))","background-color":"var(--vscode-editor-background, var(--markstream-code-fallback-bg))"}},tn={class:"flex items-center gap-x-2 flex-1 overflow-hidden"},nn=["innerHTML"],on={class:"text-sm font-medium font-mono truncate"},ln={class:"flex items-center gap-x-2"},an=["aria-pressed"],rn=["disabled"],un=["disabled"],sn=["disabled"],cn=["aria-label"],dn={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},vn={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},mn=["aria-pressed"],fn={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},pn={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},hn=["aria-label"],wn={class:"code-editor-layer"},gn={class:"code-loading-placeholder"},yn={class:"sr-only","aria-live":"polite",role:"status"},at="__markstreamMonacoPassiveTouch__",je=rt(ut({__name:"CodeBlockNode",props:{node:{},isDark:{type:Boolean},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:void 0},lightTheme:{default:void 0},isShowPreview:{type:Boolean,default:!0},monacoOptions:{},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},themes:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},customId:{}},emits:["previewCode","copy"],setup(p,{emit:m}){var k;const l=p,I=m;typeof window<"u"&&(function(){var t;try{const e=window;if(e[at])return;const n=(t=window.Element)==null?void 0:t.prototype,o=n?.addEventListener;if(!n||!o)return;n.addEventListener=function(i,a,c){return i==="touchstart"&&(function(r,y){if(!r)return!1;const s=r;return!(typeof s.closest!="function"||!s.closest(".monaco-editor, .monaco-diff-editor")||y&&typeof y=="object"&&"passive"in y)})(this,c)?o.call(this,i,a,(function(r){return r==null?{passive:!0}:typeof r=="boolean"?{capture:r,passive:!0}:typeof r=="object"?"passive"in r?r:it(Te({},r),{passive:!0}):{passive:!0}})(c)):o.call(this,i,a,c)},e[at]=!0}catch{}})();const N=Tt(),b=B(()=>{const t=N?.vnode.props;return!(!t||!t.onPreviewCode&&!t.onPreviewCode)}),{t:f}=st(),d=M(null),X=M(null),Z=M(!1),D=M(Ee(l.node.language)),le=B(()=>Vt(D.value)),S=M(!1),O=M(!1),ue=M(!1),K=M(!1),se=M(!1),G=M(null);let be=0;const dt=Et(),ie=M(null),q=M(typeof window>"u");typeof window<"u"&&W(()=>X.value,t=>{var e;if((e=ie.value)==null||e.destroy(),ie.value=null,!t)return void(q.value=!1);const n=dt(t,{rootMargin:"400px"});ie.value=n,q.value=n.isVisible.value,n.whenVisible.then(()=>{q.value=!0})},{immediate:!0}),Nt(()=>{var t;(t=ie.value)==null||t.destroy(),ie.value=null});let L=null,ce=null,xe=()=>{},Me=()=>{},de=()=>null,j=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),$=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),Ce=()=>{},ve=()=>{},Q=null,Ve=()=>{var t;return String((t=l.node.language)!=null?t:"plaintext")},Be=()=>Y(null,null,function*(){});const P=B(()=>l.node.diff),We=B(()=>P.value?"diff":"single"),vt=M(We.value),me=M(!1),mt=B(()=>{var t;const e=(t=l.monacoOptions)==null?void 0:t.wordWrap;return e==null||String(e)!=="off"}),Ie=B(()=>typeof window<"u"&&!me.value&&!K.value),fe=M(!1);typeof window<"u"&&Y(null,null,function*(){try{const t=yield Yt();if(!t)return void(me.value=!0);const e=t.useMonaco,n=t.detectLanguage;if(typeof n=="function"&&(Ve=n),typeof e=="function"){const o=Je();if(o&&l.themes&&Array.isArray(l.themes)&&!l.themes.includes(o))throw new Error("Preferred theme not in provided themes array");const i=e(it(Te({wordWrap:"on",wrappingIndent:"same",themes:l.themes,theme:o},l.monacoOptions||{}),{onThemeChange(){Fe()}}));L=i.createEditor||L,ce=i.createDiffEditor||ce,xe=i.updateCode||xe,Me=i.updateDiff||Me,de=i.getEditor||de,j=i.getEditorView||j,$=i.getDiffEditorView||$,Ce=i.cleanupEditor||Ce,ve=i.safeClean||i.cleanupEditor||ve,Be=i.setTheme||Be,se.value=!0,d.value&&(yield he(d.value))}}catch{me.value=!0}});const z=M(typeof((k=l.monacoOptions)==null?void 0:k.fontSize)=="number"?l.monacoOptions.fontSize:Number.NaN),h=M(z.value),ft=B(()=>{const t=z.value,e=h.value;return typeof t=="number"&&Number.isFinite(t)&&t>0&&typeof e=="number"&&Number.isFinite(e)&&e>0}),qe=B(()=>{var t;const e=(t=l.monacoOptions)==null?void 0:t.fontSize;if(typeof e=="number"&&Number.isFinite(e)&&e>0)return e;const n=h.value;return typeof n=="number"&&Number.isFinite(n)&&n>0?n:12}),pt=B(()=>{var t;const e=(t=l.monacoOptions)==null?void 0:t.lineHeight;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:Math.round(1.5*qe.value)}),ht=B(()=>{var t;const e=(t=l.monacoOptions)==null?void 0:t.tabSize;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:4}),wt=B(()=>{var t;const e=(t=l.monacoOptions)==null?void 0:t.fontFamily;return Te({fontSize:`${qe.value}px`,lineHeight:`${pt.value}px`,tabSize:ht.value},typeof e=="string"&&e.trim()?{"--markstream-code-font-family":e.trim()}:{})});function Re(){var t,e,n,o,i;try{const a=P.value?(n=(e=(t=$())==null?void 0:t.getModifiedEditor)==null?void 0:e.call(t))!=null?n:$():j(),c=de(),r=(o=c?.EditorOption)==null?void 0:o.fontInfo;if(a&&r!=null){const y=(i=a.getOption)==null?void 0:i.call(a,r),s=y?.fontSize;if(typeof s=="number"&&Number.isFinite(s)&&s>0)return s}}catch{}try{const a=d.value;if(a){const c=a.querySelector(".view-lines .view-line");if(c)try{if(typeof window<"u"&&typeof window.getComputedStyle=="function"){const r=window.getComputedStyle(c).fontSize,y=r&&r.match(/^(\d+(?:\.\d+)?)/);if(y)return Number.parseFloat(y[1])}}catch{}}}catch{}return null}function Se(t){var e,n;try{const a=de(),c=(e=a?.EditorOption)==null?void 0:e.lineHeight;if(c!=null){const r=(n=t?.getOption)==null?void 0:n.call(t,c);if(typeof r=="number"&&r>0)return r}}catch{}const o=(function(){try{const a=d.value;if(!a)return null;const c=a.querySelector(".view-lines .view-line");if(c){const r=Math.ceil(c.getBoundingClientRect().height);if(r>0)return r}}catch{}return null})();if(o&&o>0)return o;const i=Number.isFinite(h.value)&&h.value>0?h.value:12;return Math.max(12,Math.round(1.35*i))}function Oe(){var t;if(Number.isFinite(h.value)&&h.value>0&&Number.isFinite(z.value))return h.value;const e=Re();return typeof((t=l.monacoOptions)==null?void 0:t.fontSize)=="number"?(z.value=l.monacoOptions.fontSize,h.value=l.monacoOptions.fontSize,h.value):e&&e>0?(z.value=e,h.value=e,e):(z.value=12,h.value=12,12)}function Ae(){var t,e,n,o,i,a,c,r,y,s,v,V,R,x;try{const w=P.value?$():j();if(!w)return null;if(P.value&&w?.getOriginalEditor&&w?.getModifiedEditor){const C=(t=w.getOriginalEditor)==null?void 0:t.call(w),E=(e=w.getModifiedEditor)==null?void 0:e.call(w);(n=C?.layout)==null||n.call(C),(o=E?.layout)==null||o.call(E);const ge=((i=C?.getContentHeight)==null?void 0:i.call(C))||0,Ue=((a=E?.getContentHeight)==null?void 0:a.call(E))||0,Ze=Math.max(ge,Ue);if(Ze>0)return Math.ceil(Ze+1);const Ot=((y=(r=(c=C?.getModel)==null?void 0:c.call(C))==null?void 0:r.getLineCount)==null?void 0:y.call(r))||1,Ft=((V=(v=(s=E?.getModel)==null?void 0:s.call(E))==null?void 0:v.getLineCount)==null?void 0:V.call(v))||1,_t=Math.max(Ot,Ft),Pt=Math.max(Se(C),Se(E));return Math.ceil(_t*(Pt+1.5)+0+1)}if(w?.getContentHeight){(R=w?.layout)==null||R.call(w);const C=w.getContentHeight();if(C>0)return Math.ceil(C+1)}const A=(x=w?.getModel)==null?void 0:x.call(w);let we=1;A&&typeof A.getLineCount=="function"&&(we=A.getLineCount());const Pe=Se(w);return Math.ceil(we*(Pe+1.5)+0+1)}catch{return null}}function Fe(){var t,e,n,o,i,a,c,r;const y=d.value,s=X.value;if(!y||!s)return;const v=y.querySelector(".monaco-editor")||y,V=v.querySelector(".monaco-editor-background")||v,R=v.querySelector(".view-lines")||v;let x=null,w=null,A=null;try{typeof window<"u"&&typeof window.getComputedStyle=="function"&&(x=window.getComputedStyle(v),w=V===v?x:window.getComputedStyle(V),A=R===v?x:window.getComputedStyle(R))}catch{x=null,w=null,A=null}const we=String((t=x?.getPropertyValue("--vscode-editor-foreground"))!=null?t:"").trim(),Pe=String((e=x?.getPropertyValue("--vscode-editor-background"))!=null?e:"").trim(),C=String((o=(n=x?.getPropertyValue("--vscode-editor-selectionBackground"))!=null?n:x?.getPropertyValue("--vscode-editor-hoverHighlightBackground"))!=null?o:"").trim(),E=we||String((a=(i=A?.color)!=null?i:x?.color)!=null?a:"").trim(),ge=Pe||String((r=(c=w?.backgroundColor)!=null?c:x?.backgroundColor)!=null?r:"").trim();E&&s.style.setProperty("--vscode-editor-foreground",E),ge&&s.style.setProperty("--vscode-editor-background",ge),C&&s.style.setProperty("--vscode-editor-selectionBackground",C)}function J(){try{const t=d.value;if(!t)return;const e=t.getBoundingClientRect(),n=window.scrollY+e.top,o=Ae();if(o!=null&&o>0){const i=e.height;t.style.height=`${Math.ceil(o)}px`,t.style.maxHeight="none";const a=Math.ceil(o)-i;a!==0&&n<window.scrollY&&window.scrollBy(0,a)}}catch{}}function ee(){var t;try{const e=d.value;if(!e)return;const n=e.getBoundingClientRect(),o=window.scrollY+n.top,i=n.height,a=(function(){var s,v;const V=(v=(s=l.monacoOptions)==null?void 0:s.MAX_HEIGHT)!=null?v:500;if(typeof V=="number")return V;const R=String(V).match(/^(\d+(?:\.\d+)?)/);return R?Number.parseFloat(R[1]):500})();if(be>0&&(be--,G.value!=null)){const s=Math.min(G.value,a);e.style.height=`${Math.ceil(s)}px`,e.style.maxHeight=`${Math.ceil(a)}px`,e.style.overflow="auto";const v=Math.ceil(s)-i;return void(v!==0&&o<window.scrollY&&window.scrollBy(0,v))}const c=Ae();if(c!=null&&c>0){const s=Math.min(c,a);e.style.height=`${Math.ceil(s)}px`,e.style.maxHeight=`${Math.ceil(a)}px`,e.style.overflow="auto";const v=Math.ceil(s)-i;return void(v!==0&&o<window.scrollY&&window.scrollBy(0,v))}if(G.value!=null){const s=Math.min(G.value,a);e.style.height=`${Math.ceil(s)}px`,e.style.maxHeight=`${Math.ceil(a)}px`,e.style.overflow="auto";const v=Math.ceil(s)-i;return void(v!==0&&o<window.scrollY&&window.scrollBy(0,v))}const r=Math.ceil(((t=e.getBoundingClientRect)==null?void 0:t.call(e).height)||0);if(r>0){const s=Math.min(r,a);e.style.height=`${Math.ceil(s)}px`,e.style.maxHeight=`${Math.ceil(a)}px`,e.style.overflow="auto";const v=Math.ceil(s)-i;return void(v!==0&&o<window.scrollY&&window.scrollBy(0,v))}const y=Number.parseFloat(e.style.height);if(!Number.isNaN(y)&&y>0){const s=Math.ceil(Math.min(y,a));e.style.height=`${s}px`;const v=s-i;v!==0&&o<window.scrollY&&window.scrollBy(0,v)}else{const s=Math.ceil(a);e.style.height=`${s}px`;const v=s-i;v!==0&&o<window.scrollY&&window.scrollBy(0,v)}e.style.maxHeight=`${Math.ceil(a)}px`,e.style.overflow="auto"}catch{}}const _e=B(()=>l.isShowPreview&&(D.value==="html"||D.value==="svg"));W(()=>l.node.language,t=>{D.value=Ee(t)}),W(()=>l.node.code,t=>Y(null,null,function*(){var e,n;if(l.stream!==!1){if(D.value||(D.value=Ee(Ve(t))),L&&!ue.value&&d.value)try{yield he(d.value)}catch{}P.value?Me(String((e=l.node.originalCode)!=null?e:""),String((n=l.node.updatedCode)!=null?n:""),le.value):xe(t,le.value),S.value&&ae(()=>J())}}));const gt=B(()=>{const t=D.value;return t?tt[t]||t.charAt(0).toUpperCase()+t.slice(1):tt[""]}),yt=B(()=>$t(D.value||"")),kt=B(()=>{const t={},e=i=>{if(i!=null)return typeof i=="number"?`${i}px`:String(i)},n=e(l.minWidth),o=e(l.maxWidth);return n&&(t.minWidth=n),o&&(t.maxWidth=o),t});function bt(){return Y(this,null,function*(){try{typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(l.node.code)),Z.value=!0,I("copy",l.node.code),setTimeout(()=>{Z.value=!1},1e3)}catch(t){console.error("复制失败:",t)}})}function Xe(t){return!t||t.disabled}function T(t,e,n="top"){if(Xe(t.currentTarget))return;const o=t,i=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;nt(t.currentTarget,e,n,!1,i,l.isDark)}function _(){Ht()}function Ge(t){if(Xe(t.currentTarget))return;const e=Z.value?f("common.copied")||"Copied":f("common.copy")||"Copy",n=t,o=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;nt(t.currentTarget,e,"top",!1,o,l.isDark)}function xt(){S.value=!S.value;const t=P.value?$():j(),e=d.value;t&&e&&(S.value?(pe(!0),e.style.maxHeight="none",e.style.overflow="visible",J()):(pe(!1),e.style.overflow="auto",ee()))}function Mt(){var t,e,n;if(O.value=!O.value,O.value){if(d.value){const o=Math.ceil(((e=(t=d.value).getBoundingClientRect)==null?void 0:e.call(t).height)||0);o>0&&(G.value=o)}pe(!1)}else{S.value&&pe(!0),d.value&&G.value!=null&&(d.value.style.height=`${G.value}px`);const o=P.value?$():j();try{(n=o?.layout)==null||n.call(o)}catch{}be=2,ae(()=>{S.value?J():ee()})}}function Ct(){if(!_e.value)return;const t=D.value;if(b.value){const e=t==="html"?"text/html":"image/svg+xml",n=t==="html"?f("artifacts.htmlPreviewTitle")||"HTML Preview":f("artifacts.svgPreviewTitle")||"SVG Preview";return void I("previewCode",{node:l.node,artifactType:e,artifactTitle:n,id:`temp-${t}-${Date.now()}`})}t==="html"&&(fe.value=!fe.value)}function pe(t){var e,n;try{if(P.value){const o=$();(e=o?.updateOptions)==null||e.call(o,{automaticLayout:t})}else{const o=j();(n=o?.updateOptions)==null||n.call(o,{automaticLayout:t})}}catch{}}function he(t){return L?Q||(ue.value=!0,Q=Y(null,null,function*(){yield(function(n){return Y(this,null,function*(){var o,i,a;if(!L)return;P.value?(ve(),ce?yield ce(n,String((o=l.node.originalCode)!=null?o:""),String((i=l.node.updatedCode)!=null?i:""),le.value):yield L(n,l.node.code,le.value)):yield L(n,l.node.code,le.value);const c=P.value?$():j();if(typeof((a=l.monacoOptions)==null?void 0:a.fontSize)=="number")c?.updateOptions({fontSize:l.monacoOptions.fontSize,automaticLayout:!1}),z.value=l.monacoOptions.fontSize,h.value=l.monacoOptions.fontSize;else{const r=Re();r&&r>0?(z.value=r,h.value=r):(z.value=12,h.value=12)}S.value||O.value||ee(),l.loading===!1&&(yield ye(),ae(()=>{S.value&&!O.value?J():O.value||ee()})),yield ye(),K.value=!0,Fe()})})(t)}).finally(()=>{Q=null}),Q):null}W(()=>h.value,(t,e)=>{const n=P.value?$():j();n&&typeof t=="number"&&Number.isFinite(t)&&t>0&&(n.updateOptions({fontSize:t}),S.value&&!O.value&&J())},{flush:"post",immediate:!1});const Bt=W(()=>[d.value,P.value,l.stream,l.loading,se.value,q.value],t=>Y(null,[t],function*([e,n,o,i,a,c]){if(!e||!L||!c||o===!1&&i!==!1)return;const r=he(e);if(r){try{yield r}catch{K.value=!1}Bt()}}));function Je(){return l.isDark?l.darkTheme:l.lightTheme}W(We,(t,e)=>Y(null,null,function*(){if(t!==e&&(vt.value=t,L&&d.value&&ue.value&&(l.stream!==!1||l.loading===!1)&&q.value))try{K.value=!1,ue.value=!1,Q=null,ve(),yield ye(),yield he(d.value)}catch{K.value=!1}})),W(()=>[l.isDark,l.darkTheme,l.lightTheme,se.value],()=>{se.value&&(function(){const t=Je();t&&(function(e,n){const o=(function(i){if(i==null)return null;if(typeof i=="string")return i;if(typeof i=="object"&&i&&"name"in i)return String(i.name);if(typeof i=="object"){const a=Le.get(i);if(a)return a;try{const r=JSON.stringify(i);if(r)return Le.set(i,r),r}catch{}const c="__theme_"+ ++Qt;return Le.set(i,c),c}return String(i)})(n);return o?(De=e,te||He!==o?te?(ne===o||$e===o||(re=n,ne=o),te):(re=n,ne=o,te=Y(null,null,function*(){for(;ne&&re!=null;){const i=re,a=ne;if(re=null,ne=null,He!==a)try{$e=a,yield(De??e)(i),He=a}catch{}}}).finally(()=>{te=null,$e=null}),te):Promise.resolve()):Promise.resolve()})(Be,t).then(()=>{K.value&&ae(()=>Fe())})})()}),W(()=>[l.monacoOptions,q.value],()=>{var t,e;if(!L||!q.value)return;const n=P.value?$():j(),o=typeof((t=l.monacoOptions)==null?void 0:t.fontSize)=="number"?l.monacoOptions.fontSize:Number.isFinite(h.value)?h.value:void 0;typeof o=="number"&&Number.isFinite(o)&&o>0&&((e=n?.updateOptions)==null||e.call(n,{fontSize:o})),S.value&&!O.value?J():O.value||ee()},{deep:!0});const St=W(()=>[l.loading,q.value],t=>Y(null,[t],function*([e,n]){n&&(e||(yield ye(),ae(()=>{O.value||(S.value?J():ee()),St()})))}),{immediate:!0,flush:"post"});return ct(()=>{Ce()}),(t,e)=>me.value?(F(),ke(g(Ke),{key:0,node:p.node,loading:l.loading},null,8,["node","loading"])):(F(),H("div",{key:1,ref_key:"container",ref:X,style:ze(kt.value),class:oe(["code-block-container my-4 rounded-lg border overflow-hidden shadow-sm",[l.isDark?"border-gray-700/30 bg-gray-900":"border-gray-200 bg-white",{"is-rendering":l.loading,"is-dark":l.isDark}]])},[l.showHeader?(F(),H("div",en,[Ne(t.$slots,"header-left",{},()=>[u("div",tn,[u("span",{class:"icon-slot h-4 w-4 flex-shrink-0",innerHTML:yt.value},null,8,nn),u("span",on,Ye(gt.value),1)])],!0),Ne(t.$slots,"header-right",{},()=>[u("div",ln,[u("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-pressed":O.value,onClick:Mt,onMouseenter:e[0]||(e[0]=n=>T(n,O.value?g(f)("common.expand")||"Expand":g(f)("common.collapse")||"Collapse")),onFocus:e[1]||(e[1]=n=>T(n,O.value?g(f)("common.expand")||"Expand":g(f)("common.collapse")||"Collapse")),onMouseleave:_,onBlur:_},[(F(),H("svg",{style:ze({rotate:O.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[...e[17]||(e[17]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,an),l.showFontSizeButtons&&l.enableFontSizeControl?(F(),H(zt,{key:0},[u("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:!!Number.isFinite(h.value)&&h.value<=10,onClick:e[2]||(e[2]=n=>(function(){const o=Oe(),i=Math.max(10,o-1);h.value=i})()),onMouseenter:e[3]||(e[3]=n=>T(n,g(f)("common.decrease")||"Decrease")),onFocus:e[4]||(e[4]=n=>T(n,g(f)("common.decrease")||"Decrease")),onMouseleave:_,onBlur:_},[...e[18]||(e[18]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)])],40,rn),u("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:!ft.value||h.value===z.value,onClick:e[5]||(e[5]=n=>(Oe(),void(Number.isFinite(z.value)&&(h.value=z.value)))),onMouseenter:e[6]||(e[6]=n=>T(n,g(f)("common.reset")||"Reset")),onFocus:e[7]||(e[7]=n=>T(n,g(f)("common.reset")||"Reset")),onMouseleave:_,onBlur:_},[...e[19]||(e[19]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),u("path",{d:"M3 3v5h5"})])],-1)])],40,un),u("button",{type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",disabled:!!Number.isFinite(h.value)&&h.value>=36,onClick:e[8]||(e[8]=n=>(function(){const o=Oe(),i=Math.min(36,o+1);h.value=i})()),onMouseenter:e[9]||(e[9]=n=>T(n,g(f)("common.increase")||"Increase")),onFocus:e[10]||(e[10]=n=>T(n,g(f)("common.increase")||"Increase")),onMouseleave:_,onBlur:_},[...e[20]||(e[20]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)])],40,sn)],64)):U("",!0),l.showCopyButton?(F(),H("button",{key:1,type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-label":Z.value?g(f)("common.copied")||"Copied":g(f)("common.copy")||"Copy",onClick:bt,onMouseenter:e[11]||(e[11]=n=>Ge(n)),onFocus:e[12]||(e[12]=n=>Ge(n)),onMouseleave:_,onBlur:_},[Z.value?(F(),H("svg",vn,[...e[22]||(e[22]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(F(),H("svg",dn,[...e[21]||(e[21]=[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),u("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,cn)):U("",!0),l.showExpandButton?(F(),H("button",{key:2,type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-pressed":S.value,onClick:xt,onMouseenter:e[13]||(e[13]=n=>T(n,S.value?g(f)("common.collapse")||"Collapse":g(f)("common.expand")||"Expand")),onFocus:e[14]||(e[14]=n=>T(n,S.value?g(f)("common.collapse")||"Collapse":g(f)("common.expand")||"Expand")),onMouseleave:_,onBlur:_},[S.value?(F(),H("svg",fn,[...e[23]||(e[23]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])):(F(),H("svg",pn,[...e[24]||(e[24]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])]))],40,mn)):U("",!0),_e.value&&l.showPreviewButton?(F(),H("button",{key:3,type:"button",class:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]","aria-label":g(f)("common.preview")||"Preview",onClick:Ct,onMouseenter:e[15]||(e[15]=n=>T(n,g(f)("common.preview")||"Preview")),onFocus:e[16]||(e[16]=n=>T(n,g(f)("common.preview")||"Preview")),onMouseleave:_,onBlur:_},[...e[25]||(e[25]=[u("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24"},[u("g",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"},[u("path",{d:"M23.628 7.41c-.12-1.172-.08-3.583-.9-4.233c-1.921-1.51-6.143-1.11-8.815-1.19c-3.481-.15-7.193.14-10.625.24a.34.34 0 0 0 0 .67c3.472-.05 7.074-.29 10.575-.09c2.471.15 6.653-.14 8.254 1.16c.4.33.41 2.732.49 3.582a42 42 0 0 1 .08 9.005a13.8 13.8 0 0 1-.45 3.001c-2.42 1.4-19.69 2.381-20.72.55a21 21 0 0 1-.65-4.632a41.5 41.5 0 0 1 .12-7.964c.08 0 7.334.33 12.586.24c2.331 0 4.682-.13 6.764-.21a.33.33 0 0 0 0-.66c-7.714-.16-12.897-.43-19.31.05c.11-1.38.48-3.922.38-4.002a.3.3 0 0 0-.42 0c-.37.41-.29 1.77-.36 2.251s-.14 1.07-.2 1.6a45 45 0 0 0-.36 8.645a21.8 21.8 0 0 0 .66 5.002c1.46 2.702 17.248 1.461 20.95.43c1.45-.4 1.69-.8 1.871-1.95c.575-3.809.602-7.68.08-11.496"}),u("path",{d:"M4.528 5.237a.84.84 0 0 0-.21-1c-.77-.41-1.71.39-1 1.1a.83.83 0 0 0 1.21-.1m2.632-.25c.14-.14.19-.84-.2-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.2-.09m2.88 0a.83.83 0 0 0-.21-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.21-.09m-4.29 8.735c0 .08.23 2.471.31 2.561a.371.371 0 0 0 .63-.14c0-.09 0 0 .15-1.72a10 10 0 0 0-.11-2.232a5.3 5.3 0 0 1-.26-1.37a.3.3 0 0 0-.54-.24a6.8 6.8 0 0 0-.2 2.33c-1.281-.38-1.121.13-1.131-.42a15 15 0 0 0-.19-1.93c-.16-.17-.36-.17-.51.14a20 20 0 0 0-.43 3.471c.04.773.18 1.536.42 2.272c.26.4.7.22.7-.1c0-.09-.16-.09 0-1.862c.06-1.18-.23-.3 1.16-.76m5.033-2.552c.32-.07.41-.28.39-.37c0-.55-3.322-.34-3.462-.24s-.2.18-.18.28s0 .11 0 .16a3.8 3.8 0 0 0 1.591.361v.82a15 15 0 0 0-.13 3.132c0 .2-.09.94.17 1.16a.34.34 0 0 0 .48 0c.125-.35.196-.718.21-1.09a8 8 0 0 0 .14-3.232c0-.13.05-.7-.1-.89a8 8 0 0 0 .89-.09m5.544-.181a.69.69 0 0 0-.89-.44a2.8 2.8 0 0 0-1.252 1.001a2.3 2.3 0 0 0-.41-.83a1 1 0 0 0-1.6.27a7 7 0 0 0-.35 2.07c0 .571 0 2.642.06 2.762c.14 1.09 1 .51.63.13a17.6 17.6 0 0 1 .38-3.962c.32-1.18.32.2.39.51s.11 1.081.73 1.081s.48-.93 1.401-1.78q.075 1.345 0 2.69a15 15 0 0 0 0 1.811a.34.34 0 0 0 .68 0q.112-.861.11-1.73a16.7 16.7 0 0 0 .12-3.582m1.441-.201c-.05.16-.3 3.002-.31 3.202a6.3 6.3 0 0 0 .21 1.741c.33 1 1.21 1.07 2.291.82a3.7 3.7 0 0 0 1.14-.23c.21-.22.10-.59-.41-.64q-.817.096-1.64.07c-.44-.07-.34 0-.67-4.442q.015-.185 0-.37a.316.316 0 0 0-.23-.38a.316.316 0 0 0-.38.23"})])],-1)])],40,hn)):U("",!0)])],!0)])):U("",!0),Qe(u("div",wn,[u("div",{ref_key:"codeEditor",ref:d,class:oe(["code-editor-container",[p.stream?"":"code-height-placeholder",{"is-hidden":Ie.value}]])},null,2),Ie.value?(F(),ke(g(Ke),{key:0,class:oe(["code-pre-fallback",{"is-wrap":mt.value}]),style:ze(wt.value),node:p.node},null,8,["class","style","node"])):U("",!0)],512),[[et,!(O.value||!p.stream&&p.loading)]]),fe.value&&!b.value&&_e.value&&D.value==="html"?(F(),ke(Kt,{key:1,code:p.node.code,"is-dark":l.isDark,"on-close":()=>fe.value=!1},null,8,["code","is-dark","on-close"])):U("",!0),Qe(u("div",gn,[Ne(t.$slots,"loading",{loading:p.loading,stream:p.stream},()=>[e[26]||(e[26]=u("div",{class:"loading-skeleton"},[u("div",{class:"skeleton-line"}),u("div",{class:"skeleton-line"}),u("div",{class:"skeleton-line short"})],-1))],!0)],512),[[et,!p.stream&&p.loading]]),u("span",yn,Ye(Z.value?g(f)("common.copied")||"Copied":""),1)],6))}}),[["__scopeId","data-v-bf41db7f"]]);je.install=p=>{p.component(je.__name,je)};export{je as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as a,c as s,a as e,C as t}from"./Btu8KrP7.js";import{_ as i}from"./D5mZhIOc.js";import"./BSycTytT.js";import"./D8IUtoH8.js";import"./B8Q-DreI.js";import"./E7Ix3tcC.js";var u={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{u as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as j,$ as R,a as L,o as z,a0 as B,a1 as O,
|
|
1
|
+
import{d as j,$ as R,a as L,o as z,a0 as B,a1 as O,r as E,g as H,a2 as I,a3 as U,a4 as N,a5 as q,a6 as V,a7 as A,a8 as D,C as p,a9 as M,aa as $,ab as F,ac as P,ad as W,ae as G,af as K,f as Q,j as J,n as S,H as C,y as X,p as Y,ag as Z}from"./E7Ix3tcC.js";import{_ as ee}from"./DlAUqK2U.js";import{u as te}from"./B1-PJYWH.js";const ne=(...t)=>t.find(o=>o!==void 0);function ae(t){const o=t.componentName||"NuxtLink";function f(e){return typeof e=="string"&&e.startsWith("#")}function k(e,l,d){const a=d??t.trailingSlash;if(!e||a!=="append"&&a!=="remove")return e;if(typeof e=="string")return _(e,a);const i="path"in e&&e.path!==void 0?e.path:l(e).path;return{...e,name:void 0,path:_(i,a)}}function w(e){const l=R(),d=F(),a=p(()=>!!e.target&&e.target!=="_self"),i=p(()=>{const s=e.to||e.href||"";return typeof s=="string"&&P(s,{acceptRelative:!0})}),b=q("RouterLink"),h=b&&typeof b!="string"?b.useLink:void 0,c=p(()=>{if(e.external)return!0;const s=e.to||e.href||"";return typeof s=="object"?!1:s===""||i.value}),r=p(()=>{const s=e.to||e.href||"";return c.value?s:k(s,l.resolve,e.trailingSlash)}),g=c.value?void 0:h?.({...e,to:r}),m=p(()=>{const s=e.trailingSlash??t.trailingSlash;if(!r.value||i.value||f(r.value))return r.value;if(c.value){const x=typeof r.value=="object"&&"path"in r.value?A(r.value):r.value,y=typeof x=="object"?l.resolve(x).href:x;return _(y,s)}return typeof r.value=="object"?l.resolve(r.value)?.href??null:_($(d.app.baseURL,r.value),s)});return{to:r,hasTarget:a,isAbsoluteUrl:i,isExternal:c,href:m,isActive:g?.isActive??p(()=>r.value===l.currentRoute.value.path),isExactActive:g?.isExactActive??p(()=>r.value===l.currentRoute.value.path),route:g?.route??p(()=>l.resolve(r.value)),async navigate(s){await M(m.value,{replace:e.replace,external:c.value||a.value})}}}return j({name:o,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1},trailingSlash:{type:String,default:void 0,required:!1}},useLink:w,setup(e,{slots:l}){const d=R(),{to:a,href:i,navigate:b,isExternal:h,hasTarget:c,isAbsoluteUrl:r}=w(e),g=U(!1),m=E(null),s=u=>{m.value=e.custom?u?.$el?.nextElementSibling:u?.$el};function x(u){return!g.value&&(typeof e.prefetchOn=="string"?e.prefetchOn===u:e.prefetchOn?.[u]??t.prefetchOn?.[u])&&(e.prefetch??t.prefetch)!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!le()}async function y(u=L()){if(g.value)return;g.value=!0;const v=typeof a.value=="string"?a.value:h.value?A(a.value):d.resolve(a.value).fullPath,n=h.value?new URL(v,window.location.href).href:v;await Promise.all([u.hooks.callHook("link:prefetch",n).catch(()=>{}),!h.value&&!c.value&&D(a.value,d).catch(()=>{})])}if(x("visibility")){const u=L();let v,n=null;z(()=>{const T=ie();B(()=>{v=O(()=>{m?.value?.tagName&&(n=T.observe(m.value,async()=>{n?.(),n=null,await y(u)}))})})}),H(()=>{v&&I(v),n?.(),n=null})}return()=>{if(!h.value&&!c.value&&!f(a.value)){const n={ref:s,to:a.value,activeClass:e.activeClass||t.activeClass,exactActiveClass:e.exactActiveClass||t.exactActiveClass,replace:e.replace,ariaCurrentValue:e.ariaCurrentValue,custom:e.custom};return e.custom||(x("interaction")&&(n.onPointerenter=y.bind(null,void 0),n.onFocus=y.bind(null,void 0)),g.value&&(n.class=e.prefetchedClass||t.prefetchedClass),n.rel=e.rel||void 0),N(q("RouterLink"),n,l.default)}const u=e.target||null,v=ne(e.noRel?"":e.rel,t.externalRelAttribute,r.value||c.value?"noopener noreferrer":"")||null;return e.custom?l.default?l.default({href:i.value,navigate:b,prefetch:y,get route(){if(!i.value)return;const n=new URL(i.value,window.location.href);return{path:n.pathname,fullPath:n.pathname,get query(){return V(n.search)},hash:n.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:i.value}},rel:v,target:u,isExternal:h.value||c.value,isActive:!1,isExactActive:!1}):null:N("a",{ref:m,href:i.value||null,rel:v,target:u,onClick:n=>{if(!(h.value||c.value))return n.preventDefault(),e.replace?d.replace(i.value):d.push(i.value)}},l.default?.())}}})}const re=ae(K);function _(t,o){const f=o==="append"?W:G;return P(t)&&!t.startsWith("http")?t:f(t,!0)}function ie(){const t=L();if(t._observer)return t._observer;let o=null;const f=new Map,k=(e,l)=>(o||=new IntersectionObserver(d=>{for(const a of d){const i=f.get(a.target);(a.isIntersecting||a.intersectionRatio>0)&&i&&i()}}),f.set(e,l),o.observe(e),()=>{f.delete(e),o?.unobserve(e),f.size===0&&(o?.disconnect(),o=null)});return t._observer={observe:k}}const oe=/2g/;function le(){const t=navigator.connection;return!!(t&&(t.saveData||oe.test(t.effectiveType)))}const se={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},ue={class:"max-w-520px text-center"},ce=["textContent"],fe=["textContent"],de=["textContent"],ve={class:"flex items-center justify-center w-full"},he={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},status:{type:Number,default:404},statusText:{type:String,default:"Page not found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const o=t;return te({title:`${o.status} - ${o.statusText} | ${o.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(f,k)=>{const w=re;return J(),Q("div",se,[S("div",ue,[S("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:C(t.status)},null,8,ce),S("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:C(t.statusText)},null,8,fe),S("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:C(t.description)},null,8,de),S("div",ve,[X(w,{to:"/",class:"font-medium hover:text-[#00DC82] text-sm underline underline-offset-3"},{default:Y(()=>[Z(C(t.backHome),1)]),_:1})])])])}}},me=ee(he,[["__scopeId","data-v-c8d5998f"]]);export{me as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as w,D as te,F as ae,H as he,e as ue,l as K,b9 as P,d as Y,b as pe,a as fe,p as me,q as ge,g as ye,s as Se,E as ve,ba as xe,y as be}from"./BhmAmx9l.js";import{s as we}from"./DnQfmNyQ.js";import{p as Ce}from"./BAc2FnCt.js";import{p as Te}from"./Be50z1my.js";import{b as O}from"./DX6XiGOO.js";import{o as J}from"./CmKTTxBW.js";import"./DpZYRxI5.js";import"./D9MU2mrz.js";import"./CVP1z2kv.js";import"./Gi6I4Gst.js";function Le(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function $e(){return this.eachAfter(Le)}function Ae(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Fe(t,a){for(var l=this,n=[l],o,s,d=-1;l=n.pop();)if(t.call(a,l,++d,this),o=l.children)for(s=o.length-1;s>=0;--s)n.push(o[s]);return this}function ke(t,a){for(var l=this,n=[l],o=[],s,d,h,m=-1;l=n.pop();)if(o.push(l),s=l.children)for(d=0,h=s.length;d<h;++d)n.push(s[d]);for(;l=o.pop();)t.call(a,l,++m,this);return this}function Ne(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function Me(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,o=n&&n.length;--o>=0;)l+=n[o].value;a.value=l})}function _e(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function ze(t){for(var a=this,l=Ve(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var o=n.length;t!==l;)n.splice(o,0,t),t=t.parent;return n}function Ve(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),o=null;for(t=l.pop(),a=n.pop();t===a;)o=t,t=l.pop(),a=n.pop();return o}function De(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Pe(){return Array.from(this)}function Be(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Ee(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*Re(){var t=this,a,l=[t],n,o,s;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(o=0,s=n.length;o<s;++o)l.push(n[o]);while(l.length)}function Q(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Ie)):a===void 0&&(a=He);for(var l=new U(t),n,o=[l],s,d,h,m;n=o.pop();)if((d=a(n.data))&&(m=(d=Array.from(d)).length))for(n.children=d,h=m-1;h>=0;--h)o.push(s=d[h]=new U(d[h])),s.parent=n,s.depth=n.depth+1;return l.eachBefore(qe)}function We(){return Q(this).eachBefore(Oe)}function He(t){return t.children}function Ie(t){return Array.isArray(t)?t[1]:null}function Oe(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function qe(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function U(t){this.data=t,this.depth=this.height=0,this.parent=null}U.prototype=Q.prototype={constructor:U,count:$e,each:Ae,eachAfter:ke,eachBefore:Fe,find:Ne,sum:Me,sort:_e,path:ze,ancestors:De,descendants:Pe,leaves:Be,links:Ee,copy:We,[Symbol.iterator]:Re};function Ge(t){if(typeof t!="function")throw new Error;return t}function q(){return 0}function G(t){return function(){return t}}function Xe(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function je(t,a,l,n,o){for(var s=t.children,d,h=-1,m=s.length,c=t.value&&(n-a)/t.value;++h<m;)d=s[h],d.y0=l,d.y1=o,d.x0=a,d.x1=a+=d.value*c}function Ye(t,a,l,n,o){for(var s=t.children,d,h=-1,m=s.length,c=t.value&&(o-l)/t.value;++h<m;)d=s[h],d.x0=a,d.x1=n,d.y0=l,d.y1=l+=d.value*c}var Ue=(1+Math.sqrt(5))/2;function Ze(t,a,l,n,o,s){for(var d=[],h=a.children,m,c,u=0,b=0,r=h.length,x,S,v=a.value,p,g,N,k,V,R,M;u<r;){x=o-l,S=s-n;do p=h[b++].value;while(!p&&b<r);for(g=N=p,R=Math.max(S/x,x/S)/(v*t),M=p*p*R,V=Math.max(N/M,M/g);b<r;++b){if(p+=c=h[b].value,c<g&&(g=c),c>N&&(N=c),M=p*p*R,k=Math.max(N/M,M/g),k>V){p-=c;break}V=k}d.push(m={value:p,dice:x<S,children:h.slice(u,b)}),m.dice?je(m,l,n,o,v?n+=S*p/v:s):Ye(m,l,n,v?l+=x*p/v:o,s),v-=p,u=b}return d}const Je=(function t(a){function l(n,o,s,d,h){Ze(a,n,o,s,d,h)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(Ue);function Ke(){var t=Je,a=!1,l=1,n=1,o=[0],s=q,d=q,h=q,m=q,c=q;function u(r){return r.x0=r.y0=0,r.x1=l,r.y1=n,r.eachBefore(b),o=[0],a&&r.eachBefore(Xe),r}function b(r){var x=o[r.depth],S=r.x0+x,v=r.y0+x,p=r.x1-x,g=r.y1-x;p<S&&(S=p=(S+p)/2),g<v&&(v=g=(v+g)/2),r.x0=S,r.y0=v,r.x1=p,r.y1=g,r.children&&(x=o[r.depth+1]=s(r)/2,S+=c(r)-x,v+=d(r)-x,p-=h(r)-x,g-=m(r)-x,p<S&&(S=p=(S+p)/2),g<v&&(v=g=(v+g)/2),t(r,S,v,p,g))}return u.round=function(r){return arguments.length?(a=!!r,u):a},u.size=function(r){return arguments.length?(l=+r[0],n=+r[1],u):[l,n]},u.tile=function(r){return arguments.length?(t=Ge(r),u):t},u.padding=function(r){return arguments.length?u.paddingInner(r).paddingOuter(r):u.paddingInner()},u.paddingInner=function(r){return arguments.length?(s=typeof r=="function"?r:G(+r),u):s},u.paddingOuter=function(r){return arguments.length?u.paddingTop(r).paddingRight(r).paddingBottom(r).paddingLeft(r):u.paddingTop()},u.paddingTop=function(r){return arguments.length?(d=typeof r=="function"?r:G(+r),u):d},u.paddingRight=function(r){return arguments.length?(h=typeof r=="function"?r:G(+r),u):h},u.paddingBottom=function(r){return arguments.length?(m=typeof r=="function"?r:G(+r),u):m},u.paddingLeft=function(r){return arguments.length?(c=typeof r=="function"?r:G(+r),u):c},u}var E,ne=(E=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=pe,this.getAccTitle=fe,this.setDiagramTitle=me,this.getDiagramTitle=ge,this.getAccDescription=ye,this.setAccDescription=Se}getNodes(){return this.nodes}getConfig(){const a=ve,l=ae();return te({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},o=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");o&&o.forEach(s=>{xe(s)&&(n?.textStyles?n.textStyles.push(s):n.textStyles=[s]),n?.styles?n.styles.push(s):n.styles=[s]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){be(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(E,"TreeMapDB"),E);function le(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const o={name:n.name,children:n.type==="Leaf"?void 0:[]};for(o.classSelector=n?.classSelector,n?.cssCompiledStyles&&(o.cssCompiledStyles=[n.cssCompiledStyles]),n.type==="Leaf"&&n.value!==void 0&&(o.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(o);else{const s=l[l.length-1].node;s.children?s.children.push(o):s.children=[o]}n.type!=="Leaf"&&l.push({node:o,level:n.level})}),a}w(le,"buildHierarchy");var Qe=w((t,a)=>{Ce(t,a);const l=[];for(const s of t.TreemapRows??[])s.$type==="ClassDefStatement"&&a.addClass(s.className??"",s.styleText??"");for(const s of t.TreemapRows??[]){const d=s.item;if(!d)continue;const h=s.indent?parseInt(s.indent):0,m=et(d),c=d.classSelector?a.getStylesForClass(d.classSelector):[],u=c.length>0?c.join(";"):void 0,b={level:h,name:m,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:u};l.push(b)}const n=le(l),o=w((s,d)=>{for(const h of s)a.addNode(h,d),h.children&&h.children.length>0&&o(h.children,d+1)},"addNodesRecursively");o(n,0)},"populate"),et=w(t=>t.name?String(t.name):"","getItemName"),re={parser:{yy:void 0},parse:w(async t=>{try{const l=await Te("treemap",t);K.debug("Treemap AST:",l);const n=re.parser?.yy;if(!(n instanceof ne))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Qe(l,n)}catch(a){throw K.error("Error parsing treemap:",a),a}},"parse")},tt=10,B=10,X=25,at=w((t,a,l,n)=>{const o=n.db,s=o.getConfig(),d=s.padding??tt,h=o.getDiagramTitle(),m=o.getRoot(),{themeVariables:c}=ae();if(!m)return;const u=h?30:0,b=he(a),r=s.nodeWidth?s.nodeWidth*B:960,x=s.nodeHeight?s.nodeHeight*B:500,S=r,v=x+u;b.attr("viewBox",`0 0 ${S} ${v}`),ue(b,v,S,s.useMaxWidth);let p;try{const e=s.valueFormat||",";if(e==="$0,0")p=w(i=>"$"+O(",")(i),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const i=/\.\d+/.exec(e),f=i?i[0]:"";p=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const i=e.substring(1);p=w(f=>"$"+O(i||"")(f),"valueFormat")}else p=O(e)}catch(e){K.error("Error creating format function:",e),p=O(",")}const g=J().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=J().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),k=J().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);h&&b.append("text").attr("x",S/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const V=b.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),R=Q(m).sum(e=>e.value??0).sort((e,i)=>(i.value??0)-(e.value??0)),ee=Ke().size([r,x]).paddingTop(e=>e.children&&e.children.length>0?X+B:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?B:0).paddingRight(e=>e.children&&e.children.length>0?B:0).paddingBottom(e=>e.children&&e.children.length>0?B:0).round(!0)(R),se=ee.descendants().filter(e=>e.children&&e.children.length>0),W=V.selectAll(".treemapSection").data(se).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),W.append("clipPath").attr("id",(e,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,i)=>`treemapSection section${i}`).attr("fill",e=>g(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>N(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const i=P({cssCompiledStyles:e.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),W.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("style",e=>{if(e.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const i=Y(this),f=e.data.name;i.text(f);const C=e.x1-e.x0,L=6;let $;s.showValues!==!1&&e.value?$=C-10-30-10-L:$=C-L-6;const A=Math.max(15,$),y=i.node();if(y.getComputedTextLength()>A){let T=f;for(;T.length>0;){if(T=f.substring(0,T.length-1),T.length===0){i.text("..."),y.getComputedTextLength()>A&&i.text("");break}if(i.text(T+"..."),y.getComputedTextLength()<=A)break}}}),s.showValues!==!1&&W.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?p(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const ie=ee.leaves(),j=V.selectAll(".treemapLeafGroup").data(ie).enter().append("g").attr("class",(e,i)=>`treemapNode treemapLeafGroup leaf${i}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);j.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?g(e.parent.data.name):g(e.data.name)).attr("style",e=>P({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?g(e.parent.data.name):g(e.data.name)).attr("stroke-width",3),j.append("clipPath").attr("id",(e,i)=>`clip-${a}-${i}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),j.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const i="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+k(e.data.name)+";",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,i)=>`url(#clip-${a}-${i})`).text(e=>e.data.name).each(function(e){const i=Y(this),f=e.x1-e.x0,C=e.y1-e.y0,L=i.node(),$=4,D=f-2*$,A=C-2*$;if(D<10||A<10){i.style("display","none");return}let y=parseInt(i.style("font-size"),10);const _=8,F=28,T=.6,z=6,H=2;for(;L.getComputedTextLength()>D&&y>_;)y--,i.style("font-size",`${y}px`);let I=Math.max(z,Math.min(F,Math.round(y*T))),Z=y+H+I;for(;Z>A&&y>_&&(y--,I=Math.max(z,Math.min(F,Math.round(y*T))),!(I<z&&y===_));)i.style("font-size",`${y}px`),Z=y+H+I;i.style("font-size",`${y}px`),(L.getComputedTextLength()>D||y<_||A<y)&&i.style("display","none")}),s.showValues!==!1&&j.append("text").attr("class","treemapValue").attr("x",i=>(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+k(i.data.name)+";",C=P({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?p(i.value):"").each(function(i){const f=Y(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=Y(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const $=parseFloat(L.style("font-size")),D=28,A=.6,y=6,_=2,F=Math.max(y,Math.min(D,Math.round($*A)));f.style("font-size",`${F}px`);const z=(i.y1-i.y0)/2+$/2+_;f.attr("y",z);const H=i.x1-i.x0,ce=i.y1-i.y0-4,de=H-8;f.node().getComputedTextLength()>de||z+F>ce||F<y?f.style("display","none"):f.style("display",null)});const oe=s.diagramPadding??8;we(b,oe,"flowchart",s?.useMaxWidth||!1)},"draw"),nt=w(function(t,a){return a.db.getClasses()},"getClasses"),lt={draw:at,getClasses:nt},rt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},st=w(({treemap:t}={})=>{const a=te(rt,t);return`
|
|
1
|
+
import{_ as w,D as te,E as ae,H as he,e as ue,l as K,b9 as P,d as Y,b as pe,a as fe,p as me,q as ge,g as ye,s as Se,F as ve,ba as xe,y as be}from"./D5mZhIOc.js";import{s as we}from"./B8Q-DreI.js";import{p as Ce}from"./CtCaJz7N.js";import{p as Te}from"./CjvcAzGt.js";import{b as O}from"./DX6XiGOO.js";import{o as J}from"./CmKTTxBW.js";import"./E7Ix3tcC.js";import"./CUe0quIq.js";import"./BW7XEYaa.js";import"./Gi6I4Gst.js";function Le(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function $e(){return this.eachAfter(Le)}function Ae(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Fe(t,a){for(var l=this,n=[l],o,s,d=-1;l=n.pop();)if(t.call(a,l,++d,this),o=l.children)for(s=o.length-1;s>=0;--s)n.push(o[s]);return this}function ke(t,a){for(var l=this,n=[l],o=[],s,d,h,m=-1;l=n.pop();)if(o.push(l),s=l.children)for(d=0,h=s.length;d<h;++d)n.push(s[d]);for(;l=o.pop();)t.call(a,l,++m,this);return this}function Ne(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function Me(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,o=n&&n.length;--o>=0;)l+=n[o].value;a.value=l})}function _e(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function ze(t){for(var a=this,l=Ve(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var o=n.length;t!==l;)n.splice(o,0,t),t=t.parent;return n}function Ve(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),o=null;for(t=l.pop(),a=n.pop();t===a;)o=t,t=l.pop(),a=n.pop();return o}function De(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Pe(){return Array.from(this)}function Be(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Ee(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*Re(){var t=this,a,l=[t],n,o,s;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(o=0,s=n.length;o<s;++o)l.push(n[o]);while(l.length)}function Q(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Ie)):a===void 0&&(a=He);for(var l=new U(t),n,o=[l],s,d,h,m;n=o.pop();)if((d=a(n.data))&&(m=(d=Array.from(d)).length))for(n.children=d,h=m-1;h>=0;--h)o.push(s=d[h]=new U(d[h])),s.parent=n,s.depth=n.depth+1;return l.eachBefore(qe)}function We(){return Q(this).eachBefore(Oe)}function He(t){return t.children}function Ie(t){return Array.isArray(t)?t[1]:null}function Oe(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function qe(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function U(t){this.data=t,this.depth=this.height=0,this.parent=null}U.prototype=Q.prototype={constructor:U,count:$e,each:Ae,eachAfter:ke,eachBefore:Fe,find:Ne,sum:Me,sort:_e,path:ze,ancestors:De,descendants:Pe,leaves:Be,links:Ee,copy:We,[Symbol.iterator]:Re};function Ge(t){if(typeof t!="function")throw new Error;return t}function q(){return 0}function G(t){return function(){return t}}function Xe(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function je(t,a,l,n,o){for(var s=t.children,d,h=-1,m=s.length,c=t.value&&(n-a)/t.value;++h<m;)d=s[h],d.y0=l,d.y1=o,d.x0=a,d.x1=a+=d.value*c}function Ye(t,a,l,n,o){for(var s=t.children,d,h=-1,m=s.length,c=t.value&&(o-l)/t.value;++h<m;)d=s[h],d.x0=a,d.x1=n,d.y0=l,d.y1=l+=d.value*c}var Ue=(1+Math.sqrt(5))/2;function Ze(t,a,l,n,o,s){for(var d=[],h=a.children,m,c,u=0,b=0,r=h.length,x,S,v=a.value,p,g,N,k,V,R,M;u<r;){x=o-l,S=s-n;do p=h[b++].value;while(!p&&b<r);for(g=N=p,R=Math.max(S/x,x/S)/(v*t),M=p*p*R,V=Math.max(N/M,M/g);b<r;++b){if(p+=c=h[b].value,c<g&&(g=c),c>N&&(N=c),M=p*p*R,k=Math.max(N/M,M/g),k>V){p-=c;break}V=k}d.push(m={value:p,dice:x<S,children:h.slice(u,b)}),m.dice?je(m,l,n,o,v?n+=S*p/v:s):Ye(m,l,n,v?l+=x*p/v:o,s),v-=p,u=b}return d}const Je=(function t(a){function l(n,o,s,d,h){Ze(a,n,o,s,d,h)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(Ue);function Ke(){var t=Je,a=!1,l=1,n=1,o=[0],s=q,d=q,h=q,m=q,c=q;function u(r){return r.x0=r.y0=0,r.x1=l,r.y1=n,r.eachBefore(b),o=[0],a&&r.eachBefore(Xe),r}function b(r){var x=o[r.depth],S=r.x0+x,v=r.y0+x,p=r.x1-x,g=r.y1-x;p<S&&(S=p=(S+p)/2),g<v&&(v=g=(v+g)/2),r.x0=S,r.y0=v,r.x1=p,r.y1=g,r.children&&(x=o[r.depth+1]=s(r)/2,S+=c(r)-x,v+=d(r)-x,p-=h(r)-x,g-=m(r)-x,p<S&&(S=p=(S+p)/2),g<v&&(v=g=(v+g)/2),t(r,S,v,p,g))}return u.round=function(r){return arguments.length?(a=!!r,u):a},u.size=function(r){return arguments.length?(l=+r[0],n=+r[1],u):[l,n]},u.tile=function(r){return arguments.length?(t=Ge(r),u):t},u.padding=function(r){return arguments.length?u.paddingInner(r).paddingOuter(r):u.paddingInner()},u.paddingInner=function(r){return arguments.length?(s=typeof r=="function"?r:G(+r),u):s},u.paddingOuter=function(r){return arguments.length?u.paddingTop(r).paddingRight(r).paddingBottom(r).paddingLeft(r):u.paddingTop()},u.paddingTop=function(r){return arguments.length?(d=typeof r=="function"?r:G(+r),u):d},u.paddingRight=function(r){return arguments.length?(h=typeof r=="function"?r:G(+r),u):h},u.paddingBottom=function(r){return arguments.length?(m=typeof r=="function"?r:G(+r),u):m},u.paddingLeft=function(r){return arguments.length?(c=typeof r=="function"?r:G(+r),u):c},u}var E,ne=(E=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=pe,this.getAccTitle=fe,this.setDiagramTitle=me,this.getDiagramTitle=ge,this.getAccDescription=ye,this.setAccDescription=Se}getNodes(){return this.nodes}getConfig(){const a=ve,l=ae();return te({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},o=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");o&&o.forEach(s=>{xe(s)&&(n?.textStyles?n.textStyles.push(s):n.textStyles=[s]),n?.styles?n.styles.push(s):n.styles=[s]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){be(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(E,"TreeMapDB"),E);function le(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const o={name:n.name,children:n.type==="Leaf"?void 0:[]};for(o.classSelector=n?.classSelector,n?.cssCompiledStyles&&(o.cssCompiledStyles=[n.cssCompiledStyles]),n.type==="Leaf"&&n.value!==void 0&&(o.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(o);else{const s=l[l.length-1].node;s.children?s.children.push(o):s.children=[o]}n.type!=="Leaf"&&l.push({node:o,level:n.level})}),a}w(le,"buildHierarchy");var Qe=w((t,a)=>{Ce(t,a);const l=[];for(const s of t.TreemapRows??[])s.$type==="ClassDefStatement"&&a.addClass(s.className??"",s.styleText??"");for(const s of t.TreemapRows??[]){const d=s.item;if(!d)continue;const h=s.indent?parseInt(s.indent):0,m=et(d),c=d.classSelector?a.getStylesForClass(d.classSelector):[],u=c.length>0?c.join(";"):void 0,b={level:h,name:m,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:u};l.push(b)}const n=le(l),o=w((s,d)=>{for(const h of s)a.addNode(h,d),h.children&&h.children.length>0&&o(h.children,d+1)},"addNodesRecursively");o(n,0)},"populate"),et=w(t=>t.name?String(t.name):"","getItemName"),re={parser:{yy:void 0},parse:w(async t=>{try{const l=await Te("treemap",t);K.debug("Treemap AST:",l);const n=re.parser?.yy;if(!(n instanceof ne))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Qe(l,n)}catch(a){throw K.error("Error parsing treemap:",a),a}},"parse")},tt=10,B=10,X=25,at=w((t,a,l,n)=>{const o=n.db,s=o.getConfig(),d=s.padding??tt,h=o.getDiagramTitle(),m=o.getRoot(),{themeVariables:c}=ae();if(!m)return;const u=h?30:0,b=he(a),r=s.nodeWidth?s.nodeWidth*B:960,x=s.nodeHeight?s.nodeHeight*B:500,S=r,v=x+u;b.attr("viewBox",`0 0 ${S} ${v}`),ue(b,v,S,s.useMaxWidth);let p;try{const e=s.valueFormat||",";if(e==="$0,0")p=w(i=>"$"+O(",")(i),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const i=/\.\d+/.exec(e),f=i?i[0]:"";p=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const i=e.substring(1);p=w(f=>"$"+O(i||"")(f),"valueFormat")}else p=O(e)}catch(e){K.error("Error creating format function:",e),p=O(",")}const g=J().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=J().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),k=J().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);h&&b.append("text").attr("x",S/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const V=b.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),R=Q(m).sum(e=>e.value??0).sort((e,i)=>(i.value??0)-(e.value??0)),ee=Ke().size([r,x]).paddingTop(e=>e.children&&e.children.length>0?X+B:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?B:0).paddingRight(e=>e.children&&e.children.length>0?B:0).paddingBottom(e=>e.children&&e.children.length>0?B:0).round(!0)(R),se=ee.descendants().filter(e=>e.children&&e.children.length>0),W=V.selectAll(".treemapSection").data(se).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),W.append("clipPath").attr("id",(e,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,i)=>`treemapSection section${i}`).attr("fill",e=>g(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>N(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const i=P({cssCompiledStyles:e.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),W.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("style",e=>{if(e.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const i=Y(this),f=e.data.name;i.text(f);const C=e.x1-e.x0,L=6;let $;s.showValues!==!1&&e.value?$=C-10-30-10-L:$=C-L-6;const A=Math.max(15,$),y=i.node();if(y.getComputedTextLength()>A){let T=f;for(;T.length>0;){if(T=f.substring(0,T.length-1),T.length===0){i.text("..."),y.getComputedTextLength()>A&&i.text("");break}if(i.text(T+"..."),y.getComputedTextLength()<=A)break}}}),s.showValues!==!1&&W.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?p(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const ie=ee.leaves(),j=V.selectAll(".treemapLeafGroup").data(ie).enter().append("g").attr("class",(e,i)=>`treemapNode treemapLeafGroup leaf${i}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);j.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?g(e.parent.data.name):g(e.data.name)).attr("style",e=>P({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?g(e.parent.data.name):g(e.data.name)).attr("stroke-width",3),j.append("clipPath").attr("id",(e,i)=>`clip-${a}-${i}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),j.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const i="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+k(e.data.name)+";",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,i)=>`url(#clip-${a}-${i})`).text(e=>e.data.name).each(function(e){const i=Y(this),f=e.x1-e.x0,C=e.y1-e.y0,L=i.node(),$=4,D=f-2*$,A=C-2*$;if(D<10||A<10){i.style("display","none");return}let y=parseInt(i.style("font-size"),10);const _=8,F=28,T=.6,z=6,H=2;for(;L.getComputedTextLength()>D&&y>_;)y--,i.style("font-size",`${y}px`);let I=Math.max(z,Math.min(F,Math.round(y*T))),Z=y+H+I;for(;Z>A&&y>_&&(y--,I=Math.max(z,Math.min(F,Math.round(y*T))),!(I<z&&y===_));)i.style("font-size",`${y}px`),Z=y+H+I;i.style("font-size",`${y}px`),(L.getComputedTextLength()>D||y<_||A<y)&&i.style("display","none")}),s.showValues!==!1&&j.append("text").attr("class","treemapValue").attr("x",i=>(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+k(i.data.name)+";",C=P({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?p(i.value):"").each(function(i){const f=Y(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=Y(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const $=parseFloat(L.style("font-size")),D=28,A=.6,y=6,_=2,F=Math.max(y,Math.min(D,Math.round($*A)));f.style("font-size",`${F}px`);const z=(i.y1-i.y0)/2+$/2+_;f.attr("y",z);const H=i.x1-i.x0,ce=i.y1-i.y0-4,de=H-8;f.node().getComputedTextLength()>de||z+F>ce||F<y?f.style("display","none"):f.style("display",null)});const oe=s.diagramPadding??8;we(b,oe,"flowchart",s?.useMaxWidth||!1)},"draw"),nt=w(function(t,a){return a.db.getClasses()},"getClasses"),lt={draw:at,getClasses:nt},rt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},st=w(({treemap:t}={})=>{const a=te(rt,t);return`
|
|
2
2
|
.treemapNode.section {
|
|
3
3
|
stroke: ${a.sectionStrokeColor};
|
|
4
4
|
stroke-width: ${a.sectionStrokeWidth};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as b,d as C,c as B,
|
|
1
|
+
import{e as b,d as C,c as B,f as I,w as M,o as L,g as O,j as E,k as $,l as N,m as S,v as A,r as w,n as p,p as D,q as K,T as V,s as H,t as P,B as U,x as W}from"./E7Ix3tcC.js";var R=(c,n,o)=>new Promise((a,r)=>{var v=e=>{try{t(o.next(e))}catch(f){r(f)}},d=e=>{try{t(o.throw(e))}catch(f){r(f)}},t=e=>e.done?a(e.value):Promise.resolve(e.value).then(v,d);t((o=o.apply(c,n)).next())});const j={class:"math-inline__loading",role:"status","aria-live":"polite"},y=b(C({__name:"MathInlineNode",props:{node:{}},setup(c){const n=c,o=w(null),a=w(null);let r=!1,v=0,d=!1,t=null;const e=w(!0),f=B();let s=null;function T(){return R(this,null,function*(){if(!a.value||d)return;if(!n.node.content)return e.value=!1,a.value.textContent=n.node.raw,void(r=!0);t&&(t.abort(),t=null);const i=++v,u=new AbortController;if(t=u,!r)try{!s&&o.value&&(s=f(o.value)),yield s?.whenVisible}catch{}const g=n.node.markup==="$$";H(n.node.content,g,{timeout:1500,waitTimeout:0,maxRetries:0,signal:u.signal}).then(l=>{d||i!==v||a.value&&(a.value.innerHTML=l,e.value=!1,r=!0)}).catch(l=>R(null,null,function*(){if(d||i!==v||!a.value)return;const m=l?.code||l?.name,h=m==="KATEX_DISABLED";if(m==="WORKER_INIT_ERROR"||l?.fallbackToRenderer||m===P||m==="WORKER_TIMEOUT"){const k=yield U();if(k){try{const _=n.node.markup==="$$",x=k.renderToString(n.node.content,{throwOnError:n.node.loading,displayMode:_});e.value=!1,a.value.innerHTML=x,r=!0,W(n.node.content,_,x)}catch{}return}}if(h)return e.value=!1,void(a.value.textContent=n.node.raw);r||(e.value=!h),n.node.loading?h&&(a.value.textContent=n.node.raw):(e.value=!1,a.value.textContent=n.node.raw)}))})}return M(()=>n.node.content,()=>{T()}),L(()=>{T()}),O(()=>{var i;d=!0,t&&(t.abort(),t=null),(i=s?.destroy)==null||i.call(s),s=null}),(i,u)=>(E(),I("span",{ref_key:"containerEl",ref:o,class:"math-inline-wrapper"},[$(p("span",{ref_key:"mathElement",ref:a,class:"math-inline"},null,512),[[A,!e.value]]),e.value?(E(),N(V,{key:0,name:"table-node-fade"},{default:D(()=>[p("span",j,[K(i.$slots,"loading",{isLoading:e.value},()=>[u[0]||(u[0]=p("span",{class:"math-inline__spinner animate-spin","aria-hidden":"true"},null,-1)),u[1]||(u[1]=p("span",{class:"sr-only"},"Loading",-1))],!0)])]),_:3})):S("",!0)],512))}}),[["__scopeId","data-v-32b58f6e"]]);y.install=c=>{c.component(y.__name,y)};export{y as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as k,g as R,q as E,p as F,a as I,b as _,
|
|
1
|
+
import{_ as l,s as k,g as R,q as E,p as F,a as I,b as _,H as D,y as G,D as f,E as C,F as P,l as z,K as H}from"./D5mZhIOc.js";import{p as V}from"./CtCaJz7N.js";import{p as W}from"./CjvcAzGt.js";import"./E7Ix3tcC.js";import"./CUe0quIq.js";import"./BW7XEYaa.js";var h={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w={axes:[],curves:[],options:h},m=structuredClone(w),B=P.radar,j=l(()=>f({...B,...C().radar}),"getConfig"),b=l(()=>m.axes,"getAxes"),q=l(()=>m.curves,"getCurves"),K=l(()=>m.options,"getOptions"),N=l(a=>{m.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),U=l(a=>{m.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:X(t.entries)}))},"setCurves"),X=l(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),Y=l(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});m.options={showLegend:t.showLegend?.value??h.showLegend,ticks:t.ticks?.value??h.ticks,max:t.max?.value??h.max,min:t.min?.value??h.min,graticule:t.graticule?.value??h.graticule}},"setOptions"),Z=l(()=>{G(),m=structuredClone(w)},"clear"),$={getAxes:b,getCurves:q,getOptions:K,setAxes:N,setCurves:U,setOptions:Y,getConfig:j,clear:Z,setAccTitle:_,getAccTitle:I,setDiagramTitle:F,getDiagramTitle:E,getAccDescription:R,setAccDescription:k},J=l(a=>{V(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),Q={parse:l(async a=>{const t=await W("radar",a);z.debug(t),J(t)},"parse")},tt=l((a,t,e,r)=>{const s=r.db,o=s.getAxes(),i=s.getCurves(),n=s.getOptions(),c=s.getConfig(),d=s.getDiagramTitle(),u=D(t),p=et(u,c),g=n.max??Math.max(...i.map(y=>Math.max(...y.entries))),x=n.min,v=Math.min(c.width,c.height)/2;at(p,o,v,n.ticks,n.graticule),rt(p,o,v,c),M(p,o,i,x,g,n.graticule,c),T(p,i,n.showLegend,c),p.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),et=l((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return a.attr("viewbox",`0 0 ${e} ${r}`).attr("width",e).attr("height",r),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),at=l((a,t,e,r,s)=>{if(s==="circle")for(let o=0;o<r;o++){const i=e*(o+1)/r;a.append("circle").attr("r",i).attr("class","radarGraticule")}else if(s==="polygon"){const o=t.length;for(let i=0;i<r;i++){const n=e*(i+1)/r,c=t.map((d,u)=>{const p=2*u*Math.PI/o-Math.PI/2,g=n*Math.cos(p),x=n*Math.sin(p);return`${g},${x}`}).join(" ");a.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),rt=l((a,t,e,r)=>{const s=t.length;for(let o=0;o<s;o++){const i=t[o].label,n=2*o*Math.PI/s-Math.PI/2;a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*Math.cos(n)).attr("y2",e*r.axisScaleFactor*Math.sin(n)).attr("class","radarAxisLine"),a.append("text").text(i).attr("x",e*r.axisLabelFactor*Math.cos(n)).attr("y",e*r.axisLabelFactor*Math.sin(n)).attr("class","radarAxisLabel")}},"drawAxes");function M(a,t,e,r,s,o,i){const n=t.length,c=Math.min(i.width,i.height)/2;e.forEach((d,u)=>{if(d.entries.length!==n)return;const p=d.entries.map((g,x)=>{const v=2*Math.PI*x/n-Math.PI/2,y=A(g,r,s,c),O=y*Math.cos(v),S=y*Math.sin(v);return{x:O,y:S}});o==="circle"?a.append("path").attr("d",L(p,i.curveTension)).attr("class",`radarCurve-${u}`):o==="polygon"&&a.append("polygon").attr("points",p.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${u}`)})}l(M,"drawCurves");function A(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}l(A,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<e;s++){const o=a[(s-1+e)%e],i=a[s],n=a[(s+1)%e],c=a[(s+2)%e],d={x:i.x+(n.x-o.x)*t,y:i.y+(n.y-o.y)*t},u={x:n.x-(c.x-i.x)*t,y:n.y-(c.y-i.y)*t};r+=` C${d.x},${d.y} ${u.x},${u.y} ${n.x},${n.y}`}return`${r} Z`}l(L,"closedRoundCurve");function T(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,o=-(r.height/2+r.marginTop)*3/4,i=20;t.forEach((n,c)=>{const d=a.append("g").attr("transform",`translate(${s}, ${o+c*i})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${c}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}l(T,"drawLegend");var st={draw:tt},nt=l((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=`
|
|
2
2
|
.radarCurve-${r} {
|
|
3
3
|
color: ${s};
|
|
4
4
|
fill: ${s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a1 as S,a4 as
|
|
1
|
+
import{a1 as S,a4 as F,aB as j,_ as p,g as q,s as H,a as Z,b as J,q as K,p as Q,l as z,c as X,D as Y,H as ee,N as te,e as ae,y as re,F as ne}from"./D5mZhIOc.js";import{p as ie}from"./CtCaJz7N.js";import{p as se}from"./CjvcAzGt.js";import{d as I}from"./gtxKAzOr.js";import{o as le}from"./CmKTTxBW.js";import"./E7Ix3tcC.js";import"./CUe0quIq.js";import"./BW7XEYaa.js";import"./Gi6I4Gst.js";function oe(e,a){return a<e?-1:a>e?1:a>=e?0:NaN}function ce(e){return e}function ue(){var e=ce,a=oe,f=null,y=S(0),s=S(F),o=S(0);function l(t){var n,c=(t=j(t)).length,d,x,h=0,u=new Array(c),i=new Array(c),v=+y.apply(this,arguments),w=Math.min(F,Math.max(-F,s.apply(this,arguments)-v)),m,C=Math.min(Math.abs(w)/c,o.apply(this,arguments)),$=C*(w<0?-1:1),g;for(n=0;n<c;++n)(g=i[u[n]=n]=+e(t[n],n,t))>0&&(h+=g);for(a!=null?u.sort(function(A,D){return a(i[A],i[D])}):f!=null&&u.sort(function(A,D){return f(t[A],t[D])}),n=0,x=h?(w-c*$)/h:0;n<c;++n,v=m)d=u[n],g=i[d],m=v+(g>0?g*x:0)+$,i[d]={data:t[d],index:n,value:g,startAngle:v,endAngle:m,padAngle:C};return i}return l.value=function(t){return arguments.length?(e=typeof t=="function"?t:S(+t),l):e},l.sortValues=function(t){return arguments.length?(a=t,f=null,l):a},l.sort=function(t){return arguments.length?(f=t,a=null,l):f},l.startAngle=function(t){return arguments.length?(y=typeof t=="function"?t:S(+t),l):y},l.endAngle=function(t){return arguments.length?(s=typeof t=="function"?t:S(+t),l):s},l.padAngle=function(t){return arguments.length?(o=typeof t=="function"?t:S(+t),l):o},l}var pe=ne.pie,N={sections:new Map,showData:!1},T=N.sections,G=N.showData,de=structuredClone(pe),ge=p(()=>structuredClone(de),"getConfig"),fe=p(()=>{T=new Map,G=N.showData,re()},"clear"),me=p(({label:e,value:a})=>{if(a<0)throw new Error(`"${e}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);T.has(e)||(T.set(e,a),z.debug(`added new section: ${e}, with value: ${a}`))},"addSection"),he=p(()=>T,"getSections"),ve=p(e=>{G=e},"setShowData"),Se=p(()=>G,"getShowData"),L={getConfig:ge,clear:fe,setDiagramTitle:Q,getDiagramTitle:K,setAccTitle:J,getAccTitle:Z,setAccDescription:H,getAccDescription:q,addSection:me,getSections:he,setShowData:ve,getShowData:Se},ye=p((e,a)=>{ie(e,a),a.setShowData(e.showData),e.sections.map(a.addSection)},"populateDb"),xe={parse:p(async e=>{const a=await se("pie",e);z.debug(a),ye(a,L)},"parse")},we=p(e=>`
|
|
2
2
|
.pieCircle{
|
|
3
3
|
stroke: ${e.pieStrokeColor};
|
|
4
4
|
stroke-width : ${e.pieStrokeWidth};
|
|
@@ -26,5 +26,5 @@ import{a1 as S,a4 as z,aB as j,g as q,s as H,a as Z,b as J,q as K,p as Q,_ as p,
|
|
|
26
26
|
font-family: ${e.fontFamily};
|
|
27
27
|
font-size: ${e.pieLegendTextSize};
|
|
28
28
|
}
|
|
29
|
-
`,"getStyles"),Ae=we,De=p(e=>{const a=[...e.values()].reduce((s,o)=>s+o,0),f=[...e.entries()].map(([s,o])=>({label:s,value:o})).filter(s=>s.value/a*100>=1).sort((s,o)=>o.value-s.value);return ue().value(s=>s.value)(f)},"createPieArcs"),Ce=p((e,a,f,y)=>{
|
|
30
|
-
`+e);const s=y.db,o=X(),l=Y(s.getConfig(),o.pie),t=40,n=18,c=4,d=450,x=d,h=ee(a),u=h.append("g");u.attr("transform","translate("+x/2+","+d/2+")");const{themeVariables:i}=o;let[v]=te(i.pieOuterStrokeWidth);v??=2;const w=l.textPosition,m=Math.min(x,d)/2-t,C=I().innerRadius(0).outerRadius(m),$=I().innerRadius(m*w).outerRadius(m*w);u.append("circle").attr("cx",0).attr("cy",0).attr("r",m+v/2).attr("class","pieOuterCircle");const g=s.getSections(),A=De(g),D=[i.pie1,i.pie2,i.pie3,i.pie4,i.pie5,i.pie6,i.pie7,i.pie8,i.pie9,i.pie10,i.pie11,i.pie12];let
|
|
29
|
+
`,"getStyles"),Ae=we,De=p(e=>{const a=[...e.values()].reduce((s,o)=>s+o,0),f=[...e.entries()].map(([s,o])=>({label:s,value:o})).filter(s=>s.value/a*100>=1).sort((s,o)=>o.value-s.value);return ue().value(s=>s.value)(f)},"createPieArcs"),Ce=p((e,a,f,y)=>{z.debug(`rendering pie chart
|
|
30
|
+
`+e);const s=y.db,o=X(),l=Y(s.getConfig(),o.pie),t=40,n=18,c=4,d=450,x=d,h=ee(a),u=h.append("g");u.attr("transform","translate("+x/2+","+d/2+")");const{themeVariables:i}=o;let[v]=te(i.pieOuterStrokeWidth);v??=2;const w=l.textPosition,m=Math.min(x,d)/2-t,C=I().innerRadius(0).outerRadius(m),$=I().innerRadius(m*w).outerRadius(m*w);u.append("circle").attr("cx",0).attr("cy",0).attr("r",m+v/2).attr("class","pieOuterCircle");const g=s.getSections(),A=De(g),D=[i.pie1,i.pie2,i.pie3,i.pie4,i.pie5,i.pie6,i.pie7,i.pie8,i.pie9,i.pie10,i.pie11,i.pie12];let b=0;g.forEach(r=>{b+=r});const W=A.filter(r=>(r.data.value/b*100).toFixed(0)!=="0"),E=le(D);u.selectAll("mySlices").data(W).enter().append("path").attr("d",C).attr("fill",r=>E(r.data.label)).attr("class","pieCircle"),u.selectAll("mySlices").data(W).enter().append("text").text(r=>(r.data.value/b*100).toFixed(0)+"%").attr("transform",r=>"translate("+$.centroid(r)+")").style("text-anchor","middle").attr("class","slice"),u.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText");const O=[...g.entries()].map(([r,M])=>({label:r,value:M})),k=u.selectAll(".legend").data(O).enter().append("g").attr("class","legend").attr("transform",(r,M)=>{const R=n+c,B=R*O.length/2,V=12*n,U=M*R-B;return"translate("+V+","+U+")"});k.append("rect").attr("width",n).attr("height",n).style("fill",r=>E(r.label)).style("stroke",r=>E(r.label)),k.append("text").attr("x",n+c).attr("y",n-c).text(r=>s.getShowData()?`${r.label} [${r.value}]`:r.label);const _=Math.max(...k.selectAll("text").nodes().map(r=>r?.getBoundingClientRect().width??0)),P=x+t+n+c+_;h.attr("viewBox",`0 0 ${P} ${d}`),ae(h,d,P,l.useMaxWidth)},"draw"),$e={draw:Ce},We={parser:xe,db:L,renderer:$e,styles:Ae};export{We as diagram};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{e as $t,d as At,A as Ft,c as Ht,w as V,r as d,g as Rt,C as Q,o as Nt,D as Xt,f as w,j as g,m as ee,k as _t,z as y,q as Je,n as r,E as h,H as xe,I as xt,v as Yt,l as Vt,S as kt,U as bt,y as Zt,p as qt,O as It,T as Ut,P as Wt,M as Mt,N as Gt,R as A,V as Kt,W as Jt,X as Qt}from"./E7Ix3tcC.js";import{e as el}from"./DvJDa2y1.js";var tl=Object.defineProperty,ll=Object.defineProperties,nl=Object.getOwnPropertyDescriptors,Tt=Object.getOwnPropertySymbols,rl=Object.prototype.hasOwnProperty,ol=Object.prototype.propertyIsEnumerable,Ct=($,P,M)=>P in $?tl($,P,{enumerable:!0,configurable:!0,writable:!0,value:M}):$[P]=M,Qe=($,P)=>{for(var M in P||(P={}))rl.call(P,M)&&Ct($,M,P[M]);if(Tt)for(var M of Tt(P))ol.call(P,M)&&Ct($,M,P[M]);return $},D=($,P,M)=>new Promise((ke,o)=>{var ne=F=>{try{j(M.next(F))}catch(re){o(re)}},be=F=>{try{j(M.throw(F))}catch(re){o(re)}},j=F=>F.done?ke(F.value):Promise.resolve(F.value).then(ne,be);j((M=M.apply($,P)).next())});const al={key:0},il={key:1,class:"flex items-center gap-x-2 overflow-hidden"},ul=["src"],sl={key:2},cl={class:"flex items-center gap-x-1"},dl={class:"flex items-center gap-x-1"},vl={key:4},ml={key:5,class:"flex items-center gap-x-1"},fl=["aria-pressed"],hl={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},gl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},pl=["disabled"],wl=["disabled"],yl={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"},xl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"},kl={key:1,class:"relative"},bl={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},Ml={class:"flex items-center gap-2 backdrop-blur rounded-lg"},Tl={class:"markstream-vue"},Cl={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},et=$t(At({__name:"MermaidBlockNode",props:{node:{},maxHeight:{default:"500px"},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!1}},emits:["copy","export","openModal","toggleMode"],setup($,{emit:P}){var M,ke;const o=$,ne=P,be={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},j=d(!1),F=Q(()=>o.isStrict?"strict":"loose"),re=Q(()=>({startOnLoad:!1,securityLevel:F.value,dompurifyConfig:F.value==="strict"?be:void 0,flowchart:F.value==="strict"?{htmlLabels:!1}:void 0})),Dt=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],Bt=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function St(t){if(!t)return"";const e=t.trim();return Bt.test(e)?e:""}function Me(t){if(t)try{t.replaceChildren()}catch{t.innerHTML=""}}function oe(t,e){if(!t)return"";if(F.value==="strict")return(function(l,n){if(!l)return"";try{l.replaceChildren()}catch{l.innerHTML=""}const c=(function(a){if(typeof window>"u"||typeof DOMParser>"u"||!a)return null;const s=a.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#"),i=new DOMParser().parseFromString(s,"image/svg+xml").documentElement;if(!i||i.nodeName.toLowerCase()!=="svg")return null;const m=i;return(function(v){const p=new Set(["script"]),L=[v,...Array.from(v.querySelectorAll("*"))];for(const C of L){if(p.has(C.tagName.toLowerCase())){C.remove();continue}const Y=Array.from(C.attributes);for(const N of Y){const b=N.name;if(/^on/i.test(b))C.removeAttribute(b);else{if(b==="style"&&N.value){const k=N.value;if(Dt.some(Ye=>Ye.test(k))){C.removeAttribute(b);continue}}if((b==="href"||b==="xlink:href")&&N.value){const k=St(N.value);if(!k){C.removeAttribute(b);continue}k!==N.value&&C.setAttribute(b,k)}}}}})(m),m})(n);return c?(l.appendChild(c),l.innerHTML):""})(t,e);try{t.replaceChildren()}catch{t.innerHTML=""}if(e)try{t.insertAdjacentHTML("afterbegin",e)}catch{t.innerHTML=e}return t.innerHTML}const{t:f}=Ft();function Te(){return D(this,null,function*(){try{const t=yield Qt();return j.value=!!t,t}catch(t){throw j.value=!1,t}})}typeof window<"u"&&D(null,null,function*(){var t;try{const e=yield Te();if(!e)return;(t=e?.initialize)==null||t.call(e,Qe({},re.value))}catch(e){j.value=!1,console.warn("[markstream-vue] Failed to initialize mermaid renderer. Call enableMermaid() to configure a loader.",e)}});const Ce=d(!1),Z=d(!1),q=d(),u=d(),ae=d(),De=d(null),Et=Ht(),me=d(null),ie=d(typeof window>"u"),tt=d(),R=Q(()=>o.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode")),x=d(1),O=d(0),z=d(0),Be=d(!1),Se=d({x:0,y:0}),S=d(!1),Ee=d(!1),W=d(!1),Pe=d(null),je=d(0),Ve=d(!1);let fe=null,he=null,ge=0;const lt=(M=globalThis.requestIdleCallback)!=null?M:(t,e)=>setTimeout(()=>t({didTimeout:!0}),16),ue=(function(){let t=null;return(...e)=>{t&&clearTimeout(t),t=setTimeout(()=>(()=>{lt(()=>{wt()},{timeout:500})})(...e),300)}})();function pe(){he!=null&&(globalThis.clearTimeout(he),he=null)}function nt(t=600){if(typeof globalThis>"u")return;const e=Math.max(0,t);pe(),he=globalThis.setTimeout(()=>{he=null,o.loading||W.value||!ie.value?nt(Math.min(1200,Math.max(300,1.2*e))):ue()},e)}const G=d("360px");let se=null;const B=d(!1),te=d(!1),K=d({}),rt=d(null),we=d(""),Ze=d(0);let H=null;const I=d(!1),le=d({zoom:1,translateX:0,translateY:0,containerHeight:"360px"}),ot=Q(()=>o.enableWheelZoom?{wheel:jt}:{}),U=Q(()=>{var t,e,l,n;return{worker:(t=o.workerTimeoutMs)!=null?t:1400,parse:(e=o.parseTimeoutMs)!=null?e:1800,render:(l=o.renderTimeoutMs)!=null?l:2500,fullRender:(n=o.fullRenderTimeoutMs)!=null?n:4e3}}),Pt=(ke=globalThis.cancelIdleCallback)!=null?ke:t=>clearTimeout(t);let ce=null,Oe=null,de=!1,ye=800,X=null,ze=0,qe=!0,Le=0;function $e(t,e){const l=e?.timeoutMs,n=e?.signal;if(n?.aborted)return Promise.reject(new DOMException("Aborted","AbortError"));let c=null,a=!1,s=null;return new Promise((i,m)=>{const v=()=>{c!=null&&clearTimeout(c),s&&n&&n.removeEventListener("abort",s)};l&&l>0&&(c=globalThis.setTimeout(()=>{a||(a=!0,v(),m(new Error("Operation timed out")))},l)),n&&(s=()=>{a||(a=!0,v(),m(new DOMException("Aborted","AbortError")))},n.addEventListener("abort",s)),t().then(p=>{a||(a=!0,v(),i(p))}).catch(p=>{a||(a=!0,v(),m(p))})})}function at(t){if(typeof document>"u"||!u.value)return;const e=document.createElement("div");e.className="text-red-500 p-4",e.textContent="Failed to render diagram: ";const l=document.createElement("span");l.textContent=t instanceof Error?t.message:"Unknown error",e.appendChild(l),Me(u.value),u.value.appendChild(e),G.value="360px",I.value=!0,_()}function it(t){return!t||t.disabled}function E(t,e,l="top"){if(it(t.currentTarget))return;const n=t,c=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;Mt(t.currentTarget,e,l,!1,c,o.isDark)}function T(){Gt()}function ut(t){if(it(t.currentTarget))return;const e=Ce.value?f("common.copied")||"Copied":f("common.copy")||"Copy",l=t,n=l?.clientX!=null&&l?.clientY!=null?{x:l.clientX,y:l.clientY}:void 0;Mt(t.currentTarget,e,"top",!1,n,o.isDark)}function st(t,e){const l=`%%{init: {"theme": "${e==="dark"?"dark":"default"}"}}%%
|
|
2
|
+
`;return t.trimStart().startsWith("%%{")?t:l+t}function ct(){return qe&&!S.value&&!B.value&&!I.value}function dt(t){const e=t.split(/\r?\n/);for(;e.length>0;){const l=e[e.length-1].trimEnd();if(l!==""){if(!(/^[-=~>|<\s]+$/.test(l.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(l)||/[-|><]$/.test(l)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(l)))break;e.pop()}else e.pop()}return e.join(`
|
|
3
|
+
`)}function Ae(t,e,l){return D(this,null,function*(){var n;try{return yield Jt(t,e,(n=l?.timeoutMs)!=null?n:U.value.worker)}catch{return yield(function(a,s,i){return D(this,null,function*(){var m,v;const p=yield Te();if(!p)return;const L=p,C=st(a,s);if(typeof L.parse=="function")return yield $e(()=>L.parse(C),{timeoutMs:(m=i?.timeoutMs)!=null?m:U.value.parse,signal:i?.signal}),!0;const Y=`mermaid-parse-${Math.random().toString(36).slice(2,9)}`;return yield $e(()=>p.render(Y,C),{timeoutMs:(v=i?.timeoutMs)!=null?v:U.value.render,signal:i?.signal}),!0})})(t,e,l)}})}typeof window<"u"&&V(()=>q.value,t=>{var e;if((e=me.value)==null||e.destroy(),me.value=null,!t)return void(ie.value=!1);const l=Et(t,{rootMargin:"400px"});me.value=l,ie.value=l.isVisible.value,l.whenVisible.then(()=>{ie.value=!0})},{immediate:!0}),Rt(()=>{var t;(t=me.value)==null||t.destroy(),me.value=null});const Fe=Q(()=>S.value||W.value||Z.value);function Ie(t){if(!q.value||!u.value)return;const e=u.value.querySelector("svg");if(!e)return;let l=0,n=0;const c=e.getAttribute("viewBox"),a=e.getAttribute("width"),s=e.getAttribute("height");if(c){const i=c.split(" ");i.length===4&&(l=Number.parseFloat(i[2]),n=Number.parseFloat(i[3]))}if(l&&n||a&&s&&(l=Number.parseFloat(a),n=Number.parseFloat(s)),Number.isNaN(l)||Number.isNaN(n)||l<=0||n<=0)try{const i=e.getBBox();i&&i.width>0&&i.height>0&&(l=i.width,n=i.height)}catch(i){return void console.error("Failed to get SVG BBox:",i)}if(l>0&&n>0){const i=n/l;let m=(t??q.value.clientWidth)*i;m>n&&(m=n),G.value=`${m}px`}}const J=d(!1),Ue=Q(()=>({transform:`translate(${O.value}px, ${z.value}px) scale(${x.value})`}));function vt(t){t.key==="Escape"&&J.value&&We()}function We(){if(J.value=!1,ae.value&&Me(ae.value),De.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",vt)}catch{}}function mt(){x.value<3&&(x.value+=.1)}function ft(){x.value>.5&&(x.value-=.1)}function ht(){x.value=1,O.value=0,z.value=0}function He(t){Be.value=!0,t instanceof MouseEvent?Se.value={x:t.clientX-O.value,y:t.clientY-z.value}:Se.value={x:t.touches[0].clientX-O.value,y:t.touches[0].clientY-z.value}}function Re(t){if(!Be.value)return;let e,l;t instanceof MouseEvent?(e=t.clientX,l=t.clientY):(e=t.touches[0].clientX,l=t.touches[0].clientY),O.value=e-Se.value.x,z.value=l-Se.value.y}function ve(){Be.value=!1}function jt(t){if(o.enableWheelZoom&&(t.ctrlKey||t.metaKey)){if(t.preventDefault(),!q.value)return;const e=q.value.getBoundingClientRect(),l=t.clientX-e.left,n=t.clientY-e.top,c=l-e.width/2,a=n-e.height/2,s=(c-O.value)/x.value,i=(a-z.value)/x.value,m=.01,v=-t.deltaY*m,p=Math.min(Math.max(x.value+v,.5),3);p!==x.value&&(O.value=c-s*p,z.value=a-i*p,x.value=p)}}function Ot(){return D(this,null,function*(){try{const t=R.value,e={payload:{type:"copy",text:t},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};if(ne("copy",e),e.defaultPrevented)return;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(t)),Ce.value=!0,setTimeout(()=>{Ce.value=!1},1e3)}catch(t){console.error("Failed to copy:",t)}})}function zt(){var t;const e=(t=u.value)==null?void 0:t.querySelector("svg");if(!e)return void console.error("SVG element not found");const l=new XMLSerializer().serializeToString(e),n={payload:{type:"export"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:e,svgString:l};ne("export",n),n.defaultPrevented||(function(c,a=null){D(this,null,function*(){try{const s=a??new XMLSerializer().serializeToString(c),i=new Blob([s],{type:"image/svg+xml;charset=utf-8"}),m=URL.createObjectURL(i);if(typeof document<"u"){const v=document.createElement("a");v.href=m,v.download=`mermaid-diagram-${Date.now()}.svg`;try{document.body.appendChild(v),v.click(),document.body.removeChild(v)}catch{}URL.revokeObjectURL(m)}}catch(s){console.error("Failed to export SVG:",s)}})})(e,l)}function Lt(){var t,e;const l=(e=(t=u.value)==null?void 0:t.querySelector("svg"))!=null?e:null,n=l?new XMLSerializer().serializeToString(l):null,c={payload:{type:"open-modal"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:l,svgString:n};ne("openModal",c),c.defaultPrevented||(function(){if(J.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",vt)}catch{}A(()=>{if(q.value&&ae.value){const a=q.value.cloneNode(!0);a.classList.add("fullscreen");const s=a.querySelector("[data-mermaid-wrapper]");s&&(De.value=s,s.style.transform=Ue.value.transform),Me(ae.value),ae.value.appendChild(a)}})})()}function gt(t){const e={payload:{type:"toggle-mode",target:t},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};ne("toggleMode",t,e),e.defaultPrevented||pt(t)}function pt(t){return D(this,null,function*(){const e=tt.value;if(!e)return Ee.value=!0,void(S.value=t==="source");const l=e.getBoundingClientRect().height;e.style.height=`${l}px`,e.style.overflow="hidden",Ee.value=!0,S.value=t==="source",yield A();const n=e.scrollHeight;e.style.transition="height 180ms ease",e.offsetHeight,e.style.height=`${n}px`;const c=()=>{e.style.transition="",e.style.height="",e.style.overflow="",e.removeEventListener("transitionend",a)};function a(){c()}e.addEventListener("transitionend",a),setTimeout(()=>c(),220)})}function Ne(){return D(this,null,function*(){return W.value?Pe.value:u.value||(yield A(),u.value)?(W.value=!0,Pe.value=D(null,null,function*(){var t,e,l;u.value&&(u.value.style.opacity="0");try{const n=yield Te();if(!n)return;const c=`mermaid-${Date.now()}-${Math.random().toString(36).substring(2,11)}`;B.value||te.value||(t=n.initialize)==null||t.call(n,(e=Qe({},re.value),l={dompurifyConfig:Qe({},be)},ll(e,nl(l))));const a=(function(m,v=R.value){const p=v,L=`%%{init: {"theme": "${m==="dark"?"dark":"default"}"}}%%
|
|
4
|
+
`;return p.trim().startsWith("%%{")?p:L+p})(o.isDark?"dark":"light"),s=yield $e(()=>n.render(c,a),{timeoutMs:U.value.fullRender}),i=s?.svg;if(u.value){const m=oe(u.value,i);B.value||te.value||(Ie(),B.value=!0,le.value={zoom:x.value,translateX:O.value,translateY:z.value,containerHeight:G.value});const v=o.isDark?"dark":"light";m&&(K.value[v]=m),te.value&&(te.value=!1),I.value=!1,ge=0,pe()}}catch(n){const c=(function(s){const i=typeof s=="string"?s:typeof s?.message=="string"?s.message:"";return typeof i=="string"&&/timed out/i.test(i)})(n),a=ge+1;c&&a<=3?(ge=a,nt(Math.min(1200,600*a))):(ge=0,pe(),console.error("Failed to render mermaid diagram:",n),o.loading===!1&&at(n))}finally{yield A(),u.value&&(u.value.style.opacity="1"),W.value=!1,Pe.value=null}}),Pe.value):void console.warn("Mermaid container not ready")})}function wt(){return D(this,null,function*(){var t,e;const l=Date.now(),n=++Ze.value;H&&H.abort(),H=new AbortController;const c=H.signal,a=o.isDark?"dark":"light",s=R.value,i=s.replace(/\s+/g,"");if(!s.trim())return u.value&&Me(u.value),rt.value=null,we.value="",void(I.value=!1);if(i===we.value)return;try{const v=yield(function(L,C,Y){return D(this,null,function*(){var N;try{if(yield Ae(L,C,Y))return{fullOk:!0,prefixOk:!1}}catch(k){if(k?.name==="AbortError")throw k}let b=dt(L);if(b&&b.trim()&&b!==L)try{try{const k=yield Kt(L,C,(N=Y?.timeoutMs)!=null?N:U.value.worker);k&&k.trim()&&(b=k)}catch{}if(yield Ae(b,C,Y))return{fullOk:!1,prefixOk:!0,prefix:b}}catch(k){if(k?.name==="AbortError")throw k}return{fullOk:!1,prefixOk:!1}})})(s,a,{signal:c,timeoutMs:U.value.worker});if(v.fullOk)return yield Ne(),void(Ze.value===n&&(rt.value=(e=(t=u.value)==null?void 0:t.innerHTML)!=null?e:null,we.value=i,I.value=!1));const p=ze&&l<=ze;if(v.prefixOk&&v.prefix&&ct()&&!p)return void(yield(function(L){return D(this,null,function*(){if(ct()&&(u.value||(yield A(),u.value))&&!W.value){W.value=!0;try{const C=yield Te();if(!C)return;const Y=`mermaid-partial-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,N=o.isDark?"dark":"light",b=dt(L),k=st(b&&b.trim()?b:L,N);u.value&&(u.value.style.opacity="0");const Ye=yield $e(()=>C.render(Y,k),{timeoutMs:U.value.render}),yt=Ye?.svg;u.value&&yt&&(oe(u.value,yt),Ie())}catch{}finally{yield A(),u.value&&(u.value.style.opacity="1"),W.value=!1}}})})(v.prefix))}catch(v){if(v?.name==="AbortError")return}if(Ze.value!==n||I.value)return;const m=K.value[a];m&&u.value&&oe(u.value,m)})}function _(){de&&(de=!1,ye=800,qe=!1,X&&(X.abort(),X=null),ce&&(globalThis.clearTimeout(ce),ce=null),Oe&&(Pt(Oe),Oe=null),ze=Date.now())}function Xe(){if(_(),H){try{H.abort()}catch{}H=null}if(X){try{X.abort()}catch{}X=null}pe(),ge=0}function Ge(t=800){de&&(Le>=12?_():(ce&&globalThis.clearTimeout(ce),ce=globalThis.setTimeout(()=>{Oe=lt(()=>D(null,null,function*(){if(!de)return;if(S.value||B.value)return void _();const e=o.isDark?"dark":"light",l=R.value;if(!l.trim())return o.loading===!1?void _():void Ge(ye);if(Le++,Le>12)_();else{X&&X.abort(),X=new AbortController;try{if((yield Ae(l,e,{signal:X.signal,timeoutMs:U.value.worker}))&&(yield Ne(),B.value))return void _()}catch{}ye=Math.min(Math.floor(1.5*ye),4e3),Ge(ye)}}),{timeout:500})},t)))}function Ke(){de||S.value||B.value||(de=!0,ze=0,qe=!0,Le=0,Ge(500))}V(Ue,t=>{J.value&&De.value&&(De.value.style.transform=t.transform)},{immediate:!0}),V(()=>R.value,()=>{B.value=!1,K.value={},ue(),!S.value&&j.value&&Ke(),(function(){if(!S.value||!j.value)return;const t=R.value.length;t!==je.value&&(Ve.value=!0,je.value=t,fe&&clearTimeout(fe),fe=setTimeout(()=>{Ve.value&&S.value&&R.value.trim()&&(Ve.value=!1,pt("preview"))},500))})()}),V(()=>o.isDark,()=>D(null,null,function*(){if(!B.value||I.value)return;const t=o.isDark?"dark":"light",e=K.value[t];if(e)return void(u.value&&oe(u.value,e));const l={zoom:x.value,translateX:O.value,translateY:z.value,containerHeight:G.value},n=x.value!==1||O.value!==0||z.value!==0;te.value=!0,n&&(x.value=1,O.value=0,z.value=0,yield A()),yield Ne(),n&&(yield A(),x.value=l.zoom,O.value=l.translateX,z.value=l.translateY,G.value=l.containerHeight,le.value=l)})),V(()=>S.value,t=>D(null,null,function*(){if(t)_(),B.value&&(le.value={zoom:x.value,translateX:O.value,translateY:z.value,containerHeight:G.value});else{if(I.value)return;const e=o.isDark?"dark":"light";if(B.value&&K.value[e])return yield A(),u.value&&oe(u.value,K.value[e]),x.value=le.value.zoom,O.value=le.value.translateX,z.value=le.value.translateY,void(G.value=le.value.containerHeight);if(yield A(),!j.value)return;yield wt(),Ke()}})),V(()=>o.loading,(t,e)=>D(null,null,function*(){if(e===!0&&t===!1){const l=R.value.trim();if(!l)return Xe();const n=o.isDark?"dark":"light",c=l.replace(/\s+/g,"");if(B.value&&c===we.value)return yield A(),u.value&&!u.value.querySelector("svg")&&K.value[n]&&oe(u.value,K.value[n]),void Xe();try{yield Ae(l,n,{timeoutMs:U.value.worker}),yield Ne(),we.value=c,I.value=!1,Xe()}catch(a){Xe(),at(a)}}})),V(q,t=>{se&&se.disconnect(),!t||B.value||te.value||(se=new ResizeObserver(e=>{e&&e.length>0&&!B.value&&!te.value&&el(()=>{Ie(e[0].contentRect.width)})}),se.observe(t))},{immediate:!0}),Nt(()=>D(null,null,function*(){yield A(),Ee.value||(S.value=!j.value),ie.value&&(ue(),je.value=R.value.length)})),V(()=>j.value,t=>{Ee.value||(S.value=!t)}),V(()=>ie.value,t=>{t&&(B.value||(ue(),je.value=R.value.length),o.loading||B.value||ue())},{immediate:!1}),Xt(()=>{fe&&clearTimeout(fe),se&&se.disconnect(),H&&(H.abort(),H=null),_(),pe()}),V(()=>Z.value,t=>D(null,null,function*(){t?(_(),H&&H.abort()):B.value||(yield A(),ue(),S.value||Ke())}),{immediate:!1});const _e=Q(()=>o.isDark?"mermaid-action-btn p-2 text-xs rounded text-gray-400 hover:bg-gray-700 hover:text-gray-200":"mermaid-action-btn p-2 text-xs rounded text-gray-600 hover:bg-gray-200 hover:text-gray-700");return(t,e)=>(g(),w("div",{class:y(["my-4 rounded-lg border overflow-hidden shadow-sm",[o.isDark?"border-gray-700/30":"border-gray-200",{"is-rendering":o.loading}]])},[o.showHeader?(g(),w("div",{key:0,class:y(["mermaid-block-header flex justify-between items-center px-4 py-2.5 border-b",o.isDark?"bg-gray-800 border-gray-700/30":"bg-gray-50 border-gray-200"])},[t.$slots["header-left"]?(g(),w("div",al,[Je(t.$slots,"header-left",{},void 0,!0)])):(g(),w("div",il,[r("img",{src:h("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%3e%3cpath%20fill='none'%20stroke='%23ca9ee6'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M1.5%202.5c0%206%202.25%205.75%204%207%20.83.67%201.17%202%201%204h3c-.17-2%20.17-3.33%201-4%201.75-1.25%204-1%204-7C12%202.5%2010%203%208%207%206%203%204%202.5%201.5%202.5'%20/%3e%3c/svg%3e"),class:"w-4 h-4 my-0",alt:"Mermaid"},null,8,ul),r("span",{class:y(["text-sm font-medium font-mono truncate",o.isDark?"text-gray-400":"text-gray-600"])},"Mermaid",2)])),t.$slots["header-center"]?(g(),w("div",sl,[Je(t.$slots,"header-center",{},void 0,!0)])):o.showModeToggle&&j.value?(g(),w("div",{key:3,class:y(["flex items-center gap-x-1 rounded-md p-0.5",o.isDark?"bg-gray-700":"bg-gray-100"])},[r("button",{class:y(["px-2.5 py-1 text-xs rounded transition-colors",[S.value?o.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700":o.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm"]]),onClick:e[0]||(e[0]=()=>gt("preview")),onMouseenter:e[1]||(e[1]=l=>E(l,h(f)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=l=>E(l,h(f)("common.preview")||"Preview")),onMouseleave:T,onBlur:T},[r("div",cl,[e[21]||(e[21]=r("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),r("circle",{cx:"12",cy:"12",r:"3"})])],-1)),r("span",null,xe(h(f)("common.preview")||"Preview"),1)])],34),r("button",{class:y(["px-2.5 py-1 text-xs rounded transition-colors",[S.value?o.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm":o.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"]]),onClick:e[3]||(e[3]=()=>gt("source")),onMouseenter:e[4]||(e[4]=l=>E(l,h(f)("common.source")||"Source")),onFocus:e[5]||(e[5]=l=>E(l,h(f)("common.source")||"Source")),onMouseleave:T,onBlur:T},[r("div",dl,[e[22]||(e[22]=r("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[r("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"})],-1)),r("span",null,xe(h(f)("common.source")||"Source"),1)])],34)],2)):ee("",!0),t.$slots["header-right"]?(g(),w("div",vl,[Je(t.$slots,"header-right",{},void 0,!0)])):(g(),w("div",ml,[o.showCollapseButton?(g(),w("button",{key:0,class:y(_e.value),"aria-pressed":Z.value,onClick:e[6]||(e[6]=l=>Z.value=!Z.value),onMouseenter:e[7]||(e[7]=l=>E(l,Z.value?h(f)("common.expand")||"Expand":h(f)("common.collapse")||"Collapse")),onFocus:e[8]||(e[8]=l=>E(l,Z.value?h(f)("common.expand")||"Expand":h(f)("common.collapse")||"Collapse")),onMouseleave:T,onBlur:T},[(g(),w("svg",{style:xt({rotate:Z.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[...e[23]||(e[23]=[r("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],42,fl)):ee("",!0),o.showCopyButton?(g(),w("button",{key:1,class:y(_e.value),onClick:Ot,onMouseenter:e[9]||(e[9]=l=>ut(l)),onFocus:e[10]||(e[10]=l=>ut(l)),onMouseleave:T,onBlur:T},[Ce.value?(g(),w("svg",gl,[...e[25]||(e[25]=[r("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(g(),w("svg",hl,[...e[24]||(e[24]=[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),r("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],34)):ee("",!0),o.showExportButton&&j.value?(g(),w("button",{key:2,class:y(`${_e.value} ${Fe.value?"opacity-50 cursor-not-allowed":""}`),disabled:Fe.value,onClick:zt,onMouseenter:e[11]||(e[11]=l=>E(l,h(f)("common.export")||"Export")),onFocus:e[12]||(e[12]=l=>E(l,h(f)("common.export")||"Export")),onMouseleave:T,onBlur:T},[...e[26]||(e[26]=[r("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),r("path",{d:"m7 10l5 5l5-5"})])],-1)])],42,pl)):ee("",!0),o.showFullscreenButton&&j.value?(g(),w("button",{key:3,class:y(`${_e.value} ${Fe.value?"opacity-50 cursor-not-allowed":""}`),disabled:Fe.value,onClick:Lt,onMouseenter:e[13]||(e[13]=l=>E(l,J.value?h(f)("common.minimize")||"Minimize":h(f)("common.open")||"Open")),onFocus:e[14]||(e[14]=l=>E(l,J.value?h(f)("common.minimize")||"Minimize":h(f)("common.open")||"Open")),onMouseleave:T,onBlur:T},[J.value?(g(),w("svg",xl,[...e[28]||(e[28]=[r("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(g(),w("svg",yl,[...e[27]||(e[27]=[r("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])]))],42,wl)):ee("",!0)]))],2)):ee("",!0),_t(r("div",{ref_key:"modeContainerRef",ref:tt},[S.value?(g(),w("div",{key:0,class:y(["p-4",o.isDark?"bg-gray-900":"bg-gray-50"])},[r("pre",{class:y(["text-sm font-mono whitespace-pre-wrap",o.isDark?"text-gray-300":"text-gray-700"])},xe(R.value),3)],2)):(g(),w("div",kl,[o.showZoomControls?(g(),w("div",bl,[r("div",Ml,[r("button",{class:y(["p-2 text-xs rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:mt,onMouseenter:e[15]||(e[15]=l=>E(l,h(f)("common.zoomIn")||"Zoom in")),onFocus:e[16]||(e[16]=l=>E(l,h(f)("common.zoomIn")||"Zoom in")),onMouseleave:T,onBlur:T},[...e[29]||(e[29]=[r("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("circle",{cx:"11",cy:"11",r:"8"}),r("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],34),r("button",{class:y(["p-2 text-xs rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:ft,onMouseenter:e[17]||(e[17]=l=>E(l,h(f)("common.zoomOut")||"Zoom out")),onFocus:e[18]||(e[18]=l=>E(l,h(f)("common.zoomOut")||"Zoom out")),onMouseleave:T,onBlur:T},[...e[30]||(e[30]=[r("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("circle",{cx:"11",cy:"11",r:"8"}),r("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],34),r("button",{class:y(["p-2 text-xs rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:ht,onMouseenter:e[19]||(e[19]=l=>E(l,h(f)("common.resetZoom")||"Reset zoom")),onFocus:e[20]||(e[20]=l=>E(l,h(f)("common.resetZoom")||"Reset zoom")),onMouseleave:T,onBlur:T},xe(Math.round(100*x.value))+"% ",35)])])):ee("",!0),r("div",kt({ref_key:"mermaidContainer",ref:q,class:["min-h-[360px] relative transition-all duration-100 overflow-hidden block",o.isDark?"bg-gray-900":"bg-gray-50"],style:{height:G.value}},bt(ot.value),{onMousedown:He,onMousemove:Re,onMouseup:ve,onMouseleave:ve,onTouchstartPassive:He,onTouchmovePassive:Re,onTouchendPassive:ve}),[r("div",{"data-mermaid-wrapper":"",class:y(["absolute inset-0 cursor-grab",{"cursor-grabbing":Be.value}]),style:xt(Ue.value)},[r("div",{ref_key:"mermaidContent",ref:u,class:"_mermaid w-full text-center flex items-center justify-center min-h-full"},null,512)],6)],16),(g(),Vt(Wt,{to:"body"},[r("div",Tl,[Zt(Ut,{name:"mermaid-dialog",appear:""},{default:qt(()=>[J.value?(g(),w("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",onClick:It(We,["self"])},[r("div",{class:y(["dialog-panel relative w-full h-full max-w-full max-h-full rounded shadow-lg overflow-hidden",o.isDark?"bg-gray-900":"bg-white"])},[r("div",Cl,[r("button",{class:y(["p-2 text-xs rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:mt},[...e[31]||(e[31]=[r("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("circle",{cx:"11",cy:"11",r:"8"}),r("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],2),r("button",{class:y(["p-2 text-xs rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:ft},[...e[32]||(e[32]=[r("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[r("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[r("circle",{cx:"11",cy:"11",r:"8"}),r("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],2),r("button",{class:y(["p-2 text-xs rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:ht},xe(Math.round(100*x.value))+"% ",3),r("button",{class:y(["inline-flex items-center justify-center p-2 rounded transition-colors",[o.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"]]),onClick:We},[...e[33]||(e[33]=[r("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"w-3 h-3"},[r("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"})],-1)])],2)]),r("div",kt({ref_key:"modalContent",ref:ae,class:"w-full h-full flex items-center justify-center p-4 overflow-hidden"},bt(ot.value,!0),{onMousedown:He,onMousemove:Re,onMouseup:ve,onMouseleave:ve,onTouchstartPassive:He,onTouchmovePassive:Re,onTouchendPassive:ve}),null,16)],2)])):ee("",!0)]),_:1})])]))]))],512),[[Yt,!Z.value]])],2))}}),[["__scopeId","data-v-2ff46cc8"]]);et.install=$=>{$.component(et.__name,et)};export{et as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as e,b as r,a,S as s}from"./B5FXSUaH.js";import{_ as i}from"./D5mZhIOc.js";import"./D8IUtoH8.js";import"./B8Q-DreI.js";import"./E7Ix3tcC.js";var p={parser:a,get db(){return new s(2)},renderer:r,styles:e,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{p as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as oe}from"./
|
|
1
|
+
import{g as oe}from"./BSycTytT.js";import{_ as d,E as rt,d as O,e as he,l as L,y as de,A as ge,c as R,ak as ue,R as pe,S as fe,O as xe,al as j,am as Wt,an as ye,u as $,k as be,ao as we,ap as xt,i as yt,aq as me}from"./D5mZhIOc.js";import{c as Le}from"./BjnVA5ld.js";import{G as Se}from"./BHTMZHSU.js";import{c as ke}from"./Bp8rDhST.js";import"./E7Ix3tcC.js";import"./BW7XEYaa.js";var bt=(function(){var e=d(function(D,y,g,f){for(g=g||{},f=D.length;f--;g[D[f]]=y);return g},"o"),t=[1,15],a=[1,7],i=[1,13],l=[1,14],s=[1,19],r=[1,16],n=[1,17],c=[1,18],u=[8,30],o=[8,10,21,28,29,30,31,39,43,46],x=[1,23],w=[1,24],b=[8,10,15,16,21,28,29,30,31,39,43,46],S=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],k={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:d(function(y,g,f,m,E,h,W){var p=h.length-1;switch(E){case 4:m.getLogger().debug("Rule: separator (NL) ");break;case 5:m.getLogger().debug("Rule: separator (Space) ");break;case 6:m.getLogger().debug("Rule: separator (EOF) ");break;case 7:m.getLogger().debug("Rule: hierarchy: ",h[p-1]),m.setHierarchy(h[p-1]);break;case 8:m.getLogger().debug("Stop NL ");break;case 9:m.getLogger().debug("Stop EOF ");break;case 10:m.getLogger().debug("Stop NL2 ");break;case 11:m.getLogger().debug("Stop EOF2 ");break;case 12:m.getLogger().debug("Rule: statement: ",h[p]),typeof h[p].length=="number"?this.$=h[p]:this.$=[h[p]];break;case 13:m.getLogger().debug("Rule: statement #2: ",h[p-1]),this.$=[h[p-1]].concat(h[p]);break;case 14:m.getLogger().debug("Rule: link: ",h[p],y),this.$={edgeTypeStr:h[p],label:""};break;case 15:m.getLogger().debug("Rule: LABEL link: ",h[p-3],h[p-1],h[p]),this.$={edgeTypeStr:h[p],label:h[p-1]};break;case 18:const I=parseInt(h[p]),Z=m.generateId();this.$={id:Z,type:"space",label:"",width:I,children:[]};break;case 23:m.getLogger().debug("Rule: (nodeStatement link node) ",h[p-2],h[p-1],h[p]," typestr: ",h[p-1].edgeTypeStr);const V=m.edgeStrToEdgeData(h[p-1].edgeTypeStr);this.$=[{id:h[p-2].id,label:h[p-2].label,type:h[p-2].type,directions:h[p-2].directions},{id:h[p-2].id+"-"+h[p].id,start:h[p-2].id,end:h[p].id,label:h[p-1].label,type:"edge",directions:h[p].directions,arrowTypeEnd:V,arrowTypeStart:"arrow_open"},{id:h[p].id,label:h[p].label,type:m.typeStr2Type(h[p].typeStr),directions:h[p].directions}];break;case 24:m.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[p-1],h[p]),this.$={id:h[p-1].id,label:h[p-1].label,type:m.typeStr2Type(h[p-1].typeStr),directions:h[p-1].directions,widthInColumns:parseInt(h[p],10)};break;case 25:m.getLogger().debug("Rule: nodeStatement (node) ",h[p]),this.$={id:h[p].id,label:h[p].label,type:m.typeStr2Type(h[p].typeStr),directions:h[p].directions,widthInColumns:1};break;case 26:m.getLogger().debug("APA123",this?this:"na"),m.getLogger().debug("COLUMNS: ",h[p]),this.$={type:"column-setting",columns:h[p]==="auto"?-1:parseInt(h[p])};break;case 27:m.getLogger().debug("Rule: id-block statement : ",h[p-2],h[p-1]),m.generateId(),this.$={...h[p-2],type:"composite",children:h[p-1]};break;case 28:m.getLogger().debug("Rule: blockStatement : ",h[p-2],h[p-1],h[p]);const at=m.generateId();this.$={id:at,type:"composite",label:"",children:h[p-1]};break;case 29:m.getLogger().debug("Rule: node (NODE_ID separator): ",h[p]),this.$={id:h[p]};break;case 30:m.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[p-1],h[p]),this.$={id:h[p-1],label:h[p].label,typeStr:h[p].typeStr,directions:h[p].directions};break;case 31:m.getLogger().debug("Rule: dirList: ",h[p]),this.$=[h[p]];break;case 32:m.getLogger().debug("Rule: dirList: ",h[p-1],h[p]),this.$=[h[p-1]].concat(h[p]);break;case 33:m.getLogger().debug("Rule: nodeShapeNLabel: ",h[p-2],h[p-1],h[p]),this.$={typeStr:h[p-2]+h[p],label:h[p-1]};break;case 34:m.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[p-3],h[p-2]," #3:",h[p-1],h[p]),this.$={typeStr:h[p-3]+h[p],label:h[p-2],directions:h[p-1]};break;case 35:case 36:this.$={type:"classDef",id:h[p-1].trim(),css:h[p].trim()};break;case 37:this.$={type:"applyClass",id:h[p-1].trim(),styleClass:h[p].trim()};break;case 38:this.$={type:"applyStyles",id:h[p-1].trim(),stylesStr:h[p].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:i,29:l,31:s,39:r,43:n,46:c}),e(o,[2,16],{14:22,15:x,16:w}),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(b,[2,25],{27:[1,25]}),e(o,[2,26]),{19:26,26:12,31:s},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(S,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},e(b,[2,24]),{10:t,11:37,13:4,14:22,15:x,16:w,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(S,[2,30]),{18:[1,43]},{18:[1,44]},e(b,[2,23]),{18:[1,45]},{30:[1,46]},e(o,[2,28]),e(o,[2,35]),e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(o,[2,27]),e(S,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(S,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(y,g){if(g.recoverable)this.trace(y);else{var f=new Error(y);throw f.hash=g,f}},"parseError"),parse:d(function(y){var g=this,f=[0],m=[],E=[null],h=[],W=this.table,p="",I=0,Z=0,V=2,at=1,ne=h.slice.call(arguments,1),z=Object.create(this.lexer),q={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(q.yy[gt]=this.yy[gt]);z.setInput(y,q.yy),q.yy.lexer=z,q.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var ut=z.yylloc;h.push(ut);var le=z.options&&z.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ce(P){f.length=f.length-2*P,E.length=E.length-P,h.length=h.length-P}d(ce,"popStack");function Nt(){var P;return P=m.pop()||z.lex()||at,typeof P!="number"&&(P instanceof Array&&(m=P,P=m.pop()),P=g.symbols_[P]||P),P}d(Nt,"lex");for(var F,J,H,pt,Q={},st,G,Tt,it;;){if(J=f[f.length-1],this.defaultActions[J]?H=this.defaultActions[J]:((F===null||typeof F>"u")&&(F=Nt()),H=W[J]&&W[J][F]),typeof H>"u"||!H.length||!H[0]){var ft="";it=[];for(st in W[J])this.terminals_[st]&&st>V&&it.push("'"+this.terminals_[st]+"'");z.showPosition?ft="Parse error on line "+(I+1)+`:
|
|
2
2
|
`+z.showPosition()+`
|
|
3
3
|
Expecting `+it.join(", ")+", got '"+(this.terminals_[F]||F)+"'":ft="Parse error on line "+(I+1)+": Unexpected "+(F==at?"end of input":"'"+(this.terminals_[F]||F)+"'"),this.parseError(ft,{text:z.match,token:this.terminals_[F]||F,line:z.yylineno,loc:ut,expected:it})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+F);switch(H[0]){case 1:f.push(F),E.push(z.yytext),h.push(z.yylloc),f.push(H[1]),F=null,Z=z.yyleng,p=z.yytext,I=z.yylineno,ut=z.yylloc;break;case 2:if(G=this.productions_[H[1]][1],Q.$=E[E.length-G],Q._$={first_line:h[h.length-(G||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(G||1)].first_column,last_column:h[h.length-1].last_column},le&&(Q._$.range=[h[h.length-(G||1)].range[0],h[h.length-1].range[1]]),pt=this.performAction.apply(Q,[p,Z,I,q.yy,H[1],E,h].concat(ne)),typeof pt<"u")return pt;G&&(f=f.slice(0,-1*G*2),E=E.slice(0,-1*G),h=h.slice(0,-1*G)),f.push(this.productions_[H[1]][0]),E.push(Q.$),h.push(Q._$),Tt=W[f[f.length-2]][f[f.length-1]],f.push(Tt);break;case 3:return!0}}return!0},"parse")},B=(function(){var D={EOF:1,parseError:d(function(g,f){if(this.yy.parser)this.yy.parser.parseError(g,f);else throw new Error(g)},"parseError"),setInput:d(function(y,g){return this.yy=g||this.yy||{},this._input=y,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var y=this._input[0];this.yytext+=y,this.yyleng++,this.offset++,this.match+=y,this.matched+=y;var g=y.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),y},"input"),unput:d(function(y){var g=y.length,f=y.split(/(?:\r\n?|\n)/g);this._input=y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),f.length-1&&(this.yylineno-=f.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===m.length?this.yylloc.first_column:0)+m[m.length-f.length].length-f[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(y){this.unput(this.match.slice(y))},"less"),pastInput:d(function(){var y=this.matched.substr(0,this.matched.length-this.match.length);return(y.length>20?"...":"")+y.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var y=this.match;return y.length<20&&(y+=this._input.substr(0,20-y.length)),(y.substr(0,20)+(y.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var y=this.pastInput(),g=new Array(y.length+1).join("-");return y+this.upcomingInput()+`
|