@dimi-agent/cli 0.4.4 → 0.5.1

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.
Files changed (65) hide show
  1. package/dist/main.mjs +6648 -10909
  2. package/dist-web/assets/{CodeBlockNode-BL_lWHk1.js → CodeBlockNode-BaWzfCy0.js} +1 -1
  3. package/dist-web/assets/{DesignSystemView-Gp4T3sr4.js → DesignSystemView-Bb01YcYk.js} +1 -1
  4. package/dist-web/assets/{Tooltip-DsL7mF2H.js → Tooltip-S8S-9806.js} +1 -1
  5. package/dist-web/assets/{arc-CWKkAytd.js → arc-CJvKR1oC.js} +1 -1
  6. package/dist-web/assets/{architectureDiagram-3BPJPVTR-BxQA87W8.js → architectureDiagram-3BPJPVTR-D0r4NgJY.js} +1 -1
  7. package/dist-web/assets/{blockDiagram-GPEHLZMM-Bv-uKykJ.js → blockDiagram-GPEHLZMM-CcVFv_et.js} +1 -1
  8. package/dist-web/assets/{c4Diagram-AAUBKEIU-BNwMmBwW.js → c4Diagram-AAUBKEIU-gMmJTN7c.js} +1 -1
  9. package/dist-web/assets/channel-DlP6phL9.js +1 -0
  10. package/dist-web/assets/{chunk-2J33WTMH-D0o9LNEb.js → chunk-2J33WTMH-BZpxh0T1.js} +1 -1
  11. package/dist-web/assets/{chunk-4BX2VUAB-C9DEPDT4.js → chunk-4BX2VUAB-NJfuQ9IP.js} +1 -1
  12. package/dist-web/assets/{chunk-55IACEB6-DM4XnM9f.js → chunk-55IACEB6-BKgkJoe-.js} +1 -1
  13. package/dist-web/assets/{chunk-727SXJPM-Dky6n2gf.js → chunk-727SXJPM-DA5_3QvA.js} +1 -1
  14. package/dist-web/assets/{chunk-AQP2D5EJ-DjmnKhuo.js → chunk-AQP2D5EJ-DbJPlxYa.js} +1 -1
  15. package/dist-web/assets/{chunk-FMBD7UC4-wkNtOdUv.js → chunk-FMBD7UC4-DDzZo5dG.js} +1 -1
  16. package/dist-web/assets/{chunk-ND2GUHAM-Byh5s8MO.js → chunk-ND2GUHAM-BuOldrpx.js} +1 -1
  17. package/dist-web/assets/{chunk-QZHKN3VN-C596rHAe.js → chunk-QZHKN3VN-B4kJPKe8.js} +1 -1
  18. package/dist-web/assets/classDiagram-4FO5ZUOK-BsZqzmeE.js +1 -0
  19. package/dist-web/assets/classDiagram-v2-Q7XG4LA2-BsZqzmeE.js +1 -0
  20. package/dist-web/assets/{cose-bilkent-S5V4N54A-B5CIST3j.js → cose-bilkent-S5V4N54A-DWk2qZTK.js} +1 -1
  21. package/dist-web/assets/{dagre-BM42HDAG-DQ2h_HWV.js → dagre-BM42HDAG-BfzrP96D.js} +1 -1
  22. package/dist-web/assets/{diagram-2AECGRRQ-DcJgQFHi.js → diagram-2AECGRRQ-TGkTAtM-.js} +1 -1
  23. package/dist-web/assets/{diagram-5GNKFQAL-CHeEjhiL.js → diagram-5GNKFQAL-T2-djOqO.js} +1 -1
  24. package/dist-web/assets/{diagram-KO2AKTUF-CCF3txiw.js → diagram-KO2AKTUF--TEvFK3o.js} +1 -1
  25. package/dist-web/assets/{diagram-LMA3HP47-B5_nRmtD.js → diagram-LMA3HP47-Bp3C9QTX.js} +1 -1
  26. package/dist-web/assets/{diagram-OG6HWLK6-BdSBNBYS.js → diagram-OG6HWLK6-B9Jf7Zjz.js} +1 -1
  27. package/dist-web/assets/{erDiagram-TEJ5UH35-CZ1Ubm9Y.js → erDiagram-TEJ5UH35-DofEbbkJ.js} +1 -1
  28. package/dist-web/assets/{flowDiagram-I6XJVG4X-C6eXPlWY.js → flowDiagram-I6XJVG4X-Bzb-pXgl.js} +1 -1
  29. package/dist-web/assets/{ganttDiagram-6RSMTGT7-LvGiqVrM.js → ganttDiagram-6RSMTGT7-CZH_FJYt.js} +1 -1
  30. package/dist-web/assets/{gitGraphDiagram-PVQCEYII-D1ktH7c_.js → gitGraphDiagram-PVQCEYII-BflQ8SBJ.js} +1 -1
  31. package/dist-web/assets/{index-CXz8XYk1.css → index-HKPwTfaa.css} +1 -1
  32. package/dist-web/assets/index-Ia-ZUO2Z.js +337 -0
  33. package/dist-web/assets/{index10-ePz6DAnA.js → index10-cnUP9s6C.js} +1 -1
  34. package/dist-web/assets/{index11-wd1P4PGw.js → index11-Bndq68af.js} +1 -1
  35. package/dist-web/assets/{index5-D_56m6HR.js → index5-B1-fjW_m.js} +1 -1
  36. package/dist-web/assets/{index6-BiWLUsB3.js → index6-xetF8e8c.js} +1 -1
  37. package/dist-web/assets/{index7-DSRe_h5d.js → index7-CtaXn3W4.js} +1 -1
  38. package/dist-web/assets/{index8-C0MfrVDC.js → index8-d5uRV0AF.js} +1 -1
  39. package/dist-web/assets/{infoDiagram-5YYISTIA-C0KiosmZ.js → infoDiagram-5YYISTIA-B0gQEyYk.js} +1 -1
  40. package/dist-web/assets/{ishikawaDiagram-YF4QCWOH-CGUCgDXm.js → ishikawaDiagram-YF4QCWOH-DA51LQsg.js} +1 -1
  41. package/dist-web/assets/{journeyDiagram-JHISSGLW-K-24gGZU.js → journeyDiagram-JHISSGLW-C0hOvJE-.js} +1 -1
  42. package/dist-web/assets/{kanban-definition-UN3LZRKU-DDKuz_xA.js → kanban-definition-UN3LZRKU-fQck3D0t.js} +1 -1
  43. package/dist-web/assets/{linear-DYKn_u2q.js → linear-ICCSqDsp.js} +1 -1
  44. package/dist-web/assets/{mermaid.core-oS_owI3c.js → mermaid.core-B_k0q1Z5.js} +4 -4
  45. package/dist-web/assets/{mindmap-definition-RKZ34NQL-C0lJUdai.js → mindmap-definition-RKZ34NQL-DMytkbGB.js} +1 -1
  46. package/dist-web/assets/{pieDiagram-4H26LBE5-DGCPaNkB.js → pieDiagram-4H26LBE5-Df6_JDYe.js} +1 -1
  47. package/dist-web/assets/{quadrantDiagram-W4KKPZXB-B3op7xS9.js → quadrantDiagram-W4KKPZXB-DNnSVq1-.js} +1 -1
  48. package/dist-web/assets/{requirementDiagram-4Y6WPE33-xbfEgwL_.js → requirementDiagram-4Y6WPE33-B9O3pyZ5.js} +1 -1
  49. package/dist-web/assets/{sankeyDiagram-5OEKKPKP-3ff_V2pD.js → sankeyDiagram-5OEKKPKP-BfJ-To-P.js} +1 -1
  50. package/dist-web/assets/{sequenceDiagram-3UESZ5HK-C5YRTKoy.js → sequenceDiagram-3UESZ5HK-zK8EZ0hV.js} +1 -1
  51. package/dist-web/assets/{stateDiagram-AJRCARHV-ltBPYPwO.js → stateDiagram-AJRCARHV-D8kyVPrY.js} +1 -1
  52. package/dist-web/assets/stateDiagram-v2-BHNVJYJU-CnQhCLSR.js +1 -0
  53. package/dist-web/assets/{timeline-definition-PNZ67QCA-BT-5Wtvy.js → timeline-definition-PNZ67QCA-nE5-ttgA.js} +1 -1
  54. package/dist-web/assets/{vennDiagram-CIIHVFJN-Tif-M9Km.js → vennDiagram-CIIHVFJN-bfmUW0Li.js} +1 -1
  55. package/dist-web/assets/{vue.runtime.esm-bundler-BMrzHc_f.js → vue.runtime.esm-bundler-CNUOXmj4.js} +1 -1
  56. package/dist-web/assets/{wardley-L42UT6IY-CqiBaH6C.js → wardley-L42UT6IY-CBG17PJg.js} +1 -1
  57. package/dist-web/assets/{wardleyDiagram-YWT4CUSO-DfgCjyaL.js → wardleyDiagram-YWT4CUSO-djjE-wCw.js} +1 -1
  58. package/dist-web/assets/{xychartDiagram-2RQKCTM6-DTwp2FCG.js → xychartDiagram-2RQKCTM6-CTGSlEc6.js} +1 -1
  59. package/dist-web/index.html +2 -2
  60. package/package.json +6 -6
  61. package/dist-web/assets/channel-B2QvGyDT.js +0 -1
  62. package/dist-web/assets/classDiagram-4FO5ZUOK-Cc_V2QfH.js +0 -1
  63. package/dist-web/assets/classDiagram-v2-Q7XG4LA2-Cc_V2QfH.js +0 -1
  64. package/dist-web/assets/index-DKIJmNQn.js +0 -337
  65. package/dist-web/assets/stateDiagram-v2-BHNVJYJU-Dl6LC5u9.js +0 -1
@@ -1,2 +1,2 @@
1
- import{bQ as Re,M as Ae,b$ as Ge,c0 as qe,c1 as Je,c2 as Qe,aU as d,bl as Ke,af as We,bY as e1,bE as B,as as U,aD as n1,c3 as Ze,az as o1,aL as r,u,aY as ge,v as t,bk as s,bb as X,au as b,t as F,aw as Ce,bL as t1,bB as l1,s as a1,I as i1,bJ as r1,bO as s1,g as u1,T as c1,q as T,c4 as Ve,c5 as ie,c6 as d1,c7 as De,c8 as v1,c9 as m1,b_ as h1}from"./index-DKIJmNQn.js";var re=(R,xe,l)=>new Promise((a,J)=>{var V=c=>{try{H(l.next(c))}catch($){J($)}},Q=c=>{try{H(l.throw(c))}catch($){J($)}},H=c=>c.done?a(c.value):Promise.resolve(c.value).then(V,Q);H((l=l.apply(R,xe)).next())});const p1=["data-markstream-mode"],f1={key:0,class:"infographic-block-header flex justify-between items-center border-b"},w1={key:0},g1={key:1,class:"flex items-center gap-x-2 overflow-hidden"},C1=["innerHTML"],k1={key:2},x1={key:3,class:"infographic-mode-toggle flex items-center gap-0.5"},y1=["disabled"],b1={class:"flex items-center gap-x-1"},M1={class:"flex items-center gap-x-1"},B1={key:4},F1={key:5,class:"infographic-header-actions flex items-center"},T1=["aria-pressed"],H1={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:"action-icon"},$1={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:"action-icon"},j1=["disabled"],L1=["disabled"],P1={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:"action-icon"},E1={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:"action-icon"},z1={key:0,class:"infographic-source"},S1={class:"infographic-source-code text-sm font-mono whitespace-pre-wrap"},Z1={key:1,class:"relative"},V1={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},D1={class:"flex items-center gap-2 backdrop-blur rounded-lg"},N1={key:0,class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap"},Y1={class:"dialog-panel infographic-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},_1={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},se="infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",ke=Re(Ae({__name:"InfographicBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0}},emits:["copy","export","openModal"],setup(R,{emit:xe}){const l=R,{t:a}=Ge(),J=qe(),V=Je(),Q=Qe(),H=d(!1),c=d(!1),$=d(),p=d(),k=d(!0),ye=d(!1),j=d(!1),D=d(),K=d(null),L=d(!1),S=d(!1),A=d(null),P=d(typeof window>"u"||!Q.value),Ne=Ke(),x=We(e1,null);let E="";const be=T(()=>h1(l,Ne));typeof window<"u"&&B([()=>$.value,Q],([n,e])=>{var o,i,C;if((o=A.value)==null||o.destroy(),A.value=null,!e||P.value)return void(P.value=!0);if(!n)return void(P.value=!1);const f=(C=(i=V?.value.heavyBlockMargin)!=null?i:V?.value.rootMargin)!=null?C:"160px",w=J(n,{rootMargin:f,allowIdle:!1});A.value=w,P.value=w.isVisible.value,w.whenVisible.then(()=>{P.value=!0})},{immediate:!0});const z=T(()=>l.node.code),ue=T(()=>{var n;return(function(e){if(l.maxHeight==="none")return Ve(e,void 0,null);const o=ie(l.maxHeight);return Ve(e,void 0,o)})((n=ie(l.estimatedPreviewHeightPx))!=null?n:d1(z.value))}),ce=d(`${ue.value}px`),Ye=T(()=>ie(l.estimatedPreviewHeightPx)!=null);function Me(){var n;if(!p.value||Ye.value)return;const e=p.value.scrollHeight;if(e>0){const o=(n=ie((function(i){if(l.maxHeight==="none")return`${i}px`;if(l.maxHeight!=null){const f=Number.parseFloat(String(l.maxHeight));if(Number.isFinite(f))return`${Math.min(i,f)}px`}const C=p.value;if(C){const f=getComputedStyle(C).getPropertyValue("--ms-size-code-max-height").trim(),w=Number.parseFloat(f);if(Number.isFinite(w))return`${Math.min(i,w)}px`}return`${Math.min(i,500)}px`})(e)))!=null?n:e;ce.value=`${Math.max(o,ue.value)}px`}}const M=d(1),N=d(0),Y=d(0),_=d(!1),W=d({x:0,y:0}),Be=T(()=>z.value);function Fe(n){return!n||n.disabled}function h(n,e,o="top"){if(Fe(n.currentTarget))return;const i=n,C=i?.clientX!=null&&i?.clientY!=null?{x:i.clientX,y:i.clientY}:void 0;De(n.currentTarget,e,o,!1,C,l.isDark)}function v(){v1()}function Te(n){if(Fe(n.currentTarget))return;const e=H.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=n,i=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;De(n.currentTarget,e,"top",!1,i,l.isDark)}function _e(){return re(this,null,function*(){try{const n=z.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(n)),H.value=!0,setTimeout(()=>{H.value=!1},1e3)}catch(n){console.error("Failed to copy:",n)}})}function He(n){(n!=="preview"||Ze())&&(ye.value=!0,k.value=n==="source")}function Ie(){var n;const e=(n=p.value)==null?void 0:n.querySelector("svg");e?(function(o){re(this,null,function*(){try{const i=new XMLSerializer().serializeToString(o),C=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),f=URL.createObjectURL(C);if(typeof document<"u"){const w=document.createElement("a");w.href=f,w.download=`infographic-${Date.now()}.svg`;try{document.body.appendChild(w),w.click(),document.body.removeChild(w)}catch{}URL.revokeObjectURL(f)}}catch(i){console.error("Failed to export SVG:",i)}})})(e):console.error("SVG element not found")}function de(n){n.key==="Escape"&&j.value&&ve()}function ve(){if(j.value=!1,D.value&&(D.value.innerHTML=""),K.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}}function Oe(){(function(){if(j.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",de)}catch{}U(()=>{if(p.value&&D.value){D.value.innerHTML="";const n=document.createElement("div");n.style.transition="transform 0.1s ease",n.style.transformOrigin="center center",n.style.width="100%",n.style.height="100%",n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center";const e=p.value.cloneNode(!0);e.classList.add("fullscreen"),e.style.height="auto",n.appendChild(e),D.value.appendChild(n),K.value=n,n.style.transform=`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}})})()}function $e(){M.value<3&&(M.value+=.1)}function je(){M.value>.5&&(M.value-=.1)}function Le(){M.value=1,N.value=0,Y.value=0}function ee(n){_.value=!0,n instanceof MouseEvent?W.value={x:n.clientX-N.value,y:n.clientY-Y.value}:W.value={x:n.touches[0].clientX-N.value,y:n.touches[0].clientY-Y.value}}function ne(n){if(!_.value)return;let e,o;n instanceof MouseEvent?(e=n.clientX,o=n.clientY):(e=n.touches[0].clientX,o=n.touches[0].clientY),N.value=e-W.value.x,Y.value=o-W.value.y}function I(){_.value=!1}let g=null,me=!1,oe=!1,G=!1,te="",q=!1,he=0;function le(n){return!q&&n===he}function Pe(n=!1){return re(this,null,function*(){var e,o;if(q||!P.value||!p.value)return;if(me)return oe=!0,void(G=G||n);const i=Be.value;if(!n&&i===te&&L.value)return;const C=l.loading===!1,f=++he;me=!0,(function(){const m=be.value;m&&E!==m&&(E&&x?.markSettled(E),E=m,x?.markPending(m))})();const w=p.value.innerHTML,pe=L.value,Xe=S.value;S.value=!1;try{const m=yield m1();if(!le(f))return;if(!m)return void console.warn("Infographic library failed to load.");const Z=p.value;if(!Z)return;g&&((e=g.destroy)==null||e.call(g),g=null),Z.innerHTML="",g=new m({container:Z,width:"100%",height:"100%"});let fe="";if((o=g.on)==null||o.call(g,"error",we=>{fe=(Array.isArray(we)?we:[we]).map(y=>{var Se;return y instanceof Error?y.message:typeof y=="string"?y:String(y&&typeof y=="object"&&"message"in y?(Se=y.message)!=null?Se:"":y??"")}).filter(Boolean).join("; ")}),g.render(z.value),fe)throw new Error(fe);if(!Z.childNodes.length)throw new Error("Infographic render returned empty output.");L.value=!0,S.value=!1,te=i,U(()=>{le(f)&&Me()})}catch(m){if(!le(f))return;C&&l.loading===!1&&i===Be.value?(console.error("Failed to render infographic:",m),L.value=!1,S.value=!0,te="",p.value&&(p.value.innerHTML=`<div style="padding: var(--ms-inset-panel-body); color: hsl(var(--ms-destructive))">Failed to render infographic: ${m instanceof Error?m.message:"Unknown error"}</div>`)):(L.value=pe,S.value=Xe,pe&&p.value&&(p.value.innerHTML=w))}finally{if(me=!1,le(f))if(oe){const m=G;oe=!1,G=!1,U(()=>{Pe(m)})}else(function(){re(this,null,function*(){const m=E;m&&(E="",yield U(),(function(Z=be.value){Z&&$.value&&x?.reportHeight(Z,$.value.offsetHeight)})(m),x?.markSettled(m))})})()}})}function O(n=!1){q||!P.value||k.value||c.value||U(()=>{q||Pe(n)})}B(()=>z.value,()=>{O(!0)}),B(()=>l.loading,(n,e)=>{e&&!n&&O(!0)}),B(()=>k.value,n=>{n||O(!0)}),B(()=>c.value,n=>{n||O()}),B(()=>l.maxHeight,()=>{U(()=>{Me()})}),B([()=>l.estimatedPreviewHeightPx,()=>z.value],()=>{L.value||k.value||(ce.value=`${ue.value}px`)}),B(()=>P.value,n=>{!n||k.value||c.value||O()}),n1(()=>{!ye.value&&Ze(),O()}),o1(()=>{var n,e;if(q=!0,he+=1,oe=!1,G=!1,(n=A.value)==null||n.destroy(),A.value=null,(function(){const o=E;o&&(E="",x?.markSettled(o))})(),g&&((e=g.destroy)==null||e.call(g),g=null),te="",typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}});const Ee=T(()=>!0),ae=T(()=>k.value||c.value),Ue=T(()=>k.value?"fallback":S.value?"error":L.value?"preview":"pending"),ze=T(()=>({transform:`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}));return B(ze,n=>{j.value&&K.value&&(K.value.style.transform=n.transform)}),(n,e)=>(r(),u("div",{ref_key:"viewportTarget",ref:$,class:b(["infographic-block-container rounded-lg border overflow-hidden",[{"is-rendering":l.loading,dark:l.isDark}]]),"data-markstream-infographic":"1","data-markstream-mode":Ue.value},[l.showHeader?(r(),u("div",f1,[n.$slots["header-left"]?(r(),u("div",w1,[ge(n.$slots,"header-left",{},void 0,!0)])):(r(),u("div",g1,[t("span",{class:"icon-slot action-icon shrink-0",innerHTML:s(`<svg width="15.52" height="16" viewBox="0 0 291 300" fill="none" xmlns="http://www.w3.org/2000/svg"><g><path d="M140.904 239.376C128.83 239.683 119.675 239.299 115.448 243.843C110.902 248.07 111.288 257.227 110.979 269.302C111.118 274.675 111.118 279.478 111.472 283.52C111.662 285.638 111.95 287.547 112.406 289.224C112.411 289.243 112.416 289.259 112.422 289.28C112.462 289.419 112.496 289.558 112.539 289.691C113.168 291.787 114.088 293.491 115.446 294.758C116.662 296.064 118.283 296.963 120.264 297.59C120.36 297.614 120.464 297.646 120.555 297.675C120.56 297.68 120.56 297.68 120.566 297.68C120.848 297.768 121.142 297.846 121.443 297.923C121.454 297.923 121.464 297.928 121.478 297.934C122.875 298.272 124.424 298.507 126.11 298.678C126.326 298.696 126.542 298.718 126.763 298.739C130.79 299.086 135.558 299.088 140.904 299.222C152.974 298.912 162.128 299.302 166.36 294.758C170.904 290.526 170.515 281.371 170.824 269.302C170.515 257.227 170.907 248.07 166.36 243.843C162.131 239.299 152.974 239.683 140.904 239.376Z" fill="#FF6376"></path><path d="M21.2155 128.398C12.6555 128.616 6.16484 128.339 3.16751 131.56C-0.0538222 134.56 0.218178 141.054 -0.000488281 149.608C0.218178 158.168 -0.0538222 164.659 3.16751 167.656C6.16484 170.878 12.6555 170.606 21.2155 170.824C25.0262 170.726 28.4288 170.726 31.2955 170.475C32.7968 170.342 34.1488 170.136 35.3382 169.814C35.3542 169.811 35.3648 169.806 35.3782 169.803C35.4768 169.774 35.5755 169.747 35.6688 169.718C37.1568 169.272 38.3648 168.622 39.2635 167.656C40.1915 166.795 40.8262 165.646 41.2715 164.243C41.2875 164.174 41.3115 164.102 41.3328 164.035C41.3328 164.035 41.3355 164.032 41.3355 164.027C41.3968 163.827 41.4529 163.622 41.5062 163.406C41.5062 163.398 41.5115 163.392 41.5142 163.382C41.7542 162.392 41.9222 161.294 42.0422 160.096C42.0555 159.944 42.0715 159.792 42.0848 159.635C42.3328 156.779 42.3328 153.398 42.4262 149.608C42.2075 141.054 42.4848 134.56 39.2635 131.56C36.2635 128.339 29.7728 128.616 21.2155 128.398Z" fill="#FFCCCC"></path><path d="M81.0595 184.171C70.8568 184.433 63.1208 184.102 59.5475 187.942C55.7075 191.518 56.0328 199.254 55.7742 209.454C56.0328 219.657 55.7075 227.393 59.5475 230.963C63.1208 234.803 70.8568 234.478 81.0595 234.739C85.6008 234.622 89.6595 234.622 93.0728 234.323C94.8648 234.163 96.4755 233.921 97.8942 233.534C97.9102 233.529 97.9235 233.526 97.9422 233.521C98.0568 233.486 98.1742 233.457 98.2888 233.422C100.06 232.889 101.5 232.113 102.569 230.963C103.676 229.937 104.433 228.566 104.964 226.894C104.985 226.811 105.012 226.726 105.036 226.646C105.041 226.643 105.041 226.643 105.041 226.638C105.116 226.401 105.18 226.153 105.244 225.897C105.244 225.889 105.249 225.881 105.254 225.867C105.54 224.689 105.74 223.379 105.881 221.953C105.9 221.771 105.916 221.59 105.934 221.403C106.228 218.001 106.228 213.969 106.342 209.454C106.081 199.254 106.412 191.518 102.572 187.942C98.9955 184.102 91.2568 184.433 81.0595 184.171Z" fill="#FF939F"></path><path d="M260.591 151.87C215.652 151.87 203.02 164.523 203.02 209.462H198.476C198.476 164.523 185.836 151.881 140.895 151.881V147.337C185.836 147.337 198.487 134.705 198.487 89.7659H203.02C203.02 134.705 215.652 147.337 260.591 147.337V151.87ZM286.052 124.158C281.82 119.614 272.66 120.001 260.591 119.689C248.521 119.385 239.361 119.771 235.129 115.227C230.585 110.995 230.983 101.846 230.671 89.7659C230.513 83.7312 230.535 78.4272 230.023 74.1019C229.513 69.7659 228.481 66.4219 226.209 64.3046C221.967 59.7606 212.817 60.1472 200.748 59.8459C188.681 60.1472 179.519 59.7606 175.287 64.3046C170.753 68.5366 171.129 77.6966 170.828 89.7659C170.516 101.835 170.9 110.995 166.356 115.227C162.124 119.771 152.985 119.374 140.905 119.689C138.873 119.739 136.924 119.771 135.071 119.811C119.313 118.697 106.337 112.318 106.337 89.7659C106.212 84.6699 106.233 80.1792 105.807 76.5206C105.367 72.8726 104.492 70.0379 102.575 68.2566C99.0013 64.4112 91.2573 64.7446 81.0653 64.4832C70.86 64.7446 63.1186 64.4112 59.5533 68.2566C55.708 71.8299 56.0306 79.5632 55.7693 89.7659C56.0306 99.9686 55.708 107.702 59.5533 111.278C63.1186 115.113 70.86 114.79 81.0653 115.049C103.617 115.049 109.996 128.035 111.1 143.803C111.068 145.659 111.028 147.587 110.975 149.619C111.121 154.987 111.121 159.79 111.476 163.835C111.663 165.95 111.945 167.857 112.404 169.534C112.412 169.555 112.412 169.566 112.423 169.598C112.465 169.734 112.497 169.867 112.537 170.003C113.164 172.099 114.092 173.809 115.447 175.07C116.665 176.371 118.281 177.278 120.271 177.905C120.364 177.934 120.46 177.955 120.564 177.987C120.855 178.081 121.145 178.153 121.439 178.238C121.46 178.238 121.471 178.238 121.479 178.249C122.876 178.582 124.42 178.822 126.108 178.987C126.327 179.009 126.545 179.03 126.764 179.051C130.788 179.395 135.559 179.395 140.905 179.529C152.975 179.843 162.124 179.457 166.356 184.001C170.9 188.233 170.516 197.371 170.828 209.451C171.129 221.529 170.743 230.681 175.287 234.91C179.519 239.454 188.681 239.07 200.748 239.371C206.127 239.235 210.921 239.235 214.975 238.881C217.079 238.694 218.985 238.403 220.676 237.955C220.695 237.945 220.705 237.934 220.727 237.934C220.873 237.891 220.999 237.859 221.135 237.819C223.228 237.193 224.937 236.265 226.209 234.91C227.511 233.691 228.409 232.065 229.044 230.097C229.065 230.003 229.095 229.899 229.127 229.803V229.793C229.22 229.513 229.295 229.222 229.367 228.918C229.367 228.897 229.377 228.897 229.377 228.878C229.721 227.481 229.951 225.937 230.127 224.249C230.137 224.03 230.169 223.811 230.191 223.593C230.535 219.571 230.535 214.798 230.671 209.451C230.972 197.371 230.585 188.233 235.129 184.001C239.361 179.457 248.511 179.843 260.591 179.529C272.66 179.227 281.82 179.614 286.052 175.07C290.596 170.838 290.209 161.689 290.511 149.619C290.209 137.539 290.596 128.379 286.052 124.158Z" fill="#FF356A"></path><path d="M112.405 49.848C112.411 49.8694 112.416 49.8827 112.421 49.904C112.461 50.0427 112.499 50.1814 112.539 50.3147C113.171 52.4134 114.088 54.1147 115.448 55.384C116.661 56.6907 118.283 57.5894 120.264 58.2134C120.36 58.24 120.464 58.2694 120.555 58.3014C120.56 58.3067 120.56 58.3067 120.565 58.3067C120.848 58.3947 121.141 58.4694 121.443 58.5467C121.453 58.5467 121.464 58.552 121.48 58.5574C122.875 58.896 124.424 59.1334 126.112 59.3014C126.325 59.3227 126.541 59.3414 126.763 59.3627C130.789 59.712 135.56 59.712 140.904 59.8454C152.973 59.5387 162.128 59.928 166.36 55.384C170.907 51.152 170.515 41.9947 170.824 29.9254C170.517 17.8507 170.907 8.69602 166.363 4.46935C162.131 -0.0746511 152.973 0.309349 140.904 1.52588e-05C128.829 0.309349 119.675 -0.0746511 115.448 4.46935C110.904 8.69602 111.288 17.8507 110.979 29.9254C111.117 35.3014 111.117 40.1014 111.472 44.144C111.661 46.2614 111.949 48.1707 112.405 49.848Z" fill="#FF6376"></path></g></svg>
1
+ import{bQ as Re,M as Ae,b$ as Ge,c0 as qe,c1 as Je,c2 as Qe,aU as d,bl as Ke,af as We,bY as e1,bE as B,as as U,aD as n1,c3 as Ze,az as o1,aL as r,u,aY as ge,v as t,bk as s,bb as X,au as b,t as F,aw as Ce,bL as t1,bB as l1,s as a1,I as i1,bJ as r1,bO as s1,g as u1,T as c1,q as T,c4 as Ve,c5 as ie,c6 as d1,c7 as De,c8 as v1,c9 as m1,b_ as h1}from"./index-Ia-ZUO2Z.js";var re=(R,xe,l)=>new Promise((a,J)=>{var V=c=>{try{H(l.next(c))}catch($){J($)}},Q=c=>{try{H(l.throw(c))}catch($){J($)}},H=c=>c.done?a(c.value):Promise.resolve(c.value).then(V,Q);H((l=l.apply(R,xe)).next())});const p1=["data-markstream-mode"],f1={key:0,class:"infographic-block-header flex justify-between items-center border-b"},w1={key:0},g1={key:1,class:"flex items-center gap-x-2 overflow-hidden"},C1=["innerHTML"],k1={key:2},x1={key:3,class:"infographic-mode-toggle flex items-center gap-0.5"},y1=["disabled"],b1={class:"flex items-center gap-x-1"},M1={class:"flex items-center gap-x-1"},B1={key:4},F1={key:5,class:"infographic-header-actions flex items-center"},T1=["aria-pressed"],H1={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:"action-icon"},$1={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:"action-icon"},j1=["disabled"],L1=["disabled"],P1={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:"action-icon"},E1={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:"action-icon"},z1={key:0,class:"infographic-source"},S1={class:"infographic-source-code text-sm font-mono whitespace-pre-wrap"},Z1={key:1,class:"relative"},V1={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},D1={class:"flex items-center gap-2 backdrop-blur rounded-lg"},N1={key:0,class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap"},Y1={class:"dialog-panel infographic-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},_1={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},se="infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",ke=Re(Ae({__name:"InfographicBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0}},emits:["copy","export","openModal"],setup(R,{emit:xe}){const l=R,{t:a}=Ge(),J=qe(),V=Je(),Q=Qe(),H=d(!1),c=d(!1),$=d(),p=d(),k=d(!0),ye=d(!1),j=d(!1),D=d(),K=d(null),L=d(!1),S=d(!1),A=d(null),P=d(typeof window>"u"||!Q.value),Ne=Ke(),x=We(e1,null);let E="";const be=T(()=>h1(l,Ne));typeof window<"u"&&B([()=>$.value,Q],([n,e])=>{var o,i,C;if((o=A.value)==null||o.destroy(),A.value=null,!e||P.value)return void(P.value=!0);if(!n)return void(P.value=!1);const f=(C=(i=V?.value.heavyBlockMargin)!=null?i:V?.value.rootMargin)!=null?C:"160px",w=J(n,{rootMargin:f,allowIdle:!1});A.value=w,P.value=w.isVisible.value,w.whenVisible.then(()=>{P.value=!0})},{immediate:!0});const z=T(()=>l.node.code),ue=T(()=>{var n;return(function(e){if(l.maxHeight==="none")return Ve(e,void 0,null);const o=ie(l.maxHeight);return Ve(e,void 0,o)})((n=ie(l.estimatedPreviewHeightPx))!=null?n:d1(z.value))}),ce=d(`${ue.value}px`),Ye=T(()=>ie(l.estimatedPreviewHeightPx)!=null);function Me(){var n;if(!p.value||Ye.value)return;const e=p.value.scrollHeight;if(e>0){const o=(n=ie((function(i){if(l.maxHeight==="none")return`${i}px`;if(l.maxHeight!=null){const f=Number.parseFloat(String(l.maxHeight));if(Number.isFinite(f))return`${Math.min(i,f)}px`}const C=p.value;if(C){const f=getComputedStyle(C).getPropertyValue("--ms-size-code-max-height").trim(),w=Number.parseFloat(f);if(Number.isFinite(w))return`${Math.min(i,w)}px`}return`${Math.min(i,500)}px`})(e)))!=null?n:e;ce.value=`${Math.max(o,ue.value)}px`}}const M=d(1),N=d(0),Y=d(0),_=d(!1),W=d({x:0,y:0}),Be=T(()=>z.value);function Fe(n){return!n||n.disabled}function h(n,e,o="top"){if(Fe(n.currentTarget))return;const i=n,C=i?.clientX!=null&&i?.clientY!=null?{x:i.clientX,y:i.clientY}:void 0;De(n.currentTarget,e,o,!1,C,l.isDark)}function v(){v1()}function Te(n){if(Fe(n.currentTarget))return;const e=H.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=n,i=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;De(n.currentTarget,e,"top",!1,i,l.isDark)}function _e(){return re(this,null,function*(){try{const n=z.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(n)),H.value=!0,setTimeout(()=>{H.value=!1},1e3)}catch(n){console.error("Failed to copy:",n)}})}function He(n){(n!=="preview"||Ze())&&(ye.value=!0,k.value=n==="source")}function Ie(){var n;const e=(n=p.value)==null?void 0:n.querySelector("svg");e?(function(o){re(this,null,function*(){try{const i=new XMLSerializer().serializeToString(o),C=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),f=URL.createObjectURL(C);if(typeof document<"u"){const w=document.createElement("a");w.href=f,w.download=`infographic-${Date.now()}.svg`;try{document.body.appendChild(w),w.click(),document.body.removeChild(w)}catch{}URL.revokeObjectURL(f)}}catch(i){console.error("Failed to export SVG:",i)}})})(e):console.error("SVG element not found")}function de(n){n.key==="Escape"&&j.value&&ve()}function ve(){if(j.value=!1,D.value&&(D.value.innerHTML=""),K.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}}function Oe(){(function(){if(j.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",de)}catch{}U(()=>{if(p.value&&D.value){D.value.innerHTML="";const n=document.createElement("div");n.style.transition="transform 0.1s ease",n.style.transformOrigin="center center",n.style.width="100%",n.style.height="100%",n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center";const e=p.value.cloneNode(!0);e.classList.add("fullscreen"),e.style.height="auto",n.appendChild(e),D.value.appendChild(n),K.value=n,n.style.transform=`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}})})()}function $e(){M.value<3&&(M.value+=.1)}function je(){M.value>.5&&(M.value-=.1)}function Le(){M.value=1,N.value=0,Y.value=0}function ee(n){_.value=!0,n instanceof MouseEvent?W.value={x:n.clientX-N.value,y:n.clientY-Y.value}:W.value={x:n.touches[0].clientX-N.value,y:n.touches[0].clientY-Y.value}}function ne(n){if(!_.value)return;let e,o;n instanceof MouseEvent?(e=n.clientX,o=n.clientY):(e=n.touches[0].clientX,o=n.touches[0].clientY),N.value=e-W.value.x,Y.value=o-W.value.y}function I(){_.value=!1}let g=null,me=!1,oe=!1,G=!1,te="",q=!1,he=0;function le(n){return!q&&n===he}function Pe(n=!1){return re(this,null,function*(){var e,o;if(q||!P.value||!p.value)return;if(me)return oe=!0,void(G=G||n);const i=Be.value;if(!n&&i===te&&L.value)return;const C=l.loading===!1,f=++he;me=!0,(function(){const m=be.value;m&&E!==m&&(E&&x?.markSettled(E),E=m,x?.markPending(m))})();const w=p.value.innerHTML,pe=L.value,Xe=S.value;S.value=!1;try{const m=yield m1();if(!le(f))return;if(!m)return void console.warn("Infographic library failed to load.");const Z=p.value;if(!Z)return;g&&((e=g.destroy)==null||e.call(g),g=null),Z.innerHTML="",g=new m({container:Z,width:"100%",height:"100%"});let fe="";if((o=g.on)==null||o.call(g,"error",we=>{fe=(Array.isArray(we)?we:[we]).map(y=>{var Se;return y instanceof Error?y.message:typeof y=="string"?y:String(y&&typeof y=="object"&&"message"in y?(Se=y.message)!=null?Se:"":y??"")}).filter(Boolean).join("; ")}),g.render(z.value),fe)throw new Error(fe);if(!Z.childNodes.length)throw new Error("Infographic render returned empty output.");L.value=!0,S.value=!1,te=i,U(()=>{le(f)&&Me()})}catch(m){if(!le(f))return;C&&l.loading===!1&&i===Be.value?(console.error("Failed to render infographic:",m),L.value=!1,S.value=!0,te="",p.value&&(p.value.innerHTML=`<div style="padding: var(--ms-inset-panel-body); color: hsl(var(--ms-destructive))">Failed to render infographic: ${m instanceof Error?m.message:"Unknown error"}</div>`)):(L.value=pe,S.value=Xe,pe&&p.value&&(p.value.innerHTML=w))}finally{if(me=!1,le(f))if(oe){const m=G;oe=!1,G=!1,U(()=>{Pe(m)})}else(function(){re(this,null,function*(){const m=E;m&&(E="",yield U(),(function(Z=be.value){Z&&$.value&&x?.reportHeight(Z,$.value.offsetHeight)})(m),x?.markSettled(m))})})()}})}function O(n=!1){q||!P.value||k.value||c.value||U(()=>{q||Pe(n)})}B(()=>z.value,()=>{O(!0)}),B(()=>l.loading,(n,e)=>{e&&!n&&O(!0)}),B(()=>k.value,n=>{n||O(!0)}),B(()=>c.value,n=>{n||O()}),B(()=>l.maxHeight,()=>{U(()=>{Me()})}),B([()=>l.estimatedPreviewHeightPx,()=>z.value],()=>{L.value||k.value||(ce.value=`${ue.value}px`)}),B(()=>P.value,n=>{!n||k.value||c.value||O()}),n1(()=>{!ye.value&&Ze(),O()}),o1(()=>{var n,e;if(q=!0,he+=1,oe=!1,G=!1,(n=A.value)==null||n.destroy(),A.value=null,(function(){const o=E;o&&(E="",x?.markSettled(o))})(),g&&((e=g.destroy)==null||e.call(g),g=null),te="",typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}});const Ee=T(()=>!0),ae=T(()=>k.value||c.value),Ue=T(()=>k.value?"fallback":S.value?"error":L.value?"preview":"pending"),ze=T(()=>({transform:`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}));return B(ze,n=>{j.value&&K.value&&(K.value.style.transform=n.transform)}),(n,e)=>(r(),u("div",{ref_key:"viewportTarget",ref:$,class:b(["infographic-block-container rounded-lg border overflow-hidden",[{"is-rendering":l.loading,dark:l.isDark}]]),"data-markstream-infographic":"1","data-markstream-mode":Ue.value},[l.showHeader?(r(),u("div",f1,[n.$slots["header-left"]?(r(),u("div",w1,[ge(n.$slots,"header-left",{},void 0,!0)])):(r(),u("div",g1,[t("span",{class:"icon-slot action-icon shrink-0",innerHTML:s(`<svg width="15.52" height="16" viewBox="0 0 291 300" fill="none" xmlns="http://www.w3.org/2000/svg"><g><path d="M140.904 239.376C128.83 239.683 119.675 239.299 115.448 243.843C110.902 248.07 111.288 257.227 110.979 269.302C111.118 274.675 111.118 279.478 111.472 283.52C111.662 285.638 111.95 287.547 112.406 289.224C112.411 289.243 112.416 289.259 112.422 289.28C112.462 289.419 112.496 289.558 112.539 289.691C113.168 291.787 114.088 293.491 115.446 294.758C116.662 296.064 118.283 296.963 120.264 297.59C120.36 297.614 120.464 297.646 120.555 297.675C120.56 297.68 120.56 297.68 120.566 297.68C120.848 297.768 121.142 297.846 121.443 297.923C121.454 297.923 121.464 297.928 121.478 297.934C122.875 298.272 124.424 298.507 126.11 298.678C126.326 298.696 126.542 298.718 126.763 298.739C130.79 299.086 135.558 299.088 140.904 299.222C152.974 298.912 162.128 299.302 166.36 294.758C170.904 290.526 170.515 281.371 170.824 269.302C170.515 257.227 170.907 248.07 166.36 243.843C162.131 239.299 152.974 239.683 140.904 239.376Z" fill="#FF6376"></path><path d="M21.2155 128.398C12.6555 128.616 6.16484 128.339 3.16751 131.56C-0.0538222 134.56 0.218178 141.054 -0.000488281 149.608C0.218178 158.168 -0.0538222 164.659 3.16751 167.656C6.16484 170.878 12.6555 170.606 21.2155 170.824C25.0262 170.726 28.4288 170.726 31.2955 170.475C32.7968 170.342 34.1488 170.136 35.3382 169.814C35.3542 169.811 35.3648 169.806 35.3782 169.803C35.4768 169.774 35.5755 169.747 35.6688 169.718C37.1568 169.272 38.3648 168.622 39.2635 167.656C40.1915 166.795 40.8262 165.646 41.2715 164.243C41.2875 164.174 41.3115 164.102 41.3328 164.035C41.3328 164.035 41.3355 164.032 41.3355 164.027C41.3968 163.827 41.4529 163.622 41.5062 163.406C41.5062 163.398 41.5115 163.392 41.5142 163.382C41.7542 162.392 41.9222 161.294 42.0422 160.096C42.0555 159.944 42.0715 159.792 42.0848 159.635C42.3328 156.779 42.3328 153.398 42.4262 149.608C42.2075 141.054 42.4848 134.56 39.2635 131.56C36.2635 128.339 29.7728 128.616 21.2155 128.398Z" fill="#FFCCCC"></path><path d="M81.0595 184.171C70.8568 184.433 63.1208 184.102 59.5475 187.942C55.7075 191.518 56.0328 199.254 55.7742 209.454C56.0328 219.657 55.7075 227.393 59.5475 230.963C63.1208 234.803 70.8568 234.478 81.0595 234.739C85.6008 234.622 89.6595 234.622 93.0728 234.323C94.8648 234.163 96.4755 233.921 97.8942 233.534C97.9102 233.529 97.9235 233.526 97.9422 233.521C98.0568 233.486 98.1742 233.457 98.2888 233.422C100.06 232.889 101.5 232.113 102.569 230.963C103.676 229.937 104.433 228.566 104.964 226.894C104.985 226.811 105.012 226.726 105.036 226.646C105.041 226.643 105.041 226.643 105.041 226.638C105.116 226.401 105.18 226.153 105.244 225.897C105.244 225.889 105.249 225.881 105.254 225.867C105.54 224.689 105.74 223.379 105.881 221.953C105.9 221.771 105.916 221.59 105.934 221.403C106.228 218.001 106.228 213.969 106.342 209.454C106.081 199.254 106.412 191.518 102.572 187.942C98.9955 184.102 91.2568 184.433 81.0595 184.171Z" fill="#FF939F"></path><path d="M260.591 151.87C215.652 151.87 203.02 164.523 203.02 209.462H198.476C198.476 164.523 185.836 151.881 140.895 151.881V147.337C185.836 147.337 198.487 134.705 198.487 89.7659H203.02C203.02 134.705 215.652 147.337 260.591 147.337V151.87ZM286.052 124.158C281.82 119.614 272.66 120.001 260.591 119.689C248.521 119.385 239.361 119.771 235.129 115.227C230.585 110.995 230.983 101.846 230.671 89.7659C230.513 83.7312 230.535 78.4272 230.023 74.1019C229.513 69.7659 228.481 66.4219 226.209 64.3046C221.967 59.7606 212.817 60.1472 200.748 59.8459C188.681 60.1472 179.519 59.7606 175.287 64.3046C170.753 68.5366 171.129 77.6966 170.828 89.7659C170.516 101.835 170.9 110.995 166.356 115.227C162.124 119.771 152.985 119.374 140.905 119.689C138.873 119.739 136.924 119.771 135.071 119.811C119.313 118.697 106.337 112.318 106.337 89.7659C106.212 84.6699 106.233 80.1792 105.807 76.5206C105.367 72.8726 104.492 70.0379 102.575 68.2566C99.0013 64.4112 91.2573 64.7446 81.0653 64.4832C70.86 64.7446 63.1186 64.4112 59.5533 68.2566C55.708 71.8299 56.0306 79.5632 55.7693 89.7659C56.0306 99.9686 55.708 107.702 59.5533 111.278C63.1186 115.113 70.86 114.79 81.0653 115.049C103.617 115.049 109.996 128.035 111.1 143.803C111.068 145.659 111.028 147.587 110.975 149.619C111.121 154.987 111.121 159.79 111.476 163.835C111.663 165.95 111.945 167.857 112.404 169.534C112.412 169.555 112.412 169.566 112.423 169.598C112.465 169.734 112.497 169.867 112.537 170.003C113.164 172.099 114.092 173.809 115.447 175.07C116.665 176.371 118.281 177.278 120.271 177.905C120.364 177.934 120.46 177.955 120.564 177.987C120.855 178.081 121.145 178.153 121.439 178.238C121.46 178.238 121.471 178.238 121.479 178.249C122.876 178.582 124.42 178.822 126.108 178.987C126.327 179.009 126.545 179.03 126.764 179.051C130.788 179.395 135.559 179.395 140.905 179.529C152.975 179.843 162.124 179.457 166.356 184.001C170.9 188.233 170.516 197.371 170.828 209.451C171.129 221.529 170.743 230.681 175.287 234.91C179.519 239.454 188.681 239.07 200.748 239.371C206.127 239.235 210.921 239.235 214.975 238.881C217.079 238.694 218.985 238.403 220.676 237.955C220.695 237.945 220.705 237.934 220.727 237.934C220.873 237.891 220.999 237.859 221.135 237.819C223.228 237.193 224.937 236.265 226.209 234.91C227.511 233.691 228.409 232.065 229.044 230.097C229.065 230.003 229.095 229.899 229.127 229.803V229.793C229.22 229.513 229.295 229.222 229.367 228.918C229.367 228.897 229.377 228.897 229.377 228.878C229.721 227.481 229.951 225.937 230.127 224.249C230.137 224.03 230.169 223.811 230.191 223.593C230.535 219.571 230.535 214.798 230.671 209.451C230.972 197.371 230.585 188.233 235.129 184.001C239.361 179.457 248.511 179.843 260.591 179.529C272.66 179.227 281.82 179.614 286.052 175.07C290.596 170.838 290.209 161.689 290.511 149.619C290.209 137.539 290.596 128.379 286.052 124.158Z" fill="#FF356A"></path><path d="M112.405 49.848C112.411 49.8694 112.416 49.8827 112.421 49.904C112.461 50.0427 112.499 50.1814 112.539 50.3147C113.171 52.4134 114.088 54.1147 115.448 55.384C116.661 56.6907 118.283 57.5894 120.264 58.2134C120.36 58.24 120.464 58.2694 120.555 58.3014C120.56 58.3067 120.56 58.3067 120.565 58.3067C120.848 58.3947 121.141 58.4694 121.443 58.5467C121.453 58.5467 121.464 58.552 121.48 58.5574C122.875 58.896 124.424 59.1334 126.112 59.3014C126.325 59.3227 126.541 59.3414 126.763 59.3627C130.789 59.712 135.56 59.712 140.904 59.8454C152.973 59.5387 162.128 59.928 166.36 55.384C170.907 51.152 170.515 41.9947 170.824 29.9254C170.517 17.8507 170.907 8.69602 166.363 4.46935C162.131 -0.0746511 152.973 0.309349 140.904 1.52588e-05C128.829 0.309349 119.675 -0.0746511 115.448 4.46935C110.904 8.69602 111.288 17.8507 110.979 29.9254C111.117 35.3014 111.117 40.1014 111.472 44.144C111.661 46.2614 111.949 48.1707 112.405 49.848Z" fill="#FF6376"></path></g></svg>
2
2
  `)},null,8,C1),e[21]||(e[21]=t("span",{class:"infographic-label font-medium font-mono truncate"},"Infographic",-1))])),n.$slots["header-center"]?(r(),u("div",k1,[ge(n.$slots,"header-center",{},void 0,!0)])):l.showModeToggle?(r(),u("div",x1,[t("button",{class:b(["infographic-mode-btn px-2 py-0.5 rounded transition-colors",[k.value?"":"is-active",Ee.value?"opacity-50 cursor-not-allowed":""]]),disabled:Ee.value,onClick:e[0]||(e[0]=()=>He("preview")),onMouseenter:e[1]||(e[1]=o=>h(o,s(a)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=o=>h(o,s(a)("common.preview")||"Preview")),onMouseleave:v,onBlur:v},[t("div",b1,[e[22]||(e[22]=t("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:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("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"}),t("circle",{cx:"12",cy:"12",r:"3"})])],-1)),t("span",null,X(s(a)("common.preview")||"Preview"),1)])],42,y1),t("button",{class:b(["infographic-mode-btn px-2 py-0.5 rounded transition-colors",[k.value?"is-active":""]]),onClick:e[3]||(e[3]=()=>He("source")),onMouseenter:e[4]||(e[4]=o=>h(o,s(a)("common.source")||"Source")),onFocus:e[5]||(e[5]=o=>h(o,s(a)("common.source")||"Source")),onMouseleave:v,onBlur:v},[t("div",M1,[e[23]||(e[23]=t("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:"action-icon"},[t("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)),t("span",null,X(s(a)("common.source")||"Source"),1)])],34)])):F("",!0),n.$slots["header-right"]?(r(),u("div",B1,[ge(n.$slots,"header-right",{},void 0,!0)])):(r(),u("div",F1,[l.showCollapseButton?(r(),u("button",{key:0,class:b(se),"aria-pressed":c.value,onClick:e[6]||(e[6]=o=>c.value=!c.value),onMouseenter:e[7]||(e[7]=o=>h(o,c.value?s(a)("common.expand")||"Expand":s(a)("common.collapse")||"Collapse")),onFocus:e[8]||(e[8]=o=>h(o,c.value?s(a)("common.expand")||"Expand":s(a)("common.collapse")||"Collapse")),onMouseleave:v,onBlur:v},[(r(),u("svg",{style:Ce({rotate:c.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:"action-icon"},[...e[24]||(e[24]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,T1)):F("",!0),l.showCopyButton?(r(),u("button",{key:1,class:b(se),onClick:_e,onMouseenter:e[9]||(e[9]=o=>Te(o)),onFocus:e[10]||(e[10]=o=>Te(o)),onMouseleave:v,onBlur:v},[H.value?(r(),u("svg",$1,[...e[26]||(e[26]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(r(),u("svg",H1,[...e[25]||(e[25]=[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),t("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],32)):F("",!0),l.showExportButton?(r(),u("button",{key:2,class:b(`${se} ${ae.value?"opacity-50 cursor-not-allowed":""}`),disabled:ae.value,onClick:Ie,onMouseenter:e[11]||(e[11]=o=>h(o,s(a)("common.export")||"Export")),onFocus:e[12]||(e[12]=o=>h(o,s(a)("common.export")||"Export")),onMouseleave:v,onBlur:v},[...e[27]||(e[27]=[t("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:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),t("path",{d:"m7 10l5 5l5-5"})])],-1)])],42,j1)):F("",!0),l.showFullscreenButton?(r(),u("button",{key:3,class:b(`${se} ${ae.value?"opacity-50 cursor-not-allowed":""}`),disabled:ae.value,onClick:Oe,onMouseenter:e[13]||(e[13]=o=>h(o,j.value?s(a)("common.minimize")||"Minimize":s(a)("common.open")||"Open")),onFocus:e[14]||(e[14]=o=>h(o,j.value?s(a)("common.minimize")||"Minimize":s(a)("common.open")||"Open")),onMouseleave:v,onBlur:v},[j.value?(r(),u("svg",E1,[...e[29]||(e[29]=[t("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)])])):(r(),u("svg",P1,[...e[28]||(e[28]=[t("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,L1)):F("",!0)]))])):F("",!0),t1(t("div",null,[k.value?(r(),u("div",z1,[t("pre",S1,X(z.value),1)])):(r(),u("div",Z1,[l.showZoomControls?(r(),u("div",V1,[t("div",D1,[t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:$e,onMouseenter:e[15]||(e[15]=o=>h(o,s(a)("common.zoomIn")||"Zoom in")),onFocus:e[16]||(e[16]=o=>h(o,s(a)("common.zoomIn")||"Zoom in")),onMouseleave:v,onBlur:v},[...e[30]||(e[30]=[t("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:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],32),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:je,onMouseenter:e[17]||(e[17]=o=>h(o,s(a)("common.zoomOut")||"Zoom out")),onFocus:e[18]||(e[18]=o=>h(o,s(a)("common.zoomOut")||"Zoom out")),onMouseleave:v,onBlur:v},[...e[31]||(e[31]=[t("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:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],32),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:Le,onMouseenter:e[19]||(e[19]=o=>h(o,s(a)("common.resetZoom")||"Reset zoom")),onFocus:e[20]||(e[20]=o=>h(o,s(a)("common.resetZoom")||"Reset zoom")),onMouseleave:v,onBlur:v},X(Math.round(100*M.value))+"% ",33)])])):F("",!0),t("div",{class:"infographic-preview relative transition-all overflow-hidden block",style:Ce({height:ce.value}),onMousedown:ee,onMousemove:ne,onMouseup:I,onMouseleave:I,onTouchstartPassive:ee,onTouchmovePassive:ne,onTouchendPassive:I},[L.value||S.value?F("",!0):(r(),u("pre",N1,X(z.value),1)),t("div",{class:b(["absolute inset-0 cursor-grab",{"cursor-grabbing":_.value}]),style:Ce(ze.value)},[t("div",{ref_key:"infographicContainer",ref:p,class:"w-full text-center flex items-center justify-center min-h-full"},null,512)],6)],36)]))],512),[[l1,!c.value]]),(r(),a1(c1,{to:"body"},[t("div",{class:b(["markstream-vue",{dark:l.isDark}])},[i1(u1,{name:"infographic-dialog",appear:""},{default:r1(()=>[j.value?(r(),u("div",{key:0,class:"infographic-modal-overlay fixed inset-0 z-50 flex items-center justify-center p-4",onClick:s1(ve,["self"])},[t("div",Y1,[t("div",_1,[t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:$e},[...e[32]||(e[32]=[t("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:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])]),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:je},[...e[33]||(e[33]=[t("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:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])]),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:Le},X(Math.round(100*M.value))+"% ",1),t("button",{class:"infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded",onClick:ve},[...e[34]||(e[34]=[t("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:"action-icon"},[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"})],-1)])])]),t("div",{ref_key:"modalContent",ref:D,class:b(["w-full h-full flex items-center justify-center p-4 overflow-hidden",{"cursor-grab":!_.value,"cursor-grabbing":_.value}]),onMousedown:ee,onMousemove:ne,onMouseup:I,onMouseleave:I,onTouchstartPassive:ee,onTouchmovePassive:ne,onTouchendPassive:I},null,34)])])):F("",!0)]),_:1})],2)]))],10,p1))}}),[["__scopeId","data-v-de34ec4b"]]);ke.install=R=>{R.component(ke.__name,ke)};export{ke as default};
@@ -1,4 +1,4 @@
1
- import{cq as Lt,bQ as Ln,M as Hn,c2 as Nn,c1 as _n,b$ as In,c0 as Yn,aU as m,bl as Xn,af as qn,bY as Wn,bE as X,az as Vn,c8 as pn,aD as Un,as as q,aI as Zn,aL as M,u as C,aY as Dt,v as i,bk as w,bb as Ze,au as oe,t as ge,aw as Ft,bL as Kn,bB as Gn,ar as wn,bd as yn,s as Jn,I as Qn,bJ as el,bO as tl,g as nl,T as ll,q as R,c7 as kn,c5 as zt,cr as rl,cs as ol,ct as al,cu as il,cv as ul,b_ as sl,cw as cl}from"./index-DKIJmNQn.js";import{i as Rt}from"./safeRaf-DGuzXxDK.js";function dl(v,h){return/(?:&#\d+|#\d+|&[a-z]+)$/i.test(v.slice(Math.max(0,h-12),h))}function Tn(v){return v.includes("->")||v.includes("-->")||v.includes("->>")||v.includes("-->>")||v.includes("-x")||v.includes("--x")||v.includes("-)")||v.includes("--)")||v.includes("-+")||v.includes("--+")}function vl(v){const h=v.trimStart();return/^(?:accDescr|accTitle|activate|actor|and|alt|autonumber|box|break|critical|create\s+(?:actor|participant)|deactivate|destroy|else|end|link|links|loop|Note|opt|option|par|participant|properties|rect)\b/i.test(h)||(function(y){const j=y.split(";",1)[0],a=j.indexOf(":");return a>0&&Tn(j.slice(0,a))})(h)}function fl(v){if(!v.includes(";"))return v;const h=v.indexOf(":");if(h===-1||!(function(E,Q){const k=E.slice(0,Q);return/^\s*Note\b/i.test(k)||Tn(k)})(v,h))return v;const y=v.slice(0,h+1),j=v.slice(h+1),a=(function(E){let Q="",k=!1;for(let P=0;P<E.length;P++){const ee=E[P];ee!==";"||dl(E,P)||vl(E.slice(P+1))?Q+=ee:(Q+="#59;",k=!0)}return k?Q:E})(j);return a===j?v:`${y}${a}`}function jt(v){if(Lt(v)!=="sequencediagram")return v;const h=v.split(/(\r\n|\n|\r)/);let y=!1;for(let j=0;j<h.length;j+=2){const a=h[j],E=fl(a);E!==a&&(h[j]=E,y=!0)}return y?h.join(""):v}var ml=Object.defineProperty,hl=Object.defineProperties,gl=Object.getOwnPropertyDescriptors,xn=Object.getOwnPropertySymbols,pl=Object.prototype.hasOwnProperty,wl=Object.prototype.propertyIsEnumerable,yl=Math.pow,bn=(v,h,y)=>h in v?ml(v,h,{enumerable:!0,configurable:!0,writable:!0,value:y}):v[h]=y,Mn=(v,h)=>{for(var y in h||(h={}))pl.call(h,y)&&bn(v,y,h[y]);if(xn)for(var y of xn(h))wl.call(h,y)&&bn(v,y,h[y]);return v},T=(v,h,y)=>new Promise((j,a)=>{var E=P=>{try{k(y.next(P))}catch(ee){a(ee)}},Q=P=>{try{k(y.throw(P))}catch(ee){a(ee)}},k=P=>P.done?j(P.value):Promise.resolve(P.value).then(E,Q);k((y=y.apply(v,h)).next())});const kl=["data-markstream-mode","data-markstream-pending"],xl={key:0,class:"mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]"},bl={key:0},Ml={key:1,class:"flex items-center gap-x-2 overflow-hidden"},Tl=["innerHTML"],Cl={key:2},Bl={key:3,class:"mermaid-mode-toggle-group flex items-center gap-0.5"},Ol={class:"flex items-center gap-x-1"},$l={class:"flex items-center gap-x-1"},Sl={key:4},El={key:5,class:"mermaid-header-actions flex items-center"},Pl=["aria-pressed"],Dl={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:"action-icon"},Fl={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:"action-icon"},zl=["aria-label","disabled"],Rl=["aria-label","disabled"],jl={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:"action-icon"},Al={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:"action-icon"},Ll={key:0,class:"mermaid-source-panel"},Hl={class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap"},Nl={key:1,class:"relative"},_l={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},Il={class:"flex items-center gap-2 backdrop-blur rounded-lg"},Yl={class:"dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},Xl={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},gt="mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded",At=Ln(Hn({__name:"MermaidBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},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:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},onRenderError:{}},emits:["copy","export","openModal","toggleMode"],setup(v,{emit:h}){var y,j;const a=v,E=h,Q={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},k=m(!1),P=m(typeof window>"u"),ee=Nn(),Ht=_n(),Ae=R(()=>a.isStrict?"strict":"loose"),Cn=R(()=>({startOnLoad:!1,securityLevel:Ae.value,dompurifyConfig:Ae.value==="strict"?Q:void 0,flowchart:Ae.value==="strict"?{htmlLabels:!1}:void 0}));function pe(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=""}}function Oe(e,t,n={}){if(!e)return null;const l=(function(r,o){if(!r)return null;const c=ul(o);if(!c)return null;const d=(function(u,s){const p=Array.from(u.childNodes),O=document.createElement("div");return O.dataset.mermaidSvgLayer="1",O.style.zIndex="1",O.appendChild(s),u.insertBefore(O,u.firstChild),p.length>0&&(function(H){const Y=()=>{var z;for(const Be of H)(z=Be.parentNode)==null||z.removeChild(Be)};typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>{requestAnimationFrame(Y)}):setTimeout(Y,32)})(p),O})(r,c);return{svg:c.outerHTML,bindTarget:d}})(e,t);return l||n.keepPreviousOnFailure||pe(e),l}let ae=null;function we(e){if(a.enableMermaidInteractions&&e?.querySelector("svg"))try{ae?.(e)}catch{}}const{t:g}=In();let ie=!1,ye=0;function Ke(){return T(this,null,function*(){try{const e=yield al();return ie?null:(k.value=!!e,e)}catch(e){throw ie||(k.value=!1),e}finally{ie||(P.value=!0)}})}const Ge=m(!1),V=m(!1),Je=m(),K=m(),f=m(),ue=m(),Qe=m(null),Bn=Yn(),Le=m(null),ke=m(typeof window>"u"||!ee.value),On=Xn(),te=qn(Wn,null);let se="",xe=0,et=0;const Nt=R(()=>sl(a,On));function pt(){const e=Nt.value;e&&(se&&se!==e&&(te?.markSettled(se),xe=0),se=e,xe+=1,et+=1,xe===1&&te?.markPending(e))}function wt(){return T(this,null,function*(){const e=se;if(!e||(xe=Math.max(0,xe-1),xe>0))return;se="";const t=++et;yield q(),t===et&&((function(n=Nt.value){n&&Je.value&&te?.reportHeight(n,Je.value.offsetHeight)})(e),te?.markSettled(e))})}function _t(){const e=se;e&&(se="",xe=0,et+=1,te?.markSettled(e))}const It=m(),D=R(()=>a.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function $n(e,t=D.value){const n=t,l={theme:e==="dark"?"dark":"default"};Ae.value==="strict"&&(l.flowchart={htmlLabels:!1});const r=`%%{init: ${JSON.stringify(l)}}%%
1
+ import{cq as Lt,bQ as Ln,M as Hn,c2 as Nn,c1 as _n,b$ as In,c0 as Yn,aU as m,bl as Xn,af as qn,bY as Wn,bE as X,az as Vn,c8 as pn,aD as Un,as as q,aI as Zn,aL as M,u as C,aY as Dt,v as i,bk as w,bb as Ze,au as oe,t as ge,aw as Ft,bL as Kn,bB as Gn,ar as wn,bd as yn,s as Jn,I as Qn,bJ as el,bO as tl,g as nl,T as ll,q as R,c7 as kn,c5 as zt,cr as rl,cs as ol,ct as al,cu as il,cv as ul,b_ as sl,cw as cl}from"./index-Ia-ZUO2Z.js";import{i as Rt}from"./safeRaf-DGuzXxDK.js";function dl(v,h){return/(?:&#\d+|#\d+|&[a-z]+)$/i.test(v.slice(Math.max(0,h-12),h))}function Tn(v){return v.includes("->")||v.includes("-->")||v.includes("->>")||v.includes("-->>")||v.includes("-x")||v.includes("--x")||v.includes("-)")||v.includes("--)")||v.includes("-+")||v.includes("--+")}function vl(v){const h=v.trimStart();return/^(?:accDescr|accTitle|activate|actor|and|alt|autonumber|box|break|critical|create\s+(?:actor|participant)|deactivate|destroy|else|end|link|links|loop|Note|opt|option|par|participant|properties|rect)\b/i.test(h)||(function(y){const j=y.split(";",1)[0],a=j.indexOf(":");return a>0&&Tn(j.slice(0,a))})(h)}function fl(v){if(!v.includes(";"))return v;const h=v.indexOf(":");if(h===-1||!(function(E,Q){const k=E.slice(0,Q);return/^\s*Note\b/i.test(k)||Tn(k)})(v,h))return v;const y=v.slice(0,h+1),j=v.slice(h+1),a=(function(E){let Q="",k=!1;for(let P=0;P<E.length;P++){const ee=E[P];ee!==";"||dl(E,P)||vl(E.slice(P+1))?Q+=ee:(Q+="#59;",k=!0)}return k?Q:E})(j);return a===j?v:`${y}${a}`}function jt(v){if(Lt(v)!=="sequencediagram")return v;const h=v.split(/(\r\n|\n|\r)/);let y=!1;for(let j=0;j<h.length;j+=2){const a=h[j],E=fl(a);E!==a&&(h[j]=E,y=!0)}return y?h.join(""):v}var ml=Object.defineProperty,hl=Object.defineProperties,gl=Object.getOwnPropertyDescriptors,xn=Object.getOwnPropertySymbols,pl=Object.prototype.hasOwnProperty,wl=Object.prototype.propertyIsEnumerable,yl=Math.pow,bn=(v,h,y)=>h in v?ml(v,h,{enumerable:!0,configurable:!0,writable:!0,value:y}):v[h]=y,Mn=(v,h)=>{for(var y in h||(h={}))pl.call(h,y)&&bn(v,y,h[y]);if(xn)for(var y of xn(h))wl.call(h,y)&&bn(v,y,h[y]);return v},T=(v,h,y)=>new Promise((j,a)=>{var E=P=>{try{k(y.next(P))}catch(ee){a(ee)}},Q=P=>{try{k(y.throw(P))}catch(ee){a(ee)}},k=P=>P.done?j(P.value):Promise.resolve(P.value).then(E,Q);k((y=y.apply(v,h)).next())});const kl=["data-markstream-mode","data-markstream-pending"],xl={key:0,class:"mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]"},bl={key:0},Ml={key:1,class:"flex items-center gap-x-2 overflow-hidden"},Tl=["innerHTML"],Cl={key:2},Bl={key:3,class:"mermaid-mode-toggle-group flex items-center gap-0.5"},Ol={class:"flex items-center gap-x-1"},$l={class:"flex items-center gap-x-1"},Sl={key:4},El={key:5,class:"mermaid-header-actions flex items-center"},Pl=["aria-pressed"],Dl={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:"action-icon"},Fl={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:"action-icon"},zl=["aria-label","disabled"],Rl=["aria-label","disabled"],jl={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:"action-icon"},Al={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:"action-icon"},Ll={key:0,class:"mermaid-source-panel"},Hl={class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap"},Nl={key:1,class:"relative"},_l={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},Il={class:"flex items-center gap-2 backdrop-blur rounded-lg"},Yl={class:"dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},Xl={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},gt="mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded",At=Ln(Hn({__name:"MermaidBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},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:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},onRenderError:{}},emits:["copy","export","openModal","toggleMode"],setup(v,{emit:h}){var y,j;const a=v,E=h,Q={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},k=m(!1),P=m(typeof window>"u"),ee=Nn(),Ht=_n(),Ae=R(()=>a.isStrict?"strict":"loose"),Cn=R(()=>({startOnLoad:!1,securityLevel:Ae.value,dompurifyConfig:Ae.value==="strict"?Q:void 0,flowchart:Ae.value==="strict"?{htmlLabels:!1}:void 0}));function pe(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=""}}function Oe(e,t,n={}){if(!e)return null;const l=(function(r,o){if(!r)return null;const c=ul(o);if(!c)return null;const d=(function(u,s){const p=Array.from(u.childNodes),O=document.createElement("div");return O.dataset.mermaidSvgLayer="1",O.style.zIndex="1",O.appendChild(s),u.insertBefore(O,u.firstChild),p.length>0&&(function(H){const Y=()=>{var z;for(const Be of H)(z=Be.parentNode)==null||z.removeChild(Be)};typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>{requestAnimationFrame(Y)}):setTimeout(Y,32)})(p),O})(r,c);return{svg:c.outerHTML,bindTarget:d}})(e,t);return l||n.keepPreviousOnFailure||pe(e),l}let ae=null;function we(e){if(a.enableMermaidInteractions&&e?.querySelector("svg"))try{ae?.(e)}catch{}}const{t:g}=In();let ie=!1,ye=0;function Ke(){return T(this,null,function*(){try{const e=yield al();return ie?null:(k.value=!!e,e)}catch(e){throw ie||(k.value=!1),e}finally{ie||(P.value=!0)}})}const Ge=m(!1),V=m(!1),Je=m(),K=m(),f=m(),ue=m(),Qe=m(null),Bn=Yn(),Le=m(null),ke=m(typeof window>"u"||!ee.value),On=Xn(),te=qn(Wn,null);let se="",xe=0,et=0;const Nt=R(()=>sl(a,On));function pt(){const e=Nt.value;e&&(se&&se!==e&&(te?.markSettled(se),xe=0),se=e,xe+=1,et+=1,xe===1&&te?.markPending(e))}function wt(){return T(this,null,function*(){const e=se;if(!e||(xe=Math.max(0,xe-1),xe>0))return;se="";const t=++et;yield q(),t===et&&((function(n=Nt.value){n&&Je.value&&te?.reportHeight(n,Je.value.offsetHeight)})(e),te?.markSettled(e))})}function _t(){const e=se;e&&(se="",xe=0,et+=1,te?.markSettled(e))}const It=m(),D=R(()=>a.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function $n(e,t=D.value){const n=t,l={theme:e==="dark"?"dark":"default"};Ae.value==="strict"&&(l.flowchart={htmlLabels:!1});const r=`%%{init: ${JSON.stringify(l)}}%%
2
2
  `;return n.trim().startsWith("%%{")?n:r+n}function Yt(){var e;return(function(t){const n=(function(){var r;const o=K.value?getComputedStyle(K.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";return(r=zt(o))!=null?r:360})(),l=an();return rl(t,n,l)})((e=zt(a.estimatedPreviewHeightPx))!=null?e:ol(D.value))}function Xt(){return`${Yt()}px`}const He=m(null);function yt(){var e;return!!((e=f.value)!=null&&e.querySelector("svg"))}function qt(){return a.loading!==!1&&(yt()||!!He.value)}const B=m(1),N=m(0),_=m(0),tt=m(!1),nt=m({x:0,y:0}),x=m(!0),lt=m(!1),re=m(!1),ce=m(null);let kt="",xt=!1,de="";const rt=m(0),bt=m(!1),Sn=R(()=>{var e;return Math.max(0,(e=a.renderDebounceMs)!=null?e:300)}),En=R(()=>{var e;return Math.max(0,(e=a.contentStableDelayMs)!=null?e:500)}),Ne=R(()=>{var e;return Math.max(120,(e=a.previewPollDelayMs)!=null?e:800)}),Pn=R(()=>{var e;return Math.max(Ne.value,(e=a.previewPollMaxDelayMs)!=null?e:4e3)}),Wt=R(()=>{var e;return Math.max(1,Math.trunc((e=a.previewPollMaxAttempts)!=null?e:12))}),ve=R(()=>a.loading!==!1);let _e=null,Ie=null,$e=null,Se=null,Ye=0;const Vt=(y=globalThis.requestIdleCallback)!=null?y:(e,t)=>setTimeout(()=>e({didTimeout:!0}),16),Ut=(j=globalThis.cancelIdleCallback)!=null?j:e=>clearTimeout(e);function b(e=ye){return!ie&&e===ye}function A(){return b()&&ke.value&&!V.value}function Mt(){$e!=null&&(globalThis.clearTimeout($e),$e=null),Se!=null&&(Ut(Se),Se=null)}function Xe(){ie||$e==null&&Se==null&&($e=globalThis.setTimeout(()=>{$e=null,A()&&(Se=Vt(()=>{Se=null,A()&&hn()},{timeout:500}))},Sn.value))}function qe(){Ie!=null&&(globalThis.clearTimeout(Ie),Ie=null)}function Zt(e=600){if(typeof globalThis>"u"||ie)return;const t=Math.max(0,e);qe(),Ie=globalThis.setTimeout(()=>{if(Ie=null,!ie){if(a.loading||re.value||!A())return void Zt(Math.min(1200,Math.max(300,1.2*t)));Xe()}},t)}const W=m(Xt()),ot=m(W.value);let Ee=null;const $=m(!1),G=m(!1),fe=m({}),me=m(0);let U=null,Pe=null;const I=m(!1),Dn=R(()=>{var e,t;return!(V.value||x.value||P.value&&!re.value&&!ce.value&&($.value||I.value&&((t=(e=f.value)==null?void 0:e.textContent)!=null&&t.trim())))}),be=m({zoom:1,translateX:0,translateY:0,containerHeight:W.value}),Kt=R(()=>a.enableWheelZoom?{wheel:Fn}:{}),J=R(()=>{var e,t,n,l;return{worker:(e=a.workerTimeoutMs)!=null?e:1400,parse:(t=a.parseTimeoutMs)!=null?t:1800,render:(n=a.renderTimeoutMs)!=null?n:2500,fullRender:(l=a.fullRenderTimeoutMs)!=null?l:4e3}});let De=null,at=null,Fe=!1,Me=Ne.value,ne=null,it=0,Tt=!0,ut=0;function Te(e,t){const n=t?.timeoutMs,l=t?.signal;if(l?.aborted)return Promise.reject(new DOMException("Aborted","AbortError"));let r=null,o=!1,c=null;return new Promise((d,u)=>{const s=()=>{r!=null&&clearTimeout(r),c&&l&&l.removeEventListener("abort",c)};n&&n>0&&(r=globalThis.setTimeout(()=>{o||(o=!0,s(),u(new Error("Operation timed out")))},n)),l&&(c=()=>{o||(o=!0,s(),u(new DOMException("Aborted","AbortError")))},l.addEventListener("abort",c)),e().then(p=>{o||(o=!0,s(),d(p))}).catch(p=>{o||(o=!0,s(),u(p))})})}function Gt(e){if(typeof document>"u"||!f.value)return;if(typeof a.onRenderError=="function"&&a.onRenderError(e,D.value,f.value)===!0)return I.value=!0,void L();const t=document.createElement("div");t.style.padding="var(--ms-inset-panel-body)",t.style.color="hsl(var(--ms-destructive))",t.textContent="Failed to render diagram: ";const n=document.createElement("span");n.textContent=e instanceof Error?e.message:"Unknown error",t.appendChild(n),pe(f.value),f.value.appendChild(t);const l=f.value?getComputedStyle(f.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";W.value=l||"360px",ot.value=W.value,I.value=!0,L()}function Jt(e){const t=typeof e=="string"?e:typeof e?.message=="string"?e.message:"";return typeof t=="string"&&/timed out/i.test(t)}function Qt(e){return e?.name==="AbortError"}function Ct(e){return!Jt(e)&&!Qt(e)}typeof window<"u"&&X([()=>Je.value,ee],([e,t])=>{var n;if((n=Le.value)==null||n.destroy(),Le.value=null,!t||ke.value)return void(ke.value=!0);if(!e)return void(ke.value=!1);const l=Bn(e,{rootMargin:Ht?.value.heavyBlockMargin,allowIdle:!1});Le.value=l,ke.value=l.isVisible.value,l.whenVisible.then(()=>{ke.value=!0})},{immediate:!0}),Vn(()=>{var e;ie=!0,ye+=1,me.value+=1,(e=Le.value)==null||e.destroy(),Le.value=null,_t(),Mt()});const st=R(()=>a.showTooltips!==!1);function en(e){return!e||e.disabled}function F(e,t,n="top"){if(!st.value||en(e.currentTarget))return;const l=e,r=l?.clientX!=null&&l?.clientY!=null?{x:l.clientX,y:l.clientY}:void 0;kn(e.currentTarget,t,n,!1,r,a.isDark)}function S(){st.value&&pn()}function tn(e){if(!st.value||en(e.currentTarget))return;const t=Ge.value?g("common.copied")||"Copied":g("common.copy")||"Copy",n=e,l=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;kn(e.currentTarget,t,"top",!1,l,a.isDark)}function nn(e,t){const n={theme:t==="dark"?"dark":"default"};Ae.value==="strict"&&(n.flowchart={htmlLabels:!1});const l=`%%{init: ${JSON.stringify(n)}}%%
3
3
  `;return e.trimStart().startsWith("%%{")?e:l+e}function ct(){return Tt&&!x.value&&!$.value&&!I.value}function ln(e){const t=e.trim();return!(!t||t.startsWith("%%"))&&!/^(?:gantt|title|dateformat|axisformat|tickinterval|excludes|section|todaymarker|topaxis|weekday|weekend|acctitle|accdescr|accdescrmultiline)\b/i.test(t)&&t.includes(":")}function Bt(e){if(Lt(e)==="gantt")return(function(n){var l;const r=n.split(/\r?\n/);for(!/\r?\n$/.test(n)&&r.length>0&&r.pop();r.length>0;){const o=(l=r[r.length-1])==null?void 0:l.trim();if(o&&!o.startsWith("%%")){if(ln(o))break;r.pop()}else r.pop()}return r.some(ln)?r.join(`
4
4
  `):""})(e);const t=e.split(/\r?\n/);for(;t.length>0;){const n=t[t.length-1].trimEnd();if(n!==""){if(!(/^[-=~>|<\s]+$/.test(n.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(n)||/[-|><]$/.test(n)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(n)))break;t.pop()}else t.pop()}return t.join(`
@@ -1 +1 @@
1
- import c from"./CodeBlockNode-BL_lWHk1.js";import{M as v,bl as g,aL as P,s as C,A as b,bJ as i,aY as d,av as k,a4 as x,ar as S,bk as T,q as O}from"./index-DKIJmNQn.js";import"./safeRaf-DGuzXxDK.js";var H=Object.defineProperty,z=Object.defineProperties,j=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,m=(o,s,e)=>s in o?H(o,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[s]=e;const h=v({__name:"MarkdownCodeBlockNode",props:{node:{},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:"vitesse-dark"},lightTheme:{default:"vitesse-light"},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},autoScrollOnUpdate:{type:Boolean},autoScrollInitial:{type:Boolean},estimatedHeightPx:{},estimatedContentHeightPx:{},themes:{},langs:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0}},emits:["previewCode","copy"],setup(o,{emit:s}){const e=o,p=s,w=c,f=g(),y=O(()=>{return t=((a,n)=>{for(var r in n||(n={}))F.call(n,r)&&m(a,r,n[r]);if(u)for(var r of u(n))W.call(n,r)&&m(a,r,n[r]);return a})({},f),l={node:e.node,loading:e.loading,stream:e.stream,darkTheme:e.darkTheme,lightTheme:e.lightTheme,isDark:e.isDark,isShowPreview:e.isShowPreview,enableFontSizeControl:e.enableFontSizeControl,minWidth:e.minWidth,maxWidth:e.maxWidth,themes:e.themes,showHeader:e.showHeader,showCopyButton:e.showCopyButton,showExpandButton:e.showExpandButton,showPreviewButton:e.showPreviewButton,showCollapseButton:e.showCollapseButton,showFontSizeButtons:e.showFontSizeButtons,showTooltips:e.showTooltips,estimatedHeightPx:e.estimatedHeightPx,estimatedContentHeightPx:e.estimatedContentHeightPx},z(t,j(l));var t,l});function B(t){p("previewCode",{type:t.artifactType,content:e.node.code,title:t.artifactTitle})}return(t,l)=>(P(),C(T(w),S(y.value,{onPreviewCode:B,onCopy:l[0]||(l[0]=a=>p("copy",a))}),b({_:2},[t.$slots["header-left"]?{name:"header-left",fn:i(()=>[d(t.$slots,"header-left")]),key:"0"}:void 0,t.$slots["header-right"]?{name:"header-right",fn:i(()=>[d(t.$slots,"header-right")]),key:"1"}:void 0,t.$slots.loading?{name:"loading",fn:i(a=>[d(t.$slots,"loading",k(x(a)))]),key:"2"}:void 0]),1040))}});h.install=o=>{o.component(h.__name,h)};export{h as default};
1
+ import c from"./CodeBlockNode-BaWzfCy0.js";import{M as v,bl as g,aL as P,s as C,A as b,bJ as i,aY as d,av as k,a4 as x,ar as S,bk as T,q as O}from"./index-Ia-ZUO2Z.js";import"./safeRaf-DGuzXxDK.js";var H=Object.defineProperty,z=Object.defineProperties,j=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,m=(o,s,e)=>s in o?H(o,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[s]=e;const h=v({__name:"MarkdownCodeBlockNode",props:{node:{},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:"vitesse-dark"},lightTheme:{default:"vitesse-light"},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},autoScrollOnUpdate:{type:Boolean},autoScrollInitial:{type:Boolean},estimatedHeightPx:{},estimatedContentHeightPx:{},themes:{},langs:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0}},emits:["previewCode","copy"],setup(o,{emit:s}){const e=o,p=s,w=c,f=g(),y=O(()=>{return t=((a,n)=>{for(var r in n||(n={}))F.call(n,r)&&m(a,r,n[r]);if(u)for(var r of u(n))W.call(n,r)&&m(a,r,n[r]);return a})({},f),l={node:e.node,loading:e.loading,stream:e.stream,darkTheme:e.darkTheme,lightTheme:e.lightTheme,isDark:e.isDark,isShowPreview:e.isShowPreview,enableFontSizeControl:e.enableFontSizeControl,minWidth:e.minWidth,maxWidth:e.maxWidth,themes:e.themes,showHeader:e.showHeader,showCopyButton:e.showCopyButton,showExpandButton:e.showExpandButton,showPreviewButton:e.showPreviewButton,showCollapseButton:e.showCollapseButton,showFontSizeButtons:e.showFontSizeButtons,showTooltips:e.showTooltips,estimatedHeightPx:e.estimatedHeightPx,estimatedContentHeightPx:e.estimatedContentHeightPx},z(t,j(l));var t,l});function B(t){p("previewCode",{type:t.artifactType,content:e.node.code,title:t.artifactTitle})}return(t,l)=>(P(),C(T(w),S(y.value,{onPreviewCode:B,onCopy:l[0]||(l[0]=a=>p("copy",a))}),b({_:2},[t.$slots["header-left"]?{name:"header-left",fn:i(()=>[d(t.$slots,"header-left")]),key:"0"}:void 0,t.$slots["header-right"]?{name:"header-right",fn:i(()=>[d(t.$slots,"header-right")]),key:"1"}:void 0,t.$slots.loading?{name:"loading",fn:i(a=>[d(t.$slots,"loading",k(x(a)))]),key:"2"}:void 0]),1040))}});h.install=o=>{o.component(h.__name,h)};export{h as default};
@@ -1 +1 @@
1
- import{bQ as Q,M as Y,af as Z,bY as G,a0 as ee,bS as ne,bT as A,aU as _,bZ as te,bE as P,aD as ae,az as le,aL as I,u as O,I as oe,bJ as re,t as ie,v as ue,g as se,au as F,bb as ce,aw as de,q as X,bU as ve,as as j,bV as fe,bW as me,bX as he,b_ as ge}from"./index-DKIJmNQn.js";var q=(S,B,b)=>new Promise((t,s)=>{var i=c=>{try{T(b.next(c))}catch(d){s(d)}},k=c=>{try{T(b.throw(c))}catch(d){s(d)}},T=c=>c.done?t(c.value):Promise.resolve(c.value).then(i,k);T((b=b.apply(S,B)).next())});const pe=["data-markstream-mode","data-markstream-pending"],ye={key:0,class:"math-loading-overlay"},be=["innerHTML"],ke={key:1,class:"math-block__fallback text-left"},N=Q(Y({__name:"MathBlockNode",props:{node:{},indexKey:{},cacheScope:{}},setup(S){var B,b;const t=S,s=_(null),i=Z(G,null),k=X(()=>ve(t.node.content)),T=((b=(B=ee())==null?void 0:B.vnode.el)==null?void 0:b.nodeType)===1,c=X(()=>ge(t,{})),d=(function(){if(!t.node.content)return{html:"",text:t.node.raw,loading:!1};if(t.node.loading)return{html:"",text:"",loading:!0};const e=ne();if(!e){const n=typeof window>"u"||T;return{html:"",text:n?t.node.raw:"",loading:!n}}try{const n=e.renderToString(k.value,{throwOnError:!1,displayMode:!0});return A(k.value,!0,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:t.node.loading?"":t.node.raw,loading:t.node.loading}}})(),u=_(d.html),f=_(d.text);let E=!1,x=0,v=!1,$=null;const m=te();let R=null,h="";const g=_(d.loading),K=_(!1),p=_(D());function H(e){e!=null&&e!==x||(K.value=!1)}function W(){var e;if(t.indexKey==null)return"";const n=(e=t.cacheScope)!=null?e:m?.scope;return`${n!=null&&String(n).length>0?`${String(n)}:`:""}math-block:${String(t.indexKey)}`}function D(){var e;const n=W();return n&&(e=m?.cache.get(n))!=null?e:0}function M(){if(p.value===0)return;p.value=0;const e=W();e&&m?.cache.set(e,0)}function L(e){if(u.value)return void M();if(!Number.isFinite(e)||e<=0)return;const n=Math.max(p.value,e);if(n===p.value)return;p.value=n;const a=W();a&&m?.cache.set(a,n)}function w(){j(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)})}function z(){const e=h;i&&e&&(h="",i.markSettled(e))}function U(){return q(this,null,function*(){if(v)return z(),void H();$&&($.abort(),$=null);const e=++x;if(!t.node.content)return z(),H(),g.value=!1,u.value="",f.value=t.node.raw,E=!1,void w();const n=new AbortController;$=n,K.value=!0,v||e!==x||n.signal.aborted?v||H(e):((function(){const a=c.value;i&&a&&h!==a&&(h&&i.markSettled(h),h=a,i.markPending(a))})(),fe(k.value,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:8,signal:n.signal}).then(a=>{v||e!==x||(u.value=a,f.value="",E=!0,g.value=!1,M(),w())}).catch(a=>q(null,null,function*(){if(v||e!==x)return;const r=a?.code||a?.name,l=r==="KATEX_DISABLED";if(r==="WORKER_INIT_ERROR"||a?.fallbackToRenderer||(r===me||r==="WORKER_TIMEOUT")&&!t.node.loading){const o=yield he();if(v||e!==x)return;if(o){try{const y=o.renderToString(k.value,{throwOnError:t.node.loading,displayMode:!0});u.value=y,f.value="",E=!0,g.value=!1,M(),w(),A(k.value,!0,y)}catch{}return}}if(l||!t.node.loading)return g.value=!1,u.value="",f.value=t.node.raw,void w();E||(g.value=!0)})).finally(()=>{v||e!==x||(H(e),(function(){const a=h;i&&a&&(h="",j(()=>{var r,l;if(!v){const o=(l=(r=s.value)==null?void 0:r.offsetHeight)!=null?l:0;o>0&&i.reportHeight(a,o)}i.markSettled(a)}))})())}))})}d.html&&(E=!0),d.html&&M();const J=[{family:"$$",open:"$$",close:"$$"},{family:"\\[]",open:"\\[",close:"\\]"},{family:"\\[]",open:"\\[",close:"]"},{family:"[]",open:"[",close:"\\]"},{family:"[]",open:"[",close:"]"},{family:"\\()",open:"\\(",close:"\\)"},{family:"$",open:"$",close:"$"}];function V(e,n){return(function(r){const l=String(r??"");for(const{family:o,open:y,close:C}of J)if((y!=="$"||!l.startsWith("$$")&&!l.endsWith("$$"))&&l.length>=y.length+C.length&&l.startsWith(y)&&l.endsWith(C))return{family:o,inner:l.slice(y.length,l.length-C.length),trusted:!0};return null})(e)||{family:"content",inner:String(n??""),trusted:!1}}return P(()=>[t.node.content,t.node.loading,t.node.raw],([e,,n],[a,,r])=>{var l,o;l=V(r,a),o=V(n,e),l.inner===""||l.family===o.family&&(l.trusted&&o.trusted?o.inner.startsWith(l.inner):o.inner===l.inner)||M(),U()},{flush:"post"}),P([()=>t.indexKey,()=>t.cacheScope],()=>{p.value=D(),w()}),ae(()=>{typeof ResizeObserver<"u"&&s.value&&(R=new ResizeObserver(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)}),R.observe(s.value)),w(),u.value||U()}),le(()=>{v=!0,z(),$&&($.abort(),$=null),R?.disconnect(),R=null}),(e,n)=>(I(),O("div",{ref_key:"containerEl",ref:s,class:"math-block text-center overflow-x-auto relative","data-markstream-math":"block","data-markstream-mode":u.value?"katex":f.value?"fallback":"loading","data-markstream-pending":K.value?"true":void 0,style:de(p.value?{minHeight:`${p.value}px`}:void 0)},[oe(se,{name:"math-fade"},{default:re(()=>[!g.value||u.value||f.value?ie("",!0):(I(),O("div",ye,[...n[0]||(n[0]=[ue("div",{class:"math-loading-spinner"},null,-1)])]))]),_:1}),u.value?(I(),O("div",{key:0,class:F(["math-block__content",{"math-rendering":g.value}]),innerHTML:u.value},null,10,be)):f.value?(I(),O("pre",ke,ce(f.value),1)):(I(),O("div",{key:2,class:F(["math-block__content",{"math-rendering":g.value}])},null,2))],12,pe))}}),[["__scopeId","data-v-939191ad"]]);N.install=S=>{S.component(N.__name,N)};export{N as default};
1
+ import{bQ as Q,M as Y,af as Z,bY as G,a0 as ee,bS as ne,bT as A,aU as _,bZ as te,bE as P,aD as ae,az as le,aL as I,u as O,I as oe,bJ as re,t as ie,v as ue,g as se,au as F,bb as ce,aw as de,q as X,bU as ve,as as j,bV as fe,bW as me,bX as he,b_ as ge}from"./index-Ia-ZUO2Z.js";var q=(S,B,b)=>new Promise((t,s)=>{var i=c=>{try{T(b.next(c))}catch(d){s(d)}},k=c=>{try{T(b.throw(c))}catch(d){s(d)}},T=c=>c.done?t(c.value):Promise.resolve(c.value).then(i,k);T((b=b.apply(S,B)).next())});const pe=["data-markstream-mode","data-markstream-pending"],ye={key:0,class:"math-loading-overlay"},be=["innerHTML"],ke={key:1,class:"math-block__fallback text-left"},N=Q(Y({__name:"MathBlockNode",props:{node:{},indexKey:{},cacheScope:{}},setup(S){var B,b;const t=S,s=_(null),i=Z(G,null),k=X(()=>ve(t.node.content)),T=((b=(B=ee())==null?void 0:B.vnode.el)==null?void 0:b.nodeType)===1,c=X(()=>ge(t,{})),d=(function(){if(!t.node.content)return{html:"",text:t.node.raw,loading:!1};if(t.node.loading)return{html:"",text:"",loading:!0};const e=ne();if(!e){const n=typeof window>"u"||T;return{html:"",text:n?t.node.raw:"",loading:!n}}try{const n=e.renderToString(k.value,{throwOnError:!1,displayMode:!0});return A(k.value,!0,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:t.node.loading?"":t.node.raw,loading:t.node.loading}}})(),u=_(d.html),f=_(d.text);let E=!1,x=0,v=!1,$=null;const m=te();let R=null,h="";const g=_(d.loading),K=_(!1),p=_(D());function H(e){e!=null&&e!==x||(K.value=!1)}function W(){var e;if(t.indexKey==null)return"";const n=(e=t.cacheScope)!=null?e:m?.scope;return`${n!=null&&String(n).length>0?`${String(n)}:`:""}math-block:${String(t.indexKey)}`}function D(){var e;const n=W();return n&&(e=m?.cache.get(n))!=null?e:0}function M(){if(p.value===0)return;p.value=0;const e=W();e&&m?.cache.set(e,0)}function L(e){if(u.value)return void M();if(!Number.isFinite(e)||e<=0)return;const n=Math.max(p.value,e);if(n===p.value)return;p.value=n;const a=W();a&&m?.cache.set(a,n)}function w(){j(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)})}function z(){const e=h;i&&e&&(h="",i.markSettled(e))}function U(){return q(this,null,function*(){if(v)return z(),void H();$&&($.abort(),$=null);const e=++x;if(!t.node.content)return z(),H(),g.value=!1,u.value="",f.value=t.node.raw,E=!1,void w();const n=new AbortController;$=n,K.value=!0,v||e!==x||n.signal.aborted?v||H(e):((function(){const a=c.value;i&&a&&h!==a&&(h&&i.markSettled(h),h=a,i.markPending(a))})(),fe(k.value,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:8,signal:n.signal}).then(a=>{v||e!==x||(u.value=a,f.value="",E=!0,g.value=!1,M(),w())}).catch(a=>q(null,null,function*(){if(v||e!==x)return;const r=a?.code||a?.name,l=r==="KATEX_DISABLED";if(r==="WORKER_INIT_ERROR"||a?.fallbackToRenderer||(r===me||r==="WORKER_TIMEOUT")&&!t.node.loading){const o=yield he();if(v||e!==x)return;if(o){try{const y=o.renderToString(k.value,{throwOnError:t.node.loading,displayMode:!0});u.value=y,f.value="",E=!0,g.value=!1,M(),w(),A(k.value,!0,y)}catch{}return}}if(l||!t.node.loading)return g.value=!1,u.value="",f.value=t.node.raw,void w();E||(g.value=!0)})).finally(()=>{v||e!==x||(H(e),(function(){const a=h;i&&a&&(h="",j(()=>{var r,l;if(!v){const o=(l=(r=s.value)==null?void 0:r.offsetHeight)!=null?l:0;o>0&&i.reportHeight(a,o)}i.markSettled(a)}))})())}))})}d.html&&(E=!0),d.html&&M();const J=[{family:"$$",open:"$$",close:"$$"},{family:"\\[]",open:"\\[",close:"\\]"},{family:"\\[]",open:"\\[",close:"]"},{family:"[]",open:"[",close:"\\]"},{family:"[]",open:"[",close:"]"},{family:"\\()",open:"\\(",close:"\\)"},{family:"$",open:"$",close:"$"}];function V(e,n){return(function(r){const l=String(r??"");for(const{family:o,open:y,close:C}of J)if((y!=="$"||!l.startsWith("$$")&&!l.endsWith("$$"))&&l.length>=y.length+C.length&&l.startsWith(y)&&l.endsWith(C))return{family:o,inner:l.slice(y.length,l.length-C.length),trusted:!0};return null})(e)||{family:"content",inner:String(n??""),trusted:!1}}return P(()=>[t.node.content,t.node.loading,t.node.raw],([e,,n],[a,,r])=>{var l,o;l=V(r,a),o=V(n,e),l.inner===""||l.family===o.family&&(l.trusted&&o.trusted?o.inner.startsWith(l.inner):o.inner===l.inner)||M(),U()},{flush:"post"}),P([()=>t.indexKey,()=>t.cacheScope],()=>{p.value=D(),w()}),ae(()=>{typeof ResizeObserver<"u"&&s.value&&(R=new ResizeObserver(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)}),R.observe(s.value)),w(),u.value||U()}),le(()=>{v=!0,z(),$&&($.abort(),$=null),R?.disconnect(),R=null}),(e,n)=>(I(),O("div",{ref_key:"containerEl",ref:s,class:"math-block text-center overflow-x-auto relative","data-markstream-math":"block","data-markstream-mode":u.value?"katex":f.value?"fallback":"loading","data-markstream-pending":K.value?"true":void 0,style:de(p.value?{minHeight:`${p.value}px`}:void 0)},[oe(se,{name:"math-fade"},{default:re(()=>[!g.value||u.value||f.value?ie("",!0):(I(),O("div",ye,[...n[0]||(n[0]=[ue("div",{class:"math-loading-spinner"},null,-1)])]))]),_:1}),u.value?(I(),O("div",{key:0,class:F(["math-block__content",{"math-rendering":g.value}]),innerHTML:u.value},null,10,be)):f.value?(I(),O("pre",ke,ce(f.value),1)):(I(),O("div",{key:2,class:F(["math-block__content",{"math-rendering":g.value}])},null,2))],12,pe))}}),[["__scopeId","data-v-939191ad"]]);N.install=S=>{S.component(N.__name,N)};export{N as default};
@@ -1 +1 @@
1
- import{bQ as C,M as D,a0 as N,bS as U,bT as L,aU as h,bE as A,aD as K,az as W,aL as y,u as x,bb as z,s as H,bJ as P,v as M,aY as V,g as X,t as j,q as O,bU as q,bV as F,bW as J,bX as Q}from"./index-DKIJmNQn.js";var S=(f,b,r)=>new Promise((e,k)=>{var i=l=>{try{p(r.next(l))}catch(t){k(t)}},d=l=>{try{p(r.throw(l))}catch(t){k(t)}},p=l=>l.done?e(l.value):Promise.resolve(l.value).then(i,d);p((r=r.apply(f,b)).next())});const Y=["data-markstream-mode","data-markstream-pending"],G=["innerHTML"],Z={key:1,class:"math-inline math-inline--fallback"},ee={class:"math-inline__loading",role:"status","aria-live":"polite"},R=C(D({__name:"MathInlineNode",props:{node:{}},setup(f){var b,r;const e=f,k=h(null),i=O(()=>e.node.markup==="$$"),d=O(()=>q(e.node.content)),p=((r=(b=N())==null?void 0:b.vnode.el)==null?void 0:r.nodeType)===1,l=(function(){if(!e.node.content)return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading};if(e.node.loading)return{html:"",text:"",loading:!0};const a=U();if(!a){const n=typeof window>"u"||p;return{html:"",text:n?e.node.raw:"",loading:!n}}try{const n=a.renderToString(d.value,{throwOnError:!1,displayMode:i.value});return L(d.value,i.value,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading}}})(),t=h(l.html),u=h(l.text);let g=!1,m=0,s=!1,c=null;const v=h(l.loading),_=h(!1);function T(a){a!=null&&a!==m||(_.value=!1)}function B(){return S(this,null,function*(){if(s)return;c&&(c.abort(),c=null);const a=++m;if(!e.node.content)return T(),t.value="",u.value=e.node.loading?"":e.node.raw,v.value=e.node.loading,void(g=!1);const n=new AbortController;c=n,_.value=!0,s||a!==m||n.signal.aborted?T(a):F(d.value,i.value,{timeout:1500,waitTimeout:1500,maxRetries:8,signal:n.signal}).then(o=>{s||a!==m||(t.value=o,u.value="",v.value=!1,g=!0)}).catch(o=>S(null,null,function*(){if(s||a!==m)return;const w=o?.code||o?.name,$=w==="KATEX_DISABLED";if(w==="WORKER_INIT_ERROR"||o?.fallbackToRenderer||(w===J||w==="WORKER_TIMEOUT")&&!e.node.loading){const I=yield Q();if(s||a!==m)return;if(I){try{const E=I.renderToString(d.value,{throwOnError:e.node.loading,displayMode:i.value});t.value=E,u.value="",v.value=!1,g=!0,L(d.value,i.value,E)}catch{}return}}if($||!e.node.loading)return v.value=!1,t.value="",void(u.value=e.node.raw);g||(v.value=!0)})).finally(()=>{s||T(a)})})}return l.html&&(g=!0),A(()=>[e.node.content,e.node.loading,e.node.raw,e.node.markup],()=>{B()}),K(()=>{t.value||B()}),W(()=>{s=!0,c&&(c.abort(),c=null)}),(a,n)=>(y(),x("span",{ref_key:"containerEl",ref:k,class:"math-inline-wrapper","data-markstream-math":"inline","data-markstream-mode":t.value?"katex":u.value?"fallback":"loading","data-markstream-pending":_.value?"true":void 0},[t.value?(y(),x("span",{key:0,class:"math-inline",innerHTML:t.value},null,8,G)):u.value?(y(),x("span",Z,z(u.value),1)):v.value?(y(),H(X,{key:2,name:"table-node-fade"},{default:P(()=>[M("span",ee,[V(a.$slots,"loading",{isLoading:v.value},()=>[n[0]||(n[0]=M("span",{class:"math-inline__spinner animate-spin","aria-hidden":"true"},null,-1)),n[1]||(n[1]=M("span",{class:"sr-only"},"Loading",-1))],!0)])]),_:3})):j("",!0)],8,Y))}}),[["__scopeId","data-v-6c556261"]]);R.install=f=>{f.component(R.__name,R)};export{R as default};
1
+ import{bQ as C,M as D,a0 as N,bS as U,bT as L,aU as h,bE as A,aD as K,az as W,aL as y,u as x,bb as z,s as H,bJ as P,v as M,aY as V,g as X,t as j,q as O,bU as q,bV as F,bW as J,bX as Q}from"./index-Ia-ZUO2Z.js";var S=(f,b,r)=>new Promise((e,k)=>{var i=l=>{try{p(r.next(l))}catch(t){k(t)}},d=l=>{try{p(r.throw(l))}catch(t){k(t)}},p=l=>l.done?e(l.value):Promise.resolve(l.value).then(i,d);p((r=r.apply(f,b)).next())});const Y=["data-markstream-mode","data-markstream-pending"],G=["innerHTML"],Z={key:1,class:"math-inline math-inline--fallback"},ee={class:"math-inline__loading",role:"status","aria-live":"polite"},R=C(D({__name:"MathInlineNode",props:{node:{}},setup(f){var b,r;const e=f,k=h(null),i=O(()=>e.node.markup==="$$"),d=O(()=>q(e.node.content)),p=((r=(b=N())==null?void 0:b.vnode.el)==null?void 0:r.nodeType)===1,l=(function(){if(!e.node.content)return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading};if(e.node.loading)return{html:"",text:"",loading:!0};const a=U();if(!a){const n=typeof window>"u"||p;return{html:"",text:n?e.node.raw:"",loading:!n}}try{const n=a.renderToString(d.value,{throwOnError:!1,displayMode:i.value});return L(d.value,i.value,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading}}})(),t=h(l.html),u=h(l.text);let g=!1,m=0,s=!1,c=null;const v=h(l.loading),_=h(!1);function T(a){a!=null&&a!==m||(_.value=!1)}function B(){return S(this,null,function*(){if(s)return;c&&(c.abort(),c=null);const a=++m;if(!e.node.content)return T(),t.value="",u.value=e.node.loading?"":e.node.raw,v.value=e.node.loading,void(g=!1);const n=new AbortController;c=n,_.value=!0,s||a!==m||n.signal.aborted?T(a):F(d.value,i.value,{timeout:1500,waitTimeout:1500,maxRetries:8,signal:n.signal}).then(o=>{s||a!==m||(t.value=o,u.value="",v.value=!1,g=!0)}).catch(o=>S(null,null,function*(){if(s||a!==m)return;const w=o?.code||o?.name,$=w==="KATEX_DISABLED";if(w==="WORKER_INIT_ERROR"||o?.fallbackToRenderer||(w===J||w==="WORKER_TIMEOUT")&&!e.node.loading){const I=yield Q();if(s||a!==m)return;if(I){try{const E=I.renderToString(d.value,{throwOnError:e.node.loading,displayMode:i.value});t.value=E,u.value="",v.value=!1,g=!0,L(d.value,i.value,E)}catch{}return}}if($||!e.node.loading)return v.value=!1,t.value="",void(u.value=e.node.raw);g||(v.value=!0)})).finally(()=>{s||T(a)})})}return l.html&&(g=!0),A(()=>[e.node.content,e.node.loading,e.node.raw,e.node.markup],()=>{B()}),K(()=>{t.value||B()}),W(()=>{s=!0,c&&(c.abort(),c=null)}),(a,n)=>(y(),x("span",{ref_key:"containerEl",ref:k,class:"math-inline-wrapper","data-markstream-math":"inline","data-markstream-mode":t.value?"katex":u.value?"fallback":"loading","data-markstream-pending":_.value?"true":void 0},[t.value?(y(),x("span",{key:0,class:"math-inline",innerHTML:t.value},null,8,G)):u.value?(y(),x("span",Z,z(u.value),1)):v.value?(y(),H(X,{key:2,name:"table-node-fade"},{default:P(()=>[M("span",ee,[V(a.$slots,"loading",{isLoading:v.value},()=>[n[0]||(n[0]=M("span",{class:"math-inline__spinner animate-spin","aria-hidden":"true"},null,-1)),n[1]||(n[1]=M("span",{class:"sr-only"},"Loading",-1))],!0)])]),_:3})):j("",!0)],8,Y))}}),[["__scopeId","data-v-6c556261"]]);R.install=f=>{f.component(R.__name,R)};export{R as default};
@@ -1 +1 @@
1
- import{bQ as ot,M as lt,bl as at,af as rt,bY as ut,b$ as it,c0 as st,c1 as ct,c2 as dt,aU as d,bE as Z,as as fe,aD as vt,az as mt,aL as v,u as m,v as u,bk as f,au as pe,bb as N,t as T,aw as ge,bL as ft,bB as pt,q as D,c7 as Se,c8 as gt,ca as ht,b_ as yt}from"./index-DKIJmNQn.js";var wt=Object.defineProperty,Le=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,Ne=(p,n,i)=>n in p?wt(p,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):p[n]=i,he=(p,n)=>{for(var i in n||(n={}))bt.call(n,i)&&Ne(p,i,n[i]);if(Le)for(var i of Le(n))kt.call(n,i)&&Ne(p,i,n[i]);return p},ye=(p,n,i)=>new Promise((w,a)=>{var A=h=>{try{g(i.next(h))}catch(s){a(s)}},k=h=>{try{g(i.throw(h))}catch(s){a(s)}},g=h=>h.done?w(h.value):Promise.resolve(h.value).then(A,k);g((i=i.apply(p,n)).next())});const xt=["data-markstream-mode","data-markstream-pending"],Bt={key:0,class:"d2-block-header flex justify-between items-center border-b"},Dt={class:"d2-header-actions flex items-center"},Ct={key:0,class:"d2-mode-toggle flex items-center gap-0.5"},Mt=["aria-label"],Et={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Tt={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},At=["aria-label"],jt=["aria-pressed"],Ot={key:0,class:"d2-source"},Ft={class:"d2-code"},It={key:0,class:"d2-error mt-2 text-xs"},Ht={key:1},St={key:0,class:"d2-source"},Lt={class:"d2-code"},Nt={key:0,class:"d2-error mt-2 text-xs"},Pt=["innerHTML"],Rt={key:0,class:"d2-error px-4 pb-3 text-xs"},we=ot(lt({__name:"D2BlockNode",props:{node:{},maxHeight:{default:void 0},loading:{type:Boolean,default:!0},isDark:{type:Boolean},progressiveRender:{type:Boolean,default:!0},progressiveIntervalMs:{default:700},themeId:{},darkThemeId:{},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0}},setup(p){const n=p,i=at(),w=rt(ut,null),{t:a}=it(),A=d(!1),k=d(!1),g=d(!1),h=d(!1),s=d(null),W=d(!1),j=d(""),ae=d(""),re=d(0),P=d(""),R=d(""),ee=d(null),ue=d(null),ie=d(null),Pe=st(),te=ct(),be=dt(),Y=d(null),ke=typeof window<"u",xe=d(!1),O=d(typeof window>"u"||!be.value),F=D(()=>{var t;return(t=n.node.code)!=null?t:""}),Re=D(()=>yt(n,i)),se=D(()=>{var t,e;return[n.isDark?"dark":"light",(t=n.themeId)!=null?t:"auto",(e=n.darkThemeId)!=null?e:"auto",F.value].join(":")}),ne=D(()=>!!j.value&&ae.value===se.value),Be=D(()=>{if(!xe.value||!F.value||g.value)return!1;const t=se.value;return!!W.value||P.value!==t&&(!s.value||R.value!==t)}),De=D(()=>ne.value||!!j.value&&Be.value),oe=D(()=>g.value||!h.value||!De.value),_e=D(()=>{if(oe.value&&ue.value)return{minHeight:`${ue.value}px`}}),Ue=D(()=>n.maxHeight==="none"?{maxHeight:"none"}:n.maxHeight!=null?{maxHeight:typeof n.maxHeight=="number"?`${n.maxHeight}px`:String(n.maxHeight)}:void 0);let x=null,ce=!1,_=!1,Ce=0,U=null,I=!1,$=null,C="";typeof window<"u"&&Z([()=>ie.value,be],([t,e])=>{var o,c,H;if((o=Y.value)==null||o.destroy(),Y.value=null,!e||O.value)return void(O.value=!0);if(!t)return void(O.value=!1);const S=(H=(c=te?.value.heavyBlockMargin)!=null?c:te?.value.rootMargin)!=null?H:"160px",V=Pe(t,{rootMargin:S,allowIdle:!1});Y.value=V,O.value=V.isVisible.value,V.whenVisible.then(()=>{O.value=!0})},{immediate:!0});const Ve={N1:"#E5E7EB",N2:"#CBD5E1",N3:"#94A3B8",N4:"#64748B",N5:"#475569",N6:"#334155",N7:"#0B1220",B1:"#60A5FA",B2:"#3B82F6",B3:"#2563EB",B4:"#1D4ED8",B5:"#1E40AF",B6:"#111827",AA2:"#22D3EE",AA4:"#0EA5E9",AA5:"#0284C7",AB4:"#FBBF24",AB5:"#F59E0B"};function Me(t){return!t||t.disabled}function M(t,e,o="top"){if(Me(t.currentTarget))return;const c=t,H=c?.clientX!=null&&c?.clientY!=null?{x:c.clientX,y:c.clientY}:void 0;Se(t.currentTarget,e,o,!1,H,n.isDark)}function b(){gt()}function Ee(t){if(Me(t.currentTarget))return;const e=A.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=t,c=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;Se(t.currentTarget,e,"top",!1,c,n.isDark)}function ze(){return ye(this,null,function*(){try{const t=F.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(t)),A.value=!0,setTimeout(()=>{A.value=!1},1e3)}catch(t){console.error("Copy failed:",t)}})}function Ye(){k.value=!k.value}function Te(t){g.value=t==="source"}const $e=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],qe=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function Xe(t){if(!t)return"";const e=t.trim();return qe.test(e)?e:""}function Ae(){j.value="",ae.value=""}function q(t){return _||t!==re.value}function Ge(){return ye(this,null,function*(){var t,e,o,c,H;if(!ke||_||!O.value||n.loading&&!n.progressiveRender)return;const S=se.value;if(S===P.value&&!s.value&&ne.value)return h.value=!0,void(n.loading&&(g.value=!1));const V=F.value;if(!V)return Ae(),s.value=null,P.value="",void(R.value="");const G=++re.value;W.value=!0,s.value=null,R.value="",(function(){const r=Re.value;w&&r&&C!==r&&(C&&w.markSettled(C),C=r,w.markPending(r))})();try{const r=yield(function(){return ye(this,null,function*(){if(x)return x;const l=yield ht();if(_||!l)return null;if(typeof l=="function"){const Q=new l;return Q&&typeof Q.compile=="function"?x=Q:typeof l.compile=="function"&&(x=l),x}return l?.D2&&typeof l.D2=="function"?(x=new l.D2,x):(typeof l.compile=="function"&&(x=l),x)})})();if(q(G))return;if(!r)return h.value=!1,g.value=!0,Ae(),s.value="D2 is not available.",void(R.value=S);if(typeof r.compile!="function"||typeof r.render!="function")throw new TypeError("D2 instance is missing compile/render methods.");h.value=!0;const y=yield r.compile(V);if(q(G))return;const le=(t=y?.diagram)!=null?t:y,B=(o=(e=y?.renderOptions)!=null?e:y?.options)!=null?o:{},Qe=(c=n.themeId)!=null?c:B.themeID,je=(H=n.darkThemeId)!=null?H:B.darkThemeID,J=he({},B);if(J.themeID=n.isDark&&je!=null?je:Qe,J.darkThemeID=null,J.darkThemeOverrides=null,n.isDark){const l=B.themeOverrides&&typeof B.themeOverrides=="object"?B.themeOverrides:null;J.themeOverrides=he(he({},Ve),l||{})}const Ke=yield r.render(le,J);if(q(G))return;const Oe=(function(l){return l?typeof l=="string"?l:typeof l.svg=="string"?l.svg:typeof l.data=="string"?l.data:"":""})(Ke);if(!Oe)throw new Error("D2 render returned empty output.");(function(l,Q){const Fe=(function(Ie){if(typeof window>"u"||typeof DOMParser>"u"||!Ie)return"";const Ze=Ie.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#"),ve=new DOMParser().parseFromString(Ze,"image/svg+xml").documentElement;if(!ve||ve.nodeName.toLowerCase()!=="svg")return"";const me=ve;return(function(He){const We=new Set(["script"]),et=[He,...Array.from(He.querySelectorAll("*"))];for(const L of et){if(We.has(L.tagName.toLowerCase())){L.remove();continue}const tt=Array.from(L.attributes);for(const z of tt){const E=z.name;if(/^on/i.test(E))L.removeAttribute(E);else{if(E==="style"&&z.value){const K=z.value;if($e.some(nt=>nt.test(K))){L.removeAttribute(E);continue}}if((E==="href"||E==="xlink:href")&&z.value){const K=Xe(z.value);if(!K){L.removeAttribute(E);continue}K!==z.value&&L.setAttribute(E,K)}}}}})(me),me.classList.add("markstream-d2-root-svg"),me.outerHTML})(l);j.value=Fe||"",ae.value=Fe?Q:""})(Oe,S),P.value=S,R.value="",n.loading&&(g.value=!1),s.value=null}catch(r){if(q(G))return;const y=r?.message?String(r.message):"D2 render failed.";n.loading||(s.value=y,R.value=S),P.value="",y.includes("@terrastruct/d2")&&(h.value=!1,g.value=!0)}finally{q(G)||(W.value=!1,I?(I=!1,X()):(function(){const r=C;w&&r&&(C="",fe(()=>{var y,le;if(!_){const B=(le=(y=ie.value)==null?void 0:y.offsetHeight)!=null?le:0;B>0&&w.reportHeight(r,B)}w.markSettled(r)}))})())}})}function X(t=!1){if(ce||!ke||_)return;if(W.value)return void(I=!0);const e=Math.max(120,Number(n.progressiveIntervalMs)||0),o=Date.now()-Ce;if(!t&&o<e)return I=!0,void(U==null&&(U=window.setTimeout(()=>{U=null,I&&(I=!1,X(!0))},Math.max(0,e-o))));ce=!0;const c=()=>{ce=!1,Ce=Date.now(),Ge()};typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(c):setTimeout(c,0)}function Je(){if(ne.value)try{const t=new Blob([j.value],{type:"image/svg+xml;charset=utf-8"}),e=URL.createObjectURL(t);if(typeof document<"u"){const o=document.createElement("a");o.href=e,o.download=`d2-diagram-${Date.now()}.svg`,document.body.appendChild(o),o.click(),document.body.removeChild(o)}URL.revokeObjectURL(e)}catch(t){console.error("Failed to export SVG:",t)}}function de(){const t=ee.value;if(!t)return;const e=t.getBoundingClientRect().height;e>0&&(ue.value=e)}return Z(()=>[n.node.code,n.loading,n.isDark,n.themeId,n.darkThemeId],()=>{X()},{immediate:!0}),Z(()=>n.loading,(t,e)=>{e&&!t&&X(!0)}),Z(()=>O.value,t=>{t&&X(!0)}),Z(()=>[oe.value,j.value,F.value],()=>{fe(()=>{de()})}),vt(()=>{xe.value=!0,fe(()=>{de()}),typeof ResizeObserver<"u"&&($=new ResizeObserver(()=>{de()}),ee.value&&$.observe(ee.value))}),mt(()=>{var t;_=!0,re.value+=1,I=!1,(function(){const e=C;w&&e&&(C="",w.markSettled(e))})(),P.value="",(t=Y.value)==null||t.destroy(),Y.value=null,U!=null&&(clearTimeout(U),U=null),$?.disconnect(),$=null}),(t,e)=>(v(),m("div",{ref_key:"viewportTarget",ref:ie,class:pe(["d2-block-container rounded-lg border overflow-hidden",{dark:n.isDark}]),"data-markstream-d2":"1","data-markstream-mode":oe.value?"fallback":"preview","data-markstream-pending":Be.value?"true":void 0},[n.showHeader?(v(),m("div",Bt,[e[16]||(e[16]=u("div",{class:"flex items-center gap-x-2"},[u("span",{class:"d2-label font-medium font-mono"},"D2")],-1)),u("div",Dt,[n.showModeToggle?(v(),m("div",Ct,[u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"":"is-active"]),onClick:e[0]||(e[0]=o=>Te("preview")),onMouseenter:e[1]||(e[1]=o=>M(o,f(a)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=o=>M(o,f(a)("common.preview")||"Preview")),onMouseleave:b,onBlur:b},N(f(a)("common.preview")||"Preview"),35),u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"is-active":""]),onClick:e[3]||(e[3]=o=>Te("source")),onMouseenter:e[4]||(e[4]=o=>M(o,f(a)("common.source")||"Source")),onFocus:e[5]||(e[5]=o=>M(o,f(a)("common.source")||"Source")),onMouseleave:b,onBlur:b},N(f(a)("common.source")||"Source"),35)])):T("",!0),n.showCopyButton?(v(),m("button",{key:1,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":A.value?f(a)("common.copied")||"Copied":f(a)("common.copy")||"Copy",onClick:ze,onMouseenter:e[6]||(e[6]=o=>Ee(o)),onFocus:e[7]||(e[7]=o=>Ee(o)),onMouseleave:b,onBlur:b},[A.value?(v(),m("svg",Tt,[...e[13]||(e[13]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(v(),m("svg",Et,[...e[12]||(e[12]=[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,Mt)):T("",!0),n.showExportButton&&ne.value?(v(),m("button",{key:2,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":f(a)("common.export")||"Export",onClick:Je,onMouseenter:e[8]||(e[8]=o=>M(o,f(a)("common.export")||"Export")),onFocus:e[9]||(e[9]=o=>M(o,f(a)("common.export")||"Export")),onMouseleave:b,onBlur:b},[...e[14]||(e[14]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v12m0-12l-4 4m4-4l4 4M4 14v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"})],-1)])],40,At)):T("",!0),n.showCollapseButton?(v(),m("button",{key:3,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-pressed":k.value,onClick:Ye,onMouseenter:e[10]||(e[10]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onFocus:e[11]||(e[11]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onMouseleave:b,onBlur:b},[(v(),m("svg",{style:ge({rotate:k.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[15]||(e[15]=[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,jt)):T("",!0)])])):T("",!0),ft(u("div",{ref_key:"bodyRef",ref:ee,class:"d2-block-body",style:ge(_e.value)},[n.loading&&!De.value?(v(),m("div",Ot,[u("pre",Ft,[u("code",null,N(F.value),1)]),s.value?(v(),m("p",It,N(s.value),1)):T("",!0)])):(v(),m("div",Ht,[oe.value?(v(),m("div",St,[u("pre",Lt,[u("code",null,N(F.value),1)]),s.value?(v(),m("p",Nt,N(s.value),1)):T("",!0)])):(v(),m("div",{key:1,class:"d2-render",style:ge(Ue.value)},[u("div",{class:"d2-svg",innerHTML:j.value},null,8,Pt),s.value?(v(),m("p",Rt,N(s.value),1)):T("",!0)],4))]))],4),[[pt,!k.value]])],10,xt))}}),[["__scopeId","data-v-3b434cf5"]]);we.install=p=>{p.component(we.__name,we)};export{we as default};
1
+ import{bQ as ot,M as lt,bl as at,af as rt,bY as ut,b$ as it,c0 as st,c1 as ct,c2 as dt,aU as d,bE as Z,as as fe,aD as vt,az as mt,aL as v,u as m,v as u,bk as f,au as pe,bb as N,t as T,aw as ge,bL as ft,bB as pt,q as D,c7 as Se,c8 as gt,ca as ht,b_ as yt}from"./index-Ia-ZUO2Z.js";var wt=Object.defineProperty,Le=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,Ne=(p,n,i)=>n in p?wt(p,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):p[n]=i,he=(p,n)=>{for(var i in n||(n={}))bt.call(n,i)&&Ne(p,i,n[i]);if(Le)for(var i of Le(n))kt.call(n,i)&&Ne(p,i,n[i]);return p},ye=(p,n,i)=>new Promise((w,a)=>{var A=h=>{try{g(i.next(h))}catch(s){a(s)}},k=h=>{try{g(i.throw(h))}catch(s){a(s)}},g=h=>h.done?w(h.value):Promise.resolve(h.value).then(A,k);g((i=i.apply(p,n)).next())});const xt=["data-markstream-mode","data-markstream-pending"],Bt={key:0,class:"d2-block-header flex justify-between items-center border-b"},Dt={class:"d2-header-actions flex items-center"},Ct={key:0,class:"d2-mode-toggle flex items-center gap-0.5"},Mt=["aria-label"],Et={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Tt={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},At=["aria-label"],jt=["aria-pressed"],Ot={key:0,class:"d2-source"},Ft={class:"d2-code"},It={key:0,class:"d2-error mt-2 text-xs"},Ht={key:1},St={key:0,class:"d2-source"},Lt={class:"d2-code"},Nt={key:0,class:"d2-error mt-2 text-xs"},Pt=["innerHTML"],Rt={key:0,class:"d2-error px-4 pb-3 text-xs"},we=ot(lt({__name:"D2BlockNode",props:{node:{},maxHeight:{default:void 0},loading:{type:Boolean,default:!0},isDark:{type:Boolean},progressiveRender:{type:Boolean,default:!0},progressiveIntervalMs:{default:700},themeId:{},darkThemeId:{},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0}},setup(p){const n=p,i=at(),w=rt(ut,null),{t:a}=it(),A=d(!1),k=d(!1),g=d(!1),h=d(!1),s=d(null),W=d(!1),j=d(""),ae=d(""),re=d(0),P=d(""),R=d(""),ee=d(null),ue=d(null),ie=d(null),Pe=st(),te=ct(),be=dt(),Y=d(null),ke=typeof window<"u",xe=d(!1),O=d(typeof window>"u"||!be.value),F=D(()=>{var t;return(t=n.node.code)!=null?t:""}),Re=D(()=>yt(n,i)),se=D(()=>{var t,e;return[n.isDark?"dark":"light",(t=n.themeId)!=null?t:"auto",(e=n.darkThemeId)!=null?e:"auto",F.value].join(":")}),ne=D(()=>!!j.value&&ae.value===se.value),Be=D(()=>{if(!xe.value||!F.value||g.value)return!1;const t=se.value;return!!W.value||P.value!==t&&(!s.value||R.value!==t)}),De=D(()=>ne.value||!!j.value&&Be.value),oe=D(()=>g.value||!h.value||!De.value),_e=D(()=>{if(oe.value&&ue.value)return{minHeight:`${ue.value}px`}}),Ue=D(()=>n.maxHeight==="none"?{maxHeight:"none"}:n.maxHeight!=null?{maxHeight:typeof n.maxHeight=="number"?`${n.maxHeight}px`:String(n.maxHeight)}:void 0);let x=null,ce=!1,_=!1,Ce=0,U=null,I=!1,$=null,C="";typeof window<"u"&&Z([()=>ie.value,be],([t,e])=>{var o,c,H;if((o=Y.value)==null||o.destroy(),Y.value=null,!e||O.value)return void(O.value=!0);if(!t)return void(O.value=!1);const S=(H=(c=te?.value.heavyBlockMargin)!=null?c:te?.value.rootMargin)!=null?H:"160px",V=Pe(t,{rootMargin:S,allowIdle:!1});Y.value=V,O.value=V.isVisible.value,V.whenVisible.then(()=>{O.value=!0})},{immediate:!0});const Ve={N1:"#E5E7EB",N2:"#CBD5E1",N3:"#94A3B8",N4:"#64748B",N5:"#475569",N6:"#334155",N7:"#0B1220",B1:"#60A5FA",B2:"#3B82F6",B3:"#2563EB",B4:"#1D4ED8",B5:"#1E40AF",B6:"#111827",AA2:"#22D3EE",AA4:"#0EA5E9",AA5:"#0284C7",AB4:"#FBBF24",AB5:"#F59E0B"};function Me(t){return!t||t.disabled}function M(t,e,o="top"){if(Me(t.currentTarget))return;const c=t,H=c?.clientX!=null&&c?.clientY!=null?{x:c.clientX,y:c.clientY}:void 0;Se(t.currentTarget,e,o,!1,H,n.isDark)}function b(){gt()}function Ee(t){if(Me(t.currentTarget))return;const e=A.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=t,c=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;Se(t.currentTarget,e,"top",!1,c,n.isDark)}function ze(){return ye(this,null,function*(){try{const t=F.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(t)),A.value=!0,setTimeout(()=>{A.value=!1},1e3)}catch(t){console.error("Copy failed:",t)}})}function Ye(){k.value=!k.value}function Te(t){g.value=t==="source"}const $e=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],qe=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function Xe(t){if(!t)return"";const e=t.trim();return qe.test(e)?e:""}function Ae(){j.value="",ae.value=""}function q(t){return _||t!==re.value}function Ge(){return ye(this,null,function*(){var t,e,o,c,H;if(!ke||_||!O.value||n.loading&&!n.progressiveRender)return;const S=se.value;if(S===P.value&&!s.value&&ne.value)return h.value=!0,void(n.loading&&(g.value=!1));const V=F.value;if(!V)return Ae(),s.value=null,P.value="",void(R.value="");const G=++re.value;W.value=!0,s.value=null,R.value="",(function(){const r=Re.value;w&&r&&C!==r&&(C&&w.markSettled(C),C=r,w.markPending(r))})();try{const r=yield(function(){return ye(this,null,function*(){if(x)return x;const l=yield ht();if(_||!l)return null;if(typeof l=="function"){const Q=new l;return Q&&typeof Q.compile=="function"?x=Q:typeof l.compile=="function"&&(x=l),x}return l?.D2&&typeof l.D2=="function"?(x=new l.D2,x):(typeof l.compile=="function"&&(x=l),x)})})();if(q(G))return;if(!r)return h.value=!1,g.value=!0,Ae(),s.value="D2 is not available.",void(R.value=S);if(typeof r.compile!="function"||typeof r.render!="function")throw new TypeError("D2 instance is missing compile/render methods.");h.value=!0;const y=yield r.compile(V);if(q(G))return;const le=(t=y?.diagram)!=null?t:y,B=(o=(e=y?.renderOptions)!=null?e:y?.options)!=null?o:{},Qe=(c=n.themeId)!=null?c:B.themeID,je=(H=n.darkThemeId)!=null?H:B.darkThemeID,J=he({},B);if(J.themeID=n.isDark&&je!=null?je:Qe,J.darkThemeID=null,J.darkThemeOverrides=null,n.isDark){const l=B.themeOverrides&&typeof B.themeOverrides=="object"?B.themeOverrides:null;J.themeOverrides=he(he({},Ve),l||{})}const Ke=yield r.render(le,J);if(q(G))return;const Oe=(function(l){return l?typeof l=="string"?l:typeof l.svg=="string"?l.svg:typeof l.data=="string"?l.data:"":""})(Ke);if(!Oe)throw new Error("D2 render returned empty output.");(function(l,Q){const Fe=(function(Ie){if(typeof window>"u"||typeof DOMParser>"u"||!Ie)return"";const Ze=Ie.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#"),ve=new DOMParser().parseFromString(Ze,"image/svg+xml").documentElement;if(!ve||ve.nodeName.toLowerCase()!=="svg")return"";const me=ve;return(function(He){const We=new Set(["script"]),et=[He,...Array.from(He.querySelectorAll("*"))];for(const L of et){if(We.has(L.tagName.toLowerCase())){L.remove();continue}const tt=Array.from(L.attributes);for(const z of tt){const E=z.name;if(/^on/i.test(E))L.removeAttribute(E);else{if(E==="style"&&z.value){const K=z.value;if($e.some(nt=>nt.test(K))){L.removeAttribute(E);continue}}if((E==="href"||E==="xlink:href")&&z.value){const K=Xe(z.value);if(!K){L.removeAttribute(E);continue}K!==z.value&&L.setAttribute(E,K)}}}}})(me),me.classList.add("markstream-d2-root-svg"),me.outerHTML})(l);j.value=Fe||"",ae.value=Fe?Q:""})(Oe,S),P.value=S,R.value="",n.loading&&(g.value=!1),s.value=null}catch(r){if(q(G))return;const y=r?.message?String(r.message):"D2 render failed.";n.loading||(s.value=y,R.value=S),P.value="",y.includes("@terrastruct/d2")&&(h.value=!1,g.value=!0)}finally{q(G)||(W.value=!1,I?(I=!1,X()):(function(){const r=C;w&&r&&(C="",fe(()=>{var y,le;if(!_){const B=(le=(y=ie.value)==null?void 0:y.offsetHeight)!=null?le:0;B>0&&w.reportHeight(r,B)}w.markSettled(r)}))})())}})}function X(t=!1){if(ce||!ke||_)return;if(W.value)return void(I=!0);const e=Math.max(120,Number(n.progressiveIntervalMs)||0),o=Date.now()-Ce;if(!t&&o<e)return I=!0,void(U==null&&(U=window.setTimeout(()=>{U=null,I&&(I=!1,X(!0))},Math.max(0,e-o))));ce=!0;const c=()=>{ce=!1,Ce=Date.now(),Ge()};typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(c):setTimeout(c,0)}function Je(){if(ne.value)try{const t=new Blob([j.value],{type:"image/svg+xml;charset=utf-8"}),e=URL.createObjectURL(t);if(typeof document<"u"){const o=document.createElement("a");o.href=e,o.download=`d2-diagram-${Date.now()}.svg`,document.body.appendChild(o),o.click(),document.body.removeChild(o)}URL.revokeObjectURL(e)}catch(t){console.error("Failed to export SVG:",t)}}function de(){const t=ee.value;if(!t)return;const e=t.getBoundingClientRect().height;e>0&&(ue.value=e)}return Z(()=>[n.node.code,n.loading,n.isDark,n.themeId,n.darkThemeId],()=>{X()},{immediate:!0}),Z(()=>n.loading,(t,e)=>{e&&!t&&X(!0)}),Z(()=>O.value,t=>{t&&X(!0)}),Z(()=>[oe.value,j.value,F.value],()=>{fe(()=>{de()})}),vt(()=>{xe.value=!0,fe(()=>{de()}),typeof ResizeObserver<"u"&&($=new ResizeObserver(()=>{de()}),ee.value&&$.observe(ee.value))}),mt(()=>{var t;_=!0,re.value+=1,I=!1,(function(){const e=C;w&&e&&(C="",w.markSettled(e))})(),P.value="",(t=Y.value)==null||t.destroy(),Y.value=null,U!=null&&(clearTimeout(U),U=null),$?.disconnect(),$=null}),(t,e)=>(v(),m("div",{ref_key:"viewportTarget",ref:ie,class:pe(["d2-block-container rounded-lg border overflow-hidden",{dark:n.isDark}]),"data-markstream-d2":"1","data-markstream-mode":oe.value?"fallback":"preview","data-markstream-pending":Be.value?"true":void 0},[n.showHeader?(v(),m("div",Bt,[e[16]||(e[16]=u("div",{class:"flex items-center gap-x-2"},[u("span",{class:"d2-label font-medium font-mono"},"D2")],-1)),u("div",Dt,[n.showModeToggle?(v(),m("div",Ct,[u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"":"is-active"]),onClick:e[0]||(e[0]=o=>Te("preview")),onMouseenter:e[1]||(e[1]=o=>M(o,f(a)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=o=>M(o,f(a)("common.preview")||"Preview")),onMouseleave:b,onBlur:b},N(f(a)("common.preview")||"Preview"),35),u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"is-active":""]),onClick:e[3]||(e[3]=o=>Te("source")),onMouseenter:e[4]||(e[4]=o=>M(o,f(a)("common.source")||"Source")),onFocus:e[5]||(e[5]=o=>M(o,f(a)("common.source")||"Source")),onMouseleave:b,onBlur:b},N(f(a)("common.source")||"Source"),35)])):T("",!0),n.showCopyButton?(v(),m("button",{key:1,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":A.value?f(a)("common.copied")||"Copied":f(a)("common.copy")||"Copy",onClick:ze,onMouseenter:e[6]||(e[6]=o=>Ee(o)),onFocus:e[7]||(e[7]=o=>Ee(o)),onMouseleave:b,onBlur:b},[A.value?(v(),m("svg",Tt,[...e[13]||(e[13]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(v(),m("svg",Et,[...e[12]||(e[12]=[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,Mt)):T("",!0),n.showExportButton&&ne.value?(v(),m("button",{key:2,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":f(a)("common.export")||"Export",onClick:Je,onMouseenter:e[8]||(e[8]=o=>M(o,f(a)("common.export")||"Export")),onFocus:e[9]||(e[9]=o=>M(o,f(a)("common.export")||"Export")),onMouseleave:b,onBlur:b},[...e[14]||(e[14]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v12m0-12l-4 4m4-4l4 4M4 14v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"})],-1)])],40,At)):T("",!0),n.showCollapseButton?(v(),m("button",{key:3,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-pressed":k.value,onClick:Ye,onMouseenter:e[10]||(e[10]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onFocus:e[11]||(e[11]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onMouseleave:b,onBlur:b},[(v(),m("svg",{style:ge({rotate:k.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[15]||(e[15]=[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,jt)):T("",!0)])])):T("",!0),ft(u("div",{ref_key:"bodyRef",ref:ee,class:"d2-block-body",style:ge(_e.value)},[n.loading&&!De.value?(v(),m("div",Ot,[u("pre",Ft,[u("code",null,N(F.value),1)]),s.value?(v(),m("p",It,N(s.value),1)):T("",!0)])):(v(),m("div",Ht,[oe.value?(v(),m("div",St,[u("pre",Lt,[u("code",null,N(F.value),1)]),s.value?(v(),m("p",Nt,N(s.value),1)):T("",!0)])):(v(),m("div",{key:1,class:"d2-render",style:ge(Ue.value)},[u("div",{class:"d2-svg",innerHTML:j.value},null,8,Pt),s.value?(v(),m("p",Rt,N(s.value),1)):T("",!0)],4))]))],4),[[pt,!k.value]])],10,xt))}}),[["__scopeId","data-v-3b434cf5"]]);we.install=p=>{p.component(we.__name,we)};export{we as default};
@@ -1,2 +1,2 @@
1
- import{_ as a,l as s,I as o,e as i}from"./mermaid.core-oS_owI3c.js";import{p as g}from"./wardley-L42UT6IY-CqiBaH6C.js";import"./index-DKIJmNQn.js";var p={parse:a(async r=>{const e=await g("info",r);s.debug(e)},"parse")},v={version:"11.15.0"},d=a(()=>v.version,"getVersion"),m={getVersion:d},c=a((r,e,n)=>{s.debug(`rendering info diagram
1
+ import{_ as a,l as s,I as o,e as i}from"./mermaid.core-B_k0q1Z5.js";import{p as g}from"./wardley-L42UT6IY-CBG17PJg.js";import"./index-Ia-ZUO2Z.js";var p={parse:a(async r=>{const e=await g("info",r);s.debug(e)},"parse")},v={version:"11.15.0"},d=a(()=>v.version,"getVersion"),m={getVersion:d},c=a((r,e,n)=>{s.debug(`rendering info diagram
2
2
  `+r);const t=o(e);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw"),l={draw:c},b={parser:p,db:m,renderer:l};export{b as diagram};
@@ -1,4 +1,4 @@
1
- import{_ as l,c as lt,N as ct,I as ut,al as dt,z as yt,k as ft,p as et,a as pt,b as gt,g as kt,s as mt,q as wt,e as _t}from"./mermaid.core-oS_owI3c.js";import"./index-DKIJmNQn.js";var Q=(function(){var t=l(function(T,e,s,i){for(s=s||{},i=T.length;i--;s[T[i]]=e);return s},"o"),d=[1,4],n=[1,14],a=[1,12],o=[1,13],y=[6,7,8],p=[1,20],u=[1,18],m=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],D={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:l(function(e,s,i,h,f,r,v){var w=r.length-1;switch(f){case 6:case 7:return h;case 15:h.addNode(r[w-1].length,r[w].trim());break;case 16:h.addNode(0,r[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:d},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:d},{6:n,7:[1,10],9:9,12:11,13:a,14:o},t(y,[2,3]),{1:[2,2]},t(y,[2,4]),t(y,[2,5]),{1:[2,6],6:n,12:15,13:a,14:o},{6:n,9:16,12:11,13:a,14:o},{6:p,7:u,10:17,11:m},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:p,7:u,10:22,11:m},{1:[2,7],6:n,12:15,13:a,14:o},t(k,[2,14],{7:g,11:_}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(c,[2,15]),t(k,[2,13],{7:g,11:_}),t(x,[2,11]),t(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(e,s){if(s.recoverable)this.trace(e);else{var i=new Error(e);throw i.hash=s,i}},"parseError"),parse:l(function(e){var s=this,i=[0],h=[],f=[null],r=[],v=this.table,w="",I=0,$=0,L=2,A=1,C=r.slice.call(arguments,1),b=Object.create(this.lexer),S={yy:{}};for(var N in this.yy)Object.prototype.hasOwnProperty.call(this.yy,N)&&(S.yy[N]=this.yy[N]);b.setInput(e,S.yy),S.yy.lexer=b,S.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var R=b.yylloc;r.push(R);var H=b.options&&b.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(P){i.length=i.length-2*P,f.length=f.length-P,r.length=r.length-P}l(X,"popStack");function J(){var P;return P=h.pop()||b.lex()||A,typeof P!="number"&&(P instanceof Array&&(h=P,P=h.pop()),P=s.symbols_[P]||P),P}l(J,"lex");for(var M,W,B,Y,z={},G,V,tt,U;;){if(W=i[i.length-1],this.defaultActions[W]?B=this.defaultActions[W]:((M===null||typeof M>"u")&&(M=J()),B=v[W]&&v[W][M]),typeof B>"u"||!B.length||!B[0]){var q="";U=[];for(G in v[W])this.terminals_[G]&&G>L&&U.push("'"+this.terminals_[G]+"'");b.showPosition?q="Parse error on line "+(I+1)+`:
1
+ import{_ as l,c as lt,N as ct,I as ut,al as dt,z as yt,k as ft,p as et,a as pt,b as gt,g as kt,s as mt,q as wt,e as _t}from"./mermaid.core-B_k0q1Z5.js";import"./index-Ia-ZUO2Z.js";var Q=(function(){var t=l(function(T,e,s,i){for(s=s||{},i=T.length;i--;s[T[i]]=e);return s},"o"),d=[1,4],n=[1,14],a=[1,12],o=[1,13],y=[6,7,8],p=[1,20],u=[1,18],m=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],D={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:l(function(e,s,i,h,f,r,v){var w=r.length-1;switch(f){case 6:case 7:return h;case 15:h.addNode(r[w-1].length,r[w].trim());break;case 16:h.addNode(0,r[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:d},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:d},{6:n,7:[1,10],9:9,12:11,13:a,14:o},t(y,[2,3]),{1:[2,2]},t(y,[2,4]),t(y,[2,5]),{1:[2,6],6:n,12:15,13:a,14:o},{6:n,9:16,12:11,13:a,14:o},{6:p,7:u,10:17,11:m},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:p,7:u,10:22,11:m},{1:[2,7],6:n,12:15,13:a,14:o},t(k,[2,14],{7:g,11:_}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(c,[2,15]),t(k,[2,13],{7:g,11:_}),t(x,[2,11]),t(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(e,s){if(s.recoverable)this.trace(e);else{var i=new Error(e);throw i.hash=s,i}},"parseError"),parse:l(function(e){var s=this,i=[0],h=[],f=[null],r=[],v=this.table,w="",I=0,$=0,L=2,A=1,C=r.slice.call(arguments,1),b=Object.create(this.lexer),S={yy:{}};for(var N in this.yy)Object.prototype.hasOwnProperty.call(this.yy,N)&&(S.yy[N]=this.yy[N]);b.setInput(e,S.yy),S.yy.lexer=b,S.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var R=b.yylloc;r.push(R);var H=b.options&&b.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(P){i.length=i.length-2*P,f.length=f.length-P,r.length=r.length-P}l(X,"popStack");function J(){var P;return P=h.pop()||b.lex()||A,typeof P!="number"&&(P instanceof Array&&(h=P,P=h.pop()),P=s.symbols_[P]||P),P}l(J,"lex");for(var M,W,B,Y,z={},G,V,tt,U;;){if(W=i[i.length-1],this.defaultActions[W]?B=this.defaultActions[W]:((M===null||typeof M>"u")&&(M=J()),B=v[W]&&v[W][M]),typeof B>"u"||!B.length||!B[0]){var q="";U=[];for(G in v[W])this.terminals_[G]&&G>L&&U.push("'"+this.terminals_[G]+"'");b.showPosition?q="Parse error on line "+(I+1)+`:
2
2
  `+b.showPosition()+`
3
3
  Expecting `+U.join(", ")+", got '"+(this.terminals_[M]||M)+"'":q="Parse error on line "+(I+1)+": Unexpected "+(M==A?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(q,{text:b.match,token:this.terminals_[M]||M,line:b.yylineno,loc:R,expected:U})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+M);switch(B[0]){case 1:i.push(M),f.push(b.yytext),r.push(b.yylloc),i.push(B[1]),M=null,$=b.yyleng,w=b.yytext,I=b.yylineno,R=b.yylloc;break;case 2:if(V=this.productions_[B[1]][1],z.$=f[f.length-V],z._$={first_line:r[r.length-(V||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(V||1)].first_column,last_column:r[r.length-1].last_column},H&&(z._$.range=[r[r.length-(V||1)].range[0],r[r.length-1].range[1]]),Y=this.performAction.apply(z,[w,$,I,S.yy,B[1],f,r].concat(C)),typeof Y<"u")return Y;V&&(i=i.slice(0,-1*V*2),f=f.slice(0,-1*V),r=r.slice(0,-1*V)),i.push(this.productions_[B[1]][0]),f.push(z.$),r.push(z._$),tt=v[i[i.length-2]][i[i.length-1]],i.push(tt);break;case 3:return!0}}return!0},"parse")},O=(function(){var T={EOF:1,parseError:l(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),setInput:l(function(e,s){return this.yy=s||this.yy||{},this._input=e,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:l(function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var s=e.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:l(function(e){var s=e.length,i=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var h=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),i.length-1&&(this.yylineno-=i.length-1);var f=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:i?(i.length===h.length?this.yylloc.first_column:0)+h[h.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(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:l(function(e){this.unput(this.match.slice(e))},"less"),pastInput:l(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var e=this.pastInput(),s=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{g as gt}from"./chunk-FMBD7UC4-wkNtOdUv.js";import{a as mt,g as lt,h as xt,d as kt}from"./chunk-ND2GUHAM-Byh5s8MO.js";import{g as _t,s as vt,a as bt,b as wt,q as Tt,p as St,_ as s,c as R,d as X,e as $t,z as Mt}from"./mermaid.core-oS_owI3c.js";import{d as it}from"./arc-CWKkAytd.js";import"./index-DKIJmNQn.js";var U=(function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(r,n,l,y,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,k="",C=0,Q=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=tt()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var H="";z=[];for(N in v[A])this.terminals_[N]&&N>yt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?H="Parse error on line "+(C+1)+`:
1
+ import{g as gt}from"./chunk-FMBD7UC4-DDzZo5dG.js";import{a as mt,g as lt,h as xt,d as kt}from"./chunk-ND2GUHAM-BuOldrpx.js";import{g as _t,s as vt,a as bt,b as wt,q as Tt,p as St,_ as s,c as R,d as X,e as $t,z as Mt}from"./mermaid.core-B_k0q1Z5.js";import{d as it}from"./arc-CJvKR1oC.js";import"./index-Ia-ZUO2Z.js";var U=(function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(r,n,l,y,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,k="",C=0,Q=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=tt()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var H="";z=[];for(N in v[A])this.terminals_[N]&&N>yt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?H="Parse error on line "+(C+1)+`:
2
2
  `+_.showPosition()+`
3
3
  Expecting `+z.join(", ")+", got '"+(this.terminals_[b]||b)+"'":H="Parse error on line "+(C+1)+": Unexpected "+(b==D?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(H,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:Y,expected:z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+b);switch(T[0]){case 1:l.push(b),d.push(_.yytext),c.push(_.yylloc),l.push(T[1]),b=null,Q=_.yyleng,k=_.yytext,C=_.yylineno,Y=_.yylloc;break;case 2:if(M=this.productions_[T[1]][1],F.$=d[d.length-M],F._$={first_line:c[c.length-(M||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(M||1)].first_column,last_column:c[c.length-1].last_column},ft&&(F._$.range=[c[c.length-(M||1)].range[0],c[c.length-1].range[1]]),q=this.performAction.apply(F,[k,Q,C,I.yy,T[1],d,c].concat(dt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),d=d.slice(0,-1*M),c=c.slice(0,-1*M)),l.push(this.productions_[T[1]][0]),d.push(F.$),c.push(F._$),et=v[l[l.length-2]][l[l.length-1]],l.push(et);break;case 3:return!0}}return!0},"parse")},m=(function(){var h={EOF:1,parseError:s(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:s(function(r,n){return this.yy=n||this.yy||{},this._input=r,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:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var n=r.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var n=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var y=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),l.length-1&&(this.yylineno-=l.length-1);var d=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:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{_ as o,l as te,c as H,I as fe,ah as ye,ai as be,aj as me,af as _e,G as K,i as G,t as ke,J as Ee,ac as Se,ad as ce,ae as le}from"./mermaid.core-oS_owI3c.js";import{g as Ne}from"./chunk-FMBD7UC4-wkNtOdUv.js";import"./index-DKIJmNQn.js";var $=(function(){var e=o(function(O,i,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=i);return n},"o"),h=[1,4],p=[1,13],s=[1,12],d=[1,15],_=[1,16],m=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],k=[6,7,11],F=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],f=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],M=[1,38],T={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(i,n,r,a,u,t,U){var c=t.length-1;switch(u){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:p,7:[1,10],9:9,12:11,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},{6:p,9:22,12:11,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},{6:I,7:g,10:23,11:w},e(k,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:m,23:l}),e(k,[2,19]),e(k,[2,21],{15:30,24:F}),e(k,[2,22]),e(k,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},e(V,[2,14],{7:f,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(k,[2,16],{15:37,24:F}),e(k,[2,17]),e(k,[2,18]),e(k,[2,20],{24:M}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:f,11:A}),e(L,[2,11]),e(L,[2,12]),e(k,[2,15],{24:M}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(i,n){if(n.recoverable)this.trace(i);else{var r=new Error(i);throw r.hash=n,r}},"parseError"),parse:o(function(i){var n=this,r=[0],a=[],u=[null],t=[],U=this.table,c="",W=0,se=0,ue=2,re=1,ge=t.slice.call(arguments,1),b=Object.create(this.lexer),R={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(R.yy[J]=this.yy[J]);b.setInput(i,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;t.push(q);var de=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,u.length=u.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var E,P,x,Q,j={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=ae()),x=U[P]&&U[P][E]),typeof x>"u"||!x.length||!x[0]){var Z="";X=[];for(z in U[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");b.showPosition?Z="Parse error on line "+(W+1)+`:
1
+ import{_ as o,l as te,c as H,I as fe,ah as ye,ai as be,aj as me,af as _e,G as K,i as G,t as ke,J as Ee,ac as Se,ad as ce,ae as le}from"./mermaid.core-B_k0q1Z5.js";import{g as Ne}from"./chunk-FMBD7UC4-DDzZo5dG.js";import"./index-Ia-ZUO2Z.js";var $=(function(){var e=o(function(O,i,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=i);return n},"o"),h=[1,4],p=[1,13],s=[1,12],d=[1,15],_=[1,16],m=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],k=[6,7,11],F=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],f=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],M=[1,38],T={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(i,n,r,a,u,t,U){var c=t.length-1;switch(u){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:p,7:[1,10],9:9,12:11,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},{6:p,9:22,12:11,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},{6:I,7:g,10:23,11:w},e(k,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:m,23:l}),e(k,[2,19]),e(k,[2,21],{15:30,24:F}),e(k,[2,22]),e(k,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},e(V,[2,14],{7:f,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(k,[2,16],{15:37,24:F}),e(k,[2,17]),e(k,[2,18]),e(k,[2,20],{24:M}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:f,11:A}),e(L,[2,11]),e(L,[2,12]),e(k,[2,15],{24:M}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(i,n){if(n.recoverable)this.trace(i);else{var r=new Error(i);throw r.hash=n,r}},"parseError"),parse:o(function(i){var n=this,r=[0],a=[],u=[null],t=[],U=this.table,c="",W=0,se=0,ue=2,re=1,ge=t.slice.call(arguments,1),b=Object.create(this.lexer),R={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(R.yy[J]=this.yy[J]);b.setInput(i,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;t.push(q);var de=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,u.length=u.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var E,P,x,Q,j={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=ae()),x=U[P]&&U[P][E]),typeof x>"u"||!x.length||!x[0]){var Z="";X=[];for(z in U[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");b.showPosition?Z="Parse error on line "+(W+1)+`:
2
2
  `+b.showPosition()+`
3
3
  Expecting `+X.join(", ")+", got '"+(this.terminals_[E]||E)+"'":Z="Parse error on line "+(W+1)+": Unexpected "+(E==re?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(Z,{text:b.match,token:this.terminals_[E]||E,line:b.yylineno,loc:q,expected:X})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+E);switch(x[0]){case 1:r.push(E),u.push(b.yytext),t.push(b.yylloc),r.push(x[1]),E=null,se=b.yyleng,c=b.yytext,W=b.yylineno,q=b.yylloc;break;case 2:if(C=this.productions_[x[1]][1],j.$=u[u.length-C],j._$={first_line:t[t.length-(C||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(C||1)].first_column,last_column:t[t.length-1].last_column},de&&(j._$.range=[t[t.length-(C||1)].range[0],t[t.length-1].range[1]]),Q=this.performAction.apply(j,[c,se,W,R.yy,x[1],u,t].concat(ge)),typeof Q<"u")return Q;C&&(r=r.slice(0,-1*C*2),u=u.slice(0,-1*C),t=t.slice(0,-1*C)),r.push(this.productions_[x[1]][0]),u.push(j.$),t.push(j._$),oe=U[r[r.length-2]][r[r.length-1]],r.push(oe);break;case 3:return!0}}return!0},"parse")},Y=(function(){var O={EOF:1,parseError:o(function(n,r){if(this.yy.parser)this.yy.parser.parseError(n,r);else throw new Error(n)},"parseError"),setInput:o(function(i,n){return this.yy=n||this.yy||{},this._input=i,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:o(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:o(function(i){var n=i.length,r=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var a=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),r.length-1&&(this.yylineno-=r.length-1);var u=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:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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:o(function(i){this.unput(this.match.slice(i))},"less"),pastInput:o(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{b8 as j,b9 as p,ba as w,bb as k,bc as q}from"./mermaid.core-oS_owI3c.js";import{i as D}from"./init-Gi6I4Gst.js";import{e as g,f as F,a as z,b as B}from"./defaultLocale-DX6XiGOO.js";function M(n,r){return n==null||r==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function I(n,r){return n==null||r==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===I?n:P,t=n,e=n);function u(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<0?i=l+1:h=l}while(i<h)}return i}function f(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<=0?i=l+1:h=l}while(i<h)}return i}function a(o,c,i=0,h=o.length){const l=u(o,c,i,h-1);return l>i&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function P(){return 0}function V(n){return n===null?NaN:+n}const $=R(M),x=$.right;R(V).center;const O=Math.sqrt(50),T=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=O?10:f>=T?5:f>=C?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/i<n&&++o,c/i>r&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*i<n&&++o,c*i>r&&--c),c<o&&.5<=t&&t<2?v(n,r,t*2):[o,c,i]}function E(n,r,t){if(r=+r,n=+n,t=+t,!(t>0))return[];if(n===r)return[n];const e=r<n,[u,f,a]=e?v(r,n,t):v(n,r,t);if(!(f>=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;i<o;++i)c[i]=(f-i)/-a;else for(let i=0;i<o;++i)c[i]=(f-i)*a;else if(a<0)for(let i=0;i<o;++i)c[i]=(u+i)/-a;else for(let i=0;i<o;++i)c[i]=(u+i)*a;return c}function y(n,r,t){return r=+r,n=+n,t=+t,v(n,r,t)[2]}function G(n,r,t){r=+r,n=+n,t=+t;const e=r<n,u=e?y(r,n,t):y(n,r,t);return(e?-1:1)*(u<0?1/-u:u)}function H(n,r){r||(r=[]);var t=n?Math.min(r.length,n.length):0,e=r.slice(),u;return function(f){for(u=0;u<t;++u)e[u]=n[u]*(1-f)+r[u]*f;return e}}function J(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function K(n,r){var t=r?r.length:0,e=n?Math.min(t,n.length):0,u=new Array(e),f=new Array(t),a;for(a=0;a<e;++a)u[a]=d(n[a],r[a]);for(;a<t;++a)f[a]=r[a];return function(o){for(a=0;a<e;++a)f[a]=u[a](o);return f}}function L(n,r){var t=new Date;return n=+n,r=+r,function(e){return t.setTime(n*(1-e)+r*e),t}}function Q(n,r){var t={},e={},u;(n===null||typeof n!="object")&&(n={}),(r===null||typeof r!="object")&&(r={});for(u in r)u in n?t[u]=d(n[u],r[u]):e[u]=r[u];return function(f){for(u in t)e[u]=t[u](f);return e}}function d(n,r){var t=typeof r,e;return r==null||t==="boolean"?j(r):(t==="number"?p:t==="string"?(e=w(r))?(r=e,k):q:r instanceof w?k:r instanceof Date?L:J(r)?H:Array.isArray(r)?K:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Q:p)(n,r)}function U(n,r){return n=+n,r=+r,function(t){return Math.round(n*(1-t)+r*t)}}function W(n){return Math.max(0,-g(Math.abs(n)))}function X(n,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(g(r)/3)))*3-g(Math.abs(n)))}function Y(n,r){return n=Math.abs(n),r=Math.abs(r)-n,Math.max(0,g(r)-g(n))+1}function Z(n){return function(){return n}}function _(n){return+n}var A=[0,1];function m(n){return n}function N(n,r){return(r-=n=+n)?function(t){return(t-n)/r}:Z(isNaN(r)?NaN:.5)}function b(n,r){var t;return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u<e?(e=N(u,e),f=t(a,f)):(e=N(e,u),f=t(f,a)),function(o){return f(e(o))}}function rn(n,r,t){var e=Math.min(n.length,r.length)-1,u=new Array(e),f=new Array(e),a=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++a<e;)u[a]=N(n[a],n[a+1]),f[a]=t(r[a],r[a+1]);return function(o){var c=x(n,o,1,e)-1;return f[c](u[c](o))}}function en(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function tn(){var n=A,r=A,t=d,e,u,f,a=m,o,c,i;function h(){var s=Math.min(n.length,r.length);return a!==m&&(a=b(n[0],n[s-1])),o=s>2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,S){return e=s,u=S,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=G(n,r,t),f;switch(e=F(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),z(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return B(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return E(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o<a&&(i=a,a=o,o=i,i=u,u=f,f=i);h-- >0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},D.apply(n,arguments),on(n)}export{en as a,R as b,un as c,fn as l,G as t};
1
+ import{b8 as j,b9 as p,ba as w,bb as k,bc as q}from"./mermaid.core-B_k0q1Z5.js";import{i as D}from"./init-Gi6I4Gst.js";import{e as g,f as F,a as z,b as B}from"./defaultLocale-DX6XiGOO.js";function M(n,r){return n==null||r==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function I(n,r){return n==null||r==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===I?n:P,t=n,e=n);function u(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<0?i=l+1:h=l}while(i<h)}return i}function f(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<=0?i=l+1:h=l}while(i<h)}return i}function a(o,c,i=0,h=o.length){const l=u(o,c,i,h-1);return l>i&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function P(){return 0}function V(n){return n===null?NaN:+n}const $=R(M),x=$.right;R(V).center;const O=Math.sqrt(50),T=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=O?10:f>=T?5:f>=C?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/i<n&&++o,c/i>r&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*i<n&&++o,c*i>r&&--c),c<o&&.5<=t&&t<2?v(n,r,t*2):[o,c,i]}function E(n,r,t){if(r=+r,n=+n,t=+t,!(t>0))return[];if(n===r)return[n];const e=r<n,[u,f,a]=e?v(r,n,t):v(n,r,t);if(!(f>=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;i<o;++i)c[i]=(f-i)/-a;else for(let i=0;i<o;++i)c[i]=(f-i)*a;else if(a<0)for(let i=0;i<o;++i)c[i]=(u+i)/-a;else for(let i=0;i<o;++i)c[i]=(u+i)*a;return c}function y(n,r,t){return r=+r,n=+n,t=+t,v(n,r,t)[2]}function G(n,r,t){r=+r,n=+n,t=+t;const e=r<n,u=e?y(r,n,t):y(n,r,t);return(e?-1:1)*(u<0?1/-u:u)}function H(n,r){r||(r=[]);var t=n?Math.min(r.length,n.length):0,e=r.slice(),u;return function(f){for(u=0;u<t;++u)e[u]=n[u]*(1-f)+r[u]*f;return e}}function J(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function K(n,r){var t=r?r.length:0,e=n?Math.min(t,n.length):0,u=new Array(e),f=new Array(t),a;for(a=0;a<e;++a)u[a]=d(n[a],r[a]);for(;a<t;++a)f[a]=r[a];return function(o){for(a=0;a<e;++a)f[a]=u[a](o);return f}}function L(n,r){var t=new Date;return n=+n,r=+r,function(e){return t.setTime(n*(1-e)+r*e),t}}function Q(n,r){var t={},e={},u;(n===null||typeof n!="object")&&(n={}),(r===null||typeof r!="object")&&(r={});for(u in r)u in n?t[u]=d(n[u],r[u]):e[u]=r[u];return function(f){for(u in t)e[u]=t[u](f);return e}}function d(n,r){var t=typeof r,e;return r==null||t==="boolean"?j(r):(t==="number"?p:t==="string"?(e=w(r))?(r=e,k):q:r instanceof w?k:r instanceof Date?L:J(r)?H:Array.isArray(r)?K:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Q:p)(n,r)}function U(n,r){return n=+n,r=+r,function(t){return Math.round(n*(1-t)+r*t)}}function W(n){return Math.max(0,-g(Math.abs(n)))}function X(n,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(g(r)/3)))*3-g(Math.abs(n)))}function Y(n,r){return n=Math.abs(n),r=Math.abs(r)-n,Math.max(0,g(r)-g(n))+1}function Z(n){return function(){return n}}function _(n){return+n}var A=[0,1];function m(n){return n}function N(n,r){return(r-=n=+n)?function(t){return(t-n)/r}:Z(isNaN(r)?NaN:.5)}function b(n,r){var t;return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u<e?(e=N(u,e),f=t(a,f)):(e=N(e,u),f=t(f,a)),function(o){return f(e(o))}}function rn(n,r,t){var e=Math.min(n.length,r.length)-1,u=new Array(e),f=new Array(e),a=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++a<e;)u[a]=N(n[a],n[a+1]),f[a]=t(r[a],r[a+1]);return function(o){var c=x(n,o,1,e)-1;return f[c](u[c](o))}}function en(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function tn(){var n=A,r=A,t=d,e,u,f,a=m,o,c,i;function h(){var s=Math.min(n.length,r.length);return a!==m&&(a=b(n[0],n[s-1])),o=s>2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,S){return e=s,u=S,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=G(n,r,t),f;switch(e=F(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),z(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return B(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return E(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o<a&&(i=a,a=o,o=i,i=u,u=f,f=i);h-- >0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},D.apply(n,arguments),on(n)}export{en as a,R as b,un as c,fn as l,G as t};