markstream-vue2 0.0.19-beta.2 → 0.0.19-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.create;var e,t=Object.defineProperty,n=Object.defineProperties,o=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),r=(Object.getOwnPropertyNames,Object.getOwnPropertySymbols),l=(Object.getPrototypeOf,Object.prototype.hasOwnProperty),i=Object.prototype.propertyIsEnumerable,a=(e,n,o)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o,s=(e,t)=>{for(var n in t||(t={}))l.call(t,n)&&a(e,n,t[n]);if(r)for(var n of r(t))i.call(t,n)&&a(e,n,t[n]);return e},u=(e,t)=>n(e,o(t)),c=(e,t)=>{var n={};for(var o in e)l.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&r)for(var o of r(e))t.indexOf(o)<0&&i.call(e,o)&&(n[o]=e[o]);return n},d=(e,t,n)=>new Promise((o,r)=>{var l=e=>{try{a(n.next(e))}catch(t){r(t)}},i=e=>{try{a(n.throw(e))}catch(t){r(t)}},a=e=>e.done?o(e.value):Promise.resolve(e.value).then(l,i);a((n=n.apply(e,t)).next())});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("stream-markdown-parser"),m=require("vue-demi");var f="undefined"!=typeof document?document.currentScript:null;function h(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const v=h(m);function g(e,t,n,o,r,l,i,a){var s,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),o&&(u.functional=!0),l&&(u._scopeId="data-v-"+l),i?(s=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},u._ssrRegister=s):r&&(s=a?function(){r.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:r),s)if(u.functional){u._injectStyles=s;var c=u.render;u.render=function(e,t){return s.call(t),c(e,t)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,s):[s]}return{exports:e,options:u}}const w=g(m.defineComponent({__name:"BlockquoteNode",props:{node:null,indexKey:null,typewriter:{type:Boolean},customId:null},setup:e=>({__sfc:!0,props:e,NodeRenderer:qe})}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("blockquote",{staticClass:"blockquote",attrs:{dir:"auto",cite:e.node.cite}},[t(n.NodeRenderer,{attrs:{"index-key":`blockquote-${n.props.indexKey}`,nodes:n.props.node.children||[],"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1)},[],!1,null,"1ba811a8",null,null).exports,y=g(m.defineComponent({__name:"CheckboxNode",props:{node:null},setup:e=>({__sfc:!0})}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("span",{staticClass:"checkbox-node"},[t("input",{staticClass:"checkbox-input",attrs:{type:"checkbox",disabled:""},domProps:{checked:e.node.checked}})])},[],!1,null,"8dc6c46f",null,null).exports,x=g(m.defineComponent({__name:"DefinitionListNode",props:{node:null,indexKey:null,typewriter:{type:Boolean},customId:null},emits:["copy"],setup:e=>({__sfc:!0,props:e,NodeRenderer:qe})}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("dl",{staticClass:"definition-list"},[e._l(n.props.node.items,function(o,r){return[t("dt",{key:`definition-term-${n.props.indexKey}-${r}`,staticClass:"definition-term"},[t(n.NodeRenderer,{attrs:{"index-key":`definition-term-${n.props.indexKey}-${r}`,nodes:o.term,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1),t("dd",{key:`definition-desc-${n.props.indexKey}-${r}`,staticClass:"definition-desc"},[t(n.NodeRenderer,{attrs:{"index-key":`definition-desc-${n.props.indexKey}-${r}`,nodes:o.definition,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1)]})],2)},[],!1,null,"8c5b98b7",null,null).exports,M=g(m.defineComponent({__name:"EmojiNode",props:{node:null},setup:e=>({__sfc:!0})}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("span",{staticClass:"emoji-node"},[e._v(e._s(e.node.name))])},[],!1,null,"de55dc97",null,null).exports,k="__global__",b="__MARKSTREAM_VUE2_CUSTOM_COMPONENTS_STORE__",C=(()=>{const e=globalThis;if(e[b])return e[b];const t={scopedCustomComponents:{},revision:m.shallowRef(0)};return e[b]=t,t})(),T=C.revision;function N(e){const t=C.scopedCustomComponents[k]||{};if(!e)return t;const n=C.scopedCustomComponents[e]||{};return t&&0!==Object.keys(t).length?n&&0!==Object.keys(n).length?s(s({},t),n):t:n}const D=g(m.defineComponent({__name:"FootnoteReferenceNode",props:{node:null},setup(e){const t=e,n=`#footnote-${t.node.id}`;return{__sfc:!0,props:t,href:n,handleScroll:function(){if("undefined"==typeof document)return;const e=document.querySelector(n);e?e.scrollIntoView({behavior:"smooth"}):console.warn(`Element with href: ${n} not found`)}}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("sup",{staticClass:"footnote-reference",attrs:{id:`fnref-${e.node.id}`},on:{click:n.handleScroll}},[t("span",{staticClass:"footnote-link cursor-pointer",attrs:{href:n.href,title:`查看脚注 ${e.node.id}`}},[e._v("["+e._s(e.node.id)+"]")])])},[],!1,null,"01af0fee",null,null).exports,j=new Set(["onclick","onerror","onload","onmouseover","onmouseout","onmousedown","onmouseup","onkeydown","onkeyup","onfocus","onblur","onsubmit","onreset","onchange","onselect","ondblclick","ontouchstart","ontouchend","ontouchmove","ontouchcancel","onwheel","onscroll","oncopy","oncut","onpaste","oninput","oninvalid","onreset","onsearch","onsubmit"]),I=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),_=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]),E=/<([a-z][a-z0-9-]*)\b[^>]*>/gi,L=new Set(["script"]),S=new Set(["href","src","srcset","xlink:href","formaction"]),B=(()=>{var e;try{return Boolean(null==(e={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:e.DEV)}catch(t){}return!1})();function A(e){B&&console.warn(e)}function O(e){const t=function(e){let t="";for(const n of e){const e=n.charCodeAt(0);e<=31||127===e||/\s/u.test(n)||(t+=n)}return t}(e).toLowerCase();return!(!t.startsWith("javascript:")&&!t.startsWith("vbscript:"))||!!t.startsWith("data:")&&!(t.startsWith("data:image/")||t.startsWith("data:video/")||t.startsWith("data:audio/"))}function z(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function R(e,t){const n=e.toLowerCase();return!_.has(n)&&(z(t,n)||z(t,e))}function P(e,t){const n=t.toLowerCase();if(["checked","disabled","readonly","required","autofocus","multiple","hidden"].includes(n))return"true"===e||""===e||e===t;if(["value","min","max","step","width","height","size","maxlength"].includes(n)){const t=Number(e);if(""!==e&&!Number.isNaN(t))return t}return e}function H(e){return e.trim().length>0}function U(e,t,n,o){if(L.has(e.toLowerCase()))return null;const r=function(e){const t={};for(const[n,o]of Object.entries(e)){const e=n.toLowerCase();j.has(e)||S.has(e)&&o&&O(o)||(t[n]=o)}return t}(t);if(R(e,o)){const t=o[e]||o[e.toLowerCase()],l=function(e){const t={};for(const[n,o]of Object.entries(e))t[n]=P(o,n);return t}(r);return m.h(t,l,n.length>0?n:void 0)}{const t=r,{innerHTML:o}=t,l=c(t,["innerHTML"]);return m.h(e,l,n.length>0?n:void 0)}}function $(e,t){if(!e||!e.includes("<"))return!1;if(!t||0===Object.keys(t).length)return!1;let n;for(E.lastIndex=0;null!==(n=E.exec(e));)if(R(n[1],t))return!0;return!1}function F(e,t){if(!e)return[];try{const n=function(e,t){const n=[],o=[];for(const r of e)if("text"===r.type)(n.length>0?n[n.length-1].children:o).push(r.content);else if("self_closing"===r.type){const e=U(r.tagName,r.attrs||{},[],t),l=n.length>0?n[n.length-1].children:o;null!=e&&l.push(e)}else if("tag_open"===r.type)n.push({tagName:r.tagName,children:[],attrs:r.attrs});else if("tag_close"===r.type){const e=r.tagName.toLowerCase();let l=-1;for(let t=n.length-1;t>=0;t--)if(n[t].tagName.toLowerCase()===e){l=t;break}if(-1!==l)for(;n.length>l;){const r=n.pop(),i=U(r.tagName,r.attrs||{},r.children,t);n.length>0?null!=i&&n[n.length-1].children.push(i):null!=i&&o.push(i),r.tagName.toLowerCase()!==e&&n.length>l&&A(`Auto-closing unclosed tag: <${r.tagName}>`)}else A(`Ignoring closing tag with no matching opening tag: </${r.tagName}>`)}for(;n.length>0;){const e=n.pop(),r=U(e.tagName,e.attrs||{},e.children,t);null!=r&&o.push(r),A(`Auto-closing unclosed tag: <${e.tagName}>`)}return o}(function(e){var t,n,o;const r=[];let l=0;for(;l<e.length;){if(e.startsWith("\x3c!--",l)){const t=e.indexOf("--\x3e",l);if(-1!==t){l=t+3;continue}break}const i=e.indexOf("<",l);if(-1===i){if(l<e.length){const t=e.slice(l);H(t)&&r.push({type:"text",content:t})}break}if(i>l){const t=e.slice(l,i);H(t)&&r.push({type:"text",content:t})}if(e.startsWith("![CDATA[",i+1)){const t=e.indexOf("]]>",i);if(-1!==t){r.push({type:"text",content:e.slice(i,t+3)}),l=t+3;continue}break}if(e.startsWith("!",i+1)){const t=e.indexOf(">",i);if(-1!==t){l=t+1;continue}break}const a=e.indexOf(">",i);if(-1===a)break;const s=e.slice(i+1,a).trim(),u=s.startsWith("/"),c=s.endsWith("/");if(u){const e=s.slice(1).trim();r.push({type:"tag_close",tagName:e})}else{const e=s.indexOf(" ");let l,i="";-1===e?l=c?s.slice(0,-1).trim():s.trim():(l=s.slice(0,e).trim(),i=s.slice(e+1));const a={};if(i){const e=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let r;for(;null!==(r=e.exec(i));){const e=r[1],l=null!=(o=null!=(n=null!=(t=r[2])?t:r[3])?n:r[4])?o:"";e&&!e.endsWith("/")&&(a[e]=l)}}r.push({type:c||I.has(l.toLowerCase())?"self_closing":"tag_open",tagName:l,attrs:a})}l=a+1}return r}(e),t);return n}catch(o){return n=o,B&&console.error("Failed to parse HTML to VNodes:",n),null}var n}const Y=g(m.defineComponent({__name:"HtmlInlineNode",props:{node:null,customId:null},setup(e){const t=e,n=m.computed(()=>N(t.customId)),o=m.defineComponent({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),r=m.computed(()=>{const e=t.node.content;if(!e)return{mode:"html",content:""};if(!$(e,n.value))return{mode:"html",content:e};const o=F(e,n.value);return null===o?{mode:"html",content:e}:{mode:"dynamic",nodes:o}}),l=m.ref(null),i="undefined"!=typeof window,a=m.ref({mode:"",content:"",el:null});let s=null;function u(){return!s&&i&&(s=document.createElement("template")),s}function c(e,t){if(!i||!l.value)return;const n=l.value,o=a.value;if(o.el!==n||o.mode!==e||o.content!==t){if("text"===e)n.textContent=t;else{const e=u();if(e){e.innerHTML=t;const o=e.content.cloneNode(!0);"function"==typeof n.replaceChildren?n.replaceChildren(o):(n.innerHTML="",n.appendChild(o))}else n.innerHTML=t}a.value={mode:e,content:t,el:n}}}function d(){c("html",t.node.content)}function p(){c("text",t.node.content)}return m.onMounted(()=>{"html"===r.value.mode&&(t.node.loading&&!t.node.autoClosed?p():d())}),m.watch(()=>[t.node.content,t.node.loading,t.node.autoClosed],()=>{"html"===r.value.mode&&(t.node.loading&&!t.node.autoClosed?p():d())}),m.onBeforeUnmount(()=>{l.value&&(l.value.innerHTML="",a.value={mode:"",content:"",el:null})}),{__sfc:!0,props:t,customComponents:n,DynamicRenderer:o,renderMode:r,containerRef:l,isClient:i,lastDomRender:a,templateEl:s,getTemplateEl:u,commitDomRender:c,renderHtmlContent:d,renderLoadingContent:p}}}),function(){var e=this._self._c,t=this._self._setupProxy;return"dynamic"===t.renderMode.mode?e("span",{staticClass:"html-inline-node",class:{"html-inline-node--loading":t.props.node.loading}},[e(t.DynamicRenderer,{attrs:{nodes:t.renderMode.nodes}})],1):e("span",{ref:"containerRef",staticClass:"html-inline-node",class:{"html-inline-node--loading":t.props.node.loading}})},[],!1,null,"dc1f383b",null,null).exports,V=g(m.defineComponent({__name:"InlineCodeNode",props:{node:null},setup:e=>({__sfc:!0})}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("code",{staticClass:"inline text-[85%] px-1 py-0.5 rounded font-mono bg-[hsl(var(--secondary))] whitespace-normal break-words max-w-full before:content-[''] after:content-['']"},[e._v(e._s(e.node.code))])},[],!1,null,null,null,null).exports,Q=m.ref(!1),W=m.ref(""),K=m.ref("top"),X=m.ref(null),q=m.ref(null),Z=m.ref(null),G=m.ref(null),J=m.ref(null);let ee=null,te=null;function ne(){ee&&(clearTimeout(ee),ee=null),te&&(clearTimeout(te),te=null)}let oe=!1,re=null;function le(e,t,n="top",o=!1,r,l){if(!e)return;oe||"undefined"!=typeof document&&(re||(re=Promise.resolve().then(()=>Ao).then(e=>{var t;oe=!0;const n=null!=(t=null==e?void 0:e.default)?t:e,o=document.createElement("div");o.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(o);const r=function(){var e,t,n,o;const r=v,l=e=>"function"==typeof e&&"function"==typeof e.extend,i=[r,null==r?void 0:r.default,null==(e=null==r?void 0:r.default)?void 0:e.default,null==(n=null!=(t=null==r?void 0:r.default)?t:r)?void 0:n.default,null==r?void 0:r.Vue2,null==r?void 0:r.Vue];for(const a of i){if(l(a))return a;if(l(null==a?void 0:a.default))return a.default}return null!=(o=null==r?void 0:r.default)?o:r}();(new(r.extend({render(e){var t;return e(n,{props:{visible:Q.value,anchorEl:X.value,content:W.value,placement:K.value,id:q.value,originX:Z.value,originY:G.value,isDark:null!=(t=J.value)?t:void 0}})}}))).$mount(o)}).catch(e=>{re=null,oe=!1,console.warn("[markstream-vue2] Failed to load Tooltip component. Tooltips will be disabled.",e)}))),ne();const i=()=>{var o,i;q.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,X.value=e,W.value=t,K.value=n,Z.value=null!=(o=null==r?void 0:r.x)?o:null,G.value=null!=(i=null==r?void 0:r.y)?i:null,J.value="boolean"==typeof l?l:null,Q.value=!0;try{e.setAttribute("aria-describedby",q.value)}catch(a){}};o?i():ee=setTimeout(i,80)}function ie(e=!1){ne();const t=()=>{if(X.value&&q.value)try{X.value.removeAttribute("aria-describedby")}catch(e){}Q.value=!1,X.value=null,q.value=null,Z.value=null,G.value=null};e?t():te=setTimeout(t,120)}const ae={"common.copy":"Copy","common.copySuccess":"Copied","common.decrease":"Decrease","common.reset":"Reset","common.increase":"Increase","common.expand":"Expand","common.collapse":"Collapse","common.preview":"Preview","common.source":"Source","common.export":"Export","common.open":"Open","common.zoomIn":"Zoom in","common.zoomOut":"Zoom out","common.resetZoom":"Reset zoom","image.loadError":"Image failed to load","image.loading":"Loading image..."};function se(){try{const t=globalThis.$vueI18nUse||null;if(t&&"function"==typeof t)try{const e=t();if(e&&"function"==typeof e.t)return{t:e.t.bind(e)}}catch(e){}}catch(e){}return{t:e=>{var t;return null!=(t=ae[e])?t:function(e){return(e.split(".").pop()||e).replace(/[_-]/g," ").replace(/([A-Z])/g," $1").replace(/\s+/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()}(e)}}}const ue=Symbol("ViewportPriority");function ce(){const e=m.inject(ue,void 0);if(e)return e;const t=new WeakMap;let n=null;return e=>{const o=m.ref(!1);let r,l=!1;const i=new Promise(e=>{r=()=>{l||(l=!0,e())}}),a=()=>{try{null==n||n.unobserve(e)}catch(o){}t.delete(e)},s=n||("undefined"==typeof window||"undefined"==typeof IntersectionObserver?null:(n=new IntersectionObserver(e=>{for(const r of e){const e=t.get(r.target);if(e&&(r.isIntersecting||r.intersectionRatio>0)){if(!e.visible.value){e.visible.value=!0;try{e.resolve()}catch(o){}}null==n||n.unobserve(r.target),t.delete(r.target)}}},{root:null,rootMargin:"300px",threshold:0}),n));return s?(t.set(e,{resolve:r,visible:o}),s.observe(e),{isVisible:o,whenVisible:i,destroy:a}):(o.value=!0,r(),{isVisible:o,whenVisible:i,destroy:a})}}const de=g(m.defineComponent({__name:"ImageNode",props:{node:null,fallbackSrc:{default:""},showCaption:{type:Boolean,default:!1},lazy:{type:Boolean,default:!0},svgMinHeight:{default:"12rem"},usePlaceholder:{type:Boolean,default:!0}},emits:["load","error","click"],setup(e,{emit:t}){const n=e,o=m.ref(!1),r=m.ref(!1),l=m.ref(!1),i=m.ref(null),a=ce();let s=null;const u=m.ref("undefined"==typeof window);"undefined"!=typeof window&&m.watch(()=>i.value,e=>{if(null==s||s.destroy(),s=null,!e)return void(u.value=!1);const t=a(e,{rootMargin:"400px"});s=t,u.value=t.isVisible.value,t.whenVisible.then(()=>{u.value=!0})},{immediate:!0}),m.onBeforeUnmount(()=>{null==s||s.destroy(),s=null});const c=m.computed(()=>r.value&&n.fallbackSrc?n.fallbackSrc:n.node.src),d=m.computed(()=>!n.lazy||u.value),p=m.computed(()=>/\.svg(?:\?|$)/i.test(c.value)),{t:f}=se();return m.watch(c,()=>{o.value=!1,r.value=!1}),{__sfc:!0,props:n,emit:t,imageLoaded:o,hasError:r,fallbackTried:l,figureRef:i,registerVisibility:a,visibilityHandle:s,isVisible:u,displaySrc:c,canRenderImage:d,isSvg:p,handleImageError:function(){n.fallbackSrc&&!l.value?(l.value=!0,r.value=!0):(r.value=!0,t("error",n.node.src))},handleImageLoad:function(){o.value=!0,r.value=!1,t("load",c.value)},handleClick:function(e){e.preventDefault(),o.value&&!r.value&&t("click",[e,c.value])},t:f}}}),function(){var e,t,n,o,r,l=this,i=l._self._c,a=l._self._setupProxy;return i("figure",{ref:"figureRef",staticClass:"text-center my-8"},[i("div",{staticClass:"relative inline-block"},[i("transition",{attrs:{name:"img-switch",mode:"out-in"}},[l.node.loading||a.hasError||!a.canRenderImage?a.hasError?l.node.loading||a.props.fallbackSrc?l._e():i("div",{key:"error",staticClass:"px-4 py-2 bg-gray-100 flex items-center justify-center rounded-lg gap-2 text-red-500"},[l._t("error",function(){return[i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"}},[i("path",{attrs:{fill:"currentColor",d:"M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z"}})]),i("span",{staticClass:"text-sm whitespace-nowrap"},[l._v(l._s(a.t("image.loadError")))])]},{node:a.props.node,displaySrc:a.displaySrc,imageLoaded:a.imageLoaded,hasError:a.hasError,fallbackSrc:a.props.fallbackSrc,lazy:a.props.lazy,isSvg:a.isSvg})],2):i("div",{key:"placeholder",staticClass:"placeholder-layer max-w-96 inline-flex items-center justify-center gap-2",style:a.isSvg?{minHeight:a.props.svgMinHeight,width:"100%"}:{minHeight:"6rem"}},[a.props.usePlaceholder?[l._t("placeholder",function(){return[i("div",{staticClass:"w-4 h-4 rounded-full border-2 border-solid border-current border-t-transparent animate-spin",attrs:{"aria-hidden":"true"}}),i("span",{staticClass:"text-sm whitespace-nowrap"},[l._v(l._s(a.t("image.loading")))])]},{node:a.props.node,displaySrc:a.displaySrc,imageLoaded:a.imageLoaded,hasError:a.hasError,fallbackSrc:a.props.fallbackSrc,lazy:a.props.lazy,isSvg:a.isSvg})]:[i("span",{staticClass:"text-sm text-gray-500"},[l._v(l._s(l.node.raw))])]],2):i("img",{key:"image",staticClass:"max-w-96 h-auto rounded-lg transition-opacity duration-200 ease-in-out",class:{"opacity-0":!a.imageLoaded,"opacity-100":a.imageLoaded,"cursor-pointer":a.imageLoaded},style:a.isSvg?{minHeight:a.props.svgMinHeight,width:"100%",height:"auto",objectFit:"contain"}:void 0,attrs:{src:a.displaySrc,alt:String(null!=(t=null!=(e=a.props.node.alt)?e:a.props.node.title)?t:""),title:String(null!=(o=null!=(n=a.props.node.title)?n:a.props.node.alt)?o:""),loading:a.props.lazy?"lazy":"eager",decoding:"async",tabindex:a.imageLoaded?0:-1,"aria-label":null!=(r=a.props.node.alt)?r:a.t("image.preview")},on:{error:a.handleImageError,load:a.handleImageLoad,click:a.handleClick}})])],1),a.props.showCaption&&a.props.node.alt?i("figcaption",{staticClass:"mt-2 text-sm text-gray-500 italic"},[l._v(" "+l._s(a.props.node.alt)+" ")]):l._e()])},[],!1,null,"2b49bba9",null,null).exports;let pe=null,me=!1,fe=ge;function he(e){var t;const n=null!=(t=null==e?void 0:e.default)?t:e;return n&&"function"==typeof n.renderToString?n:null}function ve(){try{const e=globalThis;return he(null==e?void 0:e.katex)}catch(e){return null}}function ge(){return(()=>d(this,null,function*(){const e=ve();if(e)return e;const t=yield import("katex");try{yield Promise.resolve().then(()=>require("./mhchem.js"))}catch(n){}return he(t)}))()}function we(e){fe=e,pe=null,me=!1}function ye(){return"function"==typeof fe}function xe(){return d(this,null,function*(){var e;const t=ve();if(t)return pe=t,pe;if(pe)return pe;if(me)return null;const n=fe;if(!n)return me=!0,null;try{const t=yield n();if(t)return pe=null!=(e=he(t))?e:t,pe}catch(o){}return me=!0,null})}const Me=m.shallowRef(!1);let ke=null;function be(){return ke||(ke=xe().then(e=>{Me.value=!!e}).catch(()=>{Me.value=!1})),m.readonly(Me)}const Ce=g(m.defineComponent({__name:"TextNode",props:{node:null},emits:["copy"],setup:e=>({__sfc:!0,katexReady:be()})}),function(){var e=this;return(0,e._self._c)("span",{staticClass:"whitespace-pre-wrap break-words text-node",class:[e._self._setupProxy.katexReady&&e.node.center?"text-node-center":""]},[e._v(" "+e._s(e.node.content)+" ")])},[],!1,null,"56f30838",null,null).exports;function Te(e){return t=>{var n,o;return m.h(Ce,u(s({},t),{node:u(s({},t.node),{content:null!=(o=t.node.raw)?o:e(String(null!=(n=t.node.content)?n:""))})}))}}function Ne(){return d(this,null,function*(){var e,t,n;if("undefined"!=typeof globalThis&&void 0!==globalThis.process&&"test"===(null==(t=null==(e=globalThis.process)?void 0:e.env)?void 0:t.NODE_ENV))return Te(e=>`$${e}$`);try{if(yield xe()){const e=yield Promise.resolve().then(()=>require("./index.js"));return null!=(n=e.default)?n:e}}catch(o){console.warn('[markstream-vue2] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',o)}return Te(e=>`$${e}$`)})}function De(){return d(this,null,function*(){var e;try{if(yield xe()){const t=yield Promise.resolve().then(()=>require("./index2.js"));return null!=(e=t.default)?e:t}}catch(t){console.warn('[markstream-vue2] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',t)}return Te(e=>`$$${e}$$`)})}const je=g(m.defineComponent({__name:"ReferenceNode",props:{node:null,messageId:null,threadId:null},emits:["click","mouseEnter","mouseLeave"],setup:e=>({__sfc:!0})}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("span",{staticClass:"reference-node cursor-pointer bg-[hsl(var(--muted))] text-xs rounded-md px-1.5 mx-0.5 hover:bg-[hsl(var(--secondary))]",attrs:{role:"button",tabindex:"0"},on:{click:function(t){return e.$emit("click",t,e.node.id,e.messageId,e.threadId)},mouseenter:function(t){return e.$emit("mouseEnter",t,e.node.id,e.messageId,e.threadId)},mouseleave:function(t){return e.$emit("mouseLeave",t,e.node.id,e.messageId,e.threadId)}}},[e._v(" "+e._s(e.node.id)+" ")])},[],!1,null,null,null,null).exports,Ie=g(m.defineComponent({__name:"SuperscriptNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=N(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:Ce,inline_code:V,link:Se,html_inline:Y,strong:Ee,emphasis:Oe,footnote_reference:D,strikethrough:Le,highlight:Ae,insert:Be,subscript:_e,emoji:M,math_inline:Ne,reference:je},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("sup",{staticClass:"superscript-node"},[e._l(e.node.children,function(o,r){return[n.nodeComponents[o.type]?t(n.nodeComponents[o.type],{key:`${e.indexKey||"superscript"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"superscript"}-${r}`}}):t("span",{key:`${e.indexKey||"superscript"}-${r}`},[e._v(" "+e._s(o.content||o.raw)+" ")])]})],2)},[],!1,null,"3cc2c5de",null,null).exports,_e=g(m.defineComponent({__name:"SubscriptNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=N(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:Ce,inline_code:V,link:Se,html_inline:Y,strong:Ee,emphasis:Oe,footnote_reference:D,strikethrough:Le,highlight:Ae,insert:Be,superscript:Ie,emoji:M,math_inline:Ne,reference:je},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("sub",{staticClass:"subscript-node"},[e._l(e.node.children,function(o,r){return[n.nodeComponents[o.type]?t(n.nodeComponents[o.type],{key:`${e.indexKey||"subscript"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"subscript"}-${r}`}}):t("span",{key:`${e.indexKey||"subscript"}-${r}`},[e._v(" "+e._s(o.content||o.raw)+" ")])]})],2)},[],!1,null,"a2b068c3",null,null).exports,Ee=g(m.defineComponent({__name:"StrongNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=N(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:Ce,inline_code:V,link:Se,html_inline:Y,emphasis:Oe,strikethrough:Le,highlight:Ae,insert:Be,subscript:_e,superscript:Ie,emoji:M,footnote_reference:D,math_inline:Ne,reference:je},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("strong",{staticClass:"strong-node"},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"strong"}-${r}`,tag:"component",attrs:{"index-key":`${e.indexKey||"strong"}-${r}`,node:o,"custom-id":n.props.customId}})}),1)},[],!1,null,"af3ce037",null,null).exports,Le=g(m.defineComponent({__name:"StrikethroughNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=N(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:Ce,inline_code:V,link:Se,html_inline:Y,strong:Ee,emphasis:Oe,highlight:Ae,insert:Be,subscript:_e,superscript:Ie,emoji:M,footnote_reference:D,math_inline:Ne,reference:je},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("del",{staticClass:"strikethrough-node"},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"strikethrough"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"strikethrough"}-${r}`}})}),1)},[],!1,null,"904d5bd1",null,null).exports,Se=g(m.defineComponent({__name:"LinkNode",props:{node:null,indexKey:null,customId:null,showTooltip:{type:Boolean,default:!0},color:null,underlineHeight:null,underlineBottom:null,animationDuration:null,animationOpacity:null,animationTiming:null,animationIteration:null},setup(e){const t=e,n=m.computed(()=>{var e,n,o,r,l,i;const a=void 0!==t.underlineBottom?"number"==typeof t.underlineBottom?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px";return{"--link-color":null!=(e=t.color)?e:"#0366d6","--underline-height":`${null!=(n=t.underlineHeight)?n:2}px`,"--underline-bottom":a,"--underline-opacity":String(null!=(o=t.animationOpacity)?o:.9),"--underline-duration":`${null!=(r=t.animationDuration)?r:.8}s`,"--underline-timing":null!=(l=t.animationTiming)?l:"linear","--underline-iteration":"number"==typeof t.animationIteration?String(t.animationIteration):null!=(i=t.animationIteration)?i:"infinite"}}),o={text:Ce,strong:Ee,strikethrough:Le,emphasis:Oe,image:de,html_inline:Y},r=m.useAttrs(),l=m.computed(()=>{var e,n;return String(null!=(n=null!=(e=t.node.title)?e:t.node.href)?n:"")});return{__sfc:!0,props:t,cssVars:n,nodeComponents:o,attrs:r,onAnchorEnter:function(e){var n,o,r;if(!t.showTooltip)return;const l=e,i=null!=(null==l?void 0:l.clientX)&&null!=(null==l?void 0:l.clientY)?{x:l.clientX,y:l.clientY}:void 0,a=(null==(n=t.node)?void 0:n.title)||(null==(o=t.node)?void 0:o.href)||(null==(r=t.node)?void 0:r.text)||"";le(e.currentTarget,a,"top",!1,i)},onAnchorLeave:function(){t.showTooltip&&ie()},title:l}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return e.node.loading?t("span",e._b({staticClass:"link-loading inline-flex items-baseline gap-1.5",style:n.cssVars,attrs:{"aria-hidden":e.node.loading?"false":"true"}},"span",n.attrs,!1),[t("span",{staticClass:"link-text-wrapper relative inline-flex"},[t("span",{staticClass:"leading-[normal] link-text"},[t("span",{staticClass:"leading-[normal] link-text"},[e._v(e._s(e.node.text))])]),t("span",{staticClass:"underline-anim",attrs:{"aria-hidden":"true"}})])]):t("a",e._b({staticClass:"link-node",style:n.cssVars,attrs:{href:e.node.href,title:e.showTooltip?"":n.title,"aria-label":`Link: ${n.title}`,"aria-hidden":e.node.loading?"true":"false",target:"_blank",rel:"noopener noreferrer"},on:{mouseenter:e=>n.onAnchorEnter(e),mouseleave:n.onAnchorLeave}},"a",n.attrs,!1),e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"emphasis"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"link-text"}-${r}`}})}),1)},[],!1,null,"0bce2385",null,null).exports,Be=g(m.defineComponent({__name:"InsertNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=N(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:Ce,inline_code:V,link:Se,html_inline:Y,strong:Ee,emphasis:Oe,strikethrough:Le,highlight:Ae,subscript:_e,superscript:Ie,emoji:M,footnote_reference:D,math_inline:Ne,reference:je},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("ins",{staticClass:"insert-node"},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"insert"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"insert"}-${r}`}})}),1)},[],!1,null,"ab1ec9bc",null,null).exports,Ae=g(m.defineComponent({__name:"HighlightNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=N(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:Ce,inline_code:V,link:Se,html_inline:Y,strong:Ee,emphasis:Oe,strikethrough:Le,insert:Be,subscript:_e,superscript:Ie,emoji:M,footnote_reference:D,math_inline:Ne,reference:je},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("mark",{staticClass:"highlight-node"},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"highlight"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"highlight"}-${r}`}})}),1)},[],!1,null,"38e31bf6",null,null).exports,Oe=g(m.defineComponent({__name:"EmphasisNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=N(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:Ce,inline_code:V,link:Se,html_inline:Y,strong:Ee,strikethrough:Le,highlight:Ae,insert:Be,subscript:_e,superscript:Ie,emoji:M,footnote_reference:D,math_inline:Ne,reference:je},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("em",{staticClass:"emphasis-node"},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"emphasis"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"emphasis"}-${r}`}})}),1)},[],!1,null,"8264674d",null,null).exports,ze=g(m.defineComponent({__name:"FootnoteAnchorNode",props:{node:null},setup(e){const t=e;return{__sfc:!0,props:t,scrollToReference:function(e){var n;if(e.preventDefault(),"undefined"==typeof document)return;const o=`fnref-${String(null!=(n=t.node.id)?n:"")}`,r=document.getElementById(o);r&&r.scrollIntoView({behavior:"smooth"})}}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("a",{staticClass:"footnote-anchor text-sm text-[#0366d6] hover:underline cursor-pointer",attrs:{href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`},on:{click:n.scrollToReference}},[e._v(" ↩︎ ")])},[],!1,null,"4756ce0d",null,null).exports,Re=g(m.defineComponent({__name:"FootnoteNode",props:{node:null,indexKey:null,typewriter:{type:Boolean},customId:null},emits:["copy"],setup:e=>({__sfc:!0,props:e,NodeRenderer:qe})}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"flex mt-2 mb-2 text-sm leading-relaxed border-t border-[#eaecef] pt-2",attrs:{id:`fnref--${e.node.id}`}},[t("div",{staticClass:"flex-1"},[t(n.NodeRenderer,{attrs:{"index-key":`footnote-${n.props.indexKey}`,nodes:n.props.node.children,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1)])},[],!1,null,null,null,null).exports,Pe=g(m.defineComponent({__name:"HardBreakNode",props:{node:null},setup:e=>({__sfc:!0})}),function(){var e=this._self._c;return this._self._setupProxy,e("br",{staticClass:"hard-break"})},[],!1,null,"50c58f70",null,null).exports,He=g(m.defineComponent({__name:"HeadingNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=N(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:Ce,inline_code:V,link:Se,image:de,strong:Ee,emphasis:Oe,strikethrough:Le,highlight:Ae,insert:Be,subscript:_e,superscript:Ie,emoji:M,checkbox:y,checkbox_input:y,footnote_reference:D,hardbreak:Pe,math_inline:Ne,reference:je},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t(`h${e.node.level}`,e._b({tag:"component",staticClass:"heading-node",class:[`heading-${e.node.level}`],attrs:{dir:"auto"}},"component",e.node.attrs,!1),e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"heading"}-${r}`,tag:"component",attrs:{"custom-id":n.props.customId,node:o,"index-key":`${e.indexKey||"heading"}-${r}`}})}),1)},[],!1,null,"ffb7cf51",null,null).exports,Ue=g(m.defineComponent({__name:"ListItemNode",props:{node:null,item:null,indexKey:null,value:null,customId:null,typewriter:{type:Boolean}},setup(e){const t=e,n=m.computed(()=>{var e;return null!=(e=t.node)?e:t.item}),o=m.computed(()=>null==t.value?{}:{value:t.value});return{__sfc:!0,props:t,itemNode:n,liValueAttr:o,NodeRenderer:qe}}}),function(){var e,t,n=this,o=n._self._c,r=n._self._setupProxy;return o("li",n._b({staticClass:"list-item pl-1.5 my-2",attrs:{dir:"auto"}},"li",r.liValueAttr,!1),[o(r.NodeRenderer,{attrs:{"index-key":`list-item-${r.props.indexKey}`,nodes:null!=(t=null==(e=r.itemNode)?void 0:e.children)?t:[],"custom-id":r.props.customId,typewriter:r.props.typewriter,"batch-rendering":!1},on:{copy:function(e){return n.$emit("copy",e)}}})],1)},[],!1,null,"c165971a",null,null).exports,$e=g(m.defineComponent({__name:"ListNode",props:{node:null,customId:null,indexKey:null,typewriter:{type:Boolean}},emits:["copy"],setup(e){const{node:t,customId:n,indexKey:o,typewriter:r}=e;return{__sfc:!0,listItemComponent:m.computed(()=>(T.value,N(n).list_item||Ue))}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t(e.node.ordered?"ol":"ul",{tag:"component",staticClass:"list-node",class:{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}},e._l(e.node.items,function(o,r){var l;return t(n.listItemComponent,{key:`${e.indexKey||"list"}-${r}`,tag:"component",attrs:{node:o,"custom-id":e.customId,"index-key":`${e.indexKey||"list"}-${r}`,typewriter:e.typewriter,value:e.node.ordered?(null!=(l=e.node.start)?l:1)+r:void 0},on:{copy:function(t){return e.$emit("copy",t)}}})}),1)},[],!1,null,"92166f4e",null,null).exports,Fe=g(m.defineComponent({__name:"HtmlBlockNode",props:{node:null,customId:null},setup(e){const t=e,n=m.computed(()=>{const e=t.node.attrs;if(e){if(Array.isArray(e)){const t={};for(const n of e){if(!n||n.length<2)continue;const[e,o]=n;null!=e&&(t[String(e)]=null==o?"":String(o))}return t}return e}}),o=m.computed(()=>N(t.customId)),r=m.defineComponent({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),l=m.computed(()=>{const e=t.node.content;if(!e)return{mode:"html",content:""};if(!$(e,o.value))return{mode:"html",content:e};const n=F(e,o.value);return null===n?{mode:"html",content:e}:{mode:"dynamic",nodes:n}}),i=m.ref(null),a=m.ref("undefined"==typeof window),s=m.ref(t.node.content),u=ce();let c=null;const d=!!t.node.loading;return"undefined"!=typeof window?(m.watch(i,e=>{var n;if(null==(n=null==c?void 0:c.destroy)||n.call(c),c=null,!d)return a.value=!0,void(s.value=t.node.content);if(!e)return void(a.value=!1);const o=u(e,{rootMargin:"400px"});c=o,a.value=o.isVisible.value,o.whenVisible.then(()=>{a.value=!0})},{immediate:!0}),m.watch(()=>t.node.content,e=>{d&&!a.value||(s.value=e)})):a.value=!0,m.onBeforeUnmount(()=>{var e;null==(e=null==c?void 0:c.destroy)||e.call(c),c=null}),{__sfc:!0,props:t,boundAttrs:n,customComponents:o,DynamicRenderer:r,renderMode:l,htmlRef:i,shouldRender:a,renderContent:s,registerVisibility:u,visibilityHandle:c,isDeferred:d}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",e._b({ref:"htmlRef",staticClass:"html-block-node"},"div",n.boundAttrs,!1),[n.shouldRender?["dynamic"===n.renderMode.mode?t(n.DynamicRenderer,{attrs:{nodes:n.renderMode.nodes}}):t("div",{domProps:{innerHTML:e._s(n.renderContent)}})]:t("div",{staticClass:"html-block-node__placeholder"},[e._t("placeholder",function(){return[t("span",{staticClass:"html-block-node__placeholder-bar"}),t("span",{staticClass:"html-block-node__placeholder-bar w-4/5"}),t("span",{staticClass:"html-block-node__placeholder-bar w-2/3"})]},{node:e.node})],2)],2)},[],!1,null,"d3d594a5",null,null).exports,Ye=g(m.defineComponent({__name:"ParagraphNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=N(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({inline_code:V,image:de,link:Se,hardbreak:Pe,emphasis:Oe,strong:Ee,strikethrough:Le,highlight:Ae,insert:Be,subscript:_e,superscript:Ie,html_inline:Y,html_block:Fe,emoji:M,checkbox:y,math_inline:Ne,checkbox_input:y,reference:je,footnote_anchor:ze,footnote_reference:D},n),katexReady:be()}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("p",{staticClass:"paragraph-node",attrs:{dir:"auto"}},[e._l(e.node.children,function(o,r){return["text"!==o.type?t(n.nodeComponents[o.type],{key:`${e.indexKey||"paragraph"}-${r}`,tag:"component",attrs:{node:o,"index-key":`${e.indexKey}-${r}`,"custom-id":n.props.customId}}):t("span",{key:`${e.indexKey||"paragraph"}-${r}`,staticClass:"whitespace-pre-wrap break-words text-node",class:[n.katexReady&&o.center?"text-node-center":""]},[e._v(" "+e._s(o.content)+" ")])]})],2)},[],!1,null,"5aa62108",null,null).exports,Ve=g(m.defineComponent({__name:"PreCodeNode",props:{node:null},setup(e){const t=e,n=m.computed(()=>{var e,n,o;const r=String(null!=(n=null==(e=t.node)?void 0:e.language)?n:"");return String(null!=(o=String(r).split(/\s+/g)[0])?o:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),o=m.computed(()=>`language-${n.value}`),r=m.computed(()=>{const e=n.value;return e?`Code block: ${e}`:"Code block"});return{__sfc:!0,props:t,normalizedLanguage:n,languageClass:o,ariaLabel:r}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("pre",{class:[n.languageClass],attrs:{"aria-busy":!0===e.node.loading,"aria-label":n.ariaLabel,"data-language":n.normalizedLanguage,tabindex:"0"}},[t("code",{attrs:{translate:"no"},domProps:{textContent:e._s(e.node.code)}})])},[],!1,null,null,null,null).exports,Qe=g(m.defineComponent({__name:"TableNode",props:{node:null,indexKey:null,isDark:{type:Boolean},typewriter:{type:Boolean},customId:null},emits:["copy"],setup(e){const t=e,n=m.computed(()=>{var e;return null!=(e=t.node.loading)&&e}),o=m.computed(()=>{var e;return null!=(e=t.node.rows)?e:[]});return{__sfc:!0,props:t,isLoading:n,bodyRows:o,NodeRenderer:qe}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"table-node-wrapper"},[t("table",{staticClass:"my-8 text-sm table-node",class:{"table-node--loading":n.isLoading},attrs:{"aria-busy":n.isLoading}},[t("thead",{staticClass:"border-[var(--table-border,#cbd5e1)] border-solid"},[t("tr",{staticClass:"border-b border-solid"},e._l(e.node.header.cells,function(o,r){return t("th",{key:`header-${r}`,staticClass:"font-semibold p-[calc(4/7*1em)]",class:["right"===o.align?"text-right":"center"===o.align?"text-center":"text-left"],attrs:{dir:"auto"}},[t(n.NodeRenderer,{attrs:{nodes:o.children,"index-key":`table-th-${n.props.indexKey}`,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1)}),0)]),t("tbody",e._l(n.bodyRows,function(o,r){return t("tr",{key:`row-${r}`,staticClass:"border-[var(--table-border,#cbd5e1)] border-solid",class:[r<n.bodyRows.length-1?"border-b":""]},e._l(o.cells,function(o,l){return t("td",{key:`cell-${r}-${l}`,staticClass:"p-[calc(4/7*1em)]",class:["right"===o.align?"text-right":"center"===o.align?"text-center":"text-left"],attrs:{dir:"auto"}},[t(n.NodeRenderer,{attrs:{nodes:o.children,"index-key":`table-td-${n.props.indexKey}`,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1)}),0)}),0)]),t("transition",{attrs:{name:"table-node-fade"}},[n.isLoading?t("div",{staticClass:"table-node__loading",attrs:{role:"status","aria-live":"polite"}},[e._t("loading",function(){return[t("span",{staticClass:"table-node__spinner animate-spin",attrs:{"aria-hidden":"true"}}),t("span",{staticClass:"sr-only"},[e._v("Loading")])]},{isLoading:n.isLoading})],2):e._e()])],1)},[],!1,null,"c9e613de",null,null).exports,We=g(m.defineComponent({__name:"ThematicBreakNode",setup:e=>({__sfc:!0})}),function(){var e=this._self._c;return this._self._setupProxy,e("hr",{staticClass:"hr-node"})},[],!1,null,"639cbad9",null,null).exports,Ke=g(m.defineComponent({__name:"FallbackComponent",props:{node:null},setup:e=>({__sfc:!0})}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{staticClass:"unknown-node"},[e._v(" "+e._s(e.node.raw)+" ")])},[],!1,null,"89aff01f",null,null).exports,Xe=g(m.defineComponent({__name:"VmrContainerNode",props:{node:null,indexKey:null,isDark:{type:Boolean},typewriter:{type:Boolean},customId:null},setup(e){const t=e,n=m.computed(()=>`vmr-container vmr-container-${t.node.name}`),o=N(t.customId),r=s({text:Ce,paragraph:Ye,heading:He,inline_code:V,link:Se,image:de,strong:Ee,emphasis:Oe,strikethrough:Le,insert:Be,subscript:_e,superscript:Ie,checkbox:y,checkbox_input:y,hardbreak:Pe,math_inline:Ne,reference:je,list:$e,math_block:De,table:Qe},o);return{__sfc:!0,props:t,containerClass:n,overrides:o,nodeComponents:r,getNodeComponent:function(e){return r[e]||Ke}}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",e._b({class:n.containerClass},"div",e.node.attrs,!1),e._l(e.node.children,function(o,r){return t(n.getNodeComponent(o.type),{key:`${e.indexKey||"vmr-container"}-${r}`,tag:"component",attrs:{"custom-id":n.props.customId,node:o,"index-key":`${e.indexKey||"vmr-container"}-${r}`}})}),1)},[],!1,null,"3cd2aff2",null,null).exports,qe=g(m.defineComponent({__name:"NodeRenderer",props:{content:null,nodes:null,final:{type:Boolean},parseOptions:null,customMarkdownIt:null,debugPerformance:{type:Boolean,default:!1},customHtmlTags:null,viewportPriority:{type:Boolean},codeBlockStream:{type:Boolean,default:!0},codeBlockDarkTheme:null,codeBlockLightTheme:null,codeBlockMonacoOptions:null,renderCodeBlocksAsPre:{type:Boolean},codeBlockMinWidth:null,codeBlockMaxWidth:null,codeBlockProps:null,themes:null,isDark:{type:Boolean},customId:null,indexKey:null,typewriter:{type:Boolean,default:!0},batchRendering:{type:Boolean,default:!0},initialRenderBatchSize:{default:40},renderBatchSize:{default:80},renderBatchDelay:{default:16},renderBatchBudgetMs:{default:6},renderBatchIdleTimeoutMs:{default:120},deferNodesUntilVisible:{type:Boolean,default:!0},maxLiveNodes:{default:320},liveNodeBuffer:{default:60}},emits:["copy","handleArtifactClick","click","mouseover","mouseout"],setup(e,{emit:t}){var n,o,r;const l=e,i=m.ref(),a=m.ref(!1),c=/auto|scroll|overlay/i,h="undefined"!=typeof window,v=m.computed(()=>l.debugPerformance&&h&&"undefined"!=typeof console);function g(e,t){v.value&&console.info(`[markstream-vue2][perf] ${e}`,t)}function k(e){if("undefined"==typeof window)return null;const t=null!=e?e:i.value;if(!t)return null;const n=t.ownerDocument||document,o=n.scrollingElement||n.documentElement;let r=t;for(;r&&r!==n.body&&r!==o;){const e=window.getComputedStyle(r),t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();if(c.test(t)||c.test(n))return r;r=r.parentElement}return null}const b=l.customId?`renderer-${l.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,C=p.getMarkdown(b),j=new Map,I=m.computed(()=>{const{key:e,tags:t}=L(l.customHtmlTags);if(!e)return C;const n=j.get(e);if(n)return n;const o=p.getMarkdown(b,{customHtmlTags:t});return j.set(e,o),o}),_=m.computed(()=>{const e=I.value;return l.customMarkdownIt?l.customMarkdownIt(e):e});function E(e){const t=String(null!=e?e:"").trim();if(!t)return"";const n=t.match(/^[<\s/]*([A-Z][\w-]*)/i);return n?n[1].toLowerCase():""}function L(e){if(!e||0===e.length)return{key:"",tags:[]};const t=new Set,n=[];for(const o of e){const e=E(o);e&&!t.has(e)&&(t.add(e),n.push(e))}return 0===n.length?{key:"",tags:[]}:{key:n.join(","),tags:n}}const S=m.computed(()=>{var e,t,n,o;const r=null!=(e=l.parseOptions)?e:{},i=null!=(t=l.final)?t:r.final,a=[...null!=(n=l.customHtmlTags)?n:[],...null!=(o=r.customHtmlTags)?o:[]].map(E).filter(Boolean),u=null!=i,c=a.length>0;return u||c?s(s(s({},r),u?{final:i}:{}),c?{customHtmlTags:Array.from(new Set(a))}:{}):r}),B=m.computed(()=>{var e;if(null==(e=l.nodes)?void 0:e.length)return m.markRaw(l.nodes.slice());if(l.content){const e=v.value?performance.now():0,t=p.parseMarkdownToStructure(l.content,_.value,S.value);return v.value&&g("parse(sync)",{ms:Math.round(performance.now()-e),nodes:t.length,contentLength:l.content.length}),m.markRaw(t)}return[]}),A=m.computed(()=>{var e;return Math.max(1,null!=(e=l.maxLiveNodes)?e:320)}),O=m.computed(()=>{var e;return!((null!=(e=l.maxLiveNodes)?e:0)<=0)&&B.value.length>A.value}),z=m.computed(()=>!1!==l.viewportPriority&&!a.value),R=function(e,t){const n="undefined"!=typeof window&&"undefined"!=typeof document,o="boolean"==typeof t?m.ref(t):t;let r=null,l=null;const i=new WeakMap,a=(t,a)=>{const u=m.ref(!1);let c,d=!1;const p=new Promise(e=>{c=()=>{d||(d=!0,e())}}),f=()=>{try{null==r||r.unobserve(t)}catch(e){}i.delete(t)};if(!n||!o.value)return u.value=!0,c(),{isVisible:u,whenVisible:p,destroy:f};!l&&a&&(l=s({},a));const h=function(t){var o,a,s;if(r||!n)return r;if("undefined"==typeof IntersectionObserver)return null;const u=null!=(o=null==e?void 0:e(null!=t?t:null))?o:null,c=l||{};return r=new IntersectionObserver(e=>{for(const n of e){const e=i.get(n.target);if(e&&(n.isIntersecting||n.intersectionRatio>0)){if(!e.visible.value){e.visible.value=!0;try{e.resolve()}catch(t){}}null==r||r.unobserve(n.target),i.delete(n.target)}}},{root:u,rootMargin:null!=(a=c.rootMargin)?a:"300px",threshold:null!=(s=c.threshold)?s:0}),r}(t);return h?(i.set(t,{resolve:c,visible:u}),h.observe(t),{isVisible:u,whenVisible:p,destroy:f}):(u.value=!0,c(),{isVisible:u,whenVisible:p,destroy:f})};return m.provide(ue,a),a}(e=>{var t;return k(null!=(t=null!=e?e:i.value)?t:null)},z),P=h&&"function"==typeof window.requestAnimationFrame?window.requestAnimationFrame.bind(window):null,H=h&&"function"==typeof window.cancelAnimationFrame?window.cancelAnimationFrame.bind(window):null,U="undefined"!=typeof globalThis&&void 0!==globalThis.process&&"test"===(null==(o=null==(n=globalThis.process)?void 0:n.env)?void 0:o.NODE_ENV),$=h&&"function"==typeof window.requestIdleCallback,F=m.computed(()=>{var e;const t=Math.trunc(null!=(e=l.renderBatchSize)?e:80);return Number.isFinite(t)?Math.max(0,t):0}),Q=m.computed(()=>{var e;const t=Math.trunc(null!=(e=l.initialRenderBatchSize)?e:F.value);return Number.isFinite(t)?Math.max(0,t):F.value}),W=m.computed(()=>!1!==l.batchRendering&&F.value>0&&h&&!U),K=m.ref(0),X=m.ref({key:l.indexKey,total:0}),q=m.ref(Math.max(1,F.value||1)),Z=m.reactive({}),G=new Map,J=new Map,ee=new Map,te=m.ref(0),ne=m.computed(()=>(te.value,Array.from(ee.entries()).sort((e,t)=>e[0]-t[0]))),oe=m.ref(null);let re=null,le=null;const ie=m.reactive({start:0,end:0}),ae=m.computed(()=>{if(!O.value)return B.value.map((e,t)=>({node:e,index:t}));const e=B.value.length,t=tt(ie.start,0,e),n=tt(ie.end,t,e);return B.value.slice(t,n).map((e,n)=>({node:e,index:t+n}))}),se=m.computed(()=>{var e;return!1!==l.deferNodesUntilVisible&&!((null!=(e=l.maxLiveNodes)?e:0)<=0)&&!O.value&&!(B.value.length>900)&&z.value}),ce=m.computed(()=>{var e;return W.value&&(null!=(e=l.maxLiveNodes)?e:0)<=0}),pe=m.ref({batchSize:F.value,initial:Q.value,delay:null!=(r=l.renderBatchDelay)?r:16,enabled:ce.value}),me=m.computed(()=>!!R&&(se.value||O.value)),fe=m.computed(()=>{var e;return Math.max(0,null!=(e=l.liveNodeBuffer)?e:60)}),he=m.ref(0),ve=new Map,ge=m.getCurrentInstance();function we(){var e,t,n,o;const r=null==ge?void 0:ge.proxy;if(!r||!r.$refs)return;const l=r.$refs,i=new Set;for(const a of ae.value){const r=null!=(e=l[`node-slot-${a.index}`])?e:null,s=null!=(t=l[`node-content-${a.index}`])?t:null;(null!=(n=ee.get(a.index))?n:null)!==r&&kt(a.index,r),(null!=(o=ve.get(a.index))?o:null)!==s&&Ct(a.index,s),i.add(a.index)}for(const a of Array.from(ee.keys()))i.has(a)||kt(a,null);for(const a of Array.from(ve.keys()))i.has(a)||Ct(a,null)}const ye=m.computed(()=>{if(!O.value)return B.value.length;const e=fe.value,t=Math.max(ie.end+e,Q.value),n=Math.min(B.value.length,t);return Math.max(K.value,n)});function xe(e){var t,n,o,r;const l=k(null!=(t=null!=e?e:i.value)?t:null);if(l)return l;const a=null!=(r=null!=(o=null==e?void 0:e.ownerDocument)?o:null==(n=i.value)?void 0:n.ownerDocument)?r:"undefined"!=typeof document?document:null;return(null==a?void 0:a.scrollingElement)||(null==a?void 0:a.documentElement)||null}function Me(e){if(!h)return!1;try{const t=window.getComputedStyle(e);return!!(t.display||"").toLowerCase().includes("flex")&&(t.flexDirection||"").toLowerCase().endsWith("reverse")}catch(t){return!1}}function ke(e,t,n){var o,r,l,i,a,s;if(n)return null!=(i=null!=(l=null==(o=null==t?void 0:t.documentElement)?void 0:o.scrollTop)?l:null==(r=null==t?void 0:t.body)?void 0:r.scrollTop)?i:0;const u=e.scrollTop;if(!Me(e))return u;const c=u<0?-u:u;return Math.max(0,(null!=(a=e.scrollHeight)?a:0)-(null!=(s=e.clientHeight)?s:0))-c}function be(e,t){let n=e,o=0,r=0;for(;n&&n!==t&&r++<64;)o+=n.offsetTop||0,n=n.offsetParent;return o}function Te(){re&&(re(),re=null),oe.value=null}function qe(){if(!h||!O.value)return;const e=xe();if(!e||oe.value===e)return;Te();const t=()=>Je();e.addEventListener("scroll",t,{passive:!0}),oe.value=e,re=()=>{e.removeEventListener("scroll",t)}}function Ge(){var e,t,n;if(!le)return;const o=null!=(n=null==(t=null==(e=i.value)?void 0:e.ownerDocument)?void 0:t.defaultView)?n:"undefined"!=typeof window?window:null;le.viaTimeout?o?o.clearTimeout(le.id):clearTimeout(le.id):null==H||H(le.id),le=null}function Je(e={}){var t,n,o;if(!O.value)return;if(!h)return void et(!0);if(e.immediate)return Ge(),void et(!0);if(le)return;const r=()=>{le=null,et()};if(P)le={id:P(r),viaTimeout:!1};else{const e=null!=(o=null==(n=null==(t=i.value)?void 0:t.ownerDocument)?void 0:n.defaultView)?o:"undefined"!=typeof window?window:null,l=e?e.setTimeout(r,16):setTimeout(r,16);le={id:l,viaTimeout:!0}}}function et(e=!1){var t,n,o,r,l,a,s;if(!O.value)return;const u=oe.value||xe();if(!u)return;const c=u.ownerDocument||(null==(t=i.value)?void 0:t.ownerDocument)||document,d=(null==c?void 0:c.defaultView)||("undefined"!=typeof window?window:null),p=u===(null==c?void 0:c.documentElement)||u===(null==c?void 0:c.body),m=B.value.length;if(!p&&m>0&&Me(u)){const t=u.clientHeight||0,n=u.scrollTop,o=n<0?-n:n,r=tt(wt(Math.max(0,o)+.5*Math.max(0,t)),0,Math.max(0,m-1));return void((e||Math.abs(r-he.value)>1)&&(he.value=r))}const f=p?null:u.getBoundingClientRect(),h=p?0:f.top,v=p?null!=(o=null!=(n=null==d?void 0:d.innerHeight)?n:u.clientHeight)?o:0:f.bottom,g=ne.value;let w=null,y=null;for(const[i,M]of g){if(!M)continue;const e=M.getBoundingClientRect();e.bottom<=h||e.top>=v||(null==w&&(w=i),y=i)}if(null==w||null==y){const e=i.value;if(!e)return;const t=p?{top:0}:u.getBoundingClientRect(),n=ke(u,c,p),o=p?(()=>{const n=e.getBoundingClientRect(),o=(p?0:t.top)-n.top;return Math.max(0,o)})():(()=>{const t=be(e,u);return Math.max(0,n-t)})(),m=p?null!=(s=null!=(a=null!=(l=null==d?void 0:d.innerHeight)?l:null==(r=null==c?void 0:c.documentElement)?void 0:r.clientHeight)?a:u.clientHeight)?s:0:u.clientHeight,f=gt(o+.5*Math.max(0,m));return void(he.value=tt(f,0,Math.max(0,B.value.length-1)))}const x=Math.round((w+y)/2);!e&&Math.abs(x-he.value)<=1||(he.value=tt(x,0,Math.max(0,B.value.length-1)))}function tt(e,t,n){return Math.min(Math.max(e,t),n)}function nt(){const e=B.value.length;if(!O.value||0===e)return ie.start=0,void(ie.end=e);const t=Math.min(A.value,e),n=fe.value,o=tt(he.value-n,0,Math.max(0,e-t));ie.start=o,ie.end=Math.min(e,o+t)}const ot=m.reactive({}),rt=m.reactive({total:0,count:0}),lt=m.ref(0),it=m.ref([]),at=m.ref([]);function st(e,t,n){for(let o=t+1;o<e.length;o+=o&-o)e[o]+=n}function ut(e,t){let n=0;for(let o=t+1;o>0;o-=o&-o)n+=e[o];return n}function ct(e,t,n){if(n<=t)return 0;const o=ut(e,n-1);return t<=0?o:o-ut(e,t-1)}function dt(e){lt.value=e;const t=new Array(e+1).fill(0),n=new Array(e+1).fill(0);for(const[o,r]of Object.entries(ot)){const l=Number(o),i=Number(r);!Number.isFinite(l)||l<0||l>=e||!Number.isFinite(i)||i<=0||(st(t,l,i),st(n,l,1))}it.value=t,at.value=n}function pt(e,t){if(!Number.isFinite(t)||t<=0)return;const n=ot[e];if(ot[e]=t,n?rt.total+=t-n:(rt.total+=t,rt.count++),lt.value>e){const o=it.value,r=at.value;if(o.length&&r.length)if(n){const r=t-n;0!==r&&st(o,e,r)}else st(o,e,t),st(r,e,1)}}const mt=m.computed(()=>rt.count>0?Math.max(12,rt.total/rt.count):32);function ft(e,t){var n,o;if(e>=t)return 0;if(lt.value!==B.value.length){let o=0;for(let r=e;r<t;r++)o+=null!=(n=ot[r])?n:mt.value;return o}const r=it.value,l=at.value;if(!r.length||!l.length){let n=0;for(let r=e;r<t;r++)n+=null!=(o=ot[r])?o:mt.value;return n}return ct(r,e,t)+(t-e-ct(l,e,t))*mt.value}m.watch(()=>B.value.length,e=>{if(e<=0)return lt.value=0,it.value=[],void(at.value=[]);e!==lt.value&&dt(e)},{immediate:!0});const ht=m.computed(()=>O.value?ft(0,Math.min(ie.start,B.value.length)):0),vt=m.computed(()=>{if(!O.value)return 0;const e=B.value.length;return ft(Math.min(ie.end,e),e)});function gt(e){var t;if(e<=0)return 0;const n=B.value;if(lt.value===n.length&&it.value.length&&at.value.length){const t=mt.value,o=it.value,r=at.value,l=e=>e<=0?0:ut(o,e-1)+(e-ut(r,e-1))*t;let i=0,a=n.length-1,s=n.length-1;for(;i<=a;){const t=i+a>>1;l(t+1)>=e?(s=t,a=t-1):i=t+1}return s}let o=e;for(let r=0;r<n.length;r++){const e=null!=(t=ot[r])?t:mt.value;if(o<=e)return r;o-=e}return Math.max(0,n.length-1)}function wt(e){var t;const n=B.value;if(!n.length)return 0;if(e<=0)return Math.max(0,n.length-1);if(lt.value===n.length){const t=ft(0,n.length);return gt(Math.max(0,t-e))}let o=e;for(let r=n.length-1;r>=0;r--){const e=null!=(t=ot[r])?t:mt.value;if(o<=e)return r;o-=e}return 0}function yt(e){if(!G.size)return;if(!O.value)return;let t=!1;for(const[n,o]of G)n>=e&&(o.destroy(),G.delete(n),se.value&&delete Z[n],Lt(n),ee.delete(n)&&(t=!0));t&&bt()}function xt(e,t){se.value&&(Z[e]=t),t&&(O.value?Je():he.value=tt(e,0,Math.max(0,B.value.length-1)))}function Mt(e){const t=G.get(e);t&&(t.destroy(),G.delete(e)),Lt(e)}function kt(e,t){let n=!1;if(t){const o=ee.get(e);ee.set(e,t),o!==t&&(n=!0)}else ee.delete(e)&&(n=!0);if(n&&bt(),t||Lt(e),!me.value||!R)return Mt(e),void(t?xt(e,!0):se.value&&delete Z[e]);if(!O.value&&se.value&&!a.value&&G.size>=640&&(Bt("too-many-targets"),!me.value||!R))return Mt(e),void(t?xt(e,!0):se.value&&delete Z[e]);if(e<Q.value&&!O.value)return Mt(e),void xt(e,!0);if(!t)return Mt(e),void(se.value&&delete Z[e]);Mt(e);const o=R(t,{rootMargin:"400px"});o&&(G.set(e,o),xt(e,o.isVisible.value),se.value&&St(e),o.whenVisible.then(()=>{Lt(e),xt(e,!0)}).catch(()=>{}).finally(()=>{G.get(e)===o&&G.delete(e);try{o.destroy()}catch(t){}}),O.value&&Je())}function bt(){te.value+=1}function Ct(e,t){t?(ve.set(e,t),queueMicrotask(()=>{pt(e,t.offsetHeight)})):ve.delete(e)}m.onMounted(()=>{h&&m.nextTick(we)}),m.watch(ae,()=>{h&&m.nextTick(we)}),m.watch(K,()=>{h&&m.nextTick(we)}),m.watch(O,()=>{h&&m.nextTick(we)});let Nt=null,Dt=null,jt=!1,It=null,_t=null;function Et(){h&&(null!=Nt&&(null==H||H(Nt),Nt=null),null!=Dt&&(window.clearTimeout(Dt),Dt=null),null!=_t&&"function"==typeof window.cancelIdleCallback&&(window.cancelIdleCallback(_t),_t=null),jt=!1,It=null)}function Lt(e){if(!h)return;const t=J.get(e);null!=t&&(window.clearTimeout(t),J.delete(e))}function St(e){if(!h||!se.value)return;Lt(e);const t=e%17*23,n=window.setTimeout(()=>{var t,n;if(J.delete(e),!se.value)return;if(!0===Z[e])return;const o=ee.get(e);if(!o)return void delete Z[e];const r=xe(o),l=o.ownerDocument||document,i=l.defaultView||window,a=!r||r===l.documentElement||r===l.body,s=!a&&r?r.getBoundingClientRect():null,u=a?0:s.top,c=a?null!=(n=null!=(t=i.innerHeight)?t:null==r?void 0:r.clientHeight)?n:0:s.bottom,d=o.getBoundingClientRect();d.bottom>=u-500&&d.top<=c+500&&xt(e,!0)},1800+t);J.set(e,n)}function Bt(e){var t;if(!a.value){a.value=!0,void 0!=={url:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:f&&"SCRIPT"===f.tagName.toUpperCase()&&f.src||new URL("index.cjs",document.baseURI).href}&&(null==(t={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:t.DEV)&&"undefined"!=typeof console&&console.warn("[markstream-vue2] viewportPriority auto-disabled:",e);for(const e of G.values())e.destroy();if(G.clear(),h)for(const e of J.values())window.clearTimeout(e);J.clear();for(const e of Object.keys(Z))delete Z[e]}}function At(e,t={}){var n,o;if(!ce.value)return;const r=ye.value;if(K.value>=r)return;const i=Math.max(1,e),a=e=>{var t;Nt=null,Dt=null,_t=null,jt=!1;const n=null!=It?It:i;It=null;const o=Math.max(2,null!=(t=l.renderBatchBudgetMs)?t:6),a=e=>{const t="undefined"!=typeof performance?performance.now():Date.now();K.value=Math.min(r,K.value+Math.max(1,e)),yt(K.value);const n=("undefined"!=typeof performance?performance.now():Date.now())-t;return zt(n),n};let s=n;for(;(a(s),!(K.value>=r)&&e)&&!(("function"==typeof e.timeRemaining?e.timeRemaining():0)<=.5*o);)s=Math.max(1,Math.round(q.value));K.value<r&&Ot()};if(!h||t.immediate)return void a();const s=Math.max(0,null!=(n=l.renderBatchDelay)?n:16);if(It=null!=It?Math.max(It,i):i,!jt){if(jt=!0,!U&&$&&window.requestIdleCallback){const e=Math.max(0,null!=(o=l.renderBatchIdleTimeoutMs)?o:120);return void(_t=window.requestIdleCallback(e=>{a(e)},{timeout:e}))}P&&!U?Nt=P(()=>{0!==s?Dt=window.setTimeout(()=>a(),s):a()}):Dt=window.setTimeout(()=>a(),s)}}function Ot(){ce.value&&At(W.value?Math.max(1,Math.round(q.value)):Math.max(1,F.value))}function zt(e){var t;if(!ce.value)return;const n=Math.max(2,null!=(t=l.renderBatchBudgetMs)?t:6),o=Math.max(1,F.value||1),r=Math.max(1,Math.floor(o/4));e>1.2*n?q.value=Math.max(r,Math.floor(.7*q.value)):e<.5*n&&q.value<o&&(q.value=Math.min(o,Math.ceil(1.2*q.value)))}function Rt(){return d(this,null,function*(){var e;try{const t=yield Promise.resolve().then(()=>require("./index3.js"));return null!=(e=t.default)?e:t}catch(t){return console.warn('[markstream-vue2] Optional peer dependencies for CodeBlockNode are missing. Falling back to inline-code rendering (no Monaco). To enable full code block features, please install "stream-monaco".',t),Ve}})}function Pt(){return d(this,null,function*(){var e;try{const t=yield Promise.resolve().then(()=>require("./index4.js"));return null!=(e=t.default)?e:t}catch(t){return console.warn('[markstream-vue2] Optional peer dependencies for MermaidBlockNode are missing. Falling back to preformatted code rendering. To enable Mermaid rendering, please install "mermaid".',t),Ve}})}function Ht(){return d(this,null,function*(){var e;try{const t=yield Promise.resolve().then(()=>require("./index5.js"));return null!=(e=t.default)?e:t}catch(t){return console.warn("[markstream-vue2] Optional peer dependencies for InfographicBlockNode are missing. Falling back to preformatted code rendering.",t),Ve}})}function Ut(){return d(this,null,function*(){var e;try{const t=yield Promise.resolve().then(()=>Tt);return null!=(e=t.default)?e:t}catch(t){return console.warn('[markstream-vue2] Optional peer dependencies for D2BlockNode are missing. Falling back to preformatted code rendering. To enable D2 rendering, please install "@terrastruct/d2".',t),Ve}})}m.watch([()=>B.value,()=>B.value.length,()=>ce.value,()=>F.value,()=>Q.value,()=>l.renderBatchDelay,()=>l.indexKey],()=>{var e;const t=B.value.length,n=X.value,o=l.indexKey,r=void 0!==o&&o!==n.key,i=t!==n.total,a=r||i;X.value={key:o,total:t};const s=pe.value,u=null!=(e=l.renderBatchDelay)?e:16,c=s.batchSize!==F.value||s.initial!==Q.value||s.delay!==u||s.enabled!==ce.value;pe.value={batchSize:F.value,initial:Q.value,delay:u,enabled:ce.value},(a||c||!ce.value)&&Et(),(a||c)&&(q.value=Math.max(1,F.value||1)),a&&O.value&&Je({immediate:!0});const d=ye.value;if(!t)return K.value=0,void yt(0);if(!ce.value)return K.value=d,void yt(K.value);const p=r||0===n.total;K.value=p||c?Math.min(d,Q.value):Math.min(K.value,d);const m=Math.max(1,Q.value||F.value||t);K.value<d?At(m,{immediate:!h}):yt(K.value)},{immediate:!0}),m.watch(()=>O.value,e=>{if(!e)return Te(),void Ge();qe(),Je({immediate:!0})},{immediate:!0}),m.watch([()=>B.value.length,()=>O.value],e=>d(this,[e],function*([e,t]){t&&e&&h&&(yield m.nextTick(),Je({immediate:!0}))}),{flush:"post"}),m.watch(()=>i.value,()=>{O.value&&(qe(),Je({immediate:!0}))}),m.watch(()=>B.value.length,()=>{O.value&&Je({immediate:!0})}),m.watch(()=>se.value,e=>{if(e)for(const[t,n]of ee)kt(t,n);else{for(const e of G.values())e.destroy();G.clear();for(const e of Array.from(J.keys()))Lt(e);for(const e of Object.keys(Z))delete Z[e];for(const[e,t]of ee)t&&xt(e,!0)}},{immediate:!1}),m.watch([()=>l.viewportPriority,()=>B.value.length],([e,t])=>{!1!==e?a.value&&t<=200&&(a.value=!1):a.value=!1}),m.watch(()=>K.value,()=>{O.value&&Je({immediate:!0})}),m.watch([he,A,fe,()=>B.value.length,O],()=>{nt()},{immediate:!0}),m.watch([()=>B.value.length,O,A,fe,()=>ie.start,()=>ie.end],([e,t,n,o,r,l])=>{v.value&&g("virtualization",{nodes:e,virtualization:t,maxLiveNodes:n,buffer:o,focusIndex:he.value,scroll:t?(()=>{const e=oe.value||xe();return e?{reverse:Me(e),scrollTop:Math.round(e.scrollTop),scrollTopAbs:Math.round(Math.abs(e.scrollTop)),scrollHeight:Math.round(e.scrollHeight),clientHeight:Math.round(e.clientHeight)}:null})():null,liveRange:{start:r,end:l},rendered:K.value})}),m.watch(()=>ye.value,(e,t)=>{ce.value&&("number"==typeof t&&e<=t||e>K.value&&Ot())}),m.onBeforeUnmount(()=>{Et();for(const e of G.values())e.destroy();G.clear();for(const e of Array.from(J.keys()))Lt(e);Te(),Ge()});const $t=m.computed(()=>l.renderCodeBlocksAsPre?Ve:Rt),Ft={text:Ce,paragraph:Ye,heading:He,code_block:Rt,list:$e,list_item:Ue,blockquote:w,table:Qe,definition_list:x,footnote:Re,footnote_reference:D,footnote_anchor:ze,admonition:Ze,vmr_container:Xe,hardbreak:Pe,link:Se,image:de,thematic_break:We,math_inline:Ne,math_block:De,strong:Ee,emphasis:Oe,strikethrough:Le,highlight:Ae,insert:Be,subscript:_e,superscript:Ie,emoji:M,checkbox:y,checkbox_input:y,inline_code:V,html_inline:Y,reference:je,html_block:Fe},Yt=m.computed(()=>(T.value,N(l.customId))),Vt=m.computed(()=>null!=l.indexKey?String(l.indexKey):"markdown-renderer"),Qt={},Wt=m.computed(()=>s({stream:l.codeBlockStream,darkTheme:l.codeBlockDarkTheme,lightTheme:l.codeBlockLightTheme,monacoOptions:l.codeBlockMonacoOptions,themes:l.themes,minWidth:l.codeBlockMinWidth,maxWidth:l.codeBlockMaxWidth},l.codeBlockProps||{})),Kt=m.computed(()=>({typewriter:l.typewriter})),Xt=m.computed(()=>ae.value.map(e=>{const t=qt(e.node);return u(s({},e),{component:Zt(e.node,t),bindings:Gt(e.node,t),isCodeBlock:"code_block"===e.node.type,indexKey:`${Vt.value}-${e.index}`})}));function qt(e){var t;return"code_block"===(null==e?void 0:e.type)?String(null!=(t=e.language)?t:"").trim().toLowerCase():""}function Zt(e,t){if(!e)return Ke;const n=Yt.value,o=n[String(e.type)];if("code_block"===e.type){const r=null!=t?t:qt(e);if("mermaid"===r)return n.mermaid||Pt;if("infographic"===r)return n.infographic||Ht;if("d2"===r||"d2lang"===r)return n.d2||Ut;if(o)return o;return n.code_block||$t.value}return o||Ft[String(e.type)]||Ke}function Gt(e,t){const n=null!=t?t:qt(e);return"mermaid"===n||"infographic"===n||"d2"===n||"d2lang"===n?Qt:"code_block"===e.type?Wt.value:Kt.value}return{__sfc:!0,props:l,emit:t,MAX_DEFERRED_NODE_COUNT:900,MAX_VIEWPORT_OBSERVER_TARGETS:640,VIEWPORT_PRIORITY_RECOVERY_COUNT:200,containerRef:i,viewportPriorityAutoDisabled:a,SCROLL_PARENT_OVERFLOW_RE:c,isClient:h,debugPerformanceEnabled:v,logPerf:g,resolveViewportRoot:k,instanceMsgId:b,defaultMd:C,customTagCache:j,mdBase:I,mdInstance:_,normalizeCustomTag:E,resolveCustomHtmlTags:L,mergedParseOptions:S,parsedNodes:B,maxLiveNodesResolved:A,virtualizationEnabled:O,viewportPriorityEnabled:z,registerNodeVisibility:R,requestFrame:P,cancelFrame:H,isTestEnv:U,hasIdleCallback:$,resolvedBatchSize:F,resolvedInitialBatch:Q,batchingEnabled:W,renderedCount:K,previousRenderContext:X,adaptiveBatchSize:q,nodeVisibilityState:Z,nodeVisibilityHandles:G,nodeVisibilityFallbackTimers:J,nodeSlotElements:ee,nodeSlotVersion:te,sortedNodeSlots:ne,scrollRootElement:oe,detachScrollHandler:re,pendingFocusSync:le,liveRange:ie,visibleNodes:ae,deferNodes:se,incrementalRenderingActive:ce,previousBatchConfig:pe,shouldObserveSlots:me,liveNodeBufferResolved:fe,focusIndex:he,nodeContentElements:ve,instance:ge,syncNodeRefs:we,desiredRenderedCount:ye,resolveScrollContainer:xe,isReverseFlexScrollRoot:Me,getNormalizedScrollTop:ke,getOffsetTopWithinRoot:be,cleanupScrollListener:Te,setupScrollListener:qe,cancelScheduledFocusSync:Ge,scheduleFocusSync:Je,syncFocusToScroll:et,clamp:tt,updateLiveRange:nt,nodeHeights:ot,heightStats:rt,heightTreeSize:lt,heightSumTree:it,heightKnownTree:at,fenwickUpdate:st,fenwickQuery:ut,fenwickRangeSum:ct,rebuildHeightTrees:dt,recordNodeHeight:pt,averageNodeHeight:mt,estimateHeightRange:ft,topSpacerHeight:ht,bottomSpacerHeight:vt,estimateIndexForOffset:gt,estimateIndexForOffsetFromEnd:wt,cleanupNodeVisibility:yt,markNodeVisible:xt,shouldRenderNode:function(e){return!(ce.value&&e>=K.value)&&(!se.value||e<Q.value||!0===Z[e])},destroyNodeHandle:Mt,setNodeSlotElement:kt,bumpNodeSlotVersion:bt,setNodeContentRef:Ct,batchRaf:Nt,batchTimeout:Dt,batchPending:jt,pendingIncrement:It,batchIdle:_t,VIEWPORT_FALLBACK_DELAY:1800,VIEWPORT_FALLBACK_MARGIN_PX:500,cancelBatchTimers:Et,clearVisibilityFallback:Lt,scheduleVisibilityFallback:St,autoDisableViewportPriority:Bt,scheduleBatch:At,queueNextBatch:Ot,adjustAdaptiveBatchSize:zt,CodeBlockNodeAsync:Rt,MermaidBlockNodeAsync:Pt,InfographicBlockNodeAsync:Ht,D2BlockNodeAsync:Ut,codeBlockComponent:$t,nodeComponents:Ft,customComponentsMap:Yt,indexPrefix:Vt,emptyBindings:Qt,codeBlockBindings:Wt,nonCodeBindings:Kt,renderedItems:Xt,getCodeBlockLanguage:qt,getNodeComponent:Zt,getBindingsFor:Gt,handleContainerClick:function(e){t("click",e)},handleContainerMouseover:function(e){var n;(null==(n=e.target)?void 0:n.closest("[data-node-index]"))&&t("mouseover",e)},handleContainerMouseout:function(e){var n;(null==(n=e.target)?void 0:n.closest("[data-node-index]"))&&t("mouseout",e)}}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{ref:"containerRef",staticClass:"markstream-vue2 markdown-renderer",class:[{dark:n.props.isDark},{virtualized:n.virtualizationEnabled}],attrs:{"data-custom-id":n.props.customId},on:{click:n.handleContainerClick,mouseover:n.handleContainerMouseover,mouseout:n.handleContainerMouseout}},[n.virtualizationEnabled?t("div",{staticClass:"node-spacer",style:{height:`${n.topSpacerHeight}px`},attrs:{"aria-hidden":"true"}}):e._e(),e._l(n.renderedItems,function(o){var r;return t("div",{key:o.index,ref:`node-slot-${o.index}`,refInFor:!0,staticClass:"node-slot",attrs:{"data-node-index":o.index,"data-node-type":o.node.type}},[n.shouldRenderNode(o.index)?t("div",{ref:`node-content-${o.index}`,refInFor:!0,staticClass:"node-content"},[o.isCodeBlock||!1===n.props.typewriter?t(o.component,e._b({tag:"component",attrs:{node:o.node,loading:o.node.loading,"index-key":o.indexKey,"custom-id":n.props.customId,"is-dark":n.props.isDark},on:{copy:function(e){return n.emit("copy",e)},"handle-artifact-click":function(e){return n.emit("handleArtifactClick",e)}}},"component",o.bindings,!1)):t("transition",{attrs:{name:"typewriter",appear:""}},[t(o.component,e._b({tag:"component",attrs:{node:o.node,loading:o.node.loading,"index-key":o.indexKey,"custom-id":n.props.customId,"is-dark":n.props.isDark},on:{copy:function(e){return n.emit("copy",e)},"handle-artifact-click":function(e){return n.emit("handleArtifactClick",e)}}},"component",o.bindings,!1))],1)],1):t("div",{staticClass:"node-placeholder",style:{height:`${null!=(r=n.nodeHeights[o.index])?r:n.averageNodeHeight}px`}})])}),n.virtualizationEnabled?t("div",{staticClass:"node-spacer",style:{height:`${n.bottomSpacerHeight}px`},attrs:{"aria-hidden":"true"}}):e._e()],2)},[],!1,null,"cbc9ba24",null,null).exports,Ze=g(m.defineComponent({__name:"AdmonitionNode",props:{node:null,indexKey:null,isDark:{type:Boolean},typewriter:{type:Boolean},customId:null},emits:["copy"],setup(e,{emit:t}){var n;const o=e,r=m.computed(()=>{if(o.node.title&&o.node.title.trim().length)return o.node.title;const e=o.node.kind||"note";return e.charAt(0).toUpperCase()+e.slice(1)}),l=m.ref(!!o.node.collapsible&&!(null==(n=o.node.open)||n)),i=`admonition-${Math.random().toString(36).slice(2,9)}`;return{__sfc:!0,props:o,emit:t,iconMap:{note:"ℹ️",info:"ℹ️",tip:"💡",warning:"⚠️",danger:"❗",error:"⛔",caution:"⚠️"},displayTitle:r,collapsed:l,toggleCollapse:function(){o.node.collapsible&&(l.value=!l.value)},headerId:i,NodeRenderer:qe}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"admonition",class:[`admonition-${n.props.node.kind}`,n.props.isDark?"is-dark":""]},[t("div",{staticClass:"admonition-header",attrs:{id:n.headerId}},[n.iconMap[n.props.node.kind]?t("span",{staticClass:"admonition-icon"},[e._v(e._s(n.iconMap[n.props.node.kind]))]):e._e(),t("span",{staticClass:"admonition-title"},[e._v(e._s(n.displayTitle))]),n.props.node.collapsible?t("button",{staticClass:"admonition-toggle",attrs:{"aria-expanded":!n.collapsed,"aria-controls":`${n.headerId}-content`,title:n.collapsed?"Expand":"Collapse"},on:{click:n.toggleCollapse}},[n.collapsed?t("span",[e._v("▶")]):t("span",[e._v("▼")])]):e._e()]),t("div",{directives:[{name:"show",rawName:"v-show",value:!n.collapsed,expression:"!collapsed"}],staticClass:"admonition-content",attrs:{id:`${n.headerId}-content`,"aria-labelledby":n.headerId}},[t(n.NodeRenderer,{attrs:{"index-key":`admonition-${e.indexKey}`,nodes:n.props.node.children,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(e){return n.emit("copy",e)}}})],1)])},[],!1,null,"aa22ad80",null,null).exports;let Ge=!1,Je=null,et=!1;function tt(){return d(this,null,function*(){var e;if(Je)return Je;if(et)return null;try{const t=yield Promise.resolve().then(()=>require("./index.legacy.js"));return Je=null!=(e=null==t?void 0:t.default)?e:t,yield function(e){return d(this,null,function*(){if(Ge)return;Ge=!0;const t=null==globalThis?void 0:globalThis.MonacoEnvironment;return!t||"function"!=typeof t.getWorker&&"function"!=typeof t.getWorkerUrl?e.preloadMonacoWorkers():void 0})}(Je),(yield function(e){return d(this,null,function*(){const t=null==e?void 0:e.getOrCreateHighlighter;if("function"!=typeof t)return!0;try{const e=yield t(["vitesse-dark","vitesse-light"],["plaintext","text","javascript"]);return e&&"function"==typeof e.codeToTokens&&e.codeToTokens("const a = 1",{lang:"javascript",theme:"vitesse-dark"}),!0}catch(n){return console.warn("[markstream-vue2] Failed to warm up Shiki tokenizer; disabling stream-monaco for this session.",n),!1}})}(Je))?Je:(Je=null,et=!0,null)}catch(t){return et=!0,null}})}let nt=null;function ot(e){nt=null!=e?e:null}const rt={"":"",javascript:"javascript",js:"javascript",mjs:"javascript",cjs:"javascript",typescript:"typescript",ts:"typescript",jsx:"jsx",tsx:"tsx",golang:"go",py:"python",rb:"ruby",sh:"shell",bash:"shell",zsh:"shell",shellscript:"shell",bat:"shell",batch:"shell",ps1:"powershell",plaintext:"plain",text:"plain","c++":"cpp","c#":"csharp","objective-c":"objectivec","objective-c++":"objectivecpp",yml:"yaml",md:"markdown",rs:"rust",kt:"kotlin"};function lt(e){var t;const n=function(e){if(!e)return"";const t=e.trim();if(!t)return"";const[n]=t.split(/\s+/),[o]=n.split(":");return o.toLowerCase()}(e);return null!=(t=rt[n])?t:n}function it(e){const t=lt(e);if(!t)return"plaintext";switch(t){case"plain":return"plaintext";case"jsx":return"javascript";case"tsx":return"typescript";default:return t}}function at(e){if(nt){const t=nt(e);if(null!=t&&""!==t)return t}switch(lt(e)){case"javascript":case"js":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#e5c890" stroke-linecap="round" stroke-linejoin="round">\n <path d="M4.5 11c0 .828427.6715729 1.5 1.5 1.5.8284271 0 1.5-.671573 1.5-1.5V7.5M12.5 8.75C12.5 8.05964406 11.9627417 7.5 11.3 7.5L10.7 7.5C10.0372583 7.5 9.5 8.05964406 9.5 8.75 9.5 9.44035594 10.0372583 10 10.7 10L11.3 10C11.9627417 10 12.5 10.5596441 12.5 11.25 12.5 11.9403559 11.9627417 12.5 11.3 12.5L10.7 12.5C10.0372583 12.5 9.5 11.9403559 9.5 11.25" />\n <path d="m 4,1.5 h 8 c 1.385,0 2.5,1.115 2.5,2.5 v 8 c 0,1.385 -1.115,2.5 -2.5,2.5 H 4 C 2.615,14.5 1.5,13.385 1.5,12 V 4 C 1.5,2.615 2.615,1.5 4,1.5 Z" />\n </g>\n</svg>\n';case"typescript":case"ts":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round">\n <path d="M4 1.5h8A2.5 2.5 0 0114.5 4v8a2.5 2.5 0 01-2.5 2.5H4A2.5 2.5 0 011.5 12V4A2.5 2.5 0 014 1.5" />\n <path d="M12.5 8.75c0-.69-.54-1.25-1.2-1.25h-.6c-.66 0-1.2.56-1.2 1.25S10.04 10 10.7 10h.6c.66 0 1.2.56 1.2 1.25s-.54 1.25-1.2 1.25h-.6c-.66 0-1.2-.56-1.2-1.25m-3-3.75v5M5 7.5h3" />\n </g>\n</svg>\n';case"jsx":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#99d1db" stroke-linecap="round" stroke-linejoin="round">\n <path d="M8 10.8c4.14 0 7.5-1.25 7.5-2.8S12.14 5.2 8 5.2.5 6.45.5 8s3.36 2.8 7.5 2.8" />\n <path d="M5.52 9.4c2.07 3.5 4.86 5.72 6.23 4.95 1.37-.78.8-4.24-1.27-7.75C8.41 3.1 5.62.88 4.25 1.65c-1.37.78-.8 4.24 1.27 7.75" />\n <path d="M5.52 6.6c-2.07 3.5-2.64 6.97-1.27 7.75 1.37.77 4.16-1.45 6.23-4.95s2.64-6.97 1.27-7.75C10.38.88 7.59 3.1 5.52 6.6" />\n <path d="M8.5 8a.5.5 0 01-.5.5.5.5 0 01-.5-.5.5.5 0 01.5-.5.5.5 0 01.5.5" />\n </g>\n</svg>\n';case"tsx":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round">\n <path d="M8 11.3c4.14 0 7.5-1.28 7.5-2.86S12.14 5.58 8 5.58.5 6.86.5 8.44s3.36 2.87 7.5 2.87Z" />\n <path d="M5.52 9.87c2.07 3.6 4.86 5.86 6.23 5.07 1.37-.8.8-4.34-1.27-7.93S5.62 1.16 4.25 1.95s-.8 4.34 1.27 7.92" />\n <path d="M5.52 7.01c-2.07 3.59-2.64 7.14-1.27 7.93s4.16-1.48 6.23-5.07c2.07-3.58 2.64-7.13 1.27-7.92-1.37-.8-4.16 1.47-6.23 5.06" />\n <path d="M8.5 8.44a.5.5 0 01-.5.5.5.5 0 01-.5-.5.5.5 0 01.5-.5.5.5 0 01.5.5" />\n </g>\n</svg>\n';case"html":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#ef9f76" d="M1.5 1.5h13L13 13l-5 2-5-2z" />\n <path stroke="#c6d0f5" d="M11 4.5H5l.25 3h5.5l-.25 3-2.5 1-2.5-1-.08-1" />\n </g>\n</svg>\n';case"css":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round">\n <path d="m4 1.5h8c1.38 0 2.5 1.12 2.5 2.5v8c0 1.38-1.12 2.5-2.5 2.5h-8c-1.38 0-2.5-1.12-2.5-2.5v-8c0-1.38 1.12-2.5 2.5-2.5z" />\n <path stroke-width=".814" d="m 10.240861,11.529149 c 0,0.58011 0.437448,1.039154 0.96002,1.035371 l 0.451635,-0.0032 c 0.522572,-0.0036 0.949379,-0.451477 0.949379,-1.032848 0,-0.581372 -0.426807,-1.065638 -0.949379,-1.065638 l -0.451635,3.4e-5 c -0.522572,3.9e-5 -0.949379,-0.4855273 -0.949379,-1.0656374 0,-0.5801104 0.426807,-1.0378931 0.949379,-1.0378931 l 0.451635,2.825e-4 c 0.522572,3.267e-4 0.951743,0.4577827 0.951743,1.0378931 M 6.8003972,11.529149 c 0,0.58011 0.4374474,1.039154 0.9600196,1.035371 l 0.46464,-0.0032 c 0.5225722,-0.0035 0.9363738,-0.451477 0.9363738,-1.031587 0,-0.580111 -0.4090724,-1.065638 -0.9316446,-1.065638 l -0.4693692,3.4e-5 c -0.5225722,3.8e-5 -0.949379,-0.4855272 -0.949379,-1.0656373 0,-0.5801104 0.4268068,-1.0378931 0.949379,-1.0378931 h 0.4516348 c 0.5225722,0 0.9635665,0.4577827 0.9635665,1.0378931 M 3.4072246,11.529149 c 0,0.58011 0.4374474,1.051765 0.9600196,1.051765 H 4.818879 c 0.5225722,0 0.949379,-0.456521 0.949379,-1.037893 m 0.01129,-2.1312747 c 0,-0.5801103 -0.4374474,-1.037893 -0.9600196,-1.037893 L 4.3678939,8.3741358 C 3.8453217,8.3744624 3.4078743,8.8420074 3.4078743,9.4233788 v 2.1186642" />\n </g>\n</svg>\n';case"scss":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#f4b8e4" stroke-linecap="round" stroke-linejoin="round" d="M6.75 6.38c1.85 1.07 3.35.74 4.83-.2 1.5-.95 2.7-2.78 1.3-4.15-.7-.68-3.25-.8-5.62.19-2.36.99-4.59 3.02-4.74 4.11-.31 2.19 3.15 2.88 3.64 4.23s.28 1.98-.2 2.83c-.5.85-1.96 1.62-2.8.68-.83-.95 1.67-2.75 2.98-3.25 1.3-.5 3.1-.4 3.69.25.58.64-.07 1.79-.03 1.79" />\n</svg>\n';case"json":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e5c890" stroke-linecap="round" stroke-linejoin="round" d="M4.5 2.5H4c-.75 0-1.5.75-1.5 1.5v2c0 1.1-1 2-1.83 2 .83 0 1.83.9 1.83 2v2c0 .75.75 1.5 1.5 1.5h.5m7-11h.5c.75 0 1.5.75 1.5 1.5v2c0 1.1 1 2 1.83 2-.83 0-1.83.9-1.83 2v2c0 .74-.75 1.5-1.5 1.5h-.5m-6.5-3a.5.5 0 100-1 .5.5 0 000 1m3 0a.5.5 0 100-1 .5.5 0 000 1m3 0a.5.5 0 100-1 .5.5 0 000 1" />\n</svg>\n';case"python":case"py":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#8caaee" d="M8.5 5.5h-3m6 0V3c0-.8-.7-1.5-1.5-1.5H7c-.8 0-1.5.7-1.5 1.5v2.5H3c-.8 0-1.5.7-1.5 1.5v2c0 .8.7 1.5 1.48 1.5" />\n <path stroke="#e5c890" d="M10.5 10.5h-3m-3 0V13c0 .8.7 1.5 1.5 1.5h3c.8 0 1.5-.7 1.5-1.5v-2.5H13c.8 0 1.5-.7 1.5-1.5V7c0-.8-.7-1.5-1.48-1.5H11.5c0 1.5 0 2-1 2h-2" />\n <path stroke="#8caaee" d="M2.98 10.5H4.5c0-1.5 0-2 1-2h2M7.5 3.5v0" />\n <path stroke="#e5c890" d="m 8.5,12.5 v 0" />\n </g>\n</svg>\n';case"ruby":case"rb":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e78284" stroke-linecap="round" stroke-linejoin="round" d="M1.5 9.06v2.5c.02.86.36 1.61.9 2.15 1.76 1.76 5.71.65 8.84-2.47 3.12-3.13 4.23-7.08 2.47-8.84a3.1 3.1 0 00-2.15-.9h-2.5M14.5 4l-.25 10.25L4 14.5m4.39-6.11c2.34-2.35 3.29-5.2 2.12-6.37S6.49 1.8 4.14 4.14C1.8 6.5.85 9.34 2.02 10.51s4.02.22 6.37-2.12M5.5 14.5l.25-3.75L11 11l-.25-5.25 3.75-.25" />\n</svg>\n';case"go":case"golang":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#85c1dc" stroke-linecap="round" stroke-linejoin="round" d="m15.48 8.06-4.85.48m4.85-.48a4.98 4.98 0 01-4.54 5.42 5 5 0 112.95-8.66l-1.7 1.84a2.5 2.5 0 00-4.18 2.06c.05.57.3 1.1.69 1.51.25.27 1 .83 1.78.82.8-.02 1.58-.25 2.07-.81 0 0 .8-.96.68-1.88M2.5 8.5l-2 .01m1.5 2h1.5m-2-3.99 2-.02" />\n</svg>\n';case"r":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#838ba7" d="M13.5 9.5c.63-.7 1-1.54 1-2.43 0-2.52-2.91-4.57-6.5-4.57S1.5 4.55 1.5 7.07c0 1.9 1.65 3.53 4 4.22" />\n <path stroke="#8caaee" d="M10.5 9.5c.4 0 .86.34 1 .7l1 3.3m-5 0v-8h3.05c.95 0 1.95 1 1.95 2s-1 2-1.95 2H7.5Z" />\n </g>\n</svg>\n';case"java":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#c6d0f5" d="M10.73 8.41c.57 3 1.59 5.83 2.77 7.09-6.63-3.45-9.76-1.75-10.5 0-.66-3.4-.54-5.74.09-7.78" />\n <path stroke="#e78284" d="M8.5 7c.63.34 1.82 1.07 2.24 1.41-.54-2.9-.64-5.96-.74-7.91-2.13.58-5.73 1.98-6.9 7.22.52-.69 1.72-1.05 2.4-1.22" />\n <path stroke="#e78284" d="M5.5 7A1.5 1.5 0 007 8.5 1.5 1.5 0 008.5 7 1.5 1.5 0 007 5.5 1.5 1.5 0 005.5 7" />\n </g>\n</svg>\n';case"kotlin":case"kt":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#ca9ee6" d="M2.5 13.5h11L8 8" />\n <path stroke="#ef9f76" d="M8.03 2.5h5.47l-8 8" />\n <path stroke="#e78284" d="M2.5 13.5V8" />\n <path stroke="#85c1dc" d="M8 2.5H2.5V8l3-2.5" />\n </g>\n</svg>\n';case"c":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="m 4.0559072,12.951629 c 2.7459832,2.734744 7.1981158,2.734744 9.9441188,0 l -1.789955,-1.782586 c -1.75742,1.750224 -4.6067879,1.750224 -6.3642294,0 -1.7574416,-1.7502236 -1.7574416,-4.587893 0,-6.338097 1.7574415,-1.750224 4.6068094,-1.750224 6.3642294,0 l 0.894977,-0.8912929 0.894978,-0.891293 c -2.746003,-2.73472867 -7.1981359,-2.73472867 -9.944119,0 -2.7459858,2.7347089 -2.7459858,7.1685599 2e-7,9.9032689 z" clip-rule="evenodd" />\n</svg>\n';case"cpp":case"c++":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="m 2.5559121,12.951629 c 2.7459832,2.734744 7.1981158,2.734744 9.9441189,0 l -1.789955,-1.782586 c -1.7574201,1.750224 -4.606788,1.750224 -6.3642295,0 -1.7574416,-1.7502236 -1.7574416,-4.587893 0,-6.338097 1.7574415,-1.750224 4.6068094,-1.750224 6.3642295,0 l 0.894977,-0.8912929 0.894978,-0.891293 c -2.7460031,-2.73472867 -7.198136,-2.73472867 -9.9441191,0 -2.74598585,2.7347089 -2.74598585,7.1685599 2e-7,9.9032689 z" clip-rule="evenodd" />\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="M7.5 6v4M5.513524 7.9999996H9.51304M13.486476 5.9999996v4M11.5 7.9999992h3.999516" />\n</svg>\n';case"cs":case"csharp":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" d="m 6.665625,1.0107144 c 0.54375,0.090628 0.9125,0.6062693 0.821875,1.1500367 L 7.18125,3.9983098 h 2.971875 L 10.5125,1.8326156 c 0.09063,-0.5437673 0.60625,-0.9125291 1.15,-0.8219012 0.54375,0.090628 0.9125,0.6062693 0.821875,1.1500367 L 12.18125,3.9983098 H 14 c 0.553125,0 1,0.4468892 1,1.0000319 0,0.5531426 -0.446875,1.0000319 -1,1.0000319 H 11.846875 L 11.18125,9.9985013 H 13 c 0.553125,0 1,0.4468897 1,1.0000317 0,0.553143 -0.446875,1.000032 -1,1.000032 H 10.846875 L 10.4875,14.164259 c -0.09063,0.543768 -0.60625,0.912529 -1.15,0.821902 -0.54375,-0.09063 -0.9125,-0.60627 -0.821875,-1.150037 l 0.30625,-1.834434 h -2.975 L 5.4875,14.167384 c -0.090625,0.543768 -0.60625,0.91253 -1.15,0.821902 C 3.79375,14.898658 3.425,14.383016 3.515625,13.839249 L 3.81875,11.998565 H 2 c -0.553125,0 -1,-0.446889 -1,-1.000032 C 1,10.445391 1.446875,9.9985013 2,9.9985013 H 4.153125 L 4.81875,5.9983736 H 3 c -0.553125,0 -1,-0.4468893 -1,-1.0000319 C 2,4.445199 2.446875,3.9983098 3,3.9983098 H 5.153125 L 5.5125,1.8326156 C 5.603125,1.2888483 6.11875,0.9200865 6.6625,1.0107144 Z M 6.846875,5.9983736 6.18125,9.9985013 H 9.153125 L 9.81875,5.9983736 Z" />\n</svg>\n';case"php":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="M0.5,12.5 L0.5,13.24 C0.5,14 1.27360724,14.5 2,14.5 C2.9375516,14.5 3.5,14 3.5,13.2445661 L3.5,6.00089968 C3.5,4.28551107 4.99401107,2.52263547 7.14960413,2.5 C9.49387886,2.5 11,4.0579782 11,5.5 C11.1657296,8.48962302 9.57820404,9.63684469 7.49621582,10.5 L7.49621582,14.5 L15.4979764,14.5 L15.4979764,9 C15.5394484,8.36478228 14.9387379,7.15595371 14.1308258,6.5 C13.1942239,5.80827275 12.0584852,5.50253264 11,5.5 M11.5,14.5 L11.5,11.5 M6,6.5 C6.27614237,6.5 6.5,6.27614237 6.5,6 C6.5,5.72385763 6.27614237,5.5 6,5.5 C5.72385763,5.5 5.5,5.72385763 5.5,6 C5.5,6.27614237 5.72385763,6.5 6,6.5 Z" />\n</svg>\n';case"scala":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e78284" stroke-linecap="round" stroke-linejoin="round" d="m2.5 2.48 11-.98v3.04l-11 1zm0 5 11-.98v3.04l-11 1zm0 5 11-.98v3.04l-11 1z" />\n</svg>\n';case"shell":case"sh":case"bash":case"zsh":case"powershell":case"ps1":case"bat":case"batch":case"shellscript":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round">\n <path d="M2 15.5c-.7 0-1.5-.8-1.5-1.5V5c0-.7.8-1.5 1.5-1.5h9c.7 0 1.5.8 1.5 1.5v9c0 .7-.8 1.5-1.5 1.5z" />\n <path d="m1.2 3.8 3.04-2.5S5.17.5 5.7.5h8.4c.66 0 1.4.73 1.4 1.4v7.73a2.7 2.7 0 01-.7 1.75l-2.68 3.51M3 8.5l3 2-3 2m4 0h2" />\n </g>\n</svg>\n';case"sql":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e5c890" stroke-linecap="round" stroke-linejoin="round" d="M8 6.5c3.59 0 6.5-1.4 6.5-2.68S11.59 1.5 8 1.5 1.5 2.54 1.5 3.82 4.41 6.5 8 6.5M14.5 8c0 .83-1.24 1.79-3.25 2.2s-4.49.41-6.5 0S1.5 8.83 1.5 8m13 4.18c0 .83-1.24 1.6-3.25 2-2.01.42-4.49.42-6.5 0-2.01-.4-3.25-1.17-3.25-2m0-8.3v8.3m13-8.3v8.3" />\n</svg>\n';case"yaml":case"yml":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e78284" stroke-linecap="round" stroke-linejoin="round" d="M2.5 1.5h3l3 4 3-4h3l-9 13h-3L7 8z" />\n</svg>\n';case"markdown":case"md":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#85c1dc" stroke-linecap="round" stroke-linejoin="round" d="m9.25 8.25 2.25 2.25 2.25-2.25M3.5 11V5.5l2.04 3 1.96-3V11m4-.5V5M1.65 2.5h12.7c.59 0 1.15.49 1.15 1v9c0 .51-.56 1-1.15 1H1.65c-.59 0-1.15-.49-1.15-1V3.58c0-.5.56-1.08 1.15-1.08" />\n</svg>\n';case"xml":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round" d="M4.5 4.5 1 8 4.5 11.5M11.5 4.5 15 8 11.5 11.5M9.5 2 6.5 14" />\n</svg>\n';case"rust":case"rs":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round">\n <path d="M15.5 9.5Q8 13.505.5 9.5l1-1-1-2 2-.5V4.5h2l.5-2 1.5 1 1.5-2 1.5 2 1.5-1 .5 2h2V6l2 .5-1 2z" />\n <path d="M6.5 7.5a1 1 0 01-1 1 1 1 0 01-1-1 1 1 0 011-1 1 1 0 011 1m5 0a1 1 0 01-1 1 1 1 0 01-1-1 1 1 0 011-1 1 1 0 011 1M4 11.02c-.67.37-1.5.98-1.5 2.23s1.22 1.22 2 1.25v-2M12 11c.67.37 1.5 1 1.5 2.25s-1.22 1.22-2 1.25v-2" />\n </g>\n</svg>\n';case"swift":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round" d="M14.34 10.2c.34-1.08 1.1-5.07-4.45-8.62a.48.48 0 00-.6.07.44.44 0 00-.02.6c.03.02 2.07 2.5 1.34 5.34-1.26-.86-6.24-4.81-6.24-4.81L7.25 7.5 1.9 4.05S5.68 8.7 8 10.45c-1.12.4-3.56.82-6.78-1.18a.48.48 0 00-.58.06.44.44 0 00-.08.56c.11.18 2.7 4.36 8.14 4.36 1.5 0 2.37-.42 3.08-.77.43-.2.77-.37 1.14-.37.93 0 1.54.92 1.54.93.1.14.27.22.44.21a.46.46 0 00.4-.28c.67-1.55-.49-3.2-.96-3.78h0Z" />\n</svg>\n';case"perl":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="M12.5 14.5v-3.34c-1-.66-1-1.35-1-2.66m-3 1 .02 2.53.98 2.47m-4-5v5m9 0V9.23s.17-1.73-1-1.73c0-1.5-.5-6-2.5-6S8.75 4.25 8.75 4.25A3.67 3.67 0 006.5 7.12v-3.5c0-.63-.85-1.32-1.5-1.32-.92 0-1.33.59-1.5 1.2H2.25c-.42.11-.75.59-.75 1 0 .5.28 1 .75 1h1.22l.02 3c.01.75.51 1 1.51 1h4.5" />\n</svg>\n';case"lua":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#c6d0f5" d="M10.5 7A1.5 1.5 0 019 8.5 1.5 1.5 0 017.5 7 1.5 1.5 0 019 5.5 1.5 1.5 0 0110.5 7" />\n <path stroke="#8caaee" d="M7 2.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13m7-2a1.5 1.5 0 100 3 1.5 1.5 0 000-3" />\n </g>\n</svg>\n';case"haskell":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="M12.5 4.5h3m-1.5 3h1.5m-10 6 2.5-5-2.5-5H8l5.6 10h-2.53l-1.52-2.92L8 13.5zm-5 0 2.5-5-2.5-5H3l2.5 5-2.5 5z" />\n</svg>\n';case"erlang":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#e78284" stroke-linecap="round" stroke-linejoin="round">\n <path d="M6.5 5.5c0-1.25 1-2 2-2s2 .75 2 2z" />\n <path d="M13.5 13c.47-.57 1.12-1.24 1.5-2l-2.25-1.25c-.74 1.36-1.76 2.75-3.25 2.75-2.1 0-3-2.3-3-5h8c.05-1.61-.31-3.45-1-4.5M3 13c-1.08-1.3-1.5-3-1.5-5S2.1 4.24 3 3" />\n </g>\n</svg>\n';case"clojure":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#a6d189" d="M14.17 10.03A6.5 6.5 0 011.81 6.02" />\n <path stroke="#8caaee" d="M1.87 5.85A6.5 6.5 0 0114.22 9.9" />\n <path stroke="#a6d189" d="M6.36 4.9a3.5 3.5 0 103.41 6.12" />\n <path stroke="#8caaee" d="M9.77 11.02a3.5 3.5 0 00-3.03-6.29" />\n <path stroke="#c6d0f5" d="M8 7.5s-1.66 2.48-1.5 3.65" />\n <path stroke="#c6d0f5" d="M1.81 6.02C2.47 5 3.83 4.49 5 4.46c4.06 0 3 5.56 5.03 6.86 1.21.52 3.5-.21 4.15-1.32" />\n </g>\n</svg>\n';case"vue":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#a6d189" stroke-linecap="round" stroke-linejoin="round">\n <path d="M1 1.5h5.44L8 4.56 9.56 1.5H15l-6.99 13z" />\n <path d="M12.05 1.73 8 9.28 3.95 1.73" />\n </g>\n</svg>\n';case"svg":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round" d="m4.54 10 6.92-4m-6.92 4a1.5 1.5 0 10-2.6 1.5 1.5 1.5 0 002.6-1.5M8 4v8m0-8a1.5 1.5 0 100-3 1.5 1.5 0 000 3M4.54 6l6.92 4M4.54 6a1.5 1.5 0 10-2.6-1.5A1.5 1.5 0 004.54 6M8 12a1.5 1.5 0 100 3 1.5 1.5 0 000-3m3.46-2a1.5 1.5 0 102.6 1.5 1.5 1.5 0 00-2.6-1.5m0-4a1.5 1.5 0 102.6-1.5 1.5 1.5 0 00-2.6 1.5" />\n</svg>\n';case"mermaid":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="M1.5 2.5c0 6 2.25 5.75 4 7 .83.67 1.17 2 1 4h3c-.17-2 .17-3.33 1-4 1.75-1.25 4-1 4-7C12 2.5 10 3 8 7 6 3 4 2.5 1.5 2.5" />\n</svg>\n';case"dart":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#85c1dc" stroke-linecap="round" stroke-linejoin="round">\n <path d="M7 14.5h4.5v-3h3V7L9.17 1.64c-.28-.29-.8-.47-1.17-.29L3.5 3.5 1.35 8c-.18.37 0 .88.3 1.17z" />\n <path d="M3.5 11V3.5H11m-7.5 0 8 8" />\n </g>\n</svg>\n';case"assembly":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <rect width="8" height="13.001" x="4" y="1.499" fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round" rx="2.286" ry="2.286" />\n <path fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round" d="M 4,4.500025 H 1.5 M 4,7.9999993 H 1.5 M 4,11.499973 H 1.5 m 13,-6.999948 H 12 m 2.5,3.4999743 H 12 m 2.5,3.4999737 H 12" />\n</svg>\n';case"dockerfile":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="M.5 8.5H11l.75-.5a5.35 5.35 0 010-3.5c1 .6 1 1.88 1.74 2 .77-.09 1.23.01 2 .52 0 0-.97 1.77-2.5 1.98-1.93 3.65-4.5 5.5-6.98 5.5C0 14.5.5 8.5.5 8.5m1 0v-2m0 0h8m-6 2v-4m0 0h4m-2-2h2m-2 6v-6m2 6v-6m2 6v-2" />\n</svg>\n';case"fortran":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="M7.5 14.5v-1l-1-1v-3h2l1 2h1v-6h-1l-1 2h-2v-4h5l1 3h1v-5h-11v1l1 1v9l-1 1.25v.75z" />\n</svg>\n';case"lisp":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#e78284" stroke-linecap="round" stroke-linejoin="round">\n <path d="M.5 5.06v6.07C.5 12.41.82 13 2.27 13h5.6c1.04 0 1.63-.51 1.63-1.62 0-.85-.2-1.88-1.5-1.88h-.36C6.4 9.5 6 8.77 6 7.75 6 6.81 6.8 6 7.49 6h2.68" />\n <path d="M3.5 10.5V4.99C3.5 3.89 3.62 3 5 3h9c.97 0 1.5.99 1.5 1.63.12 1.55-.98 1.62-2.1 2.16-.58.26-1.4.52-1.4.98V11" />\n </g>\n</svg>\n';case"ocaml":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round">\n <path d="M1.5 8V3c0-.83.67-1.5 1.5-1.5h10c.83 0 1.5.67 1.5 1.5v10c0 .83-.67 1.5-1.5 1.5H9" />\n <path d="m1.5 8 1.14-2.3q.09-.21.36-.24a.8.8 0 01.44.13c.18.12.23.53.28.64.06.1.64 1.23.85 1.23.2 0 .71-1.47.71-1.47s.37-.49.72-.49.55.32.67.49c.12.16.24 1.76.46 2.01s1.32.87 1.67.73c.34-.13.53-.4.63-.73.1-.34-.14-.75 0-1a1.1 1.1 0 011.02-.55c.56.03 2.05.56 2.05 1.05q0 .75-1.5.75c-.48 1.33.28 2.22-3 2.25l1 4" />\n <path d="m4.5 14.5 1.5-4 1 4zm-2 0 1.5-4-1.5-.5-1 1.54V14l1 .49Z" />\n </g>\n</svg>\n';case"prolog":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round" d="M4.5 13.5c-.33.33-.5.67-.5 1s.17.67.5 1c.17-.67.5-1 1-1s.83.33 1 1c.33-.33.5-.83.5-1.5h2c0 .67.17 1.17.5 1.5.17-.67.5-1 1-1s.83.33 1 1c.33-.33.5-.67.5-1s-.17-.67-.5-1l1-1 1.25 1.25c0-2.75 1-2.75 1-5.75a7.1 7.1 0 00-2-5.25A3.64 3.64 0 0113 .5c-1.17 0-2 .42-2.5 1.25A3.08 3.08 0 008 .5c-1 0-1.83.42-2.5 1.25C5 .92 4.17.5 3 .5c.5.83.58 1.58.25 2.25a7.1 7.1 0 00-2 5.25c0 3 1 3 1 5.75L3.5 12.5zm6-5a2 2 0 100-4 2 2 0 000 4m-5 0a2 2 0 100-4 2 2 0 000 4M7 8l1 2.5L9 8m1.5-1.5" />\n</svg>\n';case"groovy":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#85c1dc" stroke-linecap="round" stroke-linejoin="round">\n <path d="M11.68 5.38c.4.19.54.68 1.53 3.25 1 2.57-.92 4.07-.92 4.07s-6.73 2.47-6.73 1.63c-.18-.92-1.92-2.08-1.92-2.08s-.52-.63.06-.75c5.89-1.27 6.96-.61 7.3-2" />\n <path d="M7.38 10.63C2.62 10.88 2.48 8.08 2.5 8 3.6 4.6 9.24.91 10.8 1.58 14.07 3.04 9.2 8.96 7 8.5c-4.02-.83 1.5-4 1.5-4" />\n </g>\n</svg>\n';case"matlab":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#85c1dc" d="M4 11 .5 8.5 5 7q.78-1.77 1.89-1.89c.74-.07 1.94-1.28 3.61-3.61M5 7l1.5 1.5" />\n <path stroke="#ef9f76" d="m15.5 12.5-5-11C8.5 6.83 6.33 10 4 11c1.67-.33 2.67.83 3 3.5 3.5-1.5 3.5-3.5 5-4s1.5 1.5 3.5 2" />\n </g>\n</svg>\n';case"cobol":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="M6.74 2.24c.32-1.32 2.2-1.32 2.52 0a1.3 1.3 0 001.93.8c1.15-.7 2.48.62 1.77 1.77a1.3 1.3 0 00.8 1.93c1.32.32 1.32 2.2 0 2.52a1.3 1.3 0 00-.8 1.93c.7 1.15-.62 2.48-1.77 1.77a1.3 1.3 0 00-1.93.8c-.32 1.32-2.2 1.32-2.52 0a1.3 1.3 0 00-1.93-.8c-1.15.7-2.48-.62-1.77-1.77a1.3 1.3 0 00-.8-1.93c-1.32-.32-1.32-2.2 0-2.52a1.3 1.3 0 00.8-1.93c-.7-1.15.62-2.48 1.77-1.77a1.3 1.3 0 001.93-.8M10 6.5a2.5 2.5 0 100 3" />\n</svg>\n';case"ada":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">\x3c!-- Icon from VSCode Icons by Roberto Huertas - https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE --\x3e<path fill="#0f23c3" d="M24.554 20.075c.209.27 1.356.961 1.37 1.246a7 7 0 0 0-1.4-.324a17 17 0 0 1-1.412-.48a9.2 9.2 0 0 1-2.375-1.3A3.15 3.15 0 0 1 19.3 16.75a1.72 1.72 0 0 1 1.767-1.822a3.6 3.6 0 0 1 1.593.321c.146.066 1.31.606 1.256.809a5.5 5.5 0 0 0-1.41-.112c-.649.244-.4.828-.168 1.311a8 8 0 0 0 1.078 1.554c.164.194.884 1.271 1.138 1.264"/><path fill="#1a1978" d="M24.141 16.276c.128-.59.819-1.384 1.344-.773a4.2 4.2 0 0 1 .578 1.918c.12.656.2 1.327.261 1.982c.038.379.34 1.794.123 2.075a23 23 0 0 1-2.922-2.838a3.76 3.76 0 0 1-.925-1.7c-.1-1.073.879-.73 1.541-.664"/><path fill="#0f23c3" d="M26.3 17.781c.141-.732-.406-2.592-1.067-2.949a.06.06 0 0 0 .044-.007c-.156-.444-1.359 1.116-1.228 1.174c-.316-.138.774-1.984.988-2.16c.7-.578 1.372-.086 1.845.543a6.04 6.04 0 0 1 .733 4.434a4.5 4.5 0 0 1-.421 1.312c-.1.22-.45 1.1-.682 1.174a14.8 14.8 0 0 0-.212-3.521"/><path fill="#d2d2d2" d="M3.687 8.4c.179-.188-.041-1.527.324-1.548c.262-.015.553 1.741.627 1.968a9.2 9.2 0 0 0 1.127 2.329a7.53 7.53 0 0 0 4.016 2.978a4.55 4.55 0 0 0 2.366.2c.931-.208 1.82-.577 2.757-.765c1.35-.27 3.342-.352 4.438.647c.7.641.376.76.043 1.421a2.44 2.44 0 0 0 .178 2.562c.235.342 1.033.827.675 1.094c-.567.424-1.277-.452-1.636-.776c-1.4-1.264-2.711-1.313-4.492-1.074a9 9 0 0 1-4.883-.708A9.47 9.47 0 0 1 3.687 8.4M19.941 30a3.6 3.6 0 0 1-2.325-.817c.469-.092 1.021.025 1.508-.044a9.7 9.7 0 0 0 1.754-.43a10.5 10.5 0 0 0 3.022-1.554a6.55 6.55 0 0 0 2.757-5.214c.149-.088.316 1.034.319 1.091a5.8 5.8 0 0 1-.19 1.727a6.9 6.9 0 0 1-1.423 2.774A7.3 7.3 0 0 1 19.941 30"/><path fill="#d2d2d2" d="M18.962 19.109a5.8 5.8 0 0 1-2.05.859a13.4 13.4 0 0 1-2.224.549a8.86 8.86 0 0 1-4.435-.51a9.94 9.94 0 0 1-3.849-2.4c-.352-.367-2.104-2.417-1.548-3.05c.248-.282.875.846 1 .992a5 5 0 0 0 1.357 1.11a10.9 10.9 0 0 0 4.035 1.456a6.7 6.7 0 0 0 2.34-.094a13 13 0 0 1 1.694-.485a4 4 0 0 1 2.113.457c.344.17 1.523.743 1.567 1.116m9.351-4.031a19.3 19.3 0 0 1-.453 3.774c-.176-.242.016-1.47 0-1.792a6 6 0 0 0-.384-2.087a4.9 4.9 0 0 0-1.376-1.661a15 15 0 0 1-1.27-1.536c-1.837-2.382-3.245-5.211-2.9-8.3c.034-.308.069-1.448.411-1.445c.152 0 .266 1.561.29 1.718a12.5 12.5 0 0 0 1.224 4.116c.67 1.222 1.947 2.023 2.825 3.1a6.58 6.58 0 0 1 1.633 4.113M15.7 26.935a10.85 10.85 0 0 0 6.436-.687a6.94 6.94 0 0 0 4.278-4.418c.319.2-.048 1.529-.128 1.781a5.7 5.7 0 0 1-1.01 1.813a8.9 8.9 0 0 1-3.257 2.514c-1.703.772-5.662 1.652-6.319-1.003"/><path fill="#d2d2d2" d="M19.151 19.376c.367 2.107-2.957 3.124-4.478 3.213c-1.859.11-4.929-.292-6.06-2.031c-.673-1.035.781-.09 1.188.058a8.7 8.7 0 0 0 3.06.5a11.6 11.6 0 0 0 3.305-.5a14 14 0 0 0 1.533-.576c.301-.132 1.124-.691 1.452-.664m4.991 4.084c.4-.945-1.883-1.578-2.445-1.858a4.9 4.9 0 0 1-1.315-.867c-.181-.181-.872-.92-.807-1.219a5 5 0 0 1 1.087-.175a6 6 0 0 1 .855.588a10 10 0 0 0 .964.5a16 16 0 0 0 2.119.771c.308.09 1.549.208 1.727.428c-.04.296-1.97 2.021-2.185 1.832"/><path fill="#d2d2d2" d="M26.1 22.172c.265.43-1.08 1.831-1.363 2.105a9.3 9.3 0 0 1-2.566 1.728a7.8 7.8 0 0 1-2.56.753c-.679.058-1.966-.124-2.141-.979a7 7 0 0 1 1.177-.086c.462-.059.921-.149 1.376-.246a13 13 0 0 0 2.184-.645a11.5 11.5 0 0 0 2.084-1.11a11 11 0 0 0 1.078-.822c.105-.089.617-.702.731-.698m-7.342-10.207c-.1-1.308 2.612-1.3 3.271-1.092a5.98 5.98 0 0 1 2.982 2.475c-1.082.8-2.449.094-3.3-.654a4.3 4.3 0 0 0-1.481-1.029c-.809-.265-.818.094-1.472.3"/><path fill="#d2d2d2" d="M25.783 13.341c-.444-.029-.316.071-.647-.212c-.358-.307-.614-.795-.945-1.141c-.534-.558-1.242-.895-1.723-1.485a7.27 7.27 0 0 1-1.624-4.848c.018-1.489.407.187.551.675a12.3 12.3 0 0 0 1.126 2.708a46 46 0 0 0 3.4 4.321c-.039.002-.097-.021-.138-.018m-5.715 1.415c.033-.625-.911-.792-1.211-1.42c-.164-.343-.211-.569.029-.7c.082-.045.383.012.5-.02c.271-.076.335-.273.581-.4a1.193 1.193 0 0 1 1.633 1.021a1.82 1.82 0 0 1-1.532 1.519"/><path fill="#d2d2d2" d="M20.5 14.745a1.93 1.93 0 0 0 1.323-1.7c.524.139.928.658 1.521.771a2.6 2.6 0 0 0 1.029-.017c.207-.045.54-.274.721-.259c-.033.163-.464.546-.565.717a4.2 4.2 0 0 0-.388.9c-.229.741-.061.739-.709.311a4.3 4.3 0 0 0-1.957-.72c-.266-.026-.881.019-.975-.003m-.595 5.989a2.01 2.01 0 0 1-1.4 1.712c-.205.091-2.018.733-2.032.348c-.007-.2 1.624-.954 1.809-1.11a3.4 3.4 0 0 0 .867-1.071c.055-.112.232-.925.271-.943c.224-.106.488.93.485 1.064m-8.532-8.202a10.6 10.6 0 0 1 3.71-.914a10.3 10.3 0 0 1 1.865.024c.366.039 1.469.054 1.74.343a.255.255 0 0 1-.273.173c-.037.077.251.371.3.425c-.034.034-1.445-.4-1.572-.424a10.6 10.6 0 0 0-2.282-.134a16 16 0 0 0-1.841.194a6.2 6.2 0 0 1-1.647.313m11.139-1.801a1.89 1.89 0 0 1-1.517-.6c-.247-.349-.737-1.692-.385-2.021c.209-.2.384.662.484.846a11 11 0 0 0 1.418 1.775m5.276 8.469a19 19 0 0 1-.749 3.313c-.173-.077-.275-.778-.562-.95a4.1 4.1 0 0 0 .76-1.154c.152-.302.303-1.046.551-1.209m-7.807-7.357c-.132.268-.932 1.1-1.118.481c-.107-.356.876-.841 1.118-.481m-.747.45c.228.006.012-.248.012-.266c-.001-.043-.368.266-.012.266"/></svg>';case"julia":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#a6d189" d="M10.5 5a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0" />\n <path stroke="#e78284" d="M6.5 11a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0" />\n <path stroke="#ca9ee6" d="M14.5 11a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0" />\n </g>\n</svg>\n';case"elixir":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="M8.03 14.5C5 14.5 3.5 12.49 3.5 10.01c0-2.82 2.25-7.02 4.62-8.48a.24.24 0 01.24 0c.08.04.12.12.11.2-.13 1.25.22 2.5.98 3.54.3.43.63.8 1.02 1.27.54.66.94 1.03 1.52 2.08l.01.02c.33.56.5 1.2.5 1.84 0 2.03-1.69 4.02-4.47 4.02" />\n</svg>\n';case"vb.net":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">\x3c!-- Icon from VSCode Icons by Roberto Huertas - https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE --\x3e<path fill="#00519a" d="M6.67 7.836L9 18.915l2.336-11.079H16l-4.664 16.328H6.672L2 7.836Zm11.661 0h7.6a4.08 4.08 0 0 1 2.9 1.749a3.8 3.8 0 0 1 .571 2.04a4 4 0 0 1-.571 2.034a4.1 4.1 0 0 1-2.341 1.763a4.1 4.1 0 0 1 2.929 1.756a3.8 3.8 0 0 1 .58 2.1a4.66 4.66 0 0 1-.579 2.546a5.05 5.05 0 0 1-3.5 2.338h-7.589ZM23 14.252h1.166a1.754 1.754 0 0 0 0-3.5H23Zm0 7h1.39a2.047 2.047 0 0 0 0-4.089H23Z"/></svg>';case"nim":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e5c890" stroke-linecap="round" stroke-linejoin="round" d="M1 7 .5 4.5l1.01.67c.28-.27.47-.48 1.18-.85l.56-1.82L4.5 3.84c.77-.18 1.53-.36 2.4-.33L8 1.5l1.1 2.01c.87-.03 1.63.15 2.4.33l1.25-1.34.56 1.82c.7.37.9.58 1.18.85l1.01-.67L15 7m-1.5 1C13 6.5 11 5.5 8 5.5S3 6.5 2.5 8m11.5.75L13.5 8l-1 1.5-1.5.5-3-1.5L5 10l-1.5-.5-1-1.5-.5.75L1 7l1.25 3.75C3 12.75 6 13.5 8 13.5s5-.75 5.75-2.75L15 7z" />\n</svg>\n';case"crystal":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round" d="m 15.4712,10.050637 -5.433601,5.433968 c -0.015,0.01505 -0.04554,0.01505 -0.09055,0.01505 L 2.536327,13.517264 c -0.015,0 -0.04501,-0.01505 -0.06055,-0.06072 L 0.50026325,6.0396501 a 0.21432208,0.21495127 0 0 1 0.015,-0.090817 L 5.9483283,0.5154023 c 0.015,-0.0150465 0.04501,-0.0150465 0.09055,-0.0150465 l 7.4101857,1.997972 c 0.015,0 0.04501,0.015046 0.06055,0.060724 l 1.977121,7.4158186 c 0.03001,0.03063 0.01608,0.060724 -0.01554,0.07577 M 8.2121063,4.1480782 0.93801425,6.1154197 q -0.0225,0 0,0.04514 L 6.2655263,11.50371 c 0.015,0.01505 0.015,0 0.04501,0 l 1.962119,-7.2803988 c -0.03054,-0.075233 -0.06055,-0.075233 -0.06055,-0.075233" />\n</svg>\n';case"d":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">\x3c!-- Icon from VSCode Icons by Roberto Huertas - https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE --\x3e<defs><linearGradient id="SVGMV3iTbAN" x1="185.455" x2="181.955" y1="1601.641" y2="1630.224" gradientTransform="translate(-62.523 -666.646)scale(.427)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#fff" stop-opacity="0"/></linearGradient><linearGradient id="SVGniw2Mvsa" x1="176.136" x2="172.636" y1="1600.5" y2="1629.083" href="#SVGMV3iTbAN"/></defs><path fill="#b03931" d="m3.978 15.462l-.009-6.953a.59.59 0 0 1 .531-.562h.076l6.074-.009a15.7 15.7 0 0 1 6.067.95a8.9 8.9 0 0 1 2.244 1.359a4.47 4.47 0 0 1 2.946-1.083a4.11 4.11 0 0 1 4.276 3.92A4.11 4.11 0 0 1 21.907 17c-.089 0-.177-.008-.265-.012a7 7 0 0 1-.232.953a85 85 0 0 1 8.59 2.6V2H2v13.4q.992.02 1.978.062m22.8-7.944a1.32 1.32 0 0 1 1.374 1.259a1.379 1.379 0 0 1-2.747 0a1.32 1.32 0 0 1 1.375-1.26Z"/><path fill="#b03931" d="M17.861 15.787a4.11 4.11 0 0 0-1.748-3.458a5.8 5.8 0 0 0-1.508-.822a7.4 7.4 0 0 0-1.629-.438a22 22 0 0 0-2.588-.1H7.769l.006 4.737a89 89 0 0 1 9.91 1.408a5 5 0 0 0 .176-1.327m3.132 3.192a7.9 7.9 0 0 1-2.128 2.582a9.7 9.7 0 0 1-3.256 1.71a11.6 11.6 0 0 1-1.971.472h-.015a32 32 0 0 1-3.326.111l-5.625.022a.616.616 0 0 1-.686-.681l-.01-7.734Q2.992 15.42 2 15.4V30h28v-9.456a85 85 0 0 0-8.59-2.6a7 7 0 0 1-.417 1.035"/><path fill="url(#SVGMV3iTbAN)" d="M20.993 18.979a7.9 7.9 0 0 1-2.128 2.582a9.7 9.7 0 0 1-3.256 1.71a11.6 11.6 0 0 1-1.971.472h-.015a32 32 0 0 1-3.326.111l-5.625.022a.616.616 0 0 1-.686-.681l-.01-7.734Q2.992 15.42 2 15.4V30h28v-9.456a85 85 0 0 0-8.59-2.6a7 7 0 0 1-.417 1.035" opacity=".3"/><path fill="#b03931" d="M10.477 20.835a16 16 0 0 0 2.877-.2a7.6 7.6 0 0 0 1.628-.5a5.6 5.6 0 0 0 1.187-.748a4.46 4.46 0 0 0 1.518-2.271a89 89 0 0 0-9.91-1.408l.006 5.133Z"/><path fill="url(#SVGniw2Mvsa)" d="M10.477 20.835a16 16 0 0 0 2.877-.2a7.6 7.6 0 0 0 1.628-.5a5.6 5.6 0 0 0 1.187-.748a4.46 4.46 0 0 0 1.518-2.271a89 89 0 0 0-9.91-1.408l.006 5.133Z" opacity=".3"/><path fill="#fff" d="M20.383 11.746a7 7 0 0 1 1.36 4.148a6.6 6.6 0 0 1-.1 1.1c.088 0 .176.012.265.012a4.11 4.11 0 0 0 4.276-3.92a4.11 4.11 0 0 0-4.276-3.92a4.47 4.47 0 0 0-2.946 1.083a8 8 0 0 1 1.421 1.497"/><ellipse cx="26.78" cy="8.777" fill="#fff" rx="1.374" ry="1.259"/><path fill="#fff" d="m4.673 23.877l5.625-.022a32 32 0 0 0 3.326-.111h.015a11.5 11.5 0 0 0 1.971-.472a9.7 9.7 0 0 0 3.256-1.71a7.9 7.9 0 0 0 2.128-2.582a7 7 0 0 0 .417-1.034a7 7 0 0 0 .332-2.051a7 7 0 0 0-1.36-4.148a8 8 0 0 0-1.421-1.5a8.9 8.9 0 0 0-2.244-1.359a15.7 15.7 0 0 0-6.067-.95l-6.074.009h-.076a.59.59 0 0 0-.532.562l.009 6.952l.01 7.734a.616.616 0 0 0 .685.682m3.1-12.908h2.619a22 22 0 0 1 2.588.1a7.4 7.4 0 0 1 1.629.438a5.8 5.8 0 0 1 1.508.822a4.12 4.12 0 0 1 1.748 3.458a5 5 0 0 1-.175 1.327a4.46 4.46 0 0 1-1.518 2.271a5.6 5.6 0 0 1-1.187.748a7.7 7.7 0 0 1-1.628.5a16 16 0 0 1-2.877.2H7.786L7.78 15.7Z"/></svg>';case"applescript":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round" d="M14.4561802 11.3673353C13.0276218 14.1261537 11.8858593 15.5 10.8437759 15.5 10.3588459 15.5 9.88231005 15.3491298 9.41749082 15.0543006 8.74000639 14.6241577 7.8668418 14.6059458 7.17068967 15.0074382 6.60881451 15.3319356 6.07177167 15.5 5.56305868 15.5 4.02887542 15.5 1.5 10.9491129 1.5 8.45090396 1.5 5.78581061 2.95006811 3.551507 5.15647301 3.551507 6.19383481 3.551507 7.09007204 4.20001691 7.84308619 4.497206 8.16210316 4.62512517 8.52255587 4.61592787 8.83410596 4.47192 9.44477141 4.18872223 10.2497236 3.551507 11.2503615 3.551507 12.4715175 3.551507 13.5338865 4.33779342 14.4184071 5.47479877 14.5532906 5.64778615 14.5172013 5.89341518 14.3377895 6.02349446 13.3500923 6.736546 12.8746057 7.53893969 12.8746057 8.45090396 12.8746057 9.36404821 13.3502672 10.1652619 14.3377895 10.8793249 14.4946576 10.992887 14.5445377 11.1984946 14.4561802 11.3673353ZM8.5 3C8.5 3 8.3468635 1.3936039 10 1" />\n</svg>\n';case"solidity":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="m3 11.5 2.5 4 2.5-4 2.5 4 2.5-4-2.5-4-2.5 4m2.5 4h-5m7.5-4H3m10-7-2.5-4-2.5 4-2.5-4-2.5 4 2.5 4 2.5-4M5.5.5h5M3 4.5h10" />\n</svg>\n';case"objectivec":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">\x3c!-- Icon from VSCode Icons by Roberto Huertas - https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE --\x3e<path fill="#c2c2c2" d="M11.29 15.976a8.9 8.9 0 0 0 1.039 4.557a4.82 4.82 0 0 0 5.579 2.13a3.79 3.79 0 0 0 2.734-3.181c.095-.535.1-.54.1-.54c1.537.222 4.014.582 5.55.8l-.1.389A9.96 9.96 0 0 1 23.8 24.9a8.35 8.35 0 0 1-4.747 2.378a12.93 12.93 0 0 1-7.322-.725a8.98 8.98 0 0 1-5.106-5.524A14.35 14.35 0 0 1 6.642 10.9a9.32 9.32 0 0 1 7.929-6.24a11.8 11.8 0 0 1 5.9.491a8.47 8.47 0 0 1 5.456 6.1c.083.311.1.369.1.369c-1.709.311-3.821.705-5.518 1.075c-.323-1.695-1.122-3.029-2.831-3.445a4.656 4.656 0 0 0-5.853 3.158a9 9 0 0 0-.341 1.273a11 11 0 0 0-.194 2.295"/><path fill="#c2c2c2" d="M2.033 30V2h5.934v2.227H4.723v23.546h3.244V30zm27.934-.001h-5.934v-2.228h3.244V4.226h-3.244V1.999h5.934z"/></svg>';case"objectivecpp":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">\x3c!-- Icon from VSCode Icons by Roberto Huertas - https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE --\x3e<path fill="#c2c2c2" d="M19.5 24.833a11.24 11.24 0 0 1-5.13 1.009a8.37 8.37 0 0 1-6.492-2.576A9.75 9.75 0 0 1 5.512 16.4a10.4 10.4 0 0 1 2.659-7.406a9.02 9.02 0 0 1 6.9-2.841a12.2 12.2 0 0 1 4.43.7v4.129a7.5 7.5 0 0 0-4.108-1.142a5.28 5.28 0 0 0-4.075 1.685A6.48 6.48 0 0 0 9.766 16.1a6.37 6.37 0 0 0 1.464 4.4a5.02 5.02 0 0 0 3.941 1.639a8.03 8.03 0 0 0 4.329-1.223Z"/><path fill="#c2c2c2" d="M16.572 15.081V13.24h1.841v1.841h1.84v1.84h-1.84v1.841h-1.841v-1.841h-1.839V15.08zm6.44 0V13.24h1.841v1.841h1.84v1.84h-1.84v1.841h-1.841v-1.841h-1.839V15.08zM2.035 30V2.001h5.933v2.227H4.725v23.545h3.243V30z"/><path fill="#c2c2c2" d="M29.965 29.999h-5.933v-2.228h3.243V4.227h-3.243V2h5.933z"/></svg>';case"terraform":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="m1.5 6 8 4.25 4-2.25m-12-2V1.5l8 4.25 4-2.25V8m-4-2.25v8.75M5.53 3.82 5.5 12.5l4 2" />\n</svg>\n';case"plain":case"text":case"":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round">\n <path d="M13.5 6.5v6a2 2 0 01-2 2h-7a2 2 0 01-2-2v-9c0-1.1.9-2 2-2h4.01" />\n <path d="m8.5 1.5 5 5h-4a1 1 0 01-1-1zm-3 10h5m-5-3h5m-5-3h1" />\n </g>\n</svg>\n';default:return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">\x3c!-- Icon from Lucide by Lucide Contributors - https://github.com/lucide-icons/lucide/blob/main/LICENSE --\x3e<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m10 9l-3 3l3 3m4 0l3-3l-3-3"/><rect width="18" height="18" x="3" y="3" rx="2"/></g></svg>'}}const st={js:"JavaScript",javascript:"JavaScript",ts:"TypeScript",jsx:"JSX",tsx:"TSX",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",py:"Python",python:"Python",rb:"Ruby",go:"Go",java:"Java",c:"C",cpp:"C++",cs:"C#",php:"PHP",sh:"Shell",bash:"Bash",sql:"SQL",yaml:"YAML",md:"Markdown",d2:"D2",d2lang:"D2","":"Plain Text",plain:"Plain Text"};function ut(e){try{if("undefined"!=typeof globalThis&&"function"==typeof globalThis.requestAnimationFrame)return globalThis.requestAnimationFrame(e)}catch(t){}return globalThis.setTimeout(e,0)}const ct=g(m.defineComponent({__name:"Portal",props:{to:null},setup(e){const t=e,n=m.ref(null);function o(){return"undefined"==typeof document?null:t.to&&"body"!==t.to?document.querySelector(t.to):document.body}function r(){const e=n.value;if(!e)return;const t=o();t&&e.parentElement!==t&&t.appendChild(e)}return m.onMounted(()=>{r()}),m.watch(()=>t.to,()=>{r()}),m.onBeforeUnmount(()=>{}),{__sfc:!0,props:t,rootRef:n,resolveTarget:o,moveToTarget:r}}}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{ref:"rootRef",staticClass:"portal-root"},[e._t("default")],2)},[],!1,null,"5b7455c5",null,null).exports,dt=g(m.defineComponent({__name:"HtmlPreviewFrame",props:{code:null,isDark:{type:Boolean},onClose:null,title:null},setup(e){const t=e,{t:n}=se(),o=m.computed(()=>{const e=t.code||"",n=e.trim().toLowerCase();return n.startsWith("<!doctype")||n.startsWith("<html")||n.startsWith("<body")?e:`<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <style>\n html, body {\n margin: 0;\n padding: 0;\n height: 100%;\n background-color: ${t.isDark?"#020617":"#ffffff"};\n color: ${t.isDark?"#e5e7eb":"#020617"};\n }\n body {\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', ui-sans-serif, sans-serif;\n }\n </style>\n </head>\n <body>\n ${e}\n </body>\n</html>`});function r(e){var n;"Escape"!==e.key&&"Esc"!==e.key||null==(n=t.onClose)||n.call(t)}return m.onMounted(()=>{"undefined"!=typeof window&&window.addEventListener("keydown",r)}),m.onUnmounted(()=>{"undefined"!=typeof window&&window.removeEventListener("keydown",r)}),{__sfc:!0,props:t,t:n,srcdoc:o,handleKeydown:r,Portal:ct}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t(n.Portal,{attrs:{to:"body"}},[t("div",{staticClass:"markstream-vue2"},[t("div",{staticClass:"html-preview-frame__backdrop",class:{"html-preview-frame__backdrop--dark":n.props.isDark},on:{click:function(e){var t,o;null==(o=(t=n.props).onClose)||o.call(t)}}},[t("div",{staticClass:"html-preview-frame",class:{"html-preview-frame--dark":n.props.isDark},on:{click:function(e){e.stopPropagation()}}},[t("div",{staticClass:"html-preview-frame__header"},[t("div",{staticClass:"html-preview-frame__title"},[t("span",{staticClass:"html-preview-frame__dot"}),t("span",{staticClass:"html-preview-frame__label"},[e._v(e._s(n.props.title||n.t("common.preview")||"Preview"))])]),t("button",{staticClass:"html-preview-frame__close",class:{"html-preview-frame__close--dark":n.props.isDark},attrs:{type:"button"},on:{click:function(e){var t,o;null==(o=(t=n.props).onClose)||o.call(t)}}},[e._v(" × ")])]),t("iframe",{staticClass:"html-preview-frame__iframe",attrs:{sandbox:"allow-scripts allow-same-origin",srcdoc:n.srcdoc}})])])])])},[],!1,null,"a5364041",null,null).exports;let pt=null,mt=null,ft=null,ht=null,vt=null;const gt=new WeakMap;let wt=0;const yt=g(m.defineComponent({__name:"CodeBlockNode",props:{node:{type:Object,required:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{type:[Object,String],default:void 0},lightTheme:{type:[Object,String],default:void 0},isShowPreview:{type:Boolean,default:!0},monacoOptions:{type:Object,default:void 0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{type:[String,Number],default:void 0},maxWidth:{type:[String,Number],default:void 0},themes:{type:Array,default:void 0},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},customId:{type:String,default:void 0}},emits:["previewCode","copy"],setup(e,{emit:t}){var n,o;const r=e,l="__markstreamMonacoPassiveTouch__";function i(){var e;try{const t=window;if(t[l])return;const n=null==(e=window.Element)?void 0:e.prototype,o=null==n?void 0:n.addEventListener;if(!n||!o)return;n.addEventListener=function(e,t,n){return"touchstart"===e&&a(this,n)?o.call(this,e,t,c(n)):o.call(this,e,t,n)},t[l]=!0}catch(t){}}function a(e,t){if(!e)return!1;const n=e;return!("function"!=typeof n.closest||!n.closest(".monaco-editor, .monaco-diff-editor")||t&&"object"==typeof t&&"passive"in t)}function c(e){return null==e?{passive:!0}:"boolean"==typeof e?{capture:e,passive:!0}:"object"==typeof e?"passive"in e?e:u(s({},e),{passive:!0}):{passive:!0}}"undefined"!=typeof window&&i();const p=m.getCurrentInstance(),h=m.computed(()=>{var e,t,n,o,r,l,i,a,s,u;const c=null==p?void 0:p.proxy,d=null!=(e=null==c?void 0:c.$listeners)?e:{};if(d.previewCode||d["preview-code"])return!0;const m=null!=(i=null!=(l=null==(n=null==(t=null==c?void 0:c.$vnode)?void 0:t.data)?void 0:n.on)?l:null==(r=null==(o=null==c?void 0:c.$vnode)?void 0:o.componentOptions)?void 0:r.listeners)?i:{};if(m.previewCode||m["preview-code"])return!0;const f=null!=(u=null==(a=null==c?void 0:c.$vnode)?void 0:a.props)?u:null==(s=null==p?void 0:p.vnode)?void 0:s.props;return!(!f||!f.onPreviewCode&&!f.onPreviewcode)}),{t:v}=se(),g=m.ref(null),w=m.ref(null),y=m.ref(!1),x=m.ref(lt(r.node.language)),M=m.computed(()=>it(x.value)),k=m.ref(!1),b=m.ref(!1),C=m.ref(!1),T=m.ref(!1),N=m.ref(null);let D=0;const j=ce();let I=null;const _=m.ref("undefined"==typeof window);"undefined"!=typeof window&&m.watch(()=>w.value,e=>{if(null==I||I.destroy(),I=null,!e)return void(_.value=!1);const t=j(e,{rootMargin:"400px"});I=t,_.value=t.isVisible.value,t.whenVisible.then(()=>{_.value=!0})},{immediate:!0}),m.onBeforeUnmount(()=>{null==I||I.destroy(),I=null});let E=null,L=null,S=()=>{},B=()=>{},A=()=>null,O=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),z=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),R=()=>{},P=()=>{},H=null,U=()=>{var e;return String(null!=(e=r.node.language)?e:"plaintext")},$=()=>d(this,null,function*(){});const F=m.computed(()=>r.node.diff),Y=m.computed(()=>F.value?"diff":"single"),V=m.ref(Y.value),Q=m.ref(!1),W=m.ref(!1),K=void 0!=={url:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:f&&"SCRIPT"===f.tagName.toUpperCase()&&f.src||new URL("index.cjs",document.baseURI).href}&&Boolean(null==(n={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:n.DEV);"undefined"!=typeof window&&(()=>{d(this,null,function*(){try{const e=yield tt();if(!e)return K&&console.warn("[markstream-vue2] stream-monaco is not installed. Code blocks will use basic rendering. Install stream-monaco for enhanced code editor features."),void(Q.value=!0);const t=e.useMonaco,n=e.detectLanguage;if("function"==typeof n&&(U=n),"function"==typeof t){const e=xe();if(e&&r.themes&&Array.isArray(r.themes)&&!r.themes.includes(e))throw new Error("Preferred theme not in provided themes array");const n=t(u(s({wordWrap:"on",wrappingIndent:"same",themes:r.themes,theme:e},r.monacoOptions||{}),{onThemeChange(){oe()}}));E=n.createEditor||E,L=n.createDiffEditor||L,S=n.updateCode||S,B=n.updateDiff||B,A=n.getEditor||A,O=n.getEditorView||O,z=n.getDiffEditorView||z,R=n.cleanupEditor||R,P=n.safeClean||n.cleanupEditor||P,$=n.setTheme||$,T.value=!0,g.value&&(yield we(g.value))}}catch(e){K&&console.warn("[markstream-vue2] Failed to initialize Monaco editor:",e),Q.value=!0}})})();const X=m.ref("number"==typeof(null==(o=r.monacoOptions)?void 0:o.fontSize)?r.monacoOptions.fontSize:Number.NaN),q=m.ref(X.value),Z=m.computed(()=>{const e=X.value,t=q.value;return"number"==typeof e&&Number.isFinite(e)&&e>0&&"number"==typeof t&&Number.isFinite(t)&&t>0});function G(){try{const e=g.value;if(!e)return null;const t=e.querySelector(".view-lines .view-line");if(t){const e=Math.ceil(t.getBoundingClientRect().height);if(e>0)return e}}catch(e){}return null}function J(){var e,t,n,o,r;try{const l=F.value?null!=(n=null==(t=null==(e=z())?void 0:e.getModifiedEditor)?void 0:t.call(e))?n:z():O(),i=A(),a=null==(o=null==i?void 0:i.EditorOption)?void 0:o.fontInfo;if(l&&null!=a){const e=null==(r=l.getOption)?void 0:r.call(l,a),t=null==e?void 0:e.fontSize;if("number"==typeof t&&Number.isFinite(t)&&t>0)return t}}catch(l){}try{const e=g.value;if(e){const t=e.querySelector(".view-lines .view-line");if(t)try{if("undefined"!=typeof window&&"function"==typeof window.getComputedStyle){const e=window.getComputedStyle(t).fontSize,n=e&&e.match(/^(\d+(?:\.\d+)?)/);if(n)return Number.parseFloat(n[1])}}catch(l){}}}catch(l){}return null}function ee(e){var t,n;try{const o=A(),r=null==(t=null==o?void 0:o.EditorOption)?void 0:t.lineHeight;if(null!=r){const t=null==(n=null==e?void 0:e.getOption)?void 0:n.call(e,r);if("number"==typeof t&&t>0)return t}}catch(l){}const o=G();if(o&&o>0)return o;const r=Number.isFinite(q.value)&&q.value>0?q.value:12;return Math.max(12,Math.round(1.35*r))}function te(){var e;if(Number.isFinite(q.value)&&q.value>0&&Number.isFinite(X.value))return q.value;const t=J();return"number"==typeof(null==(e=r.monacoOptions)?void 0:e.fontSize)?(X.value=r.monacoOptions.fontSize,q.value=r.monacoOptions.fontSize,q.value):t&&t>0?(X.value=t,q.value=t,t):(X.value=12,q.value=12,12)}function ne(){var e,t,n,o,r,l,i,a,s,u,c,d,p,m;try{const f=F.value?z():O();if(!f)return null;if(F.value&&(null==f?void 0:f.getOriginalEditor)&&(null==f?void 0:f.getModifiedEditor)){const p=null==(e=f.getOriginalEditor)?void 0:e.call(f),m=null==(t=f.getModifiedEditor)?void 0:t.call(f);null==(n=null==p?void 0:p.layout)||n.call(p),null==(o=null==m?void 0:m.layout)||o.call(m);const h=(null==(r=null==p?void 0:p.getContentHeight)?void 0:r.call(p))||0,v=(null==(l=null==m?void 0:m.getContentHeight)?void 0:l.call(m))||0,g=Math.max(h,v);if(g>0)return Math.ceil(g+1);const w=(null==(s=null==(a=null==(i=null==p?void 0:p.getModel)?void 0:i.call(p))?void 0:a.getLineCount)?void 0:s.call(a))||1,y=(null==(d=null==(c=null==(u=null==m?void 0:m.getModel)?void 0:u.call(m))?void 0:c.getLineCount)?void 0:d.call(c))||1,x=Math.max(w,y),M=Math.max(ee(p),ee(m));return Math.ceil(x*(M+1.5)+0+1)}if(null==f?void 0:f.getContentHeight){null==(p=null==f?void 0:f.layout)||p.call(f);const e=f.getContentHeight();if(e>0)return Math.ceil(e+1)}const h=null==(m=null==f?void 0:f.getModel)?void 0:m.call(f);let v=1;h&&"function"==typeof h.getLineCount&&(v=h.getLineCount());const g=ee(f);return Math.ceil(v*(g+1.5)+0+1)}catch(f){return null}}function oe(){var e,t,n,o,r,l,i,a;const s=g.value,u=w.value;if(!s||!u)return;const c=s.querySelector(".monaco-editor")||s,d=c.querySelector(".monaco-editor-background")||c,p=c.querySelector(".view-lines")||c;let m=null,f=null,h=null;try{"undefined"!=typeof window&&"function"==typeof window.getComputedStyle&&(m=window.getComputedStyle(c),f=d===c?m:window.getComputedStyle(d),h=p===c?m:window.getComputedStyle(p))}catch(b){m=null,f=null,h=null}const v=String(null!=(e=null==m?void 0:m.getPropertyValue("--vscode-editor-foreground"))?e:"").trim(),y=String(null!=(t=null==m?void 0:m.getPropertyValue("--vscode-editor-background"))?t:"").trim(),x=String(null!=(o=null!=(n=null==m?void 0:m.getPropertyValue("--vscode-editor-selectionBackground"))?n:null==m?void 0:m.getPropertyValue("--vscode-editor-hoverHighlightBackground"))?o:"").trim(),M=v||String(null!=(l=null!=(r=null==h?void 0:h.color)?r:null==m?void 0:m.color)?l:"").trim(),k=y||String(null!=(a=null!=(i=null==f?void 0:f.backgroundColor)?i:null==m?void 0:m.backgroundColor)?a:"").trim();M&&u.style.setProperty("--vscode-editor-foreground",M),k&&u.style.setProperty("--vscode-editor-background",k),x&&u.style.setProperty("--vscode-editor-selectionBackground",x)}function re(){try{const e=g.value;if(!e)return;const t=e.getBoundingClientRect(),n=window.scrollY+t.top,o=ne();if(null!=o&&o>0){const r=t.height;e.style.height=`${Math.ceil(o)}px`,e.style.maxHeight="none";const l=Math.ceil(o)-r;0!==l&&n<window.scrollY&&window.scrollBy(0,l)}}catch(e){}}function ae(){var e;try{const t=g.value;if(!t)return;const n=t.getBoundingClientRect(),o=window.scrollY+n.top,r=n.height,l=ue();if(D>0&&(D--,null!=N.value)){const e=Math.min(N.value,l);t.style.height=`${Math.ceil(e)}px`,t.style.maxHeight=`${Math.ceil(l)}px`,t.style.overflow="auto";const n=Math.ceil(e)-r;return void(0!==n&&o<window.scrollY&&window.scrollBy(0,n))}const i=ne();if(null!=i&&i>0){const e=Math.min(i,l);t.style.height=`${Math.ceil(e)}px`,t.style.maxHeight=`${Math.ceil(l)}px`,t.style.overflow="auto";const n=Math.ceil(e)-r;return void(0!==n&&o<window.scrollY&&window.scrollBy(0,n))}if(null!=N.value){const e=Math.min(N.value,l);t.style.height=`${Math.ceil(e)}px`,t.style.maxHeight=`${Math.ceil(l)}px`,t.style.overflow="auto";const n=Math.ceil(e)-r;return void(0!==n&&o<window.scrollY&&window.scrollBy(0,n))}const a=Math.ceil((null==(e=t.getBoundingClientRect)?void 0:e.call(t).height)||0);if(a>0){const e=Math.min(a,l);t.style.height=`${Math.ceil(e)}px`,t.style.maxHeight=`${Math.ceil(l)}px`,t.style.overflow="auto";const n=Math.ceil(e)-r;return void(0!==n&&o<window.scrollY&&window.scrollBy(0,n))}const s=Number.parseFloat(t.style.height);if(!Number.isNaN(s)&&s>0){const e=Math.ceil(Math.min(s,l));t.style.height=`${e}px`;const n=e-r;0!==n&&o<window.scrollY&&window.scrollBy(0,n)}else{const e=Math.ceil(l);t.style.height=`${e}px`;const n=e-r;0!==n&&o<window.scrollY&&window.scrollBy(0,n)}t.style.maxHeight=`${Math.ceil(l)}px`,t.style.overflow="auto"}catch(t){}}function ue(){var e,t;const n=null!=(t=null==(e=r.monacoOptions)?void 0:e.MAX_HEIGHT)?t:500;if("number"==typeof n)return n;const o=String(n).match(/^(\d+(?:\.\d+)?)/);return o?Number.parseFloat(o[1]):500}const de=m.computed(()=>r.isShowPreview&&("html"===x.value||"svg"===x.value));m.watch(()=>r.node.language,e=>{x.value=lt(e)}),m.watch(()=>r.node.code,e=>d(this,null,function*(){var t,n;if(!1!==r.stream){if(x.value||(x.value=lt(U(e))),E&&!C.value&&g.value)try{yield we(g.value)}catch(o){}F.value?B(String(null!=(t=r.node.originalCode)?t:""),String(null!=(n=r.node.updatedCode)?n:""),M.value):S(e,M.value),k.value&&ut(()=>re())}}));const pe=m.computed(()=>{const e=x.value;return e?st[e]||e.charAt(0).toUpperCase()+e.slice(1):st[""]||"Plain Text"}),me=m.computed(()=>at(x.value||"")),fe=m.computed(()=>{const e={},t=e=>{if(null!=e)return"number"==typeof e?`${e}px`:String(e)},n=t(r.minWidth),o=t(r.maxWidth);return n&&(e.minWidth=n),o&&(e.maxWidth=o),e});function he(e){return!e||e.disabled}function ve(e){var t,n;try{if(F.value){const n=z();null==(t=null==n?void 0:n.updateOptions)||t.call(n,{automaticLayout:e})}else{const t=O();null==(n=null==t?void 0:t.updateOptions)||n.call(t,{automaticLayout:e})}}catch(o){}}function ge(e){return d(this,null,function*(){var t,n,o;if(!E)return;F.value?(P(),L?yield L(e,String(null!=(t=r.node.originalCode)?t:""),String(null!=(n=r.node.updatedCode)?n:""),M.value):yield E(e,r.node.code,M.value)):yield E(e,r.node.code,M.value);const l=F.value?z():O();if("number"==typeof(null==(o=r.monacoOptions)?void 0:o.fontSize))null==l||l.updateOptions({fontSize:r.monacoOptions.fontSize,automaticLayout:!1}),X.value=r.monacoOptions.fontSize,q.value=r.monacoOptions.fontSize;else{const e=J();e&&e>0?(X.value=e,q.value=e):(X.value=12,q.value=12)}k.value||b.value||ae(),!1===r.loading&&(yield m.nextTick(),ut(()=>{k.value&&!b.value?re():b.value||ae()}))})}function we(e){if(!E)return null;if(H)return H;C.value=!0;const t=(()=>d(this,null,function*(){yield ge(e)}))();return H=t.finally(()=>{H=null}),H}m.watch(()=>q.value,(e,t)=>{const n=F.value?z():O();n&&"number"==typeof e&&Number.isFinite(e)&&e>0&&(n.updateOptions({fontSize:e}),k.value&&!b.value&&re())},{flush:"post",immediate:!1});const ye=m.watch(()=>[g.value,F.value,r.stream,r.loading,T.value,_.value],e=>d(this,[e],function*([e,t,n,o,r,l]){if(!e||!E)return;if(!l)return;if(!1===n&&!1!==o)return;const i=we(e);i&&(yield i,ye())}));function xe(){return r.isDark?r.darkTheme:r.lightTheme}function Me(){const e=xe();e&&function(e,t){const n=function(e){if(null==e)return null;if("string"==typeof e)return e;if("object"==typeof e&&e&&"name"in e)return String(e.name);if("object"==typeof e){const n=gt.get(e);if(n)return n;try{const t=JSON.stringify(e);if(t)return gt.set(e,t),t}catch(t){}const o="__theme_"+ ++wt;return gt.set(e,o),o}return String(e)}(t);return n?(vt=e,pt||ht!==n?(mt=t,ft=n,pt||(pt=(()=>d(this,null,function*(){for(;ft&&null!=mt;){const n=mt,o=ft;if(mt=null,ft=null,ht!==o)try{yield(null!=vt?vt:e)(n),ht=o}catch(t){}}}))().finally(()=>{pt=null}),pt)):Promise.resolve()):Promise.resolve()}($,e).then(()=>{ut(()=>oe())})}m.watch(Y,(e,t)=>d(this,null,function*(){if(e!==t&&(V.value=e,E&&g.value&&C.value&&(!1!==r.stream||!1===r.loading)&&_.value))try{C.value=!1,H=null,P(),yield m.nextTick(),yield we(g.value)}catch(n){C.value=!1}})),m.watch(()=>[r.isDark,r.darkTheme,r.lightTheme,T.value],()=>{T.value&&Me()}),m.watch(()=>[r.monacoOptions,_.value],()=>{var e,t;if(!E||!_.value)return;const n=F.value?z():O(),o="number"==typeof(null==(e=r.monacoOptions)?void 0:e.fontSize)?r.monacoOptions.fontSize:Number.isFinite(q.value)?q.value:void 0;"number"==typeof o&&Number.isFinite(o)&&o>0&&(null==(t=null==n?void 0:n.updateOptions)||t.call(n,{fontSize:o})),k.value&&!b.value?re():b.value||ae()},{deep:!0});const ke=m.watch(()=>[r.loading,_.value],e=>d(this,[e],function*([e,t]){t&&(e||(yield m.nextTick(),ut(()=>{b.value||(k.value?re():ae()),ke()})))}),{immediate:!0,flush:"post"});return m.onUnmounted(()=>{R()}),{__sfc:!0,props:r,emits:t,MONACO_TOUCH_PATCH_FLAG:l,ensureMonacoPassiveTouchListeners:i,shouldForcePassiveForMonaco:a,withPassiveOptions:c,instance:p,hasPreviewListener:h,t:v,codeEditor:g,container:w,copyText:y,codeLanguage:x,monacoLanguage:M,isExpanded:k,isCollapsed:b,editorCreated:C,monacoReady:T,expandRafId:null,heightBeforeCollapse:N,resumeGuardFrames:D,registerVisibility:j,viewportHandle:I,viewportReady:_,createEditor:E,createDiffEditor:L,updateCode:S,updateDiffCode:B,getEditor:A,getEditorView:O,getDiffEditorView:z,cleanupEditor:R,safeClean:P,createEditorPromise:H,detectLanguage:U,setTheme:$,isDiff:F,desiredEditorKind:Y,currentEditorKind:V,usePreCodeRender:Q,showInlinePreview:W,isDevEnv:K,codeFontMin:10,codeFontMax:36,codeFontStep:1,defaultCodeFontSize:X,codeFontSize:q,fontBaselineReady:Z,CONTENT_PADDING:0,LINE_EXTRA_PER_LINE:1.5,PIXEL_EPSILON:1,measureLineHeightFromDom:G,readActualFontSizeFromEditor:J,getLineHeightSafe:ee,ensureFontBaseline:te,increaseCodeFont:function(){const e=te(),t=Math.min(36,e+1);q.value=t},decreaseCodeFont:function(){const e=te(),t=Math.max(10,e-1);q.value=t},resetCodeFont:function(){te(),Number.isFinite(X.value)&&(q.value=X.value)},computeContentHeight:ne,syncEditorCssVars:oe,resizeSyncHandler:null,updateExpandedHeight:re,updateCollapsedHeight:ae,getMaxHeightValue:ue,isPreviewable:de,displayLanguage:pe,languageIcon:me,containerStyle:fe,copy:function(){return d(this,null,function*(){try{"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(r.node.code)),y.value=!0,t("copy",r.node.code),setTimeout(()=>{y.value=!1},1e3)}catch(e){console.error("复制失败:",e)}})},shouldSkipEventTarget:he,onBtnHover:function(e,t,n="top"){if(he(e.currentTarget))return;const o=e,l=null!=(null==o?void 0:o.clientX)&&null!=(null==o?void 0:o.clientY)?{x:o.clientX,y:o.clientY}:void 0;le(e.currentTarget,t,n,!1,l,r.isDark)},onBtnLeave:function(){ie()},onCopyHover:function(e){if(he(e.currentTarget))return;const t=y.value?v("common.copied")||"Copied":v("common.copy")||"Copy",n=e,o=null!=(null==n?void 0:n.clientX)&&null!=(null==n?void 0:n.clientY)?{x:n.clientX,y:n.clientY}:void 0;le(e.currentTarget,t,"top",!1,o,r.isDark)},toggleExpand:function(){k.value=!k.value;const e=F.value?z():O(),t=g.value;e&&t&&(k.value?(ve(!0),t.style.maxHeight="none",t.style.overflow="visible",re()):(ve(!1),t.style.overflow="auto",ae()))},toggleHeaderCollapse:function(){var e,t,n;if(b.value=!b.value,b.value){if(g.value){const n=Math.ceil((null==(t=(e=g.value).getBoundingClientRect)?void 0:t.call(e).height)||0);n>0&&(N.value=n)}ve(!1)}else{k.value&&ve(!0),g.value&&null!=N.value&&(g.value.style.height=`${N.value}px`);const e=F.value?z():O();try{null==(n=null==e?void 0:e.layout)||n.call(e)}catch(o){}D=2,ut(()=>{k.value?re():ae()})}},previewCode:function(){if(!de.value)return;const e=x.value;if(h.value){const n="html"===e?"text/html":"image/svg+xml",o="html"===e?v("artifacts.htmlPreviewTitle")||"HTML Preview":v("artifacts.svgPreviewTitle")||"SVG Preview";return void t("previewCode",{node:r.node,artifactType:n,artifactTitle:o,id:`temp-${e}-${Date.now()}`})}"html"===e&&(W.value=!W.value)},setAutomaticLayout:ve,runEditorCreation:ge,ensureEditorCreation:we,stopCreateEditorWatch:ye,getPreferredColorScheme:xe,themeUpdate:Me,stopLoadingWatch:ke,stopExpandAutoResize:function(){},PreCodeNode:Ve,HtmlPreviewFrame:dt}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return n.usePreCodeRender?t(n.PreCodeNode,{attrs:{node:e.node,loading:n.props.loading}}):t("div",{ref:"container",staticClass:"code-block-container my-4 rounded-lg border overflow-hidden shadow-sm",class:[n.props.isDark?"border-gray-700/30 bg-gray-900":"border-gray-200 bg-white",{"is-rendering":n.props.loading,"is-dark":n.props.isDark}],style:n.containerStyle},[n.props.showHeader?t("div",{staticClass:"code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",staticStyle:{color:"var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))","background-color":"var(--vscode-editor-background, var(--markstream-code-fallback-bg))"}},[e._t("header-left",function(){return[t("div",{staticClass:"flex items-center space-x-2 flex-1 overflow-hidden"},[t("span",{staticClass:"icon-slot h-4 w-4 flex-shrink-0",domProps:{innerHTML:e._s(n.languageIcon)}}),t("span",{staticClass:"text-sm font-medium font-mono truncate"},[e._v(e._s(n.displayLanguage))])])]}),e._t("header-right",function(){return[t("div",{staticClass:"flex items-center space-x-2"},[t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-pressed":n.isCollapsed},on:{click:n.toggleHeaderCollapse,mouseenter:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},focus:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",style:{rotate:n.isCollapsed?"0deg":"90deg"},attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"}})])]),n.props.showFontSizeButtons&&n.props.enableFontSizeControl?[t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!!Number.isFinite(n.codeFontSize)&&n.codeFontSize<=n.codeFontMin},on:{click:function(e){return n.decreaseCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.decrease")||"Decrease")},focus:function(e){n.onBtnHover(e,n.t("common.decrease")||"Decrease")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"}})])]),t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!n.fontBaselineReady||n.codeFontSize===n.defaultCodeFontSize},on:{click:function(e){return n.resetCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.reset")||"Reset")},focus:function(e){n.onBtnHover(e,n.t("common.reset")||"Reset")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}}),t("path",{attrs:{d:"M3 3v5h5"}})])])]),t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!!Number.isFinite(n.codeFontSize)&&n.codeFontSize>=n.codeFontMax},on:{click:function(e){return n.increaseCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.increase")||"Increase")},focus:function(e){n.onBtnHover(e,n.t("common.increase")||"Increase")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"}})])])]:e._e(),n.props.showCopyButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-label":n.copyText?n.t("common.copied")||"Copied":n.t("common.copy")||"Copy"},on:{click:n.copy,mouseenter:function(e){return n.onCopyHover(e)},focus:function(e){return n.onCopyHover(e)},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.copyText?t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("rect",{attrs:{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}})])])]):e._e(),n.props.showExpandButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-pressed":n.isExpanded},on:{click:n.toggleExpand,mouseenter:function(e){n.onBtnHover(e,n.isExpanded?n.t("common.collapse")||"Collapse":n.t("common.expand")||"Expand")},focus:function(e){n.onBtnHover(e,n.isExpanded?n.t("common.collapse")||"Collapse":n.t("common.expand")||"Expand")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.isExpanded?t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"}})])]):e._e(),n.isPreviewable&&n.props.showPreviewButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-label":n.t("common.preview")||"Preview"},on:{click:n.previewCode,mouseenter:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},focus:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24"}},[t("g",{attrs:{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"}},[t("path",{attrs:{d:"M23.628 7.41c-.12-1.172-.08-3.583-.9-4.233c-1.921-1.51-6.143-1.11-8.815-1.19c-3.481-.15-7.193.14-10.625.24a.34.34 0 0 0 0 .67c3.472-.05 7.074-.29 10.575-.09c2.471.15 6.653-.14 8.254 1.16c.4.33.41 2.732.49 3.582a42 42 0 0 1 .08 9.005a13.8 13.8 0 0 1-.45 3.001c-2.42 1.4-19.69 2.381-20.72.55a21 21 0 0 1-.65-4.632a41.5 41.5 0 0 1 .12-7.964c.08 0 7.334.33 12.586.24c2.331 0 4.682-.13 6.764-.21a.33.33 0 0 0 0-.66c-7.714-.16-12.897-.43-19.31.05c.11-1.38.48-3.922.38-4.002a.3.3 0 0 0-.42 0c-.37.41-.29 1.77-.36 2.251s-.14 1.07-.2 1.6a45 45 0 0 0-.36 8.645a21.8 21.8 0 0 0 .66 5.002c1.46 2.702 17.248 1.461 20.95.43c1.45-.4 1.69-.8 1.871-1.95c.575-3.809.602-7.68.08-11.496"}}),t("path",{attrs:{d:"M4.528 5.237a.84.84 0 0 0-.21-1c-.77-.41-1.71.39-1 1.1a.83.83 0 0 0 1.21-.1m2.632-.25c.14-.14.19-.84-.2-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.2-.09m2.88 0a.83.83 0 0 0-.21-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.21-.09m-4.29 8.735c0 .08.23 2.471.31 2.561a.371.371 0 0 0 .63-.14c0-.09 0 0 .15-1.72a10 10 0 0 0-.11-2.232a5.3 5.3 0 0 1-.26-1.37a.3.3 0 0 0-.54-.24a6.8 6.8 0 0 0-.2 2.33c-1.281-.38-1.121.13-1.131-.42a15 15 0 0 0-.19-1.93c-.16-.17-.36-.17-.51.14a20 20 0 0 0-.43 3.471c.04.773.18 1.536.42 2.272c.26.4.7.22.7-.1c0-.09-.16-.09 0-1.862c.06-1.18-.23-.3 1.16-.76m5.033-2.552c.32-.07.41-.28.39-.37c0-.55-3.322-.34-3.462-.24s-.2.18-.18.28s0 .11 0 .16a3.8 3.8 0 0 0 1.591.361v.82a15 15 0 0 0-.13 3.132c0 .2-.09.94.17 1.16a.34.34 0 0 0 .48 0c.125-.35.196-.718.21-1.09a8 8 0 0 0 .14-3.232c0-.13.05-.7-.1-.89a8 8 0 0 0 .89-.09m5.544-.181a.69.69 0 0 0-.89-.44a2.8 2.8 0 0 0-1.252 1.001a2.3 2.3 0 0 0-.41-.83a1 1 0 0 0-1.6.27a7 7 0 0 0-.35 2.07c0 .571 0 2.642.06 2.762c.14 1.09 1 .51.63.13a17.6 17.6 0 0 1 .38-3.962c.32-1.18.32.2.39.51s.11 1.081.73 1.081s.48-.93 1.401-1.78q.075 1.345 0 2.69a15 15 0 0 0 0 1.811a.34.34 0 0 0 .68 0q.112-.861.11-1.73a16.7 16.7 0 0 0 .12-3.582m1.441-.201c-.05.16-.3 3.002-.31 3.202a6.3 6.3 0 0 0 .21 1.741c.33 1 1.21 1.07 2.291.82a3.7 3.7 0 0 0 1.14-.23c.21-.22.10-.59-.41-.64q-.817.096-1.64.07c-.44-.07-.34 0-.67-4.442q.015-.185 0-.37a.316.316 0 0 0-.23-.38a.316.316 0 0 0-.38.23"}})])])]):e._e()],2)]})],2):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!(n.isCollapsed||!e.stream&&e.loading),expression:"!isCollapsed && (stream ? true : !loading)"}],ref:"codeEditor",staticClass:"code-editor-container",class:[e.stream?"":"code-height-placeholder"]}),n.showInlinePreview&&!n.hasPreviewListener&&n.isPreviewable&&"html"===n.codeLanguage?t(n.HtmlPreviewFrame,{attrs:{code:e.node.code,"is-dark":n.props.isDark,"on-close":()=>n.showInlinePreview=!1}}):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.stream&&e.loading,expression:"!stream && loading"}],staticClass:"code-loading-placeholder"},[e._t("loading",function(){return[t("div",{staticClass:"loading-skeleton"},[t("div",{staticClass:"skeleton-line"}),t("div",{staticClass:"skeleton-line"}),t("div",{staticClass:"skeleton-line short"})])]},{loading:e.loading,stream:e.stream})],2),t("span",{staticClass:"sr-only",attrs:{"aria-live":"polite",role:"status"}},[e._v(e._s(n.copyText?n.t("common.copied")||"Copied":""))])],1)},[],!1,null,"0e5603b6",null,null).exports,xt=()=>Promise.resolve().then(()=>require("./index6.js"));let Mt=null,kt=xt;function bt(e){kt=e,Mt=null}const Ct=g(m.defineComponent({__name:"D2BlockNode",props:{node:null,maxHeight:{default:"500px"},loading:{type:Boolean,default:!0},isDark:{type:Boolean},progressiveRender:{type:Boolean,default:!0},progressiveIntervalMs:{default:700},themeId:null,darkThemeId:null,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(e){const t=e,{t:n}=se(),o=m.ref(!1),r=m.ref(!1),l=m.ref(!1),i=m.ref(!1),a=m.ref(null),u=m.ref(!1),c=m.ref(""),p=m.ref(0),f=m.ref(null),h=m.ref(null),v=m.computed(()=>{var e;return null!=(e=t.node.code)?e:""}),g=m.computed(()=>l.value||!i.value||!c.value),w=m.computed(()=>!!c.value),y=m.computed(()=>{if(h.value)return{minHeight:`${h.value}px`}}),x=m.computed(()=>{if(t.maxHeight)return{maxHeight:"number"==typeof t.maxHeight?`${t.maxHeight}px`:String(t.maxHeight)}}),M="undefined"!=typeof window;let k=null,b=!1,C=!1,T=0,N=null,D=!1,j=null;const I={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 _(e){return!e||e.disabled}const E=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],L=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function S(e){return e.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#")}function B(e){if(!e)return"";const t=e.trim();return L.test(t)?t:""}function A(e){const t=new Set(["script"]),n=[e,...Array.from(e.querySelectorAll("*"))];for(const o of n){if(t.has(o.tagName.toLowerCase())){o.remove();continue}const e=Array.from(o.attributes);for(const t of e){const e=t.name;if(/^on/i.test(e))o.removeAttribute(e);else{if("style"===e&&t.value){const n=t.value;if(E.some(e=>e.test(n))){o.removeAttribute(e);continue}}if(("href"===e||"xlink:href"===e)&&t.value){const n=B(t.value);if(!n){o.removeAttribute(e);continue}n!==t.value&&o.setAttribute(e,n)}}}}}function O(e){if("undefined"==typeof window||"undefined"==typeof DOMParser)return"";if(!e)return"";const t=S(e),n=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement;if(!n||"svg"!==n.nodeName.toLowerCase())return"";const o=n;return A(o),o.outerHTML}function z(e){const t=O(e);c.value=t||""}function R(){c.value=""}function P(e){return e?"string"==typeof e?e:"string"==typeof e.svg?e.svg:"string"==typeof e.data?e.data:"":""}function H(){return d(this,null,function*(){if(k)return k;const e=yield function(){return d(this,null,function*(){if(Mt)return Mt;const e=kt;if(!e)return null;let t;try{t=yield e()}catch(n){if(e===xt)throw new Error('Optional dependency "@terrastruct/d2" is not installed. Please install it to enable D2 diagrams.');throw n}return t?(Mt=function(e){var t;if(!e)return e;if(e.D2&&"function"==typeof e.D2)return e.D2;if(e.default&&e.default.D2&&"function"==typeof e.default.D2)return e.default.D2;const n=null!=(t=e.default)?t:e;return"function"==typeof n?n:(null==n?void 0:n.D2)&&"function"==typeof n.D2?n.D2:n}(t),Mt):null})}();if(!e)return null;if("function"==typeof e){const t=new e;return t&&"function"==typeof t.compile?k=t:"function"==typeof e.compile&&(k=e),k}return(null==e?void 0:e.D2)&&"function"==typeof e.D2?(k=new e.D2,k):("function"==typeof e.compile&&(k=e),k)})}function U(){return d(this,null,function*(){var e,n,o,r,c;if(!M||C)return;if(t.loading&&!t.progressiveRender)return;const d=v.value;if(!d)return R(),void(a.value=null);const m=++p.value;u.value=!0,a.value=null;try{const u=yield H();if(!u)return i.value=!1,l.value=!0,R(),void(a.value="D2 is not available.");if("function"!=typeof u.compile||"function"!=typeof u.render)throw new TypeError("D2 instance is missing compile/render methods.");i.value=!0;const f=yield u.compile(d);if(m!==p.value)return;const h=null!=(e=null==f?void 0:f.diagram)?e:f,v=null!=(o=null!=(n=null==f?void 0:f.renderOptions)?n:null==f?void 0:f.options)?o:{},g=null!=(r=t.themeId)?r:v.themeID,w=null!=(c=t.darkThemeId)?c:v.darkThemeID,y=s({},v);if(y.themeID=t.isDark&&null!=w?w:g,y.darkThemeID=null,y.darkThemeOverrides=null,t.isDark){const e=v.themeOverrides&&"object"==typeof v.themeOverrides?v.themeOverrides:null;y.themeOverrides=s(s({},I),e||{})}const x=yield u.render(h,y);if(m!==p.value)return;const M=P(x);if(!M)throw new Error("D2 render returned empty output.");z(M),t.loading&&(l.value=!1),a.value=null}catch(f){if(m!==p.value)return;const e=(null==f?void 0:f.message)?String(f.message):"D2 render failed.";t.loading||(a.value=e),e.includes("@terrastruct/d2")&&(i.value=!1,l.value=!0)}finally{m===p.value&&(u.value=!1,D&&(D=!1,$()))}})}function $(e=!1){if(b)return;if(!M)return;if(C)return;if(u.value)return void(D=!0);const n=Math.max(120,Number(t.progressiveIntervalMs)||0),o=Date.now()-T;if(!e&&o<n)return D=!0,void(null==N&&(N=window.setTimeout(()=>{N=null,D&&(D=!1,$(!0))},Math.max(0,n-o))));b=!0;const r=()=>{b=!1,T=Date.now(),U()};"undefined"!=typeof window&&"function"==typeof window.requestAnimationFrame?window.requestAnimationFrame(r):setTimeout(r,0)}function F(){const e=f.value;if(!e)return;const t=e.getBoundingClientRect().height;t>0&&(h.value=t)}return m.watch(()=>[t.node.code,t.loading,t.isDark],()=>{$()},{immediate:!0}),m.watch(()=>t.loading,(e,t)=>{t&&!e&&$(!0)}),m.watch(()=>[g.value,c.value,v.value],()=>{m.nextTick(()=>{F()})}),m.onMounted(()=>{$(),m.nextTick(()=>{F()}),"undefined"!=typeof ResizeObserver&&(j=new ResizeObserver(()=>{F()}),f.value&&j.observe(f.value))}),m.onBeforeUnmount(()=>{C=!0,null!=N&&(clearTimeout(N),N=null),null==j||j.disconnect(),j=null}),{__sfc:!0,props:t,t:n,copyText:o,isCollapsed:r,showSource:l,d2Available:i,renderError:a,isRendering:u,svgMarkup:c,renderToken:p,bodyRef:f,bodyMinHeight:h,baseCode:v,showSourceFallback:g,hasPreview:w,bodyStyle:y,renderStyle:x,isClient:M,d2Instance:k,scheduled:b,unmounted:C,lastRenderAt:T,throttleTimer:N,pendingRender:D,bodyObserver:j,DARK_THEME_OVERRIDES:I,shouldSkipEventTarget:_,onBtnHover:function(e,n,o="top"){if(_(e.currentTarget))return;const r=e,l=null!=(null==r?void 0:r.clientX)&&null!=(null==r?void 0:r.clientY)?{x:r.clientX,y:r.clientY}:void 0;le(e.currentTarget,n,o,!1,l,t.isDark)},onBtnLeave:function(){ie()},onCopyHover:function(e){if(_(e.currentTarget))return;const r=o.value?n("common.copied")||"Copied":n("common.copy")||"Copy",l=e,i=null!=(null==l?void 0:l.clientX)&&null!=(null==l?void 0:l.clientY)?{x:l.clientX,y:l.clientY}:void 0;le(e.currentTarget,r,"top",!1,i,t.isDark)},copy:function(){return d(this,null,function*(){try{const e=v.value;"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(e)),o.value=!0,setTimeout(()=>{o.value=!1},1e3)}catch(e){console.error("Copy failed:",e)}})},toggleCollapse:function(){r.value=!r.value},handleSwitchMode:function(e){l.value="source"===e},DISALLOWED_STYLE_PATTERNS:E,SAFE_URL_PROTOCOLS:L,neutralizeScriptProtocols:S,sanitizeUrl:B,scrubSvgElement:A,toSafeSvgMarkup:O,setSvg:z,clearSvg:R,extractSvg:P,ensureD2Instance:H,renderDiagram:U,scheduleRender:$,exportSvg:function(){if(c.value)try{const e=new Blob([c.value],{type:"image/svg+xml;charset=utf-8"}),t=URL.createObjectURL(e);if("undefined"!=typeof document){const e=document.createElement("a");e.href=t,e.download=`d2-diagram-${Date.now()}.svg`,document.body.appendChild(e),e.click(),document.body.removeChild(e)}URL.revokeObjectURL(t)}catch(e){console.error("Failed to export SVG:",e)}},updateBodyMinHeight:F}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"d2-block-container my-4 rounded-lg border overflow-hidden shadow-sm",class:n.props.isDark?"border-gray-700/30 bg-gray-900 text-gray-100":"border-gray-200 bg-white text-gray-900"},[n.props.showHeader?t("div",{staticClass:"d2-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",staticStyle:{color:"var(--vscode-editor-foreground)","background-color":"var(--vscode-editor-background)"}},[e._m(0),t("div",{staticClass:"flex items-center gap-x-2"},[n.props.showModeToggle?t("div",{staticClass:"flex items-center gap-x-1 rounded-md p-0.5",class:n.props.isDark?"bg-gray-700":"bg-gray-100"},[t("button",{staticClass:"mode-btn px-2 py-1 text-xs rounded",class:n.showSource?"":"is-active",attrs:{type:"button"},on:{click:function(e){return n.handleSwitchMode("preview")},mouseenter:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},focus:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[e._v(" "+e._s(n.t("common.preview")||"Preview")+" ")]),t("button",{staticClass:"mode-btn px-2 py-1 text-xs rounded",class:n.showSource?"is-active":"",attrs:{type:"button"},on:{click:function(e){return n.handleSwitchMode("source")},mouseenter:function(e){n.onBtnHover(e,n.t("common.source")||"Source")},focus:function(e){n.onBtnHover(e,n.t("common.source")||"Source")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[e._v(" "+e._s(n.t("common.source")||"Source")+" ")])]):e._e(),n.props.showCopyButton?t("button",{staticClass:"d2-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-label":n.copyText?n.t("common.copied")||"Copied":n.t("common.copy")||"Copy"},on:{click:n.copy,mouseenter:function(e){return n.onCopyHover(e)},focus:function(e){return n.onCopyHover(e)},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.copyText?t("svg",{staticClass:"w-3 h-3",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("rect",{attrs:{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}})])])]):e._e(),n.props.showExportButton&&n.svgMarkup?t("button",{staticClass:"d2-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-label":n.t("common.export")||"Export"},on:{click:n.exportSvg,mouseenter:function(e){n.onBtnHover(e,n.t("common.export")||"Export")},focus:function(e){n.onBtnHover(e,n.t("common.export")||"Export")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24"}},[t("path",{attrs:{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"}})])]):e._e(),n.props.showCollapseButton?t("button",{staticClass:"d2-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-pressed":n.isCollapsed},on:{click:n.toggleCollapse,mouseenter:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},focus:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",style:{rotate:n.isCollapsed?"0deg":"90deg"},attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"}})])]):e._e()])]):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!n.isCollapsed,expression:"!isCollapsed"}],ref:"bodyRef",staticClass:"d2-block-body",style:n.bodyStyle},[n.props.loading&&!n.hasPreview?t("div",{staticClass:"d2-source px-4 py-4"},[t("pre",{staticClass:"d2-code"},[t("code",[e._v(e._s(n.baseCode))])]),n.renderError?t("p",{staticClass:"d2-error mt-2 text-xs"},[e._v(" "+e._s(n.renderError)+" ")]):e._e()]):t("div",[n.showSourceFallback?t("div",{staticClass:"d2-source px-4 py-4"},[t("pre",{staticClass:"d2-code"},[t("code",[e._v(e._s(n.baseCode))])]),n.renderError?t("p",{staticClass:"d2-error mt-2 text-xs"},[e._v(" "+e._s(n.renderError)+" ")]):e._e()]):t("div",{staticClass:"d2-render",style:n.renderStyle},[t("div",{staticClass:"d2-svg",domProps:{innerHTML:e._s(n.svgMarkup)}}),n.renderError?t("p",{staticClass:"d2-error px-4 pb-3 text-xs"},[e._v(" "+e._s(n.renderError)+" ")]):e._e()])])])])},[function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{staticClass:"flex items-center gap-x-2"},[t("span",{staticClass:"text-sm font-medium font-mono"},[e._v("D2")])])}],!1,null,"bc9f707f",null,null).exports;Ct.install=e=>{e.component(Ct.__name,Ct)};const Tt=Object.freeze(Object.defineProperty({__proto__:null,default:Ct},Symbol.toStringTag,{value:"Module"}));let Nt=null,Dt=null;const jt=g(m.defineComponent({__name:"InfographicBlockNode",props:{node:null,maxHeight:{default:"500px"},loading:{type:Boolean,default:!0},isDark:{type:Boolean},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}},emits:["copy","export","openModal"],setup(e,{emit:t}){const n=e,{t:o}=se(),r=m.ref(!1),l=m.ref(!1),i=m.ref(),a=m.ref(!1),s=m.ref("360px"),u=m.ref(!1),c=m.ref(),p=m.ref(null),f=m.ref(1),h=m.ref(0),v=m.ref(0),g=m.ref(!1),w=m.ref({x:0,y:0}),y=m.computed(()=>n.node.code);function x(e){return!e||e.disabled}function M(e){return d(this,null,function*(){try{const n=(new XMLSerializer).serializeToString(e),o=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),r=URL.createObjectURL(o);if("undefined"!=typeof document){const e=document.createElement("a");e.href=r,e.download=`infographic-${Date.now()}.svg`;try{document.body.appendChild(e),e.click(),document.body.removeChild(e)}catch(t){}URL.revokeObjectURL(r)}}catch(n){console.error("Failed to export SVG:",n)}})}function k(e){"Escape"===e.key&&u.value&&C()}function b(){if(u.value=!0,"undefined"!=typeof document)try{document.body.style.overflow="hidden"}catch(e){}if("undefined"!=typeof window)try{window.addEventListener("keydown",k)}catch(e){}m.nextTick(()=>{if(i.value&&c.value){c.value.innerHTML="";const e=document.createElement("div");e.style.transition="transform 0.1s ease",e.style.transformOrigin="center center",e.style.width="100%",e.style.height="100%",e.style.display="flex",e.style.alignItems="center",e.style.justifyContent="center";const t=i.value.cloneNode(!0);t.classList.add("fullscreen"),t.style.height="auto",e.appendChild(t),c.value.appendChild(e),p.value=e,e.style.transform=`translate(${h.value}px, ${v.value}px) scale(${f.value})`}})}function C(){if(u.value=!1,c.value&&(c.value.innerHTML=""),p.value=null,"undefined"!=typeof document)try{document.body.style.overflow=""}catch(e){}if("undefined"!=typeof window)try{window.removeEventListener("keydown",k)}catch(e){}}let T=null;function N(){return d(this,null,function*(){var e;if(i.value)try{const t=yield function(){return d(this,null,function*(){return Dt||Nt||(Nt=import("@antv/infographic").then(e=>{const t=e&&e.default?e.default:e;let n=t;return"function"==typeof t&&t.prototype&&t.prototype.render?n=t:e.Infographic?n=e.Infographic:t&&t.Infographic&&(n=t.Infographic),Dt=n,n}).catch(e=>(console.warn("Failed to load @antv/infographic",e),null)),Nt)})}();if(!t)return void console.warn("Infographic library failed to load.");T&&(null==(e=T.destroy)||e.call(T),T=null),i.value.innerHTML="",T=new t({container:i.value,width:"100%",height:"100%"}),T.render(y.value),m.nextTick(()=>{if(i.value){const e=i.value.scrollHeight;e>0&&(s.value=`${Math.min(e,800)}px`)}})}catch(t){console.error("Failed to render infographic:",t),i.value&&(i.value.innerHTML=`<div class="text-red-500 p-4">Failed to render infographic: ${t instanceof Error?t.message:"Unknown error"}</div>`)}})}m.watch(()=>y.value,()=>{a.value||l.value||m.nextTick(()=>{N()})}),m.watch(()=>a.value,e=>{e||l.value||m.nextTick(()=>{N()})}),m.watch(()=>l.value,e=>{e||a.value||m.nextTick(()=>{N()})}),m.onMounted(()=>{a.value||l.value||m.nextTick(()=>{N()})}),m.onBeforeUnmount(()=>{var e;if(T&&(null==(e=T.destroy)||e.call(T),T=null),"undefined"!=typeof window)try{window.removeEventListener("keydown",k)}catch(t){}});const D=m.computed(()=>n.isDark?"infographic-action-btn p-2 text-xs rounded text-gray-400 hover:bg-gray-700 hover:text-gray-200":"infographic-action-btn p-2 text-xs rounded text-gray-600 hover:bg-gray-200 hover:text-gray-700"),j=m.computed(()=>a.value||l.value),I=m.computed(()=>({transform:`translate(${h.value}px, ${v.value}px) scale(${f.value})`}));return m.watch(I,e=>{u.value&&p.value&&(p.value.style.transform=e.transform)}),{__sfc:!0,props:n,_emits:t,t:o,copyText:r,isCollapsed:l,infographicContainer:i,showSource:a,containerHeight:s,isModalOpen:u,modalContent:c,modalCloneWrapper:p,zoom:f,translateX:h,translateY:v,isDragging:g,dragStart:w,baseCode:y,shouldSkipEventTarget:x,onBtnHover:function(e,t,o="top"){if(x(e.currentTarget))return;const r=e,l=null!=(null==r?void 0:r.clientX)&&null!=(null==r?void 0:r.clientY)?{x:r.clientX,y:r.clientY}:void 0;le(e.currentTarget,t,o,!1,l,n.isDark)},onBtnLeave:function(){ie()},onCopyHover:function(e){if(x(e.currentTarget))return;const t=r.value?o("common.copied")||"Copied":o("common.copy")||"Copy",l=e,i=null!=(null==l?void 0:l.clientX)&&null!=(null==l?void 0:l.clientY)?{x:l.clientX,y:l.clientY}:void 0;le(e.currentTarget,t,"top",!1,i,n.isDark)},copy:function(){return d(this,null,function*(){try{const e=y.value;"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(e)),r.value=!0,setTimeout(()=>{r.value=!1},1e3)}catch(e){console.error("Failed to copy:",e)}})},handleSwitchMode:function(e){a.value="source"===e},handleExportClick:function(){var e;const t=null==(e=i.value)?void 0:e.querySelector("svg");t?M(t):console.error("SVG element not found")},exportSvg:M,handleKeydown:k,openModal:b,closeModal:C,handleOpenModalClick:function(){b()},zoomIn:function(){f.value<3&&(f.value+=.1)},zoomOut:function(){f.value>.5&&(f.value-=.1)},resetZoom:function(){f.value=1,h.value=0,v.value=0},startDrag:function(e){g.value=!0,e instanceof MouseEvent?w.value={x:e.clientX-h.value,y:e.clientY-v.value}:w.value={x:e.touches[0].clientX-h.value,y:e.touches[0].clientY-v.value}},onDrag:function(e){if(!g.value)return;let t,n;e instanceof MouseEvent?(t=e.clientX,n=e.clientY):(t=e.touches[0].clientX,n=e.touches[0].clientY),h.value=t-w.value.x,v.value=n-w.value.y},stopDrag:function(){g.value=!1},infographicInstance:T,renderInfographic:N,computedButtonStyle:D,isFullscreenDisabled:j,transformStyle:I,infographicIconUrl:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUuNTIiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyOTEgMzAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxnPjxwYXRoIGQ9Ik0xNDAuOTA0IDIzOS4zNzZDMTI4LjgzIDIzOS42ODMgMTE5LjY3NSAyMzkuMjk5IDExNS40NDggMjQzLjg0M0MxMTAuOTAyIDI0OC4wNyAxMTEuMjg4IDI1Ny4yMjcgMTEwLjk3OSAyNjkuMzAyQzExMS4xMTggMjc0LjY3NSAxMTEuMTE4IDI3OS40NzggMTExLjQ3MiAyODMuNTJDMTExLjY2MiAyODUuNjM4IDExMS45NSAyODcuNTQ3IDExMi40MDYgMjg5LjIyNEMxMTIuNDExIDI4OS4yNDMgMTEyLjQxNiAyODkuMjU5IDExMi40MjIgMjg5LjI4QzExMi40NjIgMjg5LjQxOSAxMTIuNDk2IDI4OS41NTggMTEyLjUzOSAyODkuNjkxQzExMy4xNjggMjkxLjc4NyAxMTQuMDg4IDI5My40OTEgMTE1LjQ0NiAyOTQuNzU4QzExNi42NjIgMjk2LjA2NCAxMTguMjgzIDI5Ni45NjMgMTIwLjI2NCAyOTcuNjlDMTIwLjM2IDI5Ny42MTQgMTIwLjQ2NCAyOTcuNjQ2IDEyMC41NTUgMjk3LjY3NUMxMjAuNTYgMjk3LjY4IDEyMC41NiAyOTcuNjggMTIwLjU2NiAyOTcuNjhDMTIwLjg0OCAyOTcuNzY4IDEyMS4xNDIgMjk3Ljg0NiAxMjEuNDQzIDI5Ny45MjNDMTIxLjQ1NCAyOTcuOTIzIDEyMS40NjQgMjk3LjkyOCAxMjEuNDc4IDI5Ny45MzRDMTIyLjg3NSAyOTguMjcyIDEyNC40MjQgMjk4LjUwNyAxMjYuMTEgMjk4LjY3OEMxMjYuMzI2IDI5OC42OTYgMTI2LjU0MiAyOTguNzE4IDEyNi43NjMgMjk4LjczOUMxMzAuNzkgMjk5LjA4NiAxMzUuNTU4IDI5OS4wODggMTQwLjkwNCAyOTkuMjIyQzE1Mi45NzQgMjk4LjkxMiAxNjIuMTI4IDI5OS4zMDIgMTY2LjM2IDI5NC43NThDMTcwLjkwNCAyOTAuNTI2IDE3MC41MTUgMjgxLjM3MSAxNzAuODI0IDI2OS4zMDJDMTcwLjUxNSAyNTcuMjI3IDE3MC45MDcgMjQ4LjA3IDE2Ni4zNiAyNDMuODQzQzE2Mi4xMzEgMjM5LjI5OSAxNTIuOTc0IDIzOS42ODMgMTQwLjkwNCAyMzkuMzc2WiIgZmlsbD0iI0ZGNjM3NiI+PC9wYXRoPjxwYXRoIGQ9Ik0yMS4yMTU1IDEyOC4zOThDMTIuNjU1NSAxMjguNjE2IDYuMTY0ODQgMTI4LjMzOSAzLjE2NzUxIDEzMS41NkMtMC4wNTM4MjIyIDEzNC41NiAwLjIxODE3OCAxNDEuMDU0IC0wLjAwMDQ4ODI4MSAxNDkuNjA4QzAuMjE4MTc4IDE1OC4xNjggLTAuMDUzODIyMiAxNjQuNjU5IDMuMTY3NTEgMTY3LjY1NkM2LjE2NDg0IDE3MC44NzggMTIuNjU1NSAxNzAuNjA2IDIxLjIxNTUgMTcwLjgyNEMyNS4wMjYyIDE3MC43MjYgMjguNDI4OCAxNzAuNzI2IDMxLjI5NTUgMTcwLjQ3NUMzMi43OTY4IDE3MC4zNDIgMzQuMTQ4OCAxNzAuMTM2IDM1LjMzODIgMTY5LjgxNEMzNS4zNTQyIDE2OS44MTEgMzUuMzY0OCAxNjkuODA2IDM1LjM3ODIgMTY5LjgwM0MzNS40NzY4IDE2OS43NzQgMzUuNTc1NSAxNjkuNzQ3IDM1LjY2ODggMTY5LjcxOEMzNy4xNTY4IDE2OS4yNzIgMzguMzY0OCAxNjguNjIyIDM5LjI2MzUgMTY3LjY1NkM0MC4xOTE1IDE2Ni43OTUgNDAuODI2MiAxNjUuNjQ2IDQxLjI3MTUgMTY0LjI0M0M0MS4yODc1IDE2NC4xNzQgNDEuMzExNSAxNjQuMTAyIDQxLjMzMjggMTY0LjAzNUM0MS4zMzI4IDE2NC4wMzUgNDEuMzM1NSAxNjQuMDMyIDQxLjMzNTUgMTY0LjAyN0M0MS4zOTY4IDE2My44MjcgNDEuNDUyOSAxNjMuNjIyIDQxLjUwNjIgMTYzLjQwNkM0MS41MDYyIDE2My4zOTggNDEuNTExNSAxNjMuMzkyIDQxLjUxNDIgMTYzLjM4MkM0MS43NTQyIDE2Mi4zOTIgNDEuOTIyMiAxNjEuMjk0IDQyLjA0MjIgMTYwLjA5NkM0Mi4wNTU1IDE1OS45NDQgNDIuMDcxNSAxNTkuNzkyIDQyLjA4NDggMTU5LjYzNUM0Mi4zMzI4IDE1Ni43NzkgNDIuMzMyOCAxNTMuMzk4IDQyLjQyNjIgMTQ5LjYwOEM0Mi4yMDc1IDE0MS4wNTQgNDIuNDg0OCAxMzQuNTYgMzkuMjYzNSAxMzEuNTZDMzYuMjYzNSAxMjguMzM5IDI5Ljc3MjggMTI4LjYxNiAyMS4yMTU1IDEyOC4zOThaIiBmaWxsPSIjRkZDQ0NDIj48L3BhdGg+PHBhdGggZD0iTTgxLjA1OTUgMTg0LjE3MUM3MC44NTY4IDE4NC40MzMgNjMuMTIwOCAxODQuMTAyIDU5LjU0NzUgMTg3Ljk0MkM1NS43MDc1IDE5MS41MTggNTYuMDMyOCAxOTkuMjU0IDU1Ljc3NDIgMjA5LjQ1NEM1Ni4wMzI4IDIxOS42NTcgNTUuNzA3NSAyMjcuMzkzIDU5LjU0NzUgMjMwLjk2M0M2My4xMjA4IDIzNC44MDMgNzAuODU2OCAyMzQuNDc4IDgxLjA1OTUgMjM0LjczOUM4NS42MDA4IDIzNC42MjIgODkuNjU5NSAyMzQuNjIyIDkzLjA3MjggMjM0LjMyM0M5NC44NjQ4IDIzNC4xNjMgOTYuNDc1NSAyMzMuOTIxIDk3Ljg5NDIgMjMzLjUzNEM5Ny45MTAyIDIzMy41MjkgOTcuOTIzNSAyMzMuNTI2IDk3Ljk0MjIgMjMzLjUyMUM5OC4wNTY4IDIzMy40ODYgOTguMTc0MiAyMzMuNDU3IDk4LjI4ODggMjMzLjQyMkMxMDAuMDYgMjMyLjg4OSAxMDEuNSAyMzIuMTEzIDEwMi41NjkgMjMwLjk2M0MxMDMuNjc2IDIyOS45MzcgMTA0LjQzMyAyMjguNTY2IDEwNC45NjQgMjI2Ljg5NEMxMDQuOTg1IDIyNi44MTEgMTA1LjAxMiAyMjYuNzI2IDEwNS4wMzYgMjI2LjY0NkMxMDUuMDQxIDIyNi42NDMgMTA1LjA0MSAyMjYuNjQzIDEwNS4wNDEgMjI2LjYzOEMxMDUuMTE2IDIyNi40MDEgMTA1LjE4IDIyNi4xNTMgMTA1LjI0NCAyMjUuODk3QzEwNS4yNDQgMjI1Ljg4OSAxMDUuMjQ5IDIyNS44ODEgMTA1LjI1NCAyMjUuODY3QzEwNS41NCAyMjQuNjg5IDEwNS43NCAyMjMuMzc5IDEwNS44ODEgMjIxLjk1M0MxMDUuOSAyMjEuNzcxIDEwNS45MTYgMjIxLjU5IDEwNS45MzQgMjIxLjQwM0MxMDYuMjI4IDIxOC4wMDEgMTA2LjIyOCAyMTMuOTY5IDEwNi4zNDIgMjA5LjQ1NEMxMDYuMDgxIDE5OS4yNTQgMTA2LjQxMiAxOTEuNTE4IDEwMi41NzIgMTg3Ljk0MkM5OC45OTU1IDE4NC4xMDIgOTEuMjU2OCAxODQuNDMzIDgxLjA1OTUgMTg0LjE3MVoiIGZpbGw9IiNGRjkzOUYiPjwvcGF0aD48cGF0aCBkPSJNMjYwLjU5MSAxNTEuODdDMjE1LjY1MiAxNTEuODcgMjAzLjAyIDE2NC41MjMgMjAzLjAyIDIwOS40NjJIMTk4LjQ3NkMxOTguNDc2IDE2NC41MjMgMTg1LjgzNiAxNTEuODgxIDE0MC44OTUgMTUxLjg4MVYxNDcuMzM3QzE4NS44MzYgMTQ3LjMzNyAxOTguNDg3IDEzNC43MDUgMTk4LjQ4NyA4OS43NjU5SDIwMy4wMkMyMDMuMDIgMTM0LjcwNSAyMTUuNjUyIDE0Ny4zMzcgMjYwLjU5MSAxNDcuMzM3VjE1MS44N1pNMjg2LjA1MiAxMjQuMTU4QzI4MS44MiAxMTkuNjE0IDI3Mi42NiAxMjAuMDAxIDI2MC41OTEgMTE5LjY4OUMyNDguNTIxIDExOS4zODUgMjM5LjM2MSAxMTkuNzcxIDIzNS4xMjkgMTE1LjIyN0MyMzAuNTg1IDExMC45OTUgMjMwLjk4MyAxMDEuODQ2IDIzMC42NzEgODkuNzY1OUMyMzAuNTEzIDgzLjczMTIgMjMwLjUzNSA3OC40MjcyIDIzMC4wMjMgNzQuMTAxOUMyMjkuNTEzIDY5Ljc2NTkgMjI4LjQ4MSA2Ni40MjE5IDIyNi4yMDkgNjQuMzA0NkMyMjEuOTY3IDU5Ljc2MDYgMjEyLjgxNyA2MC4xNDcyIDIwMC43NDggNTkuODQ1OUMxODguNjgxIDYwLjE0NzIgMTc5LjUxOSA1OS43NjA2IDE3NS4yODcgNjQuMzA0NkMxNzAuNzUzIDY4LjUzNjYgMTcxLjEyOSA3Ny42OTY2IDE3MC44MjggODkuNzY1OUMxNzAuNTE2IDEwMS44MzUgMTcwLjkgMTEwLjk5NSAxNjYuMzU2IDExNS4yMjdDMTYyLjEyNCAxMTkuNzcxIDE1Mi45ODUgMTE5LjM3NCAxNDAuOTA1IDExOS42ODlDMTM4Ljg3MyAxMTkuNzM5IDEzNi45MjQgMTE5Ljc3MSAxMzUuMDcxIDExOS44MTFDMTE5LjMxMyAxMTguNjk3IDEwNi4zMzcgMTEyLjMxOCAxMDYuMzM3IDg5Ljc2NTlDMTA2LjIxMiA4NC42Njk5IDEwNi4yMzMgODAuMTc5MiAxMDUuODA3IDc2LjUyMDZDMTA1LjM2NyA3Mi44NzI2IDEwNC40OTIgNzAuMDM3OSAxMDIuNTc1IDY4LjI1NjZDOTkuMDAxMyA2NC40MTEyIDkxLjI1NzMgNjQuNzQ0NiA4MS4wNjUzIDY0LjQ4MzJDNzAuODYgNjQuNzQ0NiA2My4xMTg2IDY0LjQxMTIgNTkuNTUzMyA2OC4yNTY2QzU1LjcwOCA3MS44Mjk5IDU2LjAzMDYgNzkuNTYzMiA1NS43NjkzIDg5Ljc2NTlDNTYuMDMwNiA5OS45Njg2IDU1LjcwOCAxMDcuNzAyIDU5LjU1MzMgMTExLjI3OEM2My4xMTg2IDExNS4xMTMgNzAuODYgMTE0Ljc5IDgxLjA2NTMgMTE1LjA0OUMxMDMuNjE3IDExNS4wNDkgMTA5Ljk5NiAxMjguMDM1IDExMS4xIDE0My44MDNDMTExLjA2OCAxNDUuNjU5IDExMS4wMjggMTQ3LjU4NyAxMTAuOTc1IDE0OS42MTlDMTExLjEyMSAxNTQuOTg3IDExMS4xMjEgMTU5Ljc5IDExMS40NzYgMTYzLjgzNUMxMTEuNjYzIDE2NS45NSAxMTEuOTQ1IDE2Ny44NTcgMTEyLjQwNCAxNjkuNTM0QzExMi40MTIgMTY5LjU1NSAxMTIuNDEyIDE2OS41NjYgMTEyLjQyMyAxNjkuNTk4QzExMi40NjUgMTY5LjczNCAxMTIuNDk3IDE2OS44NjcgMTEyLjUzNyAxNzAuMDAzQzExMy4xNjQgMTcyLjA5OSAxMTQuMDkyIDE3My44MDkgMTE1LjQ0NyAxNzUuMDdDMTE2LjY2NSAxNzYuMzcxIDExOC4yODEgMTc3LjI3OCAxMjAuMjcxIDE3Ny45MDVDMTIwLjM2NCAxNzcuOTM0IDEyMC40NiAxNzcuOTU1IDEyMC41NjQgMTc3Ljk4N0MxMjAuODU1IDE3OC4wODEgMTIxLjE0NSAxNzguMTUzIDEyMS40MzkgMTc4LjIzOEMxMjEuNDYgMTc4LjIzOCAxMjEuNDcxIDE3OC4yMzggMTIxLjQ3OSAxNzguMjQ5QzEyMi44NzYgMTc4LjU4MiAxMjQuNDIgMTc4LjgyMiAxMjYuMTA4IDE3OC45ODdDMTI2LjMyNyAxNzkuMDA5IDEyNi41NDUgMTc5LjAzIDEyNi43NjQgMTc5LjA1MUMxMzAuNzg4IDE3OS4zOTUgMTM1LjU1OSAxNzkuMzk1IDE0MC45MDUgMTc5LjUyOUMxNTIuOTc1IDE3OS44NDMgMTYyLjEyNCAxNzkuNDU3IDE2Ni4zNTYgMTg0LjAwMUMxNzAuOSAxODguMjMzIDE3MC41MTYgMTk3LjM3MSAxNzAuODI4IDIwOS40NTFDMTcxLjEyOSAyMjEuNTI5IDE3MC43NDMgMjMwLjY4MSAxNzUuMjg3IDIzNC45MUMxNzkuNTE5IDIzOS40NTQgMTg4LjY4MSAyMzkuMDcgMjAwLjc0OCAyMzkuMzcxQzIwNi4xMjcgMjM5LjIzNSAyMTAuOTIxIDIzOS4yMzUgMjE0Ljk3NSAyMzguODgxQzIxNy4wNzkgMjM4LjY5NCAyMTguOTg1IDIzOC40MDMgMjIwLjY3NiAyMzcuOTU1QzIyMC42OTUgMjM3Ljk0NSAyMjAuNzA1IDIzNy45MzQgMjIwLjcyNyAyMzcuOTM0QzIyMC44NzMgMjM3Ljg5MSAyMjAuOTk5IDIzNy44NTkgMjIxLjEzNSAyMzcuODE5QzIyMy4yMjggMjM3LjE5MyAyMjQuOTM3IDIzNi4yNjUgMjI2LjIwOSAyMzQuOTFDMjI3LjUxMSAyMzMuNjkxIDIyOC40MDkgMjMyLjA2NSAyMjkuMDQ0IDIzMC4wOTdDMjI5LjA2NSAyMzAuMDAzIDIyOS4wOTUgMjI5Ljg5OSAyMjkuMTI3IDIyOS44MDNWMjI5Ljc5M0MyMjkuMjIgMjI5LjUxMyAyMjkuMjk1IDIyOS4yMjIgMjI5LjM2NyAyMjguOTE4QzIyOS4zNjcgMjI4Ljg5NyAyMjkuMzc3IDIyOC44OTcgMjI5LjM3NyAyMjguODc4QzIyOS43MjEgMjI3LjQ4MSAyMjkuOTUxIDIyNS45MzcgMjMwLjEyNyAyMjQuMjQ5QzIzMC4xMzcgMjI0LjAzIDIzMC4xNjkgMjIzLjgxMSAyMzAuMTkxIDIyMy41OTNDMjMwLjUzNSAyMTkuNTcxIDIzMC41MzUgMjE0Ljc5OCAyMzAuNjcxIDIwOS40NTFDMjMwLjk3MiAxOTcuMzcxIDIzMC41ODUgMTg4LjIzMyAyMzUuMTI5IDE4NC4wMDFDMjM5LjM2MSAxNzkuNDU3IDI0OC41MTEgMTc5Ljg0MyAyNjAuNTkxIDE3OS41MjlDMjcyLjY2IDE3OS4yMjcgMjgxLjgyIDE3OS42MTQgMjg2LjA1MiAxNzUuMDdDMjkwLjU5NiAxNzAuODM4IDI5MC4yMDkgMTYxLjY4OSAyOTAuNTExIDE0OS42MTlDMjkwLjIwOSAxMzcuNTM5IDI5MC41OTYgMTI4LjM3OSAyODYuMDUyIDEyNC4xNThaIiBmaWxsPSIjRkYzNTZBIj48L3BhdGg+PHBhdGggZD0iTTExMi40MDUgNDkuODQ4QzExMi40MTEgNDkuODY5NCAxMTIuNDE2IDQ5Ljg4MjcgMTEyLjQyMSA0OS45MDRDMTEyLjQ2MSA1MC4wNDI3IDExMi40OTkgNTAuMTgxNCAxMTIuNTM5IDUwLjMxNDdDMTEzLjE3MSA1Mi40MTM0IDExNC4wODggNTQuMTE0NyAxMTUuNDQ4IDU1LjM4NEMxMTYuNjYxIDU2LjY5MDcgMTE4LjI4MyA1Ny41ODk0IDEyMC4yNjQgNTguMjEzNEMxMjAuMzYgNTguMjQgMTIwLjQ2NCA1OC4yNjk0IDEyMC41NTUgNTguMzAxNEMxMjAuNTYgNTguMzA2NyAxMjAuNTYgNTguMzA2NyAxMjAuNTY1IDU4LjMwNjdDMTIwLjg0OCA1OC4zOTQ3IDEyMS4xNDEgNTguNDY5NCAxMjEuNDQzIDU4LjU0NjdDMTIxLjQ1MyA1OC41NDY3IDEyMS40NjQgNTguNTUyIDEyMS40OCA1OC41NTc0QzEyMi44NzUgNTguODk2IDEyNC40MjQgNTkuMTMzNCAxMjYuMTEyIDU5LjMwMTRDMTI2LjMyNSA1OS4zMjI3IDEyNi41NDEgNTkuMzQxNCAxMjYuNzYzIDU5LjM2MjdDMTMwLjc4OSA1OS43MTIgMTM1LjU2IDU5LjcxMiAxNDAuOTA0IDU5Ljg0NTRDMTUyLjk3MyA1OS41Mzg3IDE2Mi4xMjggNTkuOTI4IDE2Ni4zNiA1NS4zODRDMTcwLjkwNyA1MS4xNTIgMTcwLjUxNSA0MS45OTQ3IDE3MC44MjQgMjkuOTI1NEMxNzAuNTE3IDE3Ljg1MDcgMTcwLjkwNyA4LjY5NjAyIDE2Ni4zNjMgNC40NjkzNUMxNjIuMTMxIC0wLjA3NDY1MTEgMTUyLjk3MyAwLjMwOTM0OSAxNDAuOTA0IDEuNTI1ODhlLTA1QzEyOC44MjkgMC4zMDkzNDkgMTE5LjY3NSAtMC4wNzQ2NTExIDExNS40NDggNC40NjkzNUMxMTAuOTA0IDguNjk2MDIgMTExLjI4OCAxNy44NTA3IDExMC45NzkgMjkuOTI1NEMxMTEuMTE3IDM1LjMwMTQgMTExLjExNyA0MC4xMDE0IDExMS40NzIgNDQuMTQ0QzExMS42NjEgNDYuMjYxNCAxMTEuOTQ5IDQ4LjE3MDcgMTEyLjQwNSA0OS44NDhaIiBmaWxsPSIjRkY2Mzc2Ij48L3BhdGg+PC9nPjwvc3ZnPgo=",Portal:ct}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"my-4 rounded-lg border overflow-hidden shadow-sm",class:[n.props.isDark?"border-gray-700/30":"border-gray-200",{"is-rendering":n.props.loading}]},[n.props.showHeader?t("div",{staticClass:"infographic-block-header flex justify-between items-center px-4 py-2.5 border-b",class:n.props.isDark?"bg-gray-800 border-gray-700/30":"bg-gray-50 border-gray-200"},[e.$slots["header-left"]?t("div",[e._t("header-left")],2):t("div",{staticClass:"flex items-center gap-x-2 overflow-hidden"},[t("img",{staticClass:"w-4 h-4 my-0",attrs:{src:n.infographicIconUrl,alt:"Infographic"}}),t("span",{staticClass:"text-sm font-medium font-mono truncate",class:n.props.isDark?"text-gray-400":"text-gray-600"},[e._v("Infographic")])]),e.$slots["header-center"]?t("div",[e._t("header-center")],2):n.props.showModeToggle?t("div",{staticClass:"flex items-center gap-x-1 rounded-md p-0.5",class:n.props.isDark?"bg-gray-700":"bg-gray-100"},[t("button",{staticClass:"px-2.5 py-1 text-xs rounded transition-colors",class:[n.showSource?n.props.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700":n.props.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm"],on:{click:()=>n.handleSwitchMode("preview"),mouseenter:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},focus:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("div",{staticClass:"flex items-center gap-x-1"},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{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",{attrs:{cx:"12",cy:"12",r:"3"}})])]),t("span",[e._v(e._s(n.t("common.preview")||"Preview"))])])]),t("button",{staticClass:"px-2.5 py-1 text-xs rounded transition-colors",class:[n.showSource?n.props.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm":n.props.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"],on:{click:()=>n.handleSwitchMode("source"),mouseenter:function(e){n.onBtnHover(e,n.t("common.source")||"Source")},focus:function(e){n.onBtnHover(e,n.t("common.source")||"Source")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("div",{staticClass:"flex items-center gap-x-1"},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"}})]),t("span",[e._v(e._s(n.t("common.source")||"Source"))])])])]):e._e(),e.$slots["header-right"]?t("div",[e._t("header-right")],2):t("div",{staticClass:"flex items-center gap-x-1"},[n.props.showCollapseButton?t("button",{class:n.computedButtonStyle,attrs:{"aria-pressed":n.isCollapsed},on:{click:function(e){n.isCollapsed=!n.isCollapsed},mouseenter:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},focus:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",style:{rotate:n.isCollapsed?"0deg":"90deg"},attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"}})])]):e._e(),n.props.showCopyButton?t("button",{class:n.computedButtonStyle,on:{click:n.copy,mouseenter:function(e){return n.onCopyHover(e)},focus:function(e){return n.onCopyHover(e)},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.copyText?t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("rect",{attrs:{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}})])])]):e._e(),n.props.showExportButton?t("button",{class:`${n.computedButtonStyle} ${n.isFullscreenDisabled?"opacity-50 cursor-not-allowed":""}`,attrs:{disabled:n.isFullscreenDisabled},on:{click:n.handleExportClick,mouseenter:function(e){n.onBtnHover(e,n.t("common.export")||"Export")},focus:function(e){n.onBtnHover(e,n.t("common.export")||"Export")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}}),t("path",{attrs:{d:"m7 10l5 5l5-5"}})])])]):e._e(),n.props.showFullscreenButton?t("button",{class:`${n.computedButtonStyle} ${n.isFullscreenDisabled?"opacity-50 cursor-not-allowed":""}`,attrs:{disabled:n.isFullscreenDisabled},on:{click:n.handleOpenModalClick,mouseenter:function(e){n.onBtnHover(e,n.isModalOpen?n.t("common.minimize")||"Minimize":n.t("common.open")||"Open")},focus:function(e){n.onBtnHover(e,n.isModalOpen?n.t("common.minimize")||"Minimize":n.t("common.open")||"Open")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.isModalOpen?t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"}})]):t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"}})])]):e._e()])]):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!n.isCollapsed,expression:"!isCollapsed"}]},[n.showSource?t("div",{staticClass:"p-4",class:n.props.isDark?"bg-gray-900":"bg-gray-50"},[t("pre",{staticClass:"text-sm font-mono whitespace-pre-wrap",class:n.props.isDark?"text-gray-300":"text-gray-700"},[e._v(e._s(n.baseCode))])]):t("div",{staticClass:"relative"},[n.props.showZoomControls?t("div",{staticClass:"absolute top-2 right-2 z-10 rounded-lg"},[t("div",{staticClass:"flex items-center gap-2 backdrop-blur rounded-lg"},[t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomIn,mouseenter:function(e){n.onBtnHover(e,n.t("common.zoomIn")||"Zoom in")},focus:function(e){n.onBtnHover(e,n.t("common.zoomIn")||"Zoom in")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomOut,mouseenter:function(e){n.onBtnHover(e,n.t("common.zoomOut")||"Zoom out")},focus:function(e){n.onBtnHover(e,n.t("common.zoomOut")||"Zoom out")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M8 11h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.resetZoom,mouseenter:function(e){n.onBtnHover(e,n.t("common.resetZoom")||"Reset zoom")},focus:function(e){n.onBtnHover(e,n.t("common.resetZoom")||"Reset zoom")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[e._v(" "+e._s(Math.round(100*n.zoom))+"% ")])])]):e._e(),t("div",{staticClass:"min-h-[360px] relative transition-all duration-100 overflow-hidden block",class:n.props.isDark?"bg-gray-900":"bg-gray-50",style:{height:n.containerHeight},on:{mousedown:n.startDrag,mousemove:n.onDrag,mouseup:n.stopDrag,mouseleave:n.stopDrag,"&touchstart":function(e){return n.startDrag.apply(null,arguments)},"&touchmove":function(e){return n.onDrag.apply(null,arguments)},"&touchend":function(e){return n.stopDrag.apply(null,arguments)}}},[t("div",{staticClass:"absolute inset-0 cursor-grab",class:{"cursor-grabbing":n.isDragging},style:n.transformStyle},[t("div",{ref:"infographicContainer",staticClass:"w-full text-center flex items-center justify-center min-h-full"})])])])]),t(n.Portal,{attrs:{to:"body"}},[t("div",{staticClass:"markstream-vue"},[t("transition",{attrs:{name:"infographic-dialog",appear:""}},[n.isModalOpen?t("div",{staticClass:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",on:{click:function(e){return e.target!==e.currentTarget?null:n.closeModal.apply(null,arguments)}}},[t("div",{staticClass:"dialog-panel relative w-full h-full max-w-full max-h-full rounded shadow-lg overflow-hidden",class:n.props.isDark?"bg-gray-900":"bg-white"},[t("div",{staticClass:"absolute top-6 right-6 z-50 flex items-center gap-2"},[t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomIn}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomOut}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M8 11h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.resetZoom}},[e._v(" "+e._s(Math.round(100*n.zoom))+"% ")]),t("button",{staticClass:"inline-flex items-center justify-center p-2 rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.closeModal}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"}})])])]),t("div",{ref:"modalContent",staticClass:"w-full h-full flex items-center justify-center p-4 overflow-hidden",class:{"cursor-grab":!n.isDragging,"cursor-grabbing":n.isDragging},on:{mousedown:n.startDrag,mousemove:n.onDrag,mouseup:n.stopDrag,mouseleave:n.stopDrag,"&touchstart":function(e){return n.startDrag.apply(null,arguments)},"&touchmove":function(e){return n.onDrag.apply(null,arguments)},"&touchend":function(e){return n.stopDrag.apply(null,arguments)}}})])]):e._e()])],1)])],1)},[],!1,null,"1589dd71",null,null).exports,It=g(m.defineComponent({__name:"MarkdownCodeBlockNode",props:{node:{type:Object,required:!0},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{type:String,default:"vitesse-dark"},lightTheme:{type:String,default:"vitesse-light"},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{type:[String,Number],default:void 0},maxWidth:{type:[String,Number],default:void 0},themes:{type:Array,default:void 0},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0}},emits:["previewCode","copy"],setup(e,{emit:t}){var n,o;const r=e,{t:l}=se(),i=m.ref(String(null!=(n=r.node.language)?n:"")),a=m.ref(!1),s=m.ref(!1),u=m.ref(!1),c=m.ref(null),p=m.ref(null),h=m.ref(""),v=m.ref(!1);let g;const w=m.ref(!0),y=m.ref(0),x=m.ref(14),M=m.ref(x.value),k=m.computed(()=>{const e=x.value,t=M.value;return"number"==typeof e&&Number.isFinite(e)&&e>0&&"number"==typeof t&&Number.isFinite(t)&&t>0}),b=m.computed(()=>{const e=i.value.trim().toLowerCase();return st[e]||e.charAt(0).toUpperCase()+e.slice(1)}),C=m.computed(()=>at(i.value.trim().toLowerCase().split(":")[0])),T=m.computed(()=>{const e=i.value.trim().toLowerCase();return r.isShowPreview&&("html"===e||"svg"===e)}),N=m.computed(()=>{const e={},t=e=>{if(null!=e)return"number"==typeof e?`${e}px`:String(e)},n=t(r.minWidth),o=t(r.maxWidth);return n&&(e.minWidth=n),o&&(e.maxWidth=o),e}),D=m.computed(()=>({fontSize:`${M.value}px`}));function j(){return r.isDark?r.darkTheme:r.lightTheme}function I(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function _(e){if(null==g||g.disconnect(),g=void 0,!e)return h.value="",void(v.value=!1);h.value=`<pre class="shiki shiki-fallback"><code>${I(e)}</code></pre>`,v.value=!1}function E(){h.value="",v.value=!0}function L(){var e;const t=p.value;return!!t&&(t.childNodes.length>0||Boolean(null==(e=t.textContent)?void 0:e.trim().length))}function S(){return d(this,null,function*(){if(yield m.nextTick(),L())return void E();const e=p.value;e&&(null==g||g.disconnect(),g=new MutationObserver(()=>{L()&&(E(),null==g||g.disconnect(),g=void 0)}),g.observe(e,{childList:!0,subtree:!0}))})}let B,A,O,z;const R=new Set,P=new Set,H=void 0!=={url:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:f&&"SCRIPT"===f.tagName.toUpperCase()&&f.src||new URL("index.cjs",document.baseURI).href}&&Boolean(null==(o={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:o.DEV);function U(e,t=!1){var n;const[o]=String(null!=e?e:"").split(":"),r=null!=(n=null==o?void 0:o.trim().toLowerCase())?n:"";return r?!z||z.has(r)?r:(t&&H&&!R.has(r)&&(R.add(r),console.warn(`[MarkdownCodeBlockNode] Language "${r}" not preloaded in stream-markdown; falling back to plaintext.`)),"plaintext"):"plaintext"}function $(e,t){return d(this,null,function*(){if(!B)return;const n=U(t,Boolean(e&&e.length));try{yield B.updateCode(e,n)}catch(o){"plaintext"!==n?(H&&!P.has(n)&&(P.add(n),console.warn(`[MarkdownCodeBlockNode] Failed to render language "${n}", retrying as plaintext.`,o)),yield B.updateCode(e,"plaintext")):H&&console.warn("[MarkdownCodeBlockNode] Failed to render code block even as plaintext.",o)}})}function F(){return d(this,null,function*(){if(!A)try{const e=yield import("stream-markdown");A=e.createShikiStreamRenderer,O=e.registerHighlight;const t=Array.isArray(e.defaultLanguages)?e.defaultLanguages:void 0;z=t?new Set(t.map(e=>e.toLowerCase())):void 0,null==O||O({themes:r.themes})}catch(e){console.warn("[MarkdownCodeBlockNode] stream-markdown not available:",e)}})}function Y(){return d(this,null,function*(){yield F(),c.value&&p.value?(null==O||O({themes:r.themes}),!B&&A&&(B=A(p.value,{theme:j()}),v.value=!0),B?!1===r.stream&&r.loading?_(r.node.code):(_(r.node.code),yield $(r.node.code,i.value),yield S()):_(r.node.code)):_(r.node.code)})}function V(e,t=50){return e.scrollHeight-e.scrollTop-e.clientHeight<=t}function Q(e){return!e||e.disabled}return Y(),m.onMounted(()=>{Y()}),m.onBeforeUnmount(()=>{null==g||g.disconnect(),g=void 0}),m.watch(()=>r.themes,()=>d(this,null,function*(){O&&O({themes:r.themes})})),m.watch(()=>r.loading,e=>{e||Y()}),m.watch(()=>[r.node.code,r.node.language],e=>d(this,[e],function*([e,t]){t!==i.value&&(i.value=t.trim()),c.value&&p.value?(B||(_(e),yield Y()),B&&e&&(!1===r.stream&&r.loading||(_(e),yield $(e,t),yield S()))):_(e)})),m.watch(()=>[r.darkTheme,r.lightTheme],()=>d(this,null,function*(){c.value&&p.value&&(B||(yield Y()),null==B||B.setTheme(j()))})),m.watch(()=>r.node.code,()=>d(this,null,function*(){if(s.value||!w.value)return;yield m.nextTick();const e=c.value;e&&e.scrollHeight>e.clientHeight&&(e.scrollTop=e.scrollHeight)})),{__sfc:!0,props:r,emits:t,t:l,codeLanguage:i,copyText:a,isExpanded:s,isCollapsed:u,codeBlockContent:c,rendererTarget:p,fallbackHtml:h,rendererReady:v,renderObserver:g,autoScrollEnabled:w,lastScrollTop:y,codeFontMin:10,codeFontMax:36,codeFontStep:1,defaultCodeFontSize:x,codeFontSize:M,fontBaselineReady:k,displayLanguage:b,languageIcon:C,isPreviewable:T,containerStyle:N,contentStyle:D,getPreferredColorScheme:j,escapeHtml:I,renderFallback:_,clearFallback:E,hasRendererContent:L,clearFallbackWhenRendererReady:S,renderer:B,createShikiRenderer:A,registerHighlight:O,registeredHighlightLanguages:z,warnedMissingLanguages:R,warnedRendererErrors:P,isDevEnv:H,normalizeRendererLanguage:U,updateRendererWithFallback:$,ensureStreamMarkdownLoaded:F,initRenderer:Y,isAtBottom:V,handleScroll:function(){const e=c.value;if(!e||s.value)return;const t=e.scrollTop;t<y.value?w.value=!1:V(e)&&(w.value=!0),y.value=t},copy:function(){return d(this,null,function*(){try{"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(r.node.code)),a.value=!0,t("copy",r.node.code),setTimeout(()=>{a.value=!1},1e3)}catch(e){console.error("Copy failed:",e)}})},shouldSkipEventTarget:Q,onBtnHover:function(e,t,n="top"){if(Q(e.currentTarget))return;const o=e,l=null!=(null==o?void 0:o.clientX)&&null!=(null==o?void 0:o.clientY)?{x:o.clientX,y:o.clientY}:void 0;le(e.currentTarget,t,n,!1,l,r.isDark)},onBtnLeave:function(){ie()},onCopyHover:function(e){if(Q(e.currentTarget))return;const t=a.value?l("common.copied")||"Copied":l("common.copy")||"Copy",n=e,o=null!=(null==n?void 0:n.clientX)&&null!=(null==n?void 0:n.clientY)?{x:n.clientX,y:n.clientY}:void 0;le(e.currentTarget,t,"top",!1,o,r.isDark)},toggleExpand:function(){s.value=!s.value;const e=c.value;e&&(s.value?(e.style.maxHeight="none",e.style["overflow-y"]="visible",e.style["overflow-x"]="auto"):(e.style.maxHeight="500px",e.style.overflow="auto",w.value=!0,m.nextTick(()=>{e.scrollHeight>e.clientHeight&&(e.scrollTop=e.scrollHeight)})))},toggleHeaderCollapse:function(){u.value=!u.value},increaseCodeFont:function(){const e=Math.min(36,M.value+1);M.value=e},decreaseCodeFont:function(){const e=Math.max(10,M.value-1);M.value=e},resetCodeFont:function(){M.value=x.value},previewCode:function(){if(!T.value)return;const e=(i.value||r.node.language).toLowerCase(),n="html"===e?"HTML Preview":"SVG Preview";t("previewCode",{type:"html"===e?"text/html":"image/svg+xml",content:r.node.code,title:n})}}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"code-block-container my-4 rounded-lg border overflow-hidden shadow-sm",class:[n.props.isDark?"border-gray-700/30 bg-gray-900":"border-gray-200 bg-white",n.props.isDark?"is-dark":""],style:n.containerStyle},[n.props.showHeader?t("div",{staticClass:"code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",staticStyle:{color:"var(--vscode-editor-foreground)","background-color":"var(--vscode-editor-background)"}},[e._t("header-left",function(){return[t("div",{staticClass:"flex items-center space-x-2"},[t("span",{staticClass:"icon-slot h-4 w-4 flex-shrink-0",domProps:{innerHTML:e._s(n.languageIcon)}}),t("span",{staticClass:"text-sm font-medium font-mono"},[e._v(e._s(n.displayLanguage))])])]}),e._t("header-right",function(){return[t("div",{staticClass:"flex items-center space-x-2"},[t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-pressed":n.isCollapsed},on:{click:n.toggleHeaderCollapse,mouseenter:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},focus:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",style:{rotate:n.isCollapsed?"0deg":"90deg"},attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"}})])]),n.props.showFontSizeButtons&&n.props.enableFontSizeControl?[t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!!Number.isFinite(n.codeFontSize)&&n.codeFontSize<=n.codeFontMin},on:{click:function(e){return n.decreaseCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.decrease")||"Decrease")},focus:function(e){n.onBtnHover(e,n.t("common.decrease")||"Decrease")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"}})])]),t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!n.fontBaselineReady||n.codeFontSize===n.defaultCodeFontSize},on:{click:function(e){return n.resetCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.reset")||"Reset")},focus:function(e){n.onBtnHover(e,n.t("common.reset")||"Reset")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}}),t("path",{attrs:{d:"M3 3v5h5"}})])])]),t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!!Number.isFinite(n.codeFontSize)&&n.codeFontSize>=n.codeFontMax},on:{click:function(e){return n.increaseCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.increase")||"Increase")},focus:function(e){n.onBtnHover(e,n.t("common.increase")||"Increase")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"}})])])]:e._e(),n.props.showCopyButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-label":n.copyText?n.t("common.copied")||"Copied":n.t("common.copy")||"Copy"},on:{click:n.copy,mouseenter:function(e){return n.onCopyHover(e)},focus:function(e){return n.onCopyHover(e)},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.copyText?t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("rect",{attrs:{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}})])])]):e._e(),n.props.showExpandButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-pressed":n.isExpanded},on:{click:n.toggleExpand,mouseenter:function(e){n.onBtnHover(e,n.isExpanded?n.t("common.collapse")||"Collapse":n.t("common.expand")||"Expand")},focus:function(e){n.onBtnHover(e,n.isExpanded?n.t("common.collapse")||"Collapse":n.t("common.expand")||"Expand")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.isExpanded?t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"}})]):t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"}})])]):e._e(),n.isPreviewable&&n.props.showPreviewButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-label":n.t("common.preview")||"Preview"},on:{click:n.previewCode,mouseenter:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},focus:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{"data-v-3d59cc65":"",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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{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",{attrs:{cx:"12",cy:"12",r:"3"}})])])]):e._e()],2)]})],2):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!(n.isCollapsed||!e.stream&&e.loading),expression:"!isCollapsed && (stream ? true : !loading)"}],ref:"codeBlockContent",staticClass:"code-block-content",style:n.contentStyle,on:{scroll:n.handleScroll}},[t("div",{ref:"rendererTarget",staticClass:"code-block-render"}),n.rendererReady?e._e():t("div",{staticClass:"code-fallback-plain",domProps:{innerHTML:e._s(n.fallbackHtml)}})]),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.stream&&e.loading,expression:"!stream && loading"}],staticClass:"code-loading-placeholder"},[e._t("loading",function(){return[e._m(0)]},{loading:e.loading,stream:e.stream})],2)])},[function(){var e=this._self._c;return this._self._setupProxy,e("div",{staticClass:"loading-skeleton"},[e("div",{staticClass:"skeleton-line"}),e("div",{staticClass:"skeleton-line"}),e("div",{staticClass:"skeleton-line short"})])}],!1,null,"50ee25fb",null,null).exports;let _t=null,Et=null,Lt=!1;const St=new Map,Bt=new Map;let At=5;const Ot=new Set;function zt(){if(St.size<At&&Ot.size){const t=Array.from(Ot);Ot.clear();for(const n of t)try{n()}catch(e){}}}let Rt=null;const Pt=void 0!=={url:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:f&&"SCRIPT"===f.tagName.toUpperCase()&&f.src||new URL("index.cjs",document.baseURI).href}&&Boolean(null==(e={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:e.DEV);try{"undefined"!=typeof window&&Pt&&Promise.resolve().then(()=>require("./performance-monitor.js")).then(e=>{Rt=e.perfMonitor})}catch(Fo){}function Ht(e,t=!0,n=2e3,o){return d(this,null,function*(){const r=performance.now();if(!ye()){const e=new Error("KaTeX rendering disabled");return e.name="KaTeXDisabled",e.code="KATEX_DISABLED",Promise.reject(e)}if(Et)return Promise.reject(Et);const l=`${t?"d":"i"}:${e}`,i=Bt.get(l);if(i)return Rt&&Rt.recordRender({type:"cache-hit",duration:performance.now()-r,formulaLength:e.length,timestamp:Date.now(),success:!0}),Promise.resolve(i);const a=_t||(Et=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),Et.name="WorkerInitError",Et.code="WORKER_INIT_ERROR",null);if(!a)return Promise.reject(Et);if(St.size>=At){const t=new Error("Worker busy");return t.name="WorkerBusy",t.code="WORKER_BUSY",t.busy=!0,t.inFlight=St.size,t.max=At,Rt&&Rt.recordRender({type:"worker",duration:performance.now()-r,formulaLength:e.length,timestamp:Date.now(),success:!1,error:"busy"}),Promise.reject(t)}return new Promise((l,i)=>{if(null==o?void 0:o.aborted){const e=new Error("Aborted");return e.name="AbortError",void i(e)}const s=Math.random().toString(36).slice(2),u=globalThis.setTimeout(()=>{St.delete(s);const t=new Error("Worker render timed out");t.name="WorkerTimeout",t.code="WORKER_TIMEOUT",Rt&&Rt.recordRender({type:"worker",duration:performance.now()-r,formulaLength:e.length,timestamp:Date.now(),success:!1,error:"timeout"}),i(t),zt()},n);o&&o.addEventListener("abort",()=>{globalThis.clearTimeout(u),St.has(s)&&St.delete(s);const e=new Error("Aborted");e.name="AbortError",i(e),zt()},{once:!0});const c=l,d=i;St.set(s,{resolve:t=>{Rt&&Rt.recordRender({type:"worker",duration:performance.now()-r,formulaLength:e.length,timestamp:Date.now(),success:!0}),c(t)},reject:t=>{Rt&&Rt.recordRender({type:"worker",duration:performance.now()-r,formulaLength:e.length,timestamp:Date.now(),success:!1,error:(null==t?void 0:t.message)||String(t)}),d(t)},timeoutId:u}),a.postMessage({id:s,content:e,displayMode:t})})})}function Ut(e,t=!0,n){const o=`${t?"d":"i"}:${e}`;if(Bt.set(o,n),Bt.size>200){const e=Bt.keys().next().value;Bt.delete(e)}}const $t="WORKER_BUSY";function Ft(e=2e3,t){return St.size<At?Promise.resolve():new Promise((n,o)=>{let r,l=!1;const i=()=>{l||(l=!0,r&&globalThis.clearTimeout(r),Ot.delete(i),n())};if(Ot.add(i),r=globalThis.setTimeout(()=>{if(l)return;l=!0,Ot.delete(i);const e=new Error("Wait for worker slot timed out");e.name="WorkerBusyTimeout",e.code="WORKER_BUSY_TIMEOUT",o(e)},e),queueMicrotask(()=>zt()),t){const e=()=>{if(l)return;l=!0,r&&globalThis.clearTimeout(r),Ot.delete(i);const e=new Error("Aborted");e.name="AbortError",o(e)};t.aborted?e():t.addEventListener("abort",e,{once:!0})}})}const Yt={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function Vt(e){return d(this,arguments,function*(e,t=!0,n={}){var o,r,l,i;if(!ye()){const e=new Error("KaTeX rendering disabled");throw e.name="KaTeXDisabled",e.code="KATEX_DISABLED",e}const a=null!=(o=n.timeout)?o:Yt.timeout,s=null!=(r=n.waitTimeout)?r:Yt.waitTimeout,u=null!=(l=n.backoffMs)?l:Yt.backoffMs,c=null!=(i=n.maxRetries)?i:Yt.maxRetries,d=Number.isFinite(c)?Math.max(0,Math.min(Math.floor(c),8)):Yt.maxRetries,p=n.signal;let m=0;for(;;){if(null==p?void 0:p.aborted){const e=new Error("Aborted");throw e.name="AbortError",e}try{return yield Ht(e,t,a,p)}catch(f){if((null==f?void 0:f.code)!==$t||m>=d)throw f;if(m++,yield Ft(s,p).catch(()=>{}),null==p?void 0:p.aborted){const e=new Error("Aborted");throw e.name="AbortError",e}u>0&&(yield new Promise(e=>globalThis.setTimeout(e,u*m)))}}})}const Qt=g(m.defineComponent({__name:"MathBlockNode",props:{node:null},setup(e){const t=e,n=m.ref(null),o=m.ref(null);let r=!1,l=0,i=!1,a=null;const s=ce();let u=null;const c=m.ref(!0);function p(){return d(this,null,function*(){if(!o.value||i)return;if(!t.node.content)return c.value=!1,o.value.textContent=t.node.raw,void(r=!0);if(!r)try{!u&&n.value&&(u=s(n.value)),yield null==u?void 0:u.whenVisible}catch(Fo){}a&&(a.abort(),a=null);const e=++l,p=new AbortController;a=p,Vt(t.node.content,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:1,signal:p.signal}).then(t=>{i||e!==l||o.value&&(o.value.innerHTML=t,r=!0,c.value=!1)}).catch(n=>d(this,null,function*(){if(i||e!==l)return;if(!o.value)return;const a=(null==n?void 0:n.code)||(null==n?void 0:n.name),s="KATEX_DISABLED"===a;if("WORKER_INIT_ERROR"===a||(null==n?void 0:n.fallbackToRenderer)||a===$t||"WORKER_TIMEOUT"===a){const e=yield xe();if(e){try{const n=e.renderToString(t.node.content,{throwOnError:t.node.loading,displayMode:!0});o.value.innerHTML=n,r=!0,c.value=!1,Ut(t.node.content,!0,n)}catch(Fo){}return}}if(s)return c.value=!1,void(o.value.textContent=t.node.raw);r||(c.value=!0),t.node.loading||(c.value=!1,o.value.textContent=t.node.raw)}))})}return m.watch(()=>[t.node.content,t.node.loading,t.node.raw],()=>p()),m.onMounted(()=>{p()}),m.onBeforeUnmount(()=>{var e;i=!0,a&&(a.abort(),a=null),null==(e=null==u?void 0:u.destroy)||e.call(u),u=null}),{__sfc:!0,props:t,containerEl:n,mathBlockElement:o,hasRenderedOnce:r,currentRenderId:l,isUnmounted:i,currentAbortController:a,registerVisibility:s,visibilityHandle:u,renderingLoading:c,renderMath:p}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{ref:"containerEl",staticClass:"math-block text-center overflow-x-auto relative min-h-[40px]"},[t("transition",{attrs:{name:"math-fade"}},[n.renderingLoading?t("div",{staticClass:"math-loading-overlay"},[t("div",{staticClass:"math-loading-spinner"})]):e._e()]),t("div",{ref:"mathBlockElement",class:{"math-rendering":n.renderingLoading}})],1)},[],!1,null,"16fb6236",null,null).exports,Wt=g(m.defineComponent({__name:"MathInlineNode",props:{node:null},setup(e){const t=e,n=m.ref(null),o=m.ref(null);let r=!1,l=0,i=!1,a=null;const s=m.ref(!0),u=ce();let c=null;function p(){return d(this,null,function*(){if(!o.value||i)return;if(!t.node.content)return s.value=!1,o.value.textContent=t.node.raw,void(r=!0);a&&(a.abort(),a=null);const e=++l,p=new AbortController;if(a=p,!r)try{!c&&n.value&&(c=u(n.value)),yield null==c?void 0:c.whenVisible}catch(Fo){}const m="$$"===t.node.markup;Vt(t.node.content,m,{timeout:1500,waitTimeout:0,maxRetries:0,signal:p.signal}).then(t=>{i||e!==l||o.value&&(o.value.innerHTML=t,s.value=!1,r=!0)}).catch(n=>d(this,null,function*(){if(i||e!==l)return;if(!o.value)return;const a=(null==n?void 0:n.code)||(null==n?void 0:n.name),u="KATEX_DISABLED"===a;if("WORKER_INIT_ERROR"===a||(null==n?void 0:n.fallbackToRenderer)||a===$t||"WORKER_TIMEOUT"===a){const e=yield xe();if(e){try{const n="$$"===t.node.markup,l=e.renderToString(t.node.content,{throwOnError:t.node.loading,displayMode:n});s.value=!1,o.value.innerHTML=l,r=!0,Ut(t.node.content,n,l)}catch(Fo){}return}}if(u)return s.value=!1,void(o.value.textContent=t.node.raw);r||(s.value=!u),t.node.loading?u&&(o.value.textContent=t.node.raw):(s.value=!1,o.value.textContent=t.node.raw)}))})}return m.watch(()=>[t.node.content,t.node.loading,t.node.markup,t.node.raw],()=>p()),m.onMounted(()=>{p()}),m.onBeforeUnmount(()=>{var e;i=!0,a&&(a.abort(),a=null),null==(e=null==c?void 0:c.destroy)||e.call(c),c=null}),{__sfc:!0,props:t,containerEl:n,mathElement:o,hasRenderedOnce:r,currentRenderId:l,isUnmounted:i,currentAbortController:a,renderingLoading:s,registerVisibility:u,visibilityHandle:c,renderMath:p}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("span",{ref:"containerEl",staticClass:"math-inline-wrapper"},[t("span",{directives:[{name:"show",rawName:"v-show",value:!n.renderingLoading,expression:"!renderingLoading"}],ref:"mathElement",staticClass:"math-inline"}),n.renderingLoading?t("transition",{attrs:{name:"table-node-fade"}},[t("span",{staticClass:"math-inline__loading",attrs:{role:"status","aria-live":"polite"}},[e._t("loading",function(){return[t("span",{staticClass:"math-inline__spinner animate-spin",attrs:{"aria-hidden":"true"}}),t("span",{staticClass:"sr-only"},[e._v("Loading")])]},{isLoading:n.renderingLoading})],2)]):e._e()],1)},[],!1,null,"ad191b1c",null,null).exports,Kt=()=>import("mermaid");let Xt=null,qt=Kt;function Zt(e){qt=e,Xt=null}function Gt(){return"function"==typeof qt}function Jt(e){if(!e)return e;const t=e&&e.default?e.default:e;if(t&&("function"==typeof t.render||"function"==typeof t.parse||"function"==typeof t.initialize))return t;if(t&&t.mermaidAPI&&("function"==typeof t.mermaidAPI.render||"function"==typeof t.mermaidAPI.parse)){const e=t.mermaidAPI;return u(s({},t),{render:e.render.bind(e),parse:e.parse?e.parse.bind(e):void 0,initialize:n=>"function"==typeof t.initialize?t.initialize(n):e.initialize?e.initialize(n):void 0})}return e.mermaid&&"function"==typeof e.mermaid.render?e.mermaid:t}function en(e){if(e)try{const t=null==e?void 0:e.initialize;e.initialize=n=>{const o=s({suppressErrorRendering:!0},n||{});return"function"==typeof t?t.call(e,o):(null==e?void 0:e.mermaidAPI)&&"function"==typeof e.mermaidAPI.initialize?e.mermaidAPI.initialize(o):void 0}}catch(Fo){}}let tn=null,nn=null;const on=new Map;let rn=5,ln=!1;const an="WORKER_BUSY",sn="MERMAID_DISABLED";function un(e,t,n=1400){if(!Gt()){const e=new Error("Mermaid rendering disabled");return e.name="MermaidDisabled",e.code=sn,Promise.reject(e)}if(nn)return Promise.reject(nn);const o=tn||(nn=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),nn.name="WorkerInitError",nn.code="WORKER_INIT_ERROR",null);if(!o)return Promise.reject(nn);if(on.size>=rn){const e=new Error("Worker busy");return e.name="WorkerBusy",e.code=an,e.inFlight=on.size,e.max=rn,Promise.reject(e)}return new Promise((r,l)=>{const i=Math.random().toString(36).slice(2);let a,s=!1;const u=()=>{s||(s=!0,null!=a&&globalThis.clearTimeout(a),on.delete(i))},c={resolve:e=>{u(),r(e)},reject:e=>{u(),l(e)}};on.set(i,c);try{o.postMessage({id:i,action:e,payload:t})}catch(d){return on.delete(i),void l(d)}a=globalThis.setTimeout(()=>{const e=new Error("Worker call timed out");e.name="WorkerTimeout",e.code="WORKER_TIMEOUT";const t=on.get(i);t&&t.reject(e)},n)})}function cn(e,t,n=1400){return d(this,null,function*(){try{return yield un("canParse",{code:e,theme:t},n)}catch(Fo){return Promise.reject(Fo)}})}function dn(e,t,n=1400){return d(this,null,function*(){try{return yield un("findPrefix",{code:e,theme:t},n)}catch(Fo){return Promise.reject(Fo)}})}function pn(){if(tn)try{for(const[e,t]of on.entries())t.reject(new Error("Worker terminated"));on.clear(),tn.terminate()}finally{tn=null}}const mn=g(m.defineComponent({__name:"MermaidBlockNode",props:{node:null,maxHeight:{default:"500px"},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!1}},emits:["copy","export","openModal","toggleMode"],setup(e,{emit:t}){var n,o;const r=e,l={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},i=m.ref(!1),a=m.computed(()=>r.isStrict?"strict":"loose"),c=m.computed(()=>({startOnLoad:!1,securityLevel:a.value,dompurifyConfig:"strict"===a.value?l:void 0,flowchart:"strict"===a.value?{htmlLabels:!1}:void 0}));function p(e){return e.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#")}const h=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],v=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function g(e){if(!e)return"";const t=e.trim();return v.test(t)?t:""}function w(e){const t=new Set(["script"]),n=[e,...Array.from(e.querySelectorAll("*"))];for(const o of n){if(t.has(o.tagName.toLowerCase())){o.remove();continue}const e=Array.from(o.attributes);for(const t of e){const e=t.name;if(/^on/i.test(e))o.removeAttribute(e);else{if("style"===e&&t.value){const n=t.value;if(h.some(e=>e.test(n))){o.removeAttribute(e);continue}}if(("href"===e||"xlink:href"===e)&&t.value){const n=g(t.value);if(!n){o.removeAttribute(e);continue}n!==t.value&&o.setAttribute(e,n)}}}}}function y(e){if("undefined"==typeof window||"undefined"==typeof DOMParser)return null;if(!e)return null;const t=p(e),n=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement;if(!n||"svg"!==n.nodeName.toLowerCase())return null;const o=n;return w(o),o}function x(e,t){if(!e)return"";try{e.replaceChildren()}catch(Fo){e.innerHTML=""}const n=y(t);return n?(e.appendChild(n),e.innerHTML):""}function M(e){if(e)try{e.replaceChildren()}catch(Fo){e.innerHTML=""}}function k(e,t){if(!e)return"";if("strict"===a.value)return x(e,t);try{e.replaceChildren()}catch(Fo){e.innerHTML=""}if(t)try{e.insertAdjacentHTML("afterbegin",t)}catch(Fo){e.innerHTML=t}return e.innerHTML}const{t:b}=se();function C(){return d(this,null,function*(){try{const e=yield function(){return d(this,null,function*(){if(Xt)return Xt;const e=function(){try{const e=globalThis;return Jt(null==e?void 0:e.mermaid)}catch(Fo){return null}}();if(e)return Xt=e,en(Xt),Xt;const t=qt;if(!t)return null;let n;try{n=yield t()}catch(o){if(t===Kt)throw new Error('Optional dependency "mermaid" is not installed. Please install it to enable mermaid diagrams.');throw o}return n?(Xt=Jt(n),en(Xt),Xt):null})}();return i.value=!!e,e}catch(e){throw i.value=!1,e}})}"undefined"!=typeof window&&(()=>{d(this,null,function*(){var e;try{const t=yield C();if(!t)return;null==(e=null==t?void 0:t.initialize)||e.call(t,s({},c.value))}catch(t){i.value=!1,console.warn("[markstream-vue2] Failed to initialize mermaid renderer. Call enableMermaid() to configure a loader.",t)}})})();const T=m.ref(!1),N=m.ref(!1),D=m.ref(),j=m.ref(),I=m.ref(),_=m.ref(null),E=ce();let L=null;const S=m.ref("undefined"==typeof window),B=m.ref(),A=m.computed(()=>r.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function O(e,t=A.value){const n=t,o=`%%{init: {"theme": "${"dark"===e?"dark":"default"}"}}%%\n`;return n.trim().startsWith("%%{")?n:o+n}const z=m.ref(1),R=m.ref(0),P=m.ref(0),H=m.ref(!1),U=m.ref({x:0,y:0}),$=m.ref(!1),F=m.ref(!1),Y=m.ref(!1),V=m.ref(null),Q=m.ref(0),W=m.ref(!1);let K=null,X=null,q=0;const Z=null!=(n=globalThis.requestIdleCallback)?n:(e,t)=>setTimeout(()=>e({didTimeout:!0}),16),G=Ye(()=>{Z(()=>{Ze()},{timeout:500})},300);function J(){null!=X&&(globalThis.clearTimeout(X),X=null)}function ee(e=600){if("undefined"==typeof globalThis)return;const t=Math.max(0,e);J(),X=globalThis.setTimeout(()=>{X=null,r.loading||Y.value||!S.value?ee(Math.min(1200,Math.max(300,1.2*t))):G()},t)}const te=m.ref("360px");let ne=null;const oe=m.ref(!1),re=m.ref(!1),ae=m.ref({}),ue=m.ref(null),de=m.ref(""),pe=m.ref(0);let me=null;const fe=m.ref(!1),he=m.ref({zoom:1,translateX:0,translateY:0,containerHeight:"360px"}),ve=m.computed(()=>r.enableWheelZoom?{wheel:Qe}:{}),ge=m.computed(()=>{var e,t,n,o;return{worker:null!=(e=r.workerTimeoutMs)?e:1400,parse:null!=(t=r.parseTimeoutMs)?t:1800,render:null!=(n=r.renderTimeoutMs)?n:2500,fullRender:null!=(o=r.fullRenderTimeoutMs)?o:4e3}}),we=null!=(o=globalThis.cancelIdleCallback)?o:e=>clearTimeout(e);let ye=null,xe=null,Me=!1,ke=800,be=null,Ce=0,Te=!0,Ne=0;function De(e,t){const n=null==t?void 0:t.timeoutMs,o=null==t?void 0:t.signal;if(null==o?void 0:o.aborted)return Promise.reject(new DOMException("Aborted","AbortError"));let r=null,l=!1,i=null;return new Promise((t,a)=>{const s=()=>{null!=r&&clearTimeout(r),i&&o&&o.removeEventListener("abort",i)};n&&n>0&&(r=globalThis.setTimeout(()=>{l||(l=!0,s(),a(new Error("Operation timed out")))},n)),o&&(i=()=>{l||(l=!0,s(),a(new DOMException("Aborted","AbortError")))},o.addEventListener("abort",i)),e().then(e=>{l||(l=!0,s(),t(e))}).catch(e=>{l||(l=!0,s(),a(e))})})}function je(e){if("undefined"==typeof document)return;if(!j.value)return;const t=document.createElement("div");t.className="text-red-500 p-4",t.textContent="Failed to render diagram: ";const n=document.createElement("span");n.textContent=e instanceof Error?e.message:"Unknown error",t.appendChild(n),M(j.value),j.value.appendChild(t),te.value="360px",fe.value=!0,Ge()}function Ie(e){const t="string"==typeof e?e:"string"==typeof(null==e?void 0:e.message)?e.message:"";return"string"==typeof t&&/timed out/i.test(t)}function _e(e){return!e||e.disabled}function Ee(e,t){const n=`%%{init: {"theme": "${"dark"===t?"dark":"default"}"}}%%\n`;return e.trimStart().startsWith("%%{")?e:n+e}function Le(){return Te&&!$.value&&!oe.value&&!fe.value}function Se(e){const t=e.split(/\r?\n/);for(;t.length>0;){const e=t[t.length-1].trimEnd();if(""!==e){if(!(/^[-=~>|<\s]+$/.test(e.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(e)||/[-|><]$/.test(e)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(e)))break;t.pop()}else t.pop()}return t.join("\n")}function Be(e,t,n){return d(this,null,function*(){var o,r;const l=yield C();if(!l)return;const i=l,a=Ee(e,t);if("function"==typeof i.parse)return yield De(()=>i.parse(a),{timeoutMs:null!=(o=null==n?void 0:n.timeoutMs)?o:ge.value.parse,signal:null==n?void 0:n.signal}),!0;const s=`mermaid-parse-${Math.random().toString(36).slice(2,9)}`;return yield De(()=>l.render(s,a),{timeoutMs:null!=(r=null==n?void 0:n.timeoutMs)?r:ge.value.render,signal:null==n?void 0:n.signal}),!0})}function Ae(e,t,n){return d(this,null,function*(){var o;try{return yield cn(e,t,null!=(o=null==n?void 0:n.timeoutMs)?o:ge.value.worker)}catch(Fo){return yield Be(e,t,n)}})}function Oe(e,t,n){return d(this,null,function*(){var o;try{if(yield Ae(e,t,n))return{fullOk:!0,prefixOk:!1}}catch(Fo){if("AbortError"===(null==Fo?void 0:Fo.name))throw Fo}let r=Se(e);if(r&&r.trim()&&r!==e)try{try{const l=yield dn(e,t,null!=(o=null==n?void 0:n.timeoutMs)?o:ge.value.worker);l&&l.trim()&&(r=l)}catch(Fo){}if(yield Ae(r,t,n))return{fullOk:!1,prefixOk:!0,prefix:r}}catch(Fo){if("AbortError"===(null==Fo?void 0:Fo.name))throw Fo}return{fullOk:!1,prefixOk:!1}})}"undefined"!=typeof window&&m.watch(()=>D.value,e=>{if(null==L||L.destroy(),L=null,!e)return void(S.value=!1);const t=E(e,{rootMargin:"400px"});L=t,S.value=t.isVisible.value,t.whenVisible.then(()=>{S.value=!0})},{immediate:!0}),m.onBeforeUnmount(()=>{null==L||L.destroy(),L=null});const ze=m.computed(()=>$.value||Y.value||N.value);function Re(e){if(!D.value||!j.value)return;const t=j.value.querySelector("svg");if(!t)return;let n=0,o=0;const r=t.getAttribute("viewBox"),l=t.getAttribute("width"),i=t.getAttribute("height");if(r){const e=r.split(" ");4===e.length&&(n=Number.parseFloat(e[2]),o=Number.parseFloat(e[3]))}if(n&&o||l&&i&&(n=Number.parseFloat(l),o=Number.parseFloat(i)),Number.isNaN(n)||Number.isNaN(o)||n<=0||o<=0)try{const e=t.getBBox();e&&e.width>0&&e.height>0&&(n=e.width,o=e.height)}catch(Fo){return void console.error("Failed to get SVG BBox:",Fo)}if(n>0&&o>0){const t=o/n;let r=(null!=e?e:D.value.clientWidth)*t;r>o&&(r=o),te.value=`${r}px`}}const Pe=m.ref(!1),He=m.computed(()=>({transform:`translate(${R.value}px, ${P.value}px) scale(${z.value})`}));function Ue(e){"Escape"===e.key&&Pe.value&&Fe()}function $e(){if(Pe.value=!0,"undefined"!=typeof document)try{document.body.style.overflow="hidden"}catch(Fo){}if("undefined"!=typeof window)try{window.addEventListener("keydown",Ue)}catch(Fo){}m.nextTick(()=>{if(D.value&&I.value){const e=D.value.cloneNode(!0);e.classList.add("fullscreen");const t=e.querySelector("[data-mermaid-wrapper]");t&&(_.value=t,t.style.transform=He.value.transform),M(I.value),I.value.appendChild(e)}})}function Fe(){if(Pe.value=!1,I.value&&M(I.value),_.value=null,"undefined"!=typeof document)try{document.body.style.overflow=""}catch(Fo){}if("undefined"!=typeof window)try{window.removeEventListener("keydown",Ue)}catch(Fo){}}function Ye(e,t){let n=null;return(...o)=>{n&&clearTimeout(n),n=setTimeout(()=>e(...o),t)}}function Ve(){if(!$.value)return;if(!i.value)return;const e=A.value.length;e!==Q.value&&(W.value=!0,Q.value=e,K&&clearTimeout(K),K=setTimeout(()=>{W.value&&$.value&&A.value.trim()&&(W.value=!1,Ke("preview"))},500))}function Qe(e){if(r.enableWheelZoom&&(e.ctrlKey||e.metaKey)){if(e.preventDefault(),!D.value)return;const t=D.value.getBoundingClientRect(),n=e.clientX-t.left,o=e.clientY-t.top,r=n-t.width/2,l=o-t.height/2,i=(r-R.value)/z.value,a=(l-P.value)/z.value,s=.01,u=-e.deltaY*s,c=Math.min(Math.max(z.value+u,.5),3);c!==z.value&&(R.value=r-i*c,P.value=l-a*c,z.value=c)}}function We(e,t=null){return d(this,null,function*(){try{const n=null!=t?t:(new XMLSerializer).serializeToString(e),o=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),r=URL.createObjectURL(o);if("undefined"!=typeof document){const e=document.createElement("a");e.href=r,e.download=`mermaid-diagram-${Date.now()}.svg`;try{document.body.appendChild(e),e.click(),document.body.removeChild(e)}catch(Fo){}URL.revokeObjectURL(r)}}catch(n){console.error("Failed to export SVG:",n)}})}function Ke(e){return d(this,null,function*(){const t=B.value;if(!t)return F.value=!0,void($.value="source"===e);const n=t.getBoundingClientRect().height;t.style.height=`${n}px`,t.style.overflow="hidden",F.value=!0,$.value="source"===e,yield m.nextTick();const o=t.scrollHeight;t.style.transition="height 180ms ease",t.offsetHeight,t.style.height=`${o}px`;const r=()=>{t.style.transition="",t.style.height="",t.style.overflow="",t.removeEventListener("transitionend",l)};function l(){r()}t.addEventListener("transitionend",l),setTimeout(()=>r(),220)})}function Xe(){return d(this,null,function*(){return Y.value?V.value:j.value||(yield m.nextTick(),j.value)?(Y.value=!0,V.value=(()=>d(this,null,function*(){var e,t;j.value&&(j.value.style.opacity="0");try{const t=yield C();if(!t)return;const n=`mermaid-${Date.now()}-${Math.random().toString(36).substring(2,11)}`;oe.value||re.value||null==(e=t.initialize)||e.call(t,u(s({},c.value),{dompurifyConfig:s({},l)}));const o=O(r.isDark?"dark":"light"),i=yield De(()=>t.render(n,o),{timeoutMs:ge.value.fullRender}),a=null==i?void 0:i.svg;if(j.value){const e=k(j.value,a);oe.value||re.value||(Re(),oe.value=!0,he.value={zoom:z.value,translateX:R.value,translateY:P.value,containerHeight:te.value});const t=r.isDark?"dark":"light";e&&(ae.value[t]=e),re.value&&(re.value=!1),fe.value=!1,q=0,J()}}catch(n){const e=Ie(n),o=q+1;e&&o<=3?(q=o,ee(Math.min(1200,600*o)),void 0!=={url:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:f&&"SCRIPT"===f.tagName.toUpperCase()&&f.src||new URL("index.cjs",document.baseURI).href}&&(null==(t={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:t.DEV)&&console.warn("[markstream-vue2] Mermaid render timed out, retry scheduled:",o)):(q=0,J(),console.error("Failed to render mermaid diagram:",n),!1===r.loading&&je(n))}finally{yield m.nextTick(),j.value&&(j.value.style.opacity="1"),Y.value=!1,V.value=null}}))(),V.value):void console.warn("Mermaid container not ready")})}function qe(e){return d(this,null,function*(){if(Le()&&(j.value||(yield m.nextTick(),j.value))&&!Y.value){Y.value=!0;try{const t=yield C();if(!t)return;const n=`mermaid-partial-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,o=r.isDark?"dark":"light",l=Se(e),i=Ee(l&&l.trim()?l:e,o);j.value&&(j.value.style.opacity="0");const a=yield De(()=>t.render(n,i),{timeoutMs:ge.value.render}),s=null==a?void 0:a.svg;j.value&&s&&(k(j.value,s),Re())}catch(Fo){}finally{yield m.nextTick(),j.value&&(j.value.style.opacity="1"),Y.value=!1}}})}function Ze(){return d(this,null,function*(){var e,t;const n=Date.now(),o=++pe.value;me&&me.abort(),me=new AbortController;const l=me.signal,i=r.isDark?"dark":"light",a=A.value,s=a.replace(/\s+/g,"");if(!a.trim())return j.value&&M(j.value),ue.value=null,de.value="",void(fe.value=!1);if(s===de.value)return;try{const r=yield Oe(a,i,{signal:l,timeoutMs:ge.value.worker});if(r.fullOk)return yield Xe(),void(pe.value===o&&(ue.value=null!=(t=null==(e=j.value)?void 0:e.innerHTML)?t:null,de.value=s,fe.value=!1));const u=Ce&&n<=Ce;if(r.prefixOk&&r.prefix&&Le()&&!u)return void(yield qe(r.prefix))}catch(Fo){if("AbortError"===(null==Fo?void 0:Fo.name))return}if(pe.value!==o)return;if(fe.value)return;const u=ae.value[i];u&&j.value&&k(j.value,u)})}function Ge(){Me&&(Me=!1,ke=800,Te=!1,be&&(be.abort(),be=null),ye&&(globalThis.clearTimeout(ye),ye=null),xe&&(we(xe),xe=null),Ce=Date.now())}function Je(){if(Ge(),me){try{me.abort()}catch(Fo){}me=null}if(be){try{be.abort()}catch(Fo){}be=null}pn(),J(),q=0}function et(e=800){Me&&(Ne>=12?Ge():(ye&&globalThis.clearTimeout(ye),ye=globalThis.setTimeout(()=>{xe=Z(()=>d(this,null,function*(){if(!Me)return;if($.value||oe.value)return void Ge();const e=r.isDark?"dark":"light",t=A.value;if(!t.trim())return!1===r.loading?void Ge():void et(ke);if(Ne++,Ne>12)Ge();else{be&&be.abort(),be=new AbortController;try{if((yield Ae(t,e,{signal:be.signal,timeoutMs:ge.value.worker}))&&(yield Xe(),oe.value))return void Ge()}catch(Fo){}ke=Math.min(Math.floor(1.5*ke),4e3),et(ke)}}),{timeout:500})},e)))}function tt(){Me||$.value||oe.value||(Me=!0,Ce=0,Te=!0,Ne=0,et(500))}m.watch(He,e=>{Pe.value&&_.value&&(_.value.style.transform=e.transform)},{immediate:!0}),m.watch(()=>A.value,()=>{oe.value=!1,ae.value={},G(),!$.value&&i.value&&tt(),Ve()}),m.watch(()=>r.isDark,()=>d(this,null,function*(){if(!oe.value)return;if(fe.value)return;const e=r.isDark?"dark":"light",t=ae.value[e];if(t)return void(j.value&&k(j.value,t));const n={zoom:z.value,translateX:R.value,translateY:P.value,containerHeight:te.value},o=1!==z.value||0!==R.value||0!==P.value;re.value=!0,o&&(z.value=1,R.value=0,P.value=0,yield m.nextTick()),yield Xe(),o&&(yield m.nextTick(),z.value=n.zoom,R.value=n.translateX,P.value=n.translateY,te.value=n.containerHeight,he.value=n)})),m.watch(()=>$.value,e=>d(this,null,function*(){if(e)Ge(),oe.value&&(he.value={zoom:z.value,translateX:R.value,translateY:P.value,containerHeight:te.value});else{if(fe.value)return;const e=r.isDark?"dark":"light";if(oe.value&&ae.value[e])return yield m.nextTick(),j.value&&k(j.value,ae.value[e]),z.value=he.value.zoom,R.value=he.value.translateX,P.value=he.value.translateY,void(te.value=he.value.containerHeight);if(yield m.nextTick(),!i.value)return;yield Ze(),tt()}})),m.watch(()=>r.loading,(e,t)=>d(this,null,function*(){if(!0===t&&!1===e){const e=A.value.trim();if(!e)return Je();const t=r.isDark?"dark":"light",o=e.replace(/\s+/g,"");if(oe.value&&o===de.value)return yield m.nextTick(),j.value&&!j.value.querySelector("svg")&&ae.value[t]&&k(j.value,ae.value[t]),void Je();try{yield Ae(e,t,{timeoutMs:ge.value.worker}),yield Xe(),de.value=o,fe.value=!1,Je()}catch(n){Je(),je(n)}}})),m.watch(D,e=>{ne&&ne.disconnect(),!e||oe.value||re.value||(ne=new ResizeObserver(e=>{e&&e.length>0&&!oe.value&&!re.value&&ut(()=>{Re(e[0].contentRect.width)})}),ne.observe(e))},{immediate:!0}),m.onMounted(()=>d(this,null,function*(){yield m.nextTick(),F.value||($.value=!i.value),S.value&&(G(),Q.value=A.value.length)})),m.watch(()=>i.value,e=>{F.value||($.value=!e)}),m.watch(()=>S.value,e=>{e&&(oe.value||(G(),Q.value=A.value.length),r.loading||oe.value||G())},{immediate:!1}),m.onUnmounted(()=>{K&&clearTimeout(K),ne&&ne.disconnect(),me&&(me.abort(),me=null),pn(),Ge(),J()}),m.watch(()=>N.value,e=>d(this,null,function*(){e?(Ge(),me&&me.abort()):oe.value||(yield m.nextTick(),G(),$.value||tt())}),{immediate:!1});const nt=m.computed(()=>r.isDark?"mermaid-action-btn p-2 text-xs rounded text-gray-400 hover:bg-gray-700 hover:text-gray-200":"mermaid-action-btn p-2 text-xs rounded text-gray-600 hover:bg-gray-200 hover:text-gray-700");return{__sfc:!0,props:r,emits:t,DOMPURIFY_CONFIG:l,mermaidAvailable:i,mermaidSecurityLevel:a,mermaidInitConfig:c,neutralizeScriptProtocols:p,DISALLOWED_STYLE_PATTERNS:h,SAFE_URL_PROTOCOLS:v,sanitizeUrl:g,scrubSvgElement:w,toSafeSvgElement:y,setSafeSvg:x,clearElement:M,renderSvgToTarget:k,t:b,resolveMermaidInstance:C,copyText:T,isCollapsed:N,mermaidContainer:D,mermaidContent:j,modalContent:I,modalCloneWrapper:_,registerViewport:E,viewportHandle:L,viewportReady:S,modeContainerRef:B,baseFixedCode:A,getCodeWithTheme:O,zoom:z,translateX:R,translateY:P,isDragging:H,dragStart:U,showSource:$,userToggledShowSource:F,isRendering:Y,renderQueue:V,RENDER_DEBOUNCE_DELAY:300,CONTENT_STABLE_DELAY:500,lastContentLength:Q,isContentGenerating:W,contentStableTimer:K,renderRetryTimer:X,consecutiveRenderTimeouts:q,MAX_RENDER_TIMEOUT_RETRIES:3,requestIdle:Z,debouncedProgressiveRender:G,clearRenderRetryTimer:J,scheduleRenderRetry:ee,containerHeight:te,resizeObserver:ne,hasRenderedOnce:oe,isThemeRendering:re,svgCache:ae,lastSvgSnapshot:ue,lastRenderedCode:de,renderToken:pe,currentWorkController:me,hasRenderError:fe,savedTransformState:he,wheelListeners:ve,timeouts:ge,cancelIdle:we,previewPollTimeoutId:ye,previewPollIdleId:xe,isPreviewPolling:Me,previewPollDelay:ke,previewPollController:be,lastPreviewStopAt:Ce,allowPartialPreview:Te,PREVIEW_POLL_MAX_ATTEMPTS:12,previewPollAttempts:Ne,withTimeoutSignal:De,renderErrorToContainer:je,isTimeoutError:Ie,shouldSkipEventTarget:_e,onBtnHover:function(e,t,n="top"){if(_e(e.currentTarget))return;const o=e,l=null!=(null==o?void 0:o.clientX)&&null!=(null==o?void 0:o.clientY)?{x:o.clientX,y:o.clientY}:void 0;le(e.currentTarget,t,n,!1,l,r.isDark)},onBtnLeave:function(){ie()},onCopyHover:function(e){if(_e(e.currentTarget))return;const t=T.value?b("common.copied")||"Copied":b("common.copy")||"Copy",n=e,o=null!=(null==n?void 0:n.clientX)&&null!=(null==n?void 0:n.clientY)?{x:n.clientX,y:n.clientY}:void 0;le(e.currentTarget,t,"top",!1,o,r.isDark)},applyThemeTo:Ee,canApplyPartialPreview:Le,getSafePrefixCandidate:Se,canParseOnMain:Be,canParseOffthread:Ae,canParseOrPrefix:Oe,isFullscreenDisabled:ze,updateContainerHeight:Re,isModalOpen:Pe,transformStyle:He,handleKeydown:Ue,openModal:$e,closeModal:Fe,debounce:Ye,checkContentStability:Ve,zoomIn:function(){z.value<3&&(z.value+=.1)},zoomOut:function(){z.value>.5&&(z.value-=.1)},resetZoom:function(){z.value=1,R.value=0,P.value=0},startDrag:function(e){H.value=!0,e instanceof MouseEvent?U.value={x:e.clientX-R.value,y:e.clientY-P.value}:U.value={x:e.touches[0].clientX-R.value,y:e.touches[0].clientY-P.value}},onDrag:function(e){if(!H.value)return;let t,n;e instanceof MouseEvent?(t=e.clientX,n=e.clientY):(t=e.touches[0].clientX,n=e.touches[0].clientY),R.value=t-U.value.x,P.value=n-U.value.y},stopDrag:function(){H.value=!1},handleWheel:Qe,copy:function(){return d(this,null,function*(){try{"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(A.value)),T.value=!0,t("copy",A.value),setTimeout(()=>{T.value=!1},1e3)}catch(e){console.error("Failed to copy:",e)}})},exportSvg:We,handleExportClick:function(){var e;const n=null==(e=j.value)?void 0:e.querySelector("svg");if(!n)return void console.error("SVG element not found");const o=(new XMLSerializer).serializeToString(n),r={payload:{type:"export"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:n,svgString:o};t("export",r),r.defaultPrevented||We(n,o)},handleOpenModalClick:function(){var e,n;const o=null!=(n=null==(e=j.value)?void 0:e.querySelector("svg"))?n:null,r=o?(new XMLSerializer).serializeToString(o):null,l={payload:{type:"open-modal"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:o,svgString:r};t("openModal",l),l.defaultPrevented||$e()},handleSwitchMode:function(e){const n={payload:{type:"toggle-mode",target:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};t("toggleMode",e,n),n.defaultPrevented||Ke(e)},switchMode:Ke,initMermaid:Xe,renderPartial:qe,progressiveRender:Ze,stopPreviewPolling:Ge,cleanupAfterLoadingSettled:Je,scheduleNextPreviewPoll:et,startPreviewPolling:tt,computedButtonStyle:nt,mermaidIconUrl:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2Ij4KICA8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNjYTllZTYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTEuNSAyLjVjMCA2IDIuMjUgNS43NSA0IDcgLjgzLjY3IDEuMTcgMiAxIDRoM2MtLjE3LTIgLjE3LTMuMzMgMS00IDEuNzUtMS4yNSA0LTEgNC03QzEyIDIuNSAxMCAzIDggNyA2IDMgNCAyLjUgMS41IDIuNSIgLz4KPC9zdmc+Cg==",Portal:ct}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"my-4 rounded-lg border overflow-hidden shadow-sm",class:[n.props.isDark?"border-gray-700/30":"border-gray-200",{"is-rendering":n.props.loading}]},[n.props.showHeader?t("div",{staticClass:"mermaid-block-header flex justify-between items-center px-4 py-2.5 border-b",class:n.props.isDark?"bg-gray-800 border-gray-700/30":"bg-gray-50 border-gray-200"},[e.$slots["header-left"]?t("div",[e._t("header-left")],2):t("div",{staticClass:"flex items-center space-x-2 overflow-hidden"},[t("img",{staticClass:"w-4 h-4 my-0",attrs:{src:n.mermaidIconUrl,alt:"Mermaid"}}),t("span",{staticClass:"text-sm font-medium font-mono truncate",class:n.props.isDark?"text-gray-400":"text-gray-600"},[e._v("Mermaid")])]),e.$slots["header-center"]?t("div",[e._t("header-center")],2):n.props.showModeToggle&&n.mermaidAvailable?t("div",{staticClass:"flex items-center space-x-1 rounded-md p-0.5",class:n.props.isDark?"bg-gray-700":"bg-gray-100"},[t("button",{staticClass:"px-2.5 py-1 text-xs rounded transition-colors",class:[n.showSource?n.props.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700":n.props.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm"],on:{click:()=>n.handleSwitchMode("preview"),mouseenter:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},focus:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("div",{staticClass:"flex items-center space-x-1"},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{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",{attrs:{cx:"12",cy:"12",r:"3"}})])]),t("span",[e._v(e._s(n.t("common.preview")||"Preview"))])])]),t("button",{staticClass:"px-2.5 py-1 text-xs rounded transition-colors",class:[n.showSource?n.props.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm":n.props.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"],on:{click:()=>n.handleSwitchMode("source"),mouseenter:function(e){n.onBtnHover(e,n.t("common.source")||"Source")},focus:function(e){n.onBtnHover(e,n.t("common.source")||"Source")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("div",{staticClass:"flex items-center space-x-1"},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"}})]),t("span",[e._v(e._s(n.t("common.source")||"Source"))])])])]):e._e(),e.$slots["header-right"]?t("div",[e._t("header-right")],2):t("div",{staticClass:"flex items-center space-x-1"},[n.props.showCollapseButton?t("button",{class:n.computedButtonStyle,attrs:{"aria-pressed":n.isCollapsed},on:{click:function(e){n.isCollapsed=!n.isCollapsed},mouseenter:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},focus:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",style:{rotate:n.isCollapsed?"0deg":"90deg"},attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"}})])]):e._e(),n.props.showCopyButton?t("button",{class:n.computedButtonStyle,on:{click:n.copy,mouseenter:function(e){return n.onCopyHover(e)},focus:function(e){return n.onCopyHover(e)},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.copyText?t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("rect",{attrs:{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}})])])]):e._e(),n.props.showExportButton&&n.mermaidAvailable?t("button",{class:`${n.computedButtonStyle} ${n.isFullscreenDisabled?"opacity-50 cursor-not-allowed":""}`,attrs:{disabled:n.isFullscreenDisabled},on:{click:n.handleExportClick,mouseenter:function(e){n.onBtnHover(e,n.t("common.export")||"Export")},focus:function(e){n.onBtnHover(e,n.t("common.export")||"Export")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}}),t("path",{attrs:{d:"m7 10l5 5l5-5"}})])])]):e._e(),n.props.showFullscreenButton&&n.mermaidAvailable?t("button",{class:`${n.computedButtonStyle} ${n.isFullscreenDisabled?"opacity-50 cursor-not-allowed":""}`,attrs:{disabled:n.isFullscreenDisabled},on:{click:n.handleOpenModalClick,mouseenter:function(e){n.onBtnHover(e,n.isModalOpen?n.t("common.minimize")||"Minimize":n.t("common.open")||"Open")},focus:function(e){n.onBtnHover(e,n.isModalOpen?n.t("common.minimize")||"Minimize":n.t("common.open")||"Open")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.isModalOpen?t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"}})]):t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"}})])]):e._e()])]):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!n.isCollapsed,expression:"!isCollapsed"}],ref:"modeContainerRef"},[n.showSource?t("div",{staticClass:"p-4",class:n.props.isDark?"bg-gray-900":"bg-gray-50"},[t("pre",{staticClass:"text-sm font-mono whitespace-pre-wrap",class:n.props.isDark?"text-gray-300":"text-gray-700"},[e._v(e._s(n.baseFixedCode))])]):t("div",{staticClass:"relative"},[n.props.showZoomControls?t("div",{staticClass:"absolute top-2 right-2 z-10 rounded-lg"},[t("div",{staticClass:"flex items-center gap-2 backdrop-blur rounded-lg"},[t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomIn,mouseenter:function(e){n.onBtnHover(e,n.t("common.zoomIn")||"Zoom in")},focus:function(e){n.onBtnHover(e,n.t("common.zoomIn")||"Zoom in")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomOut,mouseenter:function(e){n.onBtnHover(e,n.t("common.zoomOut")||"Zoom out")},focus:function(e){n.onBtnHover(e,n.t("common.zoomOut")||"Zoom out")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M8 11h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.resetZoom,mouseenter:function(e){n.onBtnHover(e,n.t("common.resetZoom")||"Reset zoom")},focus:function(e){n.onBtnHover(e,n.t("common.resetZoom")||"Reset zoom")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[e._v(" "+e._s(Math.round(100*n.zoom))+"% ")])])]):e._e(),t("div",e._g({ref:"mermaidContainer",staticClass:"min-h-[360px] relative transition-all duration-100 overflow-hidden block",class:n.props.isDark?"bg-gray-900":"bg-gray-50",style:{height:n.containerHeight},on:{mousedown:n.startDrag,mousemove:n.onDrag,mouseup:n.stopDrag,mouseleave:n.stopDrag,"&touchstart":function(e){return n.startDrag.apply(null,arguments)},"&touchmove":function(e){return n.onDrag.apply(null,arguments)},"&touchend":function(e){return n.stopDrag.apply(null,arguments)}}},n.wheelListeners),[t("div",{staticClass:"absolute inset-0 cursor-grab",class:{"cursor-grabbing":n.isDragging},style:n.transformStyle,attrs:{"data-mermaid-wrapper":""}},[t("div",{ref:"mermaidContent",staticClass:"_mermaid w-full text-center flex items-center justify-center min-h-full"})])]),t(n.Portal,{attrs:{to:"body"}},[t("div",{staticClass:"markstream-vue2"},[t("transition",{attrs:{name:"mermaid-dialog",appear:""}},[n.isModalOpen?t("div",{staticClass:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",on:{click:function(e){return e.target!==e.currentTarget?null:n.closeModal.apply(null,arguments)}}},[t("div",{staticClass:"dialog-panel relative w-full h-full max-w-full max-h-full rounded shadow-lg overflow-hidden",class:n.props.isDark?"bg-gray-900":"bg-white"},[t("div",{staticClass:"absolute top-6 right-6 z-50 flex items-center gap-2"},[t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomIn}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomOut}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M8 11h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.resetZoom}},[e._v(" "+e._s(Math.round(100*n.zoom))+"% ")]),t("button",{staticClass:"inline-flex items-center justify-center p-2 rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.closeModal}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"}})])])]),t("div",e._g({ref:"modalContent",staticClass:"w-full h-full flex items-center justify-center p-4 overflow-hidden",on:{mousedown:n.startDrag,mousemove:n.onDrag,mouseup:n.stopDrag,mouseleave:n.stopDrag,"&touchstart":function(e){return n.startDrag.apply(null,arguments)},"&touchmove":function(e){return n.onDrag.apply(null,arguments)},"&touchend":function(e){return n.stopDrag.apply(null,arguments)}}},n.wheelListeners))])]):e._e()])],1)])],1)])])},[],!1,null,"f459048d",null,null).exports,fn=Math.min,hn=Math.max,vn=Math.round,gn=Math.floor,wn=e=>({x:e,y:e}),yn={left:"right",right:"left",bottom:"top",top:"bottom"},xn={start:"end",end:"start"};function Mn(e,t,n){return hn(e,fn(t,n))}function kn(e,t){return"function"==typeof e?e(t):e}function bn(e){return e.split("-")[0]}function Cn(e){return e.split("-")[1]}function Tn(e){return"x"===e?"y":"x"}function Nn(e){return"y"===e?"height":"width"}const Dn=new Set(["top","bottom"]);function jn(e){return Dn.has(bn(e))?"y":"x"}function In(e){return Tn(jn(e))}function _n(e){return e.replace(/start|end/g,e=>xn[e])}const En=["left","right"],Ln=["right","left"],Sn=["top","bottom"],Bn=["bottom","top"];function An(e){return e.replace(/left|right|bottom|top/g,e=>yn[e])}function On(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function zn(e,t,n){let{reference:o,floating:r}=e;const l=jn(t),i=In(t),a=Nn(i),s=bn(t),u="y"===l,c=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let m;switch(s){case"top":m={x:c,y:o.y-r.height};break;case"bottom":m={x:c,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:d};break;case"left":m={x:o.x-r.width,y:d};break;default:m={x:o.x,y:o.y}}switch(Cn(t)){case"start":m[i]-=p*(n&&u?-1:1);break;case"end":m[i]+=p*(n&&u?-1:1)}return m}function Rn(e,t){return d(this,null,function*(){var n;void 0===t&&(t={});const{x:o,y:r,platform:l,rects:i,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:m=!1,padding:f=0}=kn(t,e),h=function(e){return"number"!=typeof e?function(e){return s({top:0,right:0,bottom:0,left:0},e)}(e):{top:e,right:e,bottom:e,left:e}}(f),v=a[m?"floating"===p?"reference":"floating":p],g=On(yield l.getClippingRect({element:null==(n=yield null==l.isElement?void 0:l.isElement(v))||n?v:v.contextElement||(yield null==l.getDocumentElement?void 0:l.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:u})),w="floating"===p?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,y=yield null==l.getOffsetParent?void 0:l.getOffsetParent(a.floating),x=(yield null==l.isElement?void 0:l.isElement(y))&&(yield null==l.getScale?void 0:l.getScale(y))||{x:1,y:1},M=On(l.convertOffsetParentRelativeRectToViewportRelativeRect?yield l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:y,strategy:u}):w);return{top:(g.top-M.top+h.top)/x.y,bottom:(M.bottom-g.bottom+h.bottom)/x.y,left:(g.left-M.left+h.left)/x.x,right:(M.right-g.right+h.right)/x.x}})}const Pn=new Set(["left","top"]);function Hn(){return"undefined"!=typeof window}function Un(e){return Yn(e)?(e.nodeName||"").toLowerCase():"#document"}function $n(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Fn(e){var t;return null==(t=(Yn(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Yn(e){return!!Hn()&&(e instanceof Node||e instanceof $n(e).Node)}function Vn(e){return!!Hn()&&(e instanceof Element||e instanceof $n(e).Element)}function Qn(e){return!!Hn()&&(e instanceof HTMLElement||e instanceof $n(e).HTMLElement)}function Wn(e){return!(!Hn()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof $n(e).ShadowRoot)}const Kn=new Set(["inline","contents"]);function Xn(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ao(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!Kn.has(r)}const qn=new Set(["table","td","th"]);function Zn(e){return qn.has(Un(e))}const Gn=[":popover-open",":modal"];function Jn(e){return Gn.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const eo=["transform","translate","scale","rotate","perspective"],to=["transform","translate","scale","rotate","perspective","filter"],no=["paint","layout","strict","content"];function oo(e){const t=ro(),n=Vn(e)?ao(e):e;return eo.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||to.some(e=>(n.willChange||"").includes(e))||no.some(e=>(n.contain||"").includes(e))}function ro(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const lo=new Set(["html","body","#document"]);function io(e){return lo.has(Un(e))}function ao(e){return $n(e).getComputedStyle(e)}function so(e){return Vn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function uo(e){if("html"===Un(e))return e;const t=e.assignedSlot||e.parentNode||Wn(e)&&e.host||Fn(e);return Wn(t)?t.host:t}function co(e){const t=uo(e);return io(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qn(t)&&Xn(t)?t:co(t)}function po(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=co(e),l=r===(null==(o=e.ownerDocument)?void 0:o.body),i=$n(r);if(l){const e=mo(i);return t.concat(i,i.visualViewport||[],Xn(r)?r:[],e&&n?po(e):[])}return t.concat(r,po(r,[],n))}function mo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function fo(e){const t=ao(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Qn(e),l=r?e.offsetWidth:n,i=r?e.offsetHeight:o,a=vn(n)!==l||vn(o)!==i;return a&&(n=l,o=i),{width:n,height:o,$:a}}function ho(e){return Vn(e)?e:e.contextElement}function vo(e){const t=ho(e);if(!Qn(t))return wn(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:l}=fo(t);let i=(l?vn(n.width):n.width)/o,a=(l?vn(n.height):n.height)/r;return i&&Number.isFinite(i)||(i=1),a&&Number.isFinite(a)||(a=1),{x:i,y:a}}const go=wn(0);function wo(e){const t=$n(e);return ro()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:go}function yo(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),l=ho(e);let i=wn(1);t&&(o?Vn(o)&&(i=vo(o)):i=vo(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==$n(e))&&t}(l,n,o)?wo(l):wn(0);let s=(r.left+a.x)/i.x,u=(r.top+a.y)/i.y,c=r.width/i.x,d=r.height/i.y;if(l){const e=$n(l),t=o&&Vn(o)?$n(o):o;let n=e,r=mo(n);for(;r&&o&&t!==n;){const e=vo(r),t=r.getBoundingClientRect(),o=ao(r),l=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;s*=e.x,u*=e.y,c*=e.x,d*=e.y,s+=l,u+=i,n=$n(r),r=mo(n)}}return On({width:c,height:d,x:s,y:u})}function xo(e,t){const n=so(e).scrollLeft;return t?t.left+n:yo(Fn(e)).left+n}function Mo(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-xo(e,n),y:n.top+t.scrollTop}}const ko=new Set(["absolute","fixed"]);function bo(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=$n(e),o=Fn(e),r=n.visualViewport;let l=o.clientWidth,i=o.clientHeight,a=0,s=0;if(r){l=r.width,i=r.height;const e=ro();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,s=r.offsetTop)}const u=xo(o);if(u<=0){const e=o.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(o.clientWidth-t.clientWidth-r);i<=25&&(l-=i)}else u<=25&&(l+=u);return{width:l,height:i,x:a,y:s}}(e,n);else if("document"===t)o=function(e){const t=Fn(e),n=so(e),o=e.ownerDocument.body,r=hn(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=hn(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+xo(e);const a=-n.scrollTop;return"rtl"===ao(o).direction&&(i+=hn(t.clientWidth,o.clientWidth)-r),{width:r,height:l,x:i,y:a}}(Fn(e));else if(Vn(t))o=function(e,t){const n=yo(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,l=Qn(e)?vo(e):wn(1);return{width:e.clientWidth*l.x,height:e.clientHeight*l.y,x:r*l.x,y:o*l.y}}(t,n);else{const n=wo(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return On(o)}function Co(e,t){const n=uo(e);return!(n===t||!Vn(n)||io(n))&&("fixed"===ao(n).position||Co(n,t))}function To(e,t,n){const o=Qn(t),r=Fn(t),l="fixed"===n,i=yo(e,!0,l,t);let a={scrollLeft:0,scrollTop:0};const s=wn(0);function u(){s.x=xo(r)}if(o||!o&&!l)if(("body"!==Un(t)||Xn(r))&&(a=so(t)),o){const e=yo(t,!0,l,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else r&&u();l&&!o&&r&&u();const c=!r||o||l?wn(0):Mo(r,a);return{x:i.left+a.scrollLeft-s.x-c.x,y:i.top+a.scrollTop-s.y-c.y,width:i.width,height:i.height}}function No(e){return"static"===ao(e).position}function Do(e,t){if(!Qn(e)||"fixed"===ao(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Fn(e)===n&&(n=n.ownerDocument.body),n}function jo(e,t){const n=$n(e);if(Jn(e))return n;if(!Qn(e)){let t=uo(e);for(;t&&!io(t);){if(Vn(t)&&!No(t))return t;t=uo(t)}return n}let o=Do(e,t);for(;o&&Zn(o)&&No(o);)o=Do(o,t);return o&&io(o)&&No(o)&&!oo(o)?n:o||function(e){let t=uo(e);for(;Qn(t)&&!io(t);){if(oo(t))return t;if(Jn(t))return null;t=uo(t)}return null}(e)||n}const Io={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const l="fixed"===r,i=Fn(o),a=!!t&&Jn(t.floating);if(o===i||a&&l)return n;let s={scrollLeft:0,scrollTop:0},u=wn(1);const c=wn(0),d=Qn(o);if((d||!d&&!l)&&(("body"!==Un(o)||Xn(i))&&(s=so(o)),Qn(o))){const e=yo(o);u=vo(o),c.x=e.x+o.clientLeft,c.y=e.y+o.clientTop}const p=!i||d||l?wn(0):Mo(i,s);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+c.x+p.x,y:n.y*u.y-s.scrollTop*u.y+c.y+p.y}},getDocumentElement:Fn,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const l=[..."clippingAncestors"===n?Jn(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=po(e,[],!1).filter(e=>Vn(e)&&"body"!==Un(e)),r=null;const l="fixed"===ao(e).position;let i=l?uo(e):e;for(;Vn(i)&&!io(i);){const t=ao(i),n=oo(i);n||"fixed"!==t.position||(r=null),(l?!n&&!r:!n&&"static"===t.position&&r&&ko.has(r.position)||Xn(i)&&!n&&Co(e,i))?o=o.filter(e=>e!==i):r=t,i=uo(i)}return t.set(e,o),o}(t,this._c):[].concat(n),o],i=l[0],a=l.reduce((e,n)=>{const o=bo(t,n,r);return e.top=hn(o.top,e.top),e.right=fn(o.right,e.right),e.bottom=fn(o.bottom,e.bottom),e.left=hn(o.left,e.left),e},bo(t,i,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:jo,getElementRects:function(e){return d(this,null,function*(){const t=this.getOffsetParent||jo,n=this.getDimensions,o=yield n(e.floating);return{reference:To(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}})},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=fo(e);return{width:t,height:n}},getScale:vo,isElement:Vn,isRTL:function(e){return"rtl"===ao(e).direction}};function _o(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Eo(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:l=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:c=!1}=o,d=ho(e),p=r||l?[...d?po(d):[],...po(t)]:[];p.forEach(e=>{r&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)});const m=d&&a?function(e,t){let n,o=null;const r=Fn(e);function l(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function i(a,c){void 0===a&&(a=!1),void 0===c&&(c=1),l();const d=e.getBoundingClientRect(),{left:p,top:m,width:f,height:h}=d;if(a||t(),!f||!h)return;const v={rootMargin:-gn(m)+"px "+-gn(r.clientWidth-(p+f))+"px "+-gn(r.clientHeight-(m+h))+"px "+-gn(p)+"px",threshold:hn(0,fn(1,c))||1};let g=!0;function w(t){const o=t[0].intersectionRatio;if(o!==c){if(!g)return i();o?i(!1,o):n=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==o||_o(d,e.getBoundingClientRect())||i(),g=!1}try{o=new IntersectionObserver(w,u(s({},v),{root:r.ownerDocument}))}catch(y){o=new IntersectionObserver(w,v)}o.observe(e)}(!0),l}(d,n):null;let f,h=-1,v=null;i&&(v=new ResizeObserver(e=>{let[o]=e;o&&o.target===d&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=v)||e.observe(t)})),n()}),d&&!c&&v.observe(d),v.observe(t));let g=c?yo(e):null;return c&&function t(){const o=yo(e);g&&!_o(g,o)&&n(),g=o,f=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach(e=>{r&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=v)||e.disconnect(),v=null,c&&cancelAnimationFrame(f)}}const Lo=function(e){return void 0===e&&(e={}),{name:"shift",options:e,fn(t){return d(this,null,function*(){const{x:n,y:o,placement:r,platform:l}=t,i=kn(e,t),{mainAxis:a=!0,crossAxis:d=!1,limiter:p={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}}}=i,m=c(i,["mainAxis","crossAxis","limiter"]),f={x:n,y:o},h=yield l.detectOverflow(t,m),v=jn(bn(r)),g=Tn(v);let w=f[g],y=f[v];if(a){const e="y"===g?"bottom":"right";w=Mn(w+h["y"===g?"top":"left"],w,w-h[e])}if(d){const e="y"===v?"bottom":"right";y=Mn(y+h["y"===v?"top":"left"],y,y-h[e])}const x=p.fn(u(s({},t),{[g]:w,[v]:y}));return u(s({},x),{data:{x:x.x-n,y:x.y-o,enabled:{[g]:a,[v]:d}}})})}}},So=function(e){return void 0===e&&(e={}),{name:"flip",options:e,fn(t){return d(this,null,function*(){var n,o;const{placement:r,middlewareData:l,rects:i,initialPlacement:a,platform:s,elements:u}=t,d=kn(e,t),{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0}=d,w=c(d,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};const y=bn(r),x=jn(a),M=bn(a)===a,k=yield null==s.isRTL?void 0:s.isRTL(u.floating),b=f||(M||!g?[An(a)]:function(e){const t=An(e);return[_n(e),t,_n(t)]}(a)),C="none"!==v;!f&&C&&b.push(...function(e,t,n,o){const r=Cn(e);let l=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Ln:En:t?En:Ln;case"left":case"right":return t?Sn:Bn;default:return[]}}(bn(e),"start"===n,o);return r&&(l=l.map(e=>e+"-"+r),t&&(l=l.concat(l.map(_n)))),l}(a,g,v,k));const T=[a,...b],N=yield s.detectOverflow(t,w),D=[];let j=(null==(o=l.flip)?void 0:o.overflows)||[];if(p&&D.push(N[y]),m){const e=function(e,t,n){void 0===n&&(n=!1);const o=Cn(e),r=In(e),l=Nn(r);let i="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[l]>t.floating[l]&&(i=An(i)),[i,An(i)]}(r,i,k);D.push(N[e[0]],N[e[1]])}if(j=[...j,{placement:r,overflows:D}],!D.every(e=>e<=0)){var I,_;const e=((null==(I=l.flip)?void 0:I.index)||0)+1,t=T[e];if(t&&("alignment"!==m||x===jn(t)||j.every(e=>jn(e.placement)!==x||e.overflows[0]>0)))return{data:{index:e,overflows:j},reset:{placement:t}};let n=null==(_=j.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:_.placement;if(!n)switch(h){case"bestFit":{var E;const e=null==(E=j.filter(e=>{if(C){const t=jn(e.placement);return t===x||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:E[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}})}}},Bo=g(m.defineComponent({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:null,content:null,placement:null,offset:null,originX:null,originY:null,id:null,isDark:{type:[Boolean,null]}},setup(e){const t=e,n=m.computed(()=>{if(void 0!==t.isDark&&null!==t.isDark)return Boolean(t.isDark);if("undefined"!=typeof document)try{if(document.documentElement.classList.contains("dark"))return!0;if((null==window?void 0:window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches)return!0}catch(Fo){}return!1}),o=m.ref(null),r=m.ref({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),l=m.ref(!1);let i=null;function a(){return d(this,null,function*(){var e,n;if(!t.anchorEl||!o.value)return;const l=[(c=null!=(e=t.offset)?e:8,void 0===c&&(c=0),{name:"offset",options:c,fn(e){return d(this,null,function*(){var t,n;const{x:o,y:r,placement:l,middlewareData:i}=e,a=yield function(e,t){return d(this,null,function*(){const{placement:n,platform:o,elements:r}=e,l=yield null==o.isRTL?void 0:o.isRTL(r.floating),i=bn(n),a=Cn(n),s="y"===jn(n),u=Pn.has(i)?-1:1,c=l&&s?-1:1,d=kn(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof f&&(m="end"===a?-1*f:f),s?{x:m*c,y:p*u}:{x:p*u,y:m*c}})}(e,c);return l===(null==(t=i.offset)?void 0:t.placement)&&null!=(n=i.arrow)&&n.alignmentOffset?{}:{x:o+a.x,y:r+a.y,data:u(s({},a),{placement:l})}})}}),So(),Lo({padding:8})],{x:i,y:a}=yield((e,t,n)=>{const o=new Map,r=s({platform:Io},n),l=u(s({},r.platform),{_c:o});return((e,t,n)=>d(exports,null,function*(){const{placement:o="bottom",strategy:r="absolute",middleware:l=[],platform:i}=n,a=l.filter(Boolean),c=yield null==i.isRTL?void 0:i.isRTL(t);let d=yield i.getElementRects({reference:e,floating:t,strategy:r}),{x:p,y:m}=zn(d,o,c),f=o,h={},v=0;for(let n=0;n<a.length;n++){var g;const{name:l,fn:w}=a[n],{x:y,y:x,data:M,reset:k}=yield w({x:p,y:m,initialPlacement:o,placement:f,strategy:r,middlewareData:h,rects:d,platform:u(s({},i),{detectOverflow:null!=(g=i.detectOverflow)?g:Rn}),elements:{reference:e,floating:t}});p=null!=y?y:p,m=null!=x?x:m,h=u(s({},h),{[l]:s(s({},h[l]),M)}),k&&v<=50&&(v++,"object"==typeof k&&(k.placement&&(f=k.placement),k.rects&&(d=!0===k.rects?yield i.getElementRects({reference:e,floating:t,strategy:r}):k.rects),({x:p,y:m}=zn(d,f,c))),n=-1)}return{x:p,y:m,placement:f,strategy:r,middlewareData:h}}))(e,t,u(s({},r),{platform:l}))})(t.anchorEl,o.value,{placement:null!=(n=t.placement)?n:"top",middleware:l,strategy:"fixed"});var c;r.value.transform=`translate3d(${Math.round(i)}px, ${Math.round(a)}px, 0)`,r.value.left="0px",r.value.top="0px"})}return m.watch(()=>t.visible,e=>d(this,null,function*(){if(e)if(l.value=!1,yield m.nextTick(),t.anchorEl&&o.value)try{const e=t.anchorEl.getBoundingClientRect();yield a();const n=r.value.transform;if(null!=t.originX&&null!=t.originY){const o=Math.abs(Number(t.originX)-e.left),i=Math.abs(Number(t.originY)-e.top);Math.hypot(o,i)>120?(r.value.transform=`translate3d(${Math.round(t.originX)}px, ${Math.round(t.originY)}px, 0)`,yield m.nextTick(),l.value=!0,yield m.nextTick(),r.value.transform=n):l.value=!0}else l.value=!0;i=Eo(t.anchorEl,o.value,a)}catch(Fo){yield a(),l.value=!0,i=Eo(t.anchorEl,o.value,a)}else l.value=!0;else l.value=!1,i&&(i(),i=null)})),m.watch([()=>t.anchorEl,()=>t.placement,()=>t.content],()=>d(this,null,function*(){t.visible&&t.anchorEl&&o.value&&(yield m.nextTick(),yield a())})),m.onBeforeUnmount(()=>{i&&i()}),{__sfc:!0,props:t,isDarkEffective:n,tooltip:o,style:r,ready:l,cleanupAutoUpdate:i,updatePosition:a,Portal:ct}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t(n.Portal,{attrs:{to:"body"}},[t("div",{staticClass:"markstream-vue2"},[t("transition",{attrs:{name:"tooltip",appear:""}},[t("div",{directives:[{name:"show",rawName:"v-show",value:e.visible&&n.ready,expression:"visible && ready"}],ref:"tooltip",staticClass:"z-[9999] inline-block text-base py-2 px-3 rounded-md shadow-md whitespace-nowrap pointer-events-none tooltip-element border",class:[n.isDarkEffective?"bg-gray-900 text-white border-gray-700 border is-dark":"bg-white text-gray-900 border-gray-200 border"],style:{position:"fixed",left:n.style.left,top:n.style.top,transform:n.style.transform},attrs:{id:n.props.id,role:"tooltip"}},[e._v(" "+e._s(e.content)+" ")])])],1)])},[],!1,null,"703da293",null,null).exports,Ao=Object.freeze(Object.defineProperty({__proto__:null,default:Bo},Symbol.toStringTag,{value:"Module"}));function Oo(e){return JSON.stringify(e)}function zo(e){var t;const n=null!=(t=e.mode)?t:"classic",o=e.katexUrl,r=e.mhchemUrl,l=Oo(s({throwOnError:!0,displayMode:!0,output:"html",strict:"ignore"},e.renderOptions||{})),i=Oo(o),a=r?Oo(r):'""';return"module"===n?`\nlet DEBUG = false\nlet katex = null\nlet katexLoadError = null\nlet loadPromise = null\n\nfunction normalizeKaTeX(mod) {\n const resolved = (mod && mod.default) ? mod.default : mod\n if (resolved && typeof resolved.renderToString === 'function')\n return resolved\n return null\n}\n\nasync function loadKaTeX() {\n if (katex || katexLoadError)\n return\n if (!loadPromise) {\n loadPromise = (async () => {\n try {\n const mod = await import(${i})\n katex = normalizeKaTeX(mod) || null\n const mhchemUrl = ${a}\n if (mhchemUrl) {\n try {\n await import(mhchemUrl)\n }\n catch (e) {\n // ignore optional mhchem load failures\n if (DEBUG)\n console.warn('[katex-cdn-worker] failed to load mhchem', e)\n }\n }\n }\n catch (e) {\n katexLoadError = e\n }\n })()\n }\n await loadPromise\n}\n\nglobalThis.addEventListener('message', async (ev) => {\n const data = ev.data || {}\n if (data.type === 'init') {\n DEBUG = !!data.debug\n if (DEBUG)\n console.debug('[katex-cdn-worker] debug enabled')\n return\n }\n const id = data.id ?? ''\n const content = data.content ?? ''\n const displayMode = data.displayMode ?? true\n\n await loadKaTeX()\n\n if (!katex) {\n const reason = katexLoadError ? String(katexLoadError?.message || katexLoadError) : 'KaTeX is not available in worker'\n globalThis.postMessage({ id, error: reason, content, displayMode })\n return\n }\n\n try {\n const opts = ${l}\n const html = katex.renderToString(content, { ...opts, displayMode: !!displayMode })\n globalThis.postMessage({ id, html, content, displayMode })\n }\n catch (err) {\n const msg = String(err?.message || err)\n globalThis.postMessage({ id, error: msg, content, displayMode })\n }\n})\n`.trimStart():`\nlet DEBUG = false\nlet katex = null\nlet katexLoadError = null\n\nfunction normalizeKaTeX(val) {\n const resolved = (val && val.default) ? val.default : val\n if (resolved && typeof resolved.renderToString === 'function')\n return resolved\n return null\n}\n\nfunction loadKaTeXClassic() {\n if (katex || katexLoadError)\n return\n try {\n importScripts(${i})\n const mhchemUrl = ${a}\n if (mhchemUrl) {\n try {\n importScripts(mhchemUrl)\n }\n catch (e) {\n // ignore optional mhchem load failures\n if (DEBUG)\n console.warn('[katex-cdn-worker] failed to load mhchem', e)\n }\n }\n katex = normalizeKaTeX(globalThis.katex)\n }\n catch (e) {\n katexLoadError = e\n }\n}\n\nloadKaTeXClassic()\n\nglobalThis.addEventListener('message', (ev) => {\n const data = ev.data || {}\n if (data.type === 'init') {\n DEBUG = !!data.debug\n if (DEBUG)\n console.debug('[katex-cdn-worker] debug enabled')\n return\n }\n const id = data.id ?? ''\n const content = data.content ?? ''\n const displayMode = data.displayMode ?? true\n\n if (!katex && !katexLoadError)\n loadKaTeXClassic()\n\n if (!katex) {\n const reason = katexLoadError ? String(katexLoadError?.message || katexLoadError) : 'KaTeX is not available in worker'\n globalThis.postMessage({ id, error: reason, content, displayMode })\n return\n }\n\n try {\n const opts = ${l}\n const html = katex.renderToString(content, { ...opts, displayMode: !!displayMode })\n globalThis.postMessage({ id, html, content, displayMode })\n }\n catch (err) {\n const msg = String(err?.message || err)\n globalThis.postMessage({ id, error: msg, content, displayMode })\n }\n})\n`.trimStart()}function Ro(e){return JSON.stringify(e)}function Po(e){var t;const n=null!=(t=e.mode)?t:"module",o=Ro(e.mermaidUrl),r=`\nlet DEBUG = false\nlet mermaid = null\nlet mermaidLoadError = null\n\nfunction normalizeMermaidModule(mod) {\n if (!mod)\n return mod\n const candidate = (mod && mod.default) ? mod.default : mod\n if (candidate && (typeof candidate.render === 'function' || typeof candidate.parse === 'function' || typeof candidate.initialize === 'function'))\n return candidate\n if (candidate && candidate.mermaidAPI && (typeof candidate.mermaidAPI.render === 'function' || typeof candidate.mermaidAPI.parse === 'function')) {\n const api = candidate.mermaidAPI\n return {\n ...candidate,\n render: api.render ? api.render.bind(api) : undefined,\n parse: api.parse ? api.parse.bind(api) : undefined,\n initialize: (opts) => {\n if (typeof candidate.initialize === 'function')\n return candidate.initialize(opts)\n return api.initialize ? api.initialize(opts) : undefined\n },\n }\n }\n if (mod && mod.mermaid && typeof mod.mermaid.parse === 'function')\n return mod.mermaid\n return candidate\n}\n\nfunction applyThemeTo(code, theme) {\n const themeValue = theme === 'dark' ? 'dark' : 'default'\n const themeConfig = \`%%{init: {"theme": "\${themeValue}"}}%%\\n\`\n const trimmed = (code || '').trimStart()\n if (trimmed.startsWith('%%{'))\n return code\n return themeConfig + code\n}\n\nfunction findHeaderIndex(lines) {\n const headerRe = /^(?:graph|flowchart|flowchart\\s+tb|flowchart\\s+lr|sequenceDiagram|gantt|classDiagram|stateDiagram(?:-v2)?|erDiagram|journey|pie|quadrantChart|timeline|xychart(?:-beta)?)\\b/\n for (let i = 0; i < lines.length; i++) {\n const l = (lines[i] || '').trim()\n if (!l)\n continue\n if (l.startsWith('%%'))\n continue\n if (headerRe.test(l))\n return i\n }\n return -1\n}\n\nasync function canParse(code, theme) {\n const themed = applyThemeTo(code, theme)\n const anyMermaid = mermaid\n if (anyMermaid && typeof anyMermaid.parse === 'function') {\n await anyMermaid.parse(themed)\n return true\n }\n throw new Error('mermaid.parse not available in worker')\n}\n\nasync function findLastRenderablePrefix(baseCode, theme) {\n const lines = String(baseCode || '').split('\\n')\n const headerIdx = findHeaderIndex(lines)\n if (headerIdx === -1)\n return null\n const head = lines.slice(0, headerIdx + 1)\n await canParse(head.join('\\n'), theme)\n\n let low = headerIdx + 1\n let high = lines.length\n let lastGood = headerIdx + 1\n let tries = 0\n const MAX_TRIES = 12\n\n while (low <= high && tries < MAX_TRIES) {\n const mid = Math.floor((low + high) / 2)\n const candidate = [...head, ...lines.slice(headerIdx + 1, mid)].join('\\n')\n tries++\n try {\n await canParse(candidate, theme)\n lastGood = mid\n low = mid + 1\n }\n catch {\n high = mid - 1\n }\n }\n\n return [...head, ...lines.slice(headerIdx + 1, lastGood)].join('\\n')\n}\n\nfunction initMermaidOnce() {\n if (!mermaid)\n return\n try {\n if (typeof mermaid.initialize === 'function')\n mermaid.initialize(${Ro(s({startOnLoad:!1,securityLevel:"loose"},e.initializeOptions||{}))})\n }\n catch (e) {\n if (DEBUG)\n console.warn('[mermaid-cdn-worker] initialize failed', e)\n }\n}\n\nglobalThis.addEventListener('message', async (ev) => {\n const msg = ev.data || {}\n if (msg.type === 'init') {\n DEBUG = !!msg.debug\n if (DEBUG)\n console.debug('[mermaid-cdn-worker] debug enabled')\n return\n }\n\n const id = msg.id\n const action = msg.action\n const payload = msg.payload || {}\n\n if (!mermaid) {\n const errMsg = mermaidLoadError ? String(mermaidLoadError?.message || mermaidLoadError) : 'Mermaid is not available in worker'\n globalThis.postMessage({ id, ok: false, error: errMsg })\n return\n }\n\n try {\n if (action === 'canParse') {\n const ok = await canParse(payload.code, payload.theme)\n globalThis.postMessage({ id, ok: true, result: ok })\n return\n }\n if (action === 'findPrefix') {\n const res = await findLastRenderablePrefix(payload.code, payload.theme)\n globalThis.postMessage({ id, ok: true, result: res })\n return\n }\n globalThis.postMessage({ id, ok: false, error: 'Unknown action' })\n }\n catch (e) {\n globalThis.postMessage({ id, ok: false, error: String(e?.message || e) })\n }\n})\n`.trimStart();return"module"===n?`\n${r}\n\nlet loadPromise = null\nasync function loadMermaid() {\n if (mermaid || mermaidLoadError)\n return\n if (!loadPromise) {\n loadPromise = (async () => {\n try {\n const mod = await import(${o})\n mermaid = normalizeMermaidModule(mod) || null\n initMermaidOnce()\n }\n catch (e) {\n mermaidLoadError = e\n }\n })()\n }\n await loadPromise\n}\n\n// Load immediately; failures are reported per-request\nawait loadMermaid()\n`.trimStart():`\n${r}\n\nfunction loadMermaidClassic() {\n if (mermaid || mermaidLoadError)\n return\n try {\n importScripts(${o})\n mermaid = normalizeMermaidModule(globalThis.mermaid) || null\n initMermaidOnce()\n }\n catch (e) {\n mermaidLoadError = e\n }\n}\n\nloadMermaidClassic()\n`.trimStart()}function Ho(e){const t="string"==typeof(null==e?void 0:e.version)?e.version:"",[n,o]=t.split(".").map(Number);return Number.isFinite(n)&&Number.isFinite(o)&&2===n?o:null}const Uo={AdmonitionNode:Ze,BlockquoteNode:w,CheckboxNode:y,CodeBlockNode:yt,DefinitionListNode:x,EmojiNode:M,EmphasisNode:Oe,FootnoteNode:Re,FootnoteReferenceNode:D,FootnoteAnchorNode:ze,HardBreakNode:Pe,HeadingNode:He,HtmlBlockNode:Fe,HtmlInlineNode:Y,HighlightNode:Ae,ImageNode:de,D2BlockNode:Ct,InlineCodeNode:V,PreCodeNode:Ve,InsertNode:Be,LinkNode:Se,ListItemNode:Ue,ListNode:$e,MarkdownCodeBlockNode:It,MathBlockNode:Qt,MathInlineNode:Wt,MermaidBlockNode:mn,InfographicBlockNode:jt,ParagraphNode:Ye,StrikethroughNode:Le,StrongNode:Ee,SubscriptNode:_e,SuperscriptNode:Ie,TableNode:Qe,TextNode:Ce,ThematicBreakNode:We,VmrContainerNode:Xe,ReferenceNode:je},$o={install(e,t){!function(e){const t=Ho(e);if(!(null==t||t>=7||(null==e?void 0:e.__composition_api_installed__)||(null==e?void 0:e.__compositionApiInstalled)))throw new Error("[markstream-vue2] Vue 2.6.x requires @vue/composition-api. Install it and call Vue.use(VueCompositionAPI) before using markstream-vue2.")}(e),function(e){const t=Ho(e);if(null==t||t>=7)return;if(null==e?void 0:e.__markstreamVue2SetupProxyPatched)return;e.__markstreamVue2SetupProxyPatched=!0;const n=e.prototype;Object.prototype.hasOwnProperty.call(n,"_setupProxy")||Object.defineProperty(n,"_setupProxy",{configurable:!0,get(){return this},set(e){Object.defineProperty(this,"_setupProxy",{value:e,configurable:!0,writable:!0})}}),e.mixin({beforeCreate(){if(!this._setupProxy)try{this._setupProxy=this}catch(Fo){}}})}(e),Object.entries(Uo).forEach(([t,n])=>{e.component(t,n)}),e.component("MarkdownRender",qe),e.component("NodeRenderer",qe),(null==t?void 0:t.getLanguageIcon)&&ot(t.getLanguageIcon),(null==t?void 0:t.mathOptions)&&p.setDefaultMathOptions(t.mathOptions)}};Object.defineProperty(exports,"KATEX_COMMANDS",{enumerable:!0,get:()=>p.KATEX_COMMANDS}),Object.defineProperty(exports,"normalizeStandaloneBackslashT",{enumerable:!0,get:()=>p.normalizeStandaloneBackslashT}),Object.defineProperty(exports,"setDefaultMathOptions",{enumerable:!0,get:()=>p.setDefaultMathOptions}),exports.AdmonitionNode=Ze,exports.BlockquoteNode=w,exports.CheckboxNode=y,exports.CodeBlockNode=yt,exports.D2BlockNode=Ct,exports.DefinitionListNode=x,exports.EmojiNode=M,exports.EmphasisNode=Oe,exports.FootnoteAnchorNode=ze,exports.FootnoteNode=Re,exports.FootnoteReferenceNode=D,exports.HardBreakNode=Pe,exports.HeadingNode=He,exports.HighlightNode=Ae,exports.HtmlBlockNode=Fe,exports.HtmlInlineNode=Y,exports.ImageNode=de,exports.InfographicBlockNode=jt,exports.InlineCodeNode=V,exports.InsertNode=Be,exports.LinkNode=Se,exports.ListItemNode=Ue,exports.ListNode=$e,exports.MERMAID_DISABLED_CODE=sn,exports.MERMAID_WORKER_BUSY_CODE=an,exports.MarkdownCodeBlockNode=It,exports.MarkdownRender=qe,exports.MathBlockNode=Qt,exports.MathInlineNode=Wt,exports.MermaidBlockNode=mn,exports.ParagraphNode=Ye,exports.PreCodeNode=Ve,exports.ReferenceNode=je,exports.StrikethroughNode=Le,exports.StrongNode=Ee,exports.SubscriptNode=_e,exports.SuperscriptNode=Ie,exports.TableNode=Qe,exports.TextNode=Ce,exports.ThematicBreakNode=We,exports.Tooltip=Bo,exports.VmrContainerNode=Xe,exports.VueRendererMarkdown=$o,exports.WORKER_BUSY_CODE=$t,exports.buildKaTeXCDNWorkerSource=zo,exports.buildMermaidCDNWorkerSource=Po,exports.canParseOffthread=cn,exports.clearGlobalCustomComponents=function(){delete C.scopedCustomComponents[k],T.value++},exports.clearKaTeXWorker=function(){var e;_t&&(null==(e=_t.terminate)||e.call(_t)),_t=null,Et=null},exports.clearMermaidWorker=function(){var e;if(tn)try{for(const[e,t]of on.entries())t.reject(new Error("Worker cleared"));on.clear(),null==(e=tn.terminate)||e.call(tn)}catch(Fo){}tn=null,nn=null},exports.createKaTeXWorkerFromCDN=function(e){var t,n;const o=zo(e);if("undefined"==typeof Worker||"undefined"==typeof URL||"undefined"==typeof Blob)return{worker:null,dispose:()=>{},source:o};const r=new Blob([o],{type:"text/javascript"}),l=URL.createObjectURL(r);let i=!1;const a="module"===(null!=(t=e.mode)?t:"classic")?u(s({},null!=(n=e.workerOptions)?n:{}),{type:"module"}):e.workerOptions,c=new Worker(l,a);if(e.debug)try{c.postMessage({type:"init",debug:!0})}catch(Fo){}return{worker:c,dispose:()=>{if(!i){i=!0;try{URL.revokeObjectURL(l)}catch(Fo){}}},source:o}},exports.createMermaidWorkerFromCDN=function(e){var t,n;const o=Po(e);if("undefined"==typeof Worker||"undefined"==typeof URL||"undefined"==typeof Blob)return{worker:null,dispose:()=>{},source:o};const r=new Blob([o],{type:"text/javascript"}),l=URL.createObjectURL(r);let i=!1;const a="module"===(null!=(t=e.mode)?t:"module")?u(s({},null!=(n=e.workerOptions)?n:{}),{type:"module"}):e.workerOptions,c=new Worker(l,a);if(e.debug)try{c.postMessage({type:"init",debug:!0})}catch(Fo){}return{worker:c,dispose:()=>{if(!i){i=!0;try{URL.revokeObjectURL(l)}catch(Fo){}}},source:o}},exports.default=qe,exports.disableD2=function(){bt(null)},exports.disableKatex=function(){we(null)},exports.disableMermaid=function(){Zt(null)},exports.enableD2=function(e){bt(null!=e?e:xt)},exports.enableKatex=function(e){we(null!=e?e:ge)},exports.enableMermaid=function(e){Zt(null!=e?e:Kt)},exports.findPrefixOffthread=dn,exports.getCustomNodeComponents=N,exports.getKaTeXBackpressureDefaults=function(){return s({},Yt)},exports.getKaTeXWorkerLoad=function(){return{inFlight:St.size,max:At}},exports.getLanguageIcon=at,exports.getMermaidWorkerLoad=function(){return{inFlight:on.size,max:rn}},exports.getUseMonaco=tt,exports.isD2Enabled=function(){return"function"==typeof kt},exports.isKaTeXWorkerBusy=function(){return St.size>=At},exports.isKatexEnabled=ye,exports.isMermaidEnabled=Gt,exports.languageMap=st,exports.normalizeLanguageIdentifier=lt,exports.removeCustomComponents=function(e){if(e===k)throw new Error("removeCustomComponents: use clearGlobalCustomComponents() to clear the global mapping");delete C.scopedCustomComponents[e],T.value++},exports.renderKaTeXInWorker=Ht,exports.renderKaTeXWithBackpressure=Vt,exports.resolveMonacoLanguageId=it,exports.setCustomComponents=function(e,t){"string"==typeof e?C.scopedCustomComponents[e]=t||{}:C.scopedCustomComponents[k]=e||{},T.value++},exports.setD2Loader=bt,exports.setDefaultI18nMap=function(e){Object.assign(ae,e)},exports.setKaTeXBackpressureDefaults=function(e){null!=e.timeout&&(Yt.timeout=Math.max(0,Math.floor(e.timeout))),null!=e.waitTimeout&&(Yt.waitTimeout=Math.max(0,Math.floor(e.waitTimeout))),null!=e.backoffMs&&(Yt.backoffMs=Math.max(0,Math.floor(e.backoffMs))),null!=e.maxRetries&&(Yt.maxRetries=Math.max(0,Math.floor(e.maxRetries)))},exports.setKaTeXCache=Ut,exports.setKaTeXWorker=function(e){_t=e,Et=null,_t.onmessage=e=>{const{id:t,html:n,error:o}=e.data,r=St.get(t);if(r)if(St.delete(t),clearTimeout(r.timeoutId),zt(),o)r.reject(new Error(o));else{const{content:t,displayMode:o}=e.data;if(t){const e=`${o?"d":"i"}:${t}`;if(Bt.set(e,n),Bt.size>200){const e=Bt.keys().next().value;Bt.delete(e)}}r.resolve(n)}},_t.onerror=e=>{console.error("[katexWorkerClient] Worker error:",e);for(const[t,n]of St.entries())clearTimeout(n.timeoutId),n.reject(new Error(`Worker error: ${e.message}`));St.clear(),zt()}},exports.setKaTeXWorkerDebug=function(e){Lt=!!e,_t&&_t.postMessage({type:"init",debug:Lt})},exports.setKaTeXWorkerMaxConcurrency=function(e){Number.isFinite(e)&&e>0&&(At=Math.floor(e))},exports.setKatexLoader=we,exports.setLanguageIconResolver=ot,exports.setMermaidLoader=Zt,exports.setMermaidWorker=function(e){tn=e,nn=null;const t=e;tn.onmessage=e=>{if(tn!==t)return;const{id:n,ok:o,result:r,error:l}=e.data,i=on.get(n);i&&(!1===o||l?i.reject(new Error(l||"Unknown error")):i.resolve(r))},tn.onerror=e=>{var n,o;if(tn===t)if(0!==on.size){try{ln?console.error("[mermaidWorkerClient] Worker error:",(null==e?void 0:e.message)||e):null==(o=console.debug)||o.call(console,"[mermaidWorkerClient] Worker error:",(null==e?void 0:e.message)||e)}catch(r){}for(const[t,n]of on.entries())n.reject(new Error(`Worker error: ${e.message}`));on.clear()}else null==(n=console.debug)||n.call(console,"[mermaidWorkerClient] Worker error (no pending):",(null==e?void 0:e.message)||e)},tn.onmessageerror=e=>{var n,o;if(tn===t)if(0!==on.size){try{ln?console.error("[mermaidWorkerClient] Worker messageerror:",e):null==(o=console.debug)||o.call(console,"[mermaidWorkerClient] Worker messageerror:",e)}catch(Fo){}for(const[e,t]of on.entries())t.reject(new Error("Worker messageerror"));on.clear()}else null==(n=console.debug)||n.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",e)}},exports.setMermaidWorkerClientDebug=function(e){ln=!!e},exports.setMermaidWorkerMaxConcurrency=function(e){Number.isFinite(e)&&e>0&&(rn=Math.floor(e))},exports.terminateWorker=pn,exports.waitForKaTeXWorkerSlot=Ft,Object.keys(p).forEach(e=>{"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>p[e]})});
1
+ "use strict";Object.create;var e,t=Object.defineProperty,n=Object.defineProperties,o=(Object.getOwnPropertyDescriptor,Object.getOwnPropertyDescriptors),r=(Object.getOwnPropertyNames,Object.getOwnPropertySymbols),l=(Object.getPrototypeOf,Object.prototype.hasOwnProperty),i=Object.prototype.propertyIsEnumerable,a=(e,n,o)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o,s=(e,t)=>{for(var n in t||(t={}))l.call(t,n)&&a(e,n,t[n]);if(r)for(var n of r(t))i.call(t,n)&&a(e,n,t[n]);return e},u=(e,t)=>n(e,o(t)),c=(e,t)=>{var n={};for(var o in e)l.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&r)for(var o of r(e))t.indexOf(o)<0&&i.call(e,o)&&(n[o]=e[o]);return n},d=(e,t,n)=>new Promise((o,r)=>{var l=e=>{try{a(n.next(e))}catch(t){r(t)}},i=e=>{try{a(n.throw(e))}catch(t){r(t)}},a=e=>e.done?o(e.value):Promise.resolve(e.value).then(l,i);a((n=n.apply(e,t)).next())});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("stream-markdown-parser"),m=require("vue-demi");var f="undefined"!=typeof document?document.currentScript:null;function h(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const v=h(m);function g(e,t,n,o,r,l,i,a){var s,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),o&&(u.functional=!0),l&&(u._scopeId="data-v-"+l),i?(s=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},u._ssrRegister=s):r&&(s=a?function(){r.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:r),s)if(u.functional){u._injectStyles=s;var c=u.render;u.render=function(e,t){return s.call(t),c(e,t)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,s):[s]}return{exports:e,options:u}}const w=g(m.defineComponent({__name:"BlockquoteNode",props:{node:null,indexKey:null,typewriter:{type:Boolean},customId:null},setup:e=>({__sfc:!0,props:e,NodeRenderer:Ge})}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("blockquote",{staticClass:"blockquote",attrs:{dir:"auto",cite:e.node.cite}},[t(n.NodeRenderer,{attrs:{"index-key":`blockquote-${n.props.indexKey}`,nodes:n.props.node.children||[],"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1)},[],!1,null,"1ba811a8",null,null).exports,y=g(m.defineComponent({__name:"CheckboxNode",props:{node:null},setup:e=>({__sfc:!0})}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("span",{staticClass:"checkbox-node"},[t("input",{staticClass:"checkbox-input",attrs:{type:"checkbox",disabled:""},domProps:{checked:e.node.checked}})])},[],!1,null,"8dc6c46f",null,null).exports,x=g(m.defineComponent({__name:"DefinitionListNode",props:{node:null,indexKey:null,typewriter:{type:Boolean},customId:null},emits:["copy"],setup:e=>({__sfc:!0,props:e,NodeRenderer:Ge})}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("dl",{staticClass:"definition-list"},[e._l(n.props.node.items,function(o,r){return[t("dt",{key:`definition-term-${n.props.indexKey}-${r}`,staticClass:"definition-term"},[t(n.NodeRenderer,{attrs:{"index-key":`definition-term-${n.props.indexKey}-${r}`,nodes:o.term,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1),t("dd",{key:`definition-desc-${n.props.indexKey}-${r}`,staticClass:"definition-desc"},[t(n.NodeRenderer,{attrs:{"index-key":`definition-desc-${n.props.indexKey}-${r}`,nodes:o.definition,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1)]})],2)},[],!1,null,"8c5b98b7",null,null).exports,M=g(m.defineComponent({__name:"EmojiNode",props:{node:null},setup:e=>({__sfc:!0})}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("span",{staticClass:"emoji-node"},[e._v(e._s(e.node.name))])},[],!1,null,"de55dc97",null,null).exports,k="__global__",b="__MARKSTREAM_VUE2_CUSTOM_COMPONENTS_STORE__",C=(()=>{const e=globalThis;if(e[b])return e[b];const t={scopedCustomComponents:{},revision:m.shallowRef(0)};return e[b]=t,t})(),T=C.revision;function N(e){const t=C.scopedCustomComponents[k]||{};if(!e)return t;const n=C.scopedCustomComponents[e]||{};return t&&0!==Object.keys(t).length?n&&0!==Object.keys(n).length?s(s({},t),n):t:n}const D=g(m.defineComponent({__name:"FootnoteReferenceNode",props:{node:null},setup(e){const t=e,n=`#footnote-${t.node.id}`;return{__sfc:!0,props:t,href:n,handleScroll:function(){if("undefined"==typeof document)return;const e=document.querySelector(n);e?e.scrollIntoView({behavior:"smooth"}):console.warn(`Element with href: ${n} not found`)}}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("sup",{staticClass:"footnote-reference",attrs:{id:`fnref-${e.node.id}`},on:{click:n.handleScroll}},[t("span",{staticClass:"footnote-link cursor-pointer",attrs:{href:n.href,title:`查看脚注 ${e.node.id}`}},[e._v("["+e._s(e.node.id)+"]")])])},[],!1,null,"01af0fee",null,null).exports,j=function(){var e,t,n;const o=v,r=e=>"function"==typeof e&&"function"==typeof e.extend,l=[o,null==o?void 0:o.default,null==(e=null==o?void 0:o.default)?void 0:e.default,null==(n=null!=(t=null==o?void 0:o.default)?t:o)?void 0:n.default,null==o?void 0:o.Vue2,null==o?void 0:o.Vue];for(const a of l){const e=r(a)?a:r(null==a?void 0:a.default)?a.default:null;if(e)try{const t=new e;if("function"==typeof t.$createElement)return t.$createElement.bind(t)}catch(i){}}return null}();function I(e,t,n,o){if(e)return e(t,n,o);try{return m.h(t,n,o)}catch(r){}try{return m.h(t,n,o)}catch(r){}return j?j(t,n,o):null}const _=new Set(["onclick","onerror","onload","onmouseover","onmouseout","onmousedown","onmouseup","onkeydown","onkeyup","onfocus","onblur","onsubmit","onreset","onchange","onselect","ondblclick","ontouchstart","ontouchend","ontouchmove","ontouchcancel","onwheel","onscroll","oncopy","oncut","onpaste","oninput","oninvalid","onreset","onsearch","onsubmit"]),E=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),L=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]),S=/<([a-z][a-z0-9-]*)\b[^>]*>/gi,B=new Set(["script"]),A=new Set(["href","src","srcset","xlink:href","formaction"]),O=(()=>{var e;try{return Boolean(null==(e={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:e.DEV)}catch(t){}return!1})();function z(e){O&&console.warn(e)}function R(e){const t=function(e){let t="";for(const n of e){const e=n.charCodeAt(0);e<=31||127===e||/\s/u.test(n)||(t+=n)}return t}(e).toLowerCase();return!(!t.startsWith("javascript:")&&!t.startsWith("vbscript:"))||!!t.startsWith("data:")&&!(t.startsWith("data:image/")||t.startsWith("data:video/")||t.startsWith("data:audio/"))}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function H(e,t){const n=e.toLowerCase();return!L.has(n)&&(P(t,n)||P(t,e))}function U(e,t){const n=t.toLowerCase();if(["checked","disabled","readonly","required","autofocus","multiple","hidden"].includes(n))return"true"===e||""===e||e===t;if(["value","min","max","step","width","height","size","maxlength"].includes(n)){const t=Number(e);if(""!==e&&!Number.isNaN(t))return t}return e}function $(e){return e.trim().length>0}function F(e,t,n,o,r){if(B.has(e.toLowerCase()))return null;const l=function(e){const t={};for(const[n,o]of Object.entries(e)){const e=n.toLowerCase();_.has(e)||A.has(e)&&o&&R(o)||(t[n]=o)}return t}(t);if(H(e,o)){const t=o[e]||o[e.toLowerCase()],i=function(e){const t={};for(const[n,o]of Object.entries(e))t[n]=U(o,n);return t}(l);return I(r,t,i,n.length>0?n:void 0)}{const t=l,{innerHTML:o}=t;return I(r,e,c(t,["innerHTML"]),n.length>0?n:void 0)}}function Y(e,t){if(!e||!e.includes("<"))return!1;if(!t||0===Object.keys(t).length)return!1;let n;for(S.lastIndex=0;null!==(n=S.exec(e));)if(H(n[1],t))return!0;return!1}function V(e,t,n){if(!e)return[];try{const o=function(e,t,n){const o=[],r=[];for(const l of e)if("text"===l.type)(o.length>0?o[o.length-1].children:r).push(l.content);else if("self_closing"===l.type){const e=F(l.tagName,l.attrs||{},[],t,n),i=o.length>0?o[o.length-1].children:r;null!=e&&i.push(e)}else if("tag_open"===l.type)o.push({tagName:l.tagName,children:[],attrs:l.attrs});else if("tag_close"===l.type){const e=l.tagName.toLowerCase();let i=-1;for(let t=o.length-1;t>=0;t--)if(o[t].tagName.toLowerCase()===e){i=t;break}if(-1!==i)for(;o.length>i;){const l=o.pop(),a=F(l.tagName,l.attrs||{},l.children,t,n);o.length>0?null!=a&&o[o.length-1].children.push(a):null!=a&&r.push(a),l.tagName.toLowerCase()!==e&&o.length>i&&z(`Auto-closing unclosed tag: <${l.tagName}>`)}else z(`Ignoring closing tag with no matching opening tag: </${l.tagName}>`)}for(;o.length>0;){const e=o.pop(),l=F(e.tagName,e.attrs||{},e.children,t,n);null!=l&&r.push(l),z(`Auto-closing unclosed tag: <${e.tagName}>`)}return r}(function(e){var t,n,o;const r=[];let l=0;for(;l<e.length;){if(e.startsWith("\x3c!--",l)){const t=e.indexOf("--\x3e",l);if(-1!==t){l=t+3;continue}break}const i=e.indexOf("<",l);if(-1===i){if(l<e.length){const t=e.slice(l);$(t)&&r.push({type:"text",content:t})}break}if(i>l){const t=e.slice(l,i);$(t)&&r.push({type:"text",content:t})}if(e.startsWith("![CDATA[",i+1)){const t=e.indexOf("]]>",i);if(-1!==t){r.push({type:"text",content:e.slice(i,t+3)}),l=t+3;continue}break}if(e.startsWith("!",i+1)){const t=e.indexOf(">",i);if(-1!==t){l=t+1;continue}break}const a=e.indexOf(">",i);if(-1===a)break;const s=e.slice(i+1,a).trim(),u=s.startsWith("/"),c=s.endsWith("/");if(u){const e=s.slice(1).trim();r.push({type:"tag_close",tagName:e})}else{const e=s.indexOf(" ");let l,i="";-1===e?l=c?s.slice(0,-1).trim():s.trim():(l=s.slice(0,e).trim(),i=s.slice(e+1));const a={};if(i){const e=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let r;for(;null!==(r=e.exec(i));){const e=r[1],l=null!=(o=null!=(n=null!=(t=r[2])?t:r[3])?n:r[4])?o:"";e&&!e.endsWith("/")&&(a[e]=l)}}r.push({type:c||E.has(l.toLowerCase())?"self_closing":"tag_open",tagName:l,attrs:a})}l=a+1}return r}(e),t,n);return o}catch(r){return o=r,O&&console.error("Failed to parse HTML to VNodes:",o),null}var o}const Q=g(m.defineComponent({__name:"HtmlInlineNode",props:{node:null,customId:null},setup(e){const t=e,n=m.computed(()=>N(t.customId)),o=m.defineComponent({name:"DynamicRenderer",props:{content:{type:String,required:!0},customComponents:{type:Object,required:!0}},render(){return V(this.content,this.customComponents)||[]}}),r=m.computed(()=>{const e=t.node.content;return e?Y(e,n.value)?{mode:"dynamic",content:e}:{mode:"html",content:e}:{mode:"html",content:""}}),l=m.ref(null),i="undefined"!=typeof window,a=m.ref({mode:"",content:"",el:null});let s=null;function u(){return!s&&i&&(s=document.createElement("template")),s}function c(e,t){if(!i||!l.value)return;const n=l.value,o=a.value;if(o.el!==n||o.mode!==e||o.content!==t){if("text"===e)n.textContent=t;else{const e=u();if(e){e.innerHTML=t;const o=e.content.cloneNode(!0);"function"==typeof n.replaceChildren?n.replaceChildren(o):(n.innerHTML="",n.appendChild(o))}else n.innerHTML=t}a.value={mode:e,content:t,el:n}}}function d(){c("html",t.node.content)}function p(){c("text",t.node.content)}return m.onMounted(()=>{"html"===r.value.mode&&(t.node.loading&&!t.node.autoClosed?p():d())}),m.watch(()=>[t.node.content,t.node.loading,t.node.autoClosed],()=>{"html"===r.value.mode&&(t.node.loading&&!t.node.autoClosed?p():d())}),m.onBeforeUnmount(()=>{l.value&&(l.value.innerHTML="",a.value={mode:"",content:"",el:null})}),{__sfc:!0,props:t,customComponents:n,DynamicRenderer:o,renderMode:r,containerRef:l,isClient:i,lastDomRender:a,templateEl:s,getTemplateEl:u,commitDomRender:c,renderHtmlContent:d,renderLoadingContent:p}}}),function(){var e=this._self._c,t=this._self._setupProxy;return"dynamic"===t.renderMode.mode?e("span",{staticClass:"html-inline-node",class:{"html-inline-node--loading":t.props.node.loading}},[e(t.DynamicRenderer,{attrs:{content:t.renderMode.content,"custom-components":t.customComponents}})],1):e("span",{ref:"containerRef",staticClass:"html-inline-node",class:{"html-inline-node--loading":t.props.node.loading}})},[],!1,null,"7aa2ed27",null,null).exports,W=g(m.defineComponent({__name:"InlineCodeNode",props:{node:null},setup:e=>({__sfc:!0})}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("code",{staticClass:"inline text-[85%] px-1 py-0.5 rounded font-mono bg-[hsl(var(--secondary))] whitespace-normal break-words max-w-full before:content-[''] after:content-['']"},[e._v(e._s(e.node.code))])},[],!1,null,null,null,null).exports,K=m.ref(!1),X=m.ref(""),q=m.ref("top"),Z=m.ref(null),G=m.ref(null),J=m.ref(null),ee=m.ref(null),te=m.ref(null);let ne=null,oe=null;function re(){ne&&(clearTimeout(ne),ne=null),oe&&(clearTimeout(oe),oe=null)}let le=!1,ie=null;function ae(e,t,n="top",o=!1,r,l){if(!e)return;le||"undefined"!=typeof document&&(ie||(ie=Promise.resolve().then(()=>zo).then(e=>{var t;le=!0;const n=null!=(t=null==e?void 0:e.default)?t:e,o=document.createElement("div");o.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(o);const r=function(){var e,t,n,o;const r=v,l=e=>"function"==typeof e&&"function"==typeof e.extend,i=[r,null==r?void 0:r.default,null==(e=null==r?void 0:r.default)?void 0:e.default,null==(n=null!=(t=null==r?void 0:r.default)?t:r)?void 0:n.default,null==r?void 0:r.Vue2,null==r?void 0:r.Vue];for(const a of i){if(l(a))return a;if(l(null==a?void 0:a.default))return a.default}return null!=(o=null==r?void 0:r.default)?o:r}();(new(r.extend({render(e){var t;return e(n,{props:{visible:K.value,anchorEl:Z.value,content:X.value,placement:q.value,id:G.value,originX:J.value,originY:ee.value,isDark:null!=(t=te.value)?t:void 0}})}}))).$mount(o)}).catch(e=>{ie=null,le=!1,console.warn("[markstream-vue2] Failed to load Tooltip component. Tooltips will be disabled.",e)}))),re();const i=()=>{var o,i;G.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,Z.value=e,X.value=t,q.value=n,J.value=null!=(o=null==r?void 0:r.x)?o:null,ee.value=null!=(i=null==r?void 0:r.y)?i:null,te.value="boolean"==typeof l?l:null,K.value=!0;try{e.setAttribute("aria-describedby",G.value)}catch(a){}};o?i():ne=setTimeout(i,80)}function se(e=!1){re();const t=()=>{if(Z.value&&G.value)try{Z.value.removeAttribute("aria-describedby")}catch(e){}K.value=!1,Z.value=null,G.value=null,J.value=null,ee.value=null};e?t():oe=setTimeout(t,120)}const ue={"common.copy":"Copy","common.copySuccess":"Copied","common.decrease":"Decrease","common.reset":"Reset","common.increase":"Increase","common.expand":"Expand","common.collapse":"Collapse","common.preview":"Preview","common.source":"Source","common.export":"Export","common.open":"Open","common.zoomIn":"Zoom in","common.zoomOut":"Zoom out","common.resetZoom":"Reset zoom","image.loadError":"Image failed to load","image.loading":"Loading image..."};function ce(){try{const t=globalThis.$vueI18nUse||null;if(t&&"function"==typeof t)try{const e=t();if(e&&"function"==typeof e.t)return{t:e.t.bind(e)}}catch(e){}}catch(e){}return{t:e=>{var t;return null!=(t=ue[e])?t:function(e){return(e.split(".").pop()||e).replace(/[_-]/g," ").replace(/([A-Z])/g," $1").replace(/\s+/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()}(e)}}}const de=Symbol("ViewportPriority");function pe(){const e=m.inject(de,void 0);if(e)return e;const t=new WeakMap;let n=null;return e=>{const o=m.ref(!1);let r,l=!1;const i=new Promise(e=>{r=()=>{l||(l=!0,e())}}),a=()=>{try{null==n||n.unobserve(e)}catch(o){}t.delete(e)},s=n||("undefined"==typeof window||"undefined"==typeof IntersectionObserver?null:(n=new IntersectionObserver(e=>{for(const r of e){const e=t.get(r.target);if(e&&(r.isIntersecting||r.intersectionRatio>0)){if(!e.visible.value){e.visible.value=!0;try{e.resolve()}catch(o){}}null==n||n.unobserve(r.target),t.delete(r.target)}}},{root:null,rootMargin:"300px",threshold:0}),n));return s?(t.set(e,{resolve:r,visible:o}),s.observe(e),{isVisible:o,whenVisible:i,destroy:a}):(o.value=!0,r(),{isVisible:o,whenVisible:i,destroy:a})}}const me=g(m.defineComponent({__name:"ImageNode",props:{node:null,fallbackSrc:{default:""},showCaption:{type:Boolean,default:!1},lazy:{type:Boolean,default:!0},svgMinHeight:{default:"12rem"},usePlaceholder:{type:Boolean,default:!0}},emits:["load","error","click"],setup(e,{emit:t}){const n=e,o=m.ref(!1),r=m.ref(!1),l=m.ref(!1),i=m.ref(null),a=pe();let s=null;const u=m.ref("undefined"==typeof window);"undefined"!=typeof window&&m.watch(()=>i.value,e=>{if(null==s||s.destroy(),s=null,!e)return void(u.value=!1);const t=a(e,{rootMargin:"400px"});s=t,u.value=t.isVisible.value,t.whenVisible.then(()=>{u.value=!0})},{immediate:!0}),m.onBeforeUnmount(()=>{null==s||s.destroy(),s=null});const c=m.computed(()=>r.value&&n.fallbackSrc?n.fallbackSrc:n.node.src),d=m.computed(()=>!n.lazy||u.value),p=m.computed(()=>/\.svg(?:\?|$)/i.test(c.value)),{t:f}=ce();return m.watch(c,()=>{o.value=!1,r.value=!1}),{__sfc:!0,props:n,emit:t,imageLoaded:o,hasError:r,fallbackTried:l,figureRef:i,registerVisibility:a,visibilityHandle:s,isVisible:u,displaySrc:c,canRenderImage:d,isSvg:p,handleImageError:function(){n.fallbackSrc&&!l.value?(l.value=!0,r.value=!0):(r.value=!0,t("error",n.node.src))},handleImageLoad:function(){o.value=!0,r.value=!1,t("load",c.value)},handleClick:function(e){e.preventDefault(),o.value&&!r.value&&t("click",[e,c.value])},t:f}}}),function(){var e,t,n,o,r,l=this,i=l._self._c,a=l._self._setupProxy;return i("figure",{ref:"figureRef",staticClass:"text-center my-8"},[i("div",{staticClass:"relative inline-block"},[i("transition",{attrs:{name:"img-switch",mode:"out-in"}},[l.node.loading||a.hasError||!a.canRenderImage?a.hasError?l.node.loading||a.props.fallbackSrc?l._e():i("div",{key:"error",staticClass:"px-4 py-2 bg-gray-100 flex items-center justify-center rounded-lg gap-2 text-red-500"},[l._t("error",function(){return[i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"}},[i("path",{attrs:{fill:"currentColor",d:"M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z"}})]),i("span",{staticClass:"text-sm whitespace-nowrap"},[l._v(l._s(a.t("image.loadError")))])]},{node:a.props.node,displaySrc:a.displaySrc,imageLoaded:a.imageLoaded,hasError:a.hasError,fallbackSrc:a.props.fallbackSrc,lazy:a.props.lazy,isSvg:a.isSvg})],2):i("div",{key:"placeholder",staticClass:"placeholder-layer max-w-96 inline-flex items-center justify-center gap-2",style:a.isSvg?{minHeight:a.props.svgMinHeight,width:"100%"}:{minHeight:"6rem"}},[a.props.usePlaceholder?[l._t("placeholder",function(){return[i("div",{staticClass:"w-4 h-4 rounded-full border-2 border-solid border-current border-t-transparent animate-spin",attrs:{"aria-hidden":"true"}}),i("span",{staticClass:"text-sm whitespace-nowrap"},[l._v(l._s(a.t("image.loading")))])]},{node:a.props.node,displaySrc:a.displaySrc,imageLoaded:a.imageLoaded,hasError:a.hasError,fallbackSrc:a.props.fallbackSrc,lazy:a.props.lazy,isSvg:a.isSvg})]:[i("span",{staticClass:"text-sm text-gray-500"},[l._v(l._s(l.node.raw))])]],2):i("img",{key:"image",staticClass:"max-w-96 h-auto rounded-lg transition-opacity duration-200 ease-in-out",class:{"opacity-0":!a.imageLoaded,"opacity-100":a.imageLoaded,"cursor-pointer":a.imageLoaded},style:a.isSvg?{minHeight:a.props.svgMinHeight,width:"100%",height:"auto",objectFit:"contain"}:void 0,attrs:{src:a.displaySrc,alt:String(null!=(t=null!=(e=a.props.node.alt)?e:a.props.node.title)?t:""),title:String(null!=(o=null!=(n=a.props.node.title)?n:a.props.node.alt)?o:""),loading:a.props.lazy?"lazy":"eager",decoding:"async",tabindex:a.imageLoaded?0:-1,"aria-label":null!=(r=a.props.node.alt)?r:a.t("image.preview")},on:{error:a.handleImageError,load:a.handleImageLoad,click:a.handleClick}})])],1),a.props.showCaption&&a.props.node.alt?i("figcaption",{staticClass:"mt-2 text-sm text-gray-500 italic"},[l._v(" "+l._s(a.props.node.alt)+" ")]):l._e()])},[],!1,null,"2b49bba9",null,null).exports;let fe=null,he=!1,ve=ye;function ge(e){var t;const n=null!=(t=null==e?void 0:e.default)?t:e;return n&&"function"==typeof n.renderToString?n:null}function we(){try{const e=globalThis;return ge(null==e?void 0:e.katex)}catch(e){return null}}function ye(){return(()=>d(this,null,function*(){const e=we();if(e)return e;const t=yield import("katex");try{yield Promise.resolve().then(()=>require("./mhchem.js"))}catch(n){}return ge(t)}))()}function xe(e){ve=e,fe=null,he=!1}function Me(){return"function"==typeof ve}function ke(){return d(this,null,function*(){var e;const t=we();if(t)return fe=t,fe;if(fe)return fe;if(he)return null;const n=ve;if(!n)return he=!0,null;try{const t=yield n();if(t)return fe=null!=(e=ge(t))?e:t,fe}catch(o){}return he=!0,null})}const be=m.shallowRef(!1);let Ce=null;function Te(){return Ce||(Ce=ke().then(e=>{be.value=!!e}).catch(()=>{be.value=!1})),m.readonly(be)}const Ne=g(m.defineComponent({__name:"TextNode",props:{node:null},emits:["copy"],setup:e=>({__sfc:!0,katexReady:Te()})}),function(){var e=this;return(0,e._self._c)("span",{staticClass:"whitespace-pre-wrap break-words text-node",class:[e._self._setupProxy.katexReady&&e.node.center?"text-node-center":""]},[e._v(" "+e._s(e.node.content)+" ")])},[],!1,null,"56f30838",null,null).exports;function De(e){return t=>{var n,o;return m.h(Ne,u(s({},t),{node:u(s({},t.node),{content:null!=(o=t.node.raw)?o:e(String(null!=(n=t.node.content)?n:""))})}))}}function je(){return d(this,null,function*(){var e,t,n;if("undefined"!=typeof globalThis&&void 0!==globalThis.process&&"test"===(null==(t=null==(e=globalThis.process)?void 0:e.env)?void 0:t.NODE_ENV))return De(e=>`$${e}$`);try{if(yield ke()){const e=yield Promise.resolve().then(()=>require("./index.js"));return null!=(n=e.default)?n:e}}catch(o){console.warn('[markstream-vue2] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',o)}return De(e=>`$${e}$`)})}function Ie(){return d(this,null,function*(){var e;try{if(yield ke()){const t=yield Promise.resolve().then(()=>require("./index2.js"));return null!=(e=t.default)?e:t}}catch(t){console.warn('[markstream-vue2] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',t)}return De(e=>`$$${e}$$`)})}const _e=g(m.defineComponent({__name:"ReferenceNode",props:{node:null,messageId:null,threadId:null},emits:["click","mouseEnter","mouseLeave"],setup:e=>({__sfc:!0})}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("span",{staticClass:"reference-node cursor-pointer bg-[hsl(var(--muted))] text-xs rounded-md px-1.5 mx-0.5 hover:bg-[hsl(var(--secondary))]",attrs:{role:"button",tabindex:"0"},on:{click:function(t){return e.$emit("click",t,e.node.id,e.messageId,e.threadId)},mouseenter:function(t){return e.$emit("mouseEnter",t,e.node.id,e.messageId,e.threadId)},mouseleave:function(t){return e.$emit("mouseLeave",t,e.node.id,e.messageId,e.threadId)}}},[e._v(" "+e._s(e.node.id)+" ")])},[],!1,null,null,null,null).exports,Ee=g(m.defineComponent({__name:"SuperscriptNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=N(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:Ne,inline_code:W,link:Ae,html_inline:Q,strong:Se,emphasis:Re,footnote_reference:D,strikethrough:Be,highlight:ze,insert:Oe,subscript:Le,emoji:M,math_inline:je,reference:_e},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("sup",{staticClass:"superscript-node"},[e._l(e.node.children,function(o,r){return[n.nodeComponents[o.type]?t(n.nodeComponents[o.type],{key:`${e.indexKey||"superscript"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"superscript"}-${r}`}}):t("span",{key:`${e.indexKey||"superscript"}-${r}`},[e._v(" "+e._s(o.content||o.raw)+" ")])]})],2)},[],!1,null,"3cc2c5de",null,null).exports,Le=g(m.defineComponent({__name:"SubscriptNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=N(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:Ne,inline_code:W,link:Ae,html_inline:Q,strong:Se,emphasis:Re,footnote_reference:D,strikethrough:Be,highlight:ze,insert:Oe,superscript:Ee,emoji:M,math_inline:je,reference:_e},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("sub",{staticClass:"subscript-node"},[e._l(e.node.children,function(o,r){return[n.nodeComponents[o.type]?t(n.nodeComponents[o.type],{key:`${e.indexKey||"subscript"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"subscript"}-${r}`}}):t("span",{key:`${e.indexKey||"subscript"}-${r}`},[e._v(" "+e._s(o.content||o.raw)+" ")])]})],2)},[],!1,null,"a2b068c3",null,null).exports,Se=g(m.defineComponent({__name:"StrongNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=N(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:Ne,inline_code:W,link:Ae,html_inline:Q,emphasis:Re,strikethrough:Be,highlight:ze,insert:Oe,subscript:Le,superscript:Ee,emoji:M,footnote_reference:D,math_inline:je,reference:_e},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("strong",{staticClass:"strong-node"},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"strong"}-${r}`,tag:"component",attrs:{"index-key":`${e.indexKey||"strong"}-${r}`,node:o,"custom-id":n.props.customId}})}),1)},[],!1,null,"af3ce037",null,null).exports,Be=g(m.defineComponent({__name:"StrikethroughNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=N(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:Ne,inline_code:W,link:Ae,html_inline:Q,strong:Se,emphasis:Re,highlight:ze,insert:Oe,subscript:Le,superscript:Ee,emoji:M,footnote_reference:D,math_inline:je,reference:_e},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("del",{staticClass:"strikethrough-node"},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"strikethrough"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"strikethrough"}-${r}`}})}),1)},[],!1,null,"904d5bd1",null,null).exports,Ae=g(m.defineComponent({__name:"LinkNode",props:{node:null,indexKey:null,customId:null,showTooltip:{type:Boolean,default:!0},color:null,underlineHeight:null,underlineBottom:null,animationDuration:null,animationOpacity:null,animationTiming:null,animationIteration:null},setup(e){const t=e,n=m.computed(()=>{var e,n,o,r,l,i;const a=void 0!==t.underlineBottom?"number"==typeof t.underlineBottom?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px";return{"--link-color":null!=(e=t.color)?e:"#0366d6","--underline-height":`${null!=(n=t.underlineHeight)?n:2}px`,"--underline-bottom":a,"--underline-opacity":String(null!=(o=t.animationOpacity)?o:.9),"--underline-duration":`${null!=(r=t.animationDuration)?r:.8}s`,"--underline-timing":null!=(l=t.animationTiming)?l:"linear","--underline-iteration":"number"==typeof t.animationIteration?String(t.animationIteration):null!=(i=t.animationIteration)?i:"infinite"}}),o={text:Ne,strong:Se,strikethrough:Be,emphasis:Re,image:me,html_inline:Q},r=m.useAttrs(),l=m.computed(()=>{var e,n;return String(null!=(n=null!=(e=t.node.title)?e:t.node.href)?n:"")});return{__sfc:!0,props:t,cssVars:n,nodeComponents:o,attrs:r,onAnchorEnter:function(e){var n,o,r;if(!t.showTooltip)return;const l=e,i=null!=(null==l?void 0:l.clientX)&&null!=(null==l?void 0:l.clientY)?{x:l.clientX,y:l.clientY}:void 0,a=(null==(n=t.node)?void 0:n.title)||(null==(o=t.node)?void 0:o.href)||(null==(r=t.node)?void 0:r.text)||"";ae(e.currentTarget,a,"top",!1,i)},onAnchorLeave:function(){t.showTooltip&&se()},title:l}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return e.node.loading?t("span",e._b({staticClass:"link-loading inline-flex items-baseline gap-1.5",style:n.cssVars,attrs:{"aria-hidden":e.node.loading?"false":"true"}},"span",n.attrs,!1),[t("span",{staticClass:"link-text-wrapper relative inline-flex"},[t("span",{staticClass:"leading-[normal] link-text"},[t("span",{staticClass:"leading-[normal] link-text"},[e._v(e._s(e.node.text))])]),t("span",{staticClass:"underline-anim",attrs:{"aria-hidden":"true"}})])]):t("a",e._b({staticClass:"link-node",style:n.cssVars,attrs:{href:e.node.href,title:e.showTooltip?"":n.title,"aria-label":`Link: ${n.title}`,"aria-hidden":e.node.loading?"true":"false",target:"_blank",rel:"noopener noreferrer"},on:{mouseenter:e=>n.onAnchorEnter(e),mouseleave:n.onAnchorLeave}},"a",n.attrs,!1),e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"emphasis"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"link-text"}-${r}`}})}),1)},[],!1,null,"0bce2385",null,null).exports,Oe=g(m.defineComponent({__name:"InsertNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=N(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:Ne,inline_code:W,link:Ae,html_inline:Q,strong:Se,emphasis:Re,strikethrough:Be,highlight:ze,subscript:Le,superscript:Ee,emoji:M,footnote_reference:D,math_inline:je,reference:_e},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("ins",{staticClass:"insert-node"},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"insert"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"insert"}-${r}`}})}),1)},[],!1,null,"ab1ec9bc",null,null).exports,ze=g(m.defineComponent({__name:"HighlightNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=N(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:Ne,inline_code:W,link:Ae,html_inline:Q,strong:Se,emphasis:Re,strikethrough:Be,insert:Oe,subscript:Le,superscript:Ee,emoji:M,footnote_reference:D,math_inline:je,reference:_e},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("mark",{staticClass:"highlight-node"},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"highlight"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"highlight"}-${r}`}})}),1)},[],!1,null,"38e31bf6",null,null).exports,Re=g(m.defineComponent({__name:"EmphasisNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=N(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:Ne,inline_code:W,link:Ae,html_inline:Q,strong:Se,strikethrough:Be,highlight:ze,insert:Oe,subscript:Le,superscript:Ee,emoji:M,footnote_reference:D,math_inline:je,reference:_e},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("em",{staticClass:"emphasis-node"},e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"emphasis"}-${r}`,tag:"component",attrs:{node:o,"custom-id":n.props.customId,"index-key":`${e.indexKey||"emphasis"}-${r}`}})}),1)},[],!1,null,"8264674d",null,null).exports,Pe=g(m.defineComponent({__name:"FootnoteAnchorNode",props:{node:null},setup(e){const t=e;return{__sfc:!0,props:t,scrollToReference:function(e){var n;if(e.preventDefault(),"undefined"==typeof document)return;const o=`fnref-${String(null!=(n=t.node.id)?n:"")}`,r=document.getElementById(o);r&&r.scrollIntoView({behavior:"smooth"})}}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("a",{staticClass:"footnote-anchor text-sm text-[#0366d6] hover:underline cursor-pointer",attrs:{href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`},on:{click:n.scrollToReference}},[e._v(" ↩︎ ")])},[],!1,null,"4756ce0d",null,null).exports,He=g(m.defineComponent({__name:"FootnoteNode",props:{node:null,indexKey:null,typewriter:{type:Boolean},customId:null},emits:["copy"],setup:e=>({__sfc:!0,props:e,NodeRenderer:Ge})}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"flex mt-2 mb-2 text-sm leading-relaxed border-t border-[#eaecef] pt-2",attrs:{id:`fnref--${e.node.id}`}},[t("div",{staticClass:"flex-1"},[t(n.NodeRenderer,{attrs:{"index-key":`footnote-${n.props.indexKey}`,nodes:n.props.node.children,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1)])},[],!1,null,null,null,null).exports,Ue=g(m.defineComponent({__name:"HardBreakNode",props:{node:null},setup:e=>({__sfc:!0})}),function(){var e=this._self._c;return this._self._setupProxy,e("br",{staticClass:"hard-break"})},[],!1,null,"50c58f70",null,null).exports,$e=g(m.defineComponent({__name:"HeadingNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=N(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({text:Ne,inline_code:W,link:Ae,image:me,strong:Se,emphasis:Re,strikethrough:Be,highlight:ze,insert:Oe,subscript:Le,superscript:Ee,emoji:M,checkbox:y,checkbox_input:y,footnote_reference:D,hardbreak:Ue,math_inline:je,reference:_e},n)}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t(`h${e.node.level}`,e._b({tag:"component",staticClass:"heading-node",class:[`heading-${e.node.level}`],attrs:{dir:"auto"}},"component",e.node.attrs,!1),e._l(e.node.children,function(o,r){return t(n.nodeComponents[o.type],{key:`${e.indexKey||"heading"}-${r}`,tag:"component",attrs:{"custom-id":n.props.customId,node:o,"index-key":`${e.indexKey||"heading"}-${r}`}})}),1)},[],!1,null,"ffb7cf51",null,null).exports,Fe=g(m.defineComponent({__name:"ListItemNode",props:{node:null,item:null,indexKey:null,value:null,customId:null,typewriter:{type:Boolean}},setup(e){const t=e,n=m.computed(()=>{var e;return null!=(e=t.node)?e:t.item}),o=m.computed(()=>null==t.value?{}:{value:t.value});return{__sfc:!0,props:t,itemNode:n,liValueAttr:o,NodeRenderer:Ge}}}),function(){var e,t,n=this,o=n._self._c,r=n._self._setupProxy;return o("li",n._b({staticClass:"list-item pl-1.5 my-2",attrs:{dir:"auto"}},"li",r.liValueAttr,!1),[o(r.NodeRenderer,{attrs:{"index-key":`list-item-${r.props.indexKey}`,nodes:null!=(t=null==(e=r.itemNode)?void 0:e.children)?t:[],"custom-id":r.props.customId,typewriter:r.props.typewriter,"batch-rendering":!1},on:{copy:function(e){return n.$emit("copy",e)}}})],1)},[],!1,null,"c165971a",null,null).exports,Ye=g(m.defineComponent({__name:"ListNode",props:{node:null,customId:null,indexKey:null,typewriter:{type:Boolean}},emits:["copy"],setup(e){const{node:t,customId:n,indexKey:o,typewriter:r}=e;return{__sfc:!0,listItemComponent:m.computed(()=>(T.value,N(n).list_item||Fe))}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t(e.node.ordered?"ol":"ul",{tag:"component",staticClass:"list-node",class:{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}},e._l(e.node.items,function(o,r){var l;return t(n.listItemComponent,{key:`${e.indexKey||"list"}-${r}`,tag:"component",attrs:{node:o,"custom-id":e.customId,"index-key":`${e.indexKey||"list"}-${r}`,typewriter:e.typewriter,value:e.node.ordered?(null!=(l=e.node.start)?l:1)+r:void 0},on:{copy:function(t){return e.$emit("copy",t)}}})}),1)},[],!1,null,"92166f4e",null,null).exports,Ve=g(m.defineComponent({__name:"HtmlBlockNode",props:{node:null,customId:null},setup(e){const t=e,n=m.computed(()=>{const e=t.node.attrs;if(e){if(Array.isArray(e)){const t={};for(const n of e){if(!n||n.length<2)continue;const[e,o]=n;null!=e&&(t[String(e)]=null==o?"":String(o))}return t}return e}}),o=m.computed(()=>N(t.customId)),r=m.defineComponent({name:"DynamicRenderer",props:{content:{type:String,required:!0},customComponents:{type:Object,required:!0}},render(){return V(this.content,this.customComponents)||[]}}),l=m.computed(()=>{const e=t.node.content;return e?Y(e,o.value)?{mode:"dynamic",content:e}:{mode:"html",content:e}:{mode:"html",content:""}}),i=m.ref(null),a=m.ref("undefined"==typeof window),s=m.ref(t.node.content),u=pe();let c=null;const d=!!t.node.loading;return"undefined"!=typeof window?(m.watch(i,e=>{var n;if(null==(n=null==c?void 0:c.destroy)||n.call(c),c=null,!d)return a.value=!0,void(s.value=t.node.content);if(!e)return void(a.value=!1);const o=u(e,{rootMargin:"400px"});c=o,a.value=o.isVisible.value,o.whenVisible.then(()=>{a.value=!0})},{immediate:!0}),m.watch(()=>t.node.content,e=>{d&&!a.value||(s.value=e)})):a.value=!0,m.onBeforeUnmount(()=>{var e;null==(e=null==c?void 0:c.destroy)||e.call(c),c=null}),{__sfc:!0,props:t,boundAttrs:n,customComponents:o,DynamicRenderer:r,renderMode:l,htmlRef:i,shouldRender:a,renderContent:s,registerVisibility:u,visibilityHandle:c,isDeferred:d}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",e._b({ref:"htmlRef",staticClass:"html-block-node"},"div",n.boundAttrs,!1),[n.shouldRender?["dynamic"===n.renderMode.mode?t(n.DynamicRenderer,{attrs:{content:n.renderMode.content,"custom-components":n.customComponents}}):t("div",{domProps:{innerHTML:e._s(n.renderContent)}})]:t("div",{staticClass:"html-block-node__placeholder"},[e._t("placeholder",function(){return[t("span",{staticClass:"html-block-node__placeholder-bar"}),t("span",{staticClass:"html-block-node__placeholder-bar w-4/5"}),t("span",{staticClass:"html-block-node__placeholder-bar w-2/3"})]},{node:e.node})],2)],2)},[],!1,null,"53b53d7c",null,null).exports,Qe=g(m.defineComponent({__name:"ParagraphNode",props:{node:null,customId:null,indexKey:null},setup(e){const t=e,n=N(t.customId);return{__sfc:!0,props:t,overrides:n,nodeComponents:s({inline_code:W,image:me,link:Ae,hardbreak:Ue,emphasis:Re,strong:Se,strikethrough:Be,highlight:ze,insert:Oe,subscript:Le,superscript:Ee,html_inline:Q,html_block:Ve,emoji:M,checkbox:y,math_inline:je,checkbox_input:y,reference:_e,footnote_anchor:Pe,footnote_reference:D},n),katexReady:Te()}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("p",{staticClass:"paragraph-node",attrs:{dir:"auto"}},[e._l(e.node.children,function(o,r){return["text"!==o.type?t(n.nodeComponents[o.type],{key:`${e.indexKey||"paragraph"}-${r}`,tag:"component",attrs:{node:o,"index-key":`${e.indexKey}-${r}`,"custom-id":n.props.customId}}):t("span",{key:`${e.indexKey||"paragraph"}-${r}`,staticClass:"whitespace-pre-wrap break-words text-node",class:[n.katexReady&&o.center?"text-node-center":""]},[e._v(" "+e._s(o.content)+" ")])]})],2)},[],!1,null,"5aa62108",null,null).exports,We=g(m.defineComponent({__name:"PreCodeNode",props:{node:null},setup(e){const t=e,n=m.computed(()=>{var e,n,o;const r=String(null!=(n=null==(e=t.node)?void 0:e.language)?n:"");return String(null!=(o=String(r).split(/\s+/g)[0])?o:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),o=m.computed(()=>`language-${n.value}`),r=m.computed(()=>{const e=n.value;return e?`Code block: ${e}`:"Code block"});return{__sfc:!0,props:t,normalizedLanguage:n,languageClass:o,ariaLabel:r}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("pre",{class:[n.languageClass],attrs:{"aria-busy":!0===e.node.loading,"aria-label":n.ariaLabel,"data-language":n.normalizedLanguage,tabindex:"0"}},[t("code",{attrs:{translate:"no"},domProps:{textContent:e._s(e.node.code)}})])},[],!1,null,null,null,null).exports,Ke=g(m.defineComponent({__name:"TableNode",props:{node:null,indexKey:null,isDark:{type:Boolean},typewriter:{type:Boolean},customId:null},emits:["copy"],setup(e){const t=e,n=m.computed(()=>{var e;return null!=(e=t.node.loading)&&e}),o=m.computed(()=>{var e;return null!=(e=t.node.rows)?e:[]});return{__sfc:!0,props:t,isLoading:n,bodyRows:o,NodeRenderer:Ge}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"table-node-wrapper"},[t("table",{staticClass:"my-8 text-sm table-node",class:{"table-node--loading":n.isLoading},attrs:{"aria-busy":n.isLoading}},[t("thead",{staticClass:"border-[var(--table-border,#cbd5e1)] border-solid"},[t("tr",{staticClass:"border-b border-solid"},e._l(e.node.header.cells,function(o,r){return t("th",{key:`header-${r}`,staticClass:"font-semibold p-[calc(4/7*1em)]",class:["right"===o.align?"text-right":"center"===o.align?"text-center":"text-left"],attrs:{dir:"auto"}},[t(n.NodeRenderer,{attrs:{nodes:o.children,"index-key":`table-th-${n.props.indexKey}`,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1)}),0)]),t("tbody",e._l(n.bodyRows,function(o,r){return t("tr",{key:`row-${r}`,staticClass:"border-[var(--table-border,#cbd5e1)] border-solid",class:[r<n.bodyRows.length-1?"border-b":""]},e._l(o.cells,function(o,l){return t("td",{key:`cell-${r}-${l}`,staticClass:"p-[calc(4/7*1em)]",class:["right"===o.align?"text-right":"center"===o.align?"text-center":"text-left"],attrs:{dir:"auto"}},[t(n.NodeRenderer,{attrs:{nodes:o.children,"index-key":`table-td-${n.props.indexKey}`,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(t){return e.$emit("copy",t)}}})],1)}),0)}),0)]),t("transition",{attrs:{name:"table-node-fade"}},[n.isLoading?t("div",{staticClass:"table-node__loading",attrs:{role:"status","aria-live":"polite"}},[e._t("loading",function(){return[t("span",{staticClass:"table-node__spinner animate-spin",attrs:{"aria-hidden":"true"}}),t("span",{staticClass:"sr-only"},[e._v("Loading")])]},{isLoading:n.isLoading})],2):e._e()])],1)},[],!1,null,"c9e613de",null,null).exports,Xe=g(m.defineComponent({__name:"ThematicBreakNode",setup:e=>({__sfc:!0})}),function(){var e=this._self._c;return this._self._setupProxy,e("hr",{staticClass:"hr-node"})},[],!1,null,"639cbad9",null,null).exports,qe=g(m.defineComponent({__name:"FallbackComponent",props:{node:null},setup:e=>({__sfc:!0})}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{staticClass:"unknown-node"},[e._v(" "+e._s(e.node.raw)+" ")])},[],!1,null,"89aff01f",null,null).exports,Ze=g(m.defineComponent({__name:"VmrContainerNode",props:{node:null,indexKey:null,isDark:{type:Boolean},typewriter:{type:Boolean},customId:null},setup(e){const t=e,n=m.computed(()=>`vmr-container vmr-container-${t.node.name}`),o=N(t.customId),r=s({text:Ne,paragraph:Qe,heading:$e,inline_code:W,link:Ae,image:me,strong:Se,emphasis:Re,strikethrough:Be,insert:Oe,subscript:Le,superscript:Ee,checkbox:y,checkbox_input:y,hardbreak:Ue,math_inline:je,reference:_e,list:Ye,math_block:Ie,table:Ke},o);return{__sfc:!0,props:t,containerClass:n,overrides:o,nodeComponents:r,getNodeComponent:function(e){return r[e]||qe}}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",e._b({class:n.containerClass},"div",e.node.attrs,!1),e._l(e.node.children,function(o,r){return t(n.getNodeComponent(o.type),{key:`${e.indexKey||"vmr-container"}-${r}`,tag:"component",attrs:{"custom-id":n.props.customId,node:o,"index-key":`${e.indexKey||"vmr-container"}-${r}`}})}),1)},[],!1,null,"3cd2aff2",null,null).exports,Ge=g(m.defineComponent({__name:"NodeRenderer",props:{content:null,nodes:null,final:{type:Boolean},parseOptions:null,customMarkdownIt:null,debugPerformance:{type:Boolean,default:!1},customHtmlTags:null,viewportPriority:{type:Boolean},codeBlockStream:{type:Boolean,default:!0},codeBlockDarkTheme:null,codeBlockLightTheme:null,codeBlockMonacoOptions:null,renderCodeBlocksAsPre:{type:Boolean},codeBlockMinWidth:null,codeBlockMaxWidth:null,codeBlockProps:null,themes:null,isDark:{type:Boolean},customId:null,indexKey:null,typewriter:{type:Boolean,default:!0},batchRendering:{type:Boolean,default:!0},initialRenderBatchSize:{default:40},renderBatchSize:{default:80},renderBatchDelay:{default:16},renderBatchBudgetMs:{default:6},renderBatchIdleTimeoutMs:{default:120},deferNodesUntilVisible:{type:Boolean,default:!0},maxLiveNodes:{default:320},liveNodeBuffer:{default:60}},emits:["copy","handleArtifactClick","click","mouseover","mouseout"],setup(e,{emit:t}){var n,o,r;const l=e,i=m.ref(),a=m.ref(!1),c=/auto|scroll|overlay/i,h="undefined"!=typeof window,v=m.computed(()=>l.debugPerformance&&h&&"undefined"!=typeof console);function g(e,t){v.value&&console.info(`[markstream-vue2][perf] ${e}`,t)}function k(e){if("undefined"==typeof window)return null;const t=null!=e?e:i.value;if(!t)return null;const n=t.ownerDocument||document,o=n.scrollingElement||n.documentElement;let r=t;for(;r&&r!==n.body&&r!==o;){const e=window.getComputedStyle(r),t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();if(c.test(t)||c.test(n))return r;r=r.parentElement}return null}const b=l.customId?`renderer-${l.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,C=p.getMarkdown(b),j=new Map,I=m.computed(()=>{const{key:e,tags:t}=L(l.customHtmlTags);if(!e)return C;const n=j.get(e);if(n)return n;const o=p.getMarkdown(b,{customHtmlTags:t});return j.set(e,o),o}),_=m.computed(()=>{const e=I.value;return l.customMarkdownIt?l.customMarkdownIt(e):e});function E(e){const t=String(null!=e?e:"").trim();if(!t)return"";const n=t.match(/^[<\s/]*([A-Z][\w-]*)/i);return n?n[1].toLowerCase():""}function L(e){if(!e||0===e.length)return{key:"",tags:[]};const t=new Set,n=[];for(const o of e){const e=E(o);e&&!t.has(e)&&(t.add(e),n.push(e))}return 0===n.length?{key:"",tags:[]}:{key:n.join(","),tags:n}}const S=m.computed(()=>{var e,t,n,o;const r=null!=(e=l.parseOptions)?e:{},i=null!=(t=l.final)?t:r.final,a=[...null!=(n=l.customHtmlTags)?n:[],...null!=(o=r.customHtmlTags)?o:[]].map(E).filter(Boolean),u=null!=i,c=a.length>0;return u||c?s(s(s({},r),u?{final:i}:{}),c?{customHtmlTags:Array.from(new Set(a))}:{}):r}),B=m.computed(()=>{var e;if(null==(e=l.nodes)?void 0:e.length)return m.markRaw(l.nodes.slice());if(l.content){const e=v.value?performance.now():0,t=p.parseMarkdownToStructure(l.content,_.value,S.value);return v.value&&g("parse(sync)",{ms:Math.round(performance.now()-e),nodes:t.length,contentLength:l.content.length}),m.markRaw(t)}return[]}),A=m.computed(()=>{var e;return Math.max(1,null!=(e=l.maxLiveNodes)?e:320)}),O=m.computed(()=>{var e;return!((null!=(e=l.maxLiveNodes)?e:0)<=0)&&B.value.length>A.value}),z=m.computed(()=>!1!==l.viewportPriority&&!a.value),R=function(e,t){const n="undefined"!=typeof window&&"undefined"!=typeof document,o="boolean"==typeof t?m.ref(t):t;let r=null,l=null;const i=new WeakMap,a=(t,a)=>{const u=m.ref(!1);let c,d=!1;const p=new Promise(e=>{c=()=>{d||(d=!0,e())}}),f=()=>{try{null==r||r.unobserve(t)}catch(e){}i.delete(t)};if(!n||!o.value)return u.value=!0,c(),{isVisible:u,whenVisible:p,destroy:f};!l&&a&&(l=s({},a));const h=function(t){var o,a,s;if(r||!n)return r;if("undefined"==typeof IntersectionObserver)return null;const u=null!=(o=null==e?void 0:e(null!=t?t:null))?o:null,c=l||{};return r=new IntersectionObserver(e=>{for(const n of e){const e=i.get(n.target);if(e&&(n.isIntersecting||n.intersectionRatio>0)){if(!e.visible.value){e.visible.value=!0;try{e.resolve()}catch(t){}}null==r||r.unobserve(n.target),i.delete(n.target)}}},{root:u,rootMargin:null!=(a=c.rootMargin)?a:"300px",threshold:null!=(s=c.threshold)?s:0}),r}(t);return h?(i.set(t,{resolve:c,visible:u}),h.observe(t),{isVisible:u,whenVisible:p,destroy:f}):(u.value=!0,c(),{isVisible:u,whenVisible:p,destroy:f})};return m.provide(de,a),a}(e=>{var t;return k(null!=(t=null!=e?e:i.value)?t:null)},z),P=h&&"function"==typeof window.requestAnimationFrame?window.requestAnimationFrame.bind(window):null,H=h&&"function"==typeof window.cancelAnimationFrame?window.cancelAnimationFrame.bind(window):null,U="undefined"!=typeof globalThis&&void 0!==globalThis.process&&"test"===(null==(o=null==(n=globalThis.process)?void 0:n.env)?void 0:o.NODE_ENV),$=h&&"function"==typeof window.requestIdleCallback,F=m.computed(()=>{var e;const t=Math.trunc(null!=(e=l.renderBatchSize)?e:80);return Number.isFinite(t)?Math.max(0,t):0}),Y=m.computed(()=>{var e;const t=Math.trunc(null!=(e=l.initialRenderBatchSize)?e:F.value);return Number.isFinite(t)?Math.max(0,t):F.value}),V=m.computed(()=>!1!==l.batchRendering&&F.value>0&&h&&!U),K=m.ref(0),X=m.ref({key:l.indexKey,total:0}),q=m.ref(Math.max(1,F.value||1)),Z=m.reactive({}),G=new Map,J=new Map,ee=new Map,te=m.ref(0),ne=m.computed(()=>(te.value,Array.from(ee.entries()).sort((e,t)=>e[0]-t[0]))),oe=m.ref(null);let re=null,le=null;const ie=m.reactive({start:0,end:0}),ae=m.computed(()=>{if(!O.value)return B.value.map((e,t)=>({node:e,index:t}));const e=B.value.length,t=tt(ie.start,0,e),n=tt(ie.end,t,e);return B.value.slice(t,n).map((e,n)=>({node:e,index:t+n}))}),se=m.computed(()=>{var e;return!1!==l.deferNodesUntilVisible&&!((null!=(e=l.maxLiveNodes)?e:0)<=0)&&!O.value&&!(B.value.length>900)&&z.value}),ue=m.computed(()=>{var e;return V.value&&(null!=(e=l.maxLiveNodes)?e:0)<=0}),ce=m.ref({batchSize:F.value,initial:Y.value,delay:null!=(r=l.renderBatchDelay)?r:16,enabled:ue.value}),pe=m.computed(()=>!!R&&(se.value||O.value)),fe=m.computed(()=>{var e;return Math.max(0,null!=(e=l.liveNodeBuffer)?e:60)}),he=m.ref(0),ve=new Map,ge=m.getCurrentInstance();function we(){var e,t,n,o;const r=null==ge?void 0:ge.proxy;if(!r||!r.$refs)return;const l=r.$refs,i=new Set;for(const a of ae.value){const r=null!=(e=l[`node-slot-${a.index}`])?e:null,s=null!=(t=l[`node-content-${a.index}`])?t:null;(null!=(n=ee.get(a.index))?n:null)!==r&&kt(a.index,r),(null!=(o=ve.get(a.index))?o:null)!==s&&Ct(a.index,s),i.add(a.index)}for(const a of Array.from(ee.keys()))i.has(a)||kt(a,null);for(const a of Array.from(ve.keys()))i.has(a)||Ct(a,null)}const ye=m.computed(()=>{if(!O.value)return B.value.length;const e=fe.value,t=Math.max(ie.end+e,Y.value),n=Math.min(B.value.length,t);return Math.max(K.value,n)});function xe(e){var t,n,o,r;const l=k(null!=(t=null!=e?e:i.value)?t:null);if(l)return l;const a=null!=(r=null!=(o=null==e?void 0:e.ownerDocument)?o:null==(n=i.value)?void 0:n.ownerDocument)?r:"undefined"!=typeof document?document:null;return(null==a?void 0:a.scrollingElement)||(null==a?void 0:a.documentElement)||null}function Me(e){if(!h)return!1;try{const t=window.getComputedStyle(e);return!!(t.display||"").toLowerCase().includes("flex")&&(t.flexDirection||"").toLowerCase().endsWith("reverse")}catch(t){return!1}}function ke(e,t,n){var o,r,l,i,a,s;if(n)return null!=(i=null!=(l=null==(o=null==t?void 0:t.documentElement)?void 0:o.scrollTop)?l:null==(r=null==t?void 0:t.body)?void 0:r.scrollTop)?i:0;const u=e.scrollTop;if(!Me(e))return u;const c=u<0?-u:u;return Math.max(0,(null!=(a=e.scrollHeight)?a:0)-(null!=(s=e.clientHeight)?s:0))-c}function be(e,t){let n=e,o=0,r=0;for(;n&&n!==t&&r++<64;)o+=n.offsetTop||0,n=n.offsetParent;return o}function Ce(){re&&(re(),re=null),oe.value=null}function Te(){if(!h||!O.value)return;const e=xe();if(!e||oe.value===e)return;Ce();const t=()=>Ge();e.addEventListener("scroll",t,{passive:!0}),oe.value=e,re=()=>{e.removeEventListener("scroll",t)}}function De(){var e,t,n;if(!le)return;const o=null!=(n=null==(t=null==(e=i.value)?void 0:e.ownerDocument)?void 0:t.defaultView)?n:"undefined"!=typeof window?window:null;le.viaTimeout?o?o.clearTimeout(le.id):clearTimeout(le.id):null==H||H(le.id),le=null}function Ge(e={}){var t,n,o;if(!O.value)return;if(!h)return void et(!0);if(e.immediate)return De(),void et(!0);if(le)return;const r=()=>{le=null,et()};if(P)le={id:P(r),viaTimeout:!1};else{const e=null!=(o=null==(n=null==(t=i.value)?void 0:t.ownerDocument)?void 0:n.defaultView)?o:"undefined"!=typeof window?window:null,l=e?e.setTimeout(r,16):setTimeout(r,16);le={id:l,viaTimeout:!0}}}function et(e=!1){var t,n,o,r,l,a,s;if(!O.value)return;const u=oe.value||xe();if(!u)return;const c=u.ownerDocument||(null==(t=i.value)?void 0:t.ownerDocument)||document,d=(null==c?void 0:c.defaultView)||("undefined"!=typeof window?window:null),p=u===(null==c?void 0:c.documentElement)||u===(null==c?void 0:c.body),m=B.value.length;if(!p&&m>0&&Me(u)){const t=u.clientHeight||0,n=u.scrollTop,o=n<0?-n:n,r=tt(wt(Math.max(0,o)+.5*Math.max(0,t)),0,Math.max(0,m-1));return void((e||Math.abs(r-he.value)>1)&&(he.value=r))}const f=p?null:u.getBoundingClientRect(),h=p?0:f.top,v=p?null!=(o=null!=(n=null==d?void 0:d.innerHeight)?n:u.clientHeight)?o:0:f.bottom,g=ne.value;let w=null,y=null;for(const[i,M]of g){if(!M)continue;const e=M.getBoundingClientRect();e.bottom<=h||e.top>=v||(null==w&&(w=i),y=i)}if(null==w||null==y){const e=i.value;if(!e)return;const t=p?{top:0}:u.getBoundingClientRect(),n=ke(u,c,p),o=p?(()=>{const n=e.getBoundingClientRect(),o=(p?0:t.top)-n.top;return Math.max(0,o)})():(()=>{const t=be(e,u);return Math.max(0,n-t)})(),m=p?null!=(s=null!=(a=null!=(l=null==d?void 0:d.innerHeight)?l:null==(r=null==c?void 0:c.documentElement)?void 0:r.clientHeight)?a:u.clientHeight)?s:0:u.clientHeight,f=gt(o+.5*Math.max(0,m));return void(he.value=tt(f,0,Math.max(0,B.value.length-1)))}const x=Math.round((w+y)/2);!e&&Math.abs(x-he.value)<=1||(he.value=tt(x,0,Math.max(0,B.value.length-1)))}function tt(e,t,n){return Math.min(Math.max(e,t),n)}function nt(){const e=B.value.length;if(!O.value||0===e)return ie.start=0,void(ie.end=e);const t=Math.min(A.value,e),n=fe.value,o=tt(he.value-n,0,Math.max(0,e-t));ie.start=o,ie.end=Math.min(e,o+t)}const ot=m.reactive({}),rt=m.reactive({total:0,count:0}),lt=m.ref(0),it=m.ref([]),at=m.ref([]);function st(e,t,n){for(let o=t+1;o<e.length;o+=o&-o)e[o]+=n}function ut(e,t){let n=0;for(let o=t+1;o>0;o-=o&-o)n+=e[o];return n}function ct(e,t,n){if(n<=t)return 0;const o=ut(e,n-1);return t<=0?o:o-ut(e,t-1)}function dt(e){lt.value=e;const t=new Array(e+1).fill(0),n=new Array(e+1).fill(0);for(const[o,r]of Object.entries(ot)){const l=Number(o),i=Number(r);!Number.isFinite(l)||l<0||l>=e||!Number.isFinite(i)||i<=0||(st(t,l,i),st(n,l,1))}it.value=t,at.value=n}function pt(e,t){if(!Number.isFinite(t)||t<=0)return;const n=ot[e];if(ot[e]=t,n?rt.total+=t-n:(rt.total+=t,rt.count++),lt.value>e){const o=it.value,r=at.value;if(o.length&&r.length)if(n){const r=t-n;0!==r&&st(o,e,r)}else st(o,e,t),st(r,e,1)}}const mt=m.computed(()=>rt.count>0?Math.max(12,rt.total/rt.count):32);function ft(e,t){var n,o;if(e>=t)return 0;if(lt.value!==B.value.length){let o=0;for(let r=e;r<t;r++)o+=null!=(n=ot[r])?n:mt.value;return o}const r=it.value,l=at.value;if(!r.length||!l.length){let n=0;for(let r=e;r<t;r++)n+=null!=(o=ot[r])?o:mt.value;return n}return ct(r,e,t)+(t-e-ct(l,e,t))*mt.value}m.watch(()=>B.value.length,e=>{if(e<=0)return lt.value=0,it.value=[],void(at.value=[]);e!==lt.value&&dt(e)},{immediate:!0});const ht=m.computed(()=>O.value?ft(0,Math.min(ie.start,B.value.length)):0),vt=m.computed(()=>{if(!O.value)return 0;const e=B.value.length;return ft(Math.min(ie.end,e),e)});function gt(e){var t;if(e<=0)return 0;const n=B.value;if(lt.value===n.length&&it.value.length&&at.value.length){const t=mt.value,o=it.value,r=at.value,l=e=>e<=0?0:ut(o,e-1)+(e-ut(r,e-1))*t;let i=0,a=n.length-1,s=n.length-1;for(;i<=a;){const t=i+a>>1;l(t+1)>=e?(s=t,a=t-1):i=t+1}return s}let o=e;for(let r=0;r<n.length;r++){const e=null!=(t=ot[r])?t:mt.value;if(o<=e)return r;o-=e}return Math.max(0,n.length-1)}function wt(e){var t;const n=B.value;if(!n.length)return 0;if(e<=0)return Math.max(0,n.length-1);if(lt.value===n.length){const t=ft(0,n.length);return gt(Math.max(0,t-e))}let o=e;for(let r=n.length-1;r>=0;r--){const e=null!=(t=ot[r])?t:mt.value;if(o<=e)return r;o-=e}return 0}function yt(e){if(!G.size)return;if(!O.value)return;let t=!1;for(const[n,o]of G)n>=e&&(o.destroy(),G.delete(n),se.value&&delete Z[n],Lt(n),ee.delete(n)&&(t=!0));t&&bt()}function xt(e,t){se.value&&(Z[e]=t),t&&(O.value?Ge():he.value=tt(e,0,Math.max(0,B.value.length-1)))}function Mt(e){const t=G.get(e);t&&(t.destroy(),G.delete(e)),Lt(e)}function kt(e,t){let n=!1;if(t){const o=ee.get(e);ee.set(e,t),o!==t&&(n=!0)}else ee.delete(e)&&(n=!0);if(n&&bt(),t||Lt(e),!pe.value||!R)return Mt(e),void(t?xt(e,!0):se.value&&delete Z[e]);if(!O.value&&se.value&&!a.value&&G.size>=640&&(Bt("too-many-targets"),!pe.value||!R))return Mt(e),void(t?xt(e,!0):se.value&&delete Z[e]);if(e<Y.value&&!O.value)return Mt(e),void xt(e,!0);if(!t)return Mt(e),void(se.value&&delete Z[e]);Mt(e);const o=R(t,{rootMargin:"400px"});o&&(G.set(e,o),xt(e,o.isVisible.value),se.value&&St(e),o.whenVisible.then(()=>{Lt(e),xt(e,!0)}).catch(()=>{}).finally(()=>{G.get(e)===o&&G.delete(e);try{o.destroy()}catch(t){}}),O.value&&Ge())}function bt(){te.value+=1}function Ct(e,t){t?(ve.set(e,t),queueMicrotask(()=>{pt(e,t.offsetHeight)})):ve.delete(e)}m.onMounted(()=>{h&&m.nextTick(we)}),m.watch(ae,()=>{h&&m.nextTick(we)}),m.watch(K,()=>{h&&m.nextTick(we)}),m.watch(O,()=>{h&&m.nextTick(we)});let Tt=null,Nt=null,jt=!1,It=null,_t=null;function Et(){h&&(null!=Tt&&(null==H||H(Tt),Tt=null),null!=Nt&&(window.clearTimeout(Nt),Nt=null),null!=_t&&"function"==typeof window.cancelIdleCallback&&(window.cancelIdleCallback(_t),_t=null),jt=!1,It=null)}function Lt(e){if(!h)return;const t=J.get(e);null!=t&&(window.clearTimeout(t),J.delete(e))}function St(e){if(!h||!se.value)return;Lt(e);const t=e%17*23,n=window.setTimeout(()=>{var t,n;if(J.delete(e),!se.value)return;if(!0===Z[e])return;const o=ee.get(e);if(!o)return void delete Z[e];const r=xe(o),l=o.ownerDocument||document,i=l.defaultView||window,a=!r||r===l.documentElement||r===l.body,s=!a&&r?r.getBoundingClientRect():null,u=a?0:s.top,c=a?null!=(n=null!=(t=i.innerHeight)?t:null==r?void 0:r.clientHeight)?n:0:s.bottom,d=o.getBoundingClientRect();d.bottom>=u-500&&d.top<=c+500&&xt(e,!0)},1800+t);J.set(e,n)}function Bt(e){var t;if(!a.value){a.value=!0,void 0!=={url:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:f&&"SCRIPT"===f.tagName.toUpperCase()&&f.src||new URL("index.cjs",document.baseURI).href}&&(null==(t={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:t.DEV)&&"undefined"!=typeof console&&console.warn("[markstream-vue2] viewportPriority auto-disabled:",e);for(const e of G.values())e.destroy();if(G.clear(),h)for(const e of J.values())window.clearTimeout(e);J.clear();for(const e of Object.keys(Z))delete Z[e]}}function At(e,t={}){var n,o;if(!ue.value)return;const r=ye.value;if(K.value>=r)return;const i=Math.max(1,e),a=e=>{var t;Tt=null,Nt=null,_t=null,jt=!1;const n=null!=It?It:i;It=null;const o=Math.max(2,null!=(t=l.renderBatchBudgetMs)?t:6),a=e=>{const t="undefined"!=typeof performance?performance.now():Date.now();K.value=Math.min(r,K.value+Math.max(1,e)),yt(K.value);const n=("undefined"!=typeof performance?performance.now():Date.now())-t;return zt(n),n};let s=n;for(;(a(s),!(K.value>=r)&&e)&&!(("function"==typeof e.timeRemaining?e.timeRemaining():0)<=.5*o);)s=Math.max(1,Math.round(q.value));K.value<r&&Ot()};if(!h||t.immediate)return void a();const s=Math.max(0,null!=(n=l.renderBatchDelay)?n:16);if(It=null!=It?Math.max(It,i):i,!jt){if(jt=!0,!U&&$&&window.requestIdleCallback){const e=Math.max(0,null!=(o=l.renderBatchIdleTimeoutMs)?o:120);return void(_t=window.requestIdleCallback(e=>{a(e)},{timeout:e}))}P&&!U?Tt=P(()=>{0!==s?Nt=window.setTimeout(()=>a(),s):a()}):Nt=window.setTimeout(()=>a(),s)}}function Ot(){ue.value&&At(V.value?Math.max(1,Math.round(q.value)):Math.max(1,F.value))}function zt(e){var t;if(!ue.value)return;const n=Math.max(2,null!=(t=l.renderBatchBudgetMs)?t:6),o=Math.max(1,F.value||1),r=Math.max(1,Math.floor(o/4));e>1.2*n?q.value=Math.max(r,Math.floor(.7*q.value)):e<.5*n&&q.value<o&&(q.value=Math.min(o,Math.ceil(1.2*q.value)))}function Rt(){return d(this,null,function*(){var e;try{const t=yield Promise.resolve().then(()=>require("./index3.js"));return null!=(e=t.default)?e:t}catch(t){return console.warn('[markstream-vue2] Optional peer dependencies for CodeBlockNode are missing. Falling back to inline-code rendering (no Monaco). To enable full code block features, please install "stream-monaco".',t),We}})}function Pt(){return d(this,null,function*(){var e;try{const t=yield Promise.resolve().then(()=>require("./index4.js"));return null!=(e=t.default)?e:t}catch(t){return console.warn('[markstream-vue2] Optional peer dependencies for MermaidBlockNode are missing. Falling back to preformatted code rendering. To enable Mermaid rendering, please install "mermaid".',t),We}})}function Ht(){return d(this,null,function*(){var e;try{const t=yield Promise.resolve().then(()=>require("./index5.js"));return null!=(e=t.default)?e:t}catch(t){return console.warn("[markstream-vue2] Optional peer dependencies for InfographicBlockNode are missing. Falling back to preformatted code rendering.",t),We}})}function Ut(){return d(this,null,function*(){var e;try{const t=yield Promise.resolve().then(()=>Dt);return null!=(e=t.default)?e:t}catch(t){return console.warn('[markstream-vue2] Optional peer dependencies for D2BlockNode are missing. Falling back to preformatted code rendering. To enable D2 rendering, please install "@terrastruct/d2".',t),We}})}m.watch([()=>B.value,()=>B.value.length,()=>ue.value,()=>F.value,()=>Y.value,()=>l.renderBatchDelay,()=>l.indexKey],()=>{var e;const t=B.value.length,n=X.value,o=l.indexKey,r=void 0!==o&&o!==n.key,i=t!==n.total,a=r||i;X.value={key:o,total:t};const s=ce.value,u=null!=(e=l.renderBatchDelay)?e:16,c=s.batchSize!==F.value||s.initial!==Y.value||s.delay!==u||s.enabled!==ue.value;ce.value={batchSize:F.value,initial:Y.value,delay:u,enabled:ue.value},(a||c||!ue.value)&&Et(),(a||c)&&(q.value=Math.max(1,F.value||1)),a&&O.value&&Ge({immediate:!0});const d=ye.value;if(!t)return K.value=0,void yt(0);if(!ue.value)return K.value=d,void yt(K.value);const p=r||0===n.total;K.value=p||c?Math.min(d,Y.value):Math.min(K.value,d);const m=Math.max(1,Y.value||F.value||t);K.value<d?At(m,{immediate:!h}):yt(K.value)},{immediate:!0}),m.watch(()=>O.value,e=>{if(!e)return Ce(),void De();Te(),Ge({immediate:!0})},{immediate:!0}),m.watch([()=>B.value.length,()=>O.value],e=>d(this,[e],function*([e,t]){t&&e&&h&&(yield m.nextTick(),Ge({immediate:!0}))}),{flush:"post"}),m.watch(()=>i.value,()=>{O.value&&(Te(),Ge({immediate:!0}))}),m.watch(()=>B.value.length,()=>{O.value&&Ge({immediate:!0})}),m.watch(()=>se.value,e=>{if(e)for(const[t,n]of ee)kt(t,n);else{for(const e of G.values())e.destroy();G.clear();for(const e of Array.from(J.keys()))Lt(e);for(const e of Object.keys(Z))delete Z[e];for(const[e,t]of ee)t&&xt(e,!0)}},{immediate:!1}),m.watch([()=>l.viewportPriority,()=>B.value.length],([e,t])=>{!1!==e?a.value&&t<=200&&(a.value=!1):a.value=!1}),m.watch(()=>K.value,()=>{O.value&&Ge({immediate:!0})}),m.watch([he,A,fe,()=>B.value.length,O],()=>{nt()},{immediate:!0}),m.watch([()=>B.value.length,O,A,fe,()=>ie.start,()=>ie.end],([e,t,n,o,r,l])=>{v.value&&g("virtualization",{nodes:e,virtualization:t,maxLiveNodes:n,buffer:o,focusIndex:he.value,scroll:t?(()=>{const e=oe.value||xe();return e?{reverse:Me(e),scrollTop:Math.round(e.scrollTop),scrollTopAbs:Math.round(Math.abs(e.scrollTop)),scrollHeight:Math.round(e.scrollHeight),clientHeight:Math.round(e.clientHeight)}:null})():null,liveRange:{start:r,end:l},rendered:K.value})}),m.watch(()=>ye.value,(e,t)=>{ue.value&&("number"==typeof t&&e<=t||e>K.value&&Ot())}),m.onBeforeUnmount(()=>{Et();for(const e of G.values())e.destroy();G.clear();for(const e of Array.from(J.keys()))Lt(e);Ce(),De()});const $t=m.computed(()=>l.renderCodeBlocksAsPre?We:Rt),Ft={text:Ne,paragraph:Qe,heading:$e,code_block:Rt,list:Ye,list_item:Fe,blockquote:w,table:Ke,definition_list:x,footnote:He,footnote_reference:D,footnote_anchor:Pe,admonition:Je,vmr_container:Ze,hardbreak:Ue,link:Ae,image:me,thematic_break:Xe,math_inline:je,math_block:Ie,strong:Se,emphasis:Re,strikethrough:Be,highlight:ze,insert:Oe,subscript:Le,superscript:Ee,emoji:M,checkbox:y,checkbox_input:y,inline_code:W,html_inline:Q,reference:_e,html_block:Ve},Yt=m.computed(()=>(T.value,N(l.customId))),Vt=m.computed(()=>null!=l.indexKey?String(l.indexKey):"markdown-renderer"),Qt={},Wt=m.computed(()=>s({stream:l.codeBlockStream,darkTheme:l.codeBlockDarkTheme,lightTheme:l.codeBlockLightTheme,monacoOptions:l.codeBlockMonacoOptions,themes:l.themes,minWidth:l.codeBlockMinWidth,maxWidth:l.codeBlockMaxWidth},l.codeBlockProps||{})),Kt=m.computed(()=>({typewriter:l.typewriter})),Xt=m.computed(()=>ae.value.map(e=>{const t=qt(e.node);return u(s({},e),{component:Zt(e.node,t),bindings:Gt(e.node,t),isCodeBlock:"code_block"===e.node.type,indexKey:`${Vt.value}-${e.index}`})}));function qt(e){var t;return"code_block"===(null==e?void 0:e.type)?String(null!=(t=e.language)?t:"").trim().toLowerCase():""}function Zt(e,t){if(!e)return qe;const n=Yt.value,o=n[String(e.type)];if("code_block"===e.type){const r=null!=t?t:qt(e);if("mermaid"===r)return n.mermaid||Pt;if("infographic"===r)return n.infographic||Ht;if("d2"===r||"d2lang"===r)return n.d2||Ut;if(o)return o;return n.code_block||$t.value}return o||Ft[String(e.type)]||qe}function Gt(e,t){const n=null!=t?t:qt(e);return"mermaid"===n||"infographic"===n||"d2"===n||"d2lang"===n?Qt:"code_block"===e.type?Wt.value:Kt.value}return{__sfc:!0,props:l,emit:t,MAX_DEFERRED_NODE_COUNT:900,MAX_VIEWPORT_OBSERVER_TARGETS:640,VIEWPORT_PRIORITY_RECOVERY_COUNT:200,containerRef:i,viewportPriorityAutoDisabled:a,SCROLL_PARENT_OVERFLOW_RE:c,isClient:h,debugPerformanceEnabled:v,logPerf:g,resolveViewportRoot:k,instanceMsgId:b,defaultMd:C,customTagCache:j,mdBase:I,mdInstance:_,normalizeCustomTag:E,resolveCustomHtmlTags:L,mergedParseOptions:S,parsedNodes:B,maxLiveNodesResolved:A,virtualizationEnabled:O,viewportPriorityEnabled:z,registerNodeVisibility:R,requestFrame:P,cancelFrame:H,isTestEnv:U,hasIdleCallback:$,resolvedBatchSize:F,resolvedInitialBatch:Y,batchingEnabled:V,renderedCount:K,previousRenderContext:X,adaptiveBatchSize:q,nodeVisibilityState:Z,nodeVisibilityHandles:G,nodeVisibilityFallbackTimers:J,nodeSlotElements:ee,nodeSlotVersion:te,sortedNodeSlots:ne,scrollRootElement:oe,detachScrollHandler:re,pendingFocusSync:le,liveRange:ie,visibleNodes:ae,deferNodes:se,incrementalRenderingActive:ue,previousBatchConfig:ce,shouldObserveSlots:pe,liveNodeBufferResolved:fe,focusIndex:he,nodeContentElements:ve,instance:ge,syncNodeRefs:we,desiredRenderedCount:ye,resolveScrollContainer:xe,isReverseFlexScrollRoot:Me,getNormalizedScrollTop:ke,getOffsetTopWithinRoot:be,cleanupScrollListener:Ce,setupScrollListener:Te,cancelScheduledFocusSync:De,scheduleFocusSync:Ge,syncFocusToScroll:et,clamp:tt,updateLiveRange:nt,nodeHeights:ot,heightStats:rt,heightTreeSize:lt,heightSumTree:it,heightKnownTree:at,fenwickUpdate:st,fenwickQuery:ut,fenwickRangeSum:ct,rebuildHeightTrees:dt,recordNodeHeight:pt,averageNodeHeight:mt,estimateHeightRange:ft,topSpacerHeight:ht,bottomSpacerHeight:vt,estimateIndexForOffset:gt,estimateIndexForOffsetFromEnd:wt,cleanupNodeVisibility:yt,markNodeVisible:xt,shouldRenderNode:function(e){return!(ue.value&&e>=K.value)&&(!se.value||e<Y.value||!0===Z[e])},destroyNodeHandle:Mt,setNodeSlotElement:kt,bumpNodeSlotVersion:bt,setNodeContentRef:Ct,batchRaf:Tt,batchTimeout:Nt,batchPending:jt,pendingIncrement:It,batchIdle:_t,VIEWPORT_FALLBACK_DELAY:1800,VIEWPORT_FALLBACK_MARGIN_PX:500,cancelBatchTimers:Et,clearVisibilityFallback:Lt,scheduleVisibilityFallback:St,autoDisableViewportPriority:Bt,scheduleBatch:At,queueNextBatch:Ot,adjustAdaptiveBatchSize:zt,CodeBlockNodeAsync:Rt,MermaidBlockNodeAsync:Pt,InfographicBlockNodeAsync:Ht,D2BlockNodeAsync:Ut,codeBlockComponent:$t,nodeComponents:Ft,customComponentsMap:Yt,indexPrefix:Vt,emptyBindings:Qt,codeBlockBindings:Wt,nonCodeBindings:Kt,renderedItems:Xt,getCodeBlockLanguage:qt,getNodeComponent:Zt,getBindingsFor:Gt,handleContainerClick:function(e){t("click",e)},handleContainerMouseover:function(e){var n;(null==(n=e.target)?void 0:n.closest("[data-node-index]"))&&t("mouseover",e)},handleContainerMouseout:function(e){var n;(null==(n=e.target)?void 0:n.closest("[data-node-index]"))&&t("mouseout",e)}}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{ref:"containerRef",staticClass:"markstream-vue2 markdown-renderer",class:[{dark:n.props.isDark},{virtualized:n.virtualizationEnabled}],attrs:{"data-custom-id":n.props.customId},on:{click:n.handleContainerClick,mouseover:n.handleContainerMouseover,mouseout:n.handleContainerMouseout}},[n.virtualizationEnabled?t("div",{staticClass:"node-spacer",style:{height:`${n.topSpacerHeight}px`},attrs:{"aria-hidden":"true"}}):e._e(),e._l(n.renderedItems,function(o){var r;return t("div",{key:o.index,ref:`node-slot-${o.index}`,refInFor:!0,staticClass:"node-slot",attrs:{"data-node-index":o.index,"data-node-type":o.node.type}},[n.shouldRenderNode(o.index)?t("div",{ref:`node-content-${o.index}`,refInFor:!0,staticClass:"node-content"},[o.isCodeBlock||!1===n.props.typewriter?t(o.component,e._b({tag:"component",attrs:{node:o.node,loading:o.node.loading,"index-key":o.indexKey,"custom-id":n.props.customId,"is-dark":n.props.isDark},on:{copy:function(e){return n.emit("copy",e)},"handle-artifact-click":function(e){return n.emit("handleArtifactClick",e)}}},"component",o.bindings,!1)):t("transition",{attrs:{name:"typewriter",appear:""}},[t(o.component,e._b({tag:"component",attrs:{node:o.node,loading:o.node.loading,"index-key":o.indexKey,"custom-id":n.props.customId,"is-dark":n.props.isDark},on:{copy:function(e){return n.emit("copy",e)},"handle-artifact-click":function(e){return n.emit("handleArtifactClick",e)}}},"component",o.bindings,!1))],1)],1):t("div",{staticClass:"node-placeholder",style:{height:`${null!=(r=n.nodeHeights[o.index])?r:n.averageNodeHeight}px`}})])}),n.virtualizationEnabled?t("div",{staticClass:"node-spacer",style:{height:`${n.bottomSpacerHeight}px`},attrs:{"aria-hidden":"true"}}):e._e()],2)},[],!1,null,"cbc9ba24",null,null).exports,Je=g(m.defineComponent({__name:"AdmonitionNode",props:{node:null,indexKey:null,isDark:{type:Boolean},typewriter:{type:Boolean},customId:null},emits:["copy"],setup(e,{emit:t}){var n;const o=e,r=m.computed(()=>{if(o.node.title&&o.node.title.trim().length)return o.node.title;const e=o.node.kind||"note";return e.charAt(0).toUpperCase()+e.slice(1)}),l=m.ref(!!o.node.collapsible&&!(null==(n=o.node.open)||n)),i=`admonition-${Math.random().toString(36).slice(2,9)}`;return{__sfc:!0,props:o,emit:t,iconMap:{note:"ℹ️",info:"ℹ️",tip:"💡",warning:"⚠️",danger:"❗",error:"⛔",caution:"⚠️"},displayTitle:r,collapsed:l,toggleCollapse:function(){o.node.collapsible&&(l.value=!l.value)},headerId:i,NodeRenderer:Ge}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"admonition",class:[`admonition-${n.props.node.kind}`,n.props.isDark?"is-dark":""]},[t("div",{staticClass:"admonition-header",attrs:{id:n.headerId}},[n.iconMap[n.props.node.kind]?t("span",{staticClass:"admonition-icon"},[e._v(e._s(n.iconMap[n.props.node.kind]))]):e._e(),t("span",{staticClass:"admonition-title"},[e._v(e._s(n.displayTitle))]),n.props.node.collapsible?t("button",{staticClass:"admonition-toggle",attrs:{"aria-expanded":!n.collapsed,"aria-controls":`${n.headerId}-content`,title:n.collapsed?"Expand":"Collapse"},on:{click:n.toggleCollapse}},[n.collapsed?t("span",[e._v("▶")]):t("span",[e._v("▼")])]):e._e()]),t("div",{directives:[{name:"show",rawName:"v-show",value:!n.collapsed,expression:"!collapsed"}],staticClass:"admonition-content",attrs:{id:`${n.headerId}-content`,"aria-labelledby":n.headerId}},[t(n.NodeRenderer,{attrs:{"index-key":`admonition-${e.indexKey}`,nodes:n.props.node.children,"custom-id":n.props.customId,typewriter:n.props.typewriter},on:{copy:function(e){return n.emit("copy",e)}}})],1)])},[],!1,null,"aa22ad80",null,null).exports;let et=!1,tt=null,nt=!1;function ot(){return d(this,null,function*(){var e;if(tt)return tt;if(nt)return null;try{const t=yield Promise.resolve().then(()=>require("./index.legacy.js"));return tt=null!=(e=null==t?void 0:t.default)?e:t,yield function(e){return d(this,null,function*(){if(et)return;et=!0;const t=null==globalThis?void 0:globalThis.MonacoEnvironment;return!t||"function"!=typeof t.getWorker&&"function"!=typeof t.getWorkerUrl?e.preloadMonacoWorkers():void 0})}(tt),(yield function(e){return d(this,null,function*(){const t=null==e?void 0:e.getOrCreateHighlighter;if("function"!=typeof t)return!0;try{const e=yield t(["vitesse-dark","vitesse-light"],["plaintext","text","javascript"]);return e&&"function"==typeof e.codeToTokens&&e.codeToTokens("const a = 1",{lang:"javascript",theme:"vitesse-dark"}),!0}catch(n){return console.warn("[markstream-vue2] Failed to warm up Shiki tokenizer; disabling stream-monaco for this session.",n),!1}})}(tt))?tt:(tt=null,nt=!0,null)}catch(t){return nt=!0,null}})}let rt=null;function lt(e){rt=null!=e?e:null}const it={"":"",javascript:"javascript",js:"javascript",mjs:"javascript",cjs:"javascript",typescript:"typescript",ts:"typescript",jsx:"jsx",tsx:"tsx",golang:"go",py:"python",rb:"ruby",sh:"shell",bash:"shell",zsh:"shell",shellscript:"shell",bat:"shell",batch:"shell",ps1:"powershell",plaintext:"plain",text:"plain","c++":"cpp","c#":"csharp","objective-c":"objectivec","objective-c++":"objectivecpp",yml:"yaml",md:"markdown",rs:"rust",kt:"kotlin"};function at(e){var t;const n=function(e){if(!e)return"";const t=e.trim();if(!t)return"";const[n]=t.split(/\s+/),[o]=n.split(":");return o.toLowerCase()}(e);return null!=(t=it[n])?t:n}function st(e){const t=at(e);if(!t)return"plaintext";switch(t){case"plain":return"plaintext";case"jsx":return"javascript";case"tsx":return"typescript";default:return t}}function ut(e){if(rt){const t=rt(e);if(null!=t&&""!==t)return t}switch(at(e)){case"javascript":case"js":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#e5c890" stroke-linecap="round" stroke-linejoin="round">\n <path d="M4.5 11c0 .828427.6715729 1.5 1.5 1.5.8284271 0 1.5-.671573 1.5-1.5V7.5M12.5 8.75C12.5 8.05964406 11.9627417 7.5 11.3 7.5L10.7 7.5C10.0372583 7.5 9.5 8.05964406 9.5 8.75 9.5 9.44035594 10.0372583 10 10.7 10L11.3 10C11.9627417 10 12.5 10.5596441 12.5 11.25 12.5 11.9403559 11.9627417 12.5 11.3 12.5L10.7 12.5C10.0372583 12.5 9.5 11.9403559 9.5 11.25" />\n <path d="m 4,1.5 h 8 c 1.385,0 2.5,1.115 2.5,2.5 v 8 c 0,1.385 -1.115,2.5 -2.5,2.5 H 4 C 2.615,14.5 1.5,13.385 1.5,12 V 4 C 1.5,2.615 2.615,1.5 4,1.5 Z" />\n </g>\n</svg>\n';case"typescript":case"ts":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round">\n <path d="M4 1.5h8A2.5 2.5 0 0114.5 4v8a2.5 2.5 0 01-2.5 2.5H4A2.5 2.5 0 011.5 12V4A2.5 2.5 0 014 1.5" />\n <path d="M12.5 8.75c0-.69-.54-1.25-1.2-1.25h-.6c-.66 0-1.2.56-1.2 1.25S10.04 10 10.7 10h.6c.66 0 1.2.56 1.2 1.25s-.54 1.25-1.2 1.25h-.6c-.66 0-1.2-.56-1.2-1.25m-3-3.75v5M5 7.5h3" />\n </g>\n</svg>\n';case"jsx":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#99d1db" stroke-linecap="round" stroke-linejoin="round">\n <path d="M8 10.8c4.14 0 7.5-1.25 7.5-2.8S12.14 5.2 8 5.2.5 6.45.5 8s3.36 2.8 7.5 2.8" />\n <path d="M5.52 9.4c2.07 3.5 4.86 5.72 6.23 4.95 1.37-.78.8-4.24-1.27-7.75C8.41 3.1 5.62.88 4.25 1.65c-1.37.78-.8 4.24 1.27 7.75" />\n <path d="M5.52 6.6c-2.07 3.5-2.64 6.97-1.27 7.75 1.37.77 4.16-1.45 6.23-4.95s2.64-6.97 1.27-7.75C10.38.88 7.59 3.1 5.52 6.6" />\n <path d="M8.5 8a.5.5 0 01-.5.5.5.5 0 01-.5-.5.5.5 0 01.5-.5.5.5 0 01.5.5" />\n </g>\n</svg>\n';case"tsx":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round">\n <path d="M8 11.3c4.14 0 7.5-1.28 7.5-2.86S12.14 5.58 8 5.58.5 6.86.5 8.44s3.36 2.87 7.5 2.87Z" />\n <path d="M5.52 9.87c2.07 3.6 4.86 5.86 6.23 5.07 1.37-.8.8-4.34-1.27-7.93S5.62 1.16 4.25 1.95s-.8 4.34 1.27 7.92" />\n <path d="M5.52 7.01c-2.07 3.59-2.64 7.14-1.27 7.93s4.16-1.48 6.23-5.07c2.07-3.58 2.64-7.13 1.27-7.92-1.37-.8-4.16 1.47-6.23 5.06" />\n <path d="M8.5 8.44a.5.5 0 01-.5.5.5.5 0 01-.5-.5.5.5 0 01.5-.5.5.5 0 01.5.5" />\n </g>\n</svg>\n';case"html":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#ef9f76" d="M1.5 1.5h13L13 13l-5 2-5-2z" />\n <path stroke="#c6d0f5" d="M11 4.5H5l.25 3h5.5l-.25 3-2.5 1-2.5-1-.08-1" />\n </g>\n</svg>\n';case"css":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round">\n <path d="m4 1.5h8c1.38 0 2.5 1.12 2.5 2.5v8c0 1.38-1.12 2.5-2.5 2.5h-8c-1.38 0-2.5-1.12-2.5-2.5v-8c0-1.38 1.12-2.5 2.5-2.5z" />\n <path stroke-width=".814" d="m 10.240861,11.529149 c 0,0.58011 0.437448,1.039154 0.96002,1.035371 l 0.451635,-0.0032 c 0.522572,-0.0036 0.949379,-0.451477 0.949379,-1.032848 0,-0.581372 -0.426807,-1.065638 -0.949379,-1.065638 l -0.451635,3.4e-5 c -0.522572,3.9e-5 -0.949379,-0.4855273 -0.949379,-1.0656374 0,-0.5801104 0.426807,-1.0378931 0.949379,-1.0378931 l 0.451635,2.825e-4 c 0.522572,3.267e-4 0.951743,0.4577827 0.951743,1.0378931 M 6.8003972,11.529149 c 0,0.58011 0.4374474,1.039154 0.9600196,1.035371 l 0.46464,-0.0032 c 0.5225722,-0.0035 0.9363738,-0.451477 0.9363738,-1.031587 0,-0.580111 -0.4090724,-1.065638 -0.9316446,-1.065638 l -0.4693692,3.4e-5 c -0.5225722,3.8e-5 -0.949379,-0.4855272 -0.949379,-1.0656373 0,-0.5801104 0.4268068,-1.0378931 0.949379,-1.0378931 h 0.4516348 c 0.5225722,0 0.9635665,0.4577827 0.9635665,1.0378931 M 3.4072246,11.529149 c 0,0.58011 0.4374474,1.051765 0.9600196,1.051765 H 4.818879 c 0.5225722,0 0.949379,-0.456521 0.949379,-1.037893 m 0.01129,-2.1312747 c 0,-0.5801103 -0.4374474,-1.037893 -0.9600196,-1.037893 L 4.3678939,8.3741358 C 3.8453217,8.3744624 3.4078743,8.8420074 3.4078743,9.4233788 v 2.1186642" />\n </g>\n</svg>\n';case"scss":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#f4b8e4" stroke-linecap="round" stroke-linejoin="round" d="M6.75 6.38c1.85 1.07 3.35.74 4.83-.2 1.5-.95 2.7-2.78 1.3-4.15-.7-.68-3.25-.8-5.62.19-2.36.99-4.59 3.02-4.74 4.11-.31 2.19 3.15 2.88 3.64 4.23s.28 1.98-.2 2.83c-.5.85-1.96 1.62-2.8.68-.83-.95 1.67-2.75 2.98-3.25 1.3-.5 3.1-.4 3.69.25.58.64-.07 1.79-.03 1.79" />\n</svg>\n';case"json":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e5c890" stroke-linecap="round" stroke-linejoin="round" d="M4.5 2.5H4c-.75 0-1.5.75-1.5 1.5v2c0 1.1-1 2-1.83 2 .83 0 1.83.9 1.83 2v2c0 .75.75 1.5 1.5 1.5h.5m7-11h.5c.75 0 1.5.75 1.5 1.5v2c0 1.1 1 2 1.83 2-.83 0-1.83.9-1.83 2v2c0 .74-.75 1.5-1.5 1.5h-.5m-6.5-3a.5.5 0 100-1 .5.5 0 000 1m3 0a.5.5 0 100-1 .5.5 0 000 1m3 0a.5.5 0 100-1 .5.5 0 000 1" />\n</svg>\n';case"python":case"py":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#8caaee" d="M8.5 5.5h-3m6 0V3c0-.8-.7-1.5-1.5-1.5H7c-.8 0-1.5.7-1.5 1.5v2.5H3c-.8 0-1.5.7-1.5 1.5v2c0 .8.7 1.5 1.48 1.5" />\n <path stroke="#e5c890" d="M10.5 10.5h-3m-3 0V13c0 .8.7 1.5 1.5 1.5h3c.8 0 1.5-.7 1.5-1.5v-2.5H13c.8 0 1.5-.7 1.5-1.5V7c0-.8-.7-1.5-1.48-1.5H11.5c0 1.5 0 2-1 2h-2" />\n <path stroke="#8caaee" d="M2.98 10.5H4.5c0-1.5 0-2 1-2h2M7.5 3.5v0" />\n <path stroke="#e5c890" d="m 8.5,12.5 v 0" />\n </g>\n</svg>\n';case"ruby":case"rb":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e78284" stroke-linecap="round" stroke-linejoin="round" d="M1.5 9.06v2.5c.02.86.36 1.61.9 2.15 1.76 1.76 5.71.65 8.84-2.47 3.12-3.13 4.23-7.08 2.47-8.84a3.1 3.1 0 00-2.15-.9h-2.5M14.5 4l-.25 10.25L4 14.5m4.39-6.11c2.34-2.35 3.29-5.2 2.12-6.37S6.49 1.8 4.14 4.14C1.8 6.5.85 9.34 2.02 10.51s4.02.22 6.37-2.12M5.5 14.5l.25-3.75L11 11l-.25-5.25 3.75-.25" />\n</svg>\n';case"go":case"golang":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#85c1dc" stroke-linecap="round" stroke-linejoin="round" d="m15.48 8.06-4.85.48m4.85-.48a4.98 4.98 0 01-4.54 5.42 5 5 0 112.95-8.66l-1.7 1.84a2.5 2.5 0 00-4.18 2.06c.05.57.3 1.1.69 1.51.25.27 1 .83 1.78.82.8-.02 1.58-.25 2.07-.81 0 0 .8-.96.68-1.88M2.5 8.5l-2 .01m1.5 2h1.5m-2-3.99 2-.02" />\n</svg>\n';case"r":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#838ba7" d="M13.5 9.5c.63-.7 1-1.54 1-2.43 0-2.52-2.91-4.57-6.5-4.57S1.5 4.55 1.5 7.07c0 1.9 1.65 3.53 4 4.22" />\n <path stroke="#8caaee" d="M10.5 9.5c.4 0 .86.34 1 .7l1 3.3m-5 0v-8h3.05c.95 0 1.95 1 1.95 2s-1 2-1.95 2H7.5Z" />\n </g>\n</svg>\n';case"java":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#c6d0f5" d="M10.73 8.41c.57 3 1.59 5.83 2.77 7.09-6.63-3.45-9.76-1.75-10.5 0-.66-3.4-.54-5.74.09-7.78" />\n <path stroke="#e78284" d="M8.5 7c.63.34 1.82 1.07 2.24 1.41-.54-2.9-.64-5.96-.74-7.91-2.13.58-5.73 1.98-6.9 7.22.52-.69 1.72-1.05 2.4-1.22" />\n <path stroke="#e78284" d="M5.5 7A1.5 1.5 0 007 8.5 1.5 1.5 0 008.5 7 1.5 1.5 0 007 5.5 1.5 1.5 0 005.5 7" />\n </g>\n</svg>\n';case"kotlin":case"kt":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#ca9ee6" d="M2.5 13.5h11L8 8" />\n <path stroke="#ef9f76" d="M8.03 2.5h5.47l-8 8" />\n <path stroke="#e78284" d="M2.5 13.5V8" />\n <path stroke="#85c1dc" d="M8 2.5H2.5V8l3-2.5" />\n </g>\n</svg>\n';case"c":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="m 4.0559072,12.951629 c 2.7459832,2.734744 7.1981158,2.734744 9.9441188,0 l -1.789955,-1.782586 c -1.75742,1.750224 -4.6067879,1.750224 -6.3642294,0 -1.7574416,-1.7502236 -1.7574416,-4.587893 0,-6.338097 1.7574415,-1.750224 4.6068094,-1.750224 6.3642294,0 l 0.894977,-0.8912929 0.894978,-0.891293 c -2.746003,-2.73472867 -7.1981359,-2.73472867 -9.944119,0 -2.7459858,2.7347089 -2.7459858,7.1685599 2e-7,9.9032689 z" clip-rule="evenodd" />\n</svg>\n';case"cpp":case"c++":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="m 2.5559121,12.951629 c 2.7459832,2.734744 7.1981158,2.734744 9.9441189,0 l -1.789955,-1.782586 c -1.7574201,1.750224 -4.606788,1.750224 -6.3642295,0 -1.7574416,-1.7502236 -1.7574416,-4.587893 0,-6.338097 1.7574415,-1.750224 4.6068094,-1.750224 6.3642295,0 l 0.894977,-0.8912929 0.894978,-0.891293 c -2.7460031,-2.73472867 -7.198136,-2.73472867 -9.9441191,0 -2.74598585,2.7347089 -2.74598585,7.1685599 2e-7,9.9032689 z" clip-rule="evenodd" />\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="M7.5 6v4M5.513524 7.9999996H9.51304M13.486476 5.9999996v4M11.5 7.9999992h3.999516" />\n</svg>\n';case"cs":case"csharp":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" d="m 6.665625,1.0107144 c 0.54375,0.090628 0.9125,0.6062693 0.821875,1.1500367 L 7.18125,3.9983098 h 2.971875 L 10.5125,1.8326156 c 0.09063,-0.5437673 0.60625,-0.9125291 1.15,-0.8219012 0.54375,0.090628 0.9125,0.6062693 0.821875,1.1500367 L 12.18125,3.9983098 H 14 c 0.553125,0 1,0.4468892 1,1.0000319 0,0.5531426 -0.446875,1.0000319 -1,1.0000319 H 11.846875 L 11.18125,9.9985013 H 13 c 0.553125,0 1,0.4468897 1,1.0000317 0,0.553143 -0.446875,1.000032 -1,1.000032 H 10.846875 L 10.4875,14.164259 c -0.09063,0.543768 -0.60625,0.912529 -1.15,0.821902 -0.54375,-0.09063 -0.9125,-0.60627 -0.821875,-1.150037 l 0.30625,-1.834434 h -2.975 L 5.4875,14.167384 c -0.090625,0.543768 -0.60625,0.91253 -1.15,0.821902 C 3.79375,14.898658 3.425,14.383016 3.515625,13.839249 L 3.81875,11.998565 H 2 c -0.553125,0 -1,-0.446889 -1,-1.000032 C 1,10.445391 1.446875,9.9985013 2,9.9985013 H 4.153125 L 4.81875,5.9983736 H 3 c -0.553125,0 -1,-0.4468893 -1,-1.0000319 C 2,4.445199 2.446875,3.9983098 3,3.9983098 H 5.153125 L 5.5125,1.8326156 C 5.603125,1.2888483 6.11875,0.9200865 6.6625,1.0107144 Z M 6.846875,5.9983736 6.18125,9.9985013 H 9.153125 L 9.81875,5.9983736 Z" />\n</svg>\n';case"php":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="M0.5,12.5 L0.5,13.24 C0.5,14 1.27360724,14.5 2,14.5 C2.9375516,14.5 3.5,14 3.5,13.2445661 L3.5,6.00089968 C3.5,4.28551107 4.99401107,2.52263547 7.14960413,2.5 C9.49387886,2.5 11,4.0579782 11,5.5 C11.1657296,8.48962302 9.57820404,9.63684469 7.49621582,10.5 L7.49621582,14.5 L15.4979764,14.5 L15.4979764,9 C15.5394484,8.36478228 14.9387379,7.15595371 14.1308258,6.5 C13.1942239,5.80827275 12.0584852,5.50253264 11,5.5 M11.5,14.5 L11.5,11.5 M6,6.5 C6.27614237,6.5 6.5,6.27614237 6.5,6 C6.5,5.72385763 6.27614237,5.5 6,5.5 C5.72385763,5.5 5.5,5.72385763 5.5,6 C5.5,6.27614237 5.72385763,6.5 6,6.5 Z" />\n</svg>\n';case"scala":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e78284" stroke-linecap="round" stroke-linejoin="round" d="m2.5 2.48 11-.98v3.04l-11 1zm0 5 11-.98v3.04l-11 1zm0 5 11-.98v3.04l-11 1z" />\n</svg>\n';case"shell":case"sh":case"bash":case"zsh":case"powershell":case"ps1":case"bat":case"batch":case"shellscript":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round">\n <path d="M2 15.5c-.7 0-1.5-.8-1.5-1.5V5c0-.7.8-1.5 1.5-1.5h9c.7 0 1.5.8 1.5 1.5v9c0 .7-.8 1.5-1.5 1.5z" />\n <path d="m1.2 3.8 3.04-2.5S5.17.5 5.7.5h8.4c.66 0 1.4.73 1.4 1.4v7.73a2.7 2.7 0 01-.7 1.75l-2.68 3.51M3 8.5l3 2-3 2m4 0h2" />\n </g>\n</svg>\n';case"sql":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e5c890" stroke-linecap="round" stroke-linejoin="round" d="M8 6.5c3.59 0 6.5-1.4 6.5-2.68S11.59 1.5 8 1.5 1.5 2.54 1.5 3.82 4.41 6.5 8 6.5M14.5 8c0 .83-1.24 1.79-3.25 2.2s-4.49.41-6.5 0S1.5 8.83 1.5 8m13 4.18c0 .83-1.24 1.6-3.25 2-2.01.42-4.49.42-6.5 0-2.01-.4-3.25-1.17-3.25-2m0-8.3v8.3m13-8.3v8.3" />\n</svg>\n';case"yaml":case"yml":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e78284" stroke-linecap="round" stroke-linejoin="round" d="M2.5 1.5h3l3 4 3-4h3l-9 13h-3L7 8z" />\n</svg>\n';case"markdown":case"md":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#85c1dc" stroke-linecap="round" stroke-linejoin="round" d="m9.25 8.25 2.25 2.25 2.25-2.25M3.5 11V5.5l2.04 3 1.96-3V11m4-.5V5M1.65 2.5h12.7c.59 0 1.15.49 1.15 1v9c0 .51-.56 1-1.15 1H1.65c-.59 0-1.15-.49-1.15-1V3.58c0-.5.56-1.08 1.15-1.08" />\n</svg>\n';case"xml":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round" d="M4.5 4.5 1 8 4.5 11.5M11.5 4.5 15 8 11.5 11.5M9.5 2 6.5 14" />\n</svg>\n';case"rust":case"rs":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round">\n <path d="M15.5 9.5Q8 13.505.5 9.5l1-1-1-2 2-.5V4.5h2l.5-2 1.5 1 1.5-2 1.5 2 1.5-1 .5 2h2V6l2 .5-1 2z" />\n <path d="M6.5 7.5a1 1 0 01-1 1 1 1 0 01-1-1 1 1 0 011-1 1 1 0 011 1m5 0a1 1 0 01-1 1 1 1 0 01-1-1 1 1 0 011-1 1 1 0 011 1M4 11.02c-.67.37-1.5.98-1.5 2.23s1.22 1.22 2 1.25v-2M12 11c.67.37 1.5 1 1.5 2.25s-1.22 1.22-2 1.25v-2" />\n </g>\n</svg>\n';case"swift":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round" d="M14.34 10.2c.34-1.08 1.1-5.07-4.45-8.62a.48.48 0 00-.6.07.44.44 0 00-.02.6c.03.02 2.07 2.5 1.34 5.34-1.26-.86-6.24-4.81-6.24-4.81L7.25 7.5 1.9 4.05S5.68 8.7 8 10.45c-1.12.4-3.56.82-6.78-1.18a.48.48 0 00-.58.06.44.44 0 00-.08.56c.11.18 2.7 4.36 8.14 4.36 1.5 0 2.37-.42 3.08-.77.43-.2.77-.37 1.14-.37.93 0 1.54.92 1.54.93.1.14.27.22.44.21a.46.46 0 00.4-.28c.67-1.55-.49-3.2-.96-3.78h0Z" />\n</svg>\n';case"perl":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="M12.5 14.5v-3.34c-1-.66-1-1.35-1-2.66m-3 1 .02 2.53.98 2.47m-4-5v5m9 0V9.23s.17-1.73-1-1.73c0-1.5-.5-6-2.5-6S8.75 4.25 8.75 4.25A3.67 3.67 0 006.5 7.12v-3.5c0-.63-.85-1.32-1.5-1.32-.92 0-1.33.59-1.5 1.2H2.25c-.42.11-.75.59-.75 1 0 .5.28 1 .75 1h1.22l.02 3c.01.75.51 1 1.51 1h4.5" />\n</svg>\n';case"lua":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#c6d0f5" d="M10.5 7A1.5 1.5 0 019 8.5 1.5 1.5 0 017.5 7 1.5 1.5 0 019 5.5 1.5 1.5 0 0110.5 7" />\n <path stroke="#8caaee" d="M7 2.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13m7-2a1.5 1.5 0 100 3 1.5 1.5 0 000-3" />\n </g>\n</svg>\n';case"haskell":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="M12.5 4.5h3m-1.5 3h1.5m-10 6 2.5-5-2.5-5H8l5.6 10h-2.53l-1.52-2.92L8 13.5zm-5 0 2.5-5-2.5-5H3l2.5 5-2.5 5z" />\n</svg>\n';case"erlang":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#e78284" stroke-linecap="round" stroke-linejoin="round">\n <path d="M6.5 5.5c0-1.25 1-2 2-2s2 .75 2 2z" />\n <path d="M13.5 13c.47-.57 1.12-1.24 1.5-2l-2.25-1.25c-.74 1.36-1.76 2.75-3.25 2.75-2.1 0-3-2.3-3-5h8c.05-1.61-.31-3.45-1-4.5M3 13c-1.08-1.3-1.5-3-1.5-5S2.1 4.24 3 3" />\n </g>\n</svg>\n';case"clojure":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#a6d189" d="M14.17 10.03A6.5 6.5 0 011.81 6.02" />\n <path stroke="#8caaee" d="M1.87 5.85A6.5 6.5 0 0114.22 9.9" />\n <path stroke="#a6d189" d="M6.36 4.9a3.5 3.5 0 103.41 6.12" />\n <path stroke="#8caaee" d="M9.77 11.02a3.5 3.5 0 00-3.03-6.29" />\n <path stroke="#c6d0f5" d="M8 7.5s-1.66 2.48-1.5 3.65" />\n <path stroke="#c6d0f5" d="M1.81 6.02C2.47 5 3.83 4.49 5 4.46c4.06 0 3 5.56 5.03 6.86 1.21.52 3.5-.21 4.15-1.32" />\n </g>\n</svg>\n';case"vue":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#a6d189" stroke-linecap="round" stroke-linejoin="round">\n <path d="M1 1.5h5.44L8 4.56 9.56 1.5H15l-6.99 13z" />\n <path d="M12.05 1.73 8 9.28 3.95 1.73" />\n </g>\n</svg>\n';case"svg":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round" d="m4.54 10 6.92-4m-6.92 4a1.5 1.5 0 10-2.6 1.5 1.5 1.5 0 002.6-1.5M8 4v8m0-8a1.5 1.5 0 100-3 1.5 1.5 0 000 3M4.54 6l6.92 4M4.54 6a1.5 1.5 0 10-2.6-1.5A1.5 1.5 0 004.54 6M8 12a1.5 1.5 0 100 3 1.5 1.5 0 000-3m3.46-2a1.5 1.5 0 102.6 1.5 1.5 1.5 0 00-2.6-1.5m0-4a1.5 1.5 0 102.6-1.5 1.5 1.5 0 00-2.6 1.5" />\n</svg>\n';case"mermaid":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="M1.5 2.5c0 6 2.25 5.75 4 7 .83.67 1.17 2 1 4h3c-.17-2 .17-3.33 1-4 1.75-1.25 4-1 4-7C12 2.5 10 3 8 7 6 3 4 2.5 1.5 2.5" />\n</svg>\n';case"dart":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#85c1dc" stroke-linecap="round" stroke-linejoin="round">\n <path d="M7 14.5h4.5v-3h3V7L9.17 1.64c-.28-.29-.8-.47-1.17-.29L3.5 3.5 1.35 8c-.18.37 0 .88.3 1.17z" />\n <path d="M3.5 11V3.5H11m-7.5 0 8 8" />\n </g>\n</svg>\n';case"assembly":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <rect width="8" height="13.001" x="4" y="1.499" fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round" rx="2.286" ry="2.286" />\n <path fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round" d="M 4,4.500025 H 1.5 M 4,7.9999993 H 1.5 M 4,11.499973 H 1.5 m 13,-6.999948 H 12 m 2.5,3.4999743 H 12 m 2.5,3.4999737 H 12" />\n</svg>\n';case"dockerfile":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="M.5 8.5H11l.75-.5a5.35 5.35 0 010-3.5c1 .6 1 1.88 1.74 2 .77-.09 1.23.01 2 .52 0 0-.97 1.77-2.5 1.98-1.93 3.65-4.5 5.5-6.98 5.5C0 14.5.5 8.5.5 8.5m1 0v-2m0 0h8m-6 2v-4m0 0h4m-2-2h2m-2 6v-6m2 6v-6m2 6v-2" />\n</svg>\n';case"fortran":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="M7.5 14.5v-1l-1-1v-3h2l1 2h1v-6h-1l-1 2h-2v-4h5l1 3h1v-5h-11v1l1 1v9l-1 1.25v.75z" />\n</svg>\n';case"lisp":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#e78284" stroke-linecap="round" stroke-linejoin="round">\n <path d="M.5 5.06v6.07C.5 12.41.82 13 2.27 13h5.6c1.04 0 1.63-.51 1.63-1.62 0-.85-.2-1.88-1.5-1.88h-.36C6.4 9.5 6 8.77 6 7.75 6 6.81 6.8 6 7.49 6h2.68" />\n <path d="M3.5 10.5V4.99C3.5 3.89 3.62 3 5 3h9c.97 0 1.5.99 1.5 1.63.12 1.55-.98 1.62-2.1 2.16-.58.26-1.4.52-1.4.98V11" />\n </g>\n</svg>\n';case"ocaml":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round">\n <path d="M1.5 8V3c0-.83.67-1.5 1.5-1.5h10c.83 0 1.5.67 1.5 1.5v10c0 .83-.67 1.5-1.5 1.5H9" />\n <path d="m1.5 8 1.14-2.3q.09-.21.36-.24a.8.8 0 01.44.13c.18.12.23.53.28.64.06.1.64 1.23.85 1.23.2 0 .71-1.47.71-1.47s.37-.49.72-.49.55.32.67.49c.12.16.24 1.76.46 2.01s1.32.87 1.67.73c.34-.13.53-.4.63-.73.1-.34-.14-.75 0-1a1.1 1.1 0 011.02-.55c.56.03 2.05.56 2.05 1.05q0 .75-1.5.75c-.48 1.33.28 2.22-3 2.25l1 4" />\n <path d="m4.5 14.5 1.5-4 1 4zm-2 0 1.5-4-1.5-.5-1 1.54V14l1 .49Z" />\n </g>\n</svg>\n';case"prolog":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ef9f76" stroke-linecap="round" stroke-linejoin="round" d="M4.5 13.5c-.33.33-.5.67-.5 1s.17.67.5 1c.17-.67.5-1 1-1s.83.33 1 1c.33-.33.5-.83.5-1.5h2c0 .67.17 1.17.5 1.5.17-.67.5-1 1-1s.83.33 1 1c.33-.33.5-.67.5-1s-.17-.67-.5-1l1-1 1.25 1.25c0-2.75 1-2.75 1-5.75a7.1 7.1 0 00-2-5.25A3.64 3.64 0 0113 .5c-1.17 0-2 .42-2.5 1.25A3.08 3.08 0 008 .5c-1 0-1.83.42-2.5 1.25C5 .92 4.17.5 3 .5c.5.83.58 1.58.25 2.25a7.1 7.1 0 00-2 5.25c0 3 1 3 1 5.75L3.5 12.5zm6-5a2 2 0 100-4 2 2 0 000 4m-5 0a2 2 0 100-4 2 2 0 000 4M7 8l1 2.5L9 8m1.5-1.5" />\n</svg>\n';case"groovy":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#85c1dc" stroke-linecap="round" stroke-linejoin="round">\n <path d="M11.68 5.38c.4.19.54.68 1.53 3.25 1 2.57-.92 4.07-.92 4.07s-6.73 2.47-6.73 1.63c-.18-.92-1.92-2.08-1.92-2.08s-.52-.63.06-.75c5.89-1.27 6.96-.61 7.3-2" />\n <path d="M7.38 10.63C2.62 10.88 2.48 8.08 2.5 8 3.6 4.6 9.24.91 10.8 1.58 14.07 3.04 9.2 8.96 7 8.5c-4.02-.83 1.5-4 1.5-4" />\n </g>\n</svg>\n';case"matlab":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#85c1dc" d="M4 11 .5 8.5 5 7q.78-1.77 1.89-1.89c.74-.07 1.94-1.28 3.61-3.61M5 7l1.5 1.5" />\n <path stroke="#ef9f76" d="m15.5 12.5-5-11C8.5 6.83 6.33 10 4 11c1.67-.33 2.67.83 3 3.5 3.5-1.5 3.5-3.5 5-4s1.5 1.5 3.5 2" />\n </g>\n</svg>\n';case"cobol":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#8caaee" stroke-linecap="round" stroke-linejoin="round" d="M6.74 2.24c.32-1.32 2.2-1.32 2.52 0a1.3 1.3 0 001.93.8c1.15-.7 2.48.62 1.77 1.77a1.3 1.3 0 00.8 1.93c1.32.32 1.32 2.2 0 2.52a1.3 1.3 0 00-.8 1.93c.7 1.15-.62 2.48-1.77 1.77a1.3 1.3 0 00-1.93.8c-.32 1.32-2.2 1.32-2.52 0a1.3 1.3 0 00-1.93-.8c-1.15.7-2.48-.62-1.77-1.77a1.3 1.3 0 00-.8-1.93c-1.32-.32-1.32-2.2 0-2.52a1.3 1.3 0 00.8-1.93c-.7-1.15.62-2.48 1.77-1.77a1.3 1.3 0 001.93-.8M10 6.5a2.5 2.5 0 100 3" />\n</svg>\n';case"ada":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">\x3c!-- Icon from VSCode Icons by Roberto Huertas - https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE --\x3e<path fill="#0f23c3" d="M24.554 20.075c.209.27 1.356.961 1.37 1.246a7 7 0 0 0-1.4-.324a17 17 0 0 1-1.412-.48a9.2 9.2 0 0 1-2.375-1.3A3.15 3.15 0 0 1 19.3 16.75a1.72 1.72 0 0 1 1.767-1.822a3.6 3.6 0 0 1 1.593.321c.146.066 1.31.606 1.256.809a5.5 5.5 0 0 0-1.41-.112c-.649.244-.4.828-.168 1.311a8 8 0 0 0 1.078 1.554c.164.194.884 1.271 1.138 1.264"/><path fill="#1a1978" d="M24.141 16.276c.128-.59.819-1.384 1.344-.773a4.2 4.2 0 0 1 .578 1.918c.12.656.2 1.327.261 1.982c.038.379.34 1.794.123 2.075a23 23 0 0 1-2.922-2.838a3.76 3.76 0 0 1-.925-1.7c-.1-1.073.879-.73 1.541-.664"/><path fill="#0f23c3" d="M26.3 17.781c.141-.732-.406-2.592-1.067-2.949a.06.06 0 0 0 .044-.007c-.156-.444-1.359 1.116-1.228 1.174c-.316-.138.774-1.984.988-2.16c.7-.578 1.372-.086 1.845.543a6.04 6.04 0 0 1 .733 4.434a4.5 4.5 0 0 1-.421 1.312c-.1.22-.45 1.1-.682 1.174a14.8 14.8 0 0 0-.212-3.521"/><path fill="#d2d2d2" d="M3.687 8.4c.179-.188-.041-1.527.324-1.548c.262-.015.553 1.741.627 1.968a9.2 9.2 0 0 0 1.127 2.329a7.53 7.53 0 0 0 4.016 2.978a4.55 4.55 0 0 0 2.366.2c.931-.208 1.82-.577 2.757-.765c1.35-.27 3.342-.352 4.438.647c.7.641.376.76.043 1.421a2.44 2.44 0 0 0 .178 2.562c.235.342 1.033.827.675 1.094c-.567.424-1.277-.452-1.636-.776c-1.4-1.264-2.711-1.313-4.492-1.074a9 9 0 0 1-4.883-.708A9.47 9.47 0 0 1 3.687 8.4M19.941 30a3.6 3.6 0 0 1-2.325-.817c.469-.092 1.021.025 1.508-.044a9.7 9.7 0 0 0 1.754-.43a10.5 10.5 0 0 0 3.022-1.554a6.55 6.55 0 0 0 2.757-5.214c.149-.088.316 1.034.319 1.091a5.8 5.8 0 0 1-.19 1.727a6.9 6.9 0 0 1-1.423 2.774A7.3 7.3 0 0 1 19.941 30"/><path fill="#d2d2d2" d="M18.962 19.109a5.8 5.8 0 0 1-2.05.859a13.4 13.4 0 0 1-2.224.549a8.86 8.86 0 0 1-4.435-.51a9.94 9.94 0 0 1-3.849-2.4c-.352-.367-2.104-2.417-1.548-3.05c.248-.282.875.846 1 .992a5 5 0 0 0 1.357 1.11a10.9 10.9 0 0 0 4.035 1.456a6.7 6.7 0 0 0 2.34-.094a13 13 0 0 1 1.694-.485a4 4 0 0 1 2.113.457c.344.17 1.523.743 1.567 1.116m9.351-4.031a19.3 19.3 0 0 1-.453 3.774c-.176-.242.016-1.47 0-1.792a6 6 0 0 0-.384-2.087a4.9 4.9 0 0 0-1.376-1.661a15 15 0 0 1-1.27-1.536c-1.837-2.382-3.245-5.211-2.9-8.3c.034-.308.069-1.448.411-1.445c.152 0 .266 1.561.29 1.718a12.5 12.5 0 0 0 1.224 4.116c.67 1.222 1.947 2.023 2.825 3.1a6.58 6.58 0 0 1 1.633 4.113M15.7 26.935a10.85 10.85 0 0 0 6.436-.687a6.94 6.94 0 0 0 4.278-4.418c.319.2-.048 1.529-.128 1.781a5.7 5.7 0 0 1-1.01 1.813a8.9 8.9 0 0 1-3.257 2.514c-1.703.772-5.662 1.652-6.319-1.003"/><path fill="#d2d2d2" d="M19.151 19.376c.367 2.107-2.957 3.124-4.478 3.213c-1.859.11-4.929-.292-6.06-2.031c-.673-1.035.781-.09 1.188.058a8.7 8.7 0 0 0 3.06.5a11.6 11.6 0 0 0 3.305-.5a14 14 0 0 0 1.533-.576c.301-.132 1.124-.691 1.452-.664m4.991 4.084c.4-.945-1.883-1.578-2.445-1.858a4.9 4.9 0 0 1-1.315-.867c-.181-.181-.872-.92-.807-1.219a5 5 0 0 1 1.087-.175a6 6 0 0 1 .855.588a10 10 0 0 0 .964.5a16 16 0 0 0 2.119.771c.308.09 1.549.208 1.727.428c-.04.296-1.97 2.021-2.185 1.832"/><path fill="#d2d2d2" d="M26.1 22.172c.265.43-1.08 1.831-1.363 2.105a9.3 9.3 0 0 1-2.566 1.728a7.8 7.8 0 0 1-2.56.753c-.679.058-1.966-.124-2.141-.979a7 7 0 0 1 1.177-.086c.462-.059.921-.149 1.376-.246a13 13 0 0 0 2.184-.645a11.5 11.5 0 0 0 2.084-1.11a11 11 0 0 0 1.078-.822c.105-.089.617-.702.731-.698m-7.342-10.207c-.1-1.308 2.612-1.3 3.271-1.092a5.98 5.98 0 0 1 2.982 2.475c-1.082.8-2.449.094-3.3-.654a4.3 4.3 0 0 0-1.481-1.029c-.809-.265-.818.094-1.472.3"/><path fill="#d2d2d2" d="M25.783 13.341c-.444-.029-.316.071-.647-.212c-.358-.307-.614-.795-.945-1.141c-.534-.558-1.242-.895-1.723-1.485a7.27 7.27 0 0 1-1.624-4.848c.018-1.489.407.187.551.675a12.3 12.3 0 0 0 1.126 2.708a46 46 0 0 0 3.4 4.321c-.039.002-.097-.021-.138-.018m-5.715 1.415c.033-.625-.911-.792-1.211-1.42c-.164-.343-.211-.569.029-.7c.082-.045.383.012.5-.02c.271-.076.335-.273.581-.4a1.193 1.193 0 0 1 1.633 1.021a1.82 1.82 0 0 1-1.532 1.519"/><path fill="#d2d2d2" d="M20.5 14.745a1.93 1.93 0 0 0 1.323-1.7c.524.139.928.658 1.521.771a2.6 2.6 0 0 0 1.029-.017c.207-.045.54-.274.721-.259c-.033.163-.464.546-.565.717a4.2 4.2 0 0 0-.388.9c-.229.741-.061.739-.709.311a4.3 4.3 0 0 0-1.957-.72c-.266-.026-.881.019-.975-.003m-.595 5.989a2.01 2.01 0 0 1-1.4 1.712c-.205.091-2.018.733-2.032.348c-.007-.2 1.624-.954 1.809-1.11a3.4 3.4 0 0 0 .867-1.071c.055-.112.232-.925.271-.943c.224-.106.488.93.485 1.064m-8.532-8.202a10.6 10.6 0 0 1 3.71-.914a10.3 10.3 0 0 1 1.865.024c.366.039 1.469.054 1.74.343a.255.255 0 0 1-.273.173c-.037.077.251.371.3.425c-.034.034-1.445-.4-1.572-.424a10.6 10.6 0 0 0-2.282-.134a16 16 0 0 0-1.841.194a6.2 6.2 0 0 1-1.647.313m11.139-1.801a1.89 1.89 0 0 1-1.517-.6c-.247-.349-.737-1.692-.385-2.021c.209-.2.384.662.484.846a11 11 0 0 0 1.418 1.775m5.276 8.469a19 19 0 0 1-.749 3.313c-.173-.077-.275-.778-.562-.95a4.1 4.1 0 0 0 .76-1.154c.152-.302.303-1.046.551-1.209m-7.807-7.357c-.132.268-.932 1.1-1.118.481c-.107-.356.876-.841 1.118-.481m-.747.45c.228.006.012-.248.012-.266c-.001-.043-.368.266-.012.266"/></svg>';case"julia":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="#a6d189" d="M10.5 5a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0" />\n <path stroke="#e78284" d="M6.5 11a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0" />\n <path stroke="#ca9ee6" d="M14.5 11a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0" />\n </g>\n</svg>\n';case"elixir":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="M8.03 14.5C5 14.5 3.5 12.49 3.5 10.01c0-2.82 2.25-7.02 4.62-8.48a.24.24 0 01.24 0c.08.04.12.12.11.2-.13 1.25.22 2.5.98 3.54.3.43.63.8 1.02 1.27.54.66.94 1.03 1.52 2.08l.01.02c.33.56.5 1.2.5 1.84 0 2.03-1.69 4.02-4.47 4.02" />\n</svg>\n';case"vb.net":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">\x3c!-- Icon from VSCode Icons by Roberto Huertas - https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE --\x3e<path fill="#00519a" d="M6.67 7.836L9 18.915l2.336-11.079H16l-4.664 16.328H6.672L2 7.836Zm11.661 0h7.6a4.08 4.08 0 0 1 2.9 1.749a3.8 3.8 0 0 1 .571 2.04a4 4 0 0 1-.571 2.034a4.1 4.1 0 0 1-2.341 1.763a4.1 4.1 0 0 1 2.929 1.756a3.8 3.8 0 0 1 .58 2.1a4.66 4.66 0 0 1-.579 2.546a5.05 5.05 0 0 1-3.5 2.338h-7.589ZM23 14.252h1.166a1.754 1.754 0 0 0 0-3.5H23Zm0 7h1.39a2.047 2.047 0 0 0 0-4.089H23Z"/></svg>';case"nim":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#e5c890" stroke-linecap="round" stroke-linejoin="round" d="M1 7 .5 4.5l1.01.67c.28-.27.47-.48 1.18-.85l.56-1.82L4.5 3.84c.77-.18 1.53-.36 2.4-.33L8 1.5l1.1 2.01c.87-.03 1.63.15 2.4.33l1.25-1.34.56 1.82c.7.37.9.58 1.18.85l1.01-.67L15 7m-1.5 1C13 6.5 11 5.5 8 5.5S3 6.5 2.5 8m11.5.75L13.5 8l-1 1.5-1.5.5-3-1.5L5 10l-1.5-.5-1-1.5-.5.75L1 7l1.25 3.75C3 12.75 6 13.5 8 13.5s5-.75 5.75-2.75L15 7z" />\n</svg>\n';case"crystal":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round" d="m 15.4712,10.050637 -5.433601,5.433968 c -0.015,0.01505 -0.04554,0.01505 -0.09055,0.01505 L 2.536327,13.517264 c -0.015,0 -0.04501,-0.01505 -0.06055,-0.06072 L 0.50026325,6.0396501 a 0.21432208,0.21495127 0 0 1 0.015,-0.090817 L 5.9483283,0.5154023 c 0.015,-0.0150465 0.04501,-0.0150465 0.09055,-0.0150465 l 7.4101857,1.997972 c 0.015,0 0.04501,0.015046 0.06055,0.060724 l 1.977121,7.4158186 c 0.03001,0.03063 0.01608,0.060724 -0.01554,0.07577 M 8.2121063,4.1480782 0.93801425,6.1154197 q -0.0225,0 0,0.04514 L 6.2655263,11.50371 c 0.015,0.01505 0.015,0 0.04501,0 l 1.962119,-7.2803988 c -0.03054,-0.075233 -0.06055,-0.075233 -0.06055,-0.075233" />\n</svg>\n';case"d":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">\x3c!-- Icon from VSCode Icons by Roberto Huertas - https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE --\x3e<defs><linearGradient id="SVGMV3iTbAN" x1="185.455" x2="181.955" y1="1601.641" y2="1630.224" gradientTransform="translate(-62.523 -666.646)scale(.427)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#fff" stop-opacity="0"/></linearGradient><linearGradient id="SVGniw2Mvsa" x1="176.136" x2="172.636" y1="1600.5" y2="1629.083" href="#SVGMV3iTbAN"/></defs><path fill="#b03931" d="m3.978 15.462l-.009-6.953a.59.59 0 0 1 .531-.562h.076l6.074-.009a15.7 15.7 0 0 1 6.067.95a8.9 8.9 0 0 1 2.244 1.359a4.47 4.47 0 0 1 2.946-1.083a4.11 4.11 0 0 1 4.276 3.92A4.11 4.11 0 0 1 21.907 17c-.089 0-.177-.008-.265-.012a7 7 0 0 1-.232.953a85 85 0 0 1 8.59 2.6V2H2v13.4q.992.02 1.978.062m22.8-7.944a1.32 1.32 0 0 1 1.374 1.259a1.379 1.379 0 0 1-2.747 0a1.32 1.32 0 0 1 1.375-1.26Z"/><path fill="#b03931" d="M17.861 15.787a4.11 4.11 0 0 0-1.748-3.458a5.8 5.8 0 0 0-1.508-.822a7.4 7.4 0 0 0-1.629-.438a22 22 0 0 0-2.588-.1H7.769l.006 4.737a89 89 0 0 1 9.91 1.408a5 5 0 0 0 .176-1.327m3.132 3.192a7.9 7.9 0 0 1-2.128 2.582a9.7 9.7 0 0 1-3.256 1.71a11.6 11.6 0 0 1-1.971.472h-.015a32 32 0 0 1-3.326.111l-5.625.022a.616.616 0 0 1-.686-.681l-.01-7.734Q2.992 15.42 2 15.4V30h28v-9.456a85 85 0 0 0-8.59-2.6a7 7 0 0 1-.417 1.035"/><path fill="url(#SVGMV3iTbAN)" d="M20.993 18.979a7.9 7.9 0 0 1-2.128 2.582a9.7 9.7 0 0 1-3.256 1.71a11.6 11.6 0 0 1-1.971.472h-.015a32 32 0 0 1-3.326.111l-5.625.022a.616.616 0 0 1-.686-.681l-.01-7.734Q2.992 15.42 2 15.4V30h28v-9.456a85 85 0 0 0-8.59-2.6a7 7 0 0 1-.417 1.035" opacity=".3"/><path fill="#b03931" d="M10.477 20.835a16 16 0 0 0 2.877-.2a7.6 7.6 0 0 0 1.628-.5a5.6 5.6 0 0 0 1.187-.748a4.46 4.46 0 0 0 1.518-2.271a89 89 0 0 0-9.91-1.408l.006 5.133Z"/><path fill="url(#SVGniw2Mvsa)" d="M10.477 20.835a16 16 0 0 0 2.877-.2a7.6 7.6 0 0 0 1.628-.5a5.6 5.6 0 0 0 1.187-.748a4.46 4.46 0 0 0 1.518-2.271a89 89 0 0 0-9.91-1.408l.006 5.133Z" opacity=".3"/><path fill="#fff" d="M20.383 11.746a7 7 0 0 1 1.36 4.148a6.6 6.6 0 0 1-.1 1.1c.088 0 .176.012.265.012a4.11 4.11 0 0 0 4.276-3.92a4.11 4.11 0 0 0-4.276-3.92a4.47 4.47 0 0 0-2.946 1.083a8 8 0 0 1 1.421 1.497"/><ellipse cx="26.78" cy="8.777" fill="#fff" rx="1.374" ry="1.259"/><path fill="#fff" d="m4.673 23.877l5.625-.022a32 32 0 0 0 3.326-.111h.015a11.5 11.5 0 0 0 1.971-.472a9.7 9.7 0 0 0 3.256-1.71a7.9 7.9 0 0 0 2.128-2.582a7 7 0 0 0 .417-1.034a7 7 0 0 0 .332-2.051a7 7 0 0 0-1.36-4.148a8 8 0 0 0-1.421-1.5a8.9 8.9 0 0 0-2.244-1.359a15.7 15.7 0 0 0-6.067-.95l-6.074.009h-.076a.59.59 0 0 0-.532.562l.009 6.952l.01 7.734a.616.616 0 0 0 .685.682m3.1-12.908h2.619a22 22 0 0 1 2.588.1a7.4 7.4 0 0 1 1.629.438a5.8 5.8 0 0 1 1.508.822a4.12 4.12 0 0 1 1.748 3.458a5 5 0 0 1-.175 1.327a4.46 4.46 0 0 1-1.518 2.271a5.6 5.6 0 0 1-1.187.748a7.7 7.7 0 0 1-1.628.5a16 16 0 0 1-2.877.2H7.786L7.78 15.7Z"/></svg>';case"applescript":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round" d="M14.4561802 11.3673353C13.0276218 14.1261537 11.8858593 15.5 10.8437759 15.5 10.3588459 15.5 9.88231005 15.3491298 9.41749082 15.0543006 8.74000639 14.6241577 7.8668418 14.6059458 7.17068967 15.0074382 6.60881451 15.3319356 6.07177167 15.5 5.56305868 15.5 4.02887542 15.5 1.5 10.9491129 1.5 8.45090396 1.5 5.78581061 2.95006811 3.551507 5.15647301 3.551507 6.19383481 3.551507 7.09007204 4.20001691 7.84308619 4.497206 8.16210316 4.62512517 8.52255587 4.61592787 8.83410596 4.47192 9.44477141 4.18872223 10.2497236 3.551507 11.2503615 3.551507 12.4715175 3.551507 13.5338865 4.33779342 14.4184071 5.47479877 14.5532906 5.64778615 14.5172013 5.89341518 14.3377895 6.02349446 13.3500923 6.736546 12.8746057 7.53893969 12.8746057 8.45090396 12.8746057 9.36404821 13.3502672 10.1652619 14.3377895 10.8793249 14.4946576 10.992887 14.5445377 11.1984946 14.4561802 11.3673353ZM8.5 3C8.5 3 8.3468635 1.3936039 10 1" />\n</svg>\n';case"solidity":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="m3 11.5 2.5 4 2.5-4 2.5 4 2.5-4-2.5-4-2.5 4m2.5 4h-5m7.5-4H3m10-7-2.5-4-2.5 4-2.5-4-2.5 4 2.5 4 2.5-4M5.5.5h5M3 4.5h10" />\n</svg>\n';case"objectivec":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">\x3c!-- Icon from VSCode Icons by Roberto Huertas - https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE --\x3e<path fill="#c2c2c2" d="M11.29 15.976a8.9 8.9 0 0 0 1.039 4.557a4.82 4.82 0 0 0 5.579 2.13a3.79 3.79 0 0 0 2.734-3.181c.095-.535.1-.54.1-.54c1.537.222 4.014.582 5.55.8l-.1.389A9.96 9.96 0 0 1 23.8 24.9a8.35 8.35 0 0 1-4.747 2.378a12.93 12.93 0 0 1-7.322-.725a8.98 8.98 0 0 1-5.106-5.524A14.35 14.35 0 0 1 6.642 10.9a9.32 9.32 0 0 1 7.929-6.24a11.8 11.8 0 0 1 5.9.491a8.47 8.47 0 0 1 5.456 6.1c.083.311.1.369.1.369c-1.709.311-3.821.705-5.518 1.075c-.323-1.695-1.122-3.029-2.831-3.445a4.656 4.656 0 0 0-5.853 3.158a9 9 0 0 0-.341 1.273a11 11 0 0 0-.194 2.295"/><path fill="#c2c2c2" d="M2.033 30V2h5.934v2.227H4.723v23.546h3.244V30zm27.934-.001h-5.934v-2.228h3.244V4.226h-3.244V1.999h5.934z"/></svg>';case"objectivecpp":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">\x3c!-- Icon from VSCode Icons by Roberto Huertas - https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE --\x3e<path fill="#c2c2c2" d="M19.5 24.833a11.24 11.24 0 0 1-5.13 1.009a8.37 8.37 0 0 1-6.492-2.576A9.75 9.75 0 0 1 5.512 16.4a10.4 10.4 0 0 1 2.659-7.406a9.02 9.02 0 0 1 6.9-2.841a12.2 12.2 0 0 1 4.43.7v4.129a7.5 7.5 0 0 0-4.108-1.142a5.28 5.28 0 0 0-4.075 1.685A6.48 6.48 0 0 0 9.766 16.1a6.37 6.37 0 0 0 1.464 4.4a5.02 5.02 0 0 0 3.941 1.639a8.03 8.03 0 0 0 4.329-1.223Z"/><path fill="#c2c2c2" d="M16.572 15.081V13.24h1.841v1.841h1.84v1.84h-1.84v1.841h-1.841v-1.841h-1.839V15.08zm6.44 0V13.24h1.841v1.841h1.84v1.84h-1.84v1.841h-1.841v-1.841h-1.839V15.08zM2.035 30V2.001h5.933v2.227H4.725v23.545h3.243V30z"/><path fill="#c2c2c2" d="M29.965 29.999h-5.933v-2.228h3.243V4.227h-3.243V2h5.933z"/></svg>';case"terraform":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <path fill="none" stroke="#ca9ee6" stroke-linecap="round" stroke-linejoin="round" d="m1.5 6 8 4.25 4-2.25m-12-2V1.5l8 4.25 4-2.25V8m-4-2.25v8.75M5.53 3.82 5.5 12.5l4 2" />\n</svg>\n';case"plain":case"text":case"":return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">\n <g fill="none" stroke="#c6d0f5" stroke-linecap="round" stroke-linejoin="round">\n <path d="M13.5 6.5v6a2 2 0 01-2 2h-7a2 2 0 01-2-2v-9c0-1.1.9-2 2-2h4.01" />\n <path d="m8.5 1.5 5 5h-4a1 1 0 01-1-1zm-3 10h5m-5-3h5m-5-3h1" />\n </g>\n</svg>\n';default:return'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">\x3c!-- Icon from Lucide by Lucide Contributors - https://github.com/lucide-icons/lucide/blob/main/LICENSE --\x3e<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m10 9l-3 3l3 3m4 0l3-3l-3-3"/><rect width="18" height="18" x="3" y="3" rx="2"/></g></svg>'}}const ct={js:"JavaScript",javascript:"JavaScript",ts:"TypeScript",jsx:"JSX",tsx:"TSX",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",py:"Python",python:"Python",rb:"Ruby",go:"Go",java:"Java",c:"C",cpp:"C++",cs:"C#",php:"PHP",sh:"Shell",bash:"Bash",sql:"SQL",yaml:"YAML",md:"Markdown",d2:"D2",d2lang:"D2","":"Plain Text",plain:"Plain Text"};function dt(e){try{if("undefined"!=typeof globalThis&&"function"==typeof globalThis.requestAnimationFrame)return globalThis.requestAnimationFrame(e)}catch(t){}return globalThis.setTimeout(e,0)}const pt=g(m.defineComponent({__name:"Portal",props:{to:null},setup(e){const t=e,n=m.ref(null);function o(){return"undefined"==typeof document?null:t.to&&"body"!==t.to?document.querySelector(t.to):document.body}function r(){const e=n.value;if(!e)return;const t=o();t&&e.parentElement!==t&&t.appendChild(e)}return m.onMounted(()=>{r()}),m.watch(()=>t.to,()=>{r()}),m.onBeforeUnmount(()=>{}),{__sfc:!0,props:t,rootRef:n,resolveTarget:o,moveToTarget:r}}}),function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{ref:"rootRef",staticClass:"portal-root"},[e._t("default")],2)},[],!1,null,"5b7455c5",null,null).exports,mt=g(m.defineComponent({__name:"HtmlPreviewFrame",props:{code:null,isDark:{type:Boolean},onClose:null,title:null},setup(e){const t=e,{t:n}=ce(),o=m.computed(()=>{const e=t.code||"",n=e.trim().toLowerCase();return n.startsWith("<!doctype")||n.startsWith("<html")||n.startsWith("<body")?e:`<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <style>\n html, body {\n margin: 0;\n padding: 0;\n height: 100%;\n background-color: ${t.isDark?"#020617":"#ffffff"};\n color: ${t.isDark?"#e5e7eb":"#020617"};\n }\n body {\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', ui-sans-serif, sans-serif;\n }\n </style>\n </head>\n <body>\n ${e}\n </body>\n</html>`});function r(e){var n;"Escape"!==e.key&&"Esc"!==e.key||null==(n=t.onClose)||n.call(t)}return m.onMounted(()=>{"undefined"!=typeof window&&window.addEventListener("keydown",r)}),m.onUnmounted(()=>{"undefined"!=typeof window&&window.removeEventListener("keydown",r)}),{__sfc:!0,props:t,t:n,srcdoc:o,handleKeydown:r,Portal:pt}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t(n.Portal,{attrs:{to:"body"}},[t("div",{staticClass:"markstream-vue2"},[t("div",{staticClass:"html-preview-frame__backdrop",class:{"html-preview-frame__backdrop--dark":n.props.isDark},on:{click:function(e){var t,o;null==(o=(t=n.props).onClose)||o.call(t)}}},[t("div",{staticClass:"html-preview-frame",class:{"html-preview-frame--dark":n.props.isDark},on:{click:function(e){e.stopPropagation()}}},[t("div",{staticClass:"html-preview-frame__header"},[t("div",{staticClass:"html-preview-frame__title"},[t("span",{staticClass:"html-preview-frame__dot"}),t("span",{staticClass:"html-preview-frame__label"},[e._v(e._s(n.props.title||n.t("common.preview")||"Preview"))])]),t("button",{staticClass:"html-preview-frame__close",class:{"html-preview-frame__close--dark":n.props.isDark},attrs:{type:"button"},on:{click:function(e){var t,o;null==(o=(t=n.props).onClose)||o.call(t)}}},[e._v(" × ")])]),t("iframe",{staticClass:"html-preview-frame__iframe",attrs:{sandbox:"allow-scripts allow-same-origin",srcdoc:n.srcdoc}})])])])])},[],!1,null,"a5364041",null,null).exports;let ft=null,ht=null,vt=null,gt=null,wt=null;const yt=new WeakMap;let xt=0;const Mt=g(m.defineComponent({__name:"CodeBlockNode",props:{node:{type:Object,required:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{type:[Object,String],default:void 0},lightTheme:{type:[Object,String],default:void 0},isShowPreview:{type:Boolean,default:!0},monacoOptions:{type:Object,default:void 0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{type:[String,Number],default:void 0},maxWidth:{type:[String,Number],default:void 0},themes:{type:Array,default:void 0},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},customId:{type:String,default:void 0}},emits:["previewCode","copy"],setup(e,{emit:t}){var n,o;const r=e,l="__markstreamMonacoPassiveTouch__";function i(){var e;try{const t=window;if(t[l])return;const n=null==(e=window.Element)?void 0:e.prototype,o=null==n?void 0:n.addEventListener;if(!n||!o)return;n.addEventListener=function(e,t,n){return"touchstart"===e&&a(this,n)?o.call(this,e,t,c(n)):o.call(this,e,t,n)},t[l]=!0}catch(t){}}function a(e,t){if(!e)return!1;const n=e;return!("function"!=typeof n.closest||!n.closest(".monaco-editor, .monaco-diff-editor")||t&&"object"==typeof t&&"passive"in t)}function c(e){return null==e?{passive:!0}:"boolean"==typeof e?{capture:e,passive:!0}:"object"==typeof e?"passive"in e?e:u(s({},e),{passive:!0}):{passive:!0}}"undefined"!=typeof window&&i();const p=m.getCurrentInstance(),h=m.computed(()=>{var e,t,n,o,r,l,i,a,s,u;const c=null==p?void 0:p.proxy,d=null!=(e=null==c?void 0:c.$listeners)?e:{};if(d.previewCode||d["preview-code"])return!0;const m=null!=(i=null!=(l=null==(n=null==(t=null==c?void 0:c.$vnode)?void 0:t.data)?void 0:n.on)?l:null==(r=null==(o=null==c?void 0:c.$vnode)?void 0:o.componentOptions)?void 0:r.listeners)?i:{};if(m.previewCode||m["preview-code"])return!0;const f=null!=(u=null==(a=null==c?void 0:c.$vnode)?void 0:a.props)?u:null==(s=null==p?void 0:p.vnode)?void 0:s.props;return!(!f||!f.onPreviewCode&&!f.onPreviewcode)}),{t:v}=ce(),g=m.ref(null),w=m.ref(null),y=m.ref(!1),x=m.ref(at(r.node.language)),M=m.computed(()=>st(x.value)),k=m.ref(!1),b=m.ref(!1),C=m.ref(!1),T=m.ref(!1),N=m.ref(null);let D=0;const j=pe();let I=null;const _=m.ref("undefined"==typeof window);"undefined"!=typeof window&&m.watch(()=>w.value,e=>{if(null==I||I.destroy(),I=null,!e)return void(_.value=!1);const t=j(e,{rootMargin:"400px"});I=t,_.value=t.isVisible.value,t.whenVisible.then(()=>{_.value=!0})},{immediate:!0}),m.onBeforeUnmount(()=>{null==I||I.destroy(),I=null});let E=null,L=null,S=()=>{},B=()=>{},A=()=>null,O=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),z=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),R=()=>{},P=()=>{},H=null,U=()=>{var e;return String(null!=(e=r.node.language)?e:"plaintext")},$=()=>d(this,null,function*(){});const F=m.computed(()=>r.node.diff),Y=m.computed(()=>F.value?"diff":"single"),V=m.ref(Y.value),Q=m.ref(!1),W=m.ref(!1),K=void 0!=={url:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:f&&"SCRIPT"===f.tagName.toUpperCase()&&f.src||new URL("index.cjs",document.baseURI).href}&&Boolean(null==(n={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:n.DEV);"undefined"!=typeof window&&(()=>{d(this,null,function*(){try{const e=yield ot();if(!e)return K&&console.warn("[markstream-vue2] stream-monaco is not installed. Code blocks will use basic rendering. Install stream-monaco for enhanced code editor features."),void(Q.value=!0);const t=e.useMonaco,n=e.detectLanguage;if("function"==typeof n&&(U=n),"function"==typeof t){const e=xe();if(e&&r.themes&&Array.isArray(r.themes)&&!r.themes.includes(e))throw new Error("Preferred theme not in provided themes array");const n=t(u(s({wordWrap:"on",wrappingIndent:"same",themes:r.themes,theme:e},r.monacoOptions||{}),{onThemeChange(){oe()}}));E=n.createEditor||E,L=n.createDiffEditor||L,S=n.updateCode||S,B=n.updateDiff||B,A=n.getEditor||A,O=n.getEditorView||O,z=n.getDiffEditorView||z,R=n.cleanupEditor||R,P=n.safeClean||n.cleanupEditor||P,$=n.setTheme||$,T.value=!0,g.value&&(yield we(g.value))}}catch(e){K&&console.warn("[markstream-vue2] Failed to initialize Monaco editor:",e),Q.value=!0}})})();const X=m.ref("number"==typeof(null==(o=r.monacoOptions)?void 0:o.fontSize)?r.monacoOptions.fontSize:Number.NaN),q=m.ref(X.value),Z=m.computed(()=>{const e=X.value,t=q.value;return"number"==typeof e&&Number.isFinite(e)&&e>0&&"number"==typeof t&&Number.isFinite(t)&&t>0});function G(){try{const e=g.value;if(!e)return null;const t=e.querySelector(".view-lines .view-line");if(t){const e=Math.ceil(t.getBoundingClientRect().height);if(e>0)return e}}catch(e){}return null}function J(){var e,t,n,o,r;try{const l=F.value?null!=(n=null==(t=null==(e=z())?void 0:e.getModifiedEditor)?void 0:t.call(e))?n:z():O(),i=A(),a=null==(o=null==i?void 0:i.EditorOption)?void 0:o.fontInfo;if(l&&null!=a){const e=null==(r=l.getOption)?void 0:r.call(l,a),t=null==e?void 0:e.fontSize;if("number"==typeof t&&Number.isFinite(t)&&t>0)return t}}catch(l){}try{const e=g.value;if(e){const t=e.querySelector(".view-lines .view-line");if(t)try{if("undefined"!=typeof window&&"function"==typeof window.getComputedStyle){const e=window.getComputedStyle(t).fontSize,n=e&&e.match(/^(\d+(?:\.\d+)?)/);if(n)return Number.parseFloat(n[1])}}catch(l){}}}catch(l){}return null}function ee(e){var t,n;try{const o=A(),r=null==(t=null==o?void 0:o.EditorOption)?void 0:t.lineHeight;if(null!=r){const t=null==(n=null==e?void 0:e.getOption)?void 0:n.call(e,r);if("number"==typeof t&&t>0)return t}}catch(l){}const o=G();if(o&&o>0)return o;const r=Number.isFinite(q.value)&&q.value>0?q.value:12;return Math.max(12,Math.round(1.35*r))}function te(){var e;if(Number.isFinite(q.value)&&q.value>0&&Number.isFinite(X.value))return q.value;const t=J();return"number"==typeof(null==(e=r.monacoOptions)?void 0:e.fontSize)?(X.value=r.monacoOptions.fontSize,q.value=r.monacoOptions.fontSize,q.value):t&&t>0?(X.value=t,q.value=t,t):(X.value=12,q.value=12,12)}function ne(){var e,t,n,o,r,l,i,a,s,u,c,d,p,m;try{const f=F.value?z():O();if(!f)return null;if(F.value&&(null==f?void 0:f.getOriginalEditor)&&(null==f?void 0:f.getModifiedEditor)){const p=null==(e=f.getOriginalEditor)?void 0:e.call(f),m=null==(t=f.getModifiedEditor)?void 0:t.call(f);null==(n=null==p?void 0:p.layout)||n.call(p),null==(o=null==m?void 0:m.layout)||o.call(m);const h=(null==(r=null==p?void 0:p.getContentHeight)?void 0:r.call(p))||0,v=(null==(l=null==m?void 0:m.getContentHeight)?void 0:l.call(m))||0,g=Math.max(h,v);if(g>0)return Math.ceil(g+1);const w=(null==(s=null==(a=null==(i=null==p?void 0:p.getModel)?void 0:i.call(p))?void 0:a.getLineCount)?void 0:s.call(a))||1,y=(null==(d=null==(c=null==(u=null==m?void 0:m.getModel)?void 0:u.call(m))?void 0:c.getLineCount)?void 0:d.call(c))||1,x=Math.max(w,y),M=Math.max(ee(p),ee(m));return Math.ceil(x*(M+1.5)+0+1)}if(null==f?void 0:f.getContentHeight){null==(p=null==f?void 0:f.layout)||p.call(f);const e=f.getContentHeight();if(e>0)return Math.ceil(e+1)}const h=null==(m=null==f?void 0:f.getModel)?void 0:m.call(f);let v=1;h&&"function"==typeof h.getLineCount&&(v=h.getLineCount());const g=ee(f);return Math.ceil(v*(g+1.5)+0+1)}catch(f){return null}}function oe(){var e,t,n,o,r,l,i,a;const s=g.value,u=w.value;if(!s||!u)return;const c=s.querySelector(".monaco-editor")||s,d=c.querySelector(".monaco-editor-background")||c,p=c.querySelector(".view-lines")||c;let m=null,f=null,h=null;try{"undefined"!=typeof window&&"function"==typeof window.getComputedStyle&&(m=window.getComputedStyle(c),f=d===c?m:window.getComputedStyle(d),h=p===c?m:window.getComputedStyle(p))}catch(b){m=null,f=null,h=null}const v=String(null!=(e=null==m?void 0:m.getPropertyValue("--vscode-editor-foreground"))?e:"").trim(),y=String(null!=(t=null==m?void 0:m.getPropertyValue("--vscode-editor-background"))?t:"").trim(),x=String(null!=(o=null!=(n=null==m?void 0:m.getPropertyValue("--vscode-editor-selectionBackground"))?n:null==m?void 0:m.getPropertyValue("--vscode-editor-hoverHighlightBackground"))?o:"").trim(),M=v||String(null!=(l=null!=(r=null==h?void 0:h.color)?r:null==m?void 0:m.color)?l:"").trim(),k=y||String(null!=(a=null!=(i=null==f?void 0:f.backgroundColor)?i:null==m?void 0:m.backgroundColor)?a:"").trim();M&&u.style.setProperty("--vscode-editor-foreground",M),k&&u.style.setProperty("--vscode-editor-background",k),x&&u.style.setProperty("--vscode-editor-selectionBackground",x)}function re(){try{const e=g.value;if(!e)return;const t=e.getBoundingClientRect(),n=window.scrollY+t.top,o=ne();if(null!=o&&o>0){const r=t.height;e.style.height=`${Math.ceil(o)}px`,e.style.maxHeight="none";const l=Math.ceil(o)-r;0!==l&&n<window.scrollY&&window.scrollBy(0,l)}}catch(e){}}function le(){var e;try{const t=g.value;if(!t)return;const n=t.getBoundingClientRect(),o=window.scrollY+n.top,r=n.height,l=ie();if(D>0&&(D--,null!=N.value)){const e=Math.min(N.value,l);t.style.height=`${Math.ceil(e)}px`,t.style.maxHeight=`${Math.ceil(l)}px`,t.style.overflow="auto";const n=Math.ceil(e)-r;return void(0!==n&&o<window.scrollY&&window.scrollBy(0,n))}const i=ne();if(null!=i&&i>0){const e=Math.min(i,l);t.style.height=`${Math.ceil(e)}px`,t.style.maxHeight=`${Math.ceil(l)}px`,t.style.overflow="auto";const n=Math.ceil(e)-r;return void(0!==n&&o<window.scrollY&&window.scrollBy(0,n))}if(null!=N.value){const e=Math.min(N.value,l);t.style.height=`${Math.ceil(e)}px`,t.style.maxHeight=`${Math.ceil(l)}px`,t.style.overflow="auto";const n=Math.ceil(e)-r;return void(0!==n&&o<window.scrollY&&window.scrollBy(0,n))}const a=Math.ceil((null==(e=t.getBoundingClientRect)?void 0:e.call(t).height)||0);if(a>0){const e=Math.min(a,l);t.style.height=`${Math.ceil(e)}px`,t.style.maxHeight=`${Math.ceil(l)}px`,t.style.overflow="auto";const n=Math.ceil(e)-r;return void(0!==n&&o<window.scrollY&&window.scrollBy(0,n))}const s=Number.parseFloat(t.style.height);if(!Number.isNaN(s)&&s>0){const e=Math.ceil(Math.min(s,l));t.style.height=`${e}px`;const n=e-r;0!==n&&o<window.scrollY&&window.scrollBy(0,n)}else{const e=Math.ceil(l);t.style.height=`${e}px`;const n=e-r;0!==n&&o<window.scrollY&&window.scrollBy(0,n)}t.style.maxHeight=`${Math.ceil(l)}px`,t.style.overflow="auto"}catch(t){}}function ie(){var e,t;const n=null!=(t=null==(e=r.monacoOptions)?void 0:e.MAX_HEIGHT)?t:500;if("number"==typeof n)return n;const o=String(n).match(/^(\d+(?:\.\d+)?)/);return o?Number.parseFloat(o[1]):500}const ue=m.computed(()=>r.isShowPreview&&("html"===x.value||"svg"===x.value));m.watch(()=>r.node.language,e=>{x.value=at(e)}),m.watch(()=>r.node.code,e=>d(this,null,function*(){var t,n;if(!1!==r.stream){if(x.value||(x.value=at(U(e))),E&&!C.value&&g.value)try{yield we(g.value)}catch(o){}F.value?B(String(null!=(t=r.node.originalCode)?t:""),String(null!=(n=r.node.updatedCode)?n:""),M.value):S(e,M.value),k.value&&dt(()=>re())}}));const de=m.computed(()=>{const e=x.value;return e?ct[e]||e.charAt(0).toUpperCase()+e.slice(1):ct[""]||"Plain Text"}),me=m.computed(()=>ut(x.value||"")),fe=m.computed(()=>{const e={},t=e=>{if(null!=e)return"number"==typeof e?`${e}px`:String(e)},n=t(r.minWidth),o=t(r.maxWidth);return n&&(e.minWidth=n),o&&(e.maxWidth=o),e});function he(e){return!e||e.disabled}function ve(e){var t,n;try{if(F.value){const n=z();null==(t=null==n?void 0:n.updateOptions)||t.call(n,{automaticLayout:e})}else{const t=O();null==(n=null==t?void 0:t.updateOptions)||n.call(t,{automaticLayout:e})}}catch(o){}}function ge(e){return d(this,null,function*(){var t,n,o;if(!E)return;F.value?(P(),L?yield L(e,String(null!=(t=r.node.originalCode)?t:""),String(null!=(n=r.node.updatedCode)?n:""),M.value):yield E(e,r.node.code,M.value)):yield E(e,r.node.code,M.value);const l=F.value?z():O();if("number"==typeof(null==(o=r.monacoOptions)?void 0:o.fontSize))null==l||l.updateOptions({fontSize:r.monacoOptions.fontSize,automaticLayout:!1}),X.value=r.monacoOptions.fontSize,q.value=r.monacoOptions.fontSize;else{const e=J();e&&e>0?(X.value=e,q.value=e):(X.value=12,q.value=12)}k.value||b.value||le(),!1===r.loading&&(yield m.nextTick(),dt(()=>{k.value&&!b.value?re():b.value||le()}))})}function we(e){if(!E)return null;if(H)return H;C.value=!0;const t=(()=>d(this,null,function*(){yield ge(e)}))();return H=t.finally(()=>{H=null}),H}m.watch(()=>q.value,(e,t)=>{const n=F.value?z():O();n&&"number"==typeof e&&Number.isFinite(e)&&e>0&&(n.updateOptions({fontSize:e}),k.value&&!b.value&&re())},{flush:"post",immediate:!1});const ye=m.watch(()=>[g.value,F.value,r.stream,r.loading,T.value,_.value],e=>d(this,[e],function*([e,t,n,o,r,l]){if(!e||!E)return;if(!l)return;if(!1===n&&!1!==o)return;const i=we(e);i&&(yield i,ye())}));function xe(){return r.isDark?r.darkTheme:r.lightTheme}function Me(){const e=xe();e&&function(e,t){const n=function(e){if(null==e)return null;if("string"==typeof e)return e;if("object"==typeof e&&e&&"name"in e)return String(e.name);if("object"==typeof e){const n=yt.get(e);if(n)return n;try{const t=JSON.stringify(e);if(t)return yt.set(e,t),t}catch(t){}const o="__theme_"+ ++xt;return yt.set(e,o),o}return String(e)}(t);return n?(wt=e,ft||gt!==n?(ht=t,vt=n,ft||(ft=(()=>d(this,null,function*(){for(;vt&&null!=ht;){const n=ht,o=vt;if(ht=null,vt=null,gt!==o)try{yield(null!=wt?wt:e)(n),gt=o}catch(t){}}}))().finally(()=>{ft=null}),ft)):Promise.resolve()):Promise.resolve()}($,e).then(()=>{dt(()=>oe())})}m.watch(Y,(e,t)=>d(this,null,function*(){if(e!==t&&(V.value=e,E&&g.value&&C.value&&(!1!==r.stream||!1===r.loading)&&_.value))try{C.value=!1,H=null,P(),yield m.nextTick(),yield we(g.value)}catch(n){C.value=!1}})),m.watch(()=>[r.isDark,r.darkTheme,r.lightTheme,T.value],()=>{T.value&&Me()}),m.watch(()=>[r.monacoOptions,_.value],()=>{var e,t;if(!E||!_.value)return;const n=F.value?z():O(),o="number"==typeof(null==(e=r.monacoOptions)?void 0:e.fontSize)?r.monacoOptions.fontSize:Number.isFinite(q.value)?q.value:void 0;"number"==typeof o&&Number.isFinite(o)&&o>0&&(null==(t=null==n?void 0:n.updateOptions)||t.call(n,{fontSize:o})),k.value&&!b.value?re():b.value||le()},{deep:!0});const ke=m.watch(()=>[r.loading,_.value],e=>d(this,[e],function*([e,t]){t&&(e||(yield m.nextTick(),dt(()=>{b.value||(k.value?re():le()),ke()})))}),{immediate:!0,flush:"post"});return m.onUnmounted(()=>{R()}),{__sfc:!0,props:r,emits:t,MONACO_TOUCH_PATCH_FLAG:l,ensureMonacoPassiveTouchListeners:i,shouldForcePassiveForMonaco:a,withPassiveOptions:c,instance:p,hasPreviewListener:h,t:v,codeEditor:g,container:w,copyText:y,codeLanguage:x,monacoLanguage:M,isExpanded:k,isCollapsed:b,editorCreated:C,monacoReady:T,expandRafId:null,heightBeforeCollapse:N,resumeGuardFrames:D,registerVisibility:j,viewportHandle:I,viewportReady:_,createEditor:E,createDiffEditor:L,updateCode:S,updateDiffCode:B,getEditor:A,getEditorView:O,getDiffEditorView:z,cleanupEditor:R,safeClean:P,createEditorPromise:H,detectLanguage:U,setTheme:$,isDiff:F,desiredEditorKind:Y,currentEditorKind:V,usePreCodeRender:Q,showInlinePreview:W,isDevEnv:K,codeFontMin:10,codeFontMax:36,codeFontStep:1,defaultCodeFontSize:X,codeFontSize:q,fontBaselineReady:Z,CONTENT_PADDING:0,LINE_EXTRA_PER_LINE:1.5,PIXEL_EPSILON:1,measureLineHeightFromDom:G,readActualFontSizeFromEditor:J,getLineHeightSafe:ee,ensureFontBaseline:te,increaseCodeFont:function(){const e=te(),t=Math.min(36,e+1);q.value=t},decreaseCodeFont:function(){const e=te(),t=Math.max(10,e-1);q.value=t},resetCodeFont:function(){te(),Number.isFinite(X.value)&&(q.value=X.value)},computeContentHeight:ne,syncEditorCssVars:oe,resizeSyncHandler:null,updateExpandedHeight:re,updateCollapsedHeight:le,getMaxHeightValue:ie,isPreviewable:ue,displayLanguage:de,languageIcon:me,containerStyle:fe,copy:function(){return d(this,null,function*(){try{"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(r.node.code)),y.value=!0,t("copy",r.node.code),setTimeout(()=>{y.value=!1},1e3)}catch(e){console.error("复制失败:",e)}})},shouldSkipEventTarget:he,onBtnHover:function(e,t,n="top"){if(he(e.currentTarget))return;const o=e,l=null!=(null==o?void 0:o.clientX)&&null!=(null==o?void 0:o.clientY)?{x:o.clientX,y:o.clientY}:void 0;ae(e.currentTarget,t,n,!1,l,r.isDark)},onBtnLeave:function(){se()},onCopyHover:function(e){if(he(e.currentTarget))return;const t=y.value?v("common.copied")||"Copied":v("common.copy")||"Copy",n=e,o=null!=(null==n?void 0:n.clientX)&&null!=(null==n?void 0:n.clientY)?{x:n.clientX,y:n.clientY}:void 0;ae(e.currentTarget,t,"top",!1,o,r.isDark)},toggleExpand:function(){k.value=!k.value;const e=F.value?z():O(),t=g.value;e&&t&&(k.value?(ve(!0),t.style.maxHeight="none",t.style.overflow="visible",re()):(ve(!1),t.style.overflow="auto",le()))},toggleHeaderCollapse:function(){var e,t,n;if(b.value=!b.value,b.value){if(g.value){const n=Math.ceil((null==(t=(e=g.value).getBoundingClientRect)?void 0:t.call(e).height)||0);n>0&&(N.value=n)}ve(!1)}else{k.value&&ve(!0),g.value&&null!=N.value&&(g.value.style.height=`${N.value}px`);const e=F.value?z():O();try{null==(n=null==e?void 0:e.layout)||n.call(e)}catch(o){}D=2,dt(()=>{k.value?re():le()})}},previewCode:function(){if(!ue.value)return;const e=x.value;if(h.value){const n="html"===e?"text/html":"image/svg+xml",o="html"===e?v("artifacts.htmlPreviewTitle")||"HTML Preview":v("artifacts.svgPreviewTitle")||"SVG Preview";return void t("previewCode",{node:r.node,artifactType:n,artifactTitle:o,id:`temp-${e}-${Date.now()}`})}"html"===e&&(W.value=!W.value)},setAutomaticLayout:ve,runEditorCreation:ge,ensureEditorCreation:we,stopCreateEditorWatch:ye,getPreferredColorScheme:xe,themeUpdate:Me,stopLoadingWatch:ke,stopExpandAutoResize:function(){},PreCodeNode:We,HtmlPreviewFrame:mt}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return n.usePreCodeRender?t(n.PreCodeNode,{attrs:{node:e.node,loading:n.props.loading}}):t("div",{ref:"container",staticClass:"code-block-container my-4 rounded-lg border overflow-hidden shadow-sm",class:[n.props.isDark?"border-gray-700/30 bg-gray-900":"border-gray-200 bg-white",{"is-rendering":n.props.loading,"is-dark":n.props.isDark}],style:n.containerStyle},[n.props.showHeader?t("div",{staticClass:"code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",staticStyle:{color:"var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))","background-color":"var(--vscode-editor-background, var(--markstream-code-fallback-bg))"}},[e._t("header-left",function(){return[t("div",{staticClass:"flex items-center space-x-2 flex-1 overflow-hidden"},[t("span",{staticClass:"icon-slot h-4 w-4 flex-shrink-0",domProps:{innerHTML:e._s(n.languageIcon)}}),t("span",{staticClass:"text-sm font-medium font-mono truncate"},[e._v(e._s(n.displayLanguage))])])]}),e._t("header-right",function(){return[t("div",{staticClass:"flex items-center space-x-2"},[t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-pressed":n.isCollapsed},on:{click:n.toggleHeaderCollapse,mouseenter:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},focus:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",style:{rotate:n.isCollapsed?"0deg":"90deg"},attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"}})])]),n.props.showFontSizeButtons&&n.props.enableFontSizeControl?[t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!!Number.isFinite(n.codeFontSize)&&n.codeFontSize<=n.codeFontMin},on:{click:function(e){return n.decreaseCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.decrease")||"Decrease")},focus:function(e){n.onBtnHover(e,n.t("common.decrease")||"Decrease")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"}})])]),t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!n.fontBaselineReady||n.codeFontSize===n.defaultCodeFontSize},on:{click:function(e){return n.resetCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.reset")||"Reset")},focus:function(e){n.onBtnHover(e,n.t("common.reset")||"Reset")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}}),t("path",{attrs:{d:"M3 3v5h5"}})])])]),t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!!Number.isFinite(n.codeFontSize)&&n.codeFontSize>=n.codeFontMax},on:{click:function(e){return n.increaseCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.increase")||"Increase")},focus:function(e){n.onBtnHover(e,n.t("common.increase")||"Increase")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"}})])])]:e._e(),n.props.showCopyButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-label":n.copyText?n.t("common.copied")||"Copied":n.t("common.copy")||"Copy"},on:{click:n.copy,mouseenter:function(e){return n.onCopyHover(e)},focus:function(e){return n.onCopyHover(e)},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.copyText?t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("rect",{attrs:{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}})])])]):e._e(),n.props.showExpandButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-pressed":n.isExpanded},on:{click:n.toggleExpand,mouseenter:function(e){n.onBtnHover(e,n.isExpanded?n.t("common.collapse")||"Collapse":n.t("common.expand")||"Expand")},focus:function(e){n.onBtnHover(e,n.isExpanded?n.t("common.collapse")||"Collapse":n.t("common.expand")||"Expand")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.isExpanded?t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"}})])]):e._e(),n.isPreviewable&&n.props.showPreviewButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-label":n.t("common.preview")||"Preview"},on:{click:n.previewCode,mouseenter:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},focus:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24"}},[t("g",{attrs:{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"}},[t("path",{attrs:{d:"M23.628 7.41c-.12-1.172-.08-3.583-.9-4.233c-1.921-1.51-6.143-1.11-8.815-1.19c-3.481-.15-7.193.14-10.625.24a.34.34 0 0 0 0 .67c3.472-.05 7.074-.29 10.575-.09c2.471.15 6.653-.14 8.254 1.16c.4.33.41 2.732.49 3.582a42 42 0 0 1 .08 9.005a13.8 13.8 0 0 1-.45 3.001c-2.42 1.4-19.69 2.381-20.72.55a21 21 0 0 1-.65-4.632a41.5 41.5 0 0 1 .12-7.964c.08 0 7.334.33 12.586.24c2.331 0 4.682-.13 6.764-.21a.33.33 0 0 0 0-.66c-7.714-.16-12.897-.43-19.31.05c.11-1.38.48-3.922.38-4.002a.3.3 0 0 0-.42 0c-.37.41-.29 1.77-.36 2.251s-.14 1.07-.2 1.6a45 45 0 0 0-.36 8.645a21.8 21.8 0 0 0 .66 5.002c1.46 2.702 17.248 1.461 20.95.43c1.45-.4 1.69-.8 1.871-1.95c.575-3.809.602-7.68.08-11.496"}}),t("path",{attrs:{d:"M4.528 5.237a.84.84 0 0 0-.21-1c-.77-.41-1.71.39-1 1.1a.83.83 0 0 0 1.21-.1m2.632-.25c.14-.14.19-.84-.2-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.2-.09m2.88 0a.83.83 0 0 0-.21-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.21-.09m-4.29 8.735c0 .08.23 2.471.31 2.561a.371.371 0 0 0 .63-.14c0-.09 0 0 .15-1.72a10 10 0 0 0-.11-2.232a5.3 5.3 0 0 1-.26-1.37a.3.3 0 0 0-.54-.24a6.8 6.8 0 0 0-.2 2.33c-1.281-.38-1.121.13-1.131-.42a15 15 0 0 0-.19-1.93c-.16-.17-.36-.17-.51.14a20 20 0 0 0-.43 3.471c.04.773.18 1.536.42 2.272c.26.4.7.22.7-.1c0-.09-.16-.09 0-1.862c.06-1.18-.23-.3 1.16-.76m5.033-2.552c.32-.07.41-.28.39-.37c0-.55-3.322-.34-3.462-.24s-.2.18-.18.28s0 .11 0 .16a3.8 3.8 0 0 0 1.591.361v.82a15 15 0 0 0-.13 3.132c0 .2-.09.94.17 1.16a.34.34 0 0 0 .48 0c.125-.35.196-.718.21-1.09a8 8 0 0 0 .14-3.232c0-.13.05-.7-.1-.89a8 8 0 0 0 .89-.09m5.544-.181a.69.69 0 0 0-.89-.44a2.8 2.8 0 0 0-1.252 1.001a2.3 2.3 0 0 0-.41-.83a1 1 0 0 0-1.6.27a7 7 0 0 0-.35 2.07c0 .571 0 2.642.06 2.762c.14 1.09 1 .51.63.13a17.6 17.6 0 0 1 .38-3.962c.32-1.18.32.2.39.51s.11 1.081.73 1.081s.48-.93 1.401-1.78q.075 1.345 0 2.69a15 15 0 0 0 0 1.811a.34.34 0 0 0 .68 0q.112-.861.11-1.73a16.7 16.7 0 0 0 .12-3.582m1.441-.201c-.05.16-.3 3.002-.31 3.202a6.3 6.3 0 0 0 .21 1.741c.33 1 1.21 1.07 2.291.82a3.7 3.7 0 0 0 1.14-.23c.21-.22.10-.59-.41-.64q-.817.096-1.64.07c-.44-.07-.34 0-.67-4.442q.015-.185 0-.37a.316.316 0 0 0-.23-.38a.316.316 0 0 0-.38.23"}})])])]):e._e()],2)]})],2):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!(n.isCollapsed||!e.stream&&e.loading),expression:"!isCollapsed && (stream ? true : !loading)"}],ref:"codeEditor",staticClass:"code-editor-container",class:[e.stream?"":"code-height-placeholder"]}),n.showInlinePreview&&!n.hasPreviewListener&&n.isPreviewable&&"html"===n.codeLanguage?t(n.HtmlPreviewFrame,{attrs:{code:e.node.code,"is-dark":n.props.isDark,"on-close":()=>n.showInlinePreview=!1}}):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.stream&&e.loading,expression:"!stream && loading"}],staticClass:"code-loading-placeholder"},[e._t("loading",function(){return[t("div",{staticClass:"loading-skeleton"},[t("div",{staticClass:"skeleton-line"}),t("div",{staticClass:"skeleton-line"}),t("div",{staticClass:"skeleton-line short"})])]},{loading:e.loading,stream:e.stream})],2),t("span",{staticClass:"sr-only",attrs:{"aria-live":"polite",role:"status"}},[e._v(e._s(n.copyText?n.t("common.copied")||"Copied":""))])],1)},[],!1,null,"0e5603b6",null,null).exports,kt=()=>Promise.resolve().then(()=>require("./index6.js"));let bt=null,Ct=kt;function Tt(e){Ct=e,bt=null}const Nt=g(m.defineComponent({__name:"D2BlockNode",props:{node:null,maxHeight:{default:"500px"},loading:{type:Boolean,default:!0},isDark:{type:Boolean},progressiveRender:{type:Boolean,default:!0},progressiveIntervalMs:{default:700},themeId:null,darkThemeId:null,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(e){const t=e,{t:n}=ce(),o=m.ref(!1),r=m.ref(!1),l=m.ref(!1),i=m.ref(!1),a=m.ref(null),u=m.ref(!1),c=m.ref(""),p=m.ref(0),f=m.ref(null),h=m.ref(null),v=m.computed(()=>{var e;return null!=(e=t.node.code)?e:""}),g=m.computed(()=>l.value||!i.value||!c.value),w=m.computed(()=>!!c.value),y=m.computed(()=>{if(h.value)return{minHeight:`${h.value}px`}}),x=m.computed(()=>{if(t.maxHeight)return{maxHeight:"number"==typeof t.maxHeight?`${t.maxHeight}px`:String(t.maxHeight)}}),M="undefined"!=typeof window;let k=null,b=!1,C=!1,T=0,N=null,D=!1,j=null;const I={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 _(e){return!e||e.disabled}const E=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],L=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function S(e){return e.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#")}function B(e){if(!e)return"";const t=e.trim();return L.test(t)?t:""}function A(e){const t=new Set(["script"]),n=[e,...Array.from(e.querySelectorAll("*"))];for(const o of n){if(t.has(o.tagName.toLowerCase())){o.remove();continue}const e=Array.from(o.attributes);for(const t of e){const e=t.name;if(/^on/i.test(e))o.removeAttribute(e);else{if("style"===e&&t.value){const n=t.value;if(E.some(e=>e.test(n))){o.removeAttribute(e);continue}}if(("href"===e||"xlink:href"===e)&&t.value){const n=B(t.value);if(!n){o.removeAttribute(e);continue}n!==t.value&&o.setAttribute(e,n)}}}}}function O(e){if("undefined"==typeof window||"undefined"==typeof DOMParser)return"";if(!e)return"";const t=S(e),n=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement;if(!n||"svg"!==n.nodeName.toLowerCase())return"";const o=n;return A(o),o.outerHTML}function z(e){const t=O(e);c.value=t||""}function R(){c.value=""}function P(e){return e?"string"==typeof e?e:"string"==typeof e.svg?e.svg:"string"==typeof e.data?e.data:"":""}function H(){return d(this,null,function*(){if(k)return k;const e=yield function(){return d(this,null,function*(){if(bt)return bt;const e=Ct;if(!e)return null;let t;try{t=yield e()}catch(n){if(e===kt)throw new Error('Optional dependency "@terrastruct/d2" is not installed. Please install it to enable D2 diagrams.');throw n}return t?(bt=function(e){var t;if(!e)return e;if(e.D2&&"function"==typeof e.D2)return e.D2;if(e.default&&e.default.D2&&"function"==typeof e.default.D2)return e.default.D2;const n=null!=(t=e.default)?t:e;return"function"==typeof n?n:(null==n?void 0:n.D2)&&"function"==typeof n.D2?n.D2:n}(t),bt):null})}();if(!e)return null;if("function"==typeof e){const t=new e;return t&&"function"==typeof t.compile?k=t:"function"==typeof e.compile&&(k=e),k}return(null==e?void 0:e.D2)&&"function"==typeof e.D2?(k=new e.D2,k):("function"==typeof e.compile&&(k=e),k)})}function U(){return d(this,null,function*(){var e,n,o,r,c;if(!M||C)return;if(t.loading&&!t.progressiveRender)return;const d=v.value;if(!d)return R(),void(a.value=null);const m=++p.value;u.value=!0,a.value=null;try{const u=yield H();if(!u)return i.value=!1,l.value=!0,R(),void(a.value="D2 is not available.");if("function"!=typeof u.compile||"function"!=typeof u.render)throw new TypeError("D2 instance is missing compile/render methods.");i.value=!0;const f=yield u.compile(d);if(m!==p.value)return;const h=null!=(e=null==f?void 0:f.diagram)?e:f,v=null!=(o=null!=(n=null==f?void 0:f.renderOptions)?n:null==f?void 0:f.options)?o:{},g=null!=(r=t.themeId)?r:v.themeID,w=null!=(c=t.darkThemeId)?c:v.darkThemeID,y=s({},v);if(y.themeID=t.isDark&&null!=w?w:g,y.darkThemeID=null,y.darkThemeOverrides=null,t.isDark){const e=v.themeOverrides&&"object"==typeof v.themeOverrides?v.themeOverrides:null;y.themeOverrides=s(s({},I),e||{})}const x=yield u.render(h,y);if(m!==p.value)return;const M=P(x);if(!M)throw new Error("D2 render returned empty output.");z(M),t.loading&&(l.value=!1),a.value=null}catch(f){if(m!==p.value)return;const e=(null==f?void 0:f.message)?String(f.message):"D2 render failed.";t.loading||(a.value=e),e.includes("@terrastruct/d2")&&(i.value=!1,l.value=!0)}finally{m===p.value&&(u.value=!1,D&&(D=!1,$()))}})}function $(e=!1){if(b)return;if(!M)return;if(C)return;if(u.value)return void(D=!0);const n=Math.max(120,Number(t.progressiveIntervalMs)||0),o=Date.now()-T;if(!e&&o<n)return D=!0,void(null==N&&(N=window.setTimeout(()=>{N=null,D&&(D=!1,$(!0))},Math.max(0,n-o))));b=!0;const r=()=>{b=!1,T=Date.now(),U()};"undefined"!=typeof window&&"function"==typeof window.requestAnimationFrame?window.requestAnimationFrame(r):setTimeout(r,0)}function F(){const e=f.value;if(!e)return;const t=e.getBoundingClientRect().height;t>0&&(h.value=t)}return m.watch(()=>[t.node.code,t.loading,t.isDark],()=>{$()},{immediate:!0}),m.watch(()=>t.loading,(e,t)=>{t&&!e&&$(!0)}),m.watch(()=>[g.value,c.value,v.value],()=>{m.nextTick(()=>{F()})}),m.onMounted(()=>{$(),m.nextTick(()=>{F()}),"undefined"!=typeof ResizeObserver&&(j=new ResizeObserver(()=>{F()}),f.value&&j.observe(f.value))}),m.onBeforeUnmount(()=>{C=!0,null!=N&&(clearTimeout(N),N=null),null==j||j.disconnect(),j=null}),{__sfc:!0,props:t,t:n,copyText:o,isCollapsed:r,showSource:l,d2Available:i,renderError:a,isRendering:u,svgMarkup:c,renderToken:p,bodyRef:f,bodyMinHeight:h,baseCode:v,showSourceFallback:g,hasPreview:w,bodyStyle:y,renderStyle:x,isClient:M,d2Instance:k,scheduled:b,unmounted:C,lastRenderAt:T,throttleTimer:N,pendingRender:D,bodyObserver:j,DARK_THEME_OVERRIDES:I,shouldSkipEventTarget:_,onBtnHover:function(e,n,o="top"){if(_(e.currentTarget))return;const r=e,l=null!=(null==r?void 0:r.clientX)&&null!=(null==r?void 0:r.clientY)?{x:r.clientX,y:r.clientY}:void 0;ae(e.currentTarget,n,o,!1,l,t.isDark)},onBtnLeave:function(){se()},onCopyHover:function(e){if(_(e.currentTarget))return;const r=o.value?n("common.copied")||"Copied":n("common.copy")||"Copy",l=e,i=null!=(null==l?void 0:l.clientX)&&null!=(null==l?void 0:l.clientY)?{x:l.clientX,y:l.clientY}:void 0;ae(e.currentTarget,r,"top",!1,i,t.isDark)},copy:function(){return d(this,null,function*(){try{const e=v.value;"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(e)),o.value=!0,setTimeout(()=>{o.value=!1},1e3)}catch(e){console.error("Copy failed:",e)}})},toggleCollapse:function(){r.value=!r.value},handleSwitchMode:function(e){l.value="source"===e},DISALLOWED_STYLE_PATTERNS:E,SAFE_URL_PROTOCOLS:L,neutralizeScriptProtocols:S,sanitizeUrl:B,scrubSvgElement:A,toSafeSvgMarkup:O,setSvg:z,clearSvg:R,extractSvg:P,ensureD2Instance:H,renderDiagram:U,scheduleRender:$,exportSvg:function(){if(c.value)try{const e=new Blob([c.value],{type:"image/svg+xml;charset=utf-8"}),t=URL.createObjectURL(e);if("undefined"!=typeof document){const e=document.createElement("a");e.href=t,e.download=`d2-diagram-${Date.now()}.svg`,document.body.appendChild(e),e.click(),document.body.removeChild(e)}URL.revokeObjectURL(t)}catch(e){console.error("Failed to export SVG:",e)}},updateBodyMinHeight:F}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"d2-block-container my-4 rounded-lg border overflow-hidden shadow-sm",class:n.props.isDark?"border-gray-700/30 bg-gray-900 text-gray-100":"border-gray-200 bg-white text-gray-900"},[n.props.showHeader?t("div",{staticClass:"d2-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",staticStyle:{color:"var(--vscode-editor-foreground)","background-color":"var(--vscode-editor-background)"}},[e._m(0),t("div",{staticClass:"flex items-center gap-x-2"},[n.props.showModeToggle?t("div",{staticClass:"flex items-center gap-x-1 rounded-md p-0.5",class:n.props.isDark?"bg-gray-700":"bg-gray-100"},[t("button",{staticClass:"mode-btn px-2 py-1 text-xs rounded",class:n.showSource?"":"is-active",attrs:{type:"button"},on:{click:function(e){return n.handleSwitchMode("preview")},mouseenter:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},focus:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[e._v(" "+e._s(n.t("common.preview")||"Preview")+" ")]),t("button",{staticClass:"mode-btn px-2 py-1 text-xs rounded",class:n.showSource?"is-active":"",attrs:{type:"button"},on:{click:function(e){return n.handleSwitchMode("source")},mouseenter:function(e){n.onBtnHover(e,n.t("common.source")||"Source")},focus:function(e){n.onBtnHover(e,n.t("common.source")||"Source")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[e._v(" "+e._s(n.t("common.source")||"Source")+" ")])]):e._e(),n.props.showCopyButton?t("button",{staticClass:"d2-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-label":n.copyText?n.t("common.copied")||"Copied":n.t("common.copy")||"Copy"},on:{click:n.copy,mouseenter:function(e){return n.onCopyHover(e)},focus:function(e){return n.onCopyHover(e)},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.copyText?t("svg",{staticClass:"w-3 h-3",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("rect",{attrs:{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}})])])]):e._e(),n.props.showExportButton&&n.svgMarkup?t("button",{staticClass:"d2-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-label":n.t("common.export")||"Export"},on:{click:n.exportSvg,mouseenter:function(e){n.onBtnHover(e,n.t("common.export")||"Export")},focus:function(e){n.onBtnHover(e,n.t("common.export")||"Export")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24"}},[t("path",{attrs:{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"}})])]):e._e(),n.props.showCollapseButton?t("button",{staticClass:"d2-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-pressed":n.isCollapsed},on:{click:n.toggleCollapse,mouseenter:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},focus:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",style:{rotate:n.isCollapsed?"0deg":"90deg"},attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"}})])]):e._e()])]):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!n.isCollapsed,expression:"!isCollapsed"}],ref:"bodyRef",staticClass:"d2-block-body",style:n.bodyStyle},[n.props.loading&&!n.hasPreview?t("div",{staticClass:"d2-source px-4 py-4"},[t("pre",{staticClass:"d2-code"},[t("code",[e._v(e._s(n.baseCode))])]),n.renderError?t("p",{staticClass:"d2-error mt-2 text-xs"},[e._v(" "+e._s(n.renderError)+" ")]):e._e()]):t("div",[n.showSourceFallback?t("div",{staticClass:"d2-source px-4 py-4"},[t("pre",{staticClass:"d2-code"},[t("code",[e._v(e._s(n.baseCode))])]),n.renderError?t("p",{staticClass:"d2-error mt-2 text-xs"},[e._v(" "+e._s(n.renderError)+" ")]):e._e()]):t("div",{staticClass:"d2-render",style:n.renderStyle},[t("div",{staticClass:"d2-svg",domProps:{innerHTML:e._s(n.svgMarkup)}}),n.renderError?t("p",{staticClass:"d2-error px-4 pb-3 text-xs"},[e._v(" "+e._s(n.renderError)+" ")]):e._e()])])])])},[function(){var e=this,t=e._self._c;return e._self._setupProxy,t("div",{staticClass:"flex items-center gap-x-2"},[t("span",{staticClass:"text-sm font-medium font-mono"},[e._v("D2")])])}],!1,null,"bc9f707f",null,null).exports;Nt.install=e=>{e.component(Nt.__name,Nt)};const Dt=Object.freeze(Object.defineProperty({__proto__:null,default:Nt},Symbol.toStringTag,{value:"Module"}));let jt=null,It=null;const _t=g(m.defineComponent({__name:"InfographicBlockNode",props:{node:null,maxHeight:{default:"500px"},loading:{type:Boolean,default:!0},isDark:{type:Boolean},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}},emits:["copy","export","openModal"],setup(e,{emit:t}){const n=e,{t:o}=ce(),r=m.ref(!1),l=m.ref(!1),i=m.ref(),a=m.ref(!1),s=m.ref("360px"),u=m.ref(!1),c=m.ref(),p=m.ref(null),f=m.ref(1),h=m.ref(0),v=m.ref(0),g=m.ref(!1),w=m.ref({x:0,y:0}),y=m.computed(()=>n.node.code);function x(e){return!e||e.disabled}function M(e){return d(this,null,function*(){try{const n=(new XMLSerializer).serializeToString(e),o=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),r=URL.createObjectURL(o);if("undefined"!=typeof document){const e=document.createElement("a");e.href=r,e.download=`infographic-${Date.now()}.svg`;try{document.body.appendChild(e),e.click(),document.body.removeChild(e)}catch(t){}URL.revokeObjectURL(r)}}catch(n){console.error("Failed to export SVG:",n)}})}function k(e){"Escape"===e.key&&u.value&&C()}function b(){if(u.value=!0,"undefined"!=typeof document)try{document.body.style.overflow="hidden"}catch(e){}if("undefined"!=typeof window)try{window.addEventListener("keydown",k)}catch(e){}m.nextTick(()=>{if(i.value&&c.value){c.value.innerHTML="";const e=document.createElement("div");e.style.transition="transform 0.1s ease",e.style.transformOrigin="center center",e.style.width="100%",e.style.height="100%",e.style.display="flex",e.style.alignItems="center",e.style.justifyContent="center";const t=i.value.cloneNode(!0);t.classList.add("fullscreen"),t.style.height="auto",e.appendChild(t),c.value.appendChild(e),p.value=e,e.style.transform=`translate(${h.value}px, ${v.value}px) scale(${f.value})`}})}function C(){if(u.value=!1,c.value&&(c.value.innerHTML=""),p.value=null,"undefined"!=typeof document)try{document.body.style.overflow=""}catch(e){}if("undefined"!=typeof window)try{window.removeEventListener("keydown",k)}catch(e){}}let T=null;function N(){return d(this,null,function*(){var e;if(i.value)try{const t=yield function(){return d(this,null,function*(){return It||jt||(jt=import("@antv/infographic").then(e=>{const t=e&&e.default?e.default:e;let n=t;return"function"==typeof t&&t.prototype&&t.prototype.render?n=t:e.Infographic?n=e.Infographic:t&&t.Infographic&&(n=t.Infographic),It=n,n}).catch(e=>(console.warn("Failed to load @antv/infographic",e),null)),jt)})}();if(!t)return void console.warn("Infographic library failed to load.");T&&(null==(e=T.destroy)||e.call(T),T=null),i.value.innerHTML="",T=new t({container:i.value,width:"100%",height:"100%"}),T.render(y.value),m.nextTick(()=>{if(i.value){const e=i.value.scrollHeight;e>0&&(s.value=`${Math.min(e,800)}px`)}})}catch(t){console.error("Failed to render infographic:",t),i.value&&(i.value.innerHTML=`<div class="text-red-500 p-4">Failed to render infographic: ${t instanceof Error?t.message:"Unknown error"}</div>`)}})}m.watch(()=>y.value,()=>{a.value||l.value||m.nextTick(()=>{N()})}),m.watch(()=>a.value,e=>{e||l.value||m.nextTick(()=>{N()})}),m.watch(()=>l.value,e=>{e||a.value||m.nextTick(()=>{N()})}),m.onMounted(()=>{a.value||l.value||m.nextTick(()=>{N()})}),m.onBeforeUnmount(()=>{var e;if(T&&(null==(e=T.destroy)||e.call(T),T=null),"undefined"!=typeof window)try{window.removeEventListener("keydown",k)}catch(t){}});const D=m.computed(()=>n.isDark?"infographic-action-btn p-2 text-xs rounded text-gray-400 hover:bg-gray-700 hover:text-gray-200":"infographic-action-btn p-2 text-xs rounded text-gray-600 hover:bg-gray-200 hover:text-gray-700"),j=m.computed(()=>a.value||l.value),I=m.computed(()=>({transform:`translate(${h.value}px, ${v.value}px) scale(${f.value})`}));return m.watch(I,e=>{u.value&&p.value&&(p.value.style.transform=e.transform)}),{__sfc:!0,props:n,_emits:t,t:o,copyText:r,isCollapsed:l,infographicContainer:i,showSource:a,containerHeight:s,isModalOpen:u,modalContent:c,modalCloneWrapper:p,zoom:f,translateX:h,translateY:v,isDragging:g,dragStart:w,baseCode:y,shouldSkipEventTarget:x,onBtnHover:function(e,t,o="top"){if(x(e.currentTarget))return;const r=e,l=null!=(null==r?void 0:r.clientX)&&null!=(null==r?void 0:r.clientY)?{x:r.clientX,y:r.clientY}:void 0;ae(e.currentTarget,t,o,!1,l,n.isDark)},onBtnLeave:function(){se()},onCopyHover:function(e){if(x(e.currentTarget))return;const t=r.value?o("common.copied")||"Copied":o("common.copy")||"Copy",l=e,i=null!=(null==l?void 0:l.clientX)&&null!=(null==l?void 0:l.clientY)?{x:l.clientX,y:l.clientY}:void 0;ae(e.currentTarget,t,"top",!1,i,n.isDark)},copy:function(){return d(this,null,function*(){try{const e=y.value;"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(e)),r.value=!0,setTimeout(()=>{r.value=!1},1e3)}catch(e){console.error("Failed to copy:",e)}})},handleSwitchMode:function(e){a.value="source"===e},handleExportClick:function(){var e;const t=null==(e=i.value)?void 0:e.querySelector("svg");t?M(t):console.error("SVG element not found")},exportSvg:M,handleKeydown:k,openModal:b,closeModal:C,handleOpenModalClick:function(){b()},zoomIn:function(){f.value<3&&(f.value+=.1)},zoomOut:function(){f.value>.5&&(f.value-=.1)},resetZoom:function(){f.value=1,h.value=0,v.value=0},startDrag:function(e){g.value=!0,e instanceof MouseEvent?w.value={x:e.clientX-h.value,y:e.clientY-v.value}:w.value={x:e.touches[0].clientX-h.value,y:e.touches[0].clientY-v.value}},onDrag:function(e){if(!g.value)return;let t,n;e instanceof MouseEvent?(t=e.clientX,n=e.clientY):(t=e.touches[0].clientX,n=e.touches[0].clientY),h.value=t-w.value.x,v.value=n-w.value.y},stopDrag:function(){g.value=!1},infographicInstance:T,renderInfographic:N,computedButtonStyle:D,isFullscreenDisabled:j,transformStyle:I,infographicIconUrl:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUuNTIiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyOTEgMzAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxnPjxwYXRoIGQ9Ik0xNDAuOTA0IDIzOS4zNzZDMTI4LjgzIDIzOS42ODMgMTE5LjY3NSAyMzkuMjk5IDExNS40NDggMjQzLjg0M0MxMTAuOTAyIDI0OC4wNyAxMTEuMjg4IDI1Ny4yMjcgMTEwLjk3OSAyNjkuMzAyQzExMS4xMTggMjc0LjY3NSAxMTEuMTE4IDI3OS40NzggMTExLjQ3MiAyODMuNTJDMTExLjY2MiAyODUuNjM4IDExMS45NSAyODcuNTQ3IDExMi40MDYgMjg5LjIyNEMxMTIuNDExIDI4OS4yNDMgMTEyLjQxNiAyODkuMjU5IDExMi40MjIgMjg5LjI4QzExMi40NjIgMjg5LjQxOSAxMTIuNDk2IDI4OS41NTggMTEyLjUzOSAyODkuNjkxQzExMy4xNjggMjkxLjc4NyAxMTQuMDg4IDI5My40OTEgMTE1LjQ0NiAyOTQuNzU4QzExNi42NjIgMjk2LjA2NCAxMTguMjgzIDI5Ni45NjMgMTIwLjI2NCAyOTcuNjlDMTIwLjM2IDI5Ny42MTQgMTIwLjQ2NCAyOTcuNjQ2IDEyMC41NTUgMjk3LjY3NUMxMjAuNTYgMjk3LjY4IDEyMC41NiAyOTcuNjggMTIwLjU2NiAyOTcuNjhDMTIwLjg0OCAyOTcuNzY4IDEyMS4xNDIgMjk3Ljg0NiAxMjEuNDQzIDI5Ny45MjNDMTIxLjQ1NCAyOTcuOTIzIDEyMS40NjQgMjk3LjkyOCAxMjEuNDc4IDI5Ny45MzRDMTIyLjg3NSAyOTguMjcyIDEyNC40MjQgMjk4LjUwNyAxMjYuMTEgMjk4LjY3OEMxMjYuMzI2IDI5OC42OTYgMTI2LjU0MiAyOTguNzE4IDEyNi43NjMgMjk4LjczOUMxMzAuNzkgMjk5LjA4NiAxMzUuNTU4IDI5OS4wODggMTQwLjkwNCAyOTkuMjIyQzE1Mi45NzQgMjk4LjkxMiAxNjIuMTI4IDI5OS4zMDIgMTY2LjM2IDI5NC43NThDMTcwLjkwNCAyOTAuNTI2IDE3MC41MTUgMjgxLjM3MSAxNzAuODI0IDI2OS4zMDJDMTcwLjUxNSAyNTcuMjI3IDE3MC45MDcgMjQ4LjA3IDE2Ni4zNiAyNDMuODQzQzE2Mi4xMzEgMjM5LjI5OSAxNTIuOTc0IDIzOS42ODMgMTQwLjkwNCAyMzkuMzc2WiIgZmlsbD0iI0ZGNjM3NiI+PC9wYXRoPjxwYXRoIGQ9Ik0yMS4yMTU1IDEyOC4zOThDMTIuNjU1NSAxMjguNjE2IDYuMTY0ODQgMTI4LjMzOSAzLjE2NzUxIDEzMS41NkMtMC4wNTM4MjIyIDEzNC41NiAwLjIxODE3OCAxNDEuMDU0IC0wLjAwMDQ4ODI4MSAxNDkuNjA4QzAuMjE4MTc4IDE1OC4xNjggLTAuMDUzODIyMiAxNjQuNjU5IDMuMTY3NTEgMTY3LjY1NkM2LjE2NDg0IDE3MC44NzggMTIuNjU1NSAxNzAuNjA2IDIxLjIxNTUgMTcwLjgyNEMyNS4wMjYyIDE3MC43MjYgMjguNDI4OCAxNzAuNzI2IDMxLjI5NTUgMTcwLjQ3NUMzMi43OTY4IDE3MC4zNDIgMzQuMTQ4OCAxNzAuMTM2IDM1LjMzODIgMTY5LjgxNEMzNS4zNTQyIDE2OS44MTEgMzUuMzY0OCAxNjkuODA2IDM1LjM3ODIgMTY5LjgwM0MzNS40NzY4IDE2OS43NzQgMzUuNTc1NSAxNjkuNzQ3IDM1LjY2ODggMTY5LjcxOEMzNy4xNTY4IDE2OS4yNzIgMzguMzY0OCAxNjguNjIyIDM5LjI2MzUgMTY3LjY1NkM0MC4xOTE1IDE2Ni43OTUgNDAuODI2MiAxNjUuNjQ2IDQxLjI3MTUgMTY0LjI0M0M0MS4yODc1IDE2NC4xNzQgNDEuMzExNSAxNjQuMTAyIDQxLjMzMjggMTY0LjAzNUM0MS4zMzI4IDE2NC4wMzUgNDEuMzM1NSAxNjQuMDMyIDQxLjMzNTUgMTY0LjAyN0M0MS4zOTY4IDE2My44MjcgNDEuNDUyOSAxNjMuNjIyIDQxLjUwNjIgMTYzLjQwNkM0MS41MDYyIDE2My4zOTggNDEuNTExNSAxNjMuMzkyIDQxLjUxNDIgMTYzLjM4MkM0MS43NTQyIDE2Mi4zOTIgNDEuOTIyMiAxNjEuMjk0IDQyLjA0MjIgMTYwLjA5NkM0Mi4wNTU1IDE1OS45NDQgNDIuMDcxNSAxNTkuNzkyIDQyLjA4NDggMTU5LjYzNUM0Mi4zMzI4IDE1Ni43NzkgNDIuMzMyOCAxNTMuMzk4IDQyLjQyNjIgMTQ5LjYwOEM0Mi4yMDc1IDE0MS4wNTQgNDIuNDg0OCAxMzQuNTYgMzkuMjYzNSAxMzEuNTZDMzYuMjYzNSAxMjguMzM5IDI5Ljc3MjggMTI4LjYxNiAyMS4yMTU1IDEyOC4zOThaIiBmaWxsPSIjRkZDQ0NDIj48L3BhdGg+PHBhdGggZD0iTTgxLjA1OTUgMTg0LjE3MUM3MC44NTY4IDE4NC40MzMgNjMuMTIwOCAxODQuMTAyIDU5LjU0NzUgMTg3Ljk0MkM1NS43MDc1IDE5MS41MTggNTYuMDMyOCAxOTkuMjU0IDU1Ljc3NDIgMjA5LjQ1NEM1Ni4wMzI4IDIxOS42NTcgNTUuNzA3NSAyMjcuMzkzIDU5LjU0NzUgMjMwLjk2M0M2My4xMjA4IDIzNC44MDMgNzAuODU2OCAyMzQuNDc4IDgxLjA1OTUgMjM0LjczOUM4NS42MDA4IDIzNC42MjIgODkuNjU5NSAyMzQuNjIyIDkzLjA3MjggMjM0LjMyM0M5NC44NjQ4IDIzNC4xNjMgOTYuNDc1NSAyMzMuOTIxIDk3Ljg5NDIgMjMzLjUzNEM5Ny45MTAyIDIzMy41MjkgOTcuOTIzNSAyMzMuNTI2IDk3Ljk0MjIgMjMzLjUyMUM5OC4wNTY4IDIzMy40ODYgOTguMTc0MiAyMzMuNDU3IDk4LjI4ODggMjMzLjQyMkMxMDAuMDYgMjMyLjg4OSAxMDEuNSAyMzIuMTEzIDEwMi41NjkgMjMwLjk2M0MxMDMuNjc2IDIyOS45MzcgMTA0LjQzMyAyMjguNTY2IDEwNC45NjQgMjI2Ljg5NEMxMDQuOTg1IDIyNi44MTEgMTA1LjAxMiAyMjYuNzI2IDEwNS4wMzYgMjI2LjY0NkMxMDUuMDQxIDIyNi42NDMgMTA1LjA0MSAyMjYuNjQzIDEwNS4wNDEgMjI2LjYzOEMxMDUuMTE2IDIyNi40MDEgMTA1LjE4IDIyNi4xNTMgMTA1LjI0NCAyMjUuODk3QzEwNS4yNDQgMjI1Ljg4OSAxMDUuMjQ5IDIyNS44ODEgMTA1LjI1NCAyMjUuODY3QzEwNS41NCAyMjQuNjg5IDEwNS43NCAyMjMuMzc5IDEwNS44ODEgMjIxLjk1M0MxMDUuOSAyMjEuNzcxIDEwNS45MTYgMjIxLjU5IDEwNS45MzQgMjIxLjQwM0MxMDYuMjI4IDIxOC4wMDEgMTA2LjIyOCAyMTMuOTY5IDEwNi4zNDIgMjA5LjQ1NEMxMDYuMDgxIDE5OS4yNTQgMTA2LjQxMiAxOTEuNTE4IDEwMi41NzIgMTg3Ljk0MkM5OC45OTU1IDE4NC4xMDIgOTEuMjU2OCAxODQuNDMzIDgxLjA1OTUgMTg0LjE3MVoiIGZpbGw9IiNGRjkzOUYiPjwvcGF0aD48cGF0aCBkPSJNMjYwLjU5MSAxNTEuODdDMjE1LjY1MiAxNTEuODcgMjAzLjAyIDE2NC41MjMgMjAzLjAyIDIwOS40NjJIMTk4LjQ3NkMxOTguNDc2IDE2NC41MjMgMTg1LjgzNiAxNTEuODgxIDE0MC44OTUgMTUxLjg4MVYxNDcuMzM3QzE4NS44MzYgMTQ3LjMzNyAxOTguNDg3IDEzNC43MDUgMTk4LjQ4NyA4OS43NjU5SDIwMy4wMkMyMDMuMDIgMTM0LjcwNSAyMTUuNjUyIDE0Ny4zMzcgMjYwLjU5MSAxNDcuMzM3VjE1MS44N1pNMjg2LjA1MiAxMjQuMTU4QzI4MS44MiAxMTkuNjE0IDI3Mi42NiAxMjAuMDAxIDI2MC41OTEgMTE5LjY4OUMyNDguNTIxIDExOS4zODUgMjM5LjM2MSAxMTkuNzcxIDIzNS4xMjkgMTE1LjIyN0MyMzAuNTg1IDExMC45OTUgMjMwLjk4MyAxMDEuODQ2IDIzMC42NzEgODkuNzY1OUMyMzAuNTEzIDgzLjczMTIgMjMwLjUzNSA3OC40MjcyIDIzMC4wMjMgNzQuMTAxOUMyMjkuNTEzIDY5Ljc2NTkgMjI4LjQ4MSA2Ni40MjE5IDIyNi4yMDkgNjQuMzA0NkMyMjEuOTY3IDU5Ljc2MDYgMjEyLjgxNyA2MC4xNDcyIDIwMC43NDggNTkuODQ1OUMxODguNjgxIDYwLjE0NzIgMTc5LjUxOSA1OS43NjA2IDE3NS4yODcgNjQuMzA0NkMxNzAuNzUzIDY4LjUzNjYgMTcxLjEyOSA3Ny42OTY2IDE3MC44MjggODkuNzY1OUMxNzAuNTE2IDEwMS44MzUgMTcwLjkgMTEwLjk5NSAxNjYuMzU2IDExNS4yMjdDMTYyLjEyNCAxMTkuNzcxIDE1Mi45ODUgMTE5LjM3NCAxNDAuOTA1IDExOS42ODlDMTM4Ljg3MyAxMTkuNzM5IDEzNi45MjQgMTE5Ljc3MSAxMzUuMDcxIDExOS44MTFDMTE5LjMxMyAxMTguNjk3IDEwNi4zMzcgMTEyLjMxOCAxMDYuMzM3IDg5Ljc2NTlDMTA2LjIxMiA4NC42Njk5IDEwNi4yMzMgODAuMTc5MiAxMDUuODA3IDc2LjUyMDZDMTA1LjM2NyA3Mi44NzI2IDEwNC40OTIgNzAuMDM3OSAxMDIuNTc1IDY4LjI1NjZDOTkuMDAxMyA2NC40MTEyIDkxLjI1NzMgNjQuNzQ0NiA4MS4wNjUzIDY0LjQ4MzJDNzAuODYgNjQuNzQ0NiA2My4xMTg2IDY0LjQxMTIgNTkuNTUzMyA2OC4yNTY2QzU1LjcwOCA3MS44Mjk5IDU2LjAzMDYgNzkuNTYzMiA1NS43NjkzIDg5Ljc2NTlDNTYuMDMwNiA5OS45Njg2IDU1LjcwOCAxMDcuNzAyIDU5LjU1MzMgMTExLjI3OEM2My4xMTg2IDExNS4xMTMgNzAuODYgMTE0Ljc5IDgxLjA2NTMgMTE1LjA0OUMxMDMuNjE3IDExNS4wNDkgMTA5Ljk5NiAxMjguMDM1IDExMS4xIDE0My44MDNDMTExLjA2OCAxNDUuNjU5IDExMS4wMjggMTQ3LjU4NyAxMTAuOTc1IDE0OS42MTlDMTExLjEyMSAxNTQuOTg3IDExMS4xMjEgMTU5Ljc5IDExMS40NzYgMTYzLjgzNUMxMTEuNjYzIDE2NS45NSAxMTEuOTQ1IDE2Ny44NTcgMTEyLjQwNCAxNjkuNTM0QzExMi40MTIgMTY5LjU1NSAxMTIuNDEyIDE2OS41NjYgMTEyLjQyMyAxNjkuNTk4QzExMi40NjUgMTY5LjczNCAxMTIuNDk3IDE2OS44NjcgMTEyLjUzNyAxNzAuMDAzQzExMy4xNjQgMTcyLjA5OSAxMTQuMDkyIDE3My44MDkgMTE1LjQ0NyAxNzUuMDdDMTE2LjY2NSAxNzYuMzcxIDExOC4yODEgMTc3LjI3OCAxMjAuMjcxIDE3Ny45MDVDMTIwLjM2NCAxNzcuOTM0IDEyMC40NiAxNzcuOTU1IDEyMC41NjQgMTc3Ljk4N0MxMjAuODU1IDE3OC4wODEgMTIxLjE0NSAxNzguMTUzIDEyMS40MzkgMTc4LjIzOEMxMjEuNDYgMTc4LjIzOCAxMjEuNDcxIDE3OC4yMzggMTIxLjQ3OSAxNzguMjQ5QzEyMi44NzYgMTc4LjU4MiAxMjQuNDIgMTc4LjgyMiAxMjYuMTA4IDE3OC45ODdDMTI2LjMyNyAxNzkuMDA5IDEyNi41NDUgMTc5LjAzIDEyNi43NjQgMTc5LjA1MUMxMzAuNzg4IDE3OS4zOTUgMTM1LjU1OSAxNzkuMzk1IDE0MC45MDUgMTc5LjUyOUMxNTIuOTc1IDE3OS44NDMgMTYyLjEyNCAxNzkuNDU3IDE2Ni4zNTYgMTg0LjAwMUMxNzAuOSAxODguMjMzIDE3MC41MTYgMTk3LjM3MSAxNzAuODI4IDIwOS40NTFDMTcxLjEyOSAyMjEuNTI5IDE3MC43NDMgMjMwLjY4MSAxNzUuMjg3IDIzNC45MUMxNzkuNTE5IDIzOS40NTQgMTg4LjY4MSAyMzkuMDcgMjAwLjc0OCAyMzkuMzcxQzIwNi4xMjcgMjM5LjIzNSAyMTAuOTIxIDIzOS4yMzUgMjE0Ljk3NSAyMzguODgxQzIxNy4wNzkgMjM4LjY5NCAyMTguOTg1IDIzOC40MDMgMjIwLjY3NiAyMzcuOTU1QzIyMC42OTUgMjM3Ljk0NSAyMjAuNzA1IDIzNy45MzQgMjIwLjcyNyAyMzcuOTM0QzIyMC44NzMgMjM3Ljg5MSAyMjAuOTk5IDIzNy44NTkgMjIxLjEzNSAyMzcuODE5QzIyMy4yMjggMjM3LjE5MyAyMjQuOTM3IDIzNi4yNjUgMjI2LjIwOSAyMzQuOTFDMjI3LjUxMSAyMzMuNjkxIDIyOC40MDkgMjMyLjA2NSAyMjkuMDQ0IDIzMC4wOTdDMjI5LjA2NSAyMzAuMDAzIDIyOS4wOTUgMjI5Ljg5OSAyMjkuMTI3IDIyOS44MDNWMjI5Ljc5M0MyMjkuMjIgMjI5LjUxMyAyMjkuMjk1IDIyOS4yMjIgMjI5LjM2NyAyMjguOTE4QzIyOS4zNjcgMjI4Ljg5NyAyMjkuMzc3IDIyOC44OTcgMjI5LjM3NyAyMjguODc4QzIyOS43MjEgMjI3LjQ4MSAyMjkuOTUxIDIyNS45MzcgMjMwLjEyNyAyMjQuMjQ5QzIzMC4xMzcgMjI0LjAzIDIzMC4xNjkgMjIzLjgxMSAyMzAuMTkxIDIyMy41OTNDMjMwLjUzNSAyMTkuNTcxIDIzMC41MzUgMjE0Ljc5OCAyMzAuNjcxIDIwOS40NTFDMjMwLjk3MiAxOTcuMzcxIDIzMC41ODUgMTg4LjIzMyAyMzUuMTI5IDE4NC4wMDFDMjM5LjM2MSAxNzkuNDU3IDI0OC41MTEgMTc5Ljg0MyAyNjAuNTkxIDE3OS41MjlDMjcyLjY2IDE3OS4yMjcgMjgxLjgyIDE3OS42MTQgMjg2LjA1MiAxNzUuMDdDMjkwLjU5NiAxNzAuODM4IDI5MC4yMDkgMTYxLjY4OSAyOTAuNTExIDE0OS42MTlDMjkwLjIwOSAxMzcuNTM5IDI5MC41OTYgMTI4LjM3OSAyODYuMDUyIDEyNC4xNThaIiBmaWxsPSIjRkYzNTZBIj48L3BhdGg+PHBhdGggZD0iTTExMi40MDUgNDkuODQ4QzExMi40MTEgNDkuODY5NCAxMTIuNDE2IDQ5Ljg4MjcgMTEyLjQyMSA0OS45MDRDMTEyLjQ2MSA1MC4wNDI3IDExMi40OTkgNTAuMTgxNCAxMTIuNTM5IDUwLjMxNDdDMTEzLjE3MSA1Mi40MTM0IDExNC4wODggNTQuMTE0NyAxMTUuNDQ4IDU1LjM4NEMxMTYuNjYxIDU2LjY5MDcgMTE4LjI4MyA1Ny41ODk0IDEyMC4yNjQgNTguMjEzNEMxMjAuMzYgNTguMjQgMTIwLjQ2NCA1OC4yNjk0IDEyMC41NTUgNTguMzAxNEMxMjAuNTYgNTguMzA2NyAxMjAuNTYgNTguMzA2NyAxMjAuNTY1IDU4LjMwNjdDMTIwLjg0OCA1OC4zOTQ3IDEyMS4xNDEgNTguNDY5NCAxMjEuNDQzIDU4LjU0NjdDMTIxLjQ1MyA1OC41NDY3IDEyMS40NjQgNTguNTUyIDEyMS40OCA1OC41NTc0QzEyMi44NzUgNTguODk2IDEyNC40MjQgNTkuMTMzNCAxMjYuMTEyIDU5LjMwMTRDMTI2LjMyNSA1OS4zMjI3IDEyNi41NDEgNTkuMzQxNCAxMjYuNzYzIDU5LjM2MjdDMTMwLjc4OSA1OS43MTIgMTM1LjU2IDU5LjcxMiAxNDAuOTA0IDU5Ljg0NTRDMTUyLjk3MyA1OS41Mzg3IDE2Mi4xMjggNTkuOTI4IDE2Ni4zNiA1NS4zODRDMTcwLjkwNyA1MS4xNTIgMTcwLjUxNSA0MS45OTQ3IDE3MC44MjQgMjkuOTI1NEMxNzAuNTE3IDE3Ljg1MDcgMTcwLjkwNyA4LjY5NjAyIDE2Ni4zNjMgNC40NjkzNUMxNjIuMTMxIC0wLjA3NDY1MTEgMTUyLjk3MyAwLjMwOTM0OSAxNDAuOTA0IDEuNTI1ODhlLTA1QzEyOC44MjkgMC4zMDkzNDkgMTE5LjY3NSAtMC4wNzQ2NTExIDExNS40NDggNC40NjkzNUMxMTAuOTA0IDguNjk2MDIgMTExLjI4OCAxNy44NTA3IDExMC45NzkgMjkuOTI1NEMxMTEuMTE3IDM1LjMwMTQgMTExLjExNyA0MC4xMDE0IDExMS40NzIgNDQuMTQ0QzExMS42NjEgNDYuMjYxNCAxMTEuOTQ5IDQ4LjE3MDcgMTEyLjQwNSA0OS44NDhaIiBmaWxsPSIjRkY2Mzc2Ij48L3BhdGg+PC9nPjwvc3ZnPgo=",Portal:pt}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"my-4 rounded-lg border overflow-hidden shadow-sm",class:[n.props.isDark?"border-gray-700/30":"border-gray-200",{"is-rendering":n.props.loading}]},[n.props.showHeader?t("div",{staticClass:"infographic-block-header flex justify-between items-center px-4 py-2.5 border-b",class:n.props.isDark?"bg-gray-800 border-gray-700/30":"bg-gray-50 border-gray-200"},[e.$slots["header-left"]?t("div",[e._t("header-left")],2):t("div",{staticClass:"flex items-center gap-x-2 overflow-hidden"},[t("img",{staticClass:"w-4 h-4 my-0",attrs:{src:n.infographicIconUrl,alt:"Infographic"}}),t("span",{staticClass:"text-sm font-medium font-mono truncate",class:n.props.isDark?"text-gray-400":"text-gray-600"},[e._v("Infographic")])]),e.$slots["header-center"]?t("div",[e._t("header-center")],2):n.props.showModeToggle?t("div",{staticClass:"flex items-center gap-x-1 rounded-md p-0.5",class:n.props.isDark?"bg-gray-700":"bg-gray-100"},[t("button",{staticClass:"px-2.5 py-1 text-xs rounded transition-colors",class:[n.showSource?n.props.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700":n.props.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm"],on:{click:()=>n.handleSwitchMode("preview"),mouseenter:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},focus:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("div",{staticClass:"flex items-center gap-x-1"},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{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",{attrs:{cx:"12",cy:"12",r:"3"}})])]),t("span",[e._v(e._s(n.t("common.preview")||"Preview"))])])]),t("button",{staticClass:"px-2.5 py-1 text-xs rounded transition-colors",class:[n.showSource?n.props.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm":n.props.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"],on:{click:()=>n.handleSwitchMode("source"),mouseenter:function(e){n.onBtnHover(e,n.t("common.source")||"Source")},focus:function(e){n.onBtnHover(e,n.t("common.source")||"Source")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("div",{staticClass:"flex items-center gap-x-1"},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"}})]),t("span",[e._v(e._s(n.t("common.source")||"Source"))])])])]):e._e(),e.$slots["header-right"]?t("div",[e._t("header-right")],2):t("div",{staticClass:"flex items-center gap-x-1"},[n.props.showCollapseButton?t("button",{class:n.computedButtonStyle,attrs:{"aria-pressed":n.isCollapsed},on:{click:function(e){n.isCollapsed=!n.isCollapsed},mouseenter:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},focus:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",style:{rotate:n.isCollapsed?"0deg":"90deg"},attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"}})])]):e._e(),n.props.showCopyButton?t("button",{class:n.computedButtonStyle,on:{click:n.copy,mouseenter:function(e){return n.onCopyHover(e)},focus:function(e){return n.onCopyHover(e)},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.copyText?t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("rect",{attrs:{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}})])])]):e._e(),n.props.showExportButton?t("button",{class:`${n.computedButtonStyle} ${n.isFullscreenDisabled?"opacity-50 cursor-not-allowed":""}`,attrs:{disabled:n.isFullscreenDisabled},on:{click:n.handleExportClick,mouseenter:function(e){n.onBtnHover(e,n.t("common.export")||"Export")},focus:function(e){n.onBtnHover(e,n.t("common.export")||"Export")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}}),t("path",{attrs:{d:"m7 10l5 5l5-5"}})])])]):e._e(),n.props.showFullscreenButton?t("button",{class:`${n.computedButtonStyle} ${n.isFullscreenDisabled?"opacity-50 cursor-not-allowed":""}`,attrs:{disabled:n.isFullscreenDisabled},on:{click:n.handleOpenModalClick,mouseenter:function(e){n.onBtnHover(e,n.isModalOpen?n.t("common.minimize")||"Minimize":n.t("common.open")||"Open")},focus:function(e){n.onBtnHover(e,n.isModalOpen?n.t("common.minimize")||"Minimize":n.t("common.open")||"Open")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.isModalOpen?t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"}})]):t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"}})])]):e._e()])]):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!n.isCollapsed,expression:"!isCollapsed"}]},[n.showSource?t("div",{staticClass:"p-4",class:n.props.isDark?"bg-gray-900":"bg-gray-50"},[t("pre",{staticClass:"text-sm font-mono whitespace-pre-wrap",class:n.props.isDark?"text-gray-300":"text-gray-700"},[e._v(e._s(n.baseCode))])]):t("div",{staticClass:"relative"},[n.props.showZoomControls?t("div",{staticClass:"absolute top-2 right-2 z-10 rounded-lg"},[t("div",{staticClass:"flex items-center gap-2 backdrop-blur rounded-lg"},[t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomIn,mouseenter:function(e){n.onBtnHover(e,n.t("common.zoomIn")||"Zoom in")},focus:function(e){n.onBtnHover(e,n.t("common.zoomIn")||"Zoom in")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomOut,mouseenter:function(e){n.onBtnHover(e,n.t("common.zoomOut")||"Zoom out")},focus:function(e){n.onBtnHover(e,n.t("common.zoomOut")||"Zoom out")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M8 11h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.resetZoom,mouseenter:function(e){n.onBtnHover(e,n.t("common.resetZoom")||"Reset zoom")},focus:function(e){n.onBtnHover(e,n.t("common.resetZoom")||"Reset zoom")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[e._v(" "+e._s(Math.round(100*n.zoom))+"% ")])])]):e._e(),t("div",{staticClass:"min-h-[360px] relative transition-all duration-100 overflow-hidden block",class:n.props.isDark?"bg-gray-900":"bg-gray-50",style:{height:n.containerHeight},on:{mousedown:n.startDrag,mousemove:n.onDrag,mouseup:n.stopDrag,mouseleave:n.stopDrag,"&touchstart":function(e){return n.startDrag.apply(null,arguments)},"&touchmove":function(e){return n.onDrag.apply(null,arguments)},"&touchend":function(e){return n.stopDrag.apply(null,arguments)}}},[t("div",{staticClass:"absolute inset-0 cursor-grab",class:{"cursor-grabbing":n.isDragging},style:n.transformStyle},[t("div",{ref:"infographicContainer",staticClass:"w-full text-center flex items-center justify-center min-h-full"})])])])]),t(n.Portal,{attrs:{to:"body"}},[t("div",{staticClass:"markstream-vue"},[t("transition",{attrs:{name:"infographic-dialog",appear:""}},[n.isModalOpen?t("div",{staticClass:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",on:{click:function(e){return e.target!==e.currentTarget?null:n.closeModal.apply(null,arguments)}}},[t("div",{staticClass:"dialog-panel relative w-full h-full max-w-full max-h-full rounded shadow-lg overflow-hidden",class:n.props.isDark?"bg-gray-900":"bg-white"},[t("div",{staticClass:"absolute top-6 right-6 z-50 flex items-center gap-2"},[t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomIn}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomOut}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M8 11h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.resetZoom}},[e._v(" "+e._s(Math.round(100*n.zoom))+"% ")]),t("button",{staticClass:"inline-flex items-center justify-center p-2 rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.closeModal}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"}})])])]),t("div",{ref:"modalContent",staticClass:"w-full h-full flex items-center justify-center p-4 overflow-hidden",class:{"cursor-grab":!n.isDragging,"cursor-grabbing":n.isDragging},on:{mousedown:n.startDrag,mousemove:n.onDrag,mouseup:n.stopDrag,mouseleave:n.stopDrag,"&touchstart":function(e){return n.startDrag.apply(null,arguments)},"&touchmove":function(e){return n.onDrag.apply(null,arguments)},"&touchend":function(e){return n.stopDrag.apply(null,arguments)}}})])]):e._e()])],1)])],1)},[],!1,null,"1589dd71",null,null).exports,Et=g(m.defineComponent({__name:"MarkdownCodeBlockNode",props:{node:{type:Object,required:!0},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{type:String,default:"vitesse-dark"},lightTheme:{type:String,default:"vitesse-light"},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{type:[String,Number],default:void 0},maxWidth:{type:[String,Number],default:void 0},themes:{type:Array,default:void 0},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0}},emits:["previewCode","copy"],setup(e,{emit:t}){var n,o;const r=e,{t:l}=ce(),i=m.ref(String(null!=(n=r.node.language)?n:"")),a=m.ref(!1),s=m.ref(!1),u=m.ref(!1),c=m.ref(null),p=m.ref(null),h=m.ref(""),v=m.ref(!1);let g;const w=m.ref(!0),y=m.ref(0),x=m.ref(14),M=m.ref(x.value),k=m.computed(()=>{const e=x.value,t=M.value;return"number"==typeof e&&Number.isFinite(e)&&e>0&&"number"==typeof t&&Number.isFinite(t)&&t>0}),b=m.computed(()=>{const e=i.value.trim().toLowerCase();return ct[e]||e.charAt(0).toUpperCase()+e.slice(1)}),C=m.computed(()=>ut(i.value.trim().toLowerCase().split(":")[0])),T=m.computed(()=>{const e=i.value.trim().toLowerCase();return r.isShowPreview&&("html"===e||"svg"===e)}),N=m.computed(()=>{const e={},t=e=>{if(null!=e)return"number"==typeof e?`${e}px`:String(e)},n=t(r.minWidth),o=t(r.maxWidth);return n&&(e.minWidth=n),o&&(e.maxWidth=o),e}),D=m.computed(()=>({fontSize:`${M.value}px`}));function j(){return r.isDark?r.darkTheme:r.lightTheme}function I(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function _(e){if(null==g||g.disconnect(),g=void 0,!e)return h.value="",void(v.value=!1);h.value=`<pre class="shiki shiki-fallback"><code>${I(e)}</code></pre>`,v.value=!1}function E(){h.value="",v.value=!0}function L(){var e;const t=p.value;return!!t&&(t.childNodes.length>0||Boolean(null==(e=t.textContent)?void 0:e.trim().length))}function S(){return d(this,null,function*(){if(yield m.nextTick(),L())return void E();const e=p.value;e&&(null==g||g.disconnect(),g=new MutationObserver(()=>{L()&&(E(),null==g||g.disconnect(),g=void 0)}),g.observe(e,{childList:!0,subtree:!0}))})}let B,A,O,z;const R=new Set,P=new Set,H=void 0!=={url:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:f&&"SCRIPT"===f.tagName.toUpperCase()&&f.src||new URL("index.cjs",document.baseURI).href}&&Boolean(null==(o={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:o.DEV);function U(e,t=!1){var n;const[o]=String(null!=e?e:"").split(":"),r=null!=(n=null==o?void 0:o.trim().toLowerCase())?n:"";return r?!z||z.has(r)?r:(t&&H&&!R.has(r)&&(R.add(r),console.warn(`[MarkdownCodeBlockNode] Language "${r}" not preloaded in stream-markdown; falling back to plaintext.`)),"plaintext"):"plaintext"}function $(e,t){return d(this,null,function*(){if(!B)return;const n=U(t,Boolean(e&&e.length));try{yield B.updateCode(e,n)}catch(o){"plaintext"!==n?(H&&!P.has(n)&&(P.add(n),console.warn(`[MarkdownCodeBlockNode] Failed to render language "${n}", retrying as plaintext.`,o)),yield B.updateCode(e,"plaintext")):H&&console.warn("[MarkdownCodeBlockNode] Failed to render code block even as plaintext.",o)}})}function F(){return d(this,null,function*(){if(!A)try{const e=yield import("stream-markdown");A=e.createShikiStreamRenderer,O=e.registerHighlight;const t=Array.isArray(e.defaultLanguages)?e.defaultLanguages:void 0;z=t?new Set(t.map(e=>e.toLowerCase())):void 0,null==O||O({themes:r.themes})}catch(e){console.warn("[MarkdownCodeBlockNode] stream-markdown not available:",e)}})}function Y(){return d(this,null,function*(){yield F(),c.value&&p.value?(null==O||O({themes:r.themes}),!B&&A&&(B=A(p.value,{theme:j()}),v.value=!0),B?!1===r.stream&&r.loading?_(r.node.code):(_(r.node.code),yield $(r.node.code,i.value),yield S()):_(r.node.code)):_(r.node.code)})}function V(e,t=50){return e.scrollHeight-e.scrollTop-e.clientHeight<=t}function Q(e){return!e||e.disabled}return Y(),m.onMounted(()=>{Y()}),m.onBeforeUnmount(()=>{null==g||g.disconnect(),g=void 0}),m.watch(()=>r.themes,()=>d(this,null,function*(){O&&O({themes:r.themes})})),m.watch(()=>r.loading,e=>{e||Y()}),m.watch(()=>[r.node.code,r.node.language],e=>d(this,[e],function*([e,t]){t!==i.value&&(i.value=t.trim()),c.value&&p.value?(B||(_(e),yield Y()),B&&e&&(!1===r.stream&&r.loading||(_(e),yield $(e,t),yield S()))):_(e)})),m.watch(()=>[r.darkTheme,r.lightTheme],()=>d(this,null,function*(){c.value&&p.value&&(B||(yield Y()),null==B||B.setTheme(j()))})),m.watch(()=>r.node.code,()=>d(this,null,function*(){if(s.value||!w.value)return;yield m.nextTick();const e=c.value;e&&e.scrollHeight>e.clientHeight&&(e.scrollTop=e.scrollHeight)})),{__sfc:!0,props:r,emits:t,t:l,codeLanguage:i,copyText:a,isExpanded:s,isCollapsed:u,codeBlockContent:c,rendererTarget:p,fallbackHtml:h,rendererReady:v,renderObserver:g,autoScrollEnabled:w,lastScrollTop:y,codeFontMin:10,codeFontMax:36,codeFontStep:1,defaultCodeFontSize:x,codeFontSize:M,fontBaselineReady:k,displayLanguage:b,languageIcon:C,isPreviewable:T,containerStyle:N,contentStyle:D,getPreferredColorScheme:j,escapeHtml:I,renderFallback:_,clearFallback:E,hasRendererContent:L,clearFallbackWhenRendererReady:S,renderer:B,createShikiRenderer:A,registerHighlight:O,registeredHighlightLanguages:z,warnedMissingLanguages:R,warnedRendererErrors:P,isDevEnv:H,normalizeRendererLanguage:U,updateRendererWithFallback:$,ensureStreamMarkdownLoaded:F,initRenderer:Y,isAtBottom:V,handleScroll:function(){const e=c.value;if(!e||s.value)return;const t=e.scrollTop;t<y.value?w.value=!1:V(e)&&(w.value=!0),y.value=t},copy:function(){return d(this,null,function*(){try{"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(r.node.code)),a.value=!0,t("copy",r.node.code),setTimeout(()=>{a.value=!1},1e3)}catch(e){console.error("Copy failed:",e)}})},shouldSkipEventTarget:Q,onBtnHover:function(e,t,n="top"){if(Q(e.currentTarget))return;const o=e,l=null!=(null==o?void 0:o.clientX)&&null!=(null==o?void 0:o.clientY)?{x:o.clientX,y:o.clientY}:void 0;ae(e.currentTarget,t,n,!1,l,r.isDark)},onBtnLeave:function(){se()},onCopyHover:function(e){if(Q(e.currentTarget))return;const t=a.value?l("common.copied")||"Copied":l("common.copy")||"Copy",n=e,o=null!=(null==n?void 0:n.clientX)&&null!=(null==n?void 0:n.clientY)?{x:n.clientX,y:n.clientY}:void 0;ae(e.currentTarget,t,"top",!1,o,r.isDark)},toggleExpand:function(){s.value=!s.value;const e=c.value;e&&(s.value?(e.style.maxHeight="none",e.style["overflow-y"]="visible",e.style["overflow-x"]="auto"):(e.style.maxHeight="500px",e.style.overflow="auto",w.value=!0,m.nextTick(()=>{e.scrollHeight>e.clientHeight&&(e.scrollTop=e.scrollHeight)})))},toggleHeaderCollapse:function(){u.value=!u.value},increaseCodeFont:function(){const e=Math.min(36,M.value+1);M.value=e},decreaseCodeFont:function(){const e=Math.max(10,M.value-1);M.value=e},resetCodeFont:function(){M.value=x.value},previewCode:function(){if(!T.value)return;const e=(i.value||r.node.language).toLowerCase(),n="html"===e?"HTML Preview":"SVG Preview";t("previewCode",{type:"html"===e?"text/html":"image/svg+xml",content:r.node.code,title:n})}}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"code-block-container my-4 rounded-lg border overflow-hidden shadow-sm",class:[n.props.isDark?"border-gray-700/30 bg-gray-900":"border-gray-200 bg-white",n.props.isDark?"is-dark":""],style:n.containerStyle},[n.props.showHeader?t("div",{staticClass:"code-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5",staticStyle:{color:"var(--vscode-editor-foreground)","background-color":"var(--vscode-editor-background)"}},[e._t("header-left",function(){return[t("div",{staticClass:"flex items-center space-x-2"},[t("span",{staticClass:"icon-slot h-4 w-4 flex-shrink-0",domProps:{innerHTML:e._s(n.languageIcon)}}),t("span",{staticClass:"text-sm font-medium font-mono"},[e._v(e._s(n.displayLanguage))])])]}),e._t("header-right",function(){return[t("div",{staticClass:"flex items-center space-x-2"},[t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-pressed":n.isCollapsed},on:{click:n.toggleHeaderCollapse,mouseenter:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},focus:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",style:{rotate:n.isCollapsed?"0deg":"90deg"},attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"}})])]),n.props.showFontSizeButtons&&n.props.enableFontSizeControl?[t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!!Number.isFinite(n.codeFontSize)&&n.codeFontSize<=n.codeFontMin},on:{click:function(e){return n.decreaseCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.decrease")||"Decrease")},focus:function(e){n.onBtnHover(e,n.t("common.decrease")||"Decrease")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"}})])]),t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!n.fontBaselineReady||n.codeFontSize===n.defaultCodeFontSize},on:{click:function(e){return n.resetCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.reset")||"Reset")},focus:function(e){n.onBtnHover(e,n.t("common.reset")||"Reset")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}}),t("path",{attrs:{d:"M3 3v5h5"}})])])]),t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button",disabled:!!Number.isFinite(n.codeFontSize)&&n.codeFontSize>=n.codeFontMax},on:{click:function(e){return n.increaseCodeFont()},mouseenter:function(e){n.onBtnHover(e,n.t("common.increase")||"Increase")},focus:function(e){n.onBtnHover(e,n.t("common.increase")||"Increase")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"}})])])]:e._e(),n.props.showCopyButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-label":n.copyText?n.t("common.copied")||"Copied":n.t("common.copy")||"Copy"},on:{click:n.copy,mouseenter:function(e){return n.onCopyHover(e)},focus:function(e){return n.onCopyHover(e)},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.copyText?t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("rect",{attrs:{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}})])])]):e._e(),n.props.showExpandButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-pressed":n.isExpanded},on:{click:n.toggleExpand,mouseenter:function(e){n.onBtnHover(e,n.isExpanded?n.t("common.collapse")||"Collapse":n.t("common.expand")||"Expand")},focus:function(e){n.onBtnHover(e,n.isExpanded?n.t("common.collapse")||"Collapse":n.t("common.expand")||"Expand")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.isExpanded?t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"}})]):t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"}})])]):e._e(),n.isPreviewable&&n.props.showPreviewButton?t("button",{staticClass:"code-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]",attrs:{type:"button","aria-label":n.t("common.preview")||"Preview"},on:{click:n.previewCode,mouseenter:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},focus:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{"data-v-3d59cc65":"",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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{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",{attrs:{cx:"12",cy:"12",r:"3"}})])])]):e._e()],2)]})],2):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!(n.isCollapsed||!e.stream&&e.loading),expression:"!isCollapsed && (stream ? true : !loading)"}],ref:"codeBlockContent",staticClass:"code-block-content",style:n.contentStyle,on:{scroll:n.handleScroll}},[t("div",{ref:"rendererTarget",staticClass:"code-block-render"}),n.rendererReady?e._e():t("div",{staticClass:"code-fallback-plain",domProps:{innerHTML:e._s(n.fallbackHtml)}})]),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.stream&&e.loading,expression:"!stream && loading"}],staticClass:"code-loading-placeholder"},[e._t("loading",function(){return[e._m(0)]},{loading:e.loading,stream:e.stream})],2)])},[function(){var e=this._self._c;return this._self._setupProxy,e("div",{staticClass:"loading-skeleton"},[e("div",{staticClass:"skeleton-line"}),e("div",{staticClass:"skeleton-line"}),e("div",{staticClass:"skeleton-line short"})])}],!1,null,"50ee25fb",null,null).exports;let Lt=null,St=null,Bt=!1;const At=new Map,Ot=new Map;let zt=5;const Rt=new Set;function Pt(){if(At.size<zt&&Rt.size){const t=Array.from(Rt);Rt.clear();for(const n of t)try{n()}catch(e){}}}let Ht=null;const Ut=void 0!=={url:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:f&&"SCRIPT"===f.tagName.toUpperCase()&&f.src||new URL("index.cjs",document.baseURI).href}&&Boolean(null==(e={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:e.DEV);try{"undefined"!=typeof window&&Ut&&Promise.resolve().then(()=>require("./performance-monitor.js")).then(e=>{Ht=e.perfMonitor})}catch(Vo){}function $t(e,t=!0,n=2e3,o){return d(this,null,function*(){const r=performance.now();if(!Me()){const e=new Error("KaTeX rendering disabled");return e.name="KaTeXDisabled",e.code="KATEX_DISABLED",Promise.reject(e)}if(St)return Promise.reject(St);const l=`${t?"d":"i"}:${e}`,i=Ot.get(l);if(i)return Ht&&Ht.recordRender({type:"cache-hit",duration:performance.now()-r,formulaLength:e.length,timestamp:Date.now(),success:!0}),Promise.resolve(i);const a=Lt||(St=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),St.name="WorkerInitError",St.code="WORKER_INIT_ERROR",null);if(!a)return Promise.reject(St);if(At.size>=zt){const t=new Error("Worker busy");return t.name="WorkerBusy",t.code="WORKER_BUSY",t.busy=!0,t.inFlight=At.size,t.max=zt,Ht&&Ht.recordRender({type:"worker",duration:performance.now()-r,formulaLength:e.length,timestamp:Date.now(),success:!1,error:"busy"}),Promise.reject(t)}return new Promise((l,i)=>{if(null==o?void 0:o.aborted){const e=new Error("Aborted");return e.name="AbortError",void i(e)}const s=Math.random().toString(36).slice(2),u=globalThis.setTimeout(()=>{At.delete(s);const t=new Error("Worker render timed out");t.name="WorkerTimeout",t.code="WORKER_TIMEOUT",Ht&&Ht.recordRender({type:"worker",duration:performance.now()-r,formulaLength:e.length,timestamp:Date.now(),success:!1,error:"timeout"}),i(t),Pt()},n);o&&o.addEventListener("abort",()=>{globalThis.clearTimeout(u),At.has(s)&&At.delete(s);const e=new Error("Aborted");e.name="AbortError",i(e),Pt()},{once:!0});const c=l,d=i;At.set(s,{resolve:t=>{Ht&&Ht.recordRender({type:"worker",duration:performance.now()-r,formulaLength:e.length,timestamp:Date.now(),success:!0}),c(t)},reject:t=>{Ht&&Ht.recordRender({type:"worker",duration:performance.now()-r,formulaLength:e.length,timestamp:Date.now(),success:!1,error:(null==t?void 0:t.message)||String(t)}),d(t)},timeoutId:u}),a.postMessage({id:s,content:e,displayMode:t})})})}function Ft(e,t=!0,n){const o=`${t?"d":"i"}:${e}`;if(Ot.set(o,n),Ot.size>200){const e=Ot.keys().next().value;Ot.delete(e)}}const Yt="WORKER_BUSY";function Vt(e=2e3,t){return At.size<zt?Promise.resolve():new Promise((n,o)=>{let r,l=!1;const i=()=>{l||(l=!0,r&&globalThis.clearTimeout(r),Rt.delete(i),n())};if(Rt.add(i),r=globalThis.setTimeout(()=>{if(l)return;l=!0,Rt.delete(i);const e=new Error("Wait for worker slot timed out");e.name="WorkerBusyTimeout",e.code="WORKER_BUSY_TIMEOUT",o(e)},e),queueMicrotask(()=>Pt()),t){const e=()=>{if(l)return;l=!0,r&&globalThis.clearTimeout(r),Rt.delete(i);const e=new Error("Aborted");e.name="AbortError",o(e)};t.aborted?e():t.addEventListener("abort",e,{once:!0})}})}const Qt={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function Wt(e){return d(this,arguments,function*(e,t=!0,n={}){var o,r,l,i;if(!Me()){const e=new Error("KaTeX rendering disabled");throw e.name="KaTeXDisabled",e.code="KATEX_DISABLED",e}const a=null!=(o=n.timeout)?o:Qt.timeout,s=null!=(r=n.waitTimeout)?r:Qt.waitTimeout,u=null!=(l=n.backoffMs)?l:Qt.backoffMs,c=null!=(i=n.maxRetries)?i:Qt.maxRetries,d=Number.isFinite(c)?Math.max(0,Math.min(Math.floor(c),8)):Qt.maxRetries,p=n.signal;let m=0;for(;;){if(null==p?void 0:p.aborted){const e=new Error("Aborted");throw e.name="AbortError",e}try{return yield $t(e,t,a,p)}catch(f){if((null==f?void 0:f.code)!==Yt||m>=d)throw f;if(m++,yield Vt(s,p).catch(()=>{}),null==p?void 0:p.aborted){const e=new Error("Aborted");throw e.name="AbortError",e}u>0&&(yield new Promise(e=>globalThis.setTimeout(e,u*m)))}}})}const Kt=g(m.defineComponent({__name:"MathBlockNode",props:{node:null},setup(e){const t=e,n=m.ref(null),o=m.ref(null);let r=!1,l=0,i=!1,a=null;const s=pe();let u=null;const c=m.ref(!0);function p(){return d(this,null,function*(){if(!o.value||i)return;if(!t.node.content)return c.value=!1,o.value.textContent=t.node.raw,void(r=!0);if(!r)try{!u&&n.value&&(u=s(n.value)),yield null==u?void 0:u.whenVisible}catch(Vo){}a&&(a.abort(),a=null);const e=++l,p=new AbortController;a=p,Wt(t.node.content,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:1,signal:p.signal}).then(t=>{i||e!==l||o.value&&(o.value.innerHTML=t,r=!0,c.value=!1)}).catch(n=>d(this,null,function*(){if(i||e!==l)return;if(!o.value)return;const a=(null==n?void 0:n.code)||(null==n?void 0:n.name),s="KATEX_DISABLED"===a;if("WORKER_INIT_ERROR"===a||(null==n?void 0:n.fallbackToRenderer)||a===Yt||"WORKER_TIMEOUT"===a){const e=yield ke();if(e){try{const n=e.renderToString(t.node.content,{throwOnError:t.node.loading,displayMode:!0});o.value.innerHTML=n,r=!0,c.value=!1,Ft(t.node.content,!0,n)}catch(Vo){}return}}if(s)return c.value=!1,void(o.value.textContent=t.node.raw);r||(c.value=!0),t.node.loading||(c.value=!1,o.value.textContent=t.node.raw)}))})}return m.watch(()=>[t.node.content,t.node.loading,t.node.raw],()=>p()),m.onMounted(()=>{p()}),m.onBeforeUnmount(()=>{var e;i=!0,a&&(a.abort(),a=null),null==(e=null==u?void 0:u.destroy)||e.call(u),u=null}),{__sfc:!0,props:t,containerEl:n,mathBlockElement:o,hasRenderedOnce:r,currentRenderId:l,isUnmounted:i,currentAbortController:a,registerVisibility:s,visibilityHandle:u,renderingLoading:c,renderMath:p}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{ref:"containerEl",staticClass:"math-block text-center overflow-x-auto relative min-h-[40px]"},[t("transition",{attrs:{name:"math-fade"}},[n.renderingLoading?t("div",{staticClass:"math-loading-overlay"},[t("div",{staticClass:"math-loading-spinner"})]):e._e()]),t("div",{ref:"mathBlockElement",class:{"math-rendering":n.renderingLoading}})],1)},[],!1,null,"16fb6236",null,null).exports,Xt=g(m.defineComponent({__name:"MathInlineNode",props:{node:null},setup(e){const t=e,n=m.ref(null),o=m.ref(null);let r=!1,l=0,i=!1,a=null;const s=m.ref(!0),u=pe();let c=null;function p(){return d(this,null,function*(){if(!o.value||i)return;if(!t.node.content)return s.value=!1,o.value.textContent=t.node.raw,void(r=!0);a&&(a.abort(),a=null);const e=++l,p=new AbortController;if(a=p,!r)try{!c&&n.value&&(c=u(n.value)),yield null==c?void 0:c.whenVisible}catch(Vo){}const m="$$"===t.node.markup;Wt(t.node.content,m,{timeout:1500,waitTimeout:0,maxRetries:0,signal:p.signal}).then(t=>{i||e!==l||o.value&&(o.value.innerHTML=t,s.value=!1,r=!0)}).catch(n=>d(this,null,function*(){if(i||e!==l)return;if(!o.value)return;const a=(null==n?void 0:n.code)||(null==n?void 0:n.name),u="KATEX_DISABLED"===a;if("WORKER_INIT_ERROR"===a||(null==n?void 0:n.fallbackToRenderer)||a===Yt||"WORKER_TIMEOUT"===a){const e=yield ke();if(e){try{const n="$$"===t.node.markup,l=e.renderToString(t.node.content,{throwOnError:t.node.loading,displayMode:n});s.value=!1,o.value.innerHTML=l,r=!0,Ft(t.node.content,n,l)}catch(Vo){}return}}if(u)return s.value=!1,void(o.value.textContent=t.node.raw);r||(s.value=!u),t.node.loading?u&&(o.value.textContent=t.node.raw):(s.value=!1,o.value.textContent=t.node.raw)}))})}return m.watch(()=>[t.node.content,t.node.loading,t.node.markup,t.node.raw],()=>p()),m.onMounted(()=>{p()}),m.onBeforeUnmount(()=>{var e;i=!0,a&&(a.abort(),a=null),null==(e=null==c?void 0:c.destroy)||e.call(c),c=null}),{__sfc:!0,props:t,containerEl:n,mathElement:o,hasRenderedOnce:r,currentRenderId:l,isUnmounted:i,currentAbortController:a,renderingLoading:s,registerVisibility:u,visibilityHandle:c,renderMath:p}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("span",{ref:"containerEl",staticClass:"math-inline-wrapper"},[t("span",{directives:[{name:"show",rawName:"v-show",value:!n.renderingLoading,expression:"!renderingLoading"}],ref:"mathElement",staticClass:"math-inline"}),n.renderingLoading?t("transition",{attrs:{name:"table-node-fade"}},[t("span",{staticClass:"math-inline__loading",attrs:{role:"status","aria-live":"polite"}},[e._t("loading",function(){return[t("span",{staticClass:"math-inline__spinner animate-spin",attrs:{"aria-hidden":"true"}}),t("span",{staticClass:"sr-only"},[e._v("Loading")])]},{isLoading:n.renderingLoading})],2)]):e._e()],1)},[],!1,null,"ad191b1c",null,null).exports,qt=()=>import("mermaid");let Zt=null,Gt=qt;function Jt(e){Gt=e,Zt=null}function en(){return"function"==typeof Gt}function tn(e){if(!e)return e;const t=e&&e.default?e.default:e;if(t&&("function"==typeof t.render||"function"==typeof t.parse||"function"==typeof t.initialize))return t;if(t&&t.mermaidAPI&&("function"==typeof t.mermaidAPI.render||"function"==typeof t.mermaidAPI.parse)){const e=t.mermaidAPI;return u(s({},t),{render:e.render.bind(e),parse:e.parse?e.parse.bind(e):void 0,initialize:n=>"function"==typeof t.initialize?t.initialize(n):e.initialize?e.initialize(n):void 0})}return e.mermaid&&"function"==typeof e.mermaid.render?e.mermaid:t}function nn(e){if(e)try{const t=null==e?void 0:e.initialize;e.initialize=n=>{const o=s({suppressErrorRendering:!0},n||{});return"function"==typeof t?t.call(e,o):(null==e?void 0:e.mermaidAPI)&&"function"==typeof e.mermaidAPI.initialize?e.mermaidAPI.initialize(o):void 0}}catch(Vo){}}let on=null,rn=null;const ln=new Map;let an=5,sn=!1;const un="WORKER_BUSY",cn="MERMAID_DISABLED";function dn(e,t,n=1400){if(!en()){const e=new Error("Mermaid rendering disabled");return e.name="MermaidDisabled",e.code=cn,Promise.reject(e)}if(rn)return Promise.reject(rn);const o=on||(rn=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),rn.name="WorkerInitError",rn.code="WORKER_INIT_ERROR",null);if(!o)return Promise.reject(rn);if(ln.size>=an){const e=new Error("Worker busy");return e.name="WorkerBusy",e.code=un,e.inFlight=ln.size,e.max=an,Promise.reject(e)}return new Promise((r,l)=>{const i=Math.random().toString(36).slice(2);let a,s=!1;const u=()=>{s||(s=!0,null!=a&&globalThis.clearTimeout(a),ln.delete(i))},c={resolve:e=>{u(),r(e)},reject:e=>{u(),l(e)}};ln.set(i,c);try{o.postMessage({id:i,action:e,payload:t})}catch(d){return ln.delete(i),void l(d)}a=globalThis.setTimeout(()=>{const e=new Error("Worker call timed out");e.name="WorkerTimeout",e.code="WORKER_TIMEOUT";const t=ln.get(i);t&&t.reject(e)},n)})}function pn(e,t,n=1400){return d(this,null,function*(){try{return yield dn("canParse",{code:e,theme:t},n)}catch(Vo){return Promise.reject(Vo)}})}function mn(e,t,n=1400){return d(this,null,function*(){try{return yield dn("findPrefix",{code:e,theme:t},n)}catch(Vo){return Promise.reject(Vo)}})}function fn(){if(on)try{for(const[e,t]of ln.entries())t.reject(new Error("Worker terminated"));ln.clear(),on.terminate()}finally{on=null}}const hn=g(m.defineComponent({__name:"MermaidBlockNode",props:{node:null,maxHeight:{default:"500px"},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!1}},emits:["copy","export","openModal","toggleMode"],setup(e,{emit:t}){var n,o;const r=e,l={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},i=m.ref(!1),a=m.computed(()=>r.isStrict?"strict":"loose"),c=m.computed(()=>({startOnLoad:!1,securityLevel:a.value,dompurifyConfig:"strict"===a.value?l:void 0,flowchart:"strict"===a.value?{htmlLabels:!1}:void 0}));function p(e){return e.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#")}const h=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],v=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function g(e){if(!e)return"";const t=e.trim();return v.test(t)?t:""}function w(e){const t=new Set(["script"]),n=[e,...Array.from(e.querySelectorAll("*"))];for(const o of n){if(t.has(o.tagName.toLowerCase())){o.remove();continue}const e=Array.from(o.attributes);for(const t of e){const e=t.name;if(/^on/i.test(e))o.removeAttribute(e);else{if("style"===e&&t.value){const n=t.value;if(h.some(e=>e.test(n))){o.removeAttribute(e);continue}}if(("href"===e||"xlink:href"===e)&&t.value){const n=g(t.value);if(!n){o.removeAttribute(e);continue}n!==t.value&&o.setAttribute(e,n)}}}}}function y(e){if("undefined"==typeof window||"undefined"==typeof DOMParser)return null;if(!e)return null;const t=p(e),n=(new DOMParser).parseFromString(t,"image/svg+xml").documentElement;if(!n||"svg"!==n.nodeName.toLowerCase())return null;const o=n;return w(o),o}function x(e,t){if(!e)return"";try{e.replaceChildren()}catch(Vo){e.innerHTML=""}const n=y(t);return n?(e.appendChild(n),e.innerHTML):""}function M(e){if(e)try{e.replaceChildren()}catch(Vo){e.innerHTML=""}}function k(e,t){if(!e)return"";if("strict"===a.value)return x(e,t);try{e.replaceChildren()}catch(Vo){e.innerHTML=""}if(t)try{e.insertAdjacentHTML("afterbegin",t)}catch(Vo){e.innerHTML=t}return e.innerHTML}const{t:b}=ce();function C(){return d(this,null,function*(){try{const e=yield function(){return d(this,null,function*(){if(Zt)return Zt;const e=function(){try{const e=globalThis;return tn(null==e?void 0:e.mermaid)}catch(Vo){return null}}();if(e)return Zt=e,nn(Zt),Zt;const t=Gt;if(!t)return null;let n;try{n=yield t()}catch(o){if(t===qt)throw new Error('Optional dependency "mermaid" is not installed. Please install it to enable mermaid diagrams.');throw o}return n?(Zt=tn(n),nn(Zt),Zt):null})}();return i.value=!!e,e}catch(e){throw i.value=!1,e}})}"undefined"!=typeof window&&(()=>{d(this,null,function*(){var e;try{const t=yield C();if(!t)return;null==(e=null==t?void 0:t.initialize)||e.call(t,s({},c.value))}catch(t){i.value=!1,console.warn("[markstream-vue2] Failed to initialize mermaid renderer. Call enableMermaid() to configure a loader.",t)}})})();const T=m.ref(!1),N=m.ref(!1),D=m.ref(),j=m.ref(),I=m.ref(),_=m.ref(null),E=pe();let L=null;const S=m.ref("undefined"==typeof window),B=m.ref(),A=m.computed(()=>r.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function O(e,t=A.value){const n=t,o=`%%{init: {"theme": "${"dark"===e?"dark":"default"}"}}%%\n`;return n.trim().startsWith("%%{")?n:o+n}const z=m.ref(1),R=m.ref(0),P=m.ref(0),H=m.ref(!1),U=m.ref({x:0,y:0}),$=m.ref(!1),F=m.ref(!1),Y=m.ref(!1),V=m.ref(null),Q=m.ref(0),W=m.ref(!1);let K=null,X=null,q=0;const Z=null!=(n=globalThis.requestIdleCallback)?n:(e,t)=>setTimeout(()=>e({didTimeout:!0}),16),G=Ye(()=>{Z(()=>{Ze()},{timeout:500})},300);function J(){null!=X&&(globalThis.clearTimeout(X),X=null)}function ee(e=600){if("undefined"==typeof globalThis)return;const t=Math.max(0,e);J(),X=globalThis.setTimeout(()=>{X=null,r.loading||Y.value||!S.value?ee(Math.min(1200,Math.max(300,1.2*t))):G()},t)}const te=m.ref("360px");let ne=null;const oe=m.ref(!1),re=m.ref(!1),le=m.ref({}),ie=m.ref(null),ue=m.ref(""),de=m.ref(0);let me=null;const fe=m.ref(!1),he=m.ref({zoom:1,translateX:0,translateY:0,containerHeight:"360px"}),ve=m.computed(()=>r.enableWheelZoom?{wheel:Qe}:{}),ge=m.computed(()=>{var e,t,n,o;return{worker:null!=(e=r.workerTimeoutMs)?e:1400,parse:null!=(t=r.parseTimeoutMs)?t:1800,render:null!=(n=r.renderTimeoutMs)?n:2500,fullRender:null!=(o=r.fullRenderTimeoutMs)?o:4e3}}),we=null!=(o=globalThis.cancelIdleCallback)?o:e=>clearTimeout(e);let ye=null,xe=null,Me=!1,ke=800,be=null,Ce=0,Te=!0,Ne=0;function De(e,t){const n=null==t?void 0:t.timeoutMs,o=null==t?void 0:t.signal;if(null==o?void 0:o.aborted)return Promise.reject(new DOMException("Aborted","AbortError"));let r=null,l=!1,i=null;return new Promise((t,a)=>{const s=()=>{null!=r&&clearTimeout(r),i&&o&&o.removeEventListener("abort",i)};n&&n>0&&(r=globalThis.setTimeout(()=>{l||(l=!0,s(),a(new Error("Operation timed out")))},n)),o&&(i=()=>{l||(l=!0,s(),a(new DOMException("Aborted","AbortError")))},o.addEventListener("abort",i)),e().then(e=>{l||(l=!0,s(),t(e))}).catch(e=>{l||(l=!0,s(),a(e))})})}function je(e){if("undefined"==typeof document)return;if(!j.value)return;const t=document.createElement("div");t.className="text-red-500 p-4",t.textContent="Failed to render diagram: ";const n=document.createElement("span");n.textContent=e instanceof Error?e.message:"Unknown error",t.appendChild(n),M(j.value),j.value.appendChild(t),te.value="360px",fe.value=!0,Ge()}function Ie(e){const t="string"==typeof e?e:"string"==typeof(null==e?void 0:e.message)?e.message:"";return"string"==typeof t&&/timed out/i.test(t)}function _e(e){return!e||e.disabled}function Ee(e,t){const n=`%%{init: {"theme": "${"dark"===t?"dark":"default"}"}}%%\n`;return e.trimStart().startsWith("%%{")?e:n+e}function Le(){return Te&&!$.value&&!oe.value&&!fe.value}function Se(e){const t=e.split(/\r?\n/);for(;t.length>0;){const e=t[t.length-1].trimEnd();if(""!==e){if(!(/^[-=~>|<\s]+$/.test(e.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(e)||/[-|><]$/.test(e)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(e)))break;t.pop()}else t.pop()}return t.join("\n")}function Be(e,t,n){return d(this,null,function*(){var o,r;const l=yield C();if(!l)return;const i=l,a=Ee(e,t);if("function"==typeof i.parse)return yield De(()=>i.parse(a),{timeoutMs:null!=(o=null==n?void 0:n.timeoutMs)?o:ge.value.parse,signal:null==n?void 0:n.signal}),!0;const s=`mermaid-parse-${Math.random().toString(36).slice(2,9)}`;return yield De(()=>l.render(s,a),{timeoutMs:null!=(r=null==n?void 0:n.timeoutMs)?r:ge.value.render,signal:null==n?void 0:n.signal}),!0})}function Ae(e,t,n){return d(this,null,function*(){var o;try{return yield pn(e,t,null!=(o=null==n?void 0:n.timeoutMs)?o:ge.value.worker)}catch(Vo){return yield Be(e,t,n)}})}function Oe(e,t,n){return d(this,null,function*(){var o;try{if(yield Ae(e,t,n))return{fullOk:!0,prefixOk:!1}}catch(Vo){if("AbortError"===(null==Vo?void 0:Vo.name))throw Vo}let r=Se(e);if(r&&r.trim()&&r!==e)try{try{const l=yield mn(e,t,null!=(o=null==n?void 0:n.timeoutMs)?o:ge.value.worker);l&&l.trim()&&(r=l)}catch(Vo){}if(yield Ae(r,t,n))return{fullOk:!1,prefixOk:!0,prefix:r}}catch(Vo){if("AbortError"===(null==Vo?void 0:Vo.name))throw Vo}return{fullOk:!1,prefixOk:!1}})}"undefined"!=typeof window&&m.watch(()=>D.value,e=>{if(null==L||L.destroy(),L=null,!e)return void(S.value=!1);const t=E(e,{rootMargin:"400px"});L=t,S.value=t.isVisible.value,t.whenVisible.then(()=>{S.value=!0})},{immediate:!0}),m.onBeforeUnmount(()=>{null==L||L.destroy(),L=null});const ze=m.computed(()=>$.value||Y.value||N.value);function Re(e){if(!D.value||!j.value)return;const t=j.value.querySelector("svg");if(!t)return;let n=0,o=0;const r=t.getAttribute("viewBox"),l=t.getAttribute("width"),i=t.getAttribute("height");if(r){const e=r.split(" ");4===e.length&&(n=Number.parseFloat(e[2]),o=Number.parseFloat(e[3]))}if(n&&o||l&&i&&(n=Number.parseFloat(l),o=Number.parseFloat(i)),Number.isNaN(n)||Number.isNaN(o)||n<=0||o<=0)try{const e=t.getBBox();e&&e.width>0&&e.height>0&&(n=e.width,o=e.height)}catch(Vo){return void console.error("Failed to get SVG BBox:",Vo)}if(n>0&&o>0){const t=o/n;let r=(null!=e?e:D.value.clientWidth)*t;r>o&&(r=o),te.value=`${r}px`}}const Pe=m.ref(!1),He=m.computed(()=>({transform:`translate(${R.value}px, ${P.value}px) scale(${z.value})`}));function Ue(e){"Escape"===e.key&&Pe.value&&Fe()}function $e(){if(Pe.value=!0,"undefined"!=typeof document)try{document.body.style.overflow="hidden"}catch(Vo){}if("undefined"!=typeof window)try{window.addEventListener("keydown",Ue)}catch(Vo){}m.nextTick(()=>{if(D.value&&I.value){const e=D.value.cloneNode(!0);e.classList.add("fullscreen");const t=e.querySelector("[data-mermaid-wrapper]");t&&(_.value=t,t.style.transform=He.value.transform),M(I.value),I.value.appendChild(e)}})}function Fe(){if(Pe.value=!1,I.value&&M(I.value),_.value=null,"undefined"!=typeof document)try{document.body.style.overflow=""}catch(Vo){}if("undefined"!=typeof window)try{window.removeEventListener("keydown",Ue)}catch(Vo){}}function Ye(e,t){let n=null;return(...o)=>{n&&clearTimeout(n),n=setTimeout(()=>e(...o),t)}}function Ve(){if(!$.value)return;if(!i.value)return;const e=A.value.length;e!==Q.value&&(W.value=!0,Q.value=e,K&&clearTimeout(K),K=setTimeout(()=>{W.value&&$.value&&A.value.trim()&&(W.value=!1,Ke("preview"))},500))}function Qe(e){if(r.enableWheelZoom&&(e.ctrlKey||e.metaKey)){if(e.preventDefault(),!D.value)return;const t=D.value.getBoundingClientRect(),n=e.clientX-t.left,o=e.clientY-t.top,r=n-t.width/2,l=o-t.height/2,i=(r-R.value)/z.value,a=(l-P.value)/z.value,s=.01,u=-e.deltaY*s,c=Math.min(Math.max(z.value+u,.5),3);c!==z.value&&(R.value=r-i*c,P.value=l-a*c,z.value=c)}}function We(e,t=null){return d(this,null,function*(){try{const n=null!=t?t:(new XMLSerializer).serializeToString(e),o=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),r=URL.createObjectURL(o);if("undefined"!=typeof document){const e=document.createElement("a");e.href=r,e.download=`mermaid-diagram-${Date.now()}.svg`;try{document.body.appendChild(e),e.click(),document.body.removeChild(e)}catch(Vo){}URL.revokeObjectURL(r)}}catch(n){console.error("Failed to export SVG:",n)}})}function Ke(e){return d(this,null,function*(){const t=B.value;if(!t)return F.value=!0,void($.value="source"===e);const n=t.getBoundingClientRect().height;t.style.height=`${n}px`,t.style.overflow="hidden",F.value=!0,$.value="source"===e,yield m.nextTick();const o=t.scrollHeight;t.style.transition="height 180ms ease",t.offsetHeight,t.style.height=`${o}px`;const r=()=>{t.style.transition="",t.style.height="",t.style.overflow="",t.removeEventListener("transitionend",l)};function l(){r()}t.addEventListener("transitionend",l),setTimeout(()=>r(),220)})}function Xe(){return d(this,null,function*(){return Y.value?V.value:j.value||(yield m.nextTick(),j.value)?(Y.value=!0,V.value=(()=>d(this,null,function*(){var e,t;j.value&&(j.value.style.opacity="0");try{const t=yield C();if(!t)return;const n=`mermaid-${Date.now()}-${Math.random().toString(36).substring(2,11)}`;oe.value||re.value||null==(e=t.initialize)||e.call(t,u(s({},c.value),{dompurifyConfig:s({},l)}));const o=O(r.isDark?"dark":"light"),i=yield De(()=>t.render(n,o),{timeoutMs:ge.value.fullRender}),a=null==i?void 0:i.svg;if(j.value){const e=k(j.value,a);oe.value||re.value||(Re(),oe.value=!0,he.value={zoom:z.value,translateX:R.value,translateY:P.value,containerHeight:te.value});const t=r.isDark?"dark":"light";e&&(le.value[t]=e),re.value&&(re.value=!1),fe.value=!1,q=0,J()}}catch(n){const e=Ie(n),o=q+1;e&&o<=3?(q=o,ee(Math.min(1200,600*o)),void 0!=={url:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:f&&"SCRIPT"===f.tagName.toUpperCase()&&f.src||new URL("index.cjs",document.baseURI).href}&&(null==(t={BASE_URL:"/",MODE:"npm",DEV:!1,PROD:!0,SSR:!1})?void 0:t.DEV)&&console.warn("[markstream-vue2] Mermaid render timed out, retry scheduled:",o)):(q=0,J(),console.error("Failed to render mermaid diagram:",n),!1===r.loading&&je(n))}finally{yield m.nextTick(),j.value&&(j.value.style.opacity="1"),Y.value=!1,V.value=null}}))(),V.value):void console.warn("Mermaid container not ready")})}function qe(e){return d(this,null,function*(){if(Le()&&(j.value||(yield m.nextTick(),j.value))&&!Y.value){Y.value=!0;try{const t=yield C();if(!t)return;const n=`mermaid-partial-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,o=r.isDark?"dark":"light",l=Se(e),i=Ee(l&&l.trim()?l:e,o);j.value&&(j.value.style.opacity="0");const a=yield De(()=>t.render(n,i),{timeoutMs:ge.value.render}),s=null==a?void 0:a.svg;j.value&&s&&(k(j.value,s),Re())}catch(Vo){}finally{yield m.nextTick(),j.value&&(j.value.style.opacity="1"),Y.value=!1}}})}function Ze(){return d(this,null,function*(){var e,t;const n=Date.now(),o=++de.value;me&&me.abort(),me=new AbortController;const l=me.signal,i=r.isDark?"dark":"light",a=A.value,s=a.replace(/\s+/g,"");if(!a.trim())return j.value&&M(j.value),ie.value=null,ue.value="",void(fe.value=!1);if(s===ue.value)return;try{const r=yield Oe(a,i,{signal:l,timeoutMs:ge.value.worker});if(r.fullOk)return yield Xe(),void(de.value===o&&(ie.value=null!=(t=null==(e=j.value)?void 0:e.innerHTML)?t:null,ue.value=s,fe.value=!1));const u=Ce&&n<=Ce;if(r.prefixOk&&r.prefix&&Le()&&!u)return void(yield qe(r.prefix))}catch(Vo){if("AbortError"===(null==Vo?void 0:Vo.name))return}if(de.value!==o)return;if(fe.value)return;const u=le.value[i];u&&j.value&&k(j.value,u)})}function Ge(){Me&&(Me=!1,ke=800,Te=!1,be&&(be.abort(),be=null),ye&&(globalThis.clearTimeout(ye),ye=null),xe&&(we(xe),xe=null),Ce=Date.now())}function Je(){if(Ge(),me){try{me.abort()}catch(Vo){}me=null}if(be){try{be.abort()}catch(Vo){}be=null}fn(),J(),q=0}function et(e=800){Me&&(Ne>=12?Ge():(ye&&globalThis.clearTimeout(ye),ye=globalThis.setTimeout(()=>{xe=Z(()=>d(this,null,function*(){if(!Me)return;if($.value||oe.value)return void Ge();const e=r.isDark?"dark":"light",t=A.value;if(!t.trim())return!1===r.loading?void Ge():void et(ke);if(Ne++,Ne>12)Ge();else{be&&be.abort(),be=new AbortController;try{if((yield Ae(t,e,{signal:be.signal,timeoutMs:ge.value.worker}))&&(yield Xe(),oe.value))return void Ge()}catch(Vo){}ke=Math.min(Math.floor(1.5*ke),4e3),et(ke)}}),{timeout:500})},e)))}function tt(){Me||$.value||oe.value||(Me=!0,Ce=0,Te=!0,Ne=0,et(500))}m.watch(He,e=>{Pe.value&&_.value&&(_.value.style.transform=e.transform)},{immediate:!0}),m.watch(()=>A.value,()=>{oe.value=!1,le.value={},G(),!$.value&&i.value&&tt(),Ve()}),m.watch(()=>r.isDark,()=>d(this,null,function*(){if(!oe.value)return;if(fe.value)return;const e=r.isDark?"dark":"light",t=le.value[e];if(t)return void(j.value&&k(j.value,t));const n={zoom:z.value,translateX:R.value,translateY:P.value,containerHeight:te.value},o=1!==z.value||0!==R.value||0!==P.value;re.value=!0,o&&(z.value=1,R.value=0,P.value=0,yield m.nextTick()),yield Xe(),o&&(yield m.nextTick(),z.value=n.zoom,R.value=n.translateX,P.value=n.translateY,te.value=n.containerHeight,he.value=n)})),m.watch(()=>$.value,e=>d(this,null,function*(){if(e)Ge(),oe.value&&(he.value={zoom:z.value,translateX:R.value,translateY:P.value,containerHeight:te.value});else{if(fe.value)return;const e=r.isDark?"dark":"light";if(oe.value&&le.value[e])return yield m.nextTick(),j.value&&k(j.value,le.value[e]),z.value=he.value.zoom,R.value=he.value.translateX,P.value=he.value.translateY,void(te.value=he.value.containerHeight);if(yield m.nextTick(),!i.value)return;yield Ze(),tt()}})),m.watch(()=>r.loading,(e,t)=>d(this,null,function*(){if(!0===t&&!1===e){const e=A.value.trim();if(!e)return Je();const t=r.isDark?"dark":"light",o=e.replace(/\s+/g,"");if(oe.value&&o===ue.value)return yield m.nextTick(),j.value&&!j.value.querySelector("svg")&&le.value[t]&&k(j.value,le.value[t]),void Je();try{yield Ae(e,t,{timeoutMs:ge.value.worker}),yield Xe(),ue.value=o,fe.value=!1,Je()}catch(n){Je(),je(n)}}})),m.watch(D,e=>{ne&&ne.disconnect(),!e||oe.value||re.value||(ne=new ResizeObserver(e=>{e&&e.length>0&&!oe.value&&!re.value&&dt(()=>{Re(e[0].contentRect.width)})}),ne.observe(e))},{immediate:!0}),m.onMounted(()=>d(this,null,function*(){yield m.nextTick(),F.value||($.value=!i.value),S.value&&(G(),Q.value=A.value.length)})),m.watch(()=>i.value,e=>{F.value||($.value=!e)}),m.watch(()=>S.value,e=>{e&&(oe.value||(G(),Q.value=A.value.length),r.loading||oe.value||G())},{immediate:!1}),m.onUnmounted(()=>{K&&clearTimeout(K),ne&&ne.disconnect(),me&&(me.abort(),me=null),fn(),Ge(),J()}),m.watch(()=>N.value,e=>d(this,null,function*(){e?(Ge(),me&&me.abort()):oe.value||(yield m.nextTick(),G(),$.value||tt())}),{immediate:!1});const nt=m.computed(()=>r.isDark?"mermaid-action-btn p-2 text-xs rounded text-gray-400 hover:bg-gray-700 hover:text-gray-200":"mermaid-action-btn p-2 text-xs rounded text-gray-600 hover:bg-gray-200 hover:text-gray-700");return{__sfc:!0,props:r,emits:t,DOMPURIFY_CONFIG:l,mermaidAvailable:i,mermaidSecurityLevel:a,mermaidInitConfig:c,neutralizeScriptProtocols:p,DISALLOWED_STYLE_PATTERNS:h,SAFE_URL_PROTOCOLS:v,sanitizeUrl:g,scrubSvgElement:w,toSafeSvgElement:y,setSafeSvg:x,clearElement:M,renderSvgToTarget:k,t:b,resolveMermaidInstance:C,copyText:T,isCollapsed:N,mermaidContainer:D,mermaidContent:j,modalContent:I,modalCloneWrapper:_,registerViewport:E,viewportHandle:L,viewportReady:S,modeContainerRef:B,baseFixedCode:A,getCodeWithTheme:O,zoom:z,translateX:R,translateY:P,isDragging:H,dragStart:U,showSource:$,userToggledShowSource:F,isRendering:Y,renderQueue:V,RENDER_DEBOUNCE_DELAY:300,CONTENT_STABLE_DELAY:500,lastContentLength:Q,isContentGenerating:W,contentStableTimer:K,renderRetryTimer:X,consecutiveRenderTimeouts:q,MAX_RENDER_TIMEOUT_RETRIES:3,requestIdle:Z,debouncedProgressiveRender:G,clearRenderRetryTimer:J,scheduleRenderRetry:ee,containerHeight:te,resizeObserver:ne,hasRenderedOnce:oe,isThemeRendering:re,svgCache:le,lastSvgSnapshot:ie,lastRenderedCode:ue,renderToken:de,currentWorkController:me,hasRenderError:fe,savedTransformState:he,wheelListeners:ve,timeouts:ge,cancelIdle:we,previewPollTimeoutId:ye,previewPollIdleId:xe,isPreviewPolling:Me,previewPollDelay:ke,previewPollController:be,lastPreviewStopAt:Ce,allowPartialPreview:Te,PREVIEW_POLL_MAX_ATTEMPTS:12,previewPollAttempts:Ne,withTimeoutSignal:De,renderErrorToContainer:je,isTimeoutError:Ie,shouldSkipEventTarget:_e,onBtnHover:function(e,t,n="top"){if(_e(e.currentTarget))return;const o=e,l=null!=(null==o?void 0:o.clientX)&&null!=(null==o?void 0:o.clientY)?{x:o.clientX,y:o.clientY}:void 0;ae(e.currentTarget,t,n,!1,l,r.isDark)},onBtnLeave:function(){se()},onCopyHover:function(e){if(_e(e.currentTarget))return;const t=T.value?b("common.copied")||"Copied":b("common.copy")||"Copy",n=e,o=null!=(null==n?void 0:n.clientX)&&null!=(null==n?void 0:n.clientY)?{x:n.clientX,y:n.clientY}:void 0;ae(e.currentTarget,t,"top",!1,o,r.isDark)},applyThemeTo:Ee,canApplyPartialPreview:Le,getSafePrefixCandidate:Se,canParseOnMain:Be,canParseOffthread:Ae,canParseOrPrefix:Oe,isFullscreenDisabled:ze,updateContainerHeight:Re,isModalOpen:Pe,transformStyle:He,handleKeydown:Ue,openModal:$e,closeModal:Fe,debounce:Ye,checkContentStability:Ve,zoomIn:function(){z.value<3&&(z.value+=.1)},zoomOut:function(){z.value>.5&&(z.value-=.1)},resetZoom:function(){z.value=1,R.value=0,P.value=0},startDrag:function(e){H.value=!0,e instanceof MouseEvent?U.value={x:e.clientX-R.value,y:e.clientY-P.value}:U.value={x:e.touches[0].clientX-R.value,y:e.touches[0].clientY-P.value}},onDrag:function(e){if(!H.value)return;let t,n;e instanceof MouseEvent?(t=e.clientX,n=e.clientY):(t=e.touches[0].clientX,n=e.touches[0].clientY),R.value=t-U.value.x,P.value=n-U.value.y},stopDrag:function(){H.value=!1},handleWheel:Qe,copy:function(){return d(this,null,function*(){try{"undefined"!=typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.writeText&&(yield navigator.clipboard.writeText(A.value)),T.value=!0,t("copy",A.value),setTimeout(()=>{T.value=!1},1e3)}catch(e){console.error("Failed to copy:",e)}})},exportSvg:We,handleExportClick:function(){var e;const n=null==(e=j.value)?void 0:e.querySelector("svg");if(!n)return void console.error("SVG element not found");const o=(new XMLSerializer).serializeToString(n),r={payload:{type:"export"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:n,svgString:o};t("export",r),r.defaultPrevented||We(n,o)},handleOpenModalClick:function(){var e,n;const o=null!=(n=null==(e=j.value)?void 0:e.querySelector("svg"))?n:null,r=o?(new XMLSerializer).serializeToString(o):null,l={payload:{type:"open-modal"},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:o,svgString:r};t("openModal",l),l.defaultPrevented||$e()},handleSwitchMode:function(e){const n={payload:{type:"toggle-mode",target:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};t("toggleMode",e,n),n.defaultPrevented||Ke(e)},switchMode:Ke,initMermaid:Xe,renderPartial:qe,progressiveRender:Ze,stopPreviewPolling:Ge,cleanupAfterLoadingSettled:Je,scheduleNextPreviewPoll:et,startPreviewPolling:tt,computedButtonStyle:nt,mermaidIconUrl:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2Ij4KICA8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNjYTllZTYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTEuNSAyLjVjMCA2IDIuMjUgNS43NSA0IDcgLjgzLjY3IDEuMTcgMiAxIDRoM2MtLjE3LTIgLjE3LTMuMzMgMS00IDEuNzUtMS4yNSA0LTEgNC03QzEyIDIuNSAxMCAzIDggNyA2IDMgNCAyLjUgMS41IDIuNSIgLz4KPC9zdmc+Cg==",Portal:pt}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"my-4 rounded-lg border overflow-hidden shadow-sm",class:[n.props.isDark?"border-gray-700/30":"border-gray-200",{"is-rendering":n.props.loading}]},[n.props.showHeader?t("div",{staticClass:"mermaid-block-header flex justify-between items-center px-4 py-2.5 border-b",class:n.props.isDark?"bg-gray-800 border-gray-700/30":"bg-gray-50 border-gray-200"},[e.$slots["header-left"]?t("div",[e._t("header-left")],2):t("div",{staticClass:"flex items-center space-x-2 overflow-hidden"},[t("img",{staticClass:"w-4 h-4 my-0",attrs:{src:n.mermaidIconUrl,alt:"Mermaid"}}),t("span",{staticClass:"text-sm font-medium font-mono truncate",class:n.props.isDark?"text-gray-400":"text-gray-600"},[e._v("Mermaid")])]),e.$slots["header-center"]?t("div",[e._t("header-center")],2):n.props.showModeToggle&&n.mermaidAvailable?t("div",{staticClass:"flex items-center space-x-1 rounded-md p-0.5",class:n.props.isDark?"bg-gray-700":"bg-gray-100"},[t("button",{staticClass:"px-2.5 py-1 text-xs rounded transition-colors",class:[n.showSource?n.props.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700":n.props.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm"],on:{click:()=>n.handleSwitchMode("preview"),mouseenter:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},focus:function(e){n.onBtnHover(e,n.t("common.preview")||"Preview")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("div",{staticClass:"flex items-center space-x-1"},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{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",{attrs:{cx:"12",cy:"12",r:"3"}})])]),t("span",[e._v(e._s(n.t("common.preview")||"Preview"))])])]),t("button",{staticClass:"px-2.5 py-1 text-xs rounded transition-colors",class:[n.showSource?n.props.isDark?"bg-gray-600 text-gray-200 shadow-sm":"bg-white text-gray-700 shadow-sm":n.props.isDark?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"],on:{click:()=>n.handleSwitchMode("source"),mouseenter:function(e){n.onBtnHover(e,n.t("common.source")||"Source")},focus:function(e){n.onBtnHover(e,n.t("common.source")||"Source")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("div",{staticClass:"flex items-center space-x-1"},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"}})]),t("span",[e._v(e._s(n.t("common.source")||"Source"))])])])]):e._e(),e.$slots["header-right"]?t("div",[e._t("header-right")],2):t("div",{staticClass:"flex items-center space-x-1"},[n.props.showCollapseButton?t("button",{class:n.computedButtonStyle,attrs:{"aria-pressed":n.isCollapsed},on:{click:function(e){n.isCollapsed=!n.isCollapsed},mouseenter:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},focus:function(e){n.onBtnHover(e,n.isCollapsed?n.t("common.expand")||"Expand":n.t("common.collapse")||"Collapse")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",style:{rotate:n.isCollapsed?"0deg":"90deg"},attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"}})])]):e._e(),n.props.showCopyButton?t("button",{class:n.computedButtonStyle,on:{click:n.copy,mouseenter:function(e){return n.onCopyHover(e)},focus:function(e){return n.onCopyHover(e)},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.copyText?t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"}})]):t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("rect",{attrs:{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}}),t("path",{attrs:{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}})])])]):e._e(),n.props.showExportButton&&n.mermaidAvailable?t("button",{class:`${n.computedButtonStyle} ${n.isFullscreenDisabled?"opacity-50 cursor-not-allowed":""}`,attrs:{disabled:n.isFullscreenDisabled},on:{click:n.handleExportClick,mouseenter:function(e){n.onBtnHover(e,n.t("common.export")||"Export")},focus:function(e){n.onBtnHover(e,n.t("common.export")||"Export")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("path",{attrs:{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}}),t("path",{attrs:{d:"m7 10l5 5l5-5"}})])])]):e._e(),n.props.showFullscreenButton&&n.mermaidAvailable?t("button",{class:`${n.computedButtonStyle} ${n.isFullscreenDisabled?"opacity-50 cursor-not-allowed":""}`,attrs:{disabled:n.isFullscreenDisabled},on:{click:n.handleOpenModalClick,mouseenter:function(e){n.onBtnHover(e,n.isModalOpen?n.t("common.minimize")||"Minimize":n.t("common.open")||"Open")},focus:function(e){n.onBtnHover(e,n.isModalOpen?n.t("common.minimize")||"Minimize":n.t("common.open")||"Open")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[n.isModalOpen?t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"}})]):t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"0.75rem",height:"0.75rem",viewBox:"0 0 24 24"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"}})])]):e._e()])]):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!n.isCollapsed,expression:"!isCollapsed"}],ref:"modeContainerRef"},[n.showSource?t("div",{staticClass:"p-4",class:n.props.isDark?"bg-gray-900":"bg-gray-50"},[t("pre",{staticClass:"text-sm font-mono whitespace-pre-wrap",class:n.props.isDark?"text-gray-300":"text-gray-700"},[e._v(e._s(n.baseFixedCode))])]):t("div",{staticClass:"relative"},[n.props.showZoomControls?t("div",{staticClass:"absolute top-2 right-2 z-10 rounded-lg"},[t("div",{staticClass:"flex items-center gap-2 backdrop-blur rounded-lg"},[t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomIn,mouseenter:function(e){n.onBtnHover(e,n.t("common.zoomIn")||"Zoom in")},focus:function(e){n.onBtnHover(e,n.t("common.zoomIn")||"Zoom in")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomOut,mouseenter:function(e){n.onBtnHover(e,n.t("common.zoomOut")||"Zoom out")},focus:function(e){n.onBtnHover(e,n.t("common.zoomOut")||"Zoom out")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M8 11h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.resetZoom,mouseenter:function(e){n.onBtnHover(e,n.t("common.resetZoom")||"Reset zoom")},focus:function(e){n.onBtnHover(e,n.t("common.resetZoom")||"Reset zoom")},mouseleave:n.onBtnLeave,blur:n.onBtnLeave}},[e._v(" "+e._s(Math.round(100*n.zoom))+"% ")])])]):e._e(),t("div",e._g({ref:"mermaidContainer",staticClass:"min-h-[360px] relative transition-all duration-100 overflow-hidden block",class:n.props.isDark?"bg-gray-900":"bg-gray-50",style:{height:n.containerHeight},on:{mousedown:n.startDrag,mousemove:n.onDrag,mouseup:n.stopDrag,mouseleave:n.stopDrag,"&touchstart":function(e){return n.startDrag.apply(null,arguments)},"&touchmove":function(e){return n.onDrag.apply(null,arguments)},"&touchend":function(e){return n.stopDrag.apply(null,arguments)}}},n.wheelListeners),[t("div",{staticClass:"absolute inset-0 cursor-grab",class:{"cursor-grabbing":n.isDragging},style:n.transformStyle,attrs:{"data-mermaid-wrapper":""}},[t("div",{ref:"mermaidContent",staticClass:"_mermaid w-full text-center flex items-center justify-center min-h-full"})])]),t(n.Portal,{attrs:{to:"body"}},[t("div",{staticClass:"markstream-vue2"},[t("transition",{attrs:{name:"mermaid-dialog",appear:""}},[n.isModalOpen?t("div",{staticClass:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",on:{click:function(e){return e.target!==e.currentTarget?null:n.closeModal.apply(null,arguments)}}},[t("div",{staticClass:"dialog-panel relative w-full h-full max-w-full max-h-full rounded shadow-lg overflow-hidden",class:n.props.isDark?"bg-gray-900":"bg-white"},[t("div",{staticClass:"absolute top-6 right-6 z-50 flex items-center gap-2"},[t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomIn}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.zoomOut}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("g",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}},[t("circle",{attrs:{cx:"11",cy:"11",r:"8"}}),t("path",{attrs:{d:"m21 21l-4.35-4.35M8 11h6"}})])])]),t("button",{staticClass:"p-2 text-xs rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.resetZoom}},[e._v(" "+e._s(Math.round(100*n.zoom))+"% ")]),t("button",{staticClass:"inline-flex items-center justify-center p-2 rounded transition-colors",class:[n.props.isDark?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-200"],on:{click:n.closeModal}},[t("svg",{staticClass:"w-3 h-3",attrs:{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"}},[t("path",{attrs:{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"}})])])]),t("div",e._g({ref:"modalContent",staticClass:"w-full h-full flex items-center justify-center p-4 overflow-hidden",on:{mousedown:n.startDrag,mousemove:n.onDrag,mouseup:n.stopDrag,mouseleave:n.stopDrag,"&touchstart":function(e){return n.startDrag.apply(null,arguments)},"&touchmove":function(e){return n.onDrag.apply(null,arguments)},"&touchend":function(e){return n.stopDrag.apply(null,arguments)}}},n.wheelListeners))])]):e._e()])],1)])],1)])])},[],!1,null,"f459048d",null,null).exports,vn=Math.min,gn=Math.max,wn=Math.round,yn=Math.floor,xn=e=>({x:e,y:e}),Mn={left:"right",right:"left",bottom:"top",top:"bottom"},kn={start:"end",end:"start"};function bn(e,t,n){return gn(e,vn(t,n))}function Cn(e,t){return"function"==typeof e?e(t):e}function Tn(e){return e.split("-")[0]}function Nn(e){return e.split("-")[1]}function Dn(e){return"x"===e?"y":"x"}function jn(e){return"y"===e?"height":"width"}const In=new Set(["top","bottom"]);function _n(e){return In.has(Tn(e))?"y":"x"}function En(e){return Dn(_n(e))}function Ln(e){return e.replace(/start|end/g,e=>kn[e])}const Sn=["left","right"],Bn=["right","left"],An=["top","bottom"],On=["bottom","top"];function zn(e){return e.replace(/left|right|bottom|top/g,e=>Mn[e])}function Rn(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Pn(e,t,n){let{reference:o,floating:r}=e;const l=_n(t),i=En(t),a=jn(i),s=Tn(t),u="y"===l,c=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[a]/2-r[a]/2;let m;switch(s){case"top":m={x:c,y:o.y-r.height};break;case"bottom":m={x:c,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:d};break;case"left":m={x:o.x-r.width,y:d};break;default:m={x:o.x,y:o.y}}switch(Nn(t)){case"start":m[i]-=p*(n&&u?-1:1);break;case"end":m[i]+=p*(n&&u?-1:1)}return m}function Hn(e,t){return d(this,null,function*(){var n;void 0===t&&(t={});const{x:o,y:r,platform:l,rects:i,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:m=!1,padding:f=0}=Cn(t,e),h=function(e){return"number"!=typeof e?function(e){return s({top:0,right:0,bottom:0,left:0},e)}(e):{top:e,right:e,bottom:e,left:e}}(f),v=a[m?"floating"===p?"reference":"floating":p],g=Rn(yield l.getClippingRect({element:null==(n=yield null==l.isElement?void 0:l.isElement(v))||n?v:v.contextElement||(yield null==l.getDocumentElement?void 0:l.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:u})),w="floating"===p?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,y=yield null==l.getOffsetParent?void 0:l.getOffsetParent(a.floating),x=(yield null==l.isElement?void 0:l.isElement(y))&&(yield null==l.getScale?void 0:l.getScale(y))||{x:1,y:1},M=Rn(l.convertOffsetParentRelativeRectToViewportRelativeRect?yield l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:y,strategy:u}):w);return{top:(g.top-M.top+h.top)/x.y,bottom:(M.bottom-g.bottom+h.bottom)/x.y,left:(g.left-M.left+h.left)/x.x,right:(M.right-g.right+h.right)/x.x}})}const Un=new Set(["left","top"]);function $n(){return"undefined"!=typeof window}function Fn(e){return Qn(e)?(e.nodeName||"").toLowerCase():"#document"}function Yn(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Vn(e){var t;return null==(t=(Qn(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Qn(e){return!!$n()&&(e instanceof Node||e instanceof Yn(e).Node)}function Wn(e){return!!$n()&&(e instanceof Element||e instanceof Yn(e).Element)}function Kn(e){return!!$n()&&(e instanceof HTMLElement||e instanceof Yn(e).HTMLElement)}function Xn(e){return!(!$n()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Yn(e).ShadowRoot)}const qn=new Set(["inline","contents"]);function Zn(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=uo(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!qn.has(r)}const Gn=new Set(["table","td","th"]);function Jn(e){return Gn.has(Fn(e))}const eo=[":popover-open",":modal"];function to(e){return eo.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const no=["transform","translate","scale","rotate","perspective"],oo=["transform","translate","scale","rotate","perspective","filter"],ro=["paint","layout","strict","content"];function lo(e){const t=io(),n=Wn(e)?uo(e):e;return no.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||oo.some(e=>(n.willChange||"").includes(e))||ro.some(e=>(n.contain||"").includes(e))}function io(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const ao=new Set(["html","body","#document"]);function so(e){return ao.has(Fn(e))}function uo(e){return Yn(e).getComputedStyle(e)}function co(e){return Wn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function po(e){if("html"===Fn(e))return e;const t=e.assignedSlot||e.parentNode||Xn(e)&&e.host||Vn(e);return Xn(t)?t.host:t}function mo(e){const t=po(e);return so(t)?e.ownerDocument?e.ownerDocument.body:e.body:Kn(t)&&Zn(t)?t:mo(t)}function fo(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=mo(e),l=r===(null==(o=e.ownerDocument)?void 0:o.body),i=Yn(r);if(l){const e=ho(i);return t.concat(i,i.visualViewport||[],Zn(r)?r:[],e&&n?fo(e):[])}return t.concat(r,fo(r,[],n))}function ho(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vo(e){const t=uo(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Kn(e),l=r?e.offsetWidth:n,i=r?e.offsetHeight:o,a=wn(n)!==l||wn(o)!==i;return a&&(n=l,o=i),{width:n,height:o,$:a}}function go(e){return Wn(e)?e:e.contextElement}function wo(e){const t=go(e);if(!Kn(t))return xn(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:l}=vo(t);let i=(l?wn(n.width):n.width)/o,a=(l?wn(n.height):n.height)/r;return i&&Number.isFinite(i)||(i=1),a&&Number.isFinite(a)||(a=1),{x:i,y:a}}const yo=xn(0);function xo(e){const t=Yn(e);return io()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:yo}function Mo(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),l=go(e);let i=xn(1);t&&(o?Wn(o)&&(i=wo(o)):i=wo(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Yn(e))&&t}(l,n,o)?xo(l):xn(0);let s=(r.left+a.x)/i.x,u=(r.top+a.y)/i.y,c=r.width/i.x,d=r.height/i.y;if(l){const e=Yn(l),t=o&&Wn(o)?Yn(o):o;let n=e,r=ho(n);for(;r&&o&&t!==n;){const e=wo(r),t=r.getBoundingClientRect(),o=uo(r),l=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;s*=e.x,u*=e.y,c*=e.x,d*=e.y,s+=l,u+=i,n=Yn(r),r=ho(n)}}return Rn({width:c,height:d,x:s,y:u})}function ko(e,t){const n=co(e).scrollLeft;return t?t.left+n:Mo(Vn(e)).left+n}function bo(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ko(e,n),y:n.top+t.scrollTop}}const Co=new Set(["absolute","fixed"]);function To(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=Yn(e),o=Vn(e),r=n.visualViewport;let l=o.clientWidth,i=o.clientHeight,a=0,s=0;if(r){l=r.width,i=r.height;const e=io();(!e||e&&"fixed"===t)&&(a=r.offsetLeft,s=r.offsetTop)}const u=ko(o);if(u<=0){const e=o.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(o.clientWidth-t.clientWidth-r);i<=25&&(l-=i)}else u<=25&&(l+=u);return{width:l,height:i,x:a,y:s}}(e,n);else if("document"===t)o=function(e){const t=Vn(e),n=co(e),o=e.ownerDocument.body,r=gn(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=gn(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+ko(e);const a=-n.scrollTop;return"rtl"===uo(o).direction&&(i+=gn(t.clientWidth,o.clientWidth)-r),{width:r,height:l,x:i,y:a}}(Vn(e));else if(Wn(t))o=function(e,t){const n=Mo(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,l=Kn(e)?wo(e):xn(1);return{width:e.clientWidth*l.x,height:e.clientHeight*l.y,x:r*l.x,y:o*l.y}}(t,n);else{const n=xo(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Rn(o)}function No(e,t){const n=po(e);return!(n===t||!Wn(n)||so(n))&&("fixed"===uo(n).position||No(n,t))}function Do(e,t,n){const o=Kn(t),r=Vn(t),l="fixed"===n,i=Mo(e,!0,l,t);let a={scrollLeft:0,scrollTop:0};const s=xn(0);function u(){s.x=ko(r)}if(o||!o&&!l)if(("body"!==Fn(t)||Zn(r))&&(a=co(t)),o){const e=Mo(t,!0,l,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else r&&u();l&&!o&&r&&u();const c=!r||o||l?xn(0):bo(r,a);return{x:i.left+a.scrollLeft-s.x-c.x,y:i.top+a.scrollTop-s.y-c.y,width:i.width,height:i.height}}function jo(e){return"static"===uo(e).position}function Io(e,t){if(!Kn(e)||"fixed"===uo(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Vn(e)===n&&(n=n.ownerDocument.body),n}function _o(e,t){const n=Yn(e);if(to(e))return n;if(!Kn(e)){let t=po(e);for(;t&&!so(t);){if(Wn(t)&&!jo(t))return t;t=po(t)}return n}let o=Io(e,t);for(;o&&Jn(o)&&jo(o);)o=Io(o,t);return o&&so(o)&&jo(o)&&!lo(o)?n:o||function(e){let t=po(e);for(;Kn(t)&&!so(t);){if(lo(t))return t;if(to(t))return null;t=po(t)}return null}(e)||n}const Eo={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const l="fixed"===r,i=Vn(o),a=!!t&&to(t.floating);if(o===i||a&&l)return n;let s={scrollLeft:0,scrollTop:0},u=xn(1);const c=xn(0),d=Kn(o);if((d||!d&&!l)&&(("body"!==Fn(o)||Zn(i))&&(s=co(o)),Kn(o))){const e=Mo(o);u=wo(o),c.x=e.x+o.clientLeft,c.y=e.y+o.clientTop}const p=!i||d||l?xn(0):bo(i,s);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+c.x+p.x,y:n.y*u.y-s.scrollTop*u.y+c.y+p.y}},getDocumentElement:Vn,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const l=[..."clippingAncestors"===n?to(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=fo(e,[],!1).filter(e=>Wn(e)&&"body"!==Fn(e)),r=null;const l="fixed"===uo(e).position;let i=l?po(e):e;for(;Wn(i)&&!so(i);){const t=uo(i),n=lo(i);n||"fixed"!==t.position||(r=null),(l?!n&&!r:!n&&"static"===t.position&&r&&Co.has(r.position)||Zn(i)&&!n&&No(e,i))?o=o.filter(e=>e!==i):r=t,i=po(i)}return t.set(e,o),o}(t,this._c):[].concat(n),o],i=l[0],a=l.reduce((e,n)=>{const o=To(t,n,r);return e.top=gn(o.top,e.top),e.right=vn(o.right,e.right),e.bottom=vn(o.bottom,e.bottom),e.left=gn(o.left,e.left),e},To(t,i,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:_o,getElementRects:function(e){return d(this,null,function*(){const t=this.getOffsetParent||_o,n=this.getDimensions,o=yield n(e.floating);return{reference:Do(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}})},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=vo(e);return{width:t,height:n}},getScale:wo,isElement:Wn,isRTL:function(e){return"rtl"===uo(e).direction}};function Lo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function So(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:l=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:c=!1}=o,d=go(e),p=r||l?[...d?fo(d):[],...fo(t)]:[];p.forEach(e=>{r&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)});const m=d&&a?function(e,t){let n,o=null;const r=Vn(e);function l(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function i(a,c){void 0===a&&(a=!1),void 0===c&&(c=1),l();const d=e.getBoundingClientRect(),{left:p,top:m,width:f,height:h}=d;if(a||t(),!f||!h)return;const v={rootMargin:-yn(m)+"px "+-yn(r.clientWidth-(p+f))+"px "+-yn(r.clientHeight-(m+h))+"px "+-yn(p)+"px",threshold:gn(0,vn(1,c))||1};let g=!0;function w(t){const o=t[0].intersectionRatio;if(o!==c){if(!g)return i();o?i(!1,o):n=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==o||Lo(d,e.getBoundingClientRect())||i(),g=!1}try{o=new IntersectionObserver(w,u(s({},v),{root:r.ownerDocument}))}catch(y){o=new IntersectionObserver(w,v)}o.observe(e)}(!0),l}(d,n):null;let f,h=-1,v=null;i&&(v=new ResizeObserver(e=>{let[o]=e;o&&o.target===d&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=v)||e.observe(t)})),n()}),d&&!c&&v.observe(d),v.observe(t));let g=c?Mo(e):null;return c&&function t(){const o=Mo(e);g&&!Lo(g,o)&&n(),g=o,f=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach(e=>{r&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=v)||e.disconnect(),v=null,c&&cancelAnimationFrame(f)}}const Bo=function(e){return void 0===e&&(e={}),{name:"shift",options:e,fn(t){return d(this,null,function*(){const{x:n,y:o,placement:r,platform:l}=t,i=Cn(e,t),{mainAxis:a=!0,crossAxis:d=!1,limiter:p={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}}}=i,m=c(i,["mainAxis","crossAxis","limiter"]),f={x:n,y:o},h=yield l.detectOverflow(t,m),v=_n(Tn(r)),g=Dn(v);let w=f[g],y=f[v];if(a){const e="y"===g?"bottom":"right";w=bn(w+h["y"===g?"top":"left"],w,w-h[e])}if(d){const e="y"===v?"bottom":"right";y=bn(y+h["y"===v?"top":"left"],y,y-h[e])}const x=p.fn(u(s({},t),{[g]:w,[v]:y}));return u(s({},x),{data:{x:x.x-n,y:x.y-o,enabled:{[g]:a,[v]:d}}})})}}},Ao=function(e){return void 0===e&&(e={}),{name:"flip",options:e,fn(t){return d(this,null,function*(){var n,o;const{placement:r,middlewareData:l,rects:i,initialPlacement:a,platform:s,elements:u}=t,d=Cn(e,t),{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0}=d,w=c(d,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};const y=Tn(r),x=_n(a),M=Tn(a)===a,k=yield null==s.isRTL?void 0:s.isRTL(u.floating),b=f||(M||!g?[zn(a)]:function(e){const t=zn(e);return[Ln(e),t,Ln(t)]}(a)),C="none"!==v;!f&&C&&b.push(...function(e,t,n,o){const r=Nn(e);let l=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Bn:Sn:t?Sn:Bn;case"left":case"right":return t?An:On;default:return[]}}(Tn(e),"start"===n,o);return r&&(l=l.map(e=>e+"-"+r),t&&(l=l.concat(l.map(Ln)))),l}(a,g,v,k));const T=[a,...b],N=yield s.detectOverflow(t,w),D=[];let j=(null==(o=l.flip)?void 0:o.overflows)||[];if(p&&D.push(N[y]),m){const e=function(e,t,n){void 0===n&&(n=!1);const o=Nn(e),r=En(e),l=jn(r);let i="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[l]>t.floating[l]&&(i=zn(i)),[i,zn(i)]}(r,i,k);D.push(N[e[0]],N[e[1]])}if(j=[...j,{placement:r,overflows:D}],!D.every(e=>e<=0)){var I,_;const e=((null==(I=l.flip)?void 0:I.index)||0)+1,t=T[e];if(t&&("alignment"!==m||x===_n(t)||j.every(e=>_n(e.placement)!==x||e.overflows[0]>0)))return{data:{index:e,overflows:j},reset:{placement:t}};let n=null==(_=j.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:_.placement;if(!n)switch(h){case"bestFit":{var E;const e=null==(E=j.filter(e=>{if(C){const t=_n(e.placement);return t===x||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:E[0];e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}})}}},Oo=g(m.defineComponent({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:null,content:null,placement:null,offset:null,originX:null,originY:null,id:null,isDark:{type:[Boolean,null]}},setup(e){const t=e,n=m.computed(()=>{if(void 0!==t.isDark&&null!==t.isDark)return Boolean(t.isDark);if("undefined"!=typeof document)try{if(document.documentElement.classList.contains("dark"))return!0;if((null==window?void 0:window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches)return!0}catch(Vo){}return!1}),o=m.ref(null),r=m.ref({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),l=m.ref(!1);let i=null;function a(){return d(this,null,function*(){var e,n;if(!t.anchorEl||!o.value)return;const l=[(c=null!=(e=t.offset)?e:8,void 0===c&&(c=0),{name:"offset",options:c,fn(e){return d(this,null,function*(){var t,n;const{x:o,y:r,placement:l,middlewareData:i}=e,a=yield function(e,t){return d(this,null,function*(){const{placement:n,platform:o,elements:r}=e,l=yield null==o.isRTL?void 0:o.isRTL(r.floating),i=Tn(n),a=Nn(n),s="y"===_n(n),u=Un.has(i)?-1:1,c=l&&s?-1:1,d=Cn(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof f&&(m="end"===a?-1*f:f),s?{x:m*c,y:p*u}:{x:p*u,y:m*c}})}(e,c);return l===(null==(t=i.offset)?void 0:t.placement)&&null!=(n=i.arrow)&&n.alignmentOffset?{}:{x:o+a.x,y:r+a.y,data:u(s({},a),{placement:l})}})}}),Ao(),Bo({padding:8})],{x:i,y:a}=yield((e,t,n)=>{const o=new Map,r=s({platform:Eo},n),l=u(s({},r.platform),{_c:o});return((e,t,n)=>d(exports,null,function*(){const{placement:o="bottom",strategy:r="absolute",middleware:l=[],platform:i}=n,a=l.filter(Boolean),c=yield null==i.isRTL?void 0:i.isRTL(t);let d=yield i.getElementRects({reference:e,floating:t,strategy:r}),{x:p,y:m}=Pn(d,o,c),f=o,h={},v=0;for(let n=0;n<a.length;n++){var g;const{name:l,fn:w}=a[n],{x:y,y:x,data:M,reset:k}=yield w({x:p,y:m,initialPlacement:o,placement:f,strategy:r,middlewareData:h,rects:d,platform:u(s({},i),{detectOverflow:null!=(g=i.detectOverflow)?g:Hn}),elements:{reference:e,floating:t}});p=null!=y?y:p,m=null!=x?x:m,h=u(s({},h),{[l]:s(s({},h[l]),M)}),k&&v<=50&&(v++,"object"==typeof k&&(k.placement&&(f=k.placement),k.rects&&(d=!0===k.rects?yield i.getElementRects({reference:e,floating:t,strategy:r}):k.rects),({x:p,y:m}=Pn(d,f,c))),n=-1)}return{x:p,y:m,placement:f,strategy:r,middlewareData:h}}))(e,t,u(s({},r),{platform:l}))})(t.anchorEl,o.value,{placement:null!=(n=t.placement)?n:"top",middleware:l,strategy:"fixed"});var c;r.value.transform=`translate3d(${Math.round(i)}px, ${Math.round(a)}px, 0)`,r.value.left="0px",r.value.top="0px"})}return m.watch(()=>t.visible,e=>d(this,null,function*(){if(e)if(l.value=!1,yield m.nextTick(),t.anchorEl&&o.value)try{const e=t.anchorEl.getBoundingClientRect();yield a();const n=r.value.transform;if(null!=t.originX&&null!=t.originY){const o=Math.abs(Number(t.originX)-e.left),i=Math.abs(Number(t.originY)-e.top);Math.hypot(o,i)>120?(r.value.transform=`translate3d(${Math.round(t.originX)}px, ${Math.round(t.originY)}px, 0)`,yield m.nextTick(),l.value=!0,yield m.nextTick(),r.value.transform=n):l.value=!0}else l.value=!0;i=So(t.anchorEl,o.value,a)}catch(Vo){yield a(),l.value=!0,i=So(t.anchorEl,o.value,a)}else l.value=!0;else l.value=!1,i&&(i(),i=null)})),m.watch([()=>t.anchorEl,()=>t.placement,()=>t.content],()=>d(this,null,function*(){t.visible&&t.anchorEl&&o.value&&(yield m.nextTick(),yield a())})),m.onBeforeUnmount(()=>{i&&i()}),{__sfc:!0,props:t,isDarkEffective:n,tooltip:o,style:r,ready:l,cleanupAutoUpdate:i,updatePosition:a,Portal:pt}}}),function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t(n.Portal,{attrs:{to:"body"}},[t("div",{staticClass:"markstream-vue2"},[t("transition",{attrs:{name:"tooltip",appear:""}},[t("div",{directives:[{name:"show",rawName:"v-show",value:e.visible&&n.ready,expression:"visible && ready"}],ref:"tooltip",staticClass:"z-[9999] inline-block text-base py-2 px-3 rounded-md shadow-md whitespace-nowrap pointer-events-none tooltip-element border",class:[n.isDarkEffective?"bg-gray-900 text-white border-gray-700 border is-dark":"bg-white text-gray-900 border-gray-200 border"],style:{position:"fixed",left:n.style.left,top:n.style.top,transform:n.style.transform},attrs:{id:n.props.id,role:"tooltip"}},[e._v(" "+e._s(e.content)+" ")])])],1)])},[],!1,null,"703da293",null,null).exports,zo=Object.freeze(Object.defineProperty({__proto__:null,default:Oo},Symbol.toStringTag,{value:"Module"}));function Ro(e){return JSON.stringify(e)}function Po(e){var t;const n=null!=(t=e.mode)?t:"classic",o=e.katexUrl,r=e.mhchemUrl,l=Ro(s({throwOnError:!0,displayMode:!0,output:"html",strict:"ignore"},e.renderOptions||{})),i=Ro(o),a=r?Ro(r):'""';return"module"===n?`\nlet DEBUG = false\nlet katex = null\nlet katexLoadError = null\nlet loadPromise = null\n\nfunction normalizeKaTeX(mod) {\n const resolved = (mod && mod.default) ? mod.default : mod\n if (resolved && typeof resolved.renderToString === 'function')\n return resolved\n return null\n}\n\nasync function loadKaTeX() {\n if (katex || katexLoadError)\n return\n if (!loadPromise) {\n loadPromise = (async () => {\n try {\n const mod = await import(${i})\n katex = normalizeKaTeX(mod) || null\n const mhchemUrl = ${a}\n if (mhchemUrl) {\n try {\n await import(mhchemUrl)\n }\n catch (e) {\n // ignore optional mhchem load failures\n if (DEBUG)\n console.warn('[katex-cdn-worker] failed to load mhchem', e)\n }\n }\n }\n catch (e) {\n katexLoadError = e\n }\n })()\n }\n await loadPromise\n}\n\nglobalThis.addEventListener('message', async (ev) => {\n const data = ev.data || {}\n if (data.type === 'init') {\n DEBUG = !!data.debug\n if (DEBUG)\n console.debug('[katex-cdn-worker] debug enabled')\n return\n }\n const id = data.id ?? ''\n const content = data.content ?? ''\n const displayMode = data.displayMode ?? true\n\n await loadKaTeX()\n\n if (!katex) {\n const reason = katexLoadError ? String(katexLoadError?.message || katexLoadError) : 'KaTeX is not available in worker'\n globalThis.postMessage({ id, error: reason, content, displayMode })\n return\n }\n\n try {\n const opts = ${l}\n const html = katex.renderToString(content, { ...opts, displayMode: !!displayMode })\n globalThis.postMessage({ id, html, content, displayMode })\n }\n catch (err) {\n const msg = String(err?.message || err)\n globalThis.postMessage({ id, error: msg, content, displayMode })\n }\n})\n`.trimStart():`\nlet DEBUG = false\nlet katex = null\nlet katexLoadError = null\n\nfunction normalizeKaTeX(val) {\n const resolved = (val && val.default) ? val.default : val\n if (resolved && typeof resolved.renderToString === 'function')\n return resolved\n return null\n}\n\nfunction loadKaTeXClassic() {\n if (katex || katexLoadError)\n return\n try {\n importScripts(${i})\n const mhchemUrl = ${a}\n if (mhchemUrl) {\n try {\n importScripts(mhchemUrl)\n }\n catch (e) {\n // ignore optional mhchem load failures\n if (DEBUG)\n console.warn('[katex-cdn-worker] failed to load mhchem', e)\n }\n }\n katex = normalizeKaTeX(globalThis.katex)\n }\n catch (e) {\n katexLoadError = e\n }\n}\n\nloadKaTeXClassic()\n\nglobalThis.addEventListener('message', (ev) => {\n const data = ev.data || {}\n if (data.type === 'init') {\n DEBUG = !!data.debug\n if (DEBUG)\n console.debug('[katex-cdn-worker] debug enabled')\n return\n }\n const id = data.id ?? ''\n const content = data.content ?? ''\n const displayMode = data.displayMode ?? true\n\n if (!katex && !katexLoadError)\n loadKaTeXClassic()\n\n if (!katex) {\n const reason = katexLoadError ? String(katexLoadError?.message || katexLoadError) : 'KaTeX is not available in worker'\n globalThis.postMessage({ id, error: reason, content, displayMode })\n return\n }\n\n try {\n const opts = ${l}\n const html = katex.renderToString(content, { ...opts, displayMode: !!displayMode })\n globalThis.postMessage({ id, html, content, displayMode })\n }\n catch (err) {\n const msg = String(err?.message || err)\n globalThis.postMessage({ id, error: msg, content, displayMode })\n }\n})\n`.trimStart()}function Ho(e){return JSON.stringify(e)}function Uo(e){var t;const n=null!=(t=e.mode)?t:"module",o=Ho(e.mermaidUrl),r=`\nlet DEBUG = false\nlet mermaid = null\nlet mermaidLoadError = null\n\nfunction normalizeMermaidModule(mod) {\n if (!mod)\n return mod\n const candidate = (mod && mod.default) ? mod.default : mod\n if (candidate && (typeof candidate.render === 'function' || typeof candidate.parse === 'function' || typeof candidate.initialize === 'function'))\n return candidate\n if (candidate && candidate.mermaidAPI && (typeof candidate.mermaidAPI.render === 'function' || typeof candidate.mermaidAPI.parse === 'function')) {\n const api = candidate.mermaidAPI\n return {\n ...candidate,\n render: api.render ? api.render.bind(api) : undefined,\n parse: api.parse ? api.parse.bind(api) : undefined,\n initialize: (opts) => {\n if (typeof candidate.initialize === 'function')\n return candidate.initialize(opts)\n return api.initialize ? api.initialize(opts) : undefined\n },\n }\n }\n if (mod && mod.mermaid && typeof mod.mermaid.parse === 'function')\n return mod.mermaid\n return candidate\n}\n\nfunction applyThemeTo(code, theme) {\n const themeValue = theme === 'dark' ? 'dark' : 'default'\n const themeConfig = \`%%{init: {"theme": "\${themeValue}"}}%%\\n\`\n const trimmed = (code || '').trimStart()\n if (trimmed.startsWith('%%{'))\n return code\n return themeConfig + code\n}\n\nfunction findHeaderIndex(lines) {\n const headerRe = /^(?:graph|flowchart|flowchart\\s+tb|flowchart\\s+lr|sequenceDiagram|gantt|classDiagram|stateDiagram(?:-v2)?|erDiagram|journey|pie|quadrantChart|timeline|xychart(?:-beta)?)\\b/\n for (let i = 0; i < lines.length; i++) {\n const l = (lines[i] || '').trim()\n if (!l)\n continue\n if (l.startsWith('%%'))\n continue\n if (headerRe.test(l))\n return i\n }\n return -1\n}\n\nasync function canParse(code, theme) {\n const themed = applyThemeTo(code, theme)\n const anyMermaid = mermaid\n if (anyMermaid && typeof anyMermaid.parse === 'function') {\n await anyMermaid.parse(themed)\n return true\n }\n throw new Error('mermaid.parse not available in worker')\n}\n\nasync function findLastRenderablePrefix(baseCode, theme) {\n const lines = String(baseCode || '').split('\\n')\n const headerIdx = findHeaderIndex(lines)\n if (headerIdx === -1)\n return null\n const head = lines.slice(0, headerIdx + 1)\n await canParse(head.join('\\n'), theme)\n\n let low = headerIdx + 1\n let high = lines.length\n let lastGood = headerIdx + 1\n let tries = 0\n const MAX_TRIES = 12\n\n while (low <= high && tries < MAX_TRIES) {\n const mid = Math.floor((low + high) / 2)\n const candidate = [...head, ...lines.slice(headerIdx + 1, mid)].join('\\n')\n tries++\n try {\n await canParse(candidate, theme)\n lastGood = mid\n low = mid + 1\n }\n catch {\n high = mid - 1\n }\n }\n\n return [...head, ...lines.slice(headerIdx + 1, lastGood)].join('\\n')\n}\n\nfunction initMermaidOnce() {\n if (!mermaid)\n return\n try {\n if (typeof mermaid.initialize === 'function')\n mermaid.initialize(${Ho(s({startOnLoad:!1,securityLevel:"loose"},e.initializeOptions||{}))})\n }\n catch (e) {\n if (DEBUG)\n console.warn('[mermaid-cdn-worker] initialize failed', e)\n }\n}\n\nglobalThis.addEventListener('message', async (ev) => {\n const msg = ev.data || {}\n if (msg.type === 'init') {\n DEBUG = !!msg.debug\n if (DEBUG)\n console.debug('[mermaid-cdn-worker] debug enabled')\n return\n }\n\n const id = msg.id\n const action = msg.action\n const payload = msg.payload || {}\n\n if (!mermaid) {\n const errMsg = mermaidLoadError ? String(mermaidLoadError?.message || mermaidLoadError) : 'Mermaid is not available in worker'\n globalThis.postMessage({ id, ok: false, error: errMsg })\n return\n }\n\n try {\n if (action === 'canParse') {\n const ok = await canParse(payload.code, payload.theme)\n globalThis.postMessage({ id, ok: true, result: ok })\n return\n }\n if (action === 'findPrefix') {\n const res = await findLastRenderablePrefix(payload.code, payload.theme)\n globalThis.postMessage({ id, ok: true, result: res })\n return\n }\n globalThis.postMessage({ id, ok: false, error: 'Unknown action' })\n }\n catch (e) {\n globalThis.postMessage({ id, ok: false, error: String(e?.message || e) })\n }\n})\n`.trimStart();return"module"===n?`\n${r}\n\nlet loadPromise = null\nasync function loadMermaid() {\n if (mermaid || mermaidLoadError)\n return\n if (!loadPromise) {\n loadPromise = (async () => {\n try {\n const mod = await import(${o})\n mermaid = normalizeMermaidModule(mod) || null\n initMermaidOnce()\n }\n catch (e) {\n mermaidLoadError = e\n }\n })()\n }\n await loadPromise\n}\n\n// Load immediately; failures are reported per-request\nawait loadMermaid()\n`.trimStart():`\n${r}\n\nfunction loadMermaidClassic() {\n if (mermaid || mermaidLoadError)\n return\n try {\n importScripts(${o})\n mermaid = normalizeMermaidModule(globalThis.mermaid) || null\n initMermaidOnce()\n }\n catch (e) {\n mermaidLoadError = e\n }\n}\n\nloadMermaidClassic()\n`.trimStart()}function $o(e){const t="string"==typeof(null==e?void 0:e.version)?e.version:"",[n,o]=t.split(".").map(Number);return Number.isFinite(n)&&Number.isFinite(o)&&2===n?o:null}const Fo={AdmonitionNode:Je,BlockquoteNode:w,CheckboxNode:y,CodeBlockNode:Mt,DefinitionListNode:x,EmojiNode:M,EmphasisNode:Re,FootnoteNode:He,FootnoteReferenceNode:D,FootnoteAnchorNode:Pe,HardBreakNode:Ue,HeadingNode:$e,HtmlBlockNode:Ve,HtmlInlineNode:Q,HighlightNode:ze,ImageNode:me,D2BlockNode:Nt,InlineCodeNode:W,PreCodeNode:We,InsertNode:Oe,LinkNode:Ae,ListItemNode:Fe,ListNode:Ye,MarkdownCodeBlockNode:Et,MathBlockNode:Kt,MathInlineNode:Xt,MermaidBlockNode:hn,InfographicBlockNode:_t,ParagraphNode:Qe,StrikethroughNode:Be,StrongNode:Se,SubscriptNode:Le,SuperscriptNode:Ee,TableNode:Ke,TextNode:Ne,ThematicBreakNode:Xe,VmrContainerNode:Ze,ReferenceNode:_e},Yo={install(e,t){!function(e){const t=$o(e);if(!(null==t||t>=7||(null==e?void 0:e.__composition_api_installed__)||(null==e?void 0:e.__compositionApiInstalled)))throw new Error("[markstream-vue2] Vue 2.6.x requires @vue/composition-api. Install it and call Vue.use(VueCompositionAPI) before using markstream-vue2.")}(e),function(e){const t=$o(e);if(null==t||t>=7)return;if(null==e?void 0:e.__markstreamVue2SetupProxyPatched)return;e.__markstreamVue2SetupProxyPatched=!0;const n=e.prototype;Object.prototype.hasOwnProperty.call(n,"_setupProxy")||Object.defineProperty(n,"_setupProxy",{configurable:!0,get(){return this},set(e){Object.defineProperty(this,"_setupProxy",{value:e,configurable:!0,writable:!0})}}),e.mixin({beforeCreate(){if(!this._setupProxy)try{this._setupProxy=this}catch(Vo){}}})}(e),Object.entries(Fo).forEach(([t,n])=>{e.component(t,n)}),e.component("MarkdownRender",Ge),e.component("NodeRenderer",Ge),(null==t?void 0:t.getLanguageIcon)&&lt(t.getLanguageIcon),(null==t?void 0:t.mathOptions)&&p.setDefaultMathOptions(t.mathOptions)}};Object.defineProperty(exports,"KATEX_COMMANDS",{enumerable:!0,get:()=>p.KATEX_COMMANDS}),Object.defineProperty(exports,"normalizeStandaloneBackslashT",{enumerable:!0,get:()=>p.normalizeStandaloneBackslashT}),Object.defineProperty(exports,"setDefaultMathOptions",{enumerable:!0,get:()=>p.setDefaultMathOptions}),exports.AdmonitionNode=Je,exports.BlockquoteNode=w,exports.CheckboxNode=y,exports.CodeBlockNode=Mt,exports.D2BlockNode=Nt,exports.DefinitionListNode=x,exports.EmojiNode=M,exports.EmphasisNode=Re,exports.FootnoteAnchorNode=Pe,exports.FootnoteNode=He,exports.FootnoteReferenceNode=D,exports.HardBreakNode=Ue,exports.HeadingNode=$e,exports.HighlightNode=ze,exports.HtmlBlockNode=Ve,exports.HtmlInlineNode=Q,exports.ImageNode=me,exports.InfographicBlockNode=_t,exports.InlineCodeNode=W,exports.InsertNode=Oe,exports.LinkNode=Ae,exports.ListItemNode=Fe,exports.ListNode=Ye,exports.MERMAID_DISABLED_CODE=cn,exports.MERMAID_WORKER_BUSY_CODE=un,exports.MarkdownCodeBlockNode=Et,exports.MarkdownRender=Ge,exports.MathBlockNode=Kt,exports.MathInlineNode=Xt,exports.MermaidBlockNode=hn,exports.ParagraphNode=Qe,exports.PreCodeNode=We,exports.ReferenceNode=_e,exports.StrikethroughNode=Be,exports.StrongNode=Se,exports.SubscriptNode=Le,exports.SuperscriptNode=Ee,exports.TableNode=Ke,exports.TextNode=Ne,exports.ThematicBreakNode=Xe,exports.Tooltip=Oo,exports.VmrContainerNode=Ze,exports.VueRendererMarkdown=Yo,exports.WORKER_BUSY_CODE=Yt,exports.buildKaTeXCDNWorkerSource=Po,exports.buildMermaidCDNWorkerSource=Uo,exports.canParseOffthread=pn,exports.clearGlobalCustomComponents=function(){delete C.scopedCustomComponents[k],T.value++},exports.clearKaTeXWorker=function(){var e;Lt&&(null==(e=Lt.terminate)||e.call(Lt)),Lt=null,St=null},exports.clearMermaidWorker=function(){var e;if(on)try{for(const[e,t]of ln.entries())t.reject(new Error("Worker cleared"));ln.clear(),null==(e=on.terminate)||e.call(on)}catch(Vo){}on=null,rn=null},exports.createKaTeXWorkerFromCDN=function(e){var t,n;const o=Po(e);if("undefined"==typeof Worker||"undefined"==typeof URL||"undefined"==typeof Blob)return{worker:null,dispose:()=>{},source:o};const r=new Blob([o],{type:"text/javascript"}),l=URL.createObjectURL(r);let i=!1;const a="module"===(null!=(t=e.mode)?t:"classic")?u(s({},null!=(n=e.workerOptions)?n:{}),{type:"module"}):e.workerOptions,c=new Worker(l,a);if(e.debug)try{c.postMessage({type:"init",debug:!0})}catch(Vo){}return{worker:c,dispose:()=>{if(!i){i=!0;try{URL.revokeObjectURL(l)}catch(Vo){}}},source:o}},exports.createMermaidWorkerFromCDN=function(e){var t,n;const o=Uo(e);if("undefined"==typeof Worker||"undefined"==typeof URL||"undefined"==typeof Blob)return{worker:null,dispose:()=>{},source:o};const r=new Blob([o],{type:"text/javascript"}),l=URL.createObjectURL(r);let i=!1;const a="module"===(null!=(t=e.mode)?t:"module")?u(s({},null!=(n=e.workerOptions)?n:{}),{type:"module"}):e.workerOptions,c=new Worker(l,a);if(e.debug)try{c.postMessage({type:"init",debug:!0})}catch(Vo){}return{worker:c,dispose:()=>{if(!i){i=!0;try{URL.revokeObjectURL(l)}catch(Vo){}}},source:o}},exports.default=Ge,exports.disableD2=function(){Tt(null)},exports.disableKatex=function(){xe(null)},exports.disableMermaid=function(){Jt(null)},exports.enableD2=function(e){Tt(null!=e?e:kt)},exports.enableKatex=function(e){xe(null!=e?e:ye)},exports.enableMermaid=function(e){Jt(null!=e?e:qt)},exports.findPrefixOffthread=mn,exports.getCustomNodeComponents=N,exports.getKaTeXBackpressureDefaults=function(){return s({},Qt)},exports.getKaTeXWorkerLoad=function(){return{inFlight:At.size,max:zt}},exports.getLanguageIcon=ut,exports.getMermaidWorkerLoad=function(){return{inFlight:ln.size,max:an}},exports.getUseMonaco=ot,exports.isD2Enabled=function(){return"function"==typeof Ct},exports.isKaTeXWorkerBusy=function(){return At.size>=zt},exports.isKatexEnabled=Me,exports.isMermaidEnabled=en,exports.languageMap=ct,exports.normalizeLanguageIdentifier=at,exports.removeCustomComponents=function(e){if(e===k)throw new Error("removeCustomComponents: use clearGlobalCustomComponents() to clear the global mapping");delete C.scopedCustomComponents[e],T.value++},exports.renderKaTeXInWorker=$t,exports.renderKaTeXWithBackpressure=Wt,exports.resolveMonacoLanguageId=st,exports.setCustomComponents=function(e,t){"string"==typeof e?C.scopedCustomComponents[e]=t||{}:C.scopedCustomComponents[k]=e||{},T.value++},exports.setD2Loader=Tt,exports.setDefaultI18nMap=function(e){Object.assign(ue,e)},exports.setKaTeXBackpressureDefaults=function(e){null!=e.timeout&&(Qt.timeout=Math.max(0,Math.floor(e.timeout))),null!=e.waitTimeout&&(Qt.waitTimeout=Math.max(0,Math.floor(e.waitTimeout))),null!=e.backoffMs&&(Qt.backoffMs=Math.max(0,Math.floor(e.backoffMs))),null!=e.maxRetries&&(Qt.maxRetries=Math.max(0,Math.floor(e.maxRetries)))},exports.setKaTeXCache=Ft,exports.setKaTeXWorker=function(e){Lt=e,St=null,Lt.onmessage=e=>{const{id:t,html:n,error:o}=e.data,r=At.get(t);if(r)if(At.delete(t),clearTimeout(r.timeoutId),Pt(),o)r.reject(new Error(o));else{const{content:t,displayMode:o}=e.data;if(t){const e=`${o?"d":"i"}:${t}`;if(Ot.set(e,n),Ot.size>200){const e=Ot.keys().next().value;Ot.delete(e)}}r.resolve(n)}},Lt.onerror=e=>{console.error("[katexWorkerClient] Worker error:",e);for(const[t,n]of At.entries())clearTimeout(n.timeoutId),n.reject(new Error(`Worker error: ${e.message}`));At.clear(),Pt()}},exports.setKaTeXWorkerDebug=function(e){Bt=!!e,Lt&&Lt.postMessage({type:"init",debug:Bt})},exports.setKaTeXWorkerMaxConcurrency=function(e){Number.isFinite(e)&&e>0&&(zt=Math.floor(e))},exports.setKatexLoader=xe,exports.setLanguageIconResolver=lt,exports.setMermaidLoader=Jt,exports.setMermaidWorker=function(e){on=e,rn=null;const t=e;on.onmessage=e=>{if(on!==t)return;const{id:n,ok:o,result:r,error:l}=e.data,i=ln.get(n);i&&(!1===o||l?i.reject(new Error(l||"Unknown error")):i.resolve(r))},on.onerror=e=>{var n,o;if(on===t)if(0!==ln.size){try{sn?console.error("[mermaidWorkerClient] Worker error:",(null==e?void 0:e.message)||e):null==(o=console.debug)||o.call(console,"[mermaidWorkerClient] Worker error:",(null==e?void 0:e.message)||e)}catch(r){}for(const[t,n]of ln.entries())n.reject(new Error(`Worker error: ${e.message}`));ln.clear()}else null==(n=console.debug)||n.call(console,"[mermaidWorkerClient] Worker error (no pending):",(null==e?void 0:e.message)||e)},on.onmessageerror=e=>{var n,o;if(on===t)if(0!==ln.size){try{sn?console.error("[mermaidWorkerClient] Worker messageerror:",e):null==(o=console.debug)||o.call(console,"[mermaidWorkerClient] Worker messageerror:",e)}catch(Vo){}for(const[e,t]of ln.entries())t.reject(new Error("Worker messageerror"));ln.clear()}else null==(n=console.debug)||n.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",e)}},exports.setMermaidWorkerClientDebug=function(e){sn=!!e},exports.setMermaidWorkerMaxConcurrency=function(e){Number.isFinite(e)&&e>0&&(an=Math.floor(e))},exports.terminateWorker=fn,exports.waitForKaTeXWorkerSlot=Vt,Object.keys(p).forEach(e=>{"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>p[e]})});