zen-gitsync 2.13.26 → 2.13.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/ui/public/assets/AppVersionBadge-C63UkgfW.js +2 -0
- package/src/ui/public/assets/BranchSelector-Dx2OFvQn.js +1 -0
- package/src/ui/public/assets/CommandConsole-CWGa4uzV.js +17 -0
- package/src/ui/public/assets/CommitForm-DDx1W2nU.js +6 -0
- package/src/ui/public/assets/CustomCommandManager-COAy_rkz.js +1 -0
- package/src/ui/public/assets/EditorView-BI31hRI_.js +0 -0
- package/src/ui/public/assets/FileDiffViewer-B2BI1bGl.js +13 -0
- package/src/ui/public/assets/{FlowExecutionViewer-DgzkadXS.js → FlowExecutionViewer-DAsEnHsE.js} +1 -1
- package/src/ui/public/assets/FlowOrchestrationWorkspace-DBgGQhNc.js +21 -0
- package/src/ui/public/assets/GitStatus-DJKc0Trp.js +6 -0
- package/src/ui/public/assets/{GitStatus-CGnFB5Iq.css → GitStatus-Dfg3miup.css} +1 -1
- package/src/ui/public/assets/ImagePreview-BrXFnZf_.js +1 -0
- package/src/ui/public/assets/LogList-DA4kCWzm.js +7 -0
- package/src/ui/public/assets/ProjectStartupButton-BkB5UNRF.js +1 -0
- package/src/ui/public/assets/RemoteRepoCard-DPfD9ETA.js +1 -0
- package/src/ui/public/assets/RemoteRepoCard-d0klonVb.css +1 -0
- package/src/ui/public/assets/ResetToRemoteButton-nUKiK2JR.js +1 -0
- package/src/ui/public/assets/SourceMapView-B49a7U0e.js +3 -0
- package/src/ui/public/assets/TemplateManager-BTDGivoE.js +1 -0
- package/src/ui/public/assets/UserInputNode-BkdGs5AU.js +1 -0
- package/src/ui/public/assets/WorkbenchView-CX-g5psr.js +12 -0
- package/src/ui/public/assets/WorkbenchView-KpSRlP_a.css +1 -0
- package/src/ui/public/assets/_plugin-vue_export-helper-CHzCpi8c.js +9 -0
- package/src/ui/public/assets/{element-plus-D36sOm0a.css → element-plus-CYGtZ7Nz.css} +1 -1
- package/src/ui/public/assets/{element-plus-CJjFCgLP.js → element-plus-rcpA4EGF.js} +3 -3
- package/src/ui/public/assets/{flow-mindmap-D04wFa2s.js → flow-mindmap-mZisamFd.js} +4 -4
- package/src/ui/public/assets/index-BTHO-83r.js +7 -0
- package/src/ui/public/assets/index-BYAxMGne.css +1 -0
- package/src/ui/public/assets/{vendor-0YbzMuxw.js → vendor-DoD2dmIW.js} +18 -18
- package/src/ui/public/assets/vue-flow-CfamgGcL.js +39 -0
- package/src/ui/public/index.html +7 -7
- package/src/ui/server/routes/workbench.js +21 -5
- package/src/ui/public/assets/AppVersionBadge-BEeW0AL-.js +0 -2
- package/src/ui/public/assets/BranchSelector-c59Odoj0.js +0 -1
- package/src/ui/public/assets/CommandConsole-Bbt0wo4y.js +0 -17
- package/src/ui/public/assets/CommitForm-hBWfGKDe.js +0 -6
- package/src/ui/public/assets/CustomCommandManager-B5uJC47H.js +0 -1
- package/src/ui/public/assets/EditorView-DGwTbiKa.js +0 -0
- package/src/ui/public/assets/FileDiffViewer-CJ9hE0rc.js +0 -13
- package/src/ui/public/assets/FlowOrchestrationWorkspace-aX2jblSj.js +0 -21
- package/src/ui/public/assets/GitStatus-Bfo5BFiv.js +0 -6
- package/src/ui/public/assets/ImagePreview-CYQ1rWsB.js +0 -1
- package/src/ui/public/assets/LogList-C-b_SAKs.js +0 -7
- package/src/ui/public/assets/ProjectStartupButton-J9QJ2l5s.js +0 -1
- package/src/ui/public/assets/RemoteRepoCard-9OdXr68_.js +0 -1
- package/src/ui/public/assets/RemoteRepoCard-DkcYbJtw.css +0 -1
- package/src/ui/public/assets/ResetToRemoteButton-BCaqTKWF.js +0 -1
- package/src/ui/public/assets/SourceMapView-CoxtZ_m3.js +0 -3
- package/src/ui/public/assets/TemplateManager-2AgSIFTO.js +0 -1
- package/src/ui/public/assets/UserInputNode-DHV_enhz.js +0 -1
- package/src/ui/public/assets/WorkbenchView-CHR2r0tw.js +0 -12
- package/src/ui/public/assets/WorkbenchView-DvML7yIv.css +0 -1
- package/src/ui/public/assets/_plugin-vue_export-helper-RXm384te.js +0 -9
- package/src/ui/public/assets/index-Cn3n2mx6.css +0 -1
- package/src/ui/public/assets/index-D7_4Vxc8.js +0 -7
- package/src/ui/public/assets/vue-flow-HHfhvx4N.js +0 -39
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/element-plus-
|
|
2
|
-
import{a as e,n as t,r as n,t as r}from"./rolldown-runtime-CMxvf4Kt.js";import{An as i,Bn as a,Cn as o,Dn as s,En as c,Fn as l,Gn as u,Hn as d,In as f,Kn as p,Ln as m,Mn as h,Nn as g,On as _,Pn as v,Qn as y,Rn as b,Sn as x,Tn as S,Un as C,Vn as w,Wn as T,Yn as E,Zn as D,_n as O,_r as k,an as A,ar as j,cn as ee,cr as M,dn as N,dr as P,er as te,fr as ne,gn as F,hn as I,hr as L,ir as re,kn as ie,ln as ae,lr as oe,mn as se,mr as R,nn as ce,nr as le,or as ue,pn as z,rr as de,sn as fe,sr as pe,tr as B,un as me,ur as he,vn as V,vr as H,wn as U,xn as ge,yn as W,zn as G}from"./element-plus-CJjFCgLP.js";import{l as K}from"./monaco-DC7mqInI.js";var _e=typeof window<`u`,ve,ye=e=>ve=e,be=Symbol();function xe(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var Se;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(Se||={});var Ce=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function q(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function we(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){Oe(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function Te(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Ee(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}var De=typeof navigator==`object`?navigator:{userAgent:``},J=/Macintosh/.test(De.userAgent)&&/AppleWebKit/.test(De.userAgent)&&!/Safari/.test(De.userAgent),Oe=_e?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!J?ke:`msSaveOrOpenBlob`in De?Ae:je:()=>{};function ke(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?Ee(r):Te(r.href)?we(e,t,n):(r.target=`_blank`,Ee(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){Ee(r)},0))}function Ae(e,t=`download`,n){if(typeof e==`string`)if(Te(e))we(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){Ee(t)})}else navigator.msSaveOrOpenBlob(q(e,n),t)}function je(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return we(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(Ce.HTMLElement))||`safari`in Ce,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||J)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:Me}=Object;function Ne(){let e=te(!0),t=e.run(()=>M({})),n=[],r=[],i=re({install(e){ye(i),i._a=e,e.provide(be,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}var Pe=()=>{};function Fe(e,t,n,r=Pe){e.add(t);let i=()=>{e.delete(t)&&r()};return!n&&B()&&j(i),i}function Ie(e,...t){e.forEach(e=>{e(...t)})}var Le=e=>e(),Re=Symbol(),ze=Symbol();function Be(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(let n in t){if(!t.hasOwnProperty(n))continue;let r=t[n],i=e[n];xe(i)&&xe(r)&&e.hasOwnProperty(n)&&!de(r)&&!le(r)?e[n]=Be(i,r):e[n]=r}return e}var Ve=Symbol();function He(e){return!xe(e)||!Object.prototype.hasOwnProperty.call(e,Ve)}var{assign:Ue}=Object;function We(e){return!!(de(e)&&e.effect)}function Ge(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],c;function l(){return s||(n.state.value[e]=i?i():{}),Ue(ne(n.state.value[e]),a,Object.keys(o||{}).reduce((t,r)=>(t[r]=re(I(()=>{ye(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return c=Ke(e,l,t,n,r,!0),c}function Ke(e,t,n={},r,i,a){let o,s=Ue({actions:{}},n),c={deep:!0},l,u,d=new Set,f=new Set,p=r.state.value[e];!a&&!p&&(r.state.value[e]={}),M({});let m;function h(t){let n;l=u=!1,typeof t==`function`?(t(r.state.value[e]),n={type:Se.patchFunction,storeId:e,events:void 0}):(Be(r.state.value[e],t),n={type:Se.patchObject,payload:t,storeId:e,events:void 0});let i=m=Symbol();g().then(()=>{m===i&&(l=!0)}),u=!0,Ie(d,n,r.state.value[e])}let _=a?function(){let{state:e}=n,t=e?e():{};this.$patch(e=>{Ue(e,t)})}:Pe;function v(){o.stop(),d.clear(),f.clear(),r._s.delete(e)}let y=(t,n=``)=>{if(Re in t)return t[ze]=n,t;let i=function(){ye(r);let n=Array.from(arguments),a=new Set,o=new Set;function s(e){a.add(e)}function c(e){o.add(e)}Ie(f,{args:n,name:i[ze],store:b,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:b,n)}catch(e){throw Ie(o,e),e}return l instanceof Promise?l.then(e=>(Ie(a,e),e)).catch(e=>(Ie(o,e),Promise.reject(e))):(Ie(a,l),l)};return i[Re]=!0,i[ze]=n,i},b=ue({_p:r,$id:e,$onAction:Fe.bind(null,f),$patch:h,$reset:_,$subscribe(t,n={}){let i=Fe(d,t,n.detached,()=>a()),a=o.run(()=>E(()=>r.state.value[e],r=>{(n.flush===`sync`?u:l)&&t({storeId:e,type:Se.direct,events:void 0},r)},Ue({},c,n)));return i},$dispose:v});r._s.set(e,b);let x=(r._a&&r._a.runWithContext||Le)(()=>r._e.run(()=>(o=te()).run(()=>t({action:y}))));for(let t in x){let n=x[t];de(n)&&!We(n)||le(n)?a||(p&&He(n)&&(de(n)?n.value=p[t]:Be(n,p[t])),r.state.value[e][t]=n):typeof n==`function`&&(x[t]=y(n,t),s.actions[t]=n)}return Ue(b,x),Ue(he(b),x),Object.defineProperty(b,"$state",{get:()=>r.state.value[e],set:e=>{h(t=>{Ue(t,e)})}}),r._p.forEach(e=>{Ue(b,o.run(()=>e({store:b,app:r._a,pinia:r,options:s})))}),p&&a&&n.hydrate&&n.hydrate(b.$state,p),l=!0,u=!0,b}function qe(e,t,n){let r,a=typeof t==`function`;r=a?n:t;function o(n,o){let s=ie();return n||=s?i(be,null):null,n&&ye(n),n=ve,n._s.has(e)||(a?Ke(e,t,r,n):Ge(e,r,n)),n._s.get(e)}return o.$id=e,o}function Je(e){let t=he(e),n={};for(let r in t){let i=t[r];i.effect?n[r]=I({get:()=>e[r],set(t){e[r]=t}}):(de(i)||le(i))&&(n[r]=P(e,r))}return n}function Ye(e,t){typeof console<`u`&&(console.warn(`[intlify] `+e),t&&console.warn(t.stack))}var Y=typeof window<`u`,Xe=(e,t=!1)=>t?Symbol.for(e):Symbol(e),Ze=(e,t,n)=>Qe({l:e,k:t,s:n}),Qe=e=>JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`).replace(/\u0027/g,`\\u0027`),$e=e=>typeof e==`number`&&isFinite(e),et=e=>_t(e)===`[object Date]`,tt=e=>_t(e)===`[object RegExp]`,X=e=>vt(e)&&Object.keys(e).length===0,nt=Object.assign,rt=Object.create,it=(e=null)=>rt(e),at,ot=()=>at||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:it();function st(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/\//g,`/`).replace(/=/g,`=`)}function ct(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,`&`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/</g,`<`).replace(/>/g,`>`)}function lt(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(e,t,n)=>`${t}="${ct(n)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(e,t,n)=>`${t}='${ct(n)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,`$1on$3`)),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(t=>{e=e.replace(t,`$1javascript:`)}),e}var ut=Object.prototype.hasOwnProperty;function dt(e,t){return ut.call(e,t)}var ft=Array.isArray,pt=e=>typeof e==`function`,Z=e=>typeof e==`string`,Q=e=>typeof e==`boolean`,mt=e=>typeof e==`object`&&!!e,ht=e=>mt(e)&&pt(e.then)&&pt(e.catch),gt=Object.prototype.toString,_t=e=>gt.call(e),vt=e=>{if(!mt(e))return!1;let t=Object.getPrototypeOf(e);return t===null||t.constructor===Object},yt=e=>e==null?``:ft(e)||vt(e)&&e.toString===gt?JSON.stringify(e,null,2):String(e);function bt(e,t=``){return e.reduce((e,n,r)=>r===0?e+n:e+t+n,``)}function xt(e){let t=e;return()=>++t}var St=e=>!mt(e)||ft(e);function Ct(e,t){if(St(e)||St(t))throw Error(`Invalid value`);let n=[{src:e,des:t}];for(;n.length;){let{src:e,des:t}=n.pop();Object.keys(e).forEach(r=>{r!==`__proto__`&&(mt(e[r])&&!mt(t[r])&&(t[r]=Array.isArray(e[r])?[]:it()),St(t[r])||St(e[r])?t[r]=e[r]:n.push({src:e[r],des:t[r]}))})}}function wt(e,t,n){return{line:e,column:t,offset:n}}function Tt(e,t,n){let r={start:e,end:t};return n!=null&&(r.source=n),r}var Et=/\{([0-9a-zA-Z]+)\}/g;function Dt(e,...t){return t.length===1&&At(t[0])&&(t=t[0]),(!t||!t.hasOwnProperty)&&(t={}),e.replace(Et,(e,n)=>t.hasOwnProperty(n)?t[n]:``)}var Ot=Object.assign,kt=e=>typeof e==`string`,At=e=>typeof e==`object`&&!!e;function jt(e,t=``){return e.reduce((e,n,r)=>r===0?e+n:e+t+n,``)}var Mt={USE_MODULO_SYNTAX:1,__EXTEND_POINT__:2},Nt={[Mt.USE_MODULO_SYNTAX]:`Use modulo before '{{0}}'.`};function Pt(e,t,...n){let r=Dt(Nt[e]||``,...n||[]),i={message:String(r),code:e};return t&&(i.location=t),i}var Ft={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16,__EXTEND_POINT__:17},It={[Ft.EXPECTED_TOKEN]:`Expected token: '{0}'`,[Ft.INVALID_TOKEN_IN_PLACEHOLDER]:`Invalid token in placeholder: '{0}'`,[Ft.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:`Unterminated single quote in placeholder`,[Ft.UNKNOWN_ESCAPE_SEQUENCE]:`Unknown escape sequence: \\{0}`,[Ft.INVALID_UNICODE_ESCAPE_SEQUENCE]:`Invalid unicode escape sequence: {0}`,[Ft.UNBALANCED_CLOSING_BRACE]:`Unbalanced closing brace`,[Ft.UNTERMINATED_CLOSING_BRACE]:`Unterminated closing brace`,[Ft.EMPTY_PLACEHOLDER]:`Empty placeholder`,[Ft.NOT_ALLOW_NEST_PLACEHOLDER]:`Not allowed nest placeholder`,[Ft.INVALID_LINKED_FORMAT]:`Invalid linked format`,[Ft.MUST_HAVE_MESSAGES_IN_PLURAL]:`Plural must have messages`,[Ft.UNEXPECTED_EMPTY_LINKED_MODIFIER]:`Unexpected empty linked modifier`,[Ft.UNEXPECTED_EMPTY_LINKED_KEY]:`Unexpected empty linked key`,[Ft.UNEXPECTED_LEXICAL_ANALYSIS]:`Unexpected lexical analysis in token: '{0}'`,[Ft.UNHANDLED_CODEGEN_NODE_TYPE]:`unhandled codegen node type: '{0}'`,[Ft.UNHANDLED_MINIFIER_NODE_TYPE]:`unhandled mimifier node type: '{0}'`};function Lt(e,t,n={}){let{domain:r,messages:i,args:a}=n,o=Dt((i||It)[e]||``,...a||[]),s=SyntaxError(String(o));return s.code=e,t&&(s.location=t),s.domain=r,s}function Rt(e){throw e}var zt=` `,Bt=`\r`,Vt=`
|
|
3
|
-
`,Ht=`\u2028`,Ut=`\u2029`;function Wt(e){let t=e,n=0,r=1,i=1,a=0,o=e=>t[e]===Bt&&t[e+1]===Vt,s=e=>t[e]===Vt,c=e=>t[e]===Ut,l=e=>t[e]===Ht,u=e=>o(e)||s(e)||c(e)||l(e),d=()=>n,f=()=>r,p=()=>i,m=()=>a,h=e=>o(e)||c(e)||l(e)?Vt:t[e],g=()=>h(n),_=()=>h(n+a);function v(){return a=0,u(n)&&(r++,i=0),o(n)&&n++,n++,i++,t[n]}function y(){return o(n+a)&&a++,a++,t[n+a]}function b(){n=0,r=1,i=1,a=0}function x(e=0){a=e}function S(){let e=n+a;for(;e!==n;)v();a=0}return{index:d,line:f,column:p,peekOffset:m,charAt:h,currentChar:g,currentPeek:_,next:v,peek:y,reset:b,resetPeek:x,skipToPeek:S}}var Gt=void 0,Kt=`'`,qt=`tokenizer`;function Jt(e,t={}){let n=t.location!==!1,r=Wt(e),i=()=>r.index(),a=()=>wt(r.line(),r.column(),r.index()),o=a(),s=i(),c={currentType:14,offset:s,startLoc:o,endLoc:o,lastType:14,lastOffset:s,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:``},l=()=>c,{onError:u}=t;function d(e,t,r,...i){let a=l();t.column+=r,t.offset+=r,u&&u(Lt(e,n?Tt(a.startLoc,t):null,{domain:qt,args:i}))}function f(e,t,r){e.endLoc=a(),e.currentType=t;let i={type:t};return n&&(i.loc=Tt(e.startLoc,e.endLoc)),r!=null&&(i.value=r),i}let p=e=>f(e,14);function m(e,t){return e.currentChar()===t?(e.next(),t):(d(Ft.EXPECTED_TOKEN,a(),0,t),``)}function h(e){let t=``;for(;e.currentPeek()===zt||e.currentPeek()===Vt;)t+=e.currentPeek(),e.peek();return t}function g(e){let t=h(e);return e.skipToPeek(),t}function _(e){if(e===Gt)return!1;let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t===95}function v(e){if(e===Gt)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57}function y(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function b(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=v(e.currentPeek()===`-`?e.peek():e.currentPeek());return e.resetPeek(),r}function x(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=e.currentPeek()===Kt;return e.resetPeek(),r}function S(e,t){let{currentType:n}=t;if(n!==8)return!1;h(e);let r=e.currentPeek()===`.`;return e.resetPeek(),r}function C(e,t){let{currentType:n}=t;if(n!==9)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function w(e,t){let{currentType:n}=t;if(!(n===8||n===12))return!1;h(e);let r=e.currentPeek()===`:`;return e.resetPeek(),r}function T(e,t){let{currentType:n}=t;if(n!==10)return!1;let r=()=>{let t=e.currentPeek();return t===`{`?_(e.peek()):t===`@`||t===`%`||t===`|`||t===`:`||t===`.`||t===zt||!t?!1:t===Vt?(e.peek(),r()):O(e,!1)},i=r();return e.resetPeek(),i}function E(e){h(e);let t=e.currentPeek()===`|`;return e.resetPeek(),t}function D(e){let t=h(e),n=e.currentPeek()===`%`&&e.peek()===`{`;return e.resetPeek(),{isModulo:n,hasSpace:t.length>0}}function O(e,t=!0){let n=(t=!1,r=``,i=!1)=>{let a=e.currentPeek();return a===`{`?r===`%`?!1:t:a===`@`||!a?r===`%`?!0:t:a===`%`?(e.peek(),n(t,`%`,!0)):a===`|`?r===`%`||i?!0:!(r===zt||r===Vt):a===zt?(e.peek(),n(!0,zt,i)):a===Vt?(e.peek(),n(!0,Vt,i)):!0},r=n();return t&&e.resetPeek(),r}function k(e,t){let n=e.currentChar();if(n!==Gt)return t(n)?(e.next(),n):null}function A(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36}function j(e){return k(e,A)}function ee(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36||t===45}function M(e){return k(e,ee)}function N(e){let t=e.charCodeAt(0);return t>=48&&t<=57}function P(e){return k(e,N)}function te(e){let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function ne(e){return k(e,te)}function F(e){let t=``,n=``;for(;t=P(e);)n+=t;return n}function I(e){g(e);let t=e.currentChar();return t!==`%`&&d(Ft.EXPECTED_TOKEN,a(),0,t),e.next(),`%`}function L(e){let t=``;for(;;){let n=e.currentChar();if(n===`{`||n===`}`||n===`@`||n===`|`||!n)break;if(n===`%`)if(O(e))t+=n,e.next();else break;else if(n===zt||n===Vt)if(O(e))t+=n,e.next();else if(E(e))break;else t+=n,e.next();else t+=n,e.next()}return t}function re(e){g(e);let t=``,n=``;for(;t=M(e);)n+=t;return e.currentChar()===Gt&&d(Ft.UNTERMINATED_CLOSING_BRACE,a(),0),n}function ie(e){g(e);let t=``;return e.currentChar()===`-`?(e.next(),t+=`-${F(e)}`):t+=F(e),e.currentChar()===Gt&&d(Ft.UNTERMINATED_CLOSING_BRACE,a(),0),t}function ae(e){return e!==Kt&&e!==Vt}function oe(e){g(e),m(e,`'`);let t=``,n=``;for(;t=k(e,ae);)t===`\\`?n+=se(e):n+=t;let r=e.currentChar();return r===Vt||r===Gt?(d(Ft.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),r===Vt&&(e.next(),m(e,`'`)),n):(m(e,`'`),n)}function se(e){let t=e.currentChar();switch(t){case`\\`:case`'`:return e.next(),`\\${t}`;case`u`:return R(e,t,4);case`U`:return R(e,t,6);default:return d(Ft.UNKNOWN_ESCAPE_SEQUENCE,a(),0,t),``}}function R(e,t,n){m(e,t);let r=``;for(let i=0;i<n;i++){let n=ne(e);if(!n){d(Ft.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),0,`\\${t}${r}${e.currentChar()}`);break}r+=n}return`\\${t}${r}`}function ce(e){return e!==`{`&&e!==`}`&&e!==zt&&e!==Vt}function le(e){g(e);let t=``,n=``;for(;t=k(e,ce);)n+=t;return n}function ue(e){let t=``,n=``;for(;t=j(e);)n+=t;return n}function z(e){let t=n=>{let r=e.currentChar();return r===`{`||r===`%`||r===`@`||r===`|`||r===`(`||r===`)`||!r||r===zt?n:(n+=r,e.next(),t(n))};return t(``)}function de(e){g(e);let t=m(e,`|`);return g(e),t}function fe(e,t){let n=null;switch(e.currentChar()){case`{`:return t.braceNest>=1&&d(Ft.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),e.next(),n=f(t,2,`{`),g(e),t.braceNest++,n;case`}`:return t.braceNest>0&&t.currentType===2&&d(Ft.EMPTY_PLACEHOLDER,a(),0),e.next(),n=f(t,3,`}`),t.braceNest--,t.braceNest>0&&g(e),t.inLinked&&t.braceNest===0&&(t.inLinked=!1),n;case`@`:return t.braceNest>0&&d(Ft.UNTERMINATED_CLOSING_BRACE,a(),0),n=pe(e,t)||p(t),t.braceNest=0,n;default:{let r=!0,i=!0,o=!0;if(E(e))return t.braceNest>0&&d(Ft.UNTERMINATED_CLOSING_BRACE,a(),0),n=f(t,1,de(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(t.currentType===5||t.currentType===6||t.currentType===7))return d(Ft.UNTERMINATED_CLOSING_BRACE,a(),0),t.braceNest=0,B(e,t);if(r=y(e,t))return n=f(t,5,re(e)),g(e),n;if(i=b(e,t))return n=f(t,6,ie(e)),g(e),n;if(o=x(e,t))return n=f(t,7,oe(e)),g(e),n;if(!r&&!i&&!o)return n=f(t,13,le(e)),d(Ft.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n.value),g(e),n;break}}return n}function pe(e,t){let{currentType:n}=t,r=null,i=e.currentChar();switch((n===8||n===9||n===12||n===10)&&(i===Vt||i===zt)&&d(Ft.INVALID_LINKED_FORMAT,a(),0),i){case`@`:return e.next(),r=f(t,8,`@`),t.inLinked=!0,r;case`.`:return g(e),e.next(),f(t,9,`.`);case`:`:return g(e),e.next(),f(t,10,`:`);default:return E(e)?(r=f(t,1,de(e)),t.braceNest=0,t.inLinked=!1,r):S(e,t)||w(e,t)?(g(e),pe(e,t)):C(e,t)?(g(e),f(t,12,ue(e))):T(e,t)?(g(e),i===`{`?fe(e,t)||r:f(t,11,z(e))):(n===8&&d(Ft.INVALID_LINKED_FORMAT,a(),0),t.braceNest=0,t.inLinked=!1,B(e,t))}}function B(e,t){let n={type:14};if(t.braceNest>0)return fe(e,t)||p(t);if(t.inLinked)return pe(e,t)||p(t);switch(e.currentChar()){case`{`:return fe(e,t)||p(t);case`}`:return d(Ft.UNBALANCED_CLOSING_BRACE,a(),0),e.next(),f(t,3,`}`);case`@`:return pe(e,t)||p(t);default:{if(E(e))return n=f(t,1,de(e)),t.braceNest=0,t.inLinked=!1,n;let{isModulo:r,hasSpace:i}=D(e);if(r)return i?f(t,0,L(e)):f(t,4,I(e));if(O(e))return f(t,0,L(e));break}}return n}function me(){let{currentType:e,offset:t,startLoc:n,endLoc:o}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=n,c.lastEndLoc=o,c.offset=i(),c.startLoc=a(),r.currentChar()===Gt?f(c,14):B(r,c)}return{nextToken:me,currentOffset:i,currentPosition:a,context:l}}var Yt=`parser`,Xt=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function Zt(e,t,n){switch(e){case`\\\\`:return`\\`;case`\\'`:return`'`;default:{let e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):`�`}}}function Qt(e={}){let t=e.location!==!1,{onError:n,onWarn:r}=e;function i(e,r,i,a,...o){let s=e.currentPosition();s.offset+=a,s.column+=a,n&&n(Lt(r,t?Tt(i,s):null,{domain:Yt,args:o}))}function a(e,n,i,a,...o){let s=e.currentPosition();s.offset+=a,s.column+=a,r&&r(Pt(n,t?Tt(i,s):null,o))}function o(e,n,r){let i={type:e};return t&&(i.start=n,i.end=n,i.loc={start:r,end:r}),i}function s(e,n,r,i){i&&(e.type=i),t&&(e.end=n,e.loc&&(e.loc.end=r))}function c(e,t){let n=e.context(),r=o(3,n.offset,n.startLoc);return r.value=t,s(r,e.currentOffset(),e.currentPosition()),r}function l(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),i=o(5,n,r);return i.index=parseInt(t,10),e.nextToken(),s(i,e.currentOffset(),e.currentPosition()),i}function u(e,t,n){let{lastOffset:r,lastStartLoc:i}=e.context(),a=o(4,r,i);return a.key=t,n===!0&&(a.modulo=!0),e.nextToken(),s(a,e.currentOffset(),e.currentPosition()),a}function d(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),i=o(9,n,r);return i.value=t.replace(Xt,Zt),e.nextToken(),s(i,e.currentOffset(),e.currentPosition()),i}function f(e){let t=e.nextToken(),n=e.context(),{lastOffset:r,lastStartLoc:a}=n,c=o(8,r,a);return t.type===12?(t.value??i(e,Ft.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,$t(t)),c.value=t.value||``,s(c,e.currentOffset(),e.currentPosition()),{node:c}):(i(e,Ft.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,0),c.value=``,s(c,r,a),{nextConsumeToken:t,node:c})}function p(e,t){let n=e.context(),r=o(7,n.offset,n.startLoc);return r.value=t,s(r,e.currentOffset(),e.currentPosition()),r}function m(e){let t=e.context(),n=o(6,t.offset,t.startLoc),r=e.nextToken();if(r.type===9){let t=f(e);n.modifier=t.node,r=t.nextConsumeToken||e.nextToken()}switch(r.type!==10&&i(e,Ft.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,$t(r)),r=e.nextToken(),r.type===2&&(r=e.nextToken()),r.type){case 11:r.value??i(e,Ft.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,$t(r)),n.key=p(e,r.value||``);break;case 5:r.value??i(e,Ft.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,$t(r)),n.key=u(e,r.value||``);break;case 6:r.value??i(e,Ft.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,$t(r)),n.key=l(e,r.value||``);break;case 7:r.value??i(e,Ft.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,$t(r)),n.key=d(e,r.value||``);break;default:{i(e,Ft.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc,0);let a=e.context(),c=o(7,a.offset,a.startLoc);return c.value=``,s(c,a.offset,a.startLoc),n.key=c,s(n,a.offset,a.startLoc),{nextConsumeToken:r,node:n}}}return s(n,e.currentOffset(),e.currentPosition()),{node:n}}function h(e){let t=e.context(),n=o(2,t.currentType===1?e.currentOffset():t.offset,t.currentType===1?t.endLoc:t.startLoc);n.items=[];let r=null,f=null;do{let o=r||e.nextToken();switch(r=null,o.type){case 0:o.value??i(e,Ft.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,$t(o)),n.items.push(c(e,o.value||``));break;case 6:o.value??i(e,Ft.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,$t(o)),n.items.push(l(e,o.value||``));break;case 4:f=!0;break;case 5:o.value??i(e,Ft.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,$t(o)),n.items.push(u(e,o.value||``,!!f)),f&&=(a(e,Mt.USE_MODULO_SYNTAX,t.lastStartLoc,0,$t(o)),null);break;case 7:o.value??i(e,Ft.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,$t(o)),n.items.push(d(e,o.value||``));break;case 8:{let t=m(e);n.items.push(t.node),r=t.nextConsumeToken||null;break}}}while(t.currentType!==14&&t.currentType!==1);return s(n,t.currentType===1?t.lastOffset:e.currentOffset(),t.currentType===1?t.lastEndLoc:e.currentPosition()),n}function g(e,t,n,r){let a=e.context(),c=r.items.length===0,l=o(1,t,n);l.cases=[],l.cases.push(r);do{let t=h(e);c||=t.items.length===0,l.cases.push(t)}while(a.currentType!==14);return c&&i(e,Ft.MUST_HAVE_MESSAGES_IN_PLURAL,n,0),s(l,e.currentOffset(),e.currentPosition()),l}function _(e){let t=e.context(),{offset:n,startLoc:r}=t,i=h(e);return t.currentType===14?i:g(e,n,r,i)}function v(n){let r=Jt(n,Ot({},e)),a=r.context(),c=o(0,a.offset,a.startLoc);return t&&c.loc&&(c.loc.source=n),c.body=_(r),e.onCacheKey&&(c.cacheKey=e.onCacheKey(n)),a.currentType!==14&&i(r,Ft.UNEXPECTED_LEXICAL_ANALYSIS,a.lastStartLoc,0,n[a.offset]||``),s(c,r.currentOffset(),r.currentPosition()),c}return{parse:v}}function $t(e){if(e.type===14)return`EOF`;let t=(e.value||``).replace(/\r?\n/gu,`\\n`);return t.length>10?t.slice(0,9)+`…`:t}function en(e,t={}){let n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}function tn(e,t){for(let n=0;n<e.length;n++)nn(e[n],t)}function nn(e,t){switch(e.type){case 1:tn(e.cases,t),t.helper(`plural`);break;case 2:tn(e.items,t);break;case 6:nn(e.key,t),t.helper(`linked`),t.helper(`type`);break;case 5:t.helper(`interpolate`),t.helper(`list`);break;case 4:t.helper(`interpolate`),t.helper(`named`);break}}function rn(e,t={}){let n=en(e);n.helper(`normalize`),e.body&&nn(e.body,n);let r=n.context();e.helpers=Array.from(r.helpers)}function an(e){let t=e.body;return t.type===2?on(t):t.cases.forEach(e=>on(e)),e}function on(e){if(e.items.length===1){let t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{let t=[];for(let n=0;n<e.items.length;n++){let r=e.items[n];if(!(r.type===3||r.type===9)||r.value==null)break;t.push(r.value)}if(t.length===e.items.length){e.static=jt(t);for(let t=0;t<e.items.length;t++){let n=e.items[t];(n.type===3||n.type===9)&&delete n.value}}}}var sn=`minifier`;function cn(e){switch(e.t=e.type,e.type){case 0:{let t=e;cn(t.body),t.b=t.body,delete t.body;break}case 1:{let t=e,n=t.cases;for(let e=0;e<n.length;e++)cn(n[e]);t.c=n,delete t.cases;break}case 2:{let t=e,n=t.items;for(let e=0;e<n.length;e++)cn(n[e]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{let t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{let t=e;cn(t.key),t.k=t.key,delete t.key,t.modifier&&(cn(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{let t=e;t.i=t.index,delete t.index;break}case 4:{let t=e;t.k=t.key,delete t.key;break}default:throw Lt(Ft.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:sn,args:[e.type]})}delete e.type}var ln=`parser`;function un(e,t){let{sourceMap:n,filename:r,breakLineCode:i,needIndent:a}=t,o=t.location!==!1,s={filename:r,code:``,column:1,line:1,offset:0,map:void 0,breakLineCode:i,needIndent:a,indentLevel:0};o&&e.loc&&(s.source=e.loc.source);let c=()=>s;function l(e,t){s.code+=e}function u(e,t=!0){let n=t?i:``;l(a?n+` `.repeat(e):n)}function d(e=!0){let t=++s.indentLevel;e&&u(t)}function f(e=!0){let t=--s.indentLevel;e&&u(t)}function p(){u(s.indentLevel)}return{context:c,push:l,indent:d,deindent:f,newline:p,helper:e=>`_${e}`,needIndent:()=>s.needIndent}}function dn(e,t){let{helper:n}=e;e.push(`${n(`linked`)}(`),hn(e,t.key),t.modifier?(e.push(`, `),hn(e,t.modifier),e.push(`, _type`)):e.push(`, undefined, _type`),e.push(`)`)}function fn(e,t){let{helper:n,needIndent:r}=e;e.push(`${n(`normalize`)}([`),e.indent(r());let i=t.items.length;for(let n=0;n<i&&(hn(e,t.items[n]),n!==i-1);n++)e.push(`, `);e.deindent(r()),e.push(`])`)}function pn(e,t){let{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n(`plural`)}([`),e.indent(r());let i=t.cases.length;for(let n=0;n<i&&(hn(e,t.cases[n]),n!==i-1);n++)e.push(`, `);e.deindent(r()),e.push(`])`)}}function mn(e,t){t.body?hn(e,t.body):e.push(`null`)}function hn(e,t){let{helper:n}=e;switch(t.type){case 0:mn(e,t);break;case 1:pn(e,t);break;case 2:fn(e,t);break;case 6:dn(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n(`interpolate`)}(${n(`list`)}(${t.index}))`,t);break;case 4:e.push(`${n(`interpolate`)}(${n(`named`)}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break;default:throw Lt(Ft.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:ln,args:[t.type]})}}var gn=(e,t={})=>{let n=kt(t.mode)?t.mode:`normal`,r=kt(t.filename)?t.filename:`message.intl`,i=!!t.sourceMap,a=t.breakLineCode==null?n===`arrow`?`;`:`
|
|
4
|
-
`:t.breakLineCode,o=t.needIndent?t.needIndent:n!==`arrow`,s=e.helpers||[],c=un(e,{mode:n,filename:r,sourceMap:i,breakLineCode:a,needIndent:o});c.push(n===`normal`?`function __msg__ (ctx) {`:`(ctx) => {`),c.indent(o),s.length>0&&(c.push(`const { ${jt(s.map(e=>`${e}: _${e}`),`, `)} } = ctx`),c.newline()),c.push(`return `),hn(c,e),c.deindent(o),c.push(`}`),delete e.helpers;let{code:l,map:u}=c.context();return{ast:e,code:l,map:u?u.toJSON():void 0}};function _n(e,t={}){let n=Ot({},t),r=!!n.jit,i=!!n.minify,a=n.optimize==null?!0:n.optimize,o=Qt(n).parse(e);return r?(a&&an(o),i&&cn(o),{ast:o,code:``}):(rn(o,n),gn(o,n))}function vn(){typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(ot().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_JIT_COMPILATION__!=`boolean`&&(ot().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(ot().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function yn(e){return mt(e)&&kn(e)===0&&(dt(e,`b`)||dt(e,`body`))}var bn=[`b`,`body`];function xn(e){return In(e,bn)}var Sn=[`c`,`cases`];function Cn(e){return In(e,Sn,[])}var wn=[`s`,`static`];function Tn(e){return In(e,wn)}var En=[`i`,`items`];function Dn(e){return In(e,En,[])}var On=[`t`,`type`];function kn(e){return In(e,On)}var An=[`v`,`value`];function jn(e,t){let n=In(e,An);if(n!=null)return n;throw Rn(t)}var Mn=[`m`,`modifier`];function Nn(e){return In(e,Mn)}var Pn=[`k`,`key`];function Fn(e){let t=In(e,Pn);if(t)return t;throw Rn(6)}function In(e,t,n){for(let n=0;n<t.length;n++){let r=t[n];if(dt(e,r)&&e[r]!=null)return e[r]}return n}var Ln=[...bn,...Sn,...wn,...En,...Pn,...Mn,...An,...On];function Rn(e){return Error(`unhandled node type: ${e}`)}var zn=[];zn[0]={w:[0],i:[3,0],"[":[4],o:[7]},zn[1]={w:[1],".":[2],"[":[4],o:[7]},zn[2]={w:[2],i:[3,0],0:[3,0]},zn[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},zn[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},zn[5]={"'":[4,0],o:8,l:[5,0]},zn[6]={'"':[4,0],o:8,l:[6,0]};var Bn=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Vn(e){return Bn.test(e)}function Hn(e){let t=e.charCodeAt(0);return t===e.charCodeAt(e.length-1)&&(t===34||t===39)?e.slice(1,-1):e}function Un(e){if(e==null)return`o`;switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return`i`;case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return`w`}return`i`}function Wn(e){let t=e.trim();return e.charAt(0)===`0`&&isNaN(parseInt(e))?!1:Vn(t)?Hn(t):`*`+t}function Gn(e){let t=[],n=-1,r=0,i=0,a,o,s,c,l,u,d,f=[];f[0]=()=>{o===void 0?o=s:o+=s},f[1]=()=>{o!==void 0&&(t.push(o),o=void 0)},f[2]=()=>{f[0](),i++},f[3]=()=>{if(i>0)i--,r=4,f[0]();else{if(i=0,o===void 0||(o=Wn(o),o===!1))return!1;f[1]()}};function p(){let t=e[n+1];if(r===5&&t===`'`||r===6&&t===`"`)return n++,s=`\\`+t,f[0](),!0}for(;r!==null;)if(n++,a=e[n],!(a===`\\`&&p())){if(c=Un(a),d=zn[r],l=d[c]||d.l||8,l===8||(r=l[0],l[1]!==void 0&&(u=f[l[1]],u&&(s=a,u()===!1))))return;if(r===7)return t}}var Kn=new Map;function qn(e,t){return mt(e)?e[t]:null}function Jn(e,t){if(!mt(e))return null;let n=Kn.get(t);if(n||(n=Gn(t),n&&Kn.set(t,n)),!n)return null;let r=n.length,i=e,a=0;for(;a<r;){let e=n[a];if(Ln.includes(e)&&yn(i))return null;let t=i[e];if(t===void 0||pt(i))return null;i=t,a++}return i}var Yn=e=>e,Xn=e=>``,Zn=`text`,Qn=e=>e.length===0?``:bt(e),$n=yt;function er(e,t){return e=Math.abs(e),t===2?e?+(e>1):1:e?Math.min(e,2):0}function tr(e){let t=$e(e.pluralIndex)?e.pluralIndex:-1;return e.named&&($e(e.named.count)||$e(e.named.n))?$e(e.named.count)?e.named.count:$e(e.named.n)?e.named.n:t:t}function nr(e,t){t.count||=e,t.n||=e}function rr(e={}){let t=e.locale,n=tr(e),r=mt(e.pluralRules)&&Z(t)&&pt(e.pluralRules[t])?e.pluralRules[t]:er,i=mt(e.pluralRules)&&Z(t)&&pt(e.pluralRules[t])?er:void 0,a=e=>e[r(n,e.length,i)],o=e.list||[],s=e=>o[e],c=e.named||it();$e(e.pluralIndex)&&nr(n,c);let l=e=>c[e];function u(t){return(pt(e.messages)?e.messages(t):mt(e.messages)?e.messages[t]:!1)||(e.parent?e.parent.message(t):Xn)}let d=t=>e.modifiers?e.modifiers[t]:Yn,f=vt(e.processor)&&pt(e.processor.normalize)?e.processor.normalize:Qn,p=vt(e.processor)&&pt(e.processor.interpolate)?e.processor.interpolate:$n,m={list:s,named:l,plural:a,linked:(e,...t)=>{let[n,r]=t,i=`text`,a=``;t.length===1?mt(n)?(a=n.modifier||a,i=n.type||i):Z(n)&&(a=n||a):t.length===2&&(Z(n)&&(a=n||a),Z(r)&&(i=r||i));let o=u(e)(m),s=i===`vnode`&&ft(o)&&a?o[0]:o;return a?d(a)(s,i):s},message:u,type:vt(e.processor)&&Z(e.processor.type)?e.processor.type:Zn,interpolate:p,normalize:f,values:nt(it(),o,c)};return m}var ir=null;function ar(e){ir=e}function or(e,t,n){ir&&ir.emit(`i18n:init`,{timestamp:Date.now(),i18n:e,version:t,meta:n})}var sr=cr(`function:translate`);function cr(e){return t=>ir&&ir.emit(e,t)}var lr=Mt.__EXTEND_POINT__,ur=xt(lr),dr={NOT_FOUND_KEY:lr,FALLBACK_TO_TRANSLATE:ur(),CANNOT_FORMAT_NUMBER:ur(),FALLBACK_TO_NUMBER_FORMAT:ur(),CANNOT_FORMAT_DATE:ur(),FALLBACK_TO_DATE_FORMAT:ur(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:ur(),__EXTEND_POINT__:ur()};dr.NOT_FOUND_KEY,dr.FALLBACK_TO_TRANSLATE,dr.CANNOT_FORMAT_NUMBER,dr.FALLBACK_TO_NUMBER_FORMAT,dr.CANNOT_FORMAT_DATE,dr.FALLBACK_TO_DATE_FORMAT,dr.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER;var fr=Ft.__EXTEND_POINT__,pr=xt(fr),mr={INVALID_ARGUMENT:fr,INVALID_DATE_ARGUMENT:pr(),INVALID_ISO_DATE_ARGUMENT:pr(),NOT_SUPPORT_NON_STRING_MESSAGE:pr(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:pr(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:pr(),NOT_SUPPORT_LOCALE_TYPE:pr(),__EXTEND_POINT__:pr()};function hr(e){return Lt(e,null,void 0)}mr.INVALID_ARGUMENT,mr.INVALID_DATE_ARGUMENT,mr.INVALID_ISO_DATE_ARGUMENT,mr.NOT_SUPPORT_NON_STRING_MESSAGE,mr.NOT_SUPPORT_LOCALE_PROMISE_VALUE,mr.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION,mr.NOT_SUPPORT_LOCALE_TYPE;function gr(e,t){return t.locale==null?vr(e.locale):vr(t.locale)}var _r;function vr(e){if(Z(e))return e;if(pt(e)){if(e.resolvedOnce&&_r!=null)return _r;if(e.constructor.name===`Function`){let t=e();if(ht(t))throw hr(mr.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return _r=t}else throw hr(mr.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw hr(mr.NOT_SUPPORT_LOCALE_TYPE)}function yr(e,t,n){return[...new Set([n,...ft(t)?t:mt(t)?Object.keys(t):Z(t)?[t]:[n]])]}function br(e,t,n){let r=Z(n)?n:Tr,i=e;i.__localeChainCache||=new Map;let a=i.__localeChainCache.get(r);if(!a){a=[];let e=[n];for(;ft(e);)e=xr(a,e,t);let o=ft(t)||!vt(t)?t:t.default?t.default:null;e=Z(o)?[o]:o,ft(e)&&xr(a,e,!1),i.__localeChainCache.set(r,a)}return a}function xr(e,t,n){let r=!0;for(let i=0;i<t.length&&Q(r);i++){let a=t[i];Z(a)&&(r=Sr(e,t[i],n))}return r}function Sr(e,t,n){let r,i=t.split(`-`);do r=Cr(e,i.join(`-`),n),i.splice(-1,1);while(i.length&&r===!0);return r}function Cr(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!==`!`;let i=t.replace(/!/g,``);e.push(i),(ft(n)||vt(n))&&n[i]&&(r=n[i])}return r}var wr=`9.14.5`,Tr=`en-US`,Er=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function Dr(){return{upper:(e,t)=>t===`text`&&Z(e)?e.toUpperCase():t===`vnode`&&mt(e)&&`__v_isVNode`in e?e.children.toUpperCase():e,lower:(e,t)=>t===`text`&&Z(e)?e.toLowerCase():t===`vnode`&&mt(e)&&`__v_isVNode`in e?e.children.toLowerCase():e,capitalize:(e,t)=>t===`text`&&Z(e)?Er(e):t===`vnode`&&mt(e)&&`__v_isVNode`in e?Er(e.children):e}}var Or;function kr(e){Or=e}var Ar;function jr(e){Ar=e}var Mr;function Nr(e){Mr=e}var Pr=null,Fr=()=>Pr,Ir=null,Lr=e=>{Ir=e},Rr=()=>Ir,zr=0;function Br(e={}){let t=pt(e.onWarn)?e.onWarn:Ye,n=Z(e.version)?e.version:wr,r=Z(e.locale)||pt(e.locale)?e.locale:Tr,i=pt(r)?Tr:r,a=ft(e.fallbackLocale)||vt(e.fallbackLocale)||Z(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,o=vt(e.messages)?e.messages:Vr(i),s=vt(e.datetimeFormats)?e.datetimeFormats:Vr(i),c=vt(e.numberFormats)?e.numberFormats:Vr(i),l=nt(it(),e.modifiers,Dr()),u=e.pluralRules||it(),d=pt(e.missing)?e.missing:null,f=Q(e.missingWarn)||tt(e.missingWarn)?e.missingWarn:!0,p=Q(e.fallbackWarn)||tt(e.fallbackWarn)?e.fallbackWarn:!0,m=!!e.fallbackFormat,h=!!e.unresolving,g=pt(e.postTranslation)?e.postTranslation:null,_=vt(e.processor)?e.processor:null,v=Q(e.warnHtmlMessage)?e.warnHtmlMessage:!0,y=!!e.escapeParameter,b=pt(e.messageCompiler)?e.messageCompiler:Or,x=pt(e.messageResolver)?e.messageResolver:Ar||qn,S=pt(e.localeFallbacker)?e.localeFallbacker:Mr||yr,C=mt(e.fallbackContext)?e.fallbackContext:void 0,w=e,T=mt(w.__datetimeFormatters)?w.__datetimeFormatters:new Map,E=mt(w.__numberFormatters)?w.__numberFormatters:new Map,D=mt(w.__meta)?w.__meta:{};zr++;let O={version:n,cid:zr,locale:r,fallbackLocale:a,messages:o,modifiers:l,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:h,postTranslation:g,processor:_,warnHtmlMessage:v,escapeParameter:y,messageCompiler:b,messageResolver:x,localeFallbacker:S,fallbackContext:C,onWarn:t,__meta:D};return O.datetimeFormats=s,O.numberFormats=c,O.__datetimeFormatters=T,O.__numberFormatters=E,__INTLIFY_PROD_DEVTOOLS__&&or(O,n,D),O}var Vr=e=>({[e]:it()});function Hr(e,t,n,r,i){let{missing:a,onWarn:o}=e;if(a!==null){let r=a(e,n,t,i);return Z(r)?r:t}else return t}function Ur(e,t,n){let r=e;r.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function Wr(e,t){return e===t?!1:e.split(`-`)[0]===t.split(`-`)[0]}function Gr(e,t){let n=t.indexOf(e);if(n===-1)return!1;for(let r=n+1;r<t.length;r++)if(Wr(e,t[r]))return!0;return!1}function Kr(e){return t=>qr(t,e)}function qr(e,t){let n=xn(t);if(n==null)throw Rn(0);if(kn(n)===1){let t=Cn(n);return e.plural(t.reduce((t,n)=>[...t,Jr(e,n)],[]))}else return Jr(e,n)}function Jr(e,t){let n=Tn(t);if(n!=null)return e.type===`text`?n:e.normalize([n]);{let n=Dn(t).reduce((t,n)=>[...t,Yr(e,n)],[]);return e.normalize(n)}}function Yr(e,t){let n=kn(t);switch(n){case 3:return jn(t,n);case 9:return jn(t,n);case 4:{let r=t;if(dt(r,`k`)&&r.k)return e.interpolate(e.named(r.k));if(dt(r,`key`)&&r.key)return e.interpolate(e.named(r.key));throw Rn(n)}case 5:{let r=t;if(dt(r,`i`)&&$e(r.i))return e.interpolate(e.list(r.i));if(dt(r,`index`)&&$e(r.index))return e.interpolate(e.list(r.index));throw Rn(n)}case 6:{let n=t,r=Nn(n),i=Fn(n);return e.linked(Yr(e,i),r?Yr(e,r):void 0,e.type)}case 7:return jn(t,n);case 8:return jn(t,n);default:throw Error(`unhandled node on format message part: ${n}`)}}var Xr=e=>e,Zr=it();function Qr(e,t={}){let n=!1,r=t.onError||Rt;return t.onError=e=>{n=!0,r(e)},{..._n(e,t),detectError:n}}var $r=(e,t)=>{if(!Z(e))throw hr(mr.NOT_SUPPORT_NON_STRING_MESSAGE);{Q(t.warnHtmlMessage)&&t.warnHtmlMessage;let n=(t.onCacheKey||Xr)(e),r=Zr[n];if(r)return r;let{code:i,detectError:a}=Qr(e,t),o=Function(`return ${i}`)();return a?o:Zr[n]=o}};function ei(e,t){if(__INTLIFY_JIT_COMPILATION__&&!__INTLIFY_DROP_MESSAGE_COMPILER__&&Z(e)){Q(t.warnHtmlMessage)&&t.warnHtmlMessage;let n=(t.onCacheKey||Xr)(e),r=Zr[n];if(r)return r;let{ast:i,detectError:a}=Qr(e,{...t,location:!1,jit:!0}),o=Kr(i);return a?o:Zr[n]=o}else{let t=e.cacheKey;return t?Zr[t]||(Zr[t]=Kr(e)):Kr(e)}}var ti=()=>``,ni=e=>pt(e);function ri(e,...t){let{fallbackFormat:n,postTranslation:r,unresolving:i,messageCompiler:a,fallbackLocale:o,messages:s}=e,[c,l]=ci(...t),u=Q(l.missingWarn)?l.missingWarn:e.missingWarn,d=Q(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=Q(l.escapeParameter)?l.escapeParameter:e.escapeParameter,p=!!l.resolvedMessage,m=Z(l.default)||Q(l.default)?Q(l.default)?a?c:()=>c:l.default:n?a?c:()=>c:``,h=n||m!==``,g=gr(e,l);f&&ii(l);let[_,v,y]=p?[c,g,s[g]||it()]:ai(e,c,g,o,d,u),b=_,x=c;if(!p&&!(Z(b)||yn(b)||ni(b))&&h&&(b=m,x=b),!p&&(!(Z(b)||yn(b)||ni(b))||!Z(v)))return i?-1:c;let S=!1,C=ni(b)?b:oi(e,c,v,b,x,()=>{S=!0});if(S)return b;let w=si(e,C,rr(ui(e,v,y,l))),T=r?r(w,c):w;if(f&&Z(T)&&(T=lt(T)),__INTLIFY_PROD_DEVTOOLS__){let t={timestamp:Date.now(),key:Z(c)?c:ni(b)?b.key:``,locale:v||(ni(b)?b.locale:``),format:Z(b)?b:ni(b)?b.source:``,message:T};t.meta=nt({},e.__meta,Fr()||{}),sr(t)}return T}function ii(e){ft(e.list)?e.list=e.list.map(e=>Z(e)?st(e):e):mt(e.named)&&Object.keys(e.named).forEach(t=>{Z(e.named[t])&&(e.named[t]=st(e.named[t]))})}function ai(e,t,n,r,i,a){let{messages:o,onWarn:s,messageResolver:c,localeFallbacker:l}=e,u=l(e,r,n),d=it(),f,p=null;for(let n=0;n<u.length&&(f=u[n],d=o[f]||it(),(p=c(d,t))===null&&(p=d[t]),!(Z(p)||yn(p)||ni(p)));n++)if(!Gr(f,u)){let n=Hr(e,t,f,a,`translate`);n!==t&&(p=n)}return[p,f,d]}function oi(e,t,n,r,i,a){let{messageCompiler:o,warnHtmlMessage:s}=e;if(ni(r)){let e=r;return e.locale=e.locale||n,e.key=e.key||t,e}if(o==null){let e=(()=>r);return e.locale=n,e.key=t,e}let c=o(r,li(e,n,i,r,s,a));return c.locale=n,c.key=t,c.source=r,c}function si(e,t,n){return t(n)}function ci(...e){let[t,n,r]=e,i=it();if(!Z(t)&&!$e(t)&&!ni(t)&&!yn(t))throw hr(mr.INVALID_ARGUMENT);let a=$e(t)?String(t):(ni(t),t);return $e(n)?i.plural=n:Z(n)?i.default=n:vt(n)&&!X(n)?i.named=n:ft(n)&&(i.list=n),$e(r)?i.plural=r:Z(r)?i.default=r:vt(r)&&nt(i,r),[a,i]}function li(e,t,n,r,i,a){return{locale:t,key:n,warnHtmlMessage:i,onError:e=>{throw a&&a(e),e},onCacheKey:e=>Ze(t,n,e)}}function ui(e,t,n,r){let{modifiers:i,pluralRules:a,messageResolver:o,fallbackLocale:s,fallbackWarn:c,missingWarn:l,fallbackContext:u}=e,d={locale:t,modifiers:i,pluralRules:a,messages:r=>{let i=o(n,r);if(i==null&&u){let[,,e]=ai(u,r,t,s,c,l);i=o(e,r)}if(Z(i)||yn(i)){let n=!1,a=oi(e,r,t,i,r,()=>{n=!0});return n?ti:a}else if(ni(i))return i;else return ti}};return e.processor&&(d.processor=e.processor),r.list&&(d.list=r.list),r.named&&(d.named=r.named),$e(r.plural)&&(d.pluralIndex=r.plural),d}var di=typeof Intl<`u`;di&&Intl.DateTimeFormat,di&&Intl.NumberFormat;function fi(e,...t){let{datetimeFormats:n,unresolving:r,fallbackLocale:i,onWarn:a,localeFallbacker:o}=e,{__datetimeFormatters:s}=e,[c,l,u,d]=mi(...t),f=Q(u.missingWarn)?u.missingWarn:e.missingWarn;Q(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;let p=!!u.part,m=gr(e,u),h=o(e,i,m);if(!Z(c)||c===``)return new Intl.DateTimeFormat(m,d).format(l);let g={},_,v=null;for(let t=0;t<h.length&&(_=h[t],g=n[_]||{},v=g[c],!vt(v));t++)Hr(e,c,_,f,`datetime format`);if(!vt(v)||!Z(_))return r?-1:c;let y=`${_}__${c}`;X(d)||(y=`${y}__${JSON.stringify(d)}`);let b=s.get(y);return b||(b=new Intl.DateTimeFormat(_,nt({},v,d)),s.set(y,b)),p?b.formatToParts(l):b.format(l)}var pi=[`localeMatcher`,`weekday`,`era`,`year`,`month`,`day`,`hour`,`minute`,`second`,`timeZoneName`,`formatMatcher`,`hour12`,`timeZone`,`dateStyle`,`timeStyle`,`calendar`,`dayPeriod`,`numberingSystem`,`hourCycle`,`fractionalSecondDigits`];function mi(...e){let[t,n,r,i]=e,a=it(),o=it(),s;if(Z(t)){let e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw hr(mr.INVALID_ISO_DATE_ARGUMENT);let n=e[3]?e[3].trim().startsWith(`T`)?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();s=new Date(n);try{s.toISOString()}catch{throw hr(mr.INVALID_ISO_DATE_ARGUMENT)}}else if(et(t)){if(isNaN(t.getTime()))throw hr(mr.INVALID_DATE_ARGUMENT);s=t}else if($e(t))s=t;else throw hr(mr.INVALID_ARGUMENT);return Z(n)?a.key=n:vt(n)&&Object.keys(n).forEach(e=>{pi.includes(e)?o[e]=n[e]:a[e]=n[e]}),Z(r)?a.locale=r:vt(r)&&(o=r),vt(i)&&(o=i),[a.key||``,s,a,o]}function hi(e,t,n){let r=e;for(let e in n){let n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function gi(e,...t){let{numberFormats:n,unresolving:r,fallbackLocale:i,onWarn:a,localeFallbacker:o}=e,{__numberFormatters:s}=e,[c,l,u,d]=vi(...t),f=Q(u.missingWarn)?u.missingWarn:e.missingWarn;Q(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;let p=!!u.part,m=gr(e,u),h=o(e,i,m);if(!Z(c)||c===``)return new Intl.NumberFormat(m,d).format(l);let g={},_,v=null;for(let t=0;t<h.length&&(_=h[t],g=n[_]||{},v=g[c],!vt(v));t++)Hr(e,c,_,f,`number format`);if(!vt(v)||!Z(_))return r?-1:c;let y=`${_}__${c}`;X(d)||(y=`${y}__${JSON.stringify(d)}`);let b=s.get(y);return b||(b=new Intl.NumberFormat(_,nt({},v,d)),s.set(y,b)),p?b.formatToParts(l):b.format(l)}var _i=[`localeMatcher`,`style`,`currency`,`currencyDisplay`,`currencySign`,`useGrouping`,`minimumIntegerDigits`,`minimumFractionDigits`,`maximumFractionDigits`,`minimumSignificantDigits`,`maximumSignificantDigits`,`compactDisplay`,`notation`,`signDisplay`,`unit`,`unitDisplay`,`roundingMode`,`roundingPriority`,`roundingIncrement`,`trailingZeroDisplay`];function vi(...e){let[t,n,r,i]=e,a=it(),o=it();if(!$e(t))throw hr(mr.INVALID_ARGUMENT);let s=t;return Z(n)?a.key=n:vt(n)&&Object.keys(n).forEach(e=>{_i.includes(e)?o[e]=n[e]:a[e]=n[e]}),Z(r)?a.locale=r:vt(r)&&(o=r),vt(i)&&(o=i),[a.key||``,s,a,o]}function yi(e,t,n){let r=e;for(let e in n){let n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}vn();var bi=`9.14.5`;function xi(){typeof __VUE_I18N_FULL_INSTALL__!=`boolean`&&(ot().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!=`boolean`&&(ot().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!=`boolean`&&(ot().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(ot().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(ot().__INTLIFY_PROD_DEVTOOLS__=!1)}var Si=dr.__EXTEND_POINT__,Ci=xt(Si),wi={FALLBACK_TO_ROOT:Si,NOT_SUPPORTED_PRESERVE:Ci(),NOT_SUPPORTED_FORMATTER:Ci(),NOT_SUPPORTED_PRESERVE_DIRECTIVE:Ci(),NOT_SUPPORTED_GET_CHOICE_INDEX:Ci(),COMPONENT_NAME_LEGACY_COMPATIBLE:Ci(),NOT_FOUND_PARENT_SCOPE:Ci(),IGNORE_OBJ_FLATTEN:Ci(),NOTICE_DROP_ALLOW_COMPOSITION:Ci(),NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG:Ci()};wi.FALLBACK_TO_ROOT,wi.NOT_SUPPORTED_PRESERVE,wi.NOT_SUPPORTED_FORMATTER,wi.NOT_SUPPORTED_PRESERVE_DIRECTIVE,wi.NOT_SUPPORTED_GET_CHOICE_INDEX,wi.COMPONENT_NAME_LEGACY_COMPATIBLE,wi.NOT_FOUND_PARENT_SCOPE,wi.IGNORE_OBJ_FLATTEN,wi.NOTICE_DROP_ALLOW_COMPOSITION,wi.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG;var Ti=mr.__EXTEND_POINT__,Ei=xt(Ti),Di={UNEXPECTED_RETURN_TYPE:Ti,INVALID_ARGUMENT:Ei(),MUST_BE_CALL_SETUP_TOP:Ei(),NOT_INSTALLED:Ei(),NOT_AVAILABLE_IN_LEGACY_MODE:Ei(),REQUIRED_VALUE:Ei(),INVALID_VALUE:Ei(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:Ei(),NOT_INSTALLED_WITH_PROVIDE:Ei(),UNEXPECTED_ERROR:Ei(),NOT_COMPATIBLE_LEGACY_VUE_I18N:Ei(),BRIDGE_SUPPORT_VUE_2_ONLY:Ei(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:Ei(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:Ei(),__EXTEND_POINT__:Ei()};function Oi(e,...t){return Lt(e,null,void 0)}Di.UNEXPECTED_RETURN_TYPE,Di.INVALID_ARGUMENT,Di.MUST_BE_CALL_SETUP_TOP,Di.NOT_INSTALLED,Di.UNEXPECTED_ERROR,Di.NOT_AVAILABLE_IN_LEGACY_MODE,Di.REQUIRED_VALUE,Di.INVALID_VALUE,Di.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN,Di.NOT_INSTALLED_WITH_PROVIDE,Di.NOT_COMPATIBLE_LEGACY_VUE_I18N,Di.BRIDGE_SUPPORT_VUE_2_ONLY,Di.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION,Di.NOT_AVAILABLE_COMPOSITION_IN_LEGACY;var ki=Xe(`__translateVNode`),Ai=Xe(`__datetimeParts`),ji=Xe(`__numberParts`),Mi=Xe(`__setPluralRules`);Xe(`__intlifyMeta`);var Ni=Xe(`__injectWithOption`),Pi=Xe(`__dispose`);function Fi(e){if(!mt(e)||yn(e))return e;for(let t in e)if(dt(e,t))if(!t.includes(`.`))mt(e[t])&&Fi(e[t]);else{let n=t.split(`.`),r=n.length-1,i=e,a=!1;for(let e=0;e<r;e++){if(n[e]===`__proto__`)throw Error(`unsafe key: ${n[e]}`);if(n[e]in i||(i[n[e]]=it()),!mt(i[n[e]])){a=!0;break}i=i[n[e]]}if(a||(yn(i)?Ln.includes(n[r])||delete e[t]:(i[n[r]]=e[t],delete e[t])),!yn(i)){let e=i[n[r]];mt(e)&&Fi(e)}}return e}function Ii(e,t){let{messages:n,__i18n:r,messageResolver:i,flatJson:a}=t,o=vt(n)?n:ft(r)?it():{[e]:it()};if(ft(r)&&r.forEach(e=>{if(`locale`in e&&`resource`in e){let{locale:t,resource:n}=e;t?(o[t]=o[t]||it(),Ct(n,o[t])):Ct(n,o)}else Z(e)&&Ct(JSON.parse(e),o)}),i==null&&a)for(let e in o)dt(o,e)&&Fi(o[e]);return o}function Li(e){return e.type}function Ri(e,t,n){let r=mt(t.messages)?t.messages:it();`__i18nGlobal`in n&&(r=Ii(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));let i=Object.keys(r);if(i.length&&i.forEach(t=>{e.mergeLocaleMessage(t,r[t])}),mt(t.datetimeFormats)){let n=Object.keys(t.datetimeFormats);n.length&&n.forEach(n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])})}if(mt(t.numberFormats)){let n=Object.keys(t.numberFormats);n.length&&n.forEach(n=>{e.mergeNumberFormat(n,t.numberFormats[n])})}}function zi(e){return U(se,null,e,0)}var Bi=()=>[],Vi=()=>!1,Hi=0;function Ui(e){return((t,n,r,i)=>e(n,r,s()||void 0,i))}function Wi(e={},t){let{__root:n,__injectWithOption:r}=e,i=n===void 0,a=e.flatJson,o=Y?M:oe,s=!!e.translateExistCompatible,c=Q(e.inheritLocale)?e.inheritLocale:!0,l=o(n&&c?n.locale.value:Z(e.locale)?e.locale:Tr),u=o(n&&c?n.fallbackLocale.value:Z(e.fallbackLocale)||ft(e.fallbackLocale)||vt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),d=o(Ii(l.value,e)),f=o(vt(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),p=o(vt(e.numberFormats)?e.numberFormats:{[l.value]:{}}),m=n?n.missingWarn:Q(e.missingWarn)||tt(e.missingWarn)?e.missingWarn:!0,h=n?n.fallbackWarn:Q(e.fallbackWarn)||tt(e.fallbackWarn)?e.fallbackWarn:!0,g=n?n.fallbackRoot:Q(e.fallbackRoot)?e.fallbackRoot:!0,_=!!e.fallbackFormat,v=pt(e.missing)?e.missing:null,y=pt(e.missing)?Ui(e.missing):null,b=pt(e.postTranslation)?e.postTranslation:null,x=n?n.warnHtmlMessage:Q(e.warnHtmlMessage)?e.warnHtmlMessage:!0,S=!!e.escapeParameter,C=n?n.modifiers:vt(e.modifiers)?e.modifiers:{},w=e.pluralRules||n&&n.pluralRules,T;T=(()=>{i&&Lr(null);let t={version:bi,locale:l.value,fallbackLocale:u.value,messages:d.value,modifiers:C,pluralRules:w,missing:y===null?void 0:y,missingWarn:m,fallbackWarn:h,fallbackFormat:_,unresolving:!0,postTranslation:b===null?void 0:b,warnHtmlMessage:x,escapeParameter:S,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:`vue`}};t.datetimeFormats=f.value,t.numberFormats=p.value,t.__datetimeFormatters=vt(T)?T.__datetimeFormatters:void 0,t.__numberFormatters=vt(T)?T.__numberFormatters:void 0;let n=Br(t);return i&&Lr(n),n})(),Ur(T,l.value,u.value);function D(){return[l.value,u.value,d.value,f.value,p.value]}let O=I({get:()=>l.value,set:e=>{l.value=e,T.locale=l.value}}),k=I({get:()=>u.value,set:e=>{u.value=e,T.fallbackLocale=u.value,Ur(T,l.value,e)}}),A=I(()=>d.value),j=I(()=>f.value),ee=I(()=>p.value);function N(){return pt(b)?b:null}function P(e){b=e,T.postTranslation=e}function te(){return v}function ne(e){e!==null&&(y=Ui(e)),v=e,T.missing=y}let F=(e,t,r,a,o,s)=>{D();let c;try{__INTLIFY_PROD_DEVTOOLS__,i||(T.fallbackContext=n?Rr():void 0),c=e(T)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(T.fallbackContext=void 0)}if(r!==`translate exists`&&$e(c)&&c===-1||r===`translate exists`&&!c){let[e,r]=t();return n&&g?a(n):o(e)}else if(s(c))return c;else throw Oi(Di.UNEXPECTED_RETURN_TYPE)};function L(...e){return F(t=>Reflect.apply(ri,null,[t,...e]),()=>ci(...e),`translate`,t=>Reflect.apply(t.t,t,[...e]),e=>e,e=>Z(e))}function re(...e){let[t,n,r]=e;if(r&&!mt(r))throw Oi(Di.INVALID_ARGUMENT);return L(t,n,nt({resolvedMessage:!0},r||{}))}function ie(...e){return F(t=>Reflect.apply(fi,null,[t,...e]),()=>mi(...e),`datetime format`,t=>Reflect.apply(t.d,t,[...e]),()=>``,e=>Z(e))}function ae(...e){return F(t=>Reflect.apply(gi,null,[t,...e]),()=>vi(...e),`number format`,t=>Reflect.apply(t.n,t,[...e]),()=>``,e=>Z(e))}function se(e){return e.map(e=>Z(e)||$e(e)||Q(e)?zi(String(e)):e)}let R={normalize:se,interpolate:e=>e,type:`vnode`};function ce(...e){return F(t=>{let n,r=t;try{r.processor=R,n=Reflect.apply(ri,null,[r,...e])}finally{r.processor=null}return n},()=>ci(...e),`translate`,t=>t[ki](...e),e=>[zi(e)],e=>ft(e))}function le(...e){return F(t=>Reflect.apply(gi,null,[t,...e]),()=>vi(...e),`number format`,t=>t[ji](...e),Bi,e=>Z(e)||ft(e))}function ue(...e){return F(t=>Reflect.apply(fi,null,[t,...e]),()=>mi(...e),`datetime format`,t=>t[Ai](...e),Bi,e=>Z(e)||ft(e))}function z(e){w=e,T.pluralRules=w}function de(e,t){return F(()=>{if(!e)return!1;let n=B(Z(t)?t:l.value),r=T.messageResolver(n,e);return s?r!=null:yn(r)||ni(r)||Z(r)},()=>[e],`translate exists`,n=>Reflect.apply(n.te,n,[e,t]),Vi,e=>Q(e))}function fe(e){let t=null,n=br(T,u.value,l.value);for(let r=0;r<n.length;r++){let i=d.value[n[r]]||{},a=T.messageResolver(i,e);if(a!=null){t=a;break}}return t}function pe(e){return fe(e)??(n&&n.tm(e)||{})}function B(e){return d.value[e]||{}}function me(e,t){if(a){let n={[e]:t};for(let e in n)dt(n,e)&&Fi(n[e]);t=n[e]}d.value[e]=t,T.messages=d.value}function he(e,t){d.value[e]=d.value[e]||{};let n={[e]:t};if(a)for(let e in n)dt(n,e)&&Fi(n[e]);t=n[e],Ct(t,d.value[e]),T.messages=d.value}function V(e){return f.value[e]||{}}function H(e,t){f.value[e]=t,T.datetimeFormats=f.value,hi(T,e,t)}function U(e,t){f.value[e]=nt(f.value[e]||{},t),T.datetimeFormats=f.value,hi(T,e,t)}function ge(e){return p.value[e]||{}}function W(e,t){p.value[e]=t,T.numberFormats=p.value,yi(T,e,t)}function G(e,t){p.value[e]=nt(p.value[e]||{},t),T.numberFormats=p.value,yi(T,e,t)}Hi++,n&&Y&&(E(n.locale,e=>{c&&(l.value=e,T.locale=e,Ur(T,l.value,u.value))}),E(n.fallbackLocale,e=>{c&&(u.value=e,T.fallbackLocale=e,Ur(T,l.value,u.value))}));let K={id:Hi,locale:O,fallbackLocale:k,get inheritLocale(){return c},set inheritLocale(e){c=e,e&&n&&(l.value=n.locale.value,u.value=n.fallbackLocale.value,Ur(T,l.value,u.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:A,get modifiers(){return C},get pluralRules(){return w||{}},get isGlobal(){return i},get missingWarn(){return m},set missingWarn(e){m=e,T.missingWarn=m},get fallbackWarn(){return h},set fallbackWarn(e){h=e,T.fallbackWarn=h},get fallbackRoot(){return g},set fallbackRoot(e){g=e},get fallbackFormat(){return _},set fallbackFormat(e){_=e,T.fallbackFormat=_},get warnHtmlMessage(){return x},set warnHtmlMessage(e){x=e,T.warnHtmlMessage=e},get escapeParameter(){return S},set escapeParameter(e){S=e,T.escapeParameter=e},t:L,getLocaleMessage:B,setLocaleMessage:me,mergeLocaleMessage:he,getPostTranslationHandler:N,setPostTranslationHandler:P,getMissingHandler:te,setMissingHandler:ne,[Mi]:z};return K.datetimeFormats=j,K.numberFormats=ee,K.rt=re,K.te=de,K.tm=pe,K.d=ie,K.n=ae,K.getDateTimeFormat=V,K.setDateTimeFormat=H,K.mergeDateTimeFormat=U,K.getNumberFormat=ge,K.setNumberFormat=W,K.mergeNumberFormat=G,K[Ni]=r,K[ki]=ce,K[Ai]=ue,K[ji]=le,K}function Gi(e){let t=Z(e.locale)?e.locale:Tr,n=Z(e.fallbackLocale)||ft(e.fallbackLocale)||vt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=pt(e.missing)?e.missing:void 0,i=Q(e.silentTranslationWarn)||tt(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,a=Q(e.silentFallbackWarn)||tt(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,o=Q(e.fallbackRoot)?e.fallbackRoot:!0,s=!!e.formatFallbackMessages,c=vt(e.modifiers)?e.modifiers:{},l=e.pluralizationRules,u=pt(e.postTranslation)?e.postTranslation:void 0,d=Z(e.warnHtmlInMessage)?e.warnHtmlInMessage!==`off`:!0,f=!!e.escapeParameterHtml,p=Q(e.sync)?e.sync:!0,m=e.messages;if(vt(e.sharedMessages)){let t=e.sharedMessages;m=Object.keys(t).reduce((e,n)=>(nt(e[n]||(e[n]={}),t[n]),e),m||{})}let{__i18n:h,__root:g,__injectWithOption:_}=e,v=e.datetimeFormats,y=e.numberFormats,b=e.flatJson,x=e.translateExistCompatible;return{locale:t,fallbackLocale:n,messages:m,flatJson:b,datetimeFormats:v,numberFormats:y,missing:r,missingWarn:i,fallbackWarn:a,fallbackRoot:o,fallbackFormat:s,modifiers:c,pluralRules:l,postTranslation:u,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,translateExistCompatible:x,__i18n:h,__root:g,__injectWithOption:_}}function Ki(e={},t){{let t=Wi(Gi(e)),{__extender:n}=e,r={id:t.id,get locale(){return t.locale.value},set locale(e){t.locale.value=e},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(e){t.fallbackLocale.value=e},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get formatter(){return{interpolate(){return[]}}},set formatter(e){},get missing(){return t.getMissingHandler()},set missing(e){t.setMissingHandler(e)},get silentTranslationWarn(){return Q(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(e){t.missingWarn=Q(e)?!e:e},get silentFallbackWarn(){return Q(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(e){t.fallbackWarn=Q(e)?!e:e},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(e){t.fallbackFormat=e},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(e){t.setPostTranslationHandler(e)},get sync(){return t.inheritLocale},set sync(e){t.inheritLocale=e},get warnHtmlInMessage(){return t.warnHtmlMessage?`warn`:`off`},set warnHtmlInMessage(e){t.warnHtmlMessage=e!==`off`},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(e){t.escapeParameter=e},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(e){},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...e){let[n,r,i]=e,a={},o=null,s=null;if(!Z(n))throw Oi(Di.INVALID_ARGUMENT);let c=n;return Z(r)?a.locale=r:ft(r)?o=r:vt(r)&&(s=r),ft(i)?o=i:vt(i)&&(s=i),Reflect.apply(t.t,t,[c,o||s||{},a])},rt(...e){return Reflect.apply(t.rt,t,[...e])},tc(...e){let[n,r,i]=e,a={plural:1},o=null,s=null;if(!Z(n))throw Oi(Di.INVALID_ARGUMENT);let c=n;return Z(r)?a.locale=r:$e(r)?a.plural=r:ft(r)?o=r:vt(r)&&(s=r),Z(i)?a.locale=i:ft(i)?o=i:vt(i)&&(s=i),Reflect.apply(t.t,t,[c,o||s||{},a])},te(e,n){return t.te(e,n)},tm(e){return t.tm(e)},getLocaleMessage(e){return t.getLocaleMessage(e)},setLocaleMessage(e,n){t.setLocaleMessage(e,n)},mergeLocaleMessage(e,n){t.mergeLocaleMessage(e,n)},d(...e){return Reflect.apply(t.d,t,[...e])},getDateTimeFormat(e){return t.getDateTimeFormat(e)},setDateTimeFormat(e,n){t.setDateTimeFormat(e,n)},mergeDateTimeFormat(e,n){t.mergeDateTimeFormat(e,n)},n(...e){return Reflect.apply(t.n,t,[...e])},getNumberFormat(e){return t.getNumberFormat(e)},setNumberFormat(e,n){t.setNumberFormat(e,n)},mergeNumberFormat(e,n){t.mergeNumberFormat(e,n)},getChoiceIndex(e,t){return-1}};return r.__extender=n,r}}var qi={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e===`parent`||e===`global`,default:`parent`},i18n:{type:Object}};function Ji({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((e,t)=>[...e,...t.type===N?t.children:[t]],[]):t.reduce((t,n)=>{let r=e[n];return r&&(t[n]=r()),t},it())}function Yi(e){return N}var Xi=c({name:`i18n-t`,props:nt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>$e(e)||!isNaN(e)}},qi),setup(e,t){let{slots:n,attrs:r}=t,i=e.i18n||ua({useScope:e.scope,__useComponent:!0});return()=>{let a=Object.keys(n).filter(e=>e!==`_`),o=it();e.locale&&(o.locale=e.locale),e.plural!==void 0&&(o.plural=Z(e.plural)?+e.plural:e.plural);let s=Ji(t,a),c=i[ki](e.keypath,s,o),l=nt(it(),r);return _(Z(e.tag)||mt(e.tag)?e.tag:Yi(),l,c)}}});function Zi(e){return ft(e)&&!Z(e[0])}function Qi(e,t,n,r){let{slots:i,attrs:a}=t;return()=>{let t={part:!0},o=it();e.locale&&(t.locale=e.locale),Z(e.format)?t.key=e.format:mt(e.format)&&(Z(e.format.key)&&(t.key=e.format.key),o=Object.keys(e.format).reduce((t,r)=>n.includes(r)?nt(it(),t,{[r]:e.format[r]}):t,it()));let s=r(e.value,t,o),c=[t.key];ft(s)?c=s.map((e,t)=>{let n=i[e.type],r=n?n({[e.type]:e.value,index:t,parts:s}):[e.value];return Zi(r)&&(r[0].key=`${e.type}-${t}`),r}):Z(s)&&(c=[s]);let l=nt(it(),a);return _(Z(e.tag)||mt(e.tag)?e.tag:Yi(),l,c)}}var $i=c({name:`i18n-n`,props:nt({value:{type:Number,required:!0},format:{type:[String,Object]}},qi),setup(e,t){let n=e.i18n||ua({useScope:e.scope,__useComponent:!0});return Qi(e,t,_i,(...e)=>n[ji](...e))}}),ea=c({name:`i18n-d`,props:nt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},qi),setup(e,t){let n=e.i18n||ua({useScope:e.scope,__useComponent:!0});return Qi(e,t,pi,(...e)=>n[Ai](...e))}});function ta(e,t){let n=e;if(e.mode===`composition`)return n.__getInstance(t)||e.global;{let r=n.__getInstance(t);return r==null?e.global.__composer:r.__composer}}function na(e){let t=t=>{let{instance:n,modifiers:r,value:i}=t;if(!n||!n.$)throw Oi(Di.UNEXPECTED_ERROR);let a=ta(e,n.$),o=ra(i);return[Reflect.apply(a.t,a,[...ia(o)]),a]};return{created:(n,r)=>{let[i,a]=t(r);Y&&e.global===a&&(n.__i18nWatcher=E(a.locale,()=>{r.instance&&r.instance.$forceUpdate()})),n.__composer=a,n.textContent=i},unmounted:e=>{Y&&e.__i18nWatcher&&(e.__i18nWatcher(),e.__i18nWatcher=void 0,delete e.__i18nWatcher),e.__composer&&(e.__composer=void 0,delete e.__composer)},beforeUpdate:(e,{value:t})=>{if(e.__composer){let n=e.__composer,r=ra(t);e.textContent=Reflect.apply(n.t,n,[...ia(r)])}},getSSRProps:e=>{let[n]=t(e);return{textContent:n}}}}function ra(e){if(Z(e))return{path:e};if(vt(e)){if(!(`path`in e))throw Oi(Di.REQUIRED_VALUE,`path`);return e}else throw Oi(Di.INVALID_VALUE)}function ia(e){let{path:t,locale:n,args:r,choice:i,plural:a}=e,o={},s=r||{};return Z(n)&&(o.locale=n),$e(i)&&(o.plural=i),$e(a)&&(o.plural=a),[t,s,o]}function aa(e,t,...n){let r=vt(n[0])?n[0]:{},i=!!r.useI18nComponentName;(!Q(r.globalInstall)||r.globalInstall)&&([i?`i18n`:Xi.name,`I18nT`].forEach(t=>e.component(t,Xi)),[$i.name,`I18nN`].forEach(t=>e.component(t,$i)),[ea.name,`I18nD`].forEach(t=>e.component(t,ea))),e.directive(`t`,na(t))}function oa(e,t,n){return{beforeCreate(){let r=s();if(!r)throw Oi(Di.UNEXPECTED_ERROR);let i=this.$options;if(i.i18n){let r=i.i18n;if(i.__i18n&&(r.__i18n=i.__i18n),r.__root=t,this===this.$root)this.$i18n=sa(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=Ki(r);let e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}}else if(i.__i18n)if(this===this.$root)this.$i18n=sa(e,i);else{this.$i18n=Ki({__i18n:i.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});let e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}else this.$i18n=e;i.__i18nGlobal&&Ri(t,i,i),this.$t=(...e)=>this.$i18n.t(...e),this.$rt=(...e)=>this.$i18n.rt(...e),this.$tc=(...e)=>this.$i18n.tc(...e),this.$te=(e,t)=>this.$i18n.te(e,t),this.$d=(...e)=>this.$i18n.d(...e),this.$n=(...e)=>this.$i18n.n(...e),this.$tm=e=>this.$i18n.tm(e),n.__setInstance(r,this.$i18n)},mounted(){},unmounted(){let e=s();if(!e)throw Oi(Di.UNEXPECTED_ERROR);let t=this.$i18n;delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,t.__disposer&&(t.__disposer(),delete t.__disposer,delete t.__extender),n.__deleteInstance(e),delete this.$i18n}}}function sa(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[Mi](t.pluralizationRules||e.pluralizationRules);let n=Ii(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(t=>e.mergeLocaleMessage(t,n[t])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(n=>e.mergeDateTimeFormat(n,t.datetimeFormats[n])),t.numberFormats&&Object.keys(t.numberFormats).forEach(n=>e.mergeNumberFormat(n,t.numberFormats[n])),e}var ca=Xe(`global-vue-i18n`);function la(e={},t){let n=__VUE_I18N_LEGACY_API__&&Q(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,r=Q(e.globalInjection)?e.globalInjection:!0,i=__VUE_I18N_LEGACY_API__&&n?!!e.allowComposition:!0,a=new Map,[o,s]=da(e,n),c=Xe(``);function l(e){return a.get(e)||null}function u(e,t){a.set(e,t)}function d(e){a.delete(e)}{let e={get mode(){return __VUE_I18N_LEGACY_API__&&n?`legacy`:`composition`},get allowComposition(){return i},async install(t,...i){if(t.__VUE_I18N_SYMBOL__=c,t.provide(t.__VUE_I18N_SYMBOL__,e),vt(i[0])){let t=i[0];e.__composerExtend=t.__composerExtend,e.__vueI18nExtend=t.__vueI18nExtend}let a=null;!n&&r&&(a=xa(t,e.global)),__VUE_I18N_FULL_INSTALL__&&aa(t,e,...i),__VUE_I18N_LEGACY_API__&&n&&t.mixin(oa(s,s.__composer,e));let o=t.unmount;t.unmount=()=>{a&&a(),e.dispose(),o()}},get global(){return s},dispose(){o.stop()},__instances:a,__getInstance:l,__setInstance:u,__deleteInstance:d};return e}}function ua(e={}){let t=s();if(t==null)throw Oi(Di.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Oi(Di.NOT_INSTALLED);let n=fa(t),r=ma(n),i=Li(t),a=pa(e,i);if(__VUE_I18N_LEGACY_API__&&n.mode===`legacy`&&!e.__useComponent){if(!n.allowComposition)throw Oi(Di.NOT_AVAILABLE_IN_LEGACY_MODE);return va(t,a,r,e)}if(a===`global`)return Ri(r,e,i),r;if(a===`parent`){let i=ha(n,t,e.__useComponent);return i??=r,i}let o=n,c=o.__getInstance(t);if(c==null){let n=nt({},e);`__i18n`in i&&(n.__i18n=i.__i18n),r&&(n.__root=r),c=Wi(n),o.__composerExtend&&(c[Pi]=o.__composerExtend(c)),_a(o,t,c),o.__setInstance(t,c)}return c}function da(e,t,n){let r=te();{let n=__VUE_I18N_LEGACY_API__&&t?r.run(()=>Ki(e)):r.run(()=>Wi(e));if(n==null)throw Oi(Di.UNEXPECTED_ERROR);return[r,n]}}function fa(e){{let t=i(e.isCE?ca:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Oi(e.isCE?Di.NOT_INSTALLED_WITH_PROVIDE:Di.UNEXPECTED_ERROR);return t}}function pa(e,t){return X(e)?`__i18n`in t?`local`:`global`:e.useScope?e.useScope:`local`}function ma(e){return e.mode===`composition`?e.global:e.global.__composer}function ha(e,t,n=!1){let r=null,i=t.root,a=ga(t,n);for(;a!=null;){let t=e;if(e.mode===`composition`)r=t.__getInstance(a);else if(__VUE_I18N_LEGACY_API__){let e=t.__getInstance(a);e!=null&&(r=e.__composer,n&&r&&!r[Ni]&&(r=null))}if(r!=null||i===a)break;a=a.parent}return r}function ga(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function _a(e,t,n){f(()=>{},t),m(()=>{let r=n;e.__deleteInstance(t);let i=r[Pi];i&&(i(),delete r[Pi])},t)}function va(e,t,n,r={}){let i=t===`local`,a=oe(null);if(i&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw Oi(Di.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);let o=Q(r.inheritLocale)?r.inheritLocale:!Z(r.locale),s=M(!i||o?n.locale.value:Z(r.locale)?r.locale:Tr),c=M(!i||o?n.fallbackLocale.value:Z(r.fallbackLocale)||ft(r.fallbackLocale)||vt(r.fallbackLocale)||r.fallbackLocale===!1?r.fallbackLocale:s.value),l=M(Ii(s.value,r)),u=M(vt(r.datetimeFormats)?r.datetimeFormats:{[s.value]:{}}),d=M(vt(r.numberFormats)?r.numberFormats:{[s.value]:{}}),f=i?n.missingWarn:Q(r.missingWarn)||tt(r.missingWarn)?r.missingWarn:!0,p=i?n.fallbackWarn:Q(r.fallbackWarn)||tt(r.fallbackWarn)?r.fallbackWarn:!0,m=i?n.fallbackRoot:Q(r.fallbackRoot)?r.fallbackRoot:!0,h=!!r.fallbackFormat,g=pt(r.missing)?r.missing:null,_=pt(r.postTranslation)?r.postTranslation:null,y=i?n.warnHtmlMessage:Q(r.warnHtmlMessage)?r.warnHtmlMessage:!0,b=!!r.escapeParameter,x=i?n.modifiers:vt(r.modifiers)?r.modifiers:{},S=r.pluralRules||i&&n.pluralRules;function C(){return[s.value,c.value,l.value,u.value,d.value]}let w=I({get:()=>a.value?a.value.locale.value:s.value,set:e=>{a.value&&(a.value.locale.value=e),s.value=e}}),T=I({get:()=>a.value?a.value.fallbackLocale.value:c.value,set:e=>{a.value&&(a.value.fallbackLocale.value=e),c.value=e}}),E=I(()=>a.value?a.value.messages.value:l.value),D=I(()=>u.value),O=I(()=>d.value);function k(){return a.value?a.value.getPostTranslationHandler():_}function A(e){a.value&&a.value.setPostTranslationHandler(e)}function j(){return a.value?a.value.getMissingHandler():g}function ee(e){a.value&&a.value.setMissingHandler(e)}function N(e){return C(),e()}function P(...e){return a.value?N(()=>Reflect.apply(a.value.t,null,[...e])):N(()=>``)}function te(...e){return a.value?Reflect.apply(a.value.rt,null,[...e]):``}function ne(...e){return a.value?N(()=>Reflect.apply(a.value.d,null,[...e])):N(()=>``)}function F(...e){return a.value?N(()=>Reflect.apply(a.value.n,null,[...e])):N(()=>``)}function L(e){return a.value?a.value.tm(e):{}}function re(e,t){return a.value?a.value.te(e,t):!1}function ie(e){return a.value?a.value.getLocaleMessage(e):{}}function ae(e,t){a.value&&(a.value.setLocaleMessage(e,t),l.value[e]=t)}function se(e,t){a.value&&a.value.mergeLocaleMessage(e,t)}function R(e){return a.value?a.value.getDateTimeFormat(e):{}}function ce(e,t){a.value&&(a.value.setDateTimeFormat(e,t),u.value[e]=t)}function le(e,t){a.value&&a.value.mergeDateTimeFormat(e,t)}function ue(e){return a.value?a.value.getNumberFormat(e):{}}function z(e,t){a.value&&(a.value.setNumberFormat(e,t),d.value[e]=t)}function de(e,t){a.value&&a.value.mergeNumberFormat(e,t)}let fe={get id(){return a.value?a.value.id:-1},locale:w,fallbackLocale:T,messages:E,datetimeFormats:D,numberFormats:O,get inheritLocale(){return a.value?a.value.inheritLocale:o},set inheritLocale(e){a.value&&(a.value.inheritLocale=e)},get availableLocales(){return a.value?a.value.availableLocales:Object.keys(l.value)},get modifiers(){return a.value?a.value.modifiers:x},get pluralRules(){return a.value?a.value.pluralRules:S},get isGlobal(){return a.value?a.value.isGlobal:!1},get missingWarn(){return a.value?a.value.missingWarn:f},set missingWarn(e){a.value&&(a.value.missingWarn=e)},get fallbackWarn(){return a.value?a.value.fallbackWarn:p},set fallbackWarn(e){a.value&&(a.value.missingWarn=e)},get fallbackRoot(){return a.value?a.value.fallbackRoot:m},set fallbackRoot(e){a.value&&(a.value.fallbackRoot=e)},get fallbackFormat(){return a.value?a.value.fallbackFormat:h},set fallbackFormat(e){a.value&&(a.value.fallbackFormat=e)},get warnHtmlMessage(){return a.value?a.value.warnHtmlMessage:y},set warnHtmlMessage(e){a.value&&(a.value.warnHtmlMessage=e)},get escapeParameter(){return a.value?a.value.escapeParameter:b},set escapeParameter(e){a.value&&(a.value.escapeParameter=e)},t:P,getPostTranslationHandler:k,setPostTranslationHandler:A,getMissingHandler:j,setMissingHandler:ee,rt:te,d:ne,n:F,tm:L,te:re,getLocaleMessage:ie,setLocaleMessage:ae,mergeLocaleMessage:se,getDateTimeFormat:R,setDateTimeFormat:ce,mergeDateTimeFormat:le,getNumberFormat:ue,setNumberFormat:z,mergeNumberFormat:de};function pe(e){e.locale.value=s.value,e.fallbackLocale.value=c.value,Object.keys(l.value).forEach(t=>{e.mergeLocaleMessage(t,l.value[t])}),Object.keys(u.value).forEach(t=>{e.mergeDateTimeFormat(t,u.value[t])}),Object.keys(d.value).forEach(t=>{e.mergeNumberFormat(t,d.value[t])}),e.escapeParameter=b,e.fallbackFormat=h,e.fallbackRoot=m,e.fallbackWarn=p,e.missingWarn=f,e.warnHtmlMessage=y}return v(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw Oi(Di.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);let n=a.value=e.proxy.$i18n.__composer;t===`global`?(s.value=n.locale.value,c.value=n.fallbackLocale.value,l.value=n.messages.value,u.value=n.datetimeFormats.value,d.value=n.numberFormats.value):i&&pe(n)}),fe}var ya=[`locale`,`fallbackLocale`,`availableLocales`],ba=[`t`,`rt`,`d`,`n`,`tm`,`te`];function xa(e,t){let n=Object.create(null);return ya.forEach(e=>{let r=Object.getOwnPropertyDescriptor(t,e);if(!r)throw Oi(Di.UNEXPECTED_ERROR);let i=de(r.value)?{get(){return r.value.value},set(e){r.value.value=e}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,e,i)}),e.config.globalProperties.$i18n=n,ba.forEach(n=>{let r=Object.getOwnPropertyDescriptor(t,n);if(!r||!r.value)throw Oi(Di.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${n}`,r)}),()=>{delete e.config.globalProperties.$i18n,ba.forEach(t=>{delete e.config.globalProperties[`$${t}`]})}}if(xi(),__INTLIFY_JIT_COMPILATION__?kr(ei):kr($r),jr(Jn),Nr(br),__INTLIFY_PROD_DEVTOOLS__){let e=ot();e.__INTLIFY__=!0,ar(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}var Sa=[`top`,`right`,`bottom`,`left`],Ca=[`start`,`end`],wa=Sa.reduce((e,t)=>e.concat(t,t+`-`+Ca[0],t+`-`+Ca[1]),[]),Ta=Math.min,Ea=Math.max,Da=Math.round,Oa=Math.floor,ka=e=>({x:e,y:e}),Aa={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ja(e,t,n){return Ea(e,Ta(t,n))}function Ma(e,t){return typeof e==`function`?e(t):e}function Na(e){return e.split(`-`)[0]}function Pa(e){return e.split(`-`)[1]}function Fa(e){return e===`x`?`y`:`x`}function Ia(e){return e===`y`?`height`:`width`}function La(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Ra(e){return Fa(La(e))}function za(e,t,n){n===void 0&&(n=!1);let r=Pa(e),i=Ra(e),a=Ia(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ja(o)),[o,Ja(o)]}function Ba(e){let t=Ja(e);return[Va(e),t,Va(t)]}function Va(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Ha=[`left`,`right`],Ua=[`right`,`left`],Wa=[`top`,`bottom`],Ga=[`bottom`,`top`];function Ka(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ua:Ha:t?Ha:Ua;case`left`:case`right`:return t?Wa:Ga;default:return[]}}function qa(e,t,n,r){let i=Pa(e),a=Ka(Na(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Va)))),a}function Ja(e){let t=Na(e);return Aa[t]+e.slice(t.length)}function Ya(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xa(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ya(e)}function Za(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Qa(e,t,n){let{reference:r,floating:i}=e,a=La(t),o=Ra(t),s=Ia(o),c=Na(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Pa(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function $a(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Ma(t,e),p=Xa(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Za(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Za(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var eo=50,to=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:$a},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Qa(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<eo&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Qa(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},no=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Ma(e,t)||{};if(l==null)return{};let d=Xa(u),f={x:n,y:r},p=Ra(i),m=Ia(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Ta(d[_],T),D=Ta(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=ja(O,A,k),ee=!c.arrow&&Pa(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,M=ee?A<O?A-O:A-k:0;return{[p]:f[p]+M,data:{[p]:j,centerOffset:A-j-M,...ee&&{alignmentOffset:M}},reset:ee}}});function ro(e,t,n){return(e?[...n.filter(t=>Pa(t)===e),...n.filter(t=>Pa(t)!==e)]:n.filter(e=>Na(e)===e)).filter(n=>e?Pa(n)===e||(t?Va(n)!==n:!1):!0)}var io=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){let{rects:n,middlewareData:r,placement:i,platform:a,elements:o}=t,{crossAxis:s=!1,alignment:c,allowedPlacements:l=wa,autoAlignment:u=!0,...d}=Ma(e,t),f=c!==void 0||l===wa?ro(c||null,u,l):l,p=await a.detectOverflow(t,d),m=r.autoPlacement?.index||0,h=f[m];if(h==null)return{};let g=za(h,n,await(a.isRTL==null?void 0:a.isRTL(o.floating)));if(i!==h)return{reset:{placement:f[0]}};let _=[p[Na(h)],p[g[0]],p[g[1]]],v=[...r.autoPlacement?.overflows||[],{placement:h,overflows:_}],y=f[m+1];if(y)return{data:{index:m+1,overflows:v},reset:{placement:y}};let b=v.map(e=>{let t=Pa(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),x=b.filter(e=>e[2].slice(0,Pa(e[0])?2:3).every(e=>e<=0))[0]?.[0]||b[0][0];return x===i?{}:{data:{index:m+1,overflows:v},reset:{placement:x}}}}},ao=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Ma(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Na(r),_=La(o),v=Na(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Ja(o)]:Ba(o)),x=p!==`none`;!d&&x&&b.push(...qa(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=za(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==La(t))||T.every(e=>La(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=La(e.placement);return t===_||t===`y`}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]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function oo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function so(e){return Sa.some(t=>e[t]>=0)}var co=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Ma(e,t);switch(i){case`referenceHidden`:{let e=oo(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:so(e)}}}case`escaped`:{let e=oo(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:so(e)}}}default:return{}}}}};function lo(e){let t=Ta(...e.map(e=>e.left)),n=Ta(...e.map(e=>e.top)),r=Ea(...e.map(e=>e.right)),i=Ea(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function uo(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>Za(lo(e)))}var fo=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=Ma(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]),d=uo(u),f=Za(lo(u)),p=Xa(s);function m(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if(La(n)===`y`){let e=d[0],t=d[d.length-1],r=Na(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left,s=r?e.right:t.right;return{top:i,bottom:a,left:o,right:s,width:s-o,height:a-i,x:o,y:i}}let e=Na(n)===`left`,t=Ea(...d.map(e=>e.right)),r=Ta(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom,s=r,c=t;return{top:a,bottom:o,left:s,right:c,width:c-s,height:o-a,x:s,y:a}}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},po=new Set([`left`,`top`]);async function mo(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Na(n),s=Pa(n),c=La(n)===`y`,l=po.has(o)?-1:1,u=a&&c?-1:1,d=Ma(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var ho=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await mo(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},go=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ma(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=La(Na(i)),p=Fa(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=ja(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=ja(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},_o=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Ma(e,t),u={x:n,y:r},d=La(i),f=Fa(d),p=u[f],m=u[d],h=Ma(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=po.has(Na(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},vo=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Ma(e,t),u=await o.detectOverflow(t,l),d=Na(i),f=Pa(i),p=La(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Ta(h-u[g],v),x=Ta(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Ea(u.left,0),t=Ea(u.right,0),n=Ea(u.top,0),r=Ea(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Ea(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Ea(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function yo(){return typeof window<`u`}function bo(e){return Co(e)?(e.nodeName||``).toLowerCase():`#document`}function xo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function So(e){return((Co(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Co(e){return yo()?e instanceof Node||e instanceof xo(e).Node:!1}function wo(e){return yo()?e instanceof Element||e instanceof xo(e).Element:!1}function To(e){return yo()?e instanceof HTMLElement||e instanceof xo(e).HTMLElement:!1}function Eo(e){return!yo()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof xo(e).ShadowRoot}function Do(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Ro(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Oo(e){return/^(table|td|th)$/.test(bo(e))}function ko(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Ao=/transform|translate|scale|rotate|perspective|filter/,jo=/paint|layout|strict|content/,Mo=e=>!!e&&e!==`none`,No;function Po(e){let t=wo(e)?Ro(e):e;return Mo(t.transform)||Mo(t.translate)||Mo(t.scale)||Mo(t.rotate)||Mo(t.perspective)||!Io()&&(Mo(t.backdropFilter)||Mo(t.filter))||Ao.test(t.willChange||``)||jo.test(t.contain||``)}function Fo(e){let t=Bo(e);for(;To(t)&&!Lo(t);){if(Po(t))return t;if(ko(t))return null;t=Bo(t)}return null}function Io(){return No??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),No}function Lo(e){return/^(html|body|#document)$/.test(bo(e))}function Ro(e){return xo(e).getComputedStyle(e)}function zo(e){return wo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Bo(e){if(bo(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Eo(e)&&e.host||So(e);return Eo(t)?t.host:t}function Vo(e){let t=Bo(e);return Lo(t)?e.ownerDocument?e.ownerDocument.body:e.body:To(t)&&Do(t)?t:Vo(t)}function Ho(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Vo(e),i=r===e.ownerDocument?.body,a=xo(r);if(i){let e=Uo(a);return t.concat(a,a.visualViewport||[],Do(r)?r:[],e&&n?Ho(e):[])}else return t.concat(r,Ho(r,[],n))}function Uo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Wo=n({arrow:()=>Os,autoPlacement:()=>Cs,autoUpdate:()=>bs,computePosition:()=>js,detectOverflow:()=>xs,flip:()=>Ts,getOverflowAncestors:()=>Ho,hide:()=>Ds,inline:()=>ks,limitShift:()=>As,offset:()=>Ss,platform:()=>_s,shift:()=>ws,size:()=>Es});function Go(e){let t=Ro(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=To(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Da(n)!==a||Da(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ko(e){return wo(e)?e:e.contextElement}function qo(e){let t=Ko(e);if(!To(t))return ka(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Go(t),o=(a?Da(n.width):n.width)/r,s=(a?Da(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Jo=ka(0);function Yo(e){let t=xo(e);return!Io()||!t.visualViewport?Jo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xo(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==xo(e)?!1:t}function Zo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ko(e),o=ka(1);t&&(r?wo(r)&&(o=qo(r)):o=qo(e));let s=Xo(a,n,r)?Yo(a):ka(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=xo(a),t=r&&wo(r)?xo(r):r,n=e,i=Uo(n);for(;i&&r&&t!==n;){let e=qo(i),t=i.getBoundingClientRect(),r=Ro(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=xo(i),i=Uo(n)}}return Za({width:u,height:d,x:c,y:l})}function Qo(e,t){let n=zo(e).scrollLeft;return t?t.left+n:Zo(So(e)).left+n}function $o(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Qo(e,n),y:n.top+t.scrollTop}}function es(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=So(r),s=t?ko(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=ka(1),u=ka(0),d=To(r);if((d||!d&&!a)&&((bo(r)!==`body`||Do(o))&&(c=zo(r)),d)){let e=Zo(r);l=qo(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?$o(o,c):ka(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ts(e){return Array.from(e.getClientRects())}function ns(e){let t=So(e),n=zo(e),r=e.ownerDocument.body,i=Ea(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ea(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Qo(e),s=-n.scrollTop;return Ro(r).direction===`rtl`&&(o+=Ea(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var rs=25;function is(e,t){let n=xo(e),r=So(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Io();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Qo(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=rs&&(a-=o)}else l<=rs&&(a+=l);return{width:a,height:o,x:s,y:c}}function as(e,t){let n=Zo(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=To(e)?qo(e):ka(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function os(e,t,n){let r;if(t===`viewport`)r=is(e,n);else if(t===`document`)r=ns(So(e));else if(wo(t))r=as(t,n);else{let n=Yo(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Za(r)}function ss(e,t){let n=Bo(e);return n===t||!wo(n)||Lo(n)?!1:Ro(n).position===`fixed`||ss(n,t)}function cs(e,t){let n=t.get(e);if(n)return n;let r=Ho(e,[],!1).filter(e=>wo(e)&&bo(e)!==`body`),i=null,a=Ro(e).position===`fixed`,o=a?Bo(e):e;for(;wo(o)&&!Lo(o);){let t=Ro(o),n=Po(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Do(o)&&!n&&ss(e,o))?r=r.filter(e=>e!==o):i=t,o=Bo(o)}return t.set(e,r),r}function ls(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ko(t)?[]:cs(t,this._c):[].concat(n),r],o=os(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=os(t,a[e],i);s=Ea(n.top,s),c=Ta(n.right,c),l=Ta(n.bottom,l),u=Ea(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function us(e){let{width:t,height:n}=Go(e);return{width:t,height:n}}function ds(e,t,n){let r=To(t),i=So(t),a=n===`fixed`,o=Zo(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=ka(0);function l(){c.x=Qo(i)}if(r||!r&&!a)if((bo(t)!==`body`||Do(i))&&(s=zo(t)),r){let e=Zo(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?$o(i,s):ka(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function fs(e){return Ro(e).position===`static`}function ps(e,t){if(!To(e)||Ro(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return So(e)===n&&(n=n.ownerDocument.body),n}function ms(e,t){let n=xo(e);if(ko(e))return n;if(!To(e)){let t=Bo(e);for(;t&&!Lo(t);){if(wo(t)&&!fs(t))return t;t=Bo(t)}return n}let r=ps(e,t);for(;r&&Oo(r)&&fs(r);)r=ps(r,t);return r&&Lo(r)&&fs(r)&&!Po(r)?n:r||Fo(e)||n}var hs=async function(e){let t=this.getOffsetParent||ms,n=this.getDimensions,r=await n(e.floating);return{reference:ds(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gs(e){return Ro(e).direction===`rtl`}var _s={convertOffsetParentRelativeRectToViewportRelativeRect:es,getDocumentElement:So,getClippingRect:ls,getOffsetParent:ms,getElementRects:hs,getClientRects:ts,getDimensions:us,getScale:qo,isElement:wo,isRTL:gs};function vs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ys(e,t){let n=null,r,i=So(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Oa(d),h=Oa(i.clientWidth-(u+f)),g=Oa(i.clientHeight-(d+p)),_=Oa(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Ea(0,Ta(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!vs(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function bs(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ko(e),u=i||a?[...l?Ho(l):[],...t?Ho(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?ys(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Zo(e):null;c&&g();function g(){let t=Zo(e);h&&!vs(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var xs=$a,Ss=ho,Cs=io,ws=go,Ts=ao,Es=vo,Ds=co,Os=no,ks=fo,As=_o,js=(e,t,n)=>{let r=new Map,i={platform:_s,...n},a={...i.platform,_c:r};return to(e,t,{...i,platform:a})},Ms={arrowUp:[`M12 19V5m-7 7 7-7 7 7`],chevronUp:[`m18 15-6-6-6 6`],chevronDown:[`m6 9 6 6 6-6`],chevronRight:[`m9 18 6-6-6-6`],close:[`M18 6 6 18M6 6l12 12`],refresh:[`M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,`M3 3v5h5`,`M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16`,`M21 21v-5h-5`],search:[`m21 21-4.35-4.35`,`M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z`],home:[`m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,`M9 22V12h6v10`],folder:[`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.7-.9l-.8-1.2A2 2 0 0 0 7.9 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h16Z`],file:[`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,`M14 2v4a2 2 0 0 0 2 2h4`],check:[`M20 6 9 17l-5-5`],monitor:[`M9.5 2H4a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2h-5.5`,`M12 14v4`,`M8 18h8`],download:[`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,`M7 10l5 5 5-5`,`M12 15V3`],hardDrive:[`M22 12H2`,`M5.2 5.2 3 12v6a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-6l-2.2-6.8A2 2 0 0 0 17 4H7a2 2 0 0 0-1.8 1.2Z`,`M6 16h.01M10 16h.01`],circleX:[`m14.5 9.5-5 5m0-5 5 5`,`M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z`],circleCheck:[`M22 11.08V12a10 10 0 1 1-5.93-9.14`,`M22 4 12 14.01l-3-3`],caretDown:[`m6 9 6 6 6-6`],caretRight:[`m9 18 6-6-6-6`]},Ns={js:`#f0db4f`,jsx:`#61dafb`,ts:`#3178c6`,tsx:`#3178c6`,vue:`#42b883`,html:`#e34c26`,css:`#264de4`,scss:`#cf649a`,py:`#3776ab`,java:`#ed8b00`,go:`#00add8`,rs:`#dea584`,c:`#a8b9cc`,cpp:`#00599c`,json:`#a78bfa`,yml:`#cb171e`,yaml:`#cb171e`,toml:`#9c4121`,csv:`#217346`,md:`#8b91a8`,txt:`#8b91a8`,pdf:`#e74c3c`,doc:`#2b579a`,docx:`#2b579a`,xls:`#217346`,xlsx:`#217346`,png:`#9b59b6`,jpg:`#9b59b6`,jpeg:`#9b59b6`,gif:`#9b59b6`,svg:`#ffb13b`,webp:`#9b59b6`,mp4:`#e74c3c`,mp3:`#1db954`,wav:`#1db954`,zip:`#f59e0b`,rar:`#f59e0b`,"7z":`#f59e0b`,gz:`#f59e0b`,tar:`#f59e0b`},Ps=`#8b91a8`;function Fs(e){return Ns[e]||Ps}var Is=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Ls=[`width`,`height`,`stroke`],Rs=[`d`],zs=Is({__name:`SvgIcon`,props:{name:{type:String,required:!0},size:{type:[Number,String],default:18},color:{type:String,default:`currentColor`},class:{type:String,default:``}},setup(e){let t=e,n=I(()=>t.class),r=I(()=>{let e=Ms[t.name];return e?Array.isArray(e)?e:[e]:[]});return(t,i)=>(G(),W(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:e.size,height:e.size,viewBox:`0 0 24 24`,fill:`none`,stroke:e.color,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:L([`svg-icon`,n.value]),"aria-hidden":`true`},[(G(!0),W(N,null,w(r.value,(e,t)=>(G(),W(`path`,{key:t,d:e},null,8,Rs))),128))],10,Ls))}},[[`__scopeId`,`data-v-5461fefd`]]),Bs={class:`modal-header`},Vs={class:`modal-title`},Hs=[`title`],Us={class:`toolbar`},Ws=[`disabled`,`title`],Gs=[`title`],Ks=[`title`],qs={class:`path-breadcrumb`},Js=[`onClick`],Ys={class:`breadcrumb-text`},Xs={key:0,class:`breadcrumb-sep`},Zs={class:`search-bar`},Qs=[`placeholder`],$s=[`title`],ec={class:`toggle-label`},tc=[`title`],nc={class:`status-text`},rc={class:`modal-body`},ic={class:`sidebar`},ac={class:`sidebar-section`},oc={class:`sidebar-title`},sc={key:0,class:`sidebar-section`},cc={class:`sidebar-title`},lc=[`onClick`],uc={key:0,class:`loading-state`},dc={key:1,class:`error-state`},fc={key:2,class:`loading-state`},pc={key:3,class:`empty-state`},mc={key:4,class:`file-list`},hc={key:0,class:`search-results-info`},gc=[`innerHTML`],_c={key:0,class:`truncated-hint`},vc={class:`elapsed-hint`},yc={class:`file-name`},bc={class:`file-path-hint`},xc=[`onClick`,`onDblclick`],Sc=[`title`],Cc=[`title`],wc=[`title`],Tc=[`title`],Ec={class:`modal-footer`},Dc={class:`selected-info`},Oc={key:0,class:`no-selection`},kc=[`title`],Ac={key:2,class:`has-selection`},jc=[`innerHTML`],Mc={class:`footer-actions`},Nc=[`disabled`],Pc=`zh-CN`,Fc=Is({__name:`FilePickerModal`,props:{visible:{type:Boolean,default:!1},mode:{type:String,default:`file`},multiple:{type:Boolean,default:!1},theme:{type:String,default:`dark`},apiBase:{type:String,default:`/api`},locale:{type:String,default:`zh-CN`},messages:{type:Object,default:null}},emits:[`close`,`confirm`],setup(e,{emit:t}){let n={"zh-CN":{"modal.title.file":`选择文件`,"modal.title.directory":`选择文件夹`,"modal.close":`关闭`,"modal.up":`上级`,"modal.home":`家目录`,"tooltip.back":`返回上一级`,"tooltip.home":`家目录`,"tooltip.refresh":`刷新`,"tooltip.globalSearchOn":`全局搜索:在整个磁盘范围内搜索`,"tooltip.globalSearchOff":`当前目录搜索:仅在当前目录中过滤`,"tooltip.indexReady":`索引就绪,共 {totalFiles} 项,已扫描: {scannedRoots}`,"tooltip.indexing":`正在建索引... {indexedFiles} 项,当前: {currentDir}`,"tooltip.indexIdle":`索引未就绪,使用实时搜索`,"search.placeholderGlobal":`全局搜索{type}...`,"search.placeholderLocal":`搜索当前目录...`,"search.type.file":`文件`,"search.type.directory":`文件夹`,"search.type.all":`文件和文件夹`,"search.globalLabel":`全局`,"search.engineIndex":`索引搜索`,"search.engineWalk":`实时搜索`,"status.indexReady":`索引`,"status.indexing":`索引中`,"status.indexIdle":`离线`,"sidebar.quickAccess":`快捷访问`,"sidebar.home":`家目录`,"sidebar.desktop":`桌面`,"sidebar.documents":`文档`,"sidebar.downloads":`下载`,"sidebar.drives":`磁盘`,"state.loading":`加载中...`,"state.globalSearching":`全局搜索中...`,"state.emptySearch":`没有匹配的结果`,"state.emptyDir":`空目录`,"results.found":`找到 <strong>{count}</strong> 个结果`,"results.truncated":`(已达上限,请缩小关键词)`,"unit.ms":`ms`,"fileRow.selectCurrent":`选择当前文件夹`,"footer.unselectedFile":`未选择文件`,"footer.unselectedDir":`未选择文件夹`,"footer.selected":`已选择 <strong>{count}</strong> 项`,"footer.cancel":`取消`,"footer.confirm":`确认选择`,"error.cannotConnect":`无法连接到后端服务,请确认后端已启动 (npm run dev)`,"error.network":`网络错误: {message}。请确认后端服务已启动。`,"error.searchFailed":`搜索请求失败`},"en-US":{"modal.title.file":`Select File`,"modal.title.directory":`Select Folder`,"modal.close":`Close`,"modal.up":`Up`,"modal.home":`Home`,"tooltip.back":`Go to parent directory`,"tooltip.home":`Home directory`,"tooltip.refresh":`Refresh`,"tooltip.globalSearchOn":`Global search: search across the entire disk`,"tooltip.globalSearchOff":`Current folder search: filter within current folder only`,"tooltip.indexReady":`Index ready, {totalFiles} items total, scanned: {scannedRoots}`,"tooltip.indexing":`Building index... {indexedFiles} items, current: {currentDir}`,"tooltip.indexIdle":`Index not ready, using live search`,"search.placeholderGlobal":`Global search {type}...`,"search.placeholderLocal":`Search current folder...`,"search.type.file":`files`,"search.type.directory":`folders`,"search.type.all":`files and folders`,"search.globalLabel":`Global`,"search.engineIndex":`Index search`,"search.engineWalk":`Live search`,"status.indexReady":`Index`,"status.indexing":`Indexing`,"status.indexIdle":`Offline`,"sidebar.quickAccess":`Quick Access`,"sidebar.home":`Home`,"sidebar.desktop":`Desktop`,"sidebar.documents":`Documents`,"sidebar.downloads":`Downloads`,"sidebar.drives":`Drives`,"state.loading":`Loading...`,"state.globalSearching":`Global searching...`,"state.emptySearch":`No matching results`,"state.emptyDir":`Empty folder`,"results.found":`Found <strong>{count}</strong> results`,"results.truncated":`(limit reached, please narrow keywords)`,"unit.ms":`ms`,"fileRow.selectCurrent":`Select current folder`,"footer.unselectedFile":`No file selected`,"footer.unselectedDir":`No folder selected`,"footer.selected":`<strong>{count}</strong> item(s) selected`,"footer.cancel":`Cancel`,"footer.confirm":`Confirm Selection`,"error.cannotConnect":`Cannot connect to backend service, please make sure it is started (npm run dev)`,"error.network":`Network error: {message}. Please make sure the backend service is running.`,"error.searchFailed":`Search request failed`}},r=e,i=t,a=I(()=>({...n[r.locale]||n[Pc],...r.messages||{}}));function s(e,t={}){let r=a.value[e];return r??=n[Pc][e]??e,r.replace(/\{(\w+)\}/g,(e,n)=>t[n]??`{${n}}`)}let c=I(()=>r.mode===`file`?r.theme===`light`?`#3b82f6`:`#6c8cff`:`#a78bfa`),l=M(!1),u=M(``),d=M(``),f=M(null),p=M([]),m=M([]),h=M(``),g=M([]),_=M(``),v=M(!1),b=M(!1),x=M([]),S=M(!1),C=M(0),T=M(``),D=M({status:`idle`,totalFiles:0,indexedFiles:0,currentDir:``,scannedRoots:[]}),k=null,A=I(()=>_.value?_.value+`\\Desktop`:``),j=I(()=>_.value?_.value+`\\Documents`:``),ee=I(()=>_.value?_.value+`\\Downloads`:``),P=I(()=>v.value&&x.value.length>0),te=I(()=>{if(P.value){let e=x.value;return r.mode===`directory`&&(e=e.filter(e=>e.kind===`directory`)),e}let e=p.value;if(r.mode===`directory`&&(e=e.filter(e=>e.kind===`directory`)),!h.value)return e;let t=h.value.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(t))}),ne=I(()=>{if(!d.value)return[];let e=d.value.split(/[/\\]/).filter(Boolean);return e.map((t,n)=>{let r;return r=n===0&&/^[A-Za-z]:$/.test(t)?t+`\\`:e.slice(0,n+1).join(`\\`),{label:t,path:r}})});async function re(){try{let e=await fetch(`${r.apiBase}/fs/home`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();return _.value=t.home,t.home}catch(e){return console.warn(`[fetchHome] 获取家目录失败:`,e.message),``}}async function ie(){try{let e=await fetch(`${r.apiBase}/fs/drives`);if(!e.ok)throw Error(`HTTP ${e.status}`);g.value=(await e.json()).drives||[]}catch(e){console.warn(`[fetchDrives] 获取盘符失败:`,e.message),g.value=[]}}async function oe(){try{let e=await fetch(`${r.apiBase}/fs/index-status`);if(!e.ok)return;D.value=await e.json()}catch{}}async function se(e){l.value=!0,u.value=``;try{let t=new URLSearchParams;e&&t.set(`dir`,e);let n=await fetch(`${r.apiBase}/fs/list?${t}`);if(!n.ok){let e=`HTTP ${n.status}`;try{e=(await n.json()).error||e}catch{e=s(`error.cannotConnect`)}u.value=e;return}let i=await n.json();d.value=i.currentPath,f.value=i.parentPath,p.value=i.items||[]}catch(e){u.value=s(`error.network`,{message:e.message})}finally{l.value=!1}}function R(){if(P.value){be();return}f.value&&se(f.value)}function ce(){_.value&&le(_.value)}function le(e){h.value=``,be(),se(e)}function ue(e){let t=ne.value[e]?.path;t&&t!==d.value&&le(t)}function de(){P.value&&h.value?q(h.value):se(d.value)}function pe(e){return m.value.includes(e)}function B(e){if(!r.multiple){m.value=m.value[0]===e?[]:[e];return}let t=m.value.indexOf(e);t>=0?m.value.splice(t,1):m.value.push(e)}function he(){m.value=[]}function ge(e,t){e.kind===`directory`?(r.mode,B(e.path)):r.mode===`file`&&B(e.path)}function K(e){if(!r.multiple){ge(e);return}(e.kind===`directory`||r.mode===`file`)&&B(e.path)}function _e(e){e.kind===`directory`&&le(e.path)}function ve(){m.value.length>0&&i(`confirm`,[...m.value])}function ye(){v.value=!v.value,v.value?h.value&&q(h.value):be()}function be(){k&&=(k.abort(),null),x.value=[],S.value=!1,C.value=0,b.value=!1}function xe(){h.value=``,v.value&&be()}function Se(){v.value&&h.value.trim()&&q(h.value.trim())}let Ce=null;E(h,e=>{if(v.value){if(Ce&&clearTimeout(Ce),!e.trim()){be();return}Ce=setTimeout(()=>{q(e.trim())},500)}});async function q(e){k&&k.abort(),k=new AbortController,b.value=!0,x.value=[],S.value=!1,C.value=0;try{let t=new URLSearchParams({q:e,mode:r.mode===`directory`?`directory`:r.mode===`file`?`file`:`all`,limit:`200`}),n=await fetch(`${r.apiBase}/fs/search?${t}`,{signal:k.signal});if(!n.ok){let e=`HTTP ${n.status}`;try{e=(await n.json()).error||e}catch{e=s(`error.searchFailed`)}x.value=[],b.value=!1;return}let i=await n.json();x.value=i.items||[],S.value=i.truncated||!1,C.value=i.elapsed||0,T.value=i.engine||``}catch(e){if(e.name===`AbortError`)return;console.warn(`[globalSearch] 搜索失败:`,e.message),x.value=[]}finally{b.value=!1}}function we(e){if(!e)return``;let t=e.replace(/[/\\]/g,`/`).split(`/`);return t.pop(),t.join(`/`)}async function Te(){try{await fetch(`${r.apiBase}/fs/reindex`,{method:`POST`}),D.value={...D.value,status:`indexing`};let e=setInterval(async()=>{await oe(),(D.value.status===`ready`||D.value.status===`error`)&&clearInterval(e)},2e3)}catch{}}function Ee(e){if(!e||e===0)return`0 B`;let t=1024,n=[`B`,`KB`,`MB`,`GB`],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/t**r).toFixed(2))} ${n[r]}`}function De(e){if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}`}function J(e){return e.kind===`directory`?`#a78bfa`:Fs((e.ext||``).replace(`.`,``))}return E(()=>r.visible,async e=>{if(e){m.value=[],h.value=``,u.value=``,be();let e=await re();await ie(),await oe(),await se(e||``)}else be()}),(t,n)=>(G(),O(z,{to:`body`},[e.visible?(G(),W(`div`,{key:0,class:`modal-overlay`,onClick:n[10]||=me(e=>t.$emit(`close`),[`self`])},[F(`div`,{class:L([`modal-container`,{"modal-theme-light":e.theme===`light`}])},[F(`div`,Bs,[F(`h3`,Vs,[U(zs,{name:e.mode===`file`?`file`:`folder`,size:18,color:c.value},null,8,[`name`,`color`]),o(` `+H(s(e.mode===`file`?`modal.title.file`:`modal.title.directory`)),1)]),F(`button`,{class:`close-btn`,onClick:n[0]||=e=>t.$emit(`close`),title:s(`modal.close`)},[U(zs,{name:`close`,size:16})],8,Hs)]),F(`div`,Us,[F(`button`,{class:`tool-btn`,onClick:R,disabled:!f.value,title:s(`tooltip.back`)},[U(zs,{name:`arrowUp`,size:14}),o(` `+H(s(`modal.up`)),1)],8,Ws),F(`button`,{class:`tool-btn`,onClick:ce,title:s(`tooltip.home`)},[U(zs,{name:`home`,size:14}),o(` `+H(s(`modal.home`)),1)],8,Gs),F(`button`,{class:`tool-btn`,onClick:de,title:s(`tooltip.refresh`)},[U(zs,{name:`refresh`,size:14})],8,Ks),F(`div`,qs,[(G(!0),W(N,null,w(ne.value,(e,t)=>(G(),W(`span`,{key:t,class:`breadcrumb-item`,onClick:e=>ue(t)},[F(`span`,Ys,H(e.label),1),t<ne.value.length-1?(G(),W(`span`,Xs,`/`)):V(``,!0)],8,Js))),128))])]),F(`div`,Zs,[U(zs,{name:`search`,size:16,color:`#8b91a8`,class:`search-icon`}),y(F(`input`,{"onUpdate:modelValue":n[1]||=e=>h.value=e,type:`text`,class:`search-input`,placeholder:v.value?s(`search.placeholderGlobal`,{type:s(`search.type.`+(e.mode===`file`?`file`:e.mode===`directory`?`directory`:`all`))}):s(`search.placeholderLocal`),onKeydown:ae(Se,[`enter`])},null,40,Qs),[[fe,h.value]]),h.value?(G(),W(`button`,{key:0,class:`clear-search`,onClick:xe},[U(zs,{name:`close`,size:14})])):V(``,!0),F(`div`,{class:`global-toggle`,title:v.value?s(`tooltip.globalSearchOn`):s(`tooltip.globalSearchOff`)},[F(`span`,ec,H(s(`search.globalLabel`)),1),F(`button`,{class:L([`toggle-switch`,{active:v.value}]),onClick:ye},[...n[11]||=[F(`span`,{class:`toggle-knob`},null,-1)]],2)],8,$s),v.value?(G(),W(`div`,{key:1,class:L([`index-status`,D.value.status]),title:D.value.status===`ready`?s(`tooltip.indexReady`,{totalFiles:D.value.totalFiles,scannedRoots:(D.value.scannedRoots||[]).join(`, `)||`unknown`}):D.value.status===`indexing`?s(`tooltip.indexing`,{indexedFiles:D.value.indexedFiles,currentDir:D.value.currentDir||``}):s(`tooltip.indexIdle`),onClick:n[2]||=e=>D.value.status!==`indexing`&&Te()},[n[12]||=F(`span`,{class:`status-dot`},null,-1),F(`span`,nc,H(D.value.status===`ready`?s(`status.indexReady`):D.value.status===`indexing`?s(`status.indexing`):s(`status.indexIdle`)),1)],10,tc)):V(``,!0)]),F(`div`,rc,[F(`div`,ic,[F(`div`,ac,[F(`div`,oc,H(s(`sidebar.quickAccess`)),1),F(`div`,{class:`sidebar-item`,onClick:ce},[U(zs,{name:`home`,size:15}),o(` `+H(s(`sidebar.home`)),1)]),A.value?(G(),W(`div`,{key:0,class:`sidebar-item`,onClick:n[3]||=e=>le(A.value)},[U(zs,{name:`monitor`,size:15}),o(` `+H(s(`sidebar.desktop`)),1)])):V(``,!0),j.value?(G(),W(`div`,{key:1,class:`sidebar-item`,onClick:n[4]||=e=>le(j.value)},[U(zs,{name:`file`,size:15}),o(` `+H(s(`sidebar.documents`)),1)])):V(``,!0),ee.value?(G(),W(`div`,{key:2,class:`sidebar-item`,onClick:n[5]||=e=>le(ee.value)},[U(zs,{name:`download`,size:15}),o(` `+H(s(`sidebar.downloads`)),1)])):V(``,!0)]),g.value.length?(G(),W(`div`,sc,[F(`div`,cc,H(s(`sidebar.drives`)),1),(G(!0),W(N,null,w(g.value,e=>(G(),W(`div`,{key:e,class:L([`sidebar-item`,{active:d.value===e}]),onClick:t=>le(e)},[U(zs,{name:`hardDrive`,size:15}),o(` `+H(e),1)],10,lc))),128))])):V(``,!0)]),F(`div`,{class:`file-list-container`,onClick:me(he,[`self`])},[l.value?(G(),W(`div`,uc,[n[13]||=F(`span`,{class:`spinner`},null,-1),o(` `+H(s(`state.loading`)),1)])):u.value?(G(),W(`div`,dc,[U(zs,{name:`circleX`,size:18,color:`currentColor`}),o(` `+H(u.value),1)])):b.value?(G(),W(`div`,fc,[n[14]||=F(`span`,{class:`spinner`},null,-1),o(` `+H(s(`state.globalSearching`)),1)])):te.value.length===0?(G(),W(`div`,pc,H(h.value?s(`state.emptySearch`):s(`state.emptyDir`)),1)):(G(),W(`div`,mc,[x.value.length>0?(G(),W(`div`,hc,[U(zs,{name:`search`,size:14,color:`#8b91a8`}),F(`span`,{innerHTML:s(`results.found`,{count:x.value.length})},null,8,gc),S.value?(G(),W(`span`,_c,H(s(`results.truncated`)),1)):V(``,!0),F(`span`,{class:L([`engine-badge`,T.value])},H(T.value===`index`?s(`search.engineIndex`):s(`search.engineWalk`)),3),F(`span`,vc,H(C.value)+H(s(`unit.ms`)),1)])):V(``,!0),e.mode===`directory`&&!P.value?(G(),W(`div`,{key:1,class:L([`file-row select-current-dir`,{selected:pe(d.value)}]),onClick:[n[6]||=me(e=>B(d.value),[`exact`]),n[7]||=me(e=>B(d.value),[`ctrl`]),n[8]||=me(e=>B(d.value),[`meta`])]},[U(zs,{name:`circleCheck`,size:18,color:`#a78bfa`,class:`file-icon`}),F(`span`,yc,H(s(`fileRow.selectCurrent`)),1),F(`span`,bc,H(d.value),1)],2)):V(``,!0),(G(!0),W(N,null,w(te.value,e=>(G(),W(`div`,{key:e.path,class:L([`file-row`,{selected:pe(e.path),"is-directory":e.kind===`directory`}]),onClick:[me(t=>ge(e),[`exact`]),me(t=>K(e),[`ctrl`]),me(t=>K(e),[`meta`])],onDblclick:t=>_e(e)},[U(zs,{name:e.kind===`directory`?`folder`:`file`,size:18,color:J(e),class:`file-icon`},null,8,[`name`,`color`]),F(`span`,{class:`file-name`,title:e.name},H(e.name),9,Sc),P.value?(G(),W(`span`,{key:0,class:`file-parent-path`,title:e.path},H(we(e.path)),9,Cc)):V(``,!0),e.kind===`file`?(G(),W(`span`,{key:1,class:`file-size`,title:Ee(e.size)},H(Ee(e.size)),9,wc)):V(``,!0),e.modified?(G(),W(`span`,{key:2,class:`file-modified`,title:e.modified},H(De(e.modified)),9,Tc)):V(``,!0)],42,xc))),128))]))])]),F(`div`,Ec,[F(`div`,Dc,[m.value.length===0?(G(),W(`span`,Oc,H(s(e.mode===`file`?`footer.unselectedFile`:`footer.unselectedDir`)),1)):e.multiple?(G(),W(`span`,Ac,[F(`span`,{innerHTML:s(`footer.selected`,{count:m.value.length})},null,8,jc)])):(G(),W(`span`,{key:1,class:`has-selection single-path`,title:m.value[0]},H(m.value[0]),9,kc))]),F(`div`,Mc,[F(`button`,{class:`btn btn-cancel`,onClick:n[9]||=e=>t.$emit(`close`)},H(s(`footer.cancel`)),1),F(`button`,{class:`btn btn-confirm`,disabled:m.value.length===0,onClick:ve},H(s(`footer.confirm`)),9,Nc)])])],2)])):V(``,!0)]))}},[[`__scopeId`,`data-v-6e4a8b86`]]),Ic={plus:[`M12 5v14M5 12h14`],close:[`M18 6 6 18M6 6l12 12`],chevronDown:[`m6 9 6 6 6-6`],chevronUp:[`m18 15-6-6-6 6`],chevronRight:[`m9 18 6-6-6-6`],chevronLeft:[`m15 18-6-6 6-6`],check:[`M20 6 9 17l-5-5`],search:[`m21 21-4.35-4.35`,`M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z`],refresh:[`M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,`M3 3v5h5`,`M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16`,`M21 21v-5h-5`],copy:[`M9 17H7A5 5 0 0 1 7 7h2`,`M15 7h2a5 5 0 0 1 0 10h-2`,`M8 12h8`],trash:[`M3 6h18`,`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`],edit:[`M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,`M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5Z`],cpu:[`M18 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2Z`,`M9 9h6v6H9z`,`M9 1v3M15 1v3M9 20v3M15 20v3M1 9h3M1 15h3M20 9h3M20 15h3`],zap:[`M13 2 3 14h9l-1 8 10-12h-9l1-8Z`],globe:[`M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Z`,`M2 12h20`,`M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10A15.3 15.3 0 0 1 12 2Z`],key:[`M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0 3 3L22 7l-3-3m-3.5 3.5L19 4`],server:[`M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v2Z`,`M13 5v2M13 17v2M13 11v2`],tag:[`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,`M7.5 7.5h.01`],checkCircle:[`M22 11.08V12a10 10 0 1 1-5.93-9.14`,`M22 4 12 14.01l-3-3`],alertCircle:[`M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z`,`M12 8v4M12 16h.01`],xCircle:[`m14.5 9.5-5 5m0-5 5 5`,`M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z`],loader:[`M21 12a9 9 0 1 1-6.219-8.56`],eye:[`M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z`,`M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z`],eyeOff:[`M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94`,`M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19`,`M1 1l22 22`],settings:[`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2Z`,`M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z`],link:[`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`],list:[`M3 12h.01M3 6h.01M3 18h.01M8 12h13M8 6h13M8 18h13`],star:[`M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2Z`],sun:[`M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z`,`M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42`],moon:[`M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z`]},Lc=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Rc=[`width`,`height`,`stroke`,`stroke-width`],zc=[`d`],Bc=Lc({__name:`SvgIcon`,props:{name:{type:String,required:!0},size:{type:[Number,String],default:16},color:{type:String,default:null},strokeWidth:{type:[Number,String],default:1.75},className:{type:String,default:``},style:{type:[String,Object],default:null}},setup(e){let t=e,n=I(()=>Ic[t.name]??[`M12 12m-1 0a1 1 0 1 0 2 0 1 1 0 0 0-2 0`]);return(t,r)=>(G(),W(`svg`,{width:e.size,height:e.size,viewBox:`0 0 24 24`,fill:`none`,stroke:e.color||`currentColor`,"stroke-width":e.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:L([`svg-icon`,e.className]),style:k(e.style),"aria-hidden":`true`},[(G(!0),W(N,null,w(n.value,(e,t)=>(G(),W(`path`,{key:t,d:e},null,8,zc))),128))],14,Rc))}},[[`__scopeId`,`data-v-833e113a`]]),Vc={"zh-CN":{endpoint:`接口地址`,endpointPlaceholder:`选择或输入接口地址`,apiKey:`API Key`,apiKeyPlaceholder:`输入 API Key`,model:`模型`,modelPlaceholder:`选择或输入模型`,displayName:`显示名称`,displayNamePlaceholder:`默认使用模型名称`,errEndpointRequired:`请填写接口地址`,errModelRequired:`请填写模型`,loadingModels:`加载模型列表…`,testing:`测试中…`,test:`测试`,saving:`保存中…`,save:`保存模型`,okDefault:`连接成功`,failDefault:`连接失败`,saveFailDefault:`保存失败`,networkError:`网络错误`,cancel:`取消`,provider:{openai:`OpenAI`,anthropic:`Anthropic (Claude)`,deepseek:`DeepSeek`,gemini:`Google (Gemini)`,xai:`xAI (Grok)`,meta:`Meta (Llama)`,mistral:`Mistral AI`,minimax:`MiniMax`,moonshot:`Moonshot (Kimi)`,zhipu:`智谱 (GLM)`,qwen:`阿里 (Qwen)`,cohere:`Cohere`,groq:`Groq`,together:`Together AI`,openrouter:`OpenRouter`,ollama:`Ollama (本地)`}},"en-US":{endpoint:`Endpoint`,endpointPlaceholder:`Select or type an endpoint URL`,apiKey:`API Key`,apiKeyPlaceholder:`Enter API Key`,model:`Model`,modelPlaceholder:`Select or type a model`,displayName:`Display Name`,displayNamePlaceholder:`Defaults to model name`,errEndpointRequired:`Endpoint is required`,errModelRequired:`Model is required`,loadingModels:`Loading models…`,testing:`Testing…`,test:`Test`,saving:`Saving…`,save:`Save Model`,okDefault:`Connection succeeded`,failDefault:`Connection failed`,saveFailDefault:`Save failed`,networkError:`Network error`,cancel:`Cancel`,provider:{openai:`OpenAI`,anthropic:`Anthropic (Claude)`,deepseek:`DeepSeek`,gemini:`Google (Gemini)`,xai:`xAI (Grok)`,meta:`Meta (Llama)`,mistral:`Mistral AI`,minimax:`MiniMax`,moonshot:`Moonshot (Kimi)`,zhipu:`Zhipu (GLM)`,qwen:`Alibaba (Qwen)`,cohere:`Cohere`,groq:`Groq`,together:`Together AI`,openrouter:`OpenRouter`,ollama:`Ollama (local)`}}},Hc=Object.keys(Vc),Uc=`zh-CN`;function Wc(e){return e&&Vc[e]?e:Uc}function Gc(e){let t=I(()=>Vc[Wc(e.value)]||Vc[Uc]);function n(e){let n=e.split(`.`),r=t.value;for(let t of n){if(r==null)return e;r=r[t]}return r??e}return{t:n,locale:I(()=>Wc(e.value))}}var Kc={class:`field`},qc={class:`field-label`},Jc={class:`combo-input-row`},Yc=[`src`,`alt`],Xc=[`placeholder`],Zc={key:0,class:`dropdown`},Qc=[`onMousedown`],$c=[`src`,`alt`],el={class:`item-label`},tl={class:`item-url`},nl={key:0,class:`field-error`},rl={class:`field`},il={class:`field-label`},al={class:`input-wrap`},ol=[`type`,`placeholder`],sl={class:`field`},cl={class:`field-label`},ll={class:`combo-input-row`},ul=[`placeholder`],dl={key:0,class:`dropdown`},fl={key:0,class:`dropdown-loading`},pl=[`onMousedown`],ml={class:`item-label`},hl={key:0,class:`item-url`},gl={key:0,class:`field-error`},_l={class:`field`},vl={class:`field-label`},yl={class:`input-wrap`},bl=[`placeholder`],xl={class:`actions`},Sl={class:`actions-right`},Cl=[`disabled`],wl=[`disabled`],Tl=`https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png`,El=Lc({__name:`AddModelForm`,props:{apiBase:{type:String,default:`/api/ai-model`},initial:{type:Object,default:null},theme:{type:String,default:`dark`},locale:{type:String,default:Uc,validator:e=>Hc.includes(e)||e==null||e===``}},emits:[`save`,`cancel`,`test-success`,`test-fail`],setup(e,{emit:t}){let n=e,{t:r}=Gc(I(()=>Wc(n.locale))),i={"--bg":`#0F172A`,"--bg-surface":`#1E293B`,"--bg-elevated":`#293548`,"--border":`#334155`,"--border-focus":`#3B82F6`,"--primary":`#3B82F6`,"--primary-hover":`#2563EB`,"--primary-dim":`rgba(59,130,246,.12)`,"--success":`#10B981`,"--success-dim":`rgba(16,185,129,.12)`,"--error":`#EF4444`,"--error-dim":`rgba(239,68,68,.12)`,"--warning":`#F59E0B`,"--text":`#E2E8F0`,"--text-dim":`#94A3B8`,"--text-muted":`#475569`,"--font":`'Inter', system-ui, -apple-system, sans-serif`,"--radius":`8px`,"--radius-lg":`12px`,"--t":`150ms ease`},a={"--bg":`#F8FAFC`,"--bg-surface":`#FFFFFF`,"--bg-elevated":`#F1F5F9`,"--border":`#E2E8F0`,"--border-focus":`#2563EB`,"--primary":`#2563EB`,"--primary-hover":`#1D4ED8`,"--primary-dim":`rgba(37,99,235,.1)`,"--success":`#059669`,"--success-dim":`rgba(5,150,105,.1)`,"--error":`#DC2626`,"--error-dim":`rgba(220,38,38,.1)`,"--warning":`#D97706`,"--text":`#0F172A`,"--text-dim":`#475569`,"--text-muted":`#94A3B8`,"--font":`'Inter', system-ui, -apple-system, sans-serif`,"--radius":`8px`,"--radius-lg":`12px`,"--t":`150ms ease`},s=I(()=>n.theme===`light`?a:i);function c(e){return e.endsWith(`-color`)?`${Tl}/dark/${e}.png`:`${Tl}/${n.theme}/${e}.png`}let l=t,u=M({endpoint:n.initial?.endpoint??``,modelName:n.initial?.modelName??``,displayName:n.initial?.displayName??``,apiKey:n.initial?.apiKey??``}),d=M({endpoint:``,modelName:``}),f=M(!1),p=M(!1),m=M(!1),h=M(null),g=M(!1),_=M(null),v=M(``),b=M(!1),x=M(null),S=M(``),C=M(!1),T=M([]),j=[{id:`openai`,url:`https://api.openai.com/v1`,icon:`openai`},{id:`anthropic`,url:`https://api.anthropic.com/v1`,icon:`claude-color`},{id:`deepseek`,url:`https://api.deepseek.com/v1`,icon:`deepseek-color`},{id:`gemini`,url:`https://generativelanguage.googleapis.com/v1beta/openai`,icon:`gemini-color`},{id:`xai`,url:`https://api.x.ai/v1`,icon:`grok`},{id:`meta`,url:`https://api.llama-api.com/v1`,icon:`meta-color`},{id:`mistral`,url:`https://api.mistral.ai/v1`,icon:`mistral-color`},{id:`minimax`,url:`https://api.minimaxi.com/v1`,icon:`minimax-color`},{id:`moonshot`,url:`https://api.moonshot.cn/v1`,icon:`kimi-color`},{id:`zhipu`,url:`https://open.bigmodel.cn/api/paas/v4`,icon:`zhipu-color`},{id:`qwen`,url:`https://dashscope.aliyuncs.com/compatible-mode/v1`,icon:`qwen-color`},{id:`cohere`,url:`https://api.cohere.com/v2`,icon:`cohere-color`},{id:`groq`,url:`https://api.groq.com/openai/v1`,icon:`groq`},{id:`together`,url:`https://api.together.xyz/v1`,icon:`together-color`},{id:`openrouter`,url:`https://openrouter.ai/api/v1`,icon:`openrouter`},{id:`ollama`,url:`http://localhost:11434/v1`,icon:`ollama`}],P=I(()=>j.map(e=>({...e,label:r(`provider.${e.id}`)}))),te=I(()=>P.value.find(e=>e.url===u.value.endpoint)),ne=I(()=>{let e=P.value,t=v.value.toLowerCase();return t?e.filter(e=>e.label.toLowerCase().includes(t)||e.url.toLowerCase().includes(t)):e});function re(){v.value=u.value.endpoint,g.value=!0,h.value=null}function ie(){g.value=!g.value,g.value&&_.value?.focus()}function oe(e){e&&(u.value.endpoint=e.url,v.value=e.url,g.value=!1,d.value.endpoint=``,h.value=null,he(e.url))}function se(){setTimeout(()=>{g.value=!1},150)}let le=I(()=>{let e=S.value.toLowerCase();return e?T.value.filter(t=>t.id.toLowerCase().includes(e)||(t.desc||``).toLowerCase().includes(e)):T.value});function ue(){S.value=u.value.modelName,b.value=!0,h.value=null}function z(){b.value=!b.value,b.value&&(x.value?.focus(),!T.value.length&&u.value.endpoint&&he(u.value.endpoint))}function de(e){e&&(u.value.modelName=e.id,S.value=e.id,b.value=!1,d.value.modelName=``,h.value=null)}function pe(){b.value=!0,!T.value.length&&u.value.endpoint&&he(u.value.endpoint)}function B(){setTimeout(()=>{b.value=!1},150)}async function he(e){if(e){C.value=!0;try{let t={},r=u.value.apiKey.trim();r&&(t[`x-api-key`]=r);let i=await fetch(`${n.apiBase}/models?endpoint=${encodeURIComponent(e)}`,{headers:t});i.ok&&(T.value=((await i.json()).models||[]).map(e=>typeof e==`string`?{id:e}:e))}catch{}finally{C.value=!1}}}E(()=>n.initial,e=>{u.value={endpoint:e?.endpoint??``,modelName:e?.modelName??``,displayName:e?.displayName??``,apiKey:e?.apiKey??``},d.value={endpoint:``,modelName:``},h.value=null,v.value=``,S.value=``,T.value=[]}),E(()=>u.value.apiKey,(e,t)=>{(t&&t.trim().length>0)!==(e&&e.trim().length>0)&&u.value.endpoint&&he(u.value.endpoint)});function ge(){d.value={endpoint:``,modelName:``};let e=!0;return u.value.endpoint.trim()||(d.value.endpoint=r(`errEndpointRequired`),e=!1),u.value.modelName.trim()||(d.value.modelName=r(`errModelRequired`),e=!1),e}async function K(){if(ge()){m.value=!0,h.value=null;try{let e=await fetch(`${n.apiBase}/test`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({endpoint:u.value.endpoint,modelName:u.value.modelName,apiKey:u.value.apiKey})}),t=await e.json();e.ok&&t.ok?(h.value={ok:!0,message:t.message||r(`okDefault`)},l(`test-success`,t)):(h.value={ok:!1,message:t.message||r(`failDefault`)},l(`test-fail`,t))}catch(e){h.value={ok:!1,message:`${r(`networkError`)}: ${e.message}`},l(`test-fail`,{message:e.message})}finally{m.value=!1}}}async function _e(){if(ge()){p.value=!0;try{let e={endpoint:u.value.endpoint.trim(),modelName:u.value.modelName.trim(),displayName:u.value.displayName.trim()||u.value.modelName.trim(),apiKey:u.value.apiKey},t=await fetch(`${n.apiBase}/models`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}),i=await t.json();t.ok?l(`save`,{...e,id:i.id}):h.value={ok:!1,message:i.message||r(`saveFailDefault`)}}catch(e){h.value={ok:!1,message:`${r(`networkError`)}: ${e.message}`}}finally{p.value=!1}}}return E(()=>[u.value.endpoint,u.value.modelName,u.value.apiKey],()=>{h.value=null}),(e,t)=>(G(),W(`div`,{class:`form-wrap`,style:k(s.value)},[F(`div`,Kc,[F(`label`,qc,[o(H(R(r)(`endpoint`))+` `,1),t[19]||=F(`span`,{class:`required`},`*`,-1)]),F(`div`,{class:L([`combobox`,{open:g.value,error:d.value.endpoint}])},[F(`div`,Jc,[te.value?(G(),W(`img`,{key:0,class:`field-icon provider-logo`,src:c(te.value.icon),alt:te.value.label,width:`16`,height:`16`,onError:t[0]||=e=>e.target.style.display=`none`},null,40,Yc)):(G(),O(Bc,{key:1,name:`globe`,size:15,color:`var(--text-dim)`,class:`field-icon`})),y(F(`input`,{ref_key:`endpointInputRef`,ref:_,"onUpdate:modelValue":t[1]||=e=>u.value.endpoint=e,class:`combo-input`,placeholder:R(r)(`endpointPlaceholder`),autocomplete:`off`,onFocus:t[2]||=e=>g.value=!0,onBlur:se,onInput:re,onKeydown:[t[3]||=ae(me(e=>oe(ne.value[0]),[`prevent`]),[`enter`]),t[4]||=ae(e=>g.value=!1,[`escape`]),t[5]||=ae(e=>g.value=!1,[`tab`])]},null,40,Xc),[[fe,u.value.endpoint]]),u.value.endpoint?(G(),W(`button`,{key:2,type:`button`,class:`combo-clear`,tabindex:`-1`,onMousedown:t[6]||=me(e=>{u.value.endpoint=``,g.value=!1},[`prevent`])},[U(Bc,{name:`close`,size:12,color:`var(--text-dim)`})],32)):V(``,!0),F(`button`,{type:`button`,class:`combo-arrow`,tabindex:`-1`,onMousedown:me(ie,[`prevent`])},[U(Bc,{name:g.value?`chevronUp`:`chevronDown`,size:14,color:`var(--text-dim)`},null,8,[`name`])],32)]),g.value&&ne.value.length?(G(),W(`div`,Zc,[(G(!0),W(N,null,w(ne.value,e=>(G(),W(`button`,{key:e.url,type:`button`,class:L([`dropdown-item has-logo`,{active:u.value.endpoint===e.url}]),onMousedown:me(t=>oe(e),[`prevent`])},[F(`img`,{class:`item-logo`,src:c(e.icon),alt:e.label,width:`16`,height:`16`,onError:t[7]||=e=>e.target.style.display=`none`},null,40,$c),F(`span`,el,H(e.label),1),F(`span`,tl,H(e.url),1),u.value.endpoint===e.url?(G(),O(Bc,{key:0,name:`check`,size:13,color:`var(--primary)`,class:`item-check`})):V(``,!0)],42,Qc))),128))])):V(``,!0)],2),d.value.endpoint?(G(),W(`span`,nl,[U(Bc,{name:`alertCircle`,size:12,color:`var(--error)`}),o(` `+H(d.value.endpoint),1)])):V(``,!0)]),F(`div`,rl,[F(`label`,il,H(R(r)(`apiKey`)),1),F(`div`,al,[U(Bc,{name:`key`,size:15,color:`var(--text-dim)`,class:`field-icon`}),y(F(`input`,{"onUpdate:modelValue":t[8]||=e=>u.value.apiKey=e,type:f.value?`text`:`password`,class:`text-input has-two-right`,placeholder:R(r)(`apiKeyPlaceholder`),autocomplete:`new-password`,spellcheck:`false`},null,8,ol),[[A,u.value.apiKey]]),y(F(`button`,{type:`button`,class:`eye-btn`,style:{right:`34px`},tabindex:`-1`,onClick:t[9]||=e=>u.value.apiKey=``},[U(Bc,{name:`close`,size:12,color:`var(--text-dim)`})],512),[[ee,u.value.apiKey]]),F(`button`,{type:`button`,class:`eye-btn`,tabindex:`-1`,onClick:t[10]||=e=>f.value=!f.value},[U(Bc,{name:f.value?`eyeOff`:`eye`,size:15,color:`var(--text-dim)`},null,8,[`name`])])])]),F(`div`,sl,[F(`label`,cl,[o(H(R(r)(`model`))+` `,1),t[20]||=F(`span`,{class:`required`},`*`,-1)]),F(`div`,{class:L([`combobox`,{open:b.value,error:d.value.modelName}])},[F(`div`,ll,[U(Bc,{name:`cpu`,size:15,color:`var(--text-dim)`,class:`field-icon`}),y(F(`input`,{ref_key:`modelInputRef`,ref:x,"onUpdate:modelValue":t[11]||=e=>u.value.modelName=e,class:`combo-input`,placeholder:R(r)(`modelPlaceholder`),autocomplete:`off`,onFocus:pe,onBlur:B,onInput:ue,onKeydown:[t[12]||=ae(me(e=>de(le.value[0]),[`prevent`]),[`enter`]),t[13]||=ae(e=>b.value=!1,[`escape`]),t[14]||=ae(e=>b.value=!1,[`tab`])]},null,40,ul),[[fe,u.value.modelName]]),u.value.modelName?(G(),W(`button`,{key:0,type:`button`,class:`combo-clear`,tabindex:`-1`,onMousedown:t[15]||=me(e=>{u.value.modelName=``,b.value=!1},[`prevent`])},[U(Bc,{name:`close`,size:12,color:`var(--text-dim)`})],32)):V(``,!0),F(`button`,{type:`button`,class:`combo-arrow`,tabindex:`-1`,onMousedown:me(z,[`prevent`])},[U(Bc,{name:b.value?`chevronUp`:`chevronDown`,size:14,color:`var(--text-dim)`},null,8,[`name`])],32)]),b.value&&le.value.length?(G(),W(`div`,dl,[C.value?(G(),W(`div`,fl,[U(Bc,{name:`loader`,size:14,color:`var(--text-dim)`,class:`spin`}),F(`span`,null,H(R(r)(`loadingModels`)),1)])):(G(!0),W(N,{key:1},w(le.value,e=>(G(),W(`button`,{key:e.id,type:`button`,class:L([`dropdown-item`,{active:u.value.modelName===e.id}]),onMousedown:me(t=>de(e),[`prevent`])},[F(`span`,ml,H(e.id),1),e.desc?(G(),W(`span`,hl,H(e.desc),1)):V(``,!0),u.value.modelName===e.id?(G(),O(Bc,{key:1,name:`check`,size:13,color:`var(--primary)`,class:`item-check`})):V(``,!0)],42,pl))),128))])):V(``,!0)],2),d.value.modelName?(G(),W(`span`,gl,[U(Bc,{name:`alertCircle`,size:12,color:`var(--error)`}),o(` `+H(d.value.modelName),1)])):V(``,!0)]),F(`div`,_l,[F(`label`,vl,H(R(r)(`displayName`)),1),F(`div`,yl,[U(Bc,{name:`tag`,size:15,color:`var(--text-dim)`,class:`field-icon`}),y(F(`input`,{"onUpdate:modelValue":t[16]||=e=>u.value.displayName=e,class:`text-input`,placeholder:R(r)(`displayNamePlaceholder`),autocomplete:`off`},null,8,bl),[[fe,u.value.displayName]]),y(F(`button`,{type:`button`,class:`eye-btn`,tabindex:`-1`,onClick:t[17]||=e=>u.value.displayName=``},[U(Bc,{name:`close`,size:12,color:`var(--text-dim)`})],512),[[ee,u.value.displayName]])])]),U(ce,{name:`banner`},{default:D(()=>[h.value?(G(),W(`div`,{key:0,class:L([`test-banner`,h.value.ok?`ok`:`fail`])},[U(Bc,{name:h.value.ok?`checkCircle`:`xCircle`,size:15,color:h.value.ok?`var(--success)`:`var(--error)`},null,8,[`name`,`color`]),F(`span`,null,H(h.value.message),1)],2)):V(``,!0)]),_:1}),F(`div`,xl,[F(`button`,{type:`button`,class:`btn btn-ghost`,onClick:t[18]||=e=>l(`cancel`)},H(R(r)(`cancel`)),1),F(`div`,Sl,[F(`button`,{type:`button`,class:`btn btn-outline`,disabled:m.value,onClick:K},[m.value?(G(),O(Bc,{key:0,name:`loader`,size:14,color:`currentColor`,class:`spin`})):(G(),O(Bc,{key:1,name:`zap`,size:14,color:`currentColor`})),o(` `+H(m.value?R(r)(`testing`):R(r)(`test`)),1)],8,Cl),F(`button`,{type:`button`,class:`btn btn-primary`,disabled:p.value,onClick:_e},[p.value?(G(),O(Bc,{key:0,name:`loader`,size:14,color:`currentColor`,class:`spin`})):(G(),O(Bc,{key:1,name:`check`,size:14,color:`currentColor`})),o(` `+H(p.value?R(r)(`saving`):R(r)(`save`)),1)],8,wl)])])],4))}},[[`__scopeId`,`data-v-cc2c26ba`]]),Dl=Object.create,Ol=Object.defineProperty,kl=Object.getOwnPropertyDescriptor,Al=Object.getOwnPropertyNames,jl=Object.getPrototypeOf,Ml=Object.prototype.hasOwnProperty,Nl=(e,t)=>function(){return t||(0,e[Al(e)[0]])((t={exports:{}}).exports,t),t.exports},Pl=e=>{let t={};for(var n in e)Ol(t,n,{get:e[n],enumerable:!0});return t},Fl=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Al(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Ml.call(e,s)&&s!==n&&Ol(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=kl(t,s))||r.enumerable});return e},Il=(e,t,n)=>(n=e==null?{}:Dl(jl(e)),Fl(t||!e||!e.__esModule?Ol(n,`default`,{value:e,enumerable:!0}):n,e));function Ll(e,t,n,r){let i=Number(e[t].meta.id+1).toString(),a=``;return typeof r.docId==`string`&&(a=`-${r.docId}-`),a+i}function Rl(e,t){let n=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(n+=`:${e[t].meta.subId}`),`[${n}]`}function zl(e,t,n,r,i){let a=i.rules.footnote_anchor_name(e,t,n,r,i),o=i.rules.footnote_caption(e,t,n,r,i),s=a;return e[t].meta.subId>0&&(s+=`:${e[t].meta.subId}`),`<sup class="footnote-ref"><a href="#fn${a}" id="fnref${s}">${o}</a></sup>`}function Bl(e,t,n){return(n.xhtmlOut?`<hr class="footnotes-sep" />
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/element-plus-rcpA4EGF.js","assets/rolldown-runtime-CMxvf4Kt.js","assets/element-plus-CYGtZ7Nz.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e,n as t,r as n,t as r}from"./rolldown-runtime-CMxvf4Kt.js";import{$n as i,Bn as a,Cn as o,Dn as s,En as c,Fn as l,Gn as u,Hn as d,In as f,Jn as p,Ln as m,Mn as h,Nn as g,On as _,Pn as v,Rn as y,Sn as b,Tn as x,Un as S,Vn as C,Wn as w,Xn as T,Zn as E,_n as D,_r as O,ar as k,bn as A,cn as j,cr as M,dr as N,er as ee,fn as te,gn as P,gr as ne,hn as F,in as re,ir as ie,jn as ae,kn as I,ln as oe,lr as L,mn as R,mr as z,nr as se,on as ce,or as le,pn as ue,pr as B,rr as de,sn as fe,sr as V,tn as pe,tr as me,un as H,ur as he,vn as U,wn as ge,xn as _e,zn as ve}from"./element-plus-rcpA4EGF.js";import{l as W}from"./monaco-DC7mqInI.js";var ye=typeof window<`u`,be,xe=e=>be=e,Se=Symbol();function Ce(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var we;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(we||={});var Te=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function G(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function Ee(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){ke(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function De(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function K(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}var Oe=typeof navigator==`object`?navigator:{userAgent:``},q=/Macintosh/.test(Oe.userAgent)&&/AppleWebKit/.test(Oe.userAgent)&&!/Safari/.test(Oe.userAgent),ke=ye?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!q?Ae:`msSaveOrOpenBlob`in Oe?je:Me:()=>{};function Ae(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?K(r):De(r.href)?Ee(e,t,n):(r.target=`_blank`,K(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){K(r)},0))}function je(e,t=`download`,n){if(typeof e==`string`)if(De(e))Ee(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){K(t)})}else navigator.msSaveOrOpenBlob(G(e,n),t)}function Me(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return Ee(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(Te.HTMLElement))||`safari`in Te,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||q)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:Ne}=Object;function Pe(){let e=i(!0),t=e.run(()=>V({})),n=[],r=[],a=de({install(e){xe(a),a._a=e,e.provide(Se,a),e.config.globalProperties.$pinia=a,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return a}var Fe=()=>{};function Ie(e,t,n,r=Fe){e.add(t);let i=()=>{e.delete(t)&&r()};return!n&&ee()&&ie(i),i}function Le(e,...t){e.forEach(e=>{e(...t)})}var Re=e=>e(),ze=Symbol(),Be=Symbol();function Ve(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(let n in t){if(!t.hasOwnProperty(n))continue;let r=t[n],i=e[n];Ce(i)&&Ce(r)&&e.hasOwnProperty(n)&&!se(r)&&!me(r)?e[n]=Ve(i,r):e[n]=r}return e}var He=Symbol();function Ue(e){return!Ce(e)||!Object.prototype.hasOwnProperty.call(e,He)}var{assign:We}=Object;function Ge(e){return!!(se(e)&&e.effect)}function Ke(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],c;function l(){return s||(n.state.value[e]=i?i():{}),We(N(n.state.value[e]),a,Object.keys(o||{}).reduce((t,r)=>(t[r]=de(R(()=>{xe(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return c=qe(e,l,t,n,r,!0),c}function qe(e,t,n={},r,a,o){let s,c=We({actions:{}},n),l={deep:!0},u,d,f=new Set,m=new Set,g=r.state.value[e];!o&&!g&&(r.state.value[e]={}),V({});let _;function v(t){let n;u=d=!1,typeof t==`function`?(t(r.state.value[e]),n={type:we.patchFunction,storeId:e,events:void 0}):(Ve(r.state.value[e],t),n={type:we.patchObject,payload:t,storeId:e,events:void 0});let i=_=Symbol();h().then(()=>{_===i&&(u=!0)}),d=!0,Le(f,n,r.state.value[e])}let y=o?function(){let{state:e}=n,t=e?e():{};this.$patch(e=>{We(e,t)})}:Fe;function b(){s.stop(),f.clear(),m.clear(),r._s.delete(e)}let x=(t,n=``)=>{if(ze in t)return t[Be]=n,t;let i=function(){xe(r);let n=Array.from(arguments),a=new Set,o=new Set;function s(e){a.add(e)}function c(e){o.add(e)}Le(m,{args:n,name:i[Be],store:S,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:S,n)}catch(e){throw Le(o,e),e}return l instanceof Promise?l.then(e=>(Le(a,e),e)).catch(e=>(Le(o,e),Promise.reject(e))):(Le(a,l),l)};return i[ze]=!0,i[Be]=n,i},S=k({_p:r,$id:e,$onAction:Ie.bind(null,m),$patch:v,$reset:y,$subscribe(t,n={}){let i=Ie(f,t,n.detached,()=>a()),a=s.run(()=>p(()=>r.state.value[e],r=>{(n.flush===`sync`?d:u)&&t({storeId:e,type:we.direct,events:void 0},r)},We({},l,n)));return i},$dispose:b});r._s.set(e,S);let C=(r._a&&r._a.runWithContext||Re)(()=>r._e.run(()=>(s=i()).run(()=>t({action:x}))));for(let t in C){let n=C[t];se(n)&&!Ge(n)||me(n)?o||(g&&Ue(n)&&(se(n)?n.value=g[t]:Ve(n,g[t])),r.state.value[e][t]=n):typeof n==`function`&&(C[t]=x(n,t),c.actions[t]=n)}return We(S,C),We(L(S),C),Object.defineProperty(S,"$state",{get:()=>r.state.value[e],set:e=>{v(t=>{We(t,e)})}}),r._p.forEach(e=>{We(S,s.run(()=>e({store:S,app:r._a,pinia:r,options:c})))}),g&&o&&n.hydrate&&n.hydrate(S.$state,g),u=!0,d=!0,S}function Je(e,t,n){let r,i=typeof t==`function`;r=i?n:t;function a(n,a){let o=_();return n||=o?I(Se,null):null,n&&xe(n),n=be,n._s.has(e)||(i?qe(e,t,r,n):Ke(e,r,n)),n._s.get(e)}return a.$id=e,a}function Ye(e){let t=L(e),n={};for(let r in t){let i=t[r];i.effect?n[r]=R({get:()=>e[r],set(t){e[r]=t}}):(se(i)||me(i))&&(n[r]=he(e,r))}return n}function Xe(e,t){typeof console<`u`&&(console.warn(`[intlify] `+e),t&&console.warn(t.stack))}var J=typeof window<`u`,Ze=(e,t=!1)=>t?Symbol.for(e):Symbol(e),Qe=(e,t,n)=>$e({l:e,k:t,s:n}),$e=e=>JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`).replace(/\u0027/g,`\\u0027`),et=e=>typeof e==`number`&&isFinite(e),tt=e=>vt(e)===`[object Date]`,nt=e=>vt(e)===`[object RegExp]`,Y=e=>Q(e)&&Object.keys(e).length===0,rt=Object.assign,it=Object.create,at=(e=null)=>it(e),ot,st=()=>ot||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:at();function ct(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/\//g,`/`).replace(/=/g,`=`)}function lt(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,`&`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/</g,`<`).replace(/>/g,`>`)}function ut(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(e,t,n)=>`${t}="${lt(n)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(e,t,n)=>`${t}='${lt(n)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,`$1on$3`)),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(t=>{e=e.replace(t,`$1javascript:`)}),e}var dt=Object.prototype.hasOwnProperty;function ft(e,t){return dt.call(e,t)}var pt=Array.isArray,mt=e=>typeof e==`function`,X=e=>typeof e==`string`,Z=e=>typeof e==`boolean`,ht=e=>typeof e==`object`&&!!e,gt=e=>ht(e)&&mt(e.then)&&mt(e.catch),_t=Object.prototype.toString,vt=e=>_t.call(e),Q=e=>{if(!ht(e))return!1;let t=Object.getPrototypeOf(e);return t===null||t.constructor===Object},yt=e=>e==null?``:pt(e)||Q(e)&&e.toString===_t?JSON.stringify(e,null,2):String(e);function bt(e,t=``){return e.reduce((e,n,r)=>r===0?e+n:e+t+n,``)}function xt(e){let t=e;return()=>++t}var St=e=>!ht(e)||pt(e);function Ct(e,t){if(St(e)||St(t))throw Error(`Invalid value`);let n=[{src:e,des:t}];for(;n.length;){let{src:e,des:t}=n.pop();Object.keys(e).forEach(r=>{r!==`__proto__`&&(ht(e[r])&&!ht(t[r])&&(t[r]=Array.isArray(e[r])?[]:at()),St(t[r])||St(e[r])?t[r]=e[r]:n.push({src:e[r],des:t[r]}))})}}function wt(e,t,n){return{line:e,column:t,offset:n}}function Tt(e,t,n){let r={start:e,end:t};return n!=null&&(r.source=n),r}var Et=/\{([0-9a-zA-Z]+)\}/g;function Dt(e,...t){return t.length===1&&At(t[0])&&(t=t[0]),(!t||!t.hasOwnProperty)&&(t={}),e.replace(Et,(e,n)=>t.hasOwnProperty(n)?t[n]:``)}var Ot=Object.assign,kt=e=>typeof e==`string`,At=e=>typeof e==`object`&&!!e;function jt(e,t=``){return e.reduce((e,n,r)=>r===0?e+n:e+t+n,``)}var Mt={USE_MODULO_SYNTAX:1,__EXTEND_POINT__:2},Nt={[Mt.USE_MODULO_SYNTAX]:`Use modulo before '{{0}}'.`};function Pt(e,t,...n){let r=Dt(Nt[e]||``,...n||[]),i={message:String(r),code:e};return t&&(i.location=t),i}var Ft={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16,__EXTEND_POINT__:17},It={[Ft.EXPECTED_TOKEN]:`Expected token: '{0}'`,[Ft.INVALID_TOKEN_IN_PLACEHOLDER]:`Invalid token in placeholder: '{0}'`,[Ft.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:`Unterminated single quote in placeholder`,[Ft.UNKNOWN_ESCAPE_SEQUENCE]:`Unknown escape sequence: \\{0}`,[Ft.INVALID_UNICODE_ESCAPE_SEQUENCE]:`Invalid unicode escape sequence: {0}`,[Ft.UNBALANCED_CLOSING_BRACE]:`Unbalanced closing brace`,[Ft.UNTERMINATED_CLOSING_BRACE]:`Unterminated closing brace`,[Ft.EMPTY_PLACEHOLDER]:`Empty placeholder`,[Ft.NOT_ALLOW_NEST_PLACEHOLDER]:`Not allowed nest placeholder`,[Ft.INVALID_LINKED_FORMAT]:`Invalid linked format`,[Ft.MUST_HAVE_MESSAGES_IN_PLURAL]:`Plural must have messages`,[Ft.UNEXPECTED_EMPTY_LINKED_MODIFIER]:`Unexpected empty linked modifier`,[Ft.UNEXPECTED_EMPTY_LINKED_KEY]:`Unexpected empty linked key`,[Ft.UNEXPECTED_LEXICAL_ANALYSIS]:`Unexpected lexical analysis in token: '{0}'`,[Ft.UNHANDLED_CODEGEN_NODE_TYPE]:`unhandled codegen node type: '{0}'`,[Ft.UNHANDLED_MINIFIER_NODE_TYPE]:`unhandled mimifier node type: '{0}'`};function Lt(e,t,n={}){let{domain:r,messages:i,args:a}=n,o=Dt((i||It)[e]||``,...a||[]),s=SyntaxError(String(o));return s.code=e,t&&(s.location=t),s.domain=r,s}function Rt(e){throw e}var zt=` `,Bt=`\r`,Vt=`
|
|
3
|
+
`,Ht=`\u2028`,Ut=`\u2029`;function Wt(e){let t=e,n=0,r=1,i=1,a=0,o=e=>t[e]===Bt&&t[e+1]===Vt,s=e=>t[e]===Vt,c=e=>t[e]===Ut,l=e=>t[e]===Ht,u=e=>o(e)||s(e)||c(e)||l(e),d=()=>n,f=()=>r,p=()=>i,m=()=>a,h=e=>o(e)||c(e)||l(e)?Vt:t[e],g=()=>h(n),_=()=>h(n+a);function v(){return a=0,u(n)&&(r++,i=0),o(n)&&n++,n++,i++,t[n]}function y(){return o(n+a)&&a++,a++,t[n+a]}function b(){n=0,r=1,i=1,a=0}function x(e=0){a=e}function S(){let e=n+a;for(;e!==n;)v();a=0}return{index:d,line:f,column:p,peekOffset:m,charAt:h,currentChar:g,currentPeek:_,next:v,peek:y,reset:b,resetPeek:x,skipToPeek:S}}var Gt=void 0,Kt=`'`,qt=`tokenizer`;function Jt(e,t={}){let n=t.location!==!1,r=Wt(e),i=()=>r.index(),a=()=>wt(r.line(),r.column(),r.index()),o=a(),s=i(),c={currentType:14,offset:s,startLoc:o,endLoc:o,lastType:14,lastOffset:s,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:``},l=()=>c,{onError:u}=t;function d(e,t,r,...i){let a=l();t.column+=r,t.offset+=r,u&&u(Lt(e,n?Tt(a.startLoc,t):null,{domain:qt,args:i}))}function f(e,t,r){e.endLoc=a(),e.currentType=t;let i={type:t};return n&&(i.loc=Tt(e.startLoc,e.endLoc)),r!=null&&(i.value=r),i}let p=e=>f(e,14);function m(e,t){return e.currentChar()===t?(e.next(),t):(d(Ft.EXPECTED_TOKEN,a(),0,t),``)}function h(e){let t=``;for(;e.currentPeek()===zt||e.currentPeek()===Vt;)t+=e.currentPeek(),e.peek();return t}function g(e){let t=h(e);return e.skipToPeek(),t}function _(e){if(e===Gt)return!1;let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t===95}function v(e){if(e===Gt)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57}function y(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function b(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=v(e.currentPeek()===`-`?e.peek():e.currentPeek());return e.resetPeek(),r}function x(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=e.currentPeek()===Kt;return e.resetPeek(),r}function S(e,t){let{currentType:n}=t;if(n!==8)return!1;h(e);let r=e.currentPeek()===`.`;return e.resetPeek(),r}function C(e,t){let{currentType:n}=t;if(n!==9)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function w(e,t){let{currentType:n}=t;if(!(n===8||n===12))return!1;h(e);let r=e.currentPeek()===`:`;return e.resetPeek(),r}function T(e,t){let{currentType:n}=t;if(n!==10)return!1;let r=()=>{let t=e.currentPeek();return t===`{`?_(e.peek()):t===`@`||t===`%`||t===`|`||t===`:`||t===`.`||t===zt||!t?!1:t===Vt?(e.peek(),r()):O(e,!1)},i=r();return e.resetPeek(),i}function E(e){h(e);let t=e.currentPeek()===`|`;return e.resetPeek(),t}function D(e){let t=h(e),n=e.currentPeek()===`%`&&e.peek()===`{`;return e.resetPeek(),{isModulo:n,hasSpace:t.length>0}}function O(e,t=!0){let n=(t=!1,r=``,i=!1)=>{let a=e.currentPeek();return a===`{`?r===`%`?!1:t:a===`@`||!a?r===`%`?!0:t:a===`%`?(e.peek(),n(t,`%`,!0)):a===`|`?r===`%`||i?!0:!(r===zt||r===Vt):a===zt?(e.peek(),n(!0,zt,i)):a===Vt?(e.peek(),n(!0,Vt,i)):!0},r=n();return t&&e.resetPeek(),r}function k(e,t){let n=e.currentChar();if(n!==Gt)return t(n)?(e.next(),n):null}function A(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36}function j(e){return k(e,A)}function M(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36||t===45}function N(e){return k(e,M)}function ee(e){let t=e.charCodeAt(0);return t>=48&&t<=57}function te(e){return k(e,ee)}function P(e){let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function ne(e){return k(e,P)}function F(e){let t=``,n=``;for(;t=te(e);)n+=t;return n}function re(e){g(e);let t=e.currentChar();return t!==`%`&&d(Ft.EXPECTED_TOKEN,a(),0,t),e.next(),`%`}function ie(e){let t=``;for(;;){let n=e.currentChar();if(n===`{`||n===`}`||n===`@`||n===`|`||!n)break;if(n===`%`)if(O(e))t+=n,e.next();else break;else if(n===zt||n===Vt)if(O(e))t+=n,e.next();else if(E(e))break;else t+=n,e.next();else t+=n,e.next()}return t}function ae(e){g(e);let t=``,n=``;for(;t=N(e);)n+=t;return e.currentChar()===Gt&&d(Ft.UNTERMINATED_CLOSING_BRACE,a(),0),n}function I(e){g(e);let t=``;return e.currentChar()===`-`?(e.next(),t+=`-${F(e)}`):t+=F(e),e.currentChar()===Gt&&d(Ft.UNTERMINATED_CLOSING_BRACE,a(),0),t}function oe(e){return e!==Kt&&e!==Vt}function L(e){g(e),m(e,`'`);let t=``,n=``;for(;t=k(e,oe);)t===`\\`?n+=R(e):n+=t;let r=e.currentChar();return r===Vt||r===Gt?(d(Ft.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),r===Vt&&(e.next(),m(e,`'`)),n):(m(e,`'`),n)}function R(e){let t=e.currentChar();switch(t){case`\\`:case`'`:return e.next(),`\\${t}`;case`u`:return z(e,t,4);case`U`:return z(e,t,6);default:return d(Ft.UNKNOWN_ESCAPE_SEQUENCE,a(),0,t),``}}function z(e,t,n){m(e,t);let r=``;for(let i=0;i<n;i++){let n=ne(e);if(!n){d(Ft.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),0,`\\${t}${r}${e.currentChar()}`);break}r+=n}return`\\${t}${r}`}function se(e){return e!==`{`&&e!==`}`&&e!==zt&&e!==Vt}function ce(e){g(e);let t=``,n=``;for(;t=k(e,se);)n+=t;return n}function le(e){let t=``,n=``;for(;t=j(e);)n+=t;return n}function ue(e){let t=n=>{let r=e.currentChar();return r===`{`||r===`%`||r===`@`||r===`|`||r===`(`||r===`)`||!r||r===zt?n:(n+=r,e.next(),t(n))};return t(``)}function B(e){g(e);let t=m(e,`|`);return g(e),t}function de(e,t){let n=null;switch(e.currentChar()){case`{`:return t.braceNest>=1&&d(Ft.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),e.next(),n=f(t,2,`{`),g(e),t.braceNest++,n;case`}`:return t.braceNest>0&&t.currentType===2&&d(Ft.EMPTY_PLACEHOLDER,a(),0),e.next(),n=f(t,3,`}`),t.braceNest--,t.braceNest>0&&g(e),t.inLinked&&t.braceNest===0&&(t.inLinked=!1),n;case`@`:return t.braceNest>0&&d(Ft.UNTERMINATED_CLOSING_BRACE,a(),0),n=fe(e,t)||p(t),t.braceNest=0,n;default:{let r=!0,i=!0,o=!0;if(E(e))return t.braceNest>0&&d(Ft.UNTERMINATED_CLOSING_BRACE,a(),0),n=f(t,1,B(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(t.currentType===5||t.currentType===6||t.currentType===7))return d(Ft.UNTERMINATED_CLOSING_BRACE,a(),0),t.braceNest=0,V(e,t);if(r=y(e,t))return n=f(t,5,ae(e)),g(e),n;if(i=b(e,t))return n=f(t,6,I(e)),g(e),n;if(o=x(e,t))return n=f(t,7,L(e)),g(e),n;if(!r&&!i&&!o)return n=f(t,13,ce(e)),d(Ft.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n.value),g(e),n;break}}return n}function fe(e,t){let{currentType:n}=t,r=null,i=e.currentChar();switch((n===8||n===9||n===12||n===10)&&(i===Vt||i===zt)&&d(Ft.INVALID_LINKED_FORMAT,a(),0),i){case`@`:return e.next(),r=f(t,8,`@`),t.inLinked=!0,r;case`.`:return g(e),e.next(),f(t,9,`.`);case`:`:return g(e),e.next(),f(t,10,`:`);default:return E(e)?(r=f(t,1,B(e)),t.braceNest=0,t.inLinked=!1,r):S(e,t)||w(e,t)?(g(e),fe(e,t)):C(e,t)?(g(e),f(t,12,le(e))):T(e,t)?(g(e),i===`{`?de(e,t)||r:f(t,11,ue(e))):(n===8&&d(Ft.INVALID_LINKED_FORMAT,a(),0),t.braceNest=0,t.inLinked=!1,V(e,t))}}function V(e,t){let n={type:14};if(t.braceNest>0)return de(e,t)||p(t);if(t.inLinked)return fe(e,t)||p(t);switch(e.currentChar()){case`{`:return de(e,t)||p(t);case`}`:return d(Ft.UNBALANCED_CLOSING_BRACE,a(),0),e.next(),f(t,3,`}`);case`@`:return fe(e,t)||p(t);default:{if(E(e))return n=f(t,1,B(e)),t.braceNest=0,t.inLinked=!1,n;let{isModulo:r,hasSpace:i}=D(e);if(r)return i?f(t,0,ie(e)):f(t,4,re(e));if(O(e))return f(t,0,ie(e));break}}return n}function pe(){let{currentType:e,offset:t,startLoc:n,endLoc:o}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=n,c.lastEndLoc=o,c.offset=i(),c.startLoc=a(),r.currentChar()===Gt?f(c,14):V(r,c)}return{nextToken:pe,currentOffset:i,currentPosition:a,context:l}}var Yt=`parser`,Xt=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function Zt(e,t,n){switch(e){case`\\\\`:return`\\`;case`\\'`:return`'`;default:{let e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):`�`}}}function Qt(e={}){let t=e.location!==!1,{onError:n,onWarn:r}=e;function i(e,r,i,a,...o){let s=e.currentPosition();s.offset+=a,s.column+=a,n&&n(Lt(r,t?Tt(i,s):null,{domain:Yt,args:o}))}function a(e,n,i,a,...o){let s=e.currentPosition();s.offset+=a,s.column+=a,r&&r(Pt(n,t?Tt(i,s):null,o))}function o(e,n,r){let i={type:e};return t&&(i.start=n,i.end=n,i.loc={start:r,end:r}),i}function s(e,n,r,i){i&&(e.type=i),t&&(e.end=n,e.loc&&(e.loc.end=r))}function c(e,t){let n=e.context(),r=o(3,n.offset,n.startLoc);return r.value=t,s(r,e.currentOffset(),e.currentPosition()),r}function l(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),i=o(5,n,r);return i.index=parseInt(t,10),e.nextToken(),s(i,e.currentOffset(),e.currentPosition()),i}function u(e,t,n){let{lastOffset:r,lastStartLoc:i}=e.context(),a=o(4,r,i);return a.key=t,n===!0&&(a.modulo=!0),e.nextToken(),s(a,e.currentOffset(),e.currentPosition()),a}function d(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),i=o(9,n,r);return i.value=t.replace(Xt,Zt),e.nextToken(),s(i,e.currentOffset(),e.currentPosition()),i}function f(e){let t=e.nextToken(),n=e.context(),{lastOffset:r,lastStartLoc:a}=n,c=o(8,r,a);return t.type===12?(t.value??i(e,Ft.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,$t(t)),c.value=t.value||``,s(c,e.currentOffset(),e.currentPosition()),{node:c}):(i(e,Ft.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,0),c.value=``,s(c,r,a),{nextConsumeToken:t,node:c})}function p(e,t){let n=e.context(),r=o(7,n.offset,n.startLoc);return r.value=t,s(r,e.currentOffset(),e.currentPosition()),r}function m(e){let t=e.context(),n=o(6,t.offset,t.startLoc),r=e.nextToken();if(r.type===9){let t=f(e);n.modifier=t.node,r=t.nextConsumeToken||e.nextToken()}switch(r.type!==10&&i(e,Ft.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,$t(r)),r=e.nextToken(),r.type===2&&(r=e.nextToken()),r.type){case 11:r.value??i(e,Ft.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,$t(r)),n.key=p(e,r.value||``);break;case 5:r.value??i(e,Ft.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,$t(r)),n.key=u(e,r.value||``);break;case 6:r.value??i(e,Ft.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,$t(r)),n.key=l(e,r.value||``);break;case 7:r.value??i(e,Ft.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,$t(r)),n.key=d(e,r.value||``);break;default:{i(e,Ft.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc,0);let a=e.context(),c=o(7,a.offset,a.startLoc);return c.value=``,s(c,a.offset,a.startLoc),n.key=c,s(n,a.offset,a.startLoc),{nextConsumeToken:r,node:n}}}return s(n,e.currentOffset(),e.currentPosition()),{node:n}}function h(e){let t=e.context(),n=o(2,t.currentType===1?e.currentOffset():t.offset,t.currentType===1?t.endLoc:t.startLoc);n.items=[];let r=null,f=null;do{let o=r||e.nextToken();switch(r=null,o.type){case 0:o.value??i(e,Ft.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,$t(o)),n.items.push(c(e,o.value||``));break;case 6:o.value??i(e,Ft.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,$t(o)),n.items.push(l(e,o.value||``));break;case 4:f=!0;break;case 5:o.value??i(e,Ft.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,$t(o)),n.items.push(u(e,o.value||``,!!f)),f&&=(a(e,Mt.USE_MODULO_SYNTAX,t.lastStartLoc,0,$t(o)),null);break;case 7:o.value??i(e,Ft.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,$t(o)),n.items.push(d(e,o.value||``));break;case 8:{let t=m(e);n.items.push(t.node),r=t.nextConsumeToken||null;break}}}while(t.currentType!==14&&t.currentType!==1);return s(n,t.currentType===1?t.lastOffset:e.currentOffset(),t.currentType===1?t.lastEndLoc:e.currentPosition()),n}function g(e,t,n,r){let a=e.context(),c=r.items.length===0,l=o(1,t,n);l.cases=[],l.cases.push(r);do{let t=h(e);c||=t.items.length===0,l.cases.push(t)}while(a.currentType!==14);return c&&i(e,Ft.MUST_HAVE_MESSAGES_IN_PLURAL,n,0),s(l,e.currentOffset(),e.currentPosition()),l}function _(e){let t=e.context(),{offset:n,startLoc:r}=t,i=h(e);return t.currentType===14?i:g(e,n,r,i)}function v(n){let r=Jt(n,Ot({},e)),a=r.context(),c=o(0,a.offset,a.startLoc);return t&&c.loc&&(c.loc.source=n),c.body=_(r),e.onCacheKey&&(c.cacheKey=e.onCacheKey(n)),a.currentType!==14&&i(r,Ft.UNEXPECTED_LEXICAL_ANALYSIS,a.lastStartLoc,0,n[a.offset]||``),s(c,r.currentOffset(),r.currentPosition()),c}return{parse:v}}function $t(e){if(e.type===14)return`EOF`;let t=(e.value||``).replace(/\r?\n/gu,`\\n`);return t.length>10?t.slice(0,9)+`…`:t}function en(e,t={}){let n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}function tn(e,t){for(let n=0;n<e.length;n++)nn(e[n],t)}function nn(e,t){switch(e.type){case 1:tn(e.cases,t),t.helper(`plural`);break;case 2:tn(e.items,t);break;case 6:nn(e.key,t),t.helper(`linked`),t.helper(`type`);break;case 5:t.helper(`interpolate`),t.helper(`list`);break;case 4:t.helper(`interpolate`),t.helper(`named`);break}}function rn(e,t={}){let n=en(e);n.helper(`normalize`),e.body&&nn(e.body,n);let r=n.context();e.helpers=Array.from(r.helpers)}function an(e){let t=e.body;return t.type===2?on(t):t.cases.forEach(e=>on(e)),e}function on(e){if(e.items.length===1){let t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{let t=[];for(let n=0;n<e.items.length;n++){let r=e.items[n];if(!(r.type===3||r.type===9)||r.value==null)break;t.push(r.value)}if(t.length===e.items.length){e.static=jt(t);for(let t=0;t<e.items.length;t++){let n=e.items[t];(n.type===3||n.type===9)&&delete n.value}}}}var sn=`minifier`;function cn(e){switch(e.t=e.type,e.type){case 0:{let t=e;cn(t.body),t.b=t.body,delete t.body;break}case 1:{let t=e,n=t.cases;for(let e=0;e<n.length;e++)cn(n[e]);t.c=n,delete t.cases;break}case 2:{let t=e,n=t.items;for(let e=0;e<n.length;e++)cn(n[e]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{let t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{let t=e;cn(t.key),t.k=t.key,delete t.key,t.modifier&&(cn(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{let t=e;t.i=t.index,delete t.index;break}case 4:{let t=e;t.k=t.key,delete t.key;break}default:throw Lt(Ft.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:sn,args:[e.type]})}delete e.type}var ln=`parser`;function un(e,t){let{sourceMap:n,filename:r,breakLineCode:i,needIndent:a}=t,o=t.location!==!1,s={filename:r,code:``,column:1,line:1,offset:0,map:void 0,breakLineCode:i,needIndent:a,indentLevel:0};o&&e.loc&&(s.source=e.loc.source);let c=()=>s;function l(e,t){s.code+=e}function u(e,t=!0){let n=t?i:``;l(a?n+` `.repeat(e):n)}function d(e=!0){let t=++s.indentLevel;e&&u(t)}function f(e=!0){let t=--s.indentLevel;e&&u(t)}function p(){u(s.indentLevel)}return{context:c,push:l,indent:d,deindent:f,newline:p,helper:e=>`_${e}`,needIndent:()=>s.needIndent}}function dn(e,t){let{helper:n}=e;e.push(`${n(`linked`)}(`),hn(e,t.key),t.modifier?(e.push(`, `),hn(e,t.modifier),e.push(`, _type`)):e.push(`, undefined, _type`),e.push(`)`)}function fn(e,t){let{helper:n,needIndent:r}=e;e.push(`${n(`normalize`)}([`),e.indent(r());let i=t.items.length;for(let n=0;n<i&&(hn(e,t.items[n]),n!==i-1);n++)e.push(`, `);e.deindent(r()),e.push(`])`)}function pn(e,t){let{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n(`plural`)}([`),e.indent(r());let i=t.cases.length;for(let n=0;n<i&&(hn(e,t.cases[n]),n!==i-1);n++)e.push(`, `);e.deindent(r()),e.push(`])`)}}function mn(e,t){t.body?hn(e,t.body):e.push(`null`)}function hn(e,t){let{helper:n}=e;switch(t.type){case 0:mn(e,t);break;case 1:pn(e,t);break;case 2:fn(e,t);break;case 6:dn(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n(`interpolate`)}(${n(`list`)}(${t.index}))`,t);break;case 4:e.push(`${n(`interpolate`)}(${n(`named`)}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break;default:throw Lt(Ft.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:ln,args:[t.type]})}}var gn=(e,t={})=>{let n=kt(t.mode)?t.mode:`normal`,r=kt(t.filename)?t.filename:`message.intl`,i=!!t.sourceMap,a=t.breakLineCode==null?n===`arrow`?`;`:`
|
|
4
|
+
`:t.breakLineCode,o=t.needIndent?t.needIndent:n!==`arrow`,s=e.helpers||[],c=un(e,{mode:n,filename:r,sourceMap:i,breakLineCode:a,needIndent:o});c.push(n===`normal`?`function __msg__ (ctx) {`:`(ctx) => {`),c.indent(o),s.length>0&&(c.push(`const { ${jt(s.map(e=>`${e}: _${e}`),`, `)} } = ctx`),c.newline()),c.push(`return `),hn(c,e),c.deindent(o),c.push(`}`),delete e.helpers;let{code:l,map:u}=c.context();return{ast:e,code:l,map:u?u.toJSON():void 0}};function _n(e,t={}){let n=Ot({},t),r=!!n.jit,i=!!n.minify,a=n.optimize==null?!0:n.optimize,o=Qt(n).parse(e);return r?(a&&an(o),i&&cn(o),{ast:o,code:``}):(rn(o,n),gn(o,n))}function vn(){typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(st().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_JIT_COMPILATION__!=`boolean`&&(st().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(st().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function yn(e){return ht(e)&&kn(e)===0&&(ft(e,`b`)||ft(e,`body`))}var bn=[`b`,`body`];function xn(e){return In(e,bn)}var Sn=[`c`,`cases`];function Cn(e){return In(e,Sn,[])}var wn=[`s`,`static`];function Tn(e){return In(e,wn)}var En=[`i`,`items`];function Dn(e){return In(e,En,[])}var On=[`t`,`type`];function kn(e){return In(e,On)}var An=[`v`,`value`];function jn(e,t){let n=In(e,An);if(n!=null)return n;throw Rn(t)}var Mn=[`m`,`modifier`];function Nn(e){return In(e,Mn)}var Pn=[`k`,`key`];function Fn(e){let t=In(e,Pn);if(t)return t;throw Rn(6)}function In(e,t,n){for(let n=0;n<t.length;n++){let r=t[n];if(ft(e,r)&&e[r]!=null)return e[r]}return n}var Ln=[...bn,...Sn,...wn,...En,...Pn,...Mn,...An,...On];function Rn(e){return Error(`unhandled node type: ${e}`)}var zn=[];zn[0]={w:[0],i:[3,0],"[":[4],o:[7]},zn[1]={w:[1],".":[2],"[":[4],o:[7]},zn[2]={w:[2],i:[3,0],0:[3,0]},zn[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},zn[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},zn[5]={"'":[4,0],o:8,l:[5,0]},zn[6]={'"':[4,0],o:8,l:[6,0]};var Bn=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Vn(e){return Bn.test(e)}function Hn(e){let t=e.charCodeAt(0);return t===e.charCodeAt(e.length-1)&&(t===34||t===39)?e.slice(1,-1):e}function Un(e){if(e==null)return`o`;switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return`i`;case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return`w`}return`i`}function Wn(e){let t=e.trim();return e.charAt(0)===`0`&&isNaN(parseInt(e))?!1:Vn(t)?Hn(t):`*`+t}function Gn(e){let t=[],n=-1,r=0,i=0,a,o,s,c,l,u,d,f=[];f[0]=()=>{o===void 0?o=s:o+=s},f[1]=()=>{o!==void 0&&(t.push(o),o=void 0)},f[2]=()=>{f[0](),i++},f[3]=()=>{if(i>0)i--,r=4,f[0]();else{if(i=0,o===void 0||(o=Wn(o),o===!1))return!1;f[1]()}};function p(){let t=e[n+1];if(r===5&&t===`'`||r===6&&t===`"`)return n++,s=`\\`+t,f[0](),!0}for(;r!==null;)if(n++,a=e[n],!(a===`\\`&&p())){if(c=Un(a),d=zn[r],l=d[c]||d.l||8,l===8||(r=l[0],l[1]!==void 0&&(u=f[l[1]],u&&(s=a,u()===!1))))return;if(r===7)return t}}var Kn=new Map;function qn(e,t){return ht(e)?e[t]:null}function Jn(e,t){if(!ht(e))return null;let n=Kn.get(t);if(n||(n=Gn(t),n&&Kn.set(t,n)),!n)return null;let r=n.length,i=e,a=0;for(;a<r;){let e=n[a];if(Ln.includes(e)&&yn(i))return null;let t=i[e];if(t===void 0||mt(i))return null;i=t,a++}return i}var Yn=e=>e,Xn=e=>``,Zn=`text`,Qn=e=>e.length===0?``:bt(e),$n=yt;function er(e,t){return e=Math.abs(e),t===2?e?+(e>1):1:e?Math.min(e,2):0}function tr(e){let t=et(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(et(e.named.count)||et(e.named.n))?et(e.named.count)?e.named.count:et(e.named.n)?e.named.n:t:t}function nr(e,t){t.count||=e,t.n||=e}function rr(e={}){let t=e.locale,n=tr(e),r=ht(e.pluralRules)&&X(t)&&mt(e.pluralRules[t])?e.pluralRules[t]:er,i=ht(e.pluralRules)&&X(t)&&mt(e.pluralRules[t])?er:void 0,a=e=>e[r(n,e.length,i)],o=e.list||[],s=e=>o[e],c=e.named||at();et(e.pluralIndex)&&nr(n,c);let l=e=>c[e];function u(t){return(mt(e.messages)?e.messages(t):ht(e.messages)?e.messages[t]:!1)||(e.parent?e.parent.message(t):Xn)}let d=t=>e.modifiers?e.modifiers[t]:Yn,f=Q(e.processor)&&mt(e.processor.normalize)?e.processor.normalize:Qn,p=Q(e.processor)&&mt(e.processor.interpolate)?e.processor.interpolate:$n,m={list:s,named:l,plural:a,linked:(e,...t)=>{let[n,r]=t,i=`text`,a=``;t.length===1?ht(n)?(a=n.modifier||a,i=n.type||i):X(n)&&(a=n||a):t.length===2&&(X(n)&&(a=n||a),X(r)&&(i=r||i));let o=u(e)(m),s=i===`vnode`&&pt(o)&&a?o[0]:o;return a?d(a)(s,i):s},message:u,type:Q(e.processor)&&X(e.processor.type)?e.processor.type:Zn,interpolate:p,normalize:f,values:rt(at(),o,c)};return m}var ir=null;function ar(e){ir=e}function or(e,t,n){ir&&ir.emit(`i18n:init`,{timestamp:Date.now(),i18n:e,version:t,meta:n})}var sr=cr(`function:translate`);function cr(e){return t=>ir&&ir.emit(e,t)}var lr=Mt.__EXTEND_POINT__,ur=xt(lr),dr={NOT_FOUND_KEY:lr,FALLBACK_TO_TRANSLATE:ur(),CANNOT_FORMAT_NUMBER:ur(),FALLBACK_TO_NUMBER_FORMAT:ur(),CANNOT_FORMAT_DATE:ur(),FALLBACK_TO_DATE_FORMAT:ur(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:ur(),__EXTEND_POINT__:ur()};dr.NOT_FOUND_KEY,dr.FALLBACK_TO_TRANSLATE,dr.CANNOT_FORMAT_NUMBER,dr.FALLBACK_TO_NUMBER_FORMAT,dr.CANNOT_FORMAT_DATE,dr.FALLBACK_TO_DATE_FORMAT,dr.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER;var fr=Ft.__EXTEND_POINT__,pr=xt(fr),mr={INVALID_ARGUMENT:fr,INVALID_DATE_ARGUMENT:pr(),INVALID_ISO_DATE_ARGUMENT:pr(),NOT_SUPPORT_NON_STRING_MESSAGE:pr(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:pr(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:pr(),NOT_SUPPORT_LOCALE_TYPE:pr(),__EXTEND_POINT__:pr()};function hr(e){return Lt(e,null,void 0)}mr.INVALID_ARGUMENT,mr.INVALID_DATE_ARGUMENT,mr.INVALID_ISO_DATE_ARGUMENT,mr.NOT_SUPPORT_NON_STRING_MESSAGE,mr.NOT_SUPPORT_LOCALE_PROMISE_VALUE,mr.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION,mr.NOT_SUPPORT_LOCALE_TYPE;function gr(e,t){return t.locale==null?vr(e.locale):vr(t.locale)}var _r;function vr(e){if(X(e))return e;if(mt(e)){if(e.resolvedOnce&&_r!=null)return _r;if(e.constructor.name===`Function`){let t=e();if(gt(t))throw hr(mr.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return _r=t}else throw hr(mr.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw hr(mr.NOT_SUPPORT_LOCALE_TYPE)}function yr(e,t,n){return[...new Set([n,...pt(t)?t:ht(t)?Object.keys(t):X(t)?[t]:[n]])]}function br(e,t,n){let r=X(n)?n:Tr,i=e;i.__localeChainCache||=new Map;let a=i.__localeChainCache.get(r);if(!a){a=[];let e=[n];for(;pt(e);)e=xr(a,e,t);let o=pt(t)||!Q(t)?t:t.default?t.default:null;e=X(o)?[o]:o,pt(e)&&xr(a,e,!1),i.__localeChainCache.set(r,a)}return a}function xr(e,t,n){let r=!0;for(let i=0;i<t.length&&Z(r);i++){let a=t[i];X(a)&&(r=Sr(e,t[i],n))}return r}function Sr(e,t,n){let r,i=t.split(`-`);do r=Cr(e,i.join(`-`),n),i.splice(-1,1);while(i.length&&r===!0);return r}function Cr(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!==`!`;let i=t.replace(/!/g,``);e.push(i),(pt(n)||Q(n))&&n[i]&&(r=n[i])}return r}var wr=`9.14.5`,Tr=`en-US`,Er=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function Dr(){return{upper:(e,t)=>t===`text`&&X(e)?e.toUpperCase():t===`vnode`&&ht(e)&&`__v_isVNode`in e?e.children.toUpperCase():e,lower:(e,t)=>t===`text`&&X(e)?e.toLowerCase():t===`vnode`&&ht(e)&&`__v_isVNode`in e?e.children.toLowerCase():e,capitalize:(e,t)=>t===`text`&&X(e)?Er(e):t===`vnode`&&ht(e)&&`__v_isVNode`in e?Er(e.children):e}}var Or;function kr(e){Or=e}var Ar;function jr(e){Ar=e}var Mr;function Nr(e){Mr=e}var Pr=null,Fr=()=>Pr,Ir=null,Lr=e=>{Ir=e},Rr=()=>Ir,zr=0;function Br(e={}){let t=mt(e.onWarn)?e.onWarn:Xe,n=X(e.version)?e.version:wr,r=X(e.locale)||mt(e.locale)?e.locale:Tr,i=mt(r)?Tr:r,a=pt(e.fallbackLocale)||Q(e.fallbackLocale)||X(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,o=Q(e.messages)?e.messages:Vr(i),s=Q(e.datetimeFormats)?e.datetimeFormats:Vr(i),c=Q(e.numberFormats)?e.numberFormats:Vr(i),l=rt(at(),e.modifiers,Dr()),u=e.pluralRules||at(),d=mt(e.missing)?e.missing:null,f=Z(e.missingWarn)||nt(e.missingWarn)?e.missingWarn:!0,p=Z(e.fallbackWarn)||nt(e.fallbackWarn)?e.fallbackWarn:!0,m=!!e.fallbackFormat,h=!!e.unresolving,g=mt(e.postTranslation)?e.postTranslation:null,_=Q(e.processor)?e.processor:null,v=Z(e.warnHtmlMessage)?e.warnHtmlMessage:!0,y=!!e.escapeParameter,b=mt(e.messageCompiler)?e.messageCompiler:Or,x=mt(e.messageResolver)?e.messageResolver:Ar||qn,S=mt(e.localeFallbacker)?e.localeFallbacker:Mr||yr,C=ht(e.fallbackContext)?e.fallbackContext:void 0,w=e,T=ht(w.__datetimeFormatters)?w.__datetimeFormatters:new Map,E=ht(w.__numberFormatters)?w.__numberFormatters:new Map,D=ht(w.__meta)?w.__meta:{};zr++;let O={version:n,cid:zr,locale:r,fallbackLocale:a,messages:o,modifiers:l,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:h,postTranslation:g,processor:_,warnHtmlMessage:v,escapeParameter:y,messageCompiler:b,messageResolver:x,localeFallbacker:S,fallbackContext:C,onWarn:t,__meta:D};return O.datetimeFormats=s,O.numberFormats=c,O.__datetimeFormatters=T,O.__numberFormatters=E,__INTLIFY_PROD_DEVTOOLS__&&or(O,n,D),O}var Vr=e=>({[e]:at()});function Hr(e,t,n,r,i){let{missing:a,onWarn:o}=e;if(a!==null){let r=a(e,n,t,i);return X(r)?r:t}else return t}function Ur(e,t,n){let r=e;r.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function Wr(e,t){return e===t?!1:e.split(`-`)[0]===t.split(`-`)[0]}function Gr(e,t){let n=t.indexOf(e);if(n===-1)return!1;for(let r=n+1;r<t.length;r++)if(Wr(e,t[r]))return!0;return!1}function Kr(e){return t=>qr(t,e)}function qr(e,t){let n=xn(t);if(n==null)throw Rn(0);if(kn(n)===1){let t=Cn(n);return e.plural(t.reduce((t,n)=>[...t,Jr(e,n)],[]))}else return Jr(e,n)}function Jr(e,t){let n=Tn(t);if(n!=null)return e.type===`text`?n:e.normalize([n]);{let n=Dn(t).reduce((t,n)=>[...t,Yr(e,n)],[]);return e.normalize(n)}}function Yr(e,t){let n=kn(t);switch(n){case 3:return jn(t,n);case 9:return jn(t,n);case 4:{let r=t;if(ft(r,`k`)&&r.k)return e.interpolate(e.named(r.k));if(ft(r,`key`)&&r.key)return e.interpolate(e.named(r.key));throw Rn(n)}case 5:{let r=t;if(ft(r,`i`)&&et(r.i))return e.interpolate(e.list(r.i));if(ft(r,`index`)&&et(r.index))return e.interpolate(e.list(r.index));throw Rn(n)}case 6:{let n=t,r=Nn(n),i=Fn(n);return e.linked(Yr(e,i),r?Yr(e,r):void 0,e.type)}case 7:return jn(t,n);case 8:return jn(t,n);default:throw Error(`unhandled node on format message part: ${n}`)}}var Xr=e=>e,Zr=at();function Qr(e,t={}){let n=!1,r=t.onError||Rt;return t.onError=e=>{n=!0,r(e)},{..._n(e,t),detectError:n}}var $r=(e,t)=>{if(!X(e))throw hr(mr.NOT_SUPPORT_NON_STRING_MESSAGE);{Z(t.warnHtmlMessage)&&t.warnHtmlMessage;let n=(t.onCacheKey||Xr)(e),r=Zr[n];if(r)return r;let{code:i,detectError:a}=Qr(e,t),o=Function(`return ${i}`)();return a?o:Zr[n]=o}};function ei(e,t){if(__INTLIFY_JIT_COMPILATION__&&!__INTLIFY_DROP_MESSAGE_COMPILER__&&X(e)){Z(t.warnHtmlMessage)&&t.warnHtmlMessage;let n=(t.onCacheKey||Xr)(e),r=Zr[n];if(r)return r;let{ast:i,detectError:a}=Qr(e,{...t,location:!1,jit:!0}),o=Kr(i);return a?o:Zr[n]=o}else{let t=e.cacheKey;return t?Zr[t]||(Zr[t]=Kr(e)):Kr(e)}}var ti=()=>``,ni=e=>mt(e);function ri(e,...t){let{fallbackFormat:n,postTranslation:r,unresolving:i,messageCompiler:a,fallbackLocale:o,messages:s}=e,[c,l]=ci(...t),u=Z(l.missingWarn)?l.missingWarn:e.missingWarn,d=Z(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=Z(l.escapeParameter)?l.escapeParameter:e.escapeParameter,p=!!l.resolvedMessage,m=X(l.default)||Z(l.default)?Z(l.default)?a?c:()=>c:l.default:n?a?c:()=>c:``,h=n||m!==``,g=gr(e,l);f&&ii(l);let[_,v,y]=p?[c,g,s[g]||at()]:ai(e,c,g,o,d,u),b=_,x=c;if(!p&&!(X(b)||yn(b)||ni(b))&&h&&(b=m,x=b),!p&&(!(X(b)||yn(b)||ni(b))||!X(v)))return i?-1:c;let S=!1,C=ni(b)?b:oi(e,c,v,b,x,()=>{S=!0});if(S)return b;let w=si(e,C,rr(ui(e,v,y,l))),T=r?r(w,c):w;if(f&&X(T)&&(T=ut(T)),__INTLIFY_PROD_DEVTOOLS__){let t={timestamp:Date.now(),key:X(c)?c:ni(b)?b.key:``,locale:v||(ni(b)?b.locale:``),format:X(b)?b:ni(b)?b.source:``,message:T};t.meta=rt({},e.__meta,Fr()||{}),sr(t)}return T}function ii(e){pt(e.list)?e.list=e.list.map(e=>X(e)?ct(e):e):ht(e.named)&&Object.keys(e.named).forEach(t=>{X(e.named[t])&&(e.named[t]=ct(e.named[t]))})}function ai(e,t,n,r,i,a){let{messages:o,onWarn:s,messageResolver:c,localeFallbacker:l}=e,u=l(e,r,n),d=at(),f,p=null;for(let n=0;n<u.length&&(f=u[n],d=o[f]||at(),(p=c(d,t))===null&&(p=d[t]),!(X(p)||yn(p)||ni(p)));n++)if(!Gr(f,u)){let n=Hr(e,t,f,a,`translate`);n!==t&&(p=n)}return[p,f,d]}function oi(e,t,n,r,i,a){let{messageCompiler:o,warnHtmlMessage:s}=e;if(ni(r)){let e=r;return e.locale=e.locale||n,e.key=e.key||t,e}if(o==null){let e=(()=>r);return e.locale=n,e.key=t,e}let c=o(r,li(e,n,i,r,s,a));return c.locale=n,c.key=t,c.source=r,c}function si(e,t,n){return t(n)}function ci(...e){let[t,n,r]=e,i=at();if(!X(t)&&!et(t)&&!ni(t)&&!yn(t))throw hr(mr.INVALID_ARGUMENT);let a=et(t)?String(t):(ni(t),t);return et(n)?i.plural=n:X(n)?i.default=n:Q(n)&&!Y(n)?i.named=n:pt(n)&&(i.list=n),et(r)?i.plural=r:X(r)?i.default=r:Q(r)&&rt(i,r),[a,i]}function li(e,t,n,r,i,a){return{locale:t,key:n,warnHtmlMessage:i,onError:e=>{throw a&&a(e),e},onCacheKey:e=>Qe(t,n,e)}}function ui(e,t,n,r){let{modifiers:i,pluralRules:a,messageResolver:o,fallbackLocale:s,fallbackWarn:c,missingWarn:l,fallbackContext:u}=e,d={locale:t,modifiers:i,pluralRules:a,messages:r=>{let i=o(n,r);if(i==null&&u){let[,,e]=ai(u,r,t,s,c,l);i=o(e,r)}if(X(i)||yn(i)){let n=!1,a=oi(e,r,t,i,r,()=>{n=!0});return n?ti:a}else if(ni(i))return i;else return ti}};return e.processor&&(d.processor=e.processor),r.list&&(d.list=r.list),r.named&&(d.named=r.named),et(r.plural)&&(d.pluralIndex=r.plural),d}var di=typeof Intl<`u`;di&&Intl.DateTimeFormat,di&&Intl.NumberFormat;function fi(e,...t){let{datetimeFormats:n,unresolving:r,fallbackLocale:i,onWarn:a,localeFallbacker:o}=e,{__datetimeFormatters:s}=e,[c,l,u,d]=mi(...t),f=Z(u.missingWarn)?u.missingWarn:e.missingWarn;Z(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;let p=!!u.part,m=gr(e,u),h=o(e,i,m);if(!X(c)||c===``)return new Intl.DateTimeFormat(m,d).format(l);let g={},_,v=null;for(let t=0;t<h.length&&(_=h[t],g=n[_]||{},v=g[c],!Q(v));t++)Hr(e,c,_,f,`datetime format`);if(!Q(v)||!X(_))return r?-1:c;let y=`${_}__${c}`;Y(d)||(y=`${y}__${JSON.stringify(d)}`);let b=s.get(y);return b||(b=new Intl.DateTimeFormat(_,rt({},v,d)),s.set(y,b)),p?b.formatToParts(l):b.format(l)}var pi=[`localeMatcher`,`weekday`,`era`,`year`,`month`,`day`,`hour`,`minute`,`second`,`timeZoneName`,`formatMatcher`,`hour12`,`timeZone`,`dateStyle`,`timeStyle`,`calendar`,`dayPeriod`,`numberingSystem`,`hourCycle`,`fractionalSecondDigits`];function mi(...e){let[t,n,r,i]=e,a=at(),o=at(),s;if(X(t)){let e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw hr(mr.INVALID_ISO_DATE_ARGUMENT);let n=e[3]?e[3].trim().startsWith(`T`)?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();s=new Date(n);try{s.toISOString()}catch{throw hr(mr.INVALID_ISO_DATE_ARGUMENT)}}else if(tt(t)){if(isNaN(t.getTime()))throw hr(mr.INVALID_DATE_ARGUMENT);s=t}else if(et(t))s=t;else throw hr(mr.INVALID_ARGUMENT);return X(n)?a.key=n:Q(n)&&Object.keys(n).forEach(e=>{pi.includes(e)?o[e]=n[e]:a[e]=n[e]}),X(r)?a.locale=r:Q(r)&&(o=r),Q(i)&&(o=i),[a.key||``,s,a,o]}function hi(e,t,n){let r=e;for(let e in n){let n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function gi(e,...t){let{numberFormats:n,unresolving:r,fallbackLocale:i,onWarn:a,localeFallbacker:o}=e,{__numberFormatters:s}=e,[c,l,u,d]=vi(...t),f=Z(u.missingWarn)?u.missingWarn:e.missingWarn;Z(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;let p=!!u.part,m=gr(e,u),h=o(e,i,m);if(!X(c)||c===``)return new Intl.NumberFormat(m,d).format(l);let g={},_,v=null;for(let t=0;t<h.length&&(_=h[t],g=n[_]||{},v=g[c],!Q(v));t++)Hr(e,c,_,f,`number format`);if(!Q(v)||!X(_))return r?-1:c;let y=`${_}__${c}`;Y(d)||(y=`${y}__${JSON.stringify(d)}`);let b=s.get(y);return b||(b=new Intl.NumberFormat(_,rt({},v,d)),s.set(y,b)),p?b.formatToParts(l):b.format(l)}var _i=[`localeMatcher`,`style`,`currency`,`currencyDisplay`,`currencySign`,`useGrouping`,`minimumIntegerDigits`,`minimumFractionDigits`,`maximumFractionDigits`,`minimumSignificantDigits`,`maximumSignificantDigits`,`compactDisplay`,`notation`,`signDisplay`,`unit`,`unitDisplay`,`roundingMode`,`roundingPriority`,`roundingIncrement`,`trailingZeroDisplay`];function vi(...e){let[t,n,r,i]=e,a=at(),o=at();if(!et(t))throw hr(mr.INVALID_ARGUMENT);let s=t;return X(n)?a.key=n:Q(n)&&Object.keys(n).forEach(e=>{_i.includes(e)?o[e]=n[e]:a[e]=n[e]}),X(r)?a.locale=r:Q(r)&&(o=r),Q(i)&&(o=i),[a.key||``,s,a,o]}function yi(e,t,n){let r=e;for(let e in n){let n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}vn();var bi=`9.14.5`;function xi(){typeof __VUE_I18N_FULL_INSTALL__!=`boolean`&&(st().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!=`boolean`&&(st().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!=`boolean`&&(st().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(st().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(st().__INTLIFY_PROD_DEVTOOLS__=!1)}var Si=dr.__EXTEND_POINT__,Ci=xt(Si),wi={FALLBACK_TO_ROOT:Si,NOT_SUPPORTED_PRESERVE:Ci(),NOT_SUPPORTED_FORMATTER:Ci(),NOT_SUPPORTED_PRESERVE_DIRECTIVE:Ci(),NOT_SUPPORTED_GET_CHOICE_INDEX:Ci(),COMPONENT_NAME_LEGACY_COMPATIBLE:Ci(),NOT_FOUND_PARENT_SCOPE:Ci(),IGNORE_OBJ_FLATTEN:Ci(),NOTICE_DROP_ALLOW_COMPOSITION:Ci(),NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG:Ci()};wi.FALLBACK_TO_ROOT,wi.NOT_SUPPORTED_PRESERVE,wi.NOT_SUPPORTED_FORMATTER,wi.NOT_SUPPORTED_PRESERVE_DIRECTIVE,wi.NOT_SUPPORTED_GET_CHOICE_INDEX,wi.COMPONENT_NAME_LEGACY_COMPATIBLE,wi.NOT_FOUND_PARENT_SCOPE,wi.IGNORE_OBJ_FLATTEN,wi.NOTICE_DROP_ALLOW_COMPOSITION,wi.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG;var Ti=mr.__EXTEND_POINT__,Ei=xt(Ti),Di={UNEXPECTED_RETURN_TYPE:Ti,INVALID_ARGUMENT:Ei(),MUST_BE_CALL_SETUP_TOP:Ei(),NOT_INSTALLED:Ei(),NOT_AVAILABLE_IN_LEGACY_MODE:Ei(),REQUIRED_VALUE:Ei(),INVALID_VALUE:Ei(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:Ei(),NOT_INSTALLED_WITH_PROVIDE:Ei(),UNEXPECTED_ERROR:Ei(),NOT_COMPATIBLE_LEGACY_VUE_I18N:Ei(),BRIDGE_SUPPORT_VUE_2_ONLY:Ei(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:Ei(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:Ei(),__EXTEND_POINT__:Ei()};function Oi(e,...t){return Lt(e,null,void 0)}Di.UNEXPECTED_RETURN_TYPE,Di.INVALID_ARGUMENT,Di.MUST_BE_CALL_SETUP_TOP,Di.NOT_INSTALLED,Di.UNEXPECTED_ERROR,Di.NOT_AVAILABLE_IN_LEGACY_MODE,Di.REQUIRED_VALUE,Di.INVALID_VALUE,Di.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN,Di.NOT_INSTALLED_WITH_PROVIDE,Di.NOT_COMPATIBLE_LEGACY_VUE_I18N,Di.BRIDGE_SUPPORT_VUE_2_ONLY,Di.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION,Di.NOT_AVAILABLE_COMPOSITION_IN_LEGACY;var ki=Ze(`__translateVNode`),Ai=Ze(`__datetimeParts`),ji=Ze(`__numberParts`),Mi=Ze(`__setPluralRules`);Ze(`__intlifyMeta`);var Ni=Ze(`__injectWithOption`),Pi=Ze(`__dispose`);function Fi(e){if(!ht(e)||yn(e))return e;for(let t in e)if(ft(e,t))if(!t.includes(`.`))ht(e[t])&&Fi(e[t]);else{let n=t.split(`.`),r=n.length-1,i=e,a=!1;for(let e=0;e<r;e++){if(n[e]===`__proto__`)throw Error(`unsafe key: ${n[e]}`);if(n[e]in i||(i[n[e]]=at()),!ht(i[n[e]])){a=!0;break}i=i[n[e]]}if(a||(yn(i)?Ln.includes(n[r])||delete e[t]:(i[n[r]]=e[t],delete e[t])),!yn(i)){let e=i[n[r]];ht(e)&&Fi(e)}}return e}function Ii(e,t){let{messages:n,__i18n:r,messageResolver:i,flatJson:a}=t,o=Q(n)?n:pt(r)?at():{[e]:at()};if(pt(r)&&r.forEach(e=>{if(`locale`in e&&`resource`in e){let{locale:t,resource:n}=e;t?(o[t]=o[t]||at(),Ct(n,o[t])):Ct(n,o)}else X(e)&&Ct(JSON.parse(e),o)}),i==null&&a)for(let e in o)ft(o,e)&&Fi(o[e]);return o}function Li(e){return e.type}function Ri(e,t,n){let r=ht(t.messages)?t.messages:at();`__i18nGlobal`in n&&(r=Ii(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));let i=Object.keys(r);if(i.length&&i.forEach(t=>{e.mergeLocaleMessage(t,r[t])}),ht(t.datetimeFormats)){let n=Object.keys(t.datetimeFormats);n.length&&n.forEach(n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])})}if(ht(t.numberFormats)){let n=Object.keys(t.numberFormats);n.length&&n.forEach(n=>{e.mergeNumberFormat(n,t.numberFormats[n])})}}function zi(e){return o(ue,null,e,0)}var Bi=()=>[],Vi=()=>!1,Hi=0;function Ui(e){return((t,n,r,i)=>e(n,r,c()||void 0,i))}function Wi(e={},t){let{__root:n,__injectWithOption:r}=e,i=n===void 0,a=e.flatJson,o=J?V:M,s=!!e.translateExistCompatible,c=Z(e.inheritLocale)?e.inheritLocale:!0,l=o(n&&c?n.locale.value:X(e.locale)?e.locale:Tr),u=o(n&&c?n.fallbackLocale.value:X(e.fallbackLocale)||pt(e.fallbackLocale)||Q(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),d=o(Ii(l.value,e)),f=o(Q(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),m=o(Q(e.numberFormats)?e.numberFormats:{[l.value]:{}}),h=n?n.missingWarn:Z(e.missingWarn)||nt(e.missingWarn)?e.missingWarn:!0,g=n?n.fallbackWarn:Z(e.fallbackWarn)||nt(e.fallbackWarn)?e.fallbackWarn:!0,_=n?n.fallbackRoot:Z(e.fallbackRoot)?e.fallbackRoot:!0,v=!!e.fallbackFormat,y=mt(e.missing)?e.missing:null,b=mt(e.missing)?Ui(e.missing):null,x=mt(e.postTranslation)?e.postTranslation:null,S=n?n.warnHtmlMessage:Z(e.warnHtmlMessage)?e.warnHtmlMessage:!0,C=!!e.escapeParameter,w=n?n.modifiers:Q(e.modifiers)?e.modifiers:{},T=e.pluralRules||n&&n.pluralRules,E;E=(()=>{i&&Lr(null);let t={version:bi,locale:l.value,fallbackLocale:u.value,messages:d.value,modifiers:w,pluralRules:T,missing:b===null?void 0:b,missingWarn:h,fallbackWarn:g,fallbackFormat:v,unresolving:!0,postTranslation:x===null?void 0:x,warnHtmlMessage:S,escapeParameter:C,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:`vue`}};t.datetimeFormats=f.value,t.numberFormats=m.value,t.__datetimeFormatters=Q(E)?E.__datetimeFormatters:void 0,t.__numberFormatters=Q(E)?E.__numberFormatters:void 0;let n=Br(t);return i&&Lr(n),n})(),Ur(E,l.value,u.value);function D(){return[l.value,u.value,d.value,f.value,m.value]}let O=R({get:()=>l.value,set:e=>{l.value=e,E.locale=l.value}}),k=R({get:()=>u.value,set:e=>{u.value=e,E.fallbackLocale=u.value,Ur(E,l.value,e)}}),A=R(()=>d.value),j=R(()=>f.value),N=R(()=>m.value);function ee(){return mt(x)?x:null}function te(e){x=e,E.postTranslation=e}function P(){return y}function ne(e){e!==null&&(b=Ui(e)),y=e,E.missing=b}let F=(e,t,r,a,o,s)=>{D();let c;try{__INTLIFY_PROD_DEVTOOLS__,i||(E.fallbackContext=n?Rr():void 0),c=e(E)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(E.fallbackContext=void 0)}if(r!==`translate exists`&&et(c)&&c===-1||r===`translate exists`&&!c){let[e,r]=t();return n&&_?a(n):o(e)}else if(s(c))return c;else throw Oi(Di.UNEXPECTED_RETURN_TYPE)};function re(...e){return F(t=>Reflect.apply(ri,null,[t,...e]),()=>ci(...e),`translate`,t=>Reflect.apply(t.t,t,[...e]),e=>e,e=>X(e))}function ie(...e){let[t,n,r]=e;if(r&&!ht(r))throw Oi(Di.INVALID_ARGUMENT);return re(t,n,rt({resolvedMessage:!0},r||{}))}function ae(...e){return F(t=>Reflect.apply(fi,null,[t,...e]),()=>mi(...e),`datetime format`,t=>Reflect.apply(t.d,t,[...e]),()=>``,e=>X(e))}function I(...e){return F(t=>Reflect.apply(gi,null,[t,...e]),()=>vi(...e),`number format`,t=>Reflect.apply(t.n,t,[...e]),()=>``,e=>X(e))}function oe(e){return e.map(e=>X(e)||et(e)||Z(e)?zi(String(e)):e)}let L={normalize:oe,interpolate:e=>e,type:`vnode`};function z(...e){return F(t=>{let n,r=t;try{r.processor=L,n=Reflect.apply(ri,null,[r,...e])}finally{r.processor=null}return n},()=>ci(...e),`translate`,t=>t[ki](...e),e=>[zi(e)],e=>pt(e))}function se(...e){return F(t=>Reflect.apply(gi,null,[t,...e]),()=>vi(...e),`number format`,t=>t[ji](...e),Bi,e=>X(e)||pt(e))}function ce(...e){return F(t=>Reflect.apply(fi,null,[t,...e]),()=>mi(...e),`datetime format`,t=>t[Ai](...e),Bi,e=>X(e)||pt(e))}function le(e){T=e,E.pluralRules=T}function ue(e,t){return F(()=>{if(!e)return!1;let n=fe(X(t)?t:l.value),r=E.messageResolver(n,e);return s?r!=null:yn(r)||ni(r)||X(r)},()=>[e],`translate exists`,n=>Reflect.apply(n.te,n,[e,t]),Vi,e=>Z(e))}function B(e){let t=null,n=br(E,u.value,l.value);for(let r=0;r<n.length;r++){let i=d.value[n[r]]||{},a=E.messageResolver(i,e);if(a!=null){t=a;break}}return t}function de(e){return B(e)??(n&&n.tm(e)||{})}function fe(e){return d.value[e]||{}}function pe(e,t){if(a){let n={[e]:t};for(let e in n)ft(n,e)&&Fi(n[e]);t=n[e]}d.value[e]=t,E.messages=d.value}function me(e,t){d.value[e]=d.value[e]||{};let n={[e]:t};if(a)for(let e in n)ft(n,e)&&Fi(n[e]);t=n[e],Ct(t,d.value[e]),E.messages=d.value}function H(e){return f.value[e]||{}}function he(e,t){f.value[e]=t,E.datetimeFormats=f.value,hi(E,e,t)}function U(e,t){f.value[e]=rt(f.value[e]||{},t),E.datetimeFormats=f.value,hi(E,e,t)}function ge(e){return m.value[e]||{}}function _e(e,t){m.value[e]=t,E.numberFormats=m.value,yi(E,e,t)}function ve(e,t){m.value[e]=rt(m.value[e]||{},t),E.numberFormats=m.value,yi(E,e,t)}Hi++,n&&J&&(p(n.locale,e=>{c&&(l.value=e,E.locale=e,Ur(E,l.value,u.value))}),p(n.fallbackLocale,e=>{c&&(u.value=e,E.fallbackLocale=e,Ur(E,l.value,u.value))}));let W={id:Hi,locale:O,fallbackLocale:k,get inheritLocale(){return c},set inheritLocale(e){c=e,e&&n&&(l.value=n.locale.value,u.value=n.fallbackLocale.value,Ur(E,l.value,u.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:A,get modifiers(){return w},get pluralRules(){return T||{}},get isGlobal(){return i},get missingWarn(){return h},set missingWarn(e){h=e,E.missingWarn=h},get fallbackWarn(){return g},set fallbackWarn(e){g=e,E.fallbackWarn=g},get fallbackRoot(){return _},set fallbackRoot(e){_=e},get fallbackFormat(){return v},set fallbackFormat(e){v=e,E.fallbackFormat=v},get warnHtmlMessage(){return S},set warnHtmlMessage(e){S=e,E.warnHtmlMessage=e},get escapeParameter(){return C},set escapeParameter(e){C=e,E.escapeParameter=e},t:re,getLocaleMessage:fe,setLocaleMessage:pe,mergeLocaleMessage:me,getPostTranslationHandler:ee,setPostTranslationHandler:te,getMissingHandler:P,setMissingHandler:ne,[Mi]:le};return W.datetimeFormats=j,W.numberFormats=N,W.rt=ie,W.te=ue,W.tm=de,W.d=ae,W.n=I,W.getDateTimeFormat=H,W.setDateTimeFormat=he,W.mergeDateTimeFormat=U,W.getNumberFormat=ge,W.setNumberFormat=_e,W.mergeNumberFormat=ve,W[Ni]=r,W[ki]=z,W[Ai]=ce,W[ji]=se,W}function Gi(e){let t=X(e.locale)?e.locale:Tr,n=X(e.fallbackLocale)||pt(e.fallbackLocale)||Q(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=mt(e.missing)?e.missing:void 0,i=Z(e.silentTranslationWarn)||nt(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,a=Z(e.silentFallbackWarn)||nt(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,o=Z(e.fallbackRoot)?e.fallbackRoot:!0,s=!!e.formatFallbackMessages,c=Q(e.modifiers)?e.modifiers:{},l=e.pluralizationRules,u=mt(e.postTranslation)?e.postTranslation:void 0,d=X(e.warnHtmlInMessage)?e.warnHtmlInMessage!==`off`:!0,f=!!e.escapeParameterHtml,p=Z(e.sync)?e.sync:!0,m=e.messages;if(Q(e.sharedMessages)){let t=e.sharedMessages;m=Object.keys(t).reduce((e,n)=>(rt(e[n]||(e[n]={}),t[n]),e),m||{})}let{__i18n:h,__root:g,__injectWithOption:_}=e,v=e.datetimeFormats,y=e.numberFormats,b=e.flatJson,x=e.translateExistCompatible;return{locale:t,fallbackLocale:n,messages:m,flatJson:b,datetimeFormats:v,numberFormats:y,missing:r,missingWarn:i,fallbackWarn:a,fallbackRoot:o,fallbackFormat:s,modifiers:c,pluralRules:l,postTranslation:u,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,translateExistCompatible:x,__i18n:h,__root:g,__injectWithOption:_}}function Ki(e={},t){{let t=Wi(Gi(e)),{__extender:n}=e,r={id:t.id,get locale(){return t.locale.value},set locale(e){t.locale.value=e},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(e){t.fallbackLocale.value=e},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get formatter(){return{interpolate(){return[]}}},set formatter(e){},get missing(){return t.getMissingHandler()},set missing(e){t.setMissingHandler(e)},get silentTranslationWarn(){return Z(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(e){t.missingWarn=Z(e)?!e:e},get silentFallbackWarn(){return Z(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(e){t.fallbackWarn=Z(e)?!e:e},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(e){t.fallbackFormat=e},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(e){t.setPostTranslationHandler(e)},get sync(){return t.inheritLocale},set sync(e){t.inheritLocale=e},get warnHtmlInMessage(){return t.warnHtmlMessage?`warn`:`off`},set warnHtmlInMessage(e){t.warnHtmlMessage=e!==`off`},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(e){t.escapeParameter=e},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(e){},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...e){let[n,r,i]=e,a={},o=null,s=null;if(!X(n))throw Oi(Di.INVALID_ARGUMENT);let c=n;return X(r)?a.locale=r:pt(r)?o=r:Q(r)&&(s=r),pt(i)?o=i:Q(i)&&(s=i),Reflect.apply(t.t,t,[c,o||s||{},a])},rt(...e){return Reflect.apply(t.rt,t,[...e])},tc(...e){let[n,r,i]=e,a={plural:1},o=null,s=null;if(!X(n))throw Oi(Di.INVALID_ARGUMENT);let c=n;return X(r)?a.locale=r:et(r)?a.plural=r:pt(r)?o=r:Q(r)&&(s=r),X(i)?a.locale=i:pt(i)?o=i:Q(i)&&(s=i),Reflect.apply(t.t,t,[c,o||s||{},a])},te(e,n){return t.te(e,n)},tm(e){return t.tm(e)},getLocaleMessage(e){return t.getLocaleMessage(e)},setLocaleMessage(e,n){t.setLocaleMessage(e,n)},mergeLocaleMessage(e,n){t.mergeLocaleMessage(e,n)},d(...e){return Reflect.apply(t.d,t,[...e])},getDateTimeFormat(e){return t.getDateTimeFormat(e)},setDateTimeFormat(e,n){t.setDateTimeFormat(e,n)},mergeDateTimeFormat(e,n){t.mergeDateTimeFormat(e,n)},n(...e){return Reflect.apply(t.n,t,[...e])},getNumberFormat(e){return t.getNumberFormat(e)},setNumberFormat(e,n){t.setNumberFormat(e,n)},mergeNumberFormat(e,n){t.mergeNumberFormat(e,n)},getChoiceIndex(e,t){return-1}};return r.__extender=n,r}}var qi={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e===`parent`||e===`global`,default:`parent`},i18n:{type:Object}};function Ji({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((e,t)=>[...e,...t.type===H?t.children:[t]],[]):t.reduce((t,n)=>{let r=e[n];return r&&(t[n]=r()),t},at())}function Yi(e){return H}var Xi=x({name:`i18n-t`,props:rt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>et(e)||!isNaN(e)}},qi),setup(e,t){let{slots:n,attrs:r}=t,i=e.i18n||ua({useScope:e.scope,__useComponent:!0});return()=>{let a=Object.keys(n).filter(e=>e!==`_`),o=at();e.locale&&(o.locale=e.locale),e.plural!==void 0&&(o.plural=X(e.plural)?+e.plural:e.plural);let c=Ji(t,a),l=i[ki](e.keypath,c,o),u=rt(at(),r);return s(X(e.tag)||ht(e.tag)?e.tag:Yi(),u,l)}}});function Zi(e){return pt(e)&&!X(e[0])}function Qi(e,t,n,r){let{slots:i,attrs:a}=t;return()=>{let t={part:!0},o=at();e.locale&&(t.locale=e.locale),X(e.format)?t.key=e.format:ht(e.format)&&(X(e.format.key)&&(t.key=e.format.key),o=Object.keys(e.format).reduce((t,r)=>n.includes(r)?rt(at(),t,{[r]:e.format[r]}):t,at()));let c=r(e.value,t,o),l=[t.key];pt(c)?l=c.map((e,t)=>{let n=i[e.type],r=n?n({[e.type]:e.value,index:t,parts:c}):[e.value];return Zi(r)&&(r[0].key=`${e.type}-${t}`),r}):X(c)&&(l=[c]);let u=rt(at(),a);return s(X(e.tag)||ht(e.tag)?e.tag:Yi(),u,l)}}var $i=x({name:`i18n-n`,props:rt({value:{type:Number,required:!0},format:{type:[String,Object]}},qi),setup(e,t){let n=e.i18n||ua({useScope:e.scope,__useComponent:!0});return Qi(e,t,_i,(...e)=>n[ji](...e))}}),ea=x({name:`i18n-d`,props:rt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},qi),setup(e,t){let n=e.i18n||ua({useScope:e.scope,__useComponent:!0});return Qi(e,t,pi,(...e)=>n[Ai](...e))}});function ta(e,t){let n=e;if(e.mode===`composition`)return n.__getInstance(t)||e.global;{let r=n.__getInstance(t);return r==null?e.global.__composer:r.__composer}}function na(e){let t=t=>{let{instance:n,modifiers:r,value:i}=t;if(!n||!n.$)throw Oi(Di.UNEXPECTED_ERROR);let a=ta(e,n.$),o=ra(i);return[Reflect.apply(a.t,a,[...ia(o)]),a]};return{created:(n,r)=>{let[i,a]=t(r);J&&e.global===a&&(n.__i18nWatcher=p(a.locale,()=>{r.instance&&r.instance.$forceUpdate()})),n.__composer=a,n.textContent=i},unmounted:e=>{J&&e.__i18nWatcher&&(e.__i18nWatcher(),e.__i18nWatcher=void 0,delete e.__i18nWatcher),e.__composer&&(e.__composer=void 0,delete e.__composer)},beforeUpdate:(e,{value:t})=>{if(e.__composer){let n=e.__composer,r=ra(t);e.textContent=Reflect.apply(n.t,n,[...ia(r)])}},getSSRProps:e=>{let[n]=t(e);return{textContent:n}}}}function ra(e){if(X(e))return{path:e};if(Q(e)){if(!(`path`in e))throw Oi(Di.REQUIRED_VALUE,`path`);return e}else throw Oi(Di.INVALID_VALUE)}function ia(e){let{path:t,locale:n,args:r,choice:i,plural:a}=e,o={},s=r||{};return X(n)&&(o.locale=n),et(i)&&(o.plural=i),et(a)&&(o.plural=a),[t,s,o]}function aa(e,t,...n){let r=Q(n[0])?n[0]:{},i=!!r.useI18nComponentName;(!Z(r.globalInstall)||r.globalInstall)&&([i?`i18n`:Xi.name,`I18nT`].forEach(t=>e.component(t,Xi)),[$i.name,`I18nN`].forEach(t=>e.component(t,$i)),[ea.name,`I18nD`].forEach(t=>e.component(t,ea))),e.directive(`t`,na(t))}function oa(e,t,n){return{beforeCreate(){let r=c();if(!r)throw Oi(Di.UNEXPECTED_ERROR);let i=this.$options;if(i.i18n){let r=i.i18n;if(i.__i18n&&(r.__i18n=i.__i18n),r.__root=t,this===this.$root)this.$i18n=sa(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=Ki(r);let e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}}else if(i.__i18n)if(this===this.$root)this.$i18n=sa(e,i);else{this.$i18n=Ki({__i18n:i.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});let e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}else this.$i18n=e;i.__i18nGlobal&&Ri(t,i,i),this.$t=(...e)=>this.$i18n.t(...e),this.$rt=(...e)=>this.$i18n.rt(...e),this.$tc=(...e)=>this.$i18n.tc(...e),this.$te=(e,t)=>this.$i18n.te(e,t),this.$d=(...e)=>this.$i18n.d(...e),this.$n=(...e)=>this.$i18n.n(...e),this.$tm=e=>this.$i18n.tm(e),n.__setInstance(r,this.$i18n)},mounted(){},unmounted(){let e=c();if(!e)throw Oi(Di.UNEXPECTED_ERROR);let t=this.$i18n;delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,t.__disposer&&(t.__disposer(),delete t.__disposer,delete t.__extender),n.__deleteInstance(e),delete this.$i18n}}}function sa(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[Mi](t.pluralizationRules||e.pluralizationRules);let n=Ii(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(t=>e.mergeLocaleMessage(t,n[t])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(n=>e.mergeDateTimeFormat(n,t.datetimeFormats[n])),t.numberFormats&&Object.keys(t.numberFormats).forEach(n=>e.mergeNumberFormat(n,t.numberFormats[n])),e}var ca=Ze(`global-vue-i18n`);function la(e={},t){let n=__VUE_I18N_LEGACY_API__&&Z(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,r=Z(e.globalInjection)?e.globalInjection:!0,i=__VUE_I18N_LEGACY_API__&&n?!!e.allowComposition:!0,a=new Map,[o,s]=da(e,n),c=Ze(``);function l(e){return a.get(e)||null}function u(e,t){a.set(e,t)}function d(e){a.delete(e)}{let e={get mode(){return __VUE_I18N_LEGACY_API__&&n?`legacy`:`composition`},get allowComposition(){return i},async install(t,...i){if(t.__VUE_I18N_SYMBOL__=c,t.provide(t.__VUE_I18N_SYMBOL__,e),Q(i[0])){let t=i[0];e.__composerExtend=t.__composerExtend,e.__vueI18nExtend=t.__vueI18nExtend}let a=null;!n&&r&&(a=xa(t,e.global)),__VUE_I18N_FULL_INSTALL__&&aa(t,e,...i),__VUE_I18N_LEGACY_API__&&n&&t.mixin(oa(s,s.__composer,e));let o=t.unmount;t.unmount=()=>{a&&a(),e.dispose(),o()}},get global(){return s},dispose(){o.stop()},__instances:a,__getInstance:l,__setInstance:u,__deleteInstance:d};return e}}function ua(e={}){let t=c();if(t==null)throw Oi(Di.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Oi(Di.NOT_INSTALLED);let n=fa(t),r=ma(n),i=Li(t),a=pa(e,i);if(__VUE_I18N_LEGACY_API__&&n.mode===`legacy`&&!e.__useComponent){if(!n.allowComposition)throw Oi(Di.NOT_AVAILABLE_IN_LEGACY_MODE);return va(t,a,r,e)}if(a===`global`)return Ri(r,e,i),r;if(a===`parent`){let i=ha(n,t,e.__useComponent);return i??=r,i}let o=n,s=o.__getInstance(t);if(s==null){let n=rt({},e);`__i18n`in i&&(n.__i18n=i.__i18n),r&&(n.__root=r),s=Wi(n),o.__composerExtend&&(s[Pi]=o.__composerExtend(s)),_a(o,t,s),o.__setInstance(t,s)}return s}function da(e,t,n){let r=i();{let n=__VUE_I18N_LEGACY_API__&&t?r.run(()=>Ki(e)):r.run(()=>Wi(e));if(n==null)throw Oi(Di.UNEXPECTED_ERROR);return[r,n]}}function fa(e){{let t=I(e.isCE?ca:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Oi(e.isCE?Di.NOT_INSTALLED_WITH_PROVIDE:Di.UNEXPECTED_ERROR);return t}}function pa(e,t){return Y(e)?`__i18n`in t?`local`:`global`:e.useScope?e.useScope:`local`}function ma(e){return e.mode===`composition`?e.global:e.global.__composer}function ha(e,t,n=!1){let r=null,i=t.root,a=ga(t,n);for(;a!=null;){let t=e;if(e.mode===`composition`)r=t.__getInstance(a);else if(__VUE_I18N_LEGACY_API__){let e=t.__getInstance(a);e!=null&&(r=e.__composer,n&&r&&!r[Ni]&&(r=null))}if(r!=null||i===a)break;a=a.parent}return r}function ga(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function _a(e,t,n){l(()=>{},t),f(()=>{let r=n;e.__deleteInstance(t);let i=r[Pi];i&&(i(),delete r[Pi])},t)}function va(e,t,n,r={}){let i=t===`local`,a=M(null);if(i&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw Oi(Di.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);let o=Z(r.inheritLocale)?r.inheritLocale:!X(r.locale),s=V(!i||o?n.locale.value:X(r.locale)?r.locale:Tr),c=V(!i||o?n.fallbackLocale.value:X(r.fallbackLocale)||pt(r.fallbackLocale)||Q(r.fallbackLocale)||r.fallbackLocale===!1?r.fallbackLocale:s.value),l=V(Ii(s.value,r)),u=V(Q(r.datetimeFormats)?r.datetimeFormats:{[s.value]:{}}),d=V(Q(r.numberFormats)?r.numberFormats:{[s.value]:{}}),f=i?n.missingWarn:Z(r.missingWarn)||nt(r.missingWarn)?r.missingWarn:!0,p=i?n.fallbackWarn:Z(r.fallbackWarn)||nt(r.fallbackWarn)?r.fallbackWarn:!0,m=i?n.fallbackRoot:Z(r.fallbackRoot)?r.fallbackRoot:!0,h=!!r.fallbackFormat,_=mt(r.missing)?r.missing:null,v=mt(r.postTranslation)?r.postTranslation:null,y=i?n.warnHtmlMessage:Z(r.warnHtmlMessage)?r.warnHtmlMessage:!0,b=!!r.escapeParameter,x=i?n.modifiers:Q(r.modifiers)?r.modifiers:{},S=r.pluralRules||i&&n.pluralRules;function C(){return[s.value,c.value,l.value,u.value,d.value]}let w=R({get:()=>a.value?a.value.locale.value:s.value,set:e=>{a.value&&(a.value.locale.value=e),s.value=e}}),T=R({get:()=>a.value?a.value.fallbackLocale.value:c.value,set:e=>{a.value&&(a.value.fallbackLocale.value=e),c.value=e}}),E=R(()=>a.value?a.value.messages.value:l.value),D=R(()=>u.value),O=R(()=>d.value);function k(){return a.value?a.value.getPostTranslationHandler():v}function A(e){a.value&&a.value.setPostTranslationHandler(e)}function j(){return a.value?a.value.getMissingHandler():_}function N(e){a.value&&a.value.setMissingHandler(e)}function ee(e){return C(),e()}function te(...e){return a.value?ee(()=>Reflect.apply(a.value.t,null,[...e])):ee(()=>``)}function P(...e){return a.value?Reflect.apply(a.value.rt,null,[...e]):``}function ne(...e){return a.value?ee(()=>Reflect.apply(a.value.d,null,[...e])):ee(()=>``)}function F(...e){return a.value?ee(()=>Reflect.apply(a.value.n,null,[...e])):ee(()=>``)}function re(e){return a.value?a.value.tm(e):{}}function ie(e,t){return a.value?a.value.te(e,t):!1}function ae(e){return a.value?a.value.getLocaleMessage(e):{}}function I(e,t){a.value&&(a.value.setLocaleMessage(e,t),l.value[e]=t)}function oe(e,t){a.value&&a.value.mergeLocaleMessage(e,t)}function L(e){return a.value?a.value.getDateTimeFormat(e):{}}function z(e,t){a.value&&(a.value.setDateTimeFormat(e,t),u.value[e]=t)}function se(e,t){a.value&&a.value.mergeDateTimeFormat(e,t)}function ce(e){return a.value?a.value.getNumberFormat(e):{}}function le(e,t){a.value&&(a.value.setNumberFormat(e,t),d.value[e]=t)}function ue(e,t){a.value&&a.value.mergeNumberFormat(e,t)}let B={get id(){return a.value?a.value.id:-1},locale:w,fallbackLocale:T,messages:E,datetimeFormats:D,numberFormats:O,get inheritLocale(){return a.value?a.value.inheritLocale:o},set inheritLocale(e){a.value&&(a.value.inheritLocale=e)},get availableLocales(){return a.value?a.value.availableLocales:Object.keys(l.value)},get modifiers(){return a.value?a.value.modifiers:x},get pluralRules(){return a.value?a.value.pluralRules:S},get isGlobal(){return a.value?a.value.isGlobal:!1},get missingWarn(){return a.value?a.value.missingWarn:f},set missingWarn(e){a.value&&(a.value.missingWarn=e)},get fallbackWarn(){return a.value?a.value.fallbackWarn:p},set fallbackWarn(e){a.value&&(a.value.missingWarn=e)},get fallbackRoot(){return a.value?a.value.fallbackRoot:m},set fallbackRoot(e){a.value&&(a.value.fallbackRoot=e)},get fallbackFormat(){return a.value?a.value.fallbackFormat:h},set fallbackFormat(e){a.value&&(a.value.fallbackFormat=e)},get warnHtmlMessage(){return a.value?a.value.warnHtmlMessage:y},set warnHtmlMessage(e){a.value&&(a.value.warnHtmlMessage=e)},get escapeParameter(){return a.value?a.value.escapeParameter:b},set escapeParameter(e){a.value&&(a.value.escapeParameter=e)},t:te,getPostTranslationHandler:k,setPostTranslationHandler:A,getMissingHandler:j,setMissingHandler:N,rt:P,d:ne,n:F,tm:re,te:ie,getLocaleMessage:ae,setLocaleMessage:I,mergeLocaleMessage:oe,getDateTimeFormat:L,setDateTimeFormat:z,mergeDateTimeFormat:se,getNumberFormat:ce,setNumberFormat:le,mergeNumberFormat:ue};function de(e){e.locale.value=s.value,e.fallbackLocale.value=c.value,Object.keys(l.value).forEach(t=>{e.mergeLocaleMessage(t,l.value[t])}),Object.keys(u.value).forEach(t=>{e.mergeDateTimeFormat(t,u.value[t])}),Object.keys(d.value).forEach(t=>{e.mergeNumberFormat(t,d.value[t])}),e.escapeParameter=b,e.fallbackFormat=h,e.fallbackRoot=m,e.fallbackWarn=p,e.missingWarn=f,e.warnHtmlMessage=y}return g(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw Oi(Di.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);let n=a.value=e.proxy.$i18n.__composer;t===`global`?(s.value=n.locale.value,c.value=n.fallbackLocale.value,l.value=n.messages.value,u.value=n.datetimeFormats.value,d.value=n.numberFormats.value):i&&de(n)}),B}var ya=[`locale`,`fallbackLocale`,`availableLocales`],ba=[`t`,`rt`,`d`,`n`,`tm`,`te`];function xa(e,t){let n=Object.create(null);return ya.forEach(e=>{let r=Object.getOwnPropertyDescriptor(t,e);if(!r)throw Oi(Di.UNEXPECTED_ERROR);let i=se(r.value)?{get(){return r.value.value},set(e){r.value.value=e}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,e,i)}),e.config.globalProperties.$i18n=n,ba.forEach(n=>{let r=Object.getOwnPropertyDescriptor(t,n);if(!r||!r.value)throw Oi(Di.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${n}`,r)}),()=>{delete e.config.globalProperties.$i18n,ba.forEach(t=>{delete e.config.globalProperties[`$${t}`]})}}if(xi(),__INTLIFY_JIT_COMPILATION__?kr(ei):kr($r),jr(Jn),Nr(br),__INTLIFY_PROD_DEVTOOLS__){let e=st();e.__INTLIFY__=!0,ar(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}var Sa=[`top`,`right`,`bottom`,`left`],Ca=[`start`,`end`],wa=Sa.reduce((e,t)=>e.concat(t,t+`-`+Ca[0],t+`-`+Ca[1]),[]),Ta=Math.min,Ea=Math.max,Da=Math.round,Oa=Math.floor,ka=e=>({x:e,y:e}),Aa={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ja(e,t,n){return Ea(e,Ta(t,n))}function Ma(e,t){return typeof e==`function`?e(t):e}function Na(e){return e.split(`-`)[0]}function Pa(e){return e.split(`-`)[1]}function Fa(e){return e===`x`?`y`:`x`}function Ia(e){return e===`y`?`height`:`width`}function La(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Ra(e){return Fa(La(e))}function za(e,t,n){n===void 0&&(n=!1);let r=Pa(e),i=Ra(e),a=Ia(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ja(o)),[o,Ja(o)]}function Ba(e){let t=Ja(e);return[Va(e),t,Va(t)]}function Va(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Ha=[`left`,`right`],Ua=[`right`,`left`],Wa=[`top`,`bottom`],Ga=[`bottom`,`top`];function Ka(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ua:Ha:t?Ha:Ua;case`left`:case`right`:return t?Wa:Ga;default:return[]}}function qa(e,t,n,r){let i=Pa(e),a=Ka(Na(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Va)))),a}function Ja(e){let t=Na(e);return Aa[t]+e.slice(t.length)}function Ya(e){return{top:0,right:0,bottom:0,left:0,...e}}function Xa(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ya(e)}function Za(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Qa(e,t,n){let{reference:r,floating:i}=e,a=La(t),o=Ra(t),s=Ia(o),c=Na(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Pa(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function $a(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Ma(t,e),p=Xa(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Za(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Za(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var eo=50,to=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:$a},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Qa(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<eo&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Qa(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},no=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Ma(e,t)||{};if(l==null)return{};let d=Xa(u),f={x:n,y:r},p=Ra(i),m=Ia(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Ta(d[_],T),D=Ta(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=ja(O,A,k),M=!c.arrow&&Pa(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}});function ro(e,t,n){return(e?[...n.filter(t=>Pa(t)===e),...n.filter(t=>Pa(t)!==e)]:n.filter(e=>Na(e)===e)).filter(n=>e?Pa(n)===e||(t?Va(n)!==n:!1):!0)}var io=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){let{rects:n,middlewareData:r,placement:i,platform:a,elements:o}=t,{crossAxis:s=!1,alignment:c,allowedPlacements:l=wa,autoAlignment:u=!0,...d}=Ma(e,t),f=c!==void 0||l===wa?ro(c||null,u,l):l,p=await a.detectOverflow(t,d),m=r.autoPlacement?.index||0,h=f[m];if(h==null)return{};let g=za(h,n,await(a.isRTL==null?void 0:a.isRTL(o.floating)));if(i!==h)return{reset:{placement:f[0]}};let _=[p[Na(h)],p[g[0]],p[g[1]]],v=[...r.autoPlacement?.overflows||[],{placement:h,overflows:_}],y=f[m+1];if(y)return{data:{index:m+1,overflows:v},reset:{placement:y}};let b=v.map(e=>{let t=Pa(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),x=b.filter(e=>e[2].slice(0,Pa(e[0])?2:3).every(e=>e<=0))[0]?.[0]||b[0][0];return x===i?{}:{data:{index:m+1,overflows:v},reset:{placement:x}}}}},ao=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Ma(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Na(r),_=La(o),v=Na(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Ja(o)]:Ba(o)),x=p!==`none`;!d&&x&&b.push(...qa(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=za(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==La(t))||T.every(e=>La(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=La(e.placement);return t===_||t===`y`}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]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function oo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function so(e){return Sa.some(t=>e[t]>=0)}var co=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Ma(e,t);switch(i){case`referenceHidden`:{let e=oo(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:so(e)}}}case`escaped`:{let e=oo(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:so(e)}}}default:return{}}}}};function lo(e){let t=Ta(...e.map(e=>e.left)),n=Ta(...e.map(e=>e.top)),r=Ea(...e.map(e=>e.right)),i=Ea(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function uo(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>Za(lo(e)))}var fo=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=Ma(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]),d=uo(u),f=Za(lo(u)),p=Xa(s);function m(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if(La(n)===`y`){let e=d[0],t=d[d.length-1],r=Na(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left,s=r?e.right:t.right;return{top:i,bottom:a,left:o,right:s,width:s-o,height:a-i,x:o,y:i}}let e=Na(n)===`left`,t=Ea(...d.map(e=>e.right)),r=Ta(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom,s=r,c=t;return{top:a,bottom:o,left:s,right:c,width:c-s,height:o-a,x:s,y:a}}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},po=new Set([`left`,`top`]);async function mo(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Na(n),s=Pa(n),c=La(n)===`y`,l=po.has(o)?-1:1,u=a&&c?-1:1,d=Ma(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var ho=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await mo(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},go=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ma(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=La(Na(i)),p=Fa(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=ja(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=ja(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},_o=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Ma(e,t),u={x:n,y:r},d=La(i),f=Fa(d),p=u[f],m=u[d],h=Ma(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=po.has(Na(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},vo=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Ma(e,t),u=await o.detectOverflow(t,l),d=Na(i),f=Pa(i),p=La(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Ta(h-u[g],v),x=Ta(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Ea(u.left,0),t=Ea(u.right,0),n=Ea(u.top,0),r=Ea(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Ea(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Ea(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function yo(){return typeof window<`u`}function bo(e){return Co(e)?(e.nodeName||``).toLowerCase():`#document`}function xo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function So(e){return((Co(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Co(e){return yo()?e instanceof Node||e instanceof xo(e).Node:!1}function wo(e){return yo()?e instanceof Element||e instanceof xo(e).Element:!1}function To(e){return yo()?e instanceof HTMLElement||e instanceof xo(e).HTMLElement:!1}function Eo(e){return!yo()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof xo(e).ShadowRoot}function Do(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Ro(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Oo(e){return/^(table|td|th)$/.test(bo(e))}function ko(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Ao=/transform|translate|scale|rotate|perspective|filter/,jo=/paint|layout|strict|content/,Mo=e=>!!e&&e!==`none`,No;function Po(e){let t=wo(e)?Ro(e):e;return Mo(t.transform)||Mo(t.translate)||Mo(t.scale)||Mo(t.rotate)||Mo(t.perspective)||!Io()&&(Mo(t.backdropFilter)||Mo(t.filter))||Ao.test(t.willChange||``)||jo.test(t.contain||``)}function Fo(e){let t=Bo(e);for(;To(t)&&!Lo(t);){if(Po(t))return t;if(ko(t))return null;t=Bo(t)}return null}function Io(){return No??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),No}function Lo(e){return/^(html|body|#document)$/.test(bo(e))}function Ro(e){return xo(e).getComputedStyle(e)}function zo(e){return wo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Bo(e){if(bo(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Eo(e)&&e.host||So(e);return Eo(t)?t.host:t}function Vo(e){let t=Bo(e);return Lo(t)?e.ownerDocument?e.ownerDocument.body:e.body:To(t)&&Do(t)?t:Vo(t)}function Ho(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Vo(e),i=r===e.ownerDocument?.body,a=xo(r);if(i){let e=Uo(a);return t.concat(a,a.visualViewport||[],Do(r)?r:[],e&&n?Ho(e):[])}else return t.concat(r,Ho(r,[],n))}function Uo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Wo=n({arrow:()=>Os,autoPlacement:()=>Cs,autoUpdate:()=>bs,computePosition:()=>js,detectOverflow:()=>xs,flip:()=>Ts,getOverflowAncestors:()=>Ho,hide:()=>Ds,inline:()=>ks,limitShift:()=>As,offset:()=>Ss,platform:()=>_s,shift:()=>ws,size:()=>Es});function Go(e){let t=Ro(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=To(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Da(n)!==a||Da(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ko(e){return wo(e)?e:e.contextElement}function qo(e){let t=Ko(e);if(!To(t))return ka(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Go(t),o=(a?Da(n.width):n.width)/r,s=(a?Da(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Jo=ka(0);function Yo(e){let t=xo(e);return!Io()||!t.visualViewport?Jo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xo(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==xo(e)?!1:t}function Zo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ko(e),o=ka(1);t&&(r?wo(r)&&(o=qo(r)):o=qo(e));let s=Xo(a,n,r)?Yo(a):ka(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=xo(a),t=r&&wo(r)?xo(r):r,n=e,i=Uo(n);for(;i&&r&&t!==n;){let e=qo(i),t=i.getBoundingClientRect(),r=Ro(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=xo(i),i=Uo(n)}}return Za({width:u,height:d,x:c,y:l})}function Qo(e,t){let n=zo(e).scrollLeft;return t?t.left+n:Zo(So(e)).left+n}function $o(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Qo(e,n),y:n.top+t.scrollTop}}function es(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=So(r),s=t?ko(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=ka(1),u=ka(0),d=To(r);if((d||!d&&!a)&&((bo(r)!==`body`||Do(o))&&(c=zo(r)),d)){let e=Zo(r);l=qo(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?$o(o,c):ka(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ts(e){return Array.from(e.getClientRects())}function ns(e){let t=So(e),n=zo(e),r=e.ownerDocument.body,i=Ea(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ea(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Qo(e),s=-n.scrollTop;return Ro(r).direction===`rtl`&&(o+=Ea(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var rs=25;function is(e,t){let n=xo(e),r=So(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Io();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Qo(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=rs&&(a-=o)}else l<=rs&&(a+=l);return{width:a,height:o,x:s,y:c}}function as(e,t){let n=Zo(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=To(e)?qo(e):ka(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function os(e,t,n){let r;if(t===`viewport`)r=is(e,n);else if(t===`document`)r=ns(So(e));else if(wo(t))r=as(t,n);else{let n=Yo(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Za(r)}function ss(e,t){let n=Bo(e);return n===t||!wo(n)||Lo(n)?!1:Ro(n).position===`fixed`||ss(n,t)}function cs(e,t){let n=t.get(e);if(n)return n;let r=Ho(e,[],!1).filter(e=>wo(e)&&bo(e)!==`body`),i=null,a=Ro(e).position===`fixed`,o=a?Bo(e):e;for(;wo(o)&&!Lo(o);){let t=Ro(o),n=Po(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Do(o)&&!n&&ss(e,o))?r=r.filter(e=>e!==o):i=t,o=Bo(o)}return t.set(e,r),r}function ls(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ko(t)?[]:cs(t,this._c):[].concat(n),r],o=os(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=os(t,a[e],i);s=Ea(n.top,s),c=Ta(n.right,c),l=Ta(n.bottom,l),u=Ea(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function us(e){let{width:t,height:n}=Go(e);return{width:t,height:n}}function ds(e,t,n){let r=To(t),i=So(t),a=n===`fixed`,o=Zo(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=ka(0);function l(){c.x=Qo(i)}if(r||!r&&!a)if((bo(t)!==`body`||Do(i))&&(s=zo(t)),r){let e=Zo(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?$o(i,s):ka(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function fs(e){return Ro(e).position===`static`}function ps(e,t){if(!To(e)||Ro(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return So(e)===n&&(n=n.ownerDocument.body),n}function ms(e,t){let n=xo(e);if(ko(e))return n;if(!To(e)){let t=Bo(e);for(;t&&!Lo(t);){if(wo(t)&&!fs(t))return t;t=Bo(t)}return n}let r=ps(e,t);for(;r&&Oo(r)&&fs(r);)r=ps(r,t);return r&&Lo(r)&&fs(r)&&!Po(r)?n:r||Fo(e)||n}var hs=async function(e){let t=this.getOffsetParent||ms,n=this.getDimensions,r=await n(e.floating);return{reference:ds(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gs(e){return Ro(e).direction===`rtl`}var _s={convertOffsetParentRelativeRectToViewportRelativeRect:es,getDocumentElement:So,getClippingRect:ls,getOffsetParent:ms,getElementRects:hs,getClientRects:ts,getDimensions:us,getScale:qo,isElement:wo,isRTL:gs};function vs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ys(e,t){let n=null,r,i=So(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Oa(d),h=Oa(i.clientWidth-(u+f)),g=Oa(i.clientHeight-(d+p)),_=Oa(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Ea(0,Ta(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!vs(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function bs(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ko(e),u=i||a?[...l?Ho(l):[],...t?Ho(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?ys(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Zo(e):null;c&&g();function g(){let t=Zo(e);h&&!vs(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var xs=$a,Ss=ho,Cs=io,ws=go,Ts=ao,Es=vo,Ds=co,Os=no,ks=fo,As=_o,js=(e,t,n)=>{let r=new Map,i={platform:_s,...n},a={...i.platform,_c:r};return to(e,t,{...i,platform:a})},Ms={arrowUp:[`M12 19V5m-7 7 7-7 7 7`],chevronUp:[`m18 15-6-6-6 6`],chevronDown:[`m6 9 6 6 6-6`],chevronRight:[`m9 18 6-6-6-6`],close:[`M18 6 6 18M6 6l12 12`],refresh:[`M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,`M3 3v5h5`,`M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16`,`M21 21v-5h-5`],search:[`m21 21-4.35-4.35`,`M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z`],home:[`m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,`M9 22V12h6v10`],folder:[`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.7-.9l-.8-1.2A2 2 0 0 0 7.9 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h16Z`],file:[`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,`M14 2v4a2 2 0 0 0 2 2h4`],check:[`M20 6 9 17l-5-5`],monitor:[`M9.5 2H4a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2h-5.5`,`M12 14v4`,`M8 18h8`],download:[`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,`M7 10l5 5 5-5`,`M12 15V3`],hardDrive:[`M22 12H2`,`M5.2 5.2 3 12v6a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-6l-2.2-6.8A2 2 0 0 0 17 4H7a2 2 0 0 0-1.8 1.2Z`,`M6 16h.01M10 16h.01`],circleX:[`m14.5 9.5-5 5m0-5 5 5`,`M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z`],circleCheck:[`M22 11.08V12a10 10 0 1 1-5.93-9.14`,`M22 4 12 14.01l-3-3`],caretDown:[`m6 9 6 6 6-6`],caretRight:[`m9 18 6-6-6-6`]},Ns={js:`#f0db4f`,jsx:`#61dafb`,ts:`#3178c6`,tsx:`#3178c6`,vue:`#42b883`,html:`#e34c26`,css:`#264de4`,scss:`#cf649a`,py:`#3776ab`,java:`#ed8b00`,go:`#00add8`,rs:`#dea584`,c:`#a8b9cc`,cpp:`#00599c`,json:`#a78bfa`,yml:`#cb171e`,yaml:`#cb171e`,toml:`#9c4121`,csv:`#217346`,md:`#8b91a8`,txt:`#8b91a8`,pdf:`#e74c3c`,doc:`#2b579a`,docx:`#2b579a`,xls:`#217346`,xlsx:`#217346`,png:`#9b59b6`,jpg:`#9b59b6`,jpeg:`#9b59b6`,gif:`#9b59b6`,svg:`#ffb13b`,webp:`#9b59b6`,mp4:`#e74c3c`,mp3:`#1db954`,wav:`#1db954`,zip:`#f59e0b`,rar:`#f59e0b`,"7z":`#f59e0b`,gz:`#f59e0b`,tar:`#f59e0b`},Ps=`#8b91a8`;function Fs(e){return Ns[e]||Ps}var Is=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Ls=[`width`,`height`,`stroke`],Rs=[`d`],zs=Is({__name:`SvgIcon`,props:{name:{type:String,required:!0},size:{type:[Number,String],default:18},color:{type:String,default:`currentColor`},class:{type:String,default:``}},setup(e){let t=e,n=R(()=>t.class),r=R(()=>{let e=Ms[t.name];return e?Array.isArray(e)?e:[e]:[]});return(t,i)=>(y(),U(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:e.size,height:e.size,viewBox:`0 0 24 24`,fill:`none`,stroke:e.color,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:z([`svg-icon`,n.value]),"aria-hidden":`true`},[(y(!0),U(H,null,a(r.value,(e,t)=>(y(),U(`path`,{key:t,d:e},null,8,Rs))),128))],10,Ls))}},[[`__scopeId`,`data-v-5461fefd`]]),Bs={class:`modal-header`},Vs={class:`modal-title`},Hs=[`title`],Us={class:`toolbar`},Ws=[`disabled`,`title`],Gs=[`title`],Ks=[`title`],qs={class:`path-breadcrumb`},Js=[`onClick`],Ys={class:`breadcrumb-text`},Xs={key:0,class:`breadcrumb-sep`},Zs={class:`search-bar`},Qs=[`placeholder`],$s=[`title`],ec={class:`toggle-label`},tc=[`title`],nc={class:`status-text`},rc={class:`modal-body`},ic={class:`sidebar`},ac={class:`sidebar-section`},oc={class:`sidebar-title`},sc={key:0,class:`sidebar-section`},cc={class:`sidebar-title`},lc=[`onClick`],uc={key:0,class:`loading-state`},dc={key:1,class:`error-state`},fc={key:2,class:`loading-state`},pc={key:3,class:`empty-state`},mc={key:4,class:`file-list`},hc={key:0,class:`search-results-info`},gc=[`innerHTML`],_c={key:0,class:`truncated-hint`},vc={class:`elapsed-hint`},yc={class:`file-name`},bc={class:`file-path-hint`},xc=[`onClick`,`onDblclick`],Sc=[`title`],Cc=[`title`],wc=[`title`],Tc=[`title`],Ec={class:`modal-footer`},Dc={class:`selected-info`},Oc={key:0,class:`no-selection`},kc=[`title`],Ac={key:2,class:`has-selection`},jc=[`innerHTML`],Mc={class:`footer-actions`},Nc=[`disabled`],Pc=`zh-CN`,Fc=Is({__name:`FilePickerModal`,props:{visible:{type:Boolean,default:!1},mode:{type:String,default:`file`},multiple:{type:Boolean,default:!1},theme:{type:String,default:`dark`},apiBase:{type:String,default:`/api`},locale:{type:String,default:`zh-CN`},messages:{type:Object,default:null}},emits:[`close`,`confirm`],setup(e,{emit:t}){let n={"zh-CN":{"modal.title.file":`选择文件`,"modal.title.directory":`选择文件夹`,"modal.close":`关闭`,"modal.up":`上级`,"modal.home":`家目录`,"tooltip.back":`返回上一级`,"tooltip.home":`家目录`,"tooltip.refresh":`刷新`,"tooltip.globalSearchOn":`全局搜索:在整个磁盘范围内搜索`,"tooltip.globalSearchOff":`当前目录搜索:仅在当前目录中过滤`,"tooltip.indexReady":`索引就绪,共 {totalFiles} 项,已扫描: {scannedRoots}`,"tooltip.indexing":`正在建索引... {indexedFiles} 项,当前: {currentDir}`,"tooltip.indexIdle":`索引未就绪,使用实时搜索`,"search.placeholderGlobal":`全局搜索{type}...`,"search.placeholderLocal":`搜索当前目录...`,"search.type.file":`文件`,"search.type.directory":`文件夹`,"search.type.all":`文件和文件夹`,"search.globalLabel":`全局`,"search.engineIndex":`索引搜索`,"search.engineWalk":`实时搜索`,"status.indexReady":`索引`,"status.indexing":`索引中`,"status.indexIdle":`离线`,"sidebar.quickAccess":`快捷访问`,"sidebar.home":`家目录`,"sidebar.desktop":`桌面`,"sidebar.documents":`文档`,"sidebar.downloads":`下载`,"sidebar.drives":`磁盘`,"state.loading":`加载中...`,"state.globalSearching":`全局搜索中...`,"state.emptySearch":`没有匹配的结果`,"state.emptyDir":`空目录`,"results.found":`找到 <strong>{count}</strong> 个结果`,"results.truncated":`(已达上限,请缩小关键词)`,"unit.ms":`ms`,"fileRow.selectCurrent":`选择当前文件夹`,"footer.unselectedFile":`未选择文件`,"footer.unselectedDir":`未选择文件夹`,"footer.selected":`已选择 <strong>{count}</strong> 项`,"footer.cancel":`取消`,"footer.confirm":`确认选择`,"error.cannotConnect":`无法连接到后端服务,请确认后端已启动 (npm run dev)`,"error.network":`网络错误: {message}。请确认后端服务已启动。`,"error.searchFailed":`搜索请求失败`},"en-US":{"modal.title.file":`Select File`,"modal.title.directory":`Select Folder`,"modal.close":`Close`,"modal.up":`Up`,"modal.home":`Home`,"tooltip.back":`Go to parent directory`,"tooltip.home":`Home directory`,"tooltip.refresh":`Refresh`,"tooltip.globalSearchOn":`Global search: search across the entire disk`,"tooltip.globalSearchOff":`Current folder search: filter within current folder only`,"tooltip.indexReady":`Index ready, {totalFiles} items total, scanned: {scannedRoots}`,"tooltip.indexing":`Building index... {indexedFiles} items, current: {currentDir}`,"tooltip.indexIdle":`Index not ready, using live search`,"search.placeholderGlobal":`Global search {type}...`,"search.placeholderLocal":`Search current folder...`,"search.type.file":`files`,"search.type.directory":`folders`,"search.type.all":`files and folders`,"search.globalLabel":`Global`,"search.engineIndex":`Index search`,"search.engineWalk":`Live search`,"status.indexReady":`Index`,"status.indexing":`Indexing`,"status.indexIdle":`Offline`,"sidebar.quickAccess":`Quick Access`,"sidebar.home":`Home`,"sidebar.desktop":`Desktop`,"sidebar.documents":`Documents`,"sidebar.downloads":`Downloads`,"sidebar.drives":`Drives`,"state.loading":`Loading...`,"state.globalSearching":`Global searching...`,"state.emptySearch":`No matching results`,"state.emptyDir":`Empty folder`,"results.found":`Found <strong>{count}</strong> results`,"results.truncated":`(limit reached, please narrow keywords)`,"unit.ms":`ms`,"fileRow.selectCurrent":`Select current folder`,"footer.unselectedFile":`No file selected`,"footer.unselectedDir":`No folder selected`,"footer.selected":`<strong>{count}</strong> item(s) selected`,"footer.cancel":`Cancel`,"footer.confirm":`Confirm Selection`,"error.cannotConnect":`Cannot connect to backend service, please make sure it is started (npm run dev)`,"error.network":`Network error: {message}. Please make sure the backend service is running.`,"error.searchFailed":`Search request failed`}},r=e,i=t,s=R(()=>({...n[r.locale]||n[Pc],...r.messages||{}}));function c(e,t={}){let r=s.value[e];return r??=n[Pc][e]??e,r.replace(/\{(\w+)\}/g,(e,n)=>t[n]??`{${n}}`)}let l=R(()=>r.mode===`file`?r.theme===`light`?`#3b82f6`:`#6c8cff`:`#a78bfa`),u=V(!1),d=V(``),f=V(``),m=V(null),h=V([]),g=V([]),_=V(``),v=V([]),x=V(``),S=V(!1),C=V(!1),w=V([]),T=V(!1),k=V(0),A=V(``),M=V({status:`idle`,totalFiles:0,indexedFiles:0,currentDir:``,scannedRoots:[]}),N=null,ee=R(()=>x.value?x.value+`\\Desktop`:``),ne=R(()=>x.value?x.value+`\\Documents`:``),re=R(()=>x.value?x.value+`\\Downloads`:``),ie=R(()=>S.value&&w.value.length>0),ae=R(()=>{if(ie.value){let e=w.value;return r.mode===`directory`&&(e=e.filter(e=>e.kind===`directory`)),e}let e=h.value;if(r.mode===`directory`&&(e=e.filter(e=>e.kind===`directory`)),!_.value)return e;let t=_.value.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(t))}),I=R(()=>{if(!f.value)return[];let e=f.value.split(/[/\\]/).filter(Boolean);return e.map((t,n)=>{let r;return r=n===0&&/^[A-Za-z]:$/.test(t)?t+`\\`:e.slice(0,n+1).join(`\\`),{label:t,path:r}})});async function L(){try{let e=await fetch(`${r.apiBase}/fs/home`);if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();return x.value=t.home,t.home}catch(e){return console.warn(`[fetchHome] 获取家目录失败:`,e.message),``}}async function se(){try{let e=await fetch(`${r.apiBase}/fs/drives`);if(!e.ok)throw Error(`HTTP ${e.status}`);v.value=(await e.json()).drives||[]}catch(e){console.warn(`[fetchDrives] 获取盘符失败:`,e.message),v.value=[]}}async function le(){try{let e=await fetch(`${r.apiBase}/fs/index-status`);if(!e.ok)return;M.value=await e.json()}catch{}}async function ue(e){u.value=!0,d.value=``;try{let t=new URLSearchParams;e&&t.set(`dir`,e);let n=await fetch(`${r.apiBase}/fs/list?${t}`);if(!n.ok){let e=`HTTP ${n.status}`;try{e=(await n.json()).error||e}catch{e=c(`error.cannotConnect`)}d.value=e;return}let i=await n.json();f.value=i.currentPath,m.value=i.parentPath,h.value=i.items||[]}catch(e){d.value=c(`error.network`,{message:e.message})}finally{u.value=!1}}function B(){if(ie.value){Se();return}m.value&&ue(m.value)}function de(){x.value&&fe(x.value)}function fe(e){_.value=``,Se(),ue(e)}function pe(e){let t=I.value[e]?.path;t&&t!==f.value&&fe(t)}function me(){ie.value&&_.value?G(_.value):ue(f.value)}function he(e){return g.value.includes(e)}function ge(e){if(!r.multiple){g.value=g.value[0]===e?[]:[e];return}let t=g.value.indexOf(e);t>=0?g.value.splice(t,1):g.value.push(e)}function _e(){g.value=[]}function ve(e,t){e.kind===`directory`?(r.mode,ge(e.path)):r.mode===`file`&&ge(e.path)}function W(e){if(!r.multiple){ve(e);return}(e.kind===`directory`||r.mode===`file`)&&ge(e.path)}function ye(e){e.kind===`directory`&&fe(e.path)}function be(){g.value.length>0&&i(`confirm`,[...g.value])}function xe(){S.value=!S.value,S.value?_.value&&G(_.value):Se()}function Se(){N&&=(N.abort(),null),w.value=[],T.value=!1,k.value=0,C.value=!1}function Ce(){_.value=``,S.value&&Se()}function we(){S.value&&_.value.trim()&&G(_.value.trim())}let Te=null;p(_,e=>{if(S.value){if(Te&&clearTimeout(Te),!e.trim()){Se();return}Te=setTimeout(()=>{G(e.trim())},500)}});async function G(e){N&&N.abort(),N=new AbortController,C.value=!0,w.value=[],T.value=!1,k.value=0;try{let t=new URLSearchParams({q:e,mode:r.mode===`directory`?`directory`:r.mode===`file`?`file`:`all`,limit:`200`}),n=await fetch(`${r.apiBase}/fs/search?${t}`,{signal:N.signal});if(!n.ok){let e=`HTTP ${n.status}`;try{e=(await n.json()).error||e}catch{e=c(`error.searchFailed`)}w.value=[],C.value=!1;return}let i=await n.json();w.value=i.items||[],T.value=i.truncated||!1,k.value=i.elapsed||0,A.value=i.engine||``}catch(e){if(e.name===`AbortError`)return;console.warn(`[globalSearch] 搜索失败:`,e.message),w.value=[]}finally{C.value=!1}}function Ee(e){if(!e)return``;let t=e.replace(/[/\\]/g,`/`).split(`/`);return t.pop(),t.join(`/`)}async function De(){try{await fetch(`${r.apiBase}/fs/reindex`,{method:`POST`}),M.value={...M.value,status:`indexing`};let e=setInterval(async()=>{await le(),(M.value.status===`ready`||M.value.status===`error`)&&clearInterval(e)},2e3)}catch{}}function K(e){if(!e||e===0)return`0 B`;let t=1024,n=[`B`,`KB`,`MB`,`GB`],r=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/t**r).toFixed(2))} ${n[r]}`}function Oe(e){if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}`}function q(e){return e.kind===`directory`?`#a78bfa`:Fs((e.ext||``).replace(`.`,``))}return p(()=>r.visible,async e=>{if(e){g.value=[],_.value=``,d.value=``,Se();let e=await L();await se(),await le(),await ue(e||``)}else Se()}),(t,n)=>(y(),P(te,{to:`body`},[e.visible?(y(),U(`div`,{key:0,class:`modal-overlay`,onClick:n[10]||=oe(e=>t.$emit(`close`),[`self`])},[F(`div`,{class:z([`modal-container`,{"modal-theme-light":e.theme===`light`}])},[F(`div`,Bs,[F(`h3`,Vs,[o(zs,{name:e.mode===`file`?`file`:`folder`,size:18,color:l.value},null,8,[`name`,`color`]),b(` `+O(c(e.mode===`file`?`modal.title.file`:`modal.title.directory`)),1)]),F(`button`,{class:`close-btn`,onClick:n[0]||=e=>t.$emit(`close`),title:c(`modal.close`)},[o(zs,{name:`close`,size:16})],8,Hs)]),F(`div`,Us,[F(`button`,{class:`tool-btn`,onClick:B,disabled:!m.value,title:c(`tooltip.back`)},[o(zs,{name:`arrowUp`,size:14}),b(` `+O(c(`modal.up`)),1)],8,Ws),F(`button`,{class:`tool-btn`,onClick:de,title:c(`tooltip.home`)},[o(zs,{name:`home`,size:14}),b(` `+O(c(`modal.home`)),1)],8,Gs),F(`button`,{class:`tool-btn`,onClick:me,title:c(`tooltip.refresh`)},[o(zs,{name:`refresh`,size:14})],8,Ks),F(`div`,qs,[(y(!0),U(H,null,a(I.value,(e,t)=>(y(),U(`span`,{key:t,class:`breadcrumb-item`,onClick:e=>pe(t)},[F(`span`,Ys,O(e.label),1),t<I.value.length-1?(y(),U(`span`,Xs,`/`)):D(``,!0)],8,Js))),128))])]),F(`div`,Zs,[o(zs,{name:`search`,size:16,color:`#8b91a8`,class:`search-icon`}),E(F(`input`,{"onUpdate:modelValue":n[1]||=e=>_.value=e,type:`text`,class:`search-input`,placeholder:S.value?c(`search.placeholderGlobal`,{type:c(`search.type.`+(e.mode===`file`?`file`:e.mode===`directory`?`directory`:`all`))}):c(`search.placeholderLocal`),onKeydown:j(we,[`enter`])},null,40,Qs),[[ce,_.value]]),_.value?(y(),U(`button`,{key:0,class:`clear-search`,onClick:Ce},[o(zs,{name:`close`,size:14})])):D(``,!0),F(`div`,{class:`global-toggle`,title:S.value?c(`tooltip.globalSearchOn`):c(`tooltip.globalSearchOff`)},[F(`span`,ec,O(c(`search.globalLabel`)),1),F(`button`,{class:z([`toggle-switch`,{active:S.value}]),onClick:xe},[...n[11]||=[F(`span`,{class:`toggle-knob`},null,-1)]],2)],8,$s),S.value?(y(),U(`div`,{key:1,class:z([`index-status`,M.value.status]),title:M.value.status===`ready`?c(`tooltip.indexReady`,{totalFiles:M.value.totalFiles,scannedRoots:(M.value.scannedRoots||[]).join(`, `)||`unknown`}):M.value.status===`indexing`?c(`tooltip.indexing`,{indexedFiles:M.value.indexedFiles,currentDir:M.value.currentDir||``}):c(`tooltip.indexIdle`),onClick:n[2]||=e=>M.value.status!==`indexing`&&De()},[n[12]||=F(`span`,{class:`status-dot`},null,-1),F(`span`,nc,O(M.value.status===`ready`?c(`status.indexReady`):M.value.status===`indexing`?c(`status.indexing`):c(`status.indexIdle`)),1)],10,tc)):D(``,!0)]),F(`div`,rc,[F(`div`,ic,[F(`div`,ac,[F(`div`,oc,O(c(`sidebar.quickAccess`)),1),F(`div`,{class:`sidebar-item`,onClick:de},[o(zs,{name:`home`,size:15}),b(` `+O(c(`sidebar.home`)),1)]),ee.value?(y(),U(`div`,{key:0,class:`sidebar-item`,onClick:n[3]||=e=>fe(ee.value)},[o(zs,{name:`monitor`,size:15}),b(` `+O(c(`sidebar.desktop`)),1)])):D(``,!0),ne.value?(y(),U(`div`,{key:1,class:`sidebar-item`,onClick:n[4]||=e=>fe(ne.value)},[o(zs,{name:`file`,size:15}),b(` `+O(c(`sidebar.documents`)),1)])):D(``,!0),re.value?(y(),U(`div`,{key:2,class:`sidebar-item`,onClick:n[5]||=e=>fe(re.value)},[o(zs,{name:`download`,size:15}),b(` `+O(c(`sidebar.downloads`)),1)])):D(``,!0)]),v.value.length?(y(),U(`div`,sc,[F(`div`,cc,O(c(`sidebar.drives`)),1),(y(!0),U(H,null,a(v.value,e=>(y(),U(`div`,{key:e,class:z([`sidebar-item`,{active:f.value===e}]),onClick:t=>fe(e)},[o(zs,{name:`hardDrive`,size:15}),b(` `+O(e),1)],10,lc))),128))])):D(``,!0)]),F(`div`,{class:`file-list-container`,onClick:oe(_e,[`self`])},[u.value?(y(),U(`div`,uc,[n[13]||=F(`span`,{class:`spinner`},null,-1),b(` `+O(c(`state.loading`)),1)])):d.value?(y(),U(`div`,dc,[o(zs,{name:`circleX`,size:18,color:`currentColor`}),b(` `+O(d.value),1)])):C.value?(y(),U(`div`,fc,[n[14]||=F(`span`,{class:`spinner`},null,-1),b(` `+O(c(`state.globalSearching`)),1)])):ae.value.length===0?(y(),U(`div`,pc,O(_.value?c(`state.emptySearch`):c(`state.emptyDir`)),1)):(y(),U(`div`,mc,[w.value.length>0?(y(),U(`div`,hc,[o(zs,{name:`search`,size:14,color:`#8b91a8`}),F(`span`,{innerHTML:c(`results.found`,{count:w.value.length})},null,8,gc),T.value?(y(),U(`span`,_c,O(c(`results.truncated`)),1)):D(``,!0),F(`span`,{class:z([`engine-badge`,A.value])},O(A.value===`index`?c(`search.engineIndex`):c(`search.engineWalk`)),3),F(`span`,vc,O(k.value)+O(c(`unit.ms`)),1)])):D(``,!0),e.mode===`directory`&&!ie.value?(y(),U(`div`,{key:1,class:z([`file-row select-current-dir`,{selected:he(f.value)}]),onClick:[n[6]||=oe(e=>ge(f.value),[`exact`]),n[7]||=oe(e=>ge(f.value),[`ctrl`]),n[8]||=oe(e=>ge(f.value),[`meta`])]},[o(zs,{name:`circleCheck`,size:18,color:`#a78bfa`,class:`file-icon`}),F(`span`,yc,O(c(`fileRow.selectCurrent`)),1),F(`span`,bc,O(f.value),1)],2)):D(``,!0),(y(!0),U(H,null,a(ae.value,e=>(y(),U(`div`,{key:e.path,class:z([`file-row`,{selected:he(e.path),"is-directory":e.kind===`directory`}]),onClick:[oe(t=>ve(e),[`exact`]),oe(t=>W(e),[`ctrl`]),oe(t=>W(e),[`meta`])],onDblclick:t=>ye(e)},[o(zs,{name:e.kind===`directory`?`folder`:`file`,size:18,color:q(e),class:`file-icon`},null,8,[`name`,`color`]),F(`span`,{class:`file-name`,title:e.name},O(e.name),9,Sc),ie.value?(y(),U(`span`,{key:0,class:`file-parent-path`,title:e.path},O(Ee(e.path)),9,Cc)):D(``,!0),e.kind===`file`?(y(),U(`span`,{key:1,class:`file-size`,title:K(e.size)},O(K(e.size)),9,wc)):D(``,!0),e.modified?(y(),U(`span`,{key:2,class:`file-modified`,title:e.modified},O(Oe(e.modified)),9,Tc)):D(``,!0)],42,xc))),128))]))])]),F(`div`,Ec,[F(`div`,Dc,[g.value.length===0?(y(),U(`span`,Oc,O(c(e.mode===`file`?`footer.unselectedFile`:`footer.unselectedDir`)),1)):e.multiple?(y(),U(`span`,Ac,[F(`span`,{innerHTML:c(`footer.selected`,{count:g.value.length})},null,8,jc)])):(y(),U(`span`,{key:1,class:`has-selection single-path`,title:g.value[0]},O(g.value[0]),9,kc))]),F(`div`,Mc,[F(`button`,{class:`btn btn-cancel`,onClick:n[9]||=e=>t.$emit(`close`)},O(c(`footer.cancel`)),1),F(`button`,{class:`btn btn-confirm`,disabled:g.value.length===0,onClick:be},O(c(`footer.confirm`)),9,Nc)])])],2)])):D(``,!0)]))}},[[`__scopeId`,`data-v-6e4a8b86`]]),Ic={plus:[`M12 5v14M5 12h14`],close:[`M18 6 6 18M6 6l12 12`],chevronDown:[`m6 9 6 6 6-6`],chevronUp:[`m18 15-6-6-6 6`],chevronRight:[`m9 18 6-6-6-6`],chevronLeft:[`m15 18-6-6 6-6`],check:[`M20 6 9 17l-5-5`],search:[`m21 21-4.35-4.35`,`M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z`],refresh:[`M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,`M3 3v5h5`,`M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16`,`M21 21v-5h-5`],copy:[`M9 17H7A5 5 0 0 1 7 7h2`,`M15 7h2a5 5 0 0 1 0 10h-2`,`M8 12h8`],trash:[`M3 6h18`,`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`],edit:[`M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,`M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5Z`],cpu:[`M18 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2Z`,`M9 9h6v6H9z`,`M9 1v3M15 1v3M9 20v3M15 20v3M1 9h3M1 15h3M20 9h3M20 15h3`],zap:[`M13 2 3 14h9l-1 8 10-12h-9l1-8Z`],globe:[`M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Z`,`M2 12h20`,`M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10A15.3 15.3 0 0 1 12 2Z`],key:[`M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0 3 3L22 7l-3-3m-3.5 3.5L19 4`],server:[`M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v2Z`,`M13 5v2M13 17v2M13 11v2`],tag:[`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,`M7.5 7.5h.01`],checkCircle:[`M22 11.08V12a10 10 0 1 1-5.93-9.14`,`M22 4 12 14.01l-3-3`],alertCircle:[`M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z`,`M12 8v4M12 16h.01`],xCircle:[`m14.5 9.5-5 5m0-5 5 5`,`M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z`],loader:[`M21 12a9 9 0 1 1-6.219-8.56`],eye:[`M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z`,`M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z`],eyeOff:[`M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94`,`M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19`,`M1 1l22 22`],settings:[`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2Z`,`M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z`],link:[`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`],list:[`M3 12h.01M3 6h.01M3 18h.01M8 12h13M8 6h13M8 18h13`],star:[`M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2Z`],sun:[`M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z`,`M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42`],moon:[`M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z`]},Lc=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Rc=[`width`,`height`,`stroke`,`stroke-width`],zc=[`d`],Bc=Lc({__name:`SvgIcon`,props:{name:{type:String,required:!0},size:{type:[Number,String],default:16},color:{type:String,default:null},strokeWidth:{type:[Number,String],default:1.75},className:{type:String,default:``},style:{type:[String,Object],default:null}},setup(e){let t=e,n=R(()=>Ic[t.name]??[`M12 12m-1 0a1 1 0 1 0 2 0 1 1 0 0 0-2 0`]);return(t,r)=>(y(),U(`svg`,{width:e.size,height:e.size,viewBox:`0 0 24 24`,fill:`none`,stroke:e.color||`currentColor`,"stroke-width":e.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:z([`svg-icon`,e.className]),style:ne(e.style),"aria-hidden":`true`},[(y(!0),U(H,null,a(n.value,(e,t)=>(y(),U(`path`,{key:t,d:e},null,8,zc))),128))],14,Rc))}},[[`__scopeId`,`data-v-833e113a`]]),Vc={"zh-CN":{endpoint:`接口地址`,endpointPlaceholder:`选择或输入接口地址`,apiKey:`API Key`,apiKeyPlaceholder:`输入 API Key`,model:`模型`,modelPlaceholder:`选择或输入模型`,displayName:`显示名称`,displayNamePlaceholder:`默认使用模型名称`,errEndpointRequired:`请填写接口地址`,errModelRequired:`请填写模型`,loadingModels:`加载模型列表…`,testing:`测试中…`,test:`测试`,saving:`保存中…`,save:`保存模型`,okDefault:`连接成功`,failDefault:`连接失败`,saveFailDefault:`保存失败`,networkError:`网络错误`,cancel:`取消`,provider:{openai:`OpenAI`,anthropic:`Anthropic (Claude)`,deepseek:`DeepSeek`,gemini:`Google (Gemini)`,xai:`xAI (Grok)`,meta:`Meta (Llama)`,mistral:`Mistral AI`,minimax:`MiniMax`,moonshot:`Moonshot (Kimi)`,zhipu:`智谱 (GLM)`,qwen:`阿里 (Qwen)`,cohere:`Cohere`,groq:`Groq`,together:`Together AI`,openrouter:`OpenRouter`,ollama:`Ollama (本地)`}},"en-US":{endpoint:`Endpoint`,endpointPlaceholder:`Select or type an endpoint URL`,apiKey:`API Key`,apiKeyPlaceholder:`Enter API Key`,model:`Model`,modelPlaceholder:`Select or type a model`,displayName:`Display Name`,displayNamePlaceholder:`Defaults to model name`,errEndpointRequired:`Endpoint is required`,errModelRequired:`Model is required`,loadingModels:`Loading models…`,testing:`Testing…`,test:`Test`,saving:`Saving…`,save:`Save Model`,okDefault:`Connection succeeded`,failDefault:`Connection failed`,saveFailDefault:`Save failed`,networkError:`Network error`,cancel:`Cancel`,provider:{openai:`OpenAI`,anthropic:`Anthropic (Claude)`,deepseek:`DeepSeek`,gemini:`Google (Gemini)`,xai:`xAI (Grok)`,meta:`Meta (Llama)`,mistral:`Mistral AI`,minimax:`MiniMax`,moonshot:`Moonshot (Kimi)`,zhipu:`Zhipu (GLM)`,qwen:`Alibaba (Qwen)`,cohere:`Cohere`,groq:`Groq`,together:`Together AI`,openrouter:`OpenRouter`,ollama:`Ollama (local)`}}},Hc=Object.keys(Vc),Uc=`zh-CN`;function Wc(e){return e&&Vc[e]?e:Uc}function Gc(e){let t=R(()=>Vc[Wc(e.value)]||Vc[Uc]);function n(e){let n=e.split(`.`),r=t.value;for(let t of n){if(r==null)return e;r=r[t]}return r??e}return{t:n,locale:R(()=>Wc(e.value))}}var Kc={class:`field`},qc={class:`field-label`},Jc={class:`combo-input-row`},Yc=[`src`,`alt`],Xc=[`placeholder`],Zc={key:0,class:`dropdown`},Qc=[`onMousedown`],$c=[`src`,`alt`],el={class:`item-label`},tl={class:`item-url`},nl={key:0,class:`field-error`},rl={class:`field`},il={class:`field-label`},al={class:`input-wrap`},ol=[`type`,`placeholder`],sl={class:`field`},cl={class:`field-label`},ll={class:`combo-input-row`},ul=[`placeholder`],dl={key:0,class:`dropdown`},fl={key:0,class:`dropdown-loading`},pl=[`onMousedown`],ml={class:`item-label`},hl={key:0,class:`item-url`},gl={key:0,class:`field-error`},_l={class:`field`},vl={class:`field-label`},yl={class:`input-wrap`},bl=[`placeholder`],xl={class:`actions`},Sl={class:`actions-right`},Cl=[`disabled`],wl=[`disabled`],Tl=`https://cdn.jsdelivr.net/npm/@lobehub/icons-static-png`,El=Lc({__name:`AddModelForm`,props:{apiBase:{type:String,default:`/api/ai-model`},initial:{type:Object,default:null},theme:{type:String,default:`dark`},locale:{type:String,default:Uc,validator:e=>Hc.includes(e)||e==null||e===``}},emits:[`save`,`cancel`,`test-success`,`test-fail`],setup(e,{emit:t}){let n=e,{t:r}=Gc(R(()=>Wc(n.locale))),i={"--bg":`#0F172A`,"--bg-surface":`#1E293B`,"--bg-elevated":`#293548`,"--border":`#334155`,"--border-focus":`#3B82F6`,"--primary":`#3B82F6`,"--primary-hover":`#2563EB`,"--primary-dim":`rgba(59,130,246,.12)`,"--success":`#10B981`,"--success-dim":`rgba(16,185,129,.12)`,"--error":`#EF4444`,"--error-dim":`rgba(239,68,68,.12)`,"--warning":`#F59E0B`,"--text":`#E2E8F0`,"--text-dim":`#94A3B8`,"--text-muted":`#475569`,"--font":`'Inter', system-ui, -apple-system, sans-serif`,"--radius":`8px`,"--radius-lg":`12px`,"--t":`150ms ease`},s={"--bg":`#F8FAFC`,"--bg-surface":`#FFFFFF`,"--bg-elevated":`#F1F5F9`,"--border":`#E2E8F0`,"--border-focus":`#2563EB`,"--primary":`#2563EB`,"--primary-hover":`#1D4ED8`,"--primary-dim":`rgba(37,99,235,.1)`,"--success":`#059669`,"--success-dim":`rgba(5,150,105,.1)`,"--error":`#DC2626`,"--error-dim":`rgba(220,38,38,.1)`,"--warning":`#D97706`,"--text":`#0F172A`,"--text-dim":`#475569`,"--text-muted":`#94A3B8`,"--font":`'Inter', system-ui, -apple-system, sans-serif`,"--radius":`8px`,"--radius-lg":`12px`,"--t":`150ms ease`},c=R(()=>n.theme===`light`?s:i);function l(e){return e.endsWith(`-color`)?`${Tl}/dark/${e}.png`:`${Tl}/${n.theme}/${e}.png`}let u=t,d=V({endpoint:n.initial?.endpoint??``,modelName:n.initial?.modelName??``,displayName:n.initial?.displayName??``,apiKey:n.initial?.apiKey??``}),f=V({endpoint:``,modelName:``}),m=V(!1),h=V(!1),g=V(!1),_=V(null),v=V(!1),x=V(null),S=V(``),C=V(!1),w=V(null),k=V(``),A=V(!1),M=V([]),N=[{id:`openai`,url:`https://api.openai.com/v1`,icon:`openai`},{id:`anthropic`,url:`https://api.anthropic.com/v1`,icon:`claude-color`},{id:`deepseek`,url:`https://api.deepseek.com/v1`,icon:`deepseek-color`},{id:`gemini`,url:`https://generativelanguage.googleapis.com/v1beta/openai`,icon:`gemini-color`},{id:`xai`,url:`https://api.x.ai/v1`,icon:`grok`},{id:`meta`,url:`https://api.llama-api.com/v1`,icon:`meta-color`},{id:`mistral`,url:`https://api.mistral.ai/v1`,icon:`mistral-color`},{id:`minimax`,url:`https://api.minimaxi.com/v1`,icon:`minimax-color`},{id:`moonshot`,url:`https://api.moonshot.cn/v1`,icon:`kimi-color`},{id:`zhipu`,url:`https://open.bigmodel.cn/api/paas/v4`,icon:`zhipu-color`},{id:`qwen`,url:`https://dashscope.aliyuncs.com/compatible-mode/v1`,icon:`qwen-color`},{id:`cohere`,url:`https://api.cohere.com/v2`,icon:`cohere-color`},{id:`groq`,url:`https://api.groq.com/openai/v1`,icon:`groq`},{id:`together`,url:`https://api.together.xyz/v1`,icon:`together-color`},{id:`openrouter`,url:`https://openrouter.ai/api/v1`,icon:`openrouter`},{id:`ollama`,url:`http://localhost:11434/v1`,icon:`ollama`}],ee=R(()=>N.map(e=>({...e,label:r(`provider.${e.id}`)}))),te=R(()=>ee.value.find(e=>e.url===d.value.endpoint)),ie=R(()=>{let e=ee.value,t=S.value.toLowerCase();return t?e.filter(e=>e.label.toLowerCase().includes(t)||e.url.toLowerCase().includes(t)):e});function ae(){S.value=d.value.endpoint,v.value=!0,_.value=null}function I(){v.value=!v.value,v.value&&x.value?.focus()}function L(e){e&&(d.value.endpoint=e.url,S.value=e.url,v.value=!1,f.value.endpoint=``,_.value=null,_e(e.url))}function se(){setTimeout(()=>{v.value=!1},150)}let le=R(()=>{let e=k.value.toLowerCase();return e?M.value.filter(t=>t.id.toLowerCase().includes(e)||(t.desc||``).toLowerCase().includes(e)):M.value});function ue(){k.value=d.value.modelName,C.value=!0,_.value=null}function de(){C.value=!C.value,C.value&&(w.value?.focus(),!M.value.length&&d.value.endpoint&&_e(d.value.endpoint))}function me(e){e&&(d.value.modelName=e.id,k.value=e.id,C.value=!1,f.value.modelName=``,_.value=null)}function he(){C.value=!0,!M.value.length&&d.value.endpoint&&_e(d.value.endpoint)}function ge(){setTimeout(()=>{C.value=!1},150)}async function _e(e){if(e){A.value=!0;try{let t={},r=d.value.apiKey.trim();r&&(t[`x-api-key`]=r);let i=await fetch(`${n.apiBase}/models?endpoint=${encodeURIComponent(e)}`,{headers:t});i.ok&&(M.value=((await i.json()).models||[]).map(e=>typeof e==`string`?{id:e}:e))}catch{}finally{A.value=!1}}}p(()=>n.initial,e=>{d.value={endpoint:e?.endpoint??``,modelName:e?.modelName??``,displayName:e?.displayName??``,apiKey:e?.apiKey??``},f.value={endpoint:``,modelName:``},_.value=null,S.value=``,k.value=``,M.value=[]}),p(()=>d.value.apiKey,(e,t)=>{(t&&t.trim().length>0)!==(e&&e.trim().length>0)&&d.value.endpoint&&_e(d.value.endpoint)});function ve(){f.value={endpoint:``,modelName:``};let e=!0;return d.value.endpoint.trim()||(f.value.endpoint=r(`errEndpointRequired`),e=!1),d.value.modelName.trim()||(f.value.modelName=r(`errModelRequired`),e=!1),e}async function W(){if(ve()){g.value=!0,_.value=null;try{let e=await fetch(`${n.apiBase}/test`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({endpoint:d.value.endpoint,modelName:d.value.modelName,apiKey:d.value.apiKey})}),t=await e.json();e.ok&&t.ok?(_.value={ok:!0,message:t.message||r(`okDefault`)},u(`test-success`,t)):(_.value={ok:!1,message:t.message||r(`failDefault`)},u(`test-fail`,t))}catch(e){_.value={ok:!1,message:`${r(`networkError`)}: ${e.message}`},u(`test-fail`,{message:e.message})}finally{g.value=!1}}}async function ye(){if(ve()){h.value=!0;try{let e={endpoint:d.value.endpoint.trim(),modelName:d.value.modelName.trim(),displayName:d.value.displayName.trim()||d.value.modelName.trim(),apiKey:d.value.apiKey},t=await fetch(`${n.apiBase}/models`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}),i=await t.json();t.ok?u(`save`,{...e,id:i.id}):_.value={ok:!1,message:i.message||r(`saveFailDefault`)}}catch(e){_.value={ok:!1,message:`${r(`networkError`)}: ${e.message}`}}finally{h.value=!1}}}return p(()=>[d.value.endpoint,d.value.modelName,d.value.apiKey],()=>{_.value=null}),(e,t)=>(y(),U(`div`,{class:`form-wrap`,style:ne(c.value)},[F(`div`,Kc,[F(`label`,qc,[b(O(B(r)(`endpoint`))+` `,1),t[19]||=F(`span`,{class:`required`},`*`,-1)]),F(`div`,{class:z([`combobox`,{open:v.value,error:f.value.endpoint}])},[F(`div`,Jc,[te.value?(y(),U(`img`,{key:0,class:`field-icon provider-logo`,src:l(te.value.icon),alt:te.value.label,width:`16`,height:`16`,onError:t[0]||=e=>e.target.style.display=`none`},null,40,Yc)):(y(),P(Bc,{key:1,name:`globe`,size:15,color:`var(--text-dim)`,class:`field-icon`})),E(F(`input`,{ref_key:`endpointInputRef`,ref:x,"onUpdate:modelValue":t[1]||=e=>d.value.endpoint=e,class:`combo-input`,placeholder:B(r)(`endpointPlaceholder`),autocomplete:`off`,onFocus:t[2]||=e=>v.value=!0,onBlur:se,onInput:ae,onKeydown:[t[3]||=j(oe(e=>L(ie.value[0]),[`prevent`]),[`enter`]),t[4]||=j(e=>v.value=!1,[`escape`]),t[5]||=j(e=>v.value=!1,[`tab`])]},null,40,Xc),[[ce,d.value.endpoint]]),d.value.endpoint?(y(),U(`button`,{key:2,type:`button`,class:`combo-clear`,tabindex:`-1`,onMousedown:t[6]||=oe(e=>{d.value.endpoint=``,v.value=!1},[`prevent`])},[o(Bc,{name:`close`,size:12,color:`var(--text-dim)`})],32)):D(``,!0),F(`button`,{type:`button`,class:`combo-arrow`,tabindex:`-1`,onMousedown:oe(I,[`prevent`])},[o(Bc,{name:v.value?`chevronUp`:`chevronDown`,size:14,color:`var(--text-dim)`},null,8,[`name`])],32)]),v.value&&ie.value.length?(y(),U(`div`,Zc,[(y(!0),U(H,null,a(ie.value,e=>(y(),U(`button`,{key:e.url,type:`button`,class:z([`dropdown-item has-logo`,{active:d.value.endpoint===e.url}]),onMousedown:oe(t=>L(e),[`prevent`])},[F(`img`,{class:`item-logo`,src:l(e.icon),alt:e.label,width:`16`,height:`16`,onError:t[7]||=e=>e.target.style.display=`none`},null,40,$c),F(`span`,el,O(e.label),1),F(`span`,tl,O(e.url),1),d.value.endpoint===e.url?(y(),P(Bc,{key:0,name:`check`,size:13,color:`var(--primary)`,class:`item-check`})):D(``,!0)],42,Qc))),128))])):D(``,!0)],2),f.value.endpoint?(y(),U(`span`,nl,[o(Bc,{name:`alertCircle`,size:12,color:`var(--error)`}),b(` `+O(f.value.endpoint),1)])):D(``,!0)]),F(`div`,rl,[F(`label`,il,O(B(r)(`apiKey`)),1),F(`div`,al,[o(Bc,{name:`key`,size:15,color:`var(--text-dim)`,class:`field-icon`}),E(F(`input`,{"onUpdate:modelValue":t[8]||=e=>d.value.apiKey=e,type:m.value?`text`:`password`,class:`text-input has-two-right`,placeholder:B(r)(`apiKeyPlaceholder`),autocomplete:`new-password`,spellcheck:`false`},null,8,ol),[[re,d.value.apiKey]]),E(F(`button`,{type:`button`,class:`eye-btn`,style:{right:`34px`},tabindex:`-1`,onClick:t[9]||=e=>d.value.apiKey=``},[o(Bc,{name:`close`,size:12,color:`var(--text-dim)`})],512),[[fe,d.value.apiKey]]),F(`button`,{type:`button`,class:`eye-btn`,tabindex:`-1`,onClick:t[10]||=e=>m.value=!m.value},[o(Bc,{name:m.value?`eyeOff`:`eye`,size:15,color:`var(--text-dim)`},null,8,[`name`])])])]),F(`div`,sl,[F(`label`,cl,[b(O(B(r)(`model`))+` `,1),t[20]||=F(`span`,{class:`required`},`*`,-1)]),F(`div`,{class:z([`combobox`,{open:C.value,error:f.value.modelName}])},[F(`div`,ll,[o(Bc,{name:`cpu`,size:15,color:`var(--text-dim)`,class:`field-icon`}),E(F(`input`,{ref_key:`modelInputRef`,ref:w,"onUpdate:modelValue":t[11]||=e=>d.value.modelName=e,class:`combo-input`,placeholder:B(r)(`modelPlaceholder`),autocomplete:`off`,onFocus:he,onBlur:ge,onInput:ue,onKeydown:[t[12]||=j(oe(e=>me(le.value[0]),[`prevent`]),[`enter`]),t[13]||=j(e=>C.value=!1,[`escape`]),t[14]||=j(e=>C.value=!1,[`tab`])]},null,40,ul),[[ce,d.value.modelName]]),d.value.modelName?(y(),U(`button`,{key:0,type:`button`,class:`combo-clear`,tabindex:`-1`,onMousedown:t[15]||=oe(e=>{d.value.modelName=``,C.value=!1},[`prevent`])},[o(Bc,{name:`close`,size:12,color:`var(--text-dim)`})],32)):D(``,!0),F(`button`,{type:`button`,class:`combo-arrow`,tabindex:`-1`,onMousedown:oe(de,[`prevent`])},[o(Bc,{name:C.value?`chevronUp`:`chevronDown`,size:14,color:`var(--text-dim)`},null,8,[`name`])],32)]),C.value&&le.value.length?(y(),U(`div`,dl,[A.value?(y(),U(`div`,fl,[o(Bc,{name:`loader`,size:14,color:`var(--text-dim)`,class:`spin`}),F(`span`,null,O(B(r)(`loadingModels`)),1)])):(y(!0),U(H,{key:1},a(le.value,e=>(y(),U(`button`,{key:e.id,type:`button`,class:z([`dropdown-item`,{active:d.value.modelName===e.id}]),onMousedown:oe(t=>me(e),[`prevent`])},[F(`span`,ml,O(e.id),1),e.desc?(y(),U(`span`,hl,O(e.desc),1)):D(``,!0),d.value.modelName===e.id?(y(),P(Bc,{key:1,name:`check`,size:13,color:`var(--primary)`,class:`item-check`})):D(``,!0)],42,pl))),128))])):D(``,!0)],2),f.value.modelName?(y(),U(`span`,gl,[o(Bc,{name:`alertCircle`,size:12,color:`var(--error)`}),b(` `+O(f.value.modelName),1)])):D(``,!0)]),F(`div`,_l,[F(`label`,vl,O(B(r)(`displayName`)),1),F(`div`,yl,[o(Bc,{name:`tag`,size:15,color:`var(--text-dim)`,class:`field-icon`}),E(F(`input`,{"onUpdate:modelValue":t[16]||=e=>d.value.displayName=e,class:`text-input`,placeholder:B(r)(`displayNamePlaceholder`),autocomplete:`off`},null,8,bl),[[ce,d.value.displayName]]),E(F(`button`,{type:`button`,class:`eye-btn`,tabindex:`-1`,onClick:t[17]||=e=>d.value.displayName=``},[o(Bc,{name:`close`,size:12,color:`var(--text-dim)`})],512),[[fe,d.value.displayName]])])]),o(pe,{name:`banner`},{default:T(()=>[_.value?(y(),U(`div`,{key:0,class:z([`test-banner`,_.value.ok?`ok`:`fail`])},[o(Bc,{name:_.value.ok?`checkCircle`:`xCircle`,size:15,color:_.value.ok?`var(--success)`:`var(--error)`},null,8,[`name`,`color`]),F(`span`,null,O(_.value.message),1)],2)):D(``,!0)]),_:1}),F(`div`,xl,[F(`button`,{type:`button`,class:`btn btn-ghost`,onClick:t[18]||=e=>u(`cancel`)},O(B(r)(`cancel`)),1),F(`div`,Sl,[F(`button`,{type:`button`,class:`btn btn-outline`,disabled:g.value,onClick:W},[g.value?(y(),P(Bc,{key:0,name:`loader`,size:14,color:`currentColor`,class:`spin`})):(y(),P(Bc,{key:1,name:`zap`,size:14,color:`currentColor`})),b(` `+O(g.value?B(r)(`testing`):B(r)(`test`)),1)],8,Cl),F(`button`,{type:`button`,class:`btn btn-primary`,disabled:h.value,onClick:ye},[h.value?(y(),P(Bc,{key:0,name:`loader`,size:14,color:`currentColor`,class:`spin`})):(y(),P(Bc,{key:1,name:`check`,size:14,color:`currentColor`})),b(` `+O(h.value?B(r)(`saving`):B(r)(`save`)),1)],8,wl)])])],4))}},[[`__scopeId`,`data-v-cc2c26ba`]]),Dl=Object.create,Ol=Object.defineProperty,kl=Object.getOwnPropertyDescriptor,Al=Object.getOwnPropertyNames,jl=Object.getPrototypeOf,Ml=Object.prototype.hasOwnProperty,Nl=(e,t)=>function(){return t||(0,e[Al(e)[0]])((t={exports:{}}).exports,t),t.exports},Pl=e=>{let t={};for(var n in e)Ol(t,n,{get:e[n],enumerable:!0});return t},Fl=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Al(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Ml.call(e,s)&&s!==n&&Ol(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=kl(t,s))||r.enumerable});return e},Il=(e,t,n)=>(n=e==null?{}:Dl(jl(e)),Fl(t||!e||!e.__esModule?Ol(n,`default`,{value:e,enumerable:!0}):n,e));function Ll(e,t,n,r){let i=Number(e[t].meta.id+1).toString(),a=``;return typeof r.docId==`string`&&(a=`-${r.docId}-`),a+i}function Rl(e,t){let n=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(n+=`:${e[t].meta.subId}`),`[${n}]`}function zl(e,t,n,r,i){let a=i.rules.footnote_anchor_name(e,t,n,r,i),o=i.rules.footnote_caption(e,t,n,r,i),s=a;return e[t].meta.subId>0&&(s+=`:${e[t].meta.subId}`),`<sup class="footnote-ref"><a href="#fn${a}" id="fnref${s}">${o}</a></sup>`}function Bl(e,t,n){return(n.xhtmlOut?`<hr class="footnotes-sep" />
|
|
5
5
|
`:`<hr class="footnotes-sep">
|
|
6
6
|
`)+`<section class="footnotes">
|
|
7
7
|
<ol class="footnotes-list">
|
|
@@ -76,16 +76,16 @@ import{a as e,n as t,r as n,t as r}from"./rolldown-runtime-CMxvf4Kt.js";import{A
|
|
|
76
76
|
`))return t;let i=e.slice(t,n),a=r.push(`text`,``,0);return a.content=i,n};if(/^\*[^*]+/.test(r.src))return!1;if(r.src[r.pos]===`$`){let e=r.pos+1;for(;r.src[e]===`$`;)e++;let t=e-r.pos,n=r.src[e];if(t>=3&&(!n||/\s/.test(n))){let t=r.push(`text`,``,0);return t.content=r.src.slice(r.pos,e),r.pos=e,!0}}let s=[[`$$`,`$$`],[`$`,`$`],[`\\(`,`\\)`]],c=String(r.pending??``),l=Math.max(0,r.pos-c.length),u=l,d=l,f=l;for(let[e,c]of s){let s=r.src,l=Mb(s),p=Pb(s,a),m=!1;e===`$$`&&u!==f&&(u=f);let h=-1,g=-1,_=0,v=n=>{if((n===`undefined`||n==null)&&(n=``),n===`\\`){r.pos+=n.length,u=r.pos;return}if(n===`\\)`||n===`\\(`){let e=r.push(`text_special`,``,0);e.content=n===`\\)`?`)`:`(`,e.markup=n,r.pos+=n.length,u=r.pos;return}if(!n)return;if(e===`$$`&&n.includes(`$`)){let e=0;for(;e<n.length;){let i=Ib(n,e);if(i===-1){let t=n.slice(e);if(t){let e=r.push(`text`,``,0);e.content=t,r.pos+=t.length,u=r.pos}break}if(i>0&&n[i-1]===`$`||i+1<n.length&&n[i+1]===`$`){let t=n.slice(e,i+1);if(t){let e=r.push(`text`,``,0);e.content=t,r.pos+=t.length,u=r.pos}e=i+1;continue}let a=n.slice(e,i);if(a){let e=r.push(`text`,``,0);e.content=a,r.pos+=a.length,u=r.pos}let o=Lb(n,i+1);if(o===-1){let e=n.slice(i),t=r.push(`text`,``,0);t.content=e,r.pos+=e.length,u=r.pos;break}let s=n.slice(i+1,o),c=s.includes("`"),l=!s||!s.trim(),d=n[o+1],f=nx(s,d),p=ix(s);if(!c&&!l&&!f&&!p){let n=r.push(`math_inline`,`math`,0);n.content=Ab(s,t),n.markup=`$`,n.raw=`$${s}$`,n.loading=!1,r.pos+=o-i+1,u=r.pos,e=o+1;continue}let m=r.push(`text`,``,0);m.content=`$`,r.pos+=1,u=r.pos,e=i+1}return}let i=n.indexOf(`![`);if(i!==-1){if(i>0){let e=n.slice(0,i),t=r.push(`text`,``,0);t.content=e,r.pos+=e.length,u=r.pos}let e=n.slice(i).match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(e){let[,t,a]=e,o=a.match(/^(\S+)(?:\s+"([^"]+)")?\s*$/),s=o?o[1]:a,c=o&&o[2]?o[2]:null,l=r.push(`image`,`img`,0);l.attrs=[[`src`,s],[`alt`,t]],c&&l.attrs.push([`title`,c]),l.content=t,l.children=[{type:`text`,content:t,tag:``}],r.pos+=e[0].length,u=r.pos;let d=n.slice(i+e[0].length);d&&v(d);return}let t=r.push(`text`,``,0);t.content=n,r.pos+=n.length,u=r.pos;return}let a=r.push(`text`,``,0);a.content=n,r.pos+=n.length,u=r.pos};for(;!(u>=s.length);){let f=s.indexOf(e,u);if(f===-1)break;if(Fb(s,f)){u=f+Math.max(1,e.length);continue}let y=Nb(l,f);if(y){u=y[1];continue}let b=Nb(p,f);if(b){u=b[1];continue}if(f===h&&u===g){if(_++,_>2){u=f+Math.max(1,e.length);continue}}else _=0,h=f,g=u;if(e===`(`&&f>0){let t=f-1;for(;t>=0&&s[t]===` `;)t--;if(t>=0&&s[t]===`]`){u=f+e.length;continue}}if(e===`$`&&f>0&&s[f-1]===`$`){u=f+1;continue}if(e===`$`&&f<s.length-1&&s[f+1]===`$`){u=f+2;continue}let x=e===`$`?Lb(s,f+e.length):Gy(s,f+e.length,e,c);if(x===-1){let o=s.slice(f+e.length);if(o.includes(e)){u=s.indexOf(e,f+e.length);continue}if(x===-1){let l=e===`$`&&rx(o);if(a&&!i&&!l&&ob(o)&&!o.includes("`")){if(u=f+e.length,m=!0,!n){r.pending=``;let n=d?s.slice(d,u):s.slice(0,u),i=Ob(n)%2==1;if(d)v(s.slice(d,u));else{let t=s.slice(0,u);t.endsWith(e)&&(t=t.slice(0,t.length-e.length)),v(t)}if(i){let i=kb(n)?.marker??`**`,a=r.push(`strong_open`,``,0);a.markup=i;let s=r.push(`math_inline`,`math`,0);s.content=Ab(o,t),s.markup=e===`$$`?`$$`:e===`\\(`?`\\(\\)`:e===`$`?`$`:`()`,s.raw=`${e}${o}${c}`,s.loading=!0,a.content=o,r.push(`strong_close`,``,0)}else{let n=r.push(`math_inline`,`math`,0);n.content=Ab(o,t),n.markup=e===`$$`?`$$`:e===`\\(`?`\\(\\)`:e===`$`?`$`:`()`,n.raw=`${e}${o}${c}`,n.loading=!0}r.pos=s.length}u=s.length,d=u}break}}let S=s.slice(f+e.length,x),C=S.includes("`"),w=!S||!S.trim(),T=e===`$`,E=s[x+c.length],D=T&&nx(S,E),O=T&&ix(S);if(i?C||w||D||O:C||w||D||O||!T&&!ob(S)){u=x+c.length;let e=s.slice(r.pos,u);r.pending||(v(e),d=u);continue}if(m=!0,!n){let n=s.slice(r.pos-(r.pending??``).length,f),i=s.slice(0,u)?s.slice(d,f):n,a=Ob(i)%2==1;f!==r.pos&&a&&(i=r.pending+s.slice(r.pos,f));let l=a?kb(i):null,p=l?.marker??`**`;if(r.pending!==i)if(r.pending=``,a)if(l){let e=i.slice(l.index+p.length);v(i.slice(0,l.index));let t=r.push(`strong_open`,``,0);t.markup=p;let n=r.push(`text`,``,0);n.content=e,r.push(`strong_close`,``,0)}else v(i);else v(i);if(a){let n=r.push(`strong_open`,``,0);n.markup=p;let i=r.push(`math_inline`,`math`,0);i.content=Ab(S,t),i.markup=e===`$$`?`$$`:e===`\\(`?`\\(\\)`:e===`$`?`$`:`()`,i.raw=`${e}${S}${c}`,i.loading=!1;let a=s.slice(x+c.length).startsWith(p);return a&&r.push(`strong_close`,``,0),r.pos=o(s,x+c.length),u=r.pos,d=u,a||r.push(`strong_close`,``,0),!0}else{let n=r.push(`math_inline`,`math`,0);n.content=Ab(S,t),n.markup=e===`$$`?`$$`:e===`\\(`?`\\(\\)`:e===`$`?`$`:`()`,n.raw=`${e}${S}${c}`,n.loading=!1}}return u=o(s,x+c.length),d=u,r.pos=u,!0}if(m){if(n)r.pos=u;else{if(e===`$$`&&u<s.length&&s.slice(u).includes(`$`)){let e=u;for(;!(e>=s.length);){let n=Ib(s,e);if(n===-1)break;if(n+1<s.length&&s[n+1]===`$`){e=n+2;continue}if(n>0&&s[n-1]===`$`){e=n+1;continue}let i=Lb(s,n+1);if(i===-1)break;let a=s.slice(n+1,i),o=a.includes("`"),c=!a||!a.trim(),l=s[i+1],d=nx(a,l),f=ix(a);if(!o&&!c&&!d&&!f){let o=s.slice(u,n);o&&v(o);let c=r.push(`math_inline`,`math`,0);c.content=Ab(a,t),c.markup=`$`,c.raw=`$${a}$`,c.loading=!1,u=i+1,e=i+1}else v(`$`),e=n+1}e<s.length&&v(s.slice(e))}else u<s.length&&v(s.slice(u));r.pos=s.length}return!0}}return!1},i=(e,r,i,a)=>{let o=e,s=!o?.env?.__markstreamFinal,c=t?.strictDelimiters,l=c?[[`\\[`,`\\]`],[`$$`,`$$`]]:[[`\\[`,`\\]`],[`[`,`]`],[`$$`,`$$`]],u=o.bMarks[r]+o.tShift[r],d=o.src.slice(u,o.eMarks[r]).trim(),f=!1,p=``,m=``,h=!1,g=``,_=!1;for(let[e,n]of l)if(d.startsWith(e))if(e.includes(`[`))if(t?.strictDelimiters){if(d.replace(`\\`,``)===`[`){if(r+1<i){f=!0,p=e,m=n;break}continue}}else if(d.replace(`\\`,``)===`[`){if(r+1<i){f=!0,p=e,m=n;break}continue}else{let t=o.tokens[o.tokens.length-1];if(t&&t.type===`list_item_open`&&t.mark===`-`&&d.slice(e.length,d.indexOf(`]`)).trim()===`x`)continue;if(d.replace(`\\`,``).startsWith(`[`)&&!d.includes(`](`)){let t=d.indexOf(`]`);if(d.slice(t).trim()!==`]`)continue;let r=d.slice(e.length,t);if(e===`[`?jb(r):ob(r)){f=!0,p=e,m=n;break}continue}}else{f=!0,p=e,m=n;break}else if((e===`$$`||e===`\\[`)&&d.endsWith(e)&&r+1<i){let t=Bb(d,e,n);if(t===-1)continue;g=Hb(d.slice(0,t)),_=!0;let i=o.bMarks[r+1]+o.tShift[r+1];d=o.src.slice(i,o.eMarks[r+1]).trim(),h=!0,f=!0,p=e,m=n;break}if(!f)return!1;if(a&&!_)return!0;let v=d.indexOf(p),y=v+p.length,b=!c&&p===`[`?d.indexOf(`\\]`,y):-1,x=b>=0?`\\]`:m,S=b>=0?b:Rb(d,m,y);if(!h&&S>p.length){let e=d.slice(v+p.length,S),t=o.push(`math_block`,`math`,0);t.content=Ab(e),t.markup=p===`$$`?`$$`:p===`[`?`[]`:`\\[\\]`,t.map=[r,r+1],t.raw=`${p}${e}${x}`,t.block=!0,t.loading=!1,o.line=r+1;let i=d.slice(S+x.length);return i.trim()&&n(o,i,r),!0}let C=r,w=``,T=!1,E=``,D=r,O=h?d:d===p?``:d.slice(p.length),k=!c&&p===`\\[`?`]`:``,A=Rb(O,m);if(A!==-1){let e=A;w=O.slice(0,e),E=O.slice(e+m.length),D=h?r+1:r,T=!0,C=D}else for(O&&!h&&(w=O),C=r+1;C<i;C++){let e=o.bMarks[C]+o.tShift[C],t=o.eMarks[C],n=o.src.slice(e,t),r=n.trim();if(!c&&p===`[`&&r===`\\]`){m=`\\]`,T=!0;break}if(k&&n.trim()===k){m=k,T=!0;break}if(r===m){T=!0;break}else if(!c&&p===`[`&&n.includes(`\\]`)){T=!0;let e=n.indexOf(`\\]`);m=`\\]`;let t=n.slice(0,e);t&&(w+=(w?`
|
|
77
77
|
`:``)+t),E=n.slice(e+m.length),D=C;break}else if(Rb(n,m)!==-1){T=!0;let e=Rb(n,m),t=n.slice(0,e);t&&(w+=(w?`
|
|
78
78
|
`:``)+t),E=n.slice(e+m.length),D=C;break}w+=(w?`
|
|
79
|
-
`:``)+n}if((!s||c)&&!T)return!1;let j=/^\s*!\[/.test(w);if(!(_?!j&&Zb(w):p===`$$`?!j:p===`[`?jb(w):ob(w)))return!1;if(a)return!0;g&&n(o,g,r);let
|
|
79
|
+
`:``)+n}if((!s||c)&&!T)return!1;let j=/^\s*!\[/.test(w);if(!(_?!j&&Zb(w):p===`$$`?!j:p===`[`?jb(w):ob(w)))return!1;if(a)return!0;g&&n(o,g,r);let M=o.push(`math_block`,`math`,0);return M.content=Ab(w),M.markup=p===`$$`?`$$`:p===`[`?`[]`:`\\[\\]`,M.raw=`${p}${w}${w.startsWith(`
|
|
80
80
|
`)?`
|
|
81
|
-
`:``}${m}`,
|
|
81
|
+
`:``}${m}`,M.map=[r,C+1],M.block=!0,M.loading=!T,o.line=C+1,E.trim()&&n(o,E,D),!0};e.inline.ruler.before(`escape`,`math`,r),e.block.ruler.before(`lheading`,`explicit_math_block`,(e,t,n,r)=>{let a=e,o=a.bMarks[t]+a.tShift[t],s=a.src.slice(o,a.eMarks[t]).trim();return!s.startsWith(`$$`)&&!s.startsWith(`\\[`)?!1:i(e,t,n,r)},{alt:[`paragraph`,`reference`,`blockquote`,`list`]}),e.block.ruler.before(`paragraph`,`math_block`,i,{alt:[`paragraph`,`reference`,`blockquote`,`list`]})}function ox(e){let t=e.renderer.rules.image||function(e,t,n,r,i){let a=e,o=i;return o.renderToken?o.renderToken(a,t,n):``};e.renderer.rules.image=(e,n,r,i,a)=>{let o=e;return o[n].attrSet?.(`loading`,`lazy`),t(o,n,r,i,a)},e.renderer.rules.fence=e.renderer.rules.fence||((t,n)=>{let r=t[n],i=String(r.info??``).trim();return`<pre class="${i?`language-${e.utils.escapeHtml(i.split(/\s+/g)[0])}`:``}"><code>${e.utils.escapeHtml(String(r.content??``))}</code></pre>`})}function sx(e={}){let t=e.markdownItOptions??{},n=typeof t.experimental==`object`&&t.experimental!==null?t.experimental:{},r=Object.prototype.hasOwnProperty.call(t,`stream`)?!!t.stream:!0,i=new c_({html:!0,linkify:!0,typographer:!0,...t,experimental:{stream:r,...n}});return(e.enableMath??!0)&&ax(i,{...u_()??{},...e.mathOptions??{}}),(e.enableContainers??!0)&&p_(i),e.enableFixIndentedCodeBlock!==!1&&Ov(i),Cy(i),Dy(i),Ty(i),jy(i),ox(i),Ev(i,{customHtmlTags:e.customHtmlTags}),i}function cx(e){let t=Object.assign(Object.create(Object.getPrototypeOf(e)),e);return Array.isArray(e.attrs)&&(t.attrs=e.attrs.map(e=>[...e])),Array.isArray(e.map)&&(t.map=[...e.map]),Array.isArray(e.children)&&(t.children=e.children.map(e=>cx(e))),t}function lx(e){let t=e.meta??{};return{type:`checkbox`,checked:t.checked===!0,raw:t.checked?`[x]`:`[ ]`}}function ux(e){let t=e,n=t.attrGet?t.attrGet(`checked`):void 0,r=n===``||n===`true`;return{type:`checkbox_input`,checked:r,raw:r?`[x]`:`[ ]`}}function dx(e){let t=String(e.content??``);return{type:`emoji`,name:t,markup:String(e.markup??``),raw:`:${t}:`}}function fx(e,t,n){let r=[],i=``,a=t+1,o=[];for(;a<e.length&&e[a].type!==`em_close`;){let t=e[a];i+=String(e[a].content??t.text??``),o.push(e[a]),a++}return r.push(...IS(o,void 0,void 0,n)),{node:{type:`emphasis`,children:r,raw:`*${i}*`},nextIndex:a<e.length?a+1:e.length}}var px=/\r?\n[ \t]*`+\s*$/,mx=[`diff `,`index `,`--- `,`+++ `,`@@ `],hx=/\r?\n/;function gx(e){let t=String(e??``);return t?mx.some(e=>e.startsWith(t)||t.startsWith(e)):!1}function _x(e,t,n,r){n.length>0&&e.push(...n),r.length>0&&t.push(...r),n.length=0,r.length=0}function vx(e,t){let n=[],r=[],i=[],a=[],o=e.split(hx),s=/\r?\n$/.test(e),c=o.some(e=>e.startsWith(`diff `)||e.startsWith(`--- `)||e.startsWith(`+++ `)||e.startsWith(`@@ `)),l=e=>{let t=e;if(!mx.some(e=>t.startsWith(e)))if(t.startsWith(`-`)){let e=t.slice(1);i.push(!c&&e.startsWith(` `)?` ${e}`:e)}else if(t.startsWith(`+`)){let e=t.slice(1);a.push(!c&&e.startsWith(` `)?` ${e}`:e)}else{_x(n,r,i,a);let e=c&&t.startsWith(` `)?t.slice(1):t;n.push(e),r.push(e)}},u=s?Math.max(0,o.length-1):o.length;for(let e=0;e<u;e++){let n=o[e]??``;!t&&!s&&e===u-1&&gx(n)||l(n)}(t||i.length>0||a.length>0)&&_x(n,r,i,a);let d=n.join(`
|
|
82
82
|
`),f=r.join(`
|
|
83
83
|
`);return{original:t&&s&&d?`${d}\n`:d,updated:t&&s&&f?`${f}\n`:f}}function yx(e){let t=Array.isArray(e.map)&&e.map.length===2,n=e.meta??{},r=typeof n.closed==`boolean`?n.closed:void 0,i=r===!0||r!==!1&&t,a=String(e.info??``),o=a.startsWith(`diff`),s=o?(()=>{let e=a,t=e.indexOf(` `);return t===-1?``:String(e.slice(t+1)??``)})():a,c=String(e.content??``);if(px.test(c)&&(c=c.replace(px,``)),o){let{original:e,updated:n}=vx(c,i===!0);return{type:`code_block`,language:s,code:String(n??``),raw:String(c??``),diff:o,loading:r===!0?!1:r===!1?!0:!t,originalCode:e,updatedCode:n}}return{type:`code_block`,language:s,code:String(c??``),raw:String(c??``),diff:o,loading:r===!0?!1:r===!1?!0:!t}}function bx(e){let t=e.meta??{};return{type:`footnote_reference`,id:String(t.label??``),raw:`[^${String(t.label??``)}]`}}function xx(){return{type:`hardbreak`,raw:`\\
|
|
84
84
|
`}}function Sx(e,t,n){let r=[],i=``,a=t+1,o=[];for(;a<e.length&&e[a].type!==`mark_close`;)i+=String(e[a].content??``),o.push(e[a]),a++;return r.push(...IS(o,void 0,void 0,n)),{node:{type:`highlight`,children:r,raw:`==${i}==`},nextIndex:a<e.length?a+1:e.length}}var Cx=null,wx=new WeakMap;function Tx(){return Cx||={customTagSet:null,allowedTagSet:tw()},Cx}function Ex(e){let t=e.match(/^<\s*(?:\/\s*)?([\w-]+)/);return t?t[1].toLowerCase():``}function Dx(e){return/^<\s*\//.test(e)}function Ox(e,t){return/\/\s*>\s*$/.test(t)||C_.has(e)}function kx(e){if(!e||e.length===0)return Tx();let t=wx.get(e);if(t)return t;let n=e.map(q_).filter(Boolean);if(!n.length){let t=Tx();return wx.set(e,t),t}let r={customTagSet:new Set(n),allowedTagSet:tw({customHtmlTags:e})};return wx.set(e,r),r}function Ax(e){let t=e,n=t.raw??t.content??t.markup??``;return String(n??``)}function jx(e){let t=e.meta,n=t?.markstreamCustomHtmlRaw,r=t?.markstreamCustomHtmlInner;return typeof n==`string`&&typeof r==`string`?{raw:n,inner:r}:null}function Mx(e,t){let n=t.toLowerCase();for(let t=e.length-1;t>=0;t--){let[r,i]=e[t];if(String(r).toLowerCase()===n)return i}}function Nx(e,t,n){let r=e.slice();return Mx(r,`href`)||r.push([`href`,t]),n!=null&&!Mx(r,`title`)&&r.push([`title`,n]),r}function Px(e){return e.map(Ax).join(``)}function Fx(e){let t=[],n=e=>{let n=String(e??``);if(!n)return;let r=t[t.length-1];if(r?.type===`text`){r.content=`${r.content}${n}`,r.raw=`${r.raw}${n}`;return}t.push({type:`text`,content:n,raw:n})};for(let r of e)if(r){if(r.type===`reference`||r.type===`footnote_reference`){n(String(r.raw??``));continue}if(`children`in r&&Array.isArray(r.children)){t.push({...r,children:Fx(r.children)});continue}t.push(r)}return t}function Ix(e,t,n){let r=0;for(let i=t;i<e.length;i++){let t=e[i];if(t.type!==`html_inline`)continue;let a=String(t.content??``),o=Ex(a),s=Dx(a),c=Ox(o,a);if(!s&&!c&&o===n){r++;continue}if(s&&o===n){if(r===0)return i;r--}}return-1}function Lx(e,t,n){let r=[e[t]],i=[],a=t+1,o=!1,s=n?Ix(e,t+1,n):-1;return s===-1?(i=e.slice(t+1),i.length&&r.push(...i),a=e.length):(i=e.slice(t+1,s),r.push(...i,e[s]),a=s+1,o=!0),{closed:o,html:Px(r),innerTokens:i,nextIndex:a}}function Rx(e,t,n,r,i,a,o){let s=String(e.content??``),c=Ex(s),{customTagSet:l,allowedTagSet:u}=kx(o?.customHtmlTags);if(!c)return[{type:`inline_code`,code:s,raw:s},n+1];if(!u.has(c)&&!Lx(t,n,c).closed){let t=Ax(e);return[{type:`text`,content:t,raw:t},n+1]}if(c===`br`)return[{type:`hardbreak`,raw:s},n+1];let d=Dx(s),f=Ox(c,s);if(d)return[{type:`html_inline`,tag:c,content:s,children:[],raw:s,loading:!1},n+1];if(c===`a`){let e=Lx(t,n,c),l=W_(s),u=e.innerTokens,d=String(Mx(l,`href`)??``),f=Mx(l,`title`),p=f==null?null:String(f),m=Nx(l,d,p),h=Fx(u.length?r(u,i,a,o):[]),g=u.length?Px(u):d||``;return!h.length&&g&&h.push({type:`text`,content:g,raw:g}),[{type:`link`,href:d,title:p,text:g,attrs:m,children:h,loading:!e.closed,raw:e.html||s},e.nextIndex]}if(f)return[{type:l?.has(c)?c:`html_inline`,tag:c,content:s,children:[],raw:s,loading:!1},n+1];let p=Lx(t,n,c);if(c===`p`||c===`div`)return[{type:`paragraph`,children:Fx(p.innerTokens.length?r(p.innerTokens,i,a,o):[]),raw:p.html},p.nextIndex];let m=Fx(p.innerTokens.length?r(p.innerTokens,i,a,o):[]),h=p.html||s,g=!p.closed,_=!1;if(!p.closed){let e=`</${c}>`;h.toLowerCase().includes(e.toLowerCase())||(h+=e),_=!0,g=!0}let v=[],y=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g,b;for(;(b=y.exec(s))!==null;){let e=b[1],t=b[2]||b[3]||b[4]||``;v.push([e,t])}if(l?.has(c)){let t=jx(e);return[{type:c,tag:c,attrs:v,content:t?t.inner:p.innerTokens.length?Px(p.innerTokens):``,children:p.innerTokens.length?r(p.innerTokens,i,a,o):[],raw:t?.raw??h,loading:e.loading||g,autoClosed:_},p.nextIndex]}return[{type:`html_inline`,tag:c,attrs:v,content:h,children:m,raw:h,loading:g,autoClosed:_},p.nextIndex]}function zx(e){if(e.type===`math_inline`){if(e.raw)return String(e.raw);let t=e.markup===`$$`?`$$`:`$`;return`${t}${String(e.content??``)}${t}`}return Array.isArray(e.children)&&e.children.length>0?e.children.map(e=>zx(e)).join(``):String(e.content??``)}function Bx(e){return!e||!Array.isArray(e.children)||e.children.length===0?``:e.children.map(e=>zx(e)).join(``)}function Vx(e,t=!1){let n=e.attrs??[],r=null;if((!n||n.length===0)&&Array.isArray(e.children))for(let t of e.children){let e=t.attrs;if(Array.isArray(e)&&e.length>0){n=e,r=t;break}}let i=String(n.find(e=>e[0]===`src`)?.[1]??``),a=n.find(e=>e[0]===`alt`)?.[1],o=Bx(r??e),s=``;o?s=o:a!=null&&String(a).length>0?s=String(a):r?.content!=null&&String(r.content).length>0?s=String(r.content):Array.isArray(r?.children)&&r.children[0]?.content?s=String(r.children[0].content):Array.isArray(e.children)&&e.children[0]?.content?s=String(e.children[0].content):e.content!=null&&String(e.content).length>0&&(s=String(e.content));let c=n.find(e=>e[0]===`title`)?.[1]??null,l=c===null?null:String(c),u=String(e.content??``);return{type:`image`,src:i,alt:s,title:l,raw:u,loading:t}}function Hx(e){let t=String(e.content??``);return{type:`inline_code`,code:t,raw:t}}function Ux(e,t,n){let r=[],i=``,a=t+1,o=[];for(;a<e.length&&e[a].type!==`ins_close`;)i+=String(e[a].content??``),o.push(e[a]),a++;return r.push(...IS(o,void 0,void 0,n)),{node:{type:`insert`,children:r,raw:`++${String(i)}++`},nextIndex:a<e.length?a+1:e.length}}function Wx(e){let t=[];if(!Array.isArray(e))return t;for(let n of e){let e=n?.[0];e&&t.push([String(e),String(n?.[1]??``)])}return t}function Gx(e,t){let n=t.toLowerCase();for(let t=e.length-1;t>=0;t--){let[r,i]=e[t];if(String(r).toLowerCase()===n)return i}}function Kx(e,t,n){let r=e.slice();return Gx(r,`href`)||r.push([`href`,t]),n!=null&&!Gx(r,`title`)&&r.push([`title`,n]),r}function qx(e,t,n){let r=e[t],i=Wx(r.attrs),a=String(Gx(i,`href`)??``),o=Gx(i,`title`),s=o==null?null:String(o),c=Kx(i,a,s),l=t+1,u=[],d=!0;for(;l<e.length&&e[l].type!==`link_close`;)u.push(e[l]),l++;e[l]?.type===`link_close`&&(d=!1);let f=u,p=u[u.length-1];if(n?.__insideStrong&&p?.type===`text`&&String(p.content??``).endsWith(`**`)&&!u.some(e=>e.type===`strong_open`)){let e=String(p.content??``),t=String(p.raw??e),n=cx(p);n.content=e.slice(0,-2),n.raw=t.replace(/\*\*$/,``),f=u.slice(),f[f.length-1]=n}let m=IS(f,void 0,void 0,n),h=m.map(e=>{let t=e;return`content`in e?String(t.content??``):String(t.raw??``)}).join(``);return{node:{type:`link`,href:a,title:s,text:h,children:m,raw:String(`[${h}](${a}${s?` "${s}"`:``})`),loading:d,attrs:c},nextIndex:l<e.length?l+1:e.length}}function Jx(e){let t=e.content??``,n=e.raw===`$$`?`$${t}$`:e.raw||``;return{type:`math_inline`,content:t,loading:!!e.loading,raw:n,markup:e.markup}}function Yx(e){return{type:`reference`,id:String(e.content??``),raw:String(e.markup??`[${e.content??``}]`)}}function Xx(e,t,n){let r=[],i=``,a=t+1,o=[];for(;a<e.length&&e[a].type!==`s_close`;)i+=String(e[a].content??``),o.push(e[a]),a++;return r.push(...IS(o,void 0,void 0,n)),{node:{type:`strikethrough`,children:r,raw:`~~${i}~~`},nextIndex:a<e.length?a+1:e.length}}var Zx=/\\([\\()[\]`$|*_\-!])/g;function Qx(e,t){if(!e)return;let n=String(e);if(n&&(n===t||n.replace(Zx,`$1`)===t))return n}function $x(e,t,n,r){let i=[],a=``,o=t+1,s=[],c=1;for(;o<e.length;){if(e[o].type===`strong_close`){if(c===1)break;c--}e[o].type===`strong_open`&&c++,a+=String(e[o].content??``),s.push(e[o]),o++}let l={...r,__insideStrong:!0};return i.push(...IS(s,Qx(n,a),void 0,l)),{node:{type:`strong`,children:i,raw:`**${String(a)}**`},nextIndex:o<e.length?o+1:e.length}}function eS(e,t,n){let r=[],i=``,a=t+1,o=[];for(;a<e.length&&e[a].type!==`sub_close`;)i+=String(e[a].content??``),o.push(e[a]),a++;r.push(...IS(o,void 0,void 0,n));let s=String(e[t].content??``),c=i||s;return{node:{type:`subscript`,children:r.length>0?r:[{type:`text`,content:c,raw:c}],raw:`~${c}~`},nextIndex:a<e.length?a+1:e.length}}function tS(e,t,n){let r=[],i=``,a=t+1,o=[];for(;a<e.length&&e[a].type!==`sup_close`;)i+=String(e[a].content??``),o.push(e[a]),a++;return r.push(...IS(o,void 0,void 0,n)),{node:{type:`superscript`,children:r.length>0?r:[{type:`text`,content:i||String(e[t].content??``),raw:i||String(e[t].content??``)}],raw:`^${i||String(e[t].content??``)}^`},nextIndex:a<e.length?a+1:e.length}}function nS(e){let t=String(e.content??``);return{type:`text`,content:t,raw:t}}var rS=/[^~]*~{2,}[^~]+/,iS=/\*\*/,aS=/[[_*^~]/,oS=/\\([\\()[\]`$|*_\-!])/g,sS=new Set([`\\`,`(`,`)`,`[`,`]`,"`",`$`,`|`,`*`,`_`,`-`,`!`]),cS=/\s/u,lS=/[!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~]/,uS=/\p{P}/u,dS=/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,fS=/:\/\//;function pS(e){let t=0,n=0;for(;n<e.length;){if(e[n]===`\\`&&n+1<e.length&&e[n+1]===`*`){n+=2;continue}e[n]===`*`&&t++,n++}return t}function mS(e,t=0){if(!e)return-1;let n=0;for(let r=0;r<e.length;r++){let i=e[r],a=e[r+1];if(i===`\\`&&a&&sS.has(a)){if(a===`*`&&n>=t){n++,r++;continue}n++,r++;continue}if(i===`*`&&n>=t)return n;n++}return-1}function hS(e){return!!e&&cS.test(e)}function gS(e){return!!e&&(lS.test(e)||uS.test(e))}function _S(e,t){let n=t>0?e[t-1]:void 0,r=e[t+1];return!r||hS(r)?!1:!(gS(r)&&n&&!hS(n)&&!gS(n))}function vS(e,t){let n=t>0?e[t-1]:void 0,r=e[t+1];return!n||hS(n)?!1:!(gS(n)&&r&&!hS(r)&&!gS(r))}function yS(e,t,n=0){let r=n,i=!1;for(;r<t.length;){let n=e?mS(e,r):t.indexOf(`*`,r);if(n===-1)break;if(vS(t,n))return{index:n,sawInvalidClose:i};i=!0,r=n+1}return{index:-1,sawInvalidClose:i}}function bS(e,t){let n=t>0?e[t-1]:void 0,r=e[t+2];return!r||hS(r)?!1:!(gS(r)&&n&&!hS(n)&&!gS(n))}function xS(e,t){let n=t>0?e[t-1]:void 0,r=e[t+2];return!n||hS(n)?!1:!(gS(n)&&r&&!hS(r)&&!gS(r))}function SS(e,t=0){let n=t,r=!1;for(;n<e.length;){let t=e.indexOf(`**`,n);if(t===-1)break;if(xS(e,t))return{index:t,sawInvalidClose:r};r=!0,n=t+2}return{index:-1,sawInvalidClose:r}}function CS(e){let t=``,n=0;for(;n<e.length;){if(e[n]!==`\\`){t+=e[n],n++;continue}let r=0;for(;n+r<e.length&&e[n+r]===`\\`;)r++;let i=e[n+r];if(t+=`\\`.repeat(Math.floor(r/2)),r%2==1){if(i&&sS.has(i)){t+=i,n+=r+1;continue}t+=`\\`}n+=r}return t}function wS(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r],a=e[r+1];if(i===`\\`&&a&&sS.has(a)){if(n===t)return r+1;n++,r++;continue}if(n===t)return r;n++}return-1}function TS(e,t,n){let r=wS(e,t);if(r===-1||n&&e[r]!==n)return!1;let i=0;for(let t=r-1;t>=0&&e[t]===`\\`;t--)i++;return i%2==1}var ES=/[\p{L}\p{N}]/u,DS=/^[\p{L}\p{N}]+$/u;function OS(e){return e?ES.test(e):!1}function kS(e){return e?DS.test(e):!1}function AS(e,t){let n=t;for(;n<e.length&&e[n]===`*`;)n++;let r=t>0?e[t-1]:void 0,i=n<e.length?e[n]:void 0;return{len:n-t,prev:r,next:i,intraword:OS(r)&&OS(i)}}function jS(e){let t=[];for(let n=0;n<e.length;){if(e[n]!==`*`){n++;continue}let r=AS(e,n),i=n+r.len;r.len>=2&&r.intraword&&t.push({start:n,end:i}),n=i}for(let n=0;n<t.length-1;n++){let r=t[n],i=t[n+1];if(!kS(e.slice(r.end,i.start)))return i.end}return-1}function MS(e){return!!e&&e.trim()===e&&/^[\p{L}\p{N}\s]+$/u.test(e)}function NS(e,t){let n=t;for(;n<e.length;){let t=e.indexOf(`***`,n);if(t===-1)return-1;let r=AS(e,t);if(r.len>=3)return t;n=t+r.len}return-1}function PS(e){return e?dS.test(e)||fS.test(e):!1}function FS(e,t){if(!e||!t)return null;let n=e.match(/\[([^\]\n]+)\]\(([^)]*)$/);return n&&n[2]===t?n[1]:null}function IS(e,t,n,r){if(!e||e.length===0)return[];let i=r?.__linkifyDemotionContext,a=sy(t),o={filename:i?.filename||a.filename,explicitFilename:i?.explicitFilename||a.explicitFilename,marketTicker:i?.marketTicker||a.marketTicker};(o.filename||o.explicitFilename||o.marketTicker)&&(r={...r,__linkifyDemotionContext:o});let s=r,c=[],l=null,u=0,d=r?.requireClosingStrong,f=e;function p(){return e===f&&(e=e.slice()),e}function m(){l=null}function h(n,i){let a=e.length===1?t:String(i.content??``),o=[],s=jS(n);if(s!==-1){x(n.slice(0,s),n.slice(0,s));let e=n.slice(s);return e&&(E({type:`text`,content:e,raw:e}),u--),u++,!0}if(rS.test(n)){let e=n.indexOf(`~~`);e!==-1&&o.push({type:`strikethrough`,index:e})}if(iS.test(n)){let e=n.indexOf(`**`);e!==-1&&o.push({type:`strong`,index:e})}if(/[^*]*\*[^*]+/.test(n)){let e=a?mS(a,0):n.indexOf(`*`);if(a&&e===-1)return!1;e!==-1&&o.push({type:`emphasis`,index:e})}o.sort((e,t)=>e.index===t.index?e.type===t.type?0:e.type===`strong`?-1:+(t.type===`strong`):e.index-t.index);let c=o[0];if(!c)return!1;if(c.type===`strikethrough`){let e=c.index,t=e>-1?n.slice(0,e):``;if(t&&x(t,t),e===-1)return u++,!0;let i=n.indexOf(`~~`,e+2),a=i===-1?n.slice(e+2):n.slice(e+2,i),o=i===-1?``:n.slice(i+2),{node:s}=Xx([{type:`s_open`,tag:`s`,content:``,markup:`~~`,info:``,meta:null},{type:`text`,tag:``,content:a,markup:``,info:``,meta:null},{type:`s_close`,tag:`s`,content:``,markup:`~~`,info:``,meta:null}],0,r);return m(),b(s),o&&(E({type:`text`,content:o,raw:o}),u--),u++,!0}if(c.type===`strong`){let e=c.index,i=e>-1?n.slice(0,e):``;if(i&&x(i,i),e===-1)return u++,!0;if(t&&e===0){let e=!1,r=0;for(;r<n.length&&n[r]===`*`;)r++;if(t.startsWith(`\\*`)&&(e=!0),e){let e=0,i=0;for(;i<t.length&&e<r;)if(t[i]===`\\`&&i+1<t.length&&t[i+1]===`*`)e+=1,i+=2;else if(t[i]===`*`)break;else i++;if(e>=2)return x(n,n),u++,!0}}if(t&&(n.match(/\*/g)||[]).length>pS(t))return x(n.slice(i.length),n.slice(i.length)),u++,!0;let a=AS(n,e);if(a.len>=3){let i=NS(n,e+a.len);if(i!==-1){let o=n.slice(e+a.len,i);if(MS(o)){let{node:e}=$x([{type:`strong_open`,tag:`strong`,content:``,markup:`**`,info:``,meta:null},{type:`em_open`,tag:`em`,content:``,markup:`*`,info:``,meta:null},{type:`text`,tag:``,content:o,markup:``,info:``,meta:null},{type:`em_close`,tag:`em`,content:``,markup:`*`,info:``,meta:null},{type:`strong_close`,tag:`strong`,content:``,markup:`**`,info:``,meta:null}],0,t,r);m(),b(e);let a=n.slice(i+3);return a&&(E({type:`text`,content:a,raw:a}),u--),u++,!0}}}if(!bS(n,e)){let t=n.slice(e,e+a.len);x(t,t);let r=n.slice(e+a.len);return r&&(E({type:`text`,content:r,raw:r}),u--),u++,!0}let o=SS(n,e+2),s=``,l=``;if(o.index!==-1){s=n.slice(e+2,o.index),l=n.slice(o.index+2);let t=o.index,r=AS(n,t);if(a.intraword&&r.intraword&&!kS(s)||!s&&a.len>=4&&a.intraword)return x(n.slice(i.length),n.slice(i.length)),u++,!0}else{if(d||o.sawInvalidClose||a.intraword)return x(n.slice(i.length),n.slice(i.length)),u++,!0;s=n.slice(e+2),l=``}if(!s&&/^\*+$/.test(l))return x(n,n),u++,!0;let{node:f}=$x([{type:`strong_open`,tag:`strong`,content:``,markup:`**`,info:``,meta:null},{type:`text`,tag:``,content:s,markup:``,info:``,meta:null},{type:`strong_close`,tag:`strong`,content:``,markup:`**`,info:``,meta:null}],0,t,r);return m(),b(f),l&&(E({type:`text`,content:l,raw:l}),u--),u++,!0}if(c.type===`emphasis`){let t=c.index;t===-1&&(t=0);let i=n.slice(0,t);if(i&&x(i,i),!_S(n,t)){x(n[t],n[t]);let e=n.slice(t+1);return e&&(E({type:`text`,content:e,raw:e}),u--),u++,!0}let o=AS(n,t),s=yS(a,n,t+1),l=s.index,d=e[u+1];if(r?.final&&d?.type===`em_open`&&l!==-1&&n.slice(t+1,l).trim()!==n.slice(t+1,l)||l===-1&&(s.sawInvalidClose||r?.final||o.intraword||!OS(n[t+1])))return x(n.slice(t),n.slice(t)),u++,!0;let{node:f}=fx([{type:`em_open`,tag:`em`,content:``,markup:`*`,info:``,meta:null},{type:`text`,tag:``,content:l>-1?n.slice(t+1,l):n.slice(t+1),markup:``,info:``,meta:null},{type:`em_close`,tag:`em`,content:``,markup:`*`,info:``,meta:null}],0,r);if(m(),b(f),l!==-1&&l<n.length-1){let e=n.slice(l+1);e&&(E({type:`text`,content:e,raw:e}),u--)}return u++,!0}return!1}function g(t,n){if(!t.includes("`"))return!1;let r=(e=>{for(let t=0;t<e.length;t++){if(e[t]!=="`")continue;let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;r--)n++;if(n%2==0)return t}return-1})(t);if(r===-1)return!1;let i=1;for(let e=r+1;e<t.length&&t[e]==="`";e++)i++;let a="`".repeat(i),o=r+i,s=t.indexOf(a,o);if(s===-1){if(i===1){let e=t.slice(0,r),i=t.slice(r+1);return e&&(h(e,n)?u--:x(e,e)),v({type:`inline_code`,code:i,raw:String(i)}),u++,!0}let a=t;for(let t=u+1;t<e.length;t++)a+=String((e[t].content??``)+(e[t].markup??``));return u=e.length-1,x(a,a),u++,!0}m();let c=t.slice(0,r),l=t.slice(r+i,s),d=t.slice(s+i);return c&&(h(c,n)?u--:x(c,c)),v({type:`inline_code`,code:l,raw:String(l??``)}),d&&(E({type:`text`,content:d,raw:d}),u--),u++,!0}function _(t){let i=s?.__markdownIt;if(!i||e.length<=1||!e.some(e=>e?.type===`math_inline`)||!aS.test(t))return null;let a=i.parseInline(t,{__markstreamFinal:!!r?.final});if(!Array.isArray(a)||a.length===0)return null;let o=(a.find(e=>e?.type===`inline`)?.children??[]).filter(e=>!(e?.type===`text`&&String(e.content??``)===``));if(!o.length||!o.some(e=>e?.type!==`text`)||o.length===1&&o[0]?.type===`text`&&String(o[0].content??``)===t)return null;let c=IS(o,t,n,r);return c.length?c:null}function v(e){m(),c.push(e)}function y(e){m();let t=cx(e);c.push(t)}function b(e){v(e)}function x(e,t){l?(l.content+=e,l.raw+=t??e):(l={type:`text`,content:String(e??``),raw:String(t??e??``)},c.push(l))}function S(e,t){if(!e)return;let i=IS([{...t,type:`text`,content:e,raw:e}],e,n,r);if(i.length===1&&i[0]?.type===`text`){let e=i[0];x(String(e.content??``),String(e.raw??e.content??``));return}for(let e of i)b(e)}function C(e,t){return String(e.markup??``).startsWith(t)}function w(t){return t.endsWith(`](`)?e[u+1]?.type===`link_open`&&e[u+1]?.markup===`linkify`&&e[u+2]?.type===`text`&&e[u+3]?.type===`link_close`&&e[u+4]?.type===`text`&&String(e[u+4]?.content??``).startsWith(`)`):!1}function T(e,t){let n=e,r=String(t.content??``);return n.endsWith(`\\`)&&!C(t,`\\\\`)&&!r.endsWith(`\\\\`)&&(n=n.slice(0,-1)),n.endsWith(`(`)&&!C(t,`\\(`)&&!r.endsWith(`\\(`)&&(n=n.slice(0,-1)),/\*+$/.test(n)&&!C(t,`\\*`)&&!r.endsWith(`\\*`)&&(n=n.replace(/\*+$/,``)),n}for(;u<e.length;){let t=e[u];E(t)}function E(i){switch(i.type){case`text`:O(i);break;case`softbreak`:l?(l.content+=`
|
|
85
85
|
`,l.raw+=`
|
|
86
86
|
`):(l={type:`text`,content:`
|
|
87
87
|
`,raw:`
|
|
88
|
-
`},c.push(l)),u++;break;case`code_inline`:b(Hx(i)),u++;break;case`html_inline`:{let[a,o]=Rx(i,e,u,IS,t,n,r);b(a),u=o;break}case`link_open`:k(i);break;case`image`:I(i)||(m(),b(Vx(i)),u++);break;case`strong_open`:{m();let{node:t,nextIndex:n}=$x(e,u,i.content,r);b(t),u=n;break}case`em_open`:{m();let{node:t,nextIndex:n}=fx(e,u,r);b(t),u=n;break}case`s_open`:{m();let{node:t,nextIndex:n}=Xx(e,u,r);b(t),u=n;break}case`mark_open`:{m();let{node:t,nextIndex:n}=Sx(e,u,r);b(t),u=n;break}case`ins_open`:{m();let{node:t,nextIndex:n}=Ux(e,u,r);b(t),u=n;break}case`sub_open`:{m();let{node:t,nextIndex:n}=eS(e,u,r);b(t),u=n;break}case`sup_open`:{m();let{node:t,nextIndex:n}=tS(e,u,r);b(t),u=n;break}case`sub`:m(),b({type:`subscript`,children:[{type:`text`,content:String(i.content??``),raw:String(i.content??``)}],raw:`~${String(i.content??``)}~`}),u++;break;case`sup`:m(),b({type:`superscript`,children:[{type:`text`,content:String(i.content??``),raw:String(i.content??``)}],raw:`^${String(i.content??``)}^`}),u++;break;case`emoji`:{m();let t=e[u-1];t?.type===`text`&&/\|:-+/.test(String(t.content??``))?x(``,``):b(dx(i)),u++;break}case`checkbox`:m(),b(lx(i)),u++;break;case`checkbox_input`:m(),b(ux(i)),u++;break;case`footnote_ref`:m(),b(bx(i)),u++;break;case`footnote_anchor`:{m();let e=i.meta??{};v({type:`footnote_anchor`,id:String(e.label??i.content??``),raw:String(i.content??``)}),u++;break}case`hardbreak`:m(),b(xx()),u++;break;case`fence`:m(),b(yx(e[u])),u++;break;case`math_inline`:m(),!i.content&&i.markup===`$`&&e[u+1]?.type===`text`&&e[u+2]?.type===`math_inline`?(b(Jx({...i,content:e[u+1].content})),u+=2):b(Jx(i)),u++;break;case`reference`:j(i);break;case`text_special`:x(String(i.content??``),String(i.content??``)),u++;break;default:{let e=i;if(i.type===`link`&&e.href!=null&&r?.validateLink&&!r.validateLink(String(e.href))){m();let t=String(e.text??``);x(t,t),u++}else L(i)||M(i)||P(i)||ee(i)||y(i),u++;break}}}function D(t,n,r,i){let a=nS({...n,content:t});if(l){l.content+=T(a.content,n),l.raw+=a.raw;return}let o=r?.tag===`br`&&e[u-2]?.content===`[`;i||(a.content=T(a.content,n)),l=a,l.center=o,c.push(l)}function O(n){let r=String(n.content??``),i=e.length===1&&r.includes(`\\`)&&typeof t==`string`?String(t):``,a=i?CS(i):r.replace(oS,`$1`);if(n.content===`<`||a===`1`&&e[u-1]?.tag===`br`){u++;return}let o=a.indexOf(`$`);o!==-1&&o===a.lastIndexOf(`$`)&&a.endsWith(`$`)&&(a=a.slice(0,-1)),a.endsWith(`undefined`)&&!t?.endsWith(`undefined`)&&(a=a.slice(0,-9));let s=c.length,d=``;for(let e=c.length-1;e>=0;e--){let t=c[e];if(t.type!==`text`)break;s=e,d=String(t.content??``)+d}s<c.length&&(a.startsWith(d)?(l=null,c.length=s):l=c[c.length-1]);let f=e[u+1];if((a==="`"||a===`|`||a===`$`)&&!C(n,`\\${a}`)||/^\*+$/.test(a)&&!C(n,`\\*`)){u++;return}if(!f&&/[^\]]\s*\(\s*$/.test(a)&&(a=a.replace(/\(\s*$/,``)),!a){u++;return}if(F(a)||re(a))return;if(!(a.includes(`*`)||a.includes(`_`)||a.includes(`~`)||a.includes("`")||a.includes(`[`)||a.includes(`!`)||a.includes(`$`)||a.includes(`|`)||a.includes(`(`))){D(a,n,e[u-1],f),u++;return}if(se(a))return;let p=e[u-1];if(a===`[`&&!f?.markup?.includes(`*`)&&!C(n,`\\[`)||a===`]`&&!p?.markup?.includes(`*`)&&!C(n,`\\]`)){u++;return}if(g(r,n)||oe(a)||(e[u+1]?.type!==`link_open`||w(a))&&ae(a,n))return;let v=_(r);if(v){m();for(let e of v)b(e);u++;return}h(a,n)||(D(a,n,p,f),u++)}function k(n){if(A(n))return;if(ie()){let{node:t,nextIndex:n}=qx(e,u,r),i=String(t.text||t.href||``);x(i,i),u=n;return}m();let{node:i,nextIndex:a}=qx(e,u,r);u=a;let o=i.text||i.href||``;if(n.markup===`linkify`&&!oy(o,i.href,t)&&fy(o,s?.__linkifyDemotionContext)){x(o,o);return}let c=i.children.length===1&&i.children[0]?.type===`text`;if(i.loading&&t&&i.text===i.href&&c){let e=FS(t,i.href);e&&(i.text=e,i.children=[{type:`text`,content:e,raw:e}],i.raw=String(`[${e}](${i.href}${i.title?` "${i.title}"`:``})`))}if(r?.validateLink&&!r.validateLink(i.href)){x(i.text,i.text);return}let l=n.attrs?.find(([e])=>e===`href`)?.[1],d=String(l??``);if(t&&d){let e=t.indexOf(`](`);if(e!==-1){let n=t.indexOf(`)`,e+2);n===-1?i.loading=!0:i.loading&&t.slice(e+2,n).includes(d)&&(i.loading=!1)}}ee(i)||v(i)}function A(t){if(t.markup!==`linkify`)return!1;let{node:n,nextIndex:i}=qx(e,u,r);return N(n,i)?(u=i,!0):!1}function j(e){m(),b(Yx(e)),u++}function ee(e){if(e.type!==`link`)return!1;let t=c[c.length-1];if(!t||t.type!==`text`)return!1;let n=String(t.content??``).match(/^([^[]*)\[([^\]\n]+)\]\($/);if(!n)return!1;let r=e,i=String(r.href??``),a=String(r.text??``),o=String(n[2]??``),s=i.replace(/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,``);if(!i||!(a===i||a===s||PS(a)))return!1;let l=String(n[1]??``);return l?(t.content=l,t.raw=l):c.pop(),v({...e,text:o,children:[{type:`text`,content:o,raw:o}],raw:String(`[${o}](${i}${r.title?` "${r.title}"`:``})`)}),!0}function M(e){if(e.type!==`link`)return!1;let t=e,n=String(t.href??``);return n?N({href:n,title:t.title==null||t.title===``?null:String(t.title),loading:!!t.loading},u+1):!1}function N(t,n){let r=c[c.length-1];if(r?.type!==`image`||r.src||!r.loading||!String(r.raw??``).endsWith(`](`))return!1;let i=e[n],a=String(i?.content??``);if(i?.type!==`text`||!a.startsWith(`)`))return!1;c.pop(),l=null;let o=String(r.alt??``);v({type:`image`,src:t.href,alt:o,title:t.title,raw:String(``),loading:!!t.loading});let s=a.slice(1),u=cx(i);return u.content=s,u.raw=s,p()[n]=u,!0}function P(t){if(t.type!==`link`)return!1;let n=c[c.length-1],r=e[u-1];if(!n||n.type!==`text`||r?.type!==`text`)return!1;let i=String(n.content??``),a=String(r.content??``);if(!i.endsWith(`!`)||!a.endsWith(`!`)||C(r,`\\!`))return!1;let o=i.slice(0,-1);o?(n.content=o,n.raw=o,l=n):(c.pop(),l=null);let s=t,d=String(s.text??s.children?.map(e=>String(e?.content??e?.raw??``)).join(``)??``),f=String(s.href??``),p=s.title==null||s.title===``?null:String(s.title);return v({type:`image`,src:f,alt:d,title:p,raw:String(``),loading:!!s.loading}),!0}function te(e,t=``,n=null){let r=String(e.alt??e.raw??``);return{type:`link`,href:t,title:n,text:r,children:[e],raw:String(`[${r}](${t}${n?` "${n}"`:``})`),loading:!0}}function ne(e){let t=e.startsWith(`;return{type:`image`,src:``,alt:r===-1?n.replace(/\]$/,``):n.slice(0,r),title:null,raw:t,loading:!0}}function F(n){let r=n.indexOf(`[![`);if(r===-1||typeof t==`string`&&e.length===1&&TS(t,r,`[`))return!1;let i=n.slice(0,r);return i&&x(i,i),v(te(ne(n.slice(r+1)))),u++,!0}function I(t){if(r?.final)return!1;let n=e[u-1];if(n?.type!==`text`||!String(n.content??``).endsWith(`[`)||C(n,`\\[`))return!1;let i=c[c.length-1];if(i?.type===`text`&&i.content.endsWith(`[`)){let e=i.content.slice(0,-1);e?(i.content=e,i.raw=e,l=i):(c.pop(),l=null)}return v(te(Vx(t))),u++,!0}function L(e){if(e.type!==`link`)return!1;let t=e,n=String(t.raw??``),r=String(t.text??``);if(!n.startsWith(`[![`)&&!r.startsWith(`![`))return!1;let i=t.title==null||t.title===``?null:String(t.title);return v(te({type:`image`,src:String(t.href??``),alt:r.replace(/^!\[/,``).replace(/\]$/,``),title:i,raw:n.startsWith(`[)return!1;let n=e[u-2];if(n?.type===`text`&&String(n.content??``).endsWith(`[`)&&C(n,`\\[`))return!1;let i=c[c.length-1];if(i?.type!==`image`&&i?.type!==`link`)return!1;let a=i,o=i?.type===`link`&&Array.isArray(a.children)&&a.children.length===1&&a.children[0]?.type===`image`?c.pop():null,s=o?o.children[0]:c.pop();if(!s||s.type!==`image`)return!1;let l=e[u+1],d=String(o?.href??``),f=o?.title==null?null:String(o.title),p=!0;if(l?.type===`link_open`){let{node:t,nextIndex:n}=qx(e,u+1,r);d=t.href,f=t.title,p=!0,u=n}else{if(d=t.slice(2),d.includes(`"`)){let e=d.split(`"`);d=String(e[0]??``).trim(),f=e[1]==null?null:String(e[1]).trim()}u++}let m=te(s,d,f);return m.loading=p,v(m),!0}function ie(){let t=e[u-3];return e[u-2]?.type===`image`&&e[u-1]?.type===`text`&&String(e[u-1].content??``)===`](`&&t?.type===`text`&&String(t.content??``).endsWith(`[`)&&C(t,`\\[`)}function ae(t,n){let i=t.indexOf(`[`);if(i===-1)return!1;let a=t.slice(0,i),o=t.indexOf(`](`,i);if(o!==-1){let s=e[u+2],c=t.slice(i+1,o);if(c.includes(`[`)){let e=c.indexOf(`[`);a+=t.slice(0,i+e+1);let n=i+e+1;c=t.slice(n+1,o)}let l=e[u+1];if(t.endsWith(`](`)&&l?.type===`link_open`&&s){let t=e[u+4],i=4,o=!0;if(t?.type===`text`){let e=String(t.content??``);if(e.startsWith(`)`)){o=!1;let n=e.slice(1);if(n){let e=cx(t);e.content=n,e.raw=n,p()[u+4]=e}else i++}else e===`.`&&i++}S(a,n);let l=String(s.content??``);return r?.validateLink&&!r.validateLink(l)?x(c,c):v({type:`link`,href:l,title:null,text:c,children:[{type:`text`,content:c,raw:c}],loading:o}),u+=i,!0}let f=t.indexOf(`)`,o),m=f===-1?``:t.slice(o+2,f),h=f===-1,g=a.match(/\*+$/);if(g&&(a=a.replace(/\*+$/,``)),S(a,n),g||=c.match(/^\*+/),!d&&g){let e=g[0].length;c=c.replace(/^\*+/,``).replace(/\*+$/,``);let t=[];if(e===1?t.push({type:`em_open`,tag:`em`,nesting:1}):e===2?t.push({type:`strong_open`,tag:`strong`,nesting:1}):e===3&&(t.push({type:`strong_open`,tag:`strong`,nesting:1}),t.push({type:`em_open`,tag:`em`,nesting:1})),t.push({type:`link`,href:m,title:null,text:c,children:[{type:`text`,content:c,raw:c}],loading:h}),e===1){t.push({type:`em_close`,tag:`em`,nesting:-1});let{node:e}=fx(t,0,r);b(e)}else if(e===2){t.push({type:`strong_close`,tag:`strong`,nesting:-1});let{node:e}=$x(t,0,void 0,r);b(e)}else if(e===3){t.push({type:`em_close`,tag:`em`,nesting:-1}),t.push({type:`strong_close`,tag:`strong`,nesting:-1});let{node:e}=$x(t,0,void 0,r);b(e)}else{let{node:e}=fx(t,0,r);b(e)}}else r?.validateLink&&!r.validateLink(m)?x(c,c):v({type:`link`,href:m,title:null,text:c,children:[{type:`text`,content:c,raw:c}],loading:h});let _=f===-1?``:t.slice(f+1);return _&&(E({type:`text`,content:_,raw:_}),u--),u++,!0}return!1}function oe(e){let t=e.indexOf(`![`);if(t===-1)return!1;let n=e.slice(0,t);return n&&!l?l={type:`text`,content:n,raw:n}:n&&l&&(l.content+=n),l&&=(c.push(l),null),v(ne(e.slice(t))),u++,!0}function se(e){if(!(e?.startsWith(`[`)&&n?.type===`list_item_open`))return!1;let t=e.slice(1).match(/[^\s\]]/);if(t===null)return u++,!0;if(t&&/x/i.test(t[0])){let e=t[0]===`x`||t[0]===`X`;return v({type:`checkbox_input`,checked:e,raw:e?`[x]`:`[ ]`}),u++,!0}return!1}return c}function LS(e){let t=String(e.content??``),n=t.replace(/[ \t\r\n]+$/g,``);if(n===t)return;e.content=n;let r=e.children;if(!(!Array.isArray(r)||r.length===0))for(;r.length;){let e=r[r.length-1];if(!e){r.pop();continue}if(e.type===`softbreak`||e.type===`hardbreak`){r.pop();continue}if(e.type===`text`){let t=String(e.content??``),n=t.replace(/[ \t\r\n]+$/g,``);if(n===t)break;if(n){e.content=n;break}r.pop();continue}break}}function RS(e){let t=String(e.content??``),n=t.match(/\r?\n\s*\d+[.)]?\s*$/);if(!n||typeof n.index!=`number`)return;e.content=t.slice(0,n.index);let r=e.children;if(!(!Array.isArray(r)||r.length===0))for(;r.length;){let e=r[r.length-1];if(!e){r.pop();continue}if(e.type===`softbreak`||e.type===`hardbreak`){r.pop();continue}if(e.type===`text`){let t=String(e.content??``);if(/^[ \t\r\n\d.)]*$/.test(t)){r.pop();continue}let n=t.replace(/[ \t\r\n\d.)]+$/g,``);n!==t&&(n?e.content=n:r.pop())}break}}function zS(e){let t=String(e.content??``);return/[ \t\r\n]+$/.test(t)||/\r?\n\s*\d+[.)]?\s*$/.test(t)}function BS(e,t,n){let r=e[t],i=[],a=ey(n,!0),o=t+1;for(;o<e.length&&e[o].type!==`bullet_list_close`&&e[o].type!==`ordered_list_close`;)if(e[o].type===`list_item_open`){let t=[],n=o+1;for(;n<e.length&&e[n].type!==`list_item_close`;)if(e[n].type===`paragraph_open`){let r=e[n+1],i=zS(r)?cx(r):r,o=e[n-1];i!==r&&(RS(i),LS(i));let s=String(i.content??``);t.push({type:`paragraph`,children:IS(i.children||[],s,o,a.options()),raw:s}),a.remember(s),n+=3}else if(e[n].type===`blockquote_open`){let[r,i]=JS(e,n,a.options());t.push(r),a.remember(r.raw),n=i}else if(e[n].type===`bullet_list_open`||e[n].type===`ordered_list_open`){let[r,i]=BS(e,n,a.options());t.push(r),a.remember(r.raw),n=i}else{let r=bC(e,n,a.options(),qS);r?(t.push(r[0]),a.remember(r[0].raw),n=r[1]):n+=1}i.push({type:`list_item`,children:t,raw:t.map(e=>e.raw).join(``)}),o=n+1}else o+=1;return[{type:`list`,ordered:r.type===`ordered_list_open`,start:(()=>{if(r.attrs&&r.attrs.length){let e=r.attrs.find(e=>e[0]===`start`);if(e){let t=Number(e[1]);return Number.isFinite(t)&&t!==0?t:1}}})(),items:i,raw:i.map(e=>e.raw).join(`
|
|
88
|
+
`},c.push(l)),u++;break;case`code_inline`:b(Hx(i)),u++;break;case`html_inline`:{let[a,o]=Rx(i,e,u,IS,t,n,r);b(a),u=o;break}case`link_open`:k(i);break;case`image`:re(i)||(m(),b(Vx(i)),u++);break;case`strong_open`:{m();let{node:t,nextIndex:n}=$x(e,u,i.content,r);b(t),u=n;break}case`em_open`:{m();let{node:t,nextIndex:n}=fx(e,u,r);b(t),u=n;break}case`s_open`:{m();let{node:t,nextIndex:n}=Xx(e,u,r);b(t),u=n;break}case`mark_open`:{m();let{node:t,nextIndex:n}=Sx(e,u,r);b(t),u=n;break}case`ins_open`:{m();let{node:t,nextIndex:n}=Ux(e,u,r);b(t),u=n;break}case`sub_open`:{m();let{node:t,nextIndex:n}=eS(e,u,r);b(t),u=n;break}case`sup_open`:{m();let{node:t,nextIndex:n}=tS(e,u,r);b(t),u=n;break}case`sub`:m(),b({type:`subscript`,children:[{type:`text`,content:String(i.content??``),raw:String(i.content??``)}],raw:`~${String(i.content??``)}~`}),u++;break;case`sup`:m(),b({type:`superscript`,children:[{type:`text`,content:String(i.content??``),raw:String(i.content??``)}],raw:`^${String(i.content??``)}^`}),u++;break;case`emoji`:{m();let t=e[u-1];t?.type===`text`&&/\|:-+/.test(String(t.content??``))?x(``,``):b(dx(i)),u++;break}case`checkbox`:m(),b(lx(i)),u++;break;case`checkbox_input`:m(),b(ux(i)),u++;break;case`footnote_ref`:m(),b(bx(i)),u++;break;case`footnote_anchor`:{m();let e=i.meta??{};v({type:`footnote_anchor`,id:String(e.label??i.content??``),raw:String(i.content??``)}),u++;break}case`hardbreak`:m(),b(xx()),u++;break;case`fence`:m(),b(yx(e[u])),u++;break;case`math_inline`:m(),!i.content&&i.markup===`$`&&e[u+1]?.type===`text`&&e[u+2]?.type===`math_inline`?(b(Jx({...i,content:e[u+1].content})),u+=2):b(Jx(i)),u++;break;case`reference`:j(i);break;case`text_special`:x(String(i.content??``),String(i.content??``)),u++;break;default:{let e=i;if(i.type===`link`&&e.href!=null&&r?.validateLink&&!r.validateLink(String(e.href))){m();let t=String(e.text??``);x(t,t),u++}else ie(i)||N(i)||te(i)||M(i)||y(i),u++;break}}}function D(t,n,r,i){let a=nS({...n,content:t});if(l){l.content+=T(a.content,n),l.raw+=a.raw;return}let o=r?.tag===`br`&&e[u-2]?.content===`[`;i||(a.content=T(a.content,n)),l=a,l.center=o,c.push(l)}function O(n){let r=String(n.content??``),i=e.length===1&&r.includes(`\\`)&&typeof t==`string`?String(t):``,a=i?CS(i):r.replace(oS,`$1`);if(n.content===`<`||a===`1`&&e[u-1]?.tag===`br`){u++;return}let o=a.indexOf(`$`);o!==-1&&o===a.lastIndexOf(`$`)&&a.endsWith(`$`)&&(a=a.slice(0,-1)),a.endsWith(`undefined`)&&!t?.endsWith(`undefined`)&&(a=a.slice(0,-9));let s=c.length,d=``;for(let e=c.length-1;e>=0;e--){let t=c[e];if(t.type!==`text`)break;s=e,d=String(t.content??``)+d}s<c.length&&(a.startsWith(d)?(l=null,c.length=s):l=c[c.length-1]);let f=e[u+1];if((a==="`"||a===`|`||a===`$`)&&!C(n,`\\${a}`)||/^\*+$/.test(a)&&!C(n,`\\*`)){u++;return}if(!f&&/[^\]]\s*\(\s*$/.test(a)&&(a=a.replace(/\(\s*$/,``)),!a){u++;return}if(F(a)||ae(a))return;if(!(a.includes(`*`)||a.includes(`_`)||a.includes(`~`)||a.includes("`")||a.includes(`[`)||a.includes(`!`)||a.includes(`$`)||a.includes(`|`)||a.includes(`(`))){D(a,n,e[u-1],f),u++;return}if(R(a))return;let p=e[u-1];if(a===`[`&&!f?.markup?.includes(`*`)&&!C(n,`\\[`)||a===`]`&&!p?.markup?.includes(`*`)&&!C(n,`\\]`)){u++;return}if(g(r,n)||L(a)||(e[u+1]?.type!==`link_open`||w(a))&&oe(a,n))return;let v=_(r);if(v){m();for(let e of v)b(e);u++;return}h(a,n)||(D(a,n,p,f),u++)}function k(n){if(A(n))return;if(I()){let{node:t,nextIndex:n}=qx(e,u,r),i=String(t.text||t.href||``);x(i,i),u=n;return}m();let{node:i,nextIndex:a}=qx(e,u,r);u=a;let o=i.text||i.href||``;if(n.markup===`linkify`&&!oy(o,i.href,t)&&fy(o,s?.__linkifyDemotionContext)){x(o,o);return}let c=i.children.length===1&&i.children[0]?.type===`text`;if(i.loading&&t&&i.text===i.href&&c){let e=FS(t,i.href);e&&(i.text=e,i.children=[{type:`text`,content:e,raw:e}],i.raw=String(`[${e}](${i.href}${i.title?` "${i.title}"`:``})`))}if(r?.validateLink&&!r.validateLink(i.href)){x(i.text,i.text);return}let l=n.attrs?.find(([e])=>e===`href`)?.[1],d=String(l??``);if(t&&d){let e=t.indexOf(`](`);if(e!==-1){let n=t.indexOf(`)`,e+2);n===-1?i.loading=!0:i.loading&&t.slice(e+2,n).includes(d)&&(i.loading=!1)}}M(i)||v(i)}function A(t){if(t.markup!==`linkify`)return!1;let{node:n,nextIndex:i}=qx(e,u,r);return ee(n,i)?(u=i,!0):!1}function j(e){m(),b(Yx(e)),u++}function M(e){if(e.type!==`link`)return!1;let t=c[c.length-1];if(!t||t.type!==`text`)return!1;let n=String(t.content??``).match(/^([^[]*)\[([^\]\n]+)\]\($/);if(!n)return!1;let r=e,i=String(r.href??``),a=String(r.text??``),o=String(n[2]??``),s=i.replace(/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,``);if(!i||!(a===i||a===s||PS(a)))return!1;let l=String(n[1]??``);return l?(t.content=l,t.raw=l):c.pop(),v({...e,text:o,children:[{type:`text`,content:o,raw:o}],raw:String(`[${o}](${i}${r.title?` "${r.title}"`:``})`)}),!0}function N(e){if(e.type!==`link`)return!1;let t=e,n=String(t.href??``);return n?ee({href:n,title:t.title==null||t.title===``?null:String(t.title),loading:!!t.loading},u+1):!1}function ee(t,n){let r=c[c.length-1];if(r?.type!==`image`||r.src||!r.loading||!String(r.raw??``).endsWith(`](`))return!1;let i=e[n],a=String(i?.content??``);if(i?.type!==`text`||!a.startsWith(`)`))return!1;c.pop(),l=null;let o=String(r.alt??``);v({type:`image`,src:t.href,alt:o,title:t.title,raw:String(``),loading:!!t.loading});let s=a.slice(1),u=cx(i);return u.content=s,u.raw=s,p()[n]=u,!0}function te(t){if(t.type!==`link`)return!1;let n=c[c.length-1],r=e[u-1];if(!n||n.type!==`text`||r?.type!==`text`)return!1;let i=String(n.content??``),a=String(r.content??``);if(!i.endsWith(`!`)||!a.endsWith(`!`)||C(r,`\\!`))return!1;let o=i.slice(0,-1);o?(n.content=o,n.raw=o,l=n):(c.pop(),l=null);let s=t,d=String(s.text??s.children?.map(e=>String(e?.content??e?.raw??``)).join(``)??``),f=String(s.href??``),p=s.title==null||s.title===``?null:String(s.title);return v({type:`image`,src:f,alt:d,title:p,raw:String(``),loading:!!s.loading}),!0}function P(e,t=``,n=null){let r=String(e.alt??e.raw??``);return{type:`link`,href:t,title:n,text:r,children:[e],raw:String(`[${r}](${t}${n?` "${n}"`:``})`),loading:!0}}function ne(e){let t=e.startsWith(`;return{type:`image`,src:``,alt:r===-1?n.replace(/\]$/,``):n.slice(0,r),title:null,raw:t,loading:!0}}function F(n){let r=n.indexOf(`[![`);if(r===-1||typeof t==`string`&&e.length===1&&TS(t,r,`[`))return!1;let i=n.slice(0,r);return i&&x(i,i),v(P(ne(n.slice(r+1)))),u++,!0}function re(t){if(r?.final)return!1;let n=e[u-1];if(n?.type!==`text`||!String(n.content??``).endsWith(`[`)||C(n,`\\[`))return!1;let i=c[c.length-1];if(i?.type===`text`&&i.content.endsWith(`[`)){let e=i.content.slice(0,-1);e?(i.content=e,i.raw=e,l=i):(c.pop(),l=null)}return v(P(Vx(t))),u++,!0}function ie(e){if(e.type!==`link`)return!1;let t=e,n=String(t.raw??``),r=String(t.text??``);if(!n.startsWith(`[![`)&&!r.startsWith(`![`))return!1;let i=t.title==null||t.title===``?null:String(t.title);return v(P({type:`image`,src:String(t.href??``),alt:r.replace(/^!\[/,``).replace(/\]$/,``),title:i,raw:n.startsWith(`[)return!1;let n=e[u-2];if(n?.type===`text`&&String(n.content??``).endsWith(`[`)&&C(n,`\\[`))return!1;let i=c[c.length-1];if(i?.type!==`image`&&i?.type!==`link`)return!1;let a=i,o=i?.type===`link`&&Array.isArray(a.children)&&a.children.length===1&&a.children[0]?.type===`image`?c.pop():null,s=o?o.children[0]:c.pop();if(!s||s.type!==`image`)return!1;let l=e[u+1],d=String(o?.href??``),f=o?.title==null?null:String(o.title),p=!0;if(l?.type===`link_open`){let{node:t,nextIndex:n}=qx(e,u+1,r);d=t.href,f=t.title,p=!0,u=n}else{if(d=t.slice(2),d.includes(`"`)){let e=d.split(`"`);d=String(e[0]??``).trim(),f=e[1]==null?null:String(e[1]).trim()}u++}let m=P(s,d,f);return m.loading=p,v(m),!0}function I(){let t=e[u-3];return e[u-2]?.type===`image`&&e[u-1]?.type===`text`&&String(e[u-1].content??``)===`](`&&t?.type===`text`&&String(t.content??``).endsWith(`[`)&&C(t,`\\[`)}function oe(t,n){let i=t.indexOf(`[`);if(i===-1)return!1;let a=t.slice(0,i),o=t.indexOf(`](`,i);if(o!==-1){let s=e[u+2],c=t.slice(i+1,o);if(c.includes(`[`)){let e=c.indexOf(`[`);a+=t.slice(0,i+e+1);let n=i+e+1;c=t.slice(n+1,o)}let l=e[u+1];if(t.endsWith(`](`)&&l?.type===`link_open`&&s){let t=e[u+4],i=4,o=!0;if(t?.type===`text`){let e=String(t.content??``);if(e.startsWith(`)`)){o=!1;let n=e.slice(1);if(n){let e=cx(t);e.content=n,e.raw=n,p()[u+4]=e}else i++}else e===`.`&&i++}S(a,n);let l=String(s.content??``);return r?.validateLink&&!r.validateLink(l)?x(c,c):v({type:`link`,href:l,title:null,text:c,children:[{type:`text`,content:c,raw:c}],loading:o}),u+=i,!0}let f=t.indexOf(`)`,o),m=f===-1?``:t.slice(o+2,f),h=f===-1,g=a.match(/\*+$/);if(g&&(a=a.replace(/\*+$/,``)),S(a,n),g||=c.match(/^\*+/),!d&&g){let e=g[0].length;c=c.replace(/^\*+/,``).replace(/\*+$/,``);let t=[];if(e===1?t.push({type:`em_open`,tag:`em`,nesting:1}):e===2?t.push({type:`strong_open`,tag:`strong`,nesting:1}):e===3&&(t.push({type:`strong_open`,tag:`strong`,nesting:1}),t.push({type:`em_open`,tag:`em`,nesting:1})),t.push({type:`link`,href:m,title:null,text:c,children:[{type:`text`,content:c,raw:c}],loading:h}),e===1){t.push({type:`em_close`,tag:`em`,nesting:-1});let{node:e}=fx(t,0,r);b(e)}else if(e===2){t.push({type:`strong_close`,tag:`strong`,nesting:-1});let{node:e}=$x(t,0,void 0,r);b(e)}else if(e===3){t.push({type:`em_close`,tag:`em`,nesting:-1}),t.push({type:`strong_close`,tag:`strong`,nesting:-1});let{node:e}=$x(t,0,void 0,r);b(e)}else{let{node:e}=fx(t,0,r);b(e)}}else r?.validateLink&&!r.validateLink(m)?x(c,c):v({type:`link`,href:m,title:null,text:c,children:[{type:`text`,content:c,raw:c}],loading:h});let _=f===-1?``:t.slice(f+1);return _&&(E({type:`text`,content:_,raw:_}),u--),u++,!0}return!1}function L(e){let t=e.indexOf(`![`);if(t===-1)return!1;let n=e.slice(0,t);return n&&!l?l={type:`text`,content:n,raw:n}:n&&l&&(l.content+=n),l&&=(c.push(l),null),v(ne(e.slice(t))),u++,!0}function R(e){if(!(e?.startsWith(`[`)&&n?.type===`list_item_open`))return!1;let t=e.slice(1).match(/[^\s\]]/);if(t===null)return u++,!0;if(t&&/x/i.test(t[0])){let e=t[0]===`x`||t[0]===`X`;return v({type:`checkbox_input`,checked:e,raw:e?`[x]`:`[ ]`}),u++,!0}return!1}return c}function LS(e){let t=String(e.content??``),n=t.replace(/[ \t\r\n]+$/g,``);if(n===t)return;e.content=n;let r=e.children;if(!(!Array.isArray(r)||r.length===0))for(;r.length;){let e=r[r.length-1];if(!e){r.pop();continue}if(e.type===`softbreak`||e.type===`hardbreak`){r.pop();continue}if(e.type===`text`){let t=String(e.content??``),n=t.replace(/[ \t\r\n]+$/g,``);if(n===t)break;if(n){e.content=n;break}r.pop();continue}break}}function RS(e){let t=String(e.content??``),n=t.match(/\r?\n\s*\d+[.)]?\s*$/);if(!n||typeof n.index!=`number`)return;e.content=t.slice(0,n.index);let r=e.children;if(!(!Array.isArray(r)||r.length===0))for(;r.length;){let e=r[r.length-1];if(!e){r.pop();continue}if(e.type===`softbreak`||e.type===`hardbreak`){r.pop();continue}if(e.type===`text`){let t=String(e.content??``);if(/^[ \t\r\n\d.)]*$/.test(t)){r.pop();continue}let n=t.replace(/[ \t\r\n\d.)]+$/g,``);n!==t&&(n?e.content=n:r.pop())}break}}function zS(e){let t=String(e.content??``);return/[ \t\r\n]+$/.test(t)||/\r?\n\s*\d+[.)]?\s*$/.test(t)}function BS(e,t,n){let r=e[t],i=[],a=ey(n,!0),o=t+1;for(;o<e.length&&e[o].type!==`bullet_list_close`&&e[o].type!==`ordered_list_close`;)if(e[o].type===`list_item_open`){let t=[],n=o+1;for(;n<e.length&&e[n].type!==`list_item_close`;)if(e[n].type===`paragraph_open`){let r=e[n+1],i=zS(r)?cx(r):r,o=e[n-1];i!==r&&(RS(i),LS(i));let s=String(i.content??``);t.push({type:`paragraph`,children:IS(i.children||[],s,o,a.options()),raw:s}),a.remember(s),n+=3}else if(e[n].type===`blockquote_open`){let[r,i]=JS(e,n,a.options());t.push(r),a.remember(r.raw),n=i}else if(e[n].type===`bullet_list_open`||e[n].type===`ordered_list_open`){let[r,i]=BS(e,n,a.options());t.push(r),a.remember(r.raw),n=i}else{let r=bC(e,n,a.options(),qS);r?(t.push(r[0]),a.remember(r[0].raw),n=r[1]):n+=1}i.push({type:`list_item`,children:t,raw:t.map(e=>e.raw).join(``)}),o=n+1}else o+=1;return[{type:`list`,ordered:r.type===`ordered_list_open`,start:(()=>{if(r.attrs&&r.attrs.length){let e=r.attrs.find(e=>e[0]===`start`);if(e){let t=Number(e[1]);return Number.isFinite(t)&&t!==0?t:1}}})(),items:i,raw:i.map(e=>e.raw).join(`
|
|
89
89
|
`)},o+1]}function VS(e,t,n,r){let i=String(n[1]??`note`),a=String(n[2]??i.charAt(0).toUpperCase()+i.slice(1)),o=[],s=ey(r,!0),c=t+1;for(;c<e.length&&e[c].type!==`container_close`;)if(e[c].type===`paragraph_open`){let t=e[c+1];if(t){let e={type:`paragraph`,children:IS(t.children||[],String(t.content??``),void 0,s.options()),raw:String(t.content??``)};o.push(e),s.remember(e.raw)}c+=3}else if(e[c].type===`bullet_list_open`||e[c].type===`ordered_list_open`){let[t,n]=BS(e,c,s.options());o.push(t),s.remember(t.raw),c=n}else if(e[c].type===`blockquote_open`){let[t,n]=JS(e,c,s.options());o.push(t),s.remember(t.raw),c=n}else{let t=yC(e,c,s.options());t?(o.push(t[0]),s.remember(t[0].raw),c=t[1]):c++}return[{type:`admonition`,kind:i,title:a,children:o,raw:`:::${i} ${a}\n${o.map(e=>e.raw).join(`
|
|
90
90
|
`)}\n:::`},c+1]}var HS=new Set([`warning`,`info`,`note`,`tip`,`danger`,`caution`]);function US(e){let t=0;for(;t<e.length&&t<3&&e[t]===`:`;)t++;if(t===0||e[t]===`:`)return null;let n=e.slice(t).trimStart();if(!n)return null;let r=n.search(/\s/),i=(r===-1?n:n.slice(0,r)).toLowerCase();return HS.has(i)?{kind:i,title:r===-1?``:n.slice(r).trim()}:null}function WS(e,t,n){let r=e[t],i=`note`,a=``,o=r.type.match(/^container_(\w+)_open$/);if(o){i=o[1];let e=String(r.info??``).trim();if(e&&!e.startsWith(`:::`)&&e.toLowerCase().startsWith(i)){let t=e.slice(i.length).trim();t&&(a=t)}}else{let e=US(String(r.info??``).trim());e&&(i=e.kind,a=e.title)}a||=i.charAt(0).toUpperCase()+i.slice(1);let s=[],c=ey(n,!0),l=t+1,u=RegExp(`^container_${i}_close$`);for(;l<e.length&&e[l].type!==`container_close`&&!u.test(e[l].type);)if(e[l].type===`paragraph_open`){let t=e[l+1];if(t){let e=t.children||[],n=-1;for(let t=e.length-1;t>=0;t--){let r=e[t];if(r.type===`text`&&/:+/.test(r.content)){n=t;break}}let r={type:`paragraph`,children:IS((n===-1?e:e.slice(0,n))||[],void 0,void 0,c.options()),raw:String(t.content??``).replace(/\n:+$/,``).replace(/\n\s*:::\s*$/,``)};s.push(r),c.remember(r.raw)}l+=3}else if(e[l].type===`bullet_list_open`||e[l].type===`ordered_list_open`){let[t,n]=BS(e,l,c.options());s.push(t),c.remember(t.raw),l=n}else if(e[l].type===`blockquote_open`){let[t,n]=JS(e,l,c.options());s.push(t),c.remember(t.raw),l=n}else{let t=yC(e,l,c.options());t?(s.push(t[0]),c.remember(t[0].raw),l=t[1]):l++}return[{type:`admonition`,kind:i,title:a,children:s,raw:`:::${i} ${a}\n${s.map(e=>e.raw).join(`
|
|
91
91
|
`)}\n:::`},l+1]}var GS=/^::: ?(warning|info|note|tip|danger|caution|error) ?(.*)$/;function KS(e,t,n){let r=e[t];if(r.type!==`container_open`)return null;let i=GS.exec(String(r.info??``));return i?VS(e,t,i,n):null}var qS={parseContainer:(e,t,n)=>WS(e,t,n),matchAdmonition:KS};function JS(e,t,n){let r=[],i=ey(n,!0),a=t+1;for(;a<e.length&&e[a].type!==`blockquote_close`;)switch(e[a].type){case`paragraph_open`:{let t=e[a+1],n={type:`paragraph`,children:IS(t.children||[],String(t.content??``),void 0,i.options()),raw:String(t.content??``)};r.push(n),i.remember(n.raw),a+=3;break}case`bullet_list_open`:case`ordered_list_open`:{let[t,n]=BS(e,a,i.options());r.push(t),i.remember(t.raw),a=n;break}case`blockquote_open`:{let[t,n]=JS(e,a,i.options());r.push(t),i.remember(t.raw),a=n;break}default:{let t=bC(e,a,i.options(),qS);t?(r.push(t[0]),i.remember(t[0].raw),a=t[1]):a++;break}}return[{type:`blockquote`,children:r,raw:r.map(e=>e.raw).join(`
|
|
@@ -103,7 +103,7 @@ import{a as e,n as t,r as n,t as r}from"./rolldown-runtime-CMxvf4Kt.js";import{A
|
|
|
103
103
|
`){n++;continue}return-1}return r===t.length?n:-1}function uw(e,t,n){return n?e:`${e.replace(/<[^>]*$/,``)}\n</${t}>`}function dw(e){return e.replace(/\r\n/g,`
|
|
104
104
|
`).replace(/(^|\n)[ \t]{1,4}/g,`$1`)}function fw(e,t,n){return n?e.includes(n,t)?!0:dw(e.slice(Math.max(0,t))).includes(dw(n)):!1}function pw(e,t){let n=Math.max(0,t);for(;n<e.length&&(e[n]===` `||e[n]===` `);)n++;return e[n]===`\r`?(n++,e[n]===`
|
|
105
105
|
`&&n++,n):e[n]===`
|
|
106
|
-
`?n+1:t}function mw(e){if(e.type!==`html_block`||String(e.tag??``).toLowerCase()!==`details`)return!1;let t=String(e.raw??e.content??``);return/^\s*<details\b/i.test(t)}function hw(e){if(e.type!==`html_block`)return!1;let t=String(e.raw??e.content??``);return/^\s*<\/details\b/i.test(t)}function gw(e,t){let n=new RegExp(String.raw`<\s*\/\s*${H_(t)}(?=\s|>)`,`gi`),r=-1,i;for(;(i=n.exec(e))!==null;)r=i.index;return r}function _w(e,t){return{final:t,__disableStreamParse:!0,requireClosingStrong:e.requireClosingStrong,customHtmlTags:e.customHtmlTags,validateLink:e.validateLink}}var vw=new Set([`admonition`,`blockquote`,`code_block`,`definition_list`,`footnote`,`heading`,`list`,`math_block`,`table`,`thematic_break`]),yw=/(?:^|\n)\s{0,3}(?:#{1,6}\s+\S|[-+*]\s+\S|\d+[.)]\s+\S|>\s*\S|`{3,}|~{3,}|(?:\*{3,}|-{3,}|_{3,})(?:\s|$)|\|.*\|)/m;function bw(e){return/\n\s*\n/.test(e)||yw.test(e)}function xw(e,t){if(!e.trim()||t.length===0)return!1;if(t.some(e=>vw.has(String(e?.type??``).toLowerCase()))||t.some(e=>{if(e?.type!==`html_block`)return!1;let t=EC(e);return Array.isArray(t.children)&&t.children.length>0}))return!0;if(!bw(e))return!1;if(t.length>1)return!0;let[n]=t;return!!(n&&n.type===`paragraph`)}function Sw(e,t,n,r){return e.map(e=>{if(e?.type!==`html_block`)return e;let i=EC(e),a=String(i.tag??``).toLowerCase();if(!a||a===`details`||A_.has(a)||Array.isArray(i.children))return e;let o=String(e.raw??i.content??``);if(!o)return e;let s=U_(o);if(s===-1)return e;let c=gw(o,a),l=c!==-1&&c>=s+1?o.slice(s+1,c):o.slice(s+1);if(!l.trim())return e;let u=Cw(l,t,_w(n,r));return xw(l,u)?{...e,children:u}:e})}function Cw(e,t,n){return e.trim()?Pw(e,t,{...n,__disableStreamParse:!0}):[]}function ww(e,t,n){let r=Cw(e,t,n),i=r[0];return r.length===1&&i?.type===`paragraph`&&Array.isArray(i.children)?i.children:r}function Tw(e,t,n){let r=eC({content:e}),i=U_(e),a=gw(e,`summary`);if(i!==-1&&a!==-1&&a>=i+1){let o=ww(e.slice(i+1,a),t,n);o.length>0&&(r.children=o)}return r.raw=e,r}function Ew(e,t,n){let r=U_(e);if(r===-1)return[];let i=e.slice(r+1);if(!i.trim())return[];let a=cw(i,`summary`,0);if(!a)return Cw(i,t,n);let o=i.slice(0,a.start),s=i.slice(a.end);return[...Cw(o,t,n),Tw(a.raw,t,n),...Cw(s,t,n)]}function Dw(e,t,n,r,i,a=0){let o=[],s=a;for(let a=0;a<e.length;a++){let c=e[a],l=ow(c),u=-1;if(l&&(u=t.indexOf(l,s),u!==-1&&(s=u+l.length)),!mw(c)){o.push(c);continue}let d=String(c.raw??ow(c)??``),f=u===-1?t.indexOf(d,Math.max(0,s-d.length)):u;if(f===-1){o.push(c);continue}let p=1,m=-1;for(let t=a+1;t<e.length;t++){let n=e[t];if(mw(n)){p++;continue}if(hw(n)&&(p--,p===0)){m=t;break}}let h=cw(t,`details`,f),g=m===-1&&h?.closed===!0,_=g?(()=>{let e=gw(d,`details`);return e===-1?d:d.slice(0,e)})():d,[v]=Dw(g?[]:m===-1?e.slice(a+1):e.slice(a+1,m),t,n,r,i,f+d.length),y=Ew(_,n,_w(r,i)),b=m===-1?`</details>`:String(e[m].raw??ow(e[m])??`</details>`),x=g||m!==-1&&h?.closed===!0,S=b.replace(/[\t\r\n ]+$/,``),C=x?(()=>{let e=(h?.raw??``).lastIndexOf(S);return e===-1?t.length:f+e})():t.length,w=U_(d),T=g&&w!==-1?f+w+1:f+d.length,E=t.slice(T,C===-1?t.length:C),D=n.parse(E,{__markstreamFinal:i}),O=n.renderer.render(D,n.options,{__markstreamFinal:i}),k=C+S.length,A=x?Math.max(C+b.length,pw(t,k)):t.length,j=x?t.slice(C,A):b,
|
|
106
|
+
`?n+1:t}function mw(e){if(e.type!==`html_block`||String(e.tag??``).toLowerCase()!==`details`)return!1;let t=String(e.raw??e.content??``);return/^\s*<details\b/i.test(t)}function hw(e){if(e.type!==`html_block`)return!1;let t=String(e.raw??e.content??``);return/^\s*<\/details\b/i.test(t)}function gw(e,t){let n=new RegExp(String.raw`<\s*\/\s*${H_(t)}(?=\s|>)`,`gi`),r=-1,i;for(;(i=n.exec(e))!==null;)r=i.index;return r}function _w(e,t){return{final:t,__disableStreamParse:!0,requireClosingStrong:e.requireClosingStrong,customHtmlTags:e.customHtmlTags,validateLink:e.validateLink}}var vw=new Set([`admonition`,`blockquote`,`code_block`,`definition_list`,`footnote`,`heading`,`list`,`math_block`,`table`,`thematic_break`]),yw=/(?:^|\n)\s{0,3}(?:#{1,6}\s+\S|[-+*]\s+\S|\d+[.)]\s+\S|>\s*\S|`{3,}|~{3,}|(?:\*{3,}|-{3,}|_{3,})(?:\s|$)|\|.*\|)/m;function bw(e){return/\n\s*\n/.test(e)||yw.test(e)}function xw(e,t){if(!e.trim()||t.length===0)return!1;if(t.some(e=>vw.has(String(e?.type??``).toLowerCase()))||t.some(e=>{if(e?.type!==`html_block`)return!1;let t=EC(e);return Array.isArray(t.children)&&t.children.length>0}))return!0;if(!bw(e))return!1;if(t.length>1)return!0;let[n]=t;return!!(n&&n.type===`paragraph`)}function Sw(e,t,n,r){return e.map(e=>{if(e?.type!==`html_block`)return e;let i=EC(e),a=String(i.tag??``).toLowerCase();if(!a||a===`details`||A_.has(a)||Array.isArray(i.children))return e;let o=String(e.raw??i.content??``);if(!o)return e;let s=U_(o);if(s===-1)return e;let c=gw(o,a),l=c!==-1&&c>=s+1?o.slice(s+1,c):o.slice(s+1);if(!l.trim())return e;let u=Cw(l,t,_w(n,r));return xw(l,u)?{...e,children:u}:e})}function Cw(e,t,n){return e.trim()?Pw(e,t,{...n,__disableStreamParse:!0}):[]}function ww(e,t,n){let r=Cw(e,t,n),i=r[0];return r.length===1&&i?.type===`paragraph`&&Array.isArray(i.children)?i.children:r}function Tw(e,t,n){let r=eC({content:e}),i=U_(e),a=gw(e,`summary`);if(i!==-1&&a!==-1&&a>=i+1){let o=ww(e.slice(i+1,a),t,n);o.length>0&&(r.children=o)}return r.raw=e,r}function Ew(e,t,n){let r=U_(e);if(r===-1)return[];let i=e.slice(r+1);if(!i.trim())return[];let a=cw(i,`summary`,0);if(!a)return Cw(i,t,n);let o=i.slice(0,a.start),s=i.slice(a.end);return[...Cw(o,t,n),Tw(a.raw,t,n),...Cw(s,t,n)]}function Dw(e,t,n,r,i,a=0){let o=[],s=a;for(let a=0;a<e.length;a++){let c=e[a],l=ow(c),u=-1;if(l&&(u=t.indexOf(l,s),u!==-1&&(s=u+l.length)),!mw(c)){o.push(c);continue}let d=String(c.raw??ow(c)??``),f=u===-1?t.indexOf(d,Math.max(0,s-d.length)):u;if(f===-1){o.push(c);continue}let p=1,m=-1;for(let t=a+1;t<e.length;t++){let n=e[t];if(mw(n)){p++;continue}if(hw(n)&&(p--,p===0)){m=t;break}}let h=cw(t,`details`,f),g=m===-1&&h?.closed===!0,_=g?(()=>{let e=gw(d,`details`);return e===-1?d:d.slice(0,e)})():d,[v]=Dw(g?[]:m===-1?e.slice(a+1):e.slice(a+1,m),t,n,r,i,f+d.length),y=Ew(_,n,_w(r,i)),b=m===-1?`</details>`:String(e[m].raw??ow(e[m])??`</details>`),x=g||m!==-1&&h?.closed===!0,S=b.replace(/[\t\r\n ]+$/,``),C=x?(()=>{let e=(h?.raw??``).lastIndexOf(S);return e===-1?t.length:f+e})():t.length,w=U_(d),T=g&&w!==-1?f+w+1:f+d.length,E=t.slice(T,C===-1?t.length:C),D=n.parse(E,{__markstreamFinal:i}),O=n.renderer.render(D,n.options,{__markstreamFinal:i}),k=C+S.length,A=x?Math.max(C+b.length,pw(t,k)):t.length,j=x?t.slice(C,A):b,M=x?t.slice(f,A):t.slice(f),N=g&&w!==-1?d.slice(0,w+1):d;if(o.push({...c,tag:`details`,attrs:W_(d.slice(0,w+1)),raw:M,content:`${N}${O}${j}`,children:[...y,...v],loading:!i&&!x}),s=x?A:t.length,m===-1&&!g)break;m!==-1&&(a=m)}return[o,s]}function Ow(e,t,n){if(!n)return e;let r=e.slice(),i=0;for(let e=0;e<r.length;e++){let a=r[e],o=ow(a),s=o?n.indexOf(o,i):-1;if(a?.type!==`html_block`){s!==-1&&(i=s+o.length);continue}let c=String(a.tag??``).toLowerCase();if(!c)continue;if(c===`details`){s!==-1&&(i=s+o.length);continue}let l=cw(n,c,s===-1?i:s);if(!l)continue;i=l.end;let u=String(a.content??o),d=String(a.raw??u),f=uw(l.raw,c,l.closed),p=!t&&!l.closed,m=u!==f||d!==l.raw||!!a.loading!==p,h=U_(l.raw),g=h===-1?``:l.raw.slice(0,h+1),_=g?W_(g):[];if(a.content=f,a.raw=l.raw,a.loading=p,a.attrs=_.length?_:void 0,!m)continue;let v=lw(l.raw,d);v===-1&&(v=0);let y=e+1;for(;y<r.length;){if(l.closed&&sw(r[y],c)){r.splice(y,1);continue}let e=ow(r[y]);if(!e)break;let t=l.raw.indexOf(e,v);if(t===-1){if(fw(n,l.end,e))break;r.splice(y,1);continue}v=t+e.length,r.splice(y,1)}}return r}function kw(e){let t=e=>e===` `||e===` `||e===`
|
|
107
107
|
`||e===`\r`,n=e=>{if(!e||e[0]!==`<`||e.includes(`>`))return!1;let n=1;if(n<e.length&&t(e[n])||e[n]===`/`&&(n++,n<e.length&&t(e[n])))return!1;let r=e=>{let t=e.charCodeAt(0);return t>=65&&t<=90||t>=97&&t<=122},i=e=>{let t=e.charCodeAt(0);return t>=48&&t<=57},a=e=>e===`!`||r(e),o=e=>r(e)||i(e)||e===`:`||e===`-`,s=e=>r(e)||i(e)||e===`_`||e===`.`||e===`:`||e===`-`,c=s;if(n>=e.length||!a(e[n]))return!1;for(n++;n<e.length&&o(e[n]);)n++;for(;n<e.length;){for(;n<e.length&&t(e[n]);)n++;if(n>=e.length)return!0;if(e[n]===`/`){for(n++;n<e.length&&t(e[n]);)n++;return n>=e.length}if(!s(e[n]))return!1;for(n++;n<e.length&&c(e[n]);)n++;for(;n<e.length&&t(e[n]);)n++;if(n<e.length&&e[n]===`=`){for(n++;n<e.length&&t(e[n]);)n++;if(n>=e.length)return!0;let r=e[n];if(r===`"`||r===`'`){for(n++;n<e.length&&e[n]!==r;)n++;if(n>=e.length)return!0;n++}else{for(;n<e.length;){let r=e[n];if(t(r)||r===`<`||r===`>`||r===`"`||r===`'`||r==="`")break;n++}if(n>=e.length)return!0}}}return!0},r=(e,t)=>{let n=!1,r=``,i=0,a=e=>e===` `||e===` `,o=e=>{let t=0;for(;t<e.length&&a(e[t]);)t++;let n=e[t];if(n!=="`"&&n!==`~`)return null;let r=t;for(;r<e.length&&e[r]===n;)r++;let i=r-t;return i<3?null:{markerChar:n,markerLen:i,rest:e.slice(r)}},s=e=>{let t=0;for(;t<e.length&&a(e[t]);)t++;let n=!1;for(;t<e.length&&e[t]===`>`;)for(n=!0,t++;t<e.length&&a(e[t]);)t++;return n?e.slice(t):null},c=e=>{let t=o(e);if(t)return t;let n=s(e);return n==null?null:o(n)},l=0,u=e.split(/\r?\n/);for(let e of u){let a=l,o=l+e.length;if(t<a)break;let s=c(e);if(s){let e=s.markerChar,t=s.markerLen;n?e===r&&t>=i&&/^\s*$/.test(s.rest)&&(n=!1,r=``,i=0):(n=!0,r=e,i=t)}if(t<=o)break;l=o+1}return n},i=String(e??``),a=i.lastIndexOf(`<`);if(a===-1||r(i,a))return i;if(a>0){let e=i[a-1],t=e===` `||e===` `||e===`
|
|
108
108
|
`||e===`\r`,n=i[a-2];if(!t&&!((e===`n`||e===`r`)&&n===`\\`))return i}let o=i.slice(a);return o.includes(`>`)||o.length>1&&(o[1]===` `||o[1]===` `||o[1]===`
|
|
109
109
|
`||o[1]===`\r`)||!n(o)?i:i.slice(0,a)}function Aw(e,t){if(!e||!t.length)return e;let n=new Set(t.map(e=>String(e??``).toLowerCase()).filter(Boolean));if(!n.size)return e;let r=e=>e===` `||e===` `,i=e=>{let t=e.charCodeAt(0);return t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||e===`_`||e===`-`||e===`:`},a=e=>{if(!e)return!1;if(e[0]===` `)return!0;let t=0;for(let n=0;n<e.length;n++){let r=e[n];if(r===` `){if(t++,t>=4)return!0;continue}if(r===` `)return!0;break}return!1},o=e=>{let t=!1,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(i===`\\`){r++;continue}if(!n&&i===`'`){t=!t;continue}if(!t&&i===`"`){n=!n;continue}if(!t&&!n&&i===`>`)return r}return-1},s=e=>{let t=0;for(;t<e.length&&r(e[t]);)t++;let n=e[t];if(n!=="`"&&n!==`~`)return null;let i=t;for(;i<e.length&&e[i]===n;)i++;let a=i-t;return a<3?null:{markerChar:n,markerLen:a,rest:e.slice(i)}},c=(t,s)=>{if(a(t))return-1;let c=t.replace(/^[ \t]+/,``);if(!c||c.startsWith(`>`)||c.startsWith(`|`)||/^(?:[*+-]|\d+[.)])[\t ]+/.test(c))return-1;let l=!1,u=0;for(;u<t.length;){let a=t[u];if(a!==`<`){r(a)||(l=!0),u++;continue}let c=o(t.slice(u));if(c===-1){l=!0,u++;continue}let d=t.slice(u,u+c+1),f=1;for(;f<d.length&&r(d[f]);)f++;if(f>=d.length){l=!0,u++;continue}let p=d[f];if(p===`!`||p===`?`){l=!0,u+=c+1;continue}if(p===`/`){l=!0,u+=c+1;continue}let m=f;for(;f<d.length&&i(d[f]);)f++;if(f===m){l=!0,u++;continue}let h=d.slice(m,f).toLowerCase(),g=d[f];if(g&&g!==` `&&g!==` `&&g!==`>`&&g!==`/`){l=!0,u++;continue}let _=new RegExp(String.raw`<\s*\/\s*${h}\s*>`,`i`),v=/\/\s*>$/.test(d),y=_.test(t.slice(u+c+1)),b=_.test(e.slice(s+u+c+1)),x=/[\r\n]/.test(e.slice(s+u+c+1));if(l&&n.has(h)&&!v&&!y&&(b||x))return u;l=!0,u+=c+1}return-1},l=!1,u=``,d=0,f=``,p=0;for(;p<e.length;){let t=e.indexOf(`
|
|
@@ -141,23 +141,23 @@ import{a as e,n as t,r as n,t as r}from"./rolldown-runtime-CMxvf4Kt.js";import{A
|
|
|
141
141
|
<button class="copy-button" data-code="${s}">${d}</button>
|
|
142
142
|
</div>
|
|
143
143
|
<div class="code-editor"></div>
|
|
144
|
-
</div>`};let s=/^\[(\d+)\]/,c=/^\[([^\]\n]+)\]/,l=e=>{if(!e.startsWith(`[`))return!1;let t=c.exec(e);if(!t)return e!==`[`&&!/^\[\d+$/.test(e);let n=String(t[1]??``);return e.slice(t[0].length).startsWith(`(`)?!1:!/^\d+$/.test(n)};return n.inline.ruler.before(`escape`,`reference`,(e,t)=>{let n=e;if(n.src[n.pos]!==`[`)return!1;let r=s.exec(n.src.slice(n.pos));if(!r)return!1;let i=n.src.slice(Math.max(0,n.pos-120),n.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(i))return!1;let a=n.src.slice(n.pos+r[0].length);if(a.startsWith(`](`)||a.startsWith(`(`)||l(a))return!1;if(!t){let e=r[1],t=n.push(`reference`,`span`,0);t.content=e,t.markup=r[0],t.raw=r[0]}return n.pos+=r[0].length,!0}),n.renderer.rules.reference=(e,t)=>{let n=String(e[t].content??``);return`<span class="reference-link" data-reference-id="${n}" role="button" tabindex="0" title="Click to view reference">${n}</span>`},n}function zT({nextContent:e,previousContent:t,typewriterEnabled:n}){return!n||e===t?{settledContent:e,streamedDelta:``,appended:!1}:t&&e.startsWith(t)&&e.length>t.length?{settledContent:t,streamedDelta:e.slice(t.length),appended:!0}:{settledContent:e,streamedDelta:``,appended:!1}}function BT({nextContent:e,persistedContent:t,currentState:n,typewriterEnabled:r,streamRenderVersionChanged:i=!1}){let a=`${n.settledContent}${n.streamedDelta}`;return r?n.streamedDelta&&a===e?i?{settledContent:a,streamedDelta:``,appended:!1}:{settledContent:n.settledContent,streamedDelta:n.streamedDelta,appended:!1}:zT({nextContent:e,previousContent:t??a,typewriterEnabled:r}):{settledContent:e,streamedDelta:``,appended:!1}}var VT=new WeakMap;function HT(e){let t=VT.get(e);return t||(t={inFlight:new Map,completed:new Set,registeredAllLangs:!1,registeredThemes:[],registeredLangs:[],tail:Promise.resolve()},VT.set(e,t)),t}function UT(e,t){if(!t?.length)return[...e];let n=[...e],r=new Set(n);for(let e of t)r.has(e)||(r.add(e),n.push(e));return n}function WT(e){return!!(e.themes?.length||e.langs?.length)}function GT(e,t){if(!t?.length)return!0;let n=new Set(e);return t.every(e=>n.has(e))}function KT(e,t){return!t?.length||e.registeredAllLangs?!0:GT(e.registeredLangs,t)}function qT(e,t){return WT(t)&>(e.registeredThemes,t.themes)&&KT(e,t.langs)}function JT(e,t){if(!WT(t))return t;let n=UT(e.registeredThemes,t.themes),r=e.registeredAllLangs?[]:UT(e.registeredLangs,t.langs);return{...n.length?{themes:n}:{},...r.length?{langs:r}:{}}}var YT={plain:`plaintext`,text:`plaintext`,txt:`plaintext`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,ts:`typescript`,mts:`typescript`,cts:`typescript`,golang:`go`,py:`python`,rb:`ruby`,rs:`rust`,kt:`kotlin`,kts:`kotlin`,md:`markdown`,yml:`yaml`,sh:`shellscript`,bash:`shellscript`,zsh:`shellscript`,shell:`shellscript`,shellscript:`shellscript`,ps:`powershell`,ps1:`powershell`,pwsh:`powershell`,"c++":`cpp`,"c#":`csharp`,cs:`csharp`,objc:`objective-c`,objectivec:`objective-c`,"objective-c":`objective-c`,objectivecpp:`objective-cpp`,"objective-c++":`objective-cpp`,"objective-cpp":`objective-cpp`};function XT(e){let t=String(e??``).trim();if(!t)return``;let[n=``]=t.split(/\s+/);return n.split(`:`)[0]?.trim().toLowerCase()??``}function ZT(e){let t=XT(e);return YT[t]??t}function QT(e){if(!Array.isArray(e))return;let t=e.filter(e=>typeof e==`string`).map(e=>ZT(e)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function $T(e){if(!Array.isArray(e))return;let t=[],n=new Set;for(let r of e){if(typeof r!=`string`)continue;let e=r.trim();!e||n.has(e)||(n.add(e),t.push(e))}return t.length>0?t:void 0}function eE(e){return $T(e)?.join(`\0`)??``}function tE(e,t){let n=$T(e),r=QT(t);return{...n?.length?{themes:n}:{},...r?.length?{langs:r}:{}}}function nE(e,t){return`${eE(e)}\u0000\u0000${QT(t)?.join(`\0`)??``}`}function rE(e,t,n={hasRegisterHighlight:!0,hasCreateRenderer:!0}){let r=tE(e,t),i={...r},a=!!(i.langs?.length&&n.hasCreateRenderer&&!n.hasRegisterHighlight);return a&&(delete r.langs,delete i.langs),{key:nE(i.themes,i.langs),registerOptions:r,rendererOptions:i,ignoredLangs:a}}async function iE(e,t={},n){if(!e)return`ready`;let r=tE(t.themes,t.langs),i=nE(r.themes,r.langs),a=n&&n===i?n:i,o=HT(e);if(o.completed.has(a))return`ready`;if(qT(o,r))return o.completed.add(a),`ready`;let s=o.inFlight.get(a);if(s)return s;let c=o.tail.catch(()=>{}).then(()=>{if(o.completed.has(a)||qT(o,r))return o.completed.add(a),`ready`;let t=JT(o,r),n=nE(t.themes,t.langs);return o.completed.has(n)||qT(o,t)?(o.completed.add(a),o.completed.add(n),`ready`):Promise.resolve(e(t)).then(()=>(WT(t)?(o.registeredThemes=t.themes?[...t.themes]:o.registeredThemes,o.registeredLangs=t.langs?[...t.langs]:o.registeredLangs):o.registeredAllLangs=!0,o.completed.add(n),`ready`))}).then(()=>(o.completed.add(a),`ready`)).finally(()=>{o.inFlight.get(a)===c&&o.inFlight.delete(a)});return o.inFlight.set(a,c),o.tail=c.catch(()=>{}),c}function aE(e,t,n=1){let r=Number(e);return Number.isFinite(r)?Math.max(n,r):t}function oE(e,t){let n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var sE=class{constructor(e={},t){this.source=``,this.visible=``,this.done=!1,this.paused=!1,this.listeners=new Set,this.rafId=0,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.hasStarted=!1,this.destroyed=!1,this.getSnapshot=()=>({source:this.source,visible:this.visible,done:this.done,paused:this.paused,pendingChars:this.pendingChars,caughtUp:this.caughtUp,final:this.final}),this.subscribe=e=>this.destroyed?()=>{}:(this.listeners.add(e),()=>{this.listeners.delete(e)}),this.enqueue=e=>{if(this.destroyed||!e)return;this.done&&=!1;let t=this.source.length>0,n=this.pendingChars<=0;if(this.source+=e,n){let e=dE();this.startedAt=t&&this.hasStarted?e-this.normalizedStartDelayMs:e,this.lastTick=e,this.charBudget=0}this.hasStarted=!0,this.emit(),this.ensureLoop()},this.finish=(e={})=>{if(!this.destroyed){if(this.done=!0,e.flush??this.flushOnFinish){this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit();return}this.emit(),this.ensureLoop()}},this.flush=()=>{this.destroyed||(this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit())},this.reset=(e=``)=>{this.destroyed||(this.cancelLoop(),this.source=e,this.visible=e,this.done=!1,this.paused=!1,this.hasStarted=!1,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.emit())},this.pause=()=>{this.destroyed||this.paused||(this.paused=!0,this.cancelLoop(),this.emit())},this.resume=()=>{if(this.destroyed||!this.paused)return;this.paused=!1;let e=dE();this.lastTick=e,this.startedAt||=e,this.emit(),this.ensureLoop()},this.destroy=()=>{this.destroyed||(this.destroyed=!0,this.cancelLoop(),this.listeners.clear())},this.dispose=()=>{this.destroy()},this.tick=e=>{if(this.rafId=0,this.destroyed||this.paused)return;if(this.pendingChars<=0){this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond;return}if(e-this.startedAt<this.normalizedStartDelayMs){this.rafId=requestAnimationFrame(this.tick);return}let t=1e3/Math.max(1,this.maxCommitFps),n=Math.min(100,Math.max(0,e-this.lastTick));if(n<t){this.rafId=requestAnimationFrame(this.tick);return}this.lastTick=e;let r=this.pendingChars,i=r>this.normalizedCatchUpThreshold?this.normalizedCatchUpLatencyMs:this.normalizedTargetLatencyMs,a=fE(r/Math.max(.001,i/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(a-this.currentCps)*.2,this.charBudget+=this.currentCps*(n/1e3),this.charBudget<1){this.ensureLoop();return}let o=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),s=uE(this.source.slice(this.visible.length),o,this.segmenter);s.text&&(this.visible+=s.text,this.charBudget=Math.max(0,this.charBudget-s.graphemeCount),this.emit()),this.ensureLoop()};let{minCharsPerSecond:n=40,maxCharsPerSecond:r=1e3,targetLatencyMs:i=900,catchUpLatencyMs:a=350,catchUpThreshold:o=600,maxCommitFps:s=30,startDelayMs:c=80,maxCharsPerCommit:l=80,flushOnFinish:u=!1}=e;this.minCharsPerSecond=aE(n,40,1),this.maxCharsPerSecond=Math.max(this.minCharsPerSecond,aE(r,1e3,1)),this.normalizedTargetLatencyMs=aE(i,900,1),this.normalizedCatchUpLatencyMs=aE(a,350,1),this.normalizedCatchUpThreshold=oE(o,600),this.normalizedStartDelayMs=oE(c,80),this.maxCommitFps=Math.trunc(aE(s,30,1)),this.maxCharsPerCommit=Math.trunc(aE(l,80,1)),this.flushOnFinish=u,this.segmenter=lE(),t&&this.listeners.add(t),this.currentCps=this.minCharsPerSecond}get pendingChars(){return Math.max(0,this.source.length-this.visible.length)}get caughtUp(){return this.pendingChars===0}get final(){return this.done&&this.caughtUp}ensureLoop(){if(!(this.destroyed||this.rafId||this.paused||this.pendingChars<=0)){if(typeof requestAnimationFrame!=`function`){this.flush();return}this.rafId=requestAnimationFrame(this.tick)}}cancelLoop(){this.rafId&&=(typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(this.rafId),0)}emit(){if(!this.destroyed)for(let e of this.listeners)e()}};function cE(e={},t){let n=new sE(e,t);return{getSnapshot:n.getSnapshot,subscribe:n.subscribe,enqueue:n.enqueue,finish:n.finish,flush:n.flush,reset:n.reset,pause:n.pause,resume:n.resume,destroy:n.destroy,dispose:n.dispose}}function lE(){if(typeof Intl>`u`)return null;let e=Intl.Segmenter;return e?new e(void 0,{granularity:`grapheme`}):null}function uE(e,t,n){if(!e||t<=0)return{text:``,graphemeCount:0};if(!n){let n=Array.from(e).slice(0,t);return{text:n.join(``),graphemeCount:n.length}}let r=``,i=0;for(let a of n.segment(e)){if(i>=t)break;r+=a.segment,i++}return{text:r,graphemeCount:i}}function dE(){return typeof performance<`u`?performance.now():Date.now()}function fE(e,t,n){return Math.min(n,Math.max(t,e))}var pE=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),mE=Symbol.for(`markstream-vue:node-lifecycle`),hE=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M30 14v-2h-2V8h-2v4h-2V8h-2v4h-2v2h2v2h-2v2h2v4h2v-4h2v4h2v-4h2v-2h-2v-2Zm-4 2h-2v-2h2Zm-12.437 6A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>`,gE=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path d="M0 0h24v24H0z"/><path fill="#42a5f5" d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"/></svg>`,_E={id:`material`,core:{"":gE,plain:`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path d="M0 0h24v24H0z"/><path fill="#42a5f5" d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"/></svg>`,text:gE,javascript:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ffca28" d="M2 2v12h12V2zm6 6h1v4a1.003 1.003 0 0 1-1 1H7a1.003 1.003 0 0 1-1-1v-1h1v1h1zm3 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1"/></svg>`,typescript:`<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 16 16"><path fill="#0288d1" d="M2 2v12h12V2zm4 6h3v1H8v4H7V9H6zm5 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1"/></svg>`,jsx:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#00bcd4" d="M16 12c7.444 0 12 2.59 12 4s-4.556 4-12 4-12-2.59-12-4 4.556-4 12-4m0-2c-7.732 0-14 2.686-14 6s6.268 6 14 6 14-2.686 14-6-6.268-6-14-6"/><path fill="#00bcd4" d="M16 14a2 2 0 1 0 2 2 2 2 0 0 0-2-2"/><path fill="#00bcd4" d="M10.458 5.507c2.017 0 5.937 3.177 9.006 8.493 3.722 6.447 3.757 11.687 2.536 12.392a.9.9 0 0 1-.457.1c-2.017 0-5.938-3.176-9.007-8.492C8.814 11.553 8.779 6.313 10 5.608a.9.9 0 0 1 .458-.1m-.001-2A2.87 2.87 0 0 0 9 3.875C6.13 5.532 6.938 12.304 10.804 19c3.284 5.69 7.72 9.493 10.74 9.493A2.87 2.87 0 0 0 23 28.124c2.87-1.656 2.062-8.428-1.804-15.124-3.284-5.69-7.72-9.493-10.74-9.493Z"/><path fill="#00bcd4" d="M21.543 5.507a.9.9 0 0 1 .457.1c1.221.706 1.186 5.946-2.536 12.393-3.07 5.316-6.99 8.493-9.007 8.493a.9.9 0 0 1-.457-.1C8.779 25.686 8.814 20.446 12.536 14c3.07-5.316 6.99-8.493 9.007-8.493m0-2c-3.02 0-7.455 3.804-10.74 9.493C6.939 19.696 6.13 26.468 9 28.124a2.87 2.87 0 0 0 1.457.369c3.02 0 7.455-3.804 10.74-9.493C25.061 12.304 25.87 5.532 23 3.876a2.87 2.87 0 0 0-1.457-.369"/></svg>`,tsx:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M16 12c7.444 0 12 2.59 12 4s-4.556 4-12 4-12-2.59-12-4 4.556-4 12-4m0-2c-7.732 0-14 2.686-14 6s6.268 6 14 6 14-2.686 14-6-6.268-6-14-6"/><path fill="#0288d1" d="M16 14a2 2 0 1 0 2 2 2 2 0 0 0-2-2"/><path fill="#0288d1" d="M10.458 5.507c2.017 0 5.937 3.177 9.006 8.493 3.722 6.447 3.757 11.687 2.536 12.392a.9.9 0 0 1-.457.1c-2.017 0-5.938-3.176-9.007-8.492C8.814 11.553 8.779 6.313 10 5.608a.9.9 0 0 1 .458-.1m-.001-2A2.87 2.87 0 0 0 9 3.875C6.13 5.532 6.938 12.304 10.804 19c3.284 5.69 7.72 9.493 10.74 9.493A2.87 2.87 0 0 0 23 28.124c2.87-1.656 2.062-8.428-1.804-15.124-3.284-5.69-7.72-9.493-10.74-9.493Z"/><path fill="#0288d1" d="M21.543 5.507a.9.9 0 0 1 .457.1c1.221.706 1.186 5.946-2.536 12.393-3.07 5.316-6.99 8.493-9.007 8.493a.9.9 0 0 1-.457-.1C8.779 25.686 8.814 20.446 12.536 14c3.07-5.316 6.99-8.493 9.007-8.493m0-2c-3.02 0-7.455 3.804-10.74 9.493C6.939 19.696 6.13 26.468 9 28.124a2.87 2.87 0 0 0 1.457.369c3.02 0 7.455-3.804 10.74-9.493C25.061 12.304 25.87 5.532 23 3.876a2.87 2.87 0 0 0-1.457-.369"/></svg>`,html:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#e65100" d="m4 4 2 22 10 2 10-2 2-22Zm19.72 7H11.28l.29 3h11.86l-.802 9.335L15.99 25l-6.635-1.646L8.93 19h3.02l.19 2 3.86.77 3.84-.77.29-4H8.84L8 8h16Z"/></svg>`,css:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#7e57c2" d="M20 18h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 20 22h2v2h2v-2c0-.388-.562-.851-1.254-1.034C20.356 20.34 20 18.84 20 18m-3.254 2.966C14.356 20.34 14 18.84 14 18h-2v-2h-2v8h2v-2h4v2h2v-2c0-.388-.562-.851-1.254-1.034"/><path fill="#7e57c2" d="M24 4H4v20a4 4 0 0 0 4 4h16.16A3.84 3.84 0 0 0 28 24.16V8a4 4 0 0 0-4-4m2 14h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 26 22v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2Z"/></svg>`,scss:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ec407a" d="M27.837 5.673a4.33 4.33 0 0 0-2.293-2.701c-2.362-1.261-6.11-1.298-9.548-.092a26.3 26.3 0 0 0-8.76 4.966c-2.752 2.542-3.438 4.925-3.189 6.194.523 2.668 3.274 4.539 5.485 6.042.418.284.822.559 1.175.816-1.429.76-4.261 2.444-5.088 4.248a3.88 3.88 0 0 0-.118 3.332A2.37 2.37 0 0 0 6.869 29.8a5.6 5.6 0 0 0 1.49.2 6.35 6.35 0 0 0 5.19-2.856 6.74 6.74 0 0 0 .864-5.382 7.3 7.3 0 0 1 2.044-.03 3.92 3.92 0 0 1 2.816 1.311 1.82 1.82 0 0 1 .423 1.262 1.55 1.55 0 0 1-.772 1.05c-.234.14-.586.355-.504.803.036.194.198.633.894.512a2.93 2.93 0 0 0 2.145-2.651 4 4 0 0 0-1.197-2.904 5.94 5.94 0 0 0-4.396-1.626 10.6 10.6 0 0 0-2.672.304 20 20 0 0 0-2.203-1.846c-1.712-1.3-3.33-2.529-3.235-4.26.125-2.263 2.468-4.532 6.964-6.744 4.016-1.976 7.254-2.037 8.944-1.438a2 2 0 0 1 1.204.883 2.77 2.77 0 0 1-.36 2.47 9.71 9.71 0 0 1-7.425 4.304 3.86 3.86 0 0 1-3.238-.757c-.278-.302-.593-.645-1.074-.383q-.565.31-.225 1.189a3.9 3.9 0 0 0 2.407 1.92 11.7 11.7 0 0 0 7.128-.671c3.527-1.35 6.681-5.202 5.756-8.787M11.895 24.475a4 4 0 0 1-.192.468 4.5 4.5 0 0 1-.753 1.081 2.83 2.83 0 0 1-2.533 1.107c-.056-.032-.078-.146-.085-.193a3.28 3.28 0 0 1 1.076-2.284 11.3 11.3 0 0 1 2.644-1.933 3.85 3.85 0 0 1-.157 1.754"/></svg>`,json:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="#f9a825" d="M560-160v-80h120q17 0 28.5-11.5T720-280v-80q0-38 22-69t58-44v-14q-36-13-58-44t-22-69v-80q0-17-11.5-28.5T680-720H560v-80h120q50 0 85 35t35 85v80q0 17 11.5 28.5T840-560h40v160h-40q-17 0-28.5 11.5T800-360v80q0 50-35 85t-85 35zm-280 0q-50 0-85-35t-35-85v-80q0-17-11.5-28.5T120-400H80v-160h40q17 0 28.5-11.5T160-600v-80q0-50 35-85t85-35h120v80H280q-17 0-28.5 11.5T240-680v80q0 38-22 69t-58 44v14q36 13 58 44t22 69v80q0 17 11.5 28.5T280-240h120v80z"/></svg>`,python:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#0288d1" d="M9.86 2A2.86 2.86 0 0 0 7 4.86v1.68h4.29c.39 0 .71.57.71.96H4.86A2.86 2.86 0 0 0 2 10.36v3.781a2.86 2.86 0 0 0 2.86 2.86h1.18v-2.68a2.85 2.85 0 0 1 2.85-2.86h5.25c1.58 0 2.86-1.271 2.86-2.851V4.86A2.86 2.86 0 0 0 14.14 2zm-.72 1.61c.4 0 .72.12.72.71s-.32.891-.72.891c-.39 0-.71-.3-.71-.89s.32-.711.71-.711"/><path fill="#fdd835" d="M17.959 7v2.68a2.85 2.85 0 0 1-2.85 2.859H9.86A2.85 2.85 0 0 0 7 15.389v3.75a2.86 2.86 0 0 0 2.86 2.86h4.28A2.86 2.86 0 0 0 17 19.14v-1.68h-4.291c-.39 0-.709-.57-.709-.96h7.14A2.86 2.86 0 0 0 22 13.64V9.86A2.86 2.86 0 0 0 19.14 7zM8.32 11.513l-.004.004.038-.004zm6.54 7.276c.39 0 .71.3.71.89a.71.71 0 0 1-.71.71c-.4 0-.72-.12-.72-.71s.32-.89.72-.89"/></svg>`,ruby:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#f44336" d="M18.041 3.177c2.24.382 2.879 1.919 2.843 3.527V6.67l-1.013 13.266-13.132.897h.008c-1.093-.044-3.518-.151-3.634-3.545l1.217-2.222 2.462 5.74 2.097-6.77-.045.009.018-.018 6.85 2.186L13.945 9.3l6.53-.409-5.144-4.212 2.71-1.51v.009M3.113 17.252v.017zM6.916 6.874c2.63-2.622 6.033-4.168 7.34-2.844 1.297 1.306-.072 4.523-2.702 7.135-2.666 2.613-6.015 4.248-7.322 2.933-1.306-1.324.036-4.612 2.675-7.224z"/></svg>`,go:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#00acc1" d="M2 12h4v2H2zm-2 4h6v2H0zm4 4h2v2H4zm16.954-5H14v3h3.239a4.42 4.42 0 0 1-3.531 2 2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 15.292 13a2.73 2.73 0 0 1 1.749.584l2.962-1.185A5.6 5.6 0 0 0 15.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 6.4 6.4 0 0 0 .003-1.5"/><path fill="#00acc1" d="M26.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 5.614 5.614 0 0 0-5.659-6.5m2.681 6.137A4.515 4.515 0 0 1 24.708 20a2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 26.292 13a2.65 2.65 0 0 1 2.053.858 2.86 2.86 0 0 1 .628 2.28Z"/></svg>`,java:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#f44336" d="M4 26h24v2H4zM28 4H7a1 1 0 0 0-1 1v13a4 4 0 0 0 4 4h10a4 4 0 0 0 4-4v-4h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 8h-4V6h4Z"/></svg>`,kotlin:`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><defs><linearGradient id="a" x1="1.725" x2="22.185" y1="22.67" y2="1.982" gradientTransform="translate(1.306 1.129)scale(.89324)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#7c4dff"/><stop offset=".5" stop-color="#d500f9"/><stop offset="1" stop-color="#ef5350"/></linearGradient></defs><path fill="url(#a)" d="M2.975 2.976v18.048h18.05v-.03l-4.478-4.511-4.48-4.515 4.48-4.515 4.443-4.477z"/></svg>`,c:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M19.563 22A5.57 5.57 0 0 1 14 16.437v-2.873A5.57 5.57 0 0 1 19.563 8H24V2h-4.437A11.563 11.563 0 0 0 8 13.563v2.873A11.564 11.564 0 0 0 19.563 28H24v-6Z"/></svg>`,cpp:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M28 14v-4h-2v4h-6v-4h-2v4h-4v2h4v4h2v-4h6v4h2v-4h4v-2z"/><path fill="#0288d1" d="M13.563 22A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>`,cs:hE,csharp:hE,php:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#1e88e5" d="M12 18.08c-6.63 0-12-2.72-12-6.08s5.37-6.08 12-6.08S24 8.64 24 12s-5.37 6.08-12 6.08m-5.19-7.95c.54 0 .91.1 1.09.31.18.2.22.56.13 1.03-.1.53-.29.87-.58 1.09q-.42.33-1.29.33h-.87l.53-2.76zm-3.5 5.55h1.44l.34-1.75h1.23c.54 0 .98-.06 1.33-.17.35-.12.67-.31.96-.58.24-.22.43-.46.58-.73.15-.26.26-.56.31-.88.16-.78.05-1.39-.33-1.82-.39-.44-.99-.65-1.82-.65H4.59zm7.25-8.33-1.28 6.58h1.42l.74-3.77h1.14c.36 0 .6.06.71.18s.13.34.07.66l-.57 2.93h1.45l.59-3.07c.13-.62.03-1.07-.27-1.36-.3-.27-.85-.4-1.65-.4h-1.27L12 7.35zM18 10.13c.55 0 .91.1 1.09.31.18.2.22.56.13 1.03-.1.53-.29.87-.57 1.09-.29.22-.72.33-1.3.33h-.85l.5-2.76zm-3.5 5.55h1.44l.34-1.75h1.22c.55 0 1-.06 1.35-.17.35-.12.65-.31.95-.58.24-.22.44-.46.58-.73.15-.26.26-.56.32-.88.15-.78.04-1.39-.34-1.82-.36-.44-.99-.65-1.82-.65h-2.75z"/></svg>`,shell:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ff7043" d="M2 2a1 1 0 0 0-1 1v10c0 .554.446 1 1 1h12c.554 0 1-.446 1-1V3a1 1 0 0 0-1-1zm0 3h12v8H2zm1 2 2 2-2 2 1 1 3-3-3-3zm5 3.5V12h5v-1.5z"/></svg>`,powershell:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#03a9f4" d="M29.07 6H7.677A1.535 1.535 0 0 0 6.24 7.113l-4.2 17.774A.852.852 0 0 0 2.93 26h21.393a1.535 1.535 0 0 0 1.436-1.113L29.96 7.112A.852.852 0 0 0 29.07 6M8.626 23.797a1.4 1.4 0 0 1-1.814-.31l-.007-.009a1.075 1.075 0 0 1 .315-1.599l9.6-6.061-6.102-5.852-.01-.01a1.068 1.068 0 0 1 .084-1.625l.037-.03a1.38 1.38 0 0 1 1.8.07l7.233 6.957a1.1 1.1 0 0 1 .236.739 1.08 1.08 0 0 1-.412.79c-.074.04-.146.119-10.951 6.935ZM24 22.94A1.135 1.135 0 0 1 22.803 24h-5.634a1.061 1.061 0 1 1 .001-2.112h5.633A1.134 1.134 0 0 1 24 22.938Z"/></svg>`,sql:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ffca28" d="M16 24c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-8c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-12C10.477 4 6 4.895 6 6v4c0 1.1 4.475 2 10 2s10-.9 10-2V6c0-1.105-4.477-2-10-2"/></svg>`,yaml:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ff5252" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12c0 1.1-.9 2-2 2H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2m12 16v-2H9v2zm-4-4v-2H6v2z"/></svg>`,markdown:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="m14 10-4 3.5L6 10H4v12h4v-6l2 2 2-2v6h4V10zm12 6v-6h-4v6h-4l6 8 6-8z"/></svg>`,xml:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#8bc34a" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m.12 13.5 3.74 3.74 1.42-1.41-2.33-2.33 2.33-2.33-1.42-1.41zm11.16 0-3.74-3.74-1.42 1.41 2.33 2.33-2.33 2.33 1.42 1.41z"/></svg>`,rust:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ff7043" d="m30 12-4-2V6h-4l-2-4-4 2-4-2-2 4H6v4l-4 2 2 4-2 4 4 2v4h4l2 4 4-2 4 2 2-4h4v-4l4-2-2-4ZM6 16a9.9 9.9 0 0 1 .842-4H10v8H6.842A9.9 9.9 0 0 1 6 16m10 10a9.98 9.98 0 0 1-7.978-4H16v-2h-2v-2h4c.819.819.297 2.308 1.179 3.37a1.89 1.89 0 0 0 1.46.63h3.34A9.98 9.98 0 0 1 16 26m-2-12v-2h4a1 1 0 0 1 0 2Zm11.158 6H24a2.006 2.006 0 0 1-2-2 2 2 0 0 0-2-2 3 3 0 0 0 3-3q0-.08-.004-.161A3.115 3.115 0 0 0 19.83 10H8.022a9.986 9.986 0 0 1 17.136 10"/></svg>`,vue:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#41b883" d="M1.791 3.851 12 21.471 22.209 3.936V3.85H18.24l-6.18 10.616L5.906 3.851z"/><path fill="#35495e" d="m5.907 3.851 6.152 10.617L18.24 3.851h-3.723L12.084 8.03 9.66 3.85z"/></svg>`,mermaid:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="m14 10-4 3.5L6 10H4v12h4v-6l2 2 2-2v6h4V10zm12 6v-6h-4v6h-4l6 8 6-8z"/></svg>`},fallback:`<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ff7043" d="M2 2a1 1 0 0 0-1 1v10c0 .554.446 1 1 1h12c.554 0 1-.446 1-1V3a1 1 0 0 0-1-1zm0 3h12v8H2zm1 2 2 2-2 2 1 1 3-3-3-3zm5 3.5V12h5v-1.5z"/></svg>`,loadExtended:()=>K(()=>Promise.resolve().then(()=>sF).then(e=>e.materialExtendedMap),void 0)},vE=new Map,yE=`material`,bE=new Map,xE=new Map,SE=null;function CE(e){vE.set(e.id,e)}function wE(e){return pE(this,null,function*(){if(bE.has(e.id))return bE.get(e.id)??null;let t=xE.get(e.id);return t||(t=(e.loadExtended?.call(e)??Promise.resolve(null)).then(t=>(bE.set(e.id,t),SE?.(),t)).catch(()=>(bE.set(e.id,null),null)),xE.set(e.id,t)),t})}var TE=null,EE=oe(0);SE=()=>{EE.value++},CE(_E);var DE={"":``,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`,txt:`plain`,"c++":`cpp`,"c#":`csharp`,cs:`csharp`,"objective-c":`objectivec`,"objective-c++":`objectivecpp`,yml:`yaml`,md:`markdown`,rs:`rust`,kt:`kotlin`};function OE(e){let t=function(e){if(!e)return``;let t=e.trim();if(!t)return``;let[n]=t.split(/\s+/),[r]=n.split(`:`);return r.toLowerCase()}(e);return DE[t]??t}function kE(e){let t=OE(e);if(!t)return`plaintext`;switch(t){case`plain`:return`plaintext`;case`jsx`:return`javascript`;case`tsx`:return`typescript`;default:return t}}function AE(e){if(TE){let t=TE(e);if(t!=null&&t!==``)return t}return function(e){let t=vE.get(yE);if(!t)return;let n=t.core[e];if(n)return n;let r=bE.get(t.id);if(r){let t=r[e];if(t)return t}t.loadExtended&&!bE.has(t.id)&&wE(t)}(OE(e))||((n=(t=vE.get(yE))?.fallback)??``);var t,n}var jE={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#`,csharp:`C#`,php:`PHP`,sh:`Shell`,bash:`Bash`,sql:`SQL`,yaml:`YAML`,md:`Markdown`,d2:`D2`,d2lang:`D2`,"":`Plain Text`,plain:`Plain Text`},ME=!1;function NE(){return ME}function PE(){ME=!0}var FE=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),IE=null,LE=!1,RE=VE;function zE(e){let t=e?.default??e;return t&&typeof t.renderToString==`function`?t:null}function BE(){try{return zE(globalThis?.katex)}catch{return null}}function VE(){return FE(null,null,function*(){let e=BE();if(e)return e;let t=yield K(()=>import(`./__vite-optional-peer-dep_katex_markstream-vue-Bg9-FXxr.js`),[]);try{yield K(()=>import(`./mhchem_markstream-vue-tp86PqxG.js`),[])}catch{}return zE(t)})}function HE(){return typeof RE==`function`}function UE(){let e=RE;if(!e||e===VE)return null;if(IE)return IE;let t=BE();if(t)return IE=t,IE;try{let t=e();return t&&typeof t?.then!=`function`?(IE=zE(t)??t,IE):null}catch{return null}}function WE(){return FE(this,null,function*(){let e=BE();if(e)return IE=e,IE;if(IE)return IE;if(LE)return null;let t=RE;if(!t)return LE=!0,null;try{let e=yield t();if(e)return IE=zE(e)??e,IE}catch{}return LE=!0,null})}function GE(e){return e?e.replace(/·/g,`⋅`).replace(/℃/g,`°C`):``}var KE=null,qE=null,JE=new Map,YE=new Map,XE=5,ZE=new Set;function QE(){if(JE.size<XE&&ZE.size){let e=Array.from(ZE);ZE.clear();for(let t of e)try{t()}catch{}}}function $E(e,t=!0,n=2e3,r){return FE(this,null,function*(){performance.now();let i=GE(e);if(!HE()){let e=Error(`KaTeX rendering disabled`);return e.name=`KaTeXDisabled`,e.code=`KATEX_DISABLED`,Promise.reject(e)}if(qE)return Promise.reject(qE);let a=`${t?`d`:`i`}:${i}`,o=YE.get(a);if(o)return Promise.resolve(o);let s=KE||(qE=Error(`[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker().`),qE.name=`WorkerInitError`,qE.code=`WORKER_INIT_ERROR`,null);if(!s)return Promise.reject(qE);if(JE.size>=XE){let e=Error(`Worker busy`);return e.name=`WorkerBusy`,e.code=`WORKER_BUSY`,e.busy=!0,e.inFlight=JE.size,e.max=XE,Promise.reject(e)}return new Promise((e,a)=>{if(r?.aborted){let e=Error(`Aborted`);e.name=`AbortError`,a(e);return}let o=Math.random().toString(36).slice(2),c=globalThis.setTimeout(()=>{JE.delete(o);let e=Error(`Worker render timed out`);e.name=`WorkerTimeout`,e.code=`WORKER_TIMEOUT`,a(e),QE()},n);r&&r.addEventListener(`abort`,()=>{globalThis.clearTimeout(c),JE.has(o)&&JE.delete(o);let e=Error(`Aborted`);e.name=`AbortError`,a(e),QE()},{once:!0});let l=e,u=a;JE.set(o,{resolve:e=>{l(e)},reject:e=>{u(e)},timeoutId:c}),s.postMessage({id:o,content:i,displayMode:t})})})}function eD(e,t=!0,n){let r=`${t?`d`:`i`}:${GE(e)}`;if(YE.set(r,n),YE.size>200){let e=YE.keys().next().value;YE.delete(e)}}function tD(e=2e3,t){return JE.size<XE?Promise.resolve():new Promise((n,r)=>{let i,a=!1,o=()=>{a||(a=!0,i&&globalThis.clearTimeout(i),ZE.delete(o),n())};if(ZE.add(o),i=globalThis.setTimeout(()=>{if(a)return;a=!0,ZE.delete(o);let e=Error(`Wait for worker slot timed out`);e.name=`WorkerBusyTimeout`,e.code=`WORKER_BUSY_TIMEOUT`,r(e)},e),queueMicrotask(()=>QE()),t){let e=()=>{if(a)return;a=!0,i&&globalThis.clearTimeout(i),ZE.delete(o);let e=Error(`Aborted`);e.name=`AbortError`,r(e)};t.aborted?e():t.addEventListener(`abort`,e,{once:!0})}})}var nD={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function rD(e){return FE(this,arguments,function*(e,t=!0,n={}){if(!HE()){let e=Error(`KaTeX rendering disabled`);throw e.name=`KaTeXDisabled`,e.code=`KATEX_DISABLED`,e}let r=n.timeout??nD.timeout,i=n.waitTimeout??nD.waitTimeout,a=n.backoffMs??nD.backoffMs,o=n.maxRetries??nD.maxRetries,s=Number.isFinite(o)?Math.max(0,Math.min(Math.floor(o),8)):nD.maxRetries,c=n.signal,l=0;for(;;){if(c?.aborted){let e=Error(`Aborted`);throw e.name=`AbortError`,e}try{return yield $E(e,t,r,c)}catch(e){if(e?.code!==`WORKER_BUSY`||l>=s)throw e;if(l++,yield tD(i,c).catch(()=>{}),c?.aborted){let e=Error(`Aborted`);throw e.name=`AbortError`,e}a>0&&(yield new Promise(e=>globalThis.setTimeout(e,a*l)))}}})}var iD=Object.defineProperty,aD=Object.defineProperties,oD=Object.getOwnPropertyDescriptors,sD=Object.getOwnPropertySymbols,cD=Object.prototype.hasOwnProperty,lD=Object.prototype.propertyIsEnumerable,uD=(e,t,n)=>t in e?iD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dD=(e,t)=>{for(var n in t||={})cD.call(t,n)&&uD(e,n,t[n]);if(sD)for(var n of sD(t))lD.call(t,n)&&uD(e,n,t[n]);return e},fD=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),pD=()=>K(()=>import(`./__vite-optional-peer-dep_mermaid_markstream-vue-cPZl55sA.js`),[]),mD=null,hD=pD;function gD(){return typeof hD==`function`}function _D(e){if(!e)return e;let t=e&&e.default?e.default:e;if(t&&(typeof t.render==`function`||typeof t.parse==`function`||typeof t.initialize==`function`))return t;if(t&&t.mermaidAPI&&(typeof t.mermaidAPI.render==`function`||typeof t.mermaidAPI.parse==`function`)){let e=t.mermaidAPI;return n=dD({},t),r={render:e.render.bind(e),parse:e.parse?e.parse.bind(e):void 0,initialize:n=>typeof t.initialize==`function`?t.initialize(n):e.initialize?e.initialize(n):void 0},aD(n,oD(r))}var n,r;return e.mermaid&&typeof e.mermaid.render==`function`?e.mermaid:t}function vD(e){if(e)try{let t=e?.initialize;e.initialize=n=>{let r=dD({suppressErrorRendering:!0},n||{});return typeof t==`function`?t.call(e,r):e?.mermaidAPI&&typeof e.mermaidAPI.initialize==`function`?e.mermaidAPI.initialize(r):void 0}}catch{}}function yD(){return fD(this,null,function*(){if(mD)return mD;let e=function(){try{return _D(globalThis?.mermaid)}catch{return null}}();if(e)return mD=e,vD(mD),mD;let t=hD;if(!t)return null;let n;try{n=yield t()}catch(e){throw t===pD?Error(`Optional dependency "mermaid" is not installed. Please install it to enable mermaid diagrams.`):e}return n?(mD=_D(n),vD(mD),mD):null})}var bD=null,xD=null,SD=new Map,CD=5,wD=`WORKER_BUSY`,TD=`MERMAID_DISABLED`;function ED(e,t,n=1400){if(!gD()){let e=Error(`Mermaid rendering disabled`);return e.name=`MermaidDisabled`,e.code=TD,Promise.reject(e)}if(xD)return Promise.reject(xD);let r=bD||(xD=Error(`[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker().`),xD.name=`WorkerInitError`,xD.code=`WORKER_INIT_ERROR`,null);if(!r)return Promise.reject(xD);if(SD.size>=CD){let e=Error(`Worker busy`);return e.name=`WorkerBusy`,e.code=wD,e.inFlight=SD.size,e.max=CD,Promise.reject(e)}return new Promise((i,a)=>{let o=Math.random().toString(36).slice(2),s,c=!1,l=()=>{c||(c=!0,s!=null&&globalThis.clearTimeout(s),SD.delete(o))};SD.set(o,{resolve:e=>{l(),i(e)},reject:e=>{l(),a(e)}});try{r.postMessage({id:o,action:e,payload:t})}catch(e){SD.delete(o),a(e);return}s=globalThis.setTimeout(()=>{let e=Error(`Worker call timed out`);e.name=`WorkerTimeout`,e.code=`WORKER_TIMEOUT`;let t=SD.get(o);t&&t.reject(e)},n)})}function DD(e,t,n=1400){return fD(this,null,function*(){try{return yield ED(`canParse`,{code:e,theme:t},n)}catch(e){return Promise.reject(e)}})}function OD(e,t,n=1400){return fD(this,null,function*(){try{return yield ED(`findPrefix`,{code:e,theme:t},n)}catch(e){return Promise.reject(e)}})}function kD(){if(bD)try{for(let[e,t]of SD.entries())t.reject(Error(`Worker terminated`));SD.clear(),bD.terminate()}finally{bD=null}}function AD(e){try{if(typeof globalThis<`u`&&typeof globalThis.requestAnimationFrame==`function`)return globalThis.requestAnimationFrame(e)}catch{}return globalThis.setTimeout(e,0)}function jD(e){try{if(e==null)return;if(typeof globalThis<`u`&&typeof globalThis.cancelAnimationFrame==`function`)return void globalThis.cancelAnimationFrame(e)}catch{}try{globalThis.clearTimeout(e)}catch{}}var MD=Object.defineProperty,ND=Object.defineProperties,PD=Object.getOwnPropertyDescriptors,FD=Object.getOwnPropertySymbols,ID=Object.prototype.hasOwnProperty,LD=Object.prototype.propertyIsEnumerable,RD=(e,t,n)=>t in e?MD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$=(e,t)=>{for(var n in t||={})ID.call(t,n)&&RD(e,n,t[n]);if(FD)for(var n of FD(t))LD.call(t,n)&&RD(e,n,t[n]);return e},zD=(e,t)=>ND(e,PD(t)),BD=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),VD=`__global__`,HD=`__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__`,UD=(()=>{let e=globalThis;if(e[HD])return e[HD];let t={scopedCustomComponents:{},revision:oe(0)};return e[HD]=t,t})(),WD=UD.revision,GD=Symbol(`markstreamCustomComponents`),KD=new Set(`text.paragraph.heading.code_block.list.list_item.blockquote.table.table_row.table_cell.definition_list.definition_item.footnote.footnote_reference.footnote_anchor.admonition.hardbreak.link.image.thematic_break.math_inline.math_block.strong.emphasis.strikethrough.highlight.insert.subscript.superscript.emoji.checkbox.checkbox_input.inline_code.html_inline.html_block.reference.mermaid.infographic.d2.vmr_container`.split(`.`));function qD(e){return KD.has(String(e).trim().toLowerCase())}function JD(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,`$1-$2`).replace(/[_\s]+/g,`-`).toLowerCase()}function YD(e={}){let t={};for(let[n,r]of Object.entries(e))if(r!=null){t[n]=r;for(let e of new Set([q_(n),q_(JD(n))]))!e||qD(e)||Object.prototype.hasOwnProperty.call(t,e)||(t[e]=r)}return t}function XD(e){let t=i(GD,null);return I(()=>(WD.value,function(e,t={}){return WD.value,$($($({},YD(UD.scopedCustomComponents[VD]||{})),YD(t)),YD(function(e){return e&&UD.scopedCustomComponents[e]||{}}(e)))}(e?.(),t?.value??{})))}var ZD=[`aria-label`],QD={key:0,xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,class:`checkbox-icon checkbox-unchecked`},$D={key:1,xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,class:`checkbox-icon checkbox-checked`},eO=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},tO=eO(c({__name:`CheckboxNode`,props:{node:{}},setup:e=>(t,n)=>(G(),W(`span`,{class:`checkbox-node`,role:`img`,"aria-label":e.node.checked?`checked`:`unchecked`},[e.node.checked?(G(),W(`svg`,$D,[...n[1]||=[F(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`4`,fill:`currentColor`},null,-1),F(`path`,{d:`M9 12l2 2 4-4`,stroke:`hsl(var(--ms-background))`,"stroke-width":`2.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,-1)]])):(G(),W(`svg`,QD,[...n[0]||=[F(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`4`,stroke:`currentColor`,"stroke-width":`2`},null,-1)]]))],8,ZD))}),[[`__scopeId`,`data-v-be21ab83`]]);tO.install=e=>{e.component(tO.__name,tO)};var nO={class:`emoji-node`},rO=eO(c({__name:`EmojiNode`,props:{node:{}},setup:e=>(t,n)=>(G(),W(`span`,nO,H(e.node.name),1))}),[[`__scopeId`,`data-v-de55dc97`]]);rO.install=e=>{e.component(rO.__name,rO)};var iO=[`id`],aO=[`title`],oO=eO(c({__name:`FootnoteReferenceNode`,props:{node:{}},setup(e){let t=`#fnref--${e.node.id}`;function n(){if(typeof document>`u`)return;let e=document.querySelector(t);e?e.scrollIntoView({behavior:`smooth`}):console.warn(`Element with href: ${t} not found`)}return(r,i)=>(G(),W(`sup`,{id:`fnref-${e.node.id}`,class:`footnote-reference`,onClick:n},[F(`span`,{href:t,title:`查看脚注 ${e.node.id}`,class:`footnote-link cursor-pointer`},`[`+H(e.node.id)+`]`,9,aO)],8,iO))}}),[[`__scopeId`,`data-v-c1463a29`]]);oO.install=e=>{e.component(oO.__name,oO)};var sO=(()=>{try{return!1}catch{}return!1})();function cO(e){sO&&console.warn(e)}function lO(e,t=`safe`,n){return eT(e,t,n)}function uO(e){return iT(e)}function dO(e){return!0===e?``:!1===e?`false`:e==null?null:String(e)}function fO(e,t=`safe`){let n=String(e.tag||e.type||``).trim(),r=nT((i=e.attrs)?Array.isArray(i)?i.every(Array.isArray)?i.map(([e,t])=>[String(e),dO(t)]):i.filter(e=>e&&typeof e==`object`&&!Array.isArray(e)&&`name`in e).map(e=>[String(e.name),dO(e.value)]):Object.entries(i).map(([e,t])=>[e,dO(t)]):null,t,n);var i;if(!r)return;let a=uO(tT(r));return Object.keys(a).length>0?a:void 0}function pO(e,t,n=!1){let r=Object.entries(t??{}),i=r.length>0?r.map(([e,t])=>t===``?` ${e}`:` ${e}="${t}"`).join(``):``;return n?`<${e}${i} />`:`<${e}${i}>`}function mO(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function hO(e,t,n,r,i,a,o=!1){let s=function(e,t){return $w(e,t)}(e,r);if(k_.has(e.toLowerCase())||!s&&Kw(e,a))return null;if(!s&&Gw(e,a))return o?[pO(e,t,!0)]:[pO(e,t),...n,`</${e}>`];let c=eT(t,a,e),l=c.key,u=l!=null&&l!==``?l:i;return s?_(r[e]||r[e.toLowerCase()],zD($({},uO(c)),{key:u}),n.length>0?n:void 0):_(e,zD($({},c),{innerHTML:void 0,key:u}),n.length>0?n:void 0)}function gO(e,t){return lT(e,t)}function _O(e,t,n=`safe`){if(!e)return[];try{return function(e,t,n=`safe`){let r=0,i=[],a=[];for(let o of e)if(o.type===`text`)(i.length>0?i[i.length-1].children:a).push(o.content);else if(o.type===`self_closing`){let e=hO(o.tagName,o.attrs||{},[],t,`ms-html-`+ r++,n,!0);mO(i.length>0?i[i.length-1].children:a,e)}else if(o.type===`tag_open`)i.push({tagName:o.tagName,children:[],attrs:o.attrs,autoKey:`ms-html-`+ r++});else if(o.type===`tag_close`){let e=o.tagName.toLowerCase(),r=-1;for(let t=i.length-1;t>=0;t--)if(i[t].tagName.toLowerCase()===e){r=t;break}if(r!==-1)for(;i.length>r;){let o=i.pop(),s=hO(o.tagName,o.attrs||{},o.children,t,o.autoKey,n);i.length>0?mO(i[i.length-1].children,s):mO(a,s),o.tagName.toLowerCase()!==e&&i.length>r&&cO(`Auto-closing unclosed tag: <${o.tagName}>`)}else cO(`Ignoring closing tag with no matching opening tag: </${o.tagName}>`)}for(;i.length>0;){let e=i.pop(),r=hO(e.tagName,e.attrs||{},e.children,t,e.autoKey,n);i.length>0?mO(i[i.length-1].children,r):mO(a,r),cO(`Auto-closing unclosed tag: <${e.tagName}>`)}return a}(oT(e),t,n)}catch(e){return r=e,sO&&console.error(`Failed to parse HTML to VNodes:`,r),null}var r}var vO=[`innerHTML`],yO=eO(c({__name:`HtmlInlineNode`,props:{node:{},customId:{},htmlPolicy:{}},setup(e){let t=e,n=i(`markstreamHtmlPolicy`,void 0),r=I(()=>t.htmlPolicy??n?.value??`safe`),a=XD(()=>t.customId),o=c({name:`DynamicRenderer`,props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),s=I(()=>{let e=t.node.content;if(!e)return{mode:`html`,content:``};if(r.value===`escape`)return{mode:`html`,content:uT(e,r.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:`text`,content:e};if(t.node.loading&&t.node.autoClosed){let t=_O(e,a.value,r.value);if(t!==null)return{mode:`dynamic`,nodes:t}}if(!gO(e,a.value))return{mode:`html`,content:uT(e,r.value)};let n=_O(e,a.value,r.value);return n===null?{mode:`html`,content:uT(e,r.value)}:{mode:`dynamic`,nodes:n}});return(e,n)=>s.value.mode===`dynamic`?(G(),W(`span`,{key:0,class:L([`html-inline-node`,{"html-inline-node--loading":t.node.loading}])},[U(R(o),{nodes:s.value.nodes},null,8,[`nodes`])],2)):s.value.mode===`text`?(G(),W(`span`,{key:1,class:L([`html-inline-node`,{"html-inline-node--loading":t.node.loading}])},H(s.value.content),3)):(G(),W(`span`,{key:2,class:L([`html-inline-node`,{"html-inline-node--loading":t.node.loading}]),innerHTML:s.value.content},null,10,vO))}}),[[`__scopeId`,`data-v-d17f12b0`]]);yO.install=e=>{e.component(yO.__name,yO)};var bO={class:`inline-code`},xO={key:0},SO=eO(c({__name:`InlineCodeNode`,props:{node:{}},setup(e){let t=e,n=p(),r=i(`markstreamFade`,void 0),a=i(`markstreamTextStreamState`,void 0),s=i(`markstreamStreamVersion`,void 0),c=I(()=>{let e=n.fade;return e===``||!0===e||e===`true`||!1!==e&&e!==`false`&&void 0}),l=I(()=>typeof c.value==`boolean`?c.value:typeof r?.value!=`boolean`||r.value),u=I(()=>String(t.node.code??``)),d=I(()=>!l.value),f=I(()=>{let e=n[`index-key`]??n.indexKey;return e==null||e===``?``:String(e)}),m=M(t.node.code),h=M(``),g=s?.value,_=M(0);function v(){return m.value+h.value}function y(){h.value&&=(m.value=v(),``)}E([()=>t.node.code,f,l,()=>s?.value],([e,t,n,r])=>{let i=String(e??``),o=f.value,s=r!==g;g=r;let c=BT({nextContent:i,persistedContent:o?a?.get(o):void 0,currentState:{settledContent:m.value,streamedDelta:h.value},typewriterEnabled:l.value,streamRenderVersionChanged:s});m.value=c.settledContent,h.value=c.streamedDelta,c.appended&&(_.value+=1),o&&a?.set(o,i)},{immediate:!0}),E(l,e=>{var t;e||(t=v(),m.value=t,h.value=``)});let b=I(()=>_.value%2==0?`inline-code-stream-delta--a`:`inline-code-stream-delta--b`);return(e,t)=>(G(),W(`code`,bO,[d.value?(G(),W(N,{key:0},[o(H(u.value),1)],64)):(G(),W(N,{key:1},[m.value?(G(),W(`span`,xO,H(m.value),1)):V(``,!0),h.value?(G(),W(`span`,{key:1,class:L([`inline-code-stream-delta`,[b.value]]),onAnimationend:y},H(h.value),35)):V(``,!0)],64))]))}}),[[`__scopeId`,`data-v-1b73ee4e`]]);SO.install=e=>{e.component(SO.__name,SO)};var CO=M(!1),wO=M(``),TO=M(`top`),EO=M(null),DO=M(null),OO=M(null),kO=M(null),AO=M(null),jO=null,MO=null,NO=0;function PO(){jO&&=(clearTimeout(jO),null),MO&&=(clearTimeout(MO),null)}var FO=!1,IO=null,LO=!1;function RO(e,t,n=`top`,r=!1,i,a){if(!e)return;let o=++NO;PO();let s=()=>BD(null,null,function*(){if(yield function(){return BD(this,null,function*(){if(!FO&&!LO&&typeof document<`u`){IO??=BD(null,null,function*(){let[{createApp:e,h:t},{default:n}]=yield Promise.all([K(()=>import(`./element-plus-CJjFCgLP.js`).then(e=>e.tn),__vite__mapDeps([0,1,2])),K(()=>Promise.resolve().then(()=>nF),void 0)]),r=document.createElement(`div`);r.setAttribute(`data-singleton-tooltip`,`1`),document.body.appendChild(r),e({setup:()=>()=>t(n,{visible:CO.value,"anchor-el":EO.value,content:wO.value,placement:TO.value,id:DO.value,originX:OO.value,originY:kO.value,isDark:AO.value??void 0})}).mount(r),FO=!0});try{yield IO}catch(e){FO=!1,IO=null,LO=!0,console.warn(`[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.`,e)}}})}(),FO&&o===NO){DO.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,EO.value=e,wO.value=t,TO.value=n,OO.value=i?.x??null,kO.value=i?.y??null,AO.value=typeof a==`boolean`?a:null,CO.value=!0;try{e.setAttribute(`aria-describedby`,DO.value)}catch{}}});r?s():jO=setTimeout(s,80)}function zO(e=!1){NO+=1,PO();let t=()=>{if(EO.value&&DO.value)try{EO.value.removeAttribute(`aria-describedby`)}catch{}CO.value=!1,EO.value=null,DO.value=null,OO.value=null,kO.value=null};e?t():MO=setTimeout(t,120)}var BO={"common.copy":`Copy`,"common.copied":`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.minimize":`Minimize`,"common.zoomIn":`Zoom in`,"common.zoomOut":`Zoom out`,"common.resetZoom":`Reset zoom`,"image.loadError":`Image failed to load`,"image.loading":`Loading image...`},VO=e=>BO[e]??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);function HO(e){return{t(t){if(e.te&&BO[t]&&!e.te(t))return VO(t);let n=e.t(t);return n===t&&BO[t]?VO(t):n}}}function UO(){let e=function(){try{let e=s(),t=e?.proxy,n=t?.$t;if(typeof n==`function`){let e=t?.$te;return{t:n.bind(t),te:typeof e==`function`?e.bind(t):void 0}}let r=e?.appContext?.config?.globalProperties,i=r?.$t;if(typeof i==`function`){let e=r?.$te;return{t:i.bind(r),te:typeof e==`function`?e.bind(r):void 0}}}catch{}return null}();if(e)return HO(e);try{let e=globalThis.$vueI18nUse||null;if(e&&typeof e==`function`)try{let t=e();if(t&&typeof t.t==`function`)return HO({t:t.t.bind(t),te:typeof t.te==`function`?t.te.bind(t):void 0})}catch{}}catch{}return{t:VO}}function WO(e,t){let n=e.indexKey??t[`index-key`]??t.indexKey;return n==null||n===``?``:String(n)}var GO=[`src`,`alt`,`title`,`loading`,`fetchpriority`,`decoding`,`tabindex`,`aria-label`],KO={key:1,class:`image-placeholder`},qO={key:1,class:`image-node__raw-text`},JO={key:0,class:`image-shimmer-overlay`},YO={key:1,class:`image-node__raw-text`},XO={key:2,class:`image-error`},ZO=eO(c({__name:`ImageNode`,props:{node:{},fallbackSrc:{default:``},lazy:{type:Boolean,default:!1},usePlaceholder:{type:Boolean,default:!0}},emits:[`load`,`error`,`click`],setup(e,{emit:t}){let n=e,r=t,a=M(!1),o=M(!1),s=M(``),c=M(`primary`),u=M(null),f=p(),m=i(mE,null),h=``,_=null,v=I(()=>V_(n.node.src)),y=I(()=>V_(n.fallbackSrc)),b=I(()=>s.value),x=I(()=>!n.lazy),S=I(()=>!n.node.loading&&c.value!==`failed`&&s.value.length>0),C=I(()=>c.value===`failed`),w=I(()=>!x.value&&!a.value&&!o.value&&c.value!==`failed`&&s.value.length>0),T=I(()=>WO(n,f));function O(e=T.value){e&&u.value&&m?.reportHeight(e,u.value.offsetHeight)}function k(e=T.value){e&&g(()=>{O(e)})}function A(){_&&=(clearTimeout(_),null)}function j(){let e=T.value;e&&h!==e&&(h&&m?.markSettled(h),A(),h=e,m?.markPending(e),typeof window<`u`&&(_=window.setTimeout(()=>{h===e&&(k(e),ee())},8e3)))}function ee(){return BD(this,null,function*(){let e=h;e&&(A(),h=``,yield g(),O(e),m?.markSettled(e))})}function N(){if(c.value===`primary`&&y.value&&y.value!==s.value)return c.value=`fallback`,s.value=y.value,a.value=!1,o.value=!1,void k();c.value=`failed`,o.value=!0,r(`error`,s.value),k()}function P(){a.value=!0,o.value=!1,r(`load`,b.value),k()}function te(e){e.preventDefault(),a.value&&!o.value&&r(`click`,[e,b.value])}let{t:ne}=UO();return E([v,y,()=>n.node.loading],()=>(a.value=!1,o.value=!1,n.node.loading||v.value?(s.value=v.value,void(c.value=`primary`)):y.value?(s.value=y.value,void(c.value=`fallback`)):(s.value=``,c.value=`failed`,void(o.value=!0))),{immediate:!0}),E([S,a,o,b,()=>n.lazy],([e,t,n,r,i])=>e&&r&&!n?t?(ee(),void k()):i?(j(),void k()):void(t||n||j()):(ee(),void k()),{flush:`post`,immediate:!0}),l(()=>{(function(){let e=h;e&&(A(),h=``,m?.markSettled(e))})()}),(t,r)=>(G(),W(`span`,{ref_key:`rootRef`,ref:u,class:`image-node-container`},[S.value?(G(),W(`img`,{key:0,src:b.value,alt:String(n.node.alt??n.node.title??``),title:String(n.node.title??n.node.alt??``),class:L([`image-node__img`,{"is-loading":!x.value&&!a.value,"is-loaded":x.value||a.value,"has-natural-size":a.value,"cursor-pointer":a.value}]),loading:n.lazy?`lazy`:void 0,fetchpriority:x.value?`high`:void 0,decoding:x.value?`sync`:`async`,tabindex:a.value?0:-1,"aria-label":n.node.alt??R(ne)(`image.preview`),onError:N,onLoad:P,onClick:te},null,42,GO)):V(``,!0),e.node.loading&&!o.value?(G(),W(`span`,KO,[n.usePlaceholder?d(t.$slots,`placeholder`,{key:0,node:n.node,displaySrc:b.value,imageLoaded:a.value,hasError:o.value,fallbackSrc:n.fallbackSrc,lazy:n.lazy},()=>[r[0]||=F(`span`,{class:`image-shimmer`},null,-1)],!0):(G(),W(`span`,qO,H(e.node.raw),1))])):V(``,!0),U(ce,{name:`shimmer-fade`},{default:D(()=>[w.value&&!e.node.loading?(G(),W(`span`,JO,[n.usePlaceholder?d(t.$slots,`placeholder`,{key:0,node:n.node,displaySrc:b.value,imageLoaded:a.value,hasError:o.value,fallbackSrc:n.fallbackSrc,lazy:n.lazy},()=>[r[1]||=F(`span`,{class:`image-shimmer`},null,-1)],!0):(G(),W(`span`,YO,H(e.node.raw),1))])):V(``,!0)]),_:3}),C.value?(G(),W(`span`,XO,[d(t.$slots,`error`,{node:n.node,displaySrc:b.value,imageLoaded:a.value,hasError:o.value,fallbackSrc:n.fallbackSrc,lazy:n.lazy},()=>[r[2]||=F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`},[F(`path`,{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`})],-1),F(`span`,null,H(R(ne)(`image.loadError`)),1)],!0)])):V(``,!0)],512))}}),[[`__scopeId`,`data-v-cbb5c63e`]]);ZO.install=e=>{e.component(ZO.__name,ZO)};var QO={key:2},$O=c({__name:`NodeChildRenderer`,props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){let t=e,n=XD(()=>t.customId),r=i(`markstreamHtmlPolicy`,void 0),a=i(`markstreamNestedRendererProps`,void 0),o=I(()=>r?.value??`safe`),s=I(()=>{let e=a?.value??{};return zD($({},e),{customId:t.customId??e.customId,htmlPolicy:o.value})}),c=S({loader:()=>Promise.resolve().then(()=>vN),suspensible:!1}),l=I(()=>t.components[String(t.node.type)]),u=I(()=>!!(l.value&&n.value[t.node.type]&&!qD(String(t.node.type)))),d=I(()=>u.value?fO(t.node,o.value):void 0),f=I(()=>Array.isArray(t.node.children)&&t.node.children.length>0),p=I(()=>String(t.node.content??``)),m=I(()=>String(t.node.content??t.node.raw??``));return(t,n)=>l.value&&u.value?(G(),O(T(l.value),h({key:0},d.value,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":e.customId,"is-dark":s.value.isDark}),{default:D(()=>[f.value?(G(),O(R(c),h({key:0},s.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`,`index-key`])):p.value?(G(),O(R(c),h({key:1},s.value,{content:p.value,final:!e.node.loading,"index-key":`${e.indexKey||`child`}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`content`,`final`,`index-key`])):V(``,!0)]),_:1},16,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):l.value?(G(),O(T(l.value),{key:1,node:e.node,"custom-id":e.customId,"index-key":e.indexKey},null,8,[`node`,`custom-id`,`index-key`])):e.fallbackToText?(G(),W(`span`,QO,H(m.value),1)):V(``,!0)}}),ek=[`aria-busy`,`aria-label`,`data-language`,`data-markstream-line-numbers`],tk={key:0,translate:`no`,class:`markstream-pre__diff-code`},nk={class:`markstream-pre__diff-number`,"aria-hidden":`true`},rk={class:`markstream-pre__diff-content`},ik={class:`markstream-pre__diff-content-inner`},ak={key:0,class:`markstream-pre__line-numbers`,"aria-hidden":`true`},ok=[`textContent`],sk=c({__name:`PreCodeNode`,props:{node:{},showLineNumbers:{type:Boolean},diffInline:{type:Boolean},reservedHeightPx:{}},setup(e){let t=e,n=I(()=>{let e=String(t.node?.language??``);return String(String(e).split(/\s+/g)[0]??``).toLowerCase().replace(/[^\w-]/g,``)||`plaintext`}),r=I(()=>`language-${n.value}`),i=I(()=>!0===t.node?.diff?String(t.node?.code??``):function(e,t){let n=String(e??``);return t?n:n.replace(/\r\n$|\n$|\r$/,``)}(t.node?.code,!0===t.node?.loading)),a=I(()=>i.value.split(/\r\n|\n|\r/)),o=I(()=>Array.from({length:Math.max(1,a.value.length)},(e,t)=>t+1)),s=I(()=>!0===t.showLineNumbers&&!0===t.node?.diff),c=I(()=>s.value&&!0===t.diffInline),u=I(()=>{let e=Number(t.reservedHeightPx);if(!Number.isFinite(e)||e<=0)return;let n=`${Math.ceil(e)}px`;return{height:n,minHeight:n,maxHeight:n,overflow:`auto`}});function d(e){return String(e??``).trim().length===0}function f(e,t=`context`,n={}){let r=d(e);return{code:e,kind:r&&t!==`hunk`&&!n.preserveBlankKind?`context`:t,empty:r}}function p(e){let t=String(e??``);return t?t.split(/\r\n|\n|\r/):[]}function m(e,t){return!d(e[t])||t<e.length-1}function h(e){return e.startsWith(`-`)&&!e.startsWith(`---`)}function _(e){return e.startsWith(`+`)&&!e.startsWith(`+++`)}function v(e,t){let n=p(e),r=p(t),i=function(e,t){let n=e.length,r=t.length;if((n+1)*(r+1)>15e5)return null;let i=r+1,a=new Uint32Array((n+1)*(r+1));for(let o=1;o<=n;o++)for(let n=1;n<=r;n++){let r=o*i+n;if(e[o-1]===t[n-1])a[r]=a[(o-1)*i+(n-1)]+1;else{let e=a[(o-1)*i+n],t=a[o*i+(n-1)];a[r]=e>=t?e:t}}let o=[],s=n,c=r;for(;s>0&&c>0;)e[s-1]===t[c-1]?(o.push({originalIndex:s-1,modifiedIndex:c-1}),s--,c--):a[(s-1)*i+c]>=a[s*i+(c-1)]?s--:c--;return o.reverse(),o}(n,r);if(i){let e=[],t=0,a=0;for(let o of i){for(;t<o.originalIndex;)e.push(zD($({},f(n[t],`removed`,{preserveBlankKind:m(n,t)})),{key:`inline-removed-source-${t}`,number:``})),t++;for(;a<o.modifiedIndex;)e.push(zD($({},f(r[a],`added`,{preserveBlankKind:m(r,a)})),{key:`inline-added-source-${a}`,number:a+1})),a++;e.push(zD($({},f(r[o.modifiedIndex])),{key:`inline-context-source-${o.originalIndex}-${o.modifiedIndex}`,number:o.modifiedIndex+1})),t=o.originalIndex+1,a=o.modifiedIndex+1}for(;t<n.length;)e.push(zD($({},f(n[t],`removed`,{preserveBlankKind:m(n,t)})),{key:`inline-removed-source-${t}`,number:``})),t++;for(;a<r.length;)e.push(zD($({},f(r[a],`added`,{preserveBlankKind:m(r,a)})),{key:`inline-added-source-${a}`,number:a+1})),a++;return e}let a=[],o=0,s=n.length-1,c=r.length-1;for(;o<=s&&o<=c&&n[o]===r[o];)a.push(zD($({},f(r[o])),{key:`inline-prefix-${o}`,number:o+1})),o++;let l=[];for(;s>=o&&c>=o&&n[s]===r[c];)l.unshift(zD($({},f(r[c])),{key:`inline-suffix-${c}`,number:c+1})),s--,c--;for(let e=o;e<=s;e++)a.push(zD($({},f(n[e],`removed`,{preserveBlankKind:m(n,e)})),{key:`inline-removed-source-${e}`,number:``}));for(let e=o;e<=c;e++)a.push(zD($({},f(r[e],`added`,{preserveBlankKind:m(r,e)})),{key:`inline-added-source-${e}`,number:e+1}));return a.concat(l)}let y=I(()=>{let e=function(e){let r=e.some(e=>h(e)),i=e.some(e=>_(e));return r&&i||function(){if(n.value===`diff`)return!0;let e=String(t.node?.raw??``).split(/\r?\n/,1)[0]?.trim()??``;return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(e)}()&&(r||i)}(a.value),r=function(){return t.node?.originalCode!=null||t.node?.updatedCode!=null}();if(c.value)return[{key:`inline`,className:`markstream-pre__diff-pane--inline`,lines:e?function(e){let t=[],n=1;for(let[r,i]of e.entries())if(i.startsWith(`@@`))t.push(zD($({},f(i,`hunk`)),{key:`inline-hunk-${r}`,number:``}));else if(h(i))t.push(zD($({},f(i.slice(1),`removed`,{preserveBlankKind:!0})),{key:`inline-removed-${r}`,number:``}));else if(_(i))t.push(zD($({},f(i.slice(1),`added`,{preserveBlankKind:!0})),{key:`inline-added-${r}`,number:n++}));else{let e=i.startsWith(` `)?i.slice(1):i;t.push(zD($({},f(e)),{key:`inline-context-${r}`,number:n})),n++}return t}(a.value):v(t.node?.originalCode,t.node?.updatedCode)}];if(!e&&r){let e=p(t.node?.originalCode),n=p(t.node?.updatedCode);return[{key:`original`,className:`markstream-pre__diff-pane--original`,lines:e.map((t,r)=>zD($({},f(t,n[r]===t?`context`:`removed`,{preserveBlankKind:m(e,r)})),{key:`original-${r}`,number:r+1}))},{key:`modified`,className:`markstream-pre__diff-pane--modified`,lines:n.map((t,r)=>zD($({},f(t,e[r]===t?`context`:`added`,{preserveBlankKind:m(n,r)})),{key:`modified-${r}`,number:r+1}))}]}let i=[],o=[];for(let e of a.value)if(e.startsWith(`@@`))i.push(f(e,`hunk`)),o.push(f(e,`hunk`));else if(e.startsWith(`-`)&&!e.startsWith(`---`))i.push(f(e.slice(1),`removed`,{preserveBlankKind:!0}));else if(e.startsWith(`+`)&&!e.startsWith(`+++`))o.push(f(e.slice(1),`added`,{preserveBlankKind:!0}));else{let t=e.startsWith(` `)?e.slice(1):e;i.push(f(t)),o.push(f(t))}return[{key:`original`,className:`markstream-pre__diff-pane--original`,lines:i.map((e,t)=>zD($({},e),{key:`original-${t}`,number:t+1}))},{key:`modified`,className:`markstream-pre__diff-pane--modified`,lines:o.map((e,t)=>zD($({},e),{key:`modified-${t}`,number:t+1}))}]}),b=I(()=>{let e=n.value;return e?`Code block: ${e}`:`Code block`}),x=M(null),S=M([]),C=null,T=null;function D(e){let t=Number.parseFloat(String(e??``));return Number.isFinite(t)&&t>0?t:0}function O(e,t){if(!e)return t;let n=e.querySelector(`.markstream-pre__diff-content`)?.getBoundingClientRect()?.height??0;return Math.max(t,Math.ceil(n))}function A(){typeof window<`u`&&(C!=null&&window.cancelAnimationFrame(C),C=window.requestAnimationFrame(()=>{(function(){C=null;let e=x.value;if(!e||!s.value)return void(S.value.length&&(S.value=[]));let t=function(e){let t=window.getComputedStyle(e),n=D(t.getPropertyValue(`--markstream-pre-diff-line-height`));if(n>0)return n;let r=D(t.lineHeight);return r>0?r:18}(e),n=Array.from(e.querySelectorAll(`.markstream-pre__diff-pane--original .markstream-pre__diff-line`)),r=Array.from(e.querySelectorAll(`.markstream-pre__diff-pane--modified .markstream-pre__diff-line`)),i=Math.max(n.length,r.length),a=[];for(let e=0;e<i;e++){let i=O(n[e]??null,t),o=O(r[e]??null,t),s=Math.max(t,i,o);a.push({rowHeight:s,originalHeight:i,modifiedHeight:o})}var o=S.value,c=a;o.length===c.length&&o.every((e,t)=>{let n=c[t];return n&&Math.abs(e.rowHeight-n.rowHeight)<=.5&&Math.abs(e.originalHeight-n.originalHeight)<=.5&&Math.abs(e.modifiedHeight-n.modifiedHeight)<=.5})||(S.value=a)})()}))}function j(e){T?.disconnect(),T=null,e&&s.value&&typeof ResizeObserver<`u`&&(T=new ResizeObserver(()=>{A()}),T.observe(e))}function ee(e,t){let n=S.value[e];if(!n)return;let r=t===`original`?n.originalHeight:n.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(n.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(r)}px`}}return E(x,e=>{j(e),g(()=>A())},{flush:`post`}),E([s,y],()=>{j(x.value),g(()=>A())},{flush:`post`,immediate:!0}),l(()=>{C!=null&&(window.cancelAnimationFrame(C),C=null),T?.disconnect(),T=null}),(a,l)=>(G(),W(`pre`,{ref_key:`preRef`,ref:x,style:k(u.value),class:L([r.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":s.value,"markstream-pre--diff-inline":c.value}]),"aria-busy":!0===e.node.loading,"aria-label":b.value,"data-language":n.value,"data-markstream-line-numbers":t.showLineNumbers?`1`:void 0,"data-markstream-pre":`1`,tabindex:`0`},[s.value?(G(),W(`code`,tk,[(G(!0),W(N,null,w(y.value,e=>(G(),W(`span`,{key:e.key,class:L([`markstream-pre__diff-pane`,e.className])},[(G(!0),W(N,null,w(e.lines,(t,n)=>(G(),W(`span`,{key:t.key,class:L([`markstream-pre__diff-line`,[`markstream-pre__diff-line--${t.kind}`,{"markstream-pre__diff-line--empty":t.empty}]]),style:k(ee(n,e.key))},[l[0]||=F(`span`,{class:`markstream-pre__diff-rail`,"aria-hidden":`true`},null,-1),F(`span`,nk,H(t.number),1),F(`span`,rk,[F(`span`,ik,H(t.code),1)])],6))),128))],2))),128))])):(G(),W(N,{key:1},[t.showLineNumbers?(G(),W(`span`,ak,[(G(!0),W(N,null,w(o.value,e=>(G(),W(`span`,{key:e,class:`markstream-pre__line-number`},H(e),1))),128))])):V(``,!0),F(`code`,{translate:`no`,class:`markstream-pre__code`,textContent:H(i.value)},null,8,ok)],64))],14,ek))}});sk.install=e=>{e.component(sk.__name,sk)};var ck=oe(!1),lk=null,uk={key:0},dk=eO(c({__name:`TextNode`,props:{node:{}},emits:[`copy`],setup(e){let t=e,n=(lk||=WE().then(e=>{ck.value=!!e}).catch(()=>{ck.value=!1}),pe(ck)),r=p(),a=i(`markstreamFade`,void 0),o=i(`markstreamTextStreamState`,void 0),s=i(`markstreamStreamVersion`,void 0),c=I(()=>{let e=r.fade;return e===``||!0===e||e===`true`||!1!==e&&e!==`false`&&void 0}),l=I(()=>typeof c.value==`boolean`?c.value:typeof a?.value!=`boolean`||a.value),u=I(()=>{let e=r[`index-key`]??r.indexKey;return e==null||e===``?``:String(e)}),d=M(t.node.content),f=M(``),m=s?.value,h=M(0);function g(){return d.value+f.value}function _(){f.value&&=(d.value=g(),``)}E([()=>t.node.content,u,l,()=>s?.value],([e,t,n,r])=>{let i=String(e??``),a=u.value,s=r!==m;m=r;let c=BT({nextContent:i,persistedContent:a?o?.get(a):void 0,currentState:{settledContent:d.value,streamedDelta:f.value},typewriterEnabled:l.value,streamRenderVersionChanged:s});d.value=c.settledContent,f.value=c.streamedDelta,c.appended&&(h.value+=1),a&&o?.set(a,i)},{immediate:!0}),E(l,e=>{var t;e||(t=g(),d.value=t,f.value=``)});let v=I(()=>h.value%2==0?`text-node-stream-delta--a`:`text-node-stream-delta--b`);return(t,r)=>(G(),W(`span`,{class:L([[R(n)&&e.node.center?`text-node-center`:``],`text-node`])},[d.value?(G(),W(`span`,uk,H(d.value),1)):V(``,!0),f.value?(G(),W(`span`,{key:1,class:L([`text-node-stream-delta`,[v.value]]),onAnimationend:_},H(f.value),35)):V(``,!0)],2))}}),[[`__scopeId`,`data-v-aae85f13`]]);dk.install=e=>{e.component(dk.__name,dk)};var fk=c({name:`CodeBlockNodeLoading`,inheritAttrs:!1,setup(e,{attrs:t}){let n=t;return()=>_(sk,zD($({},t),{node:n.node,showLineNumbers:!0,reservedHeightPx:n.estimatedHeightPx??n.estimatedContentHeightPx,class:[`code-pre-fallback`,t.class],"data-markstream-code-loading":`1`}))}}),pk=S({loader:()=>BD(null,null,function*(){try{return(yield K(()=>Promise.resolve().then(()=>SP),void 0)).default}catch(e){return console.warn(`[markstream-vue] Optional peer dependencies for CodeBlockNode are missing. Falling back to preformatted code rendering (no Monaco). To enable full code block features, please install "stream-monaco".`,e),sk}}),loadingComponent:fk,delay:0,suspensible:!1}),mk=S(()=>BD(null,null,function*(){if(function(){return Reflect.get(globalThis,`process`)?.env}()?.NODE_ENV===`test`&&typeof window<`u`)return e=>_(dk,zD($({},e),{node:{type:`text`,content:e.node.raw??`$${e.node.content??``}$`,raw:e.node.raw??`$${e.node.content??``}$`}}));try{if(yield WE())return(yield K(()=>Promise.resolve().then(()=>NI),void 0)).default}catch(e){console.warn(`[markstream-vue] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".`,e)}return e=>_(dk,zD($({},e),{node:{type:`text`,content:e.node.raw??`$${e.node.content??``}$`,raw:e.node.raw??`$${e.node.content??``}$`}}))})),hk=S(()=>BD(null,null,function*(){try{if(yield WE())return(yield K(()=>Promise.resolve().then(()=>EI),void 0)).default}catch(e){console.warn(`[markstream-vue] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".`,e)}return e=>_(dk,zD($({},e),{node:{type:`text`,content:e.node.raw??`$$${e.node.content??``}$$`,raw:e.node.raw??`$$${e.node.content??``}$$`}}))})),gk=eO(c({__name:`ReferenceNode`,props:{node:{},messageId:{},threadId:{}},emits:[`click`,`mouseEnter`,`mouseLeave`],setup:e=>(t,n)=>(G(),W(`span`,{class:`reference-node cursor-pointer text-xs rounded-md px-1.5 mx-0.5`,role:`button`,tabindex:`0`,onClick:n[0]||=n=>t.$emit(`click`,n,e.node.id,e.messageId,e.threadId),onMouseenter:n[1]||=n=>t.$emit(`mouseEnter`,n,e.node.id,e.messageId,e.threadId),onMouseleave:n[2]||=n=>t.$emit(`mouseLeave`,n,e.node.id,e.messageId,e.threadId)},H(e.node.id),33))}),[[`__scopeId`,`data-v-775c65e4`]]);gk.install=e=>{e.component(gk.__name,gk)};var _k={class:`superscript-node`},vk=eO(c({__name:`SuperscriptNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=XD(()=>t.customId),r=I(()=>$({text:dk,inline_code:SO,link:kk,html_inline:yO,strong:Sk,emphasis:Fk,footnote_reference:oO,strikethrough:wk,highlight:Nk,insert:jk,subscript:bk,emoji:rO,math_inline:mk,reference:gk},n.value));return(n,i)=>(G(),W(`sup`,_k,[(G(!0),W(N,null,w(e.node.children,(n,i)=>(G(),O(R($O),{key:`${e.indexKey||`superscript`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`superscript`}-${i}`,"fallback-to-text":``},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-24160b22`]]);vk.install=e=>{e.component(vk.__name,vk)};var yk={class:`subscript-node`},bk=eO(c({__name:`SubscriptNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=XD(()=>t.customId),r=I(()=>$({text:dk,inline_code:SO,link:kk,html_inline:yO,strong:Sk,emphasis:Fk,footnote_reference:oO,strikethrough:wk,highlight:Nk,insert:jk,superscript:vk,emoji:rO,math_inline:mk,reference:gk},n.value));return(n,i)=>(G(),W(`sub`,yk,[(G(!0),W(N,null,w(e.node.children,(n,i)=>(G(),O(R($O),{key:`${e.indexKey||`subscript`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`subscript`}-${i}`,"fallback-to-text":``},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-197fa13b`]]);bk.install=e=>{e.component(bk.__name,bk)};var xk={class:`strong-node`},Sk=eO(c({__name:`StrongNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=XD(()=>t.customId),r=I(()=>$({text:dk,inline_code:SO,link:kk,html_inline:yO,emphasis:Fk,strikethrough:wk,highlight:Nk,insert:jk,subscript:bk,superscript:vk,emoji:rO,footnote_reference:oO,math_inline:mk,reference:gk},n.value));return(n,i)=>(G(),W(`strong`,xk,[(G(!0),W(N,null,w(e.node.children,(n,i)=>(G(),O(R($O),{key:`${e.indexKey||`strong`}-${i}`,components:r.value,node:n,"index-key":`${e.indexKey||`strong`}-${i}`,"custom-id":t.customId},null,8,[`components`,`node`,`index-key`,`custom-id`]))),128))]))}}),[[`__scopeId`,`data-v-a8647104`]]);Sk.install=e=>{e.component(Sk.__name,Sk)};var Ck={class:`strikethrough-node`},wk=eO(c({__name:`StrikethroughNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=XD(()=>t.customId),r=I(()=>$({text:dk,inline_code:SO,link:kk,html_inline:yO,strong:Sk,emphasis:Fk,highlight:Nk,insert:jk,subscript:bk,superscript:vk,emoji:rO,footnote_reference:oO,math_inline:mk,reference:gk},n.value));return(n,i)=>(G(),W(`del`,Ck,[(G(!0),W(N,null,w(e.node.children,(n,i)=>(G(),O(R($O),{key:`${e.indexKey||`strikethrough`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`strikethrough`}-${i}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-b7a531fa`]]);wk.install=e=>{e.component(wk.__name,wk)};var Tk=[`href`,`title`,`aria-label`,`aria-hidden`,`target`,`rel`],Ek=[`aria-hidden`],Dk={class:`link-text-wrapper relative inline-flex`},Ok={class:`leading-[normal] link-text`},kk=eO(c({__name:`LinkNode`,props:{node:{},indexKey:{},customId:{},showTooltip:{type:Boolean,default:!0},color:{},underlineHeight:{},underlineBottom:{},animationDuration:{},animationOpacity:{},animationTiming:{},animationIteration:{}},setup(e){let t=e,n=i(`markstreamShowTooltips`,void 0),r=I(()=>{let e=n?.value;return typeof e==`boolean`?e:t.showTooltip}),a=I(()=>{let e=t.underlineBottom===void 0?`-3px`:typeof t.underlineBottom==`number`?`${t.underlineBottom}px`:String(t.underlineBottom),n=t.animationOpacity??.35,r=Math.max(.12,Math.min(.5*n,n)),i={"--underline-height":`${t.underlineHeight??2}px`,"--underline-bottom":e,"--underline-opacity":String(n),"--underline-rest-opacity":String(r),"--underline-duration":`${t.animationDuration??1.6}s`,"--underline-timing":t.animationTiming??`ease-in-out`,"--underline-iteration":typeof t.animationIteration==`number`?String(t.animationIteration):t.animationIteration??`infinite`};return t.color&&(i[`--link-color`]=t.color),i}),o=XD(()=>t.customId),s=I(()=>$({text:dk,strong:Sk,strikethrough:wk,emphasis:Fk,image:ZO,html_inline:yO,inline_code:SO},o.value)),c=p(),l=I(()=>{let e=t.node?.attrs;if(!e||typeof e!=`object`)return{};let n={};if(Array.isArray(e))for(let t of e)Array.isArray(t)&&t[0]&&(n[String(t[0])]=String(t[1]??``));else for(let[t,r]of Object.entries(e))t&&r!=null&&!1!==r&&(n[t]=!0===r?``:String(r));return lO(n,`safe`,`a`)}),u=I(()=>$($({},c),l.value)),d=I(()=>lO({href:String(t.node?.href??``)},`safe`,`a`).href),f=I(()=>{if(!d.value)return;let e=u.value.target;return(typeof e==`string`?e.trim():String(e??``).trim())||(z_(d.value)?`_blank`:void 0)}),m=I(()=>String(f.value??``).trim().toLowerCase()===`_blank`),g=I(()=>{if(!d.value)return;let e=u.value.rel,t=new Set((typeof e==`string`?e:String(e??``)).split(/\s+/).filter(Boolean)),n=new Set(Array.from(t).filter(e=>e.toLowerCase()!==`opener`));return m.value&&(n.add(`noopener`),n.add(`noreferrer`)),n.size>0?Array.from(n).join(` `):void 0}),_=I(()=>{let e=$({},u.value);return delete e.title,delete e.href,delete e.target,delete e.rel,e});function v(){r.value&&zO()}let y=I(()=>{let e=t.node?.title;return typeof e==`string`&&e.trim().length>0?e:String(d.value??``)});return(n,i)=>e.node.loading?(G(),W(`span`,h({key:1,class:`link-loading inline-flex items-baseline gap-1.5`,"aria-hidden":e.node.loading?`false`:`true`},R(c),{style:a.value}),[F(`span`,Dk,[F(`span`,Ok,[U(R(dk),{class:`leading-[normal] link-text`,node:{type:`text`,content:String(e.node.text??``),raw:String(e.node.text??``)},"index-key":`${e.indexKey||`link-text`}-loading`},null,8,[`node`,`index-key`])]),i[1]||=F(`span`,{class:`link-loading-indicator`,"aria-hidden":`true`},null,-1)])],16,Ek)):(G(),W(`a`,h({key:0,class:`link-node`,href:d.value,title:r.value?``:y.value,"aria-label":`Link: ${y.value}`,"aria-hidden":e.node.loading?`true`:`false`,target:f.value,rel:g.value},_.value,{style:a.value,onMouseenter:i[0]||=e=>function(e){if(!r.value)return;let n=e,i=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0,a=t.node?.title||(d.value?.includes(`xn--`)&&(t.node?.text)?.includes(`://`)?t.node.text:d.value)||``;RO(e.currentTarget,a,`top`,!1,i)}(e),onMouseleave:v}),[(G(!0),W(N,null,w(e.node.children,(n,r)=>(G(),O(R($O),{key:`${e.indexKey||`emphasis`}-${r}`,components:s.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`link-text`}-${r}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))],16,Tk))}}),[[`__scopeId`,`data-v-367e6ca4`]]);kk.install=e=>{e.component(kk.__name,kk)};var Ak={class:`insert-node`},jk=eO(c({__name:`InsertNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=XD(()=>t.customId),r=I(()=>$({text:dk,inline_code:SO,link:kk,html_inline:yO,strong:Sk,emphasis:Fk,strikethrough:wk,highlight:Nk,subscript:bk,superscript:vk,emoji:rO,footnote_reference:oO,math_inline:mk,reference:gk},n.value));return(n,i)=>(G(),W(`ins`,Ak,[(G(!0),W(N,null,w(e.node.children,(n,i)=>(G(),O(R($O),{key:`${e.indexKey||`insert`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`insert`}-${i}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-1e2c29d4`]]);jk.install=e=>{e.component(jk.__name,jk)};var Mk={class:`highlight-node`},Nk=eO(c({__name:`HighlightNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=XD(()=>t.customId),r=I(()=>$({text:dk,inline_code:SO,link:kk,html_inline:yO,strong:Sk,emphasis:Fk,strikethrough:wk,insert:jk,subscript:bk,superscript:vk,emoji:rO,footnote_reference:oO,math_inline:mk,reference:gk},n.value));return(n,i)=>(G(),W(`mark`,Mk,[(G(!0),W(N,null,w(e.node.children,(n,i)=>(G(),O(R($O),{key:`${e.indexKey||`highlight`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`highlight`}-${i}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-7a62982a`]]);Nk.install=e=>{e.component(Nk.__name,Nk)};var Pk={class:`emphasis-node`},Fk=eO(c({__name:`EmphasisNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=XD(()=>t.customId),r=I(()=>$({text:dk,inline_code:SO,link:kk,html_inline:yO,strong:Sk,strikethrough:wk,highlight:Nk,insert:jk,subscript:bk,superscript:vk,emoji:rO,footnote_reference:oO,math_inline:mk,reference:gk},n.value));return(n,i)=>(G(),W(`em`,Pk,[(G(!0),W(N,null,w(e.node.children,(n,i)=>(G(),O(R($O),{key:`${e.indexKey||`emphasis`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`emphasis`}-${i}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-2a5aafbf`]]);Fk.install=e=>{e.component(Fk.__name,Fk)};var Ik={class:`hard-break`},Lk=eO(c({__name:`HardBreakNode`,props:{node:{}},setup:e=>(e,t)=>(G(),W(`br`,Ik))}),[[`__scopeId`,`data-v-50c58f70`]]);Lk.install=e=>{e.component(Lk.__name,Lk)};var Rk=c({__name:`SimpleInlineRenderer`,props:{nodes:{},customId:{},indexKey:{}},setup(e){let t=e,n=re({checkbox:tO,checkbox_input:tO,emoji:rO,emphasis:Fk,hardbreak:Lk,highlight:Nk,inline_code:SO,insert:jk,link:kk,reference:gk,strikethrough:wk,strong:Sk,subscript:bk,superscript:vk,text:dk}),r=XD(()=>t.customId),i=I(()=>{let e=r.value;return Object.keys(e).length>0?$($({},n),e):n});return(n,r)=>(G(!0),W(N,null,w(e.nodes,(n,r)=>(G(),O(R($O),{key:r,components:i.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`inline`}-${r}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))}});function zk(e){if(!e||typeof e!=`object`)return!1;let t=`|${e.type}|`;if(!`|checkbox|checkbox_input|emoji|emphasis|hardbreak|highlight|inline_code|insert|link|reference|strikethrough|strong|subscript|superscript|text|`.includes(t))return!1;if(!`|emphasis|highlight|insert|link|strikethrough|strong|subscript|superscript|`.includes(t))return!0;let n=e.children;return Array.isArray(n)&&n.every(zk)}function Bk(e,t=!0,n=!1){if(!e||!n&&e.length===0)return null;if(e.every(zk))return e;if(!t||e.length!==1)return null;let r=e[0];if(r?.type!==`paragraph`||!Array.isArray(r.children))return null;let i=r.children;return(n||i.length>0)&&i.every(zk)?i:null}function Vk(e){if(!e?.length)return null;let t=``;for(let n of e){if(n?.type!==`text`||!0===n.center)return null;t+=String(n.content??n.raw??``)}return t}var Hk=[`cite`],Uk={key:0,dir:`auto`,class:`paragraph-node`},Wk=[`custom-id`],Gk=eO(c({__name:`BlockquoteNode`,props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:[`copy`],setup(e){let t=e,n=XD(()=>t.customId),r=I(()=>!!n.value.paragraph),i=I(()=>!!n.value.text),o=I(()=>Bk(t.node.children,!r.value)),s=I(()=>!1!==t.fade||i.value?null:Vk(o.value));return a(`markstreamShowTooltips`,I(()=>t.showTooltips)),a(`markstreamFade`,I(()=>t.fade)),(n,r)=>(G(),W(`blockquote`,{class:`blockquote blockquote-node`,dir:`auto`,cite:e.node.cite},[o.value?(G(),W(`p`,Uk,[s.value===null?(G(),O(R(Rk),{key:1,nodes:o.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,[`nodes`,`custom-id`,`index-key`])):(G(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},H(s.value),9,Wk))])):(G(),O(R(_N),{key:1,"show-tooltips":t.showTooltips,"index-key":`blockquote-${t.indexKey}`,nodes:t.node.children||[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:r[0]||=e=>n.$emit(`copy`,e)},null,8,[`show-tooltips`,`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`]))],8,Hk))}}),[[`__scopeId`,`data-v-abfecebc`]]);Gk.install=e=>{e.component(Gk.__name,Gk)};var Kk={class:`definition-list`},qk={class:`definition-term`},Jk={class:`definition-desc`},Yk=eO(c({__name:`DefinitionListNode`,props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:[`copy`],setup(e){let t=e;return(e,n)=>(G(),W(`dl`,Kk,[(G(!0),W(N,null,w(t.node.items,(r,i)=>(G(),W(N,{key:i},[F(`dt`,qk,[U(R(_N),{"index-key":`definition-term-${t.indexKey}-${i}`,nodes:r.term,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:n[0]||=t=>e.$emit(`copy`,t)},null,8,[`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`])]),F(`dd`,Jk,[U(R(_N),{"index-key":`definition-desc-${t.indexKey}-${i}`,nodes:r.definition,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:n[1]||=t=>e.$emit(`copy`,t)},null,8,[`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`])])],64))),128))]))}}),[[`__scopeId`,`data-v-4e103b30`]]);Yk.install=e=>{e.component(Yk.__name,Yk)};var Xk=[`href`,`title`],Zk=eO(c({__name:`FootnoteAnchorNode`,props:{node:{}},setup(e){let t=e;function n(e){if(e.preventDefault(),typeof document>`u`)return;let n=`fnref-${String(t.node.id??``)}`,r=document.getElementById(n);r&&r.scrollIntoView({behavior:`smooth`,block:`center`})}return(t,r)=>(G(),W(`a`,{class:`footnote-anchor text-sm hover:underline cursor-pointer`,href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n},` ↩︎ `,8,Xk))}}),[[`__scopeId`,`data-v-e1eb37b6`]]);Zk.install=e=>{e.component(Zk.__name,Zk)};var Qk=[`id`],$k={class:`flex-1`},eA=c({__name:`FootnoteNode`,props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:[`copy`],setup(e){let t=e;return(n,r)=>(G(),W(`div`,{id:`fnref--${e.node.id}`,class:`footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border)] pt-2`},[F(`div`,$k,[U(R(_N),{"index-key":`footnote-${t.indexKey}`,nodes:t.node.children,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:r[0]||=e=>n.$emit(`copy`,e)},null,8,[`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`])])],8,Qk))}});eA.install=e=>{e.component(eA.__name,eA)};var tA=[`custom-id`],nA=eO(c({__name:`HeadingNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=XD(()=>t.customId),r=i(`markstreamFade`,void 0),a=I(()=>!1!==r?.value||n.value.text?null:Vk(t.node.children)),o=I(()=>$({text:dk,inline_code:SO,link:kk,image:ZO,strong:Sk,emphasis:Fk,strikethrough:wk,highlight:Nk,insert:jk,subscript:bk,superscript:vk,emoji:rO,checkbox:tO,checkbox_input:tO,footnote_reference:oO,hardbreak:Lk,math_inline:mk,reference:gk},n.value));return(n,r)=>(G(),O(T(`h${e.node.level}`),h({class:[`heading-node`,[`heading-${e.node.level}`]],dir:`auto`},e.node.attrs),{default:D(()=>[a.value===null?(G(!0),W(N,{key:1},w(e.node.children,(n,r)=>(G(),O(R($O),{key:r,components:o.value,"custom-id":t.customId,node:n,"index-key":`${e.indexKey||`heading`}-${r}`},null,8,[`components`,`custom-id`,`node`,`index-key`]))),128)):(G(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},H(a.value),9,tA))]),_:1},16,[`class`]))}}),[[`__scopeId`,`data-v-7122dbe1`]]),rA=nA;rA.install=e=>{e.component(nA.__name,nA)};var iA={key:0,dir:`auto`,class:`paragraph-node`},aA=[`custom-id`],oA={dir:`auto`,class:`paragraph-node`},sA=[`custom-id`],cA=eO(c({__name:`ListItemNode`,props:{node:{},item:{},indexKey:{},customId:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},value:{},isDark:{type:Boolean}},emits:[`copy`],setup(e){let t=e,n=I(()=>t.node??t.item),r=XD(()=>t.customId),i=I(()=>!!r.value.paragraph),o=I(()=>!!r.value.text),s=I(()=>Bk(n.value?.children,!i.value)),c=I(()=>{if(i.value)return null;let e=n.value?.children;if(!Array.isArray(e)||e.length<2)return null;let t=e[0];if(t?.type!==`paragraph`||!Array.isArray(t.children))return null;let r=e.slice(1);if(!r.every(e=>e?.type===`list`))return null;let a=Bk([t]);return a?{paragraphChildren:a,nestedLists:r}:null});function l(){return!1===t.fade&&!o.value}let u=I(()=>l()?Vk(s.value):null),d=I(()=>l()?Vk(c.value?.paragraphChildren):null),f=Object.freeze({}),p=I(()=>{let{value:e}=t;return typeof e==`number`&&Number.isFinite(e)?{value:e}:f});return a(`markstreamShowTooltips`,I(()=>t.showTooltips)),a(`markstreamFade`,I(()=>t.fade)),(e,r)=>(G(),W(`li`,h({class:`list-item`,dir:`auto`},p.value),[s.value?(G(),W(`p`,iA,[u.value===null?(G(),O(R(Rk),{key:1,nodes:s.value,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,[`nodes`,`custom-id`,`index-key`])):(G(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},H(u.value),9,aA))])):c.value?(G(),W(N,{key:1},[F(`p`,oA,[d.value===null?(G(),O(R(Rk),{key:1,nodes:c.value.paragraphChildren,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,[`nodes`,`custom-id`,`index-key`])):(G(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},H(d.value),9,sA))]),(G(!0),W(N,null,w(c.value.nestedLists,(n,i)=>(G(),O(R(_N),{key:i,nodes:[n],"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-nested-${i}`,"show-tooltips":t.showTooltips,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0,onCopy:r[0]||=t=>e.$emit(`copy`,t)},null,8,[`nodes`,`custom-id`,`index-key`,`show-tooltips`,`typewriter`,`fade`,`is-dark`]))),128))],64)):(G(),O(R(_N),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:n.value?.children??[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:r[1]||=t=>e.$emit(`copy`,t)},null,8,[`show-tooltips`,`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`,`is-dark`]))],16))}}),[[`__scopeId`,`data-v-617214f9`]]);cA.install=e=>{e.component(cA.__name,cA)};var lA=eO(c({__name:`ListNode`,props:{node:{},customId:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},isDark:{type:Boolean}},emits:[`copy`],setup(e){let t=XD(()=>e.customId),n=I(()=>t.value.list_item||cA);return(t,r)=>(G(),O(T(e.node.ordered?`ol`:`ul`),{class:L([`list-node`,{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:D(()=>[(G(!0),W(N,null,w(e.node.items,(i,a)=>(G(),O(T(n.value),h({key:`${e.indexKey||`list`}-${a}`},{ref_for:!0},{showTooltips:e.showTooltips},{node:i,"custom-id":e.customId,"index-key":`${e.indexKey||`list`}-${a}`,typewriter:e.typewriter,fade:e.fade,"is-dark":e.isDark,value:e.node.ordered?(e.node.start??1)+a:void 0,onCopy:r[0]||=e=>t.$emit(`copy`,e)}),null,16,[`node`,`custom-id`,`index-key`,`typewriter`,`fade`,`is-dark`,`value`]))),128))]),_:1},8,[`class`]))}}),[[`__scopeId`,`data-v-99cb95e0`]]);lA.install=e=>{e.component(lA.__name,lA)};var uA=Symbol(`ViewportPriority`);function dA(e,t){let n=typeof window<`u`&&typeof document<`u`,r=typeof t==`boolean`?M(t):t,i=n?window.requestIdleCallback??(e=>window.setTimeout(()=>e({didTimeout:!0,timeRemaining:()=>0}),16)):null,o=n?window.cancelIdleCallback??(e=>window.clearTimeout(e)):null,s=null,c=null,l=new Map,u=new Set,d=null;function f(){if(!l.size){try{s?.disconnect()}catch{}s=null,c=null,u.size||function(){if(d!=null){try{o?.(d)}catch{}d=null}}()}}function p(e){let t=l.get(e);if(t){if(!t.visible.value){t.visible.value=!0;try{t.resolve()}catch{}}try{s?.unobserve(e)}catch{}l.delete(e),u.delete(e),f()}}function m(){i&&d==null&&u.size&&(d=i(()=>{d=null;let e=u.values().next().value;e&&(u.delete(e),p(e),u.size&&m())},{timeout:1200}))}let h=(t,i)=>{let a=M(!1),o,d=!1,h=new Promise(e=>{o=()=>{d||(d=!0,e())}}),g=()=>{try{s?.unobserve(t)}catch{}l.delete(t),u.delete(t),f()};if(!n||!r.value)return a.value=!0,o(),{isVisible:a,whenVisible:h,destroy:g};let _=function(t,r){if(!n)return s;if(typeof IntersectionObserver>`u`)return null;let i=function(t,n){return{root:e?.(t??null)??null,rootMargin:n?.rootMargin??`300px`,threshold:n?.threshold??0}}(t,r);if(s&&(o=i,(a=c)&&a.root===o.root&&a.rootMargin===o.rootMargin&&a.threshold===o.threshold))return s;var a,o;if(s)try{s.disconnect()}catch{}s=new IntersectionObserver(e=>{for(let t of e)(t.isIntersecting||t.intersectionRatio>0)&&p(t.target)},{root:i.root,rootMargin:i.rootMargin,threshold:i.threshold}),c=i;for(let e of l.keys())s.observe(e);return s}(t,i);return _?(l.set(t,{resolve:o,visible:a}),_.observe(t),u.add(t),m(),{isVisible:a,whenVisible:h,destroy:g}):(a.value=!0,o(),{isVisible:a,whenVisible:h,destroy:g})};return a(uA,h),h}function fA(){let e=i(uA,void 0);if(e)return e;let t=new WeakMap,n=null,r=new Set,a=null,o=typeof window<`u`?window.requestIdleCallback??(e=>window.setTimeout(()=>e({didTimeout:!0,timeRemaining:()=>0}),16)):null,s=typeof window<`u`?window.cancelIdleCallback??(e=>window.clearTimeout(e)):null,c=()=>{if(a!=null){try{s?.(a)}catch{}a=null}},l=e=>{let i=t.get(e);if(i){if(!i.visible.value){i.visible.value=!0;try{i.resolve()}catch{}}try{n?.unobserve(e)}catch{}t.delete(e),r.delete(e),r.size||c()}},u=()=>{o&&a==null&&r.size&&(a=o(()=>{a=null;let e=r.values().next().value;e&&(r.delete(e),l(e),r.size&&u())},{timeout:1200}))};return e=>{let i=M(!1),a,o=!1,s=new Promise(e=>{a=()=>{o||(o=!0,e())}}),d=()=>{try{n?.unobserve(e)}catch{}t.delete(e),r.delete(e),r.size||c()},f=n||(typeof window>`u`||typeof IntersectionObserver>`u`?null:(n=new IntersectionObserver(e=>{for(let t of e)(t.isIntersecting||t.intersectionRatio>0)&&l(t.target)},{root:null,rootMargin:`300px`,threshold:0}),n));return f?(t.set(e,{resolve:a,visible:i}),f.observe(e),r.add(e),u(),{isVisible:i,whenVisible:s,destroy:d}):(i.value=!0,a(),{isVisible:i,whenVisible:s,destroy:d})}}var pA={key:2,class:`html-block-node__raw`},mA=[`innerHTML`],hA={key:1,class:`html-block-node__placeholder`},gA=eO(c({__name:`HtmlBlockNode`,props:{node:{},customId:{},htmlPolicy:{}},setup(e){let t=e,n=i(`markstreamHtmlPolicy`,void 0),r=i(`markstreamNestedRendererProps`,void 0),a=I(()=>t.htmlPolicy??n?.value??`safe`),o=I(()=>{let e=r?.value??{};return zD($({},e),{customId:t.customId??e.customId,htmlPolicy:a.value})}),s=S({loader:()=>Promise.resolve().then(()=>vN),suspensible:!1}),u=I(()=>{let e=nT(t.node.attrs,a.value);if(!e)return;let n=tT(e);return Object.keys(n).length>0?n:void 0}),f=I(()=>{let e=String(t.node.tag||``).trim(),n=nT(t.node.attrs,a.value,e);if(!n)return;let r=tT(n);return Object.keys(r).length>0?r:void 0}),p=XD(()=>t.customId),m=c({name:`DynamicRenderer`,props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),g=M(null),_=M(typeof window>`u`),v=M(t.node.content),y=I(()=>Array.isArray(t.node.children)?t.node.children:[]),b=I(()=>String(t.node.tag||`div`)),x=I(()=>{let e=b.value.trim().toLowerCase();return A_.has(e)||Gw(e,a.value)}),C=I(()=>y.value.length>0&&!!t.node.tag&&!x.value),w=I(()=>{if(C.value)return{mode:`structured`};if(!_.value)return{mode:`html`,content:v.value??``};let e=v.value??t.node.content;if(!e)return{mode:`html`,content:``};if(a.value===`escape`)return{mode:`html`,content:uT(e,a.value)};if(t.node.loading){let n=_O(e,p.value,a.value);return n===null?{mode:`text`,content:t.node.raw??e}:{mode:`dynamic`,nodes:n}}if(!gO(e,p.value))return{mode:`html`,content:uT(e,a.value)};let n=_O(e,p.value,a.value);return n===null?{mode:`html`,content:uT(e,a.value)}:{mode:`dynamic`,nodes:n}}),k=fA(),A=M(null),j=!!t.node.loading;return typeof window<`u`?(E(g,e=>{var n,r;if((r=(n=A.value)?.destroy)==null||r.call(n),A.value=null,!j)return _.value=!0,void(v.value=t.node.content);if(!e)return void(_.value=!1);let i=k(e,{rootMargin:`400px`});A.value=i,_.value=i.isVisible.value,i.whenVisible.then(()=>{_.value=!0})},{immediate:!0}),E(()=>t.node.content,e=>{j&&!_.value||(v.value=e)})):_.value=!0,l(()=>{var e,t;(t=(e=A.value)?.destroy)==null||t.call(e),A.value=null}),(t,n)=>(G(),O(T(C.value?b.value:`div`),h({ref_key:`htmlRef`,ref:g,class:`html-block-node`},C.value?f.value:void 0),{default:D(()=>[_.value?(G(),W(N,{key:0},[w.value.mode===`structured`?(G(),O(R(s),h({key:0},o.value,{nodes:y.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`])):w.value.mode===`dynamic`?(G(),O(R(m),{key:1,nodes:w.value.nodes},null,8,[`nodes`])):w.value.mode===`text`?(G(),W(`pre`,pA,H(w.value.content),1)):(G(),W(`div`,h({key:3},u.value,{innerHTML:w.value.content}),null,16,mA))],64)):(G(),W(`div`,hA,[d(t.$slots,`placeholder`,{node:e.node},()=>[n[0]||=F(`span`,{class:`html-block-node__placeholder-bar`},null,-1),n[1]||=F(`span`,{class:`html-block-node__placeholder-bar w-4/5`},null,-1),n[2]||=F(`span`,{class:`html-block-node__placeholder-bar w-2/3`},null,-1)],!0)]))]),_:3},16))}}),[[`__scopeId`,`data-v-f1744dfb`]]);gA.install=e=>{e.component(gA.__name,gA)};var _A={dir:`auto`,class:`paragraph-node`},vA=[`custom-id`],yA=eO(c({__name:`ParagraphNode`,props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){let t=e,n=XD(()=>t.customId),r=i(`markstreamHtmlPolicy`,void 0),a=i(`markstreamFade`,void 0),s=i(`markstreamParseOptions`,void 0),c=i(`markstreamCustomMarkdownIt`,void 0),l=i(`markstreamNestedRendererProps`,void 0),u=I(()=>r?.value??`safe`),d=I(()=>t.parseOptions??s?.value),f=I(()=>t.customMarkdownIt??c?.value),p=I(()=>t.customHtmlTags??l?.value?.customHtmlTags),m=I(()=>{let e=l?.value??{};return zD($({},e),{customId:t.customId??e.customId,customHtmlTags:p.value,parseOptions:d.value,customMarkdownIt:f.value,htmlPolicy:u.value})}),g=S({loader:()=>Promise.resolve().then(()=>vN),suspensible:!1});function _(e){return e.type===`text`&&String(e.content??``).trim()===``}let v=I(()=>t.node.children.filter(e=>!_(e))),y=I(()=>v.value.length>0&&v.value.every(e=>e.type===`image`||function(e){let t=function(e){return e.type===`link`&&Array.isArray(e.children)?e.children.filter(e=>!_(e)):[]}(e);return t.length===1&&t[0]?.type===`image`}(e))),b=I(()=>new Set(J_(p.value))),x=I(()=>{if(!y.value||v.value.length<=1)return t.node.children;let e=[];for(let n=0;n<t.node.children.length;n++){let r=t.node.children[n];if(!_(r)){e.push(r);continue}let i=e.length>0,a=t.node.children.slice(n+1).some(e=>!_(e));i&&a&&e.push(zD($({},r),{content:` `,raw:` `}))}return e}),C=I(()=>!1===a?.value&&!n.value.text),E=I(()=>C.value?Vk(x.value):null);function k(e,n){return{node:e,"index-key":`${t.indexKey}-${n}`,"custom-id":t.customId,"custom-html-tags":p.value}}let A=I(()=>$({inline_code:SO,image:ZO,link:kk,hardbreak:Lk,emphasis:Fk,strong:Sk,strikethrough:wk,highlight:Nk,insert:jk,subscript:bk,superscript:vk,html_inline:yO,html_block:gA,emoji:rO,checkbox:tO,math_inline:mk,checkbox_input:tO,reference:gk,footnote_anchor:Zk,footnote_reference:oO,text:dk},n.value)),j=I(()=>x.value.map((e,r)=>{let i=function(e){if(e.type===`html_block`||e.type===`html_inline`){let t=String(e.tag??``).trim().toLowerCase()||Z_(e.content);if(t&&!b.value.has(t)&&$_(e.content??e.raw,t)){let t=String(e.content??e.raw??``);return{child:{type:`text`,content:t,raw:t},component:dk,isCustomComponent:!1}}}return{child:e,component:A.value[e.type],isCustomComponent:!!(n.value[e.type]&&!qD(String(e.type)))}}(e);return zD($({},i),{index:r,key:`${t.indexKey||`paragraph`}-${r}`,customAttrs:i.isCustomComponent?fO(i.child,u.value):void 0,hasSlotChildren:Array.isArray(i.child.children)&&i.child.children.length>0,slotContent:String(i.child.content??``),originalChild:e})}));return(e,n)=>(G(),W(`p`,_A,[E.value===null?(G(!0),W(N,{key:1},w(j.value,e=>{return G(),W(N,{key:e.key},[y.value&&_(e.originalChild)?(G(),W(N,{key:0},[o(H((n=e.originalChild,String((r=n.content)??``))),1)],64)):e.isCustomComponent?(G(),O(T(e.component),h({key:1,ref_for:!0},e.customAttrs,{node:e.child,loading:e.child.loading,"index-key":e.key,"custom-id":t.customId,"custom-html-tags":p.value,"is-dark":m.value.isDark}),{default:D(()=>[e.hasSlotChildren?(G(),O(R(g),h({key:0,ref_for:!0},m.value,{nodes:e.child.children,"index-key":e.key,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`,`index-key`])):e.slotContent?(G(),O(R(g),h({key:1,ref_for:!0},m.value,{content:e.slotContent,final:!e.child.loading,"index-key":`${e.key}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`content`,`final`,`index-key`])):V(``,!0)]),_:2},1040,[`node`,`loading`,`index-key`,`custom-id`,`custom-html-tags`,`is-dark`])):(G(),O(T(e.component),h({key:2,ref_for:!0},k(e.child,e.index)),null,16))],64);var n,r}),128)):(G(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},H(E.value),9,vA))]))}}),[[`__scopeId`,`data-v-c59ff506`]]);yA.install=e=>{e.component(yA.__name,yA)};var bA={class:`table-node-wrapper`},xA=[`aria-busy`],SA={key:0},CA=[`custom-id`],wA=[`aria-label`,`onPointerdown`],TA=[`custom-id`],EA={key:0,class:`table-node__loading`,role:`status`,"aria-live":`polite`},DA=eO(c({__name:`TableNode`,props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:[`copy`],setup(e){let t=e,n=I(()=>{var e;return(e=t.node.loading)!=null&&e}),r=I(()=>t.node.rows??[]),i=M(null),o=M([]),s=null,c=I(()=>t.node.header.cells.length),u=I(()=>o.value.some(e=>Number.isFinite(e)&&e>0)),f=I(()=>u.value?o.value.map(e=>e>0?{width:`${e}px`}:void 0):[]);a(`markstreamShowTooltips`,I(()=>t.showTooltips)),a(`markstreamFade`,I(()=>t.fade));let p=XD(()=>t.customId),m=I(()=>!!p.value.text),h=I(()=>!!p.value.paragraph),g=new WeakMap;function _(e){let n=!1===t.fade&&!m.value,r=!h.value,i=g.get(e);if(i?.children===e.children&&i.textFastPath===n&&i.paragraphFastPath===r)return i.info;let a=Bk(e.children,r,!0),o={simpleChildren:a,plainText:a&&n?Vk(a):null};return g.set(e,{children:e.children,textFastPath:n,paragraphFastPath:r,info:o}),o}function v(e){if(!s)return;e.preventDefault();let t=s.startWidth+s.nextStartWidth,n=Math.min(48,Math.floor(t/2)),r=Math.max(n,Math.min(t-n,Math.round(s.startWidth+e.clientX-s.startX))),i=[...s.widths];i[s.index]=r,i[s.index+1]=t-r,o.value=i}function y(){s&&=(window.removeEventListener(`pointermove`,v),window.removeEventListener(`pointerup`,y),window.removeEventListener(`pointercancel`,y),null)}return E(c,()=>{y(),o.value=[]}),l(y),(a,c)=>(G(),W(`div`,bA,[F(`table`,{ref_key:`tableRef`,ref:i,class:L([`table-node`,{"table-node--loading":n.value}]),"aria-busy":n.value},[u.value?(G(),W(`colgroup`,SA,[(G(!0),W(N,null,w(e.node.header.cells,(e,t)=>(G(),W(`col`,{key:t,style:k(f.value[t])},null,4))),128))])):V(``,!0),F(`thead`,null,[F(`tr`,null,[(G(!0),W(N,null,w(e.node.header.cells,(n,r)=>(G(),W(`th`,{key:r,dir:`auto`,class:L([n.align===`right`?`text-right`:n.align===`center`?`text-center`:`text-left`])},[_(n).plainText===null?_(n).simpleChildren?(G(),O(R(Rk),{key:1,nodes:_(n).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${r}`},null,8,[`nodes`,`custom-id`,`index-key`])):(G(),O(R(_N),{key:2,nodes:n.children,"index-key":`table-th-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:c[0]||=e=>a.$emit(`copy`,e)},null,8,[`nodes`,`index-key`,`custom-id`,`typewriter`,`fade`,`show-tooltips`])):(G(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},H(_(n).plainText),9,CA)),r<e.node.header.cells.length-1?(G(),W(`button`,{key:3,type:`button`,class:`table-node__resize-handle`,"aria-label":`Resize columns ${r+1} and ${r+2}`,onPointerdown:e=>function(e,t){if(t.button!==0)return;let n=function(){let e=i.value?.querySelectorAll(`thead th`);return Array.from(e??[],e=>Math.round(e.getBoundingClientRect().width))}(),r=n[e],a=n[e+1];r&&a&&(t.preventDefault(),s={index:e,startX:t.clientX,startWidth:r,nextStartWidth:a,widths:n},o.value=n,window.addEventListener(`pointermove`,v),window.addEventListener(`pointerup`,y),window.addEventListener(`pointercancel`,y))}(r,e)},null,40,wA)):V(``,!0)],2))),128))])]),F(`tbody`,null,[(G(!0),W(N,null,w(r.value,(e,n)=>(G(),W(`tr`,{key:n},[(G(!0),W(N,null,w(e.cells,(e,r)=>(G(),W(`td`,{key:r,class:L([e.align===`right`?`text-right`:e.align===`center`?`text-center`:`text-left`]),dir:`auto`},[_(e).plainText===null?_(e).simpleChildren?(G(),O(R(Rk),{key:1,nodes:_(e).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${n}-${r}`},null,8,[`nodes`,`custom-id`,`index-key`])):(G(),O(R(_N),{key:2,nodes:e.children,"index-key":`table-td-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:c[1]||=e=>a.$emit(`copy`,e)},null,8,[`nodes`,`index-key`,`custom-id`,`typewriter`,`fade`,`show-tooltips`])):(G(),W(`span`,{key:0,class:`text-node`,"custom-id":t.customId},H(_(e).plainText),9,TA))],2))),128))]))),128))])],10,xA),U(ce,{name:`table-node-fade`},{default:D(()=>[n.value?(G(),W(`div`,EA,[d(a.$slots,`loading`,{isLoading:n.value},()=>[c[2]||=F(`span`,{class:`table-node__spinner animate-spin`,"aria-hidden":`true`},null,-1),c[3]||=F(`span`,{class:`sr-only`},`Loading`,-1)],!0)])):V(``,!0)]),_:3})]))}}),[[`__scopeId`,`data-v-39f87b5d`]]);DA.install=e=>{e.component(DA.__name,DA)};var OA={class:`hr-node`},kA=eO({},[[`render`,function(e,t){return G(),W(`hr`,OA)}],[`__scopeId`,`data-v-39b2349c`]]);kA.install=e=>{e.component(kA.__name,kA)};var AA={class:`unknown-node`},jA=c({__name:`FallbackComponent`,props:{node:{}},setup:e=>(t,n)=>(G(),W(`div`,AA,H(e.node.raw),1))}),MA=eO(c({__name:`VmrContainerNode`,props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},setup(e){let t=e,n=I(()=>`vmr-container vmr-container-${t.node.name}`),r=XD(()=>t.customId),i=I(()=>$({text:dk,paragraph:yA,heading:rA,inline_code:SO,link:kk,image:ZO,strong:Sk,emphasis:Fk,strikethrough:wk,insert:jk,subscript:bk,superscript:vk,checkbox:tO,checkbox_input:tO,hardbreak:Lk,math_inline:mk,reference:gk,list:lA,math_block:hk,table:DA},r.value));return(r,a)=>(G(),W(`div`,h({class:n.value},e.node.attrs),[(G(!0),W(N,null,w(e.node.children,(n,r)=>{return G(),O(T((a=n.type,i.value[a]||jA)),{key:`${e.indexKey||`vmr-container`}-${r}`,"custom-id":t.customId,node:n,"index-key":`${e.indexKey||`vmr-container`}-${r}`,typewriter:t.typewriter,fade:t.fade},null,8,[`custom-id`,`node`,`index-key`,`typewriter`,`fade`]);var a}),128))],16))}}),[[`__scopeId`,`data-v-911e41c4`]]);MA.install=e=>{e.component(MA.__name,MA)};var NA=`BN.BN.BN.BN.BN.BN.BN.BN.BN.S.B.S.WS.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.B.B.B.S.WS.ON.ON.ET.ET.ET.ON.ON.ON.ON.ON.ES.CS.ES.CS.CS.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.CS.ON.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.ON.ON.ON.BN.BN.BN.BN.BN.BN.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.CS.ON.ET.ET.ET.ET.ON.ON.ON.ON.L.ON.ON.BN.ON.ON.ET.ET.EN.EN.ON.L.ON.ON.ON.EN.L.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.L.L.L.L.L.L.L.L`.split(`.`),PA=[[697,698,`ON`],[706,719,`ON`],[722,735,`ON`],[741,749,`ON`],[751,767,`ON`],[768,879,`NSM`],[884,885,`ON`],[894,894,`ON`],[900,901,`ON`],[903,903,`ON`],[1014,1014,`ON`],[1155,1161,`NSM`],[1418,1418,`ON`],[1421,1422,`ON`],[1423,1423,`ET`],[1424,1424,`R`],[1425,1469,`NSM`],[1470,1470,`R`],[1471,1471,`NSM`],[1472,1472,`R`],[1473,1474,`NSM`],[1475,1475,`R`],[1476,1477,`NSM`],[1478,1478,`R`],[1479,1479,`NSM`],[1480,1535,`R`],[1536,1541,`AN`],[1542,1543,`ON`],[1544,1544,`AL`],[1545,1546,`ET`],[1547,1547,`AL`],[1548,1548,`CS`],[1549,1549,`AL`],[1550,1551,`ON`],[1552,1562,`NSM`],[1563,1610,`AL`],[1611,1631,`NSM`],[1632,1641,`AN`],[1642,1642,`ET`],[1643,1644,`AN`],[1645,1647,`AL`],[1648,1648,`NSM`],[1649,1749,`AL`],[1750,1756,`NSM`],[1757,1757,`AN`],[1758,1758,`ON`],[1759,1764,`NSM`],[1765,1766,`AL`],[1767,1768,`NSM`],[1769,1769,`ON`],[1770,1773,`NSM`],[1774,1775,`AL`],[1776,1785,`EN`],[1786,1808,`AL`],[1809,1809,`NSM`],[1810,1839,`AL`],[1840,1866,`NSM`],[1867,1957,`AL`],[1958,1968,`NSM`],[1969,1983,`AL`],[1984,2026,`R`],[2027,2035,`NSM`],[2036,2037,`R`],[2038,2041,`ON`],[2042,2044,`R`],[2045,2045,`NSM`],[2046,2069,`R`],[2070,2073,`NSM`],[2074,2074,`R`],[2075,2083,`NSM`],[2084,2084,`R`],[2085,2087,`NSM`],[2088,2088,`R`],[2089,2093,`NSM`],[2094,2136,`R`],[2137,2139,`NSM`],[2140,2143,`R`],[2144,2191,`AL`],[2192,2193,`AN`],[2194,2198,`AL`],[2199,2207,`NSM`],[2208,2249,`AL`],[2250,2273,`NSM`],[2274,2274,`AN`],[2275,2306,`NSM`],[2362,2362,`NSM`],[2364,2364,`NSM`],[2369,2376,`NSM`],[2381,2381,`NSM`],[2385,2391,`NSM`],[2402,2403,`NSM`],[2433,2433,`NSM`],[2492,2492,`NSM`],[2497,2500,`NSM`],[2509,2509,`NSM`],[2530,2531,`NSM`],[2546,2547,`ET`],[2555,2555,`ET`],[2558,2558,`NSM`],[2561,2562,`NSM`],[2620,2620,`NSM`],[2625,2626,`NSM`],[2631,2632,`NSM`],[2635,2637,`NSM`],[2641,2641,`NSM`],[2672,2673,`NSM`],[2677,2677,`NSM`],[2689,2690,`NSM`],[2748,2748,`NSM`],[2753,2757,`NSM`],[2759,2760,`NSM`],[2765,2765,`NSM`],[2786,2787,`NSM`],[2801,2801,`ET`],[2810,2815,`NSM`],[2817,2817,`NSM`],[2876,2876,`NSM`],[2879,2879,`NSM`],[2881,2884,`NSM`],[2893,2893,`NSM`],[2901,2902,`NSM`],[2914,2915,`NSM`],[2946,2946,`NSM`],[3008,3008,`NSM`],[3021,3021,`NSM`],[3059,3064,`ON`],[3065,3065,`ET`],[3066,3066,`ON`],[3072,3072,`NSM`],[3076,3076,`NSM`],[3132,3132,`NSM`],[3134,3136,`NSM`],[3142,3144,`NSM`],[3146,3149,`NSM`],[3157,3158,`NSM`],[3170,3171,`NSM`],[3192,3198,`ON`],[3201,3201,`NSM`],[3260,3260,`NSM`],[3276,3277,`NSM`],[3298,3299,`NSM`],[3328,3329,`NSM`],[3387,3388,`NSM`],[3393,3396,`NSM`],[3405,3405,`NSM`],[3426,3427,`NSM`],[3457,3457,`NSM`],[3530,3530,`NSM`],[3538,3540,`NSM`],[3542,3542,`NSM`],[3633,3633,`NSM`],[3636,3642,`NSM`],[3647,3647,`ET`],[3655,3662,`NSM`],[3761,3761,`NSM`],[3764,3772,`NSM`],[3784,3790,`NSM`],[3864,3865,`NSM`],[3893,3893,`NSM`],[3895,3895,`NSM`],[3897,3897,`NSM`],[3898,3901,`ON`],[3953,3966,`NSM`],[3968,3972,`NSM`],[3974,3975,`NSM`],[3981,3991,`NSM`],[3993,4028,`NSM`],[4038,4038,`NSM`],[4141,4144,`NSM`],[4146,4151,`NSM`],[4153,4154,`NSM`],[4157,4158,`NSM`],[4184,4185,`NSM`],[4190,4192,`NSM`],[4209,4212,`NSM`],[4226,4226,`NSM`],[4229,4230,`NSM`],[4237,4237,`NSM`],[4253,4253,`NSM`],[4957,4959,`NSM`],[5008,5017,`ON`],[5120,5120,`ON`],[5760,5760,`WS`],[5787,5788,`ON`],[5906,5908,`NSM`],[5938,5939,`NSM`],[5970,5971,`NSM`],[6002,6003,`NSM`],[6068,6069,`NSM`],[6071,6077,`NSM`],[6086,6086,`NSM`],[6089,6099,`NSM`],[6107,6107,`ET`],[6109,6109,`NSM`],[6128,6137,`ON`],[6144,6154,`ON`],[6155,6157,`NSM`],[6158,6158,`BN`],[6159,6159,`NSM`],[6277,6278,`NSM`],[6313,6313,`NSM`],[6432,6434,`NSM`],[6439,6440,`NSM`],[6450,6450,`NSM`],[6457,6459,`NSM`],[6464,6464,`ON`],[6468,6469,`ON`],[6622,6655,`ON`],[6679,6680,`NSM`],[6683,6683,`NSM`],[6742,6742,`NSM`],[6744,6750,`NSM`],[6752,6752,`NSM`],[6754,6754,`NSM`],[6757,6764,`NSM`],[6771,6780,`NSM`],[6783,6783,`NSM`],[6832,6877,`NSM`],[6880,6891,`NSM`],[6912,6915,`NSM`],[6964,6964,`NSM`],[6966,6970,`NSM`],[6972,6972,`NSM`],[6978,6978,`NSM`],[7019,7027,`NSM`],[7040,7041,`NSM`],[7074,7077,`NSM`],[7080,7081,`NSM`],[7083,7085,`NSM`],[7142,7142,`NSM`],[7144,7145,`NSM`],[7149,7149,`NSM`],[7151,7153,`NSM`],[7212,7219,`NSM`],[7222,7223,`NSM`],[7376,7378,`NSM`],[7380,7392,`NSM`],[7394,7400,`NSM`],[7405,7405,`NSM`],[7412,7412,`NSM`],[7416,7417,`NSM`],[7616,7679,`NSM`],[8125,8125,`ON`],[8127,8129,`ON`],[8141,8143,`ON`],[8157,8159,`ON`],[8173,8175,`ON`],[8189,8190,`ON`],[8192,8202,`WS`],[8203,8205,`BN`],[8207,8207,`R`],[8208,8231,`ON`],[8232,8232,`WS`],[8233,8233,`B`],[8234,8238,`BN`],[8239,8239,`CS`],[8240,8244,`ET`],[8245,8259,`ON`],[8260,8260,`CS`],[8261,8286,`ON`],[8287,8287,`WS`],[8288,8303,`BN`],[8304,8304,`EN`],[8308,8313,`EN`],[8314,8315,`ES`],[8316,8318,`ON`],[8320,8329,`EN`],[8330,8331,`ES`],[8332,8334,`ON`],[8352,8399,`ET`],[8400,8432,`NSM`],[8448,8449,`ON`],[8451,8454,`ON`],[8456,8457,`ON`],[8468,8468,`ON`],[8470,8472,`ON`],[8478,8483,`ON`],[8485,8485,`ON`],[8487,8487,`ON`],[8489,8489,`ON`],[8494,8494,`ET`],[8506,8507,`ON`],[8512,8516,`ON`],[8522,8525,`ON`],[8528,8543,`ON`],[8585,8587,`ON`],[8592,8721,`ON`],[8722,8722,`ES`],[8723,8723,`ET`],[8724,9013,`ON`],[9083,9108,`ON`],[9110,9257,`ON`],[9280,9290,`ON`],[9312,9351,`ON`],[9352,9371,`EN`],[9450,9899,`ON`],[9901,10239,`ON`],[10496,11123,`ON`],[11126,11263,`ON`],[11493,11498,`ON`],[11503,11505,`NSM`],[11513,11519,`ON`],[11647,11647,`NSM`],[11744,11775,`NSM`],[11776,11869,`ON`],[11904,11929,`ON`],[11931,12019,`ON`],[12032,12245,`ON`],[12272,12287,`ON`],[12288,12288,`WS`],[12289,12292,`ON`],[12296,12320,`ON`],[12330,12333,`NSM`],[12336,12336,`ON`],[12342,12343,`ON`],[12349,12351,`ON`],[12441,12442,`NSM`],[12443,12444,`ON`],[12448,12448,`ON`],[12539,12539,`ON`],[12736,12773,`ON`],[12783,12783,`ON`],[12829,12830,`ON`],[12880,12895,`ON`],[12924,12926,`ON`],[12977,12991,`ON`],[13004,13007,`ON`],[13175,13178,`ON`],[13278,13279,`ON`],[13311,13311,`ON`],[19904,19967,`ON`],[42128,42182,`ON`],[42509,42511,`ON`],[42607,42610,`NSM`],[42611,42611,`ON`],[42612,42621,`NSM`],[42622,42623,`ON`],[42654,42655,`NSM`],[42736,42737,`NSM`],[42752,42785,`ON`],[42888,42888,`ON`],[43010,43010,`NSM`],[43014,43014,`NSM`],[43019,43019,`NSM`],[43045,43046,`NSM`],[43048,43051,`ON`],[43052,43052,`NSM`],[43064,43065,`ET`],[43124,43127,`ON`],[43204,43205,`NSM`],[43232,43249,`NSM`],[43263,43263,`NSM`],[43302,43309,`NSM`],[43335,43345,`NSM`],[43392,43394,`NSM`],[43443,43443,`NSM`],[43446,43449,`NSM`],[43452,43453,`NSM`],[43493,43493,`NSM`],[43561,43566,`NSM`],[43569,43570,`NSM`],[43573,43574,`NSM`],[43587,43587,`NSM`],[43596,43596,`NSM`],[43644,43644,`NSM`],[43696,43696,`NSM`],[43698,43700,`NSM`],[43703,43704,`NSM`],[43710,43711,`NSM`],[43713,43713,`NSM`],[43756,43757,`NSM`],[43766,43766,`NSM`],[43882,43883,`ON`],[44005,44005,`NSM`],[44008,44008,`NSM`],[44013,44013,`NSM`],[64285,64285,`R`],[64286,64286,`NSM`],[64287,64296,`R`],[64297,64297,`ES`],[64298,64335,`R`],[64336,64450,`AL`],[64451,64466,`ON`],[64467,64829,`AL`],[64830,64847,`ON`],[64848,64911,`AL`],[64912,64913,`ON`],[64914,64967,`AL`],[64968,64975,`ON`],[64976,65007,`BN`],[65008,65020,`AL`],[65021,65023,`ON`],[65024,65039,`NSM`],[65040,65049,`ON`],[65056,65071,`NSM`],[65072,65103,`ON`],[65104,65104,`CS`],[65105,65105,`ON`],[65106,65106,`CS`],[65108,65108,`ON`],[65109,65109,`CS`],[65110,65118,`ON`],[65119,65119,`ET`],[65120,65121,`ON`],[65122,65123,`ES`],[65124,65126,`ON`],[65128,65128,`ON`],[65129,65130,`ET`],[65131,65131,`ON`],[65136,65278,`AL`],[65279,65279,`BN`],[65281,65282,`ON`],[65283,65285,`ET`],[65286,65290,`ON`],[65291,65291,`ES`],[65292,65292,`CS`],[65293,65293,`ES`],[65294,65295,`CS`],[65296,65305,`EN`],[65306,65306,`CS`],[65307,65312,`ON`],[65339,65344,`ON`],[65371,65381,`ON`],[65504,65505,`ET`],[65506,65508,`ON`],[65509,65510,`ET`],[65512,65518,`ON`],[65520,65528,`BN`],[65529,65533,`ON`],[65534,65535,`BN`],[65793,65793,`ON`],[65856,65932,`ON`],[65936,65948,`ON`],[65952,65952,`ON`],[66045,66045,`NSM`],[66272,66272,`NSM`],[66273,66299,`EN`],[66422,66426,`NSM`],[67584,67870,`R`],[67871,67871,`ON`],[67872,68096,`R`],[68097,68099,`NSM`],[68100,68100,`R`],[68101,68102,`NSM`],[68103,68107,`R`],[68108,68111,`NSM`],[68112,68151,`R`],[68152,68154,`NSM`],[68155,68158,`R`],[68159,68159,`NSM`],[68160,68324,`R`],[68325,68326,`NSM`],[68327,68408,`R`],[68409,68415,`ON`],[68416,68863,`R`],[68864,68899,`AL`],[68900,68903,`NSM`],[68904,68911,`AL`],[68912,68921,`AN`],[68922,68927,`AL`],[68928,68937,`AN`],[68938,68968,`R`],[68969,68973,`NSM`],[68974,68974,`ON`],[68975,69215,`R`],[69216,69246,`AN`],[69247,69290,`R`],[69291,69292,`NSM`],[69293,69311,`R`],[69312,69327,`AL`],[69328,69336,`ON`],[69337,69369,`AL`],[69370,69375,`NSM`],[69376,69423,`R`],[69424,69445,`AL`],[69446,69456,`NSM`],[69457,69487,`AL`],[69488,69505,`R`],[69506,69509,`NSM`],[69510,69631,`R`],[69633,69633,`NSM`],[69688,69702,`NSM`],[69714,69733,`ON`],[69744,69744,`NSM`],[69747,69748,`NSM`],[69759,69761,`NSM`],[69811,69814,`NSM`],[69817,69818,`NSM`],[69826,69826,`NSM`],[69888,69890,`NSM`],[69927,69931,`NSM`],[69933,69940,`NSM`],[70003,70003,`NSM`],[70016,70017,`NSM`],[70070,70078,`NSM`],[70089,70092,`NSM`],[70095,70095,`NSM`],[70191,70193,`NSM`],[70196,70196,`NSM`],[70198,70199,`NSM`],[70206,70206,`NSM`],[70209,70209,`NSM`],[70367,70367,`NSM`],[70371,70378,`NSM`],[70400,70401,`NSM`],[70459,70460,`NSM`],[70464,70464,`NSM`],[70502,70508,`NSM`],[70512,70516,`NSM`],[70587,70592,`NSM`],[70606,70606,`NSM`],[70608,70608,`NSM`],[70610,70610,`NSM`],[70625,70626,`NSM`],[70712,70719,`NSM`],[70722,70724,`NSM`],[70726,70726,`NSM`],[70750,70750,`NSM`],[70835,70840,`NSM`],[70842,70842,`NSM`],[70847,70848,`NSM`],[70850,70851,`NSM`],[71090,71093,`NSM`],[71100,71101,`NSM`],[71103,71104,`NSM`],[71132,71133,`NSM`],[71219,71226,`NSM`],[71229,71229,`NSM`],[71231,71232,`NSM`],[71264,71276,`ON`],[71339,71339,`NSM`],[71341,71341,`NSM`],[71344,71349,`NSM`],[71351,71351,`NSM`],[71453,71453,`NSM`],[71455,71455,`NSM`],[71458,71461,`NSM`],[71463,71467,`NSM`],[71727,71735,`NSM`],[71737,71738,`NSM`],[71995,71996,`NSM`],[71998,71998,`NSM`],[72003,72003,`NSM`],[72148,72151,`NSM`],[72154,72155,`NSM`],[72160,72160,`NSM`],[72193,72198,`NSM`],[72201,72202,`NSM`],[72243,72248,`NSM`],[72251,72254,`NSM`],[72263,72263,`NSM`],[72273,72278,`NSM`],[72281,72283,`NSM`],[72330,72342,`NSM`],[72344,72345,`NSM`],[72544,72544,`NSM`],[72546,72548,`NSM`],[72550,72550,`NSM`],[72752,72758,`NSM`],[72760,72765,`NSM`],[72850,72871,`NSM`],[72874,72880,`NSM`],[72882,72883,`NSM`],[72885,72886,`NSM`],[73009,73014,`NSM`],[73018,73018,`NSM`],[73020,73021,`NSM`],[73023,73029,`NSM`],[73031,73031,`NSM`],[73104,73105,`NSM`],[73109,73109,`NSM`],[73111,73111,`NSM`],[73459,73460,`NSM`],[73472,73473,`NSM`],[73526,73530,`NSM`],[73536,73536,`NSM`],[73538,73538,`NSM`],[73562,73562,`NSM`],[73685,73692,`ON`],[73693,73696,`ET`],[73697,73713,`ON`],[78912,78912,`NSM`],[78919,78933,`NSM`],[90398,90409,`NSM`],[90413,90415,`NSM`],[92912,92916,`NSM`],[92976,92982,`NSM`],[94031,94031,`NSM`],[94095,94098,`NSM`],[94178,94178,`ON`],[94180,94180,`NSM`],[113821,113822,`NSM`],[113824,113827,`BN`],[117760,117973,`ON`],[118e3,118009,`EN`],[118010,118012,`ON`],[118016,118451,`ON`],[118458,118480,`ON`],[118496,118512,`ON`],[118528,118573,`NSM`],[118576,118598,`NSM`],[119143,119145,`NSM`],[119155,119162,`BN`],[119163,119170,`NSM`],[119173,119179,`NSM`],[119210,119213,`NSM`],[119273,119274,`ON`],[119296,119361,`ON`],[119362,119364,`NSM`],[119365,119365,`ON`],[119552,119638,`ON`],[120513,120513,`ON`],[120539,120539,`ON`],[120571,120571,`ON`],[120597,120597,`ON`],[120629,120629,`ON`],[120655,120655,`ON`],[120687,120687,`ON`],[120713,120713,`ON`],[120745,120745,`ON`],[120771,120771,`ON`],[120782,120831,`EN`],[121344,121398,`NSM`],[121403,121452,`NSM`],[121461,121461,`NSM`],[121476,121476,`NSM`],[121499,121503,`NSM`],[121505,121519,`NSM`],[122880,122886,`NSM`],[122888,122904,`NSM`],[122907,122913,`NSM`],[122915,122916,`NSM`],[122918,122922,`NSM`],[123023,123023,`NSM`],[123184,123190,`NSM`],[123566,123566,`NSM`],[123628,123631,`NSM`],[123647,123647,`ET`],[124140,124143,`NSM`],[124398,124399,`NSM`],[124643,124643,`NSM`],[124646,124646,`NSM`],[124654,124655,`NSM`],[124661,124661,`NSM`],[124928,125135,`R`],[125136,125142,`NSM`],[125143,125251,`R`],[125252,125258,`NSM`],[125259,126063,`R`],[126064,126143,`AL`],[126144,126207,`R`],[126208,126287,`AL`],[126288,126463,`R`],[126464,126703,`AL`],[126704,126705,`ON`],[126706,126719,`AL`],[126720,126975,`R`],[126976,127019,`ON`],[127024,127123,`ON`],[127136,127150,`ON`],[127153,127167,`ON`],[127169,127183,`ON`],[127185,127221,`ON`],[127232,127242,`EN`],[127243,127247,`ON`],[127279,127279,`ON`],[127338,127343,`ON`],[127405,127405,`ON`],[127584,127589,`ON`],[127744,128728,`ON`],[128732,128748,`ON`],[128752,128764,`ON`],[128768,128985,`ON`],[128992,129003,`ON`],[129008,129008,`ON`],[129024,129035,`ON`],[129040,129095,`ON`],[129104,129113,`ON`],[129120,129159,`ON`],[129168,129197,`ON`],[129200,129211,`ON`],[129216,129217,`ON`],[129232,129240,`ON`],[129280,129623,`ON`],[129632,129645,`ON`],[129648,129660,`ON`],[129664,129674,`ON`],[129678,129734,`ON`],[129736,129736,`ON`],[129741,129756,`ON`],[129759,129770,`ON`],[129775,129784,`ON`],[129792,129938,`ON`],[129940,130031,`ON`],[130032,130041,`EN`],[130042,130042,`ON`],[131070,131071,`BN`],[196606,196607,`BN`],[262142,262143,`BN`],[327678,327679,`BN`],[393214,393215,`BN`],[458750,458751,`BN`],[524286,524287,`BN`],[589822,589823,`BN`],[655358,655359,`BN`],[720894,720895,`BN`],[786430,786431,`BN`],[851966,851967,`BN`],[917502,917759,`BN`],[917760,917999,`NSM`],[918e3,921599,`BN`],[983038,983039,`BN`],[1048574,1048575,`BN`],[1114110,1114111,`BN`]];function FA(e){if(e<=255)return NA[e];let t=0,n=PA.length-1;for(;t<=n;){let r=t+n>>1,i=PA[r];if(e<i[0])n=r-1;else{if(!(e>i[1]))return i[2];t=r+1}}return`L`}var IA=/[ \t\n\r\f]+/g,LA=/[\t\n\r\f]| {2,}|^ | $/,RA=null,zA=RegExp(`\\p{Script=Arabic}`,`u`),BA=RegExp(`\\p{M}`,`u`),VA=RegExp(`\\p{Nd}`,`u`);function HA(e){return zA.test(e)}function UA(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=44032&&e<=55215||e>=65280&&e<=65519}function WA(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){let r=e.charCodeAt(t+1);if(r>=56320&&r<=57343){if(UA(r-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(UA(n))return!0}}return!1}var GA=new Set([`\xA0`,` `,``,``]);function KA(e){return WA(e)}function qA(e){return!function(e){let t=oj(e);return t!==null&&(JA.has(t)||ZA.has(t))}(e)&&!function(e){let t=oj(e);return t!==null&&GA.has(t)}(e)}var JA=new Set(`,...!.:.;.?.、.。.・.).〕.〉.》.」.』.】.〗.〙.〛.ー.々.〻.ゝ.ゞ.ヽ.ヾ`.split(`.`)),YA=new Set([`"`,`(`,`[`,`{`,`“`,`‘`,`«`,`‹`,`(`,`〔`,`〈`,`《`,`「`,`『`,`【`,`〖`,`〘`,`〚`]),XA=new Set([`'`,`’`]),ZA=new Set(`.(,(!(?(:(;(،(؛(؟(।(॥(၊(။(၌(၍(၏()(](}(%("(”(’(»(›(…`.split(`(`)),QA=new Set([`:`,`.`,`،`,`؛`]),$A=new Set([`၏`]),ej=new Set([`”`,`’`,`»`,`›`,`」`,`』`,`】`,`》`,`〉`,`〕`,`)`]);function tj(e){if(ij(e))return!0;let t=!1;for(let n of e)if(ZA.has(n))t=!0;else if(!t||!BA.test(n))return!1;return t}function nj(e){for(let t of e)if(!JA.has(t)&&!ZA.has(t))return!1;return e.length>0}function rj(e){if(ij(e))return!0;for(let t of e)if(!YA.has(t)&&!XA.has(t)&&!BA.test(t))return!1;return e.length>0}function ij(e){let t=!1;for(let n of e)if(n!==`\\`&&!BA.test(n)){if(!(YA.has(n)||ZA.has(n)||XA.has(n)))return!1;t=!0}return t}function aj(e,t){let n=t-1;if(n<=0)return Math.max(n,0);let r=e.charCodeAt(n);if(r<56320||r>57343)return n;let i=n-1;if(i<0)return n;let a=e.charCodeAt(i);return a>=55296&&a<=56319?i:n}function oj(e){if(e.length===0)return null;let t=aj(e,e.length);return e.slice(t)}function sj(e){let t=Array.from(e),n=t.length;for(;n>0;){let e=t[n-1];if(BA.test(e))n--;else{if(!YA.has(e)&&!XA.has(e))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(``),tail:t.slice(n).join(``)}}function cj(e,t,n){return n!==`text`||t||e.length!==1||e===`-`||e===`—`?null:e}function lj(e,t,n,r){let i=t[r],a=e[r];if(i==null)return a;let o=n[r];if(a.length===o)return a;let s=i.repeat(o);return e[r]=s,s}function uj(e,t){return e&&t!==null&&QA.has(t)}function dj(e){let t=oj(e);return t!==null&&$A.has(t)}function fj(e){if(e.length<2||e[0]!==` `)return null;let t=e.slice(1);return RegExp(`^\\p{M}+$`,`u`).test(t)?{space:` `,marks:t}:null}function pj(e){let t=e.length;for(;t>0;){let n=aj(e,t),r=e.slice(n,t);if(ej.has(r))return!0;if(!ZA.has(r))return!1;t=n}return!1}function mj(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===` `)return`preserved-space`;if(e===` `)return`tab`;if(t.preserveHardBreaks&&e===`
|
|
144
|
+
</div>`};let s=/^\[(\d+)\]/,c=/^\[([^\]\n]+)\]/,l=e=>{if(!e.startsWith(`[`))return!1;let t=c.exec(e);if(!t)return e!==`[`&&!/^\[\d+$/.test(e);let n=String(t[1]??``);return e.slice(t[0].length).startsWith(`(`)?!1:!/^\d+$/.test(n)};return n.inline.ruler.before(`escape`,`reference`,(e,t)=>{let n=e;if(n.src[n.pos]!==`[`)return!1;let r=s.exec(n.src.slice(n.pos));if(!r)return!1;let i=n.src.slice(Math.max(0,n.pos-120),n.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(i))return!1;let a=n.src.slice(n.pos+r[0].length);if(a.startsWith(`](`)||a.startsWith(`(`)||l(a))return!1;if(!t){let e=r[1],t=n.push(`reference`,`span`,0);t.content=e,t.markup=r[0],t.raw=r[0]}return n.pos+=r[0].length,!0}),n.renderer.rules.reference=(e,t)=>{let n=String(e[t].content??``);return`<span class="reference-link" data-reference-id="${n}" role="button" tabindex="0" title="Click to view reference">${n}</span>`},n}function zT({nextContent:e,previousContent:t,typewriterEnabled:n}){return!n||e===t?{settledContent:e,streamedDelta:``,appended:!1}:t&&e.startsWith(t)&&e.length>t.length?{settledContent:t,streamedDelta:e.slice(t.length),appended:!0}:{settledContent:e,streamedDelta:``,appended:!1}}function BT({nextContent:e,persistedContent:t,currentState:n,typewriterEnabled:r,streamRenderVersionChanged:i=!1}){let a=`${n.settledContent}${n.streamedDelta}`;return r?n.streamedDelta&&a===e?i?{settledContent:a,streamedDelta:``,appended:!1}:{settledContent:n.settledContent,streamedDelta:n.streamedDelta,appended:!1}:zT({nextContent:e,previousContent:t??a,typewriterEnabled:r}):{settledContent:e,streamedDelta:``,appended:!1}}var VT=new WeakMap;function HT(e){let t=VT.get(e);return t||(t={inFlight:new Map,completed:new Set,registeredAllLangs:!1,registeredThemes:[],registeredLangs:[],tail:Promise.resolve()},VT.set(e,t)),t}function UT(e,t){if(!t?.length)return[...e];let n=[...e],r=new Set(n);for(let e of t)r.has(e)||(r.add(e),n.push(e));return n}function WT(e){return!!(e.themes?.length||e.langs?.length)}function GT(e,t){if(!t?.length)return!0;let n=new Set(e);return t.every(e=>n.has(e))}function KT(e,t){return!t?.length||e.registeredAllLangs?!0:GT(e.registeredLangs,t)}function qT(e,t){return WT(t)&>(e.registeredThemes,t.themes)&&KT(e,t.langs)}function JT(e,t){if(!WT(t))return t;let n=UT(e.registeredThemes,t.themes),r=e.registeredAllLangs?[]:UT(e.registeredLangs,t.langs);return{...n.length?{themes:n}:{},...r.length?{langs:r}:{}}}var YT={plain:`plaintext`,text:`plaintext`,txt:`plaintext`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,ts:`typescript`,mts:`typescript`,cts:`typescript`,golang:`go`,py:`python`,rb:`ruby`,rs:`rust`,kt:`kotlin`,kts:`kotlin`,md:`markdown`,yml:`yaml`,sh:`shellscript`,bash:`shellscript`,zsh:`shellscript`,shell:`shellscript`,shellscript:`shellscript`,ps:`powershell`,ps1:`powershell`,pwsh:`powershell`,"c++":`cpp`,"c#":`csharp`,cs:`csharp`,objc:`objective-c`,objectivec:`objective-c`,"objective-c":`objective-c`,objectivecpp:`objective-cpp`,"objective-c++":`objective-cpp`,"objective-cpp":`objective-cpp`};function XT(e){let t=String(e??``).trim();if(!t)return``;let[n=``]=t.split(/\s+/);return n.split(`:`)[0]?.trim().toLowerCase()??``}function ZT(e){let t=XT(e);return YT[t]??t}function QT(e){if(!Array.isArray(e))return;let t=e.filter(e=>typeof e==`string`).map(e=>ZT(e)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function $T(e){if(!Array.isArray(e))return;let t=[],n=new Set;for(let r of e){if(typeof r!=`string`)continue;let e=r.trim();!e||n.has(e)||(n.add(e),t.push(e))}return t.length>0?t:void 0}function eE(e){return $T(e)?.join(`\0`)??``}function tE(e,t){let n=$T(e),r=QT(t);return{...n?.length?{themes:n}:{},...r?.length?{langs:r}:{}}}function nE(e,t){return`${eE(e)}\u0000\u0000${QT(t)?.join(`\0`)??``}`}function rE(e,t,n={hasRegisterHighlight:!0,hasCreateRenderer:!0}){let r=tE(e,t),i={...r},a=!!(i.langs?.length&&n.hasCreateRenderer&&!n.hasRegisterHighlight);return a&&(delete r.langs,delete i.langs),{key:nE(i.themes,i.langs),registerOptions:r,rendererOptions:i,ignoredLangs:a}}async function iE(e,t={},n){if(!e)return`ready`;let r=tE(t.themes,t.langs),i=nE(r.themes,r.langs),a=n&&n===i?n:i,o=HT(e);if(o.completed.has(a))return`ready`;if(qT(o,r))return o.completed.add(a),`ready`;let s=o.inFlight.get(a);if(s)return s;let c=o.tail.catch(()=>{}).then(()=>{if(o.completed.has(a)||qT(o,r))return o.completed.add(a),`ready`;let t=JT(o,r),n=nE(t.themes,t.langs);return o.completed.has(n)||qT(o,t)?(o.completed.add(a),o.completed.add(n),`ready`):Promise.resolve(e(t)).then(()=>(WT(t)?(o.registeredThemes=t.themes?[...t.themes]:o.registeredThemes,o.registeredLangs=t.langs?[...t.langs]:o.registeredLangs):o.registeredAllLangs=!0,o.completed.add(n),`ready`))}).then(()=>(o.completed.add(a),`ready`)).finally(()=>{o.inFlight.get(a)===c&&o.inFlight.delete(a)});return o.inFlight.set(a,c),o.tail=c.catch(()=>{}),c}function aE(e,t,n=1){let r=Number(e);return Number.isFinite(r)?Math.max(n,r):t}function oE(e,t){let n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var sE=class{constructor(e={},t){this.source=``,this.visible=``,this.done=!1,this.paused=!1,this.listeners=new Set,this.rafId=0,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.hasStarted=!1,this.destroyed=!1,this.getSnapshot=()=>({source:this.source,visible:this.visible,done:this.done,paused:this.paused,pendingChars:this.pendingChars,caughtUp:this.caughtUp,final:this.final}),this.subscribe=e=>this.destroyed?()=>{}:(this.listeners.add(e),()=>{this.listeners.delete(e)}),this.enqueue=e=>{if(this.destroyed||!e)return;this.done&&=!1;let t=this.source.length>0,n=this.pendingChars<=0;if(this.source+=e,n){let e=dE();this.startedAt=t&&this.hasStarted?e-this.normalizedStartDelayMs:e,this.lastTick=e,this.charBudget=0}this.hasStarted=!0,this.emit(),this.ensureLoop()},this.finish=(e={})=>{if(!this.destroyed){if(this.done=!0,e.flush??this.flushOnFinish){this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit();return}this.emit(),this.ensureLoop()}},this.flush=()=>{this.destroyed||(this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit())},this.reset=(e=``)=>{this.destroyed||(this.cancelLoop(),this.source=e,this.visible=e,this.done=!1,this.paused=!1,this.hasStarted=!1,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.emit())},this.pause=()=>{this.destroyed||this.paused||(this.paused=!0,this.cancelLoop(),this.emit())},this.resume=()=>{if(this.destroyed||!this.paused)return;this.paused=!1;let e=dE();this.lastTick=e,this.startedAt||=e,this.emit(),this.ensureLoop()},this.destroy=()=>{this.destroyed||(this.destroyed=!0,this.cancelLoop(),this.listeners.clear())},this.dispose=()=>{this.destroy()},this.tick=e=>{if(this.rafId=0,this.destroyed||this.paused)return;if(this.pendingChars<=0){this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond;return}if(e-this.startedAt<this.normalizedStartDelayMs){this.rafId=requestAnimationFrame(this.tick);return}let t=1e3/Math.max(1,this.maxCommitFps),n=Math.min(100,Math.max(0,e-this.lastTick));if(n<t){this.rafId=requestAnimationFrame(this.tick);return}this.lastTick=e;let r=this.pendingChars,i=r>this.normalizedCatchUpThreshold?this.normalizedCatchUpLatencyMs:this.normalizedTargetLatencyMs,a=fE(r/Math.max(.001,i/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(a-this.currentCps)*.2,this.charBudget+=this.currentCps*(n/1e3),this.charBudget<1){this.ensureLoop();return}let o=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),s=uE(this.source.slice(this.visible.length),o,this.segmenter);s.text&&(this.visible+=s.text,this.charBudget=Math.max(0,this.charBudget-s.graphemeCount),this.emit()),this.ensureLoop()};let{minCharsPerSecond:n=40,maxCharsPerSecond:r=1e3,targetLatencyMs:i=900,catchUpLatencyMs:a=350,catchUpThreshold:o=600,maxCommitFps:s=30,startDelayMs:c=80,maxCharsPerCommit:l=80,flushOnFinish:u=!1}=e;this.minCharsPerSecond=aE(n,40,1),this.maxCharsPerSecond=Math.max(this.minCharsPerSecond,aE(r,1e3,1)),this.normalizedTargetLatencyMs=aE(i,900,1),this.normalizedCatchUpLatencyMs=aE(a,350,1),this.normalizedCatchUpThreshold=oE(o,600),this.normalizedStartDelayMs=oE(c,80),this.maxCommitFps=Math.trunc(aE(s,30,1)),this.maxCharsPerCommit=Math.trunc(aE(l,80,1)),this.flushOnFinish=u,this.segmenter=lE(),t&&this.listeners.add(t),this.currentCps=this.minCharsPerSecond}get pendingChars(){return Math.max(0,this.source.length-this.visible.length)}get caughtUp(){return this.pendingChars===0}get final(){return this.done&&this.caughtUp}ensureLoop(){if(!(this.destroyed||this.rafId||this.paused||this.pendingChars<=0)){if(typeof requestAnimationFrame!=`function`){this.flush();return}this.rafId=requestAnimationFrame(this.tick)}}cancelLoop(){this.rafId&&=(typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(this.rafId),0)}emit(){if(!this.destroyed)for(let e of this.listeners)e()}};function cE(e={},t){let n=new sE(e,t);return{getSnapshot:n.getSnapshot,subscribe:n.subscribe,enqueue:n.enqueue,finish:n.finish,flush:n.flush,reset:n.reset,pause:n.pause,resume:n.resume,destroy:n.destroy,dispose:n.dispose}}function lE(){if(typeof Intl>`u`)return null;let e=Intl.Segmenter;return e?new e(void 0,{granularity:`grapheme`}):null}function uE(e,t,n){if(!e||t<=0)return{text:``,graphemeCount:0};if(!n){let n=Array.from(e).slice(0,t);return{text:n.join(``),graphemeCount:n.length}}let r=``,i=0;for(let a of n.segment(e)){if(i>=t)break;r+=a.segment,i++}return{text:r,graphemeCount:i}}function dE(){return typeof performance<`u`?performance.now():Date.now()}function fE(e,t,n){return Math.min(n,Math.max(t,e))}var pE=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),mE=Symbol.for(`markstream-vue:node-lifecycle`),hE=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M30 14v-2h-2V8h-2v4h-2V8h-2v4h-2v2h2v2h-2v2h2v4h2v-4h2v4h2v-4h2v-2h-2v-2Zm-4 2h-2v-2h2Zm-12.437 6A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>`,gE=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path d="M0 0h24v24H0z"/><path fill="#42a5f5" d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"/></svg>`,_E={id:`material`,core:{"":gE,plain:`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path d="M0 0h24v24H0z"/><path fill="#42a5f5" d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"/></svg>`,text:gE,javascript:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ffca28" d="M2 2v12h12V2zm6 6h1v4a1.003 1.003 0 0 1-1 1H7a1.003 1.003 0 0 1-1-1v-1h1v1h1zm3 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1"/></svg>`,typescript:`<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 16 16"><path fill="#0288d1" d="M2 2v12h12V2zm4 6h3v1H8v4H7V9H6zm5 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1"/></svg>`,jsx:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#00bcd4" d="M16 12c7.444 0 12 2.59 12 4s-4.556 4-12 4-12-2.59-12-4 4.556-4 12-4m0-2c-7.732 0-14 2.686-14 6s6.268 6 14 6 14-2.686 14-6-6.268-6-14-6"/><path fill="#00bcd4" d="M16 14a2 2 0 1 0 2 2 2 2 0 0 0-2-2"/><path fill="#00bcd4" d="M10.458 5.507c2.017 0 5.937 3.177 9.006 8.493 3.722 6.447 3.757 11.687 2.536 12.392a.9.9 0 0 1-.457.1c-2.017 0-5.938-3.176-9.007-8.492C8.814 11.553 8.779 6.313 10 5.608a.9.9 0 0 1 .458-.1m-.001-2A2.87 2.87 0 0 0 9 3.875C6.13 5.532 6.938 12.304 10.804 19c3.284 5.69 7.72 9.493 10.74 9.493A2.87 2.87 0 0 0 23 28.124c2.87-1.656 2.062-8.428-1.804-15.124-3.284-5.69-7.72-9.493-10.74-9.493Z"/><path fill="#00bcd4" d="M21.543 5.507a.9.9 0 0 1 .457.1c1.221.706 1.186 5.946-2.536 12.393-3.07 5.316-6.99 8.493-9.007 8.493a.9.9 0 0 1-.457-.1C8.779 25.686 8.814 20.446 12.536 14c3.07-5.316 6.99-8.493 9.007-8.493m0-2c-3.02 0-7.455 3.804-10.74 9.493C6.939 19.696 6.13 26.468 9 28.124a2.87 2.87 0 0 0 1.457.369c3.02 0 7.455-3.804 10.74-9.493C25.061 12.304 25.87 5.532 23 3.876a2.87 2.87 0 0 0-1.457-.369"/></svg>`,tsx:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M16 12c7.444 0 12 2.59 12 4s-4.556 4-12 4-12-2.59-12-4 4.556-4 12-4m0-2c-7.732 0-14 2.686-14 6s6.268 6 14 6 14-2.686 14-6-6.268-6-14-6"/><path fill="#0288d1" d="M16 14a2 2 0 1 0 2 2 2 2 0 0 0-2-2"/><path fill="#0288d1" d="M10.458 5.507c2.017 0 5.937 3.177 9.006 8.493 3.722 6.447 3.757 11.687 2.536 12.392a.9.9 0 0 1-.457.1c-2.017 0-5.938-3.176-9.007-8.492C8.814 11.553 8.779 6.313 10 5.608a.9.9 0 0 1 .458-.1m-.001-2A2.87 2.87 0 0 0 9 3.875C6.13 5.532 6.938 12.304 10.804 19c3.284 5.69 7.72 9.493 10.74 9.493A2.87 2.87 0 0 0 23 28.124c2.87-1.656 2.062-8.428-1.804-15.124-3.284-5.69-7.72-9.493-10.74-9.493Z"/><path fill="#0288d1" d="M21.543 5.507a.9.9 0 0 1 .457.1c1.221.706 1.186 5.946-2.536 12.393-3.07 5.316-6.99 8.493-9.007 8.493a.9.9 0 0 1-.457-.1C8.779 25.686 8.814 20.446 12.536 14c3.07-5.316 6.99-8.493 9.007-8.493m0-2c-3.02 0-7.455 3.804-10.74 9.493C6.939 19.696 6.13 26.468 9 28.124a2.87 2.87 0 0 0 1.457.369c3.02 0 7.455-3.804 10.74-9.493C25.061 12.304 25.87 5.532 23 3.876a2.87 2.87 0 0 0-1.457-.369"/></svg>`,html:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#e65100" d="m4 4 2 22 10 2 10-2 2-22Zm19.72 7H11.28l.29 3h11.86l-.802 9.335L15.99 25l-6.635-1.646L8.93 19h3.02l.19 2 3.86.77 3.84-.77.29-4H8.84L8 8h16Z"/></svg>`,css:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#7e57c2" d="M20 18h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 20 22h2v2h2v-2c0-.388-.562-.851-1.254-1.034C20.356 20.34 20 18.84 20 18m-3.254 2.966C14.356 20.34 14 18.84 14 18h-2v-2h-2v8h2v-2h4v2h2v-2c0-.388-.562-.851-1.254-1.034"/><path fill="#7e57c2" d="M24 4H4v20a4 4 0 0 0 4 4h16.16A3.84 3.84 0 0 0 28 24.16V8a4 4 0 0 0-4-4m2 14h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 26 22v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2Z"/></svg>`,scss:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ec407a" d="M27.837 5.673a4.33 4.33 0 0 0-2.293-2.701c-2.362-1.261-6.11-1.298-9.548-.092a26.3 26.3 0 0 0-8.76 4.966c-2.752 2.542-3.438 4.925-3.189 6.194.523 2.668 3.274 4.539 5.485 6.042.418.284.822.559 1.175.816-1.429.76-4.261 2.444-5.088 4.248a3.88 3.88 0 0 0-.118 3.332A2.37 2.37 0 0 0 6.869 29.8a5.6 5.6 0 0 0 1.49.2 6.35 6.35 0 0 0 5.19-2.856 6.74 6.74 0 0 0 .864-5.382 7.3 7.3 0 0 1 2.044-.03 3.92 3.92 0 0 1 2.816 1.311 1.82 1.82 0 0 1 .423 1.262 1.55 1.55 0 0 1-.772 1.05c-.234.14-.586.355-.504.803.036.194.198.633.894.512a2.93 2.93 0 0 0 2.145-2.651 4 4 0 0 0-1.197-2.904 5.94 5.94 0 0 0-4.396-1.626 10.6 10.6 0 0 0-2.672.304 20 20 0 0 0-2.203-1.846c-1.712-1.3-3.33-2.529-3.235-4.26.125-2.263 2.468-4.532 6.964-6.744 4.016-1.976 7.254-2.037 8.944-1.438a2 2 0 0 1 1.204.883 2.77 2.77 0 0 1-.36 2.47 9.71 9.71 0 0 1-7.425 4.304 3.86 3.86 0 0 1-3.238-.757c-.278-.302-.593-.645-1.074-.383q-.565.31-.225 1.189a3.9 3.9 0 0 0 2.407 1.92 11.7 11.7 0 0 0 7.128-.671c3.527-1.35 6.681-5.202 5.756-8.787M11.895 24.475a4 4 0 0 1-.192.468 4.5 4.5 0 0 1-.753 1.081 2.83 2.83 0 0 1-2.533 1.107c-.056-.032-.078-.146-.085-.193a3.28 3.28 0 0 1 1.076-2.284 11.3 11.3 0 0 1 2.644-1.933 3.85 3.85 0 0 1-.157 1.754"/></svg>`,json:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="#f9a825" d="M560-160v-80h120q17 0 28.5-11.5T720-280v-80q0-38 22-69t58-44v-14q-36-13-58-44t-22-69v-80q0-17-11.5-28.5T680-720H560v-80h120q50 0 85 35t35 85v80q0 17 11.5 28.5T840-560h40v160h-40q-17 0-28.5 11.5T800-360v80q0 50-35 85t-85 35zm-280 0q-50 0-85-35t-35-85v-80q0-17-11.5-28.5T120-400H80v-160h40q17 0 28.5-11.5T160-600v-80q0-50 35-85t85-35h120v80H280q-17 0-28.5 11.5T240-680v80q0 38-22 69t-58 44v14q36 13 58 44t22 69v80q0 17 11.5 28.5T280-240h120v80z"/></svg>`,python:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#0288d1" d="M9.86 2A2.86 2.86 0 0 0 7 4.86v1.68h4.29c.39 0 .71.57.71.96H4.86A2.86 2.86 0 0 0 2 10.36v3.781a2.86 2.86 0 0 0 2.86 2.86h1.18v-2.68a2.85 2.85 0 0 1 2.85-2.86h5.25c1.58 0 2.86-1.271 2.86-2.851V4.86A2.86 2.86 0 0 0 14.14 2zm-.72 1.61c.4 0 .72.12.72.71s-.32.891-.72.891c-.39 0-.71-.3-.71-.89s.32-.711.71-.711"/><path fill="#fdd835" d="M17.959 7v2.68a2.85 2.85 0 0 1-2.85 2.859H9.86A2.85 2.85 0 0 0 7 15.389v3.75a2.86 2.86 0 0 0 2.86 2.86h4.28A2.86 2.86 0 0 0 17 19.14v-1.68h-4.291c-.39 0-.709-.57-.709-.96h7.14A2.86 2.86 0 0 0 22 13.64V9.86A2.86 2.86 0 0 0 19.14 7zM8.32 11.513l-.004.004.038-.004zm6.54 7.276c.39 0 .71.3.71.89a.71.71 0 0 1-.71.71c-.4 0-.72-.12-.72-.71s.32-.89.72-.89"/></svg>`,ruby:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#f44336" d="M18.041 3.177c2.24.382 2.879 1.919 2.843 3.527V6.67l-1.013 13.266-13.132.897h.008c-1.093-.044-3.518-.151-3.634-3.545l1.217-2.222 2.462 5.74 2.097-6.77-.045.009.018-.018 6.85 2.186L13.945 9.3l6.53-.409-5.144-4.212 2.71-1.51v.009M3.113 17.252v.017zM6.916 6.874c2.63-2.622 6.033-4.168 7.34-2.844 1.297 1.306-.072 4.523-2.702 7.135-2.666 2.613-6.015 4.248-7.322 2.933-1.306-1.324.036-4.612 2.675-7.224z"/></svg>`,go:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#00acc1" d="M2 12h4v2H2zm-2 4h6v2H0zm4 4h2v2H4zm16.954-5H14v3h3.239a4.42 4.42 0 0 1-3.531 2 2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 15.292 13a2.73 2.73 0 0 1 1.749.584l2.962-1.185A5.6 5.6 0 0 0 15.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 6.4 6.4 0 0 0 .003-1.5"/><path fill="#00acc1" d="M26.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 5.614 5.614 0 0 0-5.659-6.5m2.681 6.137A4.515 4.515 0 0 1 24.708 20a2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 26.292 13a2.65 2.65 0 0 1 2.053.858 2.86 2.86 0 0 1 .628 2.28Z"/></svg>`,java:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#f44336" d="M4 26h24v2H4zM28 4H7a1 1 0 0 0-1 1v13a4 4 0 0 0 4 4h10a4 4 0 0 0 4-4v-4h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 8h-4V6h4Z"/></svg>`,kotlin:`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><defs><linearGradient id="a" x1="1.725" x2="22.185" y1="22.67" y2="1.982" gradientTransform="translate(1.306 1.129)scale(.89324)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#7c4dff"/><stop offset=".5" stop-color="#d500f9"/><stop offset="1" stop-color="#ef5350"/></linearGradient></defs><path fill="url(#a)" d="M2.975 2.976v18.048h18.05v-.03l-4.478-4.511-4.48-4.515 4.48-4.515 4.443-4.477z"/></svg>`,c:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M19.563 22A5.57 5.57 0 0 1 14 16.437v-2.873A5.57 5.57 0 0 1 19.563 8H24V2h-4.437A11.563 11.563 0 0 0 8 13.563v2.873A11.564 11.564 0 0 0 19.563 28H24v-6Z"/></svg>`,cpp:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M28 14v-4h-2v4h-6v-4h-2v4h-4v2h4v4h2v-4h6v4h2v-4h4v-2z"/><path fill="#0288d1" d="M13.563 22A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>`,cs:hE,csharp:hE,php:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#1e88e5" d="M12 18.08c-6.63 0-12-2.72-12-6.08s5.37-6.08 12-6.08S24 8.64 24 12s-5.37 6.08-12 6.08m-5.19-7.95c.54 0 .91.1 1.09.31.18.2.22.56.13 1.03-.1.53-.29.87-.58 1.09q-.42.33-1.29.33h-.87l.53-2.76zm-3.5 5.55h1.44l.34-1.75h1.23c.54 0 .98-.06 1.33-.17.35-.12.67-.31.96-.58.24-.22.43-.46.58-.73.15-.26.26-.56.31-.88.16-.78.05-1.39-.33-1.82-.39-.44-.99-.65-1.82-.65H4.59zm7.25-8.33-1.28 6.58h1.42l.74-3.77h1.14c.36 0 .6.06.71.18s.13.34.07.66l-.57 2.93h1.45l.59-3.07c.13-.62.03-1.07-.27-1.36-.3-.27-.85-.4-1.65-.4h-1.27L12 7.35zM18 10.13c.55 0 .91.1 1.09.31.18.2.22.56.13 1.03-.1.53-.29.87-.57 1.09-.29.22-.72.33-1.3.33h-.85l.5-2.76zm-3.5 5.55h1.44l.34-1.75h1.22c.55 0 1-.06 1.35-.17.35-.12.65-.31.95-.58.24-.22.44-.46.58-.73.15-.26.26-.56.32-.88.15-.78.04-1.39-.34-1.82-.36-.44-.99-.65-1.82-.65h-2.75z"/></svg>`,shell:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ff7043" d="M2 2a1 1 0 0 0-1 1v10c0 .554.446 1 1 1h12c.554 0 1-.446 1-1V3a1 1 0 0 0-1-1zm0 3h12v8H2zm1 2 2 2-2 2 1 1 3-3-3-3zm5 3.5V12h5v-1.5z"/></svg>`,powershell:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#03a9f4" d="M29.07 6H7.677A1.535 1.535 0 0 0 6.24 7.113l-4.2 17.774A.852.852 0 0 0 2.93 26h21.393a1.535 1.535 0 0 0 1.436-1.113L29.96 7.112A.852.852 0 0 0 29.07 6M8.626 23.797a1.4 1.4 0 0 1-1.814-.31l-.007-.009a1.075 1.075 0 0 1 .315-1.599l9.6-6.061-6.102-5.852-.01-.01a1.068 1.068 0 0 1 .084-1.625l.037-.03a1.38 1.38 0 0 1 1.8.07l7.233 6.957a1.1 1.1 0 0 1 .236.739 1.08 1.08 0 0 1-.412.79c-.074.04-.146.119-10.951 6.935ZM24 22.94A1.135 1.135 0 0 1 22.803 24h-5.634a1.061 1.061 0 1 1 .001-2.112h5.633A1.134 1.134 0 0 1 24 22.938Z"/></svg>`,sql:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ffca28" d="M16 24c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-8c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-12C10.477 4 6 4.895 6 6v4c0 1.1 4.475 2 10 2s10-.9 10-2V6c0-1.105-4.477-2-10-2"/></svg>`,yaml:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ff5252" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12c0 1.1-.9 2-2 2H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2m12 16v-2H9v2zm-4-4v-2H6v2z"/></svg>`,markdown:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="m14 10-4 3.5L6 10H4v12h4v-6l2 2 2-2v6h4V10zm12 6v-6h-4v6h-4l6 8 6-8z"/></svg>`,xml:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#8bc34a" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m.12 13.5 3.74 3.74 1.42-1.41-2.33-2.33 2.33-2.33-1.42-1.41zm11.16 0-3.74-3.74-1.42 1.41 2.33 2.33-2.33 2.33 1.42 1.41z"/></svg>`,rust:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ff7043" d="m30 12-4-2V6h-4l-2-4-4 2-4-2-2 4H6v4l-4 2 2 4-2 4 4 2v4h4l2 4 4-2 4 2 2-4h4v-4l4-2-2-4ZM6 16a9.9 9.9 0 0 1 .842-4H10v8H6.842A9.9 9.9 0 0 1 6 16m10 10a9.98 9.98 0 0 1-7.978-4H16v-2h-2v-2h4c.819.819.297 2.308 1.179 3.37a1.89 1.89 0 0 0 1.46.63h3.34A9.98 9.98 0 0 1 16 26m-2-12v-2h4a1 1 0 0 1 0 2Zm11.158 6H24a2.006 2.006 0 0 1-2-2 2 2 0 0 0-2-2 3 3 0 0 0 3-3q0-.08-.004-.161A3.115 3.115 0 0 0 19.83 10H8.022a9.986 9.986 0 0 1 17.136 10"/></svg>`,vue:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#41b883" d="M1.791 3.851 12 21.471 22.209 3.936V3.85H18.24l-6.18 10.616L5.906 3.851z"/><path fill="#35495e" d="m5.907 3.851 6.152 10.617L18.24 3.851h-3.723L12.084 8.03 9.66 3.85z"/></svg>`,mermaid:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="m14 10-4 3.5L6 10H4v12h4v-6l2 2 2-2v6h4V10zm12 6v-6h-4v6h-4l6 8 6-8z"/></svg>`},fallback:`<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ff7043" d="M2 2a1 1 0 0 0-1 1v10c0 .554.446 1 1 1h12c.554 0 1-.446 1-1V3a1 1 0 0 0-1-1zm0 3h12v8H2zm1 2 2 2-2 2 1 1 3-3-3-3zm5 3.5V12h5v-1.5z"/></svg>`,loadExtended:()=>W(()=>Promise.resolve().then(()=>sF).then(e=>e.materialExtendedMap),void 0)},vE=new Map,yE=`material`,bE=new Map,xE=new Map,SE=null;function CE(e){vE.set(e.id,e)}function wE(e){return pE(this,null,function*(){if(bE.has(e.id))return bE.get(e.id)??null;let t=xE.get(e.id);return t||(t=(e.loadExtended?.call(e)??Promise.resolve(null)).then(t=>(bE.set(e.id,t),SE?.(),t)).catch(()=>(bE.set(e.id,null),null)),xE.set(e.id,t)),t})}var TE=null,EE=M(0);SE=()=>{EE.value++},CE(_E);var DE={"":``,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`,txt:`plain`,"c++":`cpp`,"c#":`csharp`,cs:`csharp`,"objective-c":`objectivec`,"objective-c++":`objectivecpp`,yml:`yaml`,md:`markdown`,rs:`rust`,kt:`kotlin`};function OE(e){let t=function(e){if(!e)return``;let t=e.trim();if(!t)return``;let[n]=t.split(/\s+/),[r]=n.split(`:`);return r.toLowerCase()}(e);return DE[t]??t}function kE(e){let t=OE(e);if(!t)return`plaintext`;switch(t){case`plain`:return`plaintext`;case`jsx`:return`javascript`;case`tsx`:return`typescript`;default:return t}}function AE(e){if(TE){let t=TE(e);if(t!=null&&t!==``)return t}return function(e){let t=vE.get(yE);if(!t)return;let n=t.core[e];if(n)return n;let r=bE.get(t.id);if(r){let t=r[e];if(t)return t}t.loadExtended&&!bE.has(t.id)&&wE(t)}(OE(e))||((n=(t=vE.get(yE))?.fallback)??``);var t,n}var jE={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#`,csharp:`C#`,php:`PHP`,sh:`Shell`,bash:`Bash`,sql:`SQL`,yaml:`YAML`,md:`Markdown`,d2:`D2`,d2lang:`D2`,"":`Plain Text`,plain:`Plain Text`},ME=!1;function NE(){return ME}function PE(){ME=!0}var FE=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),IE=null,LE=!1,RE=VE;function zE(e){let t=e?.default??e;return t&&typeof t.renderToString==`function`?t:null}function BE(){try{return zE(globalThis?.katex)}catch{return null}}function VE(){return FE(null,null,function*(){let e=BE();if(e)return e;let t=yield W(()=>import(`./__vite-optional-peer-dep_katex_markstream-vue-Bg9-FXxr.js`),[]);try{yield W(()=>import(`./mhchem_markstream-vue-tp86PqxG.js`),[])}catch{}return zE(t)})}function HE(){return typeof RE==`function`}function UE(){let e=RE;if(!e||e===VE)return null;if(IE)return IE;let t=BE();if(t)return IE=t,IE;try{let t=e();return t&&typeof t?.then!=`function`?(IE=zE(t)??t,IE):null}catch{return null}}function WE(){return FE(this,null,function*(){let e=BE();if(e)return IE=e,IE;if(IE)return IE;if(LE)return null;let t=RE;if(!t)return LE=!0,null;try{let e=yield t();if(e)return IE=zE(e)??e,IE}catch{}return LE=!0,null})}function GE(e){return e?e.replace(/·/g,`⋅`).replace(/℃/g,`°C`):``}var KE=null,qE=null,JE=new Map,YE=new Map,XE=5,ZE=new Set;function QE(){if(JE.size<XE&&ZE.size){let e=Array.from(ZE);ZE.clear();for(let t of e)try{t()}catch{}}}function $E(e,t=!0,n=2e3,r){return FE(this,null,function*(){performance.now();let i=GE(e);if(!HE()){let e=Error(`KaTeX rendering disabled`);return e.name=`KaTeXDisabled`,e.code=`KATEX_DISABLED`,Promise.reject(e)}if(qE)return Promise.reject(qE);let a=`${t?`d`:`i`}:${i}`,o=YE.get(a);if(o)return Promise.resolve(o);let s=KE||(qE=Error(`[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker().`),qE.name=`WorkerInitError`,qE.code=`WORKER_INIT_ERROR`,null);if(!s)return Promise.reject(qE);if(JE.size>=XE){let e=Error(`Worker busy`);return e.name=`WorkerBusy`,e.code=`WORKER_BUSY`,e.busy=!0,e.inFlight=JE.size,e.max=XE,Promise.reject(e)}return new Promise((e,a)=>{if(r?.aborted){let e=Error(`Aborted`);e.name=`AbortError`,a(e);return}let o=Math.random().toString(36).slice(2),c=globalThis.setTimeout(()=>{JE.delete(o);let e=Error(`Worker render timed out`);e.name=`WorkerTimeout`,e.code=`WORKER_TIMEOUT`,a(e),QE()},n);r&&r.addEventListener(`abort`,()=>{globalThis.clearTimeout(c),JE.has(o)&&JE.delete(o);let e=Error(`Aborted`);e.name=`AbortError`,a(e),QE()},{once:!0});let l=e,u=a;JE.set(o,{resolve:e=>{l(e)},reject:e=>{u(e)},timeoutId:c}),s.postMessage({id:o,content:i,displayMode:t})})})}function eD(e,t=!0,n){let r=`${t?`d`:`i`}:${GE(e)}`;if(YE.set(r,n),YE.size>200){let e=YE.keys().next().value;YE.delete(e)}}function tD(e=2e3,t){return JE.size<XE?Promise.resolve():new Promise((n,r)=>{let i,a=!1,o=()=>{a||(a=!0,i&&globalThis.clearTimeout(i),ZE.delete(o),n())};if(ZE.add(o),i=globalThis.setTimeout(()=>{if(a)return;a=!0,ZE.delete(o);let e=Error(`Wait for worker slot timed out`);e.name=`WorkerBusyTimeout`,e.code=`WORKER_BUSY_TIMEOUT`,r(e)},e),queueMicrotask(()=>QE()),t){let e=()=>{if(a)return;a=!0,i&&globalThis.clearTimeout(i),ZE.delete(o);let e=Error(`Aborted`);e.name=`AbortError`,r(e)};t.aborted?e():t.addEventListener(`abort`,e,{once:!0})}})}var nD={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function rD(e){return FE(this,arguments,function*(e,t=!0,n={}){if(!HE()){let e=Error(`KaTeX rendering disabled`);throw e.name=`KaTeXDisabled`,e.code=`KATEX_DISABLED`,e}let r=n.timeout??nD.timeout,i=n.waitTimeout??nD.waitTimeout,a=n.backoffMs??nD.backoffMs,o=n.maxRetries??nD.maxRetries,s=Number.isFinite(o)?Math.max(0,Math.min(Math.floor(o),8)):nD.maxRetries,c=n.signal,l=0;for(;;){if(c?.aborted){let e=Error(`Aborted`);throw e.name=`AbortError`,e}try{return yield $E(e,t,r,c)}catch(e){if(e?.code!==`WORKER_BUSY`||l>=s)throw e;if(l++,yield tD(i,c).catch(()=>{}),c?.aborted){let e=Error(`Aborted`);throw e.name=`AbortError`,e}a>0&&(yield new Promise(e=>globalThis.setTimeout(e,a*l)))}}})}var iD=Object.defineProperty,aD=Object.defineProperties,oD=Object.getOwnPropertyDescriptors,sD=Object.getOwnPropertySymbols,cD=Object.prototype.hasOwnProperty,lD=Object.prototype.propertyIsEnumerable,uD=(e,t,n)=>t in e?iD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dD=(e,t)=>{for(var n in t||={})cD.call(t,n)&&uD(e,n,t[n]);if(sD)for(var n of sD(t))lD.call(t,n)&&uD(e,n,t[n]);return e},fD=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),pD=()=>W(()=>import(`./__vite-optional-peer-dep_mermaid_markstream-vue-cPZl55sA.js`),[]),mD=null,hD=pD;function gD(){return typeof hD==`function`}function _D(e){if(!e)return e;let t=e&&e.default?e.default:e;if(t&&(typeof t.render==`function`||typeof t.parse==`function`||typeof t.initialize==`function`))return t;if(t&&t.mermaidAPI&&(typeof t.mermaidAPI.render==`function`||typeof t.mermaidAPI.parse==`function`)){let e=t.mermaidAPI;return n=dD({},t),r={render:e.render.bind(e),parse:e.parse?e.parse.bind(e):void 0,initialize:n=>typeof t.initialize==`function`?t.initialize(n):e.initialize?e.initialize(n):void 0},aD(n,oD(r))}var n,r;return e.mermaid&&typeof e.mermaid.render==`function`?e.mermaid:t}function vD(e){if(e)try{let t=e?.initialize;e.initialize=n=>{let r=dD({suppressErrorRendering:!0},n||{});return typeof t==`function`?t.call(e,r):e?.mermaidAPI&&typeof e.mermaidAPI.initialize==`function`?e.mermaidAPI.initialize(r):void 0}}catch{}}function yD(){return fD(this,null,function*(){if(mD)return mD;let e=function(){try{return _D(globalThis?.mermaid)}catch{return null}}();if(e)return mD=e,vD(mD),mD;let t=hD;if(!t)return null;let n;try{n=yield t()}catch(e){throw t===pD?Error(`Optional dependency "mermaid" is not installed. Please install it to enable mermaid diagrams.`):e}return n?(mD=_D(n),vD(mD),mD):null})}var bD=null,xD=null,SD=new Map,CD=5,wD=`WORKER_BUSY`,TD=`MERMAID_DISABLED`;function ED(e,t,n=1400){if(!gD()){let e=Error(`Mermaid rendering disabled`);return e.name=`MermaidDisabled`,e.code=TD,Promise.reject(e)}if(xD)return Promise.reject(xD);let r=bD||(xD=Error(`[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker().`),xD.name=`WorkerInitError`,xD.code=`WORKER_INIT_ERROR`,null);if(!r)return Promise.reject(xD);if(SD.size>=CD){let e=Error(`Worker busy`);return e.name=`WorkerBusy`,e.code=wD,e.inFlight=SD.size,e.max=CD,Promise.reject(e)}return new Promise((i,a)=>{let o=Math.random().toString(36).slice(2),s,c=!1,l=()=>{c||(c=!0,s!=null&&globalThis.clearTimeout(s),SD.delete(o))};SD.set(o,{resolve:e=>{l(),i(e)},reject:e=>{l(),a(e)}});try{r.postMessage({id:o,action:e,payload:t})}catch(e){SD.delete(o),a(e);return}s=globalThis.setTimeout(()=>{let e=Error(`Worker call timed out`);e.name=`WorkerTimeout`,e.code=`WORKER_TIMEOUT`;let t=SD.get(o);t&&t.reject(e)},n)})}function DD(e,t,n=1400){return fD(this,null,function*(){try{return yield ED(`canParse`,{code:e,theme:t},n)}catch(e){return Promise.reject(e)}})}function OD(e,t,n=1400){return fD(this,null,function*(){try{return yield ED(`findPrefix`,{code:e,theme:t},n)}catch(e){return Promise.reject(e)}})}function kD(){if(bD)try{for(let[e,t]of SD.entries())t.reject(Error(`Worker terminated`));SD.clear(),bD.terminate()}finally{bD=null}}function AD(e){try{if(typeof globalThis<`u`&&typeof globalThis.requestAnimationFrame==`function`)return globalThis.requestAnimationFrame(e)}catch{}return globalThis.setTimeout(e,0)}function jD(e){try{if(e==null)return;if(typeof globalThis<`u`&&typeof globalThis.cancelAnimationFrame==`function`)return void globalThis.cancelAnimationFrame(e)}catch{}try{globalThis.clearTimeout(e)}catch{}}var MD=Object.defineProperty,ND=Object.defineProperties,PD=Object.getOwnPropertyDescriptors,FD=Object.getOwnPropertySymbols,ID=Object.prototype.hasOwnProperty,LD=Object.prototype.propertyIsEnumerable,RD=(e,t,n)=>t in e?MD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$=(e,t)=>{for(var n in t||={})ID.call(t,n)&&RD(e,n,t[n]);if(FD)for(var n of FD(t))LD.call(t,n)&&RD(e,n,t[n]);return e},zD=(e,t)=>ND(e,PD(t)),BD=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),VD=`__global__`,HD=`__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__`,UD=(()=>{let e=globalThis;if(e[HD])return e[HD];let t={scopedCustomComponents:{},revision:M(0)};return e[HD]=t,t})(),WD=UD.revision,GD=Symbol(`markstreamCustomComponents`),KD=new Set(`text.paragraph.heading.code_block.list.list_item.blockquote.table.table_row.table_cell.definition_list.definition_item.footnote.footnote_reference.footnote_anchor.admonition.hardbreak.link.image.thematic_break.math_inline.math_block.strong.emphasis.strikethrough.highlight.insert.subscript.superscript.emoji.checkbox.checkbox_input.inline_code.html_inline.html_block.reference.mermaid.infographic.d2.vmr_container`.split(`.`));function qD(e){return KD.has(String(e).trim().toLowerCase())}function JD(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,`$1-$2`).replace(/[_\s]+/g,`-`).toLowerCase()}function YD(e={}){let t={};for(let[n,r]of Object.entries(e))if(r!=null){t[n]=r;for(let e of new Set([q_(n),q_(JD(n))]))!e||qD(e)||Object.prototype.hasOwnProperty.call(t,e)||(t[e]=r)}return t}function XD(e){let t=I(GD,null);return R(()=>(WD.value,function(e,t={}){return WD.value,$($($({},YD(UD.scopedCustomComponents[VD]||{})),YD(t)),YD(function(e){return e&&UD.scopedCustomComponents[e]||{}}(e)))}(e?.(),t?.value??{})))}var ZD=[`aria-label`],QD={key:0,xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,class:`checkbox-icon checkbox-unchecked`},$D={key:1,xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,class:`checkbox-icon checkbox-checked`},eO=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},tO=eO(x({__name:`CheckboxNode`,props:{node:{}},setup:e=>(t,n)=>(y(),U(`span`,{class:`checkbox-node`,role:`img`,"aria-label":e.node.checked?`checked`:`unchecked`},[e.node.checked?(y(),U(`svg`,$D,[...n[1]||=[F(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`4`,fill:`currentColor`},null,-1),F(`path`,{d:`M9 12l2 2 4-4`,stroke:`hsl(var(--ms-background))`,"stroke-width":`2.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,-1)]])):(y(),U(`svg`,QD,[...n[0]||=[F(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`4`,stroke:`currentColor`,"stroke-width":`2`},null,-1)]]))],8,ZD))}),[[`__scopeId`,`data-v-be21ab83`]]);tO.install=e=>{e.component(tO.__name,tO)};var nO={class:`emoji-node`},rO=eO(x({__name:`EmojiNode`,props:{node:{}},setup:e=>(t,n)=>(y(),U(`span`,nO,O(e.node.name),1))}),[[`__scopeId`,`data-v-de55dc97`]]);rO.install=e=>{e.component(rO.__name,rO)};var iO=[`id`],aO=[`title`],oO=eO(x({__name:`FootnoteReferenceNode`,props:{node:{}},setup(e){let t=`#fnref--${e.node.id}`;function n(){if(typeof document>`u`)return;let e=document.querySelector(t);e?e.scrollIntoView({behavior:`smooth`}):console.warn(`Element with href: ${t} not found`)}return(r,i)=>(y(),U(`sup`,{id:`fnref-${e.node.id}`,class:`footnote-reference`,onClick:n},[F(`span`,{href:t,title:`查看脚注 ${e.node.id}`,class:`footnote-link cursor-pointer`},`[`+O(e.node.id)+`]`,9,aO)],8,iO))}}),[[`__scopeId`,`data-v-c1463a29`]]);oO.install=e=>{e.component(oO.__name,oO)};var sO=(()=>{try{return!1}catch{}return!1})();function cO(e){sO&&console.warn(e)}function lO(e,t=`safe`,n){return eT(e,t,n)}function uO(e){return iT(e)}function dO(e){return!0===e?``:!1===e?`false`:e==null?null:String(e)}function fO(e,t=`safe`){let n=String(e.tag||e.type||``).trim(),r=nT((i=e.attrs)?Array.isArray(i)?i.every(Array.isArray)?i.map(([e,t])=>[String(e),dO(t)]):i.filter(e=>e&&typeof e==`object`&&!Array.isArray(e)&&`name`in e).map(e=>[String(e.name),dO(e.value)]):Object.entries(i).map(([e,t])=>[e,dO(t)]):null,t,n);var i;if(!r)return;let a=uO(tT(r));return Object.keys(a).length>0?a:void 0}function pO(e,t,n=!1){let r=Object.entries(t??{}),i=r.length>0?r.map(([e,t])=>t===``?` ${e}`:` ${e}="${t}"`).join(``):``;return n?`<${e}${i} />`:`<${e}${i}>`}function mO(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function hO(e,t,n,r,i,a,o=!1){let c=function(e,t){return $w(e,t)}(e,r);if(k_.has(e.toLowerCase())||!c&&Kw(e,a))return null;if(!c&&Gw(e,a))return o?[pO(e,t,!0)]:[pO(e,t),...n,`</${e}>`];let l=eT(t,a,e),u=l.key,d=u!=null&&u!==``?u:i;return c?s(r[e]||r[e.toLowerCase()],zD($({},uO(l)),{key:d}),n.length>0?n:void 0):s(e,zD($({},l),{innerHTML:void 0,key:d}),n.length>0?n:void 0)}function gO(e,t){return lT(e,t)}function _O(e,t,n=`safe`){if(!e)return[];try{return function(e,t,n=`safe`){let r=0,i=[],a=[];for(let o of e)if(o.type===`text`)(i.length>0?i[i.length-1].children:a).push(o.content);else if(o.type===`self_closing`){let e=hO(o.tagName,o.attrs||{},[],t,`ms-html-`+ r++,n,!0);mO(i.length>0?i[i.length-1].children:a,e)}else if(o.type===`tag_open`)i.push({tagName:o.tagName,children:[],attrs:o.attrs,autoKey:`ms-html-`+ r++});else if(o.type===`tag_close`){let e=o.tagName.toLowerCase(),r=-1;for(let t=i.length-1;t>=0;t--)if(i[t].tagName.toLowerCase()===e){r=t;break}if(r!==-1)for(;i.length>r;){let o=i.pop(),s=hO(o.tagName,o.attrs||{},o.children,t,o.autoKey,n);i.length>0?mO(i[i.length-1].children,s):mO(a,s),o.tagName.toLowerCase()!==e&&i.length>r&&cO(`Auto-closing unclosed tag: <${o.tagName}>`)}else cO(`Ignoring closing tag with no matching opening tag: </${o.tagName}>`)}for(;i.length>0;){let e=i.pop(),r=hO(e.tagName,e.attrs||{},e.children,t,e.autoKey,n);i.length>0?mO(i[i.length-1].children,r):mO(a,r),cO(`Auto-closing unclosed tag: <${e.tagName}>`)}return a}(oT(e),t,n)}catch(e){return r=e,sO&&console.error(`Failed to parse HTML to VNodes:`,r),null}var r}var vO=[`innerHTML`],yO=eO(x({__name:`HtmlInlineNode`,props:{node:{},customId:{},htmlPolicy:{}},setup(e){let t=e,n=I(`markstreamHtmlPolicy`,void 0),r=R(()=>t.htmlPolicy??n?.value??`safe`),i=XD(()=>t.customId),a=x({name:`DynamicRenderer`,props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),s=R(()=>{let e=t.node.content;if(!e)return{mode:`html`,content:``};if(r.value===`escape`)return{mode:`html`,content:uT(e,r.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:`text`,content:e};if(t.node.loading&&t.node.autoClosed){let t=_O(e,i.value,r.value);if(t!==null)return{mode:`dynamic`,nodes:t}}if(!gO(e,i.value))return{mode:`html`,content:uT(e,r.value)};let n=_O(e,i.value,r.value);return n===null?{mode:`html`,content:uT(e,r.value)}:{mode:`dynamic`,nodes:n}});return(e,n)=>s.value.mode===`dynamic`?(y(),U(`span`,{key:0,class:z([`html-inline-node`,{"html-inline-node--loading":t.node.loading}])},[o(B(a),{nodes:s.value.nodes},null,8,[`nodes`])],2)):s.value.mode===`text`?(y(),U(`span`,{key:1,class:z([`html-inline-node`,{"html-inline-node--loading":t.node.loading}])},O(s.value.content),3)):(y(),U(`span`,{key:2,class:z([`html-inline-node`,{"html-inline-node--loading":t.node.loading}]),innerHTML:s.value.content},null,10,vO))}}),[[`__scopeId`,`data-v-d17f12b0`]]);yO.install=e=>{e.component(yO.__name,yO)};var bO={class:`inline-code`},xO={key:0},SO=eO(x({__name:`InlineCodeNode`,props:{node:{}},setup(e){let t=e,n=u(),r=I(`markstreamFade`,void 0),i=I(`markstreamTextStreamState`,void 0),a=I(`markstreamStreamVersion`,void 0),o=R(()=>{let e=n.fade;return e===``||!0===e||e===`true`||!1!==e&&e!==`false`&&void 0}),s=R(()=>typeof o.value==`boolean`?o.value:typeof r?.value!=`boolean`||r.value),c=R(()=>String(t.node.code??``)),l=R(()=>!s.value),d=R(()=>{let e=n[`index-key`]??n.indexKey;return e==null||e===``?``:String(e)}),f=V(t.node.code),m=V(``),h=a?.value,g=V(0);function _(){return f.value+m.value}function v(){m.value&&=(f.value=_(),``)}p([()=>t.node.code,d,s,()=>a?.value],([e,t,n,r])=>{let a=String(e??``),o=d.value,c=r!==h;h=r;let l=BT({nextContent:a,persistedContent:o?i?.get(o):void 0,currentState:{settledContent:f.value,streamedDelta:m.value},typewriterEnabled:s.value,streamRenderVersionChanged:c});f.value=l.settledContent,m.value=l.streamedDelta,l.appended&&(g.value+=1),o&&i?.set(o,a)},{immediate:!0}),p(s,e=>{var t;e||(t=_(),f.value=t,m.value=``)});let x=R(()=>g.value%2==0?`inline-code-stream-delta--a`:`inline-code-stream-delta--b`);return(e,t)=>(y(),U(`code`,bO,[l.value?(y(),U(H,{key:0},[b(O(c.value),1)],64)):(y(),U(H,{key:1},[f.value?(y(),U(`span`,xO,O(f.value),1)):D(``,!0),m.value?(y(),U(`span`,{key:1,class:z([`inline-code-stream-delta`,[x.value]]),onAnimationend:v},O(m.value),35)):D(``,!0)],64))]))}}),[[`__scopeId`,`data-v-1b73ee4e`]]);SO.install=e=>{e.component(SO.__name,SO)};var CO=V(!1),wO=V(``),TO=V(`top`),EO=V(null),DO=V(null),OO=V(null),kO=V(null),AO=V(null),jO=null,MO=null,NO=0;function PO(){jO&&=(clearTimeout(jO),null),MO&&=(clearTimeout(MO),null)}var FO=!1,IO=null,LO=!1;function RO(e,t,n=`top`,r=!1,i,a){if(!e)return;let o=++NO;PO();let s=()=>BD(null,null,function*(){if(yield function(){return BD(this,null,function*(){if(!FO&&!LO&&typeof document<`u`){IO??=BD(null,null,function*(){let[{createApp:e,h:t},{default:n}]=yield Promise.all([W(()=>import(`./element-plus-rcpA4EGF.js`).then(e=>e.en),__vite__mapDeps([0,1,2])),W(()=>Promise.resolve().then(()=>nF),void 0)]),r=document.createElement(`div`);r.setAttribute(`data-singleton-tooltip`,`1`),document.body.appendChild(r),e({setup:()=>()=>t(n,{visible:CO.value,"anchor-el":EO.value,content:wO.value,placement:TO.value,id:DO.value,originX:OO.value,originY:kO.value,isDark:AO.value??void 0})}).mount(r),FO=!0});try{yield IO}catch(e){FO=!1,IO=null,LO=!0,console.warn(`[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.`,e)}}})}(),FO&&o===NO){DO.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,EO.value=e,wO.value=t,TO.value=n,OO.value=i?.x??null,kO.value=i?.y??null,AO.value=typeof a==`boolean`?a:null,CO.value=!0;try{e.setAttribute(`aria-describedby`,DO.value)}catch{}}});r?s():jO=setTimeout(s,80)}function zO(e=!1){NO+=1,PO();let t=()=>{if(EO.value&&DO.value)try{EO.value.removeAttribute(`aria-describedby`)}catch{}CO.value=!1,EO.value=null,DO.value=null,OO.value=null,kO.value=null};e?t():MO=setTimeout(t,120)}var BO={"common.copy":`Copy`,"common.copied":`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.minimize":`Minimize`,"common.zoomIn":`Zoom in`,"common.zoomOut":`Zoom out`,"common.resetZoom":`Reset zoom`,"image.loadError":`Image failed to load`,"image.loading":`Loading image...`},VO=e=>BO[e]??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);function HO(e){return{t(t){if(e.te&&BO[t]&&!e.te(t))return VO(t);let n=e.t(t);return n===t&&BO[t]?VO(t):n}}}function UO(){let e=function(){try{let e=c(),t=e?.proxy,n=t?.$t;if(typeof n==`function`){let e=t?.$te;return{t:n.bind(t),te:typeof e==`function`?e.bind(t):void 0}}let r=e?.appContext?.config?.globalProperties,i=r?.$t;if(typeof i==`function`){let e=r?.$te;return{t:i.bind(r),te:typeof e==`function`?e.bind(r):void 0}}}catch{}return null}();if(e)return HO(e);try{let e=globalThis.$vueI18nUse||null;if(e&&typeof e==`function`)try{let t=e();if(t&&typeof t.t==`function`)return HO({t:t.t.bind(t),te:typeof t.te==`function`?t.te.bind(t):void 0})}catch{}}catch{}return{t:VO}}function WO(e,t){let n=e.indexKey??t[`index-key`]??t.indexKey;return n==null||n===``?``:String(n)}var GO=[`src`,`alt`,`title`,`loading`,`fetchpriority`,`decoding`,`tabindex`,`aria-label`],KO={key:1,class:`image-placeholder`},qO={key:1,class:`image-node__raw-text`},JO={key:0,class:`image-shimmer-overlay`},YO={key:1,class:`image-node__raw-text`},XO={key:2,class:`image-error`},ZO=eO(x({__name:`ImageNode`,props:{node:{},fallbackSrc:{default:``},lazy:{type:Boolean,default:!1},usePlaceholder:{type:Boolean,default:!0}},emits:[`load`,`error`,`click`],setup(e,{emit:t}){let n=e,r=t,i=V(!1),a=V(!1),s=V(``),c=V(`primary`),l=V(null),d=u(),f=I(mE,null),m=``,g=null,_=R(()=>V_(n.node.src)),b=R(()=>V_(n.fallbackSrc)),x=R(()=>s.value),S=R(()=>!n.lazy),w=R(()=>!n.node.loading&&c.value!==`failed`&&s.value.length>0),E=R(()=>c.value===`failed`),k=R(()=>!S.value&&!i.value&&!a.value&&c.value!==`failed`&&s.value.length>0),A=R(()=>WO(n,d));function j(e=A.value){e&&l.value&&f?.reportHeight(e,l.value.offsetHeight)}function M(e=A.value){e&&h(()=>{j(e)})}function N(){g&&=(clearTimeout(g),null)}function ee(){let e=A.value;e&&m!==e&&(m&&f?.markSettled(m),N(),m=e,f?.markPending(e),typeof window<`u`&&(g=window.setTimeout(()=>{m===e&&(M(e),te())},8e3)))}function te(){return BD(this,null,function*(){let e=m;e&&(N(),m=``,yield h(),j(e),f?.markSettled(e))})}function P(){if(c.value===`primary`&&b.value&&b.value!==s.value)return c.value=`fallback`,s.value=b.value,i.value=!1,a.value=!1,void M();c.value=`failed`,a.value=!0,r(`error`,s.value),M()}function ne(){i.value=!0,a.value=!1,r(`load`,x.value),M()}function re(e){e.preventDefault(),i.value&&!a.value&&r(`click`,[e,x.value])}let{t:ie}=UO();return p([_,b,()=>n.node.loading],()=>(i.value=!1,a.value=!1,n.node.loading||_.value?(s.value=_.value,void(c.value=`primary`)):b.value?(s.value=b.value,void(c.value=`fallback`)):(s.value=``,c.value=`failed`,void(a.value=!0))),{immediate:!0}),p([w,i,a,x,()=>n.lazy],([e,t,n,r,i])=>e&&r&&!n?t?(te(),void M()):i?(ee(),void M()):void(t||n||ee()):(te(),void M()),{flush:`post`,immediate:!0}),v(()=>{(function(){let e=m;e&&(N(),m=``,f?.markSettled(e))})()}),(t,r)=>(y(),U(`span`,{ref_key:`rootRef`,ref:l,class:`image-node-container`},[w.value?(y(),U(`img`,{key:0,src:x.value,alt:String(n.node.alt??n.node.title??``),title:String(n.node.title??n.node.alt??``),class:z([`image-node__img`,{"is-loading":!S.value&&!i.value,"is-loaded":S.value||i.value,"has-natural-size":i.value,"cursor-pointer":i.value}]),loading:n.lazy?`lazy`:void 0,fetchpriority:S.value?`high`:void 0,decoding:S.value?`sync`:`async`,tabindex:i.value?0:-1,"aria-label":n.node.alt??B(ie)(`image.preview`),onError:P,onLoad:ne,onClick:re},null,42,GO)):D(``,!0),e.node.loading&&!a.value?(y(),U(`span`,KO,[n.usePlaceholder?C(t.$slots,`placeholder`,{key:0,node:n.node,displaySrc:x.value,imageLoaded:i.value,hasError:a.value,fallbackSrc:n.fallbackSrc,lazy:n.lazy},()=>[r[0]||=F(`span`,{class:`image-shimmer`},null,-1)],!0):(y(),U(`span`,qO,O(e.node.raw),1))])):D(``,!0),o(pe,{name:`shimmer-fade`},{default:T(()=>[k.value&&!e.node.loading?(y(),U(`span`,JO,[n.usePlaceholder?C(t.$slots,`placeholder`,{key:0,node:n.node,displaySrc:x.value,imageLoaded:i.value,hasError:a.value,fallbackSrc:n.fallbackSrc,lazy:n.lazy},()=>[r[1]||=F(`span`,{class:`image-shimmer`},null,-1)],!0):(y(),U(`span`,YO,O(e.node.raw),1))])):D(``,!0)]),_:3}),E.value?(y(),U(`span`,XO,[C(t.$slots,`error`,{node:n.node,displaySrc:x.value,imageLoaded:i.value,hasError:a.value,fallbackSrc:n.fallbackSrc,lazy:n.lazy},()=>[r[2]||=F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`},[F(`path`,{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`})],-1),F(`span`,null,O(B(ie)(`image.loadError`)),1)],!0)])):D(``,!0)],512))}}),[[`__scopeId`,`data-v-cbb5c63e`]]);ZO.install=e=>{e.component(ZO.__name,ZO)};var QO={key:2},$O=x({__name:`NodeChildRenderer`,props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){let t=e,n=XD(()=>t.customId),r=I(`markstreamHtmlPolicy`,void 0),i=I(`markstreamNestedRendererProps`,void 0),a=R(()=>r?.value??`safe`),o=R(()=>{let e=i?.value??{};return zD($({},e),{customId:t.customId??e.customId,htmlPolicy:a.value})}),s=ge({loader:()=>Promise.resolve().then(()=>vN),suspensible:!1}),c=R(()=>t.components[String(t.node.type)]),l=R(()=>!!(c.value&&n.value[t.node.type]&&!qD(String(t.node.type)))),u=R(()=>l.value?fO(t.node,a.value):void 0),d=R(()=>Array.isArray(t.node.children)&&t.node.children.length>0),f=R(()=>String(t.node.content??``)),p=R(()=>String(t.node.content??t.node.raw??``));return(t,n)=>c.value&&l.value?(y(),P(S(c.value),ae({key:0},u.value,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":e.customId,"is-dark":o.value.isDark}),{default:T(()=>[d.value?(y(),P(B(s),ae({key:0},o.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`,`index-key`])):f.value?(y(),P(B(s),ae({key:1},o.value,{content:f.value,final:!e.node.loading,"index-key":`${e.indexKey||`child`}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`content`,`final`,`index-key`])):D(``,!0)]),_:1},16,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):c.value?(y(),P(S(c.value),{key:1,node:e.node,"custom-id":e.customId,"index-key":e.indexKey},null,8,[`node`,`custom-id`,`index-key`])):e.fallbackToText?(y(),U(`span`,QO,O(p.value),1)):D(``,!0)}}),ek=[`aria-busy`,`aria-label`,`data-language`,`data-markstream-line-numbers`],tk={key:0,translate:`no`,class:`markstream-pre__diff-code`},nk={class:`markstream-pre__diff-number`,"aria-hidden":`true`},rk={class:`markstream-pre__diff-content`},ik={class:`markstream-pre__diff-content-inner`},ak={key:0,class:`markstream-pre__line-numbers`,"aria-hidden":`true`},ok=[`textContent`],sk=x({__name:`PreCodeNode`,props:{node:{},showLineNumbers:{type:Boolean},diffInline:{type:Boolean},reservedHeightPx:{}},setup(e){let t=e,n=R(()=>{let e=String(t.node?.language??``);return String(String(e).split(/\s+/g)[0]??``).toLowerCase().replace(/[^\w-]/g,``)||`plaintext`}),r=R(()=>`language-${n.value}`),i=R(()=>!0===t.node?.diff?String(t.node?.code??``):function(e,t){let n=String(e??``);return t?n:n.replace(/\r\n$|\n$|\r$/,``)}(t.node?.code,!0===t.node?.loading)),o=R(()=>i.value.split(/\r\n|\n|\r/)),s=R(()=>Array.from({length:Math.max(1,o.value.length)},(e,t)=>t+1)),c=R(()=>!0===t.showLineNumbers&&!0===t.node?.diff),l=R(()=>c.value&&!0===t.diffInline),u=R(()=>{let e=Number(t.reservedHeightPx);if(!Number.isFinite(e)||e<=0)return;let n=`${Math.ceil(e)}px`;return{height:n,minHeight:n,maxHeight:n,overflow:`auto`}});function d(e){return String(e??``).trim().length===0}function f(e,t=`context`,n={}){let r=d(e);return{code:e,kind:r&&t!==`hunk`&&!n.preserveBlankKind?`context`:t,empty:r}}function m(e){let t=String(e??``);return t?t.split(/\r\n|\n|\r/):[]}function g(e,t){return!d(e[t])||t<e.length-1}function _(e){return e.startsWith(`-`)&&!e.startsWith(`---`)}function b(e){return e.startsWith(`+`)&&!e.startsWith(`+++`)}function x(e,t){let n=m(e),r=m(t),i=function(e,t){let n=e.length,r=t.length;if((n+1)*(r+1)>15e5)return null;let i=r+1,a=new Uint32Array((n+1)*(r+1));for(let o=1;o<=n;o++)for(let n=1;n<=r;n++){let r=o*i+n;if(e[o-1]===t[n-1])a[r]=a[(o-1)*i+(n-1)]+1;else{let e=a[(o-1)*i+n],t=a[o*i+(n-1)];a[r]=e>=t?e:t}}let o=[],s=n,c=r;for(;s>0&&c>0;)e[s-1]===t[c-1]?(o.push({originalIndex:s-1,modifiedIndex:c-1}),s--,c--):a[(s-1)*i+c]>=a[s*i+(c-1)]?s--:c--;return o.reverse(),o}(n,r);if(i){let e=[],t=0,a=0;for(let o of i){for(;t<o.originalIndex;)e.push(zD($({},f(n[t],`removed`,{preserveBlankKind:g(n,t)})),{key:`inline-removed-source-${t}`,number:``})),t++;for(;a<o.modifiedIndex;)e.push(zD($({},f(r[a],`added`,{preserveBlankKind:g(r,a)})),{key:`inline-added-source-${a}`,number:a+1})),a++;e.push(zD($({},f(r[o.modifiedIndex])),{key:`inline-context-source-${o.originalIndex}-${o.modifiedIndex}`,number:o.modifiedIndex+1})),t=o.originalIndex+1,a=o.modifiedIndex+1}for(;t<n.length;)e.push(zD($({},f(n[t],`removed`,{preserveBlankKind:g(n,t)})),{key:`inline-removed-source-${t}`,number:``})),t++;for(;a<r.length;)e.push(zD($({},f(r[a],`added`,{preserveBlankKind:g(r,a)})),{key:`inline-added-source-${a}`,number:a+1})),a++;return e}let a=[],o=0,s=n.length-1,c=r.length-1;for(;o<=s&&o<=c&&n[o]===r[o];)a.push(zD($({},f(r[o])),{key:`inline-prefix-${o}`,number:o+1})),o++;let l=[];for(;s>=o&&c>=o&&n[s]===r[c];)l.unshift(zD($({},f(r[c])),{key:`inline-suffix-${c}`,number:c+1})),s--,c--;for(let e=o;e<=s;e++)a.push(zD($({},f(n[e],`removed`,{preserveBlankKind:g(n,e)})),{key:`inline-removed-source-${e}`,number:``}));for(let e=o;e<=c;e++)a.push(zD($({},f(r[e],`added`,{preserveBlankKind:g(r,e)})),{key:`inline-added-source-${e}`,number:e+1}));return a.concat(l)}let S=R(()=>{let e=function(e){let r=e.some(e=>_(e)),i=e.some(e=>b(e));return r&&i||function(){if(n.value===`diff`)return!0;let e=String(t.node?.raw??``).split(/\r?\n/,1)[0]?.trim()??``;return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(e)}()&&(r||i)}(o.value),r=function(){return t.node?.originalCode!=null||t.node?.updatedCode!=null}();if(l.value)return[{key:`inline`,className:`markstream-pre__diff-pane--inline`,lines:e?function(e){let t=[],n=1;for(let[r,i]of e.entries())if(i.startsWith(`@@`))t.push(zD($({},f(i,`hunk`)),{key:`inline-hunk-${r}`,number:``}));else if(_(i))t.push(zD($({},f(i.slice(1),`removed`,{preserveBlankKind:!0})),{key:`inline-removed-${r}`,number:``}));else if(b(i))t.push(zD($({},f(i.slice(1),`added`,{preserveBlankKind:!0})),{key:`inline-added-${r}`,number:n++}));else{let e=i.startsWith(` `)?i.slice(1):i;t.push(zD($({},f(e)),{key:`inline-context-${r}`,number:n})),n++}return t}(o.value):x(t.node?.originalCode,t.node?.updatedCode)}];if(!e&&r){let e=m(t.node?.originalCode),n=m(t.node?.updatedCode);return[{key:`original`,className:`markstream-pre__diff-pane--original`,lines:e.map((t,r)=>zD($({},f(t,n[r]===t?`context`:`removed`,{preserveBlankKind:g(e,r)})),{key:`original-${r}`,number:r+1}))},{key:`modified`,className:`markstream-pre__diff-pane--modified`,lines:n.map((t,r)=>zD($({},f(t,e[r]===t?`context`:`added`,{preserveBlankKind:g(n,r)})),{key:`modified-${r}`,number:r+1}))}]}let i=[],a=[];for(let e of o.value)if(e.startsWith(`@@`))i.push(f(e,`hunk`)),a.push(f(e,`hunk`));else if(e.startsWith(`-`)&&!e.startsWith(`---`))i.push(f(e.slice(1),`removed`,{preserveBlankKind:!0}));else if(e.startsWith(`+`)&&!e.startsWith(`+++`))a.push(f(e.slice(1),`added`,{preserveBlankKind:!0}));else{let t=e.startsWith(` `)?e.slice(1):e;i.push(f(t)),a.push(f(t))}return[{key:`original`,className:`markstream-pre__diff-pane--original`,lines:i.map((e,t)=>zD($({},e),{key:`original-${t}`,number:t+1}))},{key:`modified`,className:`markstream-pre__diff-pane--modified`,lines:a.map((e,t)=>zD($({},e),{key:`modified-${t}`,number:t+1}))}]}),C=R(()=>{let e=n.value;return e?`Code block: ${e}`:`Code block`}),w=V(null),T=V([]),E=null,k=null;function A(e){let t=Number.parseFloat(String(e??``));return Number.isFinite(t)&&t>0?t:0}function j(e,t){if(!e)return t;let n=e.querySelector(`.markstream-pre__diff-content`)?.getBoundingClientRect()?.height??0;return Math.max(t,Math.ceil(n))}function M(){typeof window<`u`&&(E!=null&&window.cancelAnimationFrame(E),E=window.requestAnimationFrame(()=>{(function(){E=null;let e=w.value;if(!e||!c.value)return void(T.value.length&&(T.value=[]));let t=function(e){let t=window.getComputedStyle(e),n=A(t.getPropertyValue(`--markstream-pre-diff-line-height`));if(n>0)return n;let r=A(t.lineHeight);return r>0?r:18}(e),n=Array.from(e.querySelectorAll(`.markstream-pre__diff-pane--original .markstream-pre__diff-line`)),r=Array.from(e.querySelectorAll(`.markstream-pre__diff-pane--modified .markstream-pre__diff-line`)),i=Math.max(n.length,r.length),a=[];for(let e=0;e<i;e++){let i=j(n[e]??null,t),o=j(r[e]??null,t),s=Math.max(t,i,o);a.push({rowHeight:s,originalHeight:i,modifiedHeight:o})}var o=T.value,s=a;o.length===s.length&&o.every((e,t)=>{let n=s[t];return n&&Math.abs(e.rowHeight-n.rowHeight)<=.5&&Math.abs(e.originalHeight-n.originalHeight)<=.5&&Math.abs(e.modifiedHeight-n.modifiedHeight)<=.5})||(T.value=a)})()}))}function N(e){k?.disconnect(),k=null,e&&c.value&&typeof ResizeObserver<`u`&&(k=new ResizeObserver(()=>{M()}),k.observe(e))}function ee(e,t){let n=T.value[e];if(!n)return;let r=t===`original`?n.originalHeight:n.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(n.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(r)}px`}}return p(w,e=>{N(e),h(()=>M())},{flush:`post`}),p([c,S],()=>{N(w.value),h(()=>M())},{flush:`post`,immediate:!0}),v(()=>{E!=null&&(window.cancelAnimationFrame(E),E=null),k?.disconnect(),k=null}),(o,d)=>(y(),U(`pre`,{ref_key:`preRef`,ref:w,style:ne(u.value),class:z([r.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":c.value,"markstream-pre--diff-inline":l.value}]),"aria-busy":!0===e.node.loading,"aria-label":C.value,"data-language":n.value,"data-markstream-line-numbers":t.showLineNumbers?`1`:void 0,"data-markstream-pre":`1`,tabindex:`0`},[c.value?(y(),U(`code`,tk,[(y(!0),U(H,null,a(S.value,e=>(y(),U(`span`,{key:e.key,class:z([`markstream-pre__diff-pane`,e.className])},[(y(!0),U(H,null,a(e.lines,(t,n)=>(y(),U(`span`,{key:t.key,class:z([`markstream-pre__diff-line`,[`markstream-pre__diff-line--${t.kind}`,{"markstream-pre__diff-line--empty":t.empty}]]),style:ne(ee(n,e.key))},[d[0]||=F(`span`,{class:`markstream-pre__diff-rail`,"aria-hidden":`true`},null,-1),F(`span`,nk,O(t.number),1),F(`span`,rk,[F(`span`,ik,O(t.code),1)])],6))),128))],2))),128))])):(y(),U(H,{key:1},[t.showLineNumbers?(y(),U(`span`,ak,[(y(!0),U(H,null,a(s.value,e=>(y(),U(`span`,{key:e,class:`markstream-pre__line-number`},O(e),1))),128))])):D(``,!0),F(`code`,{translate:`no`,class:`markstream-pre__code`,textContent:O(i.value)},null,8,ok)],64))],14,ek))}});sk.install=e=>{e.component(sk.__name,sk)};var ck=M(!1),lk=null,uk={key:0},dk=eO(x({__name:`TextNode`,props:{node:{}},emits:[`copy`],setup(e){let t=e,n=(lk||=WE().then(e=>{ck.value=!!e}).catch(()=>{ck.value=!1}),le(ck)),r=u(),i=I(`markstreamFade`,void 0),a=I(`markstreamTextStreamState`,void 0),o=I(`markstreamStreamVersion`,void 0),s=R(()=>{let e=r.fade;return e===``||!0===e||e===`true`||!1!==e&&e!==`false`&&void 0}),c=R(()=>typeof s.value==`boolean`?s.value:typeof i?.value!=`boolean`||i.value),l=R(()=>{let e=r[`index-key`]??r.indexKey;return e==null||e===``?``:String(e)}),d=V(t.node.content),f=V(``),m=o?.value,h=V(0);function g(){return d.value+f.value}function _(){f.value&&=(d.value=g(),``)}p([()=>t.node.content,l,c,()=>o?.value],([e,t,n,r])=>{let i=String(e??``),o=l.value,s=r!==m;m=r;let u=BT({nextContent:i,persistedContent:o?a?.get(o):void 0,currentState:{settledContent:d.value,streamedDelta:f.value},typewriterEnabled:c.value,streamRenderVersionChanged:s});d.value=u.settledContent,f.value=u.streamedDelta,u.appended&&(h.value+=1),o&&a?.set(o,i)},{immediate:!0}),p(c,e=>{var t;e||(t=g(),d.value=t,f.value=``)});let v=R(()=>h.value%2==0?`text-node-stream-delta--a`:`text-node-stream-delta--b`);return(t,r)=>(y(),U(`span`,{class:z([[B(n)&&e.node.center?`text-node-center`:``],`text-node`])},[d.value?(y(),U(`span`,uk,O(d.value),1)):D(``,!0),f.value?(y(),U(`span`,{key:1,class:z([`text-node-stream-delta`,[v.value]]),onAnimationend:_},O(f.value),35)):D(``,!0)],2))}}),[[`__scopeId`,`data-v-aae85f13`]]);dk.install=e=>{e.component(dk.__name,dk)};var fk=x({name:`CodeBlockNodeLoading`,inheritAttrs:!1,setup(e,{attrs:t}){let n=t;return()=>s(sk,zD($({},t),{node:n.node,showLineNumbers:!0,reservedHeightPx:n.estimatedHeightPx??n.estimatedContentHeightPx,class:[`code-pre-fallback`,t.class],"data-markstream-code-loading":`1`}))}}),pk=ge({loader:()=>BD(null,null,function*(){try{return(yield W(()=>Promise.resolve().then(()=>SP),void 0)).default}catch(e){return console.warn(`[markstream-vue] Optional peer dependencies for CodeBlockNode are missing. Falling back to preformatted code rendering (no Monaco). To enable full code block features, please install "stream-monaco".`,e),sk}}),loadingComponent:fk,delay:0,suspensible:!1}),mk=ge(()=>BD(null,null,function*(){if(function(){return Reflect.get(globalThis,`process`)?.env}()?.NODE_ENV===`test`&&typeof window<`u`)return e=>s(dk,zD($({},e),{node:{type:`text`,content:e.node.raw??`$${e.node.content??``}$`,raw:e.node.raw??`$${e.node.content??``}$`}}));try{if(yield WE())return(yield W(()=>Promise.resolve().then(()=>NI),void 0)).default}catch(e){console.warn(`[markstream-vue] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".`,e)}return e=>s(dk,zD($({},e),{node:{type:`text`,content:e.node.raw??`$${e.node.content??``}$`,raw:e.node.raw??`$${e.node.content??``}$`}}))})),hk=ge(()=>BD(null,null,function*(){try{if(yield WE())return(yield W(()=>Promise.resolve().then(()=>EI),void 0)).default}catch(e){console.warn(`[markstream-vue] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".`,e)}return e=>s(dk,zD($({},e),{node:{type:`text`,content:e.node.raw??`$$${e.node.content??``}$$`,raw:e.node.raw??`$$${e.node.content??``}$$`}}))})),gk=eO(x({__name:`ReferenceNode`,props:{node:{},messageId:{},threadId:{}},emits:[`click`,`mouseEnter`,`mouseLeave`],setup:e=>(t,n)=>(y(),U(`span`,{class:`reference-node cursor-pointer text-xs rounded-md px-1.5 mx-0.5`,role:`button`,tabindex:`0`,onClick:n[0]||=n=>t.$emit(`click`,n,e.node.id,e.messageId,e.threadId),onMouseenter:n[1]||=n=>t.$emit(`mouseEnter`,n,e.node.id,e.messageId,e.threadId),onMouseleave:n[2]||=n=>t.$emit(`mouseLeave`,n,e.node.id,e.messageId,e.threadId)},O(e.node.id),33))}),[[`__scopeId`,`data-v-775c65e4`]]);gk.install=e=>{e.component(gk.__name,gk)};var _k={class:`superscript-node`},vk=eO(x({__name:`SuperscriptNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=XD(()=>t.customId),r=R(()=>$({text:dk,inline_code:SO,link:kk,html_inline:yO,strong:Sk,emphasis:Fk,footnote_reference:oO,strikethrough:wk,highlight:Nk,insert:jk,subscript:bk,emoji:rO,math_inline:mk,reference:gk},n.value));return(n,i)=>(y(),U(`sup`,_k,[(y(!0),U(H,null,a(e.node.children,(n,i)=>(y(),P(B($O),{key:`${e.indexKey||`superscript`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`superscript`}-${i}`,"fallback-to-text":``},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-24160b22`]]);vk.install=e=>{e.component(vk.__name,vk)};var yk={class:`subscript-node`},bk=eO(x({__name:`SubscriptNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=XD(()=>t.customId),r=R(()=>$({text:dk,inline_code:SO,link:kk,html_inline:yO,strong:Sk,emphasis:Fk,footnote_reference:oO,strikethrough:wk,highlight:Nk,insert:jk,superscript:vk,emoji:rO,math_inline:mk,reference:gk},n.value));return(n,i)=>(y(),U(`sub`,yk,[(y(!0),U(H,null,a(e.node.children,(n,i)=>(y(),P(B($O),{key:`${e.indexKey||`subscript`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`subscript`}-${i}`,"fallback-to-text":``},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-197fa13b`]]);bk.install=e=>{e.component(bk.__name,bk)};var xk={class:`strong-node`},Sk=eO(x({__name:`StrongNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=XD(()=>t.customId),r=R(()=>$({text:dk,inline_code:SO,link:kk,html_inline:yO,emphasis:Fk,strikethrough:wk,highlight:Nk,insert:jk,subscript:bk,superscript:vk,emoji:rO,footnote_reference:oO,math_inline:mk,reference:gk},n.value));return(n,i)=>(y(),U(`strong`,xk,[(y(!0),U(H,null,a(e.node.children,(n,i)=>(y(),P(B($O),{key:`${e.indexKey||`strong`}-${i}`,components:r.value,node:n,"index-key":`${e.indexKey||`strong`}-${i}`,"custom-id":t.customId},null,8,[`components`,`node`,`index-key`,`custom-id`]))),128))]))}}),[[`__scopeId`,`data-v-a8647104`]]);Sk.install=e=>{e.component(Sk.__name,Sk)};var Ck={class:`strikethrough-node`},wk=eO(x({__name:`StrikethroughNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=XD(()=>t.customId),r=R(()=>$({text:dk,inline_code:SO,link:kk,html_inline:yO,strong:Sk,emphasis:Fk,highlight:Nk,insert:jk,subscript:bk,superscript:vk,emoji:rO,footnote_reference:oO,math_inline:mk,reference:gk},n.value));return(n,i)=>(y(),U(`del`,Ck,[(y(!0),U(H,null,a(e.node.children,(n,i)=>(y(),P(B($O),{key:`${e.indexKey||`strikethrough`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`strikethrough`}-${i}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-b7a531fa`]]);wk.install=e=>{e.component(wk.__name,wk)};var Tk=[`href`,`title`,`aria-label`,`aria-hidden`,`target`,`rel`],Ek=[`aria-hidden`],Dk={class:`link-text-wrapper relative inline-flex`},Ok={class:`leading-[normal] link-text`},kk=eO(x({__name:`LinkNode`,props:{node:{},indexKey:{},customId:{},showTooltip:{type:Boolean,default:!0},color:{},underlineHeight:{},underlineBottom:{},animationDuration:{},animationOpacity:{},animationTiming:{},animationIteration:{}},setup(e){let t=e,n=I(`markstreamShowTooltips`,void 0),r=R(()=>{let e=n?.value;return typeof e==`boolean`?e:t.showTooltip}),i=R(()=>{let e=t.underlineBottom===void 0?`-3px`:typeof t.underlineBottom==`number`?`${t.underlineBottom}px`:String(t.underlineBottom),n=t.animationOpacity??.35,r=Math.max(.12,Math.min(.5*n,n)),i={"--underline-height":`${t.underlineHeight??2}px`,"--underline-bottom":e,"--underline-opacity":String(n),"--underline-rest-opacity":String(r),"--underline-duration":`${t.animationDuration??1.6}s`,"--underline-timing":t.animationTiming??`ease-in-out`,"--underline-iteration":typeof t.animationIteration==`number`?String(t.animationIteration):t.animationIteration??`infinite`};return t.color&&(i[`--link-color`]=t.color),i}),s=XD(()=>t.customId),c=R(()=>$({text:dk,strong:Sk,strikethrough:wk,emphasis:Fk,image:ZO,html_inline:yO,inline_code:SO},s.value)),l=u(),d=R(()=>{let e=t.node?.attrs;if(!e||typeof e!=`object`)return{};let n={};if(Array.isArray(e))for(let t of e)Array.isArray(t)&&t[0]&&(n[String(t[0])]=String(t[1]??``));else for(let[t,r]of Object.entries(e))t&&r!=null&&!1!==r&&(n[t]=!0===r?``:String(r));return lO(n,`safe`,`a`)}),f=R(()=>$($({},l),d.value)),p=R(()=>lO({href:String(t.node?.href??``)},`safe`,`a`).href),m=R(()=>{if(!p.value)return;let e=f.value.target;return(typeof e==`string`?e.trim():String(e??``).trim())||(z_(p.value)?`_blank`:void 0)}),h=R(()=>String(m.value??``).trim().toLowerCase()===`_blank`),g=R(()=>{if(!p.value)return;let e=f.value.rel,t=new Set((typeof e==`string`?e:String(e??``)).split(/\s+/).filter(Boolean)),n=new Set(Array.from(t).filter(e=>e.toLowerCase()!==`opener`));return h.value&&(n.add(`noopener`),n.add(`noreferrer`)),n.size>0?Array.from(n).join(` `):void 0}),_=R(()=>{let e=$({},f.value);return delete e.title,delete e.href,delete e.target,delete e.rel,e});function v(){r.value&&zO()}let b=R(()=>{let e=t.node?.title;return typeof e==`string`&&e.trim().length>0?e:String(p.value??``)});return(n,s)=>e.node.loading?(y(),U(`span`,ae({key:1,class:`link-loading inline-flex items-baseline gap-1.5`,"aria-hidden":e.node.loading?`false`:`true`},B(l),{style:i.value}),[F(`span`,Dk,[F(`span`,Ok,[o(B(dk),{class:`leading-[normal] link-text`,node:{type:`text`,content:String(e.node.text??``),raw:String(e.node.text??``)},"index-key":`${e.indexKey||`link-text`}-loading`},null,8,[`node`,`index-key`])]),s[1]||=F(`span`,{class:`link-loading-indicator`,"aria-hidden":`true`},null,-1)])],16,Ek)):(y(),U(`a`,ae({key:0,class:`link-node`,href:p.value,title:r.value?``:b.value,"aria-label":`Link: ${b.value}`,"aria-hidden":e.node.loading?`true`:`false`,target:m.value,rel:g.value},_.value,{style:i.value,onMouseenter:s[0]||=e=>function(e){if(!r.value)return;let n=e,i=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0,a=t.node?.title||(p.value?.includes(`xn--`)&&(t.node?.text)?.includes(`://`)?t.node.text:p.value)||``;RO(e.currentTarget,a,`top`,!1,i)}(e),onMouseleave:v}),[(y(!0),U(H,null,a(e.node.children,(n,r)=>(y(),P(B($O),{key:`${e.indexKey||`emphasis`}-${r}`,components:c.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`link-text`}-${r}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))],16,Tk))}}),[[`__scopeId`,`data-v-367e6ca4`]]);kk.install=e=>{e.component(kk.__name,kk)};var Ak={class:`insert-node`},jk=eO(x({__name:`InsertNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=XD(()=>t.customId),r=R(()=>$({text:dk,inline_code:SO,link:kk,html_inline:yO,strong:Sk,emphasis:Fk,strikethrough:wk,highlight:Nk,subscript:bk,superscript:vk,emoji:rO,footnote_reference:oO,math_inline:mk,reference:gk},n.value));return(n,i)=>(y(),U(`ins`,Ak,[(y(!0),U(H,null,a(e.node.children,(n,i)=>(y(),P(B($O),{key:`${e.indexKey||`insert`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`insert`}-${i}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-1e2c29d4`]]);jk.install=e=>{e.component(jk.__name,jk)};var Mk={class:`highlight-node`},Nk=eO(x({__name:`HighlightNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=XD(()=>t.customId),r=R(()=>$({text:dk,inline_code:SO,link:kk,html_inline:yO,strong:Sk,emphasis:Fk,strikethrough:wk,insert:jk,subscript:bk,superscript:vk,emoji:rO,footnote_reference:oO,math_inline:mk,reference:gk},n.value));return(n,i)=>(y(),U(`mark`,Mk,[(y(!0),U(H,null,a(e.node.children,(n,i)=>(y(),P(B($O),{key:`${e.indexKey||`highlight`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`highlight`}-${i}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-7a62982a`]]);Nk.install=e=>{e.component(Nk.__name,Nk)};var Pk={class:`emphasis-node`},Fk=eO(x({__name:`EmphasisNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=XD(()=>t.customId),r=R(()=>$({text:dk,inline_code:SO,link:kk,html_inline:yO,strong:Sk,strikethrough:wk,highlight:Nk,insert:jk,subscript:bk,superscript:vk,emoji:rO,footnote_reference:oO,math_inline:mk,reference:gk},n.value));return(n,i)=>(y(),U(`em`,Pk,[(y(!0),U(H,null,a(e.node.children,(n,i)=>(y(),P(B($O),{key:`${e.indexKey||`emphasis`}-${i}`,components:r.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`emphasis`}-${i}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))]))}}),[[`__scopeId`,`data-v-2a5aafbf`]]);Fk.install=e=>{e.component(Fk.__name,Fk)};var Ik={class:`hard-break`},Lk=eO(x({__name:`HardBreakNode`,props:{node:{}},setup:e=>(e,t)=>(y(),U(`br`,Ik))}),[[`__scopeId`,`data-v-50c58f70`]]);Lk.install=e=>{e.component(Lk.__name,Lk)};var Rk=x({__name:`SimpleInlineRenderer`,props:{nodes:{},customId:{},indexKey:{}},setup(e){let t=e,n=de({checkbox:tO,checkbox_input:tO,emoji:rO,emphasis:Fk,hardbreak:Lk,highlight:Nk,inline_code:SO,insert:jk,link:kk,reference:gk,strikethrough:wk,strong:Sk,subscript:bk,superscript:vk,text:dk}),r=XD(()=>t.customId),i=R(()=>{let e=r.value;return Object.keys(e).length>0?$($({},n),e):n});return(n,r)=>(y(!0),U(H,null,a(e.nodes,(n,r)=>(y(),P(B($O),{key:r,components:i.value,node:n,"custom-id":t.customId,"index-key":`${e.indexKey||`inline`}-${r}`},null,8,[`components`,`node`,`custom-id`,`index-key`]))),128))}});function zk(e){if(!e||typeof e!=`object`)return!1;let t=`|${e.type}|`;if(!`|checkbox|checkbox_input|emoji|emphasis|hardbreak|highlight|inline_code|insert|link|reference|strikethrough|strong|subscript|superscript|text|`.includes(t))return!1;if(!`|emphasis|highlight|insert|link|strikethrough|strong|subscript|superscript|`.includes(t))return!0;let n=e.children;return Array.isArray(n)&&n.every(zk)}function Bk(e,t=!0,n=!1){if(!e||!n&&e.length===0)return null;if(e.every(zk))return e;if(!t||e.length!==1)return null;let r=e[0];if(r?.type!==`paragraph`||!Array.isArray(r.children))return null;let i=r.children;return(n||i.length>0)&&i.every(zk)?i:null}function Vk(e){if(!e?.length)return null;let t=``;for(let n of e){if(n?.type!==`text`||!0===n.center)return null;t+=String(n.content??n.raw??``)}return t}var Hk=[`cite`],Uk={key:0,dir:`auto`,class:`paragraph-node`},Wk=[`custom-id`],Gk=eO(x({__name:`BlockquoteNode`,props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:[`copy`],setup(e){let t=e,n=XD(()=>t.customId),r=R(()=>!!n.value.paragraph),i=R(()=>!!n.value.text),a=R(()=>Bk(t.node.children,!r.value)),o=R(()=>!1!==t.fade||i.value?null:Vk(a.value));return ve(`markstreamShowTooltips`,R(()=>t.showTooltips)),ve(`markstreamFade`,R(()=>t.fade)),(n,r)=>(y(),U(`blockquote`,{class:`blockquote blockquote-node`,dir:`auto`,cite:e.node.cite},[a.value?(y(),U(`p`,Uk,[o.value===null?(y(),P(B(Rk),{key:1,nodes:a.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,[`nodes`,`custom-id`,`index-key`])):(y(),U(`span`,{key:0,class:`text-node`,"custom-id":t.customId},O(o.value),9,Wk))])):(y(),P(B(_N),{key:1,"show-tooltips":t.showTooltips,"index-key":`blockquote-${t.indexKey}`,nodes:t.node.children||[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:r[0]||=e=>n.$emit(`copy`,e)},null,8,[`show-tooltips`,`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`]))],8,Hk))}}),[[`__scopeId`,`data-v-abfecebc`]]);Gk.install=e=>{e.component(Gk.__name,Gk)};var Kk={class:`definition-list`},qk={class:`definition-term`},Jk={class:`definition-desc`},Yk=eO(x({__name:`DefinitionListNode`,props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:[`copy`],setup(e){let t=e;return(e,n)=>(y(),U(`dl`,Kk,[(y(!0),U(H,null,a(t.node.items,(r,i)=>(y(),U(H,{key:i},[F(`dt`,qk,[o(B(_N),{"index-key":`definition-term-${t.indexKey}-${i}`,nodes:r.term,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:n[0]||=t=>e.$emit(`copy`,t)},null,8,[`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`])]),F(`dd`,Jk,[o(B(_N),{"index-key":`definition-desc-${t.indexKey}-${i}`,nodes:r.definition,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:n[1]||=t=>e.$emit(`copy`,t)},null,8,[`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`])])],64))),128))]))}}),[[`__scopeId`,`data-v-4e103b30`]]);Yk.install=e=>{e.component(Yk.__name,Yk)};var Xk=[`href`,`title`],Zk=eO(x({__name:`FootnoteAnchorNode`,props:{node:{}},setup(e){let t=e;function n(e){if(e.preventDefault(),typeof document>`u`)return;let n=`fnref-${String(t.node.id??``)}`,r=document.getElementById(n);r&&r.scrollIntoView({behavior:`smooth`,block:`center`})}return(t,r)=>(y(),U(`a`,{class:`footnote-anchor text-sm hover:underline cursor-pointer`,href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n},` ↩︎ `,8,Xk))}}),[[`__scopeId`,`data-v-e1eb37b6`]]);Zk.install=e=>{e.component(Zk.__name,Zk)};var Qk=[`id`],$k={class:`flex-1`},eA=x({__name:`FootnoteNode`,props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:[`copy`],setup(e){let t=e;return(n,r)=>(y(),U(`div`,{id:`fnref--${e.node.id}`,class:`footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border)] pt-2`},[F(`div`,$k,[o(B(_N),{"index-key":`footnote-${t.indexKey}`,nodes:t.node.children,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:r[0]||=e=>n.$emit(`copy`,e)},null,8,[`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`])])],8,Qk))}});eA.install=e=>{e.component(eA.__name,eA)};var tA=[`custom-id`],nA=eO(x({__name:`HeadingNode`,props:{node:{},customId:{},indexKey:{}},setup(e){let t=e,n=XD(()=>t.customId),r=I(`markstreamFade`,void 0),i=R(()=>!1!==r?.value||n.value.text?null:Vk(t.node.children)),o=R(()=>$({text:dk,inline_code:SO,link:kk,image:ZO,strong:Sk,emphasis:Fk,strikethrough:wk,highlight:Nk,insert:jk,subscript:bk,superscript:vk,emoji:rO,checkbox:tO,checkbox_input:tO,footnote_reference:oO,hardbreak:Lk,math_inline:mk,reference:gk},n.value));return(n,r)=>(y(),P(S(`h${e.node.level}`),ae({class:[`heading-node`,[`heading-${e.node.level}`]],dir:`auto`},e.node.attrs),{default:T(()=>[i.value===null?(y(!0),U(H,{key:1},a(e.node.children,(n,r)=>(y(),P(B($O),{key:r,components:o.value,"custom-id":t.customId,node:n,"index-key":`${e.indexKey||`heading`}-${r}`},null,8,[`components`,`custom-id`,`node`,`index-key`]))),128)):(y(),U(`span`,{key:0,class:`text-node`,"custom-id":t.customId},O(i.value),9,tA))]),_:1},16,[`class`]))}}),[[`__scopeId`,`data-v-7122dbe1`]]),rA=nA;rA.install=e=>{e.component(nA.__name,nA)};var iA={key:0,dir:`auto`,class:`paragraph-node`},aA=[`custom-id`],oA={dir:`auto`,class:`paragraph-node`},sA=[`custom-id`],cA=eO(x({__name:`ListItemNode`,props:{node:{},item:{},indexKey:{},customId:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},value:{},isDark:{type:Boolean}},emits:[`copy`],setup(e){let t=e,n=R(()=>t.node??t.item),r=XD(()=>t.customId),i=R(()=>!!r.value.paragraph),o=R(()=>!!r.value.text),s=R(()=>Bk(n.value?.children,!i.value)),c=R(()=>{if(i.value)return null;let e=n.value?.children;if(!Array.isArray(e)||e.length<2)return null;let t=e[0];if(t?.type!==`paragraph`||!Array.isArray(t.children))return null;let r=e.slice(1);if(!r.every(e=>e?.type===`list`))return null;let a=Bk([t]);return a?{paragraphChildren:a,nestedLists:r}:null});function l(){return!1===t.fade&&!o.value}let u=R(()=>l()?Vk(s.value):null),d=R(()=>l()?Vk(c.value?.paragraphChildren):null),f=Object.freeze({}),p=R(()=>{let{value:e}=t;return typeof e==`number`&&Number.isFinite(e)?{value:e}:f});return ve(`markstreamShowTooltips`,R(()=>t.showTooltips)),ve(`markstreamFade`,R(()=>t.fade)),(e,r)=>(y(),U(`li`,ae({class:`list-item`,dir:`auto`},p.value),[s.value?(y(),U(`p`,iA,[u.value===null?(y(),P(B(Rk),{key:1,nodes:s.value,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,[`nodes`,`custom-id`,`index-key`])):(y(),U(`span`,{key:0,class:`text-node`,"custom-id":t.customId},O(u.value),9,aA))])):c.value?(y(),U(H,{key:1},[F(`p`,oA,[d.value===null?(y(),P(B(Rk),{key:1,nodes:c.value.paragraphChildren,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,[`nodes`,`custom-id`,`index-key`])):(y(),U(`span`,{key:0,class:`text-node`,"custom-id":t.customId},O(d.value),9,sA))]),(y(!0),U(H,null,a(c.value.nestedLists,(n,i)=>(y(),P(B(_N),{key:i,nodes:[n],"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-nested-${i}`,"show-tooltips":t.showTooltips,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0,onCopy:r[0]||=t=>e.$emit(`copy`,t)},null,8,[`nodes`,`custom-id`,`index-key`,`show-tooltips`,`typewriter`,`fade`,`is-dark`]))),128))],64)):(y(),P(B(_N),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:n.value?.children??[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:r[1]||=t=>e.$emit(`copy`,t)},null,8,[`show-tooltips`,`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`,`is-dark`]))],16))}}),[[`__scopeId`,`data-v-617214f9`]]);cA.install=e=>{e.component(cA.__name,cA)};var lA=eO(x({__name:`ListNode`,props:{node:{},customId:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},isDark:{type:Boolean}},emits:[`copy`],setup(e){let t=XD(()=>e.customId),n=R(()=>t.value.list_item||cA);return(t,r)=>(y(),P(S(e.node.ordered?`ol`:`ul`),{class:z([`list-node`,{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:T(()=>[(y(!0),U(H,null,a(e.node.items,(i,a)=>(y(),P(S(n.value),ae({key:`${e.indexKey||`list`}-${a}`},{ref_for:!0},{showTooltips:e.showTooltips},{node:i,"custom-id":e.customId,"index-key":`${e.indexKey||`list`}-${a}`,typewriter:e.typewriter,fade:e.fade,"is-dark":e.isDark,value:e.node.ordered?(e.node.start??1)+a:void 0,onCopy:r[0]||=e=>t.$emit(`copy`,e)}),null,16,[`node`,`custom-id`,`index-key`,`typewriter`,`fade`,`is-dark`,`value`]))),128))]),_:1},8,[`class`]))}}),[[`__scopeId`,`data-v-99cb95e0`]]);lA.install=e=>{e.component(lA.__name,lA)};var uA=Symbol(`ViewportPriority`);function dA(e,t){let n=typeof window<`u`&&typeof document<`u`,r=typeof t==`boolean`?V(t):t,i=n?window.requestIdleCallback??(e=>window.setTimeout(()=>e({didTimeout:!0,timeRemaining:()=>0}),16)):null,a=n?window.cancelIdleCallback??(e=>window.clearTimeout(e)):null,o=null,s=null,c=new Map,l=new Set,u=null;function d(){if(!c.size){try{o?.disconnect()}catch{}o=null,s=null,l.size||function(){if(u!=null){try{a?.(u)}catch{}u=null}}()}}function f(e){let t=c.get(e);if(t){if(!t.visible.value){t.visible.value=!0;try{t.resolve()}catch{}}try{o?.unobserve(e)}catch{}c.delete(e),l.delete(e),d()}}function p(){i&&u==null&&l.size&&(u=i(()=>{u=null;let e=l.values().next().value;e&&(l.delete(e),f(e),l.size&&p())},{timeout:1200}))}let m=(t,i)=>{let a=V(!1),u,m=!1,h=new Promise(e=>{u=()=>{m||(m=!0,e())}}),g=()=>{try{o?.unobserve(t)}catch{}c.delete(t),l.delete(t),d()};if(!n||!r.value)return a.value=!0,u(),{isVisible:a,whenVisible:h,destroy:g};let _=function(t,r){if(!n)return o;if(typeof IntersectionObserver>`u`)return null;let i=function(t,n){return{root:e?.(t??null)??null,rootMargin:n?.rootMargin??`300px`,threshold:n?.threshold??0}}(t,r);if(o&&(l=i,(a=s)&&a.root===l.root&&a.rootMargin===l.rootMargin&&a.threshold===l.threshold))return o;var a,l;if(o)try{o.disconnect()}catch{}o=new IntersectionObserver(e=>{for(let t of e)(t.isIntersecting||t.intersectionRatio>0)&&f(t.target)},{root:i.root,rootMargin:i.rootMargin,threshold:i.threshold}),s=i;for(let e of c.keys())o.observe(e);return o}(t,i);return _?(c.set(t,{resolve:u,visible:a}),_.observe(t),l.add(t),p(),{isVisible:a,whenVisible:h,destroy:g}):(a.value=!0,u(),{isVisible:a,whenVisible:h,destroy:g})};return ve(uA,m),m}function fA(){let e=I(uA,void 0);if(e)return e;let t=new WeakMap,n=null,r=new Set,i=null,a=typeof window<`u`?window.requestIdleCallback??(e=>window.setTimeout(()=>e({didTimeout:!0,timeRemaining:()=>0}),16)):null,o=typeof window<`u`?window.cancelIdleCallback??(e=>window.clearTimeout(e)):null,s=()=>{if(i!=null){try{o?.(i)}catch{}i=null}},c=e=>{let i=t.get(e);if(i){if(!i.visible.value){i.visible.value=!0;try{i.resolve()}catch{}}try{n?.unobserve(e)}catch{}t.delete(e),r.delete(e),r.size||s()}},l=()=>{a&&i==null&&r.size&&(i=a(()=>{i=null;let e=r.values().next().value;e&&(r.delete(e),c(e),r.size&&l())},{timeout:1200}))};return e=>{let i=V(!1),a,o=!1,u=new Promise(e=>{a=()=>{o||(o=!0,e())}}),d=()=>{try{n?.unobserve(e)}catch{}t.delete(e),r.delete(e),r.size||s()},f=n||(typeof window>`u`||typeof IntersectionObserver>`u`?null:(n=new IntersectionObserver(e=>{for(let t of e)(t.isIntersecting||t.intersectionRatio>0)&&c(t.target)},{root:null,rootMargin:`300px`,threshold:0}),n));return f?(t.set(e,{resolve:a,visible:i}),f.observe(e),r.add(e),l(),{isVisible:i,whenVisible:u,destroy:d}):(i.value=!0,a(),{isVisible:i,whenVisible:u,destroy:d})}}var pA={key:2,class:`html-block-node__raw`},mA=[`innerHTML`],hA={key:1,class:`html-block-node__placeholder`},gA=eO(x({__name:`HtmlBlockNode`,props:{node:{},customId:{},htmlPolicy:{}},setup(e){let t=e,n=I(`markstreamHtmlPolicy`,void 0),r=I(`markstreamNestedRendererProps`,void 0),i=R(()=>t.htmlPolicy??n?.value??`safe`),a=R(()=>{let e=r?.value??{};return zD($({},e),{customId:t.customId??e.customId,htmlPolicy:i.value})}),o=ge({loader:()=>Promise.resolve().then(()=>vN),suspensible:!1}),s=R(()=>{let e=nT(t.node.attrs,i.value);if(!e)return;let n=tT(e);return Object.keys(n).length>0?n:void 0}),c=R(()=>{let e=String(t.node.tag||``).trim(),n=nT(t.node.attrs,i.value,e);if(!n)return;let r=tT(n);return Object.keys(r).length>0?r:void 0}),l=XD(()=>t.customId),u=x({name:`DynamicRenderer`,props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),d=V(null),f=V(typeof window>`u`),m=V(t.node.content),h=R(()=>Array.isArray(t.node.children)?t.node.children:[]),g=R(()=>String(t.node.tag||`div`)),_=R(()=>{let e=g.value.trim().toLowerCase();return A_.has(e)||Gw(e,i.value)}),b=R(()=>h.value.length>0&&!!t.node.tag&&!_.value),w=R(()=>{if(b.value)return{mode:`structured`};if(!f.value)return{mode:`html`,content:m.value??``};let e=m.value??t.node.content;if(!e)return{mode:`html`,content:``};if(i.value===`escape`)return{mode:`html`,content:uT(e,i.value)};if(t.node.loading){let n=_O(e,l.value,i.value);return n===null?{mode:`text`,content:t.node.raw??e}:{mode:`dynamic`,nodes:n}}if(!gO(e,l.value))return{mode:`html`,content:uT(e,i.value)};let n=_O(e,l.value,i.value);return n===null?{mode:`html`,content:uT(e,i.value)}:{mode:`dynamic`,nodes:n}}),E=fA(),D=V(null),k=!!t.node.loading;return typeof window<`u`?(p(d,e=>{var n,r;if((r=(n=D.value)?.destroy)==null||r.call(n),D.value=null,!k)return f.value=!0,void(m.value=t.node.content);if(!e)return void(f.value=!1);let i=E(e,{rootMargin:`400px`});D.value=i,f.value=i.isVisible.value,i.whenVisible.then(()=>{f.value=!0})},{immediate:!0}),p(()=>t.node.content,e=>{k&&!f.value||(m.value=e)})):f.value=!0,v(()=>{var e,t;(t=(e=D.value)?.destroy)==null||t.call(e),D.value=null}),(t,n)=>(y(),P(S(b.value?g.value:`div`),ae({ref_key:`htmlRef`,ref:d,class:`html-block-node`},b.value?c.value:void 0),{default:T(()=>[f.value?(y(),U(H,{key:0},[w.value.mode===`structured`?(y(),P(B(o),ae({key:0},a.value,{nodes:h.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`])):w.value.mode===`dynamic`?(y(),P(B(u),{key:1,nodes:w.value.nodes},null,8,[`nodes`])):w.value.mode===`text`?(y(),U(`pre`,pA,O(w.value.content),1)):(y(),U(`div`,ae({key:3},s.value,{innerHTML:w.value.content}),null,16,mA))],64)):(y(),U(`div`,hA,[C(t.$slots,`placeholder`,{node:e.node},()=>[n[0]||=F(`span`,{class:`html-block-node__placeholder-bar`},null,-1),n[1]||=F(`span`,{class:`html-block-node__placeholder-bar w-4/5`},null,-1),n[2]||=F(`span`,{class:`html-block-node__placeholder-bar w-2/3`},null,-1)],!0)]))]),_:3},16))}}),[[`__scopeId`,`data-v-f1744dfb`]]);gA.install=e=>{e.component(gA.__name,gA)};var _A={dir:`auto`,class:`paragraph-node`},vA=[`custom-id`],yA=eO(x({__name:`ParagraphNode`,props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){let t=e,n=XD(()=>t.customId),r=I(`markstreamHtmlPolicy`,void 0),i=I(`markstreamFade`,void 0),o=I(`markstreamParseOptions`,void 0),s=I(`markstreamCustomMarkdownIt`,void 0),c=I(`markstreamNestedRendererProps`,void 0),l=R(()=>r?.value??`safe`),u=R(()=>t.parseOptions??o?.value),d=R(()=>t.customMarkdownIt??s?.value),f=R(()=>t.customHtmlTags??c?.value?.customHtmlTags),p=R(()=>{let e=c?.value??{};return zD($({},e),{customId:t.customId??e.customId,customHtmlTags:f.value,parseOptions:u.value,customMarkdownIt:d.value,htmlPolicy:l.value})}),m=ge({loader:()=>Promise.resolve().then(()=>vN),suspensible:!1});function h(e){return e.type===`text`&&String(e.content??``).trim()===``}let g=R(()=>t.node.children.filter(e=>!h(e))),_=R(()=>g.value.length>0&&g.value.every(e=>e.type===`image`||function(e){let t=function(e){return e.type===`link`&&Array.isArray(e.children)?e.children.filter(e=>!h(e)):[]}(e);return t.length===1&&t[0]?.type===`image`}(e))),v=R(()=>new Set(J_(f.value))),x=R(()=>{if(!_.value||g.value.length<=1)return t.node.children;let e=[];for(let n=0;n<t.node.children.length;n++){let r=t.node.children[n];if(!h(r)){e.push(r);continue}let i=e.length>0,a=t.node.children.slice(n+1).some(e=>!h(e));i&&a&&e.push(zD($({},r),{content:` `,raw:` `}))}return e}),C=R(()=>!1===i?.value&&!n.value.text),w=R(()=>C.value?Vk(x.value):null);function E(e,n){return{node:e,"index-key":`${t.indexKey}-${n}`,"custom-id":t.customId,"custom-html-tags":f.value}}let k=R(()=>$({inline_code:SO,image:ZO,link:kk,hardbreak:Lk,emphasis:Fk,strong:Sk,strikethrough:wk,highlight:Nk,insert:jk,subscript:bk,superscript:vk,html_inline:yO,html_block:gA,emoji:rO,checkbox:tO,math_inline:mk,checkbox_input:tO,reference:gk,footnote_anchor:Zk,footnote_reference:oO,text:dk},n.value)),A=R(()=>x.value.map((e,r)=>{let i=function(e){if(e.type===`html_block`||e.type===`html_inline`){let t=String(e.tag??``).trim().toLowerCase()||Z_(e.content);if(t&&!v.value.has(t)&&$_(e.content??e.raw,t)){let t=String(e.content??e.raw??``);return{child:{type:`text`,content:t,raw:t},component:dk,isCustomComponent:!1}}}return{child:e,component:k.value[e.type],isCustomComponent:!!(n.value[e.type]&&!qD(String(e.type)))}}(e);return zD($({},i),{index:r,key:`${t.indexKey||`paragraph`}-${r}`,customAttrs:i.isCustomComponent?fO(i.child,l.value):void 0,hasSlotChildren:Array.isArray(i.child.children)&&i.child.children.length>0,slotContent:String(i.child.content??``),originalChild:e})}));return(e,n)=>(y(),U(`p`,_A,[w.value===null?(y(!0),U(H,{key:1},a(A.value,e=>{return y(),U(H,{key:e.key},[_.value&&h(e.originalChild)?(y(),U(H,{key:0},[b(O((n=e.originalChild,String((r=n.content)??``))),1)],64)):e.isCustomComponent?(y(),P(S(e.component),ae({key:1,ref_for:!0},e.customAttrs,{node:e.child,loading:e.child.loading,"index-key":e.key,"custom-id":t.customId,"custom-html-tags":f.value,"is-dark":p.value.isDark}),{default:T(()=>[e.hasSlotChildren?(y(),P(B(m),ae({key:0,ref_for:!0},p.value,{nodes:e.child.children,"index-key":e.key,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`,`index-key`])):e.slotContent?(y(),P(B(m),ae({key:1,ref_for:!0},p.value,{content:e.slotContent,final:!e.child.loading,"index-key":`${e.key}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`content`,`final`,`index-key`])):D(``,!0)]),_:2},1040,[`node`,`loading`,`index-key`,`custom-id`,`custom-html-tags`,`is-dark`])):(y(),P(S(e.component),ae({key:2,ref_for:!0},E(e.child,e.index)),null,16))],64);var n,r}),128)):(y(),U(`span`,{key:0,class:`text-node`,"custom-id":t.customId},O(w.value),9,vA))]))}}),[[`__scopeId`,`data-v-c59ff506`]]);yA.install=e=>{e.component(yA.__name,yA)};var bA={class:`table-node-wrapper`},xA=[`aria-busy`],SA={key:0},CA=[`custom-id`],wA=[`aria-label`,`onPointerdown`],TA=[`custom-id`],EA={key:0,class:`table-node__loading`,role:`status`,"aria-live":`polite`},DA=eO(x({__name:`TableNode`,props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:[`copy`],setup(e){let t=e,n=R(()=>{var e;return(e=t.node.loading)!=null&&e}),r=R(()=>t.node.rows??[]),i=V(null),s=V([]),c=null,l=R(()=>t.node.header.cells.length),u=R(()=>s.value.some(e=>Number.isFinite(e)&&e>0)),d=R(()=>u.value?s.value.map(e=>e>0?{width:`${e}px`}:void 0):[]);ve(`markstreamShowTooltips`,R(()=>t.showTooltips)),ve(`markstreamFade`,R(()=>t.fade));let f=XD(()=>t.customId),m=R(()=>!!f.value.text),h=R(()=>!!f.value.paragraph),g=new WeakMap;function _(e){let n=!1===t.fade&&!m.value,r=!h.value,i=g.get(e);if(i?.children===e.children&&i.textFastPath===n&&i.paragraphFastPath===r)return i.info;let a=Bk(e.children,r,!0),o={simpleChildren:a,plainText:a&&n?Vk(a):null};return g.set(e,{children:e.children,textFastPath:n,paragraphFastPath:r,info:o}),o}function b(e){if(!c)return;e.preventDefault();let t=c.startWidth+c.nextStartWidth,n=Math.min(48,Math.floor(t/2)),r=Math.max(n,Math.min(t-n,Math.round(c.startWidth+e.clientX-c.startX))),i=[...c.widths];i[c.index]=r,i[c.index+1]=t-r,s.value=i}function x(){c&&=(window.removeEventListener(`pointermove`,b),window.removeEventListener(`pointerup`,x),window.removeEventListener(`pointercancel`,x),null)}return p(l,()=>{x(),s.value=[]}),v(x),(l,f)=>(y(),U(`div`,bA,[F(`table`,{ref_key:`tableRef`,ref:i,class:z([`table-node`,{"table-node--loading":n.value}]),"aria-busy":n.value},[u.value?(y(),U(`colgroup`,SA,[(y(!0),U(H,null,a(e.node.header.cells,(e,t)=>(y(),U(`col`,{key:t,style:ne(d.value[t])},null,4))),128))])):D(``,!0),F(`thead`,null,[F(`tr`,null,[(y(!0),U(H,null,a(e.node.header.cells,(n,r)=>(y(),U(`th`,{key:r,dir:`auto`,class:z([n.align===`right`?`text-right`:n.align===`center`?`text-center`:`text-left`])},[_(n).plainText===null?_(n).simpleChildren?(y(),P(B(Rk),{key:1,nodes:_(n).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${r}`},null,8,[`nodes`,`custom-id`,`index-key`])):(y(),P(B(_N),{key:2,nodes:n.children,"index-key":`table-th-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:f[0]||=e=>l.$emit(`copy`,e)},null,8,[`nodes`,`index-key`,`custom-id`,`typewriter`,`fade`,`show-tooltips`])):(y(),U(`span`,{key:0,class:`text-node`,"custom-id":t.customId},O(_(n).plainText),9,CA)),r<e.node.header.cells.length-1?(y(),U(`button`,{key:3,type:`button`,class:`table-node__resize-handle`,"aria-label":`Resize columns ${r+1} and ${r+2}`,onPointerdown:e=>function(e,t){if(t.button!==0)return;let n=function(){let e=i.value?.querySelectorAll(`thead th`);return Array.from(e??[],e=>Math.round(e.getBoundingClientRect().width))}(),r=n[e],a=n[e+1];r&&a&&(t.preventDefault(),c={index:e,startX:t.clientX,startWidth:r,nextStartWidth:a,widths:n},s.value=n,window.addEventListener(`pointermove`,b),window.addEventListener(`pointerup`,x),window.addEventListener(`pointercancel`,x))}(r,e)},null,40,wA)):D(``,!0)],2))),128))])]),F(`tbody`,null,[(y(!0),U(H,null,a(r.value,(e,n)=>(y(),U(`tr`,{key:n},[(y(!0),U(H,null,a(e.cells,(e,r)=>(y(),U(`td`,{key:r,class:z([e.align===`right`?`text-right`:e.align===`center`?`text-center`:`text-left`]),dir:`auto`},[_(e).plainText===null?_(e).simpleChildren?(y(),P(B(Rk),{key:1,nodes:_(e).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${n}-${r}`},null,8,[`nodes`,`custom-id`,`index-key`])):(y(),P(B(_N),{key:2,nodes:e.children,"index-key":`table-td-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:f[1]||=e=>l.$emit(`copy`,e)},null,8,[`nodes`,`index-key`,`custom-id`,`typewriter`,`fade`,`show-tooltips`])):(y(),U(`span`,{key:0,class:`text-node`,"custom-id":t.customId},O(_(e).plainText),9,TA))],2))),128))]))),128))])],10,xA),o(pe,{name:`table-node-fade`},{default:T(()=>[n.value?(y(),U(`div`,EA,[C(l.$slots,`loading`,{isLoading:n.value},()=>[f[2]||=F(`span`,{class:`table-node__spinner animate-spin`,"aria-hidden":`true`},null,-1),f[3]||=F(`span`,{class:`sr-only`},`Loading`,-1)],!0)])):D(``,!0)]),_:3})]))}}),[[`__scopeId`,`data-v-39f87b5d`]]);DA.install=e=>{e.component(DA.__name,DA)};var OA={class:`hr-node`},kA=eO({},[[`render`,function(e,t){return y(),U(`hr`,OA)}],[`__scopeId`,`data-v-39b2349c`]]);kA.install=e=>{e.component(kA.__name,kA)};var AA={class:`unknown-node`},jA=x({__name:`FallbackComponent`,props:{node:{}},setup:e=>(t,n)=>(y(),U(`div`,AA,O(e.node.raw),1))}),MA=eO(x({__name:`VmrContainerNode`,props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},setup(e){let t=e,n=R(()=>`vmr-container vmr-container-${t.node.name}`),r=XD(()=>t.customId),i=R(()=>$({text:dk,paragraph:yA,heading:rA,inline_code:SO,link:kk,image:ZO,strong:Sk,emphasis:Fk,strikethrough:wk,insert:jk,subscript:bk,superscript:vk,checkbox:tO,checkbox_input:tO,hardbreak:Lk,math_inline:mk,reference:gk,list:lA,math_block:hk,table:DA},r.value));return(r,o)=>(y(),U(`div`,ae({class:n.value},e.node.attrs),[(y(!0),U(H,null,a(e.node.children,(n,r)=>{return y(),P(S((a=n.type,i.value[a]||jA)),{key:`${e.indexKey||`vmr-container`}-${r}`,"custom-id":t.customId,node:n,"index-key":`${e.indexKey||`vmr-container`}-${r}`,typewriter:t.typewriter,fade:t.fade},null,8,[`custom-id`,`node`,`index-key`,`typewriter`,`fade`]);var a}),128))],16))}}),[[`__scopeId`,`data-v-911e41c4`]]);MA.install=e=>{e.component(MA.__name,MA)};var NA=`BN.BN.BN.BN.BN.BN.BN.BN.BN.S.B.S.WS.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.B.B.B.S.WS.ON.ON.ET.ET.ET.ON.ON.ON.ON.ON.ES.CS.ES.CS.CS.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.CS.ON.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.ON.ON.ON.BN.BN.BN.BN.BN.BN.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.CS.ON.ET.ET.ET.ET.ON.ON.ON.ON.L.ON.ON.BN.ON.ON.ET.ET.EN.EN.ON.L.ON.ON.ON.EN.L.ON.ON.ON.ON.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.ON.L.L.L.L.L.L.L.L`.split(`.`),PA=[[697,698,`ON`],[706,719,`ON`],[722,735,`ON`],[741,749,`ON`],[751,767,`ON`],[768,879,`NSM`],[884,885,`ON`],[894,894,`ON`],[900,901,`ON`],[903,903,`ON`],[1014,1014,`ON`],[1155,1161,`NSM`],[1418,1418,`ON`],[1421,1422,`ON`],[1423,1423,`ET`],[1424,1424,`R`],[1425,1469,`NSM`],[1470,1470,`R`],[1471,1471,`NSM`],[1472,1472,`R`],[1473,1474,`NSM`],[1475,1475,`R`],[1476,1477,`NSM`],[1478,1478,`R`],[1479,1479,`NSM`],[1480,1535,`R`],[1536,1541,`AN`],[1542,1543,`ON`],[1544,1544,`AL`],[1545,1546,`ET`],[1547,1547,`AL`],[1548,1548,`CS`],[1549,1549,`AL`],[1550,1551,`ON`],[1552,1562,`NSM`],[1563,1610,`AL`],[1611,1631,`NSM`],[1632,1641,`AN`],[1642,1642,`ET`],[1643,1644,`AN`],[1645,1647,`AL`],[1648,1648,`NSM`],[1649,1749,`AL`],[1750,1756,`NSM`],[1757,1757,`AN`],[1758,1758,`ON`],[1759,1764,`NSM`],[1765,1766,`AL`],[1767,1768,`NSM`],[1769,1769,`ON`],[1770,1773,`NSM`],[1774,1775,`AL`],[1776,1785,`EN`],[1786,1808,`AL`],[1809,1809,`NSM`],[1810,1839,`AL`],[1840,1866,`NSM`],[1867,1957,`AL`],[1958,1968,`NSM`],[1969,1983,`AL`],[1984,2026,`R`],[2027,2035,`NSM`],[2036,2037,`R`],[2038,2041,`ON`],[2042,2044,`R`],[2045,2045,`NSM`],[2046,2069,`R`],[2070,2073,`NSM`],[2074,2074,`R`],[2075,2083,`NSM`],[2084,2084,`R`],[2085,2087,`NSM`],[2088,2088,`R`],[2089,2093,`NSM`],[2094,2136,`R`],[2137,2139,`NSM`],[2140,2143,`R`],[2144,2191,`AL`],[2192,2193,`AN`],[2194,2198,`AL`],[2199,2207,`NSM`],[2208,2249,`AL`],[2250,2273,`NSM`],[2274,2274,`AN`],[2275,2306,`NSM`],[2362,2362,`NSM`],[2364,2364,`NSM`],[2369,2376,`NSM`],[2381,2381,`NSM`],[2385,2391,`NSM`],[2402,2403,`NSM`],[2433,2433,`NSM`],[2492,2492,`NSM`],[2497,2500,`NSM`],[2509,2509,`NSM`],[2530,2531,`NSM`],[2546,2547,`ET`],[2555,2555,`ET`],[2558,2558,`NSM`],[2561,2562,`NSM`],[2620,2620,`NSM`],[2625,2626,`NSM`],[2631,2632,`NSM`],[2635,2637,`NSM`],[2641,2641,`NSM`],[2672,2673,`NSM`],[2677,2677,`NSM`],[2689,2690,`NSM`],[2748,2748,`NSM`],[2753,2757,`NSM`],[2759,2760,`NSM`],[2765,2765,`NSM`],[2786,2787,`NSM`],[2801,2801,`ET`],[2810,2815,`NSM`],[2817,2817,`NSM`],[2876,2876,`NSM`],[2879,2879,`NSM`],[2881,2884,`NSM`],[2893,2893,`NSM`],[2901,2902,`NSM`],[2914,2915,`NSM`],[2946,2946,`NSM`],[3008,3008,`NSM`],[3021,3021,`NSM`],[3059,3064,`ON`],[3065,3065,`ET`],[3066,3066,`ON`],[3072,3072,`NSM`],[3076,3076,`NSM`],[3132,3132,`NSM`],[3134,3136,`NSM`],[3142,3144,`NSM`],[3146,3149,`NSM`],[3157,3158,`NSM`],[3170,3171,`NSM`],[3192,3198,`ON`],[3201,3201,`NSM`],[3260,3260,`NSM`],[3276,3277,`NSM`],[3298,3299,`NSM`],[3328,3329,`NSM`],[3387,3388,`NSM`],[3393,3396,`NSM`],[3405,3405,`NSM`],[3426,3427,`NSM`],[3457,3457,`NSM`],[3530,3530,`NSM`],[3538,3540,`NSM`],[3542,3542,`NSM`],[3633,3633,`NSM`],[3636,3642,`NSM`],[3647,3647,`ET`],[3655,3662,`NSM`],[3761,3761,`NSM`],[3764,3772,`NSM`],[3784,3790,`NSM`],[3864,3865,`NSM`],[3893,3893,`NSM`],[3895,3895,`NSM`],[3897,3897,`NSM`],[3898,3901,`ON`],[3953,3966,`NSM`],[3968,3972,`NSM`],[3974,3975,`NSM`],[3981,3991,`NSM`],[3993,4028,`NSM`],[4038,4038,`NSM`],[4141,4144,`NSM`],[4146,4151,`NSM`],[4153,4154,`NSM`],[4157,4158,`NSM`],[4184,4185,`NSM`],[4190,4192,`NSM`],[4209,4212,`NSM`],[4226,4226,`NSM`],[4229,4230,`NSM`],[4237,4237,`NSM`],[4253,4253,`NSM`],[4957,4959,`NSM`],[5008,5017,`ON`],[5120,5120,`ON`],[5760,5760,`WS`],[5787,5788,`ON`],[5906,5908,`NSM`],[5938,5939,`NSM`],[5970,5971,`NSM`],[6002,6003,`NSM`],[6068,6069,`NSM`],[6071,6077,`NSM`],[6086,6086,`NSM`],[6089,6099,`NSM`],[6107,6107,`ET`],[6109,6109,`NSM`],[6128,6137,`ON`],[6144,6154,`ON`],[6155,6157,`NSM`],[6158,6158,`BN`],[6159,6159,`NSM`],[6277,6278,`NSM`],[6313,6313,`NSM`],[6432,6434,`NSM`],[6439,6440,`NSM`],[6450,6450,`NSM`],[6457,6459,`NSM`],[6464,6464,`ON`],[6468,6469,`ON`],[6622,6655,`ON`],[6679,6680,`NSM`],[6683,6683,`NSM`],[6742,6742,`NSM`],[6744,6750,`NSM`],[6752,6752,`NSM`],[6754,6754,`NSM`],[6757,6764,`NSM`],[6771,6780,`NSM`],[6783,6783,`NSM`],[6832,6877,`NSM`],[6880,6891,`NSM`],[6912,6915,`NSM`],[6964,6964,`NSM`],[6966,6970,`NSM`],[6972,6972,`NSM`],[6978,6978,`NSM`],[7019,7027,`NSM`],[7040,7041,`NSM`],[7074,7077,`NSM`],[7080,7081,`NSM`],[7083,7085,`NSM`],[7142,7142,`NSM`],[7144,7145,`NSM`],[7149,7149,`NSM`],[7151,7153,`NSM`],[7212,7219,`NSM`],[7222,7223,`NSM`],[7376,7378,`NSM`],[7380,7392,`NSM`],[7394,7400,`NSM`],[7405,7405,`NSM`],[7412,7412,`NSM`],[7416,7417,`NSM`],[7616,7679,`NSM`],[8125,8125,`ON`],[8127,8129,`ON`],[8141,8143,`ON`],[8157,8159,`ON`],[8173,8175,`ON`],[8189,8190,`ON`],[8192,8202,`WS`],[8203,8205,`BN`],[8207,8207,`R`],[8208,8231,`ON`],[8232,8232,`WS`],[8233,8233,`B`],[8234,8238,`BN`],[8239,8239,`CS`],[8240,8244,`ET`],[8245,8259,`ON`],[8260,8260,`CS`],[8261,8286,`ON`],[8287,8287,`WS`],[8288,8303,`BN`],[8304,8304,`EN`],[8308,8313,`EN`],[8314,8315,`ES`],[8316,8318,`ON`],[8320,8329,`EN`],[8330,8331,`ES`],[8332,8334,`ON`],[8352,8399,`ET`],[8400,8432,`NSM`],[8448,8449,`ON`],[8451,8454,`ON`],[8456,8457,`ON`],[8468,8468,`ON`],[8470,8472,`ON`],[8478,8483,`ON`],[8485,8485,`ON`],[8487,8487,`ON`],[8489,8489,`ON`],[8494,8494,`ET`],[8506,8507,`ON`],[8512,8516,`ON`],[8522,8525,`ON`],[8528,8543,`ON`],[8585,8587,`ON`],[8592,8721,`ON`],[8722,8722,`ES`],[8723,8723,`ET`],[8724,9013,`ON`],[9083,9108,`ON`],[9110,9257,`ON`],[9280,9290,`ON`],[9312,9351,`ON`],[9352,9371,`EN`],[9450,9899,`ON`],[9901,10239,`ON`],[10496,11123,`ON`],[11126,11263,`ON`],[11493,11498,`ON`],[11503,11505,`NSM`],[11513,11519,`ON`],[11647,11647,`NSM`],[11744,11775,`NSM`],[11776,11869,`ON`],[11904,11929,`ON`],[11931,12019,`ON`],[12032,12245,`ON`],[12272,12287,`ON`],[12288,12288,`WS`],[12289,12292,`ON`],[12296,12320,`ON`],[12330,12333,`NSM`],[12336,12336,`ON`],[12342,12343,`ON`],[12349,12351,`ON`],[12441,12442,`NSM`],[12443,12444,`ON`],[12448,12448,`ON`],[12539,12539,`ON`],[12736,12773,`ON`],[12783,12783,`ON`],[12829,12830,`ON`],[12880,12895,`ON`],[12924,12926,`ON`],[12977,12991,`ON`],[13004,13007,`ON`],[13175,13178,`ON`],[13278,13279,`ON`],[13311,13311,`ON`],[19904,19967,`ON`],[42128,42182,`ON`],[42509,42511,`ON`],[42607,42610,`NSM`],[42611,42611,`ON`],[42612,42621,`NSM`],[42622,42623,`ON`],[42654,42655,`NSM`],[42736,42737,`NSM`],[42752,42785,`ON`],[42888,42888,`ON`],[43010,43010,`NSM`],[43014,43014,`NSM`],[43019,43019,`NSM`],[43045,43046,`NSM`],[43048,43051,`ON`],[43052,43052,`NSM`],[43064,43065,`ET`],[43124,43127,`ON`],[43204,43205,`NSM`],[43232,43249,`NSM`],[43263,43263,`NSM`],[43302,43309,`NSM`],[43335,43345,`NSM`],[43392,43394,`NSM`],[43443,43443,`NSM`],[43446,43449,`NSM`],[43452,43453,`NSM`],[43493,43493,`NSM`],[43561,43566,`NSM`],[43569,43570,`NSM`],[43573,43574,`NSM`],[43587,43587,`NSM`],[43596,43596,`NSM`],[43644,43644,`NSM`],[43696,43696,`NSM`],[43698,43700,`NSM`],[43703,43704,`NSM`],[43710,43711,`NSM`],[43713,43713,`NSM`],[43756,43757,`NSM`],[43766,43766,`NSM`],[43882,43883,`ON`],[44005,44005,`NSM`],[44008,44008,`NSM`],[44013,44013,`NSM`],[64285,64285,`R`],[64286,64286,`NSM`],[64287,64296,`R`],[64297,64297,`ES`],[64298,64335,`R`],[64336,64450,`AL`],[64451,64466,`ON`],[64467,64829,`AL`],[64830,64847,`ON`],[64848,64911,`AL`],[64912,64913,`ON`],[64914,64967,`AL`],[64968,64975,`ON`],[64976,65007,`BN`],[65008,65020,`AL`],[65021,65023,`ON`],[65024,65039,`NSM`],[65040,65049,`ON`],[65056,65071,`NSM`],[65072,65103,`ON`],[65104,65104,`CS`],[65105,65105,`ON`],[65106,65106,`CS`],[65108,65108,`ON`],[65109,65109,`CS`],[65110,65118,`ON`],[65119,65119,`ET`],[65120,65121,`ON`],[65122,65123,`ES`],[65124,65126,`ON`],[65128,65128,`ON`],[65129,65130,`ET`],[65131,65131,`ON`],[65136,65278,`AL`],[65279,65279,`BN`],[65281,65282,`ON`],[65283,65285,`ET`],[65286,65290,`ON`],[65291,65291,`ES`],[65292,65292,`CS`],[65293,65293,`ES`],[65294,65295,`CS`],[65296,65305,`EN`],[65306,65306,`CS`],[65307,65312,`ON`],[65339,65344,`ON`],[65371,65381,`ON`],[65504,65505,`ET`],[65506,65508,`ON`],[65509,65510,`ET`],[65512,65518,`ON`],[65520,65528,`BN`],[65529,65533,`ON`],[65534,65535,`BN`],[65793,65793,`ON`],[65856,65932,`ON`],[65936,65948,`ON`],[65952,65952,`ON`],[66045,66045,`NSM`],[66272,66272,`NSM`],[66273,66299,`EN`],[66422,66426,`NSM`],[67584,67870,`R`],[67871,67871,`ON`],[67872,68096,`R`],[68097,68099,`NSM`],[68100,68100,`R`],[68101,68102,`NSM`],[68103,68107,`R`],[68108,68111,`NSM`],[68112,68151,`R`],[68152,68154,`NSM`],[68155,68158,`R`],[68159,68159,`NSM`],[68160,68324,`R`],[68325,68326,`NSM`],[68327,68408,`R`],[68409,68415,`ON`],[68416,68863,`R`],[68864,68899,`AL`],[68900,68903,`NSM`],[68904,68911,`AL`],[68912,68921,`AN`],[68922,68927,`AL`],[68928,68937,`AN`],[68938,68968,`R`],[68969,68973,`NSM`],[68974,68974,`ON`],[68975,69215,`R`],[69216,69246,`AN`],[69247,69290,`R`],[69291,69292,`NSM`],[69293,69311,`R`],[69312,69327,`AL`],[69328,69336,`ON`],[69337,69369,`AL`],[69370,69375,`NSM`],[69376,69423,`R`],[69424,69445,`AL`],[69446,69456,`NSM`],[69457,69487,`AL`],[69488,69505,`R`],[69506,69509,`NSM`],[69510,69631,`R`],[69633,69633,`NSM`],[69688,69702,`NSM`],[69714,69733,`ON`],[69744,69744,`NSM`],[69747,69748,`NSM`],[69759,69761,`NSM`],[69811,69814,`NSM`],[69817,69818,`NSM`],[69826,69826,`NSM`],[69888,69890,`NSM`],[69927,69931,`NSM`],[69933,69940,`NSM`],[70003,70003,`NSM`],[70016,70017,`NSM`],[70070,70078,`NSM`],[70089,70092,`NSM`],[70095,70095,`NSM`],[70191,70193,`NSM`],[70196,70196,`NSM`],[70198,70199,`NSM`],[70206,70206,`NSM`],[70209,70209,`NSM`],[70367,70367,`NSM`],[70371,70378,`NSM`],[70400,70401,`NSM`],[70459,70460,`NSM`],[70464,70464,`NSM`],[70502,70508,`NSM`],[70512,70516,`NSM`],[70587,70592,`NSM`],[70606,70606,`NSM`],[70608,70608,`NSM`],[70610,70610,`NSM`],[70625,70626,`NSM`],[70712,70719,`NSM`],[70722,70724,`NSM`],[70726,70726,`NSM`],[70750,70750,`NSM`],[70835,70840,`NSM`],[70842,70842,`NSM`],[70847,70848,`NSM`],[70850,70851,`NSM`],[71090,71093,`NSM`],[71100,71101,`NSM`],[71103,71104,`NSM`],[71132,71133,`NSM`],[71219,71226,`NSM`],[71229,71229,`NSM`],[71231,71232,`NSM`],[71264,71276,`ON`],[71339,71339,`NSM`],[71341,71341,`NSM`],[71344,71349,`NSM`],[71351,71351,`NSM`],[71453,71453,`NSM`],[71455,71455,`NSM`],[71458,71461,`NSM`],[71463,71467,`NSM`],[71727,71735,`NSM`],[71737,71738,`NSM`],[71995,71996,`NSM`],[71998,71998,`NSM`],[72003,72003,`NSM`],[72148,72151,`NSM`],[72154,72155,`NSM`],[72160,72160,`NSM`],[72193,72198,`NSM`],[72201,72202,`NSM`],[72243,72248,`NSM`],[72251,72254,`NSM`],[72263,72263,`NSM`],[72273,72278,`NSM`],[72281,72283,`NSM`],[72330,72342,`NSM`],[72344,72345,`NSM`],[72544,72544,`NSM`],[72546,72548,`NSM`],[72550,72550,`NSM`],[72752,72758,`NSM`],[72760,72765,`NSM`],[72850,72871,`NSM`],[72874,72880,`NSM`],[72882,72883,`NSM`],[72885,72886,`NSM`],[73009,73014,`NSM`],[73018,73018,`NSM`],[73020,73021,`NSM`],[73023,73029,`NSM`],[73031,73031,`NSM`],[73104,73105,`NSM`],[73109,73109,`NSM`],[73111,73111,`NSM`],[73459,73460,`NSM`],[73472,73473,`NSM`],[73526,73530,`NSM`],[73536,73536,`NSM`],[73538,73538,`NSM`],[73562,73562,`NSM`],[73685,73692,`ON`],[73693,73696,`ET`],[73697,73713,`ON`],[78912,78912,`NSM`],[78919,78933,`NSM`],[90398,90409,`NSM`],[90413,90415,`NSM`],[92912,92916,`NSM`],[92976,92982,`NSM`],[94031,94031,`NSM`],[94095,94098,`NSM`],[94178,94178,`ON`],[94180,94180,`NSM`],[113821,113822,`NSM`],[113824,113827,`BN`],[117760,117973,`ON`],[118e3,118009,`EN`],[118010,118012,`ON`],[118016,118451,`ON`],[118458,118480,`ON`],[118496,118512,`ON`],[118528,118573,`NSM`],[118576,118598,`NSM`],[119143,119145,`NSM`],[119155,119162,`BN`],[119163,119170,`NSM`],[119173,119179,`NSM`],[119210,119213,`NSM`],[119273,119274,`ON`],[119296,119361,`ON`],[119362,119364,`NSM`],[119365,119365,`ON`],[119552,119638,`ON`],[120513,120513,`ON`],[120539,120539,`ON`],[120571,120571,`ON`],[120597,120597,`ON`],[120629,120629,`ON`],[120655,120655,`ON`],[120687,120687,`ON`],[120713,120713,`ON`],[120745,120745,`ON`],[120771,120771,`ON`],[120782,120831,`EN`],[121344,121398,`NSM`],[121403,121452,`NSM`],[121461,121461,`NSM`],[121476,121476,`NSM`],[121499,121503,`NSM`],[121505,121519,`NSM`],[122880,122886,`NSM`],[122888,122904,`NSM`],[122907,122913,`NSM`],[122915,122916,`NSM`],[122918,122922,`NSM`],[123023,123023,`NSM`],[123184,123190,`NSM`],[123566,123566,`NSM`],[123628,123631,`NSM`],[123647,123647,`ET`],[124140,124143,`NSM`],[124398,124399,`NSM`],[124643,124643,`NSM`],[124646,124646,`NSM`],[124654,124655,`NSM`],[124661,124661,`NSM`],[124928,125135,`R`],[125136,125142,`NSM`],[125143,125251,`R`],[125252,125258,`NSM`],[125259,126063,`R`],[126064,126143,`AL`],[126144,126207,`R`],[126208,126287,`AL`],[126288,126463,`R`],[126464,126703,`AL`],[126704,126705,`ON`],[126706,126719,`AL`],[126720,126975,`R`],[126976,127019,`ON`],[127024,127123,`ON`],[127136,127150,`ON`],[127153,127167,`ON`],[127169,127183,`ON`],[127185,127221,`ON`],[127232,127242,`EN`],[127243,127247,`ON`],[127279,127279,`ON`],[127338,127343,`ON`],[127405,127405,`ON`],[127584,127589,`ON`],[127744,128728,`ON`],[128732,128748,`ON`],[128752,128764,`ON`],[128768,128985,`ON`],[128992,129003,`ON`],[129008,129008,`ON`],[129024,129035,`ON`],[129040,129095,`ON`],[129104,129113,`ON`],[129120,129159,`ON`],[129168,129197,`ON`],[129200,129211,`ON`],[129216,129217,`ON`],[129232,129240,`ON`],[129280,129623,`ON`],[129632,129645,`ON`],[129648,129660,`ON`],[129664,129674,`ON`],[129678,129734,`ON`],[129736,129736,`ON`],[129741,129756,`ON`],[129759,129770,`ON`],[129775,129784,`ON`],[129792,129938,`ON`],[129940,130031,`ON`],[130032,130041,`EN`],[130042,130042,`ON`],[131070,131071,`BN`],[196606,196607,`BN`],[262142,262143,`BN`],[327678,327679,`BN`],[393214,393215,`BN`],[458750,458751,`BN`],[524286,524287,`BN`],[589822,589823,`BN`],[655358,655359,`BN`],[720894,720895,`BN`],[786430,786431,`BN`],[851966,851967,`BN`],[917502,917759,`BN`],[917760,917999,`NSM`],[918e3,921599,`BN`],[983038,983039,`BN`],[1048574,1048575,`BN`],[1114110,1114111,`BN`]];function FA(e){if(e<=255)return NA[e];let t=0,n=PA.length-1;for(;t<=n;){let r=t+n>>1,i=PA[r];if(e<i[0])n=r-1;else{if(!(e>i[1]))return i[2];t=r+1}}return`L`}var IA=/[ \t\n\r\f]+/g,LA=/[\t\n\r\f]| {2,}|^ | $/,RA=null,zA=RegExp(`\\p{Script=Arabic}`,`u`),BA=RegExp(`\\p{M}`,`u`),VA=RegExp(`\\p{Nd}`,`u`);function HA(e){return zA.test(e)}function UA(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=44032&&e<=55215||e>=65280&&e<=65519}function WA(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){let r=e.charCodeAt(t+1);if(r>=56320&&r<=57343){if(UA(r-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(UA(n))return!0}}return!1}var GA=new Set([`\xA0`,` `,``,``]);function KA(e){return WA(e)}function qA(e){return!function(e){let t=oj(e);return t!==null&&(JA.has(t)||ZA.has(t))}(e)&&!function(e){let t=oj(e);return t!==null&&GA.has(t)}(e)}var JA=new Set(`,...!.:.;.?.、.。.・.).〕.〉.》.」.』.】.〗.〙.〛.ー.々.〻.ゝ.ゞ.ヽ.ヾ`.split(`.`)),YA=new Set([`"`,`(`,`[`,`{`,`“`,`‘`,`«`,`‹`,`(`,`〔`,`〈`,`《`,`「`,`『`,`【`,`〖`,`〘`,`〚`]),XA=new Set([`'`,`’`]),ZA=new Set(`.(,(!(?(:(;(،(؛(؟(।(॥(၊(။(၌(၍(၏()(](}(%("(”(’(»(›(…`.split(`(`)),QA=new Set([`:`,`.`,`،`,`؛`]),$A=new Set([`၏`]),ej=new Set([`”`,`’`,`»`,`›`,`」`,`』`,`】`,`》`,`〉`,`〕`,`)`]);function tj(e){if(ij(e))return!0;let t=!1;for(let n of e)if(ZA.has(n))t=!0;else if(!t||!BA.test(n))return!1;return t}function nj(e){for(let t of e)if(!JA.has(t)&&!ZA.has(t))return!1;return e.length>0}function rj(e){if(ij(e))return!0;for(let t of e)if(!YA.has(t)&&!XA.has(t)&&!BA.test(t))return!1;return e.length>0}function ij(e){let t=!1;for(let n of e)if(n!==`\\`&&!BA.test(n)){if(!(YA.has(n)||ZA.has(n)||XA.has(n)))return!1;t=!0}return t}function aj(e,t){let n=t-1;if(n<=0)return Math.max(n,0);let r=e.charCodeAt(n);if(r<56320||r>57343)return n;let i=n-1;if(i<0)return n;let a=e.charCodeAt(i);return a>=55296&&a<=56319?i:n}function oj(e){if(e.length===0)return null;let t=aj(e,e.length);return e.slice(t)}function sj(e){let t=Array.from(e),n=t.length;for(;n>0;){let e=t[n-1];if(BA.test(e))n--;else{if(!YA.has(e)&&!XA.has(e))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(``),tail:t.slice(n).join(``)}}function cj(e,t,n){return n!==`text`||t||e.length!==1||e===`-`||e===`—`?null:e}function lj(e,t,n,r){let i=t[r],a=e[r];if(i==null)return a;let o=n[r];if(a.length===o)return a;let s=i.repeat(o);return e[r]=s,s}function uj(e,t){return e&&t!==null&&QA.has(t)}function dj(e){let t=oj(e);return t!==null&&$A.has(t)}function fj(e){if(e.length<2||e[0]!==` `)return null;let t=e.slice(1);return RegExp(`^\\p{M}+$`,`u`).test(t)?{space:` `,marks:t}:null}function pj(e){let t=e.length;for(;t>0;){let n=aj(e,t),r=e.slice(n,t);if(ej.has(r))return!0;if(!ZA.has(r))return!1;t=n}return!1}function mj(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===` `)return`preserved-space`;if(e===` `)return`tab`;if(t.preserveHardBreaks&&e===`
|
|
145
145
|
`)return`hard-break`}return e===` `?`space`:e===`\xA0`||e===` `||e===``||e===``?`glue`:e===``?`zero-width-break`:e===``?`soft-hyphen`:`text`}var hj=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function gj(e){return e.length===1?e[0]:e.join(``)}function _j(e,t){let n=[];for(let t=e.length-1;t>=0;t--)n.push(e[t]);return n.push(t),gj(n)}function vj(e,t,n,r){if(!hj.test(e))return[{text:e,isWordLike:t,kind:`text`,start:n}];let i=[],a=null,o=[],s=n,c=!1,l=0;for(let u of e){let e=mj(u,r),d=e===`text`&&t;a===null||e!==a||d!==c?(a!==null&&i.push({text:gj(o),isWordLike:c,kind:a,start:s}),a=e,o=[u],s=n+l,c=d,l+=u.length):(o.push(u),l+=u.length)}return a!==null&&i.push({text:gj(o),isWordLike:c,kind:a,start:s}),i}function yj(e){return e===`space`||e===`preserved-space`||e===`zero-width-break`||e===`hard-break`}var bj=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function xj(e,t){let n=e.texts[t];return!!n.startsWith(`www.`)||bj.test(n)&&t+1<e.len&&e.kinds[t+1]===`text`&&e.texts[t+1]===`//`}function Sj(e){return e.includes(`?`)&&(e.includes(`://`)||e.startsWith(`www.`))}var Cj=new Set([`:`,`-`,`/`,`×`,`,`,`.`,`+`,`–`,`—`]),wj=/^[A-Za-z0-9_]+[,:;]*$/,Tj=/[,:;]+$/;function Ej(e){for(let t of e)if(VA.test(t))return!0;return!1}function Dj(e){if(e.length===0)return!1;for(let t of e)if(!VA.test(t)&&!Cj.has(t))return!1;return!0}function Oj(e,t,n){var r;let i=(RA===null&&(RA=new Intl.Segmenter(void 0,{granularity:`word`})),RA),a=0,o=[],s=[],c=[],l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=[],_=[];for(let v of i.segment(e))for(let e of vj(v.segment,(r=v.isWordLike)!=null&&r,v.index,n)){let n=function(){d[C]!==null&&(s[C]=[lj(o,d,f,C)],d[C]=null),s[C].push(e.text),c[C]=c[C]||e.isWordLike,p[C]=p[C]||v,m[C]=m[C]||y,h[C]=x,g[C]=S,_[C]=uj(m[C],b)},r=e.kind===`text`,i=cj(e.text,e.isWordLike,e.kind),v=WA(e.text),y=HA(e.text),b=oj(e.text),x=pj(e.text),S=dj(e.text),C=a-1;t.carryCJKAfterClosingQuote&&r&&a>0&&l[C]===`text`&&v&&p[C]&&h[C]||r&&a>0&&l[C]===`text`&&nj(e.text)&&p[C]||r&&a>0&&l[C]===`text`&&g[C]?n():r&&a>0&&l[C]===`text`&&e.isWordLike&&y&&_[C]?(n(),c[C]=!0):i!==null&&a>0&&l[C]===`text`&&d[C]===i?f[C]=(f[C]??1)+1:r&&!e.isWordLike&&a>0&&l[C]===`text`&&(tj(e.text)||e.text===`-`&&c[C])?n():(o[a]=e.text,s[a]=[e.text],c[a]=e.isWordLike,l[a]=e.kind,u[a]=e.start,d[a]=i,f[a]=i===null?0:1,p[a]=v,m[a]=y,h[a]=x,g[a]=S,_[a]=uj(y,b),a++)}for(let e=0;e<a;e++)d[e]===null?o[e]=gj(s[e]):o[e]=lj(o,d,f,e);for(let e=1;e<a;e++)l[e]===`text`&&!c[e]&&ij(o[e])&&l[e-1]===`text`&&(o[e-1]+=o[e],c[e-1]=c[e-1]||c[e],o[e]=``);let v=Array.from({length:a},()=>null),y=-1;for(let e=a-1;e>=0;e--){let t=o[e];if(t.length!==0){if(l[e]===`text`&&!c[e]&&rj(t)&&y>=0&&l[y]===`text`){let n=v[y]??[];n.push(t),v[y]=n,u[y]=u[e],o[e]=``;continue}y=e}}for(let e=0;e<a;e++){let t=v[e];t!=null&&(o[e]=_j(t,o[e]))}let b=0;for(let e=0;e<a;e++){let t=o[e];t.length!==0&&(b!==e&&(o[b]=t,c[b]=c[e],l[b]=l[e],u[b]=u[e]),b++)}o.length=b,c.length=b,l.length=b,u.length=b;let x=function(e){let t=e.texts.slice(),n=e.isWordLike.slice(),r=e.kinds.slice(),i=e.starts.slice();for(let e=0;e<t.length-1;e++){if(r[e]!==`text`||r[e+1]!==`text`||!WA(t[e])||!WA(t[e+1]))continue;let n=sj(t[e]);n!==null&&(t[e]=n.head,t[e+1]=n.tail+t[e+1],i[e+1]=i[e]+n.head.length)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}(function(e){let t=[],n=[],r=[],i=[];for(let a=0;a<e.len;a++){let o=e.texts[a],s=e.kinds[a],c=e.isWordLike[a];if(s===`text`&&c&&wj.test(o)){let s=[o],c=Tj.test(o),l=a+1;for(;c&&l<e.len&&e.kinds[l]===`text`&&e.isWordLike[l]&&wj.test(e.texts[l]);){let t=e.texts[l];s.push(t),c=Tj.test(t),l++}t.push(gj(s)),n.push(!0),r.push(`text`),i.push(e.starts[a]),a=l-1;continue}t.push(o),n.push(c),r.push(s),i.push(e.starts[a])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}(function(e){let t=[],n=[],r=[],i=[];for(let a=0;a<e.len;a++){let o=e.texts[a];if(e.kinds[a]===`text`&&o.includes(`-`)){let s=o.split(`-`),c=s.length>1;for(let e=0;e<s.length;e++){let t=s[e];if(!c)break;t.length!==0&&Ej(t)&&Dj(t)||(c=!1)}if(c){let o=0;for(let c=0;c<s.length;c++){let l=s[c],u=c<s.length-1?`${l}-`:l;t.push(u),n.push(!0),r.push(`text`),i.push(e.starts[a]+o),o+=u.length}continue}}t.push(o),n.push(e.isWordLike[a]),r.push(e.kinds[a]),i.push(e.starts[a])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}(function(e){let t=[],n=[],r=[],i=[];for(let a=0;a<e.len;a++){let o=e.texts[a],s=e.kinds[a];if(s===`text`&&Dj(o)&&Ej(o)){let s=[o],c=a+1;for(;c<e.len&&e.kinds[c]===`text`&&Dj(e.texts[c]);)s.push(e.texts[c]),c++;t.push(gj(s)),n.push(!0),r.push(`text`),i.push(e.starts[a]),a=c-1;continue}t.push(o),n.push(e.isWordLike[a]),r.push(s),i.push(e.starts[a])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}(function(e){let t=[],n=[],r=[],i=[];for(let a=0;a<e.len;a++){let o=e.texts[a];if(t.push(o),n.push(e.isWordLike[a]),r.push(e.kinds[a]),i.push(e.starts[a]),!Sj(o))continue;let s=a+1;if(s>=e.len||yj(e.kinds[s]))continue;let c=[],l=e.starts[s],u=s;for(;u<e.len&&!yj(e.kinds[u]);)c.push(e.texts[u]),u++;c.length>0&&(t.push(gj(c)),n.push(!0),r.push(`text`),i.push(l),a=u-1)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}(function(e){let t=e.texts.slice(),n=e.isWordLike.slice(),r=e.kinds.slice(),i=e.starts.slice();for(let i=0;i<e.len;i++){if(r[i]!==`text`||!xj(e,i))continue;let a=[t[i]],o=i+1;for(;o<e.len&&!yj(r[o]);){a.push(t[o]),n[i]=!0;let e=t[o].includes(`?`);if(r[o]=`text`,t[o]=``,o++,e)break}t[i]=gj(a)}let a=0;for(let e=0;e<t.length;e++){let o=t[e];o.length!==0&&(a!==e&&(t[a]=o,n[a]=n[e],r[a]=r[e],i[a]=i[e]),a++)}return t.length=a,n.length=a,r.length=a,i.length=a,{len:a,texts:t,isWordLike:n,kinds:r,starts:i}}(function(e){let t=[],n=[],r=[],i=[],a=0;for(;a<e.len;){let o=[e.texts[a]],s=e.isWordLike[a],c=e.kinds[a],l=e.starts[a];if(c===`glue`){let u=[o[0]],d=l;for(a++;a<e.len&&e.kinds[a]===`glue`;)u.push(e.texts[a]),a++;let f=gj(u);if(!(a<e.len&&e.kinds[a]===`text`)){t.push(f),n.push(!1),r.push(`glue`),i.push(d);continue}o[0]=f,o.push(e.texts[a]),s=e.isWordLike[a],c=`text`,l=d,a++}else a++;if(c===`text`)for(;a<e.len&&e.kinds[a]===`glue`;){let t=[];for(;a<e.len&&e.kinds[a]===`glue`;)t.push(e.texts[a]),a++;let n=gj(t);a<e.len&&e.kinds[a]===`text`?(o.push(n,e.texts[a]),s||=e.isWordLike[a],a++):o.push(n)}t.push(gj(o)),n.push(s),r.push(c),i.push(l)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}({len:b,texts:o,isWordLike:c,kinds:l,starts:u})))))));for(let e=0;e<x.len-1;e++){let t=fj(x.texts[e]);t!==null&&(x.kinds[e]!==`space`&&x.kinds[e]!==`preserved-space`||x.kinds[e+1]!==`text`||!HA(x.texts[e+1])||(x.texts[e]=t.space,x.isWordLike[e]=!1,x.kinds[e]=x.kinds[e]===`preserved-space`?`preserved-space`:`space`,x.texts[e+1]=t.marks+x.texts[e+1],x.starts[e+1]=x.starts[e]+t.space.length))}return x}function kj(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];let n=[],r=0;for(let t=0;t<e.len;t++)e.kinds[t]===`hard-break`&&(n.push({startSegmentIndex:r,endSegmentIndex:t,consumedEndSegmentIndex:t+1}),r=t+1);return r<e.len&&n.push({startSegmentIndex:r,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}var Aj=null,jj=new Map,Mj=null,Nj=RegExp(`\\p{Emoji_Presentation}`,`u`),Pj=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u,Fj=null,Ij=new Map;function Lj(){if(Aj!==null)return Aj;if(typeof OffscreenCanvas<`u`)return Aj=new OffscreenCanvas(1,1).getContext(`2d`),Aj;if(typeof document<`u`)return Aj=document.createElement(`canvas`).getContext(`2d`),Aj;throw Error(`Text measurement requires OffscreenCanvas or a DOM canvas context.`)}function Rj(e,t){let n=t.get(e);return n===void 0&&(n={width:Lj().measureText(e).width,containsCJK:WA(e)},t.set(e,n)),n}function zj(){if(Mj!==null)return Mj;if(typeof navigator>`u`)return Mj={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Mj;let e=navigator.userAgent,t=navigator.vendor===`Apple Computer, Inc.`&&e.includes(`Safari/`)&&!e.includes(`Chrome/`)&&!e.includes(`Chromium/`)&&!e.includes(`CriOS/`)&&!e.includes(`FxiOS/`)&&!e.includes(`EdgiOS/`),n=e.includes(`Chrome/`)||e.includes(`Chromium/`)||e.includes(`CriOS/`)||e.includes(`Edg/`);return Mj={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},Mj}function Bj(){return Fj===null&&(Fj=new Intl.Segmenter(void 0,{granularity:`grapheme`})),Fj}function Vj(e){return Nj.test(e)||e.includes(`️`)}function Hj(e,t,n){return n===0?t.width:t.width-function(e,t){return t.emojiCount===void 0&&(t.emojiCount=function(e){let t=0,n=Bj();for(let r of n.segment(e))Vj(r.segment)&&t++;return t}(e)),t.emojiCount}(e,t)*n}function Uj(e,t){for(;t<e.widths.length;){let n=e.kinds[t];if(n!==`space`&&n!==`zero-width-break`&&n!==`soft-hyphen`)break;t++}return t}function Wj(e,t){if(t<=0)return 0;let n=e%t;return Math.abs(n)<=1e-6?t:t-n}function Gj(e,t,n){let{widths:r,kinds:i,breakableFitAdvances:a}=e;if(r.length===0)return 0;let o=t+zj().lineFitEpsilon,s=0,c=0,l=!1,u=0,d=0,f=-1,p=0;function m(e=u,t=d,n=c){s++,c=0,l=!1,f=-1,p=0}function h(e,t){l=!0,u=e+1,d=0,c=t}function g(e,t,n){l=!0,u=e,d=t+1,c=n}function _(e,t){l?(c+=t,u=e+1,d=0):h(e,t)}function v(e,t){let n=a[e];for(let r=t;r<n.length;r++){let t=n[r];l?c+t>o?(m(),g(e,r,t)):(c+=t,u=e,d=r+1):g(e,r,t)}l&&u===e&&d===n.length&&(u=e+1,d=0)}let y=0;for(;y<r.length&&(l||(y=Uj(e,y),!(y>=r.length)));){let e=r[y],n=i[y],s=n===`space`||n===`preserved-space`||n===`tab`||n===`zero-width-break`||n===`soft-hyphen`;if(l)if(c+e>o){if(s){_(y,e),m(y+1,0,c-e),y++;continue}if(f>=0){if(u>f||u===f&&d>0){m();continue}m(f,0,p);continue}if(e>t&&a[y]!==null){m(),v(y,0),y++;continue}m()}else _(y,e),s&&(f=y+1,p=c-e),y++;else e>t&&a[y]!==null?v(y,0):h(y,e),s&&(f=y+1,p=c-e),y++}return l&&m(),s}var Kj=null;function qj(e,t){let n=[],r=[],i=0,a=!1,o=!1,s=!1;function c(){r.length!==0&&(n.push({text:r.length===1?r[0]:r.join(``),start:i}),r=[],a=!1,o=!1,s=!1)}function l(e,t,n){r=[e],i=t,a=n,o=pj(e),s=YA.has(e)}function u(e,t){r.push(e),a||=t;let n=pj(e);o=e.length===1&&ZA.has(e)&&o||n,s=!1}for(let n of(Kj===null&&(Kj=new Intl.Segmenter(void 0,{granularity:`grapheme`})),Kj).segment(e)){let e=n.segment,i=WA(e);r.length===0?l(e,n.index,i):s||JA.has(e)||ZA.has(e)||t.carryCJKAfterClosingQuote&&i&&o?u(e,i):a||i?(c(),l(e,n.index,i)):u(e,i)}return c(),n}function Jj(e){if(e.length<=1)return e;let t=[],n=[e[0].text],r=e[0].start,i=WA(e[0].text),a=qA(e[0].text);function o(){t.push({text:n.length===1?n[0]:n.join(``),start:r})}for(let t=1;t<e.length;t++){let s=e[t],c=WA(s.text),l=qA(s.text);i&&a?(n.push(s.text),i||=c,a=l):(o(),n=[s.text],r=s.start,i=c,a=l)}return o(),t}function Yj(e,t,n,r){let i=zj(),{cache:a,emojiCorrection:o}=function(e,t){Lj().font=e;let n=function(e){let t=jj.get(e);return t||(t=new Map,jj.set(e,t)),t}(e),r=function(e){let t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}(e);return{cache:n,fontSize:r,emojiCorrection:t?function(e,t){let n=Ij.get(e);if(n!==void 0)return n;let r=Lj();r.font=e;let i=r.measureText(`😀`).width;if(n=0,i>t+.5&&typeof document<`u`&&document.body!==null){let t=document.createElement(`span`);t.style.font=e,t.style.display=`inline-block`,t.style.visibility=`hidden`,t.style.position=`absolute`,t.textContent=`😀`,document.body.appendChild(t);let r=t.getBoundingClientRect().width;document.body.removeChild(t),i-r>.5&&(n=i-r)}return Ij.set(e,n),n}(e,r):0}}(t,(s=e.normalized,Pj.test(s)));var s;let c=Hj(`-`,Rj(`-`,a),o),l=8*Hj(` `,Rj(` `,a),o);if(e.len===0)return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]};let u=[],d=[],f=[],p=[],m=e.chunks.length<=1,h=n?[]:null,g=[],_=n?[]:null,v=Array.from({length:e.len});function y(e,t,n,r,i,a,o){i!==`text`&&i!==`space`&&i!==`zero-width-break`&&(m=!1),u.push(t),d.push(n),f.push(r),p.push(i),h?.push(a),g.push(o),_!==null&&_.push(e)}function b(e,t,n,r,s){let c=Rj(e,a),l=Hj(e,c,o),u=t===`space`||t===`preserved-space`||t===`zero-width-break`?0:l,d=t===`space`||t===`zero-width-break`?0:l;if(s&&r&&e.length>1){let r=`sum-graphemes`;Dj(e)?r=`pair-context`:i.preferPrefixWidthsForBreakableRuns&&(r=`segment-prefixes`),y(e,l,u,d,t,n,function(e,t,n,r,i){if(t.breakableFitAdvances!==void 0)return t.breakableFitAdvances;let a=Bj(),o=[];for(let t of a.segment(e))o.push(t.segment);if(o.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(i===`sum-graphemes`){let e=[];for(let t of o){let i=Rj(t,n);e.push(Hj(t,i,r))}return t.breakableFitAdvances=e,t.breakableFitAdvances}if(i===`pair-context`||o.length>96){let e=[],i=null,a=0;for(let t of o){let o=Hj(t,Rj(t,n),r);if(i===null)e.push(o);else{let o=i+t,s=Rj(o,n);e.push(Hj(o,s,r)-a)}i=t,a=o}return t.breakableFitAdvances=e,t.breakableFitAdvances}let s=[],c=``,l=0;for(let e of o){c+=e;let t=Hj(c,Rj(c,n),r);s.push(t-l),l=t}return t.breakableFitAdvances=s,t.breakableFitAdvances}(e,c,a,o,r));return}y(e,l,u,d,t,n,null)}for(let t=0;t<e.len;t++){v[t]=u.length;let n=e.texts[t],o=e.isWordLike[t],s=e.kinds[t],l=e.starts[t];if(s===`soft-hyphen`){y(n,0,c,c,s,l,null);continue}if(s===`hard-break`){y(n,0,0,0,s,l,null);continue}if(s===`tab`){y(n,0,0,0,s,l,null);continue}let d=Rj(n,a);if(s===`text`&&d.containsCJK){let e=qj(n,i),t=r===`keep-all`?Jj(e):e;for(let e=0;e<t.length;e++){let n=t[e];b(n.text,`text`,l+n.start,o,r===`keep-all`||!WA(n.text))}continue}b(n,s,l,o,!0)}let x=function(e,t,n){let r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a.startSegmentIndex<t.length?t[a.startSegmentIndex]:n,s=a.endSegmentIndex<t.length?t[a.endSegmentIndex]:n,c=a.consumedEndSegmentIndex<t.length?t[a.consumedEndSegmentIndex]:n;r.push({startSegmentIndex:o,endSegmentIndex:s,consumedEndSegmentIndex:c})}return r}(e.chunks,v,u.length),S=h===null?null:function(e,t){let n=function(e){let t=e.length;if(t===0)return null;let n=Array(t),r=!1;for(let i=0;i<t;){let a=e.charCodeAt(i),o=a,s=1;if(a>=55296&&a<=56319&&i+1<t){let t=e.charCodeAt(i+1);t>=56320&&t<=57343&&(o=t-56320+(a-55296<<10)+65536,s=2)}let c=FA(o);c!==`R`&&c!==`AL`&&c!==`AN`||(r=!0);for(let e=0;e<s;e++)n[i+e]=c;i+=s}if(!r)return null;let i=0;for(let e=0;e<t;e++){let t=n[e];if(t===`L`){i=0;break}if(t===`R`||t===`AL`){i=1;break}}let a=new Int8Array(t);for(let e=0;e<t;e++)a[e]=i;let o=1&i?`R`:`L`,s=o,c=s;for(let e=0;e<t;e++)n[e]===`NSM`?n[e]=c:c=n[e];c=s;for(let e=0;e<t;e++){let t=n[e];t===`EN`?n[e]=c===`AL`?`AN`:`EN`:t!==`R`&&t!==`L`&&t!==`AL`||(c=t)}for(let e=0;e<t;e++)n[e]===`AL`&&(n[e]=`R`);for(let e=1;e<t-1;e++)n[e]===`ES`&&n[e-1]===`EN`&&n[e+1]===`EN`&&(n[e]=`EN`),n[e]!==`CS`||n[e-1]!==`EN`&&n[e-1]!==`AN`||n[e+1]!==n[e-1]||(n[e]=n[e-1]);for(let e=0;e<t;e++){if(n[e]!==`EN`)continue;let r;for(r=e-1;r>=0&&n[r]===`ET`;r--)n[r]=`EN`;for(r=e+1;r<t&&n[r]===`ET`;r++)n[r]=`EN`}for(let e=0;e<t;e++){let t=n[e];t!==`WS`&&t!==`ES`&&t!==`ET`&&t!==`CS`||(n[e]=`ON`)}c=s;for(let e=0;e<t;e++){let t=n[e];t===`EN`?n[e]=c===`L`?`L`:`EN`:t!==`R`&&t!==`L`||(c=t)}for(let e=0;e<t;e++){if(n[e]!==`ON`)continue;let r=e+1;for(;r<t&&n[r]===`ON`;)r++;let i=(e>0?n[e-1]:s)===`L`?`L`:`R`;if(i===((r<t?n[r]:s)===`L`?`L`:`R`))for(let t=e;t<r;t++)n[t]=i;e=r-1}for(let e=0;e<t;e++)n[e]===`ON`&&(n[e]=o);for(let e=0;e<t;e++){let t=n[e];1&a[e]?t!==`L`&&t!==`AN`&&t!==`EN`||a[e]++:t===`R`?a[e]++:t!==`AN`&&t!==`EN`||(a[e]+=2)}return a}(e);if(n===null)return null;let r=new Int8Array(t.length);for(let e=0;e<t.length;e++)r[e]=n[t[e]];return r}(e.normalized,h);return _===null?{widths:u,lineEndFitAdvances:d,lineEndPaintAdvances:f,kinds:p,simpleLineWalkFastPath:m,segLevels:S,breakableFitAdvances:g,discretionaryHyphenWidth:c,tabStopAdvance:l,chunks:x}:{widths:u,lineEndFitAdvances:d,lineEndPaintAdvances:f,kinds:p,simpleLineWalkFastPath:m,segLevels:S,breakableFitAdvances:g,discretionaryHyphenWidth:c,tabStopAdvance:l,chunks:x,segments:_}}function Xj(e,t,n){return function(e,t,n,r){let i=r?.wordBreak??`normal`;return Yj(function(e,t,n=`normal`,r=`normal`){let i=function(e){let t=e??`normal`;return t===`pre-wrap`?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}(n),a=i.mode===`pre-wrap`?function(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,`
|
|
146
146
|
`).replace(/[\r\f]/g,`
|
|
147
147
|
`):e.replace(/\r\n/g,`
|
|
148
|
-
`)}(e):function(e){if(!LA.test(e))return e;let t=e.replace(IA,` `);return t.charCodeAt(0)===32&&(t=t.slice(1)),t.length>0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}(e);if(a.length===0)return{normalized:a,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};let o=r===`keep-all`?function(e){if(e.len<=1)return e;let t=[],n=[],r=[],i=[],a=null,o=!1,s=0,c=!1,l=!1;function u(){a!==null&&(t.push(gj(a)),n.push(o),r.push(`text`),i.push(s),a=null)}for(let d=0;d<e.len;d++){let f=e.texts[d],p=e.kinds[d],m=e.isWordLike[d],h=e.starts[d];if(p===`text`){let e=KA(f),t=qA(f);if(a!==null&&c&&l){a.push(f),o||=m,c||=e,l=t;continue}u(),a=[f],o=m,s=h,c=e,l=t;continue}u(),t.push(f),n.push(m),r.push(p),i.push(h)}return u(),{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}(Oj(a,t,i)):Oj(a,t,i);return $({normalized:a,chunks:kj(o,i)},o)}(e,zj(),r?.whiteSpace,i),t,!1,i)}(e,t,0,n)}var Zj=`__MARKSTREAM_VUE_HEIGHT_ESTIMATION_EXPERIMENT__`,Qj=(()=>{let e=globalThis;if(e[Zj])return e[Zj];let t={configs:{},controllers:{},revision:
|
|
149
|
-
`)}return t.length>0?t:null}function aM(e,t,n){if(!e||!Number.isFinite(t)||t<=0||!function(){if($j!=null)return $j;if(typeof document>`u`)return!1;try{let e=document.createElement(`canvas`);return $j=!!e.getContext?.call(e,`2d`),$j}catch{return $j=!1,!1}}())return null;try{let r=Math.round(100*t)/100,i=[n.whiteSpace??`pre-wrap`,n.font,n.lineHeight,n.wrapperOverhead,n.widthAdjustment,r,e].join(`\0`),a=Qj.blockEstimateCache.get(i);if(a)return Qj.blockEstimateCache.delete(i),Qj.blockEstimateCache.set(i,a),{kind:`simple-text`,height:a.height,contentHeight:a.contentHeight};let o=n.whiteSpace??`pre-wrap`,s=function(e,t,n){let r=function(e,t){return e.simpleLineWalkFastPath?Gj(e,t):function(e,t){if(e.simpleLineWalkFastPath)return Gj(e,t);let{widths:n,lineEndFitAdvances:r,lineEndPaintAdvances:i,kinds:a,breakableFitAdvances:o,discretionaryHyphenWidth:s,tabStopAdvance:c,chunks:l}=e;if(n.length===0||l.length===0)return 0;let u=zj(),d=u.lineFitEpsilon,f=t+d,p=0,m=0,h=!1,g=0,_=0,v=-1,y=0,b=0,x=null;function S(){v=-1,y=0,b=0,x=null}function C(e=g,t=_,n=m){p++,m=0,h=!1,S()}function w(e,t){h=!0,g=e+1,_=0,m=t}function T(e,t,n){h=!0,g=e,_=t+1,m=n}function E(e,t){h?(m+=t,g=e+1,_=0):w(e,t)}function D(e,t,n,a){if(!t)return;let o=e===`tab`?0:r[n],s=e===`tab`?a:i[n];v=n+1,y=m-a+o,b=m-a+s,x=e}function O(e,t){let n=o[e];for(let r=t;r<n.length;r++){let t=n[r];h?m+t>f?(C(),T(e,r,t)):(m+=t,g=e,_=r+1):T(e,r,t)}h&&g===e&&_===n.length&&(g=e+1,_=0)}function k(e){if(x!==`soft-hyphen`)return!1;let n=o[e];if(n==null)return!1;let{fitCount:r,fittedWidth:i}=function(e,t,n,r,i){let a=0,o=t;for(;a<e.length;){let t=o+e[a];if((a+1<e.length?t+i:t)>n+r)break;o=t,a++}return{fitCount:a,fittedWidth:o}}(n,m,t,d,s);return r!==0&&(m=i,g=e,_=r,S(),r===n.length?(g=e+1,_=0,!0):(C(e,r,i+s),O(e,r),!0))}function A(e){p++,S()}for(let e=0;e<l.length;e++){let d=l[e];if(d.startSegmentIndex===d.endSegmentIndex){A();continue}h=!1,m=0,d.startSegmentIndex,g=d.startSegmentIndex,_=0,S();let p=d.startSegmentIndex;for(;p<d.endSegmentIndex;){let e=a[p],l=e===`space`||e===`preserved-space`||e===`tab`||e===`zero-width-break`||e===`soft-hyphen`,d=e===`tab`?Wj(m,c):n[p];if(e!==`soft-hyphen`)if(h){if(m+d>f){let n=m+(e===`tab`?0:r[p]),a=m+(e===`tab`?d:i[p]);if(x===`soft-hyphen`&&u.preferEarlySoftHyphenBreak&&y<=f){C(v,0,b);continue}if(x===`soft-hyphen`&&k(p)){p++;continue}if(l&&n<=f){E(p,d),C(p+1,0,a),p++;continue}if(v>=0&&y<=f){if(g>v||g===v&&_>0){C();continue}let e=v;C(e,0,b),p=e;continue}if(d>t&&o[p]!==null){C(),O(p,0),p++;continue}C();continue}E(p,d),D(e,l,p,d),p++}else d>t&&o[p]!==null?O(p,0):w(p,d),D(e,l,p,d),p++;else h&&(g=p+1,_=0,v=p+1,y=m+s,b=m+s,x=e),p++}if(h){let e=v===d.consumedEndSegmentIndex?b:m;C(d.consumedEndSegmentIndex,0,e)}}return p}(e,t)}(e,t);return{lineCount:r,height:r*n}}(function(e,t,n){let r=`${n}\0${t}\0${e}`,i=Qj.preparedCache.get(r);if(i)return Qj.preparedCache.delete(r),Qj.preparedCache.set(r,i),i.prepared;let a=Xj(e,t,{whiteSpace:n});for(Qj.preparedCache.set(r,{prepared:a});Qj.preparedCache.size>240;){let e=Qj.preparedCache.keys().next().value;if(!e)break;Qj.preparedCache.delete(e)}return a}(e,n.font,o),Math.max(24,r-n.widthAdjustment),n.lineHeight),c=Math.max(n.lineHeight,s.height),l=Math.max(n.lineHeight,Math.round(c+n.wrapperOverhead));for(Qj.blockEstimateCache.set(i,{height:l,contentHeight:Math.round(c)});Qj.blockEstimateCache.size>4e3;){let e=Qj.blockEstimateCache.keys().next().value;if(!e)break;Qj.blockEstimateCache.delete(e)}return{kind:`simple-text`,height:l,contentHeight:Math.round(c)}}catch{return null}}function oM(e,t,n){if(!n||!e||!Number.isFinite(t)||t<=0)return null;if(e.type===`paragraph`){let r=iM(e.children);return r&&n.paragraph?aM(r,t,n.paragraph):null}if(e.type===`heading`){let r=Number(e.level||0),i=iM(e.children),a=n.headings[r];return i&&a?aM(i,t,a):null}if(e.type===`list_item`){let r=Array.isArray(e.children)?e.children:[];if(r.length!==1||r[0]?.type!==`paragraph`||!n.listItem)return null;let i=iM(r[0]?.children);return i?aM(i,t,n.listItem):null}if(e.type===`list`){let r=Array.isArray(e.items)?e.items:[];if(!r.length)return null;let i=Math.max(0,n.listWrapperOverhead);for(let e of r){let r=oM(e,t,n);if(!r)return null;i+=r.height}return{kind:`simple-text`,height:Math.max(1,Math.round(i)),contentHeight:Math.max(1,Math.round(i))}}return null}function sM(e){if(!e)return 1;let t=String(e).split(/\r?\n/);return Math.max(1,t.length)}function cM(e,t){if(!e||e.type!==`code_block`)return null;let n=t.rendererKind,r=!1!==t.showHeader,i=function(e){return e.diff?Math.max(sM(String(e.originalCode??``)),sM(String(e.updatedCode??``)),sM(String(e.code??``))):sM(function(e,t){let n=String(e??``);return t?n:n.replace(/\r\n$|\n$|\r$/,``)}(e.code,!0===e.loading))}(e),a=!!e.diff,o=0,s=500;if(n===`monaco`){let e=t.monacoOptions??{},n=function(e,t){let n=typeof e?.fontSize==`number`&&e.fontSize>0?e.fontSize:t?13:12;return typeof e?.lineHeight==`number`&&e.lineHeight>0?e.lineHeight:t?30:Math.round(1.5*n)}(e,a),r=function(e,t){if(!t)return 0;let n=typeof e?.padding?.top==`number`?e.padding.top:10,r=typeof e?.padding?.bottom==`number`?e.padding.bottom:22;return Math.max(0,n)+Math.max(0,r)}(e,a);s=typeof e.MAX_HEIGHT==`number`&&e.MAX_HEIGHT>0?e.MAX_HEIGHT:500,o=Math.round(a?i*n+r:i*(n+1.5))}else n===`markdown`?o=Math.round(21*i+32):(o=Math.round(21*i+32),s=1/0);let c=Math.max(1,Math.min(o,s));return{kind:`code-block`,height:Math.round(c+(r?40:0)),contentHeight:c,rendererKind:n}}function lM(e){return e?`${e.fontStyle||`normal`} ${e.fontWeight||`400`} ${e.fontSize||`16px`} ${e.fontFamily||`sans-serif`}`:``}function uM(e,t,n=`pre-wrap`){if(!e||!t||typeof window>`u`)return null;let r=window.getComputedStyle(t),i=e.offsetHeight,a=nM(r.lineHeight,1.5*nM(r.fontSize,16)),o=e.getBoundingClientRect().width,s=t.getBoundingClientRect().width;return{font:lM(r),lineHeight:a,wrapperOverhead:Math.max(0,i-a),widthAdjustment:Math.max(0,o-s),whiteSpace:n}}var dM=new Set([`node`,`key`,`ref`,`ctx`,`renderNode`,`indexKey`,`__proto__`,`prototype`,`constructor`]);function fM(e,t={}){let n={},r=new Set(t.omit??[]);if(!e||typeof e!=`object`)return n;let i=Object.getOwnPropertyDescriptors(e);for(let[e,t]of Object.entries(i))dM.has(e)||r.has(e)||t.enumerable&&`value`in t&&(n[e]=t.value);return n}var pM=!1;function mM(){return pM}function hM(e){let t=typeof e==`number`?e:Number.parseFloat(String(e??``));return Number.isFinite(t)&&t>0?t:null}function gM(e){for(let t of e.split(/\r?\n/)){let e=t.trim();if(!(!e||e.startsWith(`%%`)))return(e.match(/^([A-Z][\w-]*)\b/i)?.[1])?.toLowerCase()||``}return``}function _M(e){let t=e.split(/\r?\n/).map(e=>e.trim()).filter(e=>e&&!e.startsWith(`%%`)),n=Math.max(1,t.length),r=gM(e);return r===`gantt`?220+28*n:r===`sequencediagram`?180+26*n:r===`classdiagram`||r===`statediagram`||r===`erdiagram`?180+24*n:r===`flowchart`||r===`graph`?170+28*n:200+22*n}function vM(e){let t=e.split(/\r?\n/).filter(e=>/^\s*-\s+/.test(e)).length;return t>=3?500:t>0?280+60*t:360}function yM(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function bM(e,t=360,n=500){return yM(e,t,n)}function xM(e,t=360,n=500){return yM(e,t,n)}function SM(e,t,n,r){let i=function(e){return Math.max(0,Math.ceil(e.scrollHeight||0)-Math.ceil(e.clientHeight||0))}(e),a=function(e,t){return Number.isFinite(e)?Math.min(Math.max(0,e),t):0}(n,i);if(!r.isReverseFlexScrollRoot(e))return void(e.scrollTop=a);let o=Math.max(0,i-a),s=[-o,o],c=s[0],l=1/0;for(let n of s){e.scrollTop=n;let i=r.getNormalizedScrollTop(e,t,!1),o=Math.abs(i-a);o<l&&(l=o,c=n)}e.scrollTop=c;let u=r.epsilonPx??2;Math.abs(r.getNormalizedScrollTop(e,t,!1)-a)>u&&(e.scrollTop=c)}var CM=Symbol(`MarkstreamMathBlockMinHeightCache`);function wM(){return
|
|
150
|
-
`,t-1)+1;return e.slice(n,t).trim()}function LM(e){let t=RM(e);return t.length>=2&&t.every(e=>{let t=e.trim();return t.length>=1&&t.replace(/^:/,``).replace(/:$/,``).split(``).every(e=>e===`-`)})}function RM(e){return e.includes(`|`)?e.replace(/^\|/,``).replace(/\|$/,``).split(`|`):[]}function zM(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function BM(e){let t=String(e??``);return`${t.length}:${zM(t)}`}function VM(e,t=new WeakMap,n=0){if(e==null||typeof e==`number`||typeof e==`boolean`)return String(e);if(typeof e==`string`)return`s:${function(e){return e.length<=8192?BM(e):`${e.length}:${zM(e.slice(0,8192))}:truncated`}(e)}`;if(typeof e==`function`)return`fn:${PM(e)}`;if(typeof e!=`object`)return typeof e;let r=e,i=t.get(r);if(i)return`cycle:${i}`;if(n>=6)return`object:${PM(r)}`;let a=PM(r);if(t.set(r,a),Array.isArray(e)){let r=e.slice(0,200);return`a:${e.length}:${r.map(e=>VM(e,t,n+1)).join(`,`)}`}if(typeof e==`object`){let r=e,i=Object.keys(r).sort(),a=i.slice(0,80);return`o:${i.length}:${a.sort().map(e=>`${e}:${VM(r[e],t,n+1)}`).join(`;`)}`}return typeof e}function HM(e){return typeof e==`object`&&!!e&&typeof e.type==`string`&&typeof e.raw==`string`}function UM(e,t=new WeakMap,n=0){return Array.isArray(e)?`a:${e.length}:${e.slice(0,200).map(e=>HM(e)?KM(e,t,n+1):UM(e,t,n+1)).join(`,`)}`:HM(e)?KM(e,t,n):VM(e,t,n)}function WM(e,t,n){return Object.keys(e).sort().filter(e=>e!==`children`&&!OM.includes(e)).map(r=>{let i=e[r];return typeof i==`string`?`${r}=s:${BM(i)}`:typeof i==`number`||typeof i==`boolean`||i==null?`${r}=${String(i)}`:typeof i==`function`?`${r}=fn:${PM(i)}`:DM.has(r)&&(Array.isArray(i)||typeof i==`object`)?`${r}=${UM(i,t,n+1)}`:i&&typeof i==`object`?`${r}=object:${PM(i)}`:``}).filter(Boolean).join(`;`)}function GM(e){return OM.map(t=>{let n=e[t];return typeof n==`string`?`${t}=s:${BM(n)}`:``}).filter(Boolean).join(`;`)}function KM(e,t=new WeakMap,n=0){let r=AM.get(e);if(r)return r;let i=e,a=t.get(i);if(a)return`node-cycle:${a}`;if(n>=6)return`node:${e.type}:${PM(i)}`;let o=PM(i);t.set(i,o);let s=function(e,t,n){let r=e,i=Array.isArray(r.children)?r.children:[],a=i.length?i.slice(0,200).map(e=>KM(e,t,n+1)).join(`|`):``;return[e.type,GM(r),WM(r,t,n),i.length,a].join(`:`)}(e,t,n);return AM.set(i,s),s}function qM(e,t){return KM(e)===KM(t)}function JM(e,t,n){let r=MM(),i=t===`stabilizeSignatureMs`?`stabilizeSignatureCallCount`:`primeSignatureCallCount`;try{return n()}finally{e[t]+=MM()-r,e[i]+=1,e.signatureMs=e.stabilizeSignatureMs+e.primeSignatureMs,e.signatureCallCount=e.stabilizeSignatureCallCount+e.primeSignatureCallCount}}function YM(e,t,n){return JM(t,n,()=>KM(e))}function XM(e,t,n){return YM(e,n,`stabilizeSignatureMs`)===YM(t,n,`stabilizeSignatureMs`)}function ZM(e){return{reusedNodeCount:0,dirtyStartIndex:e>0?0:-1,stablePrefixNodeCount:0,dirtyTailNodeCount:e}}function QM(e,t,n){return e<0?0:Math.max(t.length,n.length)-e}function $M(e,t){return e.length===t.length&&e===t}function eN(e,t,n=0){if(n>=4)return null;if(e.type!==t.type)return!1;let r=e,i=t,a=Object.keys(r).filter(e=>e!==`type`&&e!==`children`).sort(),o=Object.keys(i).filter(e=>e!==`type`&&e!==`children`).sort();if(a.length!==o.length)return!1;for(let e=0;e<a.length;e++){let t=a[e];if(t!==o[e])return!1;let n=r[t],s=i[t];if(typeof n!=typeof s)return!1;if(typeof n!=`string`){if(typeof n!=`number`&&typeof n!=`boolean`&&n!=null)return null;if(!Object.is(n,s))return!1}else if(typeof s!=`string`||!$M(n,s))return!1}let s=Object.prototype.hasOwnProperty.call(r,`children`);if(s!==Object.prototype.hasOwnProperty.call(i,`children`))return!1;if(!s)return!0;let c=r.children,l=i.children;if(!Array.isArray(c)||!Array.isArray(l))return null;if(c.length!==l.length)return!1;for(let e=0;e<c.length;e++){let t=c[e],r=l[e];if(!HM(t)||!HM(r))return null;let i=eN(t,r,n+1);if(i==null)return null;if(!i)return!1}return!0}function tN(e,t){return!e||!t?!1:e===t?!0:e.type===t.type?eN(e,t)??qM(e,t):!1}function nN(e,t,n){if(!e||!t)return!1;if(e===t)return!0;if(e.type!==t.type)return!1;let r=null;return JM(n,`stabilizeSignatureMs`,()=>{r=eN(e,t)}),r??XM(e,t,n)}function rN(e,t){let n={};for(let r of TM){let i=e[r],a=t?.[r];typeof i==`number`&&(n[r]=i-(typeof a==`number`?a:0))}return n}function iN(e,t){let n=RT(t.instanceMsgId),r=new Map,i=t.smoothStreamingEnabled??
|
|
148
|
+
`)}(e):function(e){if(!LA.test(e))return e;let t=e.replace(IA,` `);return t.charCodeAt(0)===32&&(t=t.slice(1)),t.length>0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}(e);if(a.length===0)return{normalized:a,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};let o=r===`keep-all`?function(e){if(e.len<=1)return e;let t=[],n=[],r=[],i=[],a=null,o=!1,s=0,c=!1,l=!1;function u(){a!==null&&(t.push(gj(a)),n.push(o),r.push(`text`),i.push(s),a=null)}for(let d=0;d<e.len;d++){let f=e.texts[d],p=e.kinds[d],m=e.isWordLike[d],h=e.starts[d];if(p===`text`){let e=KA(f),t=qA(f);if(a!==null&&c&&l){a.push(f),o||=m,c||=e,l=t;continue}u(),a=[f],o=m,s=h,c=e,l=t;continue}u(),t.push(f),n.push(m),r.push(p),i.push(h)}return u(),{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}(Oj(a,t,i)):Oj(a,t,i);return $({normalized:a,chunks:kj(o,i)},o)}(e,zj(),r?.whiteSpace,i),t,!1,i)}(e,t,0,n)}var Zj=`__MARKSTREAM_VUE_HEIGHT_ESTIMATION_EXPERIMENT__`,Qj=(()=>{let e=globalThis;if(e[Zj])return e[Zj];let t={configs:{},controllers:{},revision:M(0),preparedCache:new Map,blockEstimateCache:new Map};return e[Zj]=t,t})(),$j=null,eM=Qj.revision;function tM(e){var t;return e&&(t=Qj.configs[e])!=null?t:null}function nM(e,t){let n=Number.parseFloat(String(e??``));return Number.isFinite(n)&&n>0?n:t}function rM(e){return e?.type===`text`||e?.type===`emoji`||e?.type===`hardbreak`}function iM(e){if(!Array.isArray(e)||e.length===0)return null;let t=``;for(let n of e){if(!rM(n))return null;n.type===`text`?t+=String(n.content??``):n.type===`emoji`?t+=String(n.name??n.raw??``):n.type===`hardbreak`&&(t+=`
|
|
149
|
+
`)}return t.length>0?t:null}function aM(e,t,n){if(!e||!Number.isFinite(t)||t<=0||!function(){if($j!=null)return $j;if(typeof document>`u`)return!1;try{let e=document.createElement(`canvas`);return $j=!!e.getContext?.call(e,`2d`),$j}catch{return $j=!1,!1}}())return null;try{let r=Math.round(100*t)/100,i=[n.whiteSpace??`pre-wrap`,n.font,n.lineHeight,n.wrapperOverhead,n.widthAdjustment,r,e].join(`\0`),a=Qj.blockEstimateCache.get(i);if(a)return Qj.blockEstimateCache.delete(i),Qj.blockEstimateCache.set(i,a),{kind:`simple-text`,height:a.height,contentHeight:a.contentHeight};let o=n.whiteSpace??`pre-wrap`,s=function(e,t,n){let r=function(e,t){return e.simpleLineWalkFastPath?Gj(e,t):function(e,t){if(e.simpleLineWalkFastPath)return Gj(e,t);let{widths:n,lineEndFitAdvances:r,lineEndPaintAdvances:i,kinds:a,breakableFitAdvances:o,discretionaryHyphenWidth:s,tabStopAdvance:c,chunks:l}=e;if(n.length===0||l.length===0)return 0;let u=zj(),d=u.lineFitEpsilon,f=t+d,p=0,m=0,h=!1,g=0,_=0,v=-1,y=0,b=0,x=null;function S(){v=-1,y=0,b=0,x=null}function C(e=g,t=_,n=m){p++,m=0,h=!1,S()}function w(e,t){h=!0,g=e+1,_=0,m=t}function T(e,t,n){h=!0,g=e,_=t+1,m=n}function E(e,t){h?(m+=t,g=e+1,_=0):w(e,t)}function D(e,t,n,a){if(!t)return;let o=e===`tab`?0:r[n],s=e===`tab`?a:i[n];v=n+1,y=m-a+o,b=m-a+s,x=e}function O(e,t){let n=o[e];for(let r=t;r<n.length;r++){let t=n[r];h?m+t>f?(C(),T(e,r,t)):(m+=t,g=e,_=r+1):T(e,r,t)}h&&g===e&&_===n.length&&(g=e+1,_=0)}function k(e){if(x!==`soft-hyphen`)return!1;let n=o[e];if(n==null)return!1;let{fitCount:r,fittedWidth:i}=function(e,t,n,r,i){let a=0,o=t;for(;a<e.length;){let t=o+e[a];if((a+1<e.length?t+i:t)>n+r)break;o=t,a++}return{fitCount:a,fittedWidth:o}}(n,m,t,d,s);return r!==0&&(m=i,g=e,_=r,S(),r===n.length?(g=e+1,_=0,!0):(C(e,r,i+s),O(e,r),!0))}function A(e){p++,S()}for(let e=0;e<l.length;e++){let d=l[e];if(d.startSegmentIndex===d.endSegmentIndex){A();continue}h=!1,m=0,d.startSegmentIndex,g=d.startSegmentIndex,_=0,S();let p=d.startSegmentIndex;for(;p<d.endSegmentIndex;){let e=a[p],l=e===`space`||e===`preserved-space`||e===`tab`||e===`zero-width-break`||e===`soft-hyphen`,d=e===`tab`?Wj(m,c):n[p];if(e!==`soft-hyphen`)if(h){if(m+d>f){let n=m+(e===`tab`?0:r[p]),a=m+(e===`tab`?d:i[p]);if(x===`soft-hyphen`&&u.preferEarlySoftHyphenBreak&&y<=f){C(v,0,b);continue}if(x===`soft-hyphen`&&k(p)){p++;continue}if(l&&n<=f){E(p,d),C(p+1,0,a),p++;continue}if(v>=0&&y<=f){if(g>v||g===v&&_>0){C();continue}let e=v;C(e,0,b),p=e;continue}if(d>t&&o[p]!==null){C(),O(p,0),p++;continue}C();continue}E(p,d),D(e,l,p,d),p++}else d>t&&o[p]!==null?O(p,0):w(p,d),D(e,l,p,d),p++;else h&&(g=p+1,_=0,v=p+1,y=m+s,b=m+s,x=e),p++}if(h){let e=v===d.consumedEndSegmentIndex?b:m;C(d.consumedEndSegmentIndex,0,e)}}return p}(e,t)}(e,t);return{lineCount:r,height:r*n}}(function(e,t,n){let r=`${n}\0${t}\0${e}`,i=Qj.preparedCache.get(r);if(i)return Qj.preparedCache.delete(r),Qj.preparedCache.set(r,i),i.prepared;let a=Xj(e,t,{whiteSpace:n});for(Qj.preparedCache.set(r,{prepared:a});Qj.preparedCache.size>240;){let e=Qj.preparedCache.keys().next().value;if(!e)break;Qj.preparedCache.delete(e)}return a}(e,n.font,o),Math.max(24,r-n.widthAdjustment),n.lineHeight),c=Math.max(n.lineHeight,s.height),l=Math.max(n.lineHeight,Math.round(c+n.wrapperOverhead));for(Qj.blockEstimateCache.set(i,{height:l,contentHeight:Math.round(c)});Qj.blockEstimateCache.size>4e3;){let e=Qj.blockEstimateCache.keys().next().value;if(!e)break;Qj.blockEstimateCache.delete(e)}return{kind:`simple-text`,height:l,contentHeight:Math.round(c)}}catch{return null}}function oM(e,t,n){if(!n||!e||!Number.isFinite(t)||t<=0)return null;if(e.type===`paragraph`){let r=iM(e.children);return r&&n.paragraph?aM(r,t,n.paragraph):null}if(e.type===`heading`){let r=Number(e.level||0),i=iM(e.children),a=n.headings[r];return i&&a?aM(i,t,a):null}if(e.type===`list_item`){let r=Array.isArray(e.children)?e.children:[];if(r.length!==1||r[0]?.type!==`paragraph`||!n.listItem)return null;let i=iM(r[0]?.children);return i?aM(i,t,n.listItem):null}if(e.type===`list`){let r=Array.isArray(e.items)?e.items:[];if(!r.length)return null;let i=Math.max(0,n.listWrapperOverhead);for(let e of r){let r=oM(e,t,n);if(!r)return null;i+=r.height}return{kind:`simple-text`,height:Math.max(1,Math.round(i)),contentHeight:Math.max(1,Math.round(i))}}return null}function sM(e){if(!e)return 1;let t=String(e).split(/\r?\n/);return Math.max(1,t.length)}function cM(e,t){if(!e||e.type!==`code_block`)return null;let n=t.rendererKind,r=!1!==t.showHeader,i=function(e){return e.diff?Math.max(sM(String(e.originalCode??``)),sM(String(e.updatedCode??``)),sM(String(e.code??``))):sM(function(e,t){let n=String(e??``);return t?n:n.replace(/\r\n$|\n$|\r$/,``)}(e.code,!0===e.loading))}(e),a=!!e.diff,o=0,s=500;if(n===`monaco`){let e=t.monacoOptions??{},n=function(e,t){let n=typeof e?.fontSize==`number`&&e.fontSize>0?e.fontSize:t?13:12;return typeof e?.lineHeight==`number`&&e.lineHeight>0?e.lineHeight:t?30:Math.round(1.5*n)}(e,a),r=function(e,t){if(!t)return 0;let n=typeof e?.padding?.top==`number`?e.padding.top:10,r=typeof e?.padding?.bottom==`number`?e.padding.bottom:22;return Math.max(0,n)+Math.max(0,r)}(e,a);s=typeof e.MAX_HEIGHT==`number`&&e.MAX_HEIGHT>0?e.MAX_HEIGHT:500,o=Math.round(a?i*n+r:i*(n+1.5))}else n===`markdown`?o=Math.round(21*i+32):(o=Math.round(21*i+32),s=1/0);let c=Math.max(1,Math.min(o,s));return{kind:`code-block`,height:Math.round(c+(r?40:0)),contentHeight:c,rendererKind:n}}function lM(e){return e?`${e.fontStyle||`normal`} ${e.fontWeight||`400`} ${e.fontSize||`16px`} ${e.fontFamily||`sans-serif`}`:``}function uM(e,t,n=`pre-wrap`){if(!e||!t||typeof window>`u`)return null;let r=window.getComputedStyle(t),i=e.offsetHeight,a=nM(r.lineHeight,1.5*nM(r.fontSize,16)),o=e.getBoundingClientRect().width,s=t.getBoundingClientRect().width;return{font:lM(r),lineHeight:a,wrapperOverhead:Math.max(0,i-a),widthAdjustment:Math.max(0,o-s),whiteSpace:n}}var dM=new Set([`node`,`key`,`ref`,`ctx`,`renderNode`,`indexKey`,`__proto__`,`prototype`,`constructor`]);function fM(e,t={}){let n={},r=new Set(t.omit??[]);if(!e||typeof e!=`object`)return n;let i=Object.getOwnPropertyDescriptors(e);for(let[e,t]of Object.entries(i))dM.has(e)||r.has(e)||t.enumerable&&`value`in t&&(n[e]=t.value);return n}var pM=!1;function mM(){return pM}function hM(e){let t=typeof e==`number`?e:Number.parseFloat(String(e??``));return Number.isFinite(t)&&t>0?t:null}function gM(e){for(let t of e.split(/\r?\n/)){let e=t.trim();if(!(!e||e.startsWith(`%%`)))return(e.match(/^([A-Z][\w-]*)\b/i)?.[1])?.toLowerCase()||``}return``}function _M(e){let t=e.split(/\r?\n/).map(e=>e.trim()).filter(e=>e&&!e.startsWith(`%%`)),n=Math.max(1,t.length),r=gM(e);return r===`gantt`?220+28*n:r===`sequencediagram`?180+26*n:r===`classdiagram`||r===`statediagram`||r===`erdiagram`?180+24*n:r===`flowchart`||r===`graph`?170+28*n:200+22*n}function vM(e){let t=e.split(/\r?\n/).filter(e=>/^\s*-\s+/.test(e)).length;return t>=3?500:t>0?280+60*t:360}function yM(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function bM(e,t=360,n=500){return yM(e,t,n)}function xM(e,t=360,n=500){return yM(e,t,n)}function SM(e,t,n,r){let i=function(e){return Math.max(0,Math.ceil(e.scrollHeight||0)-Math.ceil(e.clientHeight||0))}(e),a=function(e,t){return Number.isFinite(e)?Math.min(Math.max(0,e),t):0}(n,i);if(!r.isReverseFlexScrollRoot(e))return void(e.scrollTop=a);let o=Math.max(0,i-a),s=[-o,o],c=s[0],l=1/0;for(let n of s){e.scrollTop=n;let i=r.getNormalizedScrollTop(e,t,!1),o=Math.abs(i-a);o<l&&(l=o,c=n)}e.scrollTop=c;let u=r.epsilonPx??2;Math.abs(r.getNormalizedScrollTop(e,t,!1)-a)>u&&(e.scrollTop=c)}var CM=Symbol(`MarkstreamMathBlockMinHeightCache`);function wM(){return I(CM,null)}var TM=[`total`,`cacheHits`,`appendHits`,`tailHits`,`fullParses`,`chunkedParses`],EM=[`tokenCloneMs`,`processTokensMs`,`parseMarkdownToStructureTotalMs`],DM=new Set([`attrs`,`data`,`items`,`header`,`payload`,`props`,`rows`,`cells`,`term`,`definition`]),OM=[`raw`,`content`,`code`,`originalCode`,`updatedCode`],kM=new WeakMap,AM=new WeakMap,jM=1;function MM(){return typeof performance<`u`?performance.now():Date.now()}function NM(e){let t=e.stream;return t&&typeof t.stats==`function`?t.stats():null}function PM(e){if(typeof e!=`object`&&typeof e!=`function`||e===null)return``;let t=e,n=kM.get(t);return n||(n=jM++,kM.set(t,n)),String(n)}function FM(e,t,n,r={}){let i=!1!==r.includeFinal,a={md:PM(t),customMarkdownIt:PM(n),requireClosingStrong:!0===e.requireClosingStrong,customHtmlTags:e.customHtmlTags??[],streamParse:e.streamParse??`auto`,validateLink:PM(e.validateLink),preTransformTokens:PM(e.preTransformTokens),postTransformTokens:PM(e.postTransformTokens)};return i&&(a.final=!0===e.final),JSON.stringify(a)}function IM(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===10;)--t;let n=e.lastIndexOf(`
|
|
150
|
+
`,t-1)+1;return e.slice(n,t).trim()}function LM(e){let t=RM(e);return t.length>=2&&t.every(e=>{let t=e.trim();return t.length>=1&&t.replace(/^:/,``).replace(/:$/,``).split(``).every(e=>e===`-`)})}function RM(e){return e.includes(`|`)?e.replace(/^\|/,``).replace(/\|$/,``).split(`|`):[]}function zM(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function BM(e){let t=String(e??``);return`${t.length}:${zM(t)}`}function VM(e,t=new WeakMap,n=0){if(e==null||typeof e==`number`||typeof e==`boolean`)return String(e);if(typeof e==`string`)return`s:${function(e){return e.length<=8192?BM(e):`${e.length}:${zM(e.slice(0,8192))}:truncated`}(e)}`;if(typeof e==`function`)return`fn:${PM(e)}`;if(typeof e!=`object`)return typeof e;let r=e,i=t.get(r);if(i)return`cycle:${i}`;if(n>=6)return`object:${PM(r)}`;let a=PM(r);if(t.set(r,a),Array.isArray(e)){let r=e.slice(0,200);return`a:${e.length}:${r.map(e=>VM(e,t,n+1)).join(`,`)}`}if(typeof e==`object`){let r=e,i=Object.keys(r).sort(),a=i.slice(0,80);return`o:${i.length}:${a.sort().map(e=>`${e}:${VM(r[e],t,n+1)}`).join(`;`)}`}return typeof e}function HM(e){return typeof e==`object`&&!!e&&typeof e.type==`string`&&typeof e.raw==`string`}function UM(e,t=new WeakMap,n=0){return Array.isArray(e)?`a:${e.length}:${e.slice(0,200).map(e=>HM(e)?KM(e,t,n+1):UM(e,t,n+1)).join(`,`)}`:HM(e)?KM(e,t,n):VM(e,t,n)}function WM(e,t,n){return Object.keys(e).sort().filter(e=>e!==`children`&&!OM.includes(e)).map(r=>{let i=e[r];return typeof i==`string`?`${r}=s:${BM(i)}`:typeof i==`number`||typeof i==`boolean`||i==null?`${r}=${String(i)}`:typeof i==`function`?`${r}=fn:${PM(i)}`:DM.has(r)&&(Array.isArray(i)||typeof i==`object`)?`${r}=${UM(i,t,n+1)}`:i&&typeof i==`object`?`${r}=object:${PM(i)}`:``}).filter(Boolean).join(`;`)}function GM(e){return OM.map(t=>{let n=e[t];return typeof n==`string`?`${t}=s:${BM(n)}`:``}).filter(Boolean).join(`;`)}function KM(e,t=new WeakMap,n=0){let r=AM.get(e);if(r)return r;let i=e,a=t.get(i);if(a)return`node-cycle:${a}`;if(n>=6)return`node:${e.type}:${PM(i)}`;let o=PM(i);t.set(i,o);let s=function(e,t,n){let r=e,i=Array.isArray(r.children)?r.children:[],a=i.length?i.slice(0,200).map(e=>KM(e,t,n+1)).join(`|`):``;return[e.type,GM(r),WM(r,t,n),i.length,a].join(`:`)}(e,t,n);return AM.set(i,s),s}function qM(e,t){return KM(e)===KM(t)}function JM(e,t,n){let r=MM(),i=t===`stabilizeSignatureMs`?`stabilizeSignatureCallCount`:`primeSignatureCallCount`;try{return n()}finally{e[t]+=MM()-r,e[i]+=1,e.signatureMs=e.stabilizeSignatureMs+e.primeSignatureMs,e.signatureCallCount=e.stabilizeSignatureCallCount+e.primeSignatureCallCount}}function YM(e,t,n){return JM(t,n,()=>KM(e))}function XM(e,t,n){return YM(e,n,`stabilizeSignatureMs`)===YM(t,n,`stabilizeSignatureMs`)}function ZM(e){return{reusedNodeCount:0,dirtyStartIndex:e>0?0:-1,stablePrefixNodeCount:0,dirtyTailNodeCount:e}}function QM(e,t,n){return e<0?0:Math.max(t.length,n.length)-e}function $M(e,t){return e.length===t.length&&e===t}function eN(e,t,n=0){if(n>=4)return null;if(e.type!==t.type)return!1;let r=e,i=t,a=Object.keys(r).filter(e=>e!==`type`&&e!==`children`).sort(),o=Object.keys(i).filter(e=>e!==`type`&&e!==`children`).sort();if(a.length!==o.length)return!1;for(let e=0;e<a.length;e++){let t=a[e];if(t!==o[e])return!1;let n=r[t],s=i[t];if(typeof n!=typeof s)return!1;if(typeof n!=`string`){if(typeof n!=`number`&&typeof n!=`boolean`&&n!=null)return null;if(!Object.is(n,s))return!1}else if(typeof s!=`string`||!$M(n,s))return!1}let s=Object.prototype.hasOwnProperty.call(r,`children`);if(s!==Object.prototype.hasOwnProperty.call(i,`children`))return!1;if(!s)return!0;let c=r.children,l=i.children;if(!Array.isArray(c)||!Array.isArray(l))return null;if(c.length!==l.length)return!1;for(let e=0;e<c.length;e++){let t=c[e],r=l[e];if(!HM(t)||!HM(r))return null;let i=eN(t,r,n+1);if(i==null)return null;if(!i)return!1}return!0}function tN(e,t){return!e||!t?!1:e===t?!0:e.type===t.type?eN(e,t)??qM(e,t):!1}function nN(e,t,n){if(!e||!t)return!1;if(e===t)return!0;if(e.type!==t.type)return!1;let r=null;return JM(n,`stabilizeSignatureMs`,()=>{r=eN(e,t)}),r??XM(e,t,n)}function rN(e,t){let n={};for(let r of TM){let i=e[r],a=t?.[r];typeof i==`number`&&(n[r]=i-(typeof a==`number`?a:0))}return n}function iN(e,t){let n=RT(t.instanceMsgId),r=new Map,i=t.smoothStreamingEnabled??R(()=>!1),a=V(t.renderContent.value),o,s=[],c=``,l=``,u=``,d=0,f=0,m=MM();function h(){o&&=(clearTimeout(o),void 0)}function g(){h();let e=t.renderContent.value;a.value!==e&&(a.value=e),m=MM()}p([t.renderContent,t.effectiveFinal,i],([t,n,r])=>{a.value!==t&&(!r||n||function(e,t){if(!e&&t||t.length<=80||t.length<e.length||!t.startsWith(e))return!0;let n=t.slice(e.length);return!!n&&(!!LM(IM(t))||!(!n.includes(`
|
|
151
151
|
|
|
152
152
|
`)&&!/(?:^|\n)(?:#{1,6}\s|[-+*]\s+|\d+[.)]\s+|>\s*|`{3,}|~{3,})/.test(n))||n.endsWith(`
|
|
153
|
-
`)&&!function(e){let t=IM(e);if(LM(t))return!1;let n=RM(t);return n.length>=2&&n.some(e=>e.trim())}(t))}(a.value,t)?h():function(){if(f+=1,o)return;let t=Math.max(0,function(e){let t=e.parseCoalesceMs;return typeof t==`number`&&Number.isFinite(t)&&t>=0?t:80}(e)-(MM()-p));t<=0?h():o=setTimeout(h,t)}())},{flush:`sync`,immediate:!0}),j(m);let g=I(()=>{var n;return Y_(e.customHtmlTags,e.parseOptions?.customHtmlTags,(n=t.customComponentsMap?.value??{},Object.entries(n).map(([e,t])=>{let n=q_(e);return t==null||!n||qD(n)||E_.has(n)||k_.has(n)?``:n}).filter(Boolean)))}),_=I(()=>{let{key:e,tags:i}=X_(g.value);if(!e)return n;let a=r.get(e);if(a)return a;let o=RT(t.instanceMsgId,{customHtmlTags:i});return r.set(e,o),o}),v=I(()=>{let t=_.value;return e.customMarkdownIt?e.customMarkdownIt(t):t}),y=I(()=>{var n;let r=e.parseOptions??{},i=t.effectiveFinal.value,a=g.value,o=i!=null,s=a.length>0;return o||s||r.streamParse==null?$($(zD($({},r),{streamParse:(n=r.streamParse)==null||n}),o?{final:i}:{}),s?{customHtmlTags:a}:{}):r}),b=I(()=>new Set((y.value.customHtmlTags??[]).map(e=>String(e).trim().toLowerCase()).filter(Boolean))),x=I(()=>FM(y.value,v.value,e.customMarkdownIt,{includeFinal:!0})),S=I(()=>FM(y.value,v.value,e.customMarkdownIt,{includeFinal:!1}));return E([x,S],([e,t],[n,r])=>{n&&(e===n&&t===r||(h(),t!==r&&(s=[],u=``)))},{flush:`sync`}),{effectiveCustomHtmlTags:g,effectiveCustomHtmlTagsSet:b,mdBase:_,mdInstance:v,mergedParseOptions:y,parsedNodes:I(()=>{if(e.nodes?.length)return s=[],u=``,re(e.nodes.slice());let n=a.value;if(!n)return s=[],u=``,[];let r=t.debugPerformanceEnabled.value,i=r?MM():0,o=v.value,p=x.value,m=S.value;c&&p!==c&&function(e){var t,n;(n=(t=e.stream)?.reset)==null||n.call(t)}(o),l&&m!==l&&(s=[],u=``);let h=s.length>0&&n.startsWith(u)&&m===l,g=r?NM(o):null,_=r?{}:void 0,b=Pw(n,o,_?zD($({},y.value),{__timing:_}):y.value),C=r?MM():0,w=r?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0,T,E=r?ZM(b.length):void 0,D=0,O=0;if(h){let e=r?MM():0;if(w){let e=function(e,t,n){if(!t.length)return{nodes:e,metrics:ZM(e.length)};let r=function(e,t,n){let r=Math.min(e.length,t.length);for(let i=0;i<r;i++)if(!nN(t[i],e[i],n))return i;return e.length===t.length?-1:r}(e,t,n);if(r<0)return{nodes:t,metrics:{reusedNodeCount:e.length,dirtyStartIndex:r,stablePrefixNodeCount:e.length,dirtyTailNodeCount:0}};let i=e.slice(),a=r;for(let e=0;e<r;e++)i[e]=t[e];for(let o=r;o<e.length;o++){let r=t[o],s=e[o];r&&XM(r,s,n)&&(i[o]=r,a+=1)}return{nodes:i,metrics:{reusedNodeCount:a,dirtyStartIndex:r,stablePrefixNodeCount:r,dirtyTailNodeCount:QM(r,e,t)}}}(b,s,w);T=e.nodes,E=e.metrics}else{let e=function(e,t){if(!t.length)return{nodes:e,metrics:ZM(e.length)};let n=function(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(!tN(t[r],e[r]))return r;return e.length===t.length?-1:n}(e,t);if(n<0)return{nodes:t,metrics:{reusedNodeCount:e.length,dirtyStartIndex:n,stablePrefixNodeCount:e.length,dirtyTailNodeCount:0}};let r=e.slice(),i=n;for(let e=0;e<n;e++)r[e]=t[e];for(let a=n;a<e.length;a++){let n=t[a],o=e[a];n&&qM(n,o)&&(r[a]=n,i+=1)}return{nodes:r,metrics:{reusedNodeCount:i,dirtyStartIndex:n,stablePrefixNodeCount:n,dirtyTailNodeCount:QM(n,e,t)}}}(b,s);T=e.nodes,E=e.metrics}D=r?MM()-e:0,O=E?.dirtyStartIndex==null||E.dirtyStartIndex<0?T.length:E.dirtyStartIndex}else T=b;w?function(e,t,n=0){for(let r=Math.max(0,n);r<e.length;r++)JM(t,`primeSignatureMs`,()=>KM(e[r]))}(T,w,O):function(e,t=0){for(let n=Math.max(0,t);n<e.length;n++)KM(e[n])}(T,O);let k=r?MM()-C:0;if(d+=1,u=n,c=p,l=m,s=T,r){let e=NM(o),r=typeof e?.total==`number`&&e.total>(g?.total??0);t.logPerf(r?`parse(stream)`:`parse(sync)`,$($($({rendererId:t.instanceMsgId,ms:Math.round(MM()-i),nodes:T.length,contentLength:n.length,parseCommitCount:d,parseCoalescedCount:f,nodeReuseMs:k,signatureMs:w?.signatureMs??0,stabilizeSignatureMs:w?.stabilizeSignatureMs??0,primeSignatureMs:w?.primeSignatureMs??0,signatureCallCount:w?.signatureCallCount??0,stabilizeSignatureCallCount:w?.stabilizeSignatureCallCount??0,primeSignatureCallCount:w?.primeSignatureCallCount??0,stabilizeMs:D},E??{}),_?Object.fromEntries(EM.map(e=>[e,_[e]??0])):{}),e?{streamMode:e.lastMode,streamDelta:rN(e,g),streamStats:e}:{}))}return re(T)})}}function aN(e){let{isClient:t}=e,n=M(new Set),r=new Map,i=new Map,a=new Map;function o(e){if(!t)return;let n=a.get(e);n!=null&&(window.clearTimeout(n),a.delete(e))}function s(){if(t)for(let e of a.values())window.clearTimeout(e);a.clear()}function c(){n.value=new Set}return{visibleNodeIndices:n,nodeVisibilityHandles:r,nodeVisibilityWatchStops:i,nodeVisibilityFallbackTimers:a,clearVisibilityFallback:o,clearAllVisibilityFallbacks:s,markNodeVisible:function(t,r=!0){var i;r&&o(t),function(t,r){if((a=(i=e.shouldTrackVisibleNodeIndices)?.call(e))!=null&&!a)return;var i,a;let o=n.value,s=o.has(t);if(r){if(s)return;let e=new Set(o);e.add(t),n.value=e;return}if(!s)return;let c=new Set(o);c.delete(t),n.value=c}(t,r),r&&((i=e.onNodeMarkedVisible)==null||i.call(e,t))},resetNodeVisibleState:c,cleanupNodeVisibility:function(t){var s;if(e.shouldCleanupNodeVisibility&&!e.shouldCleanupNodeVisibility())return;for(let[e,n]of i.entries())e<t||(n(),i.delete(e));for(let[n,i]of r.entries())n<t||(i.destroy(),r.delete(n),o(n),(s=e.onNodeVisibilityCleaned)==null||s.call(e,n));for(let e of Array.from(a.keys()))e<t||o(e);if(!n.value.size)return;let c=new Set;for(let e of n.value)e<t&&c.add(e);n.value=c},destroyNodeVisibilityState:function(){c();for(let e of i.values())e();i.clear();for(let e of r.values())e.destroy();r.clear(),s()}}}function oN(e={}){let t=M(``),n=M(``),r=M(!1),i=cE(e),a=()=>{let e=i.getSnapshot();t.value=e.source,n.value=e.visible,r.value=e.done},o=i.subscribe(a);a();let s=I(()=>Math.max(0,t.value.length-n.value.length)),c=I(()=>s.value===0),l=I(()=>r.value&&c.value);return B()&&j(()=>{o(),i.destroy()}),{source:t,visible:n,done:r,final:l,caughtUp:c,pendingChars:s,enqueue:e=>i.enqueue(e),finish:e=>i.finish(e),flush:()=>i.flush(),reset:e=>i.reset(e),pause:()=>i.pause(),resume:()=>i.resume()}}var sN=/auto|scroll|overlay/i;function cN(e){if(!e)return!1;let t=(e.overflowY||``).toLowerCase(),n=(e.overflow||``).toLowerCase();return sN.test(t)||sN.test(n)}function lN(e){let t=Math.ceil(e.scrollHeight)>Math.ceil(e.clientHeight)+1,n=Math.ceil(e.scrollWidth)>Math.ceil(e.clientWidth)+1;return t||n}var uN=c({name:`InfographicBlockNodeLoading`,props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){let t=I(()=>xM(hM(e.estimatedPreviewHeightPx)??vM(String(e.node.code??``))));return()=>_(`div`,{class:`infographic-block-container rounded-lg border overflow-hidden`,style:{margin:`var(--ms-flow-diagram-y) 0`,background:`var(--diagram-bg)`,borderColor:`var(--diagram-border)`,color:`hsl(var(--ms-foreground))`},"data-markstream-infographic":`1`,"data-markstream-mode":`pending`},[e.showHeader?_(`div`,{class:`infographic-block-header flex justify-between items-center border-b`,style:{padding:`var(--ms-inset-panel-y) var(--ms-inset-panel-x)`,background:`var(--diagram-header-bg)`,borderColor:`var(--diagram-border)`,minHeight:`calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding) + var(--ms-inset-panel-y) + var(--ms-inset-panel-y) + 1px)`}},[_(`div`,{class:`flex items-center gap-x-2 overflow-hidden`},[_(`span`,{class:`icon-slot action-icon shrink-0`,style:{display:`inline-flex`,width:`var(--ms-action-btn-icon)`,height:`var(--ms-action-btn-icon)`}}),_(`span`,{class:`infographic-label font-medium font-mono truncate`,style:{fontSize:`var(--ms-text-label)`,color:`hsl(var(--ms-muted-foreground))`}},`Infographic`)]),_(`div`,{class:`infographic-header-actions flex items-center opacity-0 pointer-events-none`,style:{gap:`var(--ms-gap-header-actions)`},"aria-hidden":`true`},Array.from({length:4},()=>_(`span`,{class:`infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded`,style:{width:`calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))`,height:`calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))`}})))]):null,_(`div`,{class:`infographic-preview relative overflow-hidden block`,style:{height:`${t.value}px`,minHeight:`var(--ms-size-diagram-min-height)`,background:`var(--diagram-bg)`}},[_(`div`,{class:`absolute inset-0`},[_(`div`,{class:`w-full text-center flex items-center justify-center min-h-full`})])])])}}),dN=c({name:`MermaidBlockNodeLoading`,props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){let t=I(()=>bM(hM(e.estimatedPreviewHeightPx)??_M(String(e.node.code??``))));return()=>_(`div`,{class:`mermaid-block-container rounded-lg border overflow-hidden`,style:{margin:`var(--ms-flow-diagram-y) 0`,borderColor:`var(--diagram-border)`},"data-markstream-mermaid":`1`,"data-markstream-mode":`pending`},[e.showHeader?_(`div`,{class:`mermaid-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]`,style:{background:`var(--diagram-header-bg)`,borderColor:`var(--diagram-border)`}},[_(`div`,{class:`flex items-center gap-x-2 overflow-hidden`},[_(`span`,{class:`mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate`,style:{color:`var(--code-action-fg)`}},`Mermaid`)]),_(`div`,{class:`mermaid-header-actions flex items-center gap-[var(--ms-gap-header-actions)] opacity-0 pointer-events-none`,"aria-hidden":`true`},Array.from({length:4},()=>_(`span`,{class:`mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded`},[_(`span`,{class:`action-icon block`})])))]):null,_(`div`,{class:`mermaid-preview-area relative overflow-hidden block`,style:{height:`${t.value}px`,minHeight:`var(--ms-size-diagram-min-height)`,background:`var(--diagram-bg)`}},[_(`div`,{class:`_mermaid w-full text-center flex items-center justify-center min-h-full`,style:{fontFamily:`inherit`,contentVisibility:`auto`,contain:`content`,containIntrinsicSize:`var(--ms-size-diagram-min-height) 240px`}})])])}}),fN=[`data-custom-id`],pN={class:`m-0 p-0`},mN=[`data-probe`],hN=[`data-node-index`,`data-node-type`],gN=eO(c(zD($({},{name:`NodeRenderer`}),{__name:`NodeRenderer`,props:{content:{},nodes:{},final:{type:Boolean},parseOptions:{},customMarkdownIt:{},debugPerformance:{type:Boolean,default:!1},customHtmlTags:{},mode:{},htmlPolicy:{},viewportPriority:{type:Boolean},codeBlockStream:{type:Boolean,default:!0},codeBlockDarkTheme:{},codeBlockLightTheme:{},codeBlockMonacoOptions:{},codeRenderer:{},renderCodeBlocksAsPre:{type:Boolean,default:void 0},codeBlockMinWidth:{},codeBlockMaxWidth:{},codeBlockProps:{},mermaidProps:{},d2Props:{},infographicProps:{},showTooltips:{type:Boolean,default:void 0},themes:{},langs:{},isDark:{type:Boolean},customId:{},indexKey:{},typewriter:{type:Boolean,default:!1},smoothStreaming:{type:[Boolean,String],default:`auto`},smoothStreamingOptions:{},parseCoalesceMs:{},fade:{type:Boolean,default:void 0},batchRendering:{type:Boolean,default:void 0},initialRenderBatchSize:{},renderBatchSize:{},renderBatchDelay:{},renderBatchBudgetMs:{},renderBatchIdleTimeoutMs:{},deferNodesUntilVisible:{type:Boolean,default:void 0},maxLiveNodes:{},liveNodeBuffer:{},nodeVirtual:{type:[Boolean,String],default:void 0},virtualScroll:{},renderAsFragment:{type:Boolean}},emits:[`copy`,`handleArtifactClick`,`click`,`mouseover`,`mouseout`,`virtual-state-change`,`height-change`,`render-settled`,`render-final`,`anchor-change`],setup(e,{expose:t,emit:n}){let r=e,o=n,c=s(),u=i(`markstreamNestedRendererProps`,void 0);function d(e){let t=r[e];return function(e){let t=c?.vnode.props;return!!t&&(Object.prototype.hasOwnProperty.call(t,e)||Object.prototype.hasOwnProperty.call(t,String(e).replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)))}(e)?t:u?.value?.[e]??t}let m=mM(),_={docs:{showTooltips:!0,fade:!0,batchRendering:!0,initialRenderBatchSize:40,renderBatchSize:80,renderBatchDelay:16,renderBatchBudgetMs:6,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:320,liveNodeBuffer:60,nodeVirtual:`auto`},chat:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:16,renderBatchSize:16,renderBatchDelay:8,renderBatchBudgetMs:4,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:`auto`},minimal:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:16,renderBatchSize:16,renderBatchDelay:8,renderBatchBudgetMs:4,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:`auto`}},v=I(()=>{return(e=d(`mode`))===`chat`||e===`minimal`||e===`docs`?e:`docs`;var e}),y=I(()=>{let e=d(`renderCodeBlocksAsPre`),t=d(`codeRenderer`);return!0===e?`pre`:t===`pre`||t===`shiki`||t===`monaco`?t:!1===e||v.value===`docs`?`monaco`:`pre`}),b=I(()=>_[v.value]),x=I(()=>d(`showTooltips`)??b.value.showTooltips),A=I(()=>d(`fade`)??b.value.fade),j=I(()=>d(`batchRendering`)??b.value.batchRendering),ee=I(()=>d(`initialRenderBatchSize`)??b.value.initialRenderBatchSize),P=I(()=>d(`renderBatchSize`)??b.value.renderBatchSize),te=I(()=>d(`renderBatchDelay`)??b.value.renderBatchDelay),ne=I(()=>d(`renderBatchBudgetMs`)??b.value.renderBatchBudgetMs),ie=I(()=>d(`renderBatchIdleTimeoutMs`)??b.value.renderBatchIdleTimeoutMs),ae=I(()=>d(`deferNodesUntilVisible`)??b.value.deferNodesUntilVisible),oe=I(()=>d(`maxLiveNodes`)??b.value.maxLiveNodes),se=I(()=>d(`liveNodeBuffer`)??b.value.liveNodeBuffer),le=I(()=>d(`nodeVirtual`)??b.value.nodeVirtual),z={get content(){return r.content},get nodes(){return r.nodes},get final(){return r.final},get parseOptions(){return d(`parseOptions`)},get customMarkdownIt(){return d(`customMarkdownIt`)},get debugPerformance(){return r.debugPerformance},get customHtmlTags(){return d(`customHtmlTags`)},get mode(){return d(`mode`)},get htmlPolicy(){return d(`htmlPolicy`)},get viewportPriority(){return d(`viewportPriority`)},get codeBlockStream(){return d(`codeBlockStream`)},get codeBlockDarkTheme(){return d(`codeBlockDarkTheme`)},get codeBlockLightTheme(){return d(`codeBlockLightTheme`)},get codeBlockMonacoOptions(){return d(`codeBlockMonacoOptions`)},get codeRenderer(){return d(`codeRenderer`)},get renderCodeBlocksAsPre(){return d(`renderCodeBlocksAsPre`)},get codeBlockMinWidth(){return d(`codeBlockMinWidth`)},get codeBlockMaxWidth(){return d(`codeBlockMaxWidth`)},get codeBlockProps(){return d(`codeBlockProps`)},get mermaidProps(){return d(`mermaidProps`)},get d2Props(){return d(`d2Props`)},get infographicProps(){return d(`infographicProps`)},get showTooltips(){return x.value},get themes(){return d(`themes`)},get langs(){return d(`langs`)},get isDark(){return d(`isDark`)},get customId(){return d(`customId`)},get indexKey(){return r.indexKey},get typewriter(){return d(`typewriter`)},get smoothStreaming(){return r.smoothStreaming},get smoothStreamingOptions(){return d(`smoothStreamingOptions`)},get parseCoalesceMs(){return d(`parseCoalesceMs`)},get fade(){return A.value},get batchRendering(){return j.value},get initialRenderBatchSize(){return ee.value},get renderBatchSize(){return P.value},get renderBatchDelay(){return te.value},get renderBatchBudgetMs(){return ne.value},get renderBatchIdleTimeoutMs(){return ie.value},get deferNodesUntilVisible(){return ae.value},get maxLiveNodes(){return oe.value},get liveNodeBuffer(){return se.value},get nodeVirtual(){return le.value},get virtualScroll(){return r.virtualScroll},get renderAsFragment(){return r.renderAsFragment}};function de(e){o(`height-change`,e)}function fe(e){o(`virtual-state-change`,e)}function pe(e){o(`anchor-change`,e)}let B=M(),me=M(null),he=M(null),H=M(null),ge=ue({1:null,2:null,3:null,4:null,5:null,6:null}),_e=M(!1),ve=new Map,ye=M(0),be=M(0),xe=M({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function Se(){if(!0!==r.virtualScroll?.enabled)return null;let e=r.virtualScroll?.scrollRoot;return Ce(typeof e==`function`?e():e)}function Ce(e){return e?typeof HTMLElement<`u`&&e instanceof HTMLElement?e:typeof e==`object`&&`value`in e?Ce(e.value):typeof e==`object`&&`$el`in e?Ce(e.$el):null:null}let{isClient:q,renderAsFragment:we,debugPerformanceEnabled:Te,resolvedShowTooltips:Ee,resolvedHtmlPolicy:De,inheritedSmoothStreaming:J,ownsTypewriterCursor:Oe}=function(e){let t=typeof window<`u`,n=p(),r=i(`markstreamHtmlPolicy`,void 0),a=i(`markstreamTypewriterCursor`,void 0),o=i(`markstreamSmoothStreaming`,void 0);return{isClient:t,renderAsFragment:I(()=>!0===e.renderAsFragment),debugPerformanceEnabled:I(()=>!!(e.debugPerformance&&t&&typeof console<`u`)),resolvedShowTooltips:I(()=>{if(typeof e.showTooltips==`boolean`)return e.showTooltips;let t=n.showTooltips??n[`show-tooltips`];return t===``||!0===t||t===`true`||!1!==t&&t!==`false`&&void 0}),resolvedHtmlPolicy:I(()=>e.htmlPolicy??r?.value??`safe`),inheritedSmoothStreaming:o,inheritedTypewriterCursor:a,ownsTypewriterCursor:I(()=>!0!==a?.value)}}(z),{resolveViewportRoot:ke,resolveScrollContainer:Ae,isReverseFlexScrollRoot:je,getNormalizedScrollTop:Me,getOffsetTopWithinRoot:Ne}=function(e,t){function n(){return t.scrollRoot?.call(t)??null}function r(t){if(typeof window>`u`)return null;let r=n();if(r)return r;let i=t??e.value;if(!i)return null;let a=i.ownerDocument||document,o=a.scrollingElement||a.documentElement,s=i;for(;s&&s!==a.body&&s!==o;){if(cN(window.getComputedStyle(s))&&lN(s))return s;s=s.parentElement}return null}function i(e){if(!t.isClient)return!1;try{let t=window.getComputedStyle(e);return!!(t.display||``).toLowerCase().includes(`flex`)&&(t.flexDirection||``).toLowerCase().endsWith(`reverse`)}catch{return!1}}function a(e,t,n){if(n)return o(t);let r=e.scrollTop;if(!i(e))return r;let a=r<0?-r:r;return Math.max(0,(e.scrollHeight??0)-(e.clientHeight??0))-a}function o(e){let t=Number(e.scrollingElement?.scrollTop),n=Number(e.documentElement?.scrollTop??0),r=Number(e.body?.scrollTop??0);return Math.max(0,Number.isFinite(t)?t:0,Number.isFinite(n)?n:0,Number.isFinite(r)?r:0)}return{resolveViewportRoot:r,resolveScrollContainer:function(t){let i=n();if(i)return i;let a=r(t??e.value??null);if(a)return a;let o=t?.ownerDocument??e.value?.ownerDocument??(typeof document<`u`?document:null);return o?.scrollingElement||o?.documentElement||null},isReverseFlexScrollRoot:i,getNormalizedScrollTop:a,getOffsetTopWithinRoot:function(e,t){let n=t.ownerDocument||e.ownerDocument||document;if(function(e,t){return e===t.documentElement||e===t.body||e===t.scrollingElement}(t,n))return e.getBoundingClientRect().top+o(n);let r=t.getBoundingClientRect(),i=e.getBoundingClientRect(),s=a(t,n,!1);return i.top-r.top+s}}}(B,{isClient:q,scrollRoot:Se});a(`markstreamShowTooltips`,Ee),a(`markstreamHtmlPolicy`,De),a(`markstreamTypewriter`,I(()=>!1!==z.typewriter)),a(`markstreamFade`,I(()=>!1!==z.fade)),a(`markstreamTypewriterCursor`,I(()=>!0)),a(`markstreamTextStreamState`,ve),a(`markstreamStreamVersion`,ye),a(`markstreamParseOptions`,I(()=>z.parseOptions)),a(`markstreamCustomMarkdownIt`,I(()=>z.customMarkdownIt));let{smoothStreamingEnabled:Pe,renderContent:Fe,effectiveFinal:Ie}=function(e,t){let n=oN(e.smoothStreamingOptions),r=I(()=>!1!==e.smoothStreaming&&!e.nodes?.length&&(!0===e.smoothStreaming||!t.inheritedSmoothStreaming?.value)&&(!0===e.smoothStreaming||!0===e.typewriter||(e.maxLiveNodes??0)<=0)),i=M(!t.isClient||!0===e.smoothStreaming);f(()=>{i.value=!0});let a=I(()=>i.value&&r.value),o=I(()=>a.value?n.visible.value:e.content??``),s=I(()=>{let t=e.parseOptions??{};return e.final??t.final}),c=I(()=>{let e=s.value;return a.value&&e!=null?!!e&&n.caughtUp.value:e});return E([()=>e.content,()=>e.nodes,a,s],([e,t,r,i])=>{if(t?.length)return void n.reset(``);let a=e??``;if(!r)return n.reset(a),void(i&&n.finish({flush:!0}));let o=n.source.value;a?a===o||(a.startsWith(o)?n.enqueue(a.slice(o.length)):n.reset(a)):n.reset(``),i&&n.finish()},{immediate:!0}),{smoothStream:n,smoothStreamingEligible:r,smoothStreamingEnabled:a,renderContent:o,requestedFinal:s,effectiveFinal:c}}(z,{isClient:q,inheritedSmoothStreaming:J});a(`markstreamSmoothStreaming`,Pe);let Le=M(!1),Re=``,ze=!1,Be=null;function Ve(){q&&Be!=null&&(window.clearTimeout(Be),Be=null)}function He(){Le.value=!1,Ve()}function Ue(e,t){if(!Te.value)return;let n=function(){if(!Te.value)return null;let e=Je(We),t=Je(Ge),n=Math.max(qe,t);if(e<=0&&n<=0)return null;let r={total:e,maxPerFrame:n,byLabel:(i=We,Object.fromEntries(Array.from(i.entries()).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0]))))};var i;return We.clear(),Ge.clear(),qe=0,r}();console.info(`[markstream-vue][perf] ${e}`,n?zD($({},t),{layoutReads:n}):t)}E([Fe,()=>r.nodes,Ie],([e,t,n])=>{let i=e??``;t?.length||!0===n?(He(),Re=i,ze=!0):ze?(Re&&i.length>Re.length&&i.startsWith(Re)?(Le.value=!0,q&&(Ve(),Be=window.setTimeout(()=>{var e;Be=null,!0===Ie.value||(e=r.nodes)!=null&&e.length||(wa(),Le.value=!1,Ea())},1200))):(i.length<Re.length||!i.startsWith(Re))&&He(),Re=i):(Re=i,ze=!0)},{flush:`sync`,immediate:!0});let We=new Map,Ge=new Map,Ke=!1,qe=0;function Je(e){let t=0;for(let n of e.values())t+=n;return t}function Ye(){qe=Math.max(qe,Je(Ge)),Ge.clear(),Ke=!1}function Y(e,t){return function(e){Te.value&&(We.set(e,(We.get(e)??0)+1),Ge.set(e,(Ge.get(e)??0)+1),Ke||(Ke=!0,q&&typeof window<`u`&&typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(Ye):typeof queueMicrotask==`function`?queueMicrotask(Ye):setTimeout(Ye,0)))}(e),t()}let Xe=z.customId?`renderer-${z.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,Ze=function(e){let t=new Map;return{scope:e,cache:t,clear:()=>t.clear()}}(Xe),Qe=I(()=>`${Xe}:${ye.value}`);a(CM,Ze);let $e=XD(()=>z.customId),{effectiveCustomHtmlTagsSet:et,mergedParseOptions:tt,parsedNodes:X}=iN(z,{instanceMsgId:Xe,renderContent:Fe,effectiveFinal:Ie,smoothStreamingEnabled:Pe,debugPerformanceEnabled:Te,customComponentsMap:$e,logPerf:Ue});E(X,()=>{Ze.clear(),ye.value+=1},{immediate:!0});let nt=I(()=>({customId:z.customId,customHtmlTags:tt.value.customHtmlTags,parseOptions:z.parseOptions,customMarkdownIt:z.customMarkdownIt,htmlPolicy:De.value,viewportPriority:z.viewportPriority,mode:v.value,codeRenderer:y.value,codeBlockStream:z.codeBlockStream,codeBlockDarkTheme:z.codeBlockDarkTheme,codeBlockLightTheme:z.codeBlockLightTheme,codeBlockMonacoOptions:z.codeBlockMonacoOptions,renderCodeBlocksAsPre:z.renderCodeBlocksAsPre,codeBlockMinWidth:z.codeBlockMinWidth,codeBlockMaxWidth:z.codeBlockMaxWidth,codeBlockProps:z.codeBlockProps,mermaidProps:z.mermaidProps,d2Props:z.d2Props,infographicProps:z.infographicProps,showTooltips:Ee.value,themes:z.themes,langs:z.langs,isDark:z.isDark,typewriter:z.typewriter,smoothStreamingOptions:z.smoothStreamingOptions,parseCoalesceMs:z.parseCoalesceMs,fade:z.fade}));a(`markstreamNestedRendererProps`,nt);let rt=I(()=>X.value),it=I(()=>X.value.length),at=M(null),ot=M(null),st=M(null),ct=M(null),lt=r.indexKey!=null&&String(r.indexKey).startsWith(`list-item-`),ut=!lt&&z.customId?tM(z.customId):null,dt=I(()=>ut?(eM.value,tM(z.customId)):null),ft=I(()=>!!(q&&!we.value&&z.customId&&!lt&&dt.value?.enabled)),pt=I(()=>!!(!we.value&&r.virtualScroll?.enabled)),Z=M(!1);f(()=>{Z.value=!0});let Q=I(()=>!!(q&&pt.value));a(`markstreamHostScrollManaged`,Q);let mt=I(()=>!!(Z.value&&Q.value)),ht=I(()=>ft.value||Q.value),gt=I(()=>ft.value||mt.value),_t=I(()=>ht.value&&!1!==dt.value?.textEstimation),vt=I(()=>ht.value&&!1!==dt.value?.codeBlockEstimation);function yt(){let e=be.value||Y(`getMeasuredContainerWidth.clientWidth`,()=>B.value?.clientWidth||0);return Number.isFinite(e)&&e>0?e:0}let bt=I(()=>{let e=yt();return e>0?Math.max(1,Math.round(e)):640}),xt=I(()=>Math.max(1,z.maxLiveNodes??320)),St=I(()=>!we.value&&!1!==z.nodeVirtual&&!((z.maxLiveNodes??0)<=0)&&(!0===z.nodeVirtual?X.value.length>0:X.value.length>xt.value)),Ct=I(()=>St.value||ft.value||Q.value),wt=I(()=>!1!==z.viewportPriority&&!_e.value),Tt=dA(e=>ke(e??B.value??null),wt),{requestFrame:Et,cancelFrame:Dt,hasIdleCallback:Ot,isTestEnv:kt}=function(e){return{requestFrame:e.isClient&&typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame.bind(window):null,cancelFrame:e.isClient&&typeof window.cancelAnimationFrame==`function`?window.cancelAnimationFrame.bind(window):null,hasIdleCallback:e.isClient&&typeof window.requestIdleCallback==`function`,isTestEnv:function(){return typeof globalThis>`u`||!(`process`in globalThis)?void 0:Object.getOwnPropertyDescriptor(globalThis,`process`)?.value?.env}()?.NODE_ENV===`test`}}({isClient:q}),{resolvedBatchSize:At,resolvedInitialBatch:jt,batchingEnabled:Mt,incrementalRenderingActive:Nt,renderedCount:Pt,previousRenderContext:Ft,adaptiveBatchSize:It,previousBatchConfig:Lt}=function(e,t){let n=I(()=>{let t=Math.trunc(e.renderBatchSize??80);return Number.isFinite(t)?Math.max(0,t):0}),r=I(()=>{let t=Math.trunc(e.initialRenderBatchSize??n.value);return Number.isFinite(t)?Math.max(0,t):n.value}),i=I(()=>!t.renderAsFragment.value&&!1!==e.batchRendering&&n.value>0&&t.isClient&&!t.isTestEnv),a=M(0),o=M({key:e.indexKey,total:0}),s=M(Math.max(1,n.value||1)),c=I(()=>i.value&&(e.maxLiveNodes??0)<=0);return{resolvedBatchSize:n,resolvedInitialBatch:r,batchingEnabled:i,incrementalRenderingActive:c,renderedCount:a,previousRenderContext:o,adaptiveBatchSize:s,previousBatchConfig:M({batchSize:n.value,initial:r.value,delay:e.renderBatchDelay??16,enabled:c.value})}}(z,{isClient:q,isTestEnv:kt,renderAsFragment:we}),Rt=new Map,zt=new Map,Bt=new WeakMap,Vt=null,Ht=new WeakMap,Ut=new Map,Wt=M(0),Gt=I(()=>(Wt.value,Array.from(Rt.entries()).sort((e,t)=>e[0]-t[0]))),Kt=M(null),qt=M(null),Jt=null,Yt=0,Xt=null,{activeRestoreAnchor:Zt,getRelativeScrollTopWithinContainer:Qt,setRelativeScrollTopWithinContainer:$t,resolveAnchorOffset:en,clearRestoreReconcile:tn,scheduleRestoreReconcile:nn,captureRestoreAnchor:rn,restoreAnchor:an,getAnchorDrift:on}=function(e){let{isClient:t,containerRef:n,parsedNodeCount:r,requestFrame:i,cancelFrame:a,resolveScrollContainer:o,getNormalizedScrollTop:s,getOffsetTopWithinRoot:c,isReverseFlexScrollRoot:l,estimateIndexForOffset:u,estimateHeightRange:d,getFallbackNodeHeight:f,clamp:p}=e,m=M(null),h=null,g=[];function _(){let e=o(),t=n.value;if(!e||!t)return null;let r=e.ownerDocument||t.ownerDocument||document;if(e===r.documentElement||e===r.body||e===r.scrollingElement){let e=t.getBoundingClientRect();return Math.max(0,-e.top)}return Math.max(0,s(e,r,!1)-c(t,e))}function v(e){var t;let r=o(),i=n.value;if(!r||!i)return;let a=Math.max(0,e),u=r.ownerDocument||i.ownerDocument||document,d=u.defaultView||(typeof window<`u`?window:null);if(r===u.documentElement||r===u.body||r===u.scrollingElement){let e=s(r,u,!0)+i.getBoundingClientRect().top;(t=d?.scrollTo)==null||t.call(d,0,Math.max(0,e+a));return}SM(r,u,c(i,r)+a,{isReverseFlexScrollRoot:e=>{var t;return(t=l?.(e))!=null&&t},getNormalizedScrollTop:s})}function y(e){let t=r.value;return d(0,p(e.nodeIndex,0,Math.max(0,t-1)))+Math.max(0,e.offsetWithinNodePx)}function b(){if(h!=null&&(a?.(h),h=null),t)for(let e of g)window.clearTimeout(e);g=[]}function x(e){let t=y(e),n=_();n!=null&&Math.abs(n-t)<=.5||v(t)}return{activeRestoreAnchor:m,getRelativeScrollTopWithinContainer:_,setRelativeScrollTopWithinContainer:v,resolveAnchorOffset:y,clearRestoreReconcile:b,applyRestoreAnchor:x,scheduleRestoreReconcile:function(){m.value&&t&&h==null&&(h=i?i(()=>{h=null,m.value&&x(m.value)}):null,h==null&&m.value&&x(m.value))},captureRestoreAnchor:function(){let e=_(),t=r.value;if(e==null||t<=0)return null;let n=p(u(e+1),0,t-1),i=d(0,n),a=f(n);return{nodeIndex:n,offsetWithinNodePx:p(e-i,0,Math.max(0,a-1))}},restoreAnchor:function(e){let n=r.value;if(m.value={nodeIndex:p(e.nodeIndex,0,Math.max(0,n-1)),offsetWithinNodePx:Math.max(0,e.offsetWithinNodePx)},b(),x(m.value),t)for(let e of[0,120,280,480])g.push(window.setTimeout(()=>{m.value&&x(m.value)},e))},getAnchorDrift:function(e){let t=_();return t==null?null:t-y(e)}}}({isClient:q,containerRef:B,parsedNodeCount:it,requestFrame:Et,cancelFrame:Dt,resolveScrollContainer:()=>Kt.value||Ae(),getNormalizedScrollTop:Me,getOffsetTopWithinRoot:Ne,isReverseFlexScrollRoot:je,estimateIndexForOffset:va,estimateHeightRange:Ar,getFallbackNodeHeight:Tr,clamp:hr}),{nodeHeights:sn,heightStats:cn,heightTreeSize:ln,heightSumTree:un,heightKnownTree:dn,averageNodeHeight:fn,resetHeightMeasurements:pn,pruneHeightMeasurements:mn,rebuildHeightTrees:hn,recordNodeHeight:gn,removeNodeHeights:_n,exportHeightCache:vn,importHeightCache:yn,fenwickRangeSum:bn}=function(e={}){let t=ue({}),n=ue({total:0,count:0}),r=M(0),i=M([]),a=M([]);function o(){for(let e of Object.keys(t))delete t[Number(e)];n.total=0,n.count=0,r.value=0,i.value=[],a.value=[]}function s(e,t,n){for(let r=t+1;r<e.length;r+=r&-r)e[r]+=n}function c(e,t){let n=0;for(let r=t+1;r>0;r-=r&-r)n+=e[r];return n}function l(e){r.value=e;let n=Array(e+1).fill(0),o=Array(e+1).fill(0);for(let[r,i]of Object.entries(t)){let t=Number(r),a=Number(i);!Number.isFinite(t)||t<0||t>=e||!Number.isFinite(a)||a<=0||(s(n,t,a),s(o,t,1))}i.value=n,a.value=o}function u(e){if(!Number.isInteger(e)||e<0)return!1;let o=t[e];if(!Number.isFinite(o)||o<=0)return!1;if(delete t[e],n.total=Math.max(0,n.total-o),n.count=Math.max(0,n.count-1),r.value>e){let t=i.value,n=a.value;t.length&&n.length&&(s(t,e,-o),s(n,e,-1))}return!0}return{nodeHeights:t,heightStats:n,heightTreeSize:r,heightSumTree:i,heightKnownTree:a,averageNodeHeight:I(()=>n.count>0?Math.max(12,n.total/n.count):32),resetHeightMeasurements:o,pruneHeightMeasurements:function(e){if(e<=0)return void o();let r=0,i=0;for(let[n,a]of Object.entries(t)){let o=Number(n),s=Number(a);!Number.isFinite(o)||o<0||o>=e||!Number.isFinite(s)||s<=0?delete t[o]:(r+=s,i++)}n.total=r,n.count=i},rebuildHeightTrees:l,recordNodeHeight:function(o,c,l={}){(function(o,c,l={}){var u;if(!Number.isFinite(c)||c<=0)return!1;let d=t[o];if(d&&(!1===l.allowShrink&&c<d||Math.abs(c-d)<=1))return!1;if(t[o]=c,d?n.total+=c-d:(n.total+=c,n.count++),r.value>o){let e=i.value,t=a.value;if(e.length&&t.length)if(d){let t=c-d;t!==0&&s(e,o,t)}else s(e,o,c),s(t,o,1)}!1!==l.notify&&((u=e.onHeightRecorded)==null||u.call(e))})(o,c,zD($({},l),{notify:!0}))},removeNodeHeight:function(t,n={}){var r;let i=u(t);return i&&!1!==n.notify&&((r=e.onHeightRecorded)==null||r.call(e)),i},removeNodeHeights:function(t,n={}){var r;let i=0;for(let e of t)u(Number(e))&&i++;return i>0&&!1!==n.notify&&((r=e.onHeightRecorded)==null||r.call(e)),i},exportHeightCache:function(){return Object.entries(t).map(([e,t])=>({index:Number(e),height:Number(t)})).filter(e=>Number.isFinite(e.index)&&e.index>=0&&Number.isFinite(e.height)&&e.height>0).sort((e,t)=>e.index-t.index)},importHeightCache:function(i,a={}){var o;if(!Array.isArray(i))return;let s=r.value,c=!1;if(a.mode!==`merge`){let e=Object.keys(t);if(e.length>0){for(let n of e)delete t[Number(n)];c=!0}}for(let e of i){let n=Number(e.index),r=Number(e.height);if(!Number.isInteger(n)||n<0||s>0&&n>=s||!Number.isFinite(r)||r<=0)continue;let i=t[n];i&&Math.abs(i-r)<=1||(t[n]=r,c=!0)}c&&(function(){let e=0,i=0,a=r.value;for(let[n,r]of Object.entries(t)){let o=Number(n),s=Number(r);!Number.isFinite(o)||o<0||a>0&&o>=a||!Number.isFinite(s)||s<=0?delete t[o]:(e+=s,i++)}n.total=e,n.count=i}(),s>0&&l(s),(o=e.onHeightRecorded)==null||o.call(e))},fenwickRangeSum:function(e,t,n){if(n<=t)return 0;let r=c(e,n-1);return t<=0?r:r-c(e,t-1)}}}({onHeightRecorded:()=>{Xn(),Q.value&&Na(),Zt.value&&nn(),qt.value&&ki(),_a(`node-resize`)}});function xn(){pn(),Ut.clear()}function Sn(e){!Number.isInteger(e)||e<0||e>=X.value.length||Ut.set(e,Si(e))}function Cn(e,t,n={}){let r=sn[e];gn(e,t,n);let i=sn[e];i&&i>0?Sn(e):r&&Ut.delete(e)}function wn(e,t){let n=Y(`getNodeLayoutHeight.slot.offsetHeight`,()=>Rt.get(e)?.offsetHeight??0);return n>0?n:Y(`getNodeLayoutHeight.content.offsetHeight`,()=>t.offsetHeight)}function Tn(e,t={}){yn(e,t),qi()}let En=I(()=>!we.value&&!1!==z.deferNodesUntilVisible&&!((z.maxLiveNodes??0)<=0)&&!St.value&&!(X.value.length>900)&&wt.value),Dn=I(()=>!!Tt&&(En.value||St.value)),On=I(()=>St.value||Q.value),{liveNodeBufferResolved:kn,focusIndex:An,liveRange:jn,updateLiveRange:Mn}=function(e,t){let{parsedNodeCount:n,virtualizationEnabled:r,maxLiveNodesResolved:i,clamp:a}=t,o=I(()=>Math.max(0,e.liveNodeBuffer??60)),s=M(0),c=ue({start:0,end:0});return{liveNodeBufferResolved:o,focusIndex:s,liveRange:c,updateLiveRange:function(){let e=n.value;if(!r.value||e===0)return c.start=0,void(c.end=e);let t=Math.min(i.value,e),l=o.value,u=a(s.value-l,0,Math.max(0,e-t));c.start=u,c.end=Math.min(e,u+t)}}}(z,{parsedNodeCount:it,virtualizationEnabled:St,maxLiveNodesResolved:xt,clamp:hr}),Nn=new Map,Pn=new Map,Fn=new Map,In=[],Ln=new Map,Rn=new Set,zn=M(0),Bn=!1,Vn=I(()=>(zn.value,Rn.size)),Hn=new Map,Un=new Map,Wn=M(0),Gn=I(()=>{Wn.value;let e=0;for(let t of Hn.values())e+=Math.max(0,t);return e}),Kn=null,qn=!0,Jn=[0],Yn=``;function Xn(){qn=!0}let Zn=I(()=>{if(!St.value)return X.value.length;let e=kn.value,t=Math.max(jn.end+e,jt.value),n=Math.min(X.value.length,t);return Math.max(Pt.value,n)});function Qn(){Bn||(Bn=!0,queueMicrotask(()=>{Bn=!1,zn.value+=1}))}function $n(e,t,n=`node-resize`){if(!q||typeof window>`u`)return null;let r=window.setTimeout(()=>{Rn.delete(r)&&Qn();try{t()}finally{_a(n)}},Math.max(0,e));return Rn.add(r),Qn(),r}function er(e){q&&e!=null&&(Rn.delete(e)&&Qn(),window.clearTimeout(e))}function tr(){if(q&&typeof window<`u`)for(let e of Rn)window.clearTimeout(e);Rn.size&&(Rn.clear(),Qn()),In.length=0,Fn.clear()}function nr(e){return ct.value?.[e]??null}let{cancelScheduledFocusSync:rr,scheduleFocusSync:ir}=function(e){let{isClient:t,containerRef:n,virtualizationEnabled:r,requestFrame:i,cancelFrame:a,syncFocusToScroll:o}=e,s=null;function c(){return n.value?.ownerDocument?.defaultView??(typeof window<`u`?window:null)}function l(){if(!s)return;let e=c();s.viaTimeout?e?e.clearTimeout(s.id):clearTimeout(s.id):a?.(s.id),s=null}return{cancelScheduledFocusSync:l,scheduleFocusSync:function(e={}){if(!r.value)return;if(!t)return void o(!0);if(e.immediate)return l(),void o(!0);if(s)return;let n=()=>{s=null,o()};if(i)return void(s={id:i(n),viaTimeout:!1});let a=c();s={id:a?a.setTimeout(n,16):setTimeout(n,16),viaTimeout:!0}}}}({isClient:q,containerRef:B,virtualizationEnabled:St,requestFrame:Et,cancelFrame:Dt,syncFocusToScroll:function(e=!1){if(!St.value)return;let t=Kt.value||Ae();if(!t)return;let n=t.ownerDocument||B.value?.ownerDocument||document,r=n?.defaultView||(typeof window<`u`?window:null),i=t===n?.documentElement||t===n?.body,a=X.value.length;if(!i&&a>0&&je(t)){let n=Y(`syncFocusToScroll.clientHeight`,()=>t.clientHeight||0),r=Y(`syncFocusToScroll.scrollTop`,()=>t.scrollTop),i=r<0?-r:r,o=hr(function(e){let t=X.value;if(!t.length)return 0;if(e<=0)return Math.max(0,t.length-1);if(ht.value){let n=Or()[t.length]??0;return kr(Math.max(0,n-e))}if(ln.value===t.length){let n=Ar(0,t.length);return va(Math.max(0,n-e))}let n=e;for(let e=t.length-1;e>=0;e--){let t=sn[e]??fn.value;if(n<=t)return e;n-=t}return 0}(Math.max(0,i)+.5*Math.max(0,n)),0,Math.max(0,a-1));(e||Math.abs(o-An.value)>1)&&(An.value=o,Mn());return}let o=i?null:Y(`syncFocusToScroll.root.getBoundingClientRect`,()=>t.getBoundingClientRect()),s=i?0:o.top,c=i?Y(`syncFocusToScroll.viewport.clientHeight`,()=>r?.innerHeight??t.clientHeight??0):o.bottom,l=Gt.value,u=null,d=null;for(let[e,t]of l){if(!t)continue;let n=Y(`syncFocusToScroll.slot.getBoundingClientRect`,()=>t.getBoundingClientRect());n.bottom<=s||n.top>=c||(u??=e,d=e)}if(u==null||d==null){let e=B.value;if(!e)return;let a=i?{top:0}:Y(`syncFocusToScroll.fallback.root.getBoundingClientRect`,()=>t.getBoundingClientRect()),o=Y(`syncFocusToScroll.fallback.scrollTop`,()=>Me(t,n,i)),s=i?(()=>{let t=Y(`syncFocusToScroll.fallback.container.getBoundingClientRect`,()=>e.getBoundingClientRect()),n=(i?0:a.top)-t.top;return Math.max(0,n)})():(()=>{let n=Ne(e,t);return Math.max(0,o-n)})(),c=i?Y(`syncFocusToScroll.fallback.viewport.clientHeight`,()=>r?.innerHeight??n?.documentElement?.clientHeight??t.clientHeight??0):Y(`syncFocusToScroll.fallback.root.clientHeight`,()=>t.clientHeight);An.value=hr(va(s+.5*Math.max(0,c)),0,Math.max(0,X.value.length-1)),Mn();return}let f=Math.round((u+d)/2);!e&&Math.abs(f-An.value)<=1||(An.value=hr(f,0,Math.max(0,X.value.length-1)),Mn())}}),{visibleNodeIndices:ar,nodeVisibilityHandles:or,nodeVisibilityWatchStops:sr,nodeVisibilityFallbackTimers:cr,clearVisibilityFallback:lr,markNodeVisible:ur,cleanupNodeVisibility:dr,destroyNodeVisibilityState:fr}=aN({isClient:q,shouldTrackVisibleNodeIndices:()=>En.value,shouldCleanupNodeVisibility:()=>St.value,onNodeMarkedVisible:e=>{St.value?ir():An.value=hr(e,0,Math.max(0,X.value.length-1))},onNodeVisibilityCleaned:e=>{Rt.delete(e)&&ya()}}),{cleanupScrollListener:pr,setupScrollListener:mr}=function(e){let{isClient:t,virtualizationEnabled:n,listenerEnabled:r,scrollRootElement:i,resolveScrollContainer:a,scheduleFocusSync:o,onScroll:s}=e,c=null,l=null;function u(){c&&=(c(),null),l=null,i.value=null}function d(t){let n=e.getScrollTop?e.getScrollTop(t):t.scrollTop;return Math.max(0,Number.isFinite(n)?Math.abs(n):0)}return{cleanupScrollListener:u,setupScrollListener:function(){if(!t)return;if(!((e=r?.value)??n.value))return void u();var e;let f=a();if(!f)return void u();if(i.value===f&&c)return;u(),l=d(f);let p=()=>{if(s?.(),n.value){let e=function(e){let t=d(e),n=l;l=t;let r=Math.max(480,.75*(e.clientHeight||0));return n==null?t>r?{immediate:!0}:void 0:Math.abs(t-n)>r?{immediate:!0}:void 0}(f);e?o(e):o()}};f.addEventListener(`scroll`,p,{passive:!0}),i.value=f,c=()=>{f.removeEventListener(`scroll`,p)}}}}({isClient:q,virtualizationEnabled:St,listenerEnabled:On,scrollRootElement:Kt,resolveScrollContainer:Ae,scheduleFocusSync:ir,onScroll:function(){let e=qt.value;if(!e)return;let t=fi();if(!t||function(e){if(oa()>=Yt)return Xt=null,!1;let t=Xt;if(t==null)return!0;let n=Math.abs(e.scrollTop-t)<=2;return n||(Xt=null),n}(t))return;let n=mi(t);(n==null||n<-32||Math.abs(Math.max(0,n)-Math.max(0,e.distanceFromBottomPx))>32)&&Oi(`restore`)},getScrollTop:e=>{let t=e.ownerDocument||B.value?.ownerDocument||document,n=e===t.documentElement||e===t.body||e===t.scrollingElement;return Y(`scrollListener.getScrollTop`,()=>Me(e,t,n))}});function hr(e,t,n){return Math.min(Math.max(e,t),n)}function gr(e){return e?.firstElementChild}function _r(e,t){return e?e.matches?.call(e,t)?e:e.querySelector(t):null}function vr(){if(!ht.value)return void(be.value=0);let e=Y(`updateExperimentContainerWidth.clientWidth`,()=>B.value?.clientWidth??0);be.value=e>0?e:0}let yr=null;function br(){yr?.disconnect(),yr=null}let xr=S({loader:()=>BD(null,null,function*(){return(yield K(()=>Promise.resolve().then(()=>pL),void 0)).default}),loadingComponent:fk,delay:0,suspensible:!1});function Sr(e){return e===xr}let Cr=I(()=>y.value===`pre`?sk:y.value===`shiki`?xr:pk),wr=I(()=>{let e=X.value;if(!e.length||!ht.value)return e.map(()=>null);let t=be.value||Y(`estimatedNodeHeights.clientWidth`,()=>B.value?.clientWidth||0);return!Number.isFinite(t)||t<=0?e.map(()=>null):e.map((e,n)=>{let r=sn[n],i=typeof r==`number`&&r>0;if(_t.value&&!i){let n=oM(e,t,xe.value);if(n)return n}if(vt.value&&e.type===`code_block`){let t=function(e){if(e.type!==`code_block`)return null;let t=fo(e,oo(e));return Sr(t)?`markdown`:t===sk?`pre`:t===Cr.value||t===pk?`monaco`:null}(e);if(t===`monaco`||t===`markdown`||t===`pre`)return cM(e,{rendererKind:t,monacoOptions:z.codeBlockMonacoOptions,showHeader:!1!==(a=z.codeBlockProps)?.showHeader})}var a;return null})});function Tr(e){let t=sn[e];if(Number.isFinite(t)&&t>0)return t;let n=wr.value[e]?.height;return Number.isFinite(n)&&n>0?n:Math.max(fn.value,function(e){let t=X.value[e];if(!t||typeof t!=`object`)return 32;let n=String(t.type??``),r=yt()||640;switch(n){case`heading`:return 44;case`paragraph`:return Er(String(t.raw??t.content??``),r,34);case`list`:{let e=Array.isArray(t.items)?t.items.length:1;return Math.max(48,30*e+12)}case`list_item`:return Er(String(t.raw??t.content??``),r,34);case`blockquote`:return Er(String(t.raw??t.content??``),r,56);case`table`:{let e=Array.isArray(t.rows)?t.rows.length:Array.isArray(t.children)?t.children.length:3;return Math.max(120,38*e+48)}case`code_block`:return Er(String(t.code??t.raw??``),r,96,20);case`math_block`:return 72;case`image`:return 220;case`admonition`:case`vmr_container`:case`html_block`:return Er(String(t.raw??t.content??``),r,96);case`thematic_break`:return 24;default:return Er(String(t.raw??t.content??``),r,40)}}(e))}function Er(e,t,n,r=22){let i=String(e??``);if(!i)return n;let a=Math.max(18,Math.floor(Math.max(320,t)/8)),o=i.split(/\r?\n/).length,s=Math.ceil(i.length/a);return Math.max(n,Math.ceil(Math.max(1,o,s)*r+12))}function Dr(e){let t=Number(e);return!Number.isFinite(t)||t<=0?-1:Math.round(t/32)}function Or(){let e=X.value.length,t=Dr(be.value||Y(`getFallbackHeightPrefix.clientWidth`,()=>B.value?.clientWidth||0)),n=r.virtualScroll?.measurementKey==null?``:String(r.virtualScroll.measurementKey),i=[e,cn.count,Math.round(cn.total),Math.round(100*fn.value),n,t,+!!ht.value,eM.value,ye.value].join(`:`);if(!qn&&Yn===i)return Jn;let a=Array(e+1);a[0]=0;for(let t=0;t<e;t++)a[t+1]=a[t]+(ht.value?Tr(t):sn[t]??fn.value);return Jn=a,Yn=i,qn=!1,a}function kr(e){let t=X.value.length;if(t<=0||e<=0)return 0;let n=Or();if(e>=(n[t]??0))return t-1;let r=0,i=t-1,a=t-1;for(;r<=i;){let t=r+i>>1;(n[t+1]??0)>=e?(a=t,i=t-1):r=t+1}return a}function Ar(e,t){if(e>=t)return 0;if(ht.value)return function(e,t){let n=X.value.length,r=hr(Math.trunc(e),0,n),i=hr(Math.trunc(t),r,n);if(r>=i)return 0;let a=Or();return(a[i]??0)-(a[r]??0)}(e,t);if(ln.value!==X.value.length){let n=0;for(let r=e;r<t;r++)n+=sn[r]??fn.value;return n}let n=un.value,r=dn.value;if(!n.length||!r.length){let n=0;for(let r=e;r<t;r++)n+=sn[r]??fn.value;return n}return bn(n,e,t)+(t-e-bn(r,e,t))*fn.value}E(()=>X.value.length,e=>{Xn(),e<=0?xn():(e<ln.value&&mn(e),e!==ln.value&&hn(e))},{immediate:!0});let jr=I(()=>{if(!St.value)return X.value.map((e,t)=>({node:e,index:t}));let e=X.value.length,t=hr(jn.start,0,e),n=hr(jn.end,t,e);return X.value.slice(t,n).map((e,n)=>({node:e,index:t+n}))}),Mr=I(()=>St.value?Ar(0,Math.min(jn.start,X.value.length)):0),Nr=I(()=>{if(!St.value)return 0;let e=X.value.length;return Ar(Math.min(jn.end,e),e)});function Pr(){if(!ht.value)return 0;let e=0,t=wr.value;for(let n=0;n<t.length;n++){if(!t[n])continue;let r=sn[n];Number.isFinite(r)&&r>0||e++}return e}function Fr(){let e=X.value.length;return{totalNodes:e,measuredCount:cn.count,estimatedCount:Pr(),averageNodeHeight:fn.value,topSpacerHeight:Mr.value,bottomSpacerHeight:Nr.value,estimatedTotalHeight:Ar(0,e),width:Gr()}}function Ir(){let e=X.value;return zD($({},Fr()),{probe:{paragraphReady:!!xe.value.paragraph,listItemReady:!!xe.value.listItem,listWrapperOverhead:xe.value.listWrapperOverhead,headingReadyLevels:Object.entries(xe.value.headings).filter(([,e])=>!!e).map(([e])=>Number(e))},nodes:e.map((e,t)=>({index:t,type:e.type,estimateKind:wr.value[t]?.kind??null,rendererKind:wr.value[t]?.rendererKind??null,estimatedHeight:wr.value[t]?.height??null,estimatedContentHeight:wr.value[t]?.contentHeight??null,measuredHeight:sn[t]??null}))})}function Lr(){return r.indexKey==null?pt.value?`virtual-${zr()}`:`markdown-renderer`:String(r.indexKey)}function Rr(e){let t=String(e),n=`${Lr()}-`;if(!t.startsWith(n))return null;let r=t.slice(n.length).match(/^(\d+)(?:$|-)/);if(!r)return null;let i=Number(r[1]);return!Number.isInteger(i)||i<0||i>=X.value.length?null:i}function zr(){let e=r.virtualScroll?.sessionKey;return String(e!=null&&e!==``?e:r.indexKey??z.customId??Xe)}function Br(){let e=r.virtualScroll?.threadKey;return e==null||e===``?void 0:String(e)}function Vr(e){return(e??``)===(Br()??``)}function Hr(){let e=r.virtualScroll?.measurementKey;return e==null?``:String(e)}function Ur(){let e=y.value,t=e===`monaco`?z.codeBlockMonacoOptions:void 0,n=z.codeBlockProps,r=e===`shiki`;return[z.isDark?`dark`:`light`,e===`monaco`?`code-rich`:e===`pre`?`code-pre`:`code-shiki`,!1===z.codeBlockStream?`code-static`:`code-stream`,ca(z.codeBlockMinWidth),ca(z.codeBlockMaxWidth),...r?[nE(n?.themes??z.themes,n?.langs??z.langs)]:[],ca(t?.fontSize),ca(t?.lineHeight),ca(t?.fontFamily),ca(t?.tabSize),ca(t?.MAX_HEIGHT),ca(t?.wordWrap),ca(t?.wrappingIndent),ca(t?.padding),ca(n?.showHeader),ca(n?.showCopyButton),ca(n?.showExpandButton),ca(n?.showPreviewButton),ca(n?.showCollapseButton),ca(n?.showFontSizeButtons)].join(`\0`)}function Wr(){return[Hr(),Ur()].join(`\0`)}function Gr(){return yt()}let Kr=I(()=>Dr(Gr())),qr=I(()=>[Wr(),Kr.value].join(`\0`)),Jr=I(()=>pt.value?[`virtual`,Br()??``,zr(),qr.value].join(`\0`):r.indexKey);function Yr(){Wn.value+=1}function Xr(e){return!(!e||!Number.isInteger(e.index)||e.index<0||e.index>=X.value.length||e.sessionKey!==zr()||e.threadKey!==Br()||e.layoutEpochKey!==qr.value)}function Zr(e){let t=String(e),n=Un.get(t);return n?Xr(n)?n.index:null:Rr(t)}function Qr(e=`async-node`){(Hn.size||Un.size)&&(Hn.clear(),Un.clear(),Yr(),_a(e))}let $r=i(mE,null),ei={reportHeight(e,t){if(!Q.value)return;let n=Zr(e);if(n==null)return;let r=Nn.get(n);if(!r)return;let i=Number(t),a=wn(n,r);Cn(n,Number.isFinite(i)&&i>0?Math.max(i,a||0):a)},markPending(e){if(!Q.value)return;let t=Rr(e);t!=null&&function(e,t){let n=Un.get(e);if(n&&Xr(n))return Hn.set(e,Math.max(0,Hn.get(e)??0)+1),Yr(),void _a(`async-node`);Hn.set(e,1),Un.set(e,function(e){return{index:e,sessionKey:zr(),threadKey:Br(),layoutEpochKey:qr.value}}(t)),Yr(),_a(`async-node`)}(String(e),t)},markSettled(e){if(!Q.value)return;let t=String(e),n=Zr(e);(n!=null||function(e){return Hn.has(String(e))}(t))&&function(e){let t=Hn.get(e)??0;return!(t<=0||(t<=1?(Hn.delete(e),Un.delete(e)):Hn.set(e,t-1),Yr(),t===1&&_a(`async-node`),0))}(t)&&n!=null&&Ea()}};function ti(){let e=0;for(let t of Nn.values())e+=Y(`getVisibleDomHeight.offsetHeight`,()=>t?.offsetHeight??0);return Math.ceil(Math.max(0,e))}a(mE,{reportHeight(e,t){ei.reportHeight(e,t),$r?.reportHeight(e,t)},markPending(e){ei.markPending(e),$r?.markPending(e)},markSettled(e){ei.markSettled(e),$r?.markSettled(e)}});let ni,ri=null,ii=null;function ai(e){return!1!==e&&e!=null&&e!==``}function oi(){return St.value?function(){if(!St.value)return!0;let e=X.value.length,t=hr(jn.start,0,e),n=hr(jn.end,t,e);if(t>=n)return!0;for(let e=t;e<n;e++)if(!Rt.has(e)||ba(e)&&!Nn.has(e))return!1;return!0}():Pt.value>=Zn.value}function si(){return!0===Ie.value&&!Le.value&&Gn.value===0&&Rn.size===0&&Ln.size===0&&Kn==null&&oi()}function ci(){if(r.virtualScroll?.settleMode!==`manual`||ri===zr()&&ni===Br())return!0;let e=r.virtualScroll?.settledToken;return!!ai(e)&&ii===Ia(e)}function li(){return si()&&ci()}function ui(e,t){return t.totalNodes<=0?e===`final`?`final`:`estimate`:t.measuredCount>=t.totalNodes?e===`final`?`final`:`measured`:t.measuredCount>0||t.estimatedCount>0?`mixed`:`estimate`}function di(e=`manual`,t){let n=Fr(),r=function(e){return e||(!0===Ie.value?!oi()||Ln.size>0||Kn!=null?`measuring`:li()?`settled`:`settling`:X.value.length>0?`streaming`:`estimating`)}(t);return{sessionKey:zr(),threadKey:Br(),phase:r,nodeCount:n.totalNodes,liveRange:{start:jn.start,end:jn.end},renderedCount:Pt.value,measuredCount:n.measuredCount,estimatedCount:n.estimatedCount,averageNodeHeight:n.averageNodeHeight,topSpacerHeight:n.topSpacerHeight,bottomSpacerHeight:n.bottomSpacerHeight,visibleDomHeight:ti(),totalHeight:pi(),width:n.width,final:!0===Ie.value,stable:li(),confidence:ui(r,n),reason:e}}function fi(){let e=Kt.value||Ae(),t=B.value;if(!e||!t)return null;let n=e.ownerDocument||t.ownerDocument||document,r=e===n.documentElement||e===n.body||e===n.scrollingElement;return{root:e,doc:n,isViewportRoot:r,scrollTop:Y(`getScrollBox.scrollTop`,()=>Me(e,n,r)),scrollHeight:Y(`getScrollBox.scrollHeight`,()=>r?Math.max(n.documentElement?.scrollHeight??0,n.body?.scrollHeight??0,e.scrollHeight??0):e.scrollHeight),clientHeight:Y(`getScrollBox.clientHeight`,()=>r?n.documentElement?.clientHeight||e.clientHeight||0:e.clientHeight)}}function pi(){let e=X.value.length,t=Math.max(0,Ar(0,e)),n=Y(`getRendererLogicalHeight.offsetHeight`,()=>B.value?.offsetHeight??0),r=Math.max(0,n>0?n:Y(`getRendererLogicalHeight.scrollHeight`,()=>B.value?.scrollHeight??0));return e<=0?Math.ceil(n):St.value?t>0?Math.max(1,Math.ceil(t),function(){let e=Mr.value+Nr.value;for(let t of Rt.values())t&&(e+=Math.max(0,Y(`getVirtualizedDomLogicalHeight.offsetHeight`,()=>t.offsetHeight||0)));return Math.ceil(Math.max(0,e))}(),function(e,t){return e<=0||t<=0?0:t<=e+Math.max(512,.05*e)?Math.ceil(t):0}(t,r)):Math.max(1,Math.ceil(r)):Q.value?t>0||cn.count>0||Pr()>0?(Nt.value&&Pt.value,Math.max(1,Math.ceil(r),Math.ceil(t))):Math.ceil(r):Math.max(1,Math.ceil(r),Math.ceil(t))}function mi(e){let t=B.value;if(!t)return null;let n=Y(`getRendererBottomDistanceFromViewport.getBoundingClientRect`,()=>t.getBoundingClientRect());return function(e){return e.isViewportRoot?e.clientHeight:Y(`getViewportBottomInRoot.getBoundingClientRect`,()=>e.root.getBoundingClientRect().bottom)}(e)-n.bottom}function hi(e={}){let t=!1!==e.requireViewport,n=function(e=64){let t=fi(),n=B.value;if(!t||!n)return!1;let r=function(e){if(e.isViewportRoot)return{top:0,bottom:e.clientHeight};let t=Y(`getVirtualViewportRect.getBoundingClientRect`,()=>e.root.getBoundingClientRect());return{top:t.top,bottom:t.bottom}}(t),i=Y(`isRendererNearVirtualViewport.getBoundingClientRect`,()=>n.getBoundingClientRect());return i.bottom>=r.top-e&&i.top<=r.bottom+e}();if(t&&!n)return null;let r=function(){let e=fi(),t=B.value;if(!e||!t||Math.max(0,e.scrollHeight-e.scrollTop-e.clientHeight)>64)return null;let n=mi(e);return n==null?null:n>=-8&&n<=160?{type:`bottom`,distanceFromBottomPx:Math.max(0,n)}:null}();if(r)return{anchor:r,captured:!0};let i=rn();if(i)return{anchor:{type:`node`,nodeIndex:i.nodeIndex,offsetWithinNodePx:i.offsetWithinNodePx},captured:n};if(!0===e.allowFallback){let e=function(){let e=X.value.length;return e<=0?null:{type:`node`,nodeIndex:hr(An.value,0,Math.max(0,e-1)),offsetWithinNodePx:0}}();return e?{anchor:e,captured:!1}:null}return null}function gi(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function _i(e,t){let n=e;for(let e=0;e<t.length;e++)n^=t.charCodeAt(e),n=Math.imul(n,16777619);return n^=31,n=Math.imul(n,16777619),n}let vi=new Set([`children`,`items`,`header`,`rows`,`cells`,`attrs`,`data`,`term`,`definition`]);function yi(e,t=new WeakSet,n=0){if(e==null||typeof e==`number`||typeof e==`boolean`)return String(e);if(typeof e==`string`)return`s:${function(e){let t=e.length>8192?`${e.slice(0,8192)}...${e.length}`:e;return`${e.length}:${gi(t)}`}(e)}`;if(typeof e==`function`)return`fn`;if(typeof e!=`object`)return typeof e;if(t.has(e))return`cycle`;if(n>=6)return`max-depth`;t.add(e);try{if(Array.isArray(e)){if(e.length<=160){let r=[];for(let i=0;i<e.length;i++)r.push(yi(e[i],t,n+1));return`a:${e.length}:${r.join(`,`)}`}let r=[],i=[],a=Math.max(0,e.length-32),o=2166136261;for(let s=0;s<e.length;s++){let c=yi(e[s],t,n+1);o=_i(o,c),s<32&&r.push(c),s>=a&&i.push(c)}return[`a:${e.length}`,`h=${r.join(`,`)}`,`t=${i.join(`,`)}`,`all=${(o>>>0).toString(36)}`].join(`:`)}let r=e,i=Object.keys(r).filter(e=>{let t=r[e];return e!==`parent`&&e!==`el`&&e!==`component`&&(t==null||typeof t==`string`||typeof t==`number`||typeof t==`boolean`||vi.has(e))}).sort();return`o:${i.length}:${i.map(e=>`${e}=${yi(r[e],t,n+1)}`).join(`;`)}`}finally{t.delete(e)}}let bi=-1,xi=``;function Si(e){let t=X.value[e];return t?gi(yi(t)):``}function Ci(){let e=ye.value;if(bi===e)return xi;let t=2166136261;for(let e=0;e<X.value.length;e++){let n=Si(e);for(let e=0;e<n.length;e++)t^=n.charCodeAt(e),t=Math.imul(t,16777619)}return xi=(t>>>0).toString(36),bi=e,xi}function wi(e,t={}){let n=!0===t.includeHeightCache,i=t.includeContentHash??n,a=n?function(e){let t=function(){let e=Number(r.virtualScroll?.heightCacheLimit??5e3);return!Number.isFinite(e)||e<=0?1/0:Math.max(1,Math.trunc(e))}();if(!Number.isFinite(t)||e.length<=t)return e;let n=new Map,i=e=>{!e||n.size>=t||n.set(e.index,e)},a=X.value.length,o=hr(jn.start-2*kn.value,0,a),s=hr(jn.end+2*kn.value,o,a);for(let t of e)t.index>=o&&t.index<s&&i(t);let c=Math.max(1,Math.ceil(e.length/t));for(let r=0;r<e.length&&n.size<t;r+=c)i(e[r]);for(let r=e.length-1;r>=0&&n.size<t;r-=c)i(e[r]);return Array.from(n.values()).sort((e,t)=>e.index-t.index).slice(0,t)}(vn().map(e=>{let t=X.value[e.index];return t?zD($({},e),{nodeType:String(t.type??``),signature:Si(e.index)}):null}).filter(e=>!!e)):[],o=hi({allowFallback:!0===t.allowAnchorFallback,requireViewport:t.requireViewport});return o||a.length||!0===t.includeEmptyState?zD($({sessionKey:e.sessionKey,threadKey:e.threadKey},o?{anchor:o.anchor,anchorCaptured:o.captured}:{anchorCaptured:!1}),{metrics:e,width:e.width,contentHash:i?Ci():void 0,measurementKey:Wr()||void 0,heightCache:a.length?a:void 0}):null}function Ti(e){var t,n;let r=fi();if(!r)return;let i=function(e){let t=B.value;if(!t)return null;let n=Ne(t,e.root),r=X.value.length,i=Y(`getRendererBottomOffsetWithinRoot.offsetHeight`,()=>t.offsetHeight||0),a=Math.max(0,i>0?i:r>0?Y(`getRendererBottomOffsetWithinRoot.scrollHeight`,()=>t.scrollHeight||0):0),o=pi();return n+Math.max(a,o)}(r);if(i==null)return;let a=Math.max(0,e.distanceFromBottomPx),o=Math.max(0,i-r.clientHeight-a);(function(e){Yt=oa()+120,Xt=e})(o),r.isViewportRoot?(n=(t=r.doc.defaultView)?.scrollTo)==null||n.call(t,0,o):SM(r.root,r.doc,o,{isReverseFlexScrollRoot:je,getNormalizedScrollTop:Me})}let Ei=[];function Di(){if(q)for(Jt!=null&&(Dt?.(Jt),Jt=null);Ei.length;){let e=Ei.pop();e!=null&&window.clearTimeout(e)}}function Oi(e){let t=!!qt.value;qt.value=null,Yt=0,Xt=null,Di(),t&&e&&_a(e)}function ki(){if(!qt.value||!q||Jt!=null)return;let e=()=>{Jt=null;let e=qt.value;e&&Ti(e)};Jt=Et?Et(e):null,Jt??e()}function Ai(e,t={}){let n=X.value.length;return n<=0?[]:e.filter(e=>!(!Number.isInteger(e.index)||e.index<0||e.index>=n)&&!(!Number.isFinite(e.height)||e.height<=0)&&!(t.requireSignature&&!e.signature)&&!(t.requireCompatibilityMetadata&&!e.nodeType&&!e.signature)&&function(e){let t=X.value[e.index];return!(!t||e.nodeType&&e.nodeType!==String(t.type??``)||e.signature&&e.signature!==Si(e.index))}(e))}function ji(e){let t=Dr(Gr()),n=Dr(e);return t!==-1&&n!==-1&&t===n}function Mi(e){let t=Number(e?.width);if(Number.isFinite(t)&&t>0)return t;let n=Number(e?.metrics?.width);return Number.isFinite(n)&&n>0?n:null}function Ni(e){return e.sessionKey===zr()&&!!Vr(e.threadKey)&&(e.measurementKey??``)===Wr()&&!!ji(Mi(e))&&!!function(e){let t=e.heightCache;return!!t?.length&&(Pi(e)?t.some(e=>!!(e.nodeType||e.signature)):t.some(e=>!!e.signature))}(e)}function Pi(e){return!!(e.contentHash&&e.contentHash===Ci())}function Fi(e){return!Pi(e)}let Ii=null,Li=null,Ri=null,zi=null,Bi=null,Vi=!1;function Hi(e){let t=e.map(e=>[e.index,Math.round(10*e.height),e.nodeType??``,e.signature??``].join(``)).join(``),n=Dr(Gr());return[Br()??``,zr(),Wr(),X.value.length,n,e.length,gi(t)].join(`:`)}function Ui(e=(e=>(e=r.virtualScroll)?.heightCache)()){if(!Q.value||!e?.length||X.value.length<=0||!ji((t=r.virtualScroll)?.heightCacheWidth))return!1;var t;let n=Ai(e,{requireSignature:!0});if(!n.length)return!Vi&&typeof console<`u`&&m&&(Vi=!0,console.warn(`[markstream-vue] virtualScroll.heightCache ignored: standalone heightCache entries must include compatible signature metadata. Use heightCache exported from virtual-state-change/render-settled, and pass heightCacheWidth from the same state.`)),!1;let i=Hi(n);return i===Ii?(Li=`standalone`,!0):(Tn(n,{mode:`merge`}),Xn(),Ii=i,Li=`standalone`,da(),_a(`restore`),!0)}function Wi(e,t={}){if(!Q.value||!e||e.sessionKey!==zr()||!Vr(e.threadKey)||X.value.length<=0)return!1;let n=!!e.heightCache?.length&&!Gi(),r=!e.anchor||!1===e.anchorCaptured&&!0!==t.allowUncapturedAnchor?null:e.anchor,i=!0===t.restoreAnchor&&!!r&&!Gi()&&Number(Mi(e))>0,a=!1;if(e.heightCache?.length&&Ni(e)){let t=Ai(e.heightCache,{requireCompatibilityMetadata:!e.contentHash,requireSignature:Fi(e)});t.length&&(Tn(t,{mode:`merge`}),Xn(),Ii=Hi(t),Li=`restore`,da(),a=!0)}if(n||i)return!1;if(!t.restoreAnchor||!r)return a&&_a(`restore`),!0;let o=function(e,t){let n=e.anchor,r=n?n.type===`bottom`?`bottom:${Math.round(n.distanceFromBottomPx)}`:`node:${n.nodeIndex}:${Math.round(n.offsetWithinNodePx)}`:`none`;return[Br()??``,zr(),Wr(),Kr.value,t,r].join(`:`)}(e,t.restoreToken??`imperative`);return Ri===o?(a&&_a(`restore`),!0):(Ri=o,function(e){let t=()=>{if(e.type===`node`)return Oi(),void an({nodeIndex:e.nodeIndex,offsetWithinNodePx:e.offsetWithinNodePx});if(tn(),Zt.value=null,qt.value=e,Di(),Ti(e),q)for(let e of[0,120,280,480])Ei.push(window.setTimeout(()=>{let e=qt.value;e&&Ti(e)},e))};(function(e){if(!St.value)return!1;let t=X.value.length;return!(t<=0||(An.value=e.type===`node`?hr(e.nodeIndex,0,t-1):t-1,Mn(),0))})(e)?g(t):t()}(r),_a(`restore`),!0)}function Gi(){let e=Gr();return Number.isFinite(e)&&e>0}function Ki(e){return e.sessionKey===zr()&&!!Vr(e.threadKey)&&(X.value.length<=0||!(!e.heightCache?.length||Gi())||!(!(e.anchor&&Number(Mi(e))>0)||Gi()))}function qi(){Ut.clear();for(let e of Object.keys(sn)){let t=Number(e);Number.isInteger(t)&&t>=0&&t<X.value.length&&Sn(t)}}function Ji(){Kn!=null&&(Dt?.(Kn),Kn=null),Ca()}function Yi(){return!q||kt?Promise.resolve():new Promise(e=>{let t=!1,n=null,r=()=>{t||(t=!0,n!=null&&window.clearTimeout(n),e())};if(Et)return Et(r),void(n=window.setTimeout(r,50));n=window.setTimeout(r,0)})}function Xi(e,t=Br(),n=qr.value){return zr()===e&&Br()===t&&qr.value===n}function Zi(){return BD(this,arguments,function*(e={}){let t=zr(),n=Br(),i=qr.value,a=e.frames??2,o=e.timeoutMs??120,s=e.reason??`manual`,c=e.expectedSettledTokenKey,l=!0===e.flushPendingTimers,u=di(s),d=()=>zD($({},u),{phase:u.final?`settling`:u.phase,stable:!1,confidence:u.confidence===`final`?`mixed`:u.confidence,reason:s}),f=()=>Xi(t,n,i)&&(c==null||la()===c);for(let e=0;e<a;e++){if(yield g(),!f()||(yield Yi(),!f()))return d();Ea(),Ji()}if(yield function(e){return!q||e<=0?Promise.resolve():new Promise(t=>window.setTimeout(t,e))}(o),!f()||(l&&tr(),Ea(),Ji(),!f()))return d();let p=si();p&&(ri=t,ni=n,r.virtualScroll?.settleMode===`manual`&&c!=null&&ai(r.virtualScroll?.settledToken)&&la()===c&&(ii=Ia(r.virtualScroll.settledToken)));let m=di(s,f()&&p&&ci()?`final`:void 0);return ma(m,!0),m})}let Qi=`content`,$i=null,ea=null,ta=0,na=null,ra=null,ia=null,aa=null;function oa(){return typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now()}function sa(e){let t=na;if(!t)return!0;let n=r.virtualScroll?.heightDiffThresholdPx??1;return Math.abs(e.totalHeight-t.totalHeight)>n||e.sessionKey!==t.sessionKey||e.phase!==t.phase||e.stable!==t.stable||e.final!==t.final||e.threadKey!==t.threadKey||e.nodeCount!==t.nodeCount||e.measuredCount!==t.measuredCount||e.width!==t.width}function ca(e){if(e==null)return``;if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function la(e=(e=>(e=r.virtualScroll)?.settledToken)()){return ca(e)}function ua(e,t){return[e,t.sessionKey,t.threadKey??``,Wr(),Ci(),ca(r.virtualScroll?.settledToken),Math.round(t.totalHeight),Math.round(t.width)].join(`\0`)}function da(){ia=null,aa=null,ra=null}function fa(e){let t=e.heightCache;return t?.length?Hi(t):``}function pa(e){let t=e.metrics,n=e.anchor?(r=e.anchor).type===`bottom`?`bottom:${Math.round(r.distanceFromBottomPx)}`:`node:${r.nodeIndex}:${Math.round(r.offsetWithinNodePx)}`:`none`;var r;return[e.sessionKey,e.threadKey??``,e.measurementKey??Wr(),e.contentHash??``,fa(e),n,+!!e.anchorCaptured,t.liveRange.start,t.liveRange.end,t.renderedCount,t.nodeCount,Math.round(t.totalHeight),Math.round(t.width),t.phase,+!!t.stable].join(`\0`)}function ma(e,t=!1){if(!Q.value||function(e=!1){return!e&&pt.value&&!mt.value}(t))return;let n=t||sa(e),r=function(e,t=!1){return t||e.stable||e.phase===`final`?{state:wi(e,{includeHeightCache:!0})}:{state:wi(e)}}(e,t).state,i=!!(r&&(n||function(e,t=!1){return!!t||pa(e)!==ra}(r,t)));if(n&&(de(e),na=e,ta=oa()),r&&i&&(fe(r),r.anchor&&pe(r.anchor),ra=pa(r)),e.stable){let t=ua(`settled`,e);if(t!==ia){ia=t;let n=wi(e,{includeHeightCache:!0});n&&(fe(n),ra=pa(n)),function(e){o(`render-settled`,e)}(e)}}if(e.phase===`final`){let t=ua(`final`,e);if(t!==aa){aa=t;let n=wi(e,{includeHeightCache:!0});n&&(fe(n),ra=pa(n)),function(e){o(`render-final`,e)}(e)}}}function ha(){$i!=null&&(Dt?.($i),$i=null),ea!=null&&q&&(window.clearTimeout(ea),ea=null)}function ga(){$i=null,ea=null,function(e){if(Ln.size>0||Kn!=null)return!0;switch(e){case`node-resize`:case`async-node`:case`resize`:case`restore`:case`final`:case`manual`:return!0;default:return!1}}(Qi)&&(Ea(),Ji()),ma(di(Qi))}function _a(e){if(!Q.value||(Qi=e,$i!=null||ea!=null))return;let t=Math.max(0,r.virtualScroll?.emitIntervalMs??32),n=Math.max(0,t-(oa()-ta)),i=()=>{ea=null,$i=Et?Et(ga):null,$i??ga()};q&&n>0?ea=window.setTimeout(i,n):i()}function va(e){if(e<=0)return 0;let t=X.value;if(ht.value)return kr(e);if(ln.value===t.length&&un.value.length&&dn.value.length){let n=fn.value,r=un.value,i=dn.value,a=e=>e<=0?0:bn(r,0,e)+(e-bn(i,0,e))*n,o=0,s=t.length-1,c=t.length-1;for(;o<=s;){let t=o+s>>1;a(t+1)>=e?(c=t,s=t-1):o=t+1}return c}let n=e;for(let e=0;e<t.length;e++){let t=sn[e]??fn.value;if(n<=t)return e;n-=t}return Math.max(0,t.length-1)}function ya(){Wt.value+=1}function ba(e){return!(Nt.value&&e>=Pt.value)&&(!En.value||e<jt.value||ar.value.has(e))}function xa(e){let t=sr.get(e);t&&(t(),sr.delete(e));let n=or.get(e);n&&(n.destroy(),or.delete(e)),lr(e)}function Sa(e,t){let n=!1;if(t){let r=Rt.get(e);Rt.set(e,t),r!==t&&(n=!0)}else Rt.delete(e)&&(n=!0);if(n&&ya(),t||lr(e),!Dn.value||!Tt||!St.value&&En.value&&!_e.value&&or.size>=640&&(_e.value||(_e.value=!0,m&&typeof console<`u`&&console.warn(`[markstream-vue] viewportPriority auto-disabled:`,`too-many-targets`),fr()),!Dn.value||!Tt))return xa(e),void(t&&ur(e,!0));if(e<jt.value&&!St.value||ar.value.has(e))return xa(e),void ur(e,!0);if(!t)return void xa(e);xa(e);let r=Tt(t,{rootMargin:`400px`});if(!r)return;or.set(e,r),ur(e,r.isVisible.value),En.value&&function(e){if(!q||!En.value)return;lr(e);let t=e%17*23,n=window.setTimeout(()=>{if(cr.delete(e),!En.value||ar.value.has(e))return;let t=Rt.get(e);if(!t)return;let n=Ae(t),r=t.ownerDocument||document,i=r.defaultView||window,a=!n||n===r.documentElement||n===r.body,o=!a&&n?Y(`nodeVisibilityFallback.root.getBoundingClientRect`,()=>n.getBoundingClientRect()):null,s=a?0:o.top,c=a?Y(`nodeVisibilityFallback.clientHeight`,()=>i.innerHeight??n?.clientHeight??0):o.bottom,l=Y(`nodeVisibilityFallback.node.getBoundingClientRect`,()=>t.getBoundingClientRect());l.bottom>=s-500&&l.top<=c+500&&ur(e,!0)},1800+t);cr.set(e,n)}(e);let i=null;i=E(()=>r.isVisible.value,t=>{if(t){lr(e),ur(e,!0),i?.(),sr.delete(e),or.get(e)===r&&or.delete(e);try{r.destroy()}catch{}}},{immediate:!0}),sr.set(e,i),St.value&&ir()}function Ca(){Kn=null;for(let[e,t]of Ln)Ln.delete(e),Nn.get(e)===t.el&&Pn.get(e)===t.version&&Cn(e,t.height,{allowShrink:t.allowShrink})}function wa(){Kn!=null&&(Dt?.(Kn),Kn=null),Ln.clear()}function Ta(e,t){(function(e,t,n){if(!Number.isFinite(n)||n<=0||Nn.get(e)!==t)return;let i=Pn.get(e);if(i==null)return;let a=X.value[e],o=Le.value&&!0!==Ie.value&&!r.nodes?.length&&e>=X.value.length-2,s=!(!0===a?.loading||o),c=Ln.get(e),l=c?c.allowShrink&&s:s,u=c&&!l?Math.max(c.height,n):n;Ln.set(e,{height:u,allowShrink:l,version:i,el:t}),Kn??(Kn=Et?Et(Ca):null,Kn??Ca())})(e,t,wn(e,t))}function Ea(){for(let[e,t]of Nn)t&&Ta(e,t)}function Da(){Vt?.disconnect(),Vt=null,zt.clear()}function Oa(){for(;In.length;)er(In.pop())}E(mt,e=>{e&&_a(`content`)},{flush:`post`}),t({getVirtualMetrics:di,captureVirtualState:function(e={}){var t;return wi(di(`manual`),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!0===e.allowFallbackAnchor,requireViewport:!0===e.requireViewport,includeEmptyState:(t=e.includeEmptyState)==null||t})},restoreVirtualState:function(e,t={}){let n=!0===t.restoreAnchor,r=t.restoreToken==null?`imperative`:String(t.restoreToken);zi=e,Bi={restoreAnchor:n,restoreToken:r,allowUncapturedAnchor:!0===t.allowUncapturedAnchor},!Wi(e,{restoreAnchor:n,restoreToken:r,allowUncapturedAnchor:!0===t.allowUncapturedAnchor})&&Ki(e)||(zi=null,Bi=null)},forceMeasure:function(e=`manual`){return BD(this,null,function*(){yield g(),yield Yi(),Ea(),Ji(),yield g();let t=di(e);return ma(t,!0),t})},settle:Zi,scrollToNode:function(e,t=`start`){Oi(),tn();let n=X.value.length;if(n<=0)return;let r=hr(e,0,n-1),i=()=>{let e=en({nodeIndex:r,offsetWithinNodePx:0}),n=Tr(r),i=fi()?.clientHeight??0,a=Qt(),o=e;if(t===`center`)o=e-i/2+n/2;else if(t===`end`)o=e-i+n;else if(t===`nearest`&&a!=null){if(e>=a&&e+n<=a+i)return;o=e<a?e:e-i+n}$t(Math.max(0,o)),ir({immediate:!0}),St.value&&(An.value=r,Mn())};if(St.value)return An.value=r,Mn(),void g(i);i()}}),E(()=>Ct.value,e=>{if(!e){Da();for(let e of Fn.values())for(let t of e)er(t);Fn.clear(),Pn.clear(),Oa(),wa()}},{immediate:!0}),E(Ie,e=>{e&&function(){if(q&&Ie.value&&Nn.size){Oa();for(let e of[80,240,640]){let t=$n(e,()=>{for(let[e,t]of Nn)t&&Ta(e,t)},`final`);t!=null&&In.push(t)}}}(),_a(e?`final`:`content`)}),E([()=>X.value.length,()=>Pt.value],()=>{qt.value&&ki(),_a(`content`)},{flush:`post`,immediate:!0}),E([()=>jn.start,()=>jn.end],()=>{_a(`batch`)},{flush:`post`});let{cleanupBatchScheduler:ka}=function(e){let{props:t,isClient:n,isTestEnv:r,parsedNodesIdentity:i,parsedNodeCount:a,desiredRenderedCount:o,datasetKey:s,batchingEnabled:c,incrementalRenderingActive:l,resolvedBatchSize:u,resolvedInitialBatch:d,renderedCount:f,adaptiveBatchSize:p,previousRenderContext:m,previousBatchConfig:h,requestFrame:_,cancelFrame:v,hasIdleCallback:y,cleanupNodeVisibility:b,onDatasetKeyChanged:x,onDatasetChanged:S}=e,C=null,w=null,T=!1,D=null,O=null,k=0,A=!1,j=!1,ee=new Set,M=new Set;function N(){if(n){C!=null&&(v?.(C),C=null),w!=null&&(window.clearTimeout(w),w=null),O!=null&&typeof window.cancelIdleCallback==`function`&&(window.cancelIdleCallback(O),O=null),k+=1;for(let e of ee)v?.(e);ee.clear();for(let e of M)window.clearTimeout(e);M.clear(),T=!1,D=null,A=!1,j=!1}}function P(){return typeof performance<`u`?performance.now():Date.now()}function te(e){(function(e){if(!l.value)return;let n=Math.max(2,t.renderBatchBudgetMs??6),r=Math.max(1,u.value||1),i=Math.max(1,Math.floor(r/4));e>1.2*n?p.value=Math.max(i,Math.floor(.7*p.value)):e<.5*n&&p.value<r&&(p.value=Math.min(r,Math.ceil(1.2*p.value)))})(e),A=!1;let n=j||f.value<o.value;j=!1,n&&I()}function ne(e,i={}){if(!l.value)return;let a=o.value;if(f.value>=a)return;let s=Math.max(1,e),c=()=>{let e=P(),r=0;C=null,w=null,O=null,T=!1;let i=D??s;D=null;let o=P();f.value=Math.min(a,f.value+i),b(f.value),r=P()-o,function(e,r){if(!n)return void te(r);A=!0;let i=++k;g().then(()=>{if(i!==k)return;let n=P(),a=Math.max(r,n-e),o=()=>{i===k&&te(a)};if(_){let e=!1,n=null,r=()=>{e||(e=!0,o())},i=_(()=>{ee.delete(i),n!=null&&(window.clearTimeout(n),M.delete(n),n=null),r()});ee.add(i),n=window.setTimeout(()=>{n!=null&&M.delete(n),n=null,v?.(i),ee.delete(i),r()},Math.max(32,t.renderBatchIdleTimeoutMs??120)),M.add(n);return}let s=window.setTimeout(()=>{M.delete(s),o()},0);M.add(s)})}(e,r)};if(!n||i.immediate)return void c();let u=Math.max(0,t.renderBatchDelay??16);if(D=D==null?s:Math.max(D,s),!T){if(T=!0,!r&&y&&window.requestIdleCallback){let e=Math.max(0,t.renderBatchIdleTimeoutMs??120);O=window.requestIdleCallback(()=>c(),{timeout:e});return}_&&!r?C=_(()=>{u===0?c():w=window.setTimeout(()=>c(),u)}):w=window.setTimeout(()=>c(),u)}}function F(e,t={}){A?j=!0:e==null?I():ne(e,t)}function I(){l.value&&ne(c.value?Math.max(1,Math.round(p.value)):Math.max(1,u.value))}return E([i,a,s,l,u,d,()=>t.renderBatchDelay],()=>{let e=a.value,r=m.value,i=s.value,c=!Object.is(i,r.key),g=e!==r.total,_=c||g;m.value={key:i,total:e};let v=h.value,y=t.renderBatchDelay??16,C=v.batchSize!==u.value||v.initial!==d.value||v.delay!==y||v.enabled!==l.value;h.value={batchSize:u.value,initial:d.value,delay:y,enabled:l.value},c&&x(e),(_||C||!l.value)&&N(),(_||C)&&(p.value=Math.max(1,u.value||1)),_&&S();let w=o.value;if(!e)return f.value=0,void b(0);if(!l.value)return f.value=w,void b(f.value);f.value=c||r.total===0||C?Math.min(w,d.value):Math.min(f.value,w);let T=Math.max(1,d.value||u.value||e);f.value<w?F(T,{immediate:!n}):b(f.value)},{immediate:!0}),E(o,(e,t)=>{l.value&&(typeof t==`number`&&e<=t||e>f.value&&F())}),{cleanupBatchScheduler:N}}({props:z,isClient:q,isTestEnv:kt,parsedNodesIdentity:rt,parsedNodeCount:it,desiredRenderedCount:Zn,datasetKey:Jr,batchingEnabled:Mt,incrementalRenderingActive:Nt,resolvedBatchSize:At,resolvedInitialBatch:jt,renderedCount:Pt,adaptiveBatchSize:It,previousRenderContext:Ft,previousBatchConfig:Lt,requestFrame:Et,cancelFrame:Dt,hasIdleCallback:Ot,cleanupNodeVisibility:dr,onDatasetKeyChanged:e=>{wa(),xn(),Xn(),da(),e>0&&hn(e)},onDatasetChanged:()=>{St.value&&ir({immediate:!0})}});E([On,St,()=>B.value,()=>Se()],([e,t])=>{if(!e)return pr(),void rr();mr(),t?ir({immediate:!0}):rr()},{flush:`post`,immediate:!0}),E([()=>X.value.length,()=>St.value],e=>BD(null,[e],function*([e,t]){t&&e&&q&&(yield g(),ir({immediate:!0}))}),{flush:`post`}),E(ht,e=>{e&&function(){if(at.value&&ot.value&&st.value&&ct.value?.[1])return;let e=re({type:`paragraph`,children:[{type:`text`,content:`Probe paragraph text`,raw:`Probe paragraph text`}],raw:`Probe paragraph text`}),t=re({type:`list_item`,children:[e],raw:`- Probe paragraph text`}),n=re({type:`list`,ordered:!1,items:[t],raw:`- Probe paragraph text`});at.value=e,ot.value=t,st.value=n;let r={1:null,2:null,3:null,4:null,5:null,6:null};for(let e=1;e<=6;e++)r[e]=re({type:`heading`,level:e,text:`Probe heading`,children:[{type:`text`,content:`Probe heading`,raw:`Probe heading`}],raw:`${`#`.repeat(e)} Probe heading`});ct.value=r}()},{immediate:!0}),E([()=>B.value,ht],()=>{if(!ht.value)return br(),void(be.value=0);vr(),br(),ht.value&&B.value&&typeof ResizeObserver<`u`&&(yr=new ResizeObserver(()=>{vr(),Zt.value&&nn(),qt.value&&ki(),_a(`resize`)}),yr.observe(B.value))},{immediate:!0}),E([ht,bt,qr],()=>BD(null,null,function*(){if(!ht.value)return xe.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Xn();yield g(),function(){if(!ht.value||typeof window>`u`)return xe.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Xn();let e={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},t=_r(gr(me.value),`.paragraph-node`);e.paragraph=uM(me.value,t,`pre-wrap`);let n=gr(he.value)?.querySelector(`.paragraph-node`);e.listItem=uM(he.value,n,`pre-wrap`);let r=Y(`readSimpleTextProbeProfile.list.offsetHeight`,()=>H.value?.offsetHeight??0),i=Y(`readSimpleTextProbeProfile.listItem.offsetHeight`,()=>he.value?.offsetHeight??0);e.listWrapperOverhead=Math.max(0,r-i);for(let t=1;t<=6;t++){let n=_r(gr(ge[t]),`h${t}`);e.headings[t]=uM(ge[t],n,`pre-wrap`)}xe.value=e,Xn()}()}),{flush:`post`,immediate:!0}),E(()=>X.value.length,()=>{St.value&&ir({immediate:!0})}),E([ht,be],()=>{Xn(),St.value&&ir({immediate:!0}),Zt.value&&nn(),qt.value&&ki(),_a(`resize`)},{immediate:!1}),E(()=>En.value,e=>{if(e)for(let[e,t]of Rt)Sa(e,t);else{fr();for(let[e,t]of Rt)t&&ur(e,!0)}},{immediate:!1}),E([()=>z.viewportPriority,()=>X.value.length],([e,t])=>{(!1===e||_e.value&&t<=200)&&(_e.value=!1)}),E(()=>Pt.value,()=>{St.value&&ir({immediate:!0})}),E([An,xt,kn,()=>X.value.length,St],()=>{Mn()},{immediate:!0});let Aa=null,ja=!1,Ma=null;function Na(){Aa=null,ri=null,ni=void 0,ii=null,da()}function Pa(){wa(),xn(),Xn(),Ut.clear();let e=X.value.length;e>0&&hn(e),qi()}function Fa(){ha(),tr(),na=null,Ii=null,Li=null,Ri=null,zi=null,Bi=null,ja=!1,Na(),Qr(`restore`),tn(),Oi()}function Ia(e){return[Br()??``,zr(),Wr(),Kr.value,la(e),X.value.length,Math.round(Ar(0,X.value.length)),Math.round(Gr()),cn.count,Math.round(cn.total)].join(`:`)}function La(){return BD(this,null,function*(){let e=r.virtualScroll?.settledToken,t=la(e),n=zr(),i=Br(),a=qr.value;if(Q.value&&r.virtualScroll?.settleMode===`manual`&&ai(e))if(si()){if(Ia(e)!==ii&&!ja){ja=!0;try{let e=yield Zi({reason:`manual`,expectedSettledTokenKey:t}),o=la()===t;Xi(n,i,a)&&e.sessionKey===n&&e.threadKey===i&&o&&e.stable&&e.phase===`final`&&(ii=Ia(r.virtualScroll?.settledToken))}finally{ja=!1,yield g();let e=r.virtualScroll?.settledToken,t=ai(e)?Ia(e):``;Xi(n,i,a)&&t&&ii!==t&&La()}}}else _a(`manual`)})}E(Q,(e,t)=>{if(e!==t){if(!e)return Fa(),void ha();Fa(),Pa(),Ma=qr.value,_a(`content`)}},{flush:`post`}),E([Q,qr],([e,t])=>{e?Ma==null?Ma=t:Ma!==t&&(Ma=t,function(e=`resize`){wa(),xn(),Xn(),Ut.clear();let t=X.value.length;t>0&&hn(t),qi(),Ii=null,Li=null,Ri=null,na=null,ja=!1,Na(),Ui(),g(()=>{Ea(),Zt.value&&nn(),qt.value&&ki(),_a(e)})}(`resize`)):Ma=null},{flush:`post`,immediate:!0}),E([Q,()=>zr(),()=>Br()],([e])=>{e&&(Fa(),Pa(),Qr(`content`),_a(`content`))}),E([Q,()=>zr(),()=>Br(),qr,()=>X.value.length],([e])=>{e&&function(e=`async-node`){let t=!1;for(let[e,n]of Array.from(Un.entries()))Xr(n)||(Un.delete(e),Hn.delete(e),t=!0);t&&(Yr(),_a(e))}(`async-node`)},{flush:`post`}),E([Q,()=>r.virtualScroll?.sessionKey,()=>r.virtualScroll?.measurementKey,()=>r.indexKey,()=>ye.value],([e])=>{e&&(da(),function(e=`content`){if(!Q.value)return;let t=[],n=X.value.length;for(let e of Array.from(Ut.keys())){if(e>=n){t.push(e);continue}let r=Si(e),i=Ut.get(e);i!=null&&i!==r&&t.push(e),Ut.set(e,r)}for(let e of Array.from(Ut.keys()))e>=n&&Ut.delete(e);t.length&&(function(e,t={}){let n=Array.from(e,Number);_n(n,t)>0&&function(e){for(let t of e)Ut.delete(t)}(n)}(t,{notify:!1}),Xn(),Na(),Zt.value&&nn(),qt.value&&ki(),_a(e))}(`content`))},{flush:`post`,immediate:!0}),E([Q,()=>X.value.length,()=>zr(),()=>Br()],([e,t,n,r],[i,a,o,s])=>{e&&i&&n===o&&r===s&&t!==a&&Na()},{flush:`post`}),E([Q,()=>r.virtualScroll?.heightCache,()=>r.virtualScroll?.heightCacheWidth,()=>r.virtualScroll?.restoreState,()=>r.virtualScroll?.measurementKey,()=>X.value.length,()=>zr(),be],()=>{Ui()},{flush:`post`,immediate:!0}),E([Q,()=>r.virtualScroll?.restoreState,()=>r.virtualScroll?.restoreAnchor,()=>r.virtualScroll?.measurementKey,()=>X.value.length,()=>zr(),be],e=>BD(null,[e],function*([e,t]){if(!e||!t)return;yield g();let n=function(){let e=r.virtualScroll?.restoreAnchor;return e==null||!1===e?null:!0===e?`true`:String(e)}();Wi(t,{restoreAnchor:n!=null,restoreToken:n??void 0})}),{flush:`post`,immediate:!0}),E([Q,be,()=>r.virtualScroll?.restoreState,()=>r.virtualScroll?.measurementKey],([e])=>{if(!e)return;let t=r.virtualScroll?.restoreState;t&&Ii&&Li===`restore`&&(Ni(t)||(Pa(),Ii=null,Li=null,_a(`resize`)))},{flush:`post`}),E([Q,()=>X.value.length,()=>zr(),be],e=>BD(null,[e],function*([e]){let t=zi,n=Bi;e&&t&&(yield g(),!Wi(t,{restoreAnchor:!0===n?.restoreAnchor,restoreToken:n?.restoreToken??`imperative`,allowUncapturedAnchor:!0===n?.allowUncapturedAnchor})&&Ki(t)||(zi=null,Bi=null))}),{flush:`post`,immediate:!0}),E([Q,Ie,()=>r.virtualScroll?.settleMode,()=>zr(),()=>Br(),qr,Gn,Vn,()=>Pt.value,Zn,()=>cn.count,()=>cn.total],([e,t,n])=>{if(!e||!0!==t||n===`manual`||!li())return;let r=function(){let e=X.value.length;return[Br()??``,zr(),Wr(),Kr.value,e,Math.round(Ar(0,e)),Math.round(Gr()),cn.count,Math.round(cn.total)].join(`:`)}();Aa!==r&&(Aa=r,Zi({reason:`final`}).then(e=>{e.stable||Aa!==r||(Aa=null)}))},{flush:`post`,immediate:!0}),E([Q,Ie,()=>r.virtualScroll?.settleMode,()=>r.virtualScroll?.settledToken,()=>zr(),()=>Br(),qr,Gn,Vn,()=>Pt.value,Zn,()=>X.value.length,()=>cn.count,()=>cn.total],()=>{La()},{flush:`post`,immediate:!0}),E([()=>X.value.length,St,xt,kn,()=>jn.start,()=>jn.end],([e,t,n,r,i,a])=>{Te.value&&Ue(`virtualization`,{nodes:e,virtualization:t,maxLiveNodes:n,buffer:r,focusIndex:An.value,scroll:t?(()=>{let e=Kt.value||Ae();return e?{reverse:je(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:i,end:a},rendered:Pt.value})}),E([()=>z.customId],([e],t,n)=>{if(!e||lt)return;let r=function(e,t){return e?(Qj.controllers[e]=t,()=>{Qj.controllers[e]===t&&delete Qj.controllers[e]}):()=>{}}(e,{captureRestoreAnchor:rn,restoreAnchor:an,getAnchorDrift:on,getReport:Ir});n(()=>{r()})},{immediate:!0}),l(()=>{(function(){if(Q.value)try{Ea(),Ji();let e=di(`manual`);sa(e)&&(de(e),na=e,ta=oa());let t=wi(e,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});t&&(fe(t),t.anchor&&pe(t.anchor),ra=pa(t))}catch{}})(),ka(),fr(),Ve(),Da();for(let e of Fn.values())for(let t of e)er(t);Fn.clear(),Pn.clear(),Ut.clear(),Oa(),wa(),br(),tn(),Oi(),ha(),pr(),rr()});let Ra=S({loader:()=>BD(null,null,function*(){try{return(yield K(()=>Promise.resolve().then(()=>VF),void 0)).default}catch(e){return console.warn(`[markstream-vue] Optional peer dependencies for MermaidBlockNode are missing. Falling back to preformatted code rendering. To enable Mermaid rendering, please install "mermaid".`,e),sk}}),loadingComponent:dN,delay:0}),za=S({loader:()=>BD(null,null,function*(){try{return(yield K(()=>Promise.resolve().then(()=>dF),void 0)).default}catch(e){return console.warn(`[markstream-vue] Failed to load InfographicBlockNode. Falling back to preformatted code rendering. To enable Infographic rendering, install "@antv/infographic" and configure setInfographicLoader with a dynamic loader.`,e),sk}}),loadingComponent:uN,delay:0}),Ba=S(()=>BD(null,null,function*(){try{return(yield K(()=>Promise.resolve().then(()=>BI),void 0)).default}catch(e){return console.warn(`[markstream-vue] Optional peer dependencies for D2BlockNode are missing. Falling back to preformatted code rendering. To enable D2 rendering, please install "@terrastruct/d2".`,e),sk}})),Va={text:dk,paragraph:yA,heading:rA,code_block:pk,list:lA,list_item:cA,blockquote:Gk,table:DA,definition_list:Yk,footnote:eA,footnote_reference:oO,footnote_anchor:Zk,admonition:EN,vmr_container:MA,hardbreak:Lk,link:kk,image:ZO,thematic_break:kA,math_inline:mk,math_block:hk,strong:Sk,emphasis:Fk,strikethrough:wk,highlight:Nk,insert:jk,subscript:bk,superscript:vk,emoji:rO,checkbox:tO,checkbox_input:tO,inline_code:SO,html_inline:yO,reference:gk,html_block:gA},Ha=I(()=>Lr()),Ua=I(()=>fM(z.codeBlockProps)),Wa=I(()=>fM(z.codeBlockProps,{omit:[`langs`]})),Ga=I(()=>$($({stream:z.codeBlockStream,darkTheme:z.codeBlockDarkTheme,lightTheme:z.codeBlockLightTheme,monacoOptions:z.codeBlockMonacoOptions,themes:z.themes,langs:y.value===`shiki`?z.langs:void 0,minWidth:z.codeBlockMinWidth,maxWidth:z.codeBlockMaxWidth},typeof Ee.value==`boolean`?{showTooltips:Ee.value}:{}),Wa.value)),Ka=I(()=>$(zD($({},Ga.value),{langs:z.langs}),Ua.value));function qa(e){return typeof e==`boolean`?e:void 0}let Ja=I(()=>{let e=z.codeBlockProps||{},t={},n=qa(e.showLineNumbers);n!==void 0&&(t.showLineNumbers=n);let r=qa(e.diffInline);r!==void 0&&(t.diffInline=r);let i=function(e){let t=Number(e);return Number.isFinite(t)&&t>0?t:void 0}(e.reservedHeightPx);return i!==void 0&&(t.reservedHeightPx=i),t}),Ya=I(()=>$($({stream:z.codeBlockStream,darkTheme:z.codeBlockDarkTheme,lightTheme:z.codeBlockLightTheme,themes:z.themes,langs:z.langs,minWidth:z.codeBlockMinWidth,maxWidth:z.codeBlockMaxWidth},typeof Ee.value==`boolean`?{showTooltips:Ee.value}:{}),Ua.value)),Xa=I(()=>$({},z.mermaidProps||{})),Za=I(()=>$({},z.d2Props||{})),Qa=I(()=>$({},z.infographicProps||{})),$a=I(()=>({typewriter:z.typewriter,fade:z.fade,customHtmlTags:tt.value.customHtmlTags})),eo=I(()=>$($({},$a.value),typeof Ee.value==`boolean`?{showTooltip:Ee.value}:{})),to=I(()=>$($({},$a.value),typeof Ee.value==`boolean`?{showTooltips:Ee.value}:{})),no=I(()=>$($({},$a.value),typeof Ee.value==`boolean`?{showTooltips:Ee.value}:{})),ro=I(()=>$($({},$a.value),typeof Ee.value==`boolean`?{showTooltips:Ee.value}:{}));function io(e){return Array.isArray(e.children)&&e.children.length>0}let ao=I(()=>jr.value.map(e=>{let t=function(e){if(e.type!==`code_block`)return e;let t=e,n=[String(t.language??``),String(t.loading??``),String(t.diff??``),String(t.code??``),String(t.originalCode??``),String(t.updatedCode??``),String(t.raw??``)].join(`\0`),r=Ht.get(t);if(r&&r.signature===n)return r.node;let i=$({},t);return Ht.set(t,{signature:n,node:i}),i}(e.node),n=oo(t),r=fo(t,n);if((t.type===`html_block`||t.type===`html_inline`)&&r===Va[t.type]){let e=t,n=String(e.tag??``).trim().toLowerCase()||Z_(e.content);if(n){let i=$e.value[n];if(et.value.has(n)&&i)r=i,t=zD($({},e),{type:n,tag:n,content:ev(e.content,n)});else if($_(e.content??e.raw,n)){let n=String(e.content??e.raw??``);t.type===`html_inline`?(r=dk,t={type:`text`,content:n,raw:n}):(r=yA,t={type:`paragraph`,children:[{type:`text`,content:n,raw:n}],raw:n})}}}let i=t.type===`code_block`&&y.value===`pre`&&r===sk&&!so($e.value,n),a=$({},function(e,t,n){let r=t??oo(e);if(e.type===`code_block`){let t=r?so($e.value,r):void 0;if(n&&y.value===`pre`&&!t&&n===sk)return Ja.value;if(n&&r&&n===t)return r===`mermaid`?lo(e):r===`infographic`?uo(e):r===`d2`||r===`d2lang`?Za.value:Ka.value;if(n&&n===$e.value.code_block)return Ka.value;if(Sr(n))return Ya.value}return r===`mermaid`?lo(e):r===`infographic`?uo(e):r===`d2`||r===`d2lang`?Za.value:e.type===`link`?eo.value:e.type===`list`?to.value:e.type===`blockquote`?no.value:e.type===`table`?ro.value:e.type===`code_block`?Ga.value:$a.value}(t,n,r)),o=wr.value[e.index];t.type===`code_block`&&o?.kind===`code-block`&&(a=zD($({},a),i?{reservedHeightPx:o.height??o.contentHeight}:{estimatedHeightPx:o.height,estimatedContentHeightPx:o.contentHeight})),i||t.type!==`code_block`||n!==`mermaid`||hM(a.estimatedPreviewHeightPx)!=null||(a=zD($({},a),{estimatedPreviewHeightPx:bM(_M(String(t.code??``)))})),i||t.type!==`code_block`||n!==`infographic`||hM(a.estimatedPreviewHeightPx)!=null||(a=zD($({},a),{estimatedPreviewHeightPx:xM(vM(String(t.code??``)))})),t.type===`math_block`&&(a=zD($({},a),{cacheScope:Qe.value}));let s=function(e,t){let n=String(e.type);return!qD(n)&&$e.value[n]===t}(t,r),c=s?fO(t,De.value):void 0;return zD($({},e),{node:t,component:r,bindings:a,customBindings:$($({},c??{}),a),rendersCustomNode:s,hasSlotChildren:io(t),slotContent:String(t.content??``),isCodeBlock:t.type===`code_block`,indexKey:`${Ha.value}-${e.index}`})}));function oo(e){return e?.type===`code_block`?String(e.language??``).trim().toLowerCase():``}function so(e,t){let n=t.trim().toLowerCase();if(n)for(let t of[n,OE(n),ZT(n)]){let n=t&&e[t];if(n)return n}}function co(e,t,n,r){let i=$({},e.value);return hM(i.estimatedPreviewHeightPx)??(i.estimatedPreviewHeightPx=r(n(String(t?.code??``)),void 0,i.maxHeight===`none`?null:hM(i.maxHeight)??void 0)),i}function lo(e){return co(Xa,e,_M,bM)}function uo(e){return co(Qa,e,vM,xM)}function fo(e,t){if(!e)return jA;let n=$e.value,r=n[String(e.type)];if(e.type===`code_block`){let i=t??oo(e);return(i?so(n,i):void 0)||(y.value===`pre`?n.code_block||sk:i===`mermaid`?n.mermaid||Ra:i===`infographic`?n.infographic||za:i===`d2`||i===`d2lang`?n.d2||Ba:r||n.code_block||Cr.value)}return r||Va[String(e.type)]||jA}function po(e){o(`click`,e)}function mo(e){var t;(t=e.target)!=null&&t.closest(`[data-node-index]`)&&o(`mouseover`,e)}function ho(e){var t;(t=e.target)!=null&&t.closest(`[data-node-index]`)&&o(`mouseout`,e)}function go(e){o(`mouseover`,e)}function _o(e){o(`mouseout`,e)}let vo=M(null),yo=M(!1),bo,xo=null,So=0,Co=0,wo=0,To=[`code_block`,`admonition`,`table`,`math_block`,`html_block`,`image`,`thematic_break`],Eo=new Set(To),Do=[`.typewriter-cursor`,`.height-estimation-probes`,...To.map(e=>`[data-node-type="${e}"]`),`script`,`style`].join(`,`);function Oo(e){if(!e||typeof e!=`object`)return!1;let t=e.type;return typeof t==`string`&&Eo.has(t)}function ko(e){if(!e||typeof e!=`object`)return 0;let t=e,n=t.raw??t.content??t.code;if(typeof n==`string`)return n.length;let r=t.children;if(Array.isArray(r))return r.reduce((e,t)=>e+ko(t),0);let i=t.items;return Array.isArray(i)?i.reduce((e,t)=>e+ko(t),0):0}function Ao(){bo&&=(clearTimeout(bo),void 0)}function jo(){So+=1,xo!=null&&(Dt?.(xo),xo=null)}function Mo(){jo(),vo.value&&(vo.value.style.visibility=`hidden`)}function No(e){if(e.nodeType!==Node.TEXT_NODE||!(e.textContent??``).trim())return!1;let t=e.parentElement;return!!t&&!t.closest(Do)}function Po(e){let t=e.lastChild;for(;t;){if(No(t))return t;if(t.nodeType===Node.ELEMENT_NODE){let e=t;if(!e.matches(Do)&&e.lastChild){t=e.lastChild;continue}}for(;t&&t!==e&&!t.previousSibling;)t=t.parentNode;if(!t||t===e)break;t=t.previousSibling}return null}function Fo(){if(!q||!yo.value||xo!=null)return;let e=So,t=()=>{xo=null,e===So&&function(){if(!(q&&yo.value&&B.value&&vo.value))return;let e=B.value,t=vo.value;t.style.visibility=`hidden`;let n=function(){let e=ao.value;for(let t=e.length-1;t>=0;t--){let n=e[t];if(!n||Oo(n.node)||!ba(n.index))continue;let r=Rt.get(n.index);if(!r)continue;let i=Po(r);if(i)return i}return null}();if(!n)return;let r=0,i=0,a=20,o=!1;if(n?.textContent){let t=n.textContent.length,s=document.createRange();s.setStart(n,Math.max(0,t-1)),s.setEnd(n,t);let c=typeof s.getClientRects==`function`?s.getClientRects():void 0,l=c?.[c.length-1]??n.parentElement?.getBoundingClientRect();if(l){let t=Y(`typewriterCursor.root.getBoundingClientRect`,()=>e.getBoundingClientRect());r=l.right-t.left+e.scrollLeft,i=l.top-t.top+e.scrollTop,a=l.height||a,o=!0}s.detach()}o&&(t.style.transform=`translate(${Math.max(0,r)}px, ${Math.max(0,i)}px)`,t.style.height=`${a}px`,t.style.visibility=`visible`)}()};Et?xo=Et(t):t()}return E([Fe,()=>r.content,()=>r.nodes,()=>z.typewriter,Ie],()=>BD(null,null,function*(){if(!q||we.value||!Oe.value)return;if(Ie.value)return yo.value=!1,Ao(),void Mo();if(r.nodes?.length)return yo.value=!1,Ao(),Mo(),Co=(r.content??``).length,void(wo=Fe.value.length);let e=function(){return r.nodes?.length?r.nodes.reduce((e,t)=>e+ko(t),0):(r.content??``).length}(),t=function(){return r.nodes?.length?r.nodes.reduce((e,t)=>e+ko(t),0):Fe.value.length}(),n=!Oo(X.value[X.value.length-1]),i=e>Co,a=t>wo;if(!1===z.typewriter||!n||!i&&!a)return!1!==z.typewriter&&n||(yo.value=!1,Mo()),Co=e,void(wo=t);Co=e,wo=t,yo.value=!0,vo.value&&(vo.value.style.visibility=`hidden`),Ao(),yield g(),Fo(),bo=setTimeout(()=>{bo=void 0,yo.value=!1},3e3)}),{flush:`post`,immediate:!0}),E(yo,e=>BD(null,null,function*(){e?(yield g(),Fo()):Mo()}),{flush:`post`}),E([()=>Pt.value,()=>jn.start,()=>jn.end],()=>BD(null,null,function*(){q&&!we.value&&Oe.value&&yo.value&&(yield g(),Fo())}),{flush:`post`}),l(()=>{Ao(),jo(),Ze.clear()}),(e,t)=>{let n=C(`NodeRenderer`,!0);return R(we)?(G(!0),W(N,{key:0},w(ao.value,e=>(G(),W(N,{key:e.index},[e.rendersCustomNode?(G(),O(T(e.component),h({key:0,ref_for:!0},e.customBindings,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":z.customId,"is-dark":z.isDark,onClick:po,onMouseover:go,onMouseout:_o,onCopy:t[0]||=e=>o(`copy`,e),onHandleArtifactClick:t[1]||=e=>o(`handleArtifactClick`,e)}),{default:D(()=>[e.hasSlotChildren?(G(),O(n,h({key:0,ref_for:!0},nt.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`,`index-key`])):e.slotContent?(G(),O(n,h({key:1,ref_for:!0},nt.value,{content:e.slotContent,final:!e.node.loading,"index-key":`${e.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`content`,`final`,`index-key`])):V(``,!0)]),_:2},1040,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):(G(),O(T(e.component),h({key:1,node:e.node,loading:e.node.loading,"index-key":e.indexKey},{ref_for:!0},e.bindings,{"custom-id":z.customId,"is-dark":z.isDark,onClick:po,onMouseover:go,onMouseout:_o,onCopy:t[2]||=e=>o(`copy`,e),onHandleArtifactClick:t[3]||=e=>o(`handleArtifactClick`,e)}),null,16,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`]))],64))),128)):(G(),W(`div`,{key:1,ref_key:`containerRef`,ref:B,class:L([`markstream-vue markdown-renderer`,[{dark:z.isDark},{virtualized:St.value},{"virtual-scroll-coordinated":mt.value}]]),"data-custom-id":z.customId,onClick:po,onMouseover:mo,onMouseout:ho},[gt.value||St.value?(G(),W(N,{key:0},[gt.value?(G(),W(`div`,{key:0,class:`height-estimation-probes`,style:k({width:`${bt.value}px`}),"aria-hidden":`true`},[F(`div`,{ref_key:`paragraphProbeWrapperRef`,ref:me,class:`node-content`,"data-probe":`paragraph`},[U(R(yA),{node:at.value,"index-key":`probe-paragraph`},null,8,[`node`])],512),F(`div`,{ref_key:`listItemProbeWrapperRef`,ref:he,class:`node-content`,"data-probe":`list-item`},[F(`ul`,pN,[U(R(cA),{node:ot.value,"index-key":`probe-list-item`},null,8,[`node`])])],512),F(`div`,{ref_key:`listProbeWrapperRef`,ref:H,class:`node-content`,"data-probe":`list`},[U(R(lA),{node:st.value,"index-key":`probe-list`},null,8,[`node`])],512),(G(),W(N,null,w(6,e=>F(`div`,{key:`probe-heading-${e}`,ref_for:!0,ref:t=>function(e,t){e<1||e>6||(ge[e]=t)}(e,t),class:`node-content`,"data-probe":`heading-${e}`},[U(R(rA),{node:nr(e),"index-key":`probe-heading-${e}`},null,8,[`node`,`index-key`])],8,mN)),64))],4)):V(``,!0),St.value?(G(),W(`div`,{key:1,class:`node-spacer`,style:k({height:`${Mr.value}px`}),"aria-hidden":`true`},null,4)):V(``,!0)],64)):V(``,!0),(G(!0),W(N,null,w(ao.value,e=>(G(),W(`div`,{key:e.index,ref_for:!0,ref:t=>Sa(e.index,t),class:`node-slot`,"data-node-index":e.index,"data-node-type":e.node.type},[ba(e.index)?(G(),W(`div`,{key:0,ref_for:!0,ref:t=>function(e,t){t||function(e){let t=`${Lr()}-${e}`,n=!1;for(let r of Array.from(Hn.keys()))(Un.get(r)?.index===e||r===t||r.startsWith(`${t}-`))&&(Hn.delete(r),Un.delete(r),n=!0);n&&(Yr(),_a(`async-node`))}(e),Ln.delete(e),function(e){let t=(Pn.get(e)??0)+1;Pn.set(e,t)}(e);let n=Fn.get(e);if(n){for(let e of n)er(e);Fn.delete(e)}if(function(e){let t=zt.get(e);t&&(Vt?.unobserve(t),Bt.delete(t),zt.delete(e))}(e),!t||!Ct.value)return Nn.delete(e),void Pn.delete(e);Nn.set(e,t);let r=()=>{Ta(e,t)};queueMicrotask(r);let i=(Vt||typeof ResizeObserver>`u`||(Vt=new ResizeObserver(e=>{if(e.length)for(let t of e){let e=Bt.get(t.target),n=zt.get(e??-1);e!=null&&n&&Ta(e,n)}else Ea()})),Vt);if(i&&(zt.set(e,t),Bt.set(t,e),i.observe(t)),typeof window<`u`){let t=X.value[e]?.type===`code_block`?[16,80,240,800]:Ie.value?[80]:[];if(t.length){let n=t.map(e=>$n(e,r,`node-resize`)).filter(e=>e!=null);n.length&&Fn.set(e,n)}}}(e.index,t),class:`node-content`},[e.isCodeBlock?e.rendersCustomNode?(G(),O(T(e.component),h({key:1,ref_for:!0},e.customBindings,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":z.customId,"is-dark":z.isDark,onCopy:t[8]||=e=>o(`copy`,e),onHandleArtifactClick:t[9]||=e=>o(`handleArtifactClick`,e)}),{default:D(()=>[e.hasSlotChildren?(G(),O(n,h({key:0,ref_for:!0},nt.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`,`index-key`])):e.slotContent?(G(),O(n,h({key:1,ref_for:!0},nt.value,{content:e.slotContent,final:!e.node.loading,"index-key":`${e.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`content`,`final`,`index-key`])):V(``,!0)]),_:2},1040,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):(G(),O(T(e.component),h({key:2,node:e.node,loading:e.node.loading,"index-key":e.indexKey},{ref_for:!0},e.bindings,{"custom-id":z.customId,"is-dark":z.isDark,onCopy:t[10]||=e=>o(`copy`,e),onHandleArtifactClick:t[11]||=e=>o(`handleArtifactClick`,e)}),null,16,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):(G(),O(ce,{key:0,name:`fade`,css:!1!==z.fade,appear:!1!==z.fade},{default:D(()=>[e.rendersCustomNode?(G(),O(T(e.component),h({key:0,ref_for:!0},e.customBindings,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":z.customId,"is-dark":z.isDark,onCopy:t[4]||=e=>o(`copy`,e),onHandleArtifactClick:t[5]||=e=>o(`handleArtifactClick`,e)}),{default:D(()=>[e.hasSlotChildren?(G(),O(n,h({key:0,ref_for:!0},nt.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`,`index-key`])):e.slotContent?(G(),O(n,h({key:1,ref_for:!0},nt.value,{content:e.slotContent,final:!e.node.loading,"index-key":`${e.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`content`,`final`,`index-key`])):V(``,!0)]),_:2},1040,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):(G(),O(T(e.component),h({key:1,node:e.node,loading:e.node.loading,"index-key":e.indexKey},{ref_for:!0},e.bindings,{"custom-id":z.customId,"is-dark":z.isDark,onCopy:t[6]||=e=>o(`copy`,e),onHandleArtifactClick:t[7]||=e=>o(`handleArtifactClick`,e)}),null,16,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`]))]),_:2},1032,[`css`,`appear`]))],512)):(G(),W(`div`,{key:1,class:`node-placeholder`,style:k({height:`${Tr(e.index)}px`})},null,4))],8,hN))),128)),yo.value?(G(),W(`span`,{key:1,ref_key:`typewriterCursorRef`,ref:vo,class:`typewriter-cursor`,"aria-hidden":`true`},null,512)):V(``,!0),St.value?(G(),W(`div`,{key:2,class:`node-spacer`,style:k({height:`${Nr.value}px`}),"aria-hidden":`true`},null,4)):V(``,!0)],42,fN))}}})),[[`__scopeId`,`data-v-6eca2e33`]]),_N=gN;_N.install=e=>{let t=new Set([`MarkdownRender`,`NodeRenderer`,_N.__name,_N.name].filter(e=>!!e));for(let n of t)e.component(n,gN)};var vN=Object.freeze(Object.defineProperty({__proto__:null,default:_N},Symbol.toStringTag,{value:`Module`})),yN={key:0,xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`admonition-icon`},bN={key:1,xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`admonition-icon`},xN={key:2,xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`admonition-icon`},SN={key:3,xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`admonition-icon`},CN={class:`admonition-title`},wN=[`aria-expanded`,`aria-controls`],TN=[`id`],EN=eO(c({__name:`AdmonitionNode`,props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:[`copy`],setup(e,{emit:t}){var n;let r=e,i=t,a=I(()=>{if(r.node.title&&r.node.title.trim().length)return r.node.title;let e=r.node.kind||`note`;return e.charAt(0).toUpperCase()+e.slice(1)}),o=M(!!r.node.collapsible&&!((n=r.node.open)==null||n));function s(){r.node.collapsible&&(o.value=!o.value)}let c=`admonition-${Math.random().toString(36).slice(2,9)}`;return(t,n)=>(G(),W(`div`,{class:L([`admonition`,[`admonition-${r.node.kind}`]])},[F(`div`,{id:c,class:`admonition-legend`},[r.node.kind===`note`||r.node.kind===`info`?(G(),W(`svg`,yN,[...n[1]||=[F(`circle`,{cx:`12`,cy:`12`,r:`10`},null,-1),F(`path`,{d:`M12 16v-4`},null,-1),F(`path`,{d:`M12 8h.01`},null,-1)]])):r.node.kind===`tip`?(G(),W(`svg`,bN,[...n[2]||=[F(`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`},null,-1),F(`path`,{d:`M9 18h6`},null,-1),F(`path`,{d:`M10 22h4`},null,-1)]])):r.node.kind===`warning`||r.node.kind===`caution`?(G(),W(`svg`,xN,[...n[3]||=[F(`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`},null,-1),F(`path`,{d:`M12 9v4`},null,-1),F(`path`,{d:`M12 17h.01`},null,-1)]])):r.node.kind===`danger`||r.node.kind===`error`?(G(),W(`svg`,SN,[...n[4]||=[F(`polygon`,{points:`7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2`},null,-1),F(`path`,{d:`M12 8v4`},null,-1),F(`path`,{d:`M12 16h.01`},null,-1)]])):V(``,!0),F(`span`,CN,H(a.value),1),r.node.collapsible?(G(),W(`button`,{key:4,class:`admonition-toggle`,"aria-expanded":!o.value,"aria-controls":`${c}-content`,onClick:s},[(G(),W(`svg`,{style:k({rotate:o.value?`0deg`:`90deg`}),xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[...n[5]||=[F(`path`,{d:`m9 18 6-6-6-6`},null,-1)]],4))],8,wN)):V(``,!0)]),y(F(`div`,{id:`${c}-content`,class:`admonition-content`,"aria-labelledby":c},[U(R(_N),{"index-key":`admonition-${e.indexKey}`,nodes:r.node.children,"custom-id":r.customId,typewriter:r.typewriter,fade:r.fade,onCopy:n[0]||=e=>i(`copy`,e)},null,8,[`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`])],8,TN),[[ee,!o.value]])],2))}}),[[`__scopeId`,`data-v-a83480e1`]]);EN.install=e=>{e.component(EN.__name,EN)};var DN=()=>K(()=>import(`./d2_markstream-vue-xMoF3M5G.js`),[]),ON=null,kN=DN;function AN(){return BD(this,null,function*(){if(ON)return ON;let e=kN;if(!e)return null;let t;try{t=yield e()}catch(t){throw e===DN?Error(`Optional dependency "@terrastruct/d2" is not installed. Please install it to enable D2 diagrams.`):t}return t?(ON=function(e){if(!e)return e;if(e.D2&&typeof e.D2==`function`)return e.D2;if(e.default&&e.default.D2&&typeof e.default.D2==`function`)return e.default.D2;let t=e.default??e;return typeof t==`function`?t:t?.D2&&typeof t.D2==`function`?t.D2:t}(t),ON):null})}var jN=null,MN=null,NN=0;function PN(){return typeof MN==`function`}function FN(){return BD(this,null,function*(){if(jN)return jN;let e=MN,t=NN;if(!e)return null;let n=yield e();if(t!==NN||e!==MN)return null;let r=function(e){if(!e)return null;let t=e.default??e,n=typeof t==`function`&&typeof t.prototype?.render==`function`?t:e.Infographic??t?.Infographic;return typeof n==`function`?n:null}(n);return t!==NN||e!==MN?null:r?(jN=r,jN):null})}function IN(e){let t=Number.parseFloat(String(e??``));return Number.isFinite(t)?t:0}function LN(e,t){e?.(t)}function RN(e,t){return e?(LN(t,`readElementBoxHeight.offsetHeight`),Math.ceil(Math.max(0,e.offsetHeight||0))):0}function zN(e,t){let n=RN(e,t);if(!e||typeof window>`u`||typeof window.getComputedStyle!=`function`)return n;LN(t,`readElementOuterHeight.getComputedStyle`);let r=window.getComputedStyle(e),i=IN(r.marginTop),a=IN(r.marginBottom);return Math.ceil(Math.max(0,n+i+a))}function BN(e,t,n){if(!e)return 0;let r=function(e){return e?e.matches?.call(e,`.markstream-vue.markdown-renderer`)?e:e.querySelector(`.markstream-vue.markdown-renderer`):null}(e);if(!r)return 0;let i=Number.isFinite(n)?Number(n):zN(e,t),a=RN(r,t);return Math.max(0,i-a)}function VN(e,t,n){let r=n.getKey?.call(n,e,t)??e.id??t;return String(r)}function HN(e,t,n){return n.getKind?.call(n,e,t)??String(e.kind??``)}function UN(e,t,n){let r=n.getContent?.call(n,e,t)??e.content;return typeof r==`string`?r:``}function WN(e,t,n){let r=n.getFinal?.call(n,e,t);if(typeof r==`boolean`)return r;let i=e.final;return typeof i!=`boolean`||i}function GN(e,t,n){return n.getRevision?.call(n,e,t)??e.revision}function KN(e,t,n){let r=HN(e,t,n);return r===`assistant-markdown`||r===`markdown`||!r&&UN(e,t,n).length>0}function qN(e,t,n){let r=n.estimateItemHeight?.call(n,e,t);if(Number.isFinite(r)&&r>0)return r;let i=HN(e,t,n);return i===`assistant-markdown`||i===`markdown`?360:i===`system-divider`?44:i===`tool-call`?72:i===`thinking`?92:i===`error`?76:i===`user-message`?88:UN(e,t,n).length>0?360:96}function JN(e){return S(e)}JN(()=>K(()=>Promise.resolve().then(()=>wI),void 0)),JN(()=>K(()=>Promise.resolve().then(()=>EI),void 0)),JN(()=>K(()=>Promise.resolve().then(()=>NI),void 0)),JN(()=>K(()=>Promise.resolve().then(()=>VF),void 0)),JN(()=>K(()=>Promise.resolve().then(()=>dF),void 0)),JN(()=>K(()=>Promise.resolve().then(()=>BI),void 0)),JN(()=>K(()=>Promise.resolve().then(()=>TI),void 0)),JN(()=>K(()=>Promise.resolve().then(()=>pL),void 0)),JN(()=>K(()=>Promise.resolve().then(()=>DL),void 0));var YN={key:0,class:`code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]`},XN={class:`flex items-center gap-0.5`},ZN=[`aria-label`],QN={class:`code-diff-stat removed`},$N={class:`code-diff-stat added`},eP=[`aria-label`],tP={key:0,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},nP={key:1,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},rP=[`aria-pressed`],iP={key:3,class:`relative`},aP=[`aria-expanded`],oP=[`disabled`],sP=[`disabled`],cP=[`disabled`],lP={key:0,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},uP={key:1,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},dP={class:`code-block-shell-content`},fP={class:`code-loading-placeholder`},pP={class:`sr-only`,"aria-live":`polite`,role:`status`},mP=c({__name:`CodeBlockShell`,props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:[`toggleCollapse`,`decreaseFont`,`resetFont`,`increaseFont`,`copy`,`toggleExpand`,`preview`],setup(e,{emit:t}){let n=e,r=t,i=M(!1),a=M(null),o=M(null);function s(){i.value=!i.value,i.value&&document.addEventListener(`click`,c,{once:!0,capture:!0})}function c(e){let t=e.target;a.value?.contains(t)||o.value?.contains(t)?document.addEventListener(`click`,c,{once:!0,capture:!0}):i.value=!1}let l=I(()=>n.showFontSizeButtons&&n.enableFontSizeControl||n.showExpandButton||n.isPreviewable&&n.showPreviewButton),{t:u}=UO(),f=I(()=>!1!==n.showTooltips);function p(e,t){f.value&&RO(e.currentTarget,t,`top`,!1,void 0,n.isDark)}function m(){f.value&&zO()}function h(e){p(e,n.copyText?u(`common.copied`)||`Copied`:u(`common.copy`)||`Copy`)}let g=I(()=>!!Number.isFinite(n.codeFontSize)&&(n.codeFontSize??0)<=(n.codeFontMin??0)),_=I(()=>!n.fontBaselineReady||n.codeFontSize===n.defaultCodeFontSize),v=I(()=>!!Number.isFinite(n.codeFontSize)&&(n.codeFontSize??0)>=(n.codeFontMax??100));return(t,c)=>(G(),W(N,null,[n.showHeader?(G(),W(`div`,YN,[d(t.$slots,`header-left`),d(t.$slots,`header-right`,{},()=>[F(`div`,XN,[e.diffStats?(G(),W(`div`,{key:0,class:`code-diff-stats`,"aria-label":e.diffStatsAriaLabel},[F(`span`,QN,`-`+H(e.diffStats.removed),1),F(`span`,$N,`+`+H(e.diffStats.added),1)],8,ZN)):V(``,!0),n.showCopyButton?(G(),W(`button`,{key:1,type:`button`,class:`code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,"aria-label":e.copyText?R(u)(`common.copied`)||`Copied`:R(u)(`common.copy`)||`Copy`,onClick:c[0]||=e=>r(`copy`),onMouseenter:c[1]||=e=>h(e),onFocus:c[2]||=e=>h(e),onMouseleave:m,onBlur:m},[e.copyText?(G(),W(`svg`,nP,[...c[14]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M20 6L9 17l-5-5`},null,-1)]])):(G(),W(`svg`,tP,[...c[13]||=[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),F(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})],-1)]]))],40,eP)):V(``,!0),n.showCollapseButton?(G(),W(`button`,{key:2,type:`button`,class:`code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,"aria-pressed":e.isCollapsed,onClick:c[3]||=e=>r(`toggleCollapse`),onMouseenter:c[4]||=t=>p(t,e.isCollapsed?R(u)(`common.expand`)||`Expand`:R(u)(`common.collapse`)||`Collapse`),onFocus:c[5]||=t=>p(t,e.isCollapsed?R(u)(`common.expand`)||`Expand`:R(u)(`common.collapse`)||`Collapse`),onMouseleave:m,onBlur:m},[(G(),W(`svg`,{style:k({rotate:e.isCollapsed?`0deg`:`90deg`}),xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[...c[15]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m9 18l6-6l-6-6`},null,-1)]],4))],40,rP)):V(``,!0),l.value?(G(),W(`div`,iP,[F(`button`,{ref_key:`moreBtnRef`,ref:o,type:`button`,class:`code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors`,"aria-expanded":i.value,"aria-haspopup":`true`,onClick:me(s,[`stop`]),onMouseenter:c[6]||=e=>p(e,R(u)(`common.more`)||`More`),onFocus:c[7]||=e=>p(e,R(u)(`common.more`)||`More`),onMouseleave:m,onBlur:m},[...c[16]||=[x(`<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="1em" height="1em" viewBox="0 0 24 24" class="action-icon"><g fill="currentColor"><circle cx="12" cy="5" r="1.5"></circle><circle cx="12" cy="12" r="1.5"></circle><circle cx="12" cy="19" r="1.5"></circle></g></svg>`,1)]],40,aP),U(ce,{name:`code-menu`},{default:D(()=>[i.value?(G(),W(`div`,{key:0,ref_key:`moreMenuRef`,ref:a,class:`code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]`,role:`menu`},[n.showFontSizeButtons&&n.enableFontSizeControl?(G(),W(N,{key:0},[F(`button`,{type:`button`,role:`menuitem`,class:`flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,disabled:g.value,onClick:c[8]||=e=>r(`decreaseFont`)},[c[17]||=F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 12h14`})],-1),F(`span`,null,H(R(u)(`common.fontSmaller`)||`Font size −`),1)],8,oP),F(`button`,{type:`button`,role:`menuitem`,class:`flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,disabled:_.value,onClick:c[9]||=e=>r(`resetFont`)},[c[18]||=F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`path`,{d:`M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8`}),F(`path`,{d:`M3 3v5h5`})])],-1),F(`span`,null,H(R(u)(`common.fontReset`)||`Font size reset`),1)],8,sP),F(`button`,{type:`button`,role:`menuitem`,class:`flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,disabled:v.value,onClick:c[10]||=e=>r(`increaseFont`)},[c[19]||=F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 12h14m-7-7v14`})],-1),F(`span`,null,H(R(u)(`common.fontLarger`)||`Font size +`),1)],8,cP)],64)):V(``,!0),n.showExpandButton?(G(),W(`button`,{key:1,type:`button`,role:`menuitem`,class:`flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors`,onClick:c[11]||=e=>{r(`toggleExpand`,e),i.value=!1}},[e.isExpanded?(G(),W(`svg`,lP,[...c[20]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6`},null,-1)]])):(G(),W(`svg`,uP,[...c[21]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6`},null,-1)]])),F(`span`,null,H(e.isExpanded?R(u)(`common.collapse`)||`Collapse`:R(u)(`common.expand`)||`Expand`),1)])):V(``,!0),e.isPreviewable&&n.showPreviewButton?(G(),W(`button`,{key:2,type:`button`,role:`menuitem`,class:`flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors`,onClick:c[12]||=e=>{r(`preview`),i.value=!1}},[c[22]||=F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0`}),F(`circle`,{cx:`12`,cy:`12`,r:`3`})])],-1),F(`span`,null,H(R(u)(`common.preview`)||`Preview`),1)])):V(``,!0)],512)):V(``,!0)]),_:1})])):V(``,!0)])])])):V(``,!0),y(F(`div`,dP,[d(t.$slots,`default`)],512),[[ee,!(e.isCollapsed||!e.stream&&e.loading)]]),y(F(`div`,fP,[d(t.$slots,`loading`,{},()=>[c[23]||=F(`div`,{class:`loading-skeleton`},[F(`div`,{class:`skeleton-line`}),F(`div`,{class:`skeleton-line`}),F(`div`,{class:`skeleton-line short`})],-1)])],512),[[ee,!e.stream&&e.loading]]),F(`span`,pP,H(e.copyText?R(u)(`common.copied`)||`Copied`:``),1)],64))}}),hP=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),gP=!1,_P=null,vP=null,yP=!1,bP=null;function xP(){return hP(this,null,function*(){if(bP)return bP;bP=hP(null,null,function*(){if(!vP){if(yP)return null;try{if(vP=function(e){let t=e;if(typeof t?.useMonaco==`function`)return t;let n=e?.default;return typeof n?.useMonaco==`function`?n:null}(yield K(()=>import(`./__vite-optional-peer-dep_stream-monaco_markstream-vue-Cr1d6De7.js`),[])),!vP)return yP=!0,null}catch{return yP=!0,null}}try{return yield function(e){return hP(this,null,function*(){if(!gP)return _P||(_P=hP(null,null,function*(){let t=globalThis==null?void 0:globalThis.MonacoEnvironment;t&&(typeof t.getWorker==`function`||typeof t.getWorkerUrl==`function`)||typeof e?.preloadMonacoWorkers!=`function`||(yield e.preloadMonacoWorkers()),gP=!0}).finally(()=>{_P=null}),_P)})}(vP),PE(),vP}catch{return null}});try{return yield bP}finally{bP=null}})}var SP=n({default:()=>tF}),CP=Object.defineProperty,wP=Object.defineProperties,TP=Object.getOwnPropertyDescriptors,EP=Object.getOwnPropertySymbols,DP=Object.prototype.hasOwnProperty,OP=Object.prototype.propertyIsEnumerable,kP=(e,t,n)=>t in e?CP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,AP=(e,t)=>{for(var n in t||={})DP.call(t,n)&&kP(e,n,t[n]);if(EP)for(var n of EP(t))OP.call(t,n)&&kP(e,n,t[n]);return e},jP=(e,t)=>wP(e,TP(t)),MP=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),NP={class:`html-preview-frame__header`},PP={class:`html-preview-frame__title`},FP={class:`html-preview-frame__label`},IP=[`sandbox`,`srcdoc`],LP=eO(c({__name:`HtmlPreviewFrame`,props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(e){let t=e,{t:n}=UO(),r=I(()=>{let 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>`}),i=I(()=>{return e=t.htmlPreviewSandbox,n=t.htmlPreviewAllowScripts,typeof e==`string`?e:e===void 0&&!0===n?`allow-scripts`:``;var e,n});function a(e){var n;e.key!==`Escape`&&e.key!==`Esc`||(n=t.onClose)==null||n.call(t)}return f(()=>{typeof window<`u`&&window.addEventListener(`keydown`,a)}),m(()=>{typeof window<`u`&&window.removeEventListener(`keydown`,a)}),(e,a)=>(G(),O(z,{to:`body`},[F(`div`,{class:L([`markstream-vue`,{dark:t.isDark}])},[F(`div`,{class:`html-preview-frame__backdrop`,onClick:a[2]||=e=>t.onClose?.call(t)},[F(`div`,{class:`html-preview-frame`,onClick:a[1]||=me(()=>{},[`stop`])},[F(`div`,NP,[F(`div`,PP,[a[3]||=F(`span`,{class:`html-preview-frame__dot`},null,-1),F(`span`,FP,H(t.title||R(n)(`common.preview`)||`Preview`),1)]),F(`button`,{type:`button`,class:`html-preview-frame__close`,onClick:a[0]||=e=>t.onClose?.call(t)},` × `)]),F(`iframe`,{class:`html-preview-frame__iframe`,sandbox:i.value,referrerpolicy:`no-referrer`,srcdoc:r.value},null,8,IP)])])],2)]))}}),[[`__scopeId`,`data-v-24e66176`]]),RP=null,zP=null,BP=null,VP=null,HP=null,UP=null,WP=new WeakMap,GP=0,KP=[`data-markstream-enhanced`,`data-markstream-pending`],qP={class:`code-header-main`},JP=[`innerHTML`],YP={class:`code-header-copy`},XP={class:`code-header-title`},ZP={key:0,class:`code-header-caption`},QP={class:`code-editor-layer`},$P=`__markstreamMonacoPassiveTouchState__`,eF=1.5,tF=eO(c({__name:`CodeBlockNode`,props:{node:{},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},theme:{},darkTheme:{default:`vitesse-dark`},lightTheme:{default:`vitesse-light`},isShowPreview:{type:Boolean,default:!0},monacoOptions:{},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},themes:{},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},customId:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},estimatedHeightPx:{},estimatedContentHeightPx:{}},emits:[`previewCode`,`copy`],setup(e,{emit:t}){let n=e,r=t,a=p(),o=i(mE,null),c=i(`markstreamHostScrollManaged`,null),u=I(()=>WO(n,a)),f=s(),h=I(()=>{let e=f?.vnode.props;return!(!e||!e.onPreviewCode&&!e.onPreviewCode)}),{t:_}=UO(),v=M(null),b=M(null),x=M(!1),S=M(Sn(n.node.language,n.node.code,xn())),C=I(()=>kE(S.value)),w=I(()=>C.value===`plaintext`),T=M(!1),A=M(!1),j=M(!1),N=M(!1),P=M(!1),te=M(!1),ne=!1,re=null,ie=``,ae=M(null),oe=M(null),se=0,ce=0,le=fA(),ue=M(null),z=M(typeof window>`u`);typeof window<`u`&&E(()=>b.value,e=>{var t;if((t=ue.value)==null||t.destroy(),ue.value=null,!e)return void(z.value=!1);let n=le(e,{rootMargin:`400px`});ue.value=n,z.value=n.isVisible.value,n.whenVisible.then(()=>{z.value=!0})},{immediate:!0}),l(()=>{var e;ne=!0,function(){let e=ie;o&&e&&(ie=``,o.markSettled(e))}(),(e=ue.value)==null||e.destroy(),ue.value=null});let de=null,fe=null,pe=()=>{},B=()=>{},me=()=>null,he=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),K=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),_e=()=>{},ve=()=>{},ye=()=>{},be=null,xe=null,Se=()=>String(n.node.language??`plaintext`),Ce=()=>MP(null,null,function*(){}),q=!1,we=[],Te=[],Ee=null;function De(e){return(String(e??``).trim().split(/\s+/,1)[0]??``)===`diff`}let J=I(()=>!0===n.node.diff||De(n.node.language)||De(Tn(String(n.node.raw??``)))),Oe=M({removed:0,added:0}),ke=I(()=>`-${Oe.value.removed} +${Oe.value.added}`),Ae=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5}),je=Object.freeze(jP(AP({},Ae),{enabled:!1,revealLineCount:0}));function Me(e){var t;if(typeof e==`boolean`)return e;if(e&&typeof e==`object`){let n=e;return jP(AP(AP({},Ae),n),{enabled:(t=n.enabled)==null||t})}return AP({},Ae)}function Ne(e){var t;if(!1===e.renderSideBySide)return!0;if(!0!==e.useInlineViewWhenSpaceIsLimited)return!1;let n=e.renderSideBySideInlineBreakpoint,r=typeof n==`number`&&Number.isFinite(n)?n:900,i=((t=b.value)?.getBoundingClientRect)?.call(t).width||b.value?.clientWidth||(typeof window>`u`?0:window.innerWidth);return i>0&&i<=r}function Pe(e,t){return{original:Fe(e,!1),updated:Fe(t,!1)}}function Fe(e,t){let n=String(e??``);return t?n:n.replace(/\r\n$|\n$|\r$/,``)}function Ie(e){return String(e?.message??e).includes(`no diff result available`)}function Le(){try{let e=ye();e&&typeof e.catch==`function`&&e.catch(e=>{Ie(e)})}catch(e){Ie(e)}}let Re=I(()=>{var e,t;let r=n.monacoOptions?AP({},n.monacoOptions):{};if(!J.value)return r;let i=r.diffHideUnchangedRegions===void 0?AP({},Ae):Me(r.diffHideUnchangedRegions),a=r.hideUnchangedRegions===void 0?void 0:Me(r.hideUnchangedRegions),o=!1!==n.stream&&!1!==n.loading,s=o?AP({},je):i,c=o?AP({},je):a,l=function(e){return e.diffWordWrap===void 0?`off`:e.diffWordWrap}(r),u=AP({},r.experimental??{}),d=r.diffUnchangedRegionStyle??`line-info`,f=function(e){if(Ne(e))return jP(AP({},e.scrollbar&&typeof e.scrollbar==`object`?e.scrollbar:{}),{horizontal:`hidden`,horizontalScrollbarSize:0})}(r);return AP(jP(AP(jP(AP(AP({},{maxComputationTime:0,diffAlgorithm:`legacy`,ignoreTrimWhitespace:!1,renderIndicators:!0,diffUpdateThrottleMs:120,renderLineHighlight:`none`,renderLineHighlightOnlyWhenFocus:!0,selectionHighlight:!1,occurrencesHighlight:`off`,matchBrackets:`never`,lineDecorationsWidth:4,lineNumbersMinChars:2,glyphMargin:!1,minimap:{enabled:!1},renderOverviewRuler:!1,overviewRulerBorder:!1,hideCursorInOverviewRuler:!0,scrollBeyondLastLine:!1,diffWordWrap:l,renderSideBySide:(e=r.renderSideBySide)==null||e,diffHideUnchangedRegions:s,useInlineViewWhenSpaceIsLimited:(t=r.useInlineViewWhenSpaceIsLimited)!=null&&t,diffLineStyle:`background`,diffAppearance:`auto`,diffUnchangedRegionStyle:d,diffHunkActionsOnHover:!1,experimental:u}),r),{experimental:u}),c===void 0?{}:{hideUnchangedRegions:c}),{diffHideUnchangedRegions:s,diffWordWrap:l}),f===void 0?{}:{scrollbar:f})}),ze=I(()=>J.value?`diff`:`single`),Be=M(ze.value),Ve=M(!1),He=M(!1),Ue=M(!1),We=M(!1),Ge=M(!1),Ke=null,qe=I(()=>{if(J.value){let e=Re.value?.diffWordWrap;if(e===`inherit`){let e=n.monacoOptions?.wordWrap;return e==null||String(e)!==`off`}return e===`on`}let e=n.monacoOptions?.wordWrap;return e==null||String(e)!==`off`}),Je=I(()=>!!J.value&&Ne(Re.value??{}));function Ye(e){return!0===c?.value||!!e&&(!!e.closest(`[data-markstream-virtual-timeline="1"], .markstream-virtual-timeline`)||!!e.closest(`.vue-recycle-scroller, [data-virtualizer], [data-virtual-scroll-root]`))}let Y=I(()=>Ye(b.value)),Xe=I(()=>!Ve.value&&(!!Ue.value||(J.value||Y.value||!NE())&&!He.value)),Ze=I(()=>Xe.value||We.value),Qe=I(()=>Xe.value&&!We.value),$e=I(()=>!Ve.value&&!Ue.value&&(Xe.value||We.value||Ge.value)),et=M(!1),tt=I(()=>Fe(n.node.code,!0===n.node.loading)),X=I(()=>J.value?!0===n.node.diff?n.node:jP(AP({},n.node),{diff:!0}):tt.value===n.node.code?n.node:jP(AP({},n.node),{code:tt.value}));typeof window<`u`&&MP(null,null,function*(){try{let e=yield xP();if(ne)return;if(!e)return void(Ve.value=!0);let t=e.useMonaco,r=e.detectLanguage;if(typeof r==`function`&&(Se=r),typeof t==`function`){let e=Hn();if(e&&n.themes&&Array.isArray(n.themes)&&!n.themes.includes(e))throw Error(`Preferred theme not in provided themes array`);Ee=Kn();let r=t(Ee);de=r.createEditor||de,fe=r.createDiffEditor||fe,pe=r.updateCode||pe,B=r.updateDiff||B,me=r.getEditor||me,he=r.getEditorView||he,K=r.getDiffEditorView||K,_e=r.cleanupEditor||_e,ve=r.safeClean||r.cleanupEditor||ve,ye=r.refreshDiffPresentation||ye,Ce=r.setTheme||Ce,te.value=!0,!ne&&v.value&&(yield Ln(v.value))}}catch{if(ne)return;Ve.value=!0}});let nt=M(typeof n.monacoOptions?.fontSize==`number`?n.monacoOptions.fontSize:NaN),rt=M(nt.value),it=M(null),at=M(null),ot=I(()=>{let e=nt.value,t=rt.value;return typeof e==`number`&&Number.isFinite(e)&&e>0&&typeof t==`number`&&Number.isFinite(t)&&t>0}),st=I(()=>{let e=it.value;if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e;let t=n.monacoOptions?.fontSize;if(typeof t==`number`&&Number.isFinite(t)&&t>0)return t;let r=rt.value;return typeof r==`number`&&Number.isFinite(r)&&r>0?r:12}),ct=I(()=>{let e=at.value;if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e;let t=n.monacoOptions?.lineHeight;return typeof t==`number`&&Number.isFinite(t)&&t>0?t:st.value===12?18:Math.max(12,Math.round(1.5*st.value))}),lt=I(()=>ct.value);function ut(e){let t=String(e??``);return t?Math.max(1,t.split(/\r\n|\n|\r/).length):1}function dt(e){return e.startsWith(`-`)&&!e.startsWith(`---`)}function ft(e){return e.startsWith(`+`)&&!e.startsWith(`+++`)}function pt(e){let t=e.some(e=>dt(e)),r=e.some(e=>ft(e));return t&&r||De(n.node.language)&&(t||r)||De(Tn(String(n.node.raw??``)))&&(t||r)}let Z=I(()=>Je.value?function(){let e=String(n.node.code??``).split(/\r\n|\n|\r/);if(pt(e))return Math.max(1,e.length);let t=String(n.node.originalCode??``).split(/\r\n|\n|\r/),r=String(n.node.updatedCode??``).split(/\r\n|\n|\r/),i=0,a=t.length-1,o=r.length-1;for(;i<=a&&i<=o&&t[i]===r[i];)i++;let s=0;for(;a>=i&&o>=i&&t[a]===r[o];)s++,a--,o--;let c=Math.max(0,a-i+1),l=Math.max(0,o-i+1);return Math.max(1,i+c+l+s)}():function(){let e=String(n.node.code??``).split(/\r\n|\n|\r/);if(!pt(e)&&(n.node.originalCode!=null||n.node.updatedCode!=null))return Math.max(ut(n.node.originalCode),ut(n.node.updatedCode));let t=0,r=0;for(let n of e)dt(n)?t++:(ft(n)||t++,r++);return Math.max(1,t,r)}()),Q=I(()=>{let e=n.monacoOptions?.tabSize;return typeof e==`number`&&Number.isFinite(e)&&e>0?e:4}),mt=I(()=>{let e=n.monacoOptions?.padding;return{top:typeof e?.top==`number`&&Number.isFinite(e.top)&&e.top>0?e.top:0,bottom:typeof e?.bottom==`number`&&Number.isFinite(e.bottom)&&e.bottom>0?e.bottom:0}}),ht=I(()=>{let e=n.estimatedContentHeightPx;return typeof e==`number`&&Number.isFinite(e)&&e>0?e:null});function gt(e){if(e==null)return null;let t=Math.ceil(e);return!Number.isFinite(t)||t<=0?null:Math.min(t,Math.ceil(yn()))}let _t=I(()=>J.value?Math.ceil(Z.value*lt.value):ht.value==null?Math.ceil((e=>{let t=String(e??``);return t?Math.max(1,t.split(/\r\n|\n|\r/).length):1})(tt.value)*(ct.value+eF)+1):null),vt=I(()=>{if(J.value){let e=_t.value,t=wt();return gt(t!=null&&e!=null?Math.max(e,t):t??e)}let e=ht.value;return gt(e??_t.value)}),yt=I(()=>{let e=n.estimatedHeightPx;return typeof e==`number`&&Number.isFinite(e)&&e>0?e:null}),bt=M(null),xt=M(null);function St(){let e=bt.value;return typeof e==`number`&&Number.isFinite(e)&&e>0?Math.round(e):null}function Ct(){return J.value&&!1!==n.stream&&(!1!==n.loading||Xe.value||We.value||Ge.value)}function wt(){if(!Ct())return null;let e=xt.value;return typeof e==`number`&&Number.isFinite(e)&&e>0?Math.round(e):null}function Tt(e){if(!Ct()||e==null)return;let t=Math.min(Math.ceil(e),Math.ceil(yn()));if(!Number.isFinite(t)||t<=0)return;let n=wt();xt.value=n==null?t:Math.max(n,t)}let Et=I(()=>St()??(Xe.value||!He.value?vt.value:null)),Dt=I(()=>{let e=n.monacoOptions?.fontFamily,t=gt(ht.value),r=gt(_t.value),i=AP(AP({fontSize:`${st.value}px`,lineHeight:`${lt.value}px`,tabSize:Q.value,boxSizing:`border-box`,maxHeight:`${yn()}px`,overflow:`auto`,paddingTop:`${mt.value.top}px`,paddingBottom:`${mt.value.bottom}px`},J.value?function(e){if(e==null)return{};let t=Math.ceil(e),n=Math.ceil(yn()),r=Math.min(t,n);return t>=n?{height:`${r}px`,minHeight:`${r}px`}:{minHeight:`${t}px`}}(vt.value):t==null?r==null?{}:{minHeight:`${r}px`}:{height:`${t}px`,minHeight:`${t}px`}),typeof e==`string`&&e.trim()?{"--markstream-code-font-family":e.trim()}:{});return i[`--markstream-pre-line-number-top`]=`${mt.value.top}px`,i[`--markstream-code-padding-left`]=`62px`,i[`--markstream-pre-line-number-width`]=`36px`,i[`--markstream-pre-line-number-gap`]=`0px`,J.value&&(i[`--markstream-pre-diff-line-height`]=`${lt.value}px`,i[`--markstream-pre-diff-pane-bottom-padding`]=`10px`),i}),Ot=I(()=>Et.value!=null&&(!He.value||St()!=null)),kt=I(()=>{let e=Et.value;if(e==null)return null;if(J.value)return Math.ceil(e);let t=yt.value,n=ht.value;if(t==null||n==null)return Math.ceil(e);let r=Math.max(0,Math.ceil(t)-Math.ceil(n));return Math.ceil(e+r)}),At=I(()=>{if(J.value&&Xe.value)return;let e=Et.value;return Ot.value&&e!=null?{minHeight:`${e}px`}:void 0});function jt(){Ke!=null&&typeof window<`u`&&window.clearTimeout(Ke),Ke=null}function Mt(){if(!J.value||!P.value||!He.value||We.value||Ge.value)return!1;let e=v.value;return!!e&&Jt(e)}function Nt(e,t=!1,n={}){let r=Math.ceil(e),i=St();if(i==null)return r;let a=!0===n.allowBelowEstimatedFloor||Mt();return r>=i||a?((t||a)&&P.value&&(bt.value=null),r):i}function Pt(){return new Promise(e=>{AD(()=>e())})}function Ft(){try{let e=v.value;if(!e)return null;let t=e.querySelector(`.view-lines .view-line`);if(t){let e=Math.ceil(t.getBoundingClientRect().height);if(e>0)return e}}catch{}return null}function It(){var e;try{let t=J.value?((e=K())?.getModifiedEditor)?.call(e)??K():he(),n=me()?.EditorOption?.fontInfo;if(t&&n!=null){let e=t.getOption?.call(t,n)?.fontSize;if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e}}catch{}try{let e=v.value;if(e){let t=e.querySelector(`.view-lines .view-line`);if(t)try{if(typeof window<`u`&&typeof window.getComputedStyle==`function`){let e=window.getComputedStyle(t).fontSize,n=e&&e.match(/^(\d+(?:\.\d+)?)/);if(n)return Number.parseFloat(n[1])}}catch{}}}catch{}return null}function Lt(e){try{let t=me()?.EditorOption?.lineHeight;if(t!=null){let n=(e?.getOption)?.call(e,t);if(typeof n==`number`&&n>0)return n}}catch{}let t=Ft();if(t&&t>0)return t;let n=Number.isFinite(rt.value)&&rt.value>0?rt.value:14;return Math.max(12,Math.round(1.35*n))}function Rt(e){try{let t=me()?.EditorOption?.padding;if(t!=null){let n=(e?.getOption)?.call(e,t),r=typeof n?.top==`number`?n.top:0,i=typeof n?.bottom==`number`?n.bottom:0;if(r>0||i>0)return r+i}}catch{}let t=Re.value?.padding,n=typeof t?.top==`number`?t.top:0,r=typeof t?.bottom==`number`?t.bottom:0;return n>0||r>0?n+r:J.value?24:0}function zt(e,t){return typeof e!=`number`||typeof t!=`number`||e<1||t<e?0:t-e+1}function Bt(e){if(!e)return[];let t=e.split(/\r?\n/);return t.length===1&&t[0]===``?[]:t}function Vt(){J.value?Oe.value=function(e,t){let n=Bt(e),r=Bt(t),i=0,a=n.length-1,o=r.length-1;for(;i<=a&&i<=o&&n[i]===r[i];)i++;for(;a>=i&&o>=i&&n[a]===r[o];)a--,o--;return{removed:Math.max(0,a-i+1),added:Math.max(0,o-i+1)}}(String(n.node.originalCode??``),String(n.node.updatedCode??``)):Oe.value={removed:0,added:0}}function Ht(){if(J.value)try{let e=K(),t=(e?.getLineChanges)?.call(e);if(!Array.isArray(t))return void Vt();let n=0,r=0;for(let e of t)n+=zt(e.originalStartLineNumber,e.originalEndLineNumber),r+=zt(e.modifiedStartLineNumber,e.modifiedEndLineNumber);Oe.value={removed:n,added:r}}catch{Vt()}else Oe.value={removed:0,added:0}}function Ut(){if(Number.isFinite(rt.value)&&rt.value>0&&Number.isFinite(nt.value))return rt.value;let e=It();return typeof n.monacoOptions?.fontSize==`number`?(nt.value=n.monacoOptions.fontSize,rt.value=n.monacoOptions.fontSize,rt.value):e&&e>0?(nt.value=e,rt.value=e,e):(nt.value=12,rt.value=12,12)}function Wt(){let e=Ut();rt.value=Math.min(36,e+1)}function Gt(){let e=Ut();rt.value=Math.max(10,e-1)}function Kt(){Ut(),Number.isFinite(nt.value)&&(rt.value=nt.value)}function qt(){var e,t,n,r,i;try{let a=J.value?K():null,o=J.value?a:he();if(!o)return null;if(a?.getOriginalEditor&&a?.getModifiedEditor){let i=a.getOriginalEditor?.call(a),o=a.getModifiedEditor?.call(a);(e=i?.layout)==null||e.call(i),(t=o?.layout)==null||t.call(o);let s=(i?.getContentHeight)?.call(i)||0,c=(o?.getContentHeight)?.call(o)||0,l=Math.max(s,c);if(l>0)return Math.ceil(l+1);let u=((n=(i?.getModel)?.call(i))?.getLineCount)?.call(n)||1,d=((r=(o?.getModel)?.call(o))?.getLineCount)?.call(r)||1,f=Math.max(u,d),p=Math.max(Lt(i),Lt(o));return Math.ceil(f*(p+eF)+0+1)}if(o?.getContentHeight){(i=o?.layout)==null||i.call(o);let e=o.getContentHeight();if(e>0)return Math.ceil(e+1)}let s=(o?.getModel)?.call(o),c=1;s&&typeof s.getLineCount==`function`&&(c=s.getLineCount());let l=Lt(o);return Math.ceil(c*(l+eF)+0+1)}catch{return null}}function Jt(e){if(typeof window>`u`)return!1;let t=e.getBoundingClientRect();if(t.width<=0||t.height<=0)return!1;let n=e.querySelectorAll(`.editor.modified .diff-hidden-lines .center, .stream-monaco-diff-unchanged-bridge`);for(let e of Array.from(n)){if(!(e instanceof HTMLElement))continue;let n=window.getComputedStyle(e);if(n.display===`none`||n.visibility===`hidden`||Number.parseFloat(n.opacity||`1`)<=.01)continue;let r=e.getBoundingClientRect();if(!(r.width<=0||r.height<=0||r.bottom<=t.top||r.top>=t.bottom))return!0}return!1}function Yt(e){let t=String(e??``).trim(),n=t.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i)?.[1];if(n){let e=n.length===3?n.split(``).map(e=>`${e}${e}`).join(``):n;return .2126*Number.parseInt(e.slice(0,2),16)+.7152*Number.parseInt(e.slice(2,4),16)+.0722*Number.parseInt(e.slice(4,6),16)}let r=t.match(/\d+(?:\.\d+)?/g);if(!r||r.length<3)return null;let[i,a,o]=r.slice(0,3).map(Number);return .2126*i+.7152*a+.0722*o}function Xt(){let e=v.value?.parentElement;return e instanceof HTMLElement?e:null}function Zt(e,t){var n;t==null||!Number.isFinite(t)||t<=0||(n=Xt())==null||n.style.setProperty(e,`${t}px`)}function Qt(){var e;if($t())return;let t=It();t&&t>0&&(it.value=t,rt.value=t,nt.value=t);try{let t=Lt(J.value?((e=K())?.getModifiedEditor)?.call(e)??K():he());t&&t>0&&(at.value=t)}catch{}try{let e=Ft();e&&e>0&&(at.value=e)}catch{}}function $t(){return J.value&&Ze.value}function en(){if(!J.value||!Xe.value&&!We.value&&!Ge.value)return null;let e=v.value,t=b.value?.querySelector(`pre.code-pre-fallback`);if(!e||!t)return null;let n=Math.ceil(t.getBoundingClientRect().height);return!Number.isFinite(n)||n<=0?null:(e.style.height=`${n}px`,e.style.minHeight=`${n}px`,e.style.maxHeight=`${Math.ceil(yn())}px`,e.style.overflow=`hidden`,n)}function tn(){let e=v.value,t=b.value;if(!e||!t)return;let n=e,r=e.querySelector(`.monaco-editor`)||e,i=r.querySelector(`.monaco-editor-background`)||r,a=r.querySelector(`.view-lines`)||r,o=null,s=null,c=null;try{typeof window<`u`&&typeof window.getComputedStyle==`function`&&(o=window.getComputedStyle(r),s=i===r?o:window.getComputedStyle(i),c=a===r?o:window.getComputedStyle(a))}catch{o=null,s=null,c=null}let l=String(o?.getPropertyValue(`--vscode-editor-foreground`)??``).trim(),u=String(o?.getPropertyValue(`--vscode-editor-background`)??``).trim(),d=String(o?.getPropertyValue(`--vscode-editor-selectionBackground`)??o?.getPropertyValue(`--vscode-editor-hoverHighlightBackground`)??``).trim(),f=l||String(c?.color??o?.color??``).trim(),p=u||String(s?.backgroundColor??o?.backgroundColor??``).trim();J.value?(f?(t.style.setProperty(`--markstream-diff-editor-fg`,f),n.style.setProperty(`--vscode-editor-foreground`,f),n.style.setProperty(`--stream-monaco-editor-fg`,f)):(t.style.removeProperty(`--markstream-diff-editor-fg`),n.style.removeProperty(`--vscode-editor-foreground`),n.style.removeProperty(`--stream-monaco-editor-fg`)),p?(t.style.setProperty(`--markstream-diff-editor-bg`,p),t.style.setProperty(`--markstream-diff-panel-bg`,p),t.style.setProperty(`--markstream-diff-panel-bg-soft`,p),t.style.setProperty(`--markstream-diff-panel-bg-strong`,p),n.style.setProperty(`--vscode-editor-background`,p),n.style.setProperty(`--stream-monaco-editor-bg`,p),n.style.setProperty(`--stream-monaco-fixed-editor-bg`,p),n.style.setProperty(`--stream-monaco-panel-bg`,p),n.style.setProperty(`--stream-monaco-panel-bg-soft`,p),n.style.setProperty(`--stream-monaco-panel-bg-strong`,p),n.style.backgroundColor=p):(t.style.removeProperty(`--markstream-diff-editor-bg`),t.style.removeProperty(`--markstream-diff-panel-bg`),t.style.removeProperty(`--markstream-diff-panel-bg-soft`),t.style.removeProperty(`--markstream-diff-panel-bg-strong`),n.style.removeProperty(`--vscode-editor-background`),n.style.removeProperty(`--stream-monaco-editor-bg`),n.style.removeProperty(`--stream-monaco-fixed-editor-bg`),n.style.removeProperty(`--stream-monaco-panel-bg`),n.style.removeProperty(`--stream-monaco-panel-bg-soft`),n.style.removeProperty(`--stream-monaco-panel-bg-strong`),n.style.backgroundColor=``),d?n.style.setProperty(`--vscode-editor-selectionBackground`,d):n.style.removeProperty(`--vscode-editor-selectionBackground`)):function(e,t,n){if(!w.value)return!1;let r=Yt(e),i=Yt(t);return n?r!=null&&r>170||i!=null&&i<110:r!=null&&r<85||i!=null&&i>190}(p,f,t.classList.contains(`is-dark`))?(n.style.removeProperty(`--vscode-editor-foreground`),n.style.removeProperty(`--vscode-editor-background`),n.style.removeProperty(`--vscode-editor-selectionBackground`)):(f&&n.style.setProperty(`--vscode-editor-foreground`,f),p&&n.style.setProperty(`--vscode-editor-background`,p),d&&n.style.setProperty(`--vscode-editor-selectionBackground`,d))}let nn=0,rn=0,an=/auto|scroll|overlay/i;function on(e,t,n){if(typeof window>`u`||J.value||function(e){return Y.value||Ye(e)}(e))return;let r=Math.ceil(n)-Math.ceil(t);if(Math.abs(r)<=1)return;let i=function(e){if(typeof window>`u`)return null;let t=e?.ownerDocument??document,n=t.scrollingElement||t.documentElement||t.body,r=e?.parentElement??null;for(;r&&r!==t.body&&r!==n;){let e=window.getComputedStyle(r),t=(e.overflowY||``).toLowerCase(),n=(e.overflow||``).toLowerCase();if(an.test(t)||an.test(n))return r;r=r.parentElement}return n}(e);if(!i)return;let a=e.ownerDocument??document,o=i===a.body||i===a.documentElement||i===a.scrollingElement,s=o?0:i.getBoundingClientRect().top;e.getBoundingClientRect().top-s>=0||(o&&typeof window.scrollBy==`function`?window.scrollBy(0,r):i.scrollTop+=r)}function sn(){try{let e=v.value;if(!e)return;let t=e.getBoundingClientRect().height,n=qt();if(n!=null&&n>0){let r=Nt(n,!0),i=St();e.style.minHeight=i==null?`0px`:`${i}px`,e.style.height=`${r}px`,e.style.maxHeight=`none`,e.style.overflow=`visible`,on(e,t,r);return}let r=St();r!=null&&(e.style.minHeight=`${r}px`,e.style.height=`${r}px`,e.style.maxHeight=`none`,e.style.overflow=`visible`,on(e,t,r))}catch{}}function cn(){for(var e,t;we.length>0;)try{(t=(e=we.pop())?.dispose)==null||t.call(e)}catch{}re!=null&&(jD(re),re=null)}function ln(){for(var e;Te.length>0;)try{(e=Te.pop())==null||e()}catch{}}function un(e=!1){A.value||(T.value?sn():function(){try{let e=v.value;if(!e)return;let t=e.getBoundingClientRect().height,n=yn(),r=Math.ceil(e.getBoundingClientRect?.call(e).height||0),i=J.value?function(){var e,t;try{let n=K(),r=(n?.getOriginalEditor)?.call(n),i=(n?.getModifiedEditor)?.call(n);if(!r||!i)return null;let a=((e=r.getModel?.call(r))?.getLineCount)?.call(e)||1,o=((t=i.getModel?.call(i))?.getLineCount)?.call(t)||1,s=Math.max(a,o),c=Math.max(Lt(r),Lt(i)),l=Math.max(Rt(r),Rt(i));return Math.ceil(s*(c+eF)+l+0+1)}catch{return null}}():null,a=J.value&&Jt(e),o=a&&P.value&&He.value&&!We.value&&!Ge.value;if(a||(oe.value=null),ce>0&&(ce--,ae.value!=null))return void on(e,t,hn(e,ae.value,n,{allowBelowEstimatedFloor:o}));if(J.value&&(Xe.value||We.value||Ge.value)){let r=en();if(r!=null){let i=hn(e,r,n,{allowBelowEstimatedFloor:!0});fn(!0),on(e,t,i);return}}let s=J.value?function(e){if(typeof window>`u`)return null;try{let t=e.getBoundingClientRect(),n=window.getComputedStyle(e);if(n.display===`none`||n.visibility===`hidden`)return null;let r=[`.editor.original .view-lines .view-line`,`.editor.modified .view-lines .view-line`,`.editor.original .view-zones > div`,`.editor.modified .view-zones > div`,`.editor.original .margin-view-zones > div`,`.editor.modified .margin-view-zones > div`,`.editor.original .diff-hidden-lines`,`.editor.modified .diff-hidden-lines`,`.stream-monaco-diff-unchanged-bridge`],i=0;for(let n of Array.from(e.querySelectorAll(r.join(`,`)))){if(!(n instanceof HTMLElement))continue;let e=window.getComputedStyle(n);if(e.display===`none`||e.visibility===`hidden`||Number.parseFloat(e.opacity||`1`)<=.01)continue;let r=n.getBoundingClientRect();r.height<=0||r.bottom<=t.top||(i=Math.max(i,r.bottom-t.top))}if(i>0)return Math.ceil(i);let a=e.querySelector(`.monaco-diff-editor`),o=(a?.getBoundingClientRect)?.call(a).height??0;return o>0?Math.ceil(o+1):null}catch{return null}}(e):null,c=J.value&&Je.value&&!a&&s!=null?Math.ceil(s+10):s,l;if(l=J.value?a?s:Je.value&&c!=null||i==null?c:Math.max(c??0,i):qt(),l!=null&&l>0){let i=oe.value!=null&&Date.now()<se&&l>=n-1,s=a&&r>0&&r<n-1&&l>=n-1,c=hn(e,i?oe.value:s?r:l,n,{clearEstimatedFloor:!0,allowBelowEstimatedFloor:o});a&&c<n-1&&(oe.value=c,se=Date.now()+160),on(e,t,c);return}if(ae.value!=null)return void on(e,t,hn(e,ae.value,n,{allowBelowEstimatedFloor:o}));let u=a?r:Math.max(r,i!=null&&i>0?i:0);if(u>0){let i=oe.value!=null&&Date.now()<se&&u>=n-1,s=a&&r>0&&r<n-1&&u>=n-1,c=hn(e,i?oe.value:s?r:u,n,{allowBelowEstimatedFloor:o});a&&c<n-1&&(oe.value=c,se=Date.now()+160),on(e,t,c);return}let d=St();if(d!=null)return void on(e,t,hn(e,d,n,{allowBelowEstimatedFloor:o}));let f=Number.parseFloat(e.style.height);!Number.isNaN(f)&&f>0?on(e,t,hn(e,f,n,{allowBelowEstimatedFloor:o})):J.value||on(e,t,hn(e,n,n))}catch{}}())}function dn(){nn=0,rn=0}function fn(e=!1){let t=v.value;if(!t)return;let n=J.value?K():he();if(n&&typeof n.layout==`function`)try{let r=t.getBoundingClientRect?.call(t),i=Math.ceil((r?.width??0)||t.clientWidth||0),a=Math.ceil((r?.height??0)||t.clientHeight||Number.parseFloat(t.style.height||``)||0);if(i>0&&a>0){if(!e&&i===nn&&a===rn)return;nn=i,rn=a,n.layout({width:i,height:a})}else dn(),n.layout()}catch{}}function pn(){if(!J.value)return void ln();let e=v.value;if(!e)return void ln();let t=e.querySelector(`.monaco-diff-editor`);if(!t||t.classList.contains(`side-by-side`))return void ln();let n=Array.from(t.querySelectorAll(`.editor.original .diff-hidden-lines`)),r=Array.from(t.querySelectorAll(`.editor.modified .diff-hidden-lines`)),i=Math.min(n.length,r.length);for(let e=0;e<i;e++){let t=r[e],n=t.querySelector(`a`),i=t.querySelector(`.center > div:first-child`),a=t.querySelector(`.center`);if(!n||!i||!a||a.querySelector(`.markstream-inline-fold-proxy`))continue;let o=document.createElement(`button`);o.type=`button`,o.className=`markstream-inline-fold-proxy`,o.dataset.markstreamInlineFoldProxy=`true`;let s=n.getAttribute(`title`)||`Show Unchanged Region`;o.title=s,o.setAttribute(`aria-label`,s);let c=e=>{e.preventDefault(),e.stopPropagation()},l=e=>{e.preventDefault(),e.stopPropagation(),n.click(),AD(()=>mn())},u=e=>{e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),e.stopPropagation(),n.click(),AD(()=>mn()))};o.addEventListener(`mousedown`,c),o.addEventListener(`click`,l),o.addEventListener(`keydown`,u),a.appendChild(o),Te.push(()=>{o.removeEventListener(`mousedown`,c),o.removeEventListener(`click`,l),o.removeEventListener(`keydown`,u),o.parentElement===a&&a.removeChild(o)})}}function mn(e=!1){re??=AD(()=>{re=null,AD(()=>{pn(),un(e),fn()})})}function hn(e,t,n,r={}){Tt(t);let i=wt(),a=i==null?t:Math.max(t,i),o=Math.min(a,n),s=!0===r.allowBelowEstimatedFloor||Mt(),c=Nt(o,!0===r.clearEstimatedFloor,{allowBelowEstimatedFloor:s}),l=St();if(e.style.minHeight=l==null||s?`0px`:`${Math.min(l,Math.ceil(n))}px`,e.style.height=`${c}px`,e.style.maxHeight=`${Math.ceil(n)}px`,J.value)e.style.overflow=`hidden`;else{let t=a>n+1;e.style.overflow=t?`auto`:`hidden`}return c}function gn(e=v.value){return!!e?.querySelector(`.monaco-diff-editor .view-lines .view-line`)}function _n(){let e=K();return typeof e?.getOriginalEditor==`function`||typeof e?.getModifiedEditor==`function`||typeof e?.getLineChanges==`function`}function vn(e,t,n){return MP(this,null,function*(){try{yield B(e,t,n);return}catch(e){if(!Ie(e))throw e}if(yield g(),yield Pt(),!ne&&J.value)try{yield B(e,t,n)}catch(e){if(!Ie(e))throw e}})}function yn(){let e=n.monacoOptions?.MAX_HEIGHT??500;if(typeof e==`number`)return e;let t=String(e).match(/^(\d+(?:\.\d+)?)/);return t?Number.parseFloat(t[1]):500}let bn=I(()=>n.isShowPreview&&(S.value===`html`||S.value===`svg`));function xn(){return typeof n.node.loading==`boolean`?n.node.loading:!0===n.loading}function Sn(e,t,n){return n&&!String(t??``)?`plain`:OE(String(e??``))}function Cn(){return!(!xn()||J.value&&(String(n.node.originalCode??``)||String(n.node.updatedCode??``))||String(n.node.code??``))}E(()=>[n.node.language,n.node.code,n.node.loading,n.loading],([e,t,n,r])=>{S.value=Sn(e,t,typeof n==`boolean`?n:!0===r)}),E(()=>[n.node.originalCode,n.node.updatedCode,J.value],()=>{Vt(),AD(()=>Ht())},{immediate:!0}),E(()=>[J.value,n.stream,n.loading,Xe.value,We.value,Ge.value,_t.value],()=>{Ct()?Tt(_t.value):xt.value=null},{immediate:!0}),E(()=>[n.node.originalCode,n.node.updatedCode,C.value,J.value],e=>MP(null,[e],function*([,,,e]){if(!1===n.stream||!e)return;if(de&&!j.value&&v.value)try{yield Ln(v.value)}catch{}let t=xe;if(t&&!N.value){try{yield t}catch{}if(ne||!J.value)return}let r=Pe(String(n.node.originalCode??``),String(n.node.updatedCode??``)),i=!1===n.loading;i&&qn();try{yield vn(r.original,r.updated,C.value),fn(!0)}catch{return}if(i){if(ne||!J.value)return;Le(),pn(),Ht(),mn()}T.value&&AD(()=>sn())})),E(()=>n.node.code,e=>MP(null,null,function*(){if(!1===n.stream||(S.value||=OE(Se(e)),J.value))return;let t=xe;if(t&&!N.value){try{yield t}catch{}if(ne||J.value)return}if(de&&!j.value&&v.value)try{yield Ln(v.value)}catch{}pe(Fe(n.node.code,!0===n.node.loading),C.value),T.value&&AD(()=>sn())}));let wn=I(()=>{let e=S.value;return e?jE[e]||e.charAt(0).toUpperCase()+e.slice(1):jE[``]||`Plain Text`});function Tn(e){let t=String(e??``).split(/\r?\n/,1)[0]?.trim()??``;if(t.length<3)return``;let n=t[0];if(n!=="`"&&n!==`~`||t[1]!==n||t[2]!==n)return``;let r=3;for(;t[r]===n;)r+=1;return t.slice(r).trim()}let En=I(()=>function(e){let t=Tn(e);if(!t)return``;let n=t.split(/\s+/).filter(Boolean);if(!n.length)return``;let r=n[0]===`diff`?n.slice(1):n;for(let e of r){let t=e.includes(`:`)?e.slice(e.indexOf(`:`)+1):e;if(t&&/[./\\-]/.test(t))return t}return``}(String(n.node.raw??``))),Dn=I(()=>En.value||wn.value),On=I(()=>En.value?J.value?`Diff / ${wn.value}`:wn.value:``),kn=I(()=>(EE.value,AE(S.value||``))),An=I(()=>{let e={},t=e=>{if(e!=null)return typeof e==`number`?`${e}px`:String(e)},r=t(n.minWidth),i=t(n.maxWidth);if(r&&(e.minWidth=r),i&&(e.maxWidth=i),Ot.value&&!J.value){let t=kt.value;t!=null&&(e.minHeight=`${t}px`)}return J.value||(e.color=`var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))`,e.backgroundColor=`var(--vscode-editor-background, var(--markstream-code-fallback-bg))`,e.borderColor=`var(--markstream-code-border-color)`),e}),jn=I(()=>!1!==n.showTooltips);function Mn(){return MP(this,null,function*(){try{typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`&&(yield navigator.clipboard.writeText(n.node.code)),x.value=!0,r(`copy`,n.node.code),setTimeout(()=>{x.value=!1},1e3)}catch(e){console.error(`复制失败:`,e)}})}function Nn(e){if(T.value=!T.value,e&&jn.value){let t=function(e){let t=e.currentTarget||e.target;return!t||t.disabled?null:t}(e);t&&RO(t,T.value?_(`common.collapse`)||`Collapse`:_(`common.expand`)||`Expand`,`top`,!1,void 0,n.isDark)}let t=J.value?K():he(),r=v.value;t&&r&&(T.value?(In(!0),r.style.maxHeight=`none`,r.style.overflow=`visible`,un(!0)):(In(!1),r.style.overflow=J.value?`hidden`:`auto`,un(!0)))}function Pn(){var e,t;if(A.value=!A.value,A.value){if(v.value){let t=Math.ceil((e=v.value).getBoundingClientRect?.call(e).height||0);t>0&&(ae.value=t)}In(!1)}else{T.value&&In(!0),v.value&&ae.value!=null&&(v.value.style.height=`${ae.value}px`);let e=J.value?K():he();try{(t=e?.layout)==null||t.call(e)}catch{}ce=2,AD(()=>{un(!0)})}}function Fn(){if(!bn.value)return;let e=S.value;if(h.value){let t=e===`html`?`text/html`:`image/svg+xml`,i=e===`html`?_(`artifacts.htmlPreviewTitle`)||`HTML Preview`:_(`artifacts.svgPreviewTitle`)||`SVG Preview`;r(`previewCode`,{node:n.node,artifactType:t,artifactTitle:i,id:`temp-${e}-${Date.now()}`});return}e===`html`&&(et.value=!et.value)}function In(e){var t,n;try{if(J.value){let n=K();(t=n?.updateOptions)==null||t.call(n,{automaticLayout:e})}else{let t=he();(n=t?.updateOptions)==null||n.call(t,{automaticLayout:e})}}catch{}}function Ln(e){if(!de||ne||Cn())return null;if(be)return be;if(j.value&&P.value)return Promise.resolve();j.value=!0,function(){let e=u.value;o&&e&&ie!==e&&(ie&&o.markSettled(ie),ie=e,o.markPending(e))}();let t=MP(null,null,function*(){yield function(e){return MP(this,null,function*(){if(typeof window>`u`)return yield e();try{let t=window.Element?.prototype,n=t?.addEventListener;if(!t||!n)return yield e();let r=function(){let e=window,t=e[$P];if(t)return t;let n={depth:0,original:null};return e[$P]=n,n}();r.depth===0&&(r.original=n,t.addEventListener=function(e,t,i){let a=r.original??n;return e===`touchstart`&&function(e,t){if(!e)return!1;let n=e;return!(typeof n.closest!=`function`||!n.closest(`.monaco-editor, .monaco-diff-editor`)||t&&typeof t==`object`&&`passive`in t)}(this,i)?a.call(this,e,t,function(e){return e==null?{passive:!0}:typeof e==`boolean`?{capture:e,passive:!0}:typeof e==`object`?`passive`in e?e:jP(AP({},e),{passive:!0}):{passive:!0}}(i)):a.call(this,e,t,i)}),r.depth++;try{return yield e()}finally{r.depth=Math.max(0,r.depth-1),r.depth===0&&r.original&&t.addEventListener!==r.original&&(t.addEventListener=r.original,r.original=null)}}catch{return yield e()}})}(()=>function(e){return MP(this,null,function*(){if(!de||ne||(Ue.value=!1,N.value=!1,He.value=!1,We.value=!1,Ge.value=!1,jt(),it.value=null,at.value=null,function(){let e=Xt();e&&(e.style.removeProperty(`--stream-monaco-line-number-left`),e.style.removeProperty(`--stream-monaco-line-number-width`),e.style.removeProperty(`--stream-monaco-line-number-gap-to-code`),e.style.removeProperty(`--stream-monaco-original-line-number-gap-to-code`),e.style.removeProperty(`--stream-monaco-modified-line-number-gap-to-code`),e.style.removeProperty(`--stream-monaco-original-scrollable-left`),e.style.removeProperty(`--stream-monaco-modified-scrollable-left`))}(),dn(),function(){let e=vt.value;bt.value=P.value||e==null?null:e}(),cn(),ln(),function(e){e.replaceChildren()}(e),qn(),ne))return;let t=MP(null,null,function*(){if(J.value){(function(){if(q||typeof window>`u`)return;q=!0;let e=e=>{Ie(`reason`in e?e.reason:e.error??e.message)&&(e.preventDefault(),e.stopImmediatePropagation())};window.addEventListener(`error`,e,!0),window.addEventListener(`unhandledrejection`,e,!0)})(),ve();let t=Pe(String(n.node.originalCode??``),String(n.node.updatedCode??``));fe?yield fe(e,t.original,t.updated,C.value):yield de(e,n.node.code,C.value)}else yield de(e,tt.value,C.value);N.value=!0}).finally(()=>{xe===t&&(xe=null)});if(xe=t,yield function(e){return MP(this,null,function*(){if(!J.value)return void(yield e);let t,n=!1;for(e.then(()=>{n=!0},e=>{n=!0,t=e});;){if(ne)return;if(n){if(t)throw t;return}if(gn()&&_n())return;yield g(),yield Pt()}})}(t),ne)return;N.value=!0;let r=J.value?K():he();if(typeof n.monacoOptions?.fontSize==`number`)r?.updateOptions({fontSize:n.monacoOptions.fontSize,automaticLayout:!1}),nt.value=n.monacoOptions.fontSize,rt.value=n.monacoOptions.fontSize;else if(!$t()){let e=It();e&&e>0?(nt.value=e,rt.value=e):(nt.value=12,rt.value=12)}Qt(),T.value||A.value||un(!1),yield function(){return MP(this,null,function*(){St()!=null&&(pn(),un(!1),yield g(),yield Pt(),pn(),un(!1),yield Pt(),pn(),un(!1))})}(),ne||(P.value=!0,function(){if(cn(),J.value){let e=K(),t=(e?.getOriginalEditor)?.call(e),n=(e?.getModifiedEditor)?.call(e),r=(e,t)=>{try{let n=e?.[t];if(typeof n!=`function`)return;let r=n.call(e,()=>mn());r&&we.push(r)}catch{}};try{let t=(e?.onDidUpdateDiff)?.call(e,()=>{mn(),AD(()=>Ht())});t&&we.push(t)}catch{}r(t,`onDidContentSizeChange`),r(n,`onDidContentSizeChange`),r(t,`onDidLayoutChange`),r(n,`onDidLayoutChange`);return}let e=he();try{let t=(e?.onDidContentSizeChange)?.call(e,()=>mn());t&&we.push(t)}catch{}try{let t=(e?.onDidLayoutChange)?.call(e,()=>mn());t&&we.push(t)}catch{}}(),tn(),Qt(),pn(),Ht(),mn(),yield function(){return MP(this,null,function*(){pn(),un(!1),yield g(),yield Pt(),pn(),un(!1),yield Pt(),pn(),un(!1)})}(),yield function(){return MP(this,null,function*(){if(J.value){for(let e=0;e<8;e++){if(ne)return;let t=v.value,n=K(),r=!1;try{let e=(n?.getLineChanges)?.call(n);r=Array.isArray(e)}catch{r=!1}let i=!!t?.querySelector(`.monaco-diff-editor`),a=gn(t);if(i&&a&&r){if(yield g(),yield Pt(),ne)return;try{Le(),pn(),Ht(),mn()}catch{}return}if(e>=1&&!i)return;yield g(),yield Pt()}if(!ne)try{Le(),pn(),Ht(),mn()}catch{}}})}(),ne||(Qt(),function(){if(!J.value)return;let e=v.value;if(!e)return;let t=e.querySelector(`.monaco-diff-editor`);function n(e,t,n,r){let i=e.querySelector(t);if(!i)return;let a=i.getBoundingClientRect();if(a.width<=0)return;let o=i.querySelector(`.line-numbers`),s=i.querySelector(`.view-lines .view-line`),c=i.querySelector(`.margin`),l=null;if(s?(l=s.getBoundingClientRect().left-a.left,Zt(n,l)):c&&(l=c.getBoundingClientRect().width,Zt(n,l)),o){let e=o.getBoundingClientRect();if(e.width>=20&&e.width<=64&&Zt(`--stream-monaco-line-number-width`,e.width),l!=null){let t=l-(e.right-a.left);Number.isFinite(t)&&t>=0&&t<=32&&(Zt(r,t),Zt(`--stream-monaco-line-number-gap-to-code`,t))}}}t&&(n(t,`.editor.original`,`--stream-monaco-original-scrollable-left`,`--stream-monaco-original-line-number-gap-to-code`),n(t,`.editor.modified`,`--stream-monaco-modified-scrollable-left`,`--stream-monaco-modified-line-number-gap-to-code`))}(),yield g(),en(),yield Pt(),yield function(){return MP(this,null,function*(){if(J.value){if(en(),We.value=!0,Ge.value=!1,He.value=!0,yield g(),en(),yield Pt(),en(),!ne){if(fn(!0),Ge.value=!0,jt(),typeof window>`u`)return We.value=!1,void(Ge.value=!1);Ke=window.setTimeout(()=>{Ke=null,We.value=!1,Ge.value=!1,AD(()=>{Qt(),pn(),mn()})},120)}}else He.value=!0})}()))})}(e))}).finally(()=>{be===t&&(be=null),function(){let e=ie;o&&e&&(ie=``,g(()=>{if(!ne){let t=b.value?.offsetHeight??0;t>0&&o.reportHeight(e,t)}o.markSettled(e)}))}()});return be=t,t}E(jn,e=>{e||zO()}),E(()=>rt.value,(e,t)=>{let n=J.value?K():he();n&&typeof e==`number`&&Number.isFinite(e)&&e>0&&(n.updateOptions({fontSize:e}),A.value||un(!0))},{flush:`post`,immediate:!1});let Rn=E(()=>[v.value,J.value,n.stream,n.loading,te.value,z.value,n.node.code,n.node.loading],e=>MP(null,[e],function*([e,t,n,r,i,a]){if(!e||!de||!a||!1===n&&!1!==r||Cn())return;let o=Ln(e);if(o){try{yield o}catch{P.value=!1,He.value=!1,Ue.value=!0}Rn()}}));function zn(e){return!!e&&typeof e==`object`&&`light`in e&&`dark`in e}function Bn(e){return typeof e==`string`?e:e&&typeof e==`object`&&`name`in e?String(e.name):null}function Vn(e,t){if(e===t)return!0;let n=Bn(e),r=Bn(t);return!!n&&n===r}function Hn(){let e=function(){if(n.theme!==void 0){let e=n.theme;return zn(e)?n.isDark?e.dark:e.light:e}return n.isDark?n.darkTheme:n.lightTheme}(),t=Re.value?.theme,r=e??t;if(typeof r==`object`&&r)return r;let i=Array.isArray(n.themes)?n.themes:[];if(!i.length||r==null)return r;let a=Bn(r),o=i.map(e=>Bn(e)).filter(e=>!!e);if(!a||o.includes(a))return r;let s=Bn(t);return t!=null&&s&&o.includes(s)?t:i[0]}E(ze,(e,t)=>MP(null,null,function*(){if(e===t||(Be.value=e,!de||!v.value)||!j.value||!1===n.stream&&!1!==n.loading||!z.value)return;let r=be;if(r){try{yield r}catch{}if(ne||!v.value)return}try{P.value=!1,He.value=!1,j.value=!1,N.value=!1,cn(),ln(),ve(),yield g(),yield Ln(v.value)}catch{P.value=!1,He.value=!1,Ue.value=!0}}));let Un=I(()=>(n.theme===void 0?Vn(n.darkTheme,n.lightTheme):!zn(n.theme))?function(e){if(e&&typeof e==`object`&&e.colors?.[`editor.background`]){let t=Yt(e.colors[`editor.background`]);if(t!=null)return t<128}let t=(Bn(e)??``).toLowerCase();return t?[`dark`,`night`,`moon`,`black`,`dracula`,`mocha`,`frappe`,`macchiato`,`palenight`,`ocean`,`poimandres`,`monokai`,`laserwave`,`tokyo`,`slack-dark`,`rose-pine`,`github-dark`,`material-theme`,`one-dark`,`catppuccin-mocha`,`catppuccin-frappe`,`catppuccin-macchiato`].some(e=>t.includes(e))&&![`light`,`latte`,`dawn`,`lotus`].some(e=>t.includes(e)):!!n.isDark}(Hn()):!!n.isDark),Wn=I(()=>{if(!J.value)return Un.value?`dark`:`light`;let e=Re.value?.diffAppearance;return e===`light`||e===`dark`?e:Un.value?`dark`:`light`}),Gn=I(()=>J.value?Wn.value===`dark`:Un.value);function Kn(){let e=jP(AP(jP(AP({wordWrap:`on`,wrappingIndent:`same`,themes:n.themes},Re.value||{}),{theme:Hn()}),J.value?{diffAppearance:Wn.value}:{}),{onThemeChange(){tn()}}),t=function(){let e=Re.value?.fontFamily;return typeof e==`string`&&e.trim()?e.trim():J.value?function(){if(typeof window>`u`)return;let e=b.value?.querySelector(`pre.code-pre-fallback`);if(e)return window.getComputedStyle(e).fontFamily.trim()||void 0}():void 0}();return t&&(e.fontFamily??=t),e}function qn(){let e=Kn();if(!Ee)return Ee=e,Ee;for(let t of Object.keys(Ee))t in e||delete Ee[t];return Object.assign(Ee,e),Ee}let Jn=I(()=>{var e,t,r,i,a;return JSON.stringify({diffLineStyle:Re.value?.diffLineStyle??`background`,diffUnchangedRegionStyle:Re.value?.diffUnchangedRegionStyle??`line-info`,diffHideUnchangedRegions:n.monacoOptions?.diffHideUnchangedRegions===void 0?AP({},Ae):Me(n.monacoOptions.diffHideUnchangedRegions),renderSideBySide:(e=Re.value?.renderSideBySide)==null||e,useInlineViewWhenSpaceIsLimited:(t=Re.value?.useInlineViewWhenSpaceIsLimited)!=null&&t,enableSplitViewResizing:(r=Re.value?.enableSplitViewResizing)==null||r,ignoreTrimWhitespace:(i=Re.value?.ignoreTrimWhitespace)==null||i,originalEditable:(a=Re.value?.originalEditable)!=null&&a})});return E(()=>[n.monacoOptions,z.value],()=>{var e;if(qn(),!de||!z.value)return;let t=J.value?K():he(),r=typeof n.monacoOptions?.fontSize==`number`?n.monacoOptions.fontSize:Number.isFinite(rt.value)?rt.value:void 0;typeof r==`number`&&Number.isFinite(r)&&r>0&&((e=t?.updateOptions)==null||e.call(t,{fontSize:r})),un(!1)},{deep:!0}),E(()=>[Hn(),Wn.value,te.value,j.value,z.value],([e],t)=>{te.value&&j.value&&z.value&&function(e={}){if(e.appearanceOnly)return;qn();let t=Hn(),n=()=>{J.value&&Le(),AD(()=>{tn(),mn()})};t?function(e,t){let n=function(e){if(e==null)return null;if(typeof e==`string`)return e;if(typeof e==`object`&&`name`in e)return String(e.name);if(typeof e==`object`){let t=WP.get(e);if(t)return t;try{let t=JSON.stringify(e);if(t)return WP.set(e,t),t}catch{}let n=`__theme_`+ ++GP;return WP.set(e,n),n}return String(e)}(t);return n?(UP=e,RP||HP!==n?RP?(VP===n||zP===n||(BP=t,VP=n),RP):(BP=t,VP=n,RP=MP(null,null,function*(){for(;VP&&BP!=null;){let t=BP,n=VP;if(BP=null,VP=null,HP!==n)try{zP=n,yield(UP??e)(t),HP=n}catch{}}}).finally(()=>{RP=null,zP=null}),RP):Promise.resolve()):Promise.resolve()}(Ce,t).then(n).catch(e=>{}):n()}({appearanceOnly:t!=null&&Vn(e,t[0])})},{flush:`post`}),E(()=>[Jn.value,te.value,z.value],(e,t)=>MP(null,[e,t],function*([e,t,r],[i]){if(qn(),!t||!r||!de||!v.value||!j.value||e===i||!1===n.stream&&!1!==n.loading)return;let a=be;if(a){try{yield a}catch{}if(ne||!v.value)return}try{P.value=!1,He.value=!1,j.value=!1,N.value=!1,cn(),ln(),ve(),yield g(),yield Ln(v.value)}catch{P.value=!1,He.value=!1,Ue.value=!0}}),{flush:`post`}),E(()=>[n.loading,z.value],(e,t)=>MP(null,[e,t],function*([e,t],r){if(!t)return;let i=r?.[0];if(!1===i&&!1!==e&&J.value&&j.value&&(yield g(),AD(()=>{MP(null,null,function*(){let e=be;if(e)try{yield e}catch{}!ne&&J.value&&!1!==n.loading&&(qn(),Le(),mn())})})),e)return;let a=i!==void 0&&!1!==i;yield g(),AD(()=>{MP(null,null,function*(){try{if(a&&j.value)if(J.value&&v.value){let e=be;if(e)try{yield e}catch{}qn();let t=Pe(String(n.node.originalCode??``),String(n.node.updatedCode??``));if(yield vn(t.original,t.updated,C.value),ne||!J.value)return;Le(),fn(!0),pn(),Ht(),mn()}else pe(tt.value,C.value);un(!1)}catch{}})})}),{immediate:!0,flush:`post`}),m(()=>{jt(),cn(),ln(),_e()}),(t,r)=>Ve.value?(G(),O(R(sk),{key:0,node:X.value,loading:n.loading},null,8,[`node`,`loading`])):(G(),W(`div`,{key:1,ref_key:`container`,ref:b,style:k(An.value),class:L([`code-block-container rounded-lg border`,[{dark:n.isDark,"is-rendering":n.loading,"is-dark":Gn.value,"is-diff":J.value,"is-plain-text":w.value}]]),"data-markstream-code-block":`1`,"data-markstream-enhanced":He.value&&!Ve.value?`true`:`false`,"data-markstream-pending":$e.value?`true`:void 0},[U(mP,{"show-header":n.showHeader,"show-collapse-button":n.showCollapseButton,"show-font-size-buttons":n.showFontSizeButtons,"enable-font-size-control":n.enableFontSizeControl,"show-copy-button":n.showCopyButton,"show-expand-button":n.showExpandButton,"show-preview-button":n.showPreviewButton,"show-tooltips":n.showTooltips,"is-dark":n.isDark,loading:n.loading,stream:e.stream,"is-collapsed":A.value,"is-expanded":T.value,"copy-text":x.value,"is-previewable":bn.value,"code-font-size":rt.value,"code-font-min":10,"code-font-max":36,"default-code-font-size":nt.value,"font-baseline-ready":ot.value,"diff-stats":J.value?Oe.value:null,"diff-stats-aria-label":ke.value,onToggleCollapse:Pn,onDecreaseFont:Gt,onResetFont:Kt,onIncreaseFont:Wt,onCopy:Mn,onToggleExpand:Nn,onPreview:Fn},ge({"header-left":D(()=>[d(t.$slots,`header-left`,{},()=>[F(`div`,qP,[F(`span`,{class:`icon-slot h-4 w-4 flex-shrink-0`,innerHTML:kn.value},null,8,JP),F(`div`,YP,[F(`div`,XP,H(Dn.value),1),On.value?(G(),W(`div`,ZP,H(On.value),1)):V(``,!0)])])],!0)]),loading:D(()=>[d(t.$slots,`loading`,{loading:e.loading,stream:e.stream},()=>[r[0]||=F(`div`,{class:`loading-skeleton`},[F(`div`,{class:`skeleton-line`}),F(`div`,{class:`skeleton-line`}),F(`div`,{class:`skeleton-line short`})],-1)],!0)]),default:D(()=>[y(F(`div`,QP,[F(`div`,{ref_key:`codeEditor`,ref:v,class:L([`code-editor-container`,[e.stream?``:`code-height-placeholder`,{"is-hidden":Qe.value}]]),style:k(At.value)},null,6),Ze.value?(G(),O(R(sk),{key:0,class:L([`code-pre-fallback`,{"is-wrap":qe.value,"is-fading-out":Ge.value}]),style:k(Dt.value),node:X.value,"show-line-numbers":!0,"diff-inline":Je.value},null,8,[`class`,`style`,`node`,`diff-inline`])):V(``,!0)],512),[[ee,!(A.value||!e.stream&&e.loading)]]),et.value&&!h.value&&bn.value&&S.value===`html`?(G(),O(LP,{key:0,code:n.node.code,"html-preview-allow-scripts":n.htmlPreviewAllowScripts,"html-preview-sandbox":n.htmlPreviewSandbox,"is-dark":n.isDark,"on-close":()=>et.value=!1},null,8,[`code`,`html-preview-allow-scripts`,`html-preview-sandbox`,`is-dark`,`on-close`])):V(``,!0)]),_:2},[t.$slots[`header-right`]?{name:`header-right`,fn:D(()=>[d(t.$slots,`header-right`,{},void 0,!0)]),key:`0`}:void 0]),1032,[`show-header`,`show-collapse-button`,`show-font-size-buttons`,`enable-font-size-control`,`show-copy-button`,`show-expand-button`,`show-preview-button`,`show-tooltips`,`is-dark`,`loading`,`stream`,`is-collapsed`,`is-expanded`,`copy-text`,`is-previewable`,`code-font-size`,`default-code-font-size`,`font-baseline-ready`,`diff-stats`,`diff-stats-aria-label`])],14,KP))}}),[[`__scopeId`,`data-v-b5384753`]]),nF=n({default:()=>oF}),rF=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),iF=[`id`],aF=[`data-placement`],oF=eO(c({__name:`Tooltip`,props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(e){let t=e,n=M(null),r=M(null),i=M({transform:`translate3d(0px, 0px, 0px)`,left:`0px`,top:`0px`}),a=M({}),s=M(t.placement??`top`),c=M(!1),u=null,d=null,f=null,p=null,m=null,h=0;function _(){return p?Promise.resolve(p):(m||=K(()=>Promise.resolve().then(()=>Wo).then(e=>(p=e,e)),void 0).catch(e=>{throw m=null,e}),m)}function v(){u&&=(u(),null),d=null,f=null}function b(e){return rF(this,null,function*(){let r=t.anchorEl,i=n.value;if(!t.visible||!r||!i||d===r&&f===i)return;let{autoUpdate:a}=yield _();e()&&t.visible&&t.anchorEl===r&&n.value===i&&(v(),d=r,f=i,u=a(r,i,()=>{x().catch(()=>{S()})}))})}function x(){return rF(this,null,function*(){let e=t.anchorEl,o=n.value;if(!t.visible||!e||!o)return!1;let{arrow:c,computePosition:l,flip:u,offset:d,shift:f}=yield _();if(!t.visible||t.anchorEl!==e||n.value!==o)return!1;let p=[d(t.offset??6),u(),f({padding:6}),...r.value?[c({element:r.value,padding:4})]:[]],{x:m,y:h,placement:g,middlewareData:v}=yield l(e,o,{placement:t.placement??`top`,middleware:p,strategy:`fixed`});if(!t.visible||t.anchorEl!==e||n.value!==o)return!1;if(i.value.transform=`translate3d(${Math.round(m)}px, ${Math.round(h)}px, 0)`,i.value.left=`0px`,i.value.top=`0px`,s.value=g,v.arrow&&r.value){let{x:e,y:t}=v.arrow,n={top:`bottom`,bottom:`top`,left:`right`,right:`left`}[g.split(`-`)[0]];a.value={left:e==null?``:`${e}px`,top:t==null?``:`${t}px`,[n]:`-3px`}}return!0})}function S(){let e=t.anchorEl,r=n.value;if(!e||!r)return!1;let o=e.getBoundingClientRect(),c=r.getBoundingClientRect(),l=t.offset??6,u=t.placement??`top`,d=o.left,f=o.top;return u===`bottom`?f=o.bottom+l:u===`left`?d=o.left-c.width-l:u===`right`?d=o.right+l:f=o.top-c.height-l,i.value.transform=`translate3d(${Math.round(Math.max(0,d))}px, ${Math.round(Math.max(0,f))}px, 0)`,i.value.left=`0px`,i.value.top=`0px`,s.value=u,a.value={},!0}E(()=>t.visible,e=>rF(null,null,function*(){let r=++h;if(e){if(c.value=!1,yield g(),r!==h||!t.visible)return;if(t.anchorEl&&n.value)try{let e=t.anchorEl,a=n.value,o=e.getBoundingClientRect();if(!(yield x())||r!==h||!t.visible||t.anchorEl!==e||n.value!==a)return;let s=i.value.transform;if(t.originX!=null&&t.originY!=null){let e=Math.abs(Number(t.originX)-o.left),n=Math.abs(Number(t.originY)-o.top);if(Math.hypot(e,n)>120){if(i.value.transform=`translate3d(${Math.round(t.originX)}px, ${Math.round(t.originY)}px, 0)`,yield g(),r!==h||!t.visible||(c.value=!0,yield g(),r!==h||!t.visible))return;i.value.transform=s}else c.value=!0}else c.value=!0;yield b(()=>r===h)}catch{if(r!==h||!t.visible)return;if(c.value=S(),t.anchorEl&&n.value)try{yield b(()=>r===h)}catch{}}else c.value=!0}else c.value=!1,v()}));let C=0;return E([()=>t.anchorEl,()=>t.placement,()=>t.content],()=>rF(null,null,function*(){let e=++C;if(t.visible&&t.anchorEl&&n.value){if(yield g(),e!==C||!t.visible||!t.anchorEl||!n.value)return;try{let r=yield x();if(e!==C||!t.visible||!t.anchorEl||!n.value)return;r||S()}catch{S()}yield b(()=>e===C)}})),l(()=>{h+=1,v()}),(l,u)=>(G(),O(z,{to:`body`},[F(`div`,{class:L([`markstream-vue`,{dark:e.isDark}])},[U(ce,{name:`tooltip`,appear:``},{default:D(()=>[y(F(`div`,{id:t.id,ref_key:`tooltip`,ref:n,style:k({position:`fixed`,left:i.value.left,top:i.value.top,transform:i.value.transform,visibility:c.value?`visible`:`hidden`,pointerEvents:c.value?void 0:`none`}),class:`tooltip-element`,role:`tooltip`},[o(H(e.content)+` `,1),F(`div`,{ref_key:`arrowEl`,ref:r,class:`tooltip-arrow`,"data-placement":s.value,style:k(a.value)},null,12,aF)],12,iF),[[ee,e.visible]])]),_:1})],2)]))}}),[[`__scopeId`,`data-v-c606ee4c`]]),sF=n({materialExtendedMap:()=>uF}),cF=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#f44336" d="M21.805 8.063a5 5 0 0 0-3.502.727A10.95 10.95 0 0 0 11 6H2.5a.5.5 0 0 0-.5.5v21a.5.5 0 0 0 .5.5H11a10.995 10.995 0 0 0 10.954-10.096 4.998 4.998 0 0 0-.149-9.841M11 24H6V10h5a7 7 0 0 1 0 14"/><circle cx="28" cy="7" r="1.5" fill="#f44336"/></svg>`,lF=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#0288d1" d="M21.81 10.25c-.06-.04-.56-.43-1.64-.43-.28 0-.56.03-.84.08-.21-1.4-1.38-2.11-1.43-2.14l-.29-.17-.18.27c-.24.36-.43.77-.51 1.19-.2.8-.08 1.56.33 2.21-.49.28-1.29.35-1.46.35H2.62c-.34 0-.62.28-.62.63 0 1.15.18 2.3.58 3.38.45 1.19 1.13 2.07 2 2.61.98.6 2.59.94 4.42.94.79 0 1.61-.07 2.42-.22 1.12-.2 2.2-.59 3.19-1.16A8.3 8.3 0 0 0 16.78 16c1.05-1.17 1.67-2.5 2.12-3.65h.19c1.14 0 1.85-.46 2.24-.85.26-.24.45-.53.59-.87l.08-.24zm-17.96.99h1.76c.08 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16H3.85c-.09 0-.16.07-.16.16v1.58c.01.09.07.16.16.16m2.43 0h1.76c.08 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16H6.28c-.09 0-.16.07-.16.16v1.58c.01.09.07.16.16.16m2.47 0h1.75c.1 0 .17-.07.17-.16V9.5c0-.08-.06-.16-.17-.16H8.75c-.08 0-.15.07-.15.16v1.58c0 .09.06.16.15.16m2.44 0h1.77c.08 0 .15-.07.15-.16V9.5c0-.08-.06-.16-.15-.16h-1.77c-.08 0-.15.07-.15.16v1.58c0 .09.07.16.15.16M6.28 9h1.76c.08 0 .16-.09.16-.18V7.25c0-.09-.07-.16-.16-.16H6.28c-.09 0-.16.06-.16.16v1.57c.01.09.07.18.16.18m2.47 0h1.75c.1 0 .17-.09.17-.18V7.25c0-.09-.06-.16-.17-.16H8.75c-.08 0-.15.06-.15.16v1.57c0 .09.06.18.15.18m2.44 0h1.77c.08 0 .15-.09.15-.18V7.25c0-.09-.07-.16-.15-.16h-1.77c-.08 0-.15.06-.15.16v1.57c0 .09.07.18.15.18m0-2.28h1.77c.08 0 .15-.07.15-.16V5c0-.1-.07-.17-.15-.17h-1.77c-.08 0-.15.06-.15.17v1.56c0 .08.07.16.15.16m2.46 4.52h1.76c.09 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16h-1.76c-.08 0-.15.07-.15.16v1.58c0 .09.07.16.15.16"/></svg>`,uF={ada:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#0277bd" d="m2 12 2.9-1.07c.25-1.1.87-1.73.87-1.73a3.996 3.996 0 0 1 5.65 0l1.41 1.41 6.31-6.7c.95 3.81 0 7.62-2.33 10.69L22 19.62s-8.47 1.9-13.4-1.95c-2.63-2.06-3.22-3.26-3.59-4.52zm5.04.21c.37.37.98.37 1.35 0s.37-.97 0-1.34a.96.96 0 0 0-1.35 0c-.37.37-.37.97 0 1.34"/></svg>`,applescript:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#78909c" d="M25.425 26.498c-1.162 1.736-2.394 3.43-4.27 3.458-1.875.042-2.477-1.106-4.605-1.106-2.142 0-2.8 1.078-4.578 1.148-1.834.07-3.22-1.848-4.396-3.542C5.183 23 3.35 16.63 5.813 12.346a6.84 6.84 0 0 1 5.767-3.514c1.792-.028 3.5 1.217 4.606 1.217 1.092 0 3.164-1.497 5.334-1.273a6.5 6.5 0 0 1 5.095 2.771 6.38 6.38 0 0 0-3.01 5.334 6.18 6.18 0 0 0 3.752 5.656 15.5 15.5 0 0 1-1.932 3.961M17.432 4.1A6.36 6.36 0 0 1 21.548 2a6.13 6.13 0 0 1-1.456 4.466 5.11 5.11 0 0 1-4.13 1.988 5.98 5.98 0 0 1 1.47-4.354"/></svg>`,assembly:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ff6e40" d="M8 6V2H4a2 2 0 0 0-2 2v24a2 2 0 0 0 2 2h4v-4H4V6Zm16-4v4h4v20h-4v4h4a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2Zm-4 4h-2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2m-2 6V8h2v4Zm-4 6h-2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2m-2 6v-4h2v4Zm0-18c0 2 0 2-2 2v2h2v4h2V6Zm8 12c0 2 0 2-2 2v2h2v4h2v-8Z"/></svg>`,clojure:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path fill="#64dd17" d="M123.456 129.975a507 507 0 0 0-3.54 7.846c-4.406 9.981-9.284 22.127-11.066 29.908-.64 2.77-1.037 6.205-1.03 10.013 0 1.506.081 3.09.21 4.702a58.1 58.1 0 0 0 19.98 3.559 58.2 58.2 0 0 0 18.29-2.98c-1.352-1.237-2.642-2.554-3.816-4.038-7.796-9.942-12.146-24.512-19.028-49.01m-28.784-49.39C79.782 91.08 70.039 108.387 70.002 128c.037 19.32 9.487 36.403 24.002 46.94 3.56-14.83 12.485-28.41 25.868-55.63a219 219 0 0 0-2.714-7.083c-3.708-9.3-9.059-20.102-13.834-24.993-2.435-2.555-5.389-4.763-8.652-6.648"/><path fill="#7cb342" d="M178.532 194.535c-7.683-.963-14.023-2.124-19.57-4.081a69.4 69.4 0 0 1-30.958 7.249c-38.491 0-69.693-31.198-69.698-69.7 0-20.891 9.203-39.62 23.764-52.392-3.895-.94-7.956-1.49-12.104-1.482-20.45.193-42.037 11.51-51.025 42.075-.84 4.45-.64 7.813-.64 11.8 0 60.591 49.12 109.715 109.705 109.715 37.104 0 69.882-18.437 89.732-46.633-10.736 2.675-21.06 3.955-29.902 3.982-3.314 0-6.425-.177-9.305-.53"/><path fill="#29b6f6" d="M157.922 173.271c.678.336 2.213.884 4.35 1.49 14.375-10.553 23.717-27.552 23.754-46.764h-.005c-.055-32.03-25.974-57.945-58.011-58.009a58.2 58.2 0 0 0-18.213 2.961c11.779 13.426 17.443 32.613 22.922 53.6l.01.025c.01.017 1.752 5.828 4.743 13.538 2.97 7.7 7.203 17.231 11.818 24.178 3.03 4.655 6.363 8 8.632 8.981"/><path fill="#1e88e5" d="M128.009 18.29c-36.746 0-69.25 18.089-89.16 45.826 10.361-6.49 20.941-8.83 30.174-8.747 12.753.037 22.779 3.991 27.589 6.696a51 51 0 0 1 3.345 2.131 69.4 69.4 0 0 1 28.049-5.894c38.496.004 69.703 31.202 69.709 69.698h-.006c0 19.409-7.938 36.957-20.736 49.594 3.142.352 6.492.571 9.912.554 12.15.006 25.284-2.675 35.13-10.956 6.42-5.408 11.798-13.327 14.78-25.199.584-4.586.92-9.247.92-13.991 0-60.588-49.116-109.715-109.705-109.715"/></svg>`,cobol:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M12 0h8v4h-8z"/><path fill="#0288d1" d="M16 5A11 11 0 1 1 5 16 11.01 11.01 0 0 1 16 5m0-3a14 14 0 1 0 14 14A14 14 0 0 0 16 2"/><path fill="#0288d1" d="M32 12v8h-4v-8zm-1.858 12.485-5.657 5.657-2.313-2.313 5.657-5.657zM7.514 30.143l-5.657-5.657 2.814-2.814 5.657 5.657zM12 28h8v4h-8zm15.329-17.672L21.672 4.67l2.814-2.814 5.657 5.657zM3 12v8H0v-8zm7.328-7.329L4.67 10.328 1.857 7.514l5.657-5.657zM20 10h-4a6 6 0 0 0 0 12h4v-4h-4a2 2 0 0 1 0-4h4z"/></svg>`,crystal:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><path fill="#cfd8dc" d="m179.363 121.67-57.623 57.507c-.23.23-.576.346-.806.23l-78.713-21.09c-.346-.115-.577-.345-.577-.576L20.44 79.144c-.115-.345 0-.576.23-.806L78.294 20.83c.23-.23.576-.346.807-.23l78.713 21.09c.345.114.576.345.576.575l21.09 78.597c.23.346.115.577-.115.807zm-77.215-62.58-77.33 20.63c-.115 0-.23.23-.115.345l56.586 56.47c.115.115.346.115.346-.115l20.744-77.215c.115 0-.115-.23-.23-.116z"/></svg>`,dart:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#4fc3f7" d="M16.83 2a1.3 1.3 0 0 0-.916.377l-.013.01L7.323 7.34l8.556 8.55v.005l10.283 10.277 1.96-3.529-7.068-16.96-3.299-3.297A1.3 1.3 0 0 0 16.828 2Z"/><path fill="#01579b" d="m7.343 7.32-4.955 8.565-.01.013a1.297 1.297 0 0 0 .004 1.835l.005.005 4.106 4.107 16.064 6.314 3.632-2.015-.098-.098-.025.002L15.995 15.97h-.012z"/><path fill="#01579b" d="m7.321 7.324 8.753 8.755h.013L26.16 26.156l3.835-.73L30 14.089l-4.049-3.965a6.5 6.5 0 0 0-3.618-1.612l.002-.043L7.323 7.325Z"/><path fill="#64b5f6" d="m7.332 7.335 8.758 8.75v.013l10.079 10.071L25.436 30H14.09l-3.967-4.048a6.5 6.5 0 0 1-1.611-3.618l-.045.004Z"/></svg>`,dlang:cF,d:cF,docker:lF,dockerfile:lF,elixir:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#9575cd" d="M12.173 22.681c-3.86 0-6.99-3.64-6.99-8.13 0-3.678 2.773-8.172 4.916-10.91 1.014-1.296 2.93-2.322 2.93-2.322s-.982 5.239 1.683 7.319c2.366 1.847 4.106 4.25 4.106 6.363 0 4.232-2.784 7.68-6.645 7.68"/></svg>`,erlang:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30"><path fill="#f44336" d="M5.207 4.33q-.072.075-.143.153Q1.5 8.476 1.5 15.33c0 4.418 1.155 7.862 3.459 10.34h19.415c2.553-1.152 4.127-3.43 4.127-3.43l-3.147-2.52L23.9 21.1c-.867.773-.845.931-2.315 1.78-1.495.674-3.04.966-4.634.966-2.515 0-4.423-.909-5.723-2.059-1.286-1.15-1.985-4.511-2.096-6.68l17.458.067-.183-1.472s-.847-7.129-2.541-9.372zm8.76.846c1.565 0 3.22.535 3.961 1.471.74.937.931 1.667.973 3.524H9.11c.112-1.955.436-2.81 1.373-3.698.936-.887 2.03-1.297 3.484-1.297"/></svg>`,fortran:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ff7043" d="M6 4v2h3a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6v2h12v-2h-3a1 1 0 0 1-1-1v-9h4a2 2 0 0 1 2 2v2h2V10h-2v2a2 2 0 0 1-2 2h-4V6h6a4 4 0 0 1 4 4h2V4Z"/></svg>`,groovy:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#26c6da" d="M19.322 2a6.5 6.5 0 0 1 4.352 1.419 4.55 4.55 0 0 1 1.685 3.662 5.82 5.82 0 0 1-1.886 4.275 6.04 6.04 0 0 1-4.34 1.846 4.15 4.15 0 0 1-2.385-.649 1.91 1.91 0 0 1-.936-1.603 1.6 1.6 0 0 1 .356-1.024 1.1 1.1 0 0 1 .861-.447q.469 0 .468.504a.79.79 0 0 0 .358.693 1.43 1.43 0 0 0 .826.245 3.1 3.1 0 0 0 2.39-1.573 5.66 5.66 0 0 0 1.154-3.39 2.64 2.64 0 0 0-.891-2.064 3.28 3.28 0 0 0-2.293-.812 6.18 6.18 0 0 0-4.086 1.736 12.9 12.9 0 0 0-3.215 4.557 13.4 13.4 0 0 0-1.233 5.36 5.86 5.86 0 0 0 1.091 3.723 3.53 3.53 0 0 0 2.905 1.372q3.058 0 5.848-4.002l2.935-.388q.546-.07.545.246a8 8 0 0 1-.423 1.24q-.421 1.097-1.152 3.668A12.7 12.7 0 0 0 26 17.72v1.66a14.2 14.2 0 0 1-4.055 2.57 10.38 10.38 0 0 1-2.764 5.931 6.7 6.7 0 0 1-4.806 2.11 3.3 3.3 0 0 1-2.012-.55 1.8 1.8 0 0 1-.718-1.514q0-2.685 5.634-5.212.532-1.766 1.152-3.507a8.6 8.6 0 0 1-2.853 2.323 7.4 7.4 0 0 1-3.48 1.01 5.46 5.46 0 0 1-4.366-2.093A8.1 8.1 0 0 1 6 15.122a11.6 11.6 0 0 1 1.966-6.426 14.7 14.7 0 0 1 5.162-4.862A12.44 12.44 0 0 1 19.322 2m-2.407 22.17q-4.055 1.875-4.054 3.695a.87.87 0 0 0 .999.97q1.964 0 3.055-4.665"/></svg>`,haskell:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300"><g stroke-width="2.422"><path fill="#ef5350" d="m23.928 240.5 59.94-89.852-59.94-89.855h44.955l59.94 89.855-59.94 89.852z"/><path fill="#ffa726" d="m83.869 240.5 59.94-89.852-59.94-89.855h44.955l119.88 179.71h-44.95l-37.46-56.156-37.468 56.156z"/><path fill="#ffee58" d="m228.72 188.08-19.98-29.953h69.93v29.956h-49.95zm-29.97-44.924-19.98-29.953h99.901v29.953z"/></g></svg>`,julia:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><g transform="translate(.21 -247.01)"><circle cx="13.497" cy="281.63" r="9.555" fill="#c62828"/><circle cx="36.081" cy="281.63" r="9.555" fill="#7e57c2"/><circle cx="24.722" cy="262.39" r="9.555" fill="#388e3c"/></g></svg>`,lisp:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ef5350" d="M16 2a14 14 0 1 0 14 14A14.003 14.003 0 0 0 16 2m8.93 20.43a11 11 0 0 1-7.19 4.43 6.094 6.094 0 0 1-4.79-5.9v-.05a5 5 0 0 1 .04-.66 7.95 7.95 0 0 1 2.3-4.95 5.99 5.99 0 0 0-2.23-9.9 11.004 11.004 0 0 1 11.87 17.03"/></svg>`,lua:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="M30 6a3.86 3.86 0 0 1-1.167 2.833 4.024 4.024 0 0 1-5.666 0A3.86 3.86 0 0 1 22 6a3.86 3.86 0 0 1 1.167-2.833 4.024 4.024 0 0 1 5.666 0A3.86 3.86 0 0 1 30 6m-9.208 5.208A10.6 10.6 0 0 0 13 8a10.6 10.6 0 0 0-7.792 3.208A10.6 10.6 0 0 0 2 19a10.6 10.6 0 0 0 3.208 7.792A10.6 10.6 0 0 0 13 30a10.6 10.6 0 0 0 7.792-3.208A10.6 10.6 0 0 0 24 19a10.6 10.6 0 0 0-3.208-7.792m-1.959 7.625a4.024 4.024 0 0 1-5.666 0 4.024 4.024 0 0 1 0-5.666 4.024 4.024 0 0 1 5.666 0 4.024 4.024 0 0 1 0 5.666"/></svg>`,nim:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ffca28" d="M6 24h20v2a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2zM30 6l-9 9-5-11-5 11-9-9 4 14h20z"/></svg>`,objectivec:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M19.563 22A5.57 5.57 0 0 1 14 16.437v-2.873A5.57 5.57 0 0 1 19.563 8H24V2h-4.437A11.563 11.563 0 0 0 8 13.563v2.873A11.564 11.564 0 0 0 19.563 28H24v-6Z"/></svg>`,objectivecpp:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M28 14v-4h-2v4h-6v-4h-2v4h-4v2h4v4h2v-4h6v4h2v-4h4v-2z"/><path fill="#0288d1" d="M13.563 22A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>`,ocaml:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12.019 15.021.003-.008c-.005-.021-.006-.026-.003.008"/><path fill="#ff9800" d="M4.51 3.273a2.523 2.523 0 0 0-2.524 2.523V11.3c.361-.13.88-.898 1.043-1.085.285-.327.337-.743.478-1.006C3.83 8.612 3.886 8.2 4.62 8.2c.342 0 .478.08.71.39.16.216.438.615.568.882.15.307.396.724.503.808q.122.095.233.137c.119.044.218-.037.297-.1.102-.082.145-.247.24-.467.135-.317.283-.697.367-.83.146-.23.195-.501.352-.633.232-.195.535-.208.618-.225.466-.092.677.225.907.43.15.133.355.403.5.765.114.283.26.544.32.707.059.158.203.41.289.713.077.275.286.486.365.616 0 0 .121.34.858.65.16.067.482.176.674.246.32.116.63.101 1.025.054.281 0 .434-.408.562-.734.075-.193.148-.745.197-.902.048-.153-.064-.27.031-.405.112-.156.178-.164.242-.368.138-.436.936-.458 1.384-.458.374 0 .327.363.96.239.364-.072.714.046 1.1.149.324.086.63.184.812.398.119.139.412.834.113.863.029.035.05.099.104.134-.067.262-.357.075-.518.041-.217-.045-.37.007-.583.101-.363.162-.894.143-1.21.407-.27.223-.269.721-.394 1 0 0-.348.895-1.106 1.443-.194.14-.574.477-1.4.605a5.3 5.3 0 0 1-1.1.043c-.186-.009-.362-.018-.549-.02-.11-.002-.48-.013-.461.022l-.041.103.024.138c.015.083.019.149.022.225.006.157-.013.32-.005.478.017.328.138.627.154.958.017.368.199.758.375 1.059.067.114.169.128.213.269.052.161.003.333.028.505.1.668.292 1.366.592 1.97l.008.014c.371-.062.743-.196 1.226-.267.885-.132 2.115-.064 2.906-.138 2-.188 3.085.82 4.882.407V5.796a2.523 2.523 0 0 0-2.523-2.523zm-.907 11.144q-.022 0-.046.003c-.159.025-.313.08-.412.24-.08.13-.108.355-.164.505-.064.175-.176.338-.274.505-.18.305-.504.581-.644.879-.028.06-.053.13-.076.2v3.402c.163.028.333.062.524.113 1.407.375 1.75.407 3.13.25l.13-.018c.105-.22.187-.968.255-1.2.054-.178.127-.32.155-.5.026-.173-.003-.337-.017-.493-.04-.393.285-.533.44-.87.14-.304.22-.651.336-.963.11-.298.284-.721.579-.872-.036-.041-.617-.06-.772-.076a5 5 0 0 1-.5-.07c-.314-.064-.656-.126-.965-.2a10 10 0 0 1-.947-.328c-.298-.138-.503-.497-.732-.507m5.737.83c-.74.149-.97.876-1.32 1.451-.192.319-.396.59-.548.928-.14.312-.128.657-.368.924a2.55 2.55 0 0 0-.528.922c-.023.067-.088.776-.158.943l1.101-.078c1.026.07.73.464 2.332.378l2.529-.078a7 7 0 0 0-.228-.588c-.07-.147-.16-.434-.218-.56a3.5 3.5 0 0 0-.309-.526c-.184-.215-.227-.23-.28-.503-.095-.473-.344-1.33-.637-1.923-.151-.306-.403-.562-.634-.784-.2-.195-.655-.522-.734-.505z"/></svg>`,perl:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ba68c8" d="M11.057 2.981c.537.735.028 1.653.141 2.472a3.42 3.42 0 0 1-1.03 2.415c-1.414 1.625-3.165 3.038-4.097 5.03a5.28 5.28 0 0 0 1.412 5.847c.706.735 1.54 1.342 2.472 1.738.17.805-1.088.184-1.455 0A6.7 6.7 0 0 1 4.361 16.4a5.44 5.44 0 0 1 .904-5.368c1.272-1.61 3.136-2.543 4.662-3.857.565-.55 1.003-1.3.932-2.119.156-.678-.254-1.469.212-2.09zm-.07 18.929c-.17.198-.467.325-.495.24-.042-.085.212-.127.381-.325.17-.183.127-.522.24-.522.1 0 .043.395-.14.607zm2.16 0c.17.198.453.31.495.24.028-.085-.212-.141-.395-.339-.156-.184-.113-.523-.24-.523-.085 0-.029.41.14.608zm-1.03.48c-.1 0-.071-.296-.071-.65 0-.367-.028-.663.07-.663.085 0 .057.296.057.663 0 .354.014.65-.057.65m-.495-20.765c.34.24.254 2.077.254 3.136 0 1.653.184 3.376-.805 4.916-.96 1.497-2.048 3.108-1.95 4.972.1 1.837.99 3.504 2.148 5.043.664.876-.353.509-.876.085a7.2 7.2 0 0 1-2.755-5.664c.142-1.907 1.597-3.348 2.628-4.803.805-1.13 1.186-1.879 1.215-3.645.028-1.412-.142-3.531.042-3.983.014-.043.07-.1.099-.057m.537 2.232c-.085 0-.043.396.028.72.424 2.26-.198 4.52-.749 6.682a12.77 12.77 0 0 0 .283 7.826c.607 1.568 1.71.791 2.161 1.568.34.593 1.272.198 1.978-.141 2.232-1.102 4.012-3.108 4.11-5.566.029-.494 0-.989-.07-1.497-.283-1.837-1.78-3.065-3.15-4.083-1.215-.89-2.74-1.483-3.659-2.613-.523-.65-.297-1.638-.381-2.458-.043-.452-.255-.042-.382-.268-.084-.127-.14-.17-.17-.17zm.72 3.616c.057 0 .17.071.325.226a20 20 0 0 0 2.161 1.921c1.272.961 2.43 2.091 2.967 3.504.339.875.339 1.836.226 2.74-.184 1.384-1.187 2.444-2.119 3.404-.339.354-1.06.791-1.074.678-.084-.367.763-1.172 1.159-1.695A5.93 5.93 0 0 0 16 10.962c-1.102-1.214-2.317-1.907-2.995-3.08-.14-.253-.183-.409-.113-.409z"/></svg>`,prolog:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ef5350" d="M12 15.385a5.1 5.1 0 0 0 1.862 1.693L12 18.94l-1.862-1.862A5.04 5.04 0 0 0 12 15.385m4.232-4.063a1.693 1.693 0 0 0-1.693 1.693 1.693 1.693 0 0 0 1.693 1.693 1.693 1.693 0 0 0 1.693-1.693c0-.94-.762-1.693-1.693-1.693m-8.464 0a1.693 1.693 0 0 0-1.693 1.693 1.693 1.693 0 0 0 1.693 1.693 1.693 1.693 0 0 0 1.693-1.693c0-.94-.762-1.693-1.693-1.693m8.464-2.116a3.385 3.385 0 0 1 3.385 3.386 3.385 3.385 0 0 1-3.385 3.385 3.385 3.385 0 0 1-3.386-3.385 3.385 3.385 0 0 1 3.386-3.386m-8.464 0a3.385 3.385 0 0 1 3.386 3.386 3.385 3.385 0 0 1-3.386 3.385 3.385 3.385 0 0 1-3.385-3.385 3.385 3.385 0 0 1 3.385-3.386M3.74 2.69c1.49 3.132.415 5.468-.584 7.787a5.1 5.1 0 0 0-.465 2.116 5.08 5.08 0 0 0 5.078 5.078 6 6 0 0 0 .533-.042l2.506 2.505L12 21.31l1.194-1.177 2.505-2.505c.178.025.355.034.533.042a5.08 5.08 0 0 0 5.078-5.078 5.1 5.1 0 0 0-.465-2.116c-.999-2.319-2.074-4.655-.584-7.787-2.235 1.744-5.417 3.123-8.26 3.132-2.845-.008-6.027-1.388-8.261-3.132z"/></svg>`,r:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#1976d2" d="M11.956 4.05c-5.694 0-10.354 3.106-10.354 6.947 0 3.396 3.686 6.212 8.531 6.813v2.205h3.53V17.82c.88-.093 1.699-.259 2.475-.497l1.43 2.692h3.996l-2.402-4.048c1.936-1.263 3.147-3.034 3.147-4.97 0-3.841-4.659-6.947-10.354-6.947m1.584 2.712c4.349 0 7.558 1.45 7.558 4.753 0 1.77-.952 3.013-2.505 3.779a1 1 0 0 1-.228-.156c-.373-.165-.994-.352-.994-.352s3.085-.227 3.085-3.302-3.23-3.127-3.23-3.127h-7.092v7.413c-2.64-.766-4.462-2.392-4.462-4.255 0-2.63 3.52-4.753 7.868-4.753m.156 4.12h2.143s.983-.05.983.974c0 1.004-.983 1.004-.983 1.004h-2.143v-1.977m-.031 4.566h.952c.186 0 .28.052.445.207.135.103.28.3.404.476-.57.073-1.17.104-1.801.104z"/></svg>`,scala:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#f44336" d="m6.457 9.894 12.523 5.163-.456 1.211L6 11.105Zm7.02-3.091L26 11.966l-.457 1.21L13.02 8.015ZM6.465 18.885l12.524 5.163-.457 1.21L6.01 20.097Zm7.007-3.086 12.524 5.163-.456 1.21-12.524-5.162Z"/><path fill="#f44336" d="M6 24.07V30l19.997-3.106V20.96zM6 5.11v5.99l20-3.11V2zm0 9.96v5.03l20-3.11v-5.03z"/></svg>`,solidity:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="#0288d1"><path d="m5.747 14.046 6.254 8.61 6.252-8.61-6.254 3.807z"/><path d="M11.999 1.343 5.747 11.83l6.252 3.807 6.253-3.807z"/></g></svg>`,svelte:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300"><path fill="#ff5722" d="M175.94 24.328c-13.037.252-26.009 3.872-37.471 11.174L79.912 72.818a67.13 67.13 0 0 0-30.355 44.906 70.8 70.8 0 0 0 6.959 45.445 67.2 67.2 0 0 0-10.035 25.102 71.54 71.54 0 0 0 12.236 54.156c23.351 33.41 69.468 43.311 102.81 22.07l58.559-37.158a67.36 67.36 0 0 0 30.355-44.906 70.77 70.77 0 0 0-6.982-45.422 67.65 67.65 0 0 0 10.059-25.102 71.63 71.63 0 0 0-12.236-54.156v-.18c-15.324-21.925-40.453-33.727-65.342-33.246zm5.137 28.68a46.5 46.5 0 0 1 36.09 19.969 42.98 42.98 0 0 1 7.365 32.557 45 45 0 0 1-1.393 5.455l-1.123 3.37-2.986-2.247a75.9 75.9 0 0 0-22.902-11.45l-2.244-.651.201-2.246a13.16 13.16 0 0 0-2.379-8.711 13.99 13.99 0 0 0-14.953-5.412 12.8 12.8 0 0 0-3.594 1.572l-58.578 37.25a12.24 12.24 0 0 0-5.502 8.15 13.1 13.1 0 0 0 2.246 9.834 14.03 14.03 0 0 0 14.93 5.569 13.5 13.5 0 0 0 3.594-1.573l22.453-14.234a41.8 41.8 0 0 1 11.898-5.232 46.48 46.48 0 0 1 49.914 18.502 43.02 43.02 0 0 1 7.363 32.557 40.42 40.42 0 0 1-18.254 27.078l-58.58 37.316a43 43 0 0 1-11.898 5.23A46.545 46.545 0 0 1 82.81 227.14a42.98 42.98 0 0 1-7.341-32.557 38 38 0 0 1 1.39-5.41l1.102-3.37 3.008 2.246a75.9 75.9 0 0 0 22.836 11.361l2.244.65-.201 2.247a13.25 13.25 0 0 0 2.447 8.644 14.03 14.03 0 0 0 15.043 5.569 13.1 13.1 0 0 0 3.592-1.573l58.467-37.316a12.17 12.17 0 0 0 5.502-8.173 12.96 12.96 0 0 0-2.246-9.811 14.03 14.03 0 0 0-15.043-5.568 12.8 12.8 0 0 0-3.592 1.57l-22.453 14.258a42.9 42.9 0 0 1-11.877 5.209 46.52 46.52 0 0 1-49.846-18.5 43.02 43.02 0 0 1-7.297-32.557A40.42 40.42 0 0 1 96.798 96.98l58.646-37.316a42.8 42.8 0 0 1 11.811-5.21 46.5 46.5 0 0 1 13.822-1.444z"/></svg>`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#8bc34a" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m.12 13.5 3.74 3.74 1.42-1.41-2.33-2.33 2.33-2.33-1.42-1.41zm11.16 0-3.74-3.74-1.42 1.41 2.33 2.33-2.33 2.33 1.42 1.41z"/></svg>`,swift:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ff6e40" d="M17.087 19.721c-2.36 1.36-5.59 1.5-8.86.1a13.8 13.8 0 0 1-6.23-5.32c.67.55 1.46 1 2.3 1.4 3.37 1.57 6.73 1.46 9.1 0-3.37-2.59-6.24-5.96-8.37-8.71-.45-.45-.78-1.01-1.12-1.51 8.28 6.05 7.92 7.59 2.41-1.01 4.89 4.94 9.43 7.74 9.43 7.74.16.09.25.16.36.22.1-.25.19-.51.26-.78.79-2.85-.11-6.12-2.08-8.81 4.55 2.75 7.25 7.91 6.12 12.24-.03.11-.06.22-.05.39 2.24 2.83 1.64 5.78 1.35 5.22-1.21-2.39-3.48-1.65-4.62-1.17"/></svg>`,terraform:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#5c6bc0" d="m2 10 8 4V6L2 2zm10 5 8 4v-8l-8-4zm0 11 8 4v-8l-8-4zm10-14v8l8-4V8z"/></svg>`,vbnet:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M30 14v-2h-2V8h-2v4h-2V8h-2v4h-2v2h2v2h-2v2h2v4h2v-4h2v4h2v-4h2v-2h-2v-2Zm-4 2h-2v-2h2Zm-12.437 6A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>`},dF=n({default:()=>BF}),fF=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),pF=[`data-markstream-mode`],mF={key:0,class:`infographic-block-header flex justify-between items-center border-b`},hF={key:0},gF={key:1,class:`flex items-center gap-x-2 overflow-hidden`},_F=[`innerHTML`],vF={key:2},yF={key:3,class:`infographic-mode-toggle flex items-center gap-0.5`},bF=[`disabled`],xF={class:`flex items-center gap-x-1`},SF={class:`flex items-center gap-x-1`},CF={key:4},wF={key:5,class:`infographic-header-actions flex items-center`},TF=[`aria-pressed`],EF={key:0,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},DF={key:1,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},OF=[`disabled`],kF=[`disabled`],AF={key:0,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},jF={key:1,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},MF={key:0,class:`infographic-source`},NF={class:`infographic-source-code text-sm font-mono whitespace-pre-wrap`},PF={key:1,class:`relative`},FF={key:0,class:`absolute top-2 right-2 z-10 rounded-lg`},IF={class:`flex items-center gap-2 backdrop-blur rounded-lg`},LF={class:`dialog-panel infographic-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden`},RF={class:`absolute top-6 right-6 z-50 flex items-center gap-2`},zF=`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,BF=eO(c({__name:`InfographicBlockNode`,props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0}},emits:[`copy`,`export`,`openModal`],setup(e,{emit:t}){let n=e,{t:r}=UO(),a=fA(),o=M(!1),s=M(!1),c=M(),u=M(),m=M(!0),h=M(!1),_=M(!1),v=M(),b=M(null),x=M(!1),S=M(null),C=M(typeof window>`u`),w=p(),T=i(mE,null),A=``,j=I(()=>WO(n,w));typeof window<`u`&&E(()=>c.value,e=>{var t;if((t=S.value)==null||t.destroy(),S.value=null,!e)return void(C.value=!1);let n=a(e,{rootMargin:`160px`});S.value=n,C.value=n.isVisible.value,n.whenVisible.then(()=>{C.value=!0})},{immediate:!0});let N=I(()=>n.node.code),P=I(()=>function(e){return n.maxHeight===`none`?xM(e,void 0,null):xM(e,void 0,hM(n.maxHeight))}(hM(n.estimatedPreviewHeightPx)??vM(N.value))),te=M(`${P.value}px`),ne=I(()=>hM(n.estimatedPreviewHeightPx)!=null);function re(){if(!u.value||ne.value)return;let e=u.value.scrollHeight;if(e>0){let t=hM(function(e){if(n.maxHeight===`none`)return`${e}px`;if(n.maxHeight!=null){let t=Number.parseFloat(String(n.maxHeight));if(Number.isFinite(t))return`${Math.min(e,t)}px`}let t=u.value;if(t){let n=getComputedStyle(t).getPropertyValue(`--ms-size-code-max-height`).trim(),r=Number.parseFloat(n);if(Number.isFinite(r))return`${Math.min(e,r)}px`}return`${Math.min(e,500)}px`}(e))??e;te.value=`${Math.max(t,P.value)}px`}}let ie=M(1),ae=M(0),oe=M(0),se=M(!1),le=M({x:0,y:0}),ue=I(()=>N.value);function de(e){return!e||e.disabled}function fe(e,t,r=`top`){if(de(e.currentTarget))return;let i=e,a=i?.clientX!=null&&i?.clientY!=null?{x:i.clientX,y:i.clientY}:void 0;RO(e.currentTarget,t,r,!1,a,n.isDark)}function pe(){zO()}function B(e){if(de(e.currentTarget))return;let t=o.value?r(`common.copied`)||`Copied`:r(`common.copy`)||`Copy`,i=e,a=i?.clientX!=null&&i?.clientY!=null?{x:i.clientX,y:i.clientY}:void 0;RO(e.currentTarget,t,`top`,!1,a,n.isDark)}function he(){return fF(this,null,function*(){try{let e=N.value;typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`&&(yield navigator.clipboard.writeText(e)),o.value=!0,setTimeout(()=>{o.value=!1},1e3)}catch(e){console.error(`Failed to copy:`,e)}})}function ge(e){(e!==`preview`||PN())&&(h.value=!0,m.value=e===`source`)}function K(){let e=u.value?.querySelector(`svg`);e?function(e){fF(this,null,function*(){try{let t=new XMLSerializer().serializeToString(e),n=new Blob([t],{type:`image/svg+xml;charset=utf-8`}),r=URL.createObjectURL(n);if(typeof document<`u`){let 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{}URL.revokeObjectURL(r)}}catch(e){console.error(`Failed to export SVG:`,e)}})}(e):console.error(`SVG element not found`)}function _e(e){e.key===`Escape`&&_.value&&ve()}function ve(){if(_.value=!1,v.value&&(v.value.innerHTML=``),b.value=null,typeof document<`u`)try{document.body.style.overflow=``}catch{}if(typeof window<`u`)try{window.removeEventListener(`keydown`,_e)}catch{}}function ye(){(function(){if(_.value=!0,typeof document<`u`)try{document.body.style.overflow=`hidden`}catch{}if(typeof window<`u`)try{window.addEventListener(`keydown`,_e)}catch{}g(()=>{if(u.value&&v.value){v.value.innerHTML=``;let 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`;let t=u.value.cloneNode(!0);t.classList.add(`fullscreen`),t.style.height=`auto`,e.appendChild(t),v.value.appendChild(e),b.value=e,e.style.transform=`translate(${ae.value}px, ${oe.value}px) scale(${ie.value})`}})})()}function be(){ie.value<3&&(ie.value+=.1)}function xe(){ie.value>.5&&(ie.value-=.1)}function Se(){ie.value=1,ae.value=0,oe.value=0}function Ce(e){se.value=!0,e instanceof MouseEvent?le.value={x:e.clientX-ae.value,y:e.clientY-oe.value}:le.value={x:e.touches[0].clientX-ae.value,y:e.touches[0].clientY-oe.value}}function q(e){if(!se.value)return;let t,n;e instanceof MouseEvent?(t=e.clientX,n=e.clientY):(t=e.touches[0].clientX,n=e.touches[0].clientY),ae.value=t-le.value.x,oe.value=n-le.value.y}function we(){se.value=!1}let Te=null,Ee=!1,De=!1,J=!1,Oe=``;function ke(e=!1){return fF(this,null,function*(){var t,r;if(!C.value||!u.value)return;if(Ee)return De=!0,void(J||=e);let i=ue.value;if(!e&&i===Oe&&x.value)return;Ee=!0,function(){let e=j.value;e&&A!==e&&(A&&T?.markSettled(A),A=e,T?.markPending(e))}();let a=u.value.innerHTML,o=x.value;try{let e=yield FN();if(!e)return void console.warn(`Infographic library failed to load.`);Te&&=((t=Te.destroy)==null||t.call(Te),null),u.value.innerHTML=``,Te=new e({container:u.value,width:`100%`,height:`100%`});let n=``;if((r=Te.on)==null||r.call(Te,`error`,e=>{n=(Array.isArray(e)?e:[e]).map(e=>e instanceof Error?e.message:typeof e==`string`?e:String(e&&typeof e==`object`&&`message`in e?e.message??``:e??``)).filter(Boolean).join(`; `)}),Te.render(N.value),n)throw Error(n);if(!u.value.childNodes.length)throw Error(`Infographic render returned empty output.`);x.value=!0,Oe=i,g(()=>{re()})}catch(e){!1===n.loading?(console.error(`Failed to render infographic:`,e),x.value=!1,Oe=``,u.value&&(u.value.innerHTML=`<div style="padding: var(--ms-inset-panel-body); color: hsl(var(--ms-destructive))">Failed to render infographic: ${e instanceof Error?e.message:`Unknown error`}</div>`)):(x.value=o,o&&u.value&&(u.value.innerHTML=a))}finally{if(Ee=!1,De){let e=J;De=!1,J=!1,g(()=>{ke(e)})}else (function(){fF(this,null,function*(){let e=A;e&&(A=``,yield g(),function(e=j.value){e&&c.value&&T?.reportHeight(e,c.value.offsetHeight)}(e),T?.markSettled(e))})})()}})}function Ae(e=!1){!C.value||m.value||s.value||g(()=>{ke(e)})}E(()=>N.value,()=>{Ae(!0)}),E(()=>n.loading,(e,t)=>{t&&!e&&Ae(!0)}),E(()=>m.value,e=>{e||Ae(!0)}),E(()=>s.value,e=>{e||Ae()}),E(()=>n.maxHeight,()=>{g(()=>{re()})}),E([()=>n.estimatedPreviewHeightPx,()=>N.value],()=>{x.value||m.value||(te.value=`${P.value}px`)}),E(()=>C.value,e=>{!e||m.value||s.value||Ae()}),f(()=>{!h.value&&PN()&&(m.value=!1),Ae()}),l(()=>{var e,t;if((e=S.value)==null||e.destroy(),S.value=null,function(){let e=A;e&&(A=``,T?.markSettled(e))}(),Te&&=((t=Te.destroy)==null||t.call(Te),null),Oe=``,typeof window<`u`)try{window.removeEventListener(`keydown`,_e)}catch{}});let je=I(()=>!PN()),Me=I(()=>m.value||s.value),Ne=I(()=>m.value?`fallback`:x.value?`preview`:`pending`),Pe=I(()=>({transform:`translate(${ae.value}px, ${oe.value}px) scale(${ie.value})`}));return E(Pe,e=>{_.value&&b.value&&(b.value.style.transform=e.transform)}),(e,t)=>(G(),W(`div`,{ref_key:`viewportTarget`,ref:c,class:L([`infographic-block-container rounded-lg border overflow-hidden`,[{"is-rendering":n.loading,dark:n.isDark}]]),"data-markstream-infographic":`1`,"data-markstream-mode":Ne.value},[n.showHeader?(G(),W(`div`,mF,[e.$slots[`header-left`]?(G(),W(`div`,hF,[d(e.$slots,`header-left`,{},void 0,!0)])):(G(),W(`div`,gF,[F(`span`,{class:`icon-slot action-icon shrink-0`,innerHTML:R(`<svg width="15.52" height="16" viewBox="0 0 291 300" fill="none" xmlns="http://www.w3.org/2000/svg"><g><path d="M140.904 239.376C128.83 239.683 119.675 239.299 115.448 243.843C110.902 248.07 111.288 257.227 110.979 269.302C111.118 274.675 111.118 279.478 111.472 283.52C111.662 285.638 111.95 287.547 112.406 289.224C112.411 289.243 112.416 289.259 112.422 289.28C112.462 289.419 112.496 289.558 112.539 289.691C113.168 291.787 114.088 293.491 115.446 294.758C116.662 296.064 118.283 296.963 120.264 297.59C120.36 297.614 120.464 297.646 120.555 297.675C120.56 297.68 120.56 297.68 120.566 297.68C120.848 297.768 121.142 297.846 121.443 297.923C121.454 297.923 121.464 297.928 121.478 297.934C122.875 298.272 124.424 298.507 126.11 298.678C126.326 298.696 126.542 298.718 126.763 298.739C130.79 299.086 135.558 299.088 140.904 299.222C152.974 298.912 162.128 299.302 166.36 294.758C170.904 290.526 170.515 281.371 170.824 269.302C170.515 257.227 170.907 248.07 166.36 243.843C162.131 239.299 152.974 239.683 140.904 239.376Z" fill="#FF6376"></path><path d="M21.2155 128.398C12.6555 128.616 6.16484 128.339 3.16751 131.56C-0.0538222 134.56 0.218178 141.054 -0.000488281 149.608C0.218178 158.168 -0.0538222 164.659 3.16751 167.656C6.16484 170.878 12.6555 170.606 21.2155 170.824C25.0262 170.726 28.4288 170.726 31.2955 170.475C32.7968 170.342 34.1488 170.136 35.3382 169.814C35.3542 169.811 35.3648 169.806 35.3782 169.803C35.4768 169.774 35.5755 169.747 35.6688 169.718C37.1568 169.272 38.3648 168.622 39.2635 167.656C40.1915 166.795 40.8262 165.646 41.2715 164.243C41.2875 164.174 41.3115 164.102 41.3328 164.035C41.3328 164.035 41.3355 164.032 41.3355 164.027C41.3968 163.827 41.4529 163.622 41.5062 163.406C41.5062 163.398 41.5115 163.392 41.5142 163.382C41.7542 162.392 41.9222 161.294 42.0422 160.096C42.0555 159.944 42.0715 159.792 42.0848 159.635C42.3328 156.779 42.3328 153.398 42.4262 149.608C42.2075 141.054 42.4848 134.56 39.2635 131.56C36.2635 128.339 29.7728 128.616 21.2155 128.398Z" fill="#FFCCCC"></path><path d="M81.0595 184.171C70.8568 184.433 63.1208 184.102 59.5475 187.942C55.7075 191.518 56.0328 199.254 55.7742 209.454C56.0328 219.657 55.7075 227.393 59.5475 230.963C63.1208 234.803 70.8568 234.478 81.0595 234.739C85.6008 234.622 89.6595 234.622 93.0728 234.323C94.8648 234.163 96.4755 233.921 97.8942 233.534C97.9102 233.529 97.9235 233.526 97.9422 233.521C98.0568 233.486 98.1742 233.457 98.2888 233.422C100.06 232.889 101.5 232.113 102.569 230.963C103.676 229.937 104.433 228.566 104.964 226.894C104.985 226.811 105.012 226.726 105.036 226.646C105.041 226.643 105.041 226.643 105.041 226.638C105.116 226.401 105.18 226.153 105.244 225.897C105.244 225.889 105.249 225.881 105.254 225.867C105.54 224.689 105.74 223.379 105.881 221.953C105.9 221.771 105.916 221.59 105.934 221.403C106.228 218.001 106.228 213.969 106.342 209.454C106.081 199.254 106.412 191.518 102.572 187.942C98.9955 184.102 91.2568 184.433 81.0595 184.171Z" fill="#FF939F"></path><path d="M260.591 151.87C215.652 151.87 203.02 164.523 203.02 209.462H198.476C198.476 164.523 185.836 151.881 140.895 151.881V147.337C185.836 147.337 198.487 134.705 198.487 89.7659H203.02C203.02 134.705 215.652 147.337 260.591 147.337V151.87ZM286.052 124.158C281.82 119.614 272.66 120.001 260.591 119.689C248.521 119.385 239.361 119.771 235.129 115.227C230.585 110.995 230.983 101.846 230.671 89.7659C230.513 83.7312 230.535 78.4272 230.023 74.1019C229.513 69.7659 228.481 66.4219 226.209 64.3046C221.967 59.7606 212.817 60.1472 200.748 59.8459C188.681 60.1472 179.519 59.7606 175.287 64.3046C170.753 68.5366 171.129 77.6966 170.828 89.7659C170.516 101.835 170.9 110.995 166.356 115.227C162.124 119.771 152.985 119.374 140.905 119.689C138.873 119.739 136.924 119.771 135.071 119.811C119.313 118.697 106.337 112.318 106.337 89.7659C106.212 84.6699 106.233 80.1792 105.807 76.5206C105.367 72.8726 104.492 70.0379 102.575 68.2566C99.0013 64.4112 91.2573 64.7446 81.0653 64.4832C70.86 64.7446 63.1186 64.4112 59.5533 68.2566C55.708 71.8299 56.0306 79.5632 55.7693 89.7659C56.0306 99.9686 55.708 107.702 59.5533 111.278C63.1186 115.113 70.86 114.79 81.0653 115.049C103.617 115.049 109.996 128.035 111.1 143.803C111.068 145.659 111.028 147.587 110.975 149.619C111.121 154.987 111.121 159.79 111.476 163.835C111.663 165.95 111.945 167.857 112.404 169.534C112.412 169.555 112.412 169.566 112.423 169.598C112.465 169.734 112.497 169.867 112.537 170.003C113.164 172.099 114.092 173.809 115.447 175.07C116.665 176.371 118.281 177.278 120.271 177.905C120.364 177.934 120.46 177.955 120.564 177.987C120.855 178.081 121.145 178.153 121.439 178.238C121.46 178.238 121.471 178.238 121.479 178.249C122.876 178.582 124.42 178.822 126.108 178.987C126.327 179.009 126.545 179.03 126.764 179.051C130.788 179.395 135.559 179.395 140.905 179.529C152.975 179.843 162.124 179.457 166.356 184.001C170.9 188.233 170.516 197.371 170.828 209.451C171.129 221.529 170.743 230.681 175.287 234.91C179.519 239.454 188.681 239.07 200.748 239.371C206.127 239.235 210.921 239.235 214.975 238.881C217.079 238.694 218.985 238.403 220.676 237.955C220.695 237.945 220.705 237.934 220.727 237.934C220.873 237.891 220.999 237.859 221.135 237.819C223.228 237.193 224.937 236.265 226.209 234.91C227.511 233.691 228.409 232.065 229.044 230.097C229.065 230.003 229.095 229.899 229.127 229.803V229.793C229.22 229.513 229.295 229.222 229.367 228.918C229.367 228.897 229.377 228.897 229.377 228.878C229.721 227.481 229.951 225.937 230.127 224.249C230.137 224.03 230.169 223.811 230.191 223.593C230.535 219.571 230.535 214.798 230.671 209.451C230.972 197.371 230.585 188.233 235.129 184.001C239.361 179.457 248.511 179.843 260.591 179.529C272.66 179.227 281.82 179.614 286.052 175.07C290.596 170.838 290.209 161.689 290.511 149.619C290.209 137.539 290.596 128.379 286.052 124.158Z" fill="#FF356A"></path><path d="M112.405 49.848C112.411 49.8694 112.416 49.8827 112.421 49.904C112.461 50.0427 112.499 50.1814 112.539 50.3147C113.171 52.4134 114.088 54.1147 115.448 55.384C116.661 56.6907 118.283 57.5894 120.264 58.2134C120.36 58.24 120.464 58.2694 120.555 58.3014C120.56 58.3067 120.56 58.3067 120.565 58.3067C120.848 58.3947 121.141 58.4694 121.443 58.5467C121.453 58.5467 121.464 58.552 121.48 58.5574C122.875 58.896 124.424 59.1334 126.112 59.3014C126.325 59.3227 126.541 59.3414 126.763 59.3627C130.789 59.712 135.56 59.712 140.904 59.8454C152.973 59.5387 162.128 59.928 166.36 55.384C170.907 51.152 170.515 41.9947 170.824 29.9254C170.517 17.8507 170.907 8.69602 166.363 4.46935C162.131 -0.0746511 152.973 0.309349 140.904 1.52588e-05C128.829 0.309349 119.675 -0.0746511 115.448 4.46935C110.904 8.69602 111.288 17.8507 110.979 29.9254C111.117 35.3014 111.117 40.1014 111.472 44.144C111.661 46.2614 111.949 48.1707 112.405 49.848Z" fill="#FF6376"></path></g></svg>
|
|
154
|
-
`)},null,8,_F),t[21]||=F(`span`,{class:`infographic-label font-medium font-mono truncate`},`Infographic`,-1)])),e.$slots[`header-center`]?(G(),W(`div`,vF,[d(e.$slots,`header-center`,{},void 0,!0)])):n.showModeToggle?(G(),W(`div`,yF,[F(`button`,{class:L([`infographic-mode-btn px-2 py-0.5 rounded transition-colors`,[m.value?``:`is-active`,je.value?`opacity-50 cursor-not-allowed`:``]]),disabled:je.value,onClick:t[0]||=()=>ge(`preview`),onMouseenter:t[1]||=e=>fe(e,R(r)(`common.preview`)||`Preview`),onFocus:t[2]||=e=>fe(e,R(r)(`common.preview`)||`Preview`),onMouseleave:pe,onBlur:pe},[F(`div`,xF,[t[22]||=F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0`}),F(`circle`,{cx:`12`,cy:`12`,r:`3`})])],-1),F(`span`,null,H(R(r)(`common.preview`)||`Preview`),1)])],42,bF),F(`button`,{class:L([`infographic-mode-btn px-2 py-0.5 rounded transition-colors`,[m.value?`is-active`:``]]),onClick:t[3]||=()=>ge(`source`),onMouseenter:t[4]||=e=>fe(e,R(r)(`common.source`)||`Source`),onFocus:t[5]||=e=>fe(e,R(r)(`common.source`)||`Source`),onMouseleave:pe,onBlur:pe},[F(`div`,SF,[t[23]||=F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m16 18l6-6l-6-6M8 6l-6 6l6 6`})],-1),F(`span`,null,H(R(r)(`common.source`)||`Source`),1)])],34)])):V(``,!0),e.$slots[`header-right`]?(G(),W(`div`,CF,[d(e.$slots,`header-right`,{},void 0,!0)])):(G(),W(`div`,wF,[n.showCollapseButton?(G(),W(`button`,{key:0,class:L(zF),"aria-pressed":s.value,onClick:t[6]||=e=>s.value=!s.value,onMouseenter:t[7]||=e=>fe(e,s.value?R(r)(`common.expand`)||`Expand`:R(r)(`common.collapse`)||`Collapse`),onFocus:t[8]||=e=>fe(e,s.value?R(r)(`common.expand`)||`Expand`:R(r)(`common.collapse`)||`Collapse`),onMouseleave:pe,onBlur:pe},[(G(),W(`svg`,{style:k({rotate:s.value?`0deg`:`90deg`}),xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[...t[24]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m9 18l6-6l-6-6`},null,-1)]],4))],40,TF)):V(``,!0),n.showCopyButton?(G(),W(`button`,{key:1,class:L(zF),onClick:he,onMouseenter:t[9]||=e=>B(e),onFocus:t[10]||=e=>B(e),onMouseleave:pe,onBlur:pe},[o.value?(G(),W(`svg`,DF,[...t[26]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M20 6L9 17l-5-5`},null,-1)]])):(G(),W(`svg`,EF,[...t[25]||=[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),F(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})],-1)]]))],32)):V(``,!0),n.showExportButton?(G(),W(`button`,{key:2,class:L(`${zF} ${Me.value?`opacity-50 cursor-not-allowed`:``}`),disabled:Me.value,onClick:K,onMouseenter:t[11]||=e=>fe(e,R(r)(`common.export`)||`Export`),onFocus:t[12]||=e=>fe(e,R(r)(`common.export`)||`Export`),onMouseleave:pe,onBlur:pe},[...t[27]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`path`,{d:`M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),F(`path`,{d:`m7 10l5 5l5-5`})])],-1)]],42,OF)):V(``,!0),n.showFullscreenButton?(G(),W(`button`,{key:3,class:L(`${zF} ${Me.value?`opacity-50 cursor-not-allowed`:``}`),disabled:Me.value,onClick:ye,onMouseenter:t[13]||=e=>fe(e,_.value?R(r)(`common.minimize`)||`Minimize`:R(r)(`common.open`)||`Open`),onFocus:t[14]||=e=>fe(e,_.value?R(r)(`common.minimize`)||`Minimize`:R(r)(`common.open`)||`Open`),onMouseleave:pe,onBlur:pe},[_.value?(G(),W(`svg`,jF,[...t[29]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6`},null,-1)]])):(G(),W(`svg`,AF,[...t[28]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6`},null,-1)]]))],42,kF)):V(``,!0)]))])):V(``,!0),y(F(`div`,null,[m.value?(G(),W(`div`,MF,[F(`pre`,NF,H(N.value),1)])):(G(),W(`div`,PF,[n.showZoomControls?(G(),W(`div`,FF,[F(`div`,IF,[F(`button`,{class:`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,onClick:be,onMouseenter:t[15]||=e=>fe(e,R(r)(`common.zoomIn`)||`Zoom in`),onFocus:t[16]||=e=>fe(e,R(r)(`common.zoomIn`)||`Zoom in`),onMouseleave:pe,onBlur:pe},[...t[30]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`circle`,{cx:`11`,cy:`11`,r:`8`}),F(`path`,{d:`m21 21l-4.35-4.35M11 8v6m-3-3h6`})])],-1)]],32),F(`button`,{class:`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,onClick:xe,onMouseenter:t[17]||=e=>fe(e,R(r)(`common.zoomOut`)||`Zoom out`),onFocus:t[18]||=e=>fe(e,R(r)(`common.zoomOut`)||`Zoom out`),onMouseleave:pe,onBlur:pe},[...t[31]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`circle`,{cx:`11`,cy:`11`,r:`8`}),F(`path`,{d:`m21 21l-4.35-4.35M8 11h6`})])],-1)]],32),F(`button`,{class:`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,onClick:Se,onMouseenter:t[19]||=e=>fe(e,R(r)(`common.resetZoom`)||`Reset zoom`),onFocus:t[20]||=e=>fe(e,R(r)(`common.resetZoom`)||`Reset zoom`),onMouseleave:pe,onBlur:pe},H(Math.round(100*ie.value))+`% `,33)])])):V(``,!0),F(`div`,{class:`infographic-preview relative transition-all overflow-hidden block`,style:k({height:te.value}),onMousedown:Ce,onMousemove:q,onMouseup:we,onMouseleave:we,onTouchstartPassive:Ce,onTouchmovePassive:q,onTouchendPassive:we},[F(`div`,{class:L([`absolute inset-0 cursor-grab`,{"cursor-grabbing":se.value}]),style:k(Pe.value)},[F(`div`,{ref_key:`infographicContainer`,ref:u,class:`w-full text-center flex items-center justify-center min-h-full`},null,512)],6)],36)]))],512),[[ee,!s.value]]),(G(),O(z,{to:`body`},[F(`div`,{class:L([`markstream-vue`,{dark:n.isDark}])},[U(ce,{name:`infographic-dialog`,appear:``},{default:D(()=>[_.value?(G(),W(`div`,{key:0,class:`infographic-modal-overlay fixed inset-0 z-50 flex items-center justify-center p-4`,onClick:me(ve,[`self`])},[F(`div`,LF,[F(`div`,RF,[F(`button`,{class:`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,onClick:be},[...t[32]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`circle`,{cx:`11`,cy:`11`,r:`8`}),F(`path`,{d:`m21 21l-4.35-4.35M11 8v6m-3-3h6`})])],-1)]]),F(`button`,{class:`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,onClick:xe},[...t[33]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`circle`,{cx:`11`,cy:`11`,r:`8`}),F(`path`,{d:`m21 21l-4.35-4.35M8 11h6`})])],-1)]]),F(`button`,{class:`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,onClick:Se},H(Math.round(100*ie.value))+`% `,1),F(`button`,{class:`infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded`,onClick:ve},[...t[34]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M18 6L6 18M6 6l12 12`})],-1)]])]),F(`div`,{ref_key:`modalContent`,ref:v,class:L([`w-full h-full flex items-center justify-center p-4 overflow-hidden`,{"cursor-grab":!se.value,"cursor-grabbing":se.value}]),onMousedown:Ce,onMousemove:q,onMouseup:we,onMouseleave:we,onTouchstartPassive:Ce,onTouchmovePassive:q,onTouchendPassive:we},null,34)])])):V(``,!0)]),_:1})],2)]))],10,pF))}}),[[`__scopeId`,`data-v-3321af9c`]]);BF.install=e=>{e.component(BF.__name,BF)};var VF=n({default:()=>CI}),HF=Object.defineProperty,UF=Object.defineProperties,WF=Object.getOwnPropertyDescriptors,GF=Object.getOwnPropertySymbols,KF=Object.prototype.hasOwnProperty,qF=Object.prototype.propertyIsEnumerable,JF=(e,t,n)=>t in e?HF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,YF=(e,t)=>{for(var n in t||={})KF.call(t,n)&&JF(e,n,t[n]);if(GF)for(var n of GF(t))qF.call(t,n)&&JF(e,n,t[n]);return e},XF=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),ZF=[`data-markstream-mode`,`data-markstream-pending`],QF={key:0,class:`mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]`},$F={key:0},eI={key:1,class:`flex items-center gap-x-2 overflow-hidden`},tI=[`innerHTML`],nI={key:2},rI={key:3,class:`mermaid-mode-toggle-group flex items-center gap-0.5`},iI={class:`flex items-center gap-x-1`},aI={class:`flex items-center gap-x-1`},oI={key:4},sI={key:5,class:`mermaid-header-actions flex items-center`},cI=[`aria-pressed`],lI={key:0,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},uI={key:1,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},dI=[`aria-label`,`disabled`],fI=[`aria-label`,`disabled`],pI={key:0,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},mI={key:1,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},hI={key:0,class:`mermaid-source-panel`},gI={class:`mermaid-source-code text-sm font-mono whitespace-pre-wrap`},_I={key:1,class:`relative`},vI={key:0,class:`absolute top-2 right-2 z-10 rounded-lg`},yI={class:`flex items-center gap-2 backdrop-blur rounded-lg`},bI={class:`dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden`},xI={class:`absolute top-6 right-6 z-50 flex items-center gap-2`},SI=`mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded`,CI=eO(c({__name:`MermaidBlockNode`,props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},onRenderError:{}},emits:[`copy`,`export`,`openModal`,`toggleMode`],setup(e,{emit:t}){let n=e,r=t,a={USE_PROFILES:{svg:!0},FORBID_TAGS:[`script`],FORBID_ATTR:[/^on/i],ADD_TAGS:[`style`],ADD_ATTR:[`style`],SAFE_FOR_TEMPLATES:!0},o=M(!1),s=M(typeof window>`u`),c=I(()=>n.isStrict?`strict`:`loose`),_=I(()=>({startOnLoad:!1,securityLevel:c.value,dompurifyConfig:c.value===`strict`?a:void 0,flowchart:c.value===`strict`?{htmlLabels:!1}:void 0}));function v(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=``}}function b(e,t,n={}){if(!e)return null;let r=function(e,t){if(!e)return null;let n=MT(t);if(!n)return null;let r=function(e,t){let n=Array.from(e.childNodes),r=document.createElement(`div`);return r.dataset.mermaidSvgLayer=`1`,r.style.zIndex=`1`,r.appendChild(t),e.insertBefore(r,e.firstChild),n.length>0&&function(e){let t=()=>{var t;for(let n of e)(t=n.parentNode)==null||t.removeChild(n)};typeof requestAnimationFrame==`function`?requestAnimationFrame(()=>{requestAnimationFrame(t)}):setTimeout(t,32)}(n),r}(e,n);return{svg:n.outerHTML,bindTarget:r}}(e,t);return r||n.keepPreviousOnFailure||v(e),r}let x=null;function S(e){if(n.enableMermaidInteractions&&e?.querySelector(`svg`))try{x?.(e)}catch{}}let{t:C}=UO();function w(){return XF(this,null,function*(){try{let e=yield yD();return o.value=!!e,e}catch(e){throw o.value=!1,e}finally{s.value=!0}})}let T=M(!1),A=M(!1),j=M(),N=M(),P=M(),te=M(),ne=M(null),re=fA(),ie=M(null),ae=M(typeof window>`u`),oe=p(),se=i(mE,null),le=``,ue=0,de=0,fe=I(()=>WO(n,oe));function pe(){let e=fe.value;e&&(le&&le!==e&&(se?.markSettled(le),ue=0),le=e,ue+=1,de+=1,ue===1&&se?.markPending(e))}function B(){return XF(this,null,function*(){let e=le;if(!e||(ue=Math.max(0,ue-1),ue>0))return;le=``;let t=++de;yield g(),t===de&&(function(e=fe.value){e&&j.value&&se?.reportHeight(e,j.value.offsetHeight)}(e),se?.markSettled(e))})}function he(){let e=le;e&&(le=``,ue=0,de+=1,se?.markSettled(e))}let ge=M(),K=I(()=>n.node.code.replace(/\]::([^:])/g,`]:::$1`).replace(/:::subgraphNode$/gm,`::subgraphNode`));function _e(){return function(e){return bM(e,function(){return hM(N.value?getComputedStyle(N.value).getPropertyValue(`--ms-size-diagram-min-height`).trim():``)??360}(),Et())}(hM(n.estimatedPreviewHeightPx)??_M(K.value))}function ve(){return`${_e()}px`}let ye=M(null);function be(){return!!P.value?.querySelector(`svg`)}function xe(){return!1!==n.loading&&(be()||!!ye.value)}let Se=M(1),Ce=M(0),q=M(0),we=M(!1),Te=M({x:0,y:0}),Ee=M(!0),De=M(!1),J=M(!1),Oe=M(null),ke=M(0),Ae=M(!1),je=I(()=>Math.max(0,n.renderDebounceMs??300)),Me=I(()=>Math.max(0,n.contentStableDelayMs??500)),Ne=I(()=>Math.max(120,n.previewPollDelayMs??800)),Pe=I(()=>Math.max(Ne.value,n.previewPollMaxDelayMs??4e3)),Fe=I(()=>Math.max(1,Math.trunc(n.previewPollMaxAttempts??12))),Ie=I(()=>!1!==n.loading),Le=null,Re=null,ze=null,Be=0,Ve=globalThis.requestIdleCallback??((e,t)=>setTimeout(()=>e({didTimeout:!0}),16));function He(){return ae.value&&!A.value}function Ue(){ze!=null&&(globalThis.clearTimeout(ze),ze=null)}function We(){Ue(),ze=globalThis.setTimeout(()=>{ze=null,He()&&Ve(()=>{He()&&Jt()},{timeout:500})},je.value)}function Ge(){Re!=null&&(globalThis.clearTimeout(Re),Re=null)}function Ke(e=600){if(typeof globalThis>`u`)return;let t=Math.max(0,e);Ge(),Re=globalThis.setTimeout(()=>{Re=null,n.loading||J.value||!He()?Ke(Math.min(1200,Math.max(300,1.2*t))):We()},t)}let qe=M(ve()),Je=M(qe.value),Ye=null,Y=M(!1),Xe=M(!1),Ze=M({}),Qe=M(``),$e=M(0),et=null,tt=M(!1),X=I(()=>!(A.value||s.value&&(Ee.value||!J.value&&!Oe.value&&(Y.value||tt.value&&(P.value?.textContent)?.trim())))),nt=M({zoom:1,translateX:0,translateY:0,containerHeight:qe.value}),rt=I(()=>n.enableWheelZoom?{wheel:zt}:{}),it=I(()=>({worker:n.workerTimeoutMs??1400,parse:n.parseTimeoutMs??1800,render:n.renderTimeoutMs??2500,fullRender:n.fullRenderTimeoutMs??4e3})),at=globalThis.cancelIdleCallback??(e=>clearTimeout(e)),ot=null,st=null,ct=!1,lt=Ne.value,ut=null,dt=0,ft=!0,pt=0;function Z(e,t){let n=t?.timeoutMs,r=t?.signal;if(r?.aborted)return Promise.reject(new DOMException(`Aborted`,`AbortError`));let i=null,a=!1,o=null;return new Promise((t,s)=>{let c=()=>{i!=null&&clearTimeout(i),o&&r&&r.removeEventListener(`abort`,o)};n&&n>0&&(i=globalThis.setTimeout(()=>{a||(a=!0,c(),s(Error(`Operation timed out`)))},n)),r&&(o=()=>{a||(a=!0,c(),s(new DOMException(`Aborted`,`AbortError`)))},r.addEventListener(`abort`,o)),e().then(e=>{a||(a=!0,c(),t(e))}).catch(e=>{a||(a=!0,c(),s(e))})})}function Q(e){if(typeof document>`u`||!P.value)return;if(typeof n.onRenderError==`function`&&!0===n.onRenderError(e,K.value,P.value))return tt.value=!0,void Yt();let t=document.createElement(`div`);t.style.padding=`var(--ms-inset-panel-body)`,t.style.color=`hsl(var(--ms-destructive))`,t.textContent=`Failed to render diagram: `;let r=document.createElement(`span`);r.textContent=e instanceof Error?e.message:`Unknown error`,t.appendChild(r),v(P.value),P.value.appendChild(t),qe.value=(P.value?getComputedStyle(P.value).getPropertyValue(`--ms-size-diagram-min-height`).trim():``)||`360px`,Je.value=qe.value,tt.value=!0,Yt()}typeof window<`u`&&E(()=>N.value,e=>{var t;if((t=ie.value)==null||t.destroy(),ie.value=null,!e)return void(ae.value=!1);let n=re(e,{rootMargin:`400px`});ie.value=n,ae.value=n.isVisible.value,n.whenVisible.then(()=>{ae.value=!0})},{immediate:!0}),l(()=>{var e;(e=ie.value)==null||e.destroy(),ie.value=null,he(),Ue()});let mt=I(()=>!1!==n.showTooltips);function ht(e){return!e||e.disabled}function gt(e,t,r=`top`){if(!mt.value||ht(e.currentTarget))return;let i=e,a=i?.clientX!=null&&i?.clientY!=null?{x:i.clientX,y:i.clientY}:void 0;RO(e.currentTarget,t,r,!1,a,n.isDark)}function _t(){mt.value&&zO()}function vt(e){if(!mt.value||ht(e.currentTarget))return;let t=T.value?C(`common.copied`)||`Copied`:C(`common.copy`)||`Copy`,r=e,i=r?.clientX!=null&&r?.clientY!=null?{x:r.clientX,y:r.clientY}:void 0;RO(e.currentTarget,t,`top`,!1,i,n.isDark)}function yt(e,t){let n={theme:t===`dark`?`dark`:`default`};c.value===`strict`&&(n.flowchart={htmlLabels:!1});let r=`%%{init: ${JSON.stringify(n)}}%%\n`;return e.trimStart().startsWith(`%%{`)?e:r+e}function bt(){return ft&&!Ee.value&&!Y.value&&!tt.value}function xt(e){let t=e.trim();return!(!t||t.startsWith(`%%`))&&!/^(?:gantt|title|dateformat|axisformat|tickinterval|excludes|section|todaymarker|topaxis|weekday|weekend|acctitle|accdescr|accdescrmultiline)\b/i.test(t)&&t.includes(`:`)}function St(e){if(gM(e)===`gantt`)return function(e){let t=e.split(/\r?\n/);for(!/\r?\n$/.test(e)&&t.length>0&&t.pop();t.length>0;){let e=t[t.length-1]?.trim();if(e&&!e.startsWith(`%%`)){if(xt(e))break;t.pop()}else t.pop()}return t.some(xt)?t.join(`
|
|
153
|
+
`)&&!function(e){let t=IM(e);if(LM(t))return!1;let n=RM(t);return n.length>=2&&n.some(e=>e.trim())}(t))}(a.value,t)?g():function(){if(f+=1,o)return;let t=Math.max(0,function(e){let t=e.parseCoalesceMs;return typeof t==`number`&&Number.isFinite(t)&&t>=0?t:80}(e)-(MM()-m));t<=0?g():o=setTimeout(g,t)}())},{flush:`sync`,immediate:!0}),ie(h);let _=R(()=>{var n;return Y_(e.customHtmlTags,e.parseOptions?.customHtmlTags,(n=t.customComponentsMap?.value??{},Object.entries(n).map(([e,t])=>{let n=q_(e);return t==null||!n||qD(n)||E_.has(n)||k_.has(n)?``:n}).filter(Boolean)))}),v=R(()=>{let{key:e,tags:i}=X_(_.value);if(!e)return n;let a=r.get(e);if(a)return a;let o=RT(t.instanceMsgId,{customHtmlTags:i});return r.set(e,o),o}),y=R(()=>{let t=v.value;return e.customMarkdownIt?e.customMarkdownIt(t):t}),b=R(()=>{var n;let r=e.parseOptions??{},i=t.effectiveFinal.value,a=_.value,o=i!=null,s=a.length>0;return o||s||r.streamParse==null?$($(zD($({},r),{streamParse:(n=r.streamParse)==null||n}),o?{final:i}:{}),s?{customHtmlTags:a}:{}):r}),x=R(()=>new Set((b.value.customHtmlTags??[]).map(e=>String(e).trim().toLowerCase()).filter(Boolean))),S=R(()=>FM(b.value,y.value,e.customMarkdownIt,{includeFinal:!0})),C=R(()=>FM(b.value,y.value,e.customMarkdownIt,{includeFinal:!1}));return p([S,C],([e,t],[n,r])=>{n&&(e===n&&t===r||(g(),t!==r&&(s=[],u=``)))},{flush:`sync`}),{effectiveCustomHtmlTags:_,effectiveCustomHtmlTagsSet:x,mdBase:v,mdInstance:y,mergedParseOptions:b,parsedNodes:R(()=>{if(e.nodes?.length)return s=[],u=``,de(e.nodes.slice());let n=a.value;if(!n)return s=[],u=``,[];let r=t.debugPerformanceEnabled.value,i=r?MM():0,o=y.value,p=S.value,m=C.value;c&&p!==c&&function(e){var t,n;(n=(t=e.stream)?.reset)==null||n.call(t)}(o),l&&m!==l&&(s=[],u=``);let h=s.length>0&&n.startsWith(u)&&m===l,g=r?NM(o):null,_=r?{}:void 0,v=Pw(n,o,_?zD($({},b.value),{__timing:_}):b.value),x=r?MM():0,w=r?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0,T,E=r?ZM(v.length):void 0,D=0,O=0;if(h){let e=r?MM():0;if(w){let e=function(e,t,n){if(!t.length)return{nodes:e,metrics:ZM(e.length)};let r=function(e,t,n){let r=Math.min(e.length,t.length);for(let i=0;i<r;i++)if(!nN(t[i],e[i],n))return i;return e.length===t.length?-1:r}(e,t,n);if(r<0)return{nodes:t,metrics:{reusedNodeCount:e.length,dirtyStartIndex:r,stablePrefixNodeCount:e.length,dirtyTailNodeCount:0}};let i=e.slice(),a=r;for(let e=0;e<r;e++)i[e]=t[e];for(let o=r;o<e.length;o++){let r=t[o],s=e[o];r&&XM(r,s,n)&&(i[o]=r,a+=1)}return{nodes:i,metrics:{reusedNodeCount:a,dirtyStartIndex:r,stablePrefixNodeCount:r,dirtyTailNodeCount:QM(r,e,t)}}}(v,s,w);T=e.nodes,E=e.metrics}else{let e=function(e,t){if(!t.length)return{nodes:e,metrics:ZM(e.length)};let n=function(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(!tN(t[r],e[r]))return r;return e.length===t.length?-1:n}(e,t);if(n<0)return{nodes:t,metrics:{reusedNodeCount:e.length,dirtyStartIndex:n,stablePrefixNodeCount:e.length,dirtyTailNodeCount:0}};let r=e.slice(),i=n;for(let e=0;e<n;e++)r[e]=t[e];for(let a=n;a<e.length;a++){let n=t[a],o=e[a];n&&qM(n,o)&&(r[a]=n,i+=1)}return{nodes:r,metrics:{reusedNodeCount:i,dirtyStartIndex:n,stablePrefixNodeCount:n,dirtyTailNodeCount:QM(n,e,t)}}}(v,s);T=e.nodes,E=e.metrics}D=r?MM()-e:0,O=E?.dirtyStartIndex==null||E.dirtyStartIndex<0?T.length:E.dirtyStartIndex}else T=v;w?function(e,t,n=0){for(let r=Math.max(0,n);r<e.length;r++)JM(t,`primeSignatureMs`,()=>KM(e[r]))}(T,w,O):function(e,t=0){for(let n=Math.max(0,t);n<e.length;n++)KM(e[n])}(T,O);let k=r?MM()-x:0;if(d+=1,u=n,c=p,l=m,s=T,r){let e=NM(o),r=typeof e?.total==`number`&&e.total>(g?.total??0);t.logPerf(r?`parse(stream)`:`parse(sync)`,$($($({rendererId:t.instanceMsgId,ms:Math.round(MM()-i),nodes:T.length,contentLength:n.length,parseCommitCount:d,parseCoalescedCount:f,nodeReuseMs:k,signatureMs:w?.signatureMs??0,stabilizeSignatureMs:w?.stabilizeSignatureMs??0,primeSignatureMs:w?.primeSignatureMs??0,signatureCallCount:w?.signatureCallCount??0,stabilizeSignatureCallCount:w?.stabilizeSignatureCallCount??0,primeSignatureCallCount:w?.primeSignatureCallCount??0,stabilizeMs:D},E??{}),_?Object.fromEntries(EM.map(e=>[e,_[e]??0])):{}),e?{streamMode:e.lastMode,streamDelta:rN(e,g),streamStats:e}:{}))}return de(T)})}}function aN(e){let{isClient:t}=e,n=V(new Set),r=new Map,i=new Map,a=new Map;function o(e){if(!t)return;let n=a.get(e);n!=null&&(window.clearTimeout(n),a.delete(e))}function s(){if(t)for(let e of a.values())window.clearTimeout(e);a.clear()}function c(){n.value=new Set}return{visibleNodeIndices:n,nodeVisibilityHandles:r,nodeVisibilityWatchStops:i,nodeVisibilityFallbackTimers:a,clearVisibilityFallback:o,clearAllVisibilityFallbacks:s,markNodeVisible:function(t,r=!0){var i;r&&o(t),function(t,r){if((a=(i=e.shouldTrackVisibleNodeIndices)?.call(e))!=null&&!a)return;var i,a;let o=n.value,s=o.has(t);if(r){if(s)return;let e=new Set(o);e.add(t),n.value=e;return}if(!s)return;let c=new Set(o);c.delete(t),n.value=c}(t,r),r&&((i=e.onNodeMarkedVisible)==null||i.call(e,t))},resetNodeVisibleState:c,cleanupNodeVisibility:function(t){var s;if(e.shouldCleanupNodeVisibility&&!e.shouldCleanupNodeVisibility())return;for(let[e,n]of i.entries())e<t||(n(),i.delete(e));for(let[n,i]of r.entries())n<t||(i.destroy(),r.delete(n),o(n),(s=e.onNodeVisibilityCleaned)==null||s.call(e,n));for(let e of Array.from(a.keys()))e<t||o(e);if(!n.value.size)return;let c=new Set;for(let e of n.value)e<t&&c.add(e);n.value=c},destroyNodeVisibilityState:function(){c();for(let e of i.values())e();i.clear();for(let e of r.values())e.destroy();r.clear(),s()}}}function oN(e={}){let t=V(``),n=V(``),r=V(!1),i=cE(e),a=()=>{let e=i.getSnapshot();t.value=e.source,n.value=e.visible,r.value=e.done},o=i.subscribe(a);a();let s=R(()=>Math.max(0,t.value.length-n.value.length)),c=R(()=>s.value===0),l=R(()=>r.value&&c.value);return ee()&&ie(()=>{o(),i.destroy()}),{source:t,visible:n,done:r,final:l,caughtUp:c,pendingChars:s,enqueue:e=>i.enqueue(e),finish:e=>i.finish(e),flush:()=>i.flush(),reset:e=>i.reset(e),pause:()=>i.pause(),resume:()=>i.resume()}}var sN=/auto|scroll|overlay/i;function cN(e){if(!e)return!1;let t=(e.overflowY||``).toLowerCase(),n=(e.overflow||``).toLowerCase();return sN.test(t)||sN.test(n)}function lN(e){let t=Math.ceil(e.scrollHeight)>Math.ceil(e.clientHeight)+1,n=Math.ceil(e.scrollWidth)>Math.ceil(e.clientWidth)+1;return t||n}var uN=x({name:`InfographicBlockNodeLoading`,props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){let t=R(()=>xM(hM(e.estimatedPreviewHeightPx)??vM(String(e.node.code??``))));return()=>s(`div`,{class:`infographic-block-container rounded-lg border overflow-hidden`,style:{margin:`var(--ms-flow-diagram-y) 0`,background:`var(--diagram-bg)`,borderColor:`var(--diagram-border)`,color:`hsl(var(--ms-foreground))`},"data-markstream-infographic":`1`,"data-markstream-mode":`pending`},[e.showHeader?s(`div`,{class:`infographic-block-header flex justify-between items-center border-b`,style:{padding:`var(--ms-inset-panel-y) var(--ms-inset-panel-x)`,background:`var(--diagram-header-bg)`,borderColor:`var(--diagram-border)`,minHeight:`calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding) + var(--ms-inset-panel-y) + var(--ms-inset-panel-y) + 1px)`}},[s(`div`,{class:`flex items-center gap-x-2 overflow-hidden`},[s(`span`,{class:`icon-slot action-icon shrink-0`,style:{display:`inline-flex`,width:`var(--ms-action-btn-icon)`,height:`var(--ms-action-btn-icon)`}}),s(`span`,{class:`infographic-label font-medium font-mono truncate`,style:{fontSize:`var(--ms-text-label)`,color:`hsl(var(--ms-muted-foreground))`}},`Infographic`)]),s(`div`,{class:`infographic-header-actions flex items-center opacity-0 pointer-events-none`,style:{gap:`var(--ms-gap-header-actions)`},"aria-hidden":`true`},Array.from({length:4},()=>s(`span`,{class:`infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded`,style:{width:`calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))`,height:`calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))`}})))]):null,s(`div`,{class:`infographic-preview relative overflow-hidden block`,style:{height:`${t.value}px`,minHeight:`var(--ms-size-diagram-min-height)`,background:`var(--diagram-bg)`}},[s(`div`,{class:`absolute inset-0`},[s(`div`,{class:`w-full text-center flex items-center justify-center min-h-full`})])])])}}),dN=x({name:`MermaidBlockNodeLoading`,props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){let t=R(()=>bM(hM(e.estimatedPreviewHeightPx)??_M(String(e.node.code??``))));return()=>s(`div`,{class:`mermaid-block-container rounded-lg border overflow-hidden`,style:{margin:`var(--ms-flow-diagram-y) 0`,borderColor:`var(--diagram-border)`},"data-markstream-mermaid":`1`,"data-markstream-mode":`pending`},[e.showHeader?s(`div`,{class:`mermaid-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]`,style:{background:`var(--diagram-header-bg)`,borderColor:`var(--diagram-border)`}},[s(`div`,{class:`flex items-center gap-x-2 overflow-hidden`},[s(`span`,{class:`mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate`,style:{color:`var(--code-action-fg)`}},`Mermaid`)]),s(`div`,{class:`mermaid-header-actions flex items-center gap-[var(--ms-gap-header-actions)] opacity-0 pointer-events-none`,"aria-hidden":`true`},Array.from({length:4},()=>s(`span`,{class:`mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded`},[s(`span`,{class:`action-icon block`})])))]):null,s(`div`,{class:`mermaid-preview-area relative overflow-hidden block`,style:{height:`${t.value}px`,minHeight:`var(--ms-size-diagram-min-height)`,background:`var(--diagram-bg)`}},[s(`div`,{class:`_mermaid w-full text-center flex items-center justify-center min-h-full`,style:{fontFamily:`inherit`,contentVisibility:`auto`,contain:`content`,containIntrinsicSize:`var(--ms-size-diagram-min-height) 240px`}})])])}}),fN=[`data-custom-id`],pN={class:`m-0 p-0`},mN=[`data-probe`],hN=[`data-node-index`,`data-node-type`],gN=eO(x(zD($({},{name:`NodeRenderer`}),{__name:`NodeRenderer`,props:{content:{},nodes:{},final:{type:Boolean},parseOptions:{},customMarkdownIt:{},debugPerformance:{type:Boolean,default:!1},customHtmlTags:{},mode:{},htmlPolicy:{},viewportPriority:{type:Boolean},codeBlockStream:{type:Boolean,default:!0},codeBlockDarkTheme:{},codeBlockLightTheme:{},codeBlockMonacoOptions:{},codeRenderer:{},renderCodeBlocksAsPre:{type:Boolean,default:void 0},codeBlockMinWidth:{},codeBlockMaxWidth:{},codeBlockProps:{},mermaidProps:{},d2Props:{},infographicProps:{},showTooltips:{type:Boolean,default:void 0},themes:{},langs:{},isDark:{type:Boolean},customId:{},indexKey:{},typewriter:{type:Boolean,default:!1},smoothStreaming:{type:[Boolean,String],default:`auto`},smoothStreamingOptions:{},parseCoalesceMs:{},fade:{type:Boolean,default:void 0},batchRendering:{type:Boolean,default:void 0},initialRenderBatchSize:{},renderBatchSize:{},renderBatchDelay:{},renderBatchBudgetMs:{},renderBatchIdleTimeoutMs:{},deferNodesUntilVisible:{type:Boolean,default:void 0},maxLiveNodes:{},liveNodeBuffer:{},nodeVirtual:{type:[Boolean,String],default:void 0},virtualScroll:{},renderAsFragment:{type:Boolean}},emits:[`copy`,`handleArtifactClick`,`click`,`mouseover`,`mouseout`,`virtual-state-change`,`height-change`,`render-settled`,`render-final`,`anchor-change`],setup(e,{expose:t,emit:n}){let r=e,i=n,s=c(),f=I(`markstreamNestedRendererProps`,void 0);function m(e){let t=r[e];return function(e){let t=s?.vnode.props;return!!t&&(Object.prototype.hasOwnProperty.call(t,e)||Object.prototype.hasOwnProperty.call(t,String(e).replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)))}(e)?t:f?.value?.[e]??t}let g=mM(),_={docs:{showTooltips:!0,fade:!0,batchRendering:!0,initialRenderBatchSize:40,renderBatchSize:80,renderBatchDelay:16,renderBatchBudgetMs:6,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:320,liveNodeBuffer:60,nodeVirtual:`auto`},chat:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:16,renderBatchSize:16,renderBatchDelay:8,renderBatchBudgetMs:4,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:`auto`},minimal:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:16,renderBatchSize:16,renderBatchDelay:8,renderBatchBudgetMs:4,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:`auto`}},b=R(()=>{return(e=m(`mode`))===`chat`||e===`minimal`||e===`docs`?e:`docs`;var e}),x=R(()=>{let e=m(`renderCodeBlocksAsPre`),t=m(`codeRenderer`);return!0===e?`pre`:t===`pre`||t===`shiki`||t===`monaco`?t:!1===e||b.value===`docs`?`monaco`:`pre`}),C=R(()=>_[b.value]),w=R(()=>m(`showTooltips`)??C.value.showTooltips),E=R(()=>m(`fade`)??C.value.fade),O=R(()=>m(`batchRendering`)??C.value.batchRendering),A=R(()=>m(`initialRenderBatchSize`)??C.value.initialRenderBatchSize),j=R(()=>m(`renderBatchSize`)??C.value.renderBatchSize),M=R(()=>m(`renderBatchDelay`)??C.value.renderBatchDelay),N=R(()=>m(`renderBatchBudgetMs`)??C.value.renderBatchBudgetMs),ee=R(()=>m(`renderBatchIdleTimeoutMs`)??C.value.renderBatchIdleTimeoutMs),te=R(()=>m(`deferNodesUntilVisible`)??C.value.deferNodesUntilVisible),re=R(()=>m(`maxLiveNodes`)??C.value.maxLiveNodes),ie=R(()=>m(`liveNodeBuffer`)??C.value.liveNodeBuffer),oe=R(()=>m(`nodeVirtual`)??C.value.nodeVirtual),L={get content(){return r.content},get nodes(){return r.nodes},get final(){return r.final},get parseOptions(){return m(`parseOptions`)},get customMarkdownIt(){return m(`customMarkdownIt`)},get debugPerformance(){return r.debugPerformance},get customHtmlTags(){return m(`customHtmlTags`)},get mode(){return m(`mode`)},get htmlPolicy(){return m(`htmlPolicy`)},get viewportPriority(){return m(`viewportPriority`)},get codeBlockStream(){return m(`codeBlockStream`)},get codeBlockDarkTheme(){return m(`codeBlockDarkTheme`)},get codeBlockLightTheme(){return m(`codeBlockLightTheme`)},get codeBlockMonacoOptions(){return m(`codeBlockMonacoOptions`)},get codeRenderer(){return m(`codeRenderer`)},get renderCodeBlocksAsPre(){return m(`renderCodeBlocksAsPre`)},get codeBlockMinWidth(){return m(`codeBlockMinWidth`)},get codeBlockMaxWidth(){return m(`codeBlockMaxWidth`)},get codeBlockProps(){return m(`codeBlockProps`)},get mermaidProps(){return m(`mermaidProps`)},get d2Props(){return m(`d2Props`)},get infographicProps(){return m(`infographicProps`)},get showTooltips(){return w.value},get themes(){return m(`themes`)},get langs(){return m(`langs`)},get isDark(){return m(`isDark`)},get customId(){return m(`customId`)},get indexKey(){return r.indexKey},get typewriter(){return m(`typewriter`)},get smoothStreaming(){return r.smoothStreaming},get smoothStreamingOptions(){return m(`smoothStreamingOptions`)},get parseCoalesceMs(){return m(`parseCoalesceMs`)},get fade(){return E.value},get batchRendering(){return O.value},get initialRenderBatchSize(){return A.value},get renderBatchSize(){return j.value},get renderBatchDelay(){return M.value},get renderBatchBudgetMs(){return N.value},get renderBatchIdleTimeoutMs(){return ee.value},get deferNodesUntilVisible(){return te.value},get maxLiveNodes(){return re.value},get liveNodeBuffer(){return ie.value},get nodeVirtual(){return oe.value},get virtualScroll(){return r.virtualScroll},get renderAsFragment(){return r.renderAsFragment}};function se(e){i(`height-change`,e)}function ce(e){i(`virtual-state-change`,e)}function le(e){i(`anchor-change`,e)}let ue=V(),fe=V(null),me=V(null),he=V(null),_e=k({1:null,2:null,3:null,4:null,5:null,6:null}),ye=V(!1),be=new Map,xe=V(0),Se=V(0),Ce=V({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function we(){if(!0!==r.virtualScroll?.enabled)return null;let e=r.virtualScroll?.scrollRoot;return Te(typeof e==`function`?e():e)}function Te(e){return e?typeof HTMLElement<`u`&&e instanceof HTMLElement?e:typeof e==`object`&&`value`in e?Te(e.value):typeof e==`object`&&`$el`in e?Te(e.$el):null:null}let{isClient:G,renderAsFragment:Ee,debugPerformanceEnabled:De,resolvedShowTooltips:K,resolvedHtmlPolicy:Oe,inheritedSmoothStreaming:q,ownsTypewriterCursor:ke}=function(e){let t=typeof window<`u`,n=u(),r=I(`markstreamHtmlPolicy`,void 0),i=I(`markstreamTypewriterCursor`,void 0),a=I(`markstreamSmoothStreaming`,void 0);return{isClient:t,renderAsFragment:R(()=>!0===e.renderAsFragment),debugPerformanceEnabled:R(()=>!!(e.debugPerformance&&t&&typeof console<`u`)),resolvedShowTooltips:R(()=>{if(typeof e.showTooltips==`boolean`)return e.showTooltips;let t=n.showTooltips??n[`show-tooltips`];return t===``||!0===t||t===`true`||!1!==t&&t!==`false`&&void 0}),resolvedHtmlPolicy:R(()=>e.htmlPolicy??r?.value??`safe`),inheritedSmoothStreaming:a,inheritedTypewriterCursor:i,ownsTypewriterCursor:R(()=>!0!==i?.value)}}(L),{resolveViewportRoot:Ae,resolveScrollContainer:je,isReverseFlexScrollRoot:Me,getNormalizedScrollTop:Ne,getOffsetTopWithinRoot:Pe}=function(e,t){function n(){return t.scrollRoot?.call(t)??null}function r(t){if(typeof window>`u`)return null;let r=n();if(r)return r;let i=t??e.value;if(!i)return null;let a=i.ownerDocument||document,o=a.scrollingElement||a.documentElement,s=i;for(;s&&s!==a.body&&s!==o;){if(cN(window.getComputedStyle(s))&&lN(s))return s;s=s.parentElement}return null}function i(e){if(!t.isClient)return!1;try{let t=window.getComputedStyle(e);return!!(t.display||``).toLowerCase().includes(`flex`)&&(t.flexDirection||``).toLowerCase().endsWith(`reverse`)}catch{return!1}}function a(e,t,n){if(n)return o(t);let r=e.scrollTop;if(!i(e))return r;let a=r<0?-r:r;return Math.max(0,(e.scrollHeight??0)-(e.clientHeight??0))-a}function o(e){let t=Number(e.scrollingElement?.scrollTop),n=Number(e.documentElement?.scrollTop??0),r=Number(e.body?.scrollTop??0);return Math.max(0,Number.isFinite(t)?t:0,Number.isFinite(n)?n:0,Number.isFinite(r)?r:0)}return{resolveViewportRoot:r,resolveScrollContainer:function(t){let i=n();if(i)return i;let a=r(t??e.value??null);if(a)return a;let o=t?.ownerDocument??e.value?.ownerDocument??(typeof document<`u`?document:null);return o?.scrollingElement||o?.documentElement||null},isReverseFlexScrollRoot:i,getNormalizedScrollTop:a,getOffsetTopWithinRoot:function(e,t){let n=t.ownerDocument||e.ownerDocument||document;if(function(e,t){return e===t.documentElement||e===t.body||e===t.scrollingElement}(t,n))return e.getBoundingClientRect().top+o(n);let r=t.getBoundingClientRect(),i=e.getBoundingClientRect(),s=a(t,n,!1);return i.top-r.top+s}}}(ue,{isClient:G,scrollRoot:we});ve(`markstreamShowTooltips`,K),ve(`markstreamHtmlPolicy`,Oe),ve(`markstreamTypewriter`,R(()=>!1!==L.typewriter)),ve(`markstreamFade`,R(()=>!1!==L.fade)),ve(`markstreamTypewriterCursor`,R(()=>!0)),ve(`markstreamTextStreamState`,be),ve(`markstreamStreamVersion`,xe),ve(`markstreamParseOptions`,R(()=>L.parseOptions)),ve(`markstreamCustomMarkdownIt`,R(()=>L.customMarkdownIt));let{smoothStreamingEnabled:Fe,renderContent:Ie,effectiveFinal:Le}=function(e,t){let n=oN(e.smoothStreamingOptions),r=R(()=>!1!==e.smoothStreaming&&!e.nodes?.length&&(!0===e.smoothStreaming||!t.inheritedSmoothStreaming?.value)&&(!0===e.smoothStreaming||!0===e.typewriter||(e.maxLiveNodes??0)<=0)),i=V(!t.isClient||!0===e.smoothStreaming);l(()=>{i.value=!0});let a=R(()=>i.value&&r.value),o=R(()=>a.value?n.visible.value:e.content??``),s=R(()=>{let t=e.parseOptions??{};return e.final??t.final}),c=R(()=>{let e=s.value;return a.value&&e!=null?!!e&&n.caughtUp.value:e});return p([()=>e.content,()=>e.nodes,a,s],([e,t,r,i])=>{if(t?.length)return void n.reset(``);let a=e??``;if(!r)return n.reset(a),void(i&&n.finish({flush:!0}));let o=n.source.value;a?a===o||(a.startsWith(o)?n.enqueue(a.slice(o.length)):n.reset(a)):n.reset(``),i&&n.finish()},{immediate:!0}),{smoothStream:n,smoothStreamingEligible:r,smoothStreamingEnabled:a,renderContent:o,requestedFinal:s,effectiveFinal:c}}(L,{isClient:G,inheritedSmoothStreaming:q});ve(`markstreamSmoothStreaming`,Fe);let Re=V(!1),ze=``,Be=!1,Ve=null;function He(){G&&Ve!=null&&(window.clearTimeout(Ve),Ve=null)}function Ue(){Re.value=!1,He()}function We(e,t){if(!De.value)return;let n=function(){if(!De.value)return null;let e=Ye(Ge),t=Ye(Ke),n=Math.max(Je,t);if(e<=0&&n<=0)return null;let r={total:e,maxPerFrame:n,byLabel:(i=Ge,Object.fromEntries(Array.from(i.entries()).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0]))))};var i;return Ge.clear(),Ke.clear(),Je=0,r}();console.info(`[markstream-vue][perf] ${e}`,n?zD($({},t),{layoutReads:n}):t)}p([Ie,()=>r.nodes,Le],([e,t,n])=>{let i=e??``;t?.length||!0===n?(Ue(),ze=i,Be=!0):Be?(ze&&i.length>ze.length&&i.startsWith(ze)?(Re.value=!0,G&&(He(),Ve=window.setTimeout(()=>{var e;Ve=null,!0===Le.value||(e=r.nodes)!=null&&e.length||(wa(),Re.value=!1,Ea())},1200))):(i.length<ze.length||!i.startsWith(ze))&&Ue(),ze=i):(ze=i,Be=!0)},{flush:`sync`,immediate:!0});let Ge=new Map,Ke=new Map,qe=!1,Je=0;function Ye(e){let t=0;for(let n of e.values())t+=n;return t}function Xe(){Je=Math.max(Je,Ye(Ke)),Ke.clear(),qe=!1}function J(e,t){return function(e){De.value&&(Ge.set(e,(Ge.get(e)??0)+1),Ke.set(e,(Ke.get(e)??0)+1),qe||(qe=!0,G&&typeof window<`u`&&typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(Xe):typeof queueMicrotask==`function`?queueMicrotask(Xe):setTimeout(Xe,0)))}(e),t()}let Ze=L.customId?`renderer-${L.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,Qe=function(e){let t=new Map;return{scope:e,cache:t,clear:()=>t.clear()}}(Ze),$e=R(()=>`${Ze}:${xe.value}`);ve(CM,Qe);let et=XD(()=>L.customId),{effectiveCustomHtmlTagsSet:tt,mergedParseOptions:nt,parsedNodes:Y}=iN(L,{instanceMsgId:Ze,renderContent:Ie,effectiveFinal:Le,smoothStreamingEnabled:Fe,debugPerformanceEnabled:De,customComponentsMap:et,logPerf:We});p(Y,()=>{Qe.clear(),xe.value+=1},{immediate:!0});let rt=R(()=>({customId:L.customId,customHtmlTags:nt.value.customHtmlTags,parseOptions:L.parseOptions,customMarkdownIt:L.customMarkdownIt,htmlPolicy:Oe.value,viewportPriority:L.viewportPriority,mode:b.value,codeRenderer:x.value,codeBlockStream:L.codeBlockStream,codeBlockDarkTheme:L.codeBlockDarkTheme,codeBlockLightTheme:L.codeBlockLightTheme,codeBlockMonacoOptions:L.codeBlockMonacoOptions,renderCodeBlocksAsPre:L.renderCodeBlocksAsPre,codeBlockMinWidth:L.codeBlockMinWidth,codeBlockMaxWidth:L.codeBlockMaxWidth,codeBlockProps:L.codeBlockProps,mermaidProps:L.mermaidProps,d2Props:L.d2Props,infographicProps:L.infographicProps,showTooltips:K.value,themes:L.themes,langs:L.langs,isDark:L.isDark,typewriter:L.typewriter,smoothStreamingOptions:L.smoothStreamingOptions,parseCoalesceMs:L.parseCoalesceMs,fade:L.fade}));ve(`markstreamNestedRendererProps`,rt);let it=R(()=>Y.value),at=R(()=>Y.value.length),ot=V(null),st=V(null),ct=V(null),lt=V(null),ut=r.indexKey!=null&&String(r.indexKey).startsWith(`list-item-`),dt=!ut&&L.customId?tM(L.customId):null,ft=R(()=>dt?(eM.value,tM(L.customId)):null),pt=R(()=>!!(G&&!Ee.value&&L.customId&&!ut&&ft.value?.enabled)),mt=R(()=>!!(!Ee.value&&r.virtualScroll?.enabled)),X=V(!1);l(()=>{X.value=!0});let Z=R(()=>!!(G&&mt.value));ve(`markstreamHostScrollManaged`,Z);let ht=R(()=>!!(X.value&&Z.value)),gt=R(()=>pt.value||Z.value),_t=R(()=>pt.value||ht.value),vt=R(()=>gt.value&&!1!==ft.value?.textEstimation),Q=R(()=>gt.value&&!1!==ft.value?.codeBlockEstimation);function yt(){let e=Se.value||J(`getMeasuredContainerWidth.clientWidth`,()=>ue.value?.clientWidth||0);return Number.isFinite(e)&&e>0?e:0}let bt=R(()=>{let e=yt();return e>0?Math.max(1,Math.round(e)):640}),xt=R(()=>Math.max(1,L.maxLiveNodes??320)),St=R(()=>!Ee.value&&!1!==L.nodeVirtual&&!((L.maxLiveNodes??0)<=0)&&(!0===L.nodeVirtual?Y.value.length>0:Y.value.length>xt.value)),Ct=R(()=>St.value||pt.value||Z.value),wt=R(()=>!1!==L.viewportPriority&&!ye.value),Tt=dA(e=>Ae(e??ue.value??null),wt),{requestFrame:Et,cancelFrame:Dt,hasIdleCallback:Ot,isTestEnv:kt}=function(e){return{requestFrame:e.isClient&&typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame.bind(window):null,cancelFrame:e.isClient&&typeof window.cancelAnimationFrame==`function`?window.cancelAnimationFrame.bind(window):null,hasIdleCallback:e.isClient&&typeof window.requestIdleCallback==`function`,isTestEnv:function(){return typeof globalThis>`u`||!(`process`in globalThis)?void 0:Object.getOwnPropertyDescriptor(globalThis,`process`)?.value?.env}()?.NODE_ENV===`test`}}({isClient:G}),{resolvedBatchSize:At,resolvedInitialBatch:jt,batchingEnabled:Mt,incrementalRenderingActive:Nt,renderedCount:Pt,previousRenderContext:Ft,adaptiveBatchSize:It,previousBatchConfig:Lt}=function(e,t){let n=R(()=>{let t=Math.trunc(e.renderBatchSize??80);return Number.isFinite(t)?Math.max(0,t):0}),r=R(()=>{let t=Math.trunc(e.initialRenderBatchSize??n.value);return Number.isFinite(t)?Math.max(0,t):n.value}),i=R(()=>!t.renderAsFragment.value&&!1!==e.batchRendering&&n.value>0&&t.isClient&&!t.isTestEnv),a=V(0),o=V({key:e.indexKey,total:0}),s=V(Math.max(1,n.value||1)),c=R(()=>i.value&&(e.maxLiveNodes??0)<=0);return{resolvedBatchSize:n,resolvedInitialBatch:r,batchingEnabled:i,incrementalRenderingActive:c,renderedCount:a,previousRenderContext:o,adaptiveBatchSize:s,previousBatchConfig:V({batchSize:n.value,initial:r.value,delay:e.renderBatchDelay??16,enabled:c.value})}}(L,{isClient:G,isTestEnv:kt,renderAsFragment:Ee}),Rt=new Map,zt=new Map,Bt=new WeakMap,Vt=null,Ht=new WeakMap,Ut=new Map,Wt=V(0),Gt=R(()=>(Wt.value,Array.from(Rt.entries()).sort((e,t)=>e[0]-t[0]))),Kt=V(null),qt=V(null),Jt=null,Yt=0,Xt=null,{activeRestoreAnchor:Zt,getRelativeScrollTopWithinContainer:Qt,setRelativeScrollTopWithinContainer:$t,resolveAnchorOffset:en,clearRestoreReconcile:tn,scheduleRestoreReconcile:nn,captureRestoreAnchor:rn,restoreAnchor:an,getAnchorDrift:on}=function(e){let{isClient:t,containerRef:n,parsedNodeCount:r,requestFrame:i,cancelFrame:a,resolveScrollContainer:o,getNormalizedScrollTop:s,getOffsetTopWithinRoot:c,isReverseFlexScrollRoot:l,estimateIndexForOffset:u,estimateHeightRange:d,getFallbackNodeHeight:f,clamp:p}=e,m=V(null),h=null,g=[];function _(){let e=o(),t=n.value;if(!e||!t)return null;let r=e.ownerDocument||t.ownerDocument||document;if(e===r.documentElement||e===r.body||e===r.scrollingElement){let e=t.getBoundingClientRect();return Math.max(0,-e.top)}return Math.max(0,s(e,r,!1)-c(t,e))}function v(e){var t;let r=o(),i=n.value;if(!r||!i)return;let a=Math.max(0,e),u=r.ownerDocument||i.ownerDocument||document,d=u.defaultView||(typeof window<`u`?window:null);if(r===u.documentElement||r===u.body||r===u.scrollingElement){let e=s(r,u,!0)+i.getBoundingClientRect().top;(t=d?.scrollTo)==null||t.call(d,0,Math.max(0,e+a));return}SM(r,u,c(i,r)+a,{isReverseFlexScrollRoot:e=>{var t;return(t=l?.(e))!=null&&t},getNormalizedScrollTop:s})}function y(e){let t=r.value;return d(0,p(e.nodeIndex,0,Math.max(0,t-1)))+Math.max(0,e.offsetWithinNodePx)}function b(){if(h!=null&&(a?.(h),h=null),t)for(let e of g)window.clearTimeout(e);g=[]}function x(e){let t=y(e),n=_();n!=null&&Math.abs(n-t)<=.5||v(t)}return{activeRestoreAnchor:m,getRelativeScrollTopWithinContainer:_,setRelativeScrollTopWithinContainer:v,resolveAnchorOffset:y,clearRestoreReconcile:b,applyRestoreAnchor:x,scheduleRestoreReconcile:function(){m.value&&t&&h==null&&(h=i?i(()=>{h=null,m.value&&x(m.value)}):null,h==null&&m.value&&x(m.value))},captureRestoreAnchor:function(){let e=_(),t=r.value;if(e==null||t<=0)return null;let n=p(u(e+1),0,t-1),i=d(0,n),a=f(n);return{nodeIndex:n,offsetWithinNodePx:p(e-i,0,Math.max(0,a-1))}},restoreAnchor:function(e){let n=r.value;if(m.value={nodeIndex:p(e.nodeIndex,0,Math.max(0,n-1)),offsetWithinNodePx:Math.max(0,e.offsetWithinNodePx)},b(),x(m.value),t)for(let e of[0,120,280,480])g.push(window.setTimeout(()=>{m.value&&x(m.value)},e))},getAnchorDrift:function(e){let t=_();return t==null?null:t-y(e)}}}({isClient:G,containerRef:ue,parsedNodeCount:at,requestFrame:Et,cancelFrame:Dt,resolveScrollContainer:()=>Kt.value||je(),getNormalizedScrollTop:Ne,getOffsetTopWithinRoot:Pe,isReverseFlexScrollRoot:Me,estimateIndexForOffset:va,estimateHeightRange:Ar,getFallbackNodeHeight:Tr,clamp:hr}),{nodeHeights:sn,heightStats:cn,heightTreeSize:ln,heightSumTree:un,heightKnownTree:dn,averageNodeHeight:fn,resetHeightMeasurements:pn,pruneHeightMeasurements:mn,rebuildHeightTrees:hn,recordNodeHeight:gn,removeNodeHeights:_n,exportHeightCache:vn,importHeightCache:yn,fenwickRangeSum:bn}=function(e={}){let t=k({}),n=k({total:0,count:0}),r=V(0),i=V([]),a=V([]);function o(){for(let e of Object.keys(t))delete t[Number(e)];n.total=0,n.count=0,r.value=0,i.value=[],a.value=[]}function s(e,t,n){for(let r=t+1;r<e.length;r+=r&-r)e[r]+=n}function c(e,t){let n=0;for(let r=t+1;r>0;r-=r&-r)n+=e[r];return n}function l(e){r.value=e;let n=Array(e+1).fill(0),o=Array(e+1).fill(0);for(let[r,i]of Object.entries(t)){let t=Number(r),a=Number(i);!Number.isFinite(t)||t<0||t>=e||!Number.isFinite(a)||a<=0||(s(n,t,a),s(o,t,1))}i.value=n,a.value=o}function u(e){if(!Number.isInteger(e)||e<0)return!1;let o=t[e];if(!Number.isFinite(o)||o<=0)return!1;if(delete t[e],n.total=Math.max(0,n.total-o),n.count=Math.max(0,n.count-1),r.value>e){let t=i.value,n=a.value;t.length&&n.length&&(s(t,e,-o),s(n,e,-1))}return!0}return{nodeHeights:t,heightStats:n,heightTreeSize:r,heightSumTree:i,heightKnownTree:a,averageNodeHeight:R(()=>n.count>0?Math.max(12,n.total/n.count):32),resetHeightMeasurements:o,pruneHeightMeasurements:function(e){if(e<=0)return void o();let r=0,i=0;for(let[n,a]of Object.entries(t)){let o=Number(n),s=Number(a);!Number.isFinite(o)||o<0||o>=e||!Number.isFinite(s)||s<=0?delete t[o]:(r+=s,i++)}n.total=r,n.count=i},rebuildHeightTrees:l,recordNodeHeight:function(o,c,l={}){(function(o,c,l={}){var u;if(!Number.isFinite(c)||c<=0)return!1;let d=t[o];if(d&&(!1===l.allowShrink&&c<d||Math.abs(c-d)<=1))return!1;if(t[o]=c,d?n.total+=c-d:(n.total+=c,n.count++),r.value>o){let e=i.value,t=a.value;if(e.length&&t.length)if(d){let t=c-d;t!==0&&s(e,o,t)}else s(e,o,c),s(t,o,1)}!1!==l.notify&&((u=e.onHeightRecorded)==null||u.call(e))})(o,c,zD($({},l),{notify:!0}))},removeNodeHeight:function(t,n={}){var r;let i=u(t);return i&&!1!==n.notify&&((r=e.onHeightRecorded)==null||r.call(e)),i},removeNodeHeights:function(t,n={}){var r;let i=0;for(let e of t)u(Number(e))&&i++;return i>0&&!1!==n.notify&&((r=e.onHeightRecorded)==null||r.call(e)),i},exportHeightCache:function(){return Object.entries(t).map(([e,t])=>({index:Number(e),height:Number(t)})).filter(e=>Number.isFinite(e.index)&&e.index>=0&&Number.isFinite(e.height)&&e.height>0).sort((e,t)=>e.index-t.index)},importHeightCache:function(i,a={}){var o;if(!Array.isArray(i))return;let s=r.value,c=!1;if(a.mode!==`merge`){let e=Object.keys(t);if(e.length>0){for(let n of e)delete t[Number(n)];c=!0}}for(let e of i){let n=Number(e.index),r=Number(e.height);if(!Number.isInteger(n)||n<0||s>0&&n>=s||!Number.isFinite(r)||r<=0)continue;let i=t[n];i&&Math.abs(i-r)<=1||(t[n]=r,c=!0)}c&&(function(){let e=0,i=0,a=r.value;for(let[n,r]of Object.entries(t)){let o=Number(n),s=Number(r);!Number.isFinite(o)||o<0||a>0&&o>=a||!Number.isFinite(s)||s<=0?delete t[o]:(e+=s,i++)}n.total=e,n.count=i}(),s>0&&l(s),(o=e.onHeightRecorded)==null||o.call(e))},fenwickRangeSum:function(e,t,n){if(n<=t)return 0;let r=c(e,n-1);return t<=0?r:r-c(e,t-1)}}}({onHeightRecorded:()=>{Xn(),Z.value&&Na(),Zt.value&&nn(),qt.value&&ki(),_a(`node-resize`)}});function xn(){pn(),Ut.clear()}function Sn(e){!Number.isInteger(e)||e<0||e>=Y.value.length||Ut.set(e,Si(e))}function Cn(e,t,n={}){let r=sn[e];gn(e,t,n);let i=sn[e];i&&i>0?Sn(e):r&&Ut.delete(e)}function wn(e,t){let n=J(`getNodeLayoutHeight.slot.offsetHeight`,()=>Rt.get(e)?.offsetHeight??0);return n>0?n:J(`getNodeLayoutHeight.content.offsetHeight`,()=>t.offsetHeight)}function Tn(e,t={}){yn(e,t),qi()}let En=R(()=>!Ee.value&&!1!==L.deferNodesUntilVisible&&!((L.maxLiveNodes??0)<=0)&&!St.value&&!(Y.value.length>900)&&wt.value),Dn=R(()=>!!Tt&&(En.value||St.value)),On=R(()=>St.value||Z.value),{liveNodeBufferResolved:kn,focusIndex:An,liveRange:jn,updateLiveRange:Mn}=function(e,t){let{parsedNodeCount:n,virtualizationEnabled:r,maxLiveNodesResolved:i,clamp:a}=t,o=R(()=>Math.max(0,e.liveNodeBuffer??60)),s=V(0),c=k({start:0,end:0});return{liveNodeBufferResolved:o,focusIndex:s,liveRange:c,updateLiveRange:function(){let e=n.value;if(!r.value||e===0)return c.start=0,void(c.end=e);let t=Math.min(i.value,e),l=o.value,u=a(s.value-l,0,Math.max(0,e-t));c.start=u,c.end=Math.min(e,u+t)}}}(L,{parsedNodeCount:at,virtualizationEnabled:St,maxLiveNodesResolved:xt,clamp:hr}),Nn=new Map,Pn=new Map,Fn=new Map,In=[],Ln=new Map,Rn=new Set,zn=V(0),Bn=!1,Vn=R(()=>(zn.value,Rn.size)),Hn=new Map,Un=new Map,Wn=V(0),Gn=R(()=>{Wn.value;let e=0;for(let t of Hn.values())e+=Math.max(0,t);return e}),Kn=null,qn=!0,Jn=[0],Yn=``;function Xn(){qn=!0}let Zn=R(()=>{if(!St.value)return Y.value.length;let e=kn.value,t=Math.max(jn.end+e,jt.value),n=Math.min(Y.value.length,t);return Math.max(Pt.value,n)});function Qn(){Bn||(Bn=!0,queueMicrotask(()=>{Bn=!1,zn.value+=1}))}function $n(e,t,n=`node-resize`){if(!G||typeof window>`u`)return null;let r=window.setTimeout(()=>{Rn.delete(r)&&Qn();try{t()}finally{_a(n)}},Math.max(0,e));return Rn.add(r),Qn(),r}function er(e){G&&e!=null&&(Rn.delete(e)&&Qn(),window.clearTimeout(e))}function tr(){if(G&&typeof window<`u`)for(let e of Rn)window.clearTimeout(e);Rn.size&&(Rn.clear(),Qn()),In.length=0,Fn.clear()}function nr(e){return lt.value?.[e]??null}let{cancelScheduledFocusSync:rr,scheduleFocusSync:ir}=function(e){let{isClient:t,containerRef:n,virtualizationEnabled:r,requestFrame:i,cancelFrame:a,syncFocusToScroll:o}=e,s=null;function c(){return n.value?.ownerDocument?.defaultView??(typeof window<`u`?window:null)}function l(){if(!s)return;let e=c();s.viaTimeout?e?e.clearTimeout(s.id):clearTimeout(s.id):a?.(s.id),s=null}return{cancelScheduledFocusSync:l,scheduleFocusSync:function(e={}){if(!r.value)return;if(!t)return void o(!0);if(e.immediate)return l(),void o(!0);if(s)return;let n=()=>{s=null,o()};if(i)return void(s={id:i(n),viaTimeout:!1});let a=c();s={id:a?a.setTimeout(n,16):setTimeout(n,16),viaTimeout:!0}}}}({isClient:G,containerRef:ue,virtualizationEnabled:St,requestFrame:Et,cancelFrame:Dt,syncFocusToScroll:function(e=!1){if(!St.value)return;let t=Kt.value||je();if(!t)return;let n=t.ownerDocument||ue.value?.ownerDocument||document,r=n?.defaultView||(typeof window<`u`?window:null),i=t===n?.documentElement||t===n?.body,a=Y.value.length;if(!i&&a>0&&Me(t)){let n=J(`syncFocusToScroll.clientHeight`,()=>t.clientHeight||0),r=J(`syncFocusToScroll.scrollTop`,()=>t.scrollTop),i=r<0?-r:r,o=hr(function(e){let t=Y.value;if(!t.length)return 0;if(e<=0)return Math.max(0,t.length-1);if(gt.value){let n=Or()[t.length]??0;return kr(Math.max(0,n-e))}if(ln.value===t.length){let n=Ar(0,t.length);return va(Math.max(0,n-e))}let n=e;for(let e=t.length-1;e>=0;e--){let t=sn[e]??fn.value;if(n<=t)return e;n-=t}return 0}(Math.max(0,i)+.5*Math.max(0,n)),0,Math.max(0,a-1));(e||Math.abs(o-An.value)>1)&&(An.value=o,Mn());return}let o=i?null:J(`syncFocusToScroll.root.getBoundingClientRect`,()=>t.getBoundingClientRect()),s=i?0:o.top,c=i?J(`syncFocusToScroll.viewport.clientHeight`,()=>r?.innerHeight??t.clientHeight??0):o.bottom,l=Gt.value,u=null,d=null;for(let[e,t]of l){if(!t)continue;let n=J(`syncFocusToScroll.slot.getBoundingClientRect`,()=>t.getBoundingClientRect());n.bottom<=s||n.top>=c||(u??=e,d=e)}if(u==null||d==null){let e=ue.value;if(!e)return;let a=i?{top:0}:J(`syncFocusToScroll.fallback.root.getBoundingClientRect`,()=>t.getBoundingClientRect()),o=J(`syncFocusToScroll.fallback.scrollTop`,()=>Ne(t,n,i)),s=i?(()=>{let t=J(`syncFocusToScroll.fallback.container.getBoundingClientRect`,()=>e.getBoundingClientRect()),n=(i?0:a.top)-t.top;return Math.max(0,n)})():(()=>{let n=Pe(e,t);return Math.max(0,o-n)})(),c=i?J(`syncFocusToScroll.fallback.viewport.clientHeight`,()=>r?.innerHeight??n?.documentElement?.clientHeight??t.clientHeight??0):J(`syncFocusToScroll.fallback.root.clientHeight`,()=>t.clientHeight);An.value=hr(va(s+.5*Math.max(0,c)),0,Math.max(0,Y.value.length-1)),Mn();return}let f=Math.round((u+d)/2);!e&&Math.abs(f-An.value)<=1||(An.value=hr(f,0,Math.max(0,Y.value.length-1)),Mn())}}),{visibleNodeIndices:ar,nodeVisibilityHandles:or,nodeVisibilityWatchStops:sr,nodeVisibilityFallbackTimers:cr,clearVisibilityFallback:lr,markNodeVisible:ur,cleanupNodeVisibility:dr,destroyNodeVisibilityState:fr}=aN({isClient:G,shouldTrackVisibleNodeIndices:()=>En.value,shouldCleanupNodeVisibility:()=>St.value,onNodeMarkedVisible:e=>{St.value?ir():An.value=hr(e,0,Math.max(0,Y.value.length-1))},onNodeVisibilityCleaned:e=>{Rt.delete(e)&&ya()}}),{cleanupScrollListener:pr,setupScrollListener:mr}=function(e){let{isClient:t,virtualizationEnabled:n,listenerEnabled:r,scrollRootElement:i,resolveScrollContainer:a,scheduleFocusSync:o,onScroll:s}=e,c=null,l=null;function u(){c&&=(c(),null),l=null,i.value=null}function d(t){let n=e.getScrollTop?e.getScrollTop(t):t.scrollTop;return Math.max(0,Number.isFinite(n)?Math.abs(n):0)}return{cleanupScrollListener:u,setupScrollListener:function(){if(!t)return;if(!((e=r?.value)??n.value))return void u();var e;let f=a();if(!f)return void u();if(i.value===f&&c)return;u(),l=d(f);let p=()=>{if(s?.(),n.value){let e=function(e){let t=d(e),n=l;l=t;let r=Math.max(480,.75*(e.clientHeight||0));return n==null?t>r?{immediate:!0}:void 0:Math.abs(t-n)>r?{immediate:!0}:void 0}(f);e?o(e):o()}};f.addEventListener(`scroll`,p,{passive:!0}),i.value=f,c=()=>{f.removeEventListener(`scroll`,p)}}}}({isClient:G,virtualizationEnabled:St,listenerEnabled:On,scrollRootElement:Kt,resolveScrollContainer:je,scheduleFocusSync:ir,onScroll:function(){let e=qt.value;if(!e)return;let t=fi();if(!t||function(e){if(oa()>=Yt)return Xt=null,!1;let t=Xt;if(t==null)return!0;let n=Math.abs(e.scrollTop-t)<=2;return n||(Xt=null),n}(t))return;let n=mi(t);(n==null||n<-32||Math.abs(Math.max(0,n)-Math.max(0,e.distanceFromBottomPx))>32)&&Oi(`restore`)},getScrollTop:e=>{let t=e.ownerDocument||ue.value?.ownerDocument||document,n=e===t.documentElement||e===t.body||e===t.scrollingElement;return J(`scrollListener.getScrollTop`,()=>Ne(e,t,n))}});function hr(e,t,n){return Math.min(Math.max(e,t),n)}function gr(e){return e?.firstElementChild}function _r(e,t){return e?e.matches?.call(e,t)?e:e.querySelector(t):null}function vr(){if(!gt.value)return void(Se.value=0);let e=J(`updateExperimentContainerWidth.clientWidth`,()=>ue.value?.clientWidth??0);Se.value=e>0?e:0}let yr=null;function br(){yr?.disconnect(),yr=null}let xr=ge({loader:()=>BD(null,null,function*(){return(yield W(()=>Promise.resolve().then(()=>pL),void 0)).default}),loadingComponent:fk,delay:0,suspensible:!1});function Sr(e){return e===xr}let Cr=R(()=>x.value===`pre`?sk:x.value===`shiki`?xr:pk),wr=R(()=>{let e=Y.value;if(!e.length||!gt.value)return e.map(()=>null);let t=Se.value||J(`estimatedNodeHeights.clientWidth`,()=>ue.value?.clientWidth||0);return!Number.isFinite(t)||t<=0?e.map(()=>null):e.map((e,n)=>{let r=sn[n],i=typeof r==`number`&&r>0;if(vt.value&&!i){let n=oM(e,t,Ce.value);if(n)return n}if(Q.value&&e.type===`code_block`){let t=function(e){if(e.type!==`code_block`)return null;let t=fo(e,oo(e));return Sr(t)?`markdown`:t===sk?`pre`:t===Cr.value||t===pk?`monaco`:null}(e);if(t===`monaco`||t===`markdown`||t===`pre`)return cM(e,{rendererKind:t,monacoOptions:L.codeBlockMonacoOptions,showHeader:!1!==(a=L.codeBlockProps)?.showHeader})}var a;return null})});function Tr(e){let t=sn[e];if(Number.isFinite(t)&&t>0)return t;let n=wr.value[e]?.height;return Number.isFinite(n)&&n>0?n:Math.max(fn.value,function(e){let t=Y.value[e];if(!t||typeof t!=`object`)return 32;let n=String(t.type??``),r=yt()||640;switch(n){case`heading`:return 44;case`paragraph`:return Er(String(t.raw??t.content??``),r,34);case`list`:{let e=Array.isArray(t.items)?t.items.length:1;return Math.max(48,30*e+12)}case`list_item`:return Er(String(t.raw??t.content??``),r,34);case`blockquote`:return Er(String(t.raw??t.content??``),r,56);case`table`:{let e=Array.isArray(t.rows)?t.rows.length:Array.isArray(t.children)?t.children.length:3;return Math.max(120,38*e+48)}case`code_block`:return Er(String(t.code??t.raw??``),r,96,20);case`math_block`:return 72;case`image`:return 220;case`admonition`:case`vmr_container`:case`html_block`:return Er(String(t.raw??t.content??``),r,96);case`thematic_break`:return 24;default:return Er(String(t.raw??t.content??``),r,40)}}(e))}function Er(e,t,n,r=22){let i=String(e??``);if(!i)return n;let a=Math.max(18,Math.floor(Math.max(320,t)/8)),o=i.split(/\r?\n/).length,s=Math.ceil(i.length/a);return Math.max(n,Math.ceil(Math.max(1,o,s)*r+12))}function Dr(e){let t=Number(e);return!Number.isFinite(t)||t<=0?-1:Math.round(t/32)}function Or(){let e=Y.value.length,t=Dr(Se.value||J(`getFallbackHeightPrefix.clientWidth`,()=>ue.value?.clientWidth||0)),n=r.virtualScroll?.measurementKey==null?``:String(r.virtualScroll.measurementKey),i=[e,cn.count,Math.round(cn.total),Math.round(100*fn.value),n,t,+!!gt.value,eM.value,xe.value].join(`:`);if(!qn&&Yn===i)return Jn;let a=Array(e+1);a[0]=0;for(let t=0;t<e;t++)a[t+1]=a[t]+(gt.value?Tr(t):sn[t]??fn.value);return Jn=a,Yn=i,qn=!1,a}function kr(e){let t=Y.value.length;if(t<=0||e<=0)return 0;let n=Or();if(e>=(n[t]??0))return t-1;let r=0,i=t-1,a=t-1;for(;r<=i;){let t=r+i>>1;(n[t+1]??0)>=e?(a=t,i=t-1):r=t+1}return a}function Ar(e,t){if(e>=t)return 0;if(gt.value)return function(e,t){let n=Y.value.length,r=hr(Math.trunc(e),0,n),i=hr(Math.trunc(t),r,n);if(r>=i)return 0;let a=Or();return(a[i]??0)-(a[r]??0)}(e,t);if(ln.value!==Y.value.length){let n=0;for(let r=e;r<t;r++)n+=sn[r]??fn.value;return n}let n=un.value,r=dn.value;if(!n.length||!r.length){let n=0;for(let r=e;r<t;r++)n+=sn[r]??fn.value;return n}return bn(n,e,t)+(t-e-bn(r,e,t))*fn.value}p(()=>Y.value.length,e=>{Xn(),e<=0?xn():(e<ln.value&&mn(e),e!==ln.value&&hn(e))},{immediate:!0});let jr=R(()=>{if(!St.value)return Y.value.map((e,t)=>({node:e,index:t}));let e=Y.value.length,t=hr(jn.start,0,e),n=hr(jn.end,t,e);return Y.value.slice(t,n).map((e,n)=>({node:e,index:t+n}))}),Mr=R(()=>St.value?Ar(0,Math.min(jn.start,Y.value.length)):0),Nr=R(()=>{if(!St.value)return 0;let e=Y.value.length;return Ar(Math.min(jn.end,e),e)});function Pr(){if(!gt.value)return 0;let e=0,t=wr.value;for(let n=0;n<t.length;n++){if(!t[n])continue;let r=sn[n];Number.isFinite(r)&&r>0||e++}return e}function Fr(){let e=Y.value.length;return{totalNodes:e,measuredCount:cn.count,estimatedCount:Pr(),averageNodeHeight:fn.value,topSpacerHeight:Mr.value,bottomSpacerHeight:Nr.value,estimatedTotalHeight:Ar(0,e),width:Gr()}}function Ir(){let e=Y.value;return zD($({},Fr()),{probe:{paragraphReady:!!Ce.value.paragraph,listItemReady:!!Ce.value.listItem,listWrapperOverhead:Ce.value.listWrapperOverhead,headingReadyLevels:Object.entries(Ce.value.headings).filter(([,e])=>!!e).map(([e])=>Number(e))},nodes:e.map((e,t)=>({index:t,type:e.type,estimateKind:wr.value[t]?.kind??null,rendererKind:wr.value[t]?.rendererKind??null,estimatedHeight:wr.value[t]?.height??null,estimatedContentHeight:wr.value[t]?.contentHeight??null,measuredHeight:sn[t]??null}))})}function Lr(){return r.indexKey==null?mt.value?`virtual-${zr()}`:`markdown-renderer`:String(r.indexKey)}function Rr(e){let t=String(e),n=`${Lr()}-`;if(!t.startsWith(n))return null;let r=t.slice(n.length).match(/^(\d+)(?:$|-)/);if(!r)return null;let i=Number(r[1]);return!Number.isInteger(i)||i<0||i>=Y.value.length?null:i}function zr(){let e=r.virtualScroll?.sessionKey;return String(e!=null&&e!==``?e:r.indexKey??L.customId??Ze)}function Br(){let e=r.virtualScroll?.threadKey;return e==null||e===``?void 0:String(e)}function Vr(e){return(e??``)===(Br()??``)}function Hr(){let e=r.virtualScroll?.measurementKey;return e==null?``:String(e)}function Ur(){let e=x.value,t=e===`monaco`?L.codeBlockMonacoOptions:void 0,n=L.codeBlockProps,r=e===`shiki`;return[L.isDark?`dark`:`light`,e===`monaco`?`code-rich`:e===`pre`?`code-pre`:`code-shiki`,!1===L.codeBlockStream?`code-static`:`code-stream`,ca(L.codeBlockMinWidth),ca(L.codeBlockMaxWidth),...r?[nE(n?.themes??L.themes,n?.langs??L.langs)]:[],ca(t?.fontSize),ca(t?.lineHeight),ca(t?.fontFamily),ca(t?.tabSize),ca(t?.MAX_HEIGHT),ca(t?.wordWrap),ca(t?.wrappingIndent),ca(t?.padding),ca(n?.showHeader),ca(n?.showCopyButton),ca(n?.showExpandButton),ca(n?.showPreviewButton),ca(n?.showCollapseButton),ca(n?.showFontSizeButtons)].join(`\0`)}function Wr(){return[Hr(),Ur()].join(`\0`)}function Gr(){return yt()}let Kr=R(()=>Dr(Gr())),qr=R(()=>[Wr(),Kr.value].join(`\0`)),Jr=R(()=>mt.value?[`virtual`,Br()??``,zr(),qr.value].join(`\0`):r.indexKey);function Yr(){Wn.value+=1}function Xr(e){return!(!e||!Number.isInteger(e.index)||e.index<0||e.index>=Y.value.length||e.sessionKey!==zr()||e.threadKey!==Br()||e.layoutEpochKey!==qr.value)}function Zr(e){let t=String(e),n=Un.get(t);return n?Xr(n)?n.index:null:Rr(t)}function Qr(e=`async-node`){(Hn.size||Un.size)&&(Hn.clear(),Un.clear(),Yr(),_a(e))}let $r=I(mE,null),ei={reportHeight(e,t){if(!Z.value)return;let n=Zr(e);if(n==null)return;let r=Nn.get(n);if(!r)return;let i=Number(t),a=wn(n,r);Cn(n,Number.isFinite(i)&&i>0?Math.max(i,a||0):a)},markPending(e){if(!Z.value)return;let t=Rr(e);t!=null&&function(e,t){let n=Un.get(e);if(n&&Xr(n))return Hn.set(e,Math.max(0,Hn.get(e)??0)+1),Yr(),void _a(`async-node`);Hn.set(e,1),Un.set(e,function(e){return{index:e,sessionKey:zr(),threadKey:Br(),layoutEpochKey:qr.value}}(t)),Yr(),_a(`async-node`)}(String(e),t)},markSettled(e){if(!Z.value)return;let t=String(e),n=Zr(e);(n!=null||function(e){return Hn.has(String(e))}(t))&&function(e){let t=Hn.get(e)??0;return!(t<=0||(t<=1?(Hn.delete(e),Un.delete(e)):Hn.set(e,t-1),Yr(),t===1&&_a(`async-node`),0))}(t)&&n!=null&&Ea()}};function ti(){let e=0;for(let t of Nn.values())e+=J(`getVisibleDomHeight.offsetHeight`,()=>t?.offsetHeight??0);return Math.ceil(Math.max(0,e))}ve(mE,{reportHeight(e,t){ei.reportHeight(e,t),$r?.reportHeight(e,t)},markPending(e){ei.markPending(e),$r?.markPending(e)},markSettled(e){ei.markSettled(e),$r?.markSettled(e)}});let ni,ri=null,ii=null;function ai(e){return!1!==e&&e!=null&&e!==``}function oi(){return St.value?function(){if(!St.value)return!0;let e=Y.value.length,t=hr(jn.start,0,e),n=hr(jn.end,t,e);if(t>=n)return!0;for(let e=t;e<n;e++)if(!Rt.has(e)||ba(e)&&!Nn.has(e))return!1;return!0}():Pt.value>=Zn.value}function si(){return!0===Le.value&&!Re.value&&Gn.value===0&&Rn.size===0&&Ln.size===0&&Kn==null&&oi()}function ci(){if(r.virtualScroll?.settleMode!==`manual`||ri===zr()&&ni===Br())return!0;let e=r.virtualScroll?.settledToken;return!!ai(e)&&ii===Ia(e)}function li(){return si()&&ci()}function ui(e,t){return t.totalNodes<=0?e===`final`?`final`:`estimate`:t.measuredCount>=t.totalNodes?e===`final`?`final`:`measured`:t.measuredCount>0||t.estimatedCount>0?`mixed`:`estimate`}function di(e=`manual`,t){let n=Fr(),r=function(e){return e||(!0===Le.value?!oi()||Ln.size>0||Kn!=null?`measuring`:li()?`settled`:`settling`:Y.value.length>0?`streaming`:`estimating`)}(t);return{sessionKey:zr(),threadKey:Br(),phase:r,nodeCount:n.totalNodes,liveRange:{start:jn.start,end:jn.end},renderedCount:Pt.value,measuredCount:n.measuredCount,estimatedCount:n.estimatedCount,averageNodeHeight:n.averageNodeHeight,topSpacerHeight:n.topSpacerHeight,bottomSpacerHeight:n.bottomSpacerHeight,visibleDomHeight:ti(),totalHeight:pi(),width:n.width,final:!0===Le.value,stable:li(),confidence:ui(r,n),reason:e}}function fi(){let e=Kt.value||je(),t=ue.value;if(!e||!t)return null;let n=e.ownerDocument||t.ownerDocument||document,r=e===n.documentElement||e===n.body||e===n.scrollingElement;return{root:e,doc:n,isViewportRoot:r,scrollTop:J(`getScrollBox.scrollTop`,()=>Ne(e,n,r)),scrollHeight:J(`getScrollBox.scrollHeight`,()=>r?Math.max(n.documentElement?.scrollHeight??0,n.body?.scrollHeight??0,e.scrollHeight??0):e.scrollHeight),clientHeight:J(`getScrollBox.clientHeight`,()=>r?n.documentElement?.clientHeight||e.clientHeight||0:e.clientHeight)}}function pi(){let e=Y.value.length,t=Math.max(0,Ar(0,e)),n=J(`getRendererLogicalHeight.offsetHeight`,()=>ue.value?.offsetHeight??0),r=Math.max(0,n>0?n:J(`getRendererLogicalHeight.scrollHeight`,()=>ue.value?.scrollHeight??0));return e<=0?Math.ceil(n):St.value?t>0?Math.max(1,Math.ceil(t),function(){let e=Mr.value+Nr.value;for(let t of Rt.values())t&&(e+=Math.max(0,J(`getVirtualizedDomLogicalHeight.offsetHeight`,()=>t.offsetHeight||0)));return Math.ceil(Math.max(0,e))}(),function(e,t){return e<=0||t<=0?0:t<=e+Math.max(512,.05*e)?Math.ceil(t):0}(t,r)):Math.max(1,Math.ceil(r)):Z.value?t>0||cn.count>0||Pr()>0?(Nt.value&&Pt.value,Math.max(1,Math.ceil(r),Math.ceil(t))):Math.ceil(r):Math.max(1,Math.ceil(r),Math.ceil(t))}function mi(e){let t=ue.value;if(!t)return null;let n=J(`getRendererBottomDistanceFromViewport.getBoundingClientRect`,()=>t.getBoundingClientRect());return function(e){return e.isViewportRoot?e.clientHeight:J(`getViewportBottomInRoot.getBoundingClientRect`,()=>e.root.getBoundingClientRect().bottom)}(e)-n.bottom}function hi(e={}){let t=!1!==e.requireViewport,n=function(e=64){let t=fi(),n=ue.value;if(!t||!n)return!1;let r=function(e){if(e.isViewportRoot)return{top:0,bottom:e.clientHeight};let t=J(`getVirtualViewportRect.getBoundingClientRect`,()=>e.root.getBoundingClientRect());return{top:t.top,bottom:t.bottom}}(t),i=J(`isRendererNearVirtualViewport.getBoundingClientRect`,()=>n.getBoundingClientRect());return i.bottom>=r.top-e&&i.top<=r.bottom+e}();if(t&&!n)return null;let r=function(){let e=fi(),t=ue.value;if(!e||!t||Math.max(0,e.scrollHeight-e.scrollTop-e.clientHeight)>64)return null;let n=mi(e);return n==null?null:n>=-8&&n<=160?{type:`bottom`,distanceFromBottomPx:Math.max(0,n)}:null}();if(r)return{anchor:r,captured:!0};let i=rn();if(i)return{anchor:{type:`node`,nodeIndex:i.nodeIndex,offsetWithinNodePx:i.offsetWithinNodePx},captured:n};if(!0===e.allowFallback){let e=function(){let e=Y.value.length;return e<=0?null:{type:`node`,nodeIndex:hr(An.value,0,Math.max(0,e-1)),offsetWithinNodePx:0}}();return e?{anchor:e,captured:!1}:null}return null}function gi(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function _i(e,t){let n=e;for(let e=0;e<t.length;e++)n^=t.charCodeAt(e),n=Math.imul(n,16777619);return n^=31,n=Math.imul(n,16777619),n}let vi=new Set([`children`,`items`,`header`,`rows`,`cells`,`attrs`,`data`,`term`,`definition`]);function yi(e,t=new WeakSet,n=0){if(e==null||typeof e==`number`||typeof e==`boolean`)return String(e);if(typeof e==`string`)return`s:${function(e){let t=e.length>8192?`${e.slice(0,8192)}...${e.length}`:e;return`${e.length}:${gi(t)}`}(e)}`;if(typeof e==`function`)return`fn`;if(typeof e!=`object`)return typeof e;if(t.has(e))return`cycle`;if(n>=6)return`max-depth`;t.add(e);try{if(Array.isArray(e)){if(e.length<=160){let r=[];for(let i=0;i<e.length;i++)r.push(yi(e[i],t,n+1));return`a:${e.length}:${r.join(`,`)}`}let r=[],i=[],a=Math.max(0,e.length-32),o=2166136261;for(let s=0;s<e.length;s++){let c=yi(e[s],t,n+1);o=_i(o,c),s<32&&r.push(c),s>=a&&i.push(c)}return[`a:${e.length}`,`h=${r.join(`,`)}`,`t=${i.join(`,`)}`,`all=${(o>>>0).toString(36)}`].join(`:`)}let r=e,i=Object.keys(r).filter(e=>{let t=r[e];return e!==`parent`&&e!==`el`&&e!==`component`&&(t==null||typeof t==`string`||typeof t==`number`||typeof t==`boolean`||vi.has(e))}).sort();return`o:${i.length}:${i.map(e=>`${e}=${yi(r[e],t,n+1)}`).join(`;`)}`}finally{t.delete(e)}}let bi=-1,xi=``;function Si(e){let t=Y.value[e];return t?gi(yi(t)):``}function Ci(){let e=xe.value;if(bi===e)return xi;let t=2166136261;for(let e=0;e<Y.value.length;e++){let n=Si(e);for(let e=0;e<n.length;e++)t^=n.charCodeAt(e),t=Math.imul(t,16777619)}return xi=(t>>>0).toString(36),bi=e,xi}function wi(e,t={}){let n=!0===t.includeHeightCache,i=t.includeContentHash??n,a=n?function(e){let t=function(){let e=Number(r.virtualScroll?.heightCacheLimit??5e3);return!Number.isFinite(e)||e<=0?1/0:Math.max(1,Math.trunc(e))}();if(!Number.isFinite(t)||e.length<=t)return e;let n=new Map,i=e=>{!e||n.size>=t||n.set(e.index,e)},a=Y.value.length,o=hr(jn.start-2*kn.value,0,a),s=hr(jn.end+2*kn.value,o,a);for(let t of e)t.index>=o&&t.index<s&&i(t);let c=Math.max(1,Math.ceil(e.length/t));for(let r=0;r<e.length&&n.size<t;r+=c)i(e[r]);for(let r=e.length-1;r>=0&&n.size<t;r-=c)i(e[r]);return Array.from(n.values()).sort((e,t)=>e.index-t.index).slice(0,t)}(vn().map(e=>{let t=Y.value[e.index];return t?zD($({},e),{nodeType:String(t.type??``),signature:Si(e.index)}):null}).filter(e=>!!e)):[],o=hi({allowFallback:!0===t.allowAnchorFallback,requireViewport:t.requireViewport});return o||a.length||!0===t.includeEmptyState?zD($({sessionKey:e.sessionKey,threadKey:e.threadKey},o?{anchor:o.anchor,anchorCaptured:o.captured}:{anchorCaptured:!1}),{metrics:e,width:e.width,contentHash:i?Ci():void 0,measurementKey:Wr()||void 0,heightCache:a.length?a:void 0}):null}function Ti(e){var t,n;let r=fi();if(!r)return;let i=function(e){let t=ue.value;if(!t)return null;let n=Pe(t,e.root),r=Y.value.length,i=J(`getRendererBottomOffsetWithinRoot.offsetHeight`,()=>t.offsetHeight||0),a=Math.max(0,i>0?i:r>0?J(`getRendererBottomOffsetWithinRoot.scrollHeight`,()=>t.scrollHeight||0):0),o=pi();return n+Math.max(a,o)}(r);if(i==null)return;let a=Math.max(0,e.distanceFromBottomPx),o=Math.max(0,i-r.clientHeight-a);(function(e){Yt=oa()+120,Xt=e})(o),r.isViewportRoot?(n=(t=r.doc.defaultView)?.scrollTo)==null||n.call(t,0,o):SM(r.root,r.doc,o,{isReverseFlexScrollRoot:Me,getNormalizedScrollTop:Ne})}let Ei=[];function Di(){if(G)for(Jt!=null&&(Dt?.(Jt),Jt=null);Ei.length;){let e=Ei.pop();e!=null&&window.clearTimeout(e)}}function Oi(e){let t=!!qt.value;qt.value=null,Yt=0,Xt=null,Di(),t&&e&&_a(e)}function ki(){if(!qt.value||!G||Jt!=null)return;let e=()=>{Jt=null;let e=qt.value;e&&Ti(e)};Jt=Et?Et(e):null,Jt??e()}function Ai(e,t={}){let n=Y.value.length;return n<=0?[]:e.filter(e=>!(!Number.isInteger(e.index)||e.index<0||e.index>=n)&&!(!Number.isFinite(e.height)||e.height<=0)&&!(t.requireSignature&&!e.signature)&&!(t.requireCompatibilityMetadata&&!e.nodeType&&!e.signature)&&function(e){let t=Y.value[e.index];return!(!t||e.nodeType&&e.nodeType!==String(t.type??``)||e.signature&&e.signature!==Si(e.index))}(e))}function ji(e){let t=Dr(Gr()),n=Dr(e);return t!==-1&&n!==-1&&t===n}function Mi(e){let t=Number(e?.width);if(Number.isFinite(t)&&t>0)return t;let n=Number(e?.metrics?.width);return Number.isFinite(n)&&n>0?n:null}function Ni(e){return e.sessionKey===zr()&&!!Vr(e.threadKey)&&(e.measurementKey??``)===Wr()&&!!ji(Mi(e))&&!!function(e){let t=e.heightCache;return!!t?.length&&(Pi(e)?t.some(e=>!!(e.nodeType||e.signature)):t.some(e=>!!e.signature))}(e)}function Pi(e){return!!(e.contentHash&&e.contentHash===Ci())}function Fi(e){return!Pi(e)}let Ii=null,Li=null,Ri=null,zi=null,Bi=null,Vi=!1;function Hi(e){let t=e.map(e=>[e.index,Math.round(10*e.height),e.nodeType??``,e.signature??``].join(``)).join(``),n=Dr(Gr());return[Br()??``,zr(),Wr(),Y.value.length,n,e.length,gi(t)].join(`:`)}function Ui(e=(e=>(e=r.virtualScroll)?.heightCache)()){if(!Z.value||!e?.length||Y.value.length<=0||!ji((t=r.virtualScroll)?.heightCacheWidth))return!1;var t;let n=Ai(e,{requireSignature:!0});if(!n.length)return!Vi&&typeof console<`u`&&g&&(Vi=!0,console.warn(`[markstream-vue] virtualScroll.heightCache ignored: standalone heightCache entries must include compatible signature metadata. Use heightCache exported from virtual-state-change/render-settled, and pass heightCacheWidth from the same state.`)),!1;let i=Hi(n);return i===Ii?(Li=`standalone`,!0):(Tn(n,{mode:`merge`}),Xn(),Ii=i,Li=`standalone`,da(),_a(`restore`),!0)}function Wi(e,t={}){if(!Z.value||!e||e.sessionKey!==zr()||!Vr(e.threadKey)||Y.value.length<=0)return!1;let n=!!e.heightCache?.length&&!Gi(),r=!e.anchor||!1===e.anchorCaptured&&!0!==t.allowUncapturedAnchor?null:e.anchor,i=!0===t.restoreAnchor&&!!r&&!Gi()&&Number(Mi(e))>0,a=!1;if(e.heightCache?.length&&Ni(e)){let t=Ai(e.heightCache,{requireCompatibilityMetadata:!e.contentHash,requireSignature:Fi(e)});t.length&&(Tn(t,{mode:`merge`}),Xn(),Ii=Hi(t),Li=`restore`,da(),a=!0)}if(n||i)return!1;if(!t.restoreAnchor||!r)return a&&_a(`restore`),!0;let o=function(e,t){let n=e.anchor,r=n?n.type===`bottom`?`bottom:${Math.round(n.distanceFromBottomPx)}`:`node:${n.nodeIndex}:${Math.round(n.offsetWithinNodePx)}`:`none`;return[Br()??``,zr(),Wr(),Kr.value,t,r].join(`:`)}(e,t.restoreToken??`imperative`);return Ri===o?(a&&_a(`restore`),!0):(Ri=o,function(e){let t=()=>{if(e.type===`node`)return Oi(),void an({nodeIndex:e.nodeIndex,offsetWithinNodePx:e.offsetWithinNodePx});if(tn(),Zt.value=null,qt.value=e,Di(),Ti(e),G)for(let e of[0,120,280,480])Ei.push(window.setTimeout(()=>{let e=qt.value;e&&Ti(e)},e))};(function(e){if(!St.value)return!1;let t=Y.value.length;return!(t<=0||(An.value=e.type===`node`?hr(e.nodeIndex,0,t-1):t-1,Mn(),0))})(e)?h(t):t()}(r),_a(`restore`),!0)}function Gi(){let e=Gr();return Number.isFinite(e)&&e>0}function Ki(e){return e.sessionKey===zr()&&!!Vr(e.threadKey)&&(Y.value.length<=0||!(!e.heightCache?.length||Gi())||!(!(e.anchor&&Number(Mi(e))>0)||Gi()))}function qi(){Ut.clear();for(let e of Object.keys(sn)){let t=Number(e);Number.isInteger(t)&&t>=0&&t<Y.value.length&&Sn(t)}}function Ji(){Kn!=null&&(Dt?.(Kn),Kn=null),Ca()}function Yi(){return!G||kt?Promise.resolve():new Promise(e=>{let t=!1,n=null,r=()=>{t||(t=!0,n!=null&&window.clearTimeout(n),e())};if(Et)return Et(r),void(n=window.setTimeout(r,50));n=window.setTimeout(r,0)})}function Xi(e,t=Br(),n=qr.value){return zr()===e&&Br()===t&&qr.value===n}function Zi(){return BD(this,arguments,function*(e={}){let t=zr(),n=Br(),i=qr.value,a=e.frames??2,o=e.timeoutMs??120,s=e.reason??`manual`,c=e.expectedSettledTokenKey,l=!0===e.flushPendingTimers,u=di(s),d=()=>zD($({},u),{phase:u.final?`settling`:u.phase,stable:!1,confidence:u.confidence===`final`?`mixed`:u.confidence,reason:s}),f=()=>Xi(t,n,i)&&(c==null||la()===c);for(let e=0;e<a;e++){if(yield h(),!f()||(yield Yi(),!f()))return d();Ea(),Ji()}if(yield function(e){return!G||e<=0?Promise.resolve():new Promise(t=>window.setTimeout(t,e))}(o),!f()||(l&&tr(),Ea(),Ji(),!f()))return d();let p=si();p&&(ri=t,ni=n,r.virtualScroll?.settleMode===`manual`&&c!=null&&ai(r.virtualScroll?.settledToken)&&la()===c&&(ii=Ia(r.virtualScroll.settledToken)));let m=di(s,f()&&p&&ci()?`final`:void 0);return ma(m,!0),m})}let Qi=`content`,$i=null,ea=null,ta=0,na=null,ra=null,ia=null,aa=null;function oa(){return typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now()}function sa(e){let t=na;if(!t)return!0;let n=r.virtualScroll?.heightDiffThresholdPx??1;return Math.abs(e.totalHeight-t.totalHeight)>n||e.sessionKey!==t.sessionKey||e.phase!==t.phase||e.stable!==t.stable||e.final!==t.final||e.threadKey!==t.threadKey||e.nodeCount!==t.nodeCount||e.measuredCount!==t.measuredCount||e.width!==t.width}function ca(e){if(e==null)return``;if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function la(e=(e=>(e=r.virtualScroll)?.settledToken)()){return ca(e)}function ua(e,t){return[e,t.sessionKey,t.threadKey??``,Wr(),Ci(),ca(r.virtualScroll?.settledToken),Math.round(t.totalHeight),Math.round(t.width)].join(`\0`)}function da(){ia=null,aa=null,ra=null}function fa(e){let t=e.heightCache;return t?.length?Hi(t):``}function pa(e){let t=e.metrics,n=e.anchor?(r=e.anchor).type===`bottom`?`bottom:${Math.round(r.distanceFromBottomPx)}`:`node:${r.nodeIndex}:${Math.round(r.offsetWithinNodePx)}`:`none`;var r;return[e.sessionKey,e.threadKey??``,e.measurementKey??Wr(),e.contentHash??``,fa(e),n,+!!e.anchorCaptured,t.liveRange.start,t.liveRange.end,t.renderedCount,t.nodeCount,Math.round(t.totalHeight),Math.round(t.width),t.phase,+!!t.stable].join(`\0`)}function ma(e,t=!1){if(!Z.value||function(e=!1){return!e&&mt.value&&!ht.value}(t))return;let n=t||sa(e),r=function(e,t=!1){return t||e.stable||e.phase===`final`?{state:wi(e,{includeHeightCache:!0})}:{state:wi(e)}}(e,t).state,a=!!(r&&(n||function(e,t=!1){return!!t||pa(e)!==ra}(r,t)));if(n&&(se(e),na=e,ta=oa()),r&&a&&(ce(r),r.anchor&&le(r.anchor),ra=pa(r)),e.stable){let t=ua(`settled`,e);if(t!==ia){ia=t;let n=wi(e,{includeHeightCache:!0});n&&(ce(n),ra=pa(n)),function(e){i(`render-settled`,e)}(e)}}if(e.phase===`final`){let t=ua(`final`,e);if(t!==aa){aa=t;let n=wi(e,{includeHeightCache:!0});n&&(ce(n),ra=pa(n)),function(e){i(`render-final`,e)}(e)}}}function ha(){$i!=null&&(Dt?.($i),$i=null),ea!=null&&G&&(window.clearTimeout(ea),ea=null)}function ga(){$i=null,ea=null,function(e){if(Ln.size>0||Kn!=null)return!0;switch(e){case`node-resize`:case`async-node`:case`resize`:case`restore`:case`final`:case`manual`:return!0;default:return!1}}(Qi)&&(Ea(),Ji()),ma(di(Qi))}function _a(e){if(!Z.value||(Qi=e,$i!=null||ea!=null))return;let t=Math.max(0,r.virtualScroll?.emitIntervalMs??32),n=Math.max(0,t-(oa()-ta)),i=()=>{ea=null,$i=Et?Et(ga):null,$i??ga()};G&&n>0?ea=window.setTimeout(i,n):i()}function va(e){if(e<=0)return 0;let t=Y.value;if(gt.value)return kr(e);if(ln.value===t.length&&un.value.length&&dn.value.length){let n=fn.value,r=un.value,i=dn.value,a=e=>e<=0?0:bn(r,0,e)+(e-bn(i,0,e))*n,o=0,s=t.length-1,c=t.length-1;for(;o<=s;){let t=o+s>>1;a(t+1)>=e?(c=t,s=t-1):o=t+1}return c}let n=e;for(let e=0;e<t.length;e++){let t=sn[e]??fn.value;if(n<=t)return e;n-=t}return Math.max(0,t.length-1)}function ya(){Wt.value+=1}function ba(e){return!(Nt.value&&e>=Pt.value)&&(!En.value||e<jt.value||ar.value.has(e))}function xa(e){let t=sr.get(e);t&&(t(),sr.delete(e));let n=or.get(e);n&&(n.destroy(),or.delete(e)),lr(e)}function Sa(e,t){let n=!1;if(t){let r=Rt.get(e);Rt.set(e,t),r!==t&&(n=!0)}else Rt.delete(e)&&(n=!0);if(n&&ya(),t||lr(e),!Dn.value||!Tt||!St.value&&En.value&&!ye.value&&or.size>=640&&(ye.value||(ye.value=!0,g&&typeof console<`u`&&console.warn(`[markstream-vue] viewportPriority auto-disabled:`,`too-many-targets`),fr()),!Dn.value||!Tt))return xa(e),void(t&&ur(e,!0));if(e<jt.value&&!St.value||ar.value.has(e))return xa(e),void ur(e,!0);if(!t)return void xa(e);xa(e);let r=Tt(t,{rootMargin:`400px`});if(!r)return;or.set(e,r),ur(e,r.isVisible.value),En.value&&function(e){if(!G||!En.value)return;lr(e);let t=e%17*23,n=window.setTimeout(()=>{if(cr.delete(e),!En.value||ar.value.has(e))return;let t=Rt.get(e);if(!t)return;let n=je(t),r=t.ownerDocument||document,i=r.defaultView||window,a=!n||n===r.documentElement||n===r.body,o=!a&&n?J(`nodeVisibilityFallback.root.getBoundingClientRect`,()=>n.getBoundingClientRect()):null,s=a?0:o.top,c=a?J(`nodeVisibilityFallback.clientHeight`,()=>i.innerHeight??n?.clientHeight??0):o.bottom,l=J(`nodeVisibilityFallback.node.getBoundingClientRect`,()=>t.getBoundingClientRect());l.bottom>=s-500&&l.top<=c+500&&ur(e,!0)},1800+t);cr.set(e,n)}(e);let i=null;i=p(()=>r.isVisible.value,t=>{if(t){lr(e),ur(e,!0),i?.(),sr.delete(e),or.get(e)===r&&or.delete(e);try{r.destroy()}catch{}}},{immediate:!0}),sr.set(e,i),St.value&&ir()}function Ca(){Kn=null;for(let[e,t]of Ln)Ln.delete(e),Nn.get(e)===t.el&&Pn.get(e)===t.version&&Cn(e,t.height,{allowShrink:t.allowShrink})}function wa(){Kn!=null&&(Dt?.(Kn),Kn=null),Ln.clear()}function Ta(e,t){(function(e,t,n){if(!Number.isFinite(n)||n<=0||Nn.get(e)!==t)return;let i=Pn.get(e);if(i==null)return;let a=Y.value[e],o=Re.value&&!0!==Le.value&&!r.nodes?.length&&e>=Y.value.length-2,s=!(!0===a?.loading||o),c=Ln.get(e),l=c?c.allowShrink&&s:s,u=c&&!l?Math.max(c.height,n):n;Ln.set(e,{height:u,allowShrink:l,version:i,el:t}),Kn??(Kn=Et?Et(Ca):null,Kn??Ca())})(e,t,wn(e,t))}function Ea(){for(let[e,t]of Nn)t&&Ta(e,t)}function Da(){Vt?.disconnect(),Vt=null,zt.clear()}function Oa(){for(;In.length;)er(In.pop())}p(ht,e=>{e&&_a(`content`)},{flush:`post`}),t({getVirtualMetrics:di,captureVirtualState:function(e={}){var t;return wi(di(`manual`),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!0===e.allowFallbackAnchor,requireViewport:!0===e.requireViewport,includeEmptyState:(t=e.includeEmptyState)==null||t})},restoreVirtualState:function(e,t={}){let n=!0===t.restoreAnchor,r=t.restoreToken==null?`imperative`:String(t.restoreToken);zi=e,Bi={restoreAnchor:n,restoreToken:r,allowUncapturedAnchor:!0===t.allowUncapturedAnchor},!Wi(e,{restoreAnchor:n,restoreToken:r,allowUncapturedAnchor:!0===t.allowUncapturedAnchor})&&Ki(e)||(zi=null,Bi=null)},forceMeasure:function(e=`manual`){return BD(this,null,function*(){yield h(),yield Yi(),Ea(),Ji(),yield h();let t=di(e);return ma(t,!0),t})},settle:Zi,scrollToNode:function(e,t=`start`){Oi(),tn();let n=Y.value.length;if(n<=0)return;let r=hr(e,0,n-1),i=()=>{let e=en({nodeIndex:r,offsetWithinNodePx:0}),n=Tr(r),i=fi()?.clientHeight??0,a=Qt(),o=e;if(t===`center`)o=e-i/2+n/2;else if(t===`end`)o=e-i+n;else if(t===`nearest`&&a!=null){if(e>=a&&e+n<=a+i)return;o=e<a?e:e-i+n}$t(Math.max(0,o)),ir({immediate:!0}),St.value&&(An.value=r,Mn())};if(St.value)return An.value=r,Mn(),void h(i);i()}}),p(()=>Ct.value,e=>{if(!e){Da();for(let e of Fn.values())for(let t of e)er(t);Fn.clear(),Pn.clear(),Oa(),wa()}},{immediate:!0}),p(Le,e=>{e&&function(){if(G&&Le.value&&Nn.size){Oa();for(let e of[80,240,640]){let t=$n(e,()=>{for(let[e,t]of Nn)t&&Ta(e,t)},`final`);t!=null&&In.push(t)}}}(),_a(e?`final`:`content`)}),p([()=>Y.value.length,()=>Pt.value],()=>{qt.value&&ki(),_a(`content`)},{flush:`post`,immediate:!0}),p([()=>jn.start,()=>jn.end],()=>{_a(`batch`)},{flush:`post`});let{cleanupBatchScheduler:ka}=function(e){let{props:t,isClient:n,isTestEnv:r,parsedNodesIdentity:i,parsedNodeCount:a,desiredRenderedCount:o,datasetKey:s,batchingEnabled:c,incrementalRenderingActive:l,resolvedBatchSize:u,resolvedInitialBatch:d,renderedCount:f,adaptiveBatchSize:m,previousRenderContext:g,previousBatchConfig:_,requestFrame:v,cancelFrame:y,hasIdleCallback:b,cleanupNodeVisibility:x,onDatasetKeyChanged:S,onDatasetChanged:C}=e,w=null,T=null,E=!1,D=null,O=null,k=0,A=!1,j=!1,M=new Set,N=new Set;function ee(){if(n){w!=null&&(y?.(w),w=null),T!=null&&(window.clearTimeout(T),T=null),O!=null&&typeof window.cancelIdleCallback==`function`&&(window.cancelIdleCallback(O),O=null),k+=1;for(let e of M)y?.(e);M.clear();for(let e of N)window.clearTimeout(e);N.clear(),E=!1,D=null,A=!1,j=!1}}function te(){return typeof performance<`u`?performance.now():Date.now()}function P(e){(function(e){if(!l.value)return;let n=Math.max(2,t.renderBatchBudgetMs??6),r=Math.max(1,u.value||1),i=Math.max(1,Math.floor(r/4));e>1.2*n?m.value=Math.max(i,Math.floor(.7*m.value)):e<.5*n&&m.value<r&&(m.value=Math.min(r,Math.ceil(1.2*m.value)))})(e),A=!1;let n=j||f.value<o.value;j=!1,n&&re()}function ne(e,i={}){if(!l.value)return;let a=o.value;if(f.value>=a)return;let s=Math.max(1,e),c=()=>{let e=te(),r=0;w=null,T=null,O=null,E=!1;let i=D??s;D=null;let o=te();f.value=Math.min(a,f.value+i),x(f.value),r=te()-o,function(e,r){if(!n)return void P(r);A=!0;let i=++k;h().then(()=>{if(i!==k)return;let n=te(),a=Math.max(r,n-e),o=()=>{i===k&&P(a)};if(v){let e=!1,n=null,r=()=>{e||(e=!0,o())},i=v(()=>{M.delete(i),n!=null&&(window.clearTimeout(n),N.delete(n),n=null),r()});M.add(i),n=window.setTimeout(()=>{n!=null&&N.delete(n),n=null,y?.(i),M.delete(i),r()},Math.max(32,t.renderBatchIdleTimeoutMs??120)),N.add(n);return}let s=window.setTimeout(()=>{N.delete(s),o()},0);N.add(s)})}(e,r)};if(!n||i.immediate)return void c();let u=Math.max(0,t.renderBatchDelay??16);if(D=D==null?s:Math.max(D,s),!E){if(E=!0,!r&&b&&window.requestIdleCallback){let e=Math.max(0,t.renderBatchIdleTimeoutMs??120);O=window.requestIdleCallback(()=>c(),{timeout:e});return}v&&!r?w=v(()=>{u===0?c():T=window.setTimeout(()=>c(),u)}):T=window.setTimeout(()=>c(),u)}}function F(e,t={}){A?j=!0:e==null?re():ne(e,t)}function re(){l.value&&ne(c.value?Math.max(1,Math.round(m.value)):Math.max(1,u.value))}return p([i,a,s,l,u,d,()=>t.renderBatchDelay],()=>{let e=a.value,r=g.value,i=s.value,c=!Object.is(i,r.key),p=e!==r.total,h=c||p;g.value={key:i,total:e};let v=_.value,y=t.renderBatchDelay??16,b=v.batchSize!==u.value||v.initial!==d.value||v.delay!==y||v.enabled!==l.value;_.value={batchSize:u.value,initial:d.value,delay:y,enabled:l.value},c&&S(e),(h||b||!l.value)&&ee(),(h||b)&&(m.value=Math.max(1,u.value||1)),h&&C();let w=o.value;if(!e)return f.value=0,void x(0);if(!l.value)return f.value=w,void x(f.value);f.value=c||r.total===0||b?Math.min(w,d.value):Math.min(f.value,w);let T=Math.max(1,d.value||u.value||e);f.value<w?F(T,{immediate:!n}):x(f.value)},{immediate:!0}),p(o,(e,t)=>{l.value&&(typeof t==`number`&&e<=t||e>f.value&&F())}),{cleanupBatchScheduler:ee}}({props:L,isClient:G,isTestEnv:kt,parsedNodesIdentity:it,parsedNodeCount:at,desiredRenderedCount:Zn,datasetKey:Jr,batchingEnabled:Mt,incrementalRenderingActive:Nt,resolvedBatchSize:At,resolvedInitialBatch:jt,renderedCount:Pt,adaptiveBatchSize:It,previousRenderContext:Ft,previousBatchConfig:Lt,requestFrame:Et,cancelFrame:Dt,hasIdleCallback:Ot,cleanupNodeVisibility:dr,onDatasetKeyChanged:e=>{wa(),xn(),Xn(),da(),e>0&&hn(e)},onDatasetChanged:()=>{St.value&&ir({immediate:!0})}});p([On,St,()=>ue.value,()=>we()],([e,t])=>{if(!e)return pr(),void rr();mr(),t?ir({immediate:!0}):rr()},{flush:`post`,immediate:!0}),p([()=>Y.value.length,()=>St.value],e=>BD(null,[e],function*([e,t]){t&&e&&G&&(yield h(),ir({immediate:!0}))}),{flush:`post`}),p(gt,e=>{e&&function(){if(ot.value&&st.value&&ct.value&<.value?.[1])return;let e=de({type:`paragraph`,children:[{type:`text`,content:`Probe paragraph text`,raw:`Probe paragraph text`}],raw:`Probe paragraph text`}),t=de({type:`list_item`,children:[e],raw:`- Probe paragraph text`}),n=de({type:`list`,ordered:!1,items:[t],raw:`- Probe paragraph text`});ot.value=e,st.value=t,ct.value=n;let r={1:null,2:null,3:null,4:null,5:null,6:null};for(let e=1;e<=6;e++)r[e]=de({type:`heading`,level:e,text:`Probe heading`,children:[{type:`text`,content:`Probe heading`,raw:`Probe heading`}],raw:`${`#`.repeat(e)} Probe heading`});lt.value=r}()},{immediate:!0}),p([()=>ue.value,gt],()=>{if(!gt.value)return br(),void(Se.value=0);vr(),br(),gt.value&&ue.value&&typeof ResizeObserver<`u`&&(yr=new ResizeObserver(()=>{vr(),Zt.value&&nn(),qt.value&&ki(),_a(`resize`)}),yr.observe(ue.value))},{immediate:!0}),p([gt,bt,qr],()=>BD(null,null,function*(){if(!gt.value)return Ce.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Xn();yield h(),function(){if(!gt.value||typeof window>`u`)return Ce.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Xn();let e={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},t=_r(gr(fe.value),`.paragraph-node`);e.paragraph=uM(fe.value,t,`pre-wrap`);let n=gr(me.value)?.querySelector(`.paragraph-node`);e.listItem=uM(me.value,n,`pre-wrap`);let r=J(`readSimpleTextProbeProfile.list.offsetHeight`,()=>he.value?.offsetHeight??0),i=J(`readSimpleTextProbeProfile.listItem.offsetHeight`,()=>me.value?.offsetHeight??0);e.listWrapperOverhead=Math.max(0,r-i);for(let t=1;t<=6;t++){let n=_r(gr(_e[t]),`h${t}`);e.headings[t]=uM(_e[t],n,`pre-wrap`)}Ce.value=e,Xn()}()}),{flush:`post`,immediate:!0}),p(()=>Y.value.length,()=>{St.value&&ir({immediate:!0})}),p([gt,Se],()=>{Xn(),St.value&&ir({immediate:!0}),Zt.value&&nn(),qt.value&&ki(),_a(`resize`)},{immediate:!1}),p(()=>En.value,e=>{if(e)for(let[e,t]of Rt)Sa(e,t);else{fr();for(let[e,t]of Rt)t&&ur(e,!0)}},{immediate:!1}),p([()=>L.viewportPriority,()=>Y.value.length],([e,t])=>{(!1===e||ye.value&&t<=200)&&(ye.value=!1)}),p(()=>Pt.value,()=>{St.value&&ir({immediate:!0})}),p([An,xt,kn,()=>Y.value.length,St],()=>{Mn()},{immediate:!0});let Aa=null,ja=!1,Ma=null;function Na(){Aa=null,ri=null,ni=void 0,ii=null,da()}function Pa(){wa(),xn(),Xn(),Ut.clear();let e=Y.value.length;e>0&&hn(e),qi()}function Fa(){ha(),tr(),na=null,Ii=null,Li=null,Ri=null,zi=null,Bi=null,ja=!1,Na(),Qr(`restore`),tn(),Oi()}function Ia(e){return[Br()??``,zr(),Wr(),Kr.value,la(e),Y.value.length,Math.round(Ar(0,Y.value.length)),Math.round(Gr()),cn.count,Math.round(cn.total)].join(`:`)}function La(){return BD(this,null,function*(){let e=r.virtualScroll?.settledToken,t=la(e),n=zr(),i=Br(),a=qr.value;if(Z.value&&r.virtualScroll?.settleMode===`manual`&&ai(e))if(si()){if(Ia(e)!==ii&&!ja){ja=!0;try{let e=yield Zi({reason:`manual`,expectedSettledTokenKey:t}),o=la()===t;Xi(n,i,a)&&e.sessionKey===n&&e.threadKey===i&&o&&e.stable&&e.phase===`final`&&(ii=Ia(r.virtualScroll?.settledToken))}finally{ja=!1,yield h();let e=r.virtualScroll?.settledToken,t=ai(e)?Ia(e):``;Xi(n,i,a)&&t&&ii!==t&&La()}}}else _a(`manual`)})}p(Z,(e,t)=>{if(e!==t){if(!e)return Fa(),void ha();Fa(),Pa(),Ma=qr.value,_a(`content`)}},{flush:`post`}),p([Z,qr],([e,t])=>{e?Ma==null?Ma=t:Ma!==t&&(Ma=t,function(e=`resize`){wa(),xn(),Xn(),Ut.clear();let t=Y.value.length;t>0&&hn(t),qi(),Ii=null,Li=null,Ri=null,na=null,ja=!1,Na(),Ui(),h(()=>{Ea(),Zt.value&&nn(),qt.value&&ki(),_a(e)})}(`resize`)):Ma=null},{flush:`post`,immediate:!0}),p([Z,()=>zr(),()=>Br()],([e])=>{e&&(Fa(),Pa(),Qr(`content`),_a(`content`))}),p([Z,()=>zr(),()=>Br(),qr,()=>Y.value.length],([e])=>{e&&function(e=`async-node`){let t=!1;for(let[e,n]of Array.from(Un.entries()))Xr(n)||(Un.delete(e),Hn.delete(e),t=!0);t&&(Yr(),_a(e))}(`async-node`)},{flush:`post`}),p([Z,()=>r.virtualScroll?.sessionKey,()=>r.virtualScroll?.measurementKey,()=>r.indexKey,()=>xe.value],([e])=>{e&&(da(),function(e=`content`){if(!Z.value)return;let t=[],n=Y.value.length;for(let e of Array.from(Ut.keys())){if(e>=n){t.push(e);continue}let r=Si(e),i=Ut.get(e);i!=null&&i!==r&&t.push(e),Ut.set(e,r)}for(let e of Array.from(Ut.keys()))e>=n&&Ut.delete(e);t.length&&(function(e,t={}){let n=Array.from(e,Number);_n(n,t)>0&&function(e){for(let t of e)Ut.delete(t)}(n)}(t,{notify:!1}),Xn(),Na(),Zt.value&&nn(),qt.value&&ki(),_a(e))}(`content`))},{flush:`post`,immediate:!0}),p([Z,()=>Y.value.length,()=>zr(),()=>Br()],([e,t,n,r],[i,a,o,s])=>{e&&i&&n===o&&r===s&&t!==a&&Na()},{flush:`post`}),p([Z,()=>r.virtualScroll?.heightCache,()=>r.virtualScroll?.heightCacheWidth,()=>r.virtualScroll?.restoreState,()=>r.virtualScroll?.measurementKey,()=>Y.value.length,()=>zr(),Se],()=>{Ui()},{flush:`post`,immediate:!0}),p([Z,()=>r.virtualScroll?.restoreState,()=>r.virtualScroll?.restoreAnchor,()=>r.virtualScroll?.measurementKey,()=>Y.value.length,()=>zr(),Se],e=>BD(null,[e],function*([e,t]){if(!e||!t)return;yield h();let n=function(){let e=r.virtualScroll?.restoreAnchor;return e==null||!1===e?null:!0===e?`true`:String(e)}();Wi(t,{restoreAnchor:n!=null,restoreToken:n??void 0})}),{flush:`post`,immediate:!0}),p([Z,Se,()=>r.virtualScroll?.restoreState,()=>r.virtualScroll?.measurementKey],([e])=>{if(!e)return;let t=r.virtualScroll?.restoreState;t&&Ii&&Li===`restore`&&(Ni(t)||(Pa(),Ii=null,Li=null,_a(`resize`)))},{flush:`post`}),p([Z,()=>Y.value.length,()=>zr(),Se],e=>BD(null,[e],function*([e]){let t=zi,n=Bi;e&&t&&(yield h(),!Wi(t,{restoreAnchor:!0===n?.restoreAnchor,restoreToken:n?.restoreToken??`imperative`,allowUncapturedAnchor:!0===n?.allowUncapturedAnchor})&&Ki(t)||(zi=null,Bi=null))}),{flush:`post`,immediate:!0}),p([Z,Le,()=>r.virtualScroll?.settleMode,()=>zr(),()=>Br(),qr,Gn,Vn,()=>Pt.value,Zn,()=>cn.count,()=>cn.total],([e,t,n])=>{if(!e||!0!==t||n===`manual`||!li())return;let r=function(){let e=Y.value.length;return[Br()??``,zr(),Wr(),Kr.value,e,Math.round(Ar(0,e)),Math.round(Gr()),cn.count,Math.round(cn.total)].join(`:`)}();Aa!==r&&(Aa=r,Zi({reason:`final`}).then(e=>{e.stable||Aa!==r||(Aa=null)}))},{flush:`post`,immediate:!0}),p([Z,Le,()=>r.virtualScroll?.settleMode,()=>r.virtualScroll?.settledToken,()=>zr(),()=>Br(),qr,Gn,Vn,()=>Pt.value,Zn,()=>Y.value.length,()=>cn.count,()=>cn.total],()=>{La()},{flush:`post`,immediate:!0}),p([()=>Y.value.length,St,xt,kn,()=>jn.start,()=>jn.end],([e,t,n,r,i,a])=>{De.value&&We(`virtualization`,{nodes:e,virtualization:t,maxLiveNodes:n,buffer:r,focusIndex:An.value,scroll:t?(()=>{let e=Kt.value||je();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:i,end:a},rendered:Pt.value})}),p([()=>L.customId],([e],t,n)=>{if(!e||ut)return;let r=function(e,t){return e?(Qj.controllers[e]=t,()=>{Qj.controllers[e]===t&&delete Qj.controllers[e]}):()=>{}}(e,{captureRestoreAnchor:rn,restoreAnchor:an,getAnchorDrift:on,getReport:Ir});n(()=>{r()})},{immediate:!0}),v(()=>{(function(){if(Z.value)try{Ea(),Ji();let e=di(`manual`);sa(e)&&(se(e),na=e,ta=oa());let t=wi(e,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});t&&(ce(t),t.anchor&&le(t.anchor),ra=pa(t))}catch{}})(),ka(),fr(),He(),Da();for(let e of Fn.values())for(let t of e)er(t);Fn.clear(),Pn.clear(),Ut.clear(),Oa(),wa(),br(),tn(),Oi(),ha(),pr(),rr()});let Ra=ge({loader:()=>BD(null,null,function*(){try{return(yield W(()=>Promise.resolve().then(()=>VF),void 0)).default}catch(e){return console.warn(`[markstream-vue] Optional peer dependencies for MermaidBlockNode are missing. Falling back to preformatted code rendering. To enable Mermaid rendering, please install "mermaid".`,e),sk}}),loadingComponent:dN,delay:0}),za=ge({loader:()=>BD(null,null,function*(){try{return(yield W(()=>Promise.resolve().then(()=>dF),void 0)).default}catch(e){return console.warn(`[markstream-vue] Failed to load InfographicBlockNode. Falling back to preformatted code rendering. To enable Infographic rendering, install "@antv/infographic" and configure setInfographicLoader with a dynamic loader.`,e),sk}}),loadingComponent:uN,delay:0}),Ba=ge(()=>BD(null,null,function*(){try{return(yield W(()=>Promise.resolve().then(()=>BI),void 0)).default}catch(e){return console.warn(`[markstream-vue] Optional peer dependencies for D2BlockNode are missing. Falling back to preformatted code rendering. To enable D2 rendering, please install "@terrastruct/d2".`,e),sk}})),Va={text:dk,paragraph:yA,heading:rA,code_block:pk,list:lA,list_item:cA,blockquote:Gk,table:DA,definition_list:Yk,footnote:eA,footnote_reference:oO,footnote_anchor:Zk,admonition:EN,vmr_container:MA,hardbreak:Lk,link:kk,image:ZO,thematic_break:kA,math_inline:mk,math_block:hk,strong:Sk,emphasis:Fk,strikethrough:wk,highlight:Nk,insert:jk,subscript:bk,superscript:vk,emoji:rO,checkbox:tO,checkbox_input:tO,inline_code:SO,html_inline:yO,reference:gk,html_block:gA},Ha=R(()=>Lr()),Ua=R(()=>fM(L.codeBlockProps)),Wa=R(()=>fM(L.codeBlockProps,{omit:[`langs`]})),Ga=R(()=>$($({stream:L.codeBlockStream,darkTheme:L.codeBlockDarkTheme,lightTheme:L.codeBlockLightTheme,monacoOptions:L.codeBlockMonacoOptions,themes:L.themes,langs:x.value===`shiki`?L.langs:void 0,minWidth:L.codeBlockMinWidth,maxWidth:L.codeBlockMaxWidth},typeof K.value==`boolean`?{showTooltips:K.value}:{}),Wa.value)),Ka=R(()=>$(zD($({},Ga.value),{langs:L.langs}),Ua.value));function qa(e){return typeof e==`boolean`?e:void 0}let Ja=R(()=>{let e=L.codeBlockProps||{},t={},n=qa(e.showLineNumbers);n!==void 0&&(t.showLineNumbers=n);let r=qa(e.diffInline);r!==void 0&&(t.diffInline=r);let i=function(e){let t=Number(e);return Number.isFinite(t)&&t>0?t:void 0}(e.reservedHeightPx);return i!==void 0&&(t.reservedHeightPx=i),t}),Ya=R(()=>$($({stream:L.codeBlockStream,darkTheme:L.codeBlockDarkTheme,lightTheme:L.codeBlockLightTheme,themes:L.themes,langs:L.langs,minWidth:L.codeBlockMinWidth,maxWidth:L.codeBlockMaxWidth},typeof K.value==`boolean`?{showTooltips:K.value}:{}),Ua.value)),Xa=R(()=>$({},L.mermaidProps||{})),Za=R(()=>$({},L.d2Props||{})),Qa=R(()=>$({},L.infographicProps||{})),$a=R(()=>({typewriter:L.typewriter,fade:L.fade,customHtmlTags:nt.value.customHtmlTags})),eo=R(()=>$($({},$a.value),typeof K.value==`boolean`?{showTooltip:K.value}:{})),to=R(()=>$($({},$a.value),typeof K.value==`boolean`?{showTooltips:K.value}:{})),no=R(()=>$($({},$a.value),typeof K.value==`boolean`?{showTooltips:K.value}:{})),ro=R(()=>$($({},$a.value),typeof K.value==`boolean`?{showTooltips:K.value}:{}));function io(e){return Array.isArray(e.children)&&e.children.length>0}let ao=R(()=>jr.value.map(e=>{let t=function(e){if(e.type!==`code_block`)return e;let t=e,n=[String(t.language??``),String(t.loading??``),String(t.diff??``),String(t.code??``),String(t.originalCode??``),String(t.updatedCode??``),String(t.raw??``)].join(`\0`),r=Ht.get(t);if(r&&r.signature===n)return r.node;let i=$({},t);return Ht.set(t,{signature:n,node:i}),i}(e.node),n=oo(t),r=fo(t,n);if((t.type===`html_block`||t.type===`html_inline`)&&r===Va[t.type]){let e=t,n=String(e.tag??``).trim().toLowerCase()||Z_(e.content);if(n){let i=et.value[n];if(tt.value.has(n)&&i)r=i,t=zD($({},e),{type:n,tag:n,content:ev(e.content,n)});else if($_(e.content??e.raw,n)){let n=String(e.content??e.raw??``);t.type===`html_inline`?(r=dk,t={type:`text`,content:n,raw:n}):(r=yA,t={type:`paragraph`,children:[{type:`text`,content:n,raw:n}],raw:n})}}}let i=t.type===`code_block`&&x.value===`pre`&&r===sk&&!so(et.value,n),a=$({},function(e,t,n){let r=t??oo(e);if(e.type===`code_block`){let t=r?so(et.value,r):void 0;if(n&&x.value===`pre`&&!t&&n===sk)return Ja.value;if(n&&r&&n===t)return r===`mermaid`?lo(e):r===`infographic`?uo(e):r===`d2`||r===`d2lang`?Za.value:Ka.value;if(n&&n===et.value.code_block)return Ka.value;if(Sr(n))return Ya.value}return r===`mermaid`?lo(e):r===`infographic`?uo(e):r===`d2`||r===`d2lang`?Za.value:e.type===`link`?eo.value:e.type===`list`?to.value:e.type===`blockquote`?no.value:e.type===`table`?ro.value:e.type===`code_block`?Ga.value:$a.value}(t,n,r)),o=wr.value[e.index];t.type===`code_block`&&o?.kind===`code-block`&&(a=zD($({},a),i?{reservedHeightPx:o.height??o.contentHeight}:{estimatedHeightPx:o.height,estimatedContentHeightPx:o.contentHeight})),i||t.type!==`code_block`||n!==`mermaid`||hM(a.estimatedPreviewHeightPx)!=null||(a=zD($({},a),{estimatedPreviewHeightPx:bM(_M(String(t.code??``)))})),i||t.type!==`code_block`||n!==`infographic`||hM(a.estimatedPreviewHeightPx)!=null||(a=zD($({},a),{estimatedPreviewHeightPx:xM(vM(String(t.code??``)))})),t.type===`math_block`&&(a=zD($({},a),{cacheScope:$e.value}));let s=function(e,t){let n=String(e.type);return!qD(n)&&et.value[n]===t}(t,r),c=s?fO(t,Oe.value):void 0;return zD($({},e),{node:t,component:r,bindings:a,customBindings:$($({},c??{}),a),rendersCustomNode:s,hasSlotChildren:io(t),slotContent:String(t.content??``),isCodeBlock:t.type===`code_block`,indexKey:`${Ha.value}-${e.index}`})}));function oo(e){return e?.type===`code_block`?String(e.language??``).trim().toLowerCase():``}function so(e,t){let n=t.trim().toLowerCase();if(n)for(let t of[n,OE(n),ZT(n)]){let n=t&&e[t];if(n)return n}}function co(e,t,n,r){let i=$({},e.value);return hM(i.estimatedPreviewHeightPx)??(i.estimatedPreviewHeightPx=r(n(String(t?.code??``)),void 0,i.maxHeight===`none`?null:hM(i.maxHeight)??void 0)),i}function lo(e){return co(Xa,e,_M,bM)}function uo(e){return co(Qa,e,vM,xM)}function fo(e,t){if(!e)return jA;let n=et.value,r=n[String(e.type)];if(e.type===`code_block`){let i=t??oo(e);return(i?so(n,i):void 0)||(x.value===`pre`?n.code_block||sk:i===`mermaid`?n.mermaid||Ra:i===`infographic`?n.infographic||za:i===`d2`||i===`d2lang`?n.d2||Ba:r||n.code_block||Cr.value)}return r||Va[String(e.type)]||jA}function po(e){i(`click`,e)}function mo(e){var t;(t=e.target)!=null&&t.closest(`[data-node-index]`)&&i(`mouseover`,e)}function ho(e){var t;(t=e.target)!=null&&t.closest(`[data-node-index]`)&&i(`mouseout`,e)}function go(e){i(`mouseover`,e)}function _o(e){i(`mouseout`,e)}let vo=V(null),yo=V(!1),bo,xo=null,So=0,Co=0,wo=0,To=[`code_block`,`admonition`,`table`,`math_block`,`html_block`,`image`,`thematic_break`],Eo=new Set(To),Do=[`.typewriter-cursor`,`.height-estimation-probes`,...To.map(e=>`[data-node-type="${e}"]`),`script`,`style`].join(`,`);function Oo(e){if(!e||typeof e!=`object`)return!1;let t=e.type;return typeof t==`string`&&Eo.has(t)}function ko(e){if(!e||typeof e!=`object`)return 0;let t=e,n=t.raw??t.content??t.code;if(typeof n==`string`)return n.length;let r=t.children;if(Array.isArray(r))return r.reduce((e,t)=>e+ko(t),0);let i=t.items;return Array.isArray(i)?i.reduce((e,t)=>e+ko(t),0):0}function Ao(){bo&&=(clearTimeout(bo),void 0)}function jo(){So+=1,xo!=null&&(Dt?.(xo),xo=null)}function Mo(){jo(),vo.value&&(vo.value.style.visibility=`hidden`)}function No(e){if(e.nodeType!==Node.TEXT_NODE||!(e.textContent??``).trim())return!1;let t=e.parentElement;return!!t&&!t.closest(Do)}function Po(e){let t=e.lastChild;for(;t;){if(No(t))return t;if(t.nodeType===Node.ELEMENT_NODE){let e=t;if(!e.matches(Do)&&e.lastChild){t=e.lastChild;continue}}for(;t&&t!==e&&!t.previousSibling;)t=t.parentNode;if(!t||t===e)break;t=t.previousSibling}return null}function Fo(){if(!G||!yo.value||xo!=null)return;let e=So,t=()=>{xo=null,e===So&&function(){if(!(G&&yo.value&&ue.value&&vo.value))return;let e=ue.value,t=vo.value;t.style.visibility=`hidden`;let n=function(){let e=ao.value;for(let t=e.length-1;t>=0;t--){let n=e[t];if(!n||Oo(n.node)||!ba(n.index))continue;let r=Rt.get(n.index);if(!r)continue;let i=Po(r);if(i)return i}return null}();if(!n)return;let r=0,i=0,a=20,o=!1;if(n?.textContent){let t=n.textContent.length,s=document.createRange();s.setStart(n,Math.max(0,t-1)),s.setEnd(n,t);let c=typeof s.getClientRects==`function`?s.getClientRects():void 0,l=c?.[c.length-1]??n.parentElement?.getBoundingClientRect();if(l){let t=J(`typewriterCursor.root.getBoundingClientRect`,()=>e.getBoundingClientRect());r=l.right-t.left+e.scrollLeft,i=l.top-t.top+e.scrollTop,a=l.height||a,o=!0}s.detach()}o&&(t.style.transform=`translate(${Math.max(0,r)}px, ${Math.max(0,i)}px)`,t.style.height=`${a}px`,t.style.visibility=`visible`)}()};Et?xo=Et(t):t()}return p([Ie,()=>r.content,()=>r.nodes,()=>L.typewriter,Le],()=>BD(null,null,function*(){if(!G||Ee.value||!ke.value)return;if(Le.value)return yo.value=!1,Ao(),void Mo();if(r.nodes?.length)return yo.value=!1,Ao(),Mo(),Co=(r.content??``).length,void(wo=Ie.value.length);let e=function(){return r.nodes?.length?r.nodes.reduce((e,t)=>e+ko(t),0):(r.content??``).length}(),t=function(){return r.nodes?.length?r.nodes.reduce((e,t)=>e+ko(t),0):Ie.value.length}(),n=!Oo(Y.value[Y.value.length-1]),i=e>Co,a=t>wo;if(!1===L.typewriter||!n||!i&&!a)return!1!==L.typewriter&&n||(yo.value=!1,Mo()),Co=e,void(wo=t);Co=e,wo=t,yo.value=!0,vo.value&&(vo.value.style.visibility=`hidden`),Ao(),yield h(),Fo(),bo=setTimeout(()=>{bo=void 0,yo.value=!1},3e3)}),{flush:`post`,immediate:!0}),p(yo,e=>BD(null,null,function*(){e?(yield h(),Fo()):Mo()}),{flush:`post`}),p([()=>Pt.value,()=>jn.start,()=>jn.end],()=>BD(null,null,function*(){G&&!Ee.value&&ke.value&&yo.value&&(yield h(),Fo())}),{flush:`post`}),v(()=>{Ao(),jo(),Qe.clear()}),(e,t)=>{let n=d(`NodeRenderer`,!0);return B(Ee)?(y(!0),U(H,{key:0},a(ao.value,e=>(y(),U(H,{key:e.index},[e.rendersCustomNode?(y(),P(S(e.component),ae({key:0,ref_for:!0},e.customBindings,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":L.customId,"is-dark":L.isDark,onClick:po,onMouseover:go,onMouseout:_o,onCopy:t[0]||=e=>i(`copy`,e),onHandleArtifactClick:t[1]||=e=>i(`handleArtifactClick`,e)}),{default:T(()=>[e.hasSlotChildren?(y(),P(n,ae({key:0,ref_for:!0},rt.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`,`index-key`])):e.slotContent?(y(),P(n,ae({key:1,ref_for:!0},rt.value,{content:e.slotContent,final:!e.node.loading,"index-key":`${e.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`content`,`final`,`index-key`])):D(``,!0)]),_:2},1040,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):(y(),P(S(e.component),ae({key:1,node:e.node,loading:e.node.loading,"index-key":e.indexKey},{ref_for:!0},e.bindings,{"custom-id":L.customId,"is-dark":L.isDark,onClick:po,onMouseover:go,onMouseout:_o,onCopy:t[2]||=e=>i(`copy`,e),onHandleArtifactClick:t[3]||=e=>i(`handleArtifactClick`,e)}),null,16,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`]))],64))),128)):(y(),U(`div`,{key:1,ref_key:`containerRef`,ref:ue,class:z([`markstream-vue markdown-renderer`,[{dark:L.isDark},{virtualized:St.value},{"virtual-scroll-coordinated":ht.value}]]),"data-custom-id":L.customId,onClick:po,onMouseover:mo,onMouseout:ho},[_t.value||St.value?(y(),U(H,{key:0},[_t.value?(y(),U(`div`,{key:0,class:`height-estimation-probes`,style:ne({width:`${bt.value}px`}),"aria-hidden":`true`},[F(`div`,{ref_key:`paragraphProbeWrapperRef`,ref:fe,class:`node-content`,"data-probe":`paragraph`},[o(B(yA),{node:ot.value,"index-key":`probe-paragraph`},null,8,[`node`])],512),F(`div`,{ref_key:`listItemProbeWrapperRef`,ref:me,class:`node-content`,"data-probe":`list-item`},[F(`ul`,pN,[o(B(cA),{node:st.value,"index-key":`probe-list-item`},null,8,[`node`])])],512),F(`div`,{ref_key:`listProbeWrapperRef`,ref:he,class:`node-content`,"data-probe":`list`},[o(B(lA),{node:ct.value,"index-key":`probe-list`},null,8,[`node`])],512),(y(),U(H,null,a(6,e=>F(`div`,{key:`probe-heading-${e}`,ref_for:!0,ref:t=>function(e,t){e<1||e>6||(_e[e]=t)}(e,t),class:`node-content`,"data-probe":`heading-${e}`},[o(B(rA),{node:nr(e),"index-key":`probe-heading-${e}`},null,8,[`node`,`index-key`])],8,mN)),64))],4)):D(``,!0),St.value?(y(),U(`div`,{key:1,class:`node-spacer`,style:ne({height:`${Mr.value}px`}),"aria-hidden":`true`},null,4)):D(``,!0)],64)):D(``,!0),(y(!0),U(H,null,a(ao.value,e=>(y(),U(`div`,{key:e.index,ref_for:!0,ref:t=>Sa(e.index,t),class:`node-slot`,"data-node-index":e.index,"data-node-type":e.node.type},[ba(e.index)?(y(),U(`div`,{key:0,ref_for:!0,ref:t=>function(e,t){t||function(e){let t=`${Lr()}-${e}`,n=!1;for(let r of Array.from(Hn.keys()))(Un.get(r)?.index===e||r===t||r.startsWith(`${t}-`))&&(Hn.delete(r),Un.delete(r),n=!0);n&&(Yr(),_a(`async-node`))}(e),Ln.delete(e),function(e){let t=(Pn.get(e)??0)+1;Pn.set(e,t)}(e);let n=Fn.get(e);if(n){for(let e of n)er(e);Fn.delete(e)}if(function(e){let t=zt.get(e);t&&(Vt?.unobserve(t),Bt.delete(t),zt.delete(e))}(e),!t||!Ct.value)return Nn.delete(e),void Pn.delete(e);Nn.set(e,t);let r=()=>{Ta(e,t)};queueMicrotask(r);let i=(Vt||typeof ResizeObserver>`u`||(Vt=new ResizeObserver(e=>{if(e.length)for(let t of e){let e=Bt.get(t.target),n=zt.get(e??-1);e!=null&&n&&Ta(e,n)}else Ea()})),Vt);if(i&&(zt.set(e,t),Bt.set(t,e),i.observe(t)),typeof window<`u`){let t=Y.value[e]?.type===`code_block`?[16,80,240,800]:Le.value?[80]:[];if(t.length){let n=t.map(e=>$n(e,r,`node-resize`)).filter(e=>e!=null);n.length&&Fn.set(e,n)}}}(e.index,t),class:`node-content`},[e.isCodeBlock?e.rendersCustomNode?(y(),P(S(e.component),ae({key:1,ref_for:!0},e.customBindings,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":L.customId,"is-dark":L.isDark,onCopy:t[8]||=e=>i(`copy`,e),onHandleArtifactClick:t[9]||=e=>i(`handleArtifactClick`,e)}),{default:T(()=>[e.hasSlotChildren?(y(),P(n,ae({key:0,ref_for:!0},rt.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`,`index-key`])):e.slotContent?(y(),P(n,ae({key:1,ref_for:!0},rt.value,{content:e.slotContent,final:!e.node.loading,"index-key":`${e.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`content`,`final`,`index-key`])):D(``,!0)]),_:2},1040,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):(y(),P(S(e.component),ae({key:2,node:e.node,loading:e.node.loading,"index-key":e.indexKey},{ref_for:!0},e.bindings,{"custom-id":L.customId,"is-dark":L.isDark,onCopy:t[10]||=e=>i(`copy`,e),onHandleArtifactClick:t[11]||=e=>i(`handleArtifactClick`,e)}),null,16,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):(y(),P(pe,{key:0,name:`fade`,css:!1!==L.fade,appear:!1!==L.fade},{default:T(()=>[e.rendersCustomNode?(y(),P(S(e.component),ae({key:0,ref_for:!0},e.customBindings,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":L.customId,"is-dark":L.isDark,onCopy:t[4]||=e=>i(`copy`,e),onHandleArtifactClick:t[5]||=e=>i(`handleArtifactClick`,e)}),{default:T(()=>[e.hasSlotChildren?(y(),P(n,ae({key:0,ref_for:!0},rt.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`nodes`,`index-key`])):e.slotContent?(y(),P(n,ae({key:1,ref_for:!0},rt.value,{content:e.slotContent,final:!e.node.loading,"index-key":`${e.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,[`content`,`final`,`index-key`])):D(``,!0)]),_:2},1040,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`])):(y(),P(S(e.component),ae({key:1,node:e.node,loading:e.node.loading,"index-key":e.indexKey},{ref_for:!0},e.bindings,{"custom-id":L.customId,"is-dark":L.isDark,onCopy:t[6]||=e=>i(`copy`,e),onHandleArtifactClick:t[7]||=e=>i(`handleArtifactClick`,e)}),null,16,[`node`,`loading`,`index-key`,`custom-id`,`is-dark`]))]),_:2},1032,[`css`,`appear`]))],512)):(y(),U(`div`,{key:1,class:`node-placeholder`,style:ne({height:`${Tr(e.index)}px`})},null,4))],8,hN))),128)),yo.value?(y(),U(`span`,{key:1,ref_key:`typewriterCursorRef`,ref:vo,class:`typewriter-cursor`,"aria-hidden":`true`},null,512)):D(``,!0),St.value?(y(),U(`div`,{key:2,class:`node-spacer`,style:ne({height:`${Nr.value}px`}),"aria-hidden":`true`},null,4)):D(``,!0)],42,fN))}}})),[[`__scopeId`,`data-v-6eca2e33`]]),_N=gN;_N.install=e=>{let t=new Set([`MarkdownRender`,`NodeRenderer`,_N.__name,_N.name].filter(e=>!!e));for(let n of t)e.component(n,gN)};var vN=Object.freeze(Object.defineProperty({__proto__:null,default:_N},Symbol.toStringTag,{value:`Module`})),yN={key:0,xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`admonition-icon`},bN={key:1,xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`admonition-icon`},xN={key:2,xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`admonition-icon`},SN={key:3,xmlns:`http://www.w3.org/2000/svg`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:`admonition-icon`},CN={class:`admonition-title`},wN=[`aria-expanded`,`aria-controls`],TN=[`id`],EN=eO(x({__name:`AdmonitionNode`,props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:[`copy`],setup(e,{emit:t}){var n;let r=e,i=t,a=R(()=>{if(r.node.title&&r.node.title.trim().length)return r.node.title;let e=r.node.kind||`note`;return e.charAt(0).toUpperCase()+e.slice(1)}),s=V(!!r.node.collapsible&&!((n=r.node.open)==null||n));function c(){r.node.collapsible&&(s.value=!s.value)}let l=`admonition-${Math.random().toString(36).slice(2,9)}`;return(t,n)=>(y(),U(`div`,{class:z([`admonition`,[`admonition-${r.node.kind}`]])},[F(`div`,{id:l,class:`admonition-legend`},[r.node.kind===`note`||r.node.kind===`info`?(y(),U(`svg`,yN,[...n[1]||=[F(`circle`,{cx:`12`,cy:`12`,r:`10`},null,-1),F(`path`,{d:`M12 16v-4`},null,-1),F(`path`,{d:`M12 8h.01`},null,-1)]])):r.node.kind===`tip`?(y(),U(`svg`,bN,[...n[2]||=[F(`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`},null,-1),F(`path`,{d:`M9 18h6`},null,-1),F(`path`,{d:`M10 22h4`},null,-1)]])):r.node.kind===`warning`||r.node.kind===`caution`?(y(),U(`svg`,xN,[...n[3]||=[F(`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`},null,-1),F(`path`,{d:`M12 9v4`},null,-1),F(`path`,{d:`M12 17h.01`},null,-1)]])):r.node.kind===`danger`||r.node.kind===`error`?(y(),U(`svg`,SN,[...n[4]||=[F(`polygon`,{points:`7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2`},null,-1),F(`path`,{d:`M12 8v4`},null,-1),F(`path`,{d:`M12 16h.01`},null,-1)]])):D(``,!0),F(`span`,CN,O(a.value),1),r.node.collapsible?(y(),U(`button`,{key:4,class:`admonition-toggle`,"aria-expanded":!s.value,"aria-controls":`${l}-content`,onClick:c},[(y(),U(`svg`,{style:ne({rotate:s.value?`0deg`:`90deg`}),xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[...n[5]||=[F(`path`,{d:`m9 18 6-6-6-6`},null,-1)]],4))],8,wN)):D(``,!0)]),E(F(`div`,{id:`${l}-content`,class:`admonition-content`,"aria-labelledby":l},[o(B(_N),{"index-key":`admonition-${e.indexKey}`,nodes:r.node.children,"custom-id":r.customId,typewriter:r.typewriter,fade:r.fade,onCopy:n[0]||=e=>i(`copy`,e)},null,8,[`index-key`,`nodes`,`custom-id`,`typewriter`,`fade`])],8,TN),[[fe,!s.value]])],2))}}),[[`__scopeId`,`data-v-a83480e1`]]);EN.install=e=>{e.component(EN.__name,EN)};var DN=()=>W(()=>import(`./d2_markstream-vue-xMoF3M5G.js`),[]),ON=null,kN=DN;function AN(){return BD(this,null,function*(){if(ON)return ON;let e=kN;if(!e)return null;let t;try{t=yield e()}catch(t){throw e===DN?Error(`Optional dependency "@terrastruct/d2" is not installed. Please install it to enable D2 diagrams.`):t}return t?(ON=function(e){if(!e)return e;if(e.D2&&typeof e.D2==`function`)return e.D2;if(e.default&&e.default.D2&&typeof e.default.D2==`function`)return e.default.D2;let t=e.default??e;return typeof t==`function`?t:t?.D2&&typeof t.D2==`function`?t.D2:t}(t),ON):null})}var jN=null,MN=null,NN=0;function PN(){return typeof MN==`function`}function FN(){return BD(this,null,function*(){if(jN)return jN;let e=MN,t=NN;if(!e)return null;let n=yield e();if(t!==NN||e!==MN)return null;let r=function(e){if(!e)return null;let t=e.default??e,n=typeof t==`function`&&typeof t.prototype?.render==`function`?t:e.Infographic??t?.Infographic;return typeof n==`function`?n:null}(n);return t!==NN||e!==MN?null:r?(jN=r,jN):null})}function IN(e){let t=Number.parseFloat(String(e??``));return Number.isFinite(t)?t:0}function LN(e,t){e?.(t)}function RN(e,t){return e?(LN(t,`readElementBoxHeight.offsetHeight`),Math.ceil(Math.max(0,e.offsetHeight||0))):0}function zN(e,t){let n=RN(e,t);if(!e||typeof window>`u`||typeof window.getComputedStyle!=`function`)return n;LN(t,`readElementOuterHeight.getComputedStyle`);let r=window.getComputedStyle(e),i=IN(r.marginTop),a=IN(r.marginBottom);return Math.ceil(Math.max(0,n+i+a))}function BN(e,t,n){if(!e)return 0;let r=function(e){return e?e.matches?.call(e,`.markstream-vue.markdown-renderer`)?e:e.querySelector(`.markstream-vue.markdown-renderer`):null}(e);if(!r)return 0;let i=Number.isFinite(n)?Number(n):zN(e,t),a=RN(r,t);return Math.max(0,i-a)}function VN(e,t,n){let r=n.getKey?.call(n,e,t)??e.id??t;return String(r)}function HN(e,t,n){return n.getKind?.call(n,e,t)??String(e.kind??``)}function UN(e,t,n){let r=n.getContent?.call(n,e,t)??e.content;return typeof r==`string`?r:``}function WN(e,t,n){let r=n.getFinal?.call(n,e,t);if(typeof r==`boolean`)return r;let i=e.final;return typeof i!=`boolean`||i}function GN(e,t,n){return n.getRevision?.call(n,e,t)??e.revision}function KN(e,t,n){let r=HN(e,t,n);return r===`assistant-markdown`||r===`markdown`||!r&&UN(e,t,n).length>0}function qN(e,t,n){let r=n.estimateItemHeight?.call(n,e,t);if(Number.isFinite(r)&&r>0)return r;let i=HN(e,t,n);return i===`assistant-markdown`||i===`markdown`?360:i===`system-divider`?44:i===`tool-call`?72:i===`thinking`?92:i===`error`?76:i===`user-message`?88:UN(e,t,n).length>0?360:96}function JN(e){return ge(e)}JN(()=>W(()=>Promise.resolve().then(()=>wI),void 0)),JN(()=>W(()=>Promise.resolve().then(()=>EI),void 0)),JN(()=>W(()=>Promise.resolve().then(()=>NI),void 0)),JN(()=>W(()=>Promise.resolve().then(()=>VF),void 0)),JN(()=>W(()=>Promise.resolve().then(()=>dF),void 0)),JN(()=>W(()=>Promise.resolve().then(()=>BI),void 0)),JN(()=>W(()=>Promise.resolve().then(()=>TI),void 0)),JN(()=>W(()=>Promise.resolve().then(()=>pL),void 0)),JN(()=>W(()=>Promise.resolve().then(()=>DL),void 0));var YN={key:0,class:`code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]`},XN={class:`flex items-center gap-0.5`},ZN=[`aria-label`],QN={class:`code-diff-stat removed`},$N={class:`code-diff-stat added`},eP=[`aria-label`],tP={key:0,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},nP={key:1,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},rP=[`aria-pressed`],iP={key:3,class:`relative`},aP=[`aria-expanded`],oP=[`disabled`],sP=[`disabled`],cP=[`disabled`],lP={key:0,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},uP={key:1,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},dP={class:`code-block-shell-content`},fP={class:`code-loading-placeholder`},pP={class:`sr-only`,"aria-live":`polite`,role:`status`},mP=x({__name:`CodeBlockShell`,props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:[`toggleCollapse`,`decreaseFont`,`resetFont`,`increaseFont`,`copy`,`toggleExpand`,`preview`],setup(e,{emit:t}){let n=e,r=t,i=V(!1),a=V(null),s=V(null);function c(){i.value=!i.value,i.value&&document.addEventListener(`click`,l,{once:!0,capture:!0})}function l(e){let t=e.target;a.value?.contains(t)||s.value?.contains(t)?document.addEventListener(`click`,l,{once:!0,capture:!0}):i.value=!1}let u=R(()=>n.showFontSizeButtons&&n.enableFontSizeControl||n.showExpandButton||n.isPreviewable&&n.showPreviewButton),{t:d}=UO(),f=R(()=>!1!==n.showTooltips);function p(e,t){f.value&&RO(e.currentTarget,t,`top`,!1,void 0,n.isDark)}function m(){f.value&&zO()}function h(e){p(e,n.copyText?d(`common.copied`)||`Copied`:d(`common.copy`)||`Copy`)}let g=R(()=>!!Number.isFinite(n.codeFontSize)&&(n.codeFontSize??0)<=(n.codeFontMin??0)),_=R(()=>!n.fontBaselineReady||n.codeFontSize===n.defaultCodeFontSize),v=R(()=>!!Number.isFinite(n.codeFontSize)&&(n.codeFontSize??0)>=(n.codeFontMax??100));return(t,l)=>(y(),U(H,null,[n.showHeader?(y(),U(`div`,YN,[C(t.$slots,`header-left`),C(t.$slots,`header-right`,{},()=>[F(`div`,XN,[e.diffStats?(y(),U(`div`,{key:0,class:`code-diff-stats`,"aria-label":e.diffStatsAriaLabel},[F(`span`,QN,`-`+O(e.diffStats.removed),1),F(`span`,$N,`+`+O(e.diffStats.added),1)],8,ZN)):D(``,!0),n.showCopyButton?(y(),U(`button`,{key:1,type:`button`,class:`code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,"aria-label":e.copyText?B(d)(`common.copied`)||`Copied`:B(d)(`common.copy`)||`Copy`,onClick:l[0]||=e=>r(`copy`),onMouseenter:l[1]||=e=>h(e),onFocus:l[2]||=e=>h(e),onMouseleave:m,onBlur:m},[e.copyText?(y(),U(`svg`,nP,[...l[14]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M20 6L9 17l-5-5`},null,-1)]])):(y(),U(`svg`,tP,[...l[13]||=[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),F(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})],-1)]]))],40,eP)):D(``,!0),n.showCollapseButton?(y(),U(`button`,{key:2,type:`button`,class:`code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,"aria-pressed":e.isCollapsed,onClick:l[3]||=e=>r(`toggleCollapse`),onMouseenter:l[4]||=t=>p(t,e.isCollapsed?B(d)(`common.expand`)||`Expand`:B(d)(`common.collapse`)||`Collapse`),onFocus:l[5]||=t=>p(t,e.isCollapsed?B(d)(`common.expand`)||`Expand`:B(d)(`common.collapse`)||`Collapse`),onMouseleave:m,onBlur:m},[(y(),U(`svg`,{style:ne({rotate:e.isCollapsed?`0deg`:`90deg`}),xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[...l[15]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m9 18l6-6l-6-6`},null,-1)]],4))],40,rP)):D(``,!0),u.value?(y(),U(`div`,iP,[F(`button`,{ref_key:`moreBtnRef`,ref:s,type:`button`,class:`code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors`,"aria-expanded":i.value,"aria-haspopup":`true`,onClick:oe(c,[`stop`]),onMouseenter:l[6]||=e=>p(e,B(d)(`common.more`)||`More`),onFocus:l[7]||=e=>p(e,B(d)(`common.more`)||`More`),onMouseleave:m,onBlur:m},[...l[16]||=[_e(`<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="1em" height="1em" viewBox="0 0 24 24" class="action-icon"><g fill="currentColor"><circle cx="12" cy="5" r="1.5"></circle><circle cx="12" cy="12" r="1.5"></circle><circle cx="12" cy="19" r="1.5"></circle></g></svg>`,1)]],40,aP),o(pe,{name:`code-menu`},{default:T(()=>[i.value?(y(),U(`div`,{key:0,ref_key:`moreMenuRef`,ref:a,class:`code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]`,role:`menu`},[n.showFontSizeButtons&&n.enableFontSizeControl?(y(),U(H,{key:0},[F(`button`,{type:`button`,role:`menuitem`,class:`flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,disabled:g.value,onClick:l[8]||=e=>r(`decreaseFont`)},[l[17]||=F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 12h14`})],-1),F(`span`,null,O(B(d)(`common.fontSmaller`)||`Font size −`),1)],8,oP),F(`button`,{type:`button`,role:`menuitem`,class:`flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,disabled:_.value,onClick:l[9]||=e=>r(`resetFont`)},[l[18]||=F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`path`,{d:`M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8`}),F(`path`,{d:`M3 3v5h5`})])],-1),F(`span`,null,O(B(d)(`common.fontReset`)||`Font size reset`),1)],8,sP),F(`button`,{type:`button`,role:`menuitem`,class:`flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors`,disabled:v.value,onClick:l[10]||=e=>r(`increaseFont`)},[l[19]||=F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 12h14m-7-7v14`})],-1),F(`span`,null,O(B(d)(`common.fontLarger`)||`Font size +`),1)],8,cP)],64)):D(``,!0),n.showExpandButton?(y(),U(`button`,{key:1,type:`button`,role:`menuitem`,class:`flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors`,onClick:l[11]||=e=>{r(`toggleExpand`,e),i.value=!1}},[e.isExpanded?(y(),U(`svg`,lP,[...l[20]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6`},null,-1)]])):(y(),U(`svg`,uP,[...l[21]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6`},null,-1)]])),F(`span`,null,O(e.isExpanded?B(d)(`common.collapse`)||`Collapse`:B(d)(`common.expand`)||`Expand`),1)])):D(``,!0),e.isPreviewable&&n.showPreviewButton?(y(),U(`button`,{key:2,type:`button`,role:`menuitem`,class:`flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors`,onClick:l[12]||=e=>{r(`preview`),i.value=!1}},[l[22]||=F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0`}),F(`circle`,{cx:`12`,cy:`12`,r:`3`})])],-1),F(`span`,null,O(B(d)(`common.preview`)||`Preview`),1)])):D(``,!0)],512)):D(``,!0)]),_:1})])):D(``,!0)])])])):D(``,!0),E(F(`div`,dP,[C(t.$slots,`default`)],512),[[fe,!(e.isCollapsed||!e.stream&&e.loading)]]),E(F(`div`,fP,[C(t.$slots,`loading`,{},()=>[l[23]||=F(`div`,{class:`loading-skeleton`},[F(`div`,{class:`skeleton-line`}),F(`div`,{class:`skeleton-line`}),F(`div`,{class:`skeleton-line short`})],-1)])],512),[[fe,!e.stream&&e.loading]]),F(`span`,pP,O(e.copyText?B(d)(`common.copied`)||`Copied`:``),1)],64))}}),hP=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),gP=!1,_P=null,vP=null,yP=!1,bP=null;function xP(){return hP(this,null,function*(){if(bP)return bP;bP=hP(null,null,function*(){if(!vP){if(yP)return null;try{if(vP=function(e){let t=e;if(typeof t?.useMonaco==`function`)return t;let n=e?.default;return typeof n?.useMonaco==`function`?n:null}(yield W(()=>import(`./__vite-optional-peer-dep_stream-monaco_markstream-vue-Cr1d6De7.js`),[])),!vP)return yP=!0,null}catch{return yP=!0,null}}try{return yield function(e){return hP(this,null,function*(){if(!gP)return _P||(_P=hP(null,null,function*(){let t=globalThis==null?void 0:globalThis.MonacoEnvironment;t&&(typeof t.getWorker==`function`||typeof t.getWorkerUrl==`function`)||typeof e?.preloadMonacoWorkers!=`function`||(yield e.preloadMonacoWorkers()),gP=!0}).finally(()=>{_P=null}),_P)})}(vP),PE(),vP}catch{return null}});try{return yield bP}finally{bP=null}})}var SP=n({default:()=>tF}),CP=Object.defineProperty,wP=Object.defineProperties,TP=Object.getOwnPropertyDescriptors,EP=Object.getOwnPropertySymbols,DP=Object.prototype.hasOwnProperty,OP=Object.prototype.propertyIsEnumerable,kP=(e,t,n)=>t in e?CP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,AP=(e,t)=>{for(var n in t||={})DP.call(t,n)&&kP(e,n,t[n]);if(EP)for(var n of EP(t))OP.call(t,n)&&kP(e,n,t[n]);return e},jP=(e,t)=>wP(e,TP(t)),MP=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),NP={class:`html-preview-frame__header`},PP={class:`html-preview-frame__title`},FP={class:`html-preview-frame__label`},IP=[`sandbox`,`srcdoc`],LP=eO(x({__name:`HtmlPreviewFrame`,props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(e){let t=e,{t:n}=UO(),r=R(()=>{let 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>`}),i=R(()=>{return e=t.htmlPreviewSandbox,n=t.htmlPreviewAllowScripts,typeof e==`string`?e:e===void 0&&!0===n?`allow-scripts`:``;var e,n});function a(e){var n;e.key!==`Escape`&&e.key!==`Esc`||(n=t.onClose)==null||n.call(t)}return l(()=>{typeof window<`u`&&window.addEventListener(`keydown`,a)}),f(()=>{typeof window<`u`&&window.removeEventListener(`keydown`,a)}),(e,a)=>(y(),P(te,{to:`body`},[F(`div`,{class:z([`markstream-vue`,{dark:t.isDark}])},[F(`div`,{class:`html-preview-frame__backdrop`,onClick:a[2]||=e=>t.onClose?.call(t)},[F(`div`,{class:`html-preview-frame`,onClick:a[1]||=oe(()=>{},[`stop`])},[F(`div`,NP,[F(`div`,PP,[a[3]||=F(`span`,{class:`html-preview-frame__dot`},null,-1),F(`span`,FP,O(t.title||B(n)(`common.preview`)||`Preview`),1)]),F(`button`,{type:`button`,class:`html-preview-frame__close`,onClick:a[0]||=e=>t.onClose?.call(t)},` × `)]),F(`iframe`,{class:`html-preview-frame__iframe`,sandbox:i.value,referrerpolicy:`no-referrer`,srcdoc:r.value},null,8,IP)])])],2)]))}}),[[`__scopeId`,`data-v-24e66176`]]),RP=null,zP=null,BP=null,VP=null,HP=null,UP=null,WP=new WeakMap,GP=0,KP=[`data-markstream-enhanced`,`data-markstream-pending`],qP={class:`code-header-main`},JP=[`innerHTML`],YP={class:`code-header-copy`},XP={class:`code-header-title`},ZP={key:0,class:`code-header-caption`},QP={class:`code-editor-layer`},$P=`__markstreamMonacoPassiveTouchState__`,eF=1.5,tF=eO(x({__name:`CodeBlockNode`,props:{node:{},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},theme:{},darkTheme:{default:`vitesse-dark`},lightTheme:{default:`vitesse-light`},isShowPreview:{type:Boolean,default:!0},monacoOptions:{},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},themes:{},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},customId:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},estimatedHeightPx:{},estimatedContentHeightPx:{}},emits:[`previewCode`,`copy`],setup(e,{emit:t}){let n=e,r=t,i=u(),a=I(mE,null),s=I(`markstreamHostScrollManaged`,null),l=R(()=>WO(n,i)),d=c(),m=R(()=>{let e=d?.vnode.props;return!(!e||!e.onPreviewCode&&!e.onPreviewCode)}),{t:g}=UO(),_=V(null),b=V(null),x=V(!1),S=V(Sn(n.node.language,n.node.code,xn())),w=R(()=>kE(S.value)),k=R(()=>w.value===`plaintext`),j=V(!1),M=V(!1),N=V(!1),ee=V(!1),te=V(!1),re=V(!1),ie=!1,ae=null,oe=``,L=V(null),se=V(null),ce=0,le=0,ue=fA(),de=V(null),pe=V(typeof window>`u`);typeof window<`u`&&p(()=>b.value,e=>{var t;if((t=de.value)==null||t.destroy(),de.value=null,!e)return void(pe.value=!1);let n=ue(e,{rootMargin:`400px`});de.value=n,pe.value=n.isVisible.value,n.whenVisible.then(()=>{pe.value=!0})},{immediate:!0}),v(()=>{var e;ie=!0,function(){let e=oe;a&&e&&(oe=``,a.markSettled(e))}(),(e=de.value)==null||e.destroy(),de.value=null});let me=null,H=null,he=()=>{},ge=()=>{},_e=()=>null,ve=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),W=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),ye=()=>{},be=()=>{},xe=()=>{},Se=null,Ce=null,we=()=>String(n.node.language??`plaintext`),Te=()=>MP(null,null,function*(){}),G=!1,Ee=[],De=[],K=null;function Oe(e){return(String(e??``).trim().split(/\s+/,1)[0]??``)===`diff`}let q=R(()=>!0===n.node.diff||Oe(n.node.language)||Oe(Tn(String(n.node.raw??``)))),ke=V({removed:0,added:0}),Ae=R(()=>`-${ke.value.removed} +${ke.value.added}`),je=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5}),Me=Object.freeze(jP(AP({},je),{enabled:!1,revealLineCount:0}));function Ne(e){var t;if(typeof e==`boolean`)return e;if(e&&typeof e==`object`){let n=e;return jP(AP(AP({},je),n),{enabled:(t=n.enabled)==null||t})}return AP({},je)}function Pe(e){var t;if(!1===e.renderSideBySide)return!0;if(!0!==e.useInlineViewWhenSpaceIsLimited)return!1;let n=e.renderSideBySideInlineBreakpoint,r=typeof n==`number`&&Number.isFinite(n)?n:900,i=((t=b.value)?.getBoundingClientRect)?.call(t).width||b.value?.clientWidth||(typeof window>`u`?0:window.innerWidth);return i>0&&i<=r}function Fe(e,t){return{original:Ie(e,!1),updated:Ie(t,!1)}}function Ie(e,t){let n=String(e??``);return t?n:n.replace(/\r\n$|\n$|\r$/,``)}function Le(e){return String(e?.message??e).includes(`no diff result available`)}function Re(){try{let e=xe();e&&typeof e.catch==`function`&&e.catch(e=>{Le(e)})}catch(e){Le(e)}}let ze=R(()=>{var e,t;let r=n.monacoOptions?AP({},n.monacoOptions):{};if(!q.value)return r;let i=r.diffHideUnchangedRegions===void 0?AP({},je):Ne(r.diffHideUnchangedRegions),a=r.hideUnchangedRegions===void 0?void 0:Ne(r.hideUnchangedRegions),o=!1!==n.stream&&!1!==n.loading,s=o?AP({},Me):i,c=o?AP({},Me):a,l=function(e){return e.diffWordWrap===void 0?`off`:e.diffWordWrap}(r),u=AP({},r.experimental??{}),d=r.diffUnchangedRegionStyle??`line-info`,f=function(e){if(Pe(e))return jP(AP({},e.scrollbar&&typeof e.scrollbar==`object`?e.scrollbar:{}),{horizontal:`hidden`,horizontalScrollbarSize:0})}(r);return AP(jP(AP(jP(AP(AP({},{maxComputationTime:0,diffAlgorithm:`legacy`,ignoreTrimWhitespace:!1,renderIndicators:!0,diffUpdateThrottleMs:120,renderLineHighlight:`none`,renderLineHighlightOnlyWhenFocus:!0,selectionHighlight:!1,occurrencesHighlight:`off`,matchBrackets:`never`,lineDecorationsWidth:4,lineNumbersMinChars:2,glyphMargin:!1,minimap:{enabled:!1},renderOverviewRuler:!1,overviewRulerBorder:!1,hideCursorInOverviewRuler:!0,scrollBeyondLastLine:!1,diffWordWrap:l,renderSideBySide:(e=r.renderSideBySide)==null||e,diffHideUnchangedRegions:s,useInlineViewWhenSpaceIsLimited:(t=r.useInlineViewWhenSpaceIsLimited)!=null&&t,diffLineStyle:`background`,diffAppearance:`auto`,diffUnchangedRegionStyle:d,diffHunkActionsOnHover:!1,experimental:u}),r),{experimental:u}),c===void 0?{}:{hideUnchangedRegions:c}),{diffHideUnchangedRegions:s,diffWordWrap:l}),f===void 0?{}:{scrollbar:f})}),Be=R(()=>q.value?`diff`:`single`),Ve=V(Be.value),He=V(!1),Ue=V(!1),We=V(!1),Ge=V(!1),Ke=V(!1),qe=null,Je=R(()=>{if(q.value){let e=ze.value?.diffWordWrap;if(e===`inherit`){let e=n.monacoOptions?.wordWrap;return e==null||String(e)!==`off`}return e===`on`}let e=n.monacoOptions?.wordWrap;return e==null||String(e)!==`off`}),Ye=R(()=>!!q.value&&Pe(ze.value??{}));function Xe(e){return!0===s?.value||!!e&&(!!e.closest(`[data-markstream-virtual-timeline="1"], .markstream-virtual-timeline`)||!!e.closest(`.vue-recycle-scroller, [data-virtualizer], [data-virtual-scroll-root]`))}let J=R(()=>Xe(b.value)),Ze=R(()=>!He.value&&(!!We.value||(q.value||J.value||!NE())&&!Ue.value)),Qe=R(()=>Ze.value||Ge.value),$e=R(()=>Ze.value&&!Ge.value),et=R(()=>!He.value&&!We.value&&(Ze.value||Ge.value||Ke.value)),tt=V(!1),nt=R(()=>Ie(n.node.code,!0===n.node.loading)),Y=R(()=>q.value?!0===n.node.diff?n.node:jP(AP({},n.node),{diff:!0}):nt.value===n.node.code?n.node:jP(AP({},n.node),{code:nt.value}));typeof window<`u`&&MP(null,null,function*(){try{let e=yield xP();if(ie)return;if(!e)return void(He.value=!0);let t=e.useMonaco,r=e.detectLanguage;if(typeof r==`function`&&(we=r),typeof t==`function`){let e=Hn();if(e&&n.themes&&Array.isArray(n.themes)&&!n.themes.includes(e))throw Error(`Preferred theme not in provided themes array`);K=Kn();let r=t(K);me=r.createEditor||me,H=r.createDiffEditor||H,he=r.updateCode||he,ge=r.updateDiff||ge,_e=r.getEditor||_e,ve=r.getEditorView||ve,W=r.getDiffEditorView||W,ye=r.cleanupEditor||ye,be=r.safeClean||r.cleanupEditor||be,xe=r.refreshDiffPresentation||xe,Te=r.setTheme||Te,re.value=!0,!ie&&_.value&&(yield Ln(_.value))}}catch{if(ie)return;He.value=!0}});let rt=V(typeof n.monacoOptions?.fontSize==`number`?n.monacoOptions.fontSize:NaN),it=V(rt.value),at=V(null),ot=V(null),st=R(()=>{let e=rt.value,t=it.value;return typeof e==`number`&&Number.isFinite(e)&&e>0&&typeof t==`number`&&Number.isFinite(t)&&t>0}),ct=R(()=>{let e=at.value;if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e;let t=n.monacoOptions?.fontSize;if(typeof t==`number`&&Number.isFinite(t)&&t>0)return t;let r=it.value;return typeof r==`number`&&Number.isFinite(r)&&r>0?r:12}),lt=R(()=>{let e=ot.value;if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e;let t=n.monacoOptions?.lineHeight;return typeof t==`number`&&Number.isFinite(t)&&t>0?t:ct.value===12?18:Math.max(12,Math.round(1.5*ct.value))}),ut=R(()=>lt.value);function dt(e){let t=String(e??``);return t?Math.max(1,t.split(/\r\n|\n|\r/).length):1}function ft(e){return e.startsWith(`-`)&&!e.startsWith(`---`)}function pt(e){return e.startsWith(`+`)&&!e.startsWith(`+++`)}function mt(e){let t=e.some(e=>ft(e)),r=e.some(e=>pt(e));return t&&r||Oe(n.node.language)&&(t||r)||Oe(Tn(String(n.node.raw??``)))&&(t||r)}let X=R(()=>Ye.value?function(){let e=String(n.node.code??``).split(/\r\n|\n|\r/);if(mt(e))return Math.max(1,e.length);let t=String(n.node.originalCode??``).split(/\r\n|\n|\r/),r=String(n.node.updatedCode??``).split(/\r\n|\n|\r/),i=0,a=t.length-1,o=r.length-1;for(;i<=a&&i<=o&&t[i]===r[i];)i++;let s=0;for(;a>=i&&o>=i&&t[a]===r[o];)s++,a--,o--;let c=Math.max(0,a-i+1),l=Math.max(0,o-i+1);return Math.max(1,i+c+l+s)}():function(){let e=String(n.node.code??``).split(/\r\n|\n|\r/);if(!mt(e)&&(n.node.originalCode!=null||n.node.updatedCode!=null))return Math.max(dt(n.node.originalCode),dt(n.node.updatedCode));let t=0,r=0;for(let n of e)ft(n)?t++:(pt(n)||t++,r++);return Math.max(1,t,r)}()),Z=R(()=>{let e=n.monacoOptions?.tabSize;return typeof e==`number`&&Number.isFinite(e)&&e>0?e:4}),ht=R(()=>{let e=n.monacoOptions?.padding;return{top:typeof e?.top==`number`&&Number.isFinite(e.top)&&e.top>0?e.top:0,bottom:typeof e?.bottom==`number`&&Number.isFinite(e.bottom)&&e.bottom>0?e.bottom:0}}),gt=R(()=>{let e=n.estimatedContentHeightPx;return typeof e==`number`&&Number.isFinite(e)&&e>0?e:null});function _t(e){if(e==null)return null;let t=Math.ceil(e);return!Number.isFinite(t)||t<=0?null:Math.min(t,Math.ceil(yn()))}let vt=R(()=>q.value?Math.ceil(X.value*ut.value):gt.value==null?Math.ceil((e=>{let t=String(e??``);return t?Math.max(1,t.split(/\r\n|\n|\r/).length):1})(nt.value)*(lt.value+eF)+1):null),Q=R(()=>{if(q.value){let e=vt.value,t=wt();return _t(t!=null&&e!=null?Math.max(e,t):t??e)}let e=gt.value;return _t(e??vt.value)}),yt=R(()=>{let e=n.estimatedHeightPx;return typeof e==`number`&&Number.isFinite(e)&&e>0?e:null}),bt=V(null),xt=V(null);function St(){let e=bt.value;return typeof e==`number`&&Number.isFinite(e)&&e>0?Math.round(e):null}function Ct(){return q.value&&!1!==n.stream&&(!1!==n.loading||Ze.value||Ge.value||Ke.value)}function wt(){if(!Ct())return null;let e=xt.value;return typeof e==`number`&&Number.isFinite(e)&&e>0?Math.round(e):null}function Tt(e){if(!Ct()||e==null)return;let t=Math.min(Math.ceil(e),Math.ceil(yn()));if(!Number.isFinite(t)||t<=0)return;let n=wt();xt.value=n==null?t:Math.max(n,t)}let Et=R(()=>St()??(Ze.value||!Ue.value?Q.value:null)),Dt=R(()=>{let e=n.monacoOptions?.fontFamily,t=_t(gt.value),r=_t(vt.value),i=AP(AP({fontSize:`${ct.value}px`,lineHeight:`${ut.value}px`,tabSize:Z.value,boxSizing:`border-box`,maxHeight:`${yn()}px`,overflow:`auto`,paddingTop:`${ht.value.top}px`,paddingBottom:`${ht.value.bottom}px`},q.value?function(e){if(e==null)return{};let t=Math.ceil(e),n=Math.ceil(yn()),r=Math.min(t,n);return t>=n?{height:`${r}px`,minHeight:`${r}px`}:{minHeight:`${t}px`}}(Q.value):t==null?r==null?{}:{minHeight:`${r}px`}:{height:`${t}px`,minHeight:`${t}px`}),typeof e==`string`&&e.trim()?{"--markstream-code-font-family":e.trim()}:{});return i[`--markstream-pre-line-number-top`]=`${ht.value.top}px`,i[`--markstream-code-padding-left`]=`62px`,i[`--markstream-pre-line-number-width`]=`36px`,i[`--markstream-pre-line-number-gap`]=`0px`,q.value&&(i[`--markstream-pre-diff-line-height`]=`${ut.value}px`,i[`--markstream-pre-diff-pane-bottom-padding`]=`10px`),i}),Ot=R(()=>Et.value!=null&&(!Ue.value||St()!=null)),kt=R(()=>{let e=Et.value;if(e==null)return null;if(q.value)return Math.ceil(e);let t=yt.value,n=gt.value;if(t==null||n==null)return Math.ceil(e);let r=Math.max(0,Math.ceil(t)-Math.ceil(n));return Math.ceil(e+r)}),At=R(()=>{if(q.value&&Ze.value)return;let e=Et.value;return Ot.value&&e!=null?{minHeight:`${e}px`}:void 0});function jt(){qe!=null&&typeof window<`u`&&window.clearTimeout(qe),qe=null}function Mt(){if(!q.value||!te.value||!Ue.value||Ge.value||Ke.value)return!1;let e=_.value;return!!e&&Jt(e)}function Nt(e,t=!1,n={}){let r=Math.ceil(e),i=St();if(i==null)return r;let a=!0===n.allowBelowEstimatedFloor||Mt();return r>=i||a?((t||a)&&te.value&&(bt.value=null),r):i}function Pt(){return new Promise(e=>{AD(()=>e())})}function Ft(){try{let e=_.value;if(!e)return null;let t=e.querySelector(`.view-lines .view-line`);if(t){let e=Math.ceil(t.getBoundingClientRect().height);if(e>0)return e}}catch{}return null}function It(){var e;try{let t=q.value?((e=W())?.getModifiedEditor)?.call(e)??W():ve(),n=_e()?.EditorOption?.fontInfo;if(t&&n!=null){let e=t.getOption?.call(t,n)?.fontSize;if(typeof e==`number`&&Number.isFinite(e)&&e>0)return e}}catch{}try{let e=_.value;if(e){let t=e.querySelector(`.view-lines .view-line`);if(t)try{if(typeof window<`u`&&typeof window.getComputedStyle==`function`){let e=window.getComputedStyle(t).fontSize,n=e&&e.match(/^(\d+(?:\.\d+)?)/);if(n)return Number.parseFloat(n[1])}}catch{}}}catch{}return null}function Lt(e){try{let t=_e()?.EditorOption?.lineHeight;if(t!=null){let n=(e?.getOption)?.call(e,t);if(typeof n==`number`&&n>0)return n}}catch{}let t=Ft();if(t&&t>0)return t;let n=Number.isFinite(it.value)&&it.value>0?it.value:14;return Math.max(12,Math.round(1.35*n))}function Rt(e){try{let t=_e()?.EditorOption?.padding;if(t!=null){let n=(e?.getOption)?.call(e,t),r=typeof n?.top==`number`?n.top:0,i=typeof n?.bottom==`number`?n.bottom:0;if(r>0||i>0)return r+i}}catch{}let t=ze.value?.padding,n=typeof t?.top==`number`?t.top:0,r=typeof t?.bottom==`number`?t.bottom:0;return n>0||r>0?n+r:q.value?24:0}function zt(e,t){return typeof e!=`number`||typeof t!=`number`||e<1||t<e?0:t-e+1}function Bt(e){if(!e)return[];let t=e.split(/\r?\n/);return t.length===1&&t[0]===``?[]:t}function Vt(){q.value?ke.value=function(e,t){let n=Bt(e),r=Bt(t),i=0,a=n.length-1,o=r.length-1;for(;i<=a&&i<=o&&n[i]===r[i];)i++;for(;a>=i&&o>=i&&n[a]===r[o];)a--,o--;return{removed:Math.max(0,a-i+1),added:Math.max(0,o-i+1)}}(String(n.node.originalCode??``),String(n.node.updatedCode??``)):ke.value={removed:0,added:0}}function Ht(){if(q.value)try{let e=W(),t=(e?.getLineChanges)?.call(e);if(!Array.isArray(t))return void Vt();let n=0,r=0;for(let e of t)n+=zt(e.originalStartLineNumber,e.originalEndLineNumber),r+=zt(e.modifiedStartLineNumber,e.modifiedEndLineNumber);ke.value={removed:n,added:r}}catch{Vt()}else ke.value={removed:0,added:0}}function Ut(){if(Number.isFinite(it.value)&&it.value>0&&Number.isFinite(rt.value))return it.value;let e=It();return typeof n.monacoOptions?.fontSize==`number`?(rt.value=n.monacoOptions.fontSize,it.value=n.monacoOptions.fontSize,it.value):e&&e>0?(rt.value=e,it.value=e,e):(rt.value=12,it.value=12,12)}function Wt(){let e=Ut();it.value=Math.min(36,e+1)}function Gt(){let e=Ut();it.value=Math.max(10,e-1)}function Kt(){Ut(),Number.isFinite(rt.value)&&(it.value=rt.value)}function qt(){var e,t,n,r,i;try{let a=q.value?W():null,o=q.value?a:ve();if(!o)return null;if(a?.getOriginalEditor&&a?.getModifiedEditor){let i=a.getOriginalEditor?.call(a),o=a.getModifiedEditor?.call(a);(e=i?.layout)==null||e.call(i),(t=o?.layout)==null||t.call(o);let s=(i?.getContentHeight)?.call(i)||0,c=(o?.getContentHeight)?.call(o)||0,l=Math.max(s,c);if(l>0)return Math.ceil(l+1);let u=((n=(i?.getModel)?.call(i))?.getLineCount)?.call(n)||1,d=((r=(o?.getModel)?.call(o))?.getLineCount)?.call(r)||1,f=Math.max(u,d),p=Math.max(Lt(i),Lt(o));return Math.ceil(f*(p+eF)+0+1)}if(o?.getContentHeight){(i=o?.layout)==null||i.call(o);let e=o.getContentHeight();if(e>0)return Math.ceil(e+1)}let s=(o?.getModel)?.call(o),c=1;s&&typeof s.getLineCount==`function`&&(c=s.getLineCount());let l=Lt(o);return Math.ceil(c*(l+eF)+0+1)}catch{return null}}function Jt(e){if(typeof window>`u`)return!1;let t=e.getBoundingClientRect();if(t.width<=0||t.height<=0)return!1;let n=e.querySelectorAll(`.editor.modified .diff-hidden-lines .center, .stream-monaco-diff-unchanged-bridge`);for(let e of Array.from(n)){if(!(e instanceof HTMLElement))continue;let n=window.getComputedStyle(e);if(n.display===`none`||n.visibility===`hidden`||Number.parseFloat(n.opacity||`1`)<=.01)continue;let r=e.getBoundingClientRect();if(!(r.width<=0||r.height<=0||r.bottom<=t.top||r.top>=t.bottom))return!0}return!1}function Yt(e){let t=String(e??``).trim(),n=t.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i)?.[1];if(n){let e=n.length===3?n.split(``).map(e=>`${e}${e}`).join(``):n;return .2126*Number.parseInt(e.slice(0,2),16)+.7152*Number.parseInt(e.slice(2,4),16)+.0722*Number.parseInt(e.slice(4,6),16)}let r=t.match(/\d+(?:\.\d+)?/g);if(!r||r.length<3)return null;let[i,a,o]=r.slice(0,3).map(Number);return .2126*i+.7152*a+.0722*o}function Xt(){let e=_.value?.parentElement;return e instanceof HTMLElement?e:null}function Zt(e,t){var n;t==null||!Number.isFinite(t)||t<=0||(n=Xt())==null||n.style.setProperty(e,`${t}px`)}function Qt(){var e;if($t())return;let t=It();t&&t>0&&(at.value=t,it.value=t,rt.value=t);try{let t=Lt(q.value?((e=W())?.getModifiedEditor)?.call(e)??W():ve());t&&t>0&&(ot.value=t)}catch{}try{let e=Ft();e&&e>0&&(ot.value=e)}catch{}}function $t(){return q.value&&Qe.value}function en(){if(!q.value||!Ze.value&&!Ge.value&&!Ke.value)return null;let e=_.value,t=b.value?.querySelector(`pre.code-pre-fallback`);if(!e||!t)return null;let n=Math.ceil(t.getBoundingClientRect().height);return!Number.isFinite(n)||n<=0?null:(e.style.height=`${n}px`,e.style.minHeight=`${n}px`,e.style.maxHeight=`${Math.ceil(yn())}px`,e.style.overflow=`hidden`,n)}function tn(){let e=_.value,t=b.value;if(!e||!t)return;let n=e,r=e.querySelector(`.monaco-editor`)||e,i=r.querySelector(`.monaco-editor-background`)||r,a=r.querySelector(`.view-lines`)||r,o=null,s=null,c=null;try{typeof window<`u`&&typeof window.getComputedStyle==`function`&&(o=window.getComputedStyle(r),s=i===r?o:window.getComputedStyle(i),c=a===r?o:window.getComputedStyle(a))}catch{o=null,s=null,c=null}let l=String(o?.getPropertyValue(`--vscode-editor-foreground`)??``).trim(),u=String(o?.getPropertyValue(`--vscode-editor-background`)??``).trim(),d=String(o?.getPropertyValue(`--vscode-editor-selectionBackground`)??o?.getPropertyValue(`--vscode-editor-hoverHighlightBackground`)??``).trim(),f=l||String(c?.color??o?.color??``).trim(),p=u||String(s?.backgroundColor??o?.backgroundColor??``).trim();q.value?(f?(t.style.setProperty(`--markstream-diff-editor-fg`,f),n.style.setProperty(`--vscode-editor-foreground`,f),n.style.setProperty(`--stream-monaco-editor-fg`,f)):(t.style.removeProperty(`--markstream-diff-editor-fg`),n.style.removeProperty(`--vscode-editor-foreground`),n.style.removeProperty(`--stream-monaco-editor-fg`)),p?(t.style.setProperty(`--markstream-diff-editor-bg`,p),t.style.setProperty(`--markstream-diff-panel-bg`,p),t.style.setProperty(`--markstream-diff-panel-bg-soft`,p),t.style.setProperty(`--markstream-diff-panel-bg-strong`,p),n.style.setProperty(`--vscode-editor-background`,p),n.style.setProperty(`--stream-monaco-editor-bg`,p),n.style.setProperty(`--stream-monaco-fixed-editor-bg`,p),n.style.setProperty(`--stream-monaco-panel-bg`,p),n.style.setProperty(`--stream-monaco-panel-bg-soft`,p),n.style.setProperty(`--stream-monaco-panel-bg-strong`,p),n.style.backgroundColor=p):(t.style.removeProperty(`--markstream-diff-editor-bg`),t.style.removeProperty(`--markstream-diff-panel-bg`),t.style.removeProperty(`--markstream-diff-panel-bg-soft`),t.style.removeProperty(`--markstream-diff-panel-bg-strong`),n.style.removeProperty(`--vscode-editor-background`),n.style.removeProperty(`--stream-monaco-editor-bg`),n.style.removeProperty(`--stream-monaco-fixed-editor-bg`),n.style.removeProperty(`--stream-monaco-panel-bg`),n.style.removeProperty(`--stream-monaco-panel-bg-soft`),n.style.removeProperty(`--stream-monaco-panel-bg-strong`),n.style.backgroundColor=``),d?n.style.setProperty(`--vscode-editor-selectionBackground`,d):n.style.removeProperty(`--vscode-editor-selectionBackground`)):function(e,t,n){if(!k.value)return!1;let r=Yt(e),i=Yt(t);return n?r!=null&&r>170||i!=null&&i<110:r!=null&&r<85||i!=null&&i>190}(p,f,t.classList.contains(`is-dark`))?(n.style.removeProperty(`--vscode-editor-foreground`),n.style.removeProperty(`--vscode-editor-background`),n.style.removeProperty(`--vscode-editor-selectionBackground`)):(f&&n.style.setProperty(`--vscode-editor-foreground`,f),p&&n.style.setProperty(`--vscode-editor-background`,p),d&&n.style.setProperty(`--vscode-editor-selectionBackground`,d))}let nn=0,rn=0,an=/auto|scroll|overlay/i;function on(e,t,n){if(typeof window>`u`||q.value||function(e){return J.value||Xe(e)}(e))return;let r=Math.ceil(n)-Math.ceil(t);if(Math.abs(r)<=1)return;let i=function(e){if(typeof window>`u`)return null;let t=e?.ownerDocument??document,n=t.scrollingElement||t.documentElement||t.body,r=e?.parentElement??null;for(;r&&r!==t.body&&r!==n;){let e=window.getComputedStyle(r),t=(e.overflowY||``).toLowerCase(),n=(e.overflow||``).toLowerCase();if(an.test(t)||an.test(n))return r;r=r.parentElement}return n}(e);if(!i)return;let a=e.ownerDocument??document,o=i===a.body||i===a.documentElement||i===a.scrollingElement,s=o?0:i.getBoundingClientRect().top;e.getBoundingClientRect().top-s>=0||(o&&typeof window.scrollBy==`function`?window.scrollBy(0,r):i.scrollTop+=r)}function sn(){try{let e=_.value;if(!e)return;let t=e.getBoundingClientRect().height,n=qt();if(n!=null&&n>0){let r=Nt(n,!0),i=St();e.style.minHeight=i==null?`0px`:`${i}px`,e.style.height=`${r}px`,e.style.maxHeight=`none`,e.style.overflow=`visible`,on(e,t,r);return}let r=St();r!=null&&(e.style.minHeight=`${r}px`,e.style.height=`${r}px`,e.style.maxHeight=`none`,e.style.overflow=`visible`,on(e,t,r))}catch{}}function cn(){for(var e,t;Ee.length>0;)try{(t=(e=Ee.pop())?.dispose)==null||t.call(e)}catch{}ae!=null&&(jD(ae),ae=null)}function ln(){for(var e;De.length>0;)try{(e=De.pop())==null||e()}catch{}}function un(e=!1){M.value||(j.value?sn():function(){try{let e=_.value;if(!e)return;let t=e.getBoundingClientRect().height,n=yn(),r=Math.ceil(e.getBoundingClientRect?.call(e).height||0),i=q.value?function(){var e,t;try{let n=W(),r=(n?.getOriginalEditor)?.call(n),i=(n?.getModifiedEditor)?.call(n);if(!r||!i)return null;let a=((e=r.getModel?.call(r))?.getLineCount)?.call(e)||1,o=((t=i.getModel?.call(i))?.getLineCount)?.call(t)||1,s=Math.max(a,o),c=Math.max(Lt(r),Lt(i)),l=Math.max(Rt(r),Rt(i));return Math.ceil(s*(c+eF)+l+0+1)}catch{return null}}():null,a=q.value&&Jt(e),o=a&&te.value&&Ue.value&&!Ge.value&&!Ke.value;if(a||(se.value=null),le>0&&(le--,L.value!=null))return void on(e,t,hn(e,L.value,n,{allowBelowEstimatedFloor:o}));if(q.value&&(Ze.value||Ge.value||Ke.value)){let r=en();if(r!=null){let i=hn(e,r,n,{allowBelowEstimatedFloor:!0});fn(!0),on(e,t,i);return}}let s=q.value?function(e){if(typeof window>`u`)return null;try{let t=e.getBoundingClientRect(),n=window.getComputedStyle(e);if(n.display===`none`||n.visibility===`hidden`)return null;let r=[`.editor.original .view-lines .view-line`,`.editor.modified .view-lines .view-line`,`.editor.original .view-zones > div`,`.editor.modified .view-zones > div`,`.editor.original .margin-view-zones > div`,`.editor.modified .margin-view-zones > div`,`.editor.original .diff-hidden-lines`,`.editor.modified .diff-hidden-lines`,`.stream-monaco-diff-unchanged-bridge`],i=0;for(let n of Array.from(e.querySelectorAll(r.join(`,`)))){if(!(n instanceof HTMLElement))continue;let e=window.getComputedStyle(n);if(e.display===`none`||e.visibility===`hidden`||Number.parseFloat(e.opacity||`1`)<=.01)continue;let r=n.getBoundingClientRect();r.height<=0||r.bottom<=t.top||(i=Math.max(i,r.bottom-t.top))}if(i>0)return Math.ceil(i);let a=e.querySelector(`.monaco-diff-editor`),o=(a?.getBoundingClientRect)?.call(a).height??0;return o>0?Math.ceil(o+1):null}catch{return null}}(e):null,c=q.value&&Ye.value&&!a&&s!=null?Math.ceil(s+10):s,l;if(l=q.value?a?s:Ye.value&&c!=null||i==null?c:Math.max(c??0,i):qt(),l!=null&&l>0){let i=se.value!=null&&Date.now()<ce&&l>=n-1,s=a&&r>0&&r<n-1&&l>=n-1,c=hn(e,i?se.value:s?r:l,n,{clearEstimatedFloor:!0,allowBelowEstimatedFloor:o});a&&c<n-1&&(se.value=c,ce=Date.now()+160),on(e,t,c);return}if(L.value!=null)return void on(e,t,hn(e,L.value,n,{allowBelowEstimatedFloor:o}));let u=a?r:Math.max(r,i!=null&&i>0?i:0);if(u>0){let i=se.value!=null&&Date.now()<ce&&u>=n-1,s=a&&r>0&&r<n-1&&u>=n-1,c=hn(e,i?se.value:s?r:u,n,{allowBelowEstimatedFloor:o});a&&c<n-1&&(se.value=c,ce=Date.now()+160),on(e,t,c);return}let d=St();if(d!=null)return void on(e,t,hn(e,d,n,{allowBelowEstimatedFloor:o}));let f=Number.parseFloat(e.style.height);!Number.isNaN(f)&&f>0?on(e,t,hn(e,f,n,{allowBelowEstimatedFloor:o})):q.value||on(e,t,hn(e,n,n))}catch{}}())}function dn(){nn=0,rn=0}function fn(e=!1){let t=_.value;if(!t)return;let n=q.value?W():ve();if(n&&typeof n.layout==`function`)try{let r=t.getBoundingClientRect?.call(t),i=Math.ceil((r?.width??0)||t.clientWidth||0),a=Math.ceil((r?.height??0)||t.clientHeight||Number.parseFloat(t.style.height||``)||0);if(i>0&&a>0){if(!e&&i===nn&&a===rn)return;nn=i,rn=a,n.layout({width:i,height:a})}else dn(),n.layout()}catch{}}function pn(){if(!q.value)return void ln();let e=_.value;if(!e)return void ln();let t=e.querySelector(`.monaco-diff-editor`);if(!t||t.classList.contains(`side-by-side`))return void ln();let n=Array.from(t.querySelectorAll(`.editor.original .diff-hidden-lines`)),r=Array.from(t.querySelectorAll(`.editor.modified .diff-hidden-lines`)),i=Math.min(n.length,r.length);for(let e=0;e<i;e++){let t=r[e],n=t.querySelector(`a`),i=t.querySelector(`.center > div:first-child`),a=t.querySelector(`.center`);if(!n||!i||!a||a.querySelector(`.markstream-inline-fold-proxy`))continue;let o=document.createElement(`button`);o.type=`button`,o.className=`markstream-inline-fold-proxy`,o.dataset.markstreamInlineFoldProxy=`true`;let s=n.getAttribute(`title`)||`Show Unchanged Region`;o.title=s,o.setAttribute(`aria-label`,s);let c=e=>{e.preventDefault(),e.stopPropagation()},l=e=>{e.preventDefault(),e.stopPropagation(),n.click(),AD(()=>mn())},u=e=>{e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),e.stopPropagation(),n.click(),AD(()=>mn()))};o.addEventListener(`mousedown`,c),o.addEventListener(`click`,l),o.addEventListener(`keydown`,u),a.appendChild(o),De.push(()=>{o.removeEventListener(`mousedown`,c),o.removeEventListener(`click`,l),o.removeEventListener(`keydown`,u),o.parentElement===a&&a.removeChild(o)})}}function mn(e=!1){ae??=AD(()=>{ae=null,AD(()=>{pn(),un(e),fn()})})}function hn(e,t,n,r={}){Tt(t);let i=wt(),a=i==null?t:Math.max(t,i),o=Math.min(a,n),s=!0===r.allowBelowEstimatedFloor||Mt(),c=Nt(o,!0===r.clearEstimatedFloor,{allowBelowEstimatedFloor:s}),l=St();if(e.style.minHeight=l==null||s?`0px`:`${Math.min(l,Math.ceil(n))}px`,e.style.height=`${c}px`,e.style.maxHeight=`${Math.ceil(n)}px`,q.value)e.style.overflow=`hidden`;else{let t=a>n+1;e.style.overflow=t?`auto`:`hidden`}return c}function gn(e=_.value){return!!e?.querySelector(`.monaco-diff-editor .view-lines .view-line`)}function _n(){let e=W();return typeof e?.getOriginalEditor==`function`||typeof e?.getModifiedEditor==`function`||typeof e?.getLineChanges==`function`}function vn(e,t,n){return MP(this,null,function*(){try{yield ge(e,t,n);return}catch(e){if(!Le(e))throw e}if(yield h(),yield Pt(),!ie&&q.value)try{yield ge(e,t,n)}catch(e){if(!Le(e))throw e}})}function yn(){let e=n.monacoOptions?.MAX_HEIGHT??500;if(typeof e==`number`)return e;let t=String(e).match(/^(\d+(?:\.\d+)?)/);return t?Number.parseFloat(t[1]):500}let bn=R(()=>n.isShowPreview&&(S.value===`html`||S.value===`svg`));function xn(){return typeof n.node.loading==`boolean`?n.node.loading:!0===n.loading}function Sn(e,t,n){return n&&!String(t??``)?`plain`:OE(String(e??``))}function Cn(){return!(!xn()||q.value&&(String(n.node.originalCode??``)||String(n.node.updatedCode??``))||String(n.node.code??``))}p(()=>[n.node.language,n.node.code,n.node.loading,n.loading],([e,t,n,r])=>{S.value=Sn(e,t,typeof n==`boolean`?n:!0===r)}),p(()=>[n.node.originalCode,n.node.updatedCode,q.value],()=>{Vt(),AD(()=>Ht())},{immediate:!0}),p(()=>[q.value,n.stream,n.loading,Ze.value,Ge.value,Ke.value,vt.value],()=>{Ct()?Tt(vt.value):xt.value=null},{immediate:!0}),p(()=>[n.node.originalCode,n.node.updatedCode,w.value,q.value],e=>MP(null,[e],function*([,,,e]){if(!1===n.stream||!e)return;if(me&&!N.value&&_.value)try{yield Ln(_.value)}catch{}let t=Ce;if(t&&!ee.value){try{yield t}catch{}if(ie||!q.value)return}let r=Fe(String(n.node.originalCode??``),String(n.node.updatedCode??``)),i=!1===n.loading;i&&qn();try{yield vn(r.original,r.updated,w.value),fn(!0)}catch{return}if(i){if(ie||!q.value)return;Re(),pn(),Ht(),mn()}j.value&&AD(()=>sn())})),p(()=>n.node.code,e=>MP(null,null,function*(){if(!1===n.stream||(S.value||=OE(we(e)),q.value))return;let t=Ce;if(t&&!ee.value){try{yield t}catch{}if(ie||q.value)return}if(me&&!N.value&&_.value)try{yield Ln(_.value)}catch{}he(Ie(n.node.code,!0===n.node.loading),w.value),j.value&&AD(()=>sn())}));let wn=R(()=>{let e=S.value;return e?jE[e]||e.charAt(0).toUpperCase()+e.slice(1):jE[``]||`Plain Text`});function Tn(e){let t=String(e??``).split(/\r?\n/,1)[0]?.trim()??``;if(t.length<3)return``;let n=t[0];if(n!=="`"&&n!==`~`||t[1]!==n||t[2]!==n)return``;let r=3;for(;t[r]===n;)r+=1;return t.slice(r).trim()}let En=R(()=>function(e){let t=Tn(e);if(!t)return``;let n=t.split(/\s+/).filter(Boolean);if(!n.length)return``;let r=n[0]===`diff`?n.slice(1):n;for(let e of r){let t=e.includes(`:`)?e.slice(e.indexOf(`:`)+1):e;if(t&&/[./\\-]/.test(t))return t}return``}(String(n.node.raw??``))),Dn=R(()=>En.value||wn.value),On=R(()=>En.value?q.value?`Diff / ${wn.value}`:wn.value:``),kn=R(()=>(EE.value,AE(S.value||``))),An=R(()=>{let e={},t=e=>{if(e!=null)return typeof e==`number`?`${e}px`:String(e)},r=t(n.minWidth),i=t(n.maxWidth);if(r&&(e.minWidth=r),i&&(e.maxWidth=i),Ot.value&&!q.value){let t=kt.value;t!=null&&(e.minHeight=`${t}px`)}return q.value||(e.color=`var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))`,e.backgroundColor=`var(--vscode-editor-background, var(--markstream-code-fallback-bg))`,e.borderColor=`var(--markstream-code-border-color)`),e}),jn=R(()=>!1!==n.showTooltips);function Mn(){return MP(this,null,function*(){try{typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`&&(yield navigator.clipboard.writeText(n.node.code)),x.value=!0,r(`copy`,n.node.code),setTimeout(()=>{x.value=!1},1e3)}catch(e){console.error(`复制失败:`,e)}})}function Nn(e){if(j.value=!j.value,e&&jn.value){let t=function(e){let t=e.currentTarget||e.target;return!t||t.disabled?null:t}(e);t&&RO(t,j.value?g(`common.collapse`)||`Collapse`:g(`common.expand`)||`Expand`,`top`,!1,void 0,n.isDark)}let t=q.value?W():ve(),r=_.value;t&&r&&(j.value?(In(!0),r.style.maxHeight=`none`,r.style.overflow=`visible`,un(!0)):(In(!1),r.style.overflow=q.value?`hidden`:`auto`,un(!0)))}function Pn(){var e,t;if(M.value=!M.value,M.value){if(_.value){let t=Math.ceil((e=_.value).getBoundingClientRect?.call(e).height||0);t>0&&(L.value=t)}In(!1)}else{j.value&&In(!0),_.value&&L.value!=null&&(_.value.style.height=`${L.value}px`);let e=q.value?W():ve();try{(t=e?.layout)==null||t.call(e)}catch{}le=2,AD(()=>{un(!0)})}}function Fn(){if(!bn.value)return;let e=S.value;if(m.value){let t=e===`html`?`text/html`:`image/svg+xml`,i=e===`html`?g(`artifacts.htmlPreviewTitle`)||`HTML Preview`:g(`artifacts.svgPreviewTitle`)||`SVG Preview`;r(`previewCode`,{node:n.node,artifactType:t,artifactTitle:i,id:`temp-${e}-${Date.now()}`});return}e===`html`&&(tt.value=!tt.value)}function In(e){var t,n;try{if(q.value){let n=W();(t=n?.updateOptions)==null||t.call(n,{automaticLayout:e})}else{let t=ve();(n=t?.updateOptions)==null||n.call(t,{automaticLayout:e})}}catch{}}function Ln(e){if(!me||ie||Cn())return null;if(Se)return Se;if(N.value&&te.value)return Promise.resolve();N.value=!0,function(){let e=l.value;a&&e&&oe!==e&&(oe&&a.markSettled(oe),oe=e,a.markPending(e))}();let t=MP(null,null,function*(){yield function(e){return MP(this,null,function*(){if(typeof window>`u`)return yield e();try{let t=window.Element?.prototype,n=t?.addEventListener;if(!t||!n)return yield e();let r=function(){let e=window,t=e[$P];if(t)return t;let n={depth:0,original:null};return e[$P]=n,n}();r.depth===0&&(r.original=n,t.addEventListener=function(e,t,i){let a=r.original??n;return e===`touchstart`&&function(e,t){if(!e)return!1;let n=e;return!(typeof n.closest!=`function`||!n.closest(`.monaco-editor, .monaco-diff-editor`)||t&&typeof t==`object`&&`passive`in t)}(this,i)?a.call(this,e,t,function(e){return e==null?{passive:!0}:typeof e==`boolean`?{capture:e,passive:!0}:typeof e==`object`?`passive`in e?e:jP(AP({},e),{passive:!0}):{passive:!0}}(i)):a.call(this,e,t,i)}),r.depth++;try{return yield e()}finally{r.depth=Math.max(0,r.depth-1),r.depth===0&&r.original&&t.addEventListener!==r.original&&(t.addEventListener=r.original,r.original=null)}}catch{return yield e()}})}(()=>function(e){return MP(this,null,function*(){if(!me||ie||(We.value=!1,ee.value=!1,Ue.value=!1,Ge.value=!1,Ke.value=!1,jt(),at.value=null,ot.value=null,function(){let e=Xt();e&&(e.style.removeProperty(`--stream-monaco-line-number-left`),e.style.removeProperty(`--stream-monaco-line-number-width`),e.style.removeProperty(`--stream-monaco-line-number-gap-to-code`),e.style.removeProperty(`--stream-monaco-original-line-number-gap-to-code`),e.style.removeProperty(`--stream-monaco-modified-line-number-gap-to-code`),e.style.removeProperty(`--stream-monaco-original-scrollable-left`),e.style.removeProperty(`--stream-monaco-modified-scrollable-left`))}(),dn(),function(){let e=Q.value;bt.value=te.value||e==null?null:e}(),cn(),ln(),function(e){e.replaceChildren()}(e),qn(),ie))return;let t=MP(null,null,function*(){if(q.value){(function(){if(G||typeof window>`u`)return;G=!0;let e=e=>{Le(`reason`in e?e.reason:e.error??e.message)&&(e.preventDefault(),e.stopImmediatePropagation())};window.addEventListener(`error`,e,!0),window.addEventListener(`unhandledrejection`,e,!0)})(),be();let t=Fe(String(n.node.originalCode??``),String(n.node.updatedCode??``));H?yield H(e,t.original,t.updated,w.value):yield me(e,n.node.code,w.value)}else yield me(e,nt.value,w.value);ee.value=!0}).finally(()=>{Ce===t&&(Ce=null)});if(Ce=t,yield function(e){return MP(this,null,function*(){if(!q.value)return void(yield e);let t,n=!1;for(e.then(()=>{n=!0},e=>{n=!0,t=e});;){if(ie)return;if(n){if(t)throw t;return}if(gn()&&_n())return;yield h(),yield Pt()}})}(t),ie)return;ee.value=!0;let r=q.value?W():ve();if(typeof n.monacoOptions?.fontSize==`number`)r?.updateOptions({fontSize:n.monacoOptions.fontSize,automaticLayout:!1}),rt.value=n.monacoOptions.fontSize,it.value=n.monacoOptions.fontSize;else if(!$t()){let e=It();e&&e>0?(rt.value=e,it.value=e):(rt.value=12,it.value=12)}Qt(),j.value||M.value||un(!1),yield function(){return MP(this,null,function*(){St()!=null&&(pn(),un(!1),yield h(),yield Pt(),pn(),un(!1),yield Pt(),pn(),un(!1))})}(),ie||(te.value=!0,function(){if(cn(),q.value){let e=W(),t=(e?.getOriginalEditor)?.call(e),n=(e?.getModifiedEditor)?.call(e),r=(e,t)=>{try{let n=e?.[t];if(typeof n!=`function`)return;let r=n.call(e,()=>mn());r&&Ee.push(r)}catch{}};try{let t=(e?.onDidUpdateDiff)?.call(e,()=>{mn(),AD(()=>Ht())});t&&Ee.push(t)}catch{}r(t,`onDidContentSizeChange`),r(n,`onDidContentSizeChange`),r(t,`onDidLayoutChange`),r(n,`onDidLayoutChange`);return}let e=ve();try{let t=(e?.onDidContentSizeChange)?.call(e,()=>mn());t&&Ee.push(t)}catch{}try{let t=(e?.onDidLayoutChange)?.call(e,()=>mn());t&&Ee.push(t)}catch{}}(),tn(),Qt(),pn(),Ht(),mn(),yield function(){return MP(this,null,function*(){pn(),un(!1),yield h(),yield Pt(),pn(),un(!1),yield Pt(),pn(),un(!1)})}(),yield function(){return MP(this,null,function*(){if(q.value){for(let e=0;e<8;e++){if(ie)return;let t=_.value,n=W(),r=!1;try{let e=(n?.getLineChanges)?.call(n);r=Array.isArray(e)}catch{r=!1}let i=!!t?.querySelector(`.monaco-diff-editor`),a=gn(t);if(i&&a&&r){if(yield h(),yield Pt(),ie)return;try{Re(),pn(),Ht(),mn()}catch{}return}if(e>=1&&!i)return;yield h(),yield Pt()}if(!ie)try{Re(),pn(),Ht(),mn()}catch{}}})}(),ie||(Qt(),function(){if(!q.value)return;let e=_.value;if(!e)return;let t=e.querySelector(`.monaco-diff-editor`);function n(e,t,n,r){let i=e.querySelector(t);if(!i)return;let a=i.getBoundingClientRect();if(a.width<=0)return;let o=i.querySelector(`.line-numbers`),s=i.querySelector(`.view-lines .view-line`),c=i.querySelector(`.margin`),l=null;if(s?(l=s.getBoundingClientRect().left-a.left,Zt(n,l)):c&&(l=c.getBoundingClientRect().width,Zt(n,l)),o){let e=o.getBoundingClientRect();if(e.width>=20&&e.width<=64&&Zt(`--stream-monaco-line-number-width`,e.width),l!=null){let t=l-(e.right-a.left);Number.isFinite(t)&&t>=0&&t<=32&&(Zt(r,t),Zt(`--stream-monaco-line-number-gap-to-code`,t))}}}t&&(n(t,`.editor.original`,`--stream-monaco-original-scrollable-left`,`--stream-monaco-original-line-number-gap-to-code`),n(t,`.editor.modified`,`--stream-monaco-modified-scrollable-left`,`--stream-monaco-modified-line-number-gap-to-code`))}(),yield h(),en(),yield Pt(),yield function(){return MP(this,null,function*(){if(q.value){if(en(),Ge.value=!0,Ke.value=!1,Ue.value=!0,yield h(),en(),yield Pt(),en(),!ie){if(fn(!0),Ke.value=!0,jt(),typeof window>`u`)return Ge.value=!1,void(Ke.value=!1);qe=window.setTimeout(()=>{qe=null,Ge.value=!1,Ke.value=!1,AD(()=>{Qt(),pn(),mn()})},120)}}else Ue.value=!0})}()))})}(e))}).finally(()=>{Se===t&&(Se=null),function(){let e=oe;a&&e&&(oe=``,h(()=>{if(!ie){let t=b.value?.offsetHeight??0;t>0&&a.reportHeight(e,t)}a.markSettled(e)}))}()});return Se=t,t}p(jn,e=>{e||zO()}),p(()=>it.value,(e,t)=>{let n=q.value?W():ve();n&&typeof e==`number`&&Number.isFinite(e)&&e>0&&(n.updateOptions({fontSize:e}),M.value||un(!0))},{flush:`post`,immediate:!1});let Rn=p(()=>[_.value,q.value,n.stream,n.loading,re.value,pe.value,n.node.code,n.node.loading],e=>MP(null,[e],function*([e,t,n,r,i,a]){if(!e||!me||!a||!1===n&&!1!==r||Cn())return;let o=Ln(e);if(o){try{yield o}catch{te.value=!1,Ue.value=!1,We.value=!0}Rn()}}));function zn(e){return!!e&&typeof e==`object`&&`light`in e&&`dark`in e}function Bn(e){return typeof e==`string`?e:e&&typeof e==`object`&&`name`in e?String(e.name):null}function Vn(e,t){if(e===t)return!0;let n=Bn(e),r=Bn(t);return!!n&&n===r}function Hn(){let e=function(){if(n.theme!==void 0){let e=n.theme;return zn(e)?n.isDark?e.dark:e.light:e}return n.isDark?n.darkTheme:n.lightTheme}(),t=ze.value?.theme,r=e??t;if(typeof r==`object`&&r)return r;let i=Array.isArray(n.themes)?n.themes:[];if(!i.length||r==null)return r;let a=Bn(r),o=i.map(e=>Bn(e)).filter(e=>!!e);if(!a||o.includes(a))return r;let s=Bn(t);return t!=null&&s&&o.includes(s)?t:i[0]}p(Be,(e,t)=>MP(null,null,function*(){if(e===t||(Ve.value=e,!me||!_.value)||!N.value||!1===n.stream&&!1!==n.loading||!pe.value)return;let r=Se;if(r){try{yield r}catch{}if(ie||!_.value)return}try{te.value=!1,Ue.value=!1,N.value=!1,ee.value=!1,cn(),ln(),be(),yield h(),yield Ln(_.value)}catch{te.value=!1,Ue.value=!1,We.value=!0}}));let Un=R(()=>(n.theme===void 0?Vn(n.darkTheme,n.lightTheme):!zn(n.theme))?function(e){if(e&&typeof e==`object`&&e.colors?.[`editor.background`]){let t=Yt(e.colors[`editor.background`]);if(t!=null)return t<128}let t=(Bn(e)??``).toLowerCase();return t?[`dark`,`night`,`moon`,`black`,`dracula`,`mocha`,`frappe`,`macchiato`,`palenight`,`ocean`,`poimandres`,`monokai`,`laserwave`,`tokyo`,`slack-dark`,`rose-pine`,`github-dark`,`material-theme`,`one-dark`,`catppuccin-mocha`,`catppuccin-frappe`,`catppuccin-macchiato`].some(e=>t.includes(e))&&![`light`,`latte`,`dawn`,`lotus`].some(e=>t.includes(e)):!!n.isDark}(Hn()):!!n.isDark),Wn=R(()=>{if(!q.value)return Un.value?`dark`:`light`;let e=ze.value?.diffAppearance;return e===`light`||e===`dark`?e:Un.value?`dark`:`light`}),Gn=R(()=>q.value?Wn.value===`dark`:Un.value);function Kn(){let e=jP(AP(jP(AP({wordWrap:`on`,wrappingIndent:`same`,themes:n.themes},ze.value||{}),{theme:Hn()}),q.value?{diffAppearance:Wn.value}:{}),{onThemeChange(){tn()}}),t=function(){let e=ze.value?.fontFamily;return typeof e==`string`&&e.trim()?e.trim():q.value?function(){if(typeof window>`u`)return;let e=b.value?.querySelector(`pre.code-pre-fallback`);if(e)return window.getComputedStyle(e).fontFamily.trim()||void 0}():void 0}();return t&&(e.fontFamily??=t),e}function qn(){let e=Kn();if(!K)return K=e,K;for(let t of Object.keys(K))t in e||delete K[t];return Object.assign(K,e),K}let Jn=R(()=>{var e,t,r,i,a;return JSON.stringify({diffLineStyle:ze.value?.diffLineStyle??`background`,diffUnchangedRegionStyle:ze.value?.diffUnchangedRegionStyle??`line-info`,diffHideUnchangedRegions:n.monacoOptions?.diffHideUnchangedRegions===void 0?AP({},je):Ne(n.monacoOptions.diffHideUnchangedRegions),renderSideBySide:(e=ze.value?.renderSideBySide)==null||e,useInlineViewWhenSpaceIsLimited:(t=ze.value?.useInlineViewWhenSpaceIsLimited)!=null&&t,enableSplitViewResizing:(r=ze.value?.enableSplitViewResizing)==null||r,ignoreTrimWhitespace:(i=ze.value?.ignoreTrimWhitespace)==null||i,originalEditable:(a=ze.value?.originalEditable)!=null&&a})});return p(()=>[n.monacoOptions,pe.value],()=>{var e;if(qn(),!me||!pe.value)return;let t=q.value?W():ve(),r=typeof n.monacoOptions?.fontSize==`number`?n.monacoOptions.fontSize:Number.isFinite(it.value)?it.value:void 0;typeof r==`number`&&Number.isFinite(r)&&r>0&&((e=t?.updateOptions)==null||e.call(t,{fontSize:r})),un(!1)},{deep:!0}),p(()=>[Hn(),Wn.value,re.value,N.value,pe.value],([e],t)=>{re.value&&N.value&&pe.value&&function(e={}){if(e.appearanceOnly)return;qn();let t=Hn(),n=()=>{q.value&&Re(),AD(()=>{tn(),mn()})};t?function(e,t){let n=function(e){if(e==null)return null;if(typeof e==`string`)return e;if(typeof e==`object`&&`name`in e)return String(e.name);if(typeof e==`object`){let t=WP.get(e);if(t)return t;try{let t=JSON.stringify(e);if(t)return WP.set(e,t),t}catch{}let n=`__theme_`+ ++GP;return WP.set(e,n),n}return String(e)}(t);return n?(UP=e,RP||HP!==n?RP?(VP===n||zP===n||(BP=t,VP=n),RP):(BP=t,VP=n,RP=MP(null,null,function*(){for(;VP&&BP!=null;){let t=BP,n=VP;if(BP=null,VP=null,HP!==n)try{zP=n,yield(UP??e)(t),HP=n}catch{}}}).finally(()=>{RP=null,zP=null}),RP):Promise.resolve()):Promise.resolve()}(Te,t).then(n).catch(e=>{}):n()}({appearanceOnly:t!=null&&Vn(e,t[0])})},{flush:`post`}),p(()=>[Jn.value,re.value,pe.value],(e,t)=>MP(null,[e,t],function*([e,t,r],[i]){if(qn(),!t||!r||!me||!_.value||!N.value||e===i||!1===n.stream&&!1!==n.loading)return;let a=Se;if(a){try{yield a}catch{}if(ie||!_.value)return}try{te.value=!1,Ue.value=!1,N.value=!1,ee.value=!1,cn(),ln(),be(),yield h(),yield Ln(_.value)}catch{te.value=!1,Ue.value=!1,We.value=!0}}),{flush:`post`}),p(()=>[n.loading,pe.value],(e,t)=>MP(null,[e,t],function*([e,t],r){if(!t)return;let i=r?.[0];if(!1===i&&!1!==e&&q.value&&N.value&&(yield h(),AD(()=>{MP(null,null,function*(){let e=Se;if(e)try{yield e}catch{}!ie&&q.value&&!1!==n.loading&&(qn(),Re(),mn())})})),e)return;let a=i!==void 0&&!1!==i;yield h(),AD(()=>{MP(null,null,function*(){try{if(a&&N.value)if(q.value&&_.value){let e=Se;if(e)try{yield e}catch{}qn();let t=Fe(String(n.node.originalCode??``),String(n.node.updatedCode??``));if(yield vn(t.original,t.updated,w.value),ie||!q.value)return;Re(),fn(!0),pn(),Ht(),mn()}else he(nt.value,w.value);un(!1)}catch{}})})}),{immediate:!0,flush:`post`}),f(()=>{jt(),cn(),ln(),ye()}),(t,r)=>He.value?(y(),P(B(sk),{key:0,node:Y.value,loading:n.loading},null,8,[`node`,`loading`])):(y(),U(`div`,{key:1,ref_key:`container`,ref:b,style:ne(An.value),class:z([`code-block-container rounded-lg border`,[{dark:n.isDark,"is-rendering":n.loading,"is-dark":Gn.value,"is-diff":q.value,"is-plain-text":k.value}]]),"data-markstream-code-block":`1`,"data-markstream-enhanced":Ue.value&&!He.value?`true`:`false`,"data-markstream-pending":et.value?`true`:void 0},[o(mP,{"show-header":n.showHeader,"show-collapse-button":n.showCollapseButton,"show-font-size-buttons":n.showFontSizeButtons,"enable-font-size-control":n.enableFontSizeControl,"show-copy-button":n.showCopyButton,"show-expand-button":n.showExpandButton,"show-preview-button":n.showPreviewButton,"show-tooltips":n.showTooltips,"is-dark":n.isDark,loading:n.loading,stream:e.stream,"is-collapsed":M.value,"is-expanded":j.value,"copy-text":x.value,"is-previewable":bn.value,"code-font-size":it.value,"code-font-min":10,"code-font-max":36,"default-code-font-size":rt.value,"font-baseline-ready":st.value,"diff-stats":q.value?ke.value:null,"diff-stats-aria-label":Ae.value,onToggleCollapse:Pn,onDecreaseFont:Gt,onResetFont:Kt,onIncreaseFont:Wt,onCopy:Mn,onToggleExpand:Nn,onPreview:Fn},A({"header-left":T(()=>[C(t.$slots,`header-left`,{},()=>[F(`div`,qP,[F(`span`,{class:`icon-slot h-4 w-4 flex-shrink-0`,innerHTML:kn.value},null,8,JP),F(`div`,YP,[F(`div`,XP,O(Dn.value),1),On.value?(y(),U(`div`,ZP,O(On.value),1)):D(``,!0)])])],!0)]),loading:T(()=>[C(t.$slots,`loading`,{loading:e.loading,stream:e.stream},()=>[r[0]||=F(`div`,{class:`loading-skeleton`},[F(`div`,{class:`skeleton-line`}),F(`div`,{class:`skeleton-line`}),F(`div`,{class:`skeleton-line short`})],-1)],!0)]),default:T(()=>[E(F(`div`,QP,[F(`div`,{ref_key:`codeEditor`,ref:_,class:z([`code-editor-container`,[e.stream?``:`code-height-placeholder`,{"is-hidden":$e.value}]]),style:ne(At.value)},null,6),Qe.value?(y(),P(B(sk),{key:0,class:z([`code-pre-fallback`,{"is-wrap":Je.value,"is-fading-out":Ke.value}]),style:ne(Dt.value),node:Y.value,"show-line-numbers":!0,"diff-inline":Ye.value},null,8,[`class`,`style`,`node`,`diff-inline`])):D(``,!0)],512),[[fe,!(M.value||!e.stream&&e.loading)]]),tt.value&&!m.value&&bn.value&&S.value===`html`?(y(),P(LP,{key:0,code:n.node.code,"html-preview-allow-scripts":n.htmlPreviewAllowScripts,"html-preview-sandbox":n.htmlPreviewSandbox,"is-dark":n.isDark,"on-close":()=>tt.value=!1},null,8,[`code`,`html-preview-allow-scripts`,`html-preview-sandbox`,`is-dark`,`on-close`])):D(``,!0)]),_:2},[t.$slots[`header-right`]?{name:`header-right`,fn:T(()=>[C(t.$slots,`header-right`,{},void 0,!0)]),key:`0`}:void 0]),1032,[`show-header`,`show-collapse-button`,`show-font-size-buttons`,`enable-font-size-control`,`show-copy-button`,`show-expand-button`,`show-preview-button`,`show-tooltips`,`is-dark`,`loading`,`stream`,`is-collapsed`,`is-expanded`,`copy-text`,`is-previewable`,`code-font-size`,`default-code-font-size`,`font-baseline-ready`,`diff-stats`,`diff-stats-aria-label`])],14,KP))}}),[[`__scopeId`,`data-v-b5384753`]]),nF=n({default:()=>oF}),rF=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),iF=[`id`],aF=[`data-placement`],oF=eO(x({__name:`Tooltip`,props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(e){let t=e,n=V(null),r=V(null),i=V({transform:`translate3d(0px, 0px, 0px)`,left:`0px`,top:`0px`}),a=V({}),s=V(t.placement??`top`),c=V(!1),l=null,u=null,d=null,f=null,m=null,g=0;function _(){return f?Promise.resolve(f):(m||=W(()=>Promise.resolve().then(()=>Wo).then(e=>(f=e,e)),void 0).catch(e=>{throw m=null,e}),m)}function x(){l&&=(l(),null),u=null,d=null}function S(e){return rF(this,null,function*(){let r=t.anchorEl,i=n.value;if(!t.visible||!r||!i||u===r&&d===i)return;let{autoUpdate:a}=yield _();e()&&t.visible&&t.anchorEl===r&&n.value===i&&(x(),u=r,d=i,l=a(r,i,()=>{C().catch(()=>{w()})}))})}function C(){return rF(this,null,function*(){let e=t.anchorEl,o=n.value;if(!t.visible||!e||!o)return!1;let{arrow:c,computePosition:l,flip:u,offset:d,shift:f}=yield _();if(!t.visible||t.anchorEl!==e||n.value!==o)return!1;let p=[d(t.offset??6),u(),f({padding:6}),...r.value?[c({element:r.value,padding:4})]:[]],{x:m,y:h,placement:g,middlewareData:v}=yield l(e,o,{placement:t.placement??`top`,middleware:p,strategy:`fixed`});if(!t.visible||t.anchorEl!==e||n.value!==o)return!1;if(i.value.transform=`translate3d(${Math.round(m)}px, ${Math.round(h)}px, 0)`,i.value.left=`0px`,i.value.top=`0px`,s.value=g,v.arrow&&r.value){let{x:e,y:t}=v.arrow,n={top:`bottom`,bottom:`top`,left:`right`,right:`left`}[g.split(`-`)[0]];a.value={left:e==null?``:`${e}px`,top:t==null?``:`${t}px`,[n]:`-3px`}}return!0})}function w(){let e=t.anchorEl,r=n.value;if(!e||!r)return!1;let o=e.getBoundingClientRect(),c=r.getBoundingClientRect(),l=t.offset??6,u=t.placement??`top`,d=o.left,f=o.top;return u===`bottom`?f=o.bottom+l:u===`left`?d=o.left-c.width-l:u===`right`?d=o.right+l:f=o.top-c.height-l,i.value.transform=`translate3d(${Math.round(Math.max(0,d))}px, ${Math.round(Math.max(0,f))}px, 0)`,i.value.left=`0px`,i.value.top=`0px`,s.value=u,a.value={},!0}p(()=>t.visible,e=>rF(null,null,function*(){let r=++g;if(e){if(c.value=!1,yield h(),r!==g||!t.visible)return;if(t.anchorEl&&n.value)try{let e=t.anchorEl,a=n.value,o=e.getBoundingClientRect();if(!(yield C())||r!==g||!t.visible||t.anchorEl!==e||n.value!==a)return;let s=i.value.transform;if(t.originX!=null&&t.originY!=null){let e=Math.abs(Number(t.originX)-o.left),n=Math.abs(Number(t.originY)-o.top);if(Math.hypot(e,n)>120){if(i.value.transform=`translate3d(${Math.round(t.originX)}px, ${Math.round(t.originY)}px, 0)`,yield h(),r!==g||!t.visible||(c.value=!0,yield h(),r!==g||!t.visible))return;i.value.transform=s}else c.value=!0}else c.value=!0;yield S(()=>r===g)}catch{if(r!==g||!t.visible)return;if(c.value=w(),t.anchorEl&&n.value)try{yield S(()=>r===g)}catch{}}else c.value=!0}else c.value=!1,x()}));let D=0;return p([()=>t.anchorEl,()=>t.placement,()=>t.content],()=>rF(null,null,function*(){let e=++D;if(t.visible&&t.anchorEl&&n.value){if(yield h(),e!==D||!t.visible||!t.anchorEl||!n.value)return;try{let r=yield C();if(e!==D||!t.visible||!t.anchorEl||!n.value)return;r||w()}catch{w()}yield S(()=>e===D)}})),v(()=>{g+=1,x()}),(l,u)=>(y(),P(te,{to:`body`},[F(`div`,{class:z([`markstream-vue`,{dark:e.isDark}])},[o(pe,{name:`tooltip`,appear:``},{default:T(()=>[E(F(`div`,{id:t.id,ref_key:`tooltip`,ref:n,style:ne({position:`fixed`,left:i.value.left,top:i.value.top,transform:i.value.transform,visibility:c.value?`visible`:`hidden`,pointerEvents:c.value?void 0:`none`}),class:`tooltip-element`,role:`tooltip`},[b(O(e.content)+` `,1),F(`div`,{ref_key:`arrowEl`,ref:r,class:`tooltip-arrow`,"data-placement":s.value,style:ne(a.value)},null,12,aF)],12,iF),[[fe,e.visible]])]),_:1})],2)]))}}),[[`__scopeId`,`data-v-c606ee4c`]]),sF=n({materialExtendedMap:()=>uF}),cF=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#f44336" d="M21.805 8.063a5 5 0 0 0-3.502.727A10.95 10.95 0 0 0 11 6H2.5a.5.5 0 0 0-.5.5v21a.5.5 0 0 0 .5.5H11a10.995 10.995 0 0 0 10.954-10.096 4.998 4.998 0 0 0-.149-9.841M11 24H6V10h5a7 7 0 0 1 0 14"/><circle cx="28" cy="7" r="1.5" fill="#f44336"/></svg>`,lF=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#0288d1" d="M21.81 10.25c-.06-.04-.56-.43-1.64-.43-.28 0-.56.03-.84.08-.21-1.4-1.38-2.11-1.43-2.14l-.29-.17-.18.27c-.24.36-.43.77-.51 1.19-.2.8-.08 1.56.33 2.21-.49.28-1.29.35-1.46.35H2.62c-.34 0-.62.28-.62.63 0 1.15.18 2.3.58 3.38.45 1.19 1.13 2.07 2 2.61.98.6 2.59.94 4.42.94.79 0 1.61-.07 2.42-.22 1.12-.2 2.2-.59 3.19-1.16A8.3 8.3 0 0 0 16.78 16c1.05-1.17 1.67-2.5 2.12-3.65h.19c1.14 0 1.85-.46 2.24-.85.26-.24.45-.53.59-.87l.08-.24zm-17.96.99h1.76c.08 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16H3.85c-.09 0-.16.07-.16.16v1.58c.01.09.07.16.16.16m2.43 0h1.76c.08 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16H6.28c-.09 0-.16.07-.16.16v1.58c.01.09.07.16.16.16m2.47 0h1.75c.1 0 .17-.07.17-.16V9.5c0-.08-.06-.16-.17-.16H8.75c-.08 0-.15.07-.15.16v1.58c0 .09.06.16.15.16m2.44 0h1.77c.08 0 .15-.07.15-.16V9.5c0-.08-.06-.16-.15-.16h-1.77c-.08 0-.15.07-.15.16v1.58c0 .09.07.16.15.16M6.28 9h1.76c.08 0 .16-.09.16-.18V7.25c0-.09-.07-.16-.16-.16H6.28c-.09 0-.16.06-.16.16v1.57c.01.09.07.18.16.18m2.47 0h1.75c.1 0 .17-.09.17-.18V7.25c0-.09-.06-.16-.17-.16H8.75c-.08 0-.15.06-.15.16v1.57c0 .09.06.18.15.18m2.44 0h1.77c.08 0 .15-.09.15-.18V7.25c0-.09-.07-.16-.15-.16h-1.77c-.08 0-.15.06-.15.16v1.57c0 .09.07.18.15.18m0-2.28h1.77c.08 0 .15-.07.15-.16V5c0-.1-.07-.17-.15-.17h-1.77c-.08 0-.15.06-.15.17v1.56c0 .08.07.16.15.16m2.46 4.52h1.76c.09 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16h-1.76c-.08 0-.15.07-.15.16v1.58c0 .09.07.16.15.16"/></svg>`,uF={ada:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#0277bd" d="m2 12 2.9-1.07c.25-1.1.87-1.73.87-1.73a3.996 3.996 0 0 1 5.65 0l1.41 1.41 6.31-6.7c.95 3.81 0 7.62-2.33 10.69L22 19.62s-8.47 1.9-13.4-1.95c-2.63-2.06-3.22-3.26-3.59-4.52zm5.04.21c.37.37.98.37 1.35 0s.37-.97 0-1.34a.96.96 0 0 0-1.35 0c-.37.37-.37.97 0 1.34"/></svg>`,applescript:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#78909c" d="M25.425 26.498c-1.162 1.736-2.394 3.43-4.27 3.458-1.875.042-2.477-1.106-4.605-1.106-2.142 0-2.8 1.078-4.578 1.148-1.834.07-3.22-1.848-4.396-3.542C5.183 23 3.35 16.63 5.813 12.346a6.84 6.84 0 0 1 5.767-3.514c1.792-.028 3.5 1.217 4.606 1.217 1.092 0 3.164-1.497 5.334-1.273a6.5 6.5 0 0 1 5.095 2.771 6.38 6.38 0 0 0-3.01 5.334 6.18 6.18 0 0 0 3.752 5.656 15.5 15.5 0 0 1-1.932 3.961M17.432 4.1A6.36 6.36 0 0 1 21.548 2a6.13 6.13 0 0 1-1.456 4.466 5.11 5.11 0 0 1-4.13 1.988 5.98 5.98 0 0 1 1.47-4.354"/></svg>`,assembly:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ff6e40" d="M8 6V2H4a2 2 0 0 0-2 2v24a2 2 0 0 0 2 2h4v-4H4V6Zm16-4v4h4v20h-4v4h4a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2Zm-4 4h-2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2m-2 6V8h2v4Zm-4 6h-2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2m-2 6v-4h2v4Zm0-18c0 2 0 2-2 2v2h2v4h2V6Zm8 12c0 2 0 2-2 2v2h2v4h2v-8Z"/></svg>`,clojure:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path fill="#64dd17" d="M123.456 129.975a507 507 0 0 0-3.54 7.846c-4.406 9.981-9.284 22.127-11.066 29.908-.64 2.77-1.037 6.205-1.03 10.013 0 1.506.081 3.09.21 4.702a58.1 58.1 0 0 0 19.98 3.559 58.2 58.2 0 0 0 18.29-2.98c-1.352-1.237-2.642-2.554-3.816-4.038-7.796-9.942-12.146-24.512-19.028-49.01m-28.784-49.39C79.782 91.08 70.039 108.387 70.002 128c.037 19.32 9.487 36.403 24.002 46.94 3.56-14.83 12.485-28.41 25.868-55.63a219 219 0 0 0-2.714-7.083c-3.708-9.3-9.059-20.102-13.834-24.993-2.435-2.555-5.389-4.763-8.652-6.648"/><path fill="#7cb342" d="M178.532 194.535c-7.683-.963-14.023-2.124-19.57-4.081a69.4 69.4 0 0 1-30.958 7.249c-38.491 0-69.693-31.198-69.698-69.7 0-20.891 9.203-39.62 23.764-52.392-3.895-.94-7.956-1.49-12.104-1.482-20.45.193-42.037 11.51-51.025 42.075-.84 4.45-.64 7.813-.64 11.8 0 60.591 49.12 109.715 109.705 109.715 37.104 0 69.882-18.437 89.732-46.633-10.736 2.675-21.06 3.955-29.902 3.982-3.314 0-6.425-.177-9.305-.53"/><path fill="#29b6f6" d="M157.922 173.271c.678.336 2.213.884 4.35 1.49 14.375-10.553 23.717-27.552 23.754-46.764h-.005c-.055-32.03-25.974-57.945-58.011-58.009a58.2 58.2 0 0 0-18.213 2.961c11.779 13.426 17.443 32.613 22.922 53.6l.01.025c.01.017 1.752 5.828 4.743 13.538 2.97 7.7 7.203 17.231 11.818 24.178 3.03 4.655 6.363 8 8.632 8.981"/><path fill="#1e88e5" d="M128.009 18.29c-36.746 0-69.25 18.089-89.16 45.826 10.361-6.49 20.941-8.83 30.174-8.747 12.753.037 22.779 3.991 27.589 6.696a51 51 0 0 1 3.345 2.131 69.4 69.4 0 0 1 28.049-5.894c38.496.004 69.703 31.202 69.709 69.698h-.006c0 19.409-7.938 36.957-20.736 49.594 3.142.352 6.492.571 9.912.554 12.15.006 25.284-2.675 35.13-10.956 6.42-5.408 11.798-13.327 14.78-25.199.584-4.586.92-9.247.92-13.991 0-60.588-49.116-109.715-109.705-109.715"/></svg>`,cobol:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M12 0h8v4h-8z"/><path fill="#0288d1" d="M16 5A11 11 0 1 1 5 16 11.01 11.01 0 0 1 16 5m0-3a14 14 0 1 0 14 14A14 14 0 0 0 16 2"/><path fill="#0288d1" d="M32 12v8h-4v-8zm-1.858 12.485-5.657 5.657-2.313-2.313 5.657-5.657zM7.514 30.143l-5.657-5.657 2.814-2.814 5.657 5.657zM12 28h8v4h-8zm15.329-17.672L21.672 4.67l2.814-2.814 5.657 5.657zM3 12v8H0v-8zm7.328-7.329L4.67 10.328 1.857 7.514l5.657-5.657zM20 10h-4a6 6 0 0 0 0 12h4v-4h-4a2 2 0 0 1 0-4h4z"/></svg>`,crystal:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><path fill="#cfd8dc" d="m179.363 121.67-57.623 57.507c-.23.23-.576.346-.806.23l-78.713-21.09c-.346-.115-.577-.345-.577-.576L20.44 79.144c-.115-.345 0-.576.23-.806L78.294 20.83c.23-.23.576-.346.807-.23l78.713 21.09c.345.114.576.345.576.575l21.09 78.597c.23.346.115.577-.115.807zm-77.215-62.58-77.33 20.63c-.115 0-.23.23-.115.345l56.586 56.47c.115.115.346.115.346-.115l20.744-77.215c.115 0-.115-.23-.23-.116z"/></svg>`,dart:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#4fc3f7" d="M16.83 2a1.3 1.3 0 0 0-.916.377l-.013.01L7.323 7.34l8.556 8.55v.005l10.283 10.277 1.96-3.529-7.068-16.96-3.299-3.297A1.3 1.3 0 0 0 16.828 2Z"/><path fill="#01579b" d="m7.343 7.32-4.955 8.565-.01.013a1.297 1.297 0 0 0 .004 1.835l.005.005 4.106 4.107 16.064 6.314 3.632-2.015-.098-.098-.025.002L15.995 15.97h-.012z"/><path fill="#01579b" d="m7.321 7.324 8.753 8.755h.013L26.16 26.156l3.835-.73L30 14.089l-4.049-3.965a6.5 6.5 0 0 0-3.618-1.612l.002-.043L7.323 7.325Z"/><path fill="#64b5f6" d="m7.332 7.335 8.758 8.75v.013l10.079 10.071L25.436 30H14.09l-3.967-4.048a6.5 6.5 0 0 1-1.611-3.618l-.045.004Z"/></svg>`,dlang:cF,d:cF,docker:lF,dockerfile:lF,elixir:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#9575cd" d="M12.173 22.681c-3.86 0-6.99-3.64-6.99-8.13 0-3.678 2.773-8.172 4.916-10.91 1.014-1.296 2.93-2.322 2.93-2.322s-.982 5.239 1.683 7.319c2.366 1.847 4.106 4.25 4.106 6.363 0 4.232-2.784 7.68-6.645 7.68"/></svg>`,erlang:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30"><path fill="#f44336" d="M5.207 4.33q-.072.075-.143.153Q1.5 8.476 1.5 15.33c0 4.418 1.155 7.862 3.459 10.34h19.415c2.553-1.152 4.127-3.43 4.127-3.43l-3.147-2.52L23.9 21.1c-.867.773-.845.931-2.315 1.78-1.495.674-3.04.966-4.634.966-2.515 0-4.423-.909-5.723-2.059-1.286-1.15-1.985-4.511-2.096-6.68l17.458.067-.183-1.472s-.847-7.129-2.541-9.372zm8.76.846c1.565 0 3.22.535 3.961 1.471.74.937.931 1.667.973 3.524H9.11c.112-1.955.436-2.81 1.373-3.698.936-.887 2.03-1.297 3.484-1.297"/></svg>`,fortran:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ff7043" d="M6 4v2h3a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6v2h12v-2h-3a1 1 0 0 1-1-1v-9h4a2 2 0 0 1 2 2v2h2V10h-2v2a2 2 0 0 1-2 2h-4V6h6a4 4 0 0 1 4 4h2V4Z"/></svg>`,groovy:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#26c6da" d="M19.322 2a6.5 6.5 0 0 1 4.352 1.419 4.55 4.55 0 0 1 1.685 3.662 5.82 5.82 0 0 1-1.886 4.275 6.04 6.04 0 0 1-4.34 1.846 4.15 4.15 0 0 1-2.385-.649 1.91 1.91 0 0 1-.936-1.603 1.6 1.6 0 0 1 .356-1.024 1.1 1.1 0 0 1 .861-.447q.469 0 .468.504a.79.79 0 0 0 .358.693 1.43 1.43 0 0 0 .826.245 3.1 3.1 0 0 0 2.39-1.573 5.66 5.66 0 0 0 1.154-3.39 2.64 2.64 0 0 0-.891-2.064 3.28 3.28 0 0 0-2.293-.812 6.18 6.18 0 0 0-4.086 1.736 12.9 12.9 0 0 0-3.215 4.557 13.4 13.4 0 0 0-1.233 5.36 5.86 5.86 0 0 0 1.091 3.723 3.53 3.53 0 0 0 2.905 1.372q3.058 0 5.848-4.002l2.935-.388q.546-.07.545.246a8 8 0 0 1-.423 1.24q-.421 1.097-1.152 3.668A12.7 12.7 0 0 0 26 17.72v1.66a14.2 14.2 0 0 1-4.055 2.57 10.38 10.38 0 0 1-2.764 5.931 6.7 6.7 0 0 1-4.806 2.11 3.3 3.3 0 0 1-2.012-.55 1.8 1.8 0 0 1-.718-1.514q0-2.685 5.634-5.212.532-1.766 1.152-3.507a8.6 8.6 0 0 1-2.853 2.323 7.4 7.4 0 0 1-3.48 1.01 5.46 5.46 0 0 1-4.366-2.093A8.1 8.1 0 0 1 6 15.122a11.6 11.6 0 0 1 1.966-6.426 14.7 14.7 0 0 1 5.162-4.862A12.44 12.44 0 0 1 19.322 2m-2.407 22.17q-4.055 1.875-4.054 3.695a.87.87 0 0 0 .999.97q1.964 0 3.055-4.665"/></svg>`,haskell:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300"><g stroke-width="2.422"><path fill="#ef5350" d="m23.928 240.5 59.94-89.852-59.94-89.855h44.955l59.94 89.855-59.94 89.852z"/><path fill="#ffa726" d="m83.869 240.5 59.94-89.852-59.94-89.855h44.955l119.88 179.71h-44.95l-37.46-56.156-37.468 56.156z"/><path fill="#ffee58" d="m228.72 188.08-19.98-29.953h69.93v29.956h-49.95zm-29.97-44.924-19.98-29.953h99.901v29.953z"/></g></svg>`,julia:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><g transform="translate(.21 -247.01)"><circle cx="13.497" cy="281.63" r="9.555" fill="#c62828"/><circle cx="36.081" cy="281.63" r="9.555" fill="#7e57c2"/><circle cx="24.722" cy="262.39" r="9.555" fill="#388e3c"/></g></svg>`,lisp:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ef5350" d="M16 2a14 14 0 1 0 14 14A14.003 14.003 0 0 0 16 2m8.93 20.43a11 11 0 0 1-7.19 4.43 6.094 6.094 0 0 1-4.79-5.9v-.05a5 5 0 0 1 .04-.66 7.95 7.95 0 0 1 2.3-4.95 5.99 5.99 0 0 0-2.23-9.9 11.004 11.004 0 0 1 11.87 17.03"/></svg>`,lua:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="M30 6a3.86 3.86 0 0 1-1.167 2.833 4.024 4.024 0 0 1-5.666 0A3.86 3.86 0 0 1 22 6a3.86 3.86 0 0 1 1.167-2.833 4.024 4.024 0 0 1 5.666 0A3.86 3.86 0 0 1 30 6m-9.208 5.208A10.6 10.6 0 0 0 13 8a10.6 10.6 0 0 0-7.792 3.208A10.6 10.6 0 0 0 2 19a10.6 10.6 0 0 0 3.208 7.792A10.6 10.6 0 0 0 13 30a10.6 10.6 0 0 0 7.792-3.208A10.6 10.6 0 0 0 24 19a10.6 10.6 0 0 0-3.208-7.792m-1.959 7.625a4.024 4.024 0 0 1-5.666 0 4.024 4.024 0 0 1 0-5.666 4.024 4.024 0 0 1 5.666 0 4.024 4.024 0 0 1 0 5.666"/></svg>`,nim:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ffca28" d="M6 24h20v2a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2zM30 6l-9 9-5-11-5 11-9-9 4 14h20z"/></svg>`,objectivec:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M19.563 22A5.57 5.57 0 0 1 14 16.437v-2.873A5.57 5.57 0 0 1 19.563 8H24V2h-4.437A11.563 11.563 0 0 0 8 13.563v2.873A11.564 11.564 0 0 0 19.563 28H24v-6Z"/></svg>`,objectivecpp:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M28 14v-4h-2v4h-6v-4h-2v4h-4v2h4v4h2v-4h6v4h2v-4h4v-2z"/><path fill="#0288d1" d="M13.563 22A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>`,ocaml:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12.019 15.021.003-.008c-.005-.021-.006-.026-.003.008"/><path fill="#ff9800" d="M4.51 3.273a2.523 2.523 0 0 0-2.524 2.523V11.3c.361-.13.88-.898 1.043-1.085.285-.327.337-.743.478-1.006C3.83 8.612 3.886 8.2 4.62 8.2c.342 0 .478.08.71.39.16.216.438.615.568.882.15.307.396.724.503.808q.122.095.233.137c.119.044.218-.037.297-.1.102-.082.145-.247.24-.467.135-.317.283-.697.367-.83.146-.23.195-.501.352-.633.232-.195.535-.208.618-.225.466-.092.677.225.907.43.15.133.355.403.5.765.114.283.26.544.32.707.059.158.203.41.289.713.077.275.286.486.365.616 0 0 .121.34.858.65.16.067.482.176.674.246.32.116.63.101 1.025.054.281 0 .434-.408.562-.734.075-.193.148-.745.197-.902.048-.153-.064-.27.031-.405.112-.156.178-.164.242-.368.138-.436.936-.458 1.384-.458.374 0 .327.363.96.239.364-.072.714.046 1.1.149.324.086.63.184.812.398.119.139.412.834.113.863.029.035.05.099.104.134-.067.262-.357.075-.518.041-.217-.045-.37.007-.583.101-.363.162-.894.143-1.21.407-.27.223-.269.721-.394 1 0 0-.348.895-1.106 1.443-.194.14-.574.477-1.4.605a5.3 5.3 0 0 1-1.1.043c-.186-.009-.362-.018-.549-.02-.11-.002-.48-.013-.461.022l-.041.103.024.138c.015.083.019.149.022.225.006.157-.013.32-.005.478.017.328.138.627.154.958.017.368.199.758.375 1.059.067.114.169.128.213.269.052.161.003.333.028.505.1.668.292 1.366.592 1.97l.008.014c.371-.062.743-.196 1.226-.267.885-.132 2.115-.064 2.906-.138 2-.188 3.085.82 4.882.407V5.796a2.523 2.523 0 0 0-2.523-2.523zm-.907 11.144q-.022 0-.046.003c-.159.025-.313.08-.412.24-.08.13-.108.355-.164.505-.064.175-.176.338-.274.505-.18.305-.504.581-.644.879-.028.06-.053.13-.076.2v3.402c.163.028.333.062.524.113 1.407.375 1.75.407 3.13.25l.13-.018c.105-.22.187-.968.255-1.2.054-.178.127-.32.155-.5.026-.173-.003-.337-.017-.493-.04-.393.285-.533.44-.87.14-.304.22-.651.336-.963.11-.298.284-.721.579-.872-.036-.041-.617-.06-.772-.076a5 5 0 0 1-.5-.07c-.314-.064-.656-.126-.965-.2a10 10 0 0 1-.947-.328c-.298-.138-.503-.497-.732-.507m5.737.83c-.74.149-.97.876-1.32 1.451-.192.319-.396.59-.548.928-.14.312-.128.657-.368.924a2.55 2.55 0 0 0-.528.922c-.023.067-.088.776-.158.943l1.101-.078c1.026.07.73.464 2.332.378l2.529-.078a7 7 0 0 0-.228-.588c-.07-.147-.16-.434-.218-.56a3.5 3.5 0 0 0-.309-.526c-.184-.215-.227-.23-.28-.503-.095-.473-.344-1.33-.637-1.923-.151-.306-.403-.562-.634-.784-.2-.195-.655-.522-.734-.505z"/></svg>`,perl:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ba68c8" d="M11.057 2.981c.537.735.028 1.653.141 2.472a3.42 3.42 0 0 1-1.03 2.415c-1.414 1.625-3.165 3.038-4.097 5.03a5.28 5.28 0 0 0 1.412 5.847c.706.735 1.54 1.342 2.472 1.738.17.805-1.088.184-1.455 0A6.7 6.7 0 0 1 4.361 16.4a5.44 5.44 0 0 1 .904-5.368c1.272-1.61 3.136-2.543 4.662-3.857.565-.55 1.003-1.3.932-2.119.156-.678-.254-1.469.212-2.09zm-.07 18.929c-.17.198-.467.325-.495.24-.042-.085.212-.127.381-.325.17-.183.127-.522.24-.522.1 0 .043.395-.14.607zm2.16 0c.17.198.453.31.495.24.028-.085-.212-.141-.395-.339-.156-.184-.113-.523-.24-.523-.085 0-.029.41.14.608zm-1.03.48c-.1 0-.071-.296-.071-.65 0-.367-.028-.663.07-.663.085 0 .057.296.057.663 0 .354.014.65-.057.65m-.495-20.765c.34.24.254 2.077.254 3.136 0 1.653.184 3.376-.805 4.916-.96 1.497-2.048 3.108-1.95 4.972.1 1.837.99 3.504 2.148 5.043.664.876-.353.509-.876.085a7.2 7.2 0 0 1-2.755-5.664c.142-1.907 1.597-3.348 2.628-4.803.805-1.13 1.186-1.879 1.215-3.645.028-1.412-.142-3.531.042-3.983.014-.043.07-.1.099-.057m.537 2.232c-.085 0-.043.396.028.72.424 2.26-.198 4.52-.749 6.682a12.77 12.77 0 0 0 .283 7.826c.607 1.568 1.71.791 2.161 1.568.34.593 1.272.198 1.978-.141 2.232-1.102 4.012-3.108 4.11-5.566.029-.494 0-.989-.07-1.497-.283-1.837-1.78-3.065-3.15-4.083-1.215-.89-2.74-1.483-3.659-2.613-.523-.65-.297-1.638-.381-2.458-.043-.452-.255-.042-.382-.268-.084-.127-.14-.17-.17-.17zm.72 3.616c.057 0 .17.071.325.226a20 20 0 0 0 2.161 1.921c1.272.961 2.43 2.091 2.967 3.504.339.875.339 1.836.226 2.74-.184 1.384-1.187 2.444-2.119 3.404-.339.354-1.06.791-1.074.678-.084-.367.763-1.172 1.159-1.695A5.93 5.93 0 0 0 16 10.962c-1.102-1.214-2.317-1.907-2.995-3.08-.14-.253-.183-.409-.113-.409z"/></svg>`,prolog:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ef5350" d="M12 15.385a5.1 5.1 0 0 0 1.862 1.693L12 18.94l-1.862-1.862A5.04 5.04 0 0 0 12 15.385m4.232-4.063a1.693 1.693 0 0 0-1.693 1.693 1.693 1.693 0 0 0 1.693 1.693 1.693 1.693 0 0 0 1.693-1.693c0-.94-.762-1.693-1.693-1.693m-8.464 0a1.693 1.693 0 0 0-1.693 1.693 1.693 1.693 0 0 0 1.693 1.693 1.693 1.693 0 0 0 1.693-1.693c0-.94-.762-1.693-1.693-1.693m8.464-2.116a3.385 3.385 0 0 1 3.385 3.386 3.385 3.385 0 0 1-3.385 3.385 3.385 3.385 0 0 1-3.386-3.385 3.385 3.385 0 0 1 3.386-3.386m-8.464 0a3.385 3.385 0 0 1 3.386 3.386 3.385 3.385 0 0 1-3.386 3.385 3.385 3.385 0 0 1-3.385-3.385 3.385 3.385 0 0 1 3.385-3.386M3.74 2.69c1.49 3.132.415 5.468-.584 7.787a5.1 5.1 0 0 0-.465 2.116 5.08 5.08 0 0 0 5.078 5.078 6 6 0 0 0 .533-.042l2.506 2.505L12 21.31l1.194-1.177 2.505-2.505c.178.025.355.034.533.042a5.08 5.08 0 0 0 5.078-5.078 5.1 5.1 0 0 0-.465-2.116c-.999-2.319-2.074-4.655-.584-7.787-2.235 1.744-5.417 3.123-8.26 3.132-2.845-.008-6.027-1.388-8.261-3.132z"/></svg>`,r:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#1976d2" d="M11.956 4.05c-5.694 0-10.354 3.106-10.354 6.947 0 3.396 3.686 6.212 8.531 6.813v2.205h3.53V17.82c.88-.093 1.699-.259 2.475-.497l1.43 2.692h3.996l-2.402-4.048c1.936-1.263 3.147-3.034 3.147-4.97 0-3.841-4.659-6.947-10.354-6.947m1.584 2.712c4.349 0 7.558 1.45 7.558 4.753 0 1.77-.952 3.013-2.505 3.779a1 1 0 0 1-.228-.156c-.373-.165-.994-.352-.994-.352s3.085-.227 3.085-3.302-3.23-3.127-3.23-3.127h-7.092v7.413c-2.64-.766-4.462-2.392-4.462-4.255 0-2.63 3.52-4.753 7.868-4.753m.156 4.12h2.143s.983-.05.983.974c0 1.004-.983 1.004-.983 1.004h-2.143v-1.977m-.031 4.566h.952c.186 0 .28.052.445.207.135.103.28.3.404.476-.57.073-1.17.104-1.801.104z"/></svg>`,scala:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#f44336" d="m6.457 9.894 12.523 5.163-.456 1.211L6 11.105Zm7.02-3.091L26 11.966l-.457 1.21L13.02 8.015ZM6.465 18.885l12.524 5.163-.457 1.21L6.01 20.097Zm7.007-3.086 12.524 5.163-.456 1.21-12.524-5.162Z"/><path fill="#f44336" d="M6 24.07V30l19.997-3.106V20.96zM6 5.11v5.99l20-3.11V2zm0 9.96v5.03l20-3.11v-5.03z"/></svg>`,solidity:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="#0288d1"><path d="m5.747 14.046 6.254 8.61 6.252-8.61-6.254 3.807z"/><path d="M11.999 1.343 5.747 11.83l6.252 3.807 6.253-3.807z"/></g></svg>`,svelte:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300"><path fill="#ff5722" d="M175.94 24.328c-13.037.252-26.009 3.872-37.471 11.174L79.912 72.818a67.13 67.13 0 0 0-30.355 44.906 70.8 70.8 0 0 0 6.959 45.445 67.2 67.2 0 0 0-10.035 25.102 71.54 71.54 0 0 0 12.236 54.156c23.351 33.41 69.468 43.311 102.81 22.07l58.559-37.158a67.36 67.36 0 0 0 30.355-44.906 70.77 70.77 0 0 0-6.982-45.422 67.65 67.65 0 0 0 10.059-25.102 71.63 71.63 0 0 0-12.236-54.156v-.18c-15.324-21.925-40.453-33.727-65.342-33.246zm5.137 28.68a46.5 46.5 0 0 1 36.09 19.969 42.98 42.98 0 0 1 7.365 32.557 45 45 0 0 1-1.393 5.455l-1.123 3.37-2.986-2.247a75.9 75.9 0 0 0-22.902-11.45l-2.244-.651.201-2.246a13.16 13.16 0 0 0-2.379-8.711 13.99 13.99 0 0 0-14.953-5.412 12.8 12.8 0 0 0-3.594 1.572l-58.578 37.25a12.24 12.24 0 0 0-5.502 8.15 13.1 13.1 0 0 0 2.246 9.834 14.03 14.03 0 0 0 14.93 5.569 13.5 13.5 0 0 0 3.594-1.573l22.453-14.234a41.8 41.8 0 0 1 11.898-5.232 46.48 46.48 0 0 1 49.914 18.502 43.02 43.02 0 0 1 7.363 32.557 40.42 40.42 0 0 1-18.254 27.078l-58.58 37.316a43 43 0 0 1-11.898 5.23A46.545 46.545 0 0 1 82.81 227.14a42.98 42.98 0 0 1-7.341-32.557 38 38 0 0 1 1.39-5.41l1.102-3.37 3.008 2.246a75.9 75.9 0 0 0 22.836 11.361l2.244.65-.201 2.247a13.25 13.25 0 0 0 2.447 8.644 14.03 14.03 0 0 0 15.043 5.569 13.1 13.1 0 0 0 3.592-1.573l58.467-37.316a12.17 12.17 0 0 0 5.502-8.173 12.96 12.96 0 0 0-2.246-9.811 14.03 14.03 0 0 0-15.043-5.568 12.8 12.8 0 0 0-3.592 1.57l-22.453 14.258a42.9 42.9 0 0 1-11.877 5.209 46.52 46.52 0 0 1-49.846-18.5 43.02 43.02 0 0 1-7.297-32.557A40.42 40.42 0 0 1 96.798 96.98l58.646-37.316a42.8 42.8 0 0 1 11.811-5.21 46.5 46.5 0 0 1 13.822-1.444z"/></svg>`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#8bc34a" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m.12 13.5 3.74 3.74 1.42-1.41-2.33-2.33 2.33-2.33-1.42-1.41zm11.16 0-3.74-3.74-1.42 1.41 2.33 2.33-2.33 2.33 1.42 1.41z"/></svg>`,swift:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ff6e40" d="M17.087 19.721c-2.36 1.36-5.59 1.5-8.86.1a13.8 13.8 0 0 1-6.23-5.32c.67.55 1.46 1 2.3 1.4 3.37 1.57 6.73 1.46 9.1 0-3.37-2.59-6.24-5.96-8.37-8.71-.45-.45-.78-1.01-1.12-1.51 8.28 6.05 7.92 7.59 2.41-1.01 4.89 4.94 9.43 7.74 9.43 7.74.16.09.25.16.36.22.1-.25.19-.51.26-.78.79-2.85-.11-6.12-2.08-8.81 4.55 2.75 7.25 7.91 6.12 12.24-.03.11-.06.22-.05.39 2.24 2.83 1.64 5.78 1.35 5.22-1.21-2.39-3.48-1.65-4.62-1.17"/></svg>`,terraform:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#5c6bc0" d="m2 10 8 4V6L2 2zm10 5 8 4v-8l-8-4zm0 11 8 4v-8l-8-4zm10-14v8l8-4V8z"/></svg>`,vbnet:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M30 14v-2h-2V8h-2v4h-2V8h-2v4h-2v2h2v2h-2v2h2v4h2v-4h2v4h2v-4h2v-2h-2v-2Zm-4 2h-2v-2h2Zm-12.437 6A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>`},dF=n({default:()=>BF}),fF=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),pF=[`data-markstream-mode`],mF={key:0,class:`infographic-block-header flex justify-between items-center border-b`},hF={key:0},gF={key:1,class:`flex items-center gap-x-2 overflow-hidden`},_F=[`innerHTML`],vF={key:2},yF={key:3,class:`infographic-mode-toggle flex items-center gap-0.5`},bF=[`disabled`],xF={class:`flex items-center gap-x-1`},SF={class:`flex items-center gap-x-1`},CF={key:4},wF={key:5,class:`infographic-header-actions flex items-center`},TF=[`aria-pressed`],EF={key:0,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},DF={key:1,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},OF=[`disabled`],kF=[`disabled`],AF={key:0,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},jF={key:1,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},MF={key:0,class:`infographic-source`},NF={class:`infographic-source-code text-sm font-mono whitespace-pre-wrap`},PF={key:1,class:`relative`},FF={key:0,class:`absolute top-2 right-2 z-10 rounded-lg`},IF={class:`flex items-center gap-2 backdrop-blur rounded-lg`},LF={class:`dialog-panel infographic-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden`},RF={class:`absolute top-6 right-6 z-50 flex items-center gap-2`},zF=`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,BF=eO(x({__name:`InfographicBlockNode`,props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0}},emits:[`copy`,`export`,`openModal`],setup(e,{emit:t}){let n=e,{t:r}=UO(),i=fA(),a=V(!1),s=V(!1),c=V(),d=V(),f=V(!0),m=V(!1),g=V(!1),_=V(),b=V(null),x=V(!1),S=V(null),w=V(typeof window>`u`),k=u(),A=I(mE,null),j=``,M=R(()=>WO(n,k));typeof window<`u`&&p(()=>c.value,e=>{var t;if((t=S.value)==null||t.destroy(),S.value=null,!e)return void(w.value=!1);let n=i(e,{rootMargin:`160px`});S.value=n,w.value=n.isVisible.value,n.whenVisible.then(()=>{w.value=!0})},{immediate:!0});let N=R(()=>n.node.code),ee=R(()=>function(e){return n.maxHeight===`none`?xM(e,void 0,null):xM(e,void 0,hM(n.maxHeight))}(hM(n.estimatedPreviewHeightPx)??vM(N.value))),re=V(`${ee.value}px`),ie=R(()=>hM(n.estimatedPreviewHeightPx)!=null);function ae(){if(!d.value||ie.value)return;let e=d.value.scrollHeight;if(e>0){let t=hM(function(e){if(n.maxHeight===`none`)return`${e}px`;if(n.maxHeight!=null){let t=Number.parseFloat(String(n.maxHeight));if(Number.isFinite(t))return`${Math.min(e,t)}px`}let t=d.value;if(t){let n=getComputedStyle(t).getPropertyValue(`--ms-size-code-max-height`).trim(),r=Number.parseFloat(n);if(Number.isFinite(r))return`${Math.min(e,r)}px`}return`${Math.min(e,500)}px`}(e))??e;re.value=`${Math.max(t,ee.value)}px`}}let L=V(1),se=V(0),ce=V(0),le=V(!1),ue=V({x:0,y:0}),de=R(()=>N.value);function me(e){return!e||e.disabled}function H(e,t,r=`top`){if(me(e.currentTarget))return;let i=e,a=i?.clientX!=null&&i?.clientY!=null?{x:i.clientX,y:i.clientY}:void 0;RO(e.currentTarget,t,r,!1,a,n.isDark)}function he(){zO()}function ge(e){if(me(e.currentTarget))return;let t=a.value?r(`common.copied`)||`Copied`:r(`common.copy`)||`Copy`,i=e,o=i?.clientX!=null&&i?.clientY!=null?{x:i.clientX,y:i.clientY}:void 0;RO(e.currentTarget,t,`top`,!1,o,n.isDark)}function _e(){return fF(this,null,function*(){try{let e=N.value;typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`&&(yield navigator.clipboard.writeText(e)),a.value=!0,setTimeout(()=>{a.value=!1},1e3)}catch(e){console.error(`Failed to copy:`,e)}})}function ve(e){(e!==`preview`||PN())&&(m.value=!0,f.value=e===`source`)}function W(){let e=d.value?.querySelector(`svg`);e?function(e){fF(this,null,function*(){try{let t=new XMLSerializer().serializeToString(e),n=new Blob([t],{type:`image/svg+xml;charset=utf-8`}),r=URL.createObjectURL(n);if(typeof document<`u`){let 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{}URL.revokeObjectURL(r)}}catch(e){console.error(`Failed to export SVG:`,e)}})}(e):console.error(`SVG element not found`)}function ye(e){e.key===`Escape`&&g.value&&be()}function be(){if(g.value=!1,_.value&&(_.value.innerHTML=``),b.value=null,typeof document<`u`)try{document.body.style.overflow=``}catch{}if(typeof window<`u`)try{window.removeEventListener(`keydown`,ye)}catch{}}function xe(){(function(){if(g.value=!0,typeof document<`u`)try{document.body.style.overflow=`hidden`}catch{}if(typeof window<`u`)try{window.addEventListener(`keydown`,ye)}catch{}h(()=>{if(d.value&&_.value){_.value.innerHTML=``;let 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`;let t=d.value.cloneNode(!0);t.classList.add(`fullscreen`),t.style.height=`auto`,e.appendChild(t),_.value.appendChild(e),b.value=e,e.style.transform=`translate(${se.value}px, ${ce.value}px) scale(${L.value})`}})})()}function Se(){L.value<3&&(L.value+=.1)}function Ce(){L.value>.5&&(L.value-=.1)}function we(){L.value=1,se.value=0,ce.value=0}function Te(e){le.value=!0,e instanceof MouseEvent?ue.value={x:e.clientX-se.value,y:e.clientY-ce.value}:ue.value={x:e.touches[0].clientX-se.value,y:e.touches[0].clientY-ce.value}}function G(e){if(!le.value)return;let t,n;e instanceof MouseEvent?(t=e.clientX,n=e.clientY):(t=e.touches[0].clientX,n=e.touches[0].clientY),se.value=t-ue.value.x,ce.value=n-ue.value.y}function Ee(){le.value=!1}let De=null,K=!1,Oe=!1,q=!1,ke=``;function Ae(e=!1){return fF(this,null,function*(){var t,r;if(!w.value||!d.value)return;if(K)return Oe=!0,void(q||=e);let i=de.value;if(!e&&i===ke&&x.value)return;K=!0,function(){let e=M.value;e&&j!==e&&(j&&A?.markSettled(j),j=e,A?.markPending(e))}();let a=d.value.innerHTML,o=x.value;try{let e=yield FN();if(!e)return void console.warn(`Infographic library failed to load.`);De&&=((t=De.destroy)==null||t.call(De),null),d.value.innerHTML=``,De=new e({container:d.value,width:`100%`,height:`100%`});let n=``;if((r=De.on)==null||r.call(De,`error`,e=>{n=(Array.isArray(e)?e:[e]).map(e=>e instanceof Error?e.message:typeof e==`string`?e:String(e&&typeof e==`object`&&`message`in e?e.message??``:e??``)).filter(Boolean).join(`; `)}),De.render(N.value),n)throw Error(n);if(!d.value.childNodes.length)throw Error(`Infographic render returned empty output.`);x.value=!0,ke=i,h(()=>{ae()})}catch(e){!1===n.loading?(console.error(`Failed to render infographic:`,e),x.value=!1,ke=``,d.value&&(d.value.innerHTML=`<div style="padding: var(--ms-inset-panel-body); color: hsl(var(--ms-destructive))">Failed to render infographic: ${e instanceof Error?e.message:`Unknown error`}</div>`)):(x.value=o,o&&d.value&&(d.value.innerHTML=a))}finally{if(K=!1,Oe){let e=q;Oe=!1,q=!1,h(()=>{Ae(e)})}else (function(){fF(this,null,function*(){let e=j;e&&(j=``,yield h(),function(e=M.value){e&&c.value&&A?.reportHeight(e,c.value.offsetHeight)}(e),A?.markSettled(e))})})()}})}function je(e=!1){!w.value||f.value||s.value||h(()=>{Ae(e)})}p(()=>N.value,()=>{je(!0)}),p(()=>n.loading,(e,t)=>{t&&!e&&je(!0)}),p(()=>f.value,e=>{e||je(!0)}),p(()=>s.value,e=>{e||je()}),p(()=>n.maxHeight,()=>{h(()=>{ae()})}),p([()=>n.estimatedPreviewHeightPx,()=>N.value],()=>{x.value||f.value||(re.value=`${ee.value}px`)}),p(()=>w.value,e=>{!e||f.value||s.value||je()}),l(()=>{!m.value&&PN()&&(f.value=!1),je()}),v(()=>{var e,t;if((e=S.value)==null||e.destroy(),S.value=null,function(){let e=j;e&&(j=``,A?.markSettled(e))}(),De&&=((t=De.destroy)==null||t.call(De),null),ke=``,typeof window<`u`)try{window.removeEventListener(`keydown`,ye)}catch{}});let Me=R(()=>!PN()),Ne=R(()=>f.value||s.value),Pe=R(()=>f.value?`fallback`:x.value?`preview`:`pending`),Fe=R(()=>({transform:`translate(${se.value}px, ${ce.value}px) scale(${L.value})`}));return p(Fe,e=>{g.value&&b.value&&(b.value.style.transform=e.transform)}),(e,t)=>(y(),U(`div`,{ref_key:`viewportTarget`,ref:c,class:z([`infographic-block-container rounded-lg border overflow-hidden`,[{"is-rendering":n.loading,dark:n.isDark}]]),"data-markstream-infographic":`1`,"data-markstream-mode":Pe.value},[n.showHeader?(y(),U(`div`,mF,[e.$slots[`header-left`]?(y(),U(`div`,hF,[C(e.$slots,`header-left`,{},void 0,!0)])):(y(),U(`div`,gF,[F(`span`,{class:`icon-slot action-icon shrink-0`,innerHTML:B(`<svg width="15.52" height="16" viewBox="0 0 291 300" fill="none" xmlns="http://www.w3.org/2000/svg"><g><path d="M140.904 239.376C128.83 239.683 119.675 239.299 115.448 243.843C110.902 248.07 111.288 257.227 110.979 269.302C111.118 274.675 111.118 279.478 111.472 283.52C111.662 285.638 111.95 287.547 112.406 289.224C112.411 289.243 112.416 289.259 112.422 289.28C112.462 289.419 112.496 289.558 112.539 289.691C113.168 291.787 114.088 293.491 115.446 294.758C116.662 296.064 118.283 296.963 120.264 297.59C120.36 297.614 120.464 297.646 120.555 297.675C120.56 297.68 120.56 297.68 120.566 297.68C120.848 297.768 121.142 297.846 121.443 297.923C121.454 297.923 121.464 297.928 121.478 297.934C122.875 298.272 124.424 298.507 126.11 298.678C126.326 298.696 126.542 298.718 126.763 298.739C130.79 299.086 135.558 299.088 140.904 299.222C152.974 298.912 162.128 299.302 166.36 294.758C170.904 290.526 170.515 281.371 170.824 269.302C170.515 257.227 170.907 248.07 166.36 243.843C162.131 239.299 152.974 239.683 140.904 239.376Z" fill="#FF6376"></path><path d="M21.2155 128.398C12.6555 128.616 6.16484 128.339 3.16751 131.56C-0.0538222 134.56 0.218178 141.054 -0.000488281 149.608C0.218178 158.168 -0.0538222 164.659 3.16751 167.656C6.16484 170.878 12.6555 170.606 21.2155 170.824C25.0262 170.726 28.4288 170.726 31.2955 170.475C32.7968 170.342 34.1488 170.136 35.3382 169.814C35.3542 169.811 35.3648 169.806 35.3782 169.803C35.4768 169.774 35.5755 169.747 35.6688 169.718C37.1568 169.272 38.3648 168.622 39.2635 167.656C40.1915 166.795 40.8262 165.646 41.2715 164.243C41.2875 164.174 41.3115 164.102 41.3328 164.035C41.3328 164.035 41.3355 164.032 41.3355 164.027C41.3968 163.827 41.4529 163.622 41.5062 163.406C41.5062 163.398 41.5115 163.392 41.5142 163.382C41.7542 162.392 41.9222 161.294 42.0422 160.096C42.0555 159.944 42.0715 159.792 42.0848 159.635C42.3328 156.779 42.3328 153.398 42.4262 149.608C42.2075 141.054 42.4848 134.56 39.2635 131.56C36.2635 128.339 29.7728 128.616 21.2155 128.398Z" fill="#FFCCCC"></path><path d="M81.0595 184.171C70.8568 184.433 63.1208 184.102 59.5475 187.942C55.7075 191.518 56.0328 199.254 55.7742 209.454C56.0328 219.657 55.7075 227.393 59.5475 230.963C63.1208 234.803 70.8568 234.478 81.0595 234.739C85.6008 234.622 89.6595 234.622 93.0728 234.323C94.8648 234.163 96.4755 233.921 97.8942 233.534C97.9102 233.529 97.9235 233.526 97.9422 233.521C98.0568 233.486 98.1742 233.457 98.2888 233.422C100.06 232.889 101.5 232.113 102.569 230.963C103.676 229.937 104.433 228.566 104.964 226.894C104.985 226.811 105.012 226.726 105.036 226.646C105.041 226.643 105.041 226.643 105.041 226.638C105.116 226.401 105.18 226.153 105.244 225.897C105.244 225.889 105.249 225.881 105.254 225.867C105.54 224.689 105.74 223.379 105.881 221.953C105.9 221.771 105.916 221.59 105.934 221.403C106.228 218.001 106.228 213.969 106.342 209.454C106.081 199.254 106.412 191.518 102.572 187.942C98.9955 184.102 91.2568 184.433 81.0595 184.171Z" fill="#FF939F"></path><path d="M260.591 151.87C215.652 151.87 203.02 164.523 203.02 209.462H198.476C198.476 164.523 185.836 151.881 140.895 151.881V147.337C185.836 147.337 198.487 134.705 198.487 89.7659H203.02C203.02 134.705 215.652 147.337 260.591 147.337V151.87ZM286.052 124.158C281.82 119.614 272.66 120.001 260.591 119.689C248.521 119.385 239.361 119.771 235.129 115.227C230.585 110.995 230.983 101.846 230.671 89.7659C230.513 83.7312 230.535 78.4272 230.023 74.1019C229.513 69.7659 228.481 66.4219 226.209 64.3046C221.967 59.7606 212.817 60.1472 200.748 59.8459C188.681 60.1472 179.519 59.7606 175.287 64.3046C170.753 68.5366 171.129 77.6966 170.828 89.7659C170.516 101.835 170.9 110.995 166.356 115.227C162.124 119.771 152.985 119.374 140.905 119.689C138.873 119.739 136.924 119.771 135.071 119.811C119.313 118.697 106.337 112.318 106.337 89.7659C106.212 84.6699 106.233 80.1792 105.807 76.5206C105.367 72.8726 104.492 70.0379 102.575 68.2566C99.0013 64.4112 91.2573 64.7446 81.0653 64.4832C70.86 64.7446 63.1186 64.4112 59.5533 68.2566C55.708 71.8299 56.0306 79.5632 55.7693 89.7659C56.0306 99.9686 55.708 107.702 59.5533 111.278C63.1186 115.113 70.86 114.79 81.0653 115.049C103.617 115.049 109.996 128.035 111.1 143.803C111.068 145.659 111.028 147.587 110.975 149.619C111.121 154.987 111.121 159.79 111.476 163.835C111.663 165.95 111.945 167.857 112.404 169.534C112.412 169.555 112.412 169.566 112.423 169.598C112.465 169.734 112.497 169.867 112.537 170.003C113.164 172.099 114.092 173.809 115.447 175.07C116.665 176.371 118.281 177.278 120.271 177.905C120.364 177.934 120.46 177.955 120.564 177.987C120.855 178.081 121.145 178.153 121.439 178.238C121.46 178.238 121.471 178.238 121.479 178.249C122.876 178.582 124.42 178.822 126.108 178.987C126.327 179.009 126.545 179.03 126.764 179.051C130.788 179.395 135.559 179.395 140.905 179.529C152.975 179.843 162.124 179.457 166.356 184.001C170.9 188.233 170.516 197.371 170.828 209.451C171.129 221.529 170.743 230.681 175.287 234.91C179.519 239.454 188.681 239.07 200.748 239.371C206.127 239.235 210.921 239.235 214.975 238.881C217.079 238.694 218.985 238.403 220.676 237.955C220.695 237.945 220.705 237.934 220.727 237.934C220.873 237.891 220.999 237.859 221.135 237.819C223.228 237.193 224.937 236.265 226.209 234.91C227.511 233.691 228.409 232.065 229.044 230.097C229.065 230.003 229.095 229.899 229.127 229.803V229.793C229.22 229.513 229.295 229.222 229.367 228.918C229.367 228.897 229.377 228.897 229.377 228.878C229.721 227.481 229.951 225.937 230.127 224.249C230.137 224.03 230.169 223.811 230.191 223.593C230.535 219.571 230.535 214.798 230.671 209.451C230.972 197.371 230.585 188.233 235.129 184.001C239.361 179.457 248.511 179.843 260.591 179.529C272.66 179.227 281.82 179.614 286.052 175.07C290.596 170.838 290.209 161.689 290.511 149.619C290.209 137.539 290.596 128.379 286.052 124.158Z" fill="#FF356A"></path><path d="M112.405 49.848C112.411 49.8694 112.416 49.8827 112.421 49.904C112.461 50.0427 112.499 50.1814 112.539 50.3147C113.171 52.4134 114.088 54.1147 115.448 55.384C116.661 56.6907 118.283 57.5894 120.264 58.2134C120.36 58.24 120.464 58.2694 120.555 58.3014C120.56 58.3067 120.56 58.3067 120.565 58.3067C120.848 58.3947 121.141 58.4694 121.443 58.5467C121.453 58.5467 121.464 58.552 121.48 58.5574C122.875 58.896 124.424 59.1334 126.112 59.3014C126.325 59.3227 126.541 59.3414 126.763 59.3627C130.789 59.712 135.56 59.712 140.904 59.8454C152.973 59.5387 162.128 59.928 166.36 55.384C170.907 51.152 170.515 41.9947 170.824 29.9254C170.517 17.8507 170.907 8.69602 166.363 4.46935C162.131 -0.0746511 152.973 0.309349 140.904 1.52588e-05C128.829 0.309349 119.675 -0.0746511 115.448 4.46935C110.904 8.69602 111.288 17.8507 110.979 29.9254C111.117 35.3014 111.117 40.1014 111.472 44.144C111.661 46.2614 111.949 48.1707 112.405 49.848Z" fill="#FF6376"></path></g></svg>
|
|
154
|
+
`)},null,8,_F),t[21]||=F(`span`,{class:`infographic-label font-medium font-mono truncate`},`Infographic`,-1)])),e.$slots[`header-center`]?(y(),U(`div`,vF,[C(e.$slots,`header-center`,{},void 0,!0)])):n.showModeToggle?(y(),U(`div`,yF,[F(`button`,{class:z([`infographic-mode-btn px-2 py-0.5 rounded transition-colors`,[f.value?``:`is-active`,Me.value?`opacity-50 cursor-not-allowed`:``]]),disabled:Me.value,onClick:t[0]||=()=>ve(`preview`),onMouseenter:t[1]||=e=>H(e,B(r)(`common.preview`)||`Preview`),onFocus:t[2]||=e=>H(e,B(r)(`common.preview`)||`Preview`),onMouseleave:he,onBlur:he},[F(`div`,xF,[t[22]||=F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0`}),F(`circle`,{cx:`12`,cy:`12`,r:`3`})])],-1),F(`span`,null,O(B(r)(`common.preview`)||`Preview`),1)])],42,bF),F(`button`,{class:z([`infographic-mode-btn px-2 py-0.5 rounded transition-colors`,[f.value?`is-active`:``]]),onClick:t[3]||=()=>ve(`source`),onMouseenter:t[4]||=e=>H(e,B(r)(`common.source`)||`Source`),onFocus:t[5]||=e=>H(e,B(r)(`common.source`)||`Source`),onMouseleave:he,onBlur:he},[F(`div`,SF,[t[23]||=F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m16 18l6-6l-6-6M8 6l-6 6l6 6`})],-1),F(`span`,null,O(B(r)(`common.source`)||`Source`),1)])],34)])):D(``,!0),e.$slots[`header-right`]?(y(),U(`div`,CF,[C(e.$slots,`header-right`,{},void 0,!0)])):(y(),U(`div`,wF,[n.showCollapseButton?(y(),U(`button`,{key:0,class:z(zF),"aria-pressed":s.value,onClick:t[6]||=e=>s.value=!s.value,onMouseenter:t[7]||=e=>H(e,s.value?B(r)(`common.expand`)||`Expand`:B(r)(`common.collapse`)||`Collapse`),onFocus:t[8]||=e=>H(e,s.value?B(r)(`common.expand`)||`Expand`:B(r)(`common.collapse`)||`Collapse`),onMouseleave:he,onBlur:he},[(y(),U(`svg`,{style:ne({rotate:s.value?`0deg`:`90deg`}),xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[...t[24]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m9 18l6-6l-6-6`},null,-1)]],4))],40,TF)):D(``,!0),n.showCopyButton?(y(),U(`button`,{key:1,class:z(zF),onClick:_e,onMouseenter:t[9]||=e=>ge(e),onFocus:t[10]||=e=>ge(e),onMouseleave:he,onBlur:he},[a.value?(y(),U(`svg`,DF,[...t[26]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M20 6L9 17l-5-5`},null,-1)]])):(y(),U(`svg`,EF,[...t[25]||=[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),F(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})],-1)]]))],32)):D(``,!0),n.showExportButton?(y(),U(`button`,{key:2,class:z(`${zF} ${Ne.value?`opacity-50 cursor-not-allowed`:``}`),disabled:Ne.value,onClick:W,onMouseenter:t[11]||=e=>H(e,B(r)(`common.export`)||`Export`),onFocus:t[12]||=e=>H(e,B(r)(`common.export`)||`Export`),onMouseleave:he,onBlur:he},[...t[27]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`path`,{d:`M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),F(`path`,{d:`m7 10l5 5l5-5`})])],-1)]],42,OF)):D(``,!0),n.showFullscreenButton?(y(),U(`button`,{key:3,class:z(`${zF} ${Ne.value?`opacity-50 cursor-not-allowed`:``}`),disabled:Ne.value,onClick:xe,onMouseenter:t[13]||=e=>H(e,g.value?B(r)(`common.minimize`)||`Minimize`:B(r)(`common.open`)||`Open`),onFocus:t[14]||=e=>H(e,g.value?B(r)(`common.minimize`)||`Minimize`:B(r)(`common.open`)||`Open`),onMouseleave:he,onBlur:he},[g.value?(y(),U(`svg`,jF,[...t[29]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6`},null,-1)]])):(y(),U(`svg`,AF,[...t[28]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6`},null,-1)]]))],42,kF)):D(``,!0)]))])):D(``,!0),E(F(`div`,null,[f.value?(y(),U(`div`,MF,[F(`pre`,NF,O(N.value),1)])):(y(),U(`div`,PF,[n.showZoomControls?(y(),U(`div`,FF,[F(`div`,IF,[F(`button`,{class:`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,onClick:Se,onMouseenter:t[15]||=e=>H(e,B(r)(`common.zoomIn`)||`Zoom in`),onFocus:t[16]||=e=>H(e,B(r)(`common.zoomIn`)||`Zoom in`),onMouseleave:he,onBlur:he},[...t[30]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`circle`,{cx:`11`,cy:`11`,r:`8`}),F(`path`,{d:`m21 21l-4.35-4.35M11 8v6m-3-3h6`})])],-1)]],32),F(`button`,{class:`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,onClick:Ce,onMouseenter:t[17]||=e=>H(e,B(r)(`common.zoomOut`)||`Zoom out`),onFocus:t[18]||=e=>H(e,B(r)(`common.zoomOut`)||`Zoom out`),onMouseleave:he,onBlur:he},[...t[31]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`circle`,{cx:`11`,cy:`11`,r:`8`}),F(`path`,{d:`m21 21l-4.35-4.35M8 11h6`})])],-1)]],32),F(`button`,{class:`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,onClick:we,onMouseenter:t[19]||=e=>H(e,B(r)(`common.resetZoom`)||`Reset zoom`),onFocus:t[20]||=e=>H(e,B(r)(`common.resetZoom`)||`Reset zoom`),onMouseleave:he,onBlur:he},O(Math.round(100*L.value))+`% `,33)])])):D(``,!0),F(`div`,{class:`infographic-preview relative transition-all overflow-hidden block`,style:ne({height:re.value}),onMousedown:Te,onMousemove:G,onMouseup:Ee,onMouseleave:Ee,onTouchstartPassive:Te,onTouchmovePassive:G,onTouchendPassive:Ee},[F(`div`,{class:z([`absolute inset-0 cursor-grab`,{"cursor-grabbing":le.value}]),style:ne(Fe.value)},[F(`div`,{ref_key:`infographicContainer`,ref:d,class:`w-full text-center flex items-center justify-center min-h-full`},null,512)],6)],36)]))],512),[[fe,!s.value]]),(y(),P(te,{to:`body`},[F(`div`,{class:z([`markstream-vue`,{dark:n.isDark}])},[o(pe,{name:`infographic-dialog`,appear:``},{default:T(()=>[g.value?(y(),U(`div`,{key:0,class:`infographic-modal-overlay fixed inset-0 z-50 flex items-center justify-center p-4`,onClick:oe(be,[`self`])},[F(`div`,LF,[F(`div`,RF,[F(`button`,{class:`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,onClick:Se},[...t[32]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`circle`,{cx:`11`,cy:`11`,r:`8`}),F(`path`,{d:`m21 21l-4.35-4.35M11 8v6m-3-3h6`})])],-1)]]),F(`button`,{class:`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,onClick:Ce},[...t[33]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`circle`,{cx:`11`,cy:`11`,r:`8`}),F(`path`,{d:`m21 21l-4.35-4.35M8 11h6`})])],-1)]]),F(`button`,{class:`infographic-action-btn p-[var(--ms-action-btn-padding)] rounded`,onClick:we},O(Math.round(100*L.value))+`% `,1),F(`button`,{class:`infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded`,onClick:be},[...t[34]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M18 6L6 18M6 6l12 12`})],-1)]])]),F(`div`,{ref_key:`modalContent`,ref:_,class:z([`w-full h-full flex items-center justify-center p-4 overflow-hidden`,{"cursor-grab":!le.value,"cursor-grabbing":le.value}]),onMousedown:Te,onMousemove:G,onMouseup:Ee,onMouseleave:Ee,onTouchstartPassive:Te,onTouchmovePassive:G,onTouchendPassive:Ee},null,34)])])):D(``,!0)]),_:1})],2)]))],10,pF))}}),[[`__scopeId`,`data-v-3321af9c`]]);BF.install=e=>{e.component(BF.__name,BF)};var VF=n({default:()=>CI}),HF=Object.defineProperty,UF=Object.defineProperties,WF=Object.getOwnPropertyDescriptors,GF=Object.getOwnPropertySymbols,KF=Object.prototype.hasOwnProperty,qF=Object.prototype.propertyIsEnumerable,JF=(e,t,n)=>t in e?HF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,YF=(e,t)=>{for(var n in t||={})KF.call(t,n)&&JF(e,n,t[n]);if(GF)for(var n of GF(t))qF.call(t,n)&&JF(e,n,t[n]);return e},XF=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),ZF=[`data-markstream-mode`,`data-markstream-pending`],QF={key:0,class:`mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]`},$F={key:0},eI={key:1,class:`flex items-center gap-x-2 overflow-hidden`},tI=[`innerHTML`],nI={key:2},rI={key:3,class:`mermaid-mode-toggle-group flex items-center gap-0.5`},iI={class:`flex items-center gap-x-1`},aI={class:`flex items-center gap-x-1`},oI={key:4},sI={key:5,class:`mermaid-header-actions flex items-center`},cI=[`aria-pressed`],lI={key:0,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},uI={key:1,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},dI=[`aria-label`,`disabled`],fI=[`aria-label`,`disabled`],pI={key:0,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},mI={key:1,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},hI={key:0,class:`mermaid-source-panel`},gI={class:`mermaid-source-code text-sm font-mono whitespace-pre-wrap`},_I={key:1,class:`relative`},vI={key:0,class:`absolute top-2 right-2 z-10 rounded-lg`},yI={class:`flex items-center gap-2 backdrop-blur rounded-lg`},bI={class:`dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden`},xI={class:`absolute top-6 right-6 z-50 flex items-center gap-2`},SI=`mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded`,CI=eO(x({__name:`MermaidBlockNode`,props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},onRenderError:{}},emits:[`copy`,`export`,`openModal`,`toggleMode`],setup(e,{emit:t}){let n=e,r=t,i={USE_PROFILES:{svg:!0},FORBID_TAGS:[`script`],FORBID_ATTR:[/^on/i],ADD_TAGS:[`style`],ADD_ATTR:[`style`],SAFE_FOR_TEMPLATES:!0},a=V(!1),s=V(typeof window>`u`),c=R(()=>n.isStrict?`strict`:`loose`),d=R(()=>({startOnLoad:!1,securityLevel:c.value,dompurifyConfig:c.value===`strict`?i:void 0,flowchart:c.value===`strict`?{htmlLabels:!1}:void 0}));function m(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=``}}function g(e,t,n={}){if(!e)return null;let r=function(e,t){if(!e)return null;let n=MT(t);if(!n)return null;let r=function(e,t){let n=Array.from(e.childNodes),r=document.createElement(`div`);return r.dataset.mermaidSvgLayer=`1`,r.style.zIndex=`1`,r.appendChild(t),e.insertBefore(r,e.firstChild),n.length>0&&function(e){let t=()=>{var t;for(let n of e)(t=n.parentNode)==null||t.removeChild(n)};typeof requestAnimationFrame==`function`?requestAnimationFrame(()=>{requestAnimationFrame(t)}):setTimeout(t,32)}(n),r}(e,n);return{svg:n.outerHTML,bindTarget:r}}(e,t);return r||n.keepPreviousOnFailure||m(e),r}let _=null;function b(e){if(n.enableMermaidInteractions&&e?.querySelector(`svg`))try{_?.(e)}catch{}}let{t:x}=UO();function S(){return XF(this,null,function*(){try{let e=yield yD();return a.value=!!e,e}catch(e){throw a.value=!1,e}finally{s.value=!0}})}let k=V(!1),A=V(!1),j=V(),M=V(),N=V(),ee=V(),re=V(null),ie=fA(),L=V(null),se=V(typeof window>`u`),ce=u(),le=I(mE,null),ue=``,de=0,me=0,H=R(()=>WO(n,ce));function he(){let e=H.value;e&&(ue&&ue!==e&&(le?.markSettled(ue),de=0),ue=e,de+=1,me+=1,de===1&&le?.markPending(e))}function ge(){return XF(this,null,function*(){let e=ue;if(!e||(de=Math.max(0,de-1),de>0))return;ue=``;let t=++me;yield h(),t===me&&(function(e=H.value){e&&j.value&&le?.reportHeight(e,j.value.offsetHeight)}(e),le?.markSettled(e))})}function _e(){let e=ue;e&&(ue=``,de=0,me+=1,le?.markSettled(e))}let ve=V(),W=R(()=>n.node.code.replace(/\]::([^:])/g,`]:::$1`).replace(/:::subgraphNode$/gm,`::subgraphNode`));function ye(){return function(e){return bM(e,function(){return hM(M.value?getComputedStyle(M.value).getPropertyValue(`--ms-size-diagram-min-height`).trim():``)??360}(),Et())}(hM(n.estimatedPreviewHeightPx)??_M(W.value))}function be(){return`${ye()}px`}let xe=V(null);function Se(){return!!N.value?.querySelector(`svg`)}function Ce(){return!1!==n.loading&&(Se()||!!xe.value)}let we=V(1),Te=V(0),G=V(0),Ee=V(!1),De=V({x:0,y:0}),K=V(!0),Oe=V(!1),q=V(!1),ke=V(null),Ae=V(0),je=V(!1),Me=R(()=>Math.max(0,n.renderDebounceMs??300)),Ne=R(()=>Math.max(0,n.contentStableDelayMs??500)),Pe=R(()=>Math.max(120,n.previewPollDelayMs??800)),Fe=R(()=>Math.max(Pe.value,n.previewPollMaxDelayMs??4e3)),Ie=R(()=>Math.max(1,Math.trunc(n.previewPollMaxAttempts??12))),Le=R(()=>!1!==n.loading),Re=null,ze=null,Be=null,Ve=0,He=globalThis.requestIdleCallback??((e,t)=>setTimeout(()=>e({didTimeout:!0}),16));function Ue(){return se.value&&!A.value}function We(){Be!=null&&(globalThis.clearTimeout(Be),Be=null)}function Ge(){We(),Be=globalThis.setTimeout(()=>{Be=null,Ue()&&He(()=>{Ue()&&Jt()},{timeout:500})},Me.value)}function Ke(){ze!=null&&(globalThis.clearTimeout(ze),ze=null)}function qe(e=600){if(typeof globalThis>`u`)return;let t=Math.max(0,e);Ke(),ze=globalThis.setTimeout(()=>{ze=null,n.loading||q.value||!Ue()?qe(Math.min(1200,Math.max(300,1.2*t))):Ge()},t)}let Je=V(be()),Ye=V(Je.value),Xe=null,J=V(!1),Ze=V(!1),Qe=V({}),$e=V(``),et=V(0),tt=null,nt=V(!1),Y=R(()=>!(A.value||s.value&&(K.value||!q.value&&!ke.value&&(J.value||nt.value&&(N.value?.textContent)?.trim())))),rt=V({zoom:1,translateX:0,translateY:0,containerHeight:Je.value}),it=R(()=>n.enableWheelZoom?{wheel:zt}:{}),at=R(()=>({worker:n.workerTimeoutMs??1400,parse:n.parseTimeoutMs??1800,render:n.renderTimeoutMs??2500,fullRender:n.fullRenderTimeoutMs??4e3})),ot=globalThis.cancelIdleCallback??(e=>clearTimeout(e)),st=null,ct=null,lt=!1,ut=Pe.value,dt=null,ft=0,pt=!0,mt=0;function X(e,t){let n=t?.timeoutMs,r=t?.signal;if(r?.aborted)return Promise.reject(new DOMException(`Aborted`,`AbortError`));let i=null,a=!1,o=null;return new Promise((t,s)=>{let c=()=>{i!=null&&clearTimeout(i),o&&r&&r.removeEventListener(`abort`,o)};n&&n>0&&(i=globalThis.setTimeout(()=>{a||(a=!0,c(),s(Error(`Operation timed out`)))},n)),r&&(o=()=>{a||(a=!0,c(),s(new DOMException(`Aborted`,`AbortError`)))},r.addEventListener(`abort`,o)),e().then(e=>{a||(a=!0,c(),t(e))}).catch(e=>{a||(a=!0,c(),s(e))})})}function Z(e){if(typeof document>`u`||!N.value)return;if(typeof n.onRenderError==`function`&&!0===n.onRenderError(e,W.value,N.value))return nt.value=!0,void Yt();let t=document.createElement(`div`);t.style.padding=`var(--ms-inset-panel-body)`,t.style.color=`hsl(var(--ms-destructive))`,t.textContent=`Failed to render diagram: `;let r=document.createElement(`span`);r.textContent=e instanceof Error?e.message:`Unknown error`,t.appendChild(r),m(N.value),N.value.appendChild(t),Je.value=(N.value?getComputedStyle(N.value).getPropertyValue(`--ms-size-diagram-min-height`).trim():``)||`360px`,Ye.value=Je.value,nt.value=!0,Yt()}typeof window<`u`&&p(()=>M.value,e=>{var t;if((t=L.value)==null||t.destroy(),L.value=null,!e)return void(se.value=!1);let n=ie(e,{rootMargin:`400px`});L.value=n,se.value=n.isVisible.value,n.whenVisible.then(()=>{se.value=!0})},{immediate:!0}),v(()=>{var e;(e=L.value)==null||e.destroy(),L.value=null,_e(),We()});let ht=R(()=>!1!==n.showTooltips);function gt(e){return!e||e.disabled}function _t(e,t,r=`top`){if(!ht.value||gt(e.currentTarget))return;let i=e,a=i?.clientX!=null&&i?.clientY!=null?{x:i.clientX,y:i.clientY}:void 0;RO(e.currentTarget,t,r,!1,a,n.isDark)}function vt(){ht.value&&zO()}function Q(e){if(!ht.value||gt(e.currentTarget))return;let t=k.value?x(`common.copied`)||`Copied`:x(`common.copy`)||`Copy`,r=e,i=r?.clientX!=null&&r?.clientY!=null?{x:r.clientX,y:r.clientY}:void 0;RO(e.currentTarget,t,`top`,!1,i,n.isDark)}function yt(e,t){let n={theme:t===`dark`?`dark`:`default`};c.value===`strict`&&(n.flowchart={htmlLabels:!1});let r=`%%{init: ${JSON.stringify(n)}}%%\n`;return e.trimStart().startsWith(`%%{`)?e:r+e}function bt(){return pt&&!K.value&&!J.value&&!nt.value}function xt(e){let t=e.trim();return!(!t||t.startsWith(`%%`))&&!/^(?:gantt|title|dateformat|axisformat|tickinterval|excludes|section|todaymarker|topaxis|weekday|weekend|acctitle|accdescr|accdescrmultiline)\b/i.test(t)&&t.includes(`:`)}function St(e){if(gM(e)===`gantt`)return function(e){let t=e.split(/\r?\n/);for(!/\r?\n$/.test(e)&&t.length>0&&t.pop();t.length>0;){let e=t[t.length-1]?.trim();if(e&&!e.startsWith(`%%`)){if(xt(e))break;t.pop()}else t.pop()}return t.some(xt)?t.join(`
|
|
155
155
|
`):``}(e);let t=e.split(/\r?\n/);for(;t.length>0;){let 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(`
|
|
156
|
-
`)}function Ct(e,t,n){return XF(this,null,function*(){try{return yield DD(e,t,n?.timeoutMs??it.value.worker)}catch{return yield function(e,t,n){return XF(this,null,function*(){let r=yield w();if(!r)return;let i=r,a=yt(e,t);if(typeof i.parse==`function`)return yield Z(()=>i.parse(a),{timeoutMs:n?.timeoutMs??it.value.parse,signal:n?.signal}),!0;let o=`mermaid-parse-${Math.random().toString(36).slice(2,9)}`;return yield Z(()=>r.render(o,a),{timeoutMs:n?.timeoutMs??it.value.render,signal:n?.signal}),!0})}(e,t,n)}})}function wt(e,t,n){return XF(this,null,function*(){if(gM(e)===`gantt`){let r=St(e);if(!r.trim())return{fullOk:!1,prefixOk:!1};try{if(yield Ct(r,t,n))return r===e?{fullOk:!0,prefixOk:!1}:{fullOk:!1,prefixOk:!0,prefix:r}}catch(e){if(e?.name===`AbortError`)throw e}return{fullOk:!1,prefixOk:!1}}try{if(yield Ct(e,t,n))return{fullOk:!0,prefixOk:!1}}catch(e){if(e?.name===`AbortError`)throw e}let r=St(e);if(r&&r.trim()&&r!==e)try{try{let i=yield OD(e,t,n?.timeoutMs??it.value.worker);i&&i.trim()&&(r=i)}catch{}if(yield Ct(r,t,n))return{fullOk:!1,prefixOk:!0,prefix:r}}catch(e){if(e?.name===`AbortError`)throw e}return{fullOk:!1,prefixOk:!1}})}let Tt=I(()=>Ee.value||J.value||A.value);function Et(){if(n.maxHeight===`none`)return null;if(n.maxHeight!=null){let e=Number.parseFloat(String(n.maxHeight));if(Number.isFinite(e))return e}let e=N.value;if(e){let t=getComputedStyle(e).getPropertyValue(`--ms-size-code-max-height`).trim(),n=Number.parseFloat(t);if(Number.isFinite(n))return n}return 500}function Dt(e,t){if(!N.value||!P.value)return;let r=!t?.force&&!1!==n.loading&&be(),i=P.value.querySelector(`svg`);if(!i)return;let a=0,o=0,s=i.getAttribute(`viewBox`),c=i.getAttribute(`width`),l=i.getAttribute(`height`);if(s){let e=s.split(` `);e.length===4&&(a=Number.parseFloat(e[2]),o=Number.parseFloat(e[3]))}if(a&&o||c&&l&&(a=Number.parseFloat(c),o=Number.parseFloat(l)),Number.isNaN(a)||Number.isNaN(o)||a<=0||o<=0)try{let e=i.getBBox();e&&e.width>0&&e.height>0&&(a=e.width,o=e.height)}catch(e){console.error(`Failed to get SVG BBox:`,e);return}if(a>0&&o>0){let t=o/a,s=e??N.value.clientWidth,c=i.getBoundingClientRect().width,l=c>0?c:s,u=Et(),d=l*t,f=Math.max(u==null?d:Math.min(d,u),_e());Je.value=`${Math.max(d,f)}px`,r||hM(n.estimatedPreviewHeightPx)!=null||(qe.value=`${f}px`)}}let Ot=M(!1),kt=I(()=>({transform:`translate(${Ce.value}px, ${q.value}px) scale(${Se.value})`}));function At(e){e.key===`Escape`&&Ot.value&&Mt()}function jt(){if(!N.value||!te.value)return!1;if(te.value.firstElementChild?.getAttribute(`data-mermaid-modal-clone`)===`1`)return!0;let e=N.value.cloneNode(!0);e.dataset.mermaidModalClone=`1`,e.classList.add(`fullscreen`),e.style.height=`100%`,e.style.maxHeight=`100%`;let t=e.querySelector(`[data-mermaid-wrapper]`);return t&&(ne.value=t,t.style.transform=kt.value.transform),v(te.value),te.value.appendChild(e),S(e),!0}function Mt(){if(Ot.value=!1,te.value&&v(te.value),ne.value=null,typeof document<`u`)try{document.body.style.overflow=``}catch{}if(typeof window<`u`)try{window.removeEventListener(`keydown`,At)}catch{}}function Nt(){Se.value<3&&(Se.value+=.1)}function Pt(){Se.value>.5&&(Se.value-=.1)}function Ft(){Se.value=1,Ce.value=0,q.value=0}function It(e){we.value=!0,e instanceof MouseEvent?Te.value={x:e.clientX-Ce.value,y:e.clientY-q.value}:Te.value={x:e.touches[0].clientX-Ce.value,y:e.touches[0].clientY-q.value}}function Lt(e){if(!we.value)return;let t,n;e instanceof MouseEvent?(t=e.clientX,n=e.clientY):(t=e.touches[0].clientX,n=e.touches[0].clientY),Ce.value=t-Te.value.x,q.value=n-Te.value.y}function Rt(){we.value=!1}function zt(e){if(n.enableWheelZoom&&(e.ctrlKey||e.metaKey)){if(e.preventDefault(),!N.value)return;let t=N.value.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=n-t.width/2,a=r-t.height/2,o=(i-Ce.value)/Se.value,s=(a-q.value)/Se.value,c=-e.deltaY*.01,l=Math.min(Math.max(Se.value+c,.5),3);l!==Se.value&&(Ce.value=i-o*l,q.value=a-s*l,Se.value=l)}}function Bt(){return XF(this,null,function*(){try{let e=K.value,t={payload:{type:`copy`,text:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};if(r(`copy`,t),t.defaultPrevented)return;typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`&&(yield navigator.clipboard.writeText(e)),T.value=!0,setTimeout(()=>{T.value=!1},1e3)}catch(e){console.error(`Failed to copy:`,e)}})}function Vt(){let e=P.value?.querySelector(`svg`);if(!e)return void console.error(`SVG element not found`);let t=new XMLSerializer().serializeToString(e),n={payload:{type:`export`},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:e,svgString:t};r(`export`,n),n.defaultPrevented||function(e,t=null){XF(this,null,function*(){try{let n=t??new XMLSerializer().serializeToString(e),r=new Blob([n],{type:`image/svg+xml;charset=utf-8`}),i=URL.createObjectURL(r);if(typeof document<`u`){let e=document.createElement(`a`);e.href=i,e.download=`mermaid-diagram-${Date.now()}.svg`;try{document.body.appendChild(e),e.click(),document.body.removeChild(e)}catch{}URL.revokeObjectURL(i)}}catch(e){console.error(`Failed to export SVG:`,e)}})}(e,t)}function Ht(){let e=P.value?.querySelector(`svg`)??null,t={payload:{type:`open-modal`},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:e,svgString:e?new XMLSerializer().serializeToString(e):null};r(`openModal`,t),t.defaultPrevented||function(){if(Ot.value=!0,typeof document<`u`)try{document.body.style.overflow=`hidden`}catch{}if(typeof window<`u`)try{window.addEventListener(`keydown`,At)}catch{}g(()=>{jt()||g(jt)})}()}function Ut(e){let t={payload:{type:`toggle-mode`,target:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};r(`toggleMode`,e,t),t.defaultPrevented||Wt(e)}function Wt(e){return XF(this,null,function*(){let t=ge.value;if(!t)return De.value=!0,void(Ee.value=e===`source`);let n=t.getBoundingClientRect().height;t.style.height=`${n}px`,t.style.overflow=`hidden`,De.value=!0,Ee.value=e===`source`,yield g();let r=t.scrollHeight;t.style.transition=`height var(--ms-duration-standard) var(--ms-ease-standard)`,t.offsetHeight,t.style.height=`${r}px`;let i=()=>{t.style.transition=``,t.style.height=``,t.style.overflow=``,t.removeEventListener(`transitionend`,a)};function a(){i()}t.addEventListener(`transitionend`,a),setTimeout(()=>i(),220)})}function Gt(){return XF(this,null,function*(){return J.value?Oe.value:P.value||(yield g(),P.value)?(J.value=!0,pe(),Oe.value=XF(null,null,function*(){var e,t,r;try{let i=yield w();if(!i)return;let o=`mermaid-${Date.now()}-${Math.random().toString(36).substring(2,11)}`;Y.value||Xe.value||(e=i.initialize)==null||e.call(i,(t=YF({},_.value),r={dompurifyConfig:YF({},a)},UF(t,WF(r))));let s=function(e,t=K.value){let n=t,r={theme:e===`dark`?`dark`:`default`};c.value===`strict`&&(r.flowchart={htmlLabels:!1});let i=`%%{init: ${JSON.stringify(r)}}%%\n`;return n.trim().startsWith(`%%{`)?n:i+n}(n.isDark?`dark`:`light`),l=yield Z(()=>i.render(o,s),{timeoutMs:it.value.fullRender}),u=l?.svg;if(P.value){let e=b(P.value,u,{keepPreviousOnFailure:!1!==n.loading});if(!e)return Xe.value&&=!1,!1;let t=l?.bindFunctions??null;x=t,S(e.bindTarget),Y.value||Xe.value||(AD(()=>Dt()),Y.value=!0,nt.value={zoom:Se.value,translateX:Ce.value,translateY:q.value,containerHeight:qe.value});let r=n.isDark?`dark`:`light`;e&&(Ze.value[r]={svg:e.svg,bindFunctions:t}),Xe.value&&=!1,tt.value=!1,Be=0,Ge()}return!0}catch(e){let t=function(e){let t=typeof e==`string`?e:typeof e?.message==`string`?e.message:``;return typeof t==`string`&&/timed out/i.test(t)}(e),r=Be+1;return t&&r<=3?(Be=r,Ke(Math.min(1200,600*r))):(Be=0,Ge(),!1===n.loading&&console.error(`Failed to render mermaid diagram:`,e),!1===n.loading&&Q(e)),!1}finally{J.value=!1,Oe.value=null,B()}}),Oe.value):void console.warn(`Mermaid container not ready`)})}function Kt(){return XF(this,null,function*(){var e;let t=K.value;if(!t.trim()){if(xe())return;P.value&&v(P.value),ye.value=null,Qe.value=``,tt.value=!1;return}if(!o.value||!He())return;let n=t.replace(/\s+/g,``);Y.value&&n===Qe.value&&(e=P.value)!=null&&e.querySelector(`svg`)||(yield Gt())&&(Qe.value=n,ye.value=P.value?.innerHTML??null,tt.value=!1)})}function qt(e){return XF(this,null,function*(){if(bt()&&(P.value||(yield g(),P.value))&&!J.value){J.value=!0,pe();try{let t=yield w();if(!t)return;let r=`mermaid-partial-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,i=n.isDark?`dark`:`light`,a=St(e),o=yt(a&&a.trim()?a:e,i),s=yield Z(()=>t.render(r,o),{timeoutMs:it.value.render}),c=s?.svg;if(P.value&&c){let e=b(P.value,c,{keepPreviousOnFailure:!0});e&&(x=s?.bindFunctions??null,S(e.bindTarget),AD(()=>Dt()))}}catch{}finally{J.value=!1,B()}}})}function Jt(){return XF(this,null,function*(){let e=Date.now(),t=++$e.value;pe();try{et&&et.abort(),et=new AbortController;let r=et.signal,i=n.isDark?`dark`:`light`,a=K.value,o=a.replace(/\s+/g,``);if(!a.trim()){if(xe())return;P.value&&v(P.value),ye.value=null,Qe.value=``,tt.value=!1;return}if(o===Qe.value)return;try{let n=yield wt(a,i,{signal:r,timeoutMs:it.value.worker});if(n.fullOk){if(!(yield Gt()))return;$e.value===t&&(ye.value=P.value?.innerHTML??null,Qe.value=o,tt.value=!1);return}let s=dt&&e<=dt;if(n.prefixOk&&n.prefix&&bt()&&!s)return void(yield qt(n.prefix))}catch(e){if(e?.name===`AbortError`)return}if($e.value!==t||tt.value)return;let s=Ze.value[i];if(s&&P.value){let e=b(P.value,s.svg);e&&(x=s.bindFunctions??null,S(e.bindTarget))}}finally{B()}})}function Yt(){ct&&(ct=!1,lt=Ne.value,ft=!1,ut&&=(ut.abort(),null),ot&&=(globalThis.clearTimeout(ot),null),st&&=(at(st),null),dt=Date.now())}function Xt(){if(Yt(),Ue(),et){try{et.abort()}catch{}et=null}if(ut){try{ut.abort()}catch{}ut=null}kD(),Ge(),Be=0}function Zt(e=Ne.value){ct&&(pt>=Fe.value?Yt():(ot&&globalThis.clearTimeout(ot),ot=globalThis.setTimeout(()=>{st=Ve(()=>XF(null,null,function*(){if(!ct)return;if(!He()||Ee.value||Y.value)return void Yt();let e=n.isDark?`dark`:`light`,t=K.value;if(!t.trim())return!1===n.loading?void Yt():void Zt(lt);if(pt++,pt>Fe.value)Yt();else{ut&&ut.abort(),ut=new AbortController;try{let n=yield wt(t,e,{signal:ut.signal,timeoutMs:it.value.worker});if(n.fullOk){if((yield Gt())&&Y.value)return void Yt()}else n.prefixOk&&n.prefix&&bt()&&(yield qt(n.prefix))}catch{}lt=Math.min(Math.floor(1.5*lt),Pe.value),Zt(lt)}}),{timeout:500})},e)))}function Qt(){ct||Ie.value&&o.value&&He()&&(Ee.value||Y.value||(ct=!0,dt=0,ft=!0,pt=0,lt=Ne.value,Zt(lt)))}return E(te,e=>{Ot.value&&e&&jt()}),E(kt,e=>{Ot.value&&ne.value&&(ne.value.style.transform=e.transform)},{immediate:!0}),E(mt,e=>{e||zO()}),E(()=>K.value,e=>{if((e.trim()||!1===n.loading)&&(Y.value=!1,Ze.value={}),!Ie.value)return Yt(),void(He()&&!Ee.value&&Kt());He()&&We(),!Ee.value&&o.value&&He()?Qt():Yt(),function(){if(!Ie.value||!Ee.value||!o.value)return;let e=K.value.length;e!==ke.value&&(Ae.value=!0,ke.value=e,Le&&clearTimeout(Le),Le=setTimeout(()=>{Ae.value&&Ee.value&&K.value.trim()&&(Ae.value=!1,Wt(`preview`))},Me.value))}()}),E(()=>n.isDark,()=>XF(null,null,function*(){if(!Y.value||tt.value)return;let e=n.isDark?`dark`:`light`,t=Ze.value[e];if(t){if(P.value){let e=b(P.value,t.svg);e&&(x=t.bindFunctions??null,S(e.bindTarget))}return}let r={zoom:Se.value,translateX:Ce.value,translateY:q.value,containerHeight:qe.value},i=Se.value!==1||Ce.value!==0||q.value!==0;Xe.value=!0,i&&(Se.value=1,Ce.value=0,q.value=0,yield g()),yield Gt(),i&&(yield g(),Se.value=r.zoom,Ce.value=r.translateX,q.value=r.translateY,qe.value=r.containerHeight,nt.value=r)})),E(()=>Ee.value,e=>XF(null,null,function*(){if(e)Yt(),Y.value&&(nt.value={zoom:Se.value,translateX:Ce.value,translateY:q.value,containerHeight:qe.value});else{if(tt.value)return;let e=n.isDark?`dark`:`light`;if(Y.value&&Ze.value[e]){if(yield g(),P.value){let t=Ze.value[e],n=b(P.value,t.svg);n&&(x=t.bindFunctions??null,S(n.bindTarget))}Se.value=nt.value.zoom,Ce.value=nt.value.translateX,q.value=nt.value.translateY,qe.value=nt.value.containerHeight;return}if(yield g(),!o.value||!He())return;if(!Ie.value)return Yt(),void(yield Kt());Qt(),yield Jt()}})),E(()=>n.loading,(e,t)=>XF(null,null,function*(){if(!0===t&&!1===e){let e=K.value.trim();if(!e)return P.value&&v(P.value),ye.value=null,Qe.value=``,tt.value=!1,Xt();let t=n.isDark?`dark`:`light`,r=e.replace(/\s+/g,``);if(Y.value&&r===Qe.value){if(yield g(),P.value&&!P.value.querySelector(`svg`)&&Ze.value[t]){let e=Ze.value[t],n=b(P.value,e.svg);n&&(x=e.bindFunctions??null,S(n.bindTarget))}Dt(void 0,{force:!0}),Xt();return}try{if(yield Ct(e,t,{timeoutMs:it.value.worker}),!(yield Gt()))return;Qe.value=r,tt.value=!1,Xt()}catch(e){Xt(),Q(e)}}})),E(N,e=>{Ye&&Ye.disconnect(),e&&(Ye=new ResizeObserver(e=>{e&&e.length>0&&!Ee.value&&!A.value&&AD(()=>{Dt(e[0].contentRect.width)})}),Ye.observe(e))},{immediate:!0}),f(()=>XF(null,null,function*(){w().catch(e=>{o.value=!1,console.warn(`[markstream-vue] Failed to initialize mermaid renderer. Call enableMermaid() to configure a loader.`,e)}),yield g(),De.value||(Ee.value=!o.value),He()&&(Ie.value?(We(),ke.value=K.value.length):Ee.value||Kt())})),E(()=>o.value,e=>{De.value||(Ee.value=!e)}),E(()=>n.maxHeight,()=>{g(()=>{Dt()})}),E([()=>n.estimatedPreviewHeightPx,()=>K.value],()=>{Y.value||be()||Ee.value||(qe.value=ve(),Je.value=qe.value)}),E(()=>ae.value,e=>{e&&(Y.value||(Ie.value?(We(),ke.value=K.value.length):Kt()),n.loading||Y.value||Kt(),!Ee.value&&o.value&&Ie.value&&Qt())},{immediate:!1}),m(()=>{Le&&clearTimeout(Le),Ue(),Ye&&Ye.disconnect(),et&&=(et.abort(),null),kD(),Yt(),Ge(),he()}),E(()=>A.value,e=>XF(null,null,function*(){e?(Yt(),et&&et.abort()):He()&&!Y.value&&(yield g(),Ie.value?(We(),Qt()):Ee.value||Kt())}),{immediate:!1}),(e,t)=>(G(),W(`div`,{ref_key:`blockContainer`,ref:j,class:L([`mermaid-block-container rounded-lg border overflow-hidden`,[{"is-rendering":n.loading,dark:n.isDark}]]),"data-markstream-mermaid":`1`,"data-markstream-mode":Ee.value?`fallback`:Y.value?`preview`:`pending`,"data-markstream-pending":X.value?`true`:void 0},[n.showHeader?(G(),W(`div`,QF,[e.$slots[`header-left`]?(G(),W(`div`,$F,[d(e.$slots,`header-left`,{},void 0,!0)])):(G(),W(`div`,eI,[F(`span`,{class:`icon-slot action-icon shrink-0`,innerHTML:R(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">
|
|
156
|
+
`)}function Ct(e,t,n){return XF(this,null,function*(){try{return yield DD(e,t,n?.timeoutMs??at.value.worker)}catch{return yield function(e,t,n){return XF(this,null,function*(){let r=yield S();if(!r)return;let i=r,a=yt(e,t);if(typeof i.parse==`function`)return yield X(()=>i.parse(a),{timeoutMs:n?.timeoutMs??at.value.parse,signal:n?.signal}),!0;let o=`mermaid-parse-${Math.random().toString(36).slice(2,9)}`;return yield X(()=>r.render(o,a),{timeoutMs:n?.timeoutMs??at.value.render,signal:n?.signal}),!0})}(e,t,n)}})}function wt(e,t,n){return XF(this,null,function*(){if(gM(e)===`gantt`){let r=St(e);if(!r.trim())return{fullOk:!1,prefixOk:!1};try{if(yield Ct(r,t,n))return r===e?{fullOk:!0,prefixOk:!1}:{fullOk:!1,prefixOk:!0,prefix:r}}catch(e){if(e?.name===`AbortError`)throw e}return{fullOk:!1,prefixOk:!1}}try{if(yield Ct(e,t,n))return{fullOk:!0,prefixOk:!1}}catch(e){if(e?.name===`AbortError`)throw e}let r=St(e);if(r&&r.trim()&&r!==e)try{try{let i=yield OD(e,t,n?.timeoutMs??at.value.worker);i&&i.trim()&&(r=i)}catch{}if(yield Ct(r,t,n))return{fullOk:!1,prefixOk:!0,prefix:r}}catch(e){if(e?.name===`AbortError`)throw e}return{fullOk:!1,prefixOk:!1}})}let Tt=R(()=>K.value||q.value||A.value);function Et(){if(n.maxHeight===`none`)return null;if(n.maxHeight!=null){let e=Number.parseFloat(String(n.maxHeight));if(Number.isFinite(e))return e}let e=M.value;if(e){let t=getComputedStyle(e).getPropertyValue(`--ms-size-code-max-height`).trim(),n=Number.parseFloat(t);if(Number.isFinite(n))return n}return 500}function Dt(e,t){if(!M.value||!N.value)return;let r=!t?.force&&!1!==n.loading&&Se(),i=N.value.querySelector(`svg`);if(!i)return;let a=0,o=0,s=i.getAttribute(`viewBox`),c=i.getAttribute(`width`),l=i.getAttribute(`height`);if(s){let e=s.split(` `);e.length===4&&(a=Number.parseFloat(e[2]),o=Number.parseFloat(e[3]))}if(a&&o||c&&l&&(a=Number.parseFloat(c),o=Number.parseFloat(l)),Number.isNaN(a)||Number.isNaN(o)||a<=0||o<=0)try{let e=i.getBBox();e&&e.width>0&&e.height>0&&(a=e.width,o=e.height)}catch(e){console.error(`Failed to get SVG BBox:`,e);return}if(a>0&&o>0){let t=o/a,s=e??M.value.clientWidth,c=i.getBoundingClientRect().width,l=c>0?c:s,u=Et(),d=l*t,f=Math.max(u==null?d:Math.min(d,u),ye());Ye.value=`${Math.max(d,f)}px`,r||hM(n.estimatedPreviewHeightPx)!=null||(Je.value=`${f}px`)}}let Ot=V(!1),kt=R(()=>({transform:`translate(${Te.value}px, ${G.value}px) scale(${we.value})`}));function At(e){e.key===`Escape`&&Ot.value&&Mt()}function jt(){if(!M.value||!ee.value)return!1;if(ee.value.firstElementChild?.getAttribute(`data-mermaid-modal-clone`)===`1`)return!0;let e=M.value.cloneNode(!0);e.dataset.mermaidModalClone=`1`,e.classList.add(`fullscreen`),e.style.height=`100%`,e.style.maxHeight=`100%`;let t=e.querySelector(`[data-mermaid-wrapper]`);return t&&(re.value=t,t.style.transform=kt.value.transform),m(ee.value),ee.value.appendChild(e),b(e),!0}function Mt(){if(Ot.value=!1,ee.value&&m(ee.value),re.value=null,typeof document<`u`)try{document.body.style.overflow=``}catch{}if(typeof window<`u`)try{window.removeEventListener(`keydown`,At)}catch{}}function Nt(){we.value<3&&(we.value+=.1)}function Pt(){we.value>.5&&(we.value-=.1)}function Ft(){we.value=1,Te.value=0,G.value=0}function It(e){Ee.value=!0,e instanceof MouseEvent?De.value={x:e.clientX-Te.value,y:e.clientY-G.value}:De.value={x:e.touches[0].clientX-Te.value,y:e.touches[0].clientY-G.value}}function Lt(e){if(!Ee.value)return;let t,n;e instanceof MouseEvent?(t=e.clientX,n=e.clientY):(t=e.touches[0].clientX,n=e.touches[0].clientY),Te.value=t-De.value.x,G.value=n-De.value.y}function Rt(){Ee.value=!1}function zt(e){if(n.enableWheelZoom&&(e.ctrlKey||e.metaKey)){if(e.preventDefault(),!M.value)return;let t=M.value.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=n-t.width/2,a=r-t.height/2,o=(i-Te.value)/we.value,s=(a-G.value)/we.value,c=-e.deltaY*.01,l=Math.min(Math.max(we.value+c,.5),3);l!==we.value&&(Te.value=i-o*l,G.value=a-s*l,we.value=l)}}function Bt(){return XF(this,null,function*(){try{let e=W.value,t={payload:{type:`copy`,text:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};if(r(`copy`,t),t.defaultPrevented)return;typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`&&(yield navigator.clipboard.writeText(e)),k.value=!0,setTimeout(()=>{k.value=!1},1e3)}catch(e){console.error(`Failed to copy:`,e)}})}function Vt(){let e=N.value?.querySelector(`svg`);if(!e)return void console.error(`SVG element not found`);let t=new XMLSerializer().serializeToString(e),n={payload:{type:`export`},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:e,svgString:t};r(`export`,n),n.defaultPrevented||function(e,t=null){XF(this,null,function*(){try{let n=t??new XMLSerializer().serializeToString(e),r=new Blob([n],{type:`image/svg+xml;charset=utf-8`}),i=URL.createObjectURL(r);if(typeof document<`u`){let e=document.createElement(`a`);e.href=i,e.download=`mermaid-diagram-${Date.now()}.svg`;try{document.body.appendChild(e),e.click(),document.body.removeChild(e)}catch{}URL.revokeObjectURL(i)}}catch(e){console.error(`Failed to export SVG:`,e)}})}(e,t)}function Ht(){let e=N.value?.querySelector(`svg`)??null,t={payload:{type:`open-modal`},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:e,svgString:e?new XMLSerializer().serializeToString(e):null};r(`openModal`,t),t.defaultPrevented||function(){if(Ot.value=!0,typeof document<`u`)try{document.body.style.overflow=`hidden`}catch{}if(typeof window<`u`)try{window.addEventListener(`keydown`,At)}catch{}h(()=>{jt()||h(jt)})}()}function Ut(e){let t={payload:{type:`toggle-mode`,target:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};r(`toggleMode`,e,t),t.defaultPrevented||Wt(e)}function Wt(e){return XF(this,null,function*(){let t=ve.value;if(!t)return Oe.value=!0,void(K.value=e===`source`);let n=t.getBoundingClientRect().height;t.style.height=`${n}px`,t.style.overflow=`hidden`,Oe.value=!0,K.value=e===`source`,yield h();let r=t.scrollHeight;t.style.transition=`height var(--ms-duration-standard) var(--ms-ease-standard)`,t.offsetHeight,t.style.height=`${r}px`;let i=()=>{t.style.transition=``,t.style.height=``,t.style.overflow=``,t.removeEventListener(`transitionend`,a)};function a(){i()}t.addEventListener(`transitionend`,a),setTimeout(()=>i(),220)})}function Gt(){return XF(this,null,function*(){return q.value?ke.value:N.value||(yield h(),N.value)?(q.value=!0,he(),ke.value=XF(null,null,function*(){var e,t,r;try{let a=yield S();if(!a)return;let o=`mermaid-${Date.now()}-${Math.random().toString(36).substring(2,11)}`;J.value||Ze.value||(e=a.initialize)==null||e.call(a,(t=YF({},d.value),r={dompurifyConfig:YF({},i)},UF(t,WF(r))));let s=function(e,t=W.value){let n=t,r={theme:e===`dark`?`dark`:`default`};c.value===`strict`&&(r.flowchart={htmlLabels:!1});let i=`%%{init: ${JSON.stringify(r)}}%%\n`;return n.trim().startsWith(`%%{`)?n:i+n}(n.isDark?`dark`:`light`),l=yield X(()=>a.render(o,s),{timeoutMs:at.value.fullRender}),u=l?.svg;if(N.value){let e=g(N.value,u,{keepPreviousOnFailure:!1!==n.loading});if(!e)return Ze.value&&=!1,!1;let t=l?.bindFunctions??null;_=t,b(e.bindTarget),J.value||Ze.value||(AD(()=>Dt()),J.value=!0,rt.value={zoom:we.value,translateX:Te.value,translateY:G.value,containerHeight:Je.value});let r=n.isDark?`dark`:`light`;e&&(Qe.value[r]={svg:e.svg,bindFunctions:t}),Ze.value&&=!1,nt.value=!1,Ve=0,Ke()}return!0}catch(e){let t=function(e){let t=typeof e==`string`?e:typeof e?.message==`string`?e.message:``;return typeof t==`string`&&/timed out/i.test(t)}(e),r=Ve+1;return t&&r<=3?(Ve=r,qe(Math.min(1200,600*r))):(Ve=0,Ke(),!1===n.loading&&console.error(`Failed to render mermaid diagram:`,e),!1===n.loading&&Z(e)),!1}finally{q.value=!1,ke.value=null,ge()}}),ke.value):void console.warn(`Mermaid container not ready`)})}function Kt(){return XF(this,null,function*(){var e;let t=W.value;if(!t.trim()){if(Ce())return;N.value&&m(N.value),xe.value=null,$e.value=``,nt.value=!1;return}if(!a.value||!Ue())return;let n=t.replace(/\s+/g,``);J.value&&n===$e.value&&(e=N.value)!=null&&e.querySelector(`svg`)||(yield Gt())&&($e.value=n,xe.value=N.value?.innerHTML??null,nt.value=!1)})}function qt(e){return XF(this,null,function*(){if(bt()&&(N.value||(yield h(),N.value))&&!q.value){q.value=!0,he();try{let t=yield S();if(!t)return;let r=`mermaid-partial-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,i=n.isDark?`dark`:`light`,a=St(e),o=yt(a&&a.trim()?a:e,i),s=yield X(()=>t.render(r,o),{timeoutMs:at.value.render}),c=s?.svg;if(N.value&&c){let e=g(N.value,c,{keepPreviousOnFailure:!0});e&&(_=s?.bindFunctions??null,b(e.bindTarget),AD(()=>Dt()))}}catch{}finally{q.value=!1,ge()}}})}function Jt(){return XF(this,null,function*(){let e=Date.now(),t=++et.value;he();try{tt&&tt.abort(),tt=new AbortController;let r=tt.signal,i=n.isDark?`dark`:`light`,a=W.value,o=a.replace(/\s+/g,``);if(!a.trim()){if(Ce())return;N.value&&m(N.value),xe.value=null,$e.value=``,nt.value=!1;return}if(o===$e.value)return;try{let n=yield wt(a,i,{signal:r,timeoutMs:at.value.worker});if(n.fullOk){if(!(yield Gt()))return;et.value===t&&(xe.value=N.value?.innerHTML??null,$e.value=o,nt.value=!1);return}let s=ft&&e<=ft;if(n.prefixOk&&n.prefix&&bt()&&!s)return void(yield qt(n.prefix))}catch(e){if(e?.name===`AbortError`)return}if(et.value!==t||nt.value)return;let s=Qe.value[i];if(s&&N.value){let e=g(N.value,s.svg);e&&(_=s.bindFunctions??null,b(e.bindTarget))}}finally{ge()}})}function Yt(){lt&&(lt=!1,ut=Pe.value,pt=!1,dt&&=(dt.abort(),null),st&&=(globalThis.clearTimeout(st),null),ct&&=(ot(ct),null),ft=Date.now())}function Xt(){if(Yt(),We(),tt){try{tt.abort()}catch{}tt=null}if(dt){try{dt.abort()}catch{}dt=null}kD(),Ke(),Ve=0}function Zt(e=Pe.value){lt&&(mt>=Ie.value?Yt():(st&&globalThis.clearTimeout(st),st=globalThis.setTimeout(()=>{ct=He(()=>XF(null,null,function*(){if(!lt)return;if(!Ue()||K.value||J.value)return void Yt();let e=n.isDark?`dark`:`light`,t=W.value;if(!t.trim())return!1===n.loading?void Yt():void Zt(ut);if(mt++,mt>Ie.value)Yt();else{dt&&dt.abort(),dt=new AbortController;try{let n=yield wt(t,e,{signal:dt.signal,timeoutMs:at.value.worker});if(n.fullOk){if((yield Gt())&&J.value)return void Yt()}else n.prefixOk&&n.prefix&&bt()&&(yield qt(n.prefix))}catch{}ut=Math.min(Math.floor(1.5*ut),Fe.value),Zt(ut)}}),{timeout:500})},e)))}function Qt(){lt||Le.value&&a.value&&Ue()&&(K.value||J.value||(lt=!0,ft=0,pt=!0,mt=0,ut=Pe.value,Zt(ut)))}return p(ee,e=>{Ot.value&&e&&jt()}),p(kt,e=>{Ot.value&&re.value&&(re.value.style.transform=e.transform)},{immediate:!0}),p(ht,e=>{e||zO()}),p(()=>W.value,e=>{if((e.trim()||!1===n.loading)&&(J.value=!1,Qe.value={}),!Le.value)return Yt(),void(Ue()&&!K.value&&Kt());Ue()&&Ge(),!K.value&&a.value&&Ue()?Qt():Yt(),function(){if(!Le.value||!K.value||!a.value)return;let e=W.value.length;e!==Ae.value&&(je.value=!0,Ae.value=e,Re&&clearTimeout(Re),Re=setTimeout(()=>{je.value&&K.value&&W.value.trim()&&(je.value=!1,Wt(`preview`))},Ne.value))}()}),p(()=>n.isDark,()=>XF(null,null,function*(){if(!J.value||nt.value)return;let e=n.isDark?`dark`:`light`,t=Qe.value[e];if(t){if(N.value){let e=g(N.value,t.svg);e&&(_=t.bindFunctions??null,b(e.bindTarget))}return}let r={zoom:we.value,translateX:Te.value,translateY:G.value,containerHeight:Je.value},i=we.value!==1||Te.value!==0||G.value!==0;Ze.value=!0,i&&(we.value=1,Te.value=0,G.value=0,yield h()),yield Gt(),i&&(yield h(),we.value=r.zoom,Te.value=r.translateX,G.value=r.translateY,Je.value=r.containerHeight,rt.value=r)})),p(()=>K.value,e=>XF(null,null,function*(){if(e)Yt(),J.value&&(rt.value={zoom:we.value,translateX:Te.value,translateY:G.value,containerHeight:Je.value});else{if(nt.value)return;let e=n.isDark?`dark`:`light`;if(J.value&&Qe.value[e]){if(yield h(),N.value){let t=Qe.value[e],n=g(N.value,t.svg);n&&(_=t.bindFunctions??null,b(n.bindTarget))}we.value=rt.value.zoom,Te.value=rt.value.translateX,G.value=rt.value.translateY,Je.value=rt.value.containerHeight;return}if(yield h(),!a.value||!Ue())return;if(!Le.value)return Yt(),void(yield Kt());Qt(),yield Jt()}})),p(()=>n.loading,(e,t)=>XF(null,null,function*(){if(!0===t&&!1===e){let e=W.value.trim();if(!e)return N.value&&m(N.value),xe.value=null,$e.value=``,nt.value=!1,Xt();let t=n.isDark?`dark`:`light`,r=e.replace(/\s+/g,``);if(J.value&&r===$e.value){if(yield h(),N.value&&!N.value.querySelector(`svg`)&&Qe.value[t]){let e=Qe.value[t],n=g(N.value,e.svg);n&&(_=e.bindFunctions??null,b(n.bindTarget))}Dt(void 0,{force:!0}),Xt();return}try{if(yield Ct(e,t,{timeoutMs:at.value.worker}),!(yield Gt()))return;$e.value=r,nt.value=!1,Xt()}catch(e){Xt(),Z(e)}}})),p(M,e=>{Xe&&Xe.disconnect(),e&&(Xe=new ResizeObserver(e=>{e&&e.length>0&&!K.value&&!A.value&&AD(()=>{Dt(e[0].contentRect.width)})}),Xe.observe(e))},{immediate:!0}),l(()=>XF(null,null,function*(){S().catch(e=>{a.value=!1,console.warn(`[markstream-vue] Failed to initialize mermaid renderer. Call enableMermaid() to configure a loader.`,e)}),yield h(),Oe.value||(K.value=!a.value),Ue()&&(Le.value?(Ge(),Ae.value=W.value.length):K.value||Kt())})),p(()=>a.value,e=>{Oe.value||(K.value=!e)}),p(()=>n.maxHeight,()=>{h(()=>{Dt()})}),p([()=>n.estimatedPreviewHeightPx,()=>W.value],()=>{J.value||Se()||K.value||(Je.value=be(),Ye.value=Je.value)}),p(()=>se.value,e=>{e&&(J.value||(Le.value?(Ge(),Ae.value=W.value.length):Kt()),n.loading||J.value||Kt(),!K.value&&a.value&&Le.value&&Qt())},{immediate:!1}),f(()=>{Re&&clearTimeout(Re),We(),Xe&&Xe.disconnect(),tt&&=(tt.abort(),null),kD(),Yt(),Ke(),_e()}),p(()=>A.value,e=>XF(null,null,function*(){e?(Yt(),tt&&tt.abort()):Ue()&&!J.value&&(yield h(),Le.value?(Ge(),Qt()):K.value||Kt())}),{immediate:!1}),(e,t)=>(y(),U(`div`,{ref_key:`blockContainer`,ref:j,class:z([`mermaid-block-container rounded-lg border overflow-hidden`,[{"is-rendering":n.loading,dark:n.isDark}]]),"data-markstream-mermaid":`1`,"data-markstream-mode":K.value?`fallback`:J.value?`preview`:`pending`,"data-markstream-pending":Y.value?`true`:void 0},[n.showHeader?(y(),U(`div`,QF,[e.$slots[`header-left`]?(y(),U(`div`,$F,[C(e.$slots,`header-left`,{},void 0,!0)])):(y(),U(`div`,eI,[F(`span`,{class:`icon-slot action-icon shrink-0`,innerHTML:B(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">
|
|
157
157
|
<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" />
|
|
158
158
|
</svg>
|
|
159
|
-
`)},null,8,tI),t[21]||=F(`span`,{class:`mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate`},`Mermaid`,-1)])),e.$slots[`header-center`]?(G(),W(`div`,nI,[d(e.$slots,`header-center`,{},void 0,!0)])):n.showModeToggle&&o.value?(G(),W(`div`,rI,[F(`button`,{class:L([`mermaid-mode-btn px-2 py-0.5 rounded transition-colors`,[Ee.value?``:`is-active`]]),onClick:t[0]||=()=>Ut(`preview`),onMouseenter:t[1]||=e=>gt(e,R(C)(`common.preview`)||`Preview`),onFocus:t[2]||=e=>gt(e,R(C)(`common.preview`)||`Preview`),onMouseleave:_t,onBlur:_t},[F(`div`,iI,[t[22]||=F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0`}),F(`circle`,{cx:`12`,cy:`12`,r:`3`})])],-1),F(`span`,null,H(R(C)(`common.preview`)||`Preview`),1)])],34),F(`button`,{class:L([`mermaid-mode-btn px-2 py-0.5 rounded transition-colors`,[Ee.value?`is-active`:``]]),onClick:t[3]||=()=>Ut(`source`),onMouseenter:t[4]||=e=>gt(e,R(C)(`common.source`)||`Source`),onFocus:t[5]||=e=>gt(e,R(C)(`common.source`)||`Source`),onMouseleave:_t,onBlur:_t},[F(`div`,aI,[t[23]||=F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m16 18l6-6l-6-6M8 6l-6 6l6 6`})],-1),F(`span`,null,H(R(C)(`common.source`)||`Source`),1)])],34)])):V(``,!0),e.$slots[`header-right`]?(G(),W(`div`,oI,[d(e.$slots,`header-right`,{},void 0,!0)])):(G(),W(`div`,sI,[n.showCollapseButton?(G(),W(`button`,{key:0,class:L(SI),"aria-pressed":A.value,onClick:t[6]||=e=>A.value=!A.value,onMouseenter:t[7]||=e=>gt(e,A.value?R(C)(`common.expand`)||`Expand`:R(C)(`common.collapse`)||`Collapse`),onFocus:t[8]||=e=>gt(e,A.value?R(C)(`common.expand`)||`Expand`:R(C)(`common.collapse`)||`Collapse`),onMouseleave:_t,onBlur:_t},[(G(),W(`svg`,{style:k({rotate:A.value?`0deg`:`90deg`}),xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[...t[24]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m9 18l6-6l-6-6`},null,-1)]],4))],40,cI)):V(``,!0),n.showCopyButton?(G(),W(`button`,{key:1,class:L(SI),onClick:Bt,onMouseenter:t[9]||=e=>vt(e),onFocus:t[10]||=e=>vt(e),onMouseleave:_t,onBlur:_t},[T.value?(G(),W(`svg`,uI,[...t[26]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M20 6L9 17l-5-5`},null,-1)]])):(G(),W(`svg`,lI,[...t[25]||=[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),F(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})],-1)]]))],32)):V(``,!0),n.showExportButton&&o.value?(G(),W(`button`,{key:2,class:L(`${SI} ${Tt.value?`opacity-50 cursor-not-allowed`:``}`),"aria-label":R(C)(`common.export`)||`Export`,disabled:Tt.value,onClick:Vt,onMouseenter:t[11]||=e=>gt(e,R(C)(`common.export`)||`Export`),onFocus:t[12]||=e=>gt(e,R(C)(`common.export`)||`Export`),onMouseleave:_t,onBlur:_t},[...t[27]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`path`,{d:`M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),F(`path`,{d:`m7 10l5 5l5-5`})])],-1)]],42,dI)):V(``,!0),n.showFullscreenButton&&o.value?(G(),W(`button`,{key:3,class:L(`${SI} ${Tt.value?`opacity-50 cursor-not-allowed`:``}`),"aria-label":Ot.value?R(C)(`common.minimize`)||`Minimize`:R(C)(`common.open`)||`Open`,disabled:Tt.value,onClick:Ht,onMouseenter:t[13]||=e=>gt(e,Ot.value?R(C)(`common.minimize`)||`Minimize`:R(C)(`common.open`)||`Open`),onFocus:t[14]||=e=>gt(e,Ot.value?R(C)(`common.minimize`)||`Minimize`:R(C)(`common.open`)||`Open`),onMouseleave:_t,onBlur:_t},[Ot.value?(G(),W(`svg`,mI,[...t[29]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6`},null,-1)]])):(G(),W(`svg`,pI,[...t[28]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6`},null,-1)]]))],42,fI)):V(``,!0)]))])):V(``,!0),y(F(`div`,{ref_key:`modeContainerRef`,ref:ge},[Ee.value?(G(),W(`div`,hI,[F(`pre`,gI,H(K.value),1)])):(G(),W(`div`,_I,[n.showZoomControls?(G(),W(`div`,vI,[F(`div`,yI,[F(`button`,{class:`mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors`,onClick:Nt,onMouseenter:t[15]||=e=>gt(e,R(C)(`common.zoomIn`)||`Zoom in`),onFocus:t[16]||=e=>gt(e,R(C)(`common.zoomIn`)||`Zoom in`),onMouseleave:_t,onBlur:_t},[...t[30]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`circle`,{cx:`11`,cy:`11`,r:`8`}),F(`path`,{d:`m21 21l-4.35-4.35M11 8v6m-3-3h6`})])],-1)]],32),F(`button`,{class:`mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors`,onClick:Pt,onMouseenter:t[17]||=e=>gt(e,R(C)(`common.zoomOut`)||`Zoom out`),onFocus:t[18]||=e=>gt(e,R(C)(`common.zoomOut`)||`Zoom out`),onMouseleave:_t,onBlur:_t},[...t[31]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`circle`,{cx:`11`,cy:`11`,r:`8`}),F(`path`,{d:`m21 21l-4.35-4.35M8 11h6`})])],-1)]],32),F(`button`,{class:`mermaid-action-btn p-[var(--ms-action-btn-padding)] text-[length:var(--ms-text-label)] rounded transition-colors`,onClick:Ft,onMouseenter:t[19]||=e=>gt(e,R(C)(`common.resetZoom`)||`Reset zoom`),onFocus:t[20]||=e=>gt(e,R(C)(`common.resetZoom`)||`Reset zoom`),onMouseleave:_t,onBlur:_t},H(Math.round(100*Se.value))+`% `,33)])])):V(``,!0),F(`div`,h({ref_key:`mermaidContainer`,ref:N,class:`mermaid-preview-area relative overflow-hidden block transition-[height] ease-out`,style:{height:qe.value}},u(rt.value,!0),{onMousedown:It,onMousemove:Lt,onMouseup:Rt,onMouseleave:Rt,onTouchstartPassive:It,onTouchmovePassive:Lt,onTouchendPassive:Rt}),[F(`div`,{"data-mermaid-wrapper":``,class:L([`absolute inset-0 cursor-grab`,{"cursor-grabbing":we.value}]),style:k(kt.value)},[F(`div`,{ref_key:`mermaidContent`,ref:P,class:`_mermaid w-full text-center flex items-center justify-center min-h-full`,style:k({height:Je.value})},null,4)],6)],16),(G(),O(z,{to:`body`},[F(`div`,{class:L([`markstream-vue`,{dark:n.isDark}])},[U(ce,{name:`mermaid-dialog`,appear:``},{default:D(()=>[Ot.value?(G(),W(`div`,{key:0,class:`mermaid-modal-overlay fixed inset-0 z-50 flex items-center justify-center p-4`,onClick:me(Mt,[`self`])},[F(`div`,bI,[F(`div`,xI,[F(`button`,{class:`mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors`,onClick:Nt},[...t[32]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`circle`,{cx:`11`,cy:`11`,r:`8`}),F(`path`,{d:`m21 21l-4.35-4.35M11 8v6m-3-3h6`})])],-1)]]),F(`button`,{class:`mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors`,onClick:Pt},[...t[33]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`circle`,{cx:`11`,cy:`11`,r:`8`}),F(`path`,{d:`m21 21l-4.35-4.35M8 11h6`})])],-1)]]),F(`button`,{class:`mermaid-action-btn p-[var(--ms-action-btn-padding)] text-[length:var(--ms-text-label)] rounded transition-colors`,onClick:Ft},H(Math.round(100*Se.value))+`% `,1),F(`button`,{class:`mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded transition-colors`,onClick:Mt},[...t[34]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M18 6L6 18M6 6l12 12`})],-1)]])]),F(`div`,h({ref_key:`modalContent`,ref:te,class:`w-full h-full flex items-center justify-center p-4 overflow-hidden`},u(rt.value,!0),{onMousedown:It,onMousemove:Lt,onMouseup:Rt,onMouseleave:Rt,onTouchstartPassive:It,onTouchmovePassive:Lt,onTouchendPassive:Rt}),null,16)])])):V(``,!0)]),_:1})],2)]))]))],512),[[ee,!A.value]])],10,ZF))}}),[[`__scopeId`,`data-v-e9775fad`]]);CI.install=e=>{e.component(CI.__name,CI)};var wI=n({default:()=>tF});tF.install=e=>{e.component(tF.__name,tF)};var TI=n({default:()=>oF});oF.install=e=>{e.component(oF.__name,oF)};var EI=n({default:()=>MI}),DI=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),OI=[`data-markstream-mode`,`data-markstream-pending`],kI={key:0,class:`math-loading-overlay`},AI=[`innerHTML`],jI={key:1,class:`math-block__fallback text-left`},MI=eO(c({__name:`MathBlockNode`,props:{node:{},indexKey:{},cacheScope:{}},setup(e){let t=e,n=M(null),r=i(mE,null),a=I(()=>GE(t.node.content)),o=I(()=>WO(t,{})),s=function(){if(!t.node.content)return{html:``,text:t.node.raw,loading:!1};let e=UE();if(!e)return{html:``,text:t.node.loading?``:t.node.raw,loading:t.node.loading};try{return{html:e.renderToString(a.value,{throwOnError:t.node.loading,displayMode:!0}),text:``,loading:!1}}catch{return{html:``,text:t.node.loading?``:t.node.raw,loading:t.node.loading}}}(),c=M(s.html),u=M(s.text),d=!1,p=0,m=!1,h=null,_=wM(),v=fA(),y=null,b=null,x=``,S=M(s.loading),C=M(!1),w=M(A());function T(e){e!=null&&e!==p||(C.value=!1)}function O(){if(t.indexKey==null)return``;let e=t.cacheScope??_?.scope;return`${e!=null&&String(e).length>0?`${String(e)}:`:``}math-block:${String(t.indexKey)}`}function A(){var e;let t=O();return t&&(e=_?.cache.get(t))!=null?e:0}function j(e){if(!Number.isFinite(e)||e<=0)return;let t=Math.max(w.value,e);if(t===w.value)return;w.value=t;let n=O();n&&_?.cache.set(n,t)}function ee(){g(()=>{j(n.value?.offsetHeight??0)})}function N(){let e=x;r&&e&&(x=``,r.markSettled(e))}function P(){return DI(this,null,function*(){if(m)return N(),void T();h&&=(h.abort(),null);let e=++p;if(!t.node.content)return N(),T(),S.value=!1,c.value=``,u.value=t.node.raw,d=!0,void ee();let i=new AbortController;if(h=i,C.value=!0,!d)try{!y&&n.value&&(y=v(n.value)),yield y?.whenVisible}catch{}m||e!==p||i.signal.aborted?m||T(e):(function(){let e=o.value;r&&e&&x!==e&&(x&&r.markSettled(x),x=e,r.markPending(e))}(),rD(a.value,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:1,signal:i.signal}).then(t=>{m||e!==p||(c.value=t,u.value=``,d=!0,S.value=!1,ee())}).catch(n=>DI(null,null,function*(){if(m||e!==p)return;let r=n?.code||n?.name,i=r===`KATEX_DISABLED`;if(r===`WORKER_INIT_ERROR`||n?.fallbackToRenderer||r===`WORKER_BUSY`||r===`WORKER_TIMEOUT`){let n=yield WE();if(m||e!==p)return;if(n){try{let e=n.renderToString(a.value,{throwOnError:t.node.loading,displayMode:!0});c.value=e,u.value=``,d=!0,S.value=!1,ee(),eD(a.value,!0,e)}catch{}return}}if(i||!t.node.loading)return S.value=!1,c.value=``,u.value=t.node.raw,void ee();d||(S.value=!0)})).finally(()=>{m||e!==p||(T(e),function(){let e=x;r&&e&&(x=``,g(()=>{if(!m){let t=n.value?.offsetHeight??0;t>0&&r.reportHeight(e,t)}r.markSettled(e)}))}())}))})}return(s.html||s.text)&&(d=!0),E(()=>t.node.content,()=>{P()},{flush:`post`}),E([()=>t.indexKey,()=>t.cacheScope],()=>{w.value=A(),ee()}),f(()=>{typeof ResizeObserver<`u`&&n.value&&(b=new ResizeObserver(()=>{j(n.value?.offsetHeight??0)}),b.observe(n.value)),ee(),c.value||P()}),l(()=>{var e;m=!0,N(),h&&=(h.abort(),null),b?.disconnect(),b=null,(e=y?.destroy)==null||e.call(y),y=null}),(e,t)=>(G(),W(`div`,{ref_key:`containerEl`,ref:n,class:`math-block text-center overflow-x-auto relative`,"data-markstream-math":`block`,"data-markstream-mode":c.value?`katex`:u.value?`fallback`:`loading`,"data-markstream-pending":C.value?`true`:void 0,style:k(w.value?{minHeight:`${w.value}px`}:void 0)},[U(ce,{name:`math-fade`},{default:D(()=>[!S.value||c.value||u.value?V(``,!0):(G(),W(`div`,kI,[...t[0]||=[F(`div`,{class:`math-loading-spinner`},null,-1)]]))]),_:1}),c.value?(G(),W(`div`,{key:0,class:L([`math-block__content`,{"math-rendering":S.value}]),innerHTML:c.value},null,10,AI)):u.value?(G(),W(`pre`,jI,H(u.value),1)):(G(),W(`div`,{key:2,class:L([`math-block__content`,{"math-rendering":S.value}])},null,2))],12,OI))}}),[[`__scopeId`,`data-v-38e7acf6`]]);MI.install=e=>{e.component(MI.__name,MI)};var NI=n({default:()=>zI}),PI=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),FI=[`data-markstream-mode`,`data-markstream-pending`],II=[`innerHTML`],LI={key:1,class:`math-inline math-inline--fallback`},RI={class:`math-inline__loading`,role:`status`,"aria-live":`polite`},zI=eO(c({__name:`MathInlineNode`,props:{node:{}},setup(e){let t=e,n=M(null),r=I(()=>t.node.markup===`$$`),i=I(()=>GE(t.node.content)),a=function(){if(!t.node.content)return{html:``,text:t.node.raw,loading:!1};let e=UE();if(!e)return{html:``,text:t.node.raw,loading:!1};try{return{html:e.renderToString(i.value,{throwOnError:t.node.loading,displayMode:r.value}),text:``,loading:!1}}catch{return{html:``,text:t.node.raw,loading:!1}}}(),o=M(a.html),s=M(a.text),c=!1,u=0,p=!1,m=null,h=M(a.loading),g=M(!1),_=fA(),v=null;function y(e){e!=null&&e!==u||(g.value=!1)}function b(){return PI(this,null,function*(){if(p)return;m&&=(m.abort(),null);let e=++u;if(!t.node.content)return y(),h.value=!1,o.value=``,s.value=t.node.raw,void(c=!0);let a=new AbortController;if(m=a,g.value=!0,!c)try{!v&&n.value&&(v=_(n.value)),yield v?.whenVisible}catch{}p||e!==u||a.signal.aborted?y(e):rD(i.value,r.value,{timeout:1500,waitTimeout:0,maxRetries:0,signal:a.signal}).then(t=>{p||e!==u||(o.value=t,s.value=``,h.value=!1,c=!0)}).catch(n=>PI(null,null,function*(){if(p||e!==u)return;let a=n?.code||n?.name,l=a===`KATEX_DISABLED`;if(a===`WORKER_INIT_ERROR`||n?.fallbackToRenderer||a===`WORKER_BUSY`||a===`WORKER_TIMEOUT`){let n=yield WE();if(p||e!==u)return;if(n){try{let e=n.renderToString(i.value,{throwOnError:t.node.loading,displayMode:r.value});o.value=e,s.value=``,h.value=!1,c=!0,eD(i.value,r.value,e)}catch{}return}}if(l||!t.node.loading)return h.value=!1,o.value=``,void(s.value=t.node.raw);c||(h.value=!0)})).finally(()=>{p||y(e)})})}return(a.html||a.text)&&(c=!0),E(()=>t.node.content,()=>{b()}),f(()=>{o.value||b()}),l(()=>{var e;p=!0,m&&=(m.abort(),null),(e=v?.destroy)==null||e.call(v),v=null}),(e,t)=>(G(),W(`span`,{ref_key:`containerEl`,ref:n,class:`math-inline-wrapper`,"data-markstream-math":`inline`,"data-markstream-mode":o.value?`katex`:s.value?`fallback`:`loading`,"data-markstream-pending":g.value?`true`:void 0},[o.value?(G(),W(`span`,{key:0,class:`math-inline`,innerHTML:o.value},null,8,II)):s.value?(G(),W(`span`,LI,H(s.value),1)):h.value?(G(),O(ce,{key:2,name:`table-node-fade`},{default:D(()=>[F(`span`,RI,[d(e.$slots,`loading`,{isLoading:h.value},()=>[t[0]||=F(`span`,{class:`math-inline__spinner animate-spin`,"aria-hidden":`true`},null,-1),t[1]||=F(`span`,{class:`sr-only`},`Loading`,-1)],!0)])]),_:3})):V(``,!0)],8,FI))}}),[[`__scopeId`,`data-v-7b64afc7`]]);zI.install=e=>{e.component(zI.__name,zI)};var BI=n({default:()=>fL}),VI=Object.defineProperty,HI=Object.getOwnPropertySymbols,UI=Object.prototype.hasOwnProperty,WI=Object.prototype.propertyIsEnumerable,GI=(e,t,n)=>t in e?VI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,KI=(e,t)=>{for(var n in t||={})UI.call(t,n)&&GI(e,n,t[n]);if(HI)for(var n of HI(t))WI.call(t,n)&&GI(e,n,t[n]);return e},qI=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),JI=[`data-markstream-mode`],YI={key:0,class:`d2-block-header flex justify-between items-center border-b`},XI={class:`d2-header-actions flex items-center`},ZI={key:0,class:`d2-mode-toggle flex items-center gap-0.5`},QI=[`aria-label`],$I={key:0,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},eL={key:1,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},tL=[`aria-label`],nL=[`aria-pressed`],rL={key:0,class:`d2-source`},iL={class:`d2-code`},aL={key:0,class:`d2-error mt-2 text-xs`},oL={key:1},sL={key:0,class:`d2-source`},cL={class:`d2-code`},lL={key:0,class:`d2-error mt-2 text-xs`},uL=[`innerHTML`],dL={key:0,class:`d2-error px-4 pb-3 text-xs`},fL=eO(c({__name:`D2BlockNode`,props:{node:{},maxHeight:{default:void 0},loading:{type:Boolean,default:!0},isDark:{type:Boolean},progressiveRender:{type:Boolean,default:!0},progressiveIntervalMs:{default:700},themeId:{},darkThemeId:{},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0}},setup(e){let t=e,n=p(),r=i(mE,null),{t:a}=UO(),o=M(!1),s=M(!1),c=M(!1),u=M(!1),d=M(null),m=M(!1),h=M(``),_=M(0),v=M(null),b=M(null),x=M(null),S=fA(),C=M(null),w=M(typeof window>`u`),T=I(()=>t.node.code??``),D=I(()=>WO(t,n)),O=I(()=>`${t.isDark?`dark`:`light`}:${T.value}`),A=I(()=>c.value||!u.value||!h.value),j=I(()=>!!h.value),N=I(()=>{if(A.value&&b.value)return{minHeight:`${b.value}px`}}),P=I(()=>t.maxHeight===`none`?{maxHeight:`none`}:t.maxHeight==null?void 0:{maxHeight:typeof t.maxHeight==`number`?`${t.maxHeight}px`:String(t.maxHeight)}),te=typeof window<`u`,ne=null,re=!1,ie=!1,ae=0,oe=null,se=!1,ce=null,le=``,ue=``;typeof window<`u`&&E(()=>x.value,e=>{var t;if((t=C.value)==null||t.destroy(),C.value=null,!e)return void(w.value=!1);let n=S(e,{rootMargin:`160px`});C.value=n,w.value=n.isVisible.value,n.whenVisible.then(()=>{w.value=!0})},{immediate:!0});let z={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 de(e){return!e||e.disabled}function fe(e,n,r=`top`){if(de(e.currentTarget))return;let i=e,a=i?.clientX!=null&&i?.clientY!=null?{x:i.clientX,y:i.clientY}:void 0;RO(e.currentTarget,n,r,!1,a,t.isDark)}function pe(){zO()}function B(e){if(de(e.currentTarget))return;let n=o.value?a(`common.copied`)||`Copied`:a(`common.copy`)||`Copy`,r=e,i=r?.clientX!=null&&r?.clientY!=null?{x:r.clientX,y:r.clientY}:void 0;RO(e.currentTarget,n,`top`,!1,i,t.isDark)}function me(){return qI(this,null,function*(){try{let e=T.value;typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`&&(yield navigator.clipboard.writeText(e)),o.value=!0,setTimeout(()=>{o.value=!1},1e3)}catch(e){console.error(`Copy failed:`,e)}})}function he(){s.value=!s.value}function U(e){c.value=e===`source`}let ge=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],K=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function _e(e){if(!e)return``;let t=e.trim();return K.test(t)?t:``}function ve(){h.value=``}function ye(){return qI(this,null,function*(){if(!te||ie||!w.value||t.loading&&!t.progressiveRender)return;let e=O.value;if(e===le&&!d.value&&h.value)return u.value=!0,void(t.loading&&(c.value=!1));let n=T.value;if(!n)return ve(),d.value=null,void(le=``);let i=++_.value;m.value=!0,d.value=null,function(){let e=D.value;r&&e&&ue!==e&&(ue&&r.markSettled(ue),ue=e,r.markPending(e))}();try{let r=yield function(){return qI(this,null,function*(){if(ne)return ne;let e=yield AN();if(!e)return null;if(typeof e==`function`){let t=new e;return t&&typeof t.compile==`function`?ne=t:typeof e.compile==`function`&&(ne=e),ne}return e?.D2&&typeof e.D2==`function`?(ne=new e.D2,ne):(typeof e.compile==`function`&&(ne=e),ne)})}();if(!r)return u.value=!1,c.value=!0,ve(),void(d.value=`D2 is not available.`);if(typeof r.compile!=`function`||typeof r.render!=`function`)throw TypeError(`D2 instance is missing compile/render methods.`);u.value=!0;let a=yield r.compile(n);if(i!==_.value)return;let o=a?.diagram??a,s=a?.renderOptions??a?.options??{},l=t.themeId??s.themeID,f=t.darkThemeId??s.darkThemeID,p=KI({},s);if(p.themeID=t.isDark&&f!=null?f:l,p.darkThemeID=null,p.darkThemeOverrides=null,t.isDark){let e=s.themeOverrides&&typeof s.themeOverrides==`object`?s.themeOverrides:null;p.themeOverrides=KI(KI({},z),e||{})}let m=yield r.render(o,p);if(i!==_.value)return;let g=function(e){return e?typeof e==`string`?e:typeof e.svg==`string`?e.svg:typeof e.data==`string`?e.data:``:``}(m);if(!g)throw Error(`D2 render returned empty output.`);(function(e){h.value=function(e){if(typeof window>`u`||typeof DOMParser>`u`||!e)return``;let t=e.replace(/["']\s*javascript:/gi,`#`).replace(/\bjavascript:/gi,`#`).replace(/["']\s*vbscript:/gi,`#`).replace(/\bvbscript:/gi,`#`).replace(/\bdata:text\/html/gi,`#`),n=new DOMParser().parseFromString(t,`image/svg+xml`).documentElement;if(!n||n.nodeName.toLowerCase()!==`svg`)return``;let r=n;return function(e){let t=new Set([`script`]),n=[e,...Array.from(e.querySelectorAll(`*`))];for(let e of n){if(t.has(e.tagName.toLowerCase())){e.remove();continue}let n=Array.from(e.attributes);for(let t of n){let n=t.name;if(/^on/i.test(n))e.removeAttribute(n);else{if(n===`style`&&t.value){let r=t.value;if(ge.some(e=>e.test(r))){e.removeAttribute(n);continue}}if((n===`href`||n===`xlink:href`)&&t.value){let r=_e(t.value);if(!r){e.removeAttribute(n);continue}r!==t.value&&e.setAttribute(n,r)}}}}}(r),r.classList.add(`markstream-d2-root-svg`),r.outerHTML}(e)||``})(g),le=e,t.loading&&(c.value=!1),d.value=null}catch(e){if(i!==_.value)return;let n=e?.message?String(e.message):`D2 render failed.`;t.loading||(d.value=n),le=``,n.includes(`@terrastruct/d2`)&&(u.value=!1,c.value=!0)}finally{i===_.value&&(m.value=!1,se?(se=!1,be()):function(){let e=ue;r&&e&&(ue=``,g(()=>{if(!ie){let t=x.value?.offsetHeight??0;t>0&&r.reportHeight(e,t)}r.markSettled(e)}))}())}})}function be(e=!1){if(re||!te||ie)return;if(m.value)return void(se=!0);let n=Math.max(120,Number(t.progressiveIntervalMs)||0),r=Date.now()-ae;if(!e&&r<n)return se=!0,void(oe==null&&(oe=window.setTimeout(()=>{oe=null,se&&(se=!1,be(!0))},Math.max(0,n-r))));re=!0;let i=()=>{re=!1,ae=Date.now(),ye()};typeof window<`u`&&typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(i):setTimeout(i,0)}function xe(){if(h.value)try{let e=new Blob([h.value],{type:`image/svg+xml;charset=utf-8`}),t=URL.createObjectURL(e);if(typeof document<`u`){let 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)}}function Se(){let e=v.value;if(!e)return;let t=e.getBoundingClientRect().height;t>0&&(b.value=t)}return E(()=>[t.node.code,t.loading,t.isDark],()=>{be()},{immediate:!0}),E(()=>t.loading,(e,t)=>{t&&!e&&be(!0)}),E(()=>w.value,e=>{e&&be(!0)}),E(()=>[A.value,h.value,T.value],()=>{g(()=>{Se()})}),f(()=>{g(()=>{Se()}),typeof ResizeObserver<`u`&&(ce=new ResizeObserver(()=>{Se()}),v.value&&ce.observe(v.value))}),l(()=>{var e;ie=!0,function(){let e=ue;r&&e&&(ue=``,r.markSettled(e))}(),le=``,(e=C.value)==null||e.destroy(),C.value=null,oe!=null&&(clearTimeout(oe),oe=null),ce?.disconnect(),ce=null}),(e,n)=>(G(),W(`div`,{ref_key:`viewportTarget`,ref:x,class:L([`d2-block-container rounded-lg border overflow-hidden`,{dark:t.isDark}]),"data-markstream-d2":`1`,"data-markstream-mode":A.value?`fallback`:`preview`},[t.showHeader?(G(),W(`div`,YI,[n[16]||=F(`div`,{class:`flex items-center gap-x-2`},[F(`span`,{class:`d2-label font-medium font-mono`},`D2`)],-1),F(`div`,XI,[t.showModeToggle?(G(),W(`div`,ZI,[F(`button`,{type:`button`,class:L([`mode-btn px-2 py-0.5 rounded`,c.value?``:`is-active`]),onClick:n[0]||=e=>U(`preview`),onMouseenter:n[1]||=e=>fe(e,R(a)(`common.preview`)||`Preview`),onFocus:n[2]||=e=>fe(e,R(a)(`common.preview`)||`Preview`),onMouseleave:pe,onBlur:pe},H(R(a)(`common.preview`)||`Preview`),35),F(`button`,{type:`button`,class:L([`mode-btn px-2 py-0.5 rounded`,c.value?`is-active`:``]),onClick:n[3]||=e=>U(`source`),onMouseenter:n[4]||=e=>fe(e,R(a)(`common.source`)||`Source`),onFocus:n[5]||=e=>fe(e,R(a)(`common.source`)||`Source`),onMouseleave:pe,onBlur:pe},H(R(a)(`common.source`)||`Source`),35)])):V(``,!0),t.showCopyButton?(G(),W(`button`,{key:1,type:`button`,class:`d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md`,"aria-label":o.value?R(a)(`common.copied`)||`Copied`:R(a)(`common.copy`)||`Copy`,onClick:me,onMouseenter:n[6]||=e=>B(e),onFocus:n[7]||=e=>B(e),onMouseleave:pe,onBlur:pe},[o.value?(G(),W(`svg`,eL,[...n[13]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M20 6L9 17l-5-5`},null,-1)]])):(G(),W(`svg`,$I,[...n[12]||=[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),F(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})],-1)]]))],40,QI)):V(``,!0),t.showExportButton&&h.value?(G(),W(`button`,{key:2,type:`button`,class:`d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md`,"aria-label":R(a)(`common.export`)||`Export`,onClick:xe,onMouseenter:n[8]||=e=>fe(e,R(a)(`common.export`)||`Export`),onFocus:n[9]||=e=>fe(e,R(a)(`common.export`)||`Export`),onMouseleave:pe,onBlur:pe},[...n[14]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 3v12m0-12l-4 4m4-4l4 4M4 14v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4`})],-1)]],40,tL)):V(``,!0),t.showCollapseButton?(G(),W(`button`,{key:3,type:`button`,class:`d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md`,"aria-pressed":s.value,onClick:he,onMouseenter:n[10]||=e=>fe(e,s.value?R(a)(`common.expand`)||`Expand`:R(a)(`common.collapse`)||`Collapse`),onFocus:n[11]||=e=>fe(e,s.value?R(a)(`common.expand`)||`Expand`:R(a)(`common.collapse`)||`Collapse`),onMouseleave:pe,onBlur:pe},[(G(),W(`svg`,{style:k({rotate:s.value?`0deg`:`90deg`}),xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[...n[15]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m9 18l6-6l-6-6`},null,-1)]],4))],40,nL)):V(``,!0)])])):V(``,!0),y(F(`div`,{ref_key:`bodyRef`,ref:v,class:`d2-block-body`,style:k(N.value)},[t.loading&&!j.value?(G(),W(`div`,rL,[F(`pre`,iL,[F(`code`,null,H(T.value),1)]),d.value?(G(),W(`p`,aL,H(d.value),1)):V(``,!0)])):(G(),W(`div`,oL,[A.value?(G(),W(`div`,sL,[F(`pre`,cL,[F(`code`,null,H(T.value),1)]),d.value?(G(),W(`p`,lL,H(d.value),1)):V(``,!0)])):(G(),W(`div`,{key:1,class:`d2-render`,style:k(P.value)},[F(`div`,{class:`d2-svg`,innerHTML:h.value},null,8,uL),d.value?(G(),W(`p`,dL,H(d.value),1)):V(``,!0)],4))]))],4),[[ee,!s.value]])],10,JI))}}),[[`__scopeId`,`data-v-1b958e6b`]]);fL.install=e=>{e.component(fL.__name,fL)};var pL=n({default:()=>EL}),mL=Object.defineProperty,hL=Object.getOwnPropertySymbols,gL=Object.prototype.hasOwnProperty,_L=Object.prototype.propertyIsEnumerable,vL=(e,t,n)=>t in e?mL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yL=(e,t)=>{for(var n in t||={})gL.call(t,n)&&vL(e,n,t[n]);if(hL)for(var n of hL(t))_L.call(t,n)&&vL(e,n,t[n]);return e},bL=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),xL={class:`code-header-main`},SL=[`innerHTML`],CL={class:`code-header-copy`},wL={class:`code-header-title`},TL=[`innerHTML`],EL=eO(c({__name:`MarkdownCodeBlockNode`,props:{node:{},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:`vitesse-dark`},lightTheme:{default:`vitesse-light`},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},autoScrollOnUpdate:{type:Boolean,default:!0},autoScrollInitial:{type:Boolean,default:!0},estimatedHeightPx:{},estimatedContentHeightPx:{},themes:{},langs:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0}},emits:[`previewCode`,`copy`],setup(e,{emit:t}){let n=e,r=t,{t:i}=UO(),a=M(Be(n.node.language,n.node.code,Ve())),o=M(!1),s=M(!1),c=M(!1),u=M(null),p=M(null),m=M(null),h=M(``),_=M(!1),v,y=``,b=0,x=null,S=fA(),C=oe(null),w=M(typeof window>`u`);typeof window<`u`&&E(()=>u.value,(e,t,n)=>{var r;if((r=C.value)==null||r.destroy(),C.value=null,!e)return void(w.value=!1);let i=!0,a=S(e,{rootMargin:`400px`});C.value=a,w.value=a.isVisible.value,a.whenVisible.then(()=>{i&&C.value===a&&(w.value=!0)}).catch(()=>{}),n(()=>{i=!1,a.destroy(),C.value===a&&(C.value=null)})},{immediate:!0});let T=M(!1!==n.autoScrollInitial),O=M(0),A=I(()=>!1!==n.autoScrollOnUpdate),j=M(14),ee=M(j.value),N=I(()=>{let e=j.value,t=ee.value;return typeof e==`number`&&Number.isFinite(e)&&e>0&&typeof t==`number`&&Number.isFinite(t)&&t>0}),P=I(()=>{let e=a.value.trim().toLowerCase();return jE[e]||e.charAt(0).toUpperCase()+e.slice(1)}),te=I(()=>(EE.value,AE(a.value.trim().toLowerCase().split(`:`)[0]))),ne=I(()=>{let e=a.value.trim().toLowerCase();return n.isShowPreview&&(e===`html`||e===`svg`)}),re=I(()=>{let e={},t=e=>{if(e!=null)return typeof e==`number`?`${e}px`:String(e)},r=t(n.minWidth),i=t(n.maxWidth);return r&&(e.minWidth=r),i&&(e.maxWidth=i),e}),ie=I(()=>{let e=n.estimatedContentHeightPx;return typeof e==`number`&&Number.isFinite(e)&&e>0?Math.round(e):null}),ae=I(()=>ie.value!=null&&!_.value),se=I(()=>yL({fontSize:`${ee.value}px`},ae.value?{minHeight:`${ie.value}px`}:{})),R=I(()=>!1!==n.showTooltips);function ce(e,t){let n=String(e??``);return t?n:n.replace(/\r\n$|\n$|\r$/,``)}let le=I(()=>ce(n.node.code,!0===n.node.loading));function ue(){return n.isDark?n.darkTheme:n.lightTheme}function z(e){if(x=null,he(),!e)return fe(),y=``,h.value=``,void(_.value=!1);var t;h.value=`<pre class="shiki shiki-fallback"><code>${t=e,t.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}</code></pre>`,_.value=!1}function de(){h.value=``,_.value=!0}function fe(){m.value&&(m.value.innerHTML=``)}function pe(){let e=m.value;return!!e&&(e.childNodes.length>0||!!e.textContent?.trim().length)}function B(e,t,n){return`${e??``}\0${t}\0${n}`}function me(e){y=e,de()}function he(e){e?.disconnect(),e&&v!==e||(v=void 0)}function _e(e,t){he();let n=m.value;if(!n||typeof MutationObserver>`u`)return;x=null;let r=new MutationObserver(()=>{b+=1;let n=x;if(n)return Fe(e)?void(b!==t&&pe()&&(x=null,he(r),me(n))):(x=null,void he(r))});v=r,r.observe(n,{childList:!0,subtree:!0,characterData:!0,attributes:!0})}function ve(e,t,n,r){return bL(this,null,function*(){if(x=n,yield g(),!Fe(e))return;let i=pe(),a=b!==t,o=r!==void 0&&m.value?.innerHTML!==r;i&&(!y||a||o||y===n)&&(x=null,he(),me(n))})}let ye,be,xe,Se=null,Ce=null,q=``,we=0,Te=0,Ee=!1,De=new Set,J=new Set,Oe=new Set,ke=mM(),Ae=!1,je=null,Me=!1,Ne=!1;function Pe(){return Te+=1,Te}function Fe(e=Te){return!Ee&&e===Te}function Ie(){let e=ye;ye=void 0,Se=null,y=``,x=null,J.clear();try{e?.dispose()}catch(e){ke&&console.warn(`[MarkdownCodeBlockNode] Failed to dispose Shiki renderer.`,e)}finally{fe(),_.value=!1}}let Le=I(()=>nE(n.themes,n.langs));function Re(){return{hasRegisterHighlight:!!xe,hasCreateRenderer:!!be}}function ze(e,t){let n=Re(),r=rE(e,t,n);return r.rendererOptions.langs?.length&&Oe.has(r.key)?rE(e,void 0,n):r}function Be(e,t,n){return n&&!String(t??``)?`plain`:OE(String(e??``))}function Ve(){return typeof n.node.loading==`boolean`?n.node.loading:!0===n.loading}function He(e,t){return bL(this,arguments,function*(e,t,n=Te){if(!ye||!Fe(n))return;let r=function(e){return ZT(e)||`plaintext`}(function(e,t,n){return n&&!String(t??``)?`plaintext`:String(e??``)}(t,e,Ve())),i=t=>bL(null,null,function*(){if(ye&&Fe(n)){r!==`plaintext`&&(t&&J.add(r),t&&ke&&!De.has(r)&&(De.add(r),console.warn(`[MarkdownCodeBlockNode] Failed to render language "${r}", retrying as plaintext.`,t)));try{return yield ye.updateCode(e,`plaintext`),Fe(n)?`plaintext`:void 0}catch(e){if(!Fe(n))return;ke&&console.warn(`[MarkdownCodeBlockNode] Failed to render code block even as plaintext.`,e);return}}});if(r!==`plaintext`&&J.has(r))return i();try{return yield ye.updateCode(e,r),Fe(n)?r:void 0}catch(e){return Fe(n)?r===`plaintext`?void(ke&&console.warn(`[MarkdownCodeBlockNode] Failed to render code block even as plaintext.`,e)):i(e):void 0}})}function Ue(e,t){return bL(this,null,function*(){if(!xe)return`ready`;if(q!==t)return`stale`;if(Ce===t)return`ready`;let n=++we;try{yield iE(xe,e,t)}catch{return n!==we||q!==t?`stale`:`failed`}return n!==we||q!==t?`stale`:(Ce=t,`ready`)})}function We(e,t){return bL(this,null,function*(){let n=yield Ue(e,t);return n===`failed`?q===t?Ue(e,t):`stale`:n})}function Ge(){return bL(this,arguments,function*(e=Pe()){try{yield function(e){return bL(this,null,function*(){var t;if(!Fe(e))return;let r=le.value;if(!w.value)return void z(r);if(yield function(){return bL(this,null,function*(){if(!be&&!Me)return je||(je=bL(null,null,function*(){try{let e=yield K(()=>import(`./__vite-optional-peer-dep_stream-markdown_markstream-vue-Dhgp-lRL.js`),[]),t=e.createShikiStreamRenderer;if(typeof t!=`function`)throw TypeError(`stream-markdown.createShikiStreamRenderer is not available`);be=t;let n=e.registerHighlight;xe=typeof n==`function`?n:void 0,Me=!1,Ne=!1}catch(e){Me=!0,ke&&!Ne&&(Ne=!0,console.warn(`[MarkdownCodeBlockNode] stream-markdown not available:`,e))}finally{je=null}}),je)})}(),!Fe(e))return;if(!p.value||!m.value)return void z(r);let i=ze(n.themes,n.langs);i.ignoredLangs&&ke&&!Ae&&(Ae=!0,console.warn("[MarkdownCodeBlockNode] `langs` requires stream-markdown >=0.0.15 with registerHighlight(); ignoring `langs` and using stream-markdown default language preload."));let a=i.rendererOptions,o=i.key;q=o;let s=!!(ye&&Se!==o);s&&z(r);let c=yield We(i.registerOptions,o);if(c===`failed`&&(t=a.langs)!=null&&t.length&&(Oe.add(o),ke&&console.warn("[MarkdownCodeBlockNode] Failed to register configured Shiki languages; retrying without `langs`.",{langs:a.langs}),i=rE(n.themes,void 0,Re()),a=i.rendererOptions,o=i.key,q=o,c=yield We(i.registerOptions,o)),!Fe(e)||c===`stale`)return;if(s=!!(ye&&Se!==o),c===`failed`)return void(s&&ye&&pe()?de():z(r));if(s&&Ie(),!ye&&be&&(ye=be(m.value,yL({theme:ue()},a)),Se=o,_.value=!0),!ye||!1===n.stream&&n.loading)return void z(r);z(r);let l=b,u=m.value?.innerHTML;_e(e,l);let d=yield He(r,n.node.language,e);Fe(e)&&(d?yield ve(e,l,B(o,d,r),u):(x=null,he()))})}(e)}catch(t){if(!Fe(e))return;ke&&console.warn(`[MarkdownCodeBlockNode] Failed to initialize Shiki renderer.`,t),z(le.value)}})}function Ke(){let e=p.value;if(!e||s.value||!A.value)return;let t=e.scrollTop;t<O.value?T.value=!1:function(e,t=50){return e.scrollHeight-e.scrollTop-e.clientHeight<=t}(e)&&(T.value=!0),O.value=t}function qe(){return bL(this,null,function*(){try{typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`&&(yield navigator.clipboard.writeText(n.node.code)),o.value=!0,r(`copy`,n.node.code),setTimeout(()=>{o.value=!1},1e3)}catch(e){console.error(`Copy failed:`,e)}})}function Je(e){if(s.value=!s.value,e&&R.value){let t=function(e){let t=e.currentTarget||e.target;return!t||t.disabled?null:t}(e);t&&RO(t,s.value?i(`common.collapse`)||`Collapse`:i(`common.expand`)||`Expand`,`top`,!1,void 0,n.isDark)}let t=p.value;t&&(s.value?(t.style.maxHeight=`none`,t.style[`overflow-y`]=`visible`,t.style[`overflow-x`]=`auto`):(t.style.maxHeight=``,t.style.overflow=`auto`,A.value&&(T.value=!0,g(()=>{t.scrollHeight>t.clientHeight&&(t.scrollTop=t.scrollHeight)}))))}function Ye(){c.value=!c.value}function Y(){ee.value=Math.min(36,ee.value+1)}function Xe(){ee.value=Math.max(10,ee.value-1)}function Ze(){ee.value=j.value}function Qe(){if(!ne.value)return;let e=OE(a.value||n.node.language).toLowerCase(),t=e===`html`?`HTML Preview`:`SVG Preview`;r(`previewCode`,{type:e===`html`?`text/html`:`image/svg+xml`,content:n.node.code,title:t})}return z(le.value),f(()=>{w.value?Ge():z(le.value)}),l(()=>{var e;Ee=!0,Te+=1,(e=C.value)==null||e.destroy(),C.value=null,v?.disconnect(),v=void 0,x=null,Ie()}),E(Le,()=>bL(null,null,function*(){w.value&&(yield Ge())})),E(()=>n.loading,e=>{e||(w.value?Ge():z(le.value))}),E(()=>w.value,e=>{e&&Ge()}),E(R,e=>{e||zO()}),E(()=>n.autoScrollInitial,e=>{T.value=!1!==e}),E(()=>[n.node.code,n.node.language,n.node.loading,n.loading],e=>bL(null,[e],function*([e,t,r,i]){let o=Pe(),s=typeof r==`boolean`?r:!0===i,c=ce(e,s),l=Be(t,e,s);if(l!==a.value&&(a.value=l),!w.value||!p.value||!m.value)return void z(c);if(!e)return void z(``);if(!ye||function(){let e=ze(n.themes,n.langs);return!!(ye&&Se!==e.key)}())return z(c),void(yield Ge(o));if(!Fe(o)||!ye||!1===n.stream&&n.loading)return;z(c);let u=b,d=m.value?.innerHTML;_e(o,u);let f=yield He(c,t,o);Fe(o)&&(f?yield ve(o,u,B(Se??Le.value,f,c),d):(x=null,he()))})),E(()=>[n.darkTheme,n.lightTheme,n.isDark],()=>bL(null,null,function*(){w.value&&p.value&&m.value&&(ye||(yield Ge()),ye?.setTheme(ue()))})),E(()=>n.node.code,()=>bL(null,null,function*(){if(s.value||!A.value||!T.value)return;yield g();let e=p.value;e&&e.scrollHeight>e.clientHeight&&(e.scrollTop=e.scrollHeight)})),(t,r)=>(G(),W(`div`,{ref_key:`container`,ref:u,style:k(re.value),class:L([`code-block-container rounded-lg border overflow-hidden`,{dark:n.isDark}])},[U(mP,{"show-header":n.showHeader,"show-collapse-button":n.showCollapseButton,"show-font-size-buttons":n.showFontSizeButtons,"enable-font-size-control":n.enableFontSizeControl,"show-copy-button":n.showCopyButton,"show-expand-button":n.showExpandButton,"show-preview-button":n.showPreviewButton,"show-tooltips":n.showTooltips,"is-dark":n.isDark,loading:n.loading,stream:n.stream,"is-collapsed":c.value,"is-expanded":s.value,"copy-text":o.value,"is-previewable":ne.value,"code-font-size":ee.value,"code-font-min":10,"code-font-max":36,"default-code-font-size":j.value,"font-baseline-ready":N.value,onToggleCollapse:Ye,onDecreaseFont:Xe,onResetFont:Ze,onIncreaseFont:Y,onCopy:qe,onToggleExpand:Je,onPreview:Qe},ge({"header-left":D(()=>[d(t.$slots,`header-left`,{},()=>[F(`div`,xL,[F(`span`,{class:`icon-slot h-4 w-4 flex-shrink-0`,innerHTML:te.value},null,8,SL),F(`div`,CL,[F(`div`,wL,H(P.value),1)])])],!0)]),loading:D(()=>[d(t.$slots,`loading`,{loading:e.loading,stream:e.stream},()=>[r[0]||=F(`div`,{class:`loading-skeleton`},[F(`div`,{class:`skeleton-line`}),F(`div`,{class:`skeleton-line`}),F(`div`,{class:`skeleton-line short`})],-1)],!0)]),default:D(()=>[F(`div`,{ref_key:`codeBlockContent`,ref:p,class:`code-block-content`,style:k(se.value),onScroll:Ke},[F(`div`,{ref_key:`rendererTarget`,ref:m,class:`code-block-render`},null,512),!_.value&&h.value?(G(),W(`div`,{key:0,class:`code-fallback-plain`,innerHTML:h.value},null,8,TL)):V(``,!0)],36)]),_:2},[t.$slots[`header-right`]?{name:`header-right`,fn:D(()=>[d(t.$slots,`header-right`,{},void 0,!0)]),key:`0`}:void 0]),1032,[`show-header`,`show-collapse-button`,`show-font-size-buttons`,`enable-font-size-control`,`show-copy-button`,`show-expand-button`,`show-preview-button`,`show-tooltips`,`is-dark`,`loading`,`stream`,`is-collapsed`,`is-expanded`,`copy-text`,`is-previewable`,`code-font-size`,`default-code-font-size`,`font-baseline-ready`])],6))}}),[[`__scopeId`,`data-v-2c616963`]]);EL.install=e=>{e.component(EL.__name,EL)};var DL=n({default:()=>VL}),OL=Object.defineProperty,kL=Object.defineProperties,AL=Object.getOwnPropertyDescriptors,jL=Object.getOwnPropertySymbols,ML=Object.prototype.hasOwnProperty,NL=Object.prototype.propertyIsEnumerable,PL=(e,t,n)=>t in e?OL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,FL=(e,t)=>{for(var n in t||={})ML.call(t,n)&&PL(e,n,t[n]);if(jL)for(var n of jL(t))NL.call(t,n)&&PL(e,n,t[n]);return e},IL=(e,t)=>kL(e,AL(t)),LL=(e,t,n)=>PL(e,typeof t==`symbol`?t:t+``,n),RL=[`data-markstream-item-key`,`data-markstream-item-kind`],zL={key:0,class:`markstream-virtual-timeline__status`},BL=eO(c(IL(FL({},{name:`MarkstreamVirtualTimeline`}),{__name:`MarkstreamVirtualTimeline`,props:{items:{},threadKey:{},layoutRevision:{},getKey:{},getKind:{},getContent:{},getFinal:{},getRevision:{},estimateItemHeight:{},overscan:{default:4},overscanPx:{default:1200},stickToBottom:{type:[Boolean,String],default:`auto`},measurementKey:{},markdownMode:{default:`docs`},markdownCodeRenderer:{},initialThreadState:{},markdownFade:{type:Boolean,default:!1},restoreMaxLoadingMs:{type:[Number,Boolean],default:!1},debug:{type:Boolean}},emits:[`height-change`,`virtual-state-change`,`range-change`,`thread-state-change`],setup(e,{expose:t,emit:n}){let r=e,i=n;function s(e){i(`thread-state-change`,e)}let c=new Map;function u(e){!0===r.debug&&c.set(e,(c.get(e)??0)+1)}let p=M(null),m=M(0),_=M(0),v=M(0),y=M(!0),x=M(!0),S=ue(new Map),C=new Map,D=new Map,A=new Map,j=ue(new Map),ee=ue(new Map),P=new Map,te=new Map,ne=new Map,re=new Map,ie=M(!1),ae=M(!0);a(`markstreamHostScrollManaged`,M(!0));let se=[0,80,180,360,640],ce,le,z=null,de=0,fe=null,pe=[],B=null,me=null,he=-1,U=0,ge=null,K=!1,_e=!1,ve=null,ye=0,be=0,xe={top:0,bottom:0},Se=!1,Ce=I(()=>r.threadKey==null?void 0:String(r.threadKey)),q=Ce.value;function we(e){return e===`chat`||e===`minimal`||e===`docs`?e:`docs`}let Te=I(()=>we(r.markdownMode)),Ee=I(()=>function(e,t=we(r.markdownMode)){return e===`pre`||e===`shiki`||e===`monaco`?e:t===`docs`?`monaco`:`pre`}(r.markdownCodeRenderer,Te.value)),De=I(()=>[r.measurementKey==null?``:String(r.measurementKey),v.value].join(`:`)),J=I(()=>`${De.value}${Te.value}${Ee.value}`);class Oe{constructor(e){LL(this,`tree`),LL(this,`total`),this.tree=Array.from({length:e.length+1},()=>0),this.total=0,e.forEach((e,t)=>this.add(t,e))}add(e,t){if(Number.isFinite(t)&&t!==0){this.total+=t;for(let n=e+1;n<this.tree.length;n+=n&-n)this.tree[n]+=t}}prefixSum(e){let t=Math.max(0,Math.min(e,this.tree.length-1)),n=0;for(;t>0;)n+=this.tree[t],t-=t&-t;return n}lowerBound(e,t=`gte`){let n=this.tree.length-1;if(n<=0||e<=0)return 0;if(e>=this.total)return n-1;let r=0,i=1;for(;i<<1<this.tree.length;)i<<=1;let a=0;for(;i>0;i>>=1){let n=r+i;if(n<this.tree.length){let i=a+this.tree[n];(t===`gt`?i<=e:i<e)&&(r=n,a=i)}}return Math.min(r,n-1)}}let ke=oe([]),Ae=new Map,je=oe(new Oe([])),Me=M(0),Ne=[],Pe=I(()=>(Me.value,{records:ke.value,totalHeight:je.value.total}));function Fe(){let e=[],t=[],n=function(){return Ce.value??`timeline`}();Ae.clear();for(let i=0;i<r.items.length;i++){let a=r.items[i],o=Ue(a,i),s={item:a,index:i,key:o,kind:HN(a,i,r),markdown:KN(a,i,r)},c=X(s);c??=Ne[i]??qN(a,i,r);let l=IL(FL({},s),{renderKey:`${n}:${o}`,offset:0,size:c,component:a?.component});e.push(l),t.push(c),Ae.has(o)||Ae.set(o,l)}ke.value=e,je.value=new Oe(t),Ne=[],Me.value+=1}function Ie(e){return Me.value,je.value.prefixSum(e.index)}function Le(e){return IL(FL({},e),{offset:Ie(e)})}function Re(e,t){let n=Ae.get(e);if(!n)return;let r=Math.ceil(t),i=r-n.size;i!==0&&(n.size=r,je.value.add(n.index,i),Me.value+=1)}function ze(e,t=`gte`){return Me.value,je.value.lowerBound(e,t)}let Be=I(()=>Math.max(0,r.overscan??4)),Ve=I(()=>{let e=Math.max(0,r.overscanPx??1200);return ae.value?e:Math.min(e,160)}),He=I(()=>{let e=Pe.value.records;if(e.length===0)return{start:0,end:0,records:[],topSpacerHeight:0,bottomSpacerHeight:0};let t=Be.value,n=Ve.value,r=Z(),i=r+Math.max(1,_.value),a=ze(Math.max(0,r-n),`gt`),o=ze(Math.min(Pe.value.totalHeight,i+n))+1;a=Math.max(0,a-t),o=Math.min(e.length,Math.max(o+t,a+1));let s=e.slice(a,o).map(Le),c=s[0],l=s[s.length-1],u=c?.offset??0,d=l?.offset??0;return{start:a,end:o,records:s,topSpacerHeight:u,bottomSpacerHeight:Math.max(0,Pe.value.totalHeight-(d+(l?.size??0)))}});function Ue(e,t){return VN(e,t,r)}let We=new WeakMap,Ge=1;function Ke(e){if(typeof e!=`object`&&typeof e!=`function`||e===null)return String(e??``);let t=e,n=We.get(t);return n||(n=Ge++,We.set(t,n)),String(n)}function qe(e,t,n){if(n)return``;let i=typeof e?.text==`string`?e.text:typeof e?.message==`string`?e.message:typeof e?.label==`string`?e.label:String(UN(e,t,r)??``);return i?`${i.length}:${function(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}(i)}`:``}function Je(e,t){if(typeof r.estimateItemHeight!=`function`)return``;let n=r.estimateItemHeight(e,t);if(!Number.isFinite(n)||n<=0)return``;let i=Math.ceil(n);return Ne[t]=i,String(i)}function Ye(e){return r.items[e.index]??e.item}function Y(e){return e.item}function Xe(e){return Ye(e)?.component??e.component}function Ze(e,t=Ce.value){let n=GN(Y(e),e.index,r);return[t??`timeline`,e.key,n==null?``:String(n)].join(`:`)}function Qe(e,t=Ce.value){if(e.markdown)return Ze(e,t);let n=GN(Y(e),e.index,r);return[t??`timeline`,e.key,n==null?``:String(n)].join(`:`)}function $e(e){return{sourceKey:Qe(e),measurementKey:e.markdown?J.value:De.value,widthBucket:v.value}}function et(e,t){return(e?.sourceKey??``)===(t?.sourceKey??``)&&(e?.measurementKey??``)===(t?.measurementKey??``)&&(e?.widthBucket??0)===(t?.widthBucket??0)}function tt(e,t,n=Ce.value){return!(!e||!t)&&t.sourceKey===Qe(e,n)&&t.measurementKey===(e.markdown?J.value:De.value)&&(t.widthBucket??0)===v.value}function X(e,t=Ce.value){let n=S.get(e.key);return tt(e,C.get(e.key),t)&&Number.isFinite(n)&&n>0?n:null}function nt(e){return Pe.value,Ae.get(e)}function rt(e,t){return!!(e&&e.markdown&&t)&&t.sessionKey===Ze(e)&&(t.threadKey??``)===(Ce.value??``)&&!!function(e){let t=J.value,n=e??``;return n===t||n.startsWith(`${t}\0`)}(t.measurementKey)}function it(e,t){return rt(e,t)}function at(e,t,n){!Number.isFinite(t)||t<=0||(ee.set(e,Math.ceil(t)),P.set(e,n))}function ot(e,t=j.get(e)){let n=function(e,t=j.get(e)){if(!it(nt(e),t))return 0;let n=Number(t?.metrics?.totalHeight);return Number.isFinite(n)&&n>0?Math.ceil(n):0}(e,t);return n>0&&at(e,n,t),n}function st(e){return e===de&&U===e&&!ae.value}function ct(){if(fe!=null&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(fe),fe=null,B!=null&&typeof window<`u`&&window.clearTimeout(B),B=null,typeof window<`u`)for(let e of pe)window.clearTimeout(e);pe=[]}function lt(){return Math.max(0,_.value||p.value?.clientHeight||0)}function ut(){let e=p.value;if(!e||typeof getComputedStyle!=`function`)return void(xe={top:0,bottom:0});let t=getComputedStyle(e);xe={top:Number.parseFloat(t.paddingTop)||0,bottom:Number.parseFloat(t.paddingBottom)||0}}function dt(){return xe.top}function ft(){let e=xe;return Math.max(0,Pe.value.totalHeight+e.top+e.bottom)}function pt(){return Math.max(ft(),p.value?.scrollHeight??0)}function Z(){return Math.max(0,m.value-dt())}function Q(){return Math.max(0,pt()-lt())}function mt(e){let t=Number(e);return Number.isFinite(t)?Math.max(0,Math.min(t,Q())):0}function ht(){return Math.max(0,Q()-m.value)}function gt(){let e=ht();x.value=e<=2,!0===r.stickToBottom?y.value=!0:!1===r.stickToBottom?y.value=!1:y.value=e<=48}function _t(){let e=p.value?.clientWidth??0;v.value=Number.isFinite(e)&&e>0?32*Math.round(e/32):0}function vt(e={}){let t=p.value;t&&(m.value=Math.max(0,t.scrollTop||0),_.value=t.clientHeight||0),_t(),gt(),(!0===e.remember||!1!==e.remember&&!ie.value)&&Gt()}function yt(e,t={}){let n=mt(e),r=p.value;m.value=n,r&&(_.value=r.clientHeight||_.value||0,!1!==t.writeDom&&Math.abs((r.scrollTop||0)-n)>.5&&(r.scrollTop=n)),_t(),!1!==t.updatePinned&>(),(!0===t.remember||!1!==t.remember&&!ie.value)&&Gt()}function bt(){if(!ae.value){let e=p.value,t=ge;e&&t!=null&&Math.abs((e.scrollTop||0)-t)>.5&&(e.scrollTop=t),Xt(U,le);return}vt()}function xt(e){yt(e,{writeDom:!0,remember:!0})}function St(){xt(Q())}function Ct(e,t){let n=D.get(e);if(!Number.isFinite(n)||n==null||n<=0)return 0;let r=A.get(e);return t&&r&&!wt(r,t)?0:Math.ceil(n)}function wt(e,t){return e.sourceKey===t.sourceKey&&((t.widthBucket??0)===0||(e.widthBucket??0)===0||(t.widthBucket??0)===(e.widthBucket??0))&&(Tt(t.measurementKey)||Tt(e.measurementKey)||t.measurementKey===e.measurementKey)}function Tt(e){return e===`:0`||!0===e?.startsWith(`:0`)}function Et(e){D.delete(e),A.delete(e)}function Dt(e,t,n,i={}){if(!Number.isFinite(t)||t<=0)return;let a=S.get(e),o=n&&!et(C.get(e),n);(function(e,t){if(!t)return;let n=A.get(e);n&&!wt(n,t)&&(D.delete(e),A.delete(e))})(e,n);let s=Ct(e,n),c=s>0?s:Math.ceil(t);if(a!=null&&Math.abs(a-c)<=1&&!o)return;if(!1===i.updateLayout)return n&&C.set(e,n),S.set(e,c),void qt(i.rememberThreadKey);if(ie.value)return n&&C.set(e,n),S.set(e,c),Re(e,c),void function(e=U,t=le){t&&g(()=>{Xt(e,t),fe==null&&typeof requestAnimationFrame==`function`&&(fe=requestAnimationFrame(()=>{fe=null,Xt(e,t)}))})}();let l=(u=Ut(),d=ht(),!0===r.stickToBottom?{type:`bottom`,distanceFromBottomPx:0}:r.stickToBottom===`auto`&&y.value?{type:`bottom`,distanceFromBottomPx:x.value?0:Math.max(0,d)}:u);var u,d;n&&C.set(e,n),S.set(e,c),Re(e,c),qt(i.rememberThreadKey),function(e){if(!Ot.scheduled)return Ot.anchor=e,Ot.scheduled=!0,void(Ot.raf=Mt(Pt));!Ot.anchor&&e&&(Ot.anchor=e)}(l)}E([()=>function(){let e=r.layoutRevision;return e==null?r.items.map((e,t)=>{let n=Ue(e,t),i=KN(e,t,r);return[n,HN(e,t,r),+!!i,GN(e,t,r)??``,Je(e,t),qe(e,t,i),(a=e?.component,a?typeof a==`string`?`s:${a}`:`o:${Ke(a)}`:``)].join(``);var a}).join(`\0`):[`explicit`,String(e),r.items.length].join(``)}(),De,J,Ce,()=>Ke(r.estimateItemHeight),()=>Ke(r.getKey),()=>Ke(r.getKind),()=>Ke(r.getContent),()=>Ke(r.getFinal),()=>Ke(r.getRevision)],()=>Fe(),{immediate:!0,flush:`sync`});let Ot={scheduled:!1,raf:null,anchor:void 0},kt=new Map,At=!1,jt=null;function Mt(e){return typeof requestAnimationFrame==`function`?requestAnimationFrame(e):(g(e),null)}function Nt(e){e!=null&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(e)}function Pt(){if(!Ot.scheduled)return;Ot.scheduled=!1,Ot.raf=null;let e=Ot.anchor;Ot.anchor=void 0,e&&Yt(e),vt({remember:!1})}function Ft(){if(!At)return;At=!1,jt=null;let e=Array.from(kt.entries());kt.clear();for(let[t,n]of e){if(ee.get(t)!==n.logicalHeight)continue;let e=Ae.get(t);if(!e)continue;let r=(n.threadKey??``)===(Ce.value??``);Rt(e,{allowMarkdownShrink:n.allowMarkdownShrink,markdownLogicalHeight:n.logicalHeight,rememberThreadKey:n.threadKey,source:n.itemSizeSource,updateLayout:r})}Pt()}function It(){Ft(),Pt()}function Lt(e){var t;(t=ne.get(e))==null||t.disconnect(),ne.delete(e),te.delete(e)}function Rt(e,t={}){var n;let i=(a=e.key,zN(te.get(a),u));var a;let o=t.source??$e(e),s=!1,l=()=>{s||(s=!0,function(e,t){let n=function(){if(!0!==r.debug||c.size===0)return null;let e=0;for(let t of c.values())e+=t;let t={total:e,byLabel:Object.fromEntries(Array.from(c.entries()).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])))};return c.clear(),t}();n&&console.info(`[markstream-vue][timeline][perf] layout-reads`,{label:e,itemKey:t,layoutReads:n})}(`reconcileRecordSize`,e.key))};if(!e.markdown)return i>0&&Dt(e.key,i,o,t),void l();let d=et(C.get(e.key),o)&&(n=S.get(e.key))!=null?n:0,f=t.markdownLogicalHeight??function(e){return rt(nt(e),P.get(e))?ee.get(e)??0:ot(e)}(e.key),p=function(e,t){return BN(te.get(e),u,t)}(e.key,i);if(f>0){let n=Math.max(i,f+p);(!t.allowMarkdownShrink||ie.value)&&d>0&&(n=Math.max(n,d));let r=Ct(e.key,o);(r>0&&f>r+1&&!ie.value||t.allowMarkdownShrink&&!ie.value)&&Et(e.key),n>0&&Dt(e.key,n,o,t),l();return}String(UN(Ye(e),e.index,r)).trim()?d>0?(i>d+1&&Dt(e.key,i,o,t),l()):(i>0&&Dt(e.key,i,o,t),l()):(i>0&&(Et(e.key),Dt(e.key,i,o,t)),l())}function zt(e){return t=>{(function(e,t){let n=function(e){let t=e&&`$el`in e?e.$el:e;return t instanceof HTMLElement?t:null}(t),r=te.get(e.key);if(!n)return void Lt(e.key);if(r===n)return void Rt(e);if(Lt(e.key),te.set(e.key,n),Rt(e),typeof ResizeObserver>`u`)return;let i=new ResizeObserver(()=>{Rt(e)});i.observe(n),ne.set(e.key,i)})(e,t)}}function Bt(e){let t=Ye(e),n=WN(t,e.index,r),a=j.get(e.key),o=Te.value,s=Ee.value,c={enabled:!0,sessionKey:Ze(e),threadKey:Ce.value,scrollRoot:()=>p.value,restoreState:it(e,a)?a:null,restoreAnchor:!1,measurementKey:J.value,settleMode:`manual`,settledToken:n,emitIntervalMs:96,heightDiffThresholdPx:4};return{content:UN(t,e.index,r),final:n,mode:o,codeRenderer:s,nodeVirtual:!1,fade:!0===r.markdownFade,indexKey:Ze(e),virtualScroll:c,onHeightChange(t){if(t.sessionKey!==Ze(e))return;at(e.key,t.totalHeight,{sessionKey:t.sessionKey,threadKey:Ce.value,measurementKey:J.value});let n=function(e){return e.phase===`final`||!!e.stable&&(e.confidence===`measured`||e.confidence===`final`)}(t),r=Math.ceil(t.totalHeight);var a;(function(e,t){kt.set(e.key,t),At||(At=!0,jt=Mt(Ft))})(e,{allowMarkdownShrink:n,itemSizeSource:$e(e),logicalHeight:r,threadKey:Ce.value}),a={itemKey:e.key,metrics:t},i(`height-change`,a)},onVirtualStateChange(t){var n;t.sessionKey===Ze(e)&&(j.set(e.key,t),ot(e.key,t),qt(),n={itemKey:e.key,state:t},i(`virtual-state-change`,n))}}}function Vt(e){return{item:Ye(e),index:e.index,itemKey:e.key,kind:e.kind,measureRef:zt(e),markdownProps:Bt(e)}}function Ht(e){let t=Ye(e)??{};return typeof t.text==`string`?t.text:typeof t.message==`string`?t.message:typeof t.label==`string`?t.label:UN(t,e.index,r)}function Ut(){let e=ht();if(e<=2)return{type:`bottom`,distanceFromBottomPx:Math.max(0,e)};let t=Z(),n=ze(t,`gt`),r=Pe.value.records[n];if(r){let e=Ie(r);if(t>=e&&t<e+r.size)return{type:`item`,itemKey:r.key,offsetWithinItemPx:t-e}}let i=He.value.records[0];return i?{type:`item`,itemKey:i.key,offsetWithinItemPx:0}:void 0}function Wt(e=Ce.value){It();let t={},n={};for(let r of Pe.value.records){let i=X(r,e),a=C.get(r.key);i!=null&&tt(r,a,e)&&(t[r.key]=i,n[r.key]=a)}return{threadKey:e,measurementKey:De.value,widthBucket:v.value,outerAnchor:Ut(),itemHeights:t,itemSizeSources:n,markdownStates:Object.fromEntries(j.entries())}}function Gt(e=Ce.value){if(!e)return;let t=Wt(e);return re.set(e,t),e===Ce.value&&(ve=t),s(t),t}function Kt(){let e=ce;return me!=null&&typeof window<`u`&&window.clearTimeout(me),me=null,ce=void 0,e?Gt(e):void 0}function qt(e=Ce.value){e&&(ce=e,me??(typeof window<`u`?me=window.setTimeout(()=>{me=null,Kt()},80):Kt()))}function Jt(e){if(!e)return null;if(e.type===`bottom`)return(ae.value?pt():ft())-lt()-Math.max(0,e.distanceFromBottomPx);let t=nt(e.itemKey);return t?dt()+Ie(t)+Math.max(0,e.offsetWithinItemPx):null}function Yt(e,t={}){let n=Jt(e);return n!=null&&(yt(n,{writeDom:!0,remember:!0===t.remember}),!0)}function Xt(e,t){e===de&&(t&&(ge=Yt(t,{remember:!1})?m.value:null),vt({remember:!1}))}function Zt(e,t){let n=e.getBoundingClientRect();return n.width>0&&n.height>0&&n.bottom>t.top&&n.top<t.bottom}function Qt(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.bottom>r.top&&n.top<r.bottom}function $t(e){if(e.closest(`.code-editor-container.is-hidden`))return!1;let t=e;for(;t;){let e=window.getComputedStyle(t);if(e.display===`none`||e.visibility===`hidden`||Number.parseFloat(e.opacity||`1`)<=.01)return!1;t=t.parentElement}let n=e.getBoundingClientRect();return n.width>0&&n.height>0}function en(e){return!!e.querySelector([`[data-markstream-pending="true"]`,`[data-markstream-mermaid][data-markstream-mode="pending"]`,`.mermaid-block-container[data-markstream-mode="pending"]`,`[data-markstream-code-loading="1"]`].join(`,`))}function tn(e){if(e.querySelector(`:scope > .node-placeholder`))return!1;let t=e.querySelector(`:scope > .node-content`);return!!t&&!en(t)&&!!function(e){let t=Array.from(e.querySelectorAll(`[data-markstream-math]`));return!t.length||t.every(e=>{let t=e.dataset.markstreamMode;return!(e.dataset.markstreamPending===`true`||t===`loading`||t!==`katex`&&t!==`fallback`)})}(t)&&((e.dataset.nodeType??``)===`code_block`?function(e){if(e.querySelector(`[data-markstream-code-loading="1"]`))return!1;let t=e.querySelector(`[data-markstream-code-block="1"]`);if(t){let e=t.dataset.markstreamEnhanced===`true`,r=function(e){if(!e||e.classList.contains(`is-fading-out`))return!1;let t=window.getComputedStyle(e);if(t.display===`none`||Number.parseFloat(t.opacity||`1`)<=.01)return!1;let n=e.getBoundingClientRect();return n.width>0&&n.height>0}(t.querySelector(`pre.code-pre-fallback`));return e||r||(n=t,Array.from(n.querySelectorAll(`.monaco-editor, .monaco-diff-editor`)).some($t))}var n;return function(e){let t=e.querySelector(`[data-markstream-mermaid], .mermaid-block-container`);if(t){if(t.dataset.markstreamPending===`true`)return!1;let e=t.dataset.markstreamMode;return e===`preview`?!!(t.querySelector(`svg`)||t.querySelector(`[data-mermaid-svg-layer="1"] svg`)):e===`fallback`&&!!(t.querySelector(`.mermaid-source-code`)?.textContent)?.trim()}let n=e.querySelector(`[data-markstream-infographic], .infographic-block-container`);if(n)return n.dataset.markstreamPending!==`true`;let r=e.querySelector(`[data-markstream-d2], .d2-block-container`);return r?r.dataset.markstreamPending!==`true`:!!e.querySelector(`pre[data-markstream-pre="1"]`)}(e)}(t):function(e){return(e.textContent??``).trim().length>0||!!e.querySelector([`hr`,`br`,`table`,`blockquote`,`img`,`svg`,`canvas`,`input`,`button`,`select`,`textarea`,`[role]`,`[aria-label]`,`[data-markstream-math]`,`[data-markstream-mermaid]`,`[data-markstream-infographic]`,`[data-markstream-d2]`,`[data-markstream-pre="1"]`].join(`,`))}(t))}function nn(e,t){if(!e.markdown)return!0;let n=UN(Ye(e),e.index,r);if(!String(n??``).trim()||t.querySelector(`[data-node-index]`))return!0;let i=t.querySelector(`.markdown-renderer`)??t;return!en(i)&&(!!(i.textContent??``).trim()||!!i.querySelector([`hr`,`br`,`table`,`blockquote`,`img`,`svg`,`canvas`,`input`,`button`,`[role]`,`[aria-label]`,`[data-markstream-math]`,`[data-markstream-mermaid]`,`[data-markstream-infographic]`,`[data-markstream-d2]`,`[data-markstream-pre="1"]`,`[data-markstream-code-block="1"]`].join(`,`)))}function rn(e,t,n){if(!e.markdown)return!0;let i=UN(Ye(e),e.index,r);if(!String(i??``).trim())return!0;let a=n.getBoundingClientRect(),o=Array.from(t.querySelectorAll(`[data-node-index]`)).filter(e=>Zt(e,a));if(o.length>0)return o.every(e=>tn(e));let s=t.querySelector(`.markdown-renderer`)??t;return s.querySelector(`[data-node-index], .node-placeholder`)?!!function(e,t,n,r){if(le?.type!==`bottom`||!an(e))return!1;let i=n.getBoundingClientRect(),a=t.getBoundingClientRect();return i.width>0&&i.height>0&&i.bottom<=r.top+1&&a.bottom>r.top}(e,t,s,a)&&nn(e,t):nn(e,t)}function an(e){let t=C.get(e.key);return Ct(e.key,t)>0}function on(e,t){if(!e.markdown||!K&&!_e||an(e))return!0;let n=UN(Ye(e),e.index,r);if(!String(n??``).trim())return!0;if(!t.querySelector(`.markdown-renderer`))return!1;let i=j.get(e.key);if(!it(e,i))return!1;let a=i?.metrics,o=Number(a?.totalHeight??0);if(!Number.isFinite(o)||o<=0)return!1;let s=Number(a?.measuredCount??0),c=Number(a?.estimatedCount??0),l=Number(a?.nodeCount??0),u=l<=0||s>=l&&c<=0,d=a?.confidence===`measured`||a?.confidence===`final`,f=!0===a?.stable||d;return _e?u&&!0===a?.final&&d:f||!0===a?.final}function sn(){let e=p.value;if(!e)return!1;let t=Jt(le);if(t!=null&&Math.abs((e.scrollTop||0)-mt(t))>.5)return!1;let n=He.value.records;if(!n.length)return Pe.value.records.length===0;let r=new Map(Array.from(e.querySelectorAll(`[data-markstream-item-key]`)).map(e=>[e.dataset.markstreamItemKey??``,e])),i=[];for(let t of n){let n=r.get(t.key);n&&Qt(n,e)&&i.push({record:t,el:n})}if(!i.length)return!1;for(let{record:t,el:n}of i)if(n.offsetHeight+1<t.size||!rn(t,n,e)||!on(t,n))return!1;let a=e.getBoundingClientRect();if(Array.from(e.querySelectorAll([`[data-markstream-pending="true"]`,`[data-markstream-mermaid][data-markstream-mode="pending"]`,`.mermaid-block-container[data-markstream-mode="pending"]`,`[data-markstream-code-loading="1"]`].join(`,`))).some(e=>Zt(e,a)))return!1;let o=Array.from(e.querySelectorAll(`[data-node-index]`)).filter(e=>Zt(e,a));for(let e of o)if(!tn(e))return!1;return!0}function cn(){let e=p.value;if(!e)return``;let t=e.getBoundingClientRect(),n=new Map(Array.from(e.querySelectorAll(`[data-markstream-item-key]`)).map(e=>[e.dataset.markstreamItemKey??``,e])),r=He.value.records.map(e=>{let t=n.get(e.key),r=t?.querySelector(`.markdown-renderer`),i=j.get(e.key)?.metrics;return[e.key,e.size,t?.offsetHeight??0,t?.scrollHeight??0,r?.offsetHeight??0,r?.scrollHeight??0,i?Math.round(Number(i.totalHeight||0)):``,i?.measuredCount??``,i?.estimatedCount??``,i?.nodeCount??``,+(!0===i?.final),+(!0===i?.stable),i?.confidence??``].join(`:`)}).join(`|`),i=Array.from(e.querySelectorAll(`[data-node-index]`)).filter(e=>Zt(e,t)).map(e=>{let t=e.getBoundingClientRect(),n=e.querySelector(`:scope > .node-content`),r=n?.querySelector(`[data-markstream-code-block="1"]`),i=n?.querySelector(`pre.code-pre-fallback`),a=n?.querySelector(`.monaco-editor, .monaco-diff-editor`);return[e.dataset.nodeIndex??``,e.dataset.nodeType??``,Math.round(t.height),n?.offsetHeight??0,n?.scrollHeight??0,r?.dataset.markstreamEnhanced??``,r?Math.round(r.getBoundingClientRect().height):0,i?Math.round(i.getBoundingClientRect().height):0,a?Math.round(a.getBoundingClientRect().height):0].join(`:`)}).join(`|`);return[Math.round(e.scrollTop||0),Math.round(e.scrollHeight||0),Math.round(Pe.value.totalHeight||0),r,i].join(`
|
|
160
|
-
`)}function ln(){return typeof performance<`u`?performance.now():Date.now()}function un(){return _e?24:2}function dn(e){st(e)&&ye!==e&&(ye=e,function(e){return t=this,n=function*(){let t=ln(),n=0,r=``;for(let i=0;i<40;i++){if(yield g(),yield new Promise(e=>{typeof requestAnimationFrame==`function`?requestAnimationFrame(()=>e()):e()}),!st(e))return!1;Xt(e,le);let i=ln(),a=sn(),o=a?cn():``;if(a&&o===r&&o){if(n+=1,n>=un()&&i-t>=96)return!0}else n=0,r=o}return!1},new Promise((e,r)=>{var i=e=>{try{o(n.next(e))}catch(e){r(e)}},a=e=>{try{o(n.throw(e))}catch(e){r(e)}},o=t=>t.done?e(t.value):Promise.resolve(t.value).then(i,a);o((n=n.apply(t,null)).next())});var t,n}(e).then(t=>{if(ye===e&&(ye=0),st(e))return t?void gn(e):function(){if(he<0)return!1;let e=function(){if(!1===r.restoreMaxLoadingMs)return 1/0;let e=Number(r.restoreMaxLoadingMs);return Number.isFinite(e)&&e>0?e:1/0}();return Number.isFinite(e)&&ln()-he>=e}()?(r.debug,void gn(e)):(function(e){be!==e&&(be=e,r.debug)}(e),void function(e){st(e)&&typeof window<`u`&&(B!=null&&window.clearTimeout(B),B=window.setTimeout(()=>{B=null,st(e)&&dn(e)},120))}(e))}))}function fn(){ae.value=!0,he=-1,ye=0,be=0,K=!1,_e=!1,B!=null&&typeof window<`u`&&window.clearTimeout(B),B=null}function pn(){Se=!0}function mn(e){let t=[];if(!function(e){return!!e&&(e.measurementKey??``)===De.value&&(e.widthBucket??0)===v.value}(e))return t;for(let[n,r]of Object.entries(e?.itemHeights??{})){if(!Number.isFinite(r)||r<=0)continue;let i=nt(n),a=e?.itemSizeSources?.[n];tt(i,a)&&t.push([n,Math.ceil(r),a])}return t}function hn(e){for(let[t,n]of Object.entries(e?.markdownStates??{}))if(it(nt(t),n))return!0;return!1}function gn(e){if(e===de){ct(),Xt(e,le),ie.value=!1,he=-1,le=void 0,ge=null,U=0;for(let e of Pe.value.records)e.markdown||Et(e.key);vt({remember:!1}),fn(),pn()}}function _n(e,t={}){let n=++de;e!=null&&e.widthBucket&&v.value===0&&(v.value=e.widthBucket);let i=e?.outerAnchor,a=function(e){return!!(e?.outerAnchor||mn(e).length>0||hn(e))}(e),o=hn(e),s=!(!Se&&!0!==t.threadSwitch||a),c=a||s,l=i??(c?function(){if(!1!==r.stickToBottom)return{type:`bottom`,distanceFromBottomPx:0};let e=Pe.value.records[0];return e?{type:`item`,itemKey:e.key,offsetWithinItemPx:0}:void 0}():void 0);ct(),ye=0,be=0,ae.value=!c,ie.value=c&&!!l,U=n,le=l,K=c&&o,_e=c&&s,he=ie.value?ln():-1,vn(),S.clear(),C.clear(),D.clear(),A.clear(),j.clear(),ee.clear(),P.clear();for(let[t,n,r]of mn(e)){let e=Math.ceil(n);C.set(t,r),S.set(t,e),D.set(t,e),A.set(t,r)}for(let[t,n]of Object.entries(e?.markdownStates??{}))j.set(t,n),ot(t,n);Fe(),!0===r.stickToBottom?(y.value=!0,x.value=!0):!1===r.stickToBottom?(y.value=!1,x.value=!1):(y.value=l?.type===`bottom`,x.value=l?.type===`bottom`&&l.distanceFromBottomPx<=2);let u=Jt(l);ge=u==null?null:mt(u),u!=null&&yt(u,{writeDom:!0,remember:!1,updatePinned:!1}),ve=e?.threadKey===Ce.value?e:null,c?l?g(()=>{Xt(n,l),typeof window<`u`?(se.forEach(e=>{let t=window.setTimeout(()=>{Xt(n,l)},e);pe.push(t)}),dn(n)):gn(n)}):(ie.value=!1,le=void 0,ge=null,U=0,vt({remember:!1}),fn(),pn()):(ie.value=!1,le=void 0,ge=null,U=0,vt({remember:!1}),fn(),pn(),!1!==r.stickToBottom&&(y.value=!0,x.value=!0,g(()=>{ie.value||St()})))}function vn(){for(let e of ne.values())e.disconnect();ne.clear(),te.clear()}return E(Ce,(e,t)=>{let n=q??t,i=!!(n&&n!==e);i&&function(e){It(),Kt()?.threadKey!==e&&(ve?.threadKey===e?(re.set(e,ve),s(ve)):re.has(e)||Gt(e))}(n),q=e,_n(function(e){return(e?re.get(e):null)||function(e){let t=r.initialThreadState;return t&&(t.threadKey??``)===(e??``)?t:null}(e)}(e),{threadSwitch:i})},{immediate:!0,flush:`sync`}),E(()=>He.value.records.map(e=>e.key).join(`\0`),()=>{i(`range-change`,{start:He.value.start,end:He.value.end})},{immediate:!0}),E(()=>[r.items.length,Pe.value.totalHeight],()=>{ie.value||!1!==r.stickToBottom&&(r.stickToBottom!==`auto`||x.value)&&g(()=>{ie.value||!1!==r.stickToBottom&&(r.stickToBottom!==`auto`||x.value)&&St()})},{flush:`post`}),f(()=>{ut(),_t(),le?(Xt(U,le),vt({remember:!1}),Gt()):!1===r.stickToBottom?(vt({remember:!1}),Gt()):(y.value=!0,yt(Q(),{writeDom:!0,remember:!1,updatePinned:!1}),vt({remember:!1}),Gt()),p.value&&typeof ResizeObserver<`u`&&(z=new ResizeObserver(()=>{ut(),vt()}),z.observe(p.value))}),b(()=>{ae.value||dn(U)}),l(()=>{Kt()||Gt(),ct(),me!=null&&typeof window<`u`&&window.clearTimeout(me),me=null,ce=void 0,Nt(Ot.raf),Ot.scheduled=!1,Ot.raf=null,Ot.anchor=void 0,Nt(jt),At=!1,jt=null,kt.clear(),vn(),C.clear(),D.clear(),A.clear(),ee.clear(),P.clear(),z?.disconnect(),z=null}),t({captureThreadState:function(){return Wt(Ce.value)},restoreThreadState:_n,scrollToBottom:St,scrollToIndex:function(e,t=`start`){let n=Pe.value.records[e];if(!n)return;let r=dt()+Ie(n);t===`center`?r-=(_.value-n.size)/2:t===`end`&&(r-=_.value-n.size),xt(r)},scrollToOffset:xt,getItemSize:e=>{var t;let n=nt(e);return n&&(t=X(n))!=null?t:void 0},getTotalHeight:()=>Pe.value.totalHeight,getVisibleRange:()=>({start:He.value.start,end:He.value.end})}),(e,t)=>(G(),W(`div`,{ref_key:`scrollRoot`,ref:p,class:L([`markstream-virtual-timeline`,{"is-restoring-thread":!ae.value}]),"data-markstream-virtual-timeline":`1`,"data-testid":`markstream-virtual-timeline`,onScroll:bt},[F(`div`,{class:`markstream-virtual-timeline__spacer`,style:k({height:`${He.value.topSpacerHeight}px`}),"aria-hidden":`true`},null,4),(G(!0),W(N,null,w(He.value.records,t=>(G(),W(`div`,{key:t.renderKey,class:`markstream-virtual-timeline__item`,"data-markstream-item-key":t.key,"data-markstream-item-kind":t.kind,style:k({minHeight:`${t.size}px`})},[d(e.$slots,`default`,h({ref_for:!0},Vt(t)),()=>[t.markdown?(G(),O(R(_N),h({key:0,ref_for:!0},Bt(t)),null,16)):Xe(t)?(G(),O(T(Xe(t)),{key:1,ref_for:!0,ref:zt(t),item:Ye(t)},null,8,[`item`])):(G(),W(`div`,{key:2,ref_for:!0,ref:zt(t),class:L([`markstream-virtual-timeline__default-item`,`markstream-virtual-timeline__default-item--${t.kind||`item`}`])},[t.kind===`tool-call`&&Ye(t)?.status?(G(),W(`span`,zL,H(Ye(t)?.status),1)):V(``,!0),o(` `+H(Ht(t)),1)],2))],!0)],12,RL))),128)),F(`div`,{class:`markstream-virtual-timeline__spacer`,style:k({height:`${He.value.bottomSpacerHeight}px`}),"aria-hidden":`true`},null,4),ae.value?V(``,!0):(G(),W(`div`,{key:0,class:`markstream-virtual-timeline__restore-loading`,style:k({height:`${Math.max(1,lt())}px`,transform:`translateY(${m.value}px)`}),"aria-live":`polite`,"aria-busy":`true`},[d(e.$slots,`restore-loading`,{threadKey:Ce.value,visibleRecords:He.value.records},()=>[t[0]||=F(`div`,{class:`markstream-virtual-timeline__restore-loading-card`},[F(`span`,{class:`markstream-virtual-timeline__restore-spinner`,"aria-hidden":`true`}),F(`span`,null,`Loading thread…`)],-1)],!0)],4))],34))}})),[[`__scopeId`,`data-v-dff004bf`]]),VL=BL;VL.install=e=>{let t=VL.__name??VL.name??`MarkstreamVirtualTimeline`;e.component(t,BL)};var HL=n({AElig:()=>`Æ`,AMP:()=>`&`,Aacute:()=>`Á`,Abreve:()=>`Ă`,Acirc:()=>`Â`,Acy:()=>`А`,Afr:()=>WL,Agrave:()=>`À`,Alpha:()=>`Α`,Amacr:()=>`Ā`,And:()=>`⩓`,Aogon:()=>`Ą`,Aopf:()=>KL,ApplyFunction:()=>``,Aring:()=>`Å`,Ascr:()=>JL,Assign:()=>`≔`,Atilde:()=>`Ã`,Auml:()=>`Ä`,Backslash:()=>`∖`,Barv:()=>`⫧`,Barwed:()=>`⌆`,Bcy:()=>`Б`,Because:()=>`∵`,Bernoullis:()=>`ℬ`,Beta:()=>`Β`,Bfr:()=>XL,Bopf:()=>eR,Breve:()=>`˘`,Bscr:()=>`ℬ`,Bumpeq:()=>`≎`,CHcy:()=>`Ч`,COPY:()=>`©`,Cacute:()=>`Ć`,Cap:()=>`⋒`,CapitalDifferentialD:()=>`ⅅ`,Cayleys:()=>`ℭ`,Ccaron:()=>`Č`,Ccedil:()=>`Ç`,Ccirc:()=>`Ĉ`,Cconint:()=>`∰`,Cdot:()=>`Ċ`,Cedilla:()=>`¸`,CenterDot:()=>`·`,Cfr:()=>`ℭ`,Chi:()=>`Χ`,CircleDot:()=>`⊙`,CircleMinus:()=>`⊖`,CirclePlus:()=>`⊕`,CircleTimes:()=>`⊗`,ClockwiseContourIntegral:()=>`∲`,CloseCurlyDoubleQuote:()=>`”`,CloseCurlyQuote:()=>`’`,Colon:()=>`∷`,Colone:()=>`⩴`,Congruent:()=>`≡`,Conint:()=>`∯`,ContourIntegral:()=>`∮`,Copf:()=>`ℂ`,Coproduct:()=>`∐`,CounterClockwiseContourIntegral:()=>`∳`,Cross:()=>`⨯`,Cscr:()=>oR,Cup:()=>`⋓`,CupCap:()=>`≍`,DD:()=>`ⅅ`,DDotrahd:()=>`⤑`,DJcy:()=>`Ђ`,DScy:()=>`Ѕ`,DZcy:()=>`Џ`,Dagger:()=>`‡`,Darr:()=>`↡`,Dashv:()=>`⫤`,Dcaron:()=>`Ď`,Dcy:()=>`Д`,Del:()=>`∇`,Delta:()=>`Δ`,Dfr:()=>lR,DiacriticalAcute:()=>`´`,DiacriticalDot:()=>`˙`,DiacriticalDoubleAcute:()=>`˝`,DiacriticalGrave:()=>"`",DiacriticalTilde:()=>`˜`,Diamond:()=>`⋄`,DifferentialD:()=>`ⅆ`,Dopf:()=>dR,Dot:()=>`¨`,DotDot:()=>`⃜`,DotEqual:()=>`≐`,DoubleContourIntegral:()=>`∯`,DoubleDot:()=>`¨`,DoubleDownArrow:()=>`⇓`,DoubleLeftArrow:()=>`⇐`,DoubleLeftRightArrow:()=>`⇔`,DoubleLeftTee:()=>`⫤`,DoubleLongLeftArrow:()=>`⟸`,DoubleLongLeftRightArrow:()=>`⟺`,DoubleLongRightArrow:()=>`⟹`,DoubleRightArrow:()=>`⇒`,DoubleRightTee:()=>`⊨`,DoubleUpArrow:()=>`⇑`,DoubleUpDownArrow:()=>`⇕`,DoubleVerticalBar:()=>`∥`,DownArrow:()=>`↓`,DownArrowBar:()=>`⤓`,DownArrowUpArrow:()=>`⇵`,DownBreve:()=>`̑`,DownLeftRightVector:()=>`⥐`,DownLeftTeeVector:()=>`⥞`,DownLeftVector:()=>`↽`,DownLeftVectorBar:()=>`⥖`,DownRightTeeVector:()=>`⥟`,DownRightVector:()=>`⇁`,DownRightVectorBar:()=>`⥗`,DownTee:()=>`⊤`,DownTeeArrow:()=>`↧`,Downarrow:()=>`⇓`,Dscr:()=>pR,Dstrok:()=>`Đ`,ENG:()=>`Ŋ`,ETH:()=>`Ð`,Eacute:()=>`É`,Ecaron:()=>`Ě`,Ecirc:()=>`Ê`,Ecy:()=>`Э`,Edot:()=>`Ė`,Efr:()=>hR,Egrave:()=>`È`,Element:()=>`∈`,Emacr:()=>`Ē`,EmptySmallSquare:()=>`◻`,EmptyVerySmallSquare:()=>`▫`,Eogon:()=>`Ę`,Eopf:()=>_R,Epsilon:()=>`Ε`,Equal:()=>`⩵`,EqualTilde:()=>`≂`,Equilibrium:()=>`⇌`,Escr:()=>`ℰ`,Esim:()=>`⩳`,Eta:()=>`Η`,Euml:()=>`Ë`,Exists:()=>`∃`,ExponentialE:()=>`ⅇ`,Fcy:()=>`Ф`,Ffr:()=>yR,FilledSmallSquare:()=>`◼`,FilledVerySmallSquare:()=>`▪`,Fopf:()=>xR,ForAll:()=>`∀`,Fouriertrf:()=>`ℱ`,Fscr:()=>`ℱ`,GJcy:()=>`Ѓ`,GT:()=>`>`,Gamma:()=>`Γ`,Gammad:()=>`Ϝ`,Gbreve:()=>`Ğ`,Gcedil:()=>`Ģ`,Gcirc:()=>`Ĝ`,Gcy:()=>`Г`,Gdot:()=>`Ġ`,Gfr:()=>TR,Gg:()=>`⋙`,Gopf:()=>DR,GreaterEqual:()=>`≥`,GreaterEqualLess:()=>`⋛`,GreaterFullEqual:()=>`≧`,GreaterGreater:()=>`⪢`,GreaterLess:()=>`≷`,GreaterSlantEqual:()=>`⩾`,GreaterTilde:()=>`≳`,Gscr:()=>kR,Gt:()=>`≫`,HARDcy:()=>`Ъ`,Hacek:()=>`ˇ`,Hat:()=>`^`,Hcirc:()=>`Ĥ`,Hfr:()=>`ℌ`,HilbertSpace:()=>`ℋ`,Hopf:()=>`ℍ`,HorizontalLine:()=>`─`,Hscr:()=>`ℋ`,Hstrok:()=>`Ħ`,HumpDownHump:()=>`≎`,HumpEqual:()=>`≏`,IEcy:()=>`Е`,IJlig:()=>`IJ`,IOcy:()=>`Ё`,Iacute:()=>`Í`,Icirc:()=>`Î`,Icy:()=>`И`,Idot:()=>`İ`,Ifr:()=>`ℑ`,Igrave:()=>`Ì`,Im:()=>`ℑ`,Imacr:()=>`Ī`,ImaginaryI:()=>`ⅈ`,Implies:()=>`⇒`,Int:()=>`∬`,Integral:()=>`∫`,Intersection:()=>`⋂`,InvisibleComma:()=>``,InvisibleTimes:()=>``,Iogon:()=>`Į`,Iopf:()=>IR,Iota:()=>`Ι`,Iscr:()=>`ℐ`,Itilde:()=>`Ĩ`,Iukcy:()=>`І`,Iuml:()=>`Ï`,Jcirc:()=>`Ĵ`,Jcy:()=>`Й`,Jfr:()=>zR,Jopf:()=>VR,Jscr:()=>UR,Jsercy:()=>`Ј`,Jukcy:()=>`Є`,KHcy:()=>`Х`,KJcy:()=>`Ќ`,Kappa:()=>`Κ`,Kcedil:()=>`Ķ`,Kcy:()=>`К`,Kfr:()=>GR,Kopf:()=>qR,Kscr:()=>YR,LJcy:()=>`Љ`,LT:()=>`<`,Lacute:()=>`Ĺ`,Lambda:()=>`Λ`,Lang:()=>`⟪`,Laplacetrf:()=>`ℒ`,Larr:()=>`↞`,Lcaron:()=>`Ľ`,Lcedil:()=>`Ļ`,Lcy:()=>`Л`,LeftAngleBracket:()=>`⟨`,LeftArrow:()=>`←`,LeftArrowBar:()=>`⇤`,LeftArrowRightArrow:()=>`⇆`,LeftCeiling:()=>`⌈`,LeftDoubleBracket:()=>`⟦`,LeftDownTeeVector:()=>`⥡`,LeftDownVector:()=>`⇃`,LeftDownVectorBar:()=>`⥙`,LeftFloor:()=>`⌊`,LeftRightArrow:()=>`↔`,LeftRightVector:()=>`⥎`,LeftTee:()=>`⊣`,LeftTeeArrow:()=>`↤`,LeftTeeVector:()=>`⥚`,LeftTriangle:()=>`⊲`,LeftTriangleBar:()=>`⧏`,LeftTriangleEqual:()=>`⊴`,LeftUpDownVector:()=>`⥑`,LeftUpTeeVector:()=>`⥠`,LeftUpVector:()=>`↿`,LeftUpVectorBar:()=>`⥘`,LeftVector:()=>`↼`,LeftVectorBar:()=>`⥒`,Leftarrow:()=>`⇐`,Leftrightarrow:()=>`⇔`,LessEqualGreater:()=>`⋚`,LessFullEqual:()=>`≦`,LessGreater:()=>`≶`,LessLess:()=>`⪡`,LessSlantEqual:()=>`⩽`,LessTilde:()=>`≲`,Lfr:()=>$R,Ll:()=>`⋘`,Lleftarrow:()=>`⇚`,Lmidot:()=>`Ŀ`,LongLeftArrow:()=>`⟵`,LongLeftRightArrow:()=>`⟷`,LongRightArrow:()=>`⟶`,Longleftarrow:()=>`⟸`,Longleftrightarrow:()=>`⟺`,Longrightarrow:()=>`⟹`,Lopf:()=>tz,LowerLeftArrow:()=>`↙`,LowerRightArrow:()=>`↘`,Lscr:()=>`ℒ`,Lsh:()=>`↰`,Lstrok:()=>`Ł`,Lt:()=>`≪`,Map:()=>`⤅`,Mcy:()=>`М`,MediumSpace:()=>` `,Mellintrf:()=>`ℳ`,Mfr:()=>oz,MinusPlus:()=>`∓`,Mopf:()=>cz,Mscr:()=>`ℳ`,Mu:()=>`Μ`,NJcy:()=>`Њ`,Nacute:()=>`Ń`,Ncaron:()=>`Ň`,Ncedil:()=>`Ņ`,Ncy:()=>`Н`,NegativeMediumSpace:()=>``,NegativeThickSpace:()=>``,NegativeThinSpace:()=>``,NegativeVeryThinSpace:()=>``,NestedGreaterGreater:()=>`≫`,NestedLessLess:()=>`≪`,NewLine:()=>`
|
|
159
|
+
`)},null,8,tI),t[21]||=F(`span`,{class:`mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate`},`Mermaid`,-1)])),e.$slots[`header-center`]?(y(),U(`div`,nI,[C(e.$slots,`header-center`,{},void 0,!0)])):n.showModeToggle&&a.value?(y(),U(`div`,rI,[F(`button`,{class:z([`mermaid-mode-btn px-2 py-0.5 rounded transition-colors`,[K.value?``:`is-active`]]),onClick:t[0]||=()=>Ut(`preview`),onMouseenter:t[1]||=e=>_t(e,B(x)(`common.preview`)||`Preview`),onFocus:t[2]||=e=>_t(e,B(x)(`common.preview`)||`Preview`),onMouseleave:vt,onBlur:vt},[F(`div`,iI,[t[22]||=F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0`}),F(`circle`,{cx:`12`,cy:`12`,r:`3`})])],-1),F(`span`,null,O(B(x)(`common.preview`)||`Preview`),1)])],34),F(`button`,{class:z([`mermaid-mode-btn px-2 py-0.5 rounded transition-colors`,[K.value?`is-active`:``]]),onClick:t[3]||=()=>Ut(`source`),onMouseenter:t[4]||=e=>_t(e,B(x)(`common.source`)||`Source`),onFocus:t[5]||=e=>_t(e,B(x)(`common.source`)||`Source`),onMouseleave:vt,onBlur:vt},[F(`div`,aI,[t[23]||=F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m16 18l6-6l-6-6M8 6l-6 6l6 6`})],-1),F(`span`,null,O(B(x)(`common.source`)||`Source`),1)])],34)])):D(``,!0),e.$slots[`header-right`]?(y(),U(`div`,oI,[C(e.$slots,`header-right`,{},void 0,!0)])):(y(),U(`div`,sI,[n.showCollapseButton?(y(),U(`button`,{key:0,class:z(SI),"aria-pressed":A.value,onClick:t[6]||=e=>A.value=!A.value,onMouseenter:t[7]||=e=>_t(e,A.value?B(x)(`common.expand`)||`Expand`:B(x)(`common.collapse`)||`Collapse`),onFocus:t[8]||=e=>_t(e,A.value?B(x)(`common.expand`)||`Expand`:B(x)(`common.collapse`)||`Collapse`),onMouseleave:vt,onBlur:vt},[(y(),U(`svg`,{style:ne({rotate:A.value?`0deg`:`90deg`}),xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[...t[24]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m9 18l6-6l-6-6`},null,-1)]],4))],40,cI)):D(``,!0),n.showCopyButton?(y(),U(`button`,{key:1,class:z(SI),onClick:Bt,onMouseenter:t[9]||=e=>Q(e),onFocus:t[10]||=e=>Q(e),onMouseleave:vt,onBlur:vt},[k.value?(y(),U(`svg`,uI,[...t[26]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M20 6L9 17l-5-5`},null,-1)]])):(y(),U(`svg`,lI,[...t[25]||=[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),F(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})],-1)]]))],32)):D(``,!0),n.showExportButton&&a.value?(y(),U(`button`,{key:2,class:z(`${SI} ${Tt.value?`opacity-50 cursor-not-allowed`:``}`),"aria-label":B(x)(`common.export`)||`Export`,disabled:Tt.value,onClick:Vt,onMouseenter:t[11]||=e=>_t(e,B(x)(`common.export`)||`Export`),onFocus:t[12]||=e=>_t(e,B(x)(`common.export`)||`Export`),onMouseleave:vt,onBlur:vt},[...t[27]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`path`,{d:`M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),F(`path`,{d:`m7 10l5 5l5-5`})])],-1)]],42,dI)):D(``,!0),n.showFullscreenButton&&a.value?(y(),U(`button`,{key:3,class:z(`${SI} ${Tt.value?`opacity-50 cursor-not-allowed`:``}`),"aria-label":Ot.value?B(x)(`common.minimize`)||`Minimize`:B(x)(`common.open`)||`Open`,disabled:Tt.value,onClick:Ht,onMouseenter:t[13]||=e=>_t(e,Ot.value?B(x)(`common.minimize`)||`Minimize`:B(x)(`common.open`)||`Open`),onFocus:t[14]||=e=>_t(e,Ot.value?B(x)(`common.minimize`)||`Minimize`:B(x)(`common.open`)||`Open`),onMouseleave:vt,onBlur:vt},[Ot.value?(y(),U(`svg`,mI,[...t[29]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6`},null,-1)]])):(y(),U(`svg`,pI,[...t[28]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6`},null,-1)]]))],42,fI)):D(``,!0)]))])):D(``,!0),E(F(`div`,{ref_key:`modeContainerRef`,ref:ve},[K.value?(y(),U(`div`,hI,[F(`pre`,gI,O(W.value),1)])):(y(),U(`div`,_I,[n.showZoomControls?(y(),U(`div`,vI,[F(`div`,yI,[F(`button`,{class:`mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors`,onClick:Nt,onMouseenter:t[15]||=e=>_t(e,B(x)(`common.zoomIn`)||`Zoom in`),onFocus:t[16]||=e=>_t(e,B(x)(`common.zoomIn`)||`Zoom in`),onMouseleave:vt,onBlur:vt},[...t[30]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`circle`,{cx:`11`,cy:`11`,r:`8`}),F(`path`,{d:`m21 21l-4.35-4.35M11 8v6m-3-3h6`})])],-1)]],32),F(`button`,{class:`mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors`,onClick:Pt,onMouseenter:t[17]||=e=>_t(e,B(x)(`common.zoomOut`)||`Zoom out`),onFocus:t[18]||=e=>_t(e,B(x)(`common.zoomOut`)||`Zoom out`),onMouseleave:vt,onBlur:vt},[...t[31]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`circle`,{cx:`11`,cy:`11`,r:`8`}),F(`path`,{d:`m21 21l-4.35-4.35M8 11h6`})])],-1)]],32),F(`button`,{class:`mermaid-action-btn p-[var(--ms-action-btn-padding)] text-[length:var(--ms-text-label)] rounded transition-colors`,onClick:Ft,onMouseenter:t[19]||=e=>_t(e,B(x)(`common.resetZoom`)||`Reset zoom`),onFocus:t[20]||=e=>_t(e,B(x)(`common.resetZoom`)||`Reset zoom`),onMouseleave:vt,onBlur:vt},O(Math.round(100*we.value))+`% `,33)])])):D(``,!0),F(`div`,ae({ref_key:`mermaidContainer`,ref:M,class:`mermaid-preview-area relative overflow-hidden block transition-[height] ease-out`,style:{height:Je.value}},w(it.value,!0),{onMousedown:It,onMousemove:Lt,onMouseup:Rt,onMouseleave:Rt,onTouchstartPassive:It,onTouchmovePassive:Lt,onTouchendPassive:Rt}),[F(`div`,{"data-mermaid-wrapper":``,class:z([`absolute inset-0 cursor-grab`,{"cursor-grabbing":Ee.value}]),style:ne(kt.value)},[F(`div`,{ref_key:`mermaidContent`,ref:N,class:`_mermaid w-full text-center flex items-center justify-center min-h-full`,style:ne({height:Ye.value})},null,4)],6)],16),(y(),P(te,{to:`body`},[F(`div`,{class:z([`markstream-vue`,{dark:n.isDark}])},[o(pe,{name:`mermaid-dialog`,appear:``},{default:T(()=>[Ot.value?(y(),U(`div`,{key:0,class:`mermaid-modal-overlay fixed inset-0 z-50 flex items-center justify-center p-4`,onClick:oe(Mt,[`self`])},[F(`div`,bI,[F(`div`,xI,[F(`button`,{class:`mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors`,onClick:Nt},[...t[32]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`circle`,{cx:`11`,cy:`11`,r:`8`}),F(`path`,{d:`m21 21l-4.35-4.35M11 8v6m-3-3h6`})])],-1)]]),F(`button`,{class:`mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded transition-colors`,onClick:Pt},[...t[33]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`circle`,{cx:`11`,cy:`11`,r:`8`}),F(`path`,{d:`m21 21l-4.35-4.35M8 11h6`})])],-1)]]),F(`button`,{class:`mermaid-action-btn p-[var(--ms-action-btn-padding)] text-[length:var(--ms-text-label)] rounded transition-colors`,onClick:Ft},O(Math.round(100*we.value))+`% `,1),F(`button`,{class:`mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded transition-colors`,onClick:Mt},[...t[34]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M18 6L6 18M6 6l12 12`})],-1)]])]),F(`div`,ae({ref_key:`modalContent`,ref:ee,class:`w-full h-full flex items-center justify-center p-4 overflow-hidden`},w(it.value,!0),{onMousedown:It,onMousemove:Lt,onMouseup:Rt,onMouseleave:Rt,onTouchstartPassive:It,onTouchmovePassive:Lt,onTouchendPassive:Rt}),null,16)])])):D(``,!0)]),_:1})],2)]))]))],512),[[fe,!A.value]])],10,ZF))}}),[[`__scopeId`,`data-v-e9775fad`]]);CI.install=e=>{e.component(CI.__name,CI)};var wI=n({default:()=>tF});tF.install=e=>{e.component(tF.__name,tF)};var TI=n({default:()=>oF});oF.install=e=>{e.component(oF.__name,oF)};var EI=n({default:()=>MI}),DI=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),OI=[`data-markstream-mode`,`data-markstream-pending`],kI={key:0,class:`math-loading-overlay`},AI=[`innerHTML`],jI={key:1,class:`math-block__fallback text-left`},MI=eO(x({__name:`MathBlockNode`,props:{node:{},indexKey:{},cacheScope:{}},setup(e){let t=e,n=V(null),r=I(mE,null),i=R(()=>GE(t.node.content)),a=R(()=>WO(t,{})),s=function(){if(!t.node.content)return{html:``,text:t.node.raw,loading:!1};let e=UE();if(!e)return{html:``,text:t.node.loading?``:t.node.raw,loading:t.node.loading};try{return{html:e.renderToString(i.value,{throwOnError:t.node.loading,displayMode:!0}),text:``,loading:!1}}catch{return{html:``,text:t.node.loading?``:t.node.raw,loading:t.node.loading}}}(),c=V(s.html),u=V(s.text),d=!1,f=0,m=!1,g=null,_=wM(),b=fA(),x=null,S=null,C=``,w=V(s.loading),E=V(!1),k=V(M());function A(e){e!=null&&e!==f||(E.value=!1)}function j(){if(t.indexKey==null)return``;let e=t.cacheScope??_?.scope;return`${e!=null&&String(e).length>0?`${String(e)}:`:``}math-block:${String(t.indexKey)}`}function M(){var e;let t=j();return t&&(e=_?.cache.get(t))!=null?e:0}function N(e){if(!Number.isFinite(e)||e<=0)return;let t=Math.max(k.value,e);if(t===k.value)return;k.value=t;let n=j();n&&_?.cache.set(n,t)}function ee(){h(()=>{N(n.value?.offsetHeight??0)})}function te(){let e=C;r&&e&&(C=``,r.markSettled(e))}function P(){return DI(this,null,function*(){if(m)return te(),void A();g&&=(g.abort(),null);let e=++f;if(!t.node.content)return te(),A(),w.value=!1,c.value=``,u.value=t.node.raw,d=!0,void ee();let o=new AbortController;if(g=o,E.value=!0,!d)try{!x&&n.value&&(x=b(n.value)),yield x?.whenVisible}catch{}m||e!==f||o.signal.aborted?m||A(e):(function(){let e=a.value;r&&e&&C!==e&&(C&&r.markSettled(C),C=e,r.markPending(e))}(),rD(i.value,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:1,signal:o.signal}).then(t=>{m||e!==f||(c.value=t,u.value=``,d=!0,w.value=!1,ee())}).catch(n=>DI(null,null,function*(){if(m||e!==f)return;let r=n?.code||n?.name,a=r===`KATEX_DISABLED`;if(r===`WORKER_INIT_ERROR`||n?.fallbackToRenderer||r===`WORKER_BUSY`||r===`WORKER_TIMEOUT`){let n=yield WE();if(m||e!==f)return;if(n){try{let e=n.renderToString(i.value,{throwOnError:t.node.loading,displayMode:!0});c.value=e,u.value=``,d=!0,w.value=!1,ee(),eD(i.value,!0,e)}catch{}return}}if(a||!t.node.loading)return w.value=!1,c.value=``,u.value=t.node.raw,void ee();d||(w.value=!0)})).finally(()=>{m||e!==f||(A(e),function(){let e=C;r&&e&&(C=``,h(()=>{if(!m){let t=n.value?.offsetHeight??0;t>0&&r.reportHeight(e,t)}r.markSettled(e)}))}())}))})}return(s.html||s.text)&&(d=!0),p(()=>t.node.content,()=>{P()},{flush:`post`}),p([()=>t.indexKey,()=>t.cacheScope],()=>{k.value=M(),ee()}),l(()=>{typeof ResizeObserver<`u`&&n.value&&(S=new ResizeObserver(()=>{N(n.value?.offsetHeight??0)}),S.observe(n.value)),ee(),c.value||P()}),v(()=>{var e;m=!0,te(),g&&=(g.abort(),null),S?.disconnect(),S=null,(e=x?.destroy)==null||e.call(x),x=null}),(e,t)=>(y(),U(`div`,{ref_key:`containerEl`,ref:n,class:`math-block text-center overflow-x-auto relative`,"data-markstream-math":`block`,"data-markstream-mode":c.value?`katex`:u.value?`fallback`:`loading`,"data-markstream-pending":E.value?`true`:void 0,style:ne(k.value?{minHeight:`${k.value}px`}:void 0)},[o(pe,{name:`math-fade`},{default:T(()=>[!w.value||c.value||u.value?D(``,!0):(y(),U(`div`,kI,[...t[0]||=[F(`div`,{class:`math-loading-spinner`},null,-1)]]))]),_:1}),c.value?(y(),U(`div`,{key:0,class:z([`math-block__content`,{"math-rendering":w.value}]),innerHTML:c.value},null,10,AI)):u.value?(y(),U(`pre`,jI,O(u.value),1)):(y(),U(`div`,{key:2,class:z([`math-block__content`,{"math-rendering":w.value}])},null,2))],12,OI))}}),[[`__scopeId`,`data-v-38e7acf6`]]);MI.install=e=>{e.component(MI.__name,MI)};var NI=n({default:()=>zI}),PI=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),FI=[`data-markstream-mode`,`data-markstream-pending`],II=[`innerHTML`],LI={key:1,class:`math-inline math-inline--fallback`},RI={class:`math-inline__loading`,role:`status`,"aria-live":`polite`},zI=eO(x({__name:`MathInlineNode`,props:{node:{}},setup(e){let t=e,n=V(null),r=R(()=>t.node.markup===`$$`),i=R(()=>GE(t.node.content)),a=function(){if(!t.node.content)return{html:``,text:t.node.raw,loading:!1};let e=UE();if(!e)return{html:``,text:t.node.raw,loading:!1};try{return{html:e.renderToString(i.value,{throwOnError:t.node.loading,displayMode:r.value}),text:``,loading:!1}}catch{return{html:``,text:t.node.raw,loading:!1}}}(),o=V(a.html),s=V(a.text),c=!1,u=0,d=!1,f=null,m=V(a.loading),h=V(!1),g=fA(),_=null;function b(e){e!=null&&e!==u||(h.value=!1)}function x(){return PI(this,null,function*(){if(d)return;f&&=(f.abort(),null);let e=++u;if(!t.node.content)return b(),m.value=!1,o.value=``,s.value=t.node.raw,void(c=!0);let a=new AbortController;if(f=a,h.value=!0,!c)try{!_&&n.value&&(_=g(n.value)),yield _?.whenVisible}catch{}d||e!==u||a.signal.aborted?b(e):rD(i.value,r.value,{timeout:1500,waitTimeout:0,maxRetries:0,signal:a.signal}).then(t=>{d||e!==u||(o.value=t,s.value=``,m.value=!1,c=!0)}).catch(n=>PI(null,null,function*(){if(d||e!==u)return;let a=n?.code||n?.name,l=a===`KATEX_DISABLED`;if(a===`WORKER_INIT_ERROR`||n?.fallbackToRenderer||a===`WORKER_BUSY`||a===`WORKER_TIMEOUT`){let n=yield WE();if(d||e!==u)return;if(n){try{let e=n.renderToString(i.value,{throwOnError:t.node.loading,displayMode:r.value});o.value=e,s.value=``,m.value=!1,c=!0,eD(i.value,r.value,e)}catch{}return}}if(l||!t.node.loading)return m.value=!1,o.value=``,void(s.value=t.node.raw);c||(m.value=!0)})).finally(()=>{d||b(e)})})}return(a.html||a.text)&&(c=!0),p(()=>t.node.content,()=>{x()}),l(()=>{o.value||x()}),v(()=>{var e;d=!0,f&&=(f.abort(),null),(e=_?.destroy)==null||e.call(_),_=null}),(e,t)=>(y(),U(`span`,{ref_key:`containerEl`,ref:n,class:`math-inline-wrapper`,"data-markstream-math":`inline`,"data-markstream-mode":o.value?`katex`:s.value?`fallback`:`loading`,"data-markstream-pending":h.value?`true`:void 0},[o.value?(y(),U(`span`,{key:0,class:`math-inline`,innerHTML:o.value},null,8,II)):s.value?(y(),U(`span`,LI,O(s.value),1)):m.value?(y(),P(pe,{key:2,name:`table-node-fade`},{default:T(()=>[F(`span`,RI,[C(e.$slots,`loading`,{isLoading:m.value},()=>[t[0]||=F(`span`,{class:`math-inline__spinner animate-spin`,"aria-hidden":`true`},null,-1),t[1]||=F(`span`,{class:`sr-only`},`Loading`,-1)],!0)])]),_:3})):D(``,!0)],8,FI))}}),[[`__scopeId`,`data-v-7b64afc7`]]);zI.install=e=>{e.component(zI.__name,zI)};var BI=n({default:()=>fL}),VI=Object.defineProperty,HI=Object.getOwnPropertySymbols,UI=Object.prototype.hasOwnProperty,WI=Object.prototype.propertyIsEnumerable,GI=(e,t,n)=>t in e?VI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,KI=(e,t)=>{for(var n in t||={})UI.call(t,n)&&GI(e,n,t[n]);if(HI)for(var n of HI(t))WI.call(t,n)&&GI(e,n,t[n]);return e},qI=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),JI=[`data-markstream-mode`],YI={key:0,class:`d2-block-header flex justify-between items-center border-b`},XI={class:`d2-header-actions flex items-center`},ZI={key:0,class:`d2-mode-toggle flex items-center gap-0.5`},QI=[`aria-label`],$I={key:0,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},eL={key:1,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},tL=[`aria-label`],nL=[`aria-pressed`],rL={key:0,class:`d2-source`},iL={class:`d2-code`},aL={key:0,class:`d2-error mt-2 text-xs`},oL={key:1},sL={key:0,class:`d2-source`},cL={class:`d2-code`},lL={key:0,class:`d2-error mt-2 text-xs`},uL=[`innerHTML`],dL={key:0,class:`d2-error px-4 pb-3 text-xs`},fL=eO(x({__name:`D2BlockNode`,props:{node:{},maxHeight:{default:void 0},loading:{type:Boolean,default:!0},isDark:{type:Boolean},progressiveRender:{type:Boolean,default:!0},progressiveIntervalMs:{default:700},themeId:{},darkThemeId:{},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0}},setup(e){let t=e,n=u(),r=I(mE,null),{t:i}=UO(),a=V(!1),o=V(!1),s=V(!1),c=V(!1),d=V(null),f=V(!1),m=V(``),g=V(0),_=V(null),b=V(null),x=V(null),S=fA(),C=V(null),w=V(typeof window>`u`),T=R(()=>t.node.code??``),k=R(()=>WO(t,n)),A=R(()=>`${t.isDark?`dark`:`light`}:${T.value}`),j=R(()=>s.value||!c.value||!m.value),M=R(()=>!!m.value),N=R(()=>{if(j.value&&b.value)return{minHeight:`${b.value}px`}}),ee=R(()=>t.maxHeight===`none`?{maxHeight:`none`}:t.maxHeight==null?void 0:{maxHeight:typeof t.maxHeight==`number`?`${t.maxHeight}px`:String(t.maxHeight)}),te=typeof window<`u`,P=null,re=!1,ie=!1,ae=0,oe=null,L=!1,se=null,ce=``,le=``;typeof window<`u`&&p(()=>x.value,e=>{var t;if((t=C.value)==null||t.destroy(),C.value=null,!e)return void(w.value=!1);let n=S(e,{rootMargin:`160px`});C.value=n,w.value=n.isVisible.value,n.whenVisible.then(()=>{w.value=!0})},{immediate:!0});let ue={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 de(e){return!e||e.disabled}function pe(e,n,r=`top`){if(de(e.currentTarget))return;let i=e,a=i?.clientX!=null&&i?.clientY!=null?{x:i.clientX,y:i.clientY}:void 0;RO(e.currentTarget,n,r,!1,a,t.isDark)}function me(){zO()}function H(e){if(de(e.currentTarget))return;let n=a.value?i(`common.copied`)||`Copied`:i(`common.copy`)||`Copy`,r=e,o=r?.clientX!=null&&r?.clientY!=null?{x:r.clientX,y:r.clientY}:void 0;RO(e.currentTarget,n,`top`,!1,o,t.isDark)}function he(){return qI(this,null,function*(){try{let e=T.value;typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`&&(yield navigator.clipboard.writeText(e)),a.value=!0,setTimeout(()=>{a.value=!1},1e3)}catch(e){console.error(`Copy failed:`,e)}})}function ge(){o.value=!o.value}function _e(e){s.value=e===`source`}let ve=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],W=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function ye(e){if(!e)return``;let t=e.trim();return W.test(t)?t:``}function be(){m.value=``}function xe(){return qI(this,null,function*(){if(!te||ie||!w.value||t.loading&&!t.progressiveRender)return;let e=A.value;if(e===ce&&!d.value&&m.value)return c.value=!0,void(t.loading&&(s.value=!1));let n=T.value;if(!n)return be(),d.value=null,void(ce=``);let i=++g.value;f.value=!0,d.value=null,function(){let e=k.value;r&&e&&le!==e&&(le&&r.markSettled(le),le=e,r.markPending(e))}();try{let r=yield function(){return qI(this,null,function*(){if(P)return P;let e=yield AN();if(!e)return null;if(typeof e==`function`){let t=new e;return t&&typeof t.compile==`function`?P=t:typeof e.compile==`function`&&(P=e),P}return e?.D2&&typeof e.D2==`function`?(P=new e.D2,P):(typeof e.compile==`function`&&(P=e),P)})}();if(!r)return c.value=!1,s.value=!0,be(),void(d.value=`D2 is not available.`);if(typeof r.compile!=`function`||typeof r.render!=`function`)throw TypeError(`D2 instance is missing compile/render methods.`);c.value=!0;let a=yield r.compile(n);if(i!==g.value)return;let o=a?.diagram??a,l=a?.renderOptions??a?.options??{},u=t.themeId??l.themeID,f=t.darkThemeId??l.darkThemeID,p=KI({},l);if(p.themeID=t.isDark&&f!=null?f:u,p.darkThemeID=null,p.darkThemeOverrides=null,t.isDark){let e=l.themeOverrides&&typeof l.themeOverrides==`object`?l.themeOverrides:null;p.themeOverrides=KI(KI({},ue),e||{})}let h=yield r.render(o,p);if(i!==g.value)return;let _=function(e){return e?typeof e==`string`?e:typeof e.svg==`string`?e.svg:typeof e.data==`string`?e.data:``:``}(h);if(!_)throw Error(`D2 render returned empty output.`);(function(e){m.value=function(e){if(typeof window>`u`||typeof DOMParser>`u`||!e)return``;let t=e.replace(/["']\s*javascript:/gi,`#`).replace(/\bjavascript:/gi,`#`).replace(/["']\s*vbscript:/gi,`#`).replace(/\bvbscript:/gi,`#`).replace(/\bdata:text\/html/gi,`#`),n=new DOMParser().parseFromString(t,`image/svg+xml`).documentElement;if(!n||n.nodeName.toLowerCase()!==`svg`)return``;let r=n;return function(e){let t=new Set([`script`]),n=[e,...Array.from(e.querySelectorAll(`*`))];for(let e of n){if(t.has(e.tagName.toLowerCase())){e.remove();continue}let n=Array.from(e.attributes);for(let t of n){let n=t.name;if(/^on/i.test(n))e.removeAttribute(n);else{if(n===`style`&&t.value){let r=t.value;if(ve.some(e=>e.test(r))){e.removeAttribute(n);continue}}if((n===`href`||n===`xlink:href`)&&t.value){let r=ye(t.value);if(!r){e.removeAttribute(n);continue}r!==t.value&&e.setAttribute(n,r)}}}}}(r),r.classList.add(`markstream-d2-root-svg`),r.outerHTML}(e)||``})(_),ce=e,t.loading&&(s.value=!1),d.value=null}catch(e){if(i!==g.value)return;let n=e?.message?String(e.message):`D2 render failed.`;t.loading||(d.value=n),ce=``,n.includes(`@terrastruct/d2`)&&(c.value=!1,s.value=!0)}finally{i===g.value&&(f.value=!1,L?(L=!1,Se()):function(){let e=le;r&&e&&(le=``,h(()=>{if(!ie){let t=x.value?.offsetHeight??0;t>0&&r.reportHeight(e,t)}r.markSettled(e)}))}())}})}function Se(e=!1){if(re||!te||ie)return;if(f.value)return void(L=!0);let n=Math.max(120,Number(t.progressiveIntervalMs)||0),r=Date.now()-ae;if(!e&&r<n)return L=!0,void(oe==null&&(oe=window.setTimeout(()=>{oe=null,L&&(L=!1,Se(!0))},Math.max(0,n-r))));re=!0;let i=()=>{re=!1,ae=Date.now(),xe()};typeof window<`u`&&typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(i):setTimeout(i,0)}function Ce(){if(m.value)try{let e=new Blob([m.value],{type:`image/svg+xml;charset=utf-8`}),t=URL.createObjectURL(e);if(typeof document<`u`){let 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)}}function we(){let e=_.value;if(!e)return;let t=e.getBoundingClientRect().height;t>0&&(b.value=t)}return p(()=>[t.node.code,t.loading,t.isDark],()=>{Se()},{immediate:!0}),p(()=>t.loading,(e,t)=>{t&&!e&&Se(!0)}),p(()=>w.value,e=>{e&&Se(!0)}),p(()=>[j.value,m.value,T.value],()=>{h(()=>{we()})}),l(()=>{h(()=>{we()}),typeof ResizeObserver<`u`&&(se=new ResizeObserver(()=>{we()}),_.value&&se.observe(_.value))}),v(()=>{var e;ie=!0,function(){let e=le;r&&e&&(le=``,r.markSettled(e))}(),ce=``,(e=C.value)==null||e.destroy(),C.value=null,oe!=null&&(clearTimeout(oe),oe=null),se?.disconnect(),se=null}),(e,n)=>(y(),U(`div`,{ref_key:`viewportTarget`,ref:x,class:z([`d2-block-container rounded-lg border overflow-hidden`,{dark:t.isDark}]),"data-markstream-d2":`1`,"data-markstream-mode":j.value?`fallback`:`preview`},[t.showHeader?(y(),U(`div`,YI,[n[16]||=F(`div`,{class:`flex items-center gap-x-2`},[F(`span`,{class:`d2-label font-medium font-mono`},`D2`)],-1),F(`div`,XI,[t.showModeToggle?(y(),U(`div`,ZI,[F(`button`,{type:`button`,class:z([`mode-btn px-2 py-0.5 rounded`,s.value?``:`is-active`]),onClick:n[0]||=e=>_e(`preview`),onMouseenter:n[1]||=e=>pe(e,B(i)(`common.preview`)||`Preview`),onFocus:n[2]||=e=>pe(e,B(i)(`common.preview`)||`Preview`),onMouseleave:me,onBlur:me},O(B(i)(`common.preview`)||`Preview`),35),F(`button`,{type:`button`,class:z([`mode-btn px-2 py-0.5 rounded`,s.value?`is-active`:``]),onClick:n[3]||=e=>_e(`source`),onMouseenter:n[4]||=e=>pe(e,B(i)(`common.source`)||`Source`),onFocus:n[5]||=e=>pe(e,B(i)(`common.source`)||`Source`),onMouseleave:me,onBlur:me},O(B(i)(`common.source`)||`Source`),35)])):D(``,!0),t.showCopyButton?(y(),U(`button`,{key:1,type:`button`,class:`d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md`,"aria-label":a.value?B(i)(`common.copied`)||`Copied`:B(i)(`common.copy`)||`Copy`,onClick:he,onMouseenter:n[6]||=e=>H(e),onFocus:n[7]||=e=>H(e),onMouseleave:me,onBlur:me},[a.value?(y(),U(`svg`,eL,[...n[13]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M20 6L9 17l-5-5`},null,-1)]])):(y(),U(`svg`,$I,[...n[12]||=[F(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[F(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),F(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})],-1)]]))],40,QI)):D(``,!0),t.showExportButton&&m.value?(y(),U(`button`,{key:2,type:`button`,class:`d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md`,"aria-label":B(i)(`common.export`)||`Export`,onClick:Ce,onMouseenter:n[8]||=e=>pe(e,B(i)(`common.export`)||`Export`),onFocus:n[9]||=e=>pe(e,B(i)(`common.export`)||`Export`),onMouseleave:me,onBlur:me},[...n[14]||=[F(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 3v12m0-12l-4 4m4-4l4 4M4 14v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4`})],-1)]],40,tL)):D(``,!0),t.showCollapseButton?(y(),U(`button`,{key:3,type:`button`,class:`d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md`,"aria-pressed":o.value,onClick:ge,onMouseenter:n[10]||=e=>pe(e,o.value?B(i)(`common.expand`)||`Expand`:B(i)(`common.collapse`)||`Collapse`),onFocus:n[11]||=e=>pe(e,o.value?B(i)(`common.expand`)||`Expand`:B(i)(`common.collapse`)||`Collapse`),onMouseleave:me,onBlur:me},[(y(),U(`svg`,{style:ne({rotate:o.value?`0deg`:`90deg`}),xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,class:`action-icon`},[...n[15]||=[F(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m9 18l6-6l-6-6`},null,-1)]],4))],40,nL)):D(``,!0)])])):D(``,!0),E(F(`div`,{ref_key:`bodyRef`,ref:_,class:`d2-block-body`,style:ne(N.value)},[t.loading&&!M.value?(y(),U(`div`,rL,[F(`pre`,iL,[F(`code`,null,O(T.value),1)]),d.value?(y(),U(`p`,aL,O(d.value),1)):D(``,!0)])):(y(),U(`div`,oL,[j.value?(y(),U(`div`,sL,[F(`pre`,cL,[F(`code`,null,O(T.value),1)]),d.value?(y(),U(`p`,lL,O(d.value),1)):D(``,!0)])):(y(),U(`div`,{key:1,class:`d2-render`,style:ne(ee.value)},[F(`div`,{class:`d2-svg`,innerHTML:m.value},null,8,uL),d.value?(y(),U(`p`,dL,O(d.value),1)):D(``,!0)],4))]))],4),[[fe,!o.value]])],10,JI))}}),[[`__scopeId`,`data-v-1b958e6b`]]);fL.install=e=>{e.component(fL.__name,fL)};var pL=n({default:()=>EL}),mL=Object.defineProperty,hL=Object.getOwnPropertySymbols,gL=Object.prototype.hasOwnProperty,_L=Object.prototype.propertyIsEnumerable,vL=(e,t,n)=>t in e?mL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yL=(e,t)=>{for(var n in t||={})gL.call(t,n)&&vL(e,n,t[n]);if(hL)for(var n of hL(t))_L.call(t,n)&&vL(e,n,t[n]);return e},bL=(e,t,n)=>new Promise((r,i)=>{var a=e=>{try{s(n.next(e))}catch(e){i(e)}},o=e=>{try{s(n.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,o);s((n=n.apply(e,t)).next())}),xL={class:`code-header-main`},SL=[`innerHTML`],CL={class:`code-header-copy`},wL={class:`code-header-title`},TL=[`innerHTML`],EL=eO(x({__name:`MarkdownCodeBlockNode`,props:{node:{},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:`vitesse-dark`},lightTheme:{default:`vitesse-light`},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},autoScrollOnUpdate:{type:Boolean,default:!0},autoScrollInitial:{type:Boolean,default:!0},estimatedHeightPx:{},estimatedContentHeightPx:{},themes:{},langs:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0}},emits:[`previewCode`,`copy`],setup(e,{emit:t}){let n=e,r=t,{t:i}=UO(),a=V(Ve(n.node.language,n.node.code,He())),s=V(!1),c=V(!1),u=V(!1),d=V(null),f=V(null),m=V(null),g=V(``),_=V(!1),b,x=``,S=0,w=null,E=fA(),k=M(null),j=V(typeof window>`u`);typeof window<`u`&&p(()=>d.value,(e,t,n)=>{var r;if((r=k.value)==null||r.destroy(),k.value=null,!e)return void(j.value=!1);let i=!0,a=E(e,{rootMargin:`400px`});k.value=a,j.value=a.isVisible.value,a.whenVisible.then(()=>{i&&k.value===a&&(j.value=!0)}).catch(()=>{}),n(()=>{i=!1,a.destroy(),k.value===a&&(k.value=null)})},{immediate:!0});let N=V(!1!==n.autoScrollInitial),ee=V(0),te=R(()=>!1!==n.autoScrollOnUpdate),P=V(14),re=V(P.value),ie=R(()=>{let e=P.value,t=re.value;return typeof e==`number`&&Number.isFinite(e)&&e>0&&typeof t==`number`&&Number.isFinite(t)&&t>0}),ae=R(()=>{let e=a.value.trim().toLowerCase();return jE[e]||e.charAt(0).toUpperCase()+e.slice(1)}),I=R(()=>(EE.value,AE(a.value.trim().toLowerCase().split(`:`)[0]))),oe=R(()=>{let e=a.value.trim().toLowerCase();return n.isShowPreview&&(e===`html`||e===`svg`)}),L=R(()=>{let e={},t=e=>{if(e!=null)return typeof e==`number`?`${e}px`:String(e)},r=t(n.minWidth),i=t(n.maxWidth);return r&&(e.minWidth=r),i&&(e.maxWidth=i),e}),se=R(()=>{let e=n.estimatedContentHeightPx;return typeof e==`number`&&Number.isFinite(e)&&e>0?Math.round(e):null}),ce=R(()=>se.value!=null&&!_.value),le=R(()=>yL({fontSize:`${re.value}px`},ce.value?{minHeight:`${se.value}px`}:{})),ue=R(()=>!1!==n.showTooltips);function B(e,t){let n=String(e??``);return t?n:n.replace(/\r\n$|\n$|\r$/,``)}let de=R(()=>B(n.node.code,!0===n.node.loading));function fe(){return n.isDark?n.darkTheme:n.lightTheme}function pe(e){if(w=null,ve(),!e)return H(),x=``,g.value=``,void(_.value=!1);var t;g.value=`<pre class="shiki shiki-fallback"><code>${t=e,t.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}</code></pre>`,_.value=!1}function me(){g.value=``,_.value=!0}function H(){m.value&&(m.value.innerHTML=``)}function he(){let e=m.value;return!!e&&(e.childNodes.length>0||!!e.textContent?.trim().length)}function ge(e,t,n){return`${e??``}\0${t}\0${n}`}function _e(e){x=e,me()}function ve(e){e?.disconnect(),e&&b!==e||(b=void 0)}function ye(e,t){ve();let n=m.value;if(!n||typeof MutationObserver>`u`)return;w=null;let r=new MutationObserver(()=>{S+=1;let n=w;if(n)return Ie(e)?void(S!==t&&he()&&(w=null,ve(r),_e(n))):(w=null,void ve(r))});b=r,r.observe(n,{childList:!0,subtree:!0,characterData:!0,attributes:!0})}function be(e,t,n,r){return bL(this,null,function*(){if(w=n,yield h(),!Ie(e))return;let i=he(),a=S!==t,o=r!==void 0&&m.value?.innerHTML!==r;i&&(!x||a||o||x===n)&&(w=null,ve(),_e(n))})}let xe,Se,Ce,we=null,Te=null,G=``,Ee=0,De=0,K=!1,Oe=new Set,q=new Set,ke=new Set,Ae=mM(),je=!1,Me=null,Ne=!1,Pe=!1;function Fe(){return De+=1,De}function Ie(e=De){return!K&&e===De}function Le(){let e=xe;xe=void 0,we=null,x=``,w=null,q.clear();try{e?.dispose()}catch(e){Ae&&console.warn(`[MarkdownCodeBlockNode] Failed to dispose Shiki renderer.`,e)}finally{H(),_.value=!1}}let Re=R(()=>nE(n.themes,n.langs));function ze(){return{hasRegisterHighlight:!!Ce,hasCreateRenderer:!!Se}}function Be(e,t){let n=ze(),r=rE(e,t,n);return r.rendererOptions.langs?.length&&ke.has(r.key)?rE(e,void 0,n):r}function Ve(e,t,n){return n&&!String(t??``)?`plain`:OE(String(e??``))}function He(){return typeof n.node.loading==`boolean`?n.node.loading:!0===n.loading}function Ue(e,t){return bL(this,arguments,function*(e,t,n=De){if(!xe||!Ie(n))return;let r=function(e){return ZT(e)||`plaintext`}(function(e,t,n){return n&&!String(t??``)?`plaintext`:String(e??``)}(t,e,He())),i=t=>bL(null,null,function*(){if(xe&&Ie(n)){r!==`plaintext`&&(t&&q.add(r),t&&Ae&&!Oe.has(r)&&(Oe.add(r),console.warn(`[MarkdownCodeBlockNode] Failed to render language "${r}", retrying as plaintext.`,t)));try{return yield xe.updateCode(e,`plaintext`),Ie(n)?`plaintext`:void 0}catch(e){if(!Ie(n))return;Ae&&console.warn(`[MarkdownCodeBlockNode] Failed to render code block even as plaintext.`,e);return}}});if(r!==`plaintext`&&q.has(r))return i();try{return yield xe.updateCode(e,r),Ie(n)?r:void 0}catch(e){return Ie(n)?r===`plaintext`?void(Ae&&console.warn(`[MarkdownCodeBlockNode] Failed to render code block even as plaintext.`,e)):i(e):void 0}})}function We(e,t){return bL(this,null,function*(){if(!Ce)return`ready`;if(G!==t)return`stale`;if(Te===t)return`ready`;let n=++Ee;try{yield iE(Ce,e,t)}catch{return n!==Ee||G!==t?`stale`:`failed`}return n!==Ee||G!==t?`stale`:(Te=t,`ready`)})}function Ge(e,t){return bL(this,null,function*(){let n=yield We(e,t);return n===`failed`?G===t?We(e,t):`stale`:n})}function Ke(){return bL(this,arguments,function*(e=Fe()){try{yield function(e){return bL(this,null,function*(){var t;if(!Ie(e))return;let r=de.value;if(!j.value)return void pe(r);if(yield function(){return bL(this,null,function*(){if(!Se&&!Ne)return Me||(Me=bL(null,null,function*(){try{let e=yield W(()=>import(`./__vite-optional-peer-dep_stream-markdown_markstream-vue-Dhgp-lRL.js`),[]),t=e.createShikiStreamRenderer;if(typeof t!=`function`)throw TypeError(`stream-markdown.createShikiStreamRenderer is not available`);Se=t;let n=e.registerHighlight;Ce=typeof n==`function`?n:void 0,Ne=!1,Pe=!1}catch(e){Ne=!0,Ae&&!Pe&&(Pe=!0,console.warn(`[MarkdownCodeBlockNode] stream-markdown not available:`,e))}finally{Me=null}}),Me)})}(),!Ie(e))return;if(!f.value||!m.value)return void pe(r);let i=Be(n.themes,n.langs);i.ignoredLangs&&Ae&&!je&&(je=!0,console.warn("[MarkdownCodeBlockNode] `langs` requires stream-markdown >=0.0.15 with registerHighlight(); ignoring `langs` and using stream-markdown default language preload."));let a=i.rendererOptions,o=i.key;G=o;let s=!!(xe&&we!==o);s&&pe(r);let c=yield Ge(i.registerOptions,o);if(c===`failed`&&(t=a.langs)!=null&&t.length&&(ke.add(o),Ae&&console.warn("[MarkdownCodeBlockNode] Failed to register configured Shiki languages; retrying without `langs`.",{langs:a.langs}),i=rE(n.themes,void 0,ze()),a=i.rendererOptions,o=i.key,G=o,c=yield Ge(i.registerOptions,o)),!Ie(e)||c===`stale`)return;if(s=!!(xe&&we!==o),c===`failed`)return void(s&&xe&&he()?me():pe(r));if(s&&Le(),!xe&&Se&&(xe=Se(m.value,yL({theme:fe()},a)),we=o,_.value=!0),!xe||!1===n.stream&&n.loading)return void pe(r);pe(r);let l=S,u=m.value?.innerHTML;ye(e,l);let d=yield Ue(r,n.node.language,e);Ie(e)&&(d?yield be(e,l,ge(o,d,r),u):(w=null,ve()))})}(e)}catch(t){if(!Ie(e))return;Ae&&console.warn(`[MarkdownCodeBlockNode] Failed to initialize Shiki renderer.`,t),pe(de.value)}})}function qe(){let e=f.value;if(!e||c.value||!te.value)return;let t=e.scrollTop;t<ee.value?N.value=!1:function(e,t=50){return e.scrollHeight-e.scrollTop-e.clientHeight<=t}(e)&&(N.value=!0),ee.value=t}function Je(){return bL(this,null,function*(){try{typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`&&(yield navigator.clipboard.writeText(n.node.code)),s.value=!0,r(`copy`,n.node.code),setTimeout(()=>{s.value=!1},1e3)}catch(e){console.error(`Copy failed:`,e)}})}function Ye(e){if(c.value=!c.value,e&&ue.value){let t=function(e){let t=e.currentTarget||e.target;return!t||t.disabled?null:t}(e);t&&RO(t,c.value?i(`common.collapse`)||`Collapse`:i(`common.expand`)||`Expand`,`top`,!1,void 0,n.isDark)}let t=f.value;t&&(c.value?(t.style.maxHeight=`none`,t.style[`overflow-y`]=`visible`,t.style[`overflow-x`]=`auto`):(t.style.maxHeight=``,t.style.overflow=`auto`,te.value&&(N.value=!0,h(()=>{t.scrollHeight>t.clientHeight&&(t.scrollTop=t.scrollHeight)}))))}function Xe(){u.value=!u.value}function J(){re.value=Math.min(36,re.value+1)}function Ze(){re.value=Math.max(10,re.value-1)}function Qe(){re.value=P.value}function $e(){if(!oe.value)return;let e=OE(a.value||n.node.language).toLowerCase(),t=e===`html`?`HTML Preview`:`SVG Preview`;r(`previewCode`,{type:e===`html`?`text/html`:`image/svg+xml`,content:n.node.code,title:t})}return pe(de.value),l(()=>{j.value?Ke():pe(de.value)}),v(()=>{var e;K=!0,De+=1,(e=k.value)==null||e.destroy(),k.value=null,b?.disconnect(),b=void 0,w=null,Le()}),p(Re,()=>bL(null,null,function*(){j.value&&(yield Ke())})),p(()=>n.loading,e=>{e||(j.value?Ke():pe(de.value))}),p(()=>j.value,e=>{e&&Ke()}),p(ue,e=>{e||zO()}),p(()=>n.autoScrollInitial,e=>{N.value=!1!==e}),p(()=>[n.node.code,n.node.language,n.node.loading,n.loading],e=>bL(null,[e],function*([e,t,r,i]){let o=Fe(),s=typeof r==`boolean`?r:!0===i,c=B(e,s),l=Ve(t,e,s);if(l!==a.value&&(a.value=l),!j.value||!f.value||!m.value)return void pe(c);if(!e)return void pe(``);if(!xe||function(){let e=Be(n.themes,n.langs);return!!(xe&&we!==e.key)}())return pe(c),void(yield Ke(o));if(!Ie(o)||!xe||!1===n.stream&&n.loading)return;pe(c);let u=S,d=m.value?.innerHTML;ye(o,u);let p=yield Ue(c,t,o);Ie(o)&&(p?yield be(o,u,ge(we??Re.value,p,c),d):(w=null,ve()))})),p(()=>[n.darkTheme,n.lightTheme,n.isDark],()=>bL(null,null,function*(){j.value&&f.value&&m.value&&(xe||(yield Ke()),xe?.setTheme(fe()))})),p(()=>n.node.code,()=>bL(null,null,function*(){if(c.value||!te.value||!N.value)return;yield h();let e=f.value;e&&e.scrollHeight>e.clientHeight&&(e.scrollTop=e.scrollHeight)})),(t,r)=>(y(),U(`div`,{ref_key:`container`,ref:d,style:ne(L.value),class:z([`code-block-container rounded-lg border overflow-hidden`,{dark:n.isDark}])},[o(mP,{"show-header":n.showHeader,"show-collapse-button":n.showCollapseButton,"show-font-size-buttons":n.showFontSizeButtons,"enable-font-size-control":n.enableFontSizeControl,"show-copy-button":n.showCopyButton,"show-expand-button":n.showExpandButton,"show-preview-button":n.showPreviewButton,"show-tooltips":n.showTooltips,"is-dark":n.isDark,loading:n.loading,stream:n.stream,"is-collapsed":u.value,"is-expanded":c.value,"copy-text":s.value,"is-previewable":oe.value,"code-font-size":re.value,"code-font-min":10,"code-font-max":36,"default-code-font-size":P.value,"font-baseline-ready":ie.value,onToggleCollapse:Xe,onDecreaseFont:Ze,onResetFont:Qe,onIncreaseFont:J,onCopy:Je,onToggleExpand:Ye,onPreview:$e},A({"header-left":T(()=>[C(t.$slots,`header-left`,{},()=>[F(`div`,xL,[F(`span`,{class:`icon-slot h-4 w-4 flex-shrink-0`,innerHTML:I.value},null,8,SL),F(`div`,CL,[F(`div`,wL,O(ae.value),1)])])],!0)]),loading:T(()=>[C(t.$slots,`loading`,{loading:e.loading,stream:e.stream},()=>[r[0]||=F(`div`,{class:`loading-skeleton`},[F(`div`,{class:`skeleton-line`}),F(`div`,{class:`skeleton-line`}),F(`div`,{class:`skeleton-line short`})],-1)],!0)]),default:T(()=>[F(`div`,{ref_key:`codeBlockContent`,ref:f,class:`code-block-content`,style:ne(le.value),onScroll:qe},[F(`div`,{ref_key:`rendererTarget`,ref:m,class:`code-block-render`},null,512),!_.value&&g.value?(y(),U(`div`,{key:0,class:`code-fallback-plain`,innerHTML:g.value},null,8,TL)):D(``,!0)],36)]),_:2},[t.$slots[`header-right`]?{name:`header-right`,fn:T(()=>[C(t.$slots,`header-right`,{},void 0,!0)]),key:`0`}:void 0]),1032,[`show-header`,`show-collapse-button`,`show-font-size-buttons`,`enable-font-size-control`,`show-copy-button`,`show-expand-button`,`show-preview-button`,`show-tooltips`,`is-dark`,`loading`,`stream`,`is-collapsed`,`is-expanded`,`copy-text`,`is-previewable`,`code-font-size`,`default-code-font-size`,`font-baseline-ready`])],6))}}),[[`__scopeId`,`data-v-2c616963`]]);EL.install=e=>{e.component(EL.__name,EL)};var DL=n({default:()=>VL}),OL=Object.defineProperty,kL=Object.defineProperties,AL=Object.getOwnPropertyDescriptors,jL=Object.getOwnPropertySymbols,ML=Object.prototype.hasOwnProperty,NL=Object.prototype.propertyIsEnumerable,PL=(e,t,n)=>t in e?OL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,FL=(e,t)=>{for(var n in t||={})ML.call(t,n)&&PL(e,n,t[n]);if(jL)for(var n of jL(t))NL.call(t,n)&&PL(e,n,t[n]);return e},IL=(e,t)=>kL(e,AL(t)),LL=(e,t,n)=>PL(e,typeof t==`symbol`?t:t+``,n),RL=[`data-markstream-item-key`,`data-markstream-item-kind`],zL={key:0,class:`markstream-virtual-timeline__status`},BL=eO(x(IL(FL({},{name:`MarkstreamVirtualTimeline`}),{__name:`MarkstreamVirtualTimeline`,props:{items:{},threadKey:{},layoutRevision:{},getKey:{},getKind:{},getContent:{},getFinal:{},getRevision:{},estimateItemHeight:{},overscan:{default:4},overscanPx:{default:1200},stickToBottom:{type:[Boolean,String],default:`auto`},measurementKey:{},markdownMode:{default:`docs`},markdownCodeRenderer:{},initialThreadState:{},markdownFade:{type:Boolean,default:!1},restoreMaxLoadingMs:{type:[Number,Boolean],default:!1},debug:{type:Boolean}},emits:[`height-change`,`virtual-state-change`,`range-change`,`thread-state-change`],setup(e,{expose:t,emit:n}){let r=e,i=n;function o(e){i(`thread-state-change`,e)}let s=new Map;function c(e){!0===r.debug&&s.set(e,(s.get(e)??0)+1)}let u=V(null),d=V(0),f=V(0),g=V(0),_=V(!0),x=V(!0),w=k(new Map),T=new Map,E=new Map,A=new Map,j=k(new Map),N=k(new Map),ee=new Map,te=new Map,re=new Map,ie=new Map,I=V(!1),oe=V(!0);ve(`markstreamHostScrollManaged`,V(!0));let L=[0,80,180,360,640],se,ce,le=null,ue=0,de=null,fe=[],pe=null,me=null,he=-1,ge=0,_e=null,W=!1,ye=!1,be=null,xe=0,Se=0,Ce={top:0,bottom:0},we=!1,Te=R(()=>r.threadKey==null?void 0:String(r.threadKey)),G=Te.value;function Ee(e){return e===`chat`||e===`minimal`||e===`docs`?e:`docs`}let De=R(()=>Ee(r.markdownMode)),K=R(()=>function(e,t=Ee(r.markdownMode)){return e===`pre`||e===`shiki`||e===`monaco`?e:t===`docs`?`monaco`:`pre`}(r.markdownCodeRenderer,De.value)),Oe=R(()=>[r.measurementKey==null?``:String(r.measurementKey),g.value].join(`:`)),q=R(()=>`${Oe.value}${De.value}${K.value}`);class ke{constructor(e){LL(this,`tree`),LL(this,`total`),this.tree=Array.from({length:e.length+1},()=>0),this.total=0,e.forEach((e,t)=>this.add(t,e))}add(e,t){if(Number.isFinite(t)&&t!==0){this.total+=t;for(let n=e+1;n<this.tree.length;n+=n&-n)this.tree[n]+=t}}prefixSum(e){let t=Math.max(0,Math.min(e,this.tree.length-1)),n=0;for(;t>0;)n+=this.tree[t],t-=t&-t;return n}lowerBound(e,t=`gte`){let n=this.tree.length-1;if(n<=0||e<=0)return 0;if(e>=this.total)return n-1;let r=0,i=1;for(;i<<1<this.tree.length;)i<<=1;let a=0;for(;i>0;i>>=1){let n=r+i;if(n<this.tree.length){let i=a+this.tree[n];(t===`gt`?i<=e:i<e)&&(r=n,a=i)}}return Math.min(r,n-1)}}let Ae=M([]),je=new Map,Me=M(new ke([])),Ne=V(0),Pe=[],Fe=R(()=>(Ne.value,{records:Ae.value,totalHeight:Me.value.total}));function Ie(){let e=[],t=[],n=function(){return Te.value??`timeline`}();je.clear();for(let i=0;i<r.items.length;i++){let a=r.items[i],o=We(a,i),s={item:a,index:i,key:o,kind:HN(a,i,r),markdown:KN(a,i,r)},c=Y(s);c??=Pe[i]??qN(a,i,r);let l=IL(FL({},s),{renderKey:`${n}:${o}`,offset:0,size:c,component:a?.component});e.push(l),t.push(c),je.has(o)||je.set(o,l)}Ae.value=e,Me.value=new ke(t),Pe=[],Ne.value+=1}function Le(e){return Ne.value,Me.value.prefixSum(e.index)}function Re(e){return IL(FL({},e),{offset:Le(e)})}function ze(e,t){let n=je.get(e);if(!n)return;let r=Math.ceil(t),i=r-n.size;i!==0&&(n.size=r,Me.value.add(n.index,i),Ne.value+=1)}function Be(e,t=`gte`){return Ne.value,Me.value.lowerBound(e,t)}let Ve=R(()=>Math.max(0,r.overscan??4)),He=R(()=>{let e=Math.max(0,r.overscanPx??1200);return oe.value?e:Math.min(e,160)}),Ue=R(()=>{let e=Fe.value.records;if(e.length===0)return{start:0,end:0,records:[],topSpacerHeight:0,bottomSpacerHeight:0};let t=Ve.value,n=He.value,r=X(),i=r+Math.max(1,f.value),a=Be(Math.max(0,r-n),`gt`),o=Be(Math.min(Fe.value.totalHeight,i+n))+1;a=Math.max(0,a-t),o=Math.min(e.length,Math.max(o+t,a+1));let s=e.slice(a,o).map(Re),c=s[0],l=s[s.length-1],u=c?.offset??0,d=l?.offset??0;return{start:a,end:o,records:s,topSpacerHeight:u,bottomSpacerHeight:Math.max(0,Fe.value.totalHeight-(d+(l?.size??0)))}});function We(e,t){return VN(e,t,r)}let Ge=new WeakMap,Ke=1;function qe(e){if(typeof e!=`object`&&typeof e!=`function`||e===null)return String(e??``);let t=e,n=Ge.get(t);return n||(n=Ke++,Ge.set(t,n)),String(n)}function Je(e,t,n){if(n)return``;let i=typeof e?.text==`string`?e.text:typeof e?.message==`string`?e.message:typeof e?.label==`string`?e.label:String(UN(e,t,r)??``);return i?`${i.length}:${function(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}(i)}`:``}function Ye(e,t){if(typeof r.estimateItemHeight!=`function`)return``;let n=r.estimateItemHeight(e,t);if(!Number.isFinite(n)||n<=0)return``;let i=Math.ceil(n);return Pe[t]=i,String(i)}function Xe(e){return r.items[e.index]??e.item}function J(e){return e.item}function Ze(e){return Xe(e)?.component??e.component}function Qe(e,t=Te.value){let n=GN(J(e),e.index,r);return[t??`timeline`,e.key,n==null?``:String(n)].join(`:`)}function $e(e,t=Te.value){if(e.markdown)return Qe(e,t);let n=GN(J(e),e.index,r);return[t??`timeline`,e.key,n==null?``:String(n)].join(`:`)}function et(e){return{sourceKey:$e(e),measurementKey:e.markdown?q.value:Oe.value,widthBucket:g.value}}function tt(e,t){return(e?.sourceKey??``)===(t?.sourceKey??``)&&(e?.measurementKey??``)===(t?.measurementKey??``)&&(e?.widthBucket??0)===(t?.widthBucket??0)}function nt(e,t,n=Te.value){return!(!e||!t)&&t.sourceKey===$e(e,n)&&t.measurementKey===(e.markdown?q.value:Oe.value)&&(t.widthBucket??0)===g.value}function Y(e,t=Te.value){let n=w.get(e.key);return nt(e,T.get(e.key),t)&&Number.isFinite(n)&&n>0?n:null}function rt(e){return Fe.value,je.get(e)}function it(e,t){return!!(e&&e.markdown&&t)&&t.sessionKey===Qe(e)&&(t.threadKey??``)===(Te.value??``)&&!!function(e){let t=q.value,n=e??``;return n===t||n.startsWith(`${t}\0`)}(t.measurementKey)}function at(e,t){return it(e,t)}function ot(e,t,n){!Number.isFinite(t)||t<=0||(N.set(e,Math.ceil(t)),ee.set(e,n))}function st(e,t=j.get(e)){let n=function(e,t=j.get(e)){if(!at(rt(e),t))return 0;let n=Number(t?.metrics?.totalHeight);return Number.isFinite(n)&&n>0?Math.ceil(n):0}(e,t);return n>0&&ot(e,n,t),n}function ct(e){return e===ue&&ge===e&&!oe.value}function lt(){if(de!=null&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(de),de=null,pe!=null&&typeof window<`u`&&window.clearTimeout(pe),pe=null,typeof window<`u`)for(let e of fe)window.clearTimeout(e);fe=[]}function ut(){return Math.max(0,f.value||u.value?.clientHeight||0)}function dt(){let e=u.value;if(!e||typeof getComputedStyle!=`function`)return void(Ce={top:0,bottom:0});let t=getComputedStyle(e);Ce={top:Number.parseFloat(t.paddingTop)||0,bottom:Number.parseFloat(t.paddingBottom)||0}}function ft(){return Ce.top}function pt(){let e=Ce;return Math.max(0,Fe.value.totalHeight+e.top+e.bottom)}function mt(){return Math.max(pt(),u.value?.scrollHeight??0)}function X(){return Math.max(0,d.value-ft())}function Z(){return Math.max(0,mt()-ut())}function ht(e){let t=Number(e);return Number.isFinite(t)?Math.max(0,Math.min(t,Z())):0}function gt(){return Math.max(0,Z()-d.value)}function _t(){let e=gt();x.value=e<=2,!0===r.stickToBottom?_.value=!0:!1===r.stickToBottom?_.value=!1:_.value=e<=48}function vt(){let e=u.value?.clientWidth??0;g.value=Number.isFinite(e)&&e>0?32*Math.round(e/32):0}function Q(e={}){let t=u.value;t&&(d.value=Math.max(0,t.scrollTop||0),f.value=t.clientHeight||0),vt(),_t(),(!0===e.remember||!1!==e.remember&&!I.value)&&Gt()}function yt(e,t={}){let n=ht(e),r=u.value;d.value=n,r&&(f.value=r.clientHeight||f.value||0,!1!==t.writeDom&&Math.abs((r.scrollTop||0)-n)>.5&&(r.scrollTop=n)),vt(),!1!==t.updatePinned&&_t(),(!0===t.remember||!1!==t.remember&&!I.value)&&Gt()}function bt(){if(!oe.value){let e=u.value,t=_e;e&&t!=null&&Math.abs((e.scrollTop||0)-t)>.5&&(e.scrollTop=t),Xt(ge,ce);return}Q()}function xt(e){yt(e,{writeDom:!0,remember:!0})}function St(){xt(Z())}function Ct(e,t){let n=E.get(e);if(!Number.isFinite(n)||n==null||n<=0)return 0;let r=A.get(e);return t&&r&&!wt(r,t)?0:Math.ceil(n)}function wt(e,t){return e.sourceKey===t.sourceKey&&((t.widthBucket??0)===0||(e.widthBucket??0)===0||(t.widthBucket??0)===(e.widthBucket??0))&&(Tt(t.measurementKey)||Tt(e.measurementKey)||t.measurementKey===e.measurementKey)}function Tt(e){return e===`:0`||!0===e?.startsWith(`:0`)}function Et(e){E.delete(e),A.delete(e)}function Dt(e,t,n,i={}){if(!Number.isFinite(t)||t<=0)return;let a=w.get(e),o=n&&!tt(T.get(e),n);(function(e,t){if(!t)return;let n=A.get(e);n&&!wt(n,t)&&(E.delete(e),A.delete(e))})(e,n);let s=Ct(e,n),c=s>0?s:Math.ceil(t);if(a!=null&&Math.abs(a-c)<=1&&!o)return;if(!1===i.updateLayout)return n&&T.set(e,n),w.set(e,c),void qt(i.rememberThreadKey);if(I.value)return n&&T.set(e,n),w.set(e,c),ze(e,c),void function(e=ge,t=ce){t&&h(()=>{Xt(e,t),de==null&&typeof requestAnimationFrame==`function`&&(de=requestAnimationFrame(()=>{de=null,Xt(e,t)}))})}();let l=(u=Ut(),d=gt(),!0===r.stickToBottom?{type:`bottom`,distanceFromBottomPx:0}:r.stickToBottom===`auto`&&_.value?{type:`bottom`,distanceFromBottomPx:x.value?0:Math.max(0,d)}:u);var u,d;n&&T.set(e,n),w.set(e,c),ze(e,c),qt(i.rememberThreadKey),function(e){if(!Ot.scheduled)return Ot.anchor=e,Ot.scheduled=!0,void(Ot.raf=Mt(Pt));!Ot.anchor&&e&&(Ot.anchor=e)}(l)}p([()=>function(){let e=r.layoutRevision;return e==null?r.items.map((e,t)=>{let n=We(e,t),i=KN(e,t,r);return[n,HN(e,t,r),+!!i,GN(e,t,r)??``,Ye(e,t),Je(e,t,i),(a=e?.component,a?typeof a==`string`?`s:${a}`:`o:${qe(a)}`:``)].join(``);var a}).join(`\0`):[`explicit`,String(e),r.items.length].join(``)}(),Oe,q,Te,()=>qe(r.estimateItemHeight),()=>qe(r.getKey),()=>qe(r.getKind),()=>qe(r.getContent),()=>qe(r.getFinal),()=>qe(r.getRevision)],()=>Ie(),{immediate:!0,flush:`sync`});let Ot={scheduled:!1,raf:null,anchor:void 0},kt=new Map,At=!1,jt=null;function Mt(e){return typeof requestAnimationFrame==`function`?requestAnimationFrame(e):(h(e),null)}function Nt(e){e!=null&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(e)}function Pt(){if(!Ot.scheduled)return;Ot.scheduled=!1,Ot.raf=null;let e=Ot.anchor;Ot.anchor=void 0,e&&Yt(e),Q({remember:!1})}function Ft(){if(!At)return;At=!1,jt=null;let e=Array.from(kt.entries());kt.clear();for(let[t,n]of e){if(N.get(t)!==n.logicalHeight)continue;let e=je.get(t);if(!e)continue;let r=(n.threadKey??``)===(Te.value??``);Rt(e,{allowMarkdownShrink:n.allowMarkdownShrink,markdownLogicalHeight:n.logicalHeight,rememberThreadKey:n.threadKey,source:n.itemSizeSource,updateLayout:r})}Pt()}function It(){Ft(),Pt()}function Lt(e){var t;(t=re.get(e))==null||t.disconnect(),re.delete(e),te.delete(e)}function Rt(e,t={}){var n;let i=(a=e.key,zN(te.get(a),c));var a;let o=t.source??et(e),l=!1,u=()=>{l||(l=!0,function(e,t){let n=function(){if(!0!==r.debug||s.size===0)return null;let e=0;for(let t of s.values())e+=t;let t={total:e,byLabel:Object.fromEntries(Array.from(s.entries()).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])))};return s.clear(),t}();n&&console.info(`[markstream-vue][timeline][perf] layout-reads`,{label:e,itemKey:t,layoutReads:n})}(`reconcileRecordSize`,e.key))};if(!e.markdown)return i>0&&Dt(e.key,i,o,t),void u();let d=tt(T.get(e.key),o)&&(n=w.get(e.key))!=null?n:0,f=t.markdownLogicalHeight??function(e){return it(rt(e),ee.get(e))?N.get(e)??0:st(e)}(e.key),p=function(e,t){return BN(te.get(e),c,t)}(e.key,i);if(f>0){let n=Math.max(i,f+p);(!t.allowMarkdownShrink||I.value)&&d>0&&(n=Math.max(n,d));let r=Ct(e.key,o);(r>0&&f>r+1&&!I.value||t.allowMarkdownShrink&&!I.value)&&Et(e.key),n>0&&Dt(e.key,n,o,t),u();return}String(UN(Xe(e),e.index,r)).trim()?d>0?(i>d+1&&Dt(e.key,i,o,t),u()):(i>0&&Dt(e.key,i,o,t),u()):(i>0&&(Et(e.key),Dt(e.key,i,o,t)),u())}function zt(e){return t=>{(function(e,t){let n=function(e){let t=e&&`$el`in e?e.$el:e;return t instanceof HTMLElement?t:null}(t),r=te.get(e.key);if(!n)return void Lt(e.key);if(r===n)return void Rt(e);if(Lt(e.key),te.set(e.key,n),Rt(e),typeof ResizeObserver>`u`)return;let i=new ResizeObserver(()=>{Rt(e)});i.observe(n),re.set(e.key,i)})(e,t)}}function Bt(e){let t=Xe(e),n=WN(t,e.index,r),a=j.get(e.key),o=De.value,s=K.value,c={enabled:!0,sessionKey:Qe(e),threadKey:Te.value,scrollRoot:()=>u.value,restoreState:at(e,a)?a:null,restoreAnchor:!1,measurementKey:q.value,settleMode:`manual`,settledToken:n,emitIntervalMs:96,heightDiffThresholdPx:4};return{content:UN(t,e.index,r),final:n,mode:o,codeRenderer:s,nodeVirtual:!1,fade:!0===r.markdownFade,indexKey:Qe(e),virtualScroll:c,onHeightChange(t){if(t.sessionKey!==Qe(e))return;ot(e.key,t.totalHeight,{sessionKey:t.sessionKey,threadKey:Te.value,measurementKey:q.value});let n=function(e){return e.phase===`final`||!!e.stable&&(e.confidence===`measured`||e.confidence===`final`)}(t),r=Math.ceil(t.totalHeight);var a;(function(e,t){kt.set(e.key,t),At||(At=!0,jt=Mt(Ft))})(e,{allowMarkdownShrink:n,itemSizeSource:et(e),logicalHeight:r,threadKey:Te.value}),a={itemKey:e.key,metrics:t},i(`height-change`,a)},onVirtualStateChange(t){var n;t.sessionKey===Qe(e)&&(j.set(e.key,t),st(e.key,t),qt(),n={itemKey:e.key,state:t},i(`virtual-state-change`,n))}}}function Vt(e){return{item:Xe(e),index:e.index,itemKey:e.key,kind:e.kind,measureRef:zt(e),markdownProps:Bt(e)}}function Ht(e){let t=Xe(e)??{};return typeof t.text==`string`?t.text:typeof t.message==`string`?t.message:typeof t.label==`string`?t.label:UN(t,e.index,r)}function Ut(){let e=gt();if(e<=2)return{type:`bottom`,distanceFromBottomPx:Math.max(0,e)};let t=X(),n=Be(t,`gt`),r=Fe.value.records[n];if(r){let e=Le(r);if(t>=e&&t<e+r.size)return{type:`item`,itemKey:r.key,offsetWithinItemPx:t-e}}let i=Ue.value.records[0];return i?{type:`item`,itemKey:i.key,offsetWithinItemPx:0}:void 0}function Wt(e=Te.value){It();let t={},n={};for(let r of Fe.value.records){let i=Y(r,e),a=T.get(r.key);i!=null&&nt(r,a,e)&&(t[r.key]=i,n[r.key]=a)}return{threadKey:e,measurementKey:Oe.value,widthBucket:g.value,outerAnchor:Ut(),itemHeights:t,itemSizeSources:n,markdownStates:Object.fromEntries(j.entries())}}function Gt(e=Te.value){if(!e)return;let t=Wt(e);return ie.set(e,t),e===Te.value&&(be=t),o(t),t}function Kt(){let e=se;return me!=null&&typeof window<`u`&&window.clearTimeout(me),me=null,se=void 0,e?Gt(e):void 0}function qt(e=Te.value){e&&(se=e,me??(typeof window<`u`?me=window.setTimeout(()=>{me=null,Kt()},80):Kt()))}function Jt(e){if(!e)return null;if(e.type===`bottom`)return(oe.value?mt():pt())-ut()-Math.max(0,e.distanceFromBottomPx);let t=rt(e.itemKey);return t?ft()+Le(t)+Math.max(0,e.offsetWithinItemPx):null}function Yt(e,t={}){let n=Jt(e);return n!=null&&(yt(n,{writeDom:!0,remember:!0===t.remember}),!0)}function Xt(e,t){e===ue&&(t&&(_e=Yt(t,{remember:!1})?d.value:null),Q({remember:!1}))}function Zt(e,t){let n=e.getBoundingClientRect();return n.width>0&&n.height>0&&n.bottom>t.top&&n.top<t.bottom}function Qt(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.bottom>r.top&&n.top<r.bottom}function $t(e){if(e.closest(`.code-editor-container.is-hidden`))return!1;let t=e;for(;t;){let e=window.getComputedStyle(t);if(e.display===`none`||e.visibility===`hidden`||Number.parseFloat(e.opacity||`1`)<=.01)return!1;t=t.parentElement}let n=e.getBoundingClientRect();return n.width>0&&n.height>0}function en(e){return!!e.querySelector([`[data-markstream-pending="true"]`,`[data-markstream-mermaid][data-markstream-mode="pending"]`,`.mermaid-block-container[data-markstream-mode="pending"]`,`[data-markstream-code-loading="1"]`].join(`,`))}function tn(e){if(e.querySelector(`:scope > .node-placeholder`))return!1;let t=e.querySelector(`:scope > .node-content`);return!!t&&!en(t)&&!!function(e){let t=Array.from(e.querySelectorAll(`[data-markstream-math]`));return!t.length||t.every(e=>{let t=e.dataset.markstreamMode;return!(e.dataset.markstreamPending===`true`||t===`loading`||t!==`katex`&&t!==`fallback`)})}(t)&&((e.dataset.nodeType??``)===`code_block`?function(e){if(e.querySelector(`[data-markstream-code-loading="1"]`))return!1;let t=e.querySelector(`[data-markstream-code-block="1"]`);if(t){let e=t.dataset.markstreamEnhanced===`true`,r=function(e){if(!e||e.classList.contains(`is-fading-out`))return!1;let t=window.getComputedStyle(e);if(t.display===`none`||Number.parseFloat(t.opacity||`1`)<=.01)return!1;let n=e.getBoundingClientRect();return n.width>0&&n.height>0}(t.querySelector(`pre.code-pre-fallback`));return e||r||(n=t,Array.from(n.querySelectorAll(`.monaco-editor, .monaco-diff-editor`)).some($t))}var n;return function(e){let t=e.querySelector(`[data-markstream-mermaid], .mermaid-block-container`);if(t){if(t.dataset.markstreamPending===`true`)return!1;let e=t.dataset.markstreamMode;return e===`preview`?!!(t.querySelector(`svg`)||t.querySelector(`[data-mermaid-svg-layer="1"] svg`)):e===`fallback`&&!!(t.querySelector(`.mermaid-source-code`)?.textContent)?.trim()}let n=e.querySelector(`[data-markstream-infographic], .infographic-block-container`);if(n)return n.dataset.markstreamPending!==`true`;let r=e.querySelector(`[data-markstream-d2], .d2-block-container`);return r?r.dataset.markstreamPending!==`true`:!!e.querySelector(`pre[data-markstream-pre="1"]`)}(e)}(t):function(e){return(e.textContent??``).trim().length>0||!!e.querySelector([`hr`,`br`,`table`,`blockquote`,`img`,`svg`,`canvas`,`input`,`button`,`select`,`textarea`,`[role]`,`[aria-label]`,`[data-markstream-math]`,`[data-markstream-mermaid]`,`[data-markstream-infographic]`,`[data-markstream-d2]`,`[data-markstream-pre="1"]`].join(`,`))}(t))}function nn(e,t){if(!e.markdown)return!0;let n=UN(Xe(e),e.index,r);if(!String(n??``).trim()||t.querySelector(`[data-node-index]`))return!0;let i=t.querySelector(`.markdown-renderer`)??t;return!en(i)&&(!!(i.textContent??``).trim()||!!i.querySelector([`hr`,`br`,`table`,`blockquote`,`img`,`svg`,`canvas`,`input`,`button`,`[role]`,`[aria-label]`,`[data-markstream-math]`,`[data-markstream-mermaid]`,`[data-markstream-infographic]`,`[data-markstream-d2]`,`[data-markstream-pre="1"]`,`[data-markstream-code-block="1"]`].join(`,`)))}function rn(e,t,n){if(!e.markdown)return!0;let i=UN(Xe(e),e.index,r);if(!String(i??``).trim())return!0;let a=n.getBoundingClientRect(),o=Array.from(t.querySelectorAll(`[data-node-index]`)).filter(e=>Zt(e,a));if(o.length>0)return o.every(e=>tn(e));let s=t.querySelector(`.markdown-renderer`)??t;return s.querySelector(`[data-node-index], .node-placeholder`)?!!function(e,t,n,r){if(ce?.type!==`bottom`||!an(e))return!1;let i=n.getBoundingClientRect(),a=t.getBoundingClientRect();return i.width>0&&i.height>0&&i.bottom<=r.top+1&&a.bottom>r.top}(e,t,s,a)&&nn(e,t):nn(e,t)}function an(e){let t=T.get(e.key);return Ct(e.key,t)>0}function on(e,t){if(!e.markdown||!W&&!ye||an(e))return!0;let n=UN(Xe(e),e.index,r);if(!String(n??``).trim())return!0;if(!t.querySelector(`.markdown-renderer`))return!1;let i=j.get(e.key);if(!at(e,i))return!1;let a=i?.metrics,o=Number(a?.totalHeight??0);if(!Number.isFinite(o)||o<=0)return!1;let s=Number(a?.measuredCount??0),c=Number(a?.estimatedCount??0),l=Number(a?.nodeCount??0),u=l<=0||s>=l&&c<=0,d=a?.confidence===`measured`||a?.confidence===`final`,f=!0===a?.stable||d;return ye?u&&!0===a?.final&&d:f||!0===a?.final}function sn(){let e=u.value;if(!e)return!1;let t=Jt(ce);if(t!=null&&Math.abs((e.scrollTop||0)-ht(t))>.5)return!1;let n=Ue.value.records;if(!n.length)return Fe.value.records.length===0;let r=new Map(Array.from(e.querySelectorAll(`[data-markstream-item-key]`)).map(e=>[e.dataset.markstreamItemKey??``,e])),i=[];for(let t of n){let n=r.get(t.key);n&&Qt(n,e)&&i.push({record:t,el:n})}if(!i.length)return!1;for(let{record:t,el:n}of i)if(n.offsetHeight+1<t.size||!rn(t,n,e)||!on(t,n))return!1;let a=e.getBoundingClientRect();if(Array.from(e.querySelectorAll([`[data-markstream-pending="true"]`,`[data-markstream-mermaid][data-markstream-mode="pending"]`,`.mermaid-block-container[data-markstream-mode="pending"]`,`[data-markstream-code-loading="1"]`].join(`,`))).some(e=>Zt(e,a)))return!1;let o=Array.from(e.querySelectorAll(`[data-node-index]`)).filter(e=>Zt(e,a));for(let e of o)if(!tn(e))return!1;return!0}function cn(){let e=u.value;if(!e)return``;let t=e.getBoundingClientRect(),n=new Map(Array.from(e.querySelectorAll(`[data-markstream-item-key]`)).map(e=>[e.dataset.markstreamItemKey??``,e])),r=Ue.value.records.map(e=>{let t=n.get(e.key),r=t?.querySelector(`.markdown-renderer`),i=j.get(e.key)?.metrics;return[e.key,e.size,t?.offsetHeight??0,t?.scrollHeight??0,r?.offsetHeight??0,r?.scrollHeight??0,i?Math.round(Number(i.totalHeight||0)):``,i?.measuredCount??``,i?.estimatedCount??``,i?.nodeCount??``,+(!0===i?.final),+(!0===i?.stable),i?.confidence??``].join(`:`)}).join(`|`),i=Array.from(e.querySelectorAll(`[data-node-index]`)).filter(e=>Zt(e,t)).map(e=>{let t=e.getBoundingClientRect(),n=e.querySelector(`:scope > .node-content`),r=n?.querySelector(`[data-markstream-code-block="1"]`),i=n?.querySelector(`pre.code-pre-fallback`),a=n?.querySelector(`.monaco-editor, .monaco-diff-editor`);return[e.dataset.nodeIndex??``,e.dataset.nodeType??``,Math.round(t.height),n?.offsetHeight??0,n?.scrollHeight??0,r?.dataset.markstreamEnhanced??``,r?Math.round(r.getBoundingClientRect().height):0,i?Math.round(i.getBoundingClientRect().height):0,a?Math.round(a.getBoundingClientRect().height):0].join(`:`)}).join(`|`);return[Math.round(e.scrollTop||0),Math.round(e.scrollHeight||0),Math.round(Fe.value.totalHeight||0),r,i].join(`
|
|
160
|
+
`)}function ln(){return typeof performance<`u`?performance.now():Date.now()}function un(){return ye?24:2}function dn(e){ct(e)&&xe!==e&&(xe=e,function(e){return t=this,n=function*(){let t=ln(),n=0,r=``;for(let i=0;i<40;i++){if(yield h(),yield new Promise(e=>{typeof requestAnimationFrame==`function`?requestAnimationFrame(()=>e()):e()}),!ct(e))return!1;Xt(e,ce);let i=ln(),a=sn(),o=a?cn():``;if(a&&o===r&&o){if(n+=1,n>=un()&&i-t>=96)return!0}else n=0,r=o}return!1},new Promise((e,r)=>{var i=e=>{try{o(n.next(e))}catch(e){r(e)}},a=e=>{try{o(n.throw(e))}catch(e){r(e)}},o=t=>t.done?e(t.value):Promise.resolve(t.value).then(i,a);o((n=n.apply(t,null)).next())});var t,n}(e).then(t=>{if(xe===e&&(xe=0),ct(e))return t?void gn(e):function(){if(he<0)return!1;let e=function(){if(!1===r.restoreMaxLoadingMs)return 1/0;let e=Number(r.restoreMaxLoadingMs);return Number.isFinite(e)&&e>0?e:1/0}();return Number.isFinite(e)&&ln()-he>=e}()?(r.debug,void gn(e)):(function(e){Se!==e&&(Se=e,r.debug)}(e),void function(e){ct(e)&&typeof window<`u`&&(pe!=null&&window.clearTimeout(pe),pe=window.setTimeout(()=>{pe=null,ct(e)&&dn(e)},120))}(e))}))}function fn(){oe.value=!0,he=-1,xe=0,Se=0,W=!1,ye=!1,pe!=null&&typeof window<`u`&&window.clearTimeout(pe),pe=null}function pn(){we=!0}function mn(e){let t=[];if(!function(e){return!!e&&(e.measurementKey??``)===Oe.value&&(e.widthBucket??0)===g.value}(e))return t;for(let[n,r]of Object.entries(e?.itemHeights??{})){if(!Number.isFinite(r)||r<=0)continue;let i=rt(n),a=e?.itemSizeSources?.[n];nt(i,a)&&t.push([n,Math.ceil(r),a])}return t}function hn(e){for(let[t,n]of Object.entries(e?.markdownStates??{}))if(at(rt(t),n))return!0;return!1}function gn(e){if(e===ue){lt(),Xt(e,ce),I.value=!1,he=-1,ce=void 0,_e=null,ge=0;for(let e of Fe.value.records)e.markdown||Et(e.key);Q({remember:!1}),fn(),pn()}}function _n(e,t={}){let n=++ue;e!=null&&e.widthBucket&&g.value===0&&(g.value=e.widthBucket);let i=e?.outerAnchor,a=function(e){return!!(e?.outerAnchor||mn(e).length>0||hn(e))}(e),o=hn(e),s=!(!we&&!0!==t.threadSwitch||a),c=a||s,l=i??(c?function(){if(!1!==r.stickToBottom)return{type:`bottom`,distanceFromBottomPx:0};let e=Fe.value.records[0];return e?{type:`item`,itemKey:e.key,offsetWithinItemPx:0}:void 0}():void 0);lt(),xe=0,Se=0,oe.value=!c,I.value=c&&!!l,ge=n,ce=l,W=c&&o,ye=c&&s,he=I.value?ln():-1,vn(),w.clear(),T.clear(),E.clear(),A.clear(),j.clear(),N.clear(),ee.clear();for(let[t,n,r]of mn(e)){let e=Math.ceil(n);T.set(t,r),w.set(t,e),E.set(t,e),A.set(t,r)}for(let[t,n]of Object.entries(e?.markdownStates??{}))j.set(t,n),st(t,n);Ie(),!0===r.stickToBottom?(_.value=!0,x.value=!0):!1===r.stickToBottom?(_.value=!1,x.value=!1):(_.value=l?.type===`bottom`,x.value=l?.type===`bottom`&&l.distanceFromBottomPx<=2);let u=Jt(l);_e=u==null?null:ht(u),u!=null&&yt(u,{writeDom:!0,remember:!1,updatePinned:!1}),be=e?.threadKey===Te.value?e:null,c?l?h(()=>{Xt(n,l),typeof window<`u`?(L.forEach(e=>{let t=window.setTimeout(()=>{Xt(n,l)},e);fe.push(t)}),dn(n)):gn(n)}):(I.value=!1,ce=void 0,_e=null,ge=0,Q({remember:!1}),fn(),pn()):(I.value=!1,ce=void 0,_e=null,ge=0,Q({remember:!1}),fn(),pn(),!1!==r.stickToBottom&&(_.value=!0,x.value=!0,h(()=>{I.value||St()})))}function vn(){for(let e of re.values())e.disconnect();re.clear(),te.clear()}return p(Te,(e,t)=>{let n=G??t,i=!!(n&&n!==e);i&&function(e){It(),Kt()?.threadKey!==e&&(be?.threadKey===e?(ie.set(e,be),o(be)):ie.has(e)||Gt(e))}(n),G=e,_n(function(e){return(e?ie.get(e):null)||function(e){let t=r.initialThreadState;return t&&(t.threadKey??``)===(e??``)?t:null}(e)}(e),{threadSwitch:i})},{immediate:!0,flush:`sync`}),p(()=>Ue.value.records.map(e=>e.key).join(`\0`),()=>{i(`range-change`,{start:Ue.value.start,end:Ue.value.end})},{immediate:!0}),p(()=>[r.items.length,Fe.value.totalHeight],()=>{I.value||!1!==r.stickToBottom&&(r.stickToBottom!==`auto`||x.value)&&h(()=>{I.value||!1!==r.stickToBottom&&(r.stickToBottom!==`auto`||x.value)&&St()})},{flush:`post`}),l(()=>{dt(),vt(),ce?(Xt(ge,ce),Q({remember:!1}),Gt()):!1===r.stickToBottom?(Q({remember:!1}),Gt()):(_.value=!0,yt(Z(),{writeDom:!0,remember:!1,updatePinned:!1}),Q({remember:!1}),Gt()),u.value&&typeof ResizeObserver<`u`&&(le=new ResizeObserver(()=>{dt(),Q()}),le.observe(u.value))}),m(()=>{oe.value||dn(ge)}),v(()=>{Kt()||Gt(),lt(),me!=null&&typeof window<`u`&&window.clearTimeout(me),me=null,se=void 0,Nt(Ot.raf),Ot.scheduled=!1,Ot.raf=null,Ot.anchor=void 0,Nt(jt),At=!1,jt=null,kt.clear(),vn(),T.clear(),E.clear(),A.clear(),N.clear(),ee.clear(),le?.disconnect(),le=null}),t({captureThreadState:function(){return Wt(Te.value)},restoreThreadState:_n,scrollToBottom:St,scrollToIndex:function(e,t=`start`){let n=Fe.value.records[e];if(!n)return;let r=ft()+Le(n);t===`center`?r-=(f.value-n.size)/2:t===`end`&&(r-=f.value-n.size),xt(r)},scrollToOffset:xt,getItemSize:e=>{var t;let n=rt(e);return n&&(t=Y(n))!=null?t:void 0},getTotalHeight:()=>Fe.value.totalHeight,getVisibleRange:()=>({start:Ue.value.start,end:Ue.value.end})}),(e,t)=>(y(),U(`div`,{ref_key:`scrollRoot`,ref:u,class:z([`markstream-virtual-timeline`,{"is-restoring-thread":!oe.value}]),"data-markstream-virtual-timeline":`1`,"data-testid":`markstream-virtual-timeline`,onScroll:bt},[F(`div`,{class:`markstream-virtual-timeline__spacer`,style:ne({height:`${Ue.value.topSpacerHeight}px`}),"aria-hidden":`true`},null,4),(y(!0),U(H,null,a(Ue.value.records,t=>(y(),U(`div`,{key:t.renderKey,class:`markstream-virtual-timeline__item`,"data-markstream-item-key":t.key,"data-markstream-item-kind":t.kind,style:ne({minHeight:`${t.size}px`})},[C(e.$slots,`default`,ae({ref_for:!0},Vt(t)),()=>[t.markdown?(y(),P(B(_N),ae({key:0,ref_for:!0},Bt(t)),null,16)):Ze(t)?(y(),P(S(Ze(t)),{key:1,ref_for:!0,ref:zt(t),item:Xe(t)},null,8,[`item`])):(y(),U(`div`,{key:2,ref_for:!0,ref:zt(t),class:z([`markstream-virtual-timeline__default-item`,`markstream-virtual-timeline__default-item--${t.kind||`item`}`])},[t.kind===`tool-call`&&Xe(t)?.status?(y(),U(`span`,zL,O(Xe(t)?.status),1)):D(``,!0),b(` `+O(Ht(t)),1)],2))],!0)],12,RL))),128)),F(`div`,{class:`markstream-virtual-timeline__spacer`,style:ne({height:`${Ue.value.bottomSpacerHeight}px`}),"aria-hidden":`true`},null,4),oe.value?D(``,!0):(y(),U(`div`,{key:0,class:`markstream-virtual-timeline__restore-loading`,style:ne({height:`${Math.max(1,ut())}px`,transform:`translateY(${d.value}px)`}),"aria-live":`polite`,"aria-busy":`true`},[C(e.$slots,`restore-loading`,{threadKey:Te.value,visibleRecords:Ue.value.records},()=>[t[0]||=F(`div`,{class:`markstream-virtual-timeline__restore-loading-card`},[F(`span`,{class:`markstream-virtual-timeline__restore-spinner`,"aria-hidden":`true`}),F(`span`,null,`Loading thread…`)],-1)],!0)],4))],34))}})),[[`__scopeId`,`data-v-dff004bf`]]),VL=BL;VL.install=e=>{let t=VL.__name??VL.name??`MarkstreamVirtualTimeline`;e.component(t,BL)};var HL=n({AElig:()=>`Æ`,AMP:()=>`&`,Aacute:()=>`Á`,Abreve:()=>`Ă`,Acirc:()=>`Â`,Acy:()=>`А`,Afr:()=>WL,Agrave:()=>`À`,Alpha:()=>`Α`,Amacr:()=>`Ā`,And:()=>`⩓`,Aogon:()=>`Ą`,Aopf:()=>KL,ApplyFunction:()=>``,Aring:()=>`Å`,Ascr:()=>JL,Assign:()=>`≔`,Atilde:()=>`Ã`,Auml:()=>`Ä`,Backslash:()=>`∖`,Barv:()=>`⫧`,Barwed:()=>`⌆`,Bcy:()=>`Б`,Because:()=>`∵`,Bernoullis:()=>`ℬ`,Beta:()=>`Β`,Bfr:()=>XL,Bopf:()=>eR,Breve:()=>`˘`,Bscr:()=>`ℬ`,Bumpeq:()=>`≎`,CHcy:()=>`Ч`,COPY:()=>`©`,Cacute:()=>`Ć`,Cap:()=>`⋒`,CapitalDifferentialD:()=>`ⅅ`,Cayleys:()=>`ℭ`,Ccaron:()=>`Č`,Ccedil:()=>`Ç`,Ccirc:()=>`Ĉ`,Cconint:()=>`∰`,Cdot:()=>`Ċ`,Cedilla:()=>`¸`,CenterDot:()=>`·`,Cfr:()=>`ℭ`,Chi:()=>`Χ`,CircleDot:()=>`⊙`,CircleMinus:()=>`⊖`,CirclePlus:()=>`⊕`,CircleTimes:()=>`⊗`,ClockwiseContourIntegral:()=>`∲`,CloseCurlyDoubleQuote:()=>`”`,CloseCurlyQuote:()=>`’`,Colon:()=>`∷`,Colone:()=>`⩴`,Congruent:()=>`≡`,Conint:()=>`∯`,ContourIntegral:()=>`∮`,Copf:()=>`ℂ`,Coproduct:()=>`∐`,CounterClockwiseContourIntegral:()=>`∳`,Cross:()=>`⨯`,Cscr:()=>oR,Cup:()=>`⋓`,CupCap:()=>`≍`,DD:()=>`ⅅ`,DDotrahd:()=>`⤑`,DJcy:()=>`Ђ`,DScy:()=>`Ѕ`,DZcy:()=>`Џ`,Dagger:()=>`‡`,Darr:()=>`↡`,Dashv:()=>`⫤`,Dcaron:()=>`Ď`,Dcy:()=>`Д`,Del:()=>`∇`,Delta:()=>`Δ`,Dfr:()=>lR,DiacriticalAcute:()=>`´`,DiacriticalDot:()=>`˙`,DiacriticalDoubleAcute:()=>`˝`,DiacriticalGrave:()=>"`",DiacriticalTilde:()=>`˜`,Diamond:()=>`⋄`,DifferentialD:()=>`ⅆ`,Dopf:()=>dR,Dot:()=>`¨`,DotDot:()=>`⃜`,DotEqual:()=>`≐`,DoubleContourIntegral:()=>`∯`,DoubleDot:()=>`¨`,DoubleDownArrow:()=>`⇓`,DoubleLeftArrow:()=>`⇐`,DoubleLeftRightArrow:()=>`⇔`,DoubleLeftTee:()=>`⫤`,DoubleLongLeftArrow:()=>`⟸`,DoubleLongLeftRightArrow:()=>`⟺`,DoubleLongRightArrow:()=>`⟹`,DoubleRightArrow:()=>`⇒`,DoubleRightTee:()=>`⊨`,DoubleUpArrow:()=>`⇑`,DoubleUpDownArrow:()=>`⇕`,DoubleVerticalBar:()=>`∥`,DownArrow:()=>`↓`,DownArrowBar:()=>`⤓`,DownArrowUpArrow:()=>`⇵`,DownBreve:()=>`̑`,DownLeftRightVector:()=>`⥐`,DownLeftTeeVector:()=>`⥞`,DownLeftVector:()=>`↽`,DownLeftVectorBar:()=>`⥖`,DownRightTeeVector:()=>`⥟`,DownRightVector:()=>`⇁`,DownRightVectorBar:()=>`⥗`,DownTee:()=>`⊤`,DownTeeArrow:()=>`↧`,Downarrow:()=>`⇓`,Dscr:()=>pR,Dstrok:()=>`Đ`,ENG:()=>`Ŋ`,ETH:()=>`Ð`,Eacute:()=>`É`,Ecaron:()=>`Ě`,Ecirc:()=>`Ê`,Ecy:()=>`Э`,Edot:()=>`Ė`,Efr:()=>hR,Egrave:()=>`È`,Element:()=>`∈`,Emacr:()=>`Ē`,EmptySmallSquare:()=>`◻`,EmptyVerySmallSquare:()=>`▫`,Eogon:()=>`Ę`,Eopf:()=>_R,Epsilon:()=>`Ε`,Equal:()=>`⩵`,EqualTilde:()=>`≂`,Equilibrium:()=>`⇌`,Escr:()=>`ℰ`,Esim:()=>`⩳`,Eta:()=>`Η`,Euml:()=>`Ë`,Exists:()=>`∃`,ExponentialE:()=>`ⅇ`,Fcy:()=>`Ф`,Ffr:()=>yR,FilledSmallSquare:()=>`◼`,FilledVerySmallSquare:()=>`▪`,Fopf:()=>xR,ForAll:()=>`∀`,Fouriertrf:()=>`ℱ`,Fscr:()=>`ℱ`,GJcy:()=>`Ѓ`,GT:()=>`>`,Gamma:()=>`Γ`,Gammad:()=>`Ϝ`,Gbreve:()=>`Ğ`,Gcedil:()=>`Ģ`,Gcirc:()=>`Ĝ`,Gcy:()=>`Г`,Gdot:()=>`Ġ`,Gfr:()=>TR,Gg:()=>`⋙`,Gopf:()=>DR,GreaterEqual:()=>`≥`,GreaterEqualLess:()=>`⋛`,GreaterFullEqual:()=>`≧`,GreaterGreater:()=>`⪢`,GreaterLess:()=>`≷`,GreaterSlantEqual:()=>`⩾`,GreaterTilde:()=>`≳`,Gscr:()=>kR,Gt:()=>`≫`,HARDcy:()=>`Ъ`,Hacek:()=>`ˇ`,Hat:()=>`^`,Hcirc:()=>`Ĥ`,Hfr:()=>`ℌ`,HilbertSpace:()=>`ℋ`,Hopf:()=>`ℍ`,HorizontalLine:()=>`─`,Hscr:()=>`ℋ`,Hstrok:()=>`Ħ`,HumpDownHump:()=>`≎`,HumpEqual:()=>`≏`,IEcy:()=>`Е`,IJlig:()=>`IJ`,IOcy:()=>`Ё`,Iacute:()=>`Í`,Icirc:()=>`Î`,Icy:()=>`И`,Idot:()=>`İ`,Ifr:()=>`ℑ`,Igrave:()=>`Ì`,Im:()=>`ℑ`,Imacr:()=>`Ī`,ImaginaryI:()=>`ⅈ`,Implies:()=>`⇒`,Int:()=>`∬`,Integral:()=>`∫`,Intersection:()=>`⋂`,InvisibleComma:()=>``,InvisibleTimes:()=>``,Iogon:()=>`Į`,Iopf:()=>IR,Iota:()=>`Ι`,Iscr:()=>`ℐ`,Itilde:()=>`Ĩ`,Iukcy:()=>`І`,Iuml:()=>`Ï`,Jcirc:()=>`Ĵ`,Jcy:()=>`Й`,Jfr:()=>zR,Jopf:()=>VR,Jscr:()=>UR,Jsercy:()=>`Ј`,Jukcy:()=>`Є`,KHcy:()=>`Х`,KJcy:()=>`Ќ`,Kappa:()=>`Κ`,Kcedil:()=>`Ķ`,Kcy:()=>`К`,Kfr:()=>GR,Kopf:()=>qR,Kscr:()=>YR,LJcy:()=>`Љ`,LT:()=>`<`,Lacute:()=>`Ĺ`,Lambda:()=>`Λ`,Lang:()=>`⟪`,Laplacetrf:()=>`ℒ`,Larr:()=>`↞`,Lcaron:()=>`Ľ`,Lcedil:()=>`Ļ`,Lcy:()=>`Л`,LeftAngleBracket:()=>`⟨`,LeftArrow:()=>`←`,LeftArrowBar:()=>`⇤`,LeftArrowRightArrow:()=>`⇆`,LeftCeiling:()=>`⌈`,LeftDoubleBracket:()=>`⟦`,LeftDownTeeVector:()=>`⥡`,LeftDownVector:()=>`⇃`,LeftDownVectorBar:()=>`⥙`,LeftFloor:()=>`⌊`,LeftRightArrow:()=>`↔`,LeftRightVector:()=>`⥎`,LeftTee:()=>`⊣`,LeftTeeArrow:()=>`↤`,LeftTeeVector:()=>`⥚`,LeftTriangle:()=>`⊲`,LeftTriangleBar:()=>`⧏`,LeftTriangleEqual:()=>`⊴`,LeftUpDownVector:()=>`⥑`,LeftUpTeeVector:()=>`⥠`,LeftUpVector:()=>`↿`,LeftUpVectorBar:()=>`⥘`,LeftVector:()=>`↼`,LeftVectorBar:()=>`⥒`,Leftarrow:()=>`⇐`,Leftrightarrow:()=>`⇔`,LessEqualGreater:()=>`⋚`,LessFullEqual:()=>`≦`,LessGreater:()=>`≶`,LessLess:()=>`⪡`,LessSlantEqual:()=>`⩽`,LessTilde:()=>`≲`,Lfr:()=>$R,Ll:()=>`⋘`,Lleftarrow:()=>`⇚`,Lmidot:()=>`Ŀ`,LongLeftArrow:()=>`⟵`,LongLeftRightArrow:()=>`⟷`,LongRightArrow:()=>`⟶`,Longleftarrow:()=>`⟸`,Longleftrightarrow:()=>`⟺`,Longrightarrow:()=>`⟹`,Lopf:()=>tz,LowerLeftArrow:()=>`↙`,LowerRightArrow:()=>`↘`,Lscr:()=>`ℒ`,Lsh:()=>`↰`,Lstrok:()=>`Ł`,Lt:()=>`≪`,Map:()=>`⤅`,Mcy:()=>`М`,MediumSpace:()=>` `,Mellintrf:()=>`ℳ`,Mfr:()=>oz,MinusPlus:()=>`∓`,Mopf:()=>cz,Mscr:()=>`ℳ`,Mu:()=>`Μ`,NJcy:()=>`Њ`,Nacute:()=>`Ń`,Ncaron:()=>`Ň`,Ncedil:()=>`Ņ`,Ncy:()=>`Н`,NegativeMediumSpace:()=>``,NegativeThickSpace:()=>``,NegativeThinSpace:()=>``,NegativeVeryThinSpace:()=>``,NestedGreaterGreater:()=>`≫`,NestedLessLess:()=>`≪`,NewLine:()=>`
|
|
161
161
|
`,Nfr:()=>yz,NoBreak:()=>``,NonBreakingSpace:()=>`\xA0`,Nopf:()=>`ℕ`,Not:()=>`⫬`,NotCongruent:()=>`≢`,NotCupCap:()=>`≭`,NotDoubleVerticalBar:()=>`∦`,NotElement:()=>`∉`,NotEqual:()=>`≠`,NotEqualTilde:()=>Iz,NotExists:()=>`∄`,NotGreater:()=>`≯`,NotGreaterEqual:()=>`≱`,NotGreaterFullEqual:()=>Lz,NotGreaterGreater:()=>Rz,NotGreaterLess:()=>`≹`,NotGreaterSlantEqual:()=>zz,NotGreaterTilde:()=>`≵`,NotHumpDownHump:()=>Bz,NotHumpEqual:()=>Vz,NotLeftTriangle:()=>`⋪`,NotLeftTriangleBar:()=>Wz,NotLeftTriangleEqual:()=>`⋬`,NotLess:()=>`≮`,NotLessEqual:()=>`≰`,NotLessGreater:()=>`≸`,NotLessLess:()=>Gz,NotLessSlantEqual:()=>Kz,NotLessTilde:()=>`≴`,NotNestedGreaterGreater:()=>qz,NotNestedLessLess:()=>Jz,NotPrecedes:()=>`⊀`,NotPrecedesEqual:()=>Yz,NotPrecedesSlantEqual:()=>`⋠`,NotReverseElement:()=>`∌`,NotRightTriangle:()=>`⋫`,NotRightTriangleBar:()=>Xz,NotRightTriangleEqual:()=>`⋭`,NotSquareSubset:()=>Zz,NotSquareSubsetEqual:()=>`⋢`,NotSquareSuperset:()=>Qz,NotSquareSupersetEqual:()=>`⋣`,NotSubset:()=>$z,NotSubsetEqual:()=>`⊈`,NotSucceeds:()=>`⊁`,NotSucceedsEqual:()=>eB,NotSucceedsSlantEqual:()=>`⋡`,NotSucceedsTilde:()=>tB,NotSuperset:()=>nB,NotSupersetEqual:()=>`⊉`,NotTilde:()=>`≁`,NotTildeEqual:()=>`≄`,NotTildeFullEqual:()=>`≇`,NotTildeTilde:()=>`≉`,NotVerticalBar:()=>`∤`,Nscr:()=>uB,Ntilde:()=>`Ñ`,Nu:()=>`Ν`,OElig:()=>`Œ`,Oacute:()=>`Ó`,Ocirc:()=>`Ô`,Ocy:()=>`О`,Odblac:()=>`Ő`,Ofr:()=>DB,Ograve:()=>`Ò`,Omacr:()=>`Ō`,Omega:()=>`Ω`,Omicron:()=>`Ο`,Oopf:()=>kB,OpenCurlyDoubleQuote:()=>`“`,OpenCurlyQuote:()=>`‘`,Or:()=>`⩔`,Oscr:()=>jB,Oslash:()=>`Ø`,Otilde:()=>`Õ`,Otimes:()=>`⨷`,Ouml:()=>`Ö`,OverBar:()=>`‾`,OverBrace:()=>`⏞`,OverBracket:()=>`⎴`,OverParenthesis:()=>`⏜`,PartialD:()=>`∂`,Pcy:()=>`П`,Pfr:()=>MB,Phi:()=>`Φ`,Pi:()=>`Π`,PlusMinus:()=>`±`,Poincareplane:()=>`ℌ`,Popf:()=>`ℙ`,Pr:()=>`⪻`,Precedes:()=>`≺`,PrecedesEqual:()=>`⪯`,PrecedesSlantEqual:()=>`≼`,PrecedesTilde:()=>`≾`,Prime:()=>`″`,Product:()=>`∏`,Proportion:()=>`∷`,Proportional:()=>`∝`,Pscr:()=>FB,Psi:()=>`Ψ`,QUOT:()=>`"`,Qfr:()=>LB,Qopf:()=>`ℚ`,Qscr:()=>BB,RBarr:()=>`⤐`,REG:()=>`®`,Racute:()=>`Ŕ`,Rang:()=>`⟫`,Rarr:()=>`↠`,Rarrtl:()=>`⤖`,Rcaron:()=>`Ř`,Rcedil:()=>`Ŗ`,Rcy:()=>`Р`,Re:()=>`ℜ`,ReverseElement:()=>`∋`,ReverseEquilibrium:()=>`⇋`,ReverseUpEquilibrium:()=>`⥯`,Rfr:()=>`ℜ`,Rho:()=>`Ρ`,RightAngleBracket:()=>`⟩`,RightArrow:()=>`→`,RightArrowBar:()=>`⇥`,RightArrowLeftArrow:()=>`⇄`,RightCeiling:()=>`⌉`,RightDoubleBracket:()=>`⟧`,RightDownTeeVector:()=>`⥝`,RightDownVector:()=>`⇂`,RightDownVectorBar:()=>`⥕`,RightFloor:()=>`⌋`,RightTee:()=>`⊢`,RightTeeArrow:()=>`↦`,RightTeeVector:()=>`⥛`,RightTriangle:()=>`⊳`,RightTriangleBar:()=>`⧐`,RightTriangleEqual:()=>`⊵`,RightUpDownVector:()=>`⥏`,RightUpTeeVector:()=>`⥜`,RightUpVector:()=>`↾`,RightUpVectorBar:()=>`⥔`,RightVector:()=>`⇀`,RightVectorBar:()=>`⥓`,Rightarrow:()=>`⇒`,Ropf:()=>`ℝ`,RoundImplies:()=>`⥰`,Rrightarrow:()=>`⇛`,Rscr:()=>`ℛ`,Rsh:()=>`↱`,RuleDelayed:()=>`⧴`,SHCHcy:()=>`Щ`,SHcy:()=>`Ш`,SOFTcy:()=>`Ь`,Sacute:()=>`Ś`,Sc:()=>`⪼`,Scaron:()=>`Š`,Scedil:()=>`Ş`,Scirc:()=>`Ŝ`,Scy:()=>`С`,Sfr:()=>KB,ShortDownArrow:()=>`↓`,ShortLeftArrow:()=>`←`,ShortRightArrow:()=>`→`,ShortUpArrow:()=>`↑`,Sigma:()=>`Σ`,SmallCircle:()=>`∘`,Sopf:()=>YB,Sqrt:()=>`√`,Square:()=>`□`,SquareIntersection:()=>`⊓`,SquareSubset:()=>`⊏`,SquareSubsetEqual:()=>`⊑`,SquareSuperset:()=>`⊐`,SquareSupersetEqual:()=>`⊒`,SquareUnion:()=>`⊔`,Sscr:()=>$B,Star:()=>`⋆`,Sub:()=>`⋐`,Subset:()=>`⋐`,SubsetEqual:()=>`⊆`,Succeeds:()=>`≻`,SucceedsEqual:()=>`⪰`,SucceedsSlantEqual:()=>`≽`,SucceedsTilde:()=>`≿`,SuchThat:()=>`∋`,Sum:()=>`∑`,Sup:()=>`⋑`,Superset:()=>`⊃`,SupersetEqual:()=>`⊇`,Supset:()=>`⋑`,THORN:()=>`Þ`,TRADE:()=>`™`,TSHcy:()=>`Ћ`,TScy:()=>`Ц`,Tab:()=>` `,Tau:()=>`Τ`,Tcaron:()=>`Ť`,Tcedil:()=>`Ţ`,Tcy:()=>`Т`,Tfr:()=>tV,Therefore:()=>`∴`,Theta:()=>`Θ`,ThickSpace:()=>rV,ThinSpace:()=>` `,Tilde:()=>`∼`,TildeEqual:()=>`≃`,TildeFullEqual:()=>`≅`,TildeTilde:()=>`≈`,Topf:()=>iV,TripleDot:()=>`⃛`,Tscr:()=>oV,Tstrok:()=>`Ŧ`,Uacute:()=>`Ú`,Uarr:()=>`↟`,Uarrocir:()=>`⥉`,Ubrcy:()=>`Ў`,Ubreve:()=>`Ŭ`,Ucirc:()=>`Û`,Ucy:()=>`У`,Udblac:()=>`Ű`,Ufr:()=>cV,Ugrave:()=>`Ù`,Umacr:()=>`Ū`,UnderBar:()=>`_`,UnderBrace:()=>`⏟`,UnderBracket:()=>`⎵`,UnderParenthesis:()=>`⏝`,Union:()=>`⋃`,UnionPlus:()=>`⊎`,Uogon:()=>`Ų`,Uopf:()=>uV,UpArrow:()=>`↑`,UpArrowBar:()=>`⤒`,UpArrowDownArrow:()=>`⇅`,UpDownArrow:()=>`↕`,UpEquilibrium:()=>`⥮`,UpTee:()=>`⊥`,UpTeeArrow:()=>`↥`,Uparrow:()=>`⇑`,Updownarrow:()=>`⇕`,UpperLeftArrow:()=>`↖`,UpperRightArrow:()=>`↗`,Upsi:()=>`ϒ`,Upsilon:()=>`Υ`,Uring:()=>`Ů`,Uscr:()=>fV,Utilde:()=>`Ũ`,Uuml:()=>`Ü`,VDash:()=>`⊫`,Vbar:()=>`⫫`,Vcy:()=>`В`,Vdash:()=>`⊩`,Vdashl:()=>`⫦`,Vee:()=>`⋁`,Verbar:()=>`‖`,Vert:()=>`‖`,VerticalBar:()=>`∣`,VerticalLine:()=>`|`,VerticalSeparator:()=>`❘`,VerticalTilde:()=>`≀`,VeryThinSpace:()=>` `,Vfr:()=>vV,Vopf:()=>SV,Vscr:()=>wV,Vvdash:()=>`⊪`,Wcirc:()=>`Ŵ`,Wedge:()=>`⋀`,Wfr:()=>AV,Wopf:()=>MV,Wscr:()=>PV,Xfr:()=>IV,Xi:()=>`Ξ`,Xopf:()=>RV,Xscr:()=>BV,YAcy:()=>`Я`,YIcy:()=>`Ї`,YUcy:()=>`Ю`,Yacute:()=>`Ý`,Ycirc:()=>`Ŷ`,Ycy:()=>`Ы`,Yfr:()=>HV,Yopf:()=>WV,Yscr:()=>KV,Yuml:()=>`Ÿ`,ZHcy:()=>`Ж`,Zacute:()=>`Ź`,Zcaron:()=>`Ž`,Zcy:()=>`З`,Zdot:()=>`Ż`,ZeroWidthSpace:()=>``,Zeta:()=>`Ζ`,Zfr:()=>`ℨ`,Zopf:()=>`ℤ`,Zscr:()=>XV,aacute:()=>`á`,abreve:()=>`ă`,ac:()=>`∾`,acE:()=>UL,acd:()=>`∿`,acirc:()=>`â`,acute:()=>`´`,acy:()=>`а`,aelig:()=>`æ`,af:()=>``,afr:()=>GL,agrave:()=>`à`,alefsym:()=>`ℵ`,aleph:()=>`ℵ`,alpha:()=>`α`,amacr:()=>`ā`,amalg:()=>`⨿`,amp:()=>`&`,and:()=>`∧`,andand:()=>`⩕`,andd:()=>`⩜`,andslope:()=>`⩘`,andv:()=>`⩚`,ang:()=>`∠`,ange:()=>`⦤`,angle:()=>`∠`,angmsd:()=>`∡`,angmsdaa:()=>`⦨`,angmsdab:()=>`⦩`,angmsdac:()=>`⦪`,angmsdad:()=>`⦫`,angmsdae:()=>`⦬`,angmsdaf:()=>`⦭`,angmsdag:()=>`⦮`,angmsdah:()=>`⦯`,angrt:()=>`∟`,angrtvb:()=>`⊾`,angrtvbd:()=>`⦝`,angsph:()=>`∢`,angst:()=>`Å`,angzarr:()=>`⍼`,aogon:()=>`ą`,aopf:()=>qL,ap:()=>`≈`,apE:()=>`⩰`,apacir:()=>`⩯`,ape:()=>`≊`,apid:()=>`≋`,apos:()=>`'`,approx:()=>`≈`,approxeq:()=>`≊`,aring:()=>`å`,ascr:()=>YL,ast:()=>`*`,asymp:()=>`≈`,asympeq:()=>`≍`,atilde:()=>`ã`,auml:()=>`ä`,awconint:()=>`∳`,awint:()=>`⨑`,bNot:()=>`⫭`,backcong:()=>`≌`,backepsilon:()=>`϶`,backprime:()=>`‵`,backsim:()=>`∽`,backsimeq:()=>`⋍`,barvee:()=>`⊽`,barwed:()=>`⌅`,barwedge:()=>`⌅`,bbrk:()=>`⎵`,bbrktbrk:()=>`⎶`,bcong:()=>`≌`,bcy:()=>`б`,bdquo:()=>`„`,becaus:()=>`∵`,because:()=>`∵`,bemptyv:()=>`⦰`,bepsi:()=>`϶`,bernou:()=>`ℬ`,beta:()=>`β`,beth:()=>`ℶ`,between:()=>`≬`,bfr:()=>ZL,bigcap:()=>`⋂`,bigcirc:()=>`◯`,bigcup:()=>`⋃`,bigodot:()=>`⨀`,bigoplus:()=>`⨁`,bigotimes:()=>`⨂`,bigsqcup:()=>`⨆`,bigstar:()=>`★`,bigtriangledown:()=>`▽`,bigtriangleup:()=>`△`,biguplus:()=>`⨄`,bigvee:()=>`⋁`,bigwedge:()=>`⋀`,bkarow:()=>`⤍`,blacklozenge:()=>`⧫`,blacksquare:()=>`▪`,blacktriangle:()=>`▴`,blacktriangledown:()=>`▾`,blacktriangleleft:()=>`◂`,blacktriangleright:()=>`▸`,blank:()=>`␣`,blk12:()=>`▒`,blk14:()=>`░`,blk34:()=>`▓`,block:()=>`█`,bne:()=>QL,bnequiv:()=>$L,bnot:()=>`⌐`,bopf:()=>tR,bot:()=>`⊥`,bottom:()=>`⊥`,bowtie:()=>`⋈`,boxDL:()=>`╗`,boxDR:()=>`╔`,boxDl:()=>`╖`,boxDr:()=>`╓`,boxH:()=>`═`,boxHD:()=>`╦`,boxHU:()=>`╩`,boxHd:()=>`╤`,boxHu:()=>`╧`,boxUL:()=>`╝`,boxUR:()=>`╚`,boxUl:()=>`╜`,boxUr:()=>`╙`,boxV:()=>`║`,boxVH:()=>`╬`,boxVL:()=>`╣`,boxVR:()=>`╠`,boxVh:()=>`╫`,boxVl:()=>`╢`,boxVr:()=>`╟`,boxbox:()=>`⧉`,boxdL:()=>`╕`,boxdR:()=>`╒`,boxdl:()=>`┐`,boxdr:()=>`┌`,boxh:()=>`─`,boxhD:()=>`╥`,boxhU:()=>`╨`,boxhd:()=>`┬`,boxhu:()=>`┴`,boxminus:()=>`⊟`,boxplus:()=>`⊞`,boxtimes:()=>`⊠`,boxuL:()=>`╛`,boxuR:()=>`╘`,boxul:()=>`┘`,boxur:()=>`└`,boxv:()=>`│`,boxvH:()=>`╪`,boxvL:()=>`╡`,boxvR:()=>`╞`,boxvh:()=>`┼`,boxvl:()=>`┤`,boxvr:()=>`├`,bprime:()=>`‵`,breve:()=>`˘`,brvbar:()=>`¦`,bscr:()=>nR,bsemi:()=>`⁏`,bsim:()=>`∽`,bsime:()=>`⋍`,bsol:()=>`\\`,bsolb:()=>`⧅`,bsolhsub:()=>`⟈`,bull:()=>`•`,bullet:()=>`•`,bump:()=>`≎`,bumpE:()=>`⪮`,bumpe:()=>`≏`,bumpeq:()=>`≏`,cacute:()=>`ć`,cap:()=>`∩`,capand:()=>`⩄`,capbrcup:()=>`⩉`,capcap:()=>`⩋`,capcup:()=>`⩇`,capdot:()=>`⩀`,caps:()=>rR,caret:()=>`⁁`,caron:()=>`ˇ`,ccaps:()=>`⩍`,ccaron:()=>`č`,ccedil:()=>`ç`,ccirc:()=>`ĉ`,ccups:()=>`⩌`,ccupssm:()=>`⩐`,cdot:()=>`ċ`,cedil:()=>`¸`,cemptyv:()=>`⦲`,cent:()=>`¢`,centerdot:()=>`·`,cfr:()=>iR,chcy:()=>`ч`,check:()=>`✓`,checkmark:()=>`✓`,chi:()=>`χ`,cir:()=>`○`,cirE:()=>`⧃`,circ:()=>`ˆ`,circeq:()=>`≗`,circlearrowleft:()=>`↺`,circlearrowright:()=>`↻`,circledR:()=>`®`,circledS:()=>`Ⓢ`,circledast:()=>`⊛`,circledcirc:()=>`⊚`,circleddash:()=>`⊝`,cire:()=>`≗`,cirfnint:()=>`⨐`,cirmid:()=>`⫯`,cirscir:()=>`⧂`,clubs:()=>`♣`,clubsuit:()=>`♣`,colon:()=>`:`,colone:()=>`≔`,coloneq:()=>`≔`,comma:()=>`,`,commat:()=>`@`,comp:()=>`∁`,compfn:()=>`∘`,complement:()=>`∁`,complexes:()=>`ℂ`,cong:()=>`≅`,congdot:()=>`⩭`,conint:()=>`∮`,copf:()=>aR,coprod:()=>`∐`,copy:()=>`©`,copysr:()=>`℗`,crarr:()=>`↵`,cross:()=>`✗`,cscr:()=>sR,csub:()=>`⫏`,csube:()=>`⫑`,csup:()=>`⫐`,csupe:()=>`⫒`,ctdot:()=>`⋯`,cudarrl:()=>`⤸`,cudarrr:()=>`⤵`,cuepr:()=>`⋞`,cuesc:()=>`⋟`,cularr:()=>`↶`,cularrp:()=>`⤽`,cup:()=>`∪`,cupbrcap:()=>`⩈`,cupcap:()=>`⩆`,cupcup:()=>`⩊`,cupdot:()=>`⊍`,cupor:()=>`⩅`,cups:()=>cR,curarr:()=>`↷`,curarrm:()=>`⤼`,curlyeqprec:()=>`⋞`,curlyeqsucc:()=>`⋟`,curlyvee:()=>`⋎`,curlywedge:()=>`⋏`,curren:()=>`¤`,curvearrowleft:()=>`↶`,curvearrowright:()=>`↷`,cuvee:()=>`⋎`,cuwed:()=>`⋏`,cwconint:()=>`∲`,cwint:()=>`∱`,cylcty:()=>`⌭`,dArr:()=>`⇓`,dHar:()=>`⥥`,dagger:()=>`†`,daleth:()=>`ℸ`,darr:()=>`↓`,dash:()=>`‐`,dashv:()=>`⊣`,dbkarow:()=>`⤏`,dblac:()=>`˝`,dcaron:()=>`ď`,dcy:()=>`д`,dd:()=>`ⅆ`,ddagger:()=>`‡`,ddarr:()=>`⇊`,ddotseq:()=>`⩷`,default:()=>QV,deg:()=>`°`,delta:()=>`δ`,demptyv:()=>`⦱`,dfisht:()=>`⥿`,dfr:()=>uR,dharl:()=>`⇃`,dharr:()=>`⇂`,diam:()=>`⋄`,diamond:()=>`⋄`,diamondsuit:()=>`♦`,diams:()=>`♦`,die:()=>`¨`,digamma:()=>`ϝ`,disin:()=>`⋲`,div:()=>`÷`,divide:()=>`÷`,divideontimes:()=>`⋇`,divonx:()=>`⋇`,djcy:()=>`ђ`,dlcorn:()=>`⌞`,dlcrop:()=>`⌍`,dollar:()=>`$`,dopf:()=>fR,dot:()=>`˙`,doteq:()=>`≐`,doteqdot:()=>`≑`,dotminus:()=>`∸`,dotplus:()=>`∔`,dotsquare:()=>`⊡`,doublebarwedge:()=>`⌆`,downarrow:()=>`↓`,downdownarrows:()=>`⇊`,downharpoonleft:()=>`⇃`,downharpoonright:()=>`⇂`,drbkarow:()=>`⤐`,drcorn:()=>`⌟`,drcrop:()=>`⌌`,dscr:()=>mR,dscy:()=>`ѕ`,dsol:()=>`⧶`,dstrok:()=>`đ`,dtdot:()=>`⋱`,dtri:()=>`▿`,dtrif:()=>`▾`,duarr:()=>`⇵`,duhar:()=>`⥯`,dwangle:()=>`⦦`,dzcy:()=>`џ`,dzigrarr:()=>`⟿`,eDDot:()=>`⩷`,eDot:()=>`≑`,eacute:()=>`é`,easter:()=>`⩮`,ecaron:()=>`ě`,ecir:()=>`≖`,ecirc:()=>`ê`,ecolon:()=>`≕`,ecy:()=>`э`,edot:()=>`ė`,ee:()=>`ⅇ`,efDot:()=>`≒`,efr:()=>gR,eg:()=>`⪚`,egrave:()=>`è`,egs:()=>`⪖`,egsdot:()=>`⪘`,el:()=>`⪙`,elinters:()=>`⏧`,ell:()=>`ℓ`,els:()=>`⪕`,elsdot:()=>`⪗`,emacr:()=>`ē`,empty:()=>`∅`,emptyset:()=>`∅`,emptyv:()=>`∅`,emsp:()=>` `,emsp13:()=>` `,emsp14:()=>` `,eng:()=>`ŋ`,ensp:()=>` `,eogon:()=>`ę`,eopf:()=>vR,epar:()=>`⋕`,eparsl:()=>`⧣`,eplus:()=>`⩱`,epsi:()=>`ε`,epsilon:()=>`ε`,epsiv:()=>`ϵ`,eqcirc:()=>`≖`,eqcolon:()=>`≕`,eqsim:()=>`≂`,eqslantgtr:()=>`⪖`,eqslantless:()=>`⪕`,equals:()=>`=`,equest:()=>`≟`,equiv:()=>`≡`,equivDD:()=>`⩸`,eqvparsl:()=>`⧥`,erDot:()=>`≓`,erarr:()=>`⥱`,escr:()=>`ℯ`,esdot:()=>`≐`,esim:()=>`≂`,eta:()=>`η`,eth:()=>`ð`,euml:()=>`ë`,euro:()=>`€`,excl:()=>`!`,exist:()=>`∃`,expectation:()=>`ℰ`,exponentiale:()=>`ⅇ`,fallingdotseq:()=>`≒`,fcy:()=>`ф`,female:()=>`♀`,ffilig:()=>`ffi`,fflig:()=>`ff`,ffllig:()=>`ffl`,ffr:()=>bR,filig:()=>`fi`,fjlig:()=>`fj`,flat:()=>`♭`,fllig:()=>`fl`,fltns:()=>`▱`,fnof:()=>`ƒ`,fopf:()=>SR,forall:()=>`∀`,fork:()=>`⋔`,forkv:()=>`⫙`,fpartint:()=>`⨍`,frac12:()=>`½`,frac13:()=>`⅓`,frac14:()=>`¼`,frac15:()=>`⅕`,frac16:()=>`⅙`,frac18:()=>`⅛`,frac23:()=>`⅔`,frac25:()=>`⅖`,frac34:()=>`¾`,frac35:()=>`⅗`,frac38:()=>`⅜`,frac45:()=>`⅘`,frac56:()=>`⅚`,frac58:()=>`⅝`,frac78:()=>`⅞`,frasl:()=>`⁄`,frown:()=>`⌢`,fscr:()=>CR,gE:()=>`≧`,gEl:()=>`⪌`,gacute:()=>`ǵ`,gamma:()=>`γ`,gammad:()=>`ϝ`,gap:()=>`⪆`,gbreve:()=>`ğ`,gcirc:()=>`ĝ`,gcy:()=>`г`,gdot:()=>`ġ`,ge:()=>`≥`,gel:()=>`⋛`,geq:()=>`≥`,geqq:()=>`≧`,geqslant:()=>`⩾`,ges:()=>`⩾`,gescc:()=>`⪩`,gesdot:()=>`⪀`,gesdoto:()=>`⪂`,gesdotol:()=>`⪄`,gesl:()=>wR,gesles:()=>`⪔`,gfr:()=>ER,gg:()=>`≫`,ggg:()=>`⋙`,gimel:()=>`ℷ`,gjcy:()=>`ѓ`,gl:()=>`≷`,glE:()=>`⪒`,gla:()=>`⪥`,glj:()=>`⪤`,gnE:()=>`≩`,gnap:()=>`⪊`,gnapprox:()=>`⪊`,gne:()=>`⪈`,gneq:()=>`⪈`,gneqq:()=>`≩`,gnsim:()=>`⋧`,gopf:()=>OR,grave:()=>"`",gscr:()=>`ℊ`,gsim:()=>`≳`,gsime:()=>`⪎`,gsiml:()=>`⪐`,gt:()=>`>`,gtcc:()=>`⪧`,gtcir:()=>`⩺`,gtdot:()=>`⋗`,gtlPar:()=>`⦕`,gtquest:()=>`⩼`,gtrapprox:()=>`⪆`,gtrarr:()=>`⥸`,gtrdot:()=>`⋗`,gtreqless:()=>`⋛`,gtreqqless:()=>`⪌`,gtrless:()=>`≷`,gtrsim:()=>`≳`,gvertneqq:()=>AR,gvnE:()=>jR,hArr:()=>`⇔`,hairsp:()=>` `,half:()=>`½`,hamilt:()=>`ℋ`,hardcy:()=>`ъ`,harr:()=>`↔`,harrcir:()=>`⥈`,harrw:()=>`↭`,hbar:()=>`ℏ`,hcirc:()=>`ĥ`,hearts:()=>`♥`,heartsuit:()=>`♥`,hellip:()=>`…`,hercon:()=>`⊹`,hfr:()=>MR,hksearow:()=>`⤥`,hkswarow:()=>`⤦`,hoarr:()=>`⇿`,homtht:()=>`∻`,hookleftarrow:()=>`↩`,hookrightarrow:()=>`↪`,hopf:()=>NR,horbar:()=>`―`,hscr:()=>PR,hslash:()=>`ℏ`,hstrok:()=>`ħ`,hybull:()=>`⁃`,hyphen:()=>`‐`,iacute:()=>`í`,ic:()=>``,icirc:()=>`î`,icy:()=>`и`,iecy:()=>`е`,iexcl:()=>`¡`,iff:()=>`⇔`,ifr:()=>FR,igrave:()=>`ì`,ii:()=>`ⅈ`,iiiint:()=>`⨌`,iiint:()=>`∭`,iinfin:()=>`⧜`,iiota:()=>`℩`,ijlig:()=>`ij`,imacr:()=>`ī`,image:()=>`ℑ`,imagline:()=>`ℐ`,imagpart:()=>`ℑ`,imath:()=>`ı`,imof:()=>`⊷`,imped:()=>`Ƶ`,incare:()=>`℅`,infin:()=>`∞`,infintie:()=>`⧝`,inodot:()=>`ı`,int:()=>`∫`,intcal:()=>`⊺`,integers:()=>`ℤ`,intercal:()=>`⊺`,intlarhk:()=>`⨗`,intprod:()=>`⨼`,iocy:()=>`ё`,iogon:()=>`į`,iopf:()=>LR,iota:()=>`ι`,iprod:()=>`⨼`,iquest:()=>`¿`,iscr:()=>RR,isin:()=>`∈`,isinE:()=>`⋹`,isindot:()=>`⋵`,isins:()=>`⋴`,isinsv:()=>`⋳`,isinv:()=>`∈`,it:()=>``,itilde:()=>`ĩ`,iukcy:()=>`і`,iuml:()=>`ï`,jcirc:()=>`ĵ`,jcy:()=>`й`,jfr:()=>BR,jmath:()=>`ȷ`,jopf:()=>HR,jscr:()=>WR,jsercy:()=>`ј`,jukcy:()=>`є`,kappa:()=>`κ`,kappav:()=>`ϰ`,kcedil:()=>`ķ`,kcy:()=>`к`,kfr:()=>KR,kgreen:()=>`ĸ`,khcy:()=>`х`,kjcy:()=>`ќ`,kopf:()=>JR,kscr:()=>XR,lAarr:()=>`⇚`,lArr:()=>`⇐`,lAtail:()=>`⤛`,lBarr:()=>`⤎`,lE:()=>`≦`,lEg:()=>`⪋`,lHar:()=>`⥢`,lacute:()=>`ĺ`,laemptyv:()=>`⦴`,lagran:()=>`ℒ`,lambda:()=>`λ`,lang:()=>`⟨`,langd:()=>`⦑`,langle:()=>`⟨`,lap:()=>`⪅`,laquo:()=>`«`,larr:()=>`←`,larrb:()=>`⇤`,larrbfs:()=>`⤟`,larrfs:()=>`⤝`,larrhk:()=>`↩`,larrlp:()=>`↫`,larrpl:()=>`⤹`,larrsim:()=>`⥳`,larrtl:()=>`↢`,lat:()=>`⪫`,latail:()=>`⤙`,late:()=>`⪭`,lates:()=>ZR,lbarr:()=>`⤌`,lbbrk:()=>`❲`,lbrace:()=>`{`,lbrack:()=>`[`,lbrke:()=>`⦋`,lbrksld:()=>`⦏`,lbrkslu:()=>`⦍`,lcaron:()=>`ľ`,lcedil:()=>`ļ`,lceil:()=>`⌈`,lcub:()=>`{`,lcy:()=>`л`,ldca:()=>`⤶`,ldquo:()=>`“`,ldquor:()=>`„`,ldrdhar:()=>`⥧`,ldrushar:()=>`⥋`,ldsh:()=>`↲`,le:()=>`≤`,leftarrow:()=>`←`,leftarrowtail:()=>`↢`,leftharpoondown:()=>`↽`,leftharpoonup:()=>`↼`,leftleftarrows:()=>`⇇`,leftrightarrow:()=>`↔`,leftrightarrows:()=>`⇆`,leftrightharpoons:()=>`⇋`,leftrightsquigarrow:()=>`↭`,leftthreetimes:()=>`⋋`,leg:()=>`⋚`,leq:()=>`≤`,leqq:()=>`≦`,leqslant:()=>`⩽`,les:()=>`⩽`,lescc:()=>`⪨`,lesdot:()=>`⩿`,lesdoto:()=>`⪁`,lesdotor:()=>`⪃`,lesg:()=>QR,lesges:()=>`⪓`,lessapprox:()=>`⪅`,lessdot:()=>`⋖`,lesseqgtr:()=>`⋚`,lesseqqgtr:()=>`⪋`,lessgtr:()=>`≶`,lesssim:()=>`≲`,lfisht:()=>`⥼`,lfloor:()=>`⌊`,lfr:()=>ez,lg:()=>`≶`,lgE:()=>`⪑`,lhard:()=>`↽`,lharu:()=>`↼`,lharul:()=>`⥪`,lhblk:()=>`▄`,ljcy:()=>`љ`,ll:()=>`≪`,llarr:()=>`⇇`,llcorner:()=>`⌞`,llhard:()=>`⥫`,lltri:()=>`◺`,lmidot:()=>`ŀ`,lmoust:()=>`⎰`,lmoustache:()=>`⎰`,lnE:()=>`≨`,lnap:()=>`⪉`,lnapprox:()=>`⪉`,lne:()=>`⪇`,lneq:()=>`⪇`,lneqq:()=>`≨`,lnsim:()=>`⋦`,loang:()=>`⟬`,loarr:()=>`⇽`,lobrk:()=>`⟦`,longleftarrow:()=>`⟵`,longleftrightarrow:()=>`⟷`,longmapsto:()=>`⟼`,longrightarrow:()=>`⟶`,looparrowleft:()=>`↫`,looparrowright:()=>`↬`,lopar:()=>`⦅`,lopf:()=>nz,loplus:()=>`⨭`,lotimes:()=>`⨴`,lowast:()=>`∗`,lowbar:()=>`_`,loz:()=>`◊`,lozenge:()=>`◊`,lozf:()=>`⧫`,lpar:()=>`(`,lparlt:()=>`⦓`,lrarr:()=>`⇆`,lrcorner:()=>`⌟`,lrhar:()=>`⇋`,lrhard:()=>`⥭`,lrm:()=>``,lrtri:()=>`⊿`,lsaquo:()=>`‹`,lscr:()=>rz,lsh:()=>`↰`,lsim:()=>`≲`,lsime:()=>`⪍`,lsimg:()=>`⪏`,lsqb:()=>`[`,lsquo:()=>`‘`,lsquor:()=>`‚`,lstrok:()=>`ł`,lt:()=>`<`,ltcc:()=>`⪦`,ltcir:()=>`⩹`,ltdot:()=>`⋖`,lthree:()=>`⋋`,ltimes:()=>`⋉`,ltlarr:()=>`⥶`,ltquest:()=>`⩻`,ltrPar:()=>`⦖`,ltri:()=>`◃`,ltrie:()=>`⊴`,ltrif:()=>`◂`,lurdshar:()=>`⥊`,luruhar:()=>`⥦`,lvertneqq:()=>iz,lvnE:()=>az,mDDot:()=>`∺`,macr:()=>`¯`,male:()=>`♂`,malt:()=>`✠`,maltese:()=>`✠`,map:()=>`↦`,mapsto:()=>`↦`,mapstodown:()=>`↧`,mapstoleft:()=>`↤`,mapstoup:()=>`↥`,marker:()=>`▮`,mcomma:()=>`⨩`,mcy:()=>`м`,mdash:()=>`—`,measuredangle:()=>`∡`,mfr:()=>sz,mho:()=>`℧`,micro:()=>`µ`,mid:()=>`∣`,midast:()=>`*`,midcir:()=>`⫰`,middot:()=>`·`,minus:()=>`−`,minusb:()=>`⊟`,minusd:()=>`∸`,minusdu:()=>`⨪`,mlcp:()=>`⫛`,mldr:()=>`…`,mnplus:()=>`∓`,models:()=>`⊧`,mopf:()=>lz,mp:()=>`∓`,mscr:()=>uz,mstpos:()=>`∾`,mu:()=>`μ`,multimap:()=>`⊸`,mumap:()=>`⊸`,nGg:()=>Tz,nGt:()=>Ez,nGtv:()=>Dz,nLeftarrow:()=>`⇍`,nLeftrightarrow:()=>`⇎`,nLl:()=>Mz,nLt:()=>Nz,nLtv:()=>Pz,nRightarrow:()=>`⇏`,nVDash:()=>`⊯`,nVdash:()=>`⊮`,nabla:()=>`∇`,nacute:()=>`ń`,nang:()=>dz,nap:()=>`≉`,napE:()=>fz,napid:()=>pz,napos:()=>`ʼn`,napprox:()=>`≉`,natur:()=>`♮`,natural:()=>`♮`,naturals:()=>`ℕ`,nbsp:()=>`\xA0`,nbump:()=>mz,nbumpe:()=>hz,ncap:()=>`⩃`,ncaron:()=>`ň`,ncedil:()=>`ņ`,ncong:()=>`≇`,ncongdot:()=>gz,ncup:()=>`⩂`,ncy:()=>`н`,ndash:()=>`–`,ne:()=>`≠`,neArr:()=>`⇗`,nearhk:()=>`⤤`,nearr:()=>`↗`,nearrow:()=>`↗`,nedot:()=>_z,nequiv:()=>`≢`,nesear:()=>`⤨`,nesim:()=>vz,nexist:()=>`∄`,nexists:()=>`∄`,nfr:()=>bz,ngE:()=>xz,nge:()=>`≱`,ngeq:()=>`≱`,ngeqq:()=>Sz,ngeqslant:()=>Cz,nges:()=>wz,ngsim:()=>`≵`,ngt:()=>`≯`,ngtr:()=>`≯`,nhArr:()=>`⇎`,nharr:()=>`↮`,nhpar:()=>`⫲`,ni:()=>`∋`,nis:()=>`⋼`,nisd:()=>`⋺`,niv:()=>`∋`,njcy:()=>`њ`,nlArr:()=>`⇍`,nlE:()=>Oz,nlarr:()=>`↚`,nldr:()=>`‥`,nle:()=>`≰`,nleftarrow:()=>`↚`,nleftrightarrow:()=>`↮`,nleq:()=>`≰`,nleqq:()=>kz,nleqslant:()=>Az,nles:()=>jz,nless:()=>`≮`,nlsim:()=>`≴`,nlt:()=>`≮`,nltri:()=>`⋪`,nltrie:()=>`⋬`,nmid:()=>`∤`,nopf:()=>Fz,not:()=>`¬`,notin:()=>`∉`,notinE:()=>Uz,notindot:()=>Hz,notinva:()=>`∉`,notinvb:()=>`⋷`,notinvc:()=>`⋶`,notni:()=>`∌`,notniva:()=>`∌`,notnivb:()=>`⋾`,notnivc:()=>`⋽`,npar:()=>`∦`,nparallel:()=>`∦`,nparsl:()=>rB,npart:()=>iB,npolint:()=>`⨔`,npr:()=>`⊀`,nprcue:()=>`⋠`,npre:()=>oB,nprec:()=>`⊀`,npreceq:()=>aB,nrArr:()=>`⇏`,nrarr:()=>`↛`,nrarrc:()=>sB,nrarrw:()=>cB,nrightarrow:()=>`↛`,nrtri:()=>`⋫`,nrtrie:()=>`⋭`,nsc:()=>`⊁`,nsccue:()=>`⋡`,nsce:()=>lB,nscr:()=>dB,nshortmid:()=>`∤`,nshortparallel:()=>`∦`,nsim:()=>`≁`,nsime:()=>`≄`,nsimeq:()=>`≄`,nsmid:()=>`∤`,nspar:()=>`∦`,nsqsube:()=>`⋢`,nsqsupe:()=>`⋣`,nsub:()=>`⊄`,nsubE:()=>fB,nsube:()=>`⊈`,nsubset:()=>pB,nsubseteq:()=>`⊈`,nsubseteqq:()=>mB,nsucc:()=>`⊁`,nsucceq:()=>hB,nsup:()=>`⊅`,nsupE:()=>gB,nsupe:()=>`⊉`,nsupset:()=>_B,nsupseteq:()=>`⊉`,nsupseteqq:()=>vB,ntgl:()=>`≹`,ntilde:()=>`ñ`,ntlg:()=>`≸`,ntriangleleft:()=>`⋪`,ntrianglelefteq:()=>`⋬`,ntriangleright:()=>`⋫`,ntrianglerighteq:()=>`⋭`,nu:()=>`ν`,num:()=>`#`,numero:()=>`№`,numsp:()=>` `,nvDash:()=>`⊭`,nvHarr:()=>`⤄`,nvap:()=>yB,nvdash:()=>`⊬`,nvge:()=>bB,nvgt:()=>xB,nvinfin:()=>`⧞`,nvlArr:()=>`⤂`,nvle:()=>SB,nvlt:()=>CB,nvltrie:()=>wB,nvrArr:()=>`⤃`,nvrtrie:()=>TB,nvsim:()=>EB,nwArr:()=>`⇖`,nwarhk:()=>`⤣`,nwarr:()=>`↖`,nwarrow:()=>`↖`,nwnear:()=>`⤧`,oS:()=>`Ⓢ`,oacute:()=>`ó`,oast:()=>`⊛`,ocir:()=>`⊚`,ocirc:()=>`ô`,ocy:()=>`о`,odash:()=>`⊝`,odblac:()=>`ő`,odiv:()=>`⨸`,odot:()=>`⊙`,odsold:()=>`⦼`,oelig:()=>`œ`,ofcir:()=>`⦿`,ofr:()=>OB,ogon:()=>`˛`,ograve:()=>`ò`,ogt:()=>`⧁`,ohbar:()=>`⦵`,ohm:()=>`Ω`,oint:()=>`∮`,olarr:()=>`↺`,olcir:()=>`⦾`,olcross:()=>`⦻`,oline:()=>`‾`,olt:()=>`⧀`,omacr:()=>`ō`,omega:()=>`ω`,omicron:()=>`ο`,omid:()=>`⦶`,ominus:()=>`⊖`,oopf:()=>AB,opar:()=>`⦷`,operp:()=>`⦹`,oplus:()=>`⊕`,or:()=>`∨`,orarr:()=>`↻`,ord:()=>`⩝`,order:()=>`ℴ`,orderof:()=>`ℴ`,ordf:()=>`ª`,ordm:()=>`º`,origof:()=>`⊶`,oror:()=>`⩖`,orslope:()=>`⩗`,orv:()=>`⩛`,oscr:()=>`ℴ`,oslash:()=>`ø`,osol:()=>`⊘`,otilde:()=>`õ`,otimes:()=>`⊗`,otimesas:()=>`⨶`,ouml:()=>`ö`,ovbar:()=>`⌽`,par:()=>`∥`,para:()=>`¶`,parallel:()=>`∥`,parsim:()=>`⫳`,parsl:()=>`⫽`,part:()=>`∂`,pcy:()=>`п`,percnt:()=>`%`,period:()=>`.`,permil:()=>`‰`,perp:()=>`⊥`,pertenk:()=>`‱`,pfr:()=>NB,phi:()=>`φ`,phiv:()=>`ϕ`,phmmat:()=>`ℳ`,phone:()=>`☎`,pi:()=>`π`,pitchfork:()=>`⋔`,piv:()=>`ϖ`,planck:()=>`ℏ`,planckh:()=>`ℎ`,plankv:()=>`ℏ`,plus:()=>`+`,plusacir:()=>`⨣`,plusb:()=>`⊞`,pluscir:()=>`⨢`,plusdo:()=>`∔`,plusdu:()=>`⨥`,pluse:()=>`⩲`,plusmn:()=>`±`,plussim:()=>`⨦`,plustwo:()=>`⨧`,pm:()=>`±`,pointint:()=>`⨕`,popf:()=>PB,pound:()=>`£`,pr:()=>`≺`,prE:()=>`⪳`,prap:()=>`⪷`,prcue:()=>`≼`,pre:()=>`⪯`,prec:()=>`≺`,precapprox:()=>`⪷`,preccurlyeq:()=>`≼`,preceq:()=>`⪯`,precnapprox:()=>`⪹`,precneqq:()=>`⪵`,precnsim:()=>`⋨`,precsim:()=>`≾`,prime:()=>`′`,primes:()=>`ℙ`,prnE:()=>`⪵`,prnap:()=>`⪹`,prnsim:()=>`⋨`,prod:()=>`∏`,profalar:()=>`⌮`,profline:()=>`⌒`,profsurf:()=>`⌓`,prop:()=>`∝`,propto:()=>`∝`,prsim:()=>`≾`,prurel:()=>`⊰`,pscr:()=>IB,psi:()=>`ψ`,puncsp:()=>` `,qfr:()=>RB,qint:()=>`⨌`,qopf:()=>zB,qprime:()=>`⁗`,qscr:()=>VB,quaternions:()=>`ℍ`,quatint:()=>`⨖`,quest:()=>`?`,questeq:()=>`≟`,quot:()=>`"`,rAarr:()=>`⇛`,rArr:()=>`⇒`,rAtail:()=>`⤜`,rBarr:()=>`⤏`,rHar:()=>`⥤`,race:()=>HB,racute:()=>`ŕ`,radic:()=>`√`,raemptyv:()=>`⦳`,rang:()=>`⟩`,rangd:()=>`⦒`,range:()=>`⦥`,rangle:()=>`⟩`,raquo:()=>`»`,rarr:()=>`→`,rarrap:()=>`⥵`,rarrb:()=>`⇥`,rarrbfs:()=>`⤠`,rarrc:()=>`⤳`,rarrfs:()=>`⤞`,rarrhk:()=>`↪`,rarrlp:()=>`↬`,rarrpl:()=>`⥅`,rarrsim:()=>`⥴`,rarrtl:()=>`↣`,rarrw:()=>`↝`,ratail:()=>`⤚`,ratio:()=>`∶`,rationals:()=>`ℚ`,rbarr:()=>`⤍`,rbbrk:()=>`❳`,rbrace:()=>`}`,rbrack:()=>`]`,rbrke:()=>`⦌`,rbrksld:()=>`⦎`,rbrkslu:()=>`⦐`,rcaron:()=>`ř`,rcedil:()=>`ŗ`,rceil:()=>`⌉`,rcub:()=>`}`,rcy:()=>`р`,rdca:()=>`⤷`,rdldhar:()=>`⥩`,rdquo:()=>`”`,rdquor:()=>`”`,rdsh:()=>`↳`,real:()=>`ℜ`,realine:()=>`ℛ`,realpart:()=>`ℜ`,reals:()=>`ℝ`,rect:()=>`▭`,reg:()=>`®`,rfisht:()=>`⥽`,rfloor:()=>`⌋`,rfr:()=>UB,rhard:()=>`⇁`,rharu:()=>`⇀`,rharul:()=>`⥬`,rho:()=>`ρ`,rhov:()=>`ϱ`,rightarrow:()=>`→`,rightarrowtail:()=>`↣`,rightharpoondown:()=>`⇁`,rightharpoonup:()=>`⇀`,rightleftarrows:()=>`⇄`,rightleftharpoons:()=>`⇌`,rightrightarrows:()=>`⇉`,rightsquigarrow:()=>`↝`,rightthreetimes:()=>`⋌`,ring:()=>`˚`,risingdotseq:()=>`≓`,rlarr:()=>`⇄`,rlhar:()=>`⇌`,rlm:()=>``,rmoust:()=>`⎱`,rmoustache:()=>`⎱`,rnmid:()=>`⫮`,roang:()=>`⟭`,roarr:()=>`⇾`,robrk:()=>`⟧`,ropar:()=>`⦆`,ropf:()=>WB,roplus:()=>`⨮`,rotimes:()=>`⨵`,rpar:()=>`)`,rpargt:()=>`⦔`,rppolint:()=>`⨒`,rrarr:()=>`⇉`,rsaquo:()=>`›`,rscr:()=>GB,rsh:()=>`↱`,rsqb:()=>`]`,rsquo:()=>`’`,rsquor:()=>`’`,rthree:()=>`⋌`,rtimes:()=>`⋊`,rtri:()=>`▹`,rtrie:()=>`⊵`,rtrif:()=>`▸`,rtriltri:()=>`⧎`,ruluhar:()=>`⥨`,rx:()=>`℞`,sacute:()=>`ś`,sbquo:()=>`‚`,sc:()=>`≻`,scE:()=>`⪴`,scap:()=>`⪸`,scaron:()=>`š`,sccue:()=>`≽`,sce:()=>`⪰`,scedil:()=>`ş`,scirc:()=>`ŝ`,scnE:()=>`⪶`,scnap:()=>`⪺`,scnsim:()=>`⋩`,scpolint:()=>`⨓`,scsim:()=>`≿`,scy:()=>`с`,sdot:()=>`⋅`,sdotb:()=>`⊡`,sdote:()=>`⩦`,seArr:()=>`⇘`,searhk:()=>`⤥`,searr:()=>`↘`,searrow:()=>`↘`,sect:()=>`§`,semi:()=>`;`,seswar:()=>`⤩`,setminus:()=>`∖`,setmn:()=>`∖`,sext:()=>`✶`,sfr:()=>qB,sfrown:()=>`⌢`,sharp:()=>`♯`,shchcy:()=>`щ`,shcy:()=>`ш`,shortmid:()=>`∣`,shortparallel:()=>`∥`,shy:()=>``,sigma:()=>`σ`,sigmaf:()=>`ς`,sigmav:()=>`ς`,sim:()=>`∼`,simdot:()=>`⩪`,sime:()=>`≃`,simeq:()=>`≃`,simg:()=>`⪞`,simgE:()=>`⪠`,siml:()=>`⪝`,simlE:()=>`⪟`,simne:()=>`≆`,simplus:()=>`⨤`,simrarr:()=>`⥲`,slarr:()=>`←`,smallsetminus:()=>`∖`,smashp:()=>`⨳`,smeparsl:()=>`⧤`,smid:()=>`∣`,smile:()=>`⌣`,smt:()=>`⪪`,smte:()=>`⪬`,smtes:()=>JB,softcy:()=>`ь`,sol:()=>`/`,solb:()=>`⧄`,solbar:()=>`⌿`,sopf:()=>XB,spades:()=>`♠`,spadesuit:()=>`♠`,spar:()=>`∥`,sqcap:()=>`⊓`,sqcaps:()=>ZB,sqcup:()=>`⊔`,sqcups:()=>QB,sqsub:()=>`⊏`,sqsube:()=>`⊑`,sqsubset:()=>`⊏`,sqsubseteq:()=>`⊑`,sqsup:()=>`⊐`,sqsupe:()=>`⊒`,sqsupset:()=>`⊐`,sqsupseteq:()=>`⊒`,squ:()=>`□`,square:()=>`□`,squarf:()=>`▪`,squf:()=>`▪`,srarr:()=>`→`,sscr:()=>eV,ssetmn:()=>`∖`,ssmile:()=>`⌣`,sstarf:()=>`⋆`,star:()=>`☆`,starf:()=>`★`,straightepsilon:()=>`ϵ`,straightphi:()=>`ϕ`,strns:()=>`¯`,sub:()=>`⊂`,subE:()=>`⫅`,subdot:()=>`⪽`,sube:()=>`⊆`,subedot:()=>`⫃`,submult:()=>`⫁`,subnE:()=>`⫋`,subne:()=>`⊊`,subplus:()=>`⪿`,subrarr:()=>`⥹`,subset:()=>`⊂`,subseteq:()=>`⊆`,subseteqq:()=>`⫅`,subsetneq:()=>`⊊`,subsetneqq:()=>`⫋`,subsim:()=>`⫇`,subsub:()=>`⫕`,subsup:()=>`⫓`,succ:()=>`≻`,succapprox:()=>`⪸`,succcurlyeq:()=>`≽`,succeq:()=>`⪰`,succnapprox:()=>`⪺`,succneqq:()=>`⪶`,succnsim:()=>`⋩`,succsim:()=>`≿`,sum:()=>`∑`,sung:()=>`♪`,sup:()=>`⊃`,sup1:()=>`¹`,sup2:()=>`²`,sup3:()=>`³`,supE:()=>`⫆`,supdot:()=>`⪾`,supdsub:()=>`⫘`,supe:()=>`⊇`,supedot:()=>`⫄`,suphsol:()=>`⟉`,suphsub:()=>`⫗`,suplarr:()=>`⥻`,supmult:()=>`⫂`,supnE:()=>`⫌`,supne:()=>`⊋`,supplus:()=>`⫀`,supset:()=>`⊃`,supseteq:()=>`⊇`,supseteqq:()=>`⫆`,supsetneq:()=>`⊋`,supsetneqq:()=>`⫌`,supsim:()=>`⫈`,supsub:()=>`⫔`,supsup:()=>`⫖`,swArr:()=>`⇙`,swarhk:()=>`⤦`,swarr:()=>`↙`,swarrow:()=>`↙`,swnwar:()=>`⤪`,szlig:()=>`ß`,target:()=>`⌖`,tau:()=>`τ`,tbrk:()=>`⎴`,tcaron:()=>`ť`,tcedil:()=>`ţ`,tcy:()=>`т`,tdot:()=>`⃛`,telrec:()=>`⌕`,tfr:()=>nV,there4:()=>`∴`,therefore:()=>`∴`,theta:()=>`θ`,thetasym:()=>`ϑ`,thetav:()=>`ϑ`,thickapprox:()=>`≈`,thicksim:()=>`∼`,thinsp:()=>` `,thkap:()=>`≈`,thksim:()=>`∼`,thorn:()=>`þ`,tilde:()=>`˜`,times:()=>`×`,timesb:()=>`⊠`,timesbar:()=>`⨱`,timesd:()=>`⨰`,tint:()=>`∭`,toea:()=>`⤨`,top:()=>`⊤`,topbot:()=>`⌶`,topcir:()=>`⫱`,topf:()=>aV,topfork:()=>`⫚`,tosa:()=>`⤩`,tprime:()=>`‴`,trade:()=>`™`,triangle:()=>`▵`,triangledown:()=>`▿`,triangleleft:()=>`◃`,trianglelefteq:()=>`⊴`,triangleq:()=>`≜`,triangleright:()=>`▹`,trianglerighteq:()=>`⊵`,tridot:()=>`◬`,trie:()=>`≜`,triminus:()=>`⨺`,triplus:()=>`⨹`,trisb:()=>`⧍`,tritime:()=>`⨻`,trpezium:()=>`⏢`,tscr:()=>sV,tscy:()=>`ц`,tshcy:()=>`ћ`,tstrok:()=>`ŧ`,twixt:()=>`≬`,twoheadleftarrow:()=>`↞`,twoheadrightarrow:()=>`↠`,uArr:()=>`⇑`,uHar:()=>`⥣`,uacute:()=>`ú`,uarr:()=>`↑`,ubrcy:()=>`ў`,ubreve:()=>`ŭ`,ucirc:()=>`û`,ucy:()=>`у`,udarr:()=>`⇅`,udblac:()=>`ű`,udhar:()=>`⥮`,ufisht:()=>`⥾`,ufr:()=>lV,ugrave:()=>`ù`,uharl:()=>`↿`,uharr:()=>`↾`,uhblk:()=>`▀`,ulcorn:()=>`⌜`,ulcorner:()=>`⌜`,ulcrop:()=>`⌏`,ultri:()=>`◸`,umacr:()=>`ū`,uml:()=>`¨`,uogon:()=>`ų`,uopf:()=>dV,uparrow:()=>`↑`,updownarrow:()=>`↕`,upharpoonleft:()=>`↿`,upharpoonright:()=>`↾`,uplus:()=>`⊎`,upsi:()=>`υ`,upsih:()=>`ϒ`,upsilon:()=>`υ`,upuparrows:()=>`⇈`,urcorn:()=>`⌝`,urcorner:()=>`⌝`,urcrop:()=>`⌎`,uring:()=>`ů`,urtri:()=>`◹`,uscr:()=>pV,utdot:()=>`⋰`,utilde:()=>`ũ`,utri:()=>`▵`,utrif:()=>`▴`,uuarr:()=>`⇈`,uuml:()=>`ü`,uwangle:()=>`⦧`,vArr:()=>`⇕`,vBar:()=>`⫨`,vBarv:()=>`⫩`,vDash:()=>`⊨`,vangrt:()=>`⦜`,varepsilon:()=>`ϵ`,varkappa:()=>`ϰ`,varnothing:()=>`∅`,varphi:()=>`ϕ`,varpi:()=>`ϖ`,varpropto:()=>`∝`,varr:()=>`↕`,varrho:()=>`ϱ`,varsigma:()=>`ς`,varsubsetneq:()=>mV,varsubsetneqq:()=>hV,varsupsetneq:()=>gV,varsupsetneqq:()=>_V,vartheta:()=>`ϑ`,vartriangleleft:()=>`⊲`,vartriangleright:()=>`⊳`,vcy:()=>`в`,vdash:()=>`⊢`,vee:()=>`∨`,veebar:()=>`⊻`,veeeq:()=>`≚`,vellip:()=>`⋮`,verbar:()=>`|`,vert:()=>`|`,vfr:()=>yV,vltri:()=>`⊲`,vnsub:()=>bV,vnsup:()=>xV,vopf:()=>CV,vprop:()=>`∝`,vrtri:()=>`⊳`,vscr:()=>TV,vsubnE:()=>EV,vsubne:()=>DV,vsupnE:()=>OV,vsupne:()=>kV,vzigzag:()=>`⦚`,wcirc:()=>`ŵ`,wedbar:()=>`⩟`,wedge:()=>`∧`,wedgeq:()=>`≙`,weierp:()=>`℘`,wfr:()=>jV,wopf:()=>NV,wp:()=>`℘`,wr:()=>`≀`,wreath:()=>`≀`,wscr:()=>FV,xcap:()=>`⋂`,xcirc:()=>`◯`,xcup:()=>`⋃`,xdtri:()=>`▽`,xfr:()=>LV,xhArr:()=>`⟺`,xharr:()=>`⟷`,xi:()=>`ξ`,xlArr:()=>`⟸`,xlarr:()=>`⟵`,xmap:()=>`⟼`,xnis:()=>`⋻`,xodot:()=>`⨀`,xopf:()=>zV,xoplus:()=>`⨁`,xotime:()=>`⨂`,xrArr:()=>`⟹`,xrarr:()=>`⟶`,xscr:()=>VV,xsqcup:()=>`⨆`,xuplus:()=>`⨄`,xutri:()=>`△`,xvee:()=>`⋁`,xwedge:()=>`⋀`,yacute:()=>`ý`,yacy:()=>`я`,ycirc:()=>`ŷ`,ycy:()=>`ы`,yen:()=>`¥`,yfr:()=>UV,yicy:()=>`ї`,yopf:()=>GV,yscr:()=>qV,yucy:()=>`ю`,yuml:()=>`ÿ`,zacute:()=>`ź`,zcaron:()=>`ž`,zcy:()=>`з`,zdot:()=>`ż`,zeetrf:()=>`ℨ`,zeta:()=>`ζ`,zfr:()=>JV,zhcy:()=>`ж`,zigrarr:()=>`⇝`,zopf:()=>YV,zscr:()=>ZV,zwj:()=>``,zwnj:()=>``}),UL,WL,GL,KL,qL,JL,YL,XL,ZL,QL,$L,eR,tR,nR,rR,iR,aR,oR,sR,cR,lR,uR,dR,fR,pR,mR,hR,gR,_R,vR,yR,bR,xR,SR,CR,wR,TR,ER,DR,OR,kR,AR,jR,MR,NR,PR,FR,IR,LR,RR,zR,BR,VR,HR,UR,WR,GR,KR,qR,JR,YR,XR,ZR,QR,$R,ez,tz,nz,rz,iz,az,oz,sz,cz,lz,uz,dz,fz,pz,mz,hz,gz,_z,vz,yz,bz,xz,Sz,Cz,wz,Tz,Ez,Dz,Oz,kz,Az,jz,Mz,Nz,Pz,Fz,Iz,Lz,Rz,zz,Bz,Vz,Hz,Uz,Wz,Gz,Kz,qz,Jz,Yz,Xz,Zz,Qz,$z,eB,tB,nB,rB,iB,aB,oB,sB,cB,lB,uB,dB,fB,pB,mB,hB,gB,_B,vB,yB,bB,xB,SB,CB,wB,TB,EB,DB,OB,kB,AB,jB,MB,NB,PB,FB,IB,LB,RB,zB,BB,VB,HB,UB,WB,GB,KB,qB,JB,YB,XB,ZB,QB,$B,eV,tV,nV,rV,iV,aV,oV,sV,cV,lV,uV,dV,fV,pV,mV,hV,gV,_V,vV,yV,bV,xV,SV,CV,wV,TV,EV,DV,OV,kV,AV,jV,MV,NV,PV,FV,IV,LV,RV,zV,BV,VV,HV,UV,WV,GV,KV,qV,JV,YV,XV,ZV,QV,$V=t((()=>{UL=`∾̳`,WL=`𝔄`,GL=`𝔞`,KL=`𝔸`,qL=`𝕒`,JL=`𝒜`,YL=`𝒶`,XL=`𝔅`,ZL=`𝔟`,QL=`=⃥`,$L=`≡⃥`,eR=`𝔹`,tR=`𝕓`,nR=`𝒷`,rR=`∩︀`,iR=`𝔠`,aR=`𝕔`,oR=`𝒞`,sR=`𝒸`,cR=`∪︀`,lR=`𝔇`,uR=`𝔡`,dR=`𝔻`,fR=`𝕕`,pR=`𝒟`,mR=`𝒹`,hR=`𝔈`,gR=`𝔢`,_R=`𝔼`,vR=`𝕖`,yR=`𝔉`,bR=`𝔣`,xR=`𝔽`,SR=`𝕗`,CR=`𝒻`,wR=`⋛︀`,TR=`𝔊`,ER=`𝔤`,DR=`𝔾`,OR=`𝕘`,kR=`𝒢`,AR=`≩︀`,jR=`≩︀`,MR=`𝔥`,NR=`𝕙`,PR=`𝒽`,FR=`𝔦`,IR=`𝕀`,LR=`𝕚`,RR=`𝒾`,zR=`𝔍`,BR=`𝔧`,VR=`𝕁`,HR=`𝕛`,UR=`𝒥`,WR=`𝒿`,GR=`𝔎`,KR=`𝔨`,qR=`𝕂`,JR=`𝕜`,YR=`𝒦`,XR=`𝓀`,ZR=`⪭︀`,QR=`⋚︀`,$R=`𝔏`,ez=`𝔩`,tz=`𝕃`,nz=`𝕝`,rz=`𝓁`,iz=`≨︀`,az=`≨︀`,oz=`𝔐`,sz=`𝔪`,cz=`𝕄`,lz=`𝕞`,uz=`𝓂`,dz=`∠⃒`,fz=`⩰̸`,pz=`≋̸`,mz=`≎̸`,hz=`≏̸`,gz=`⩭̸`,_z=`≐̸`,vz=`≂̸`,yz=`𝔑`,bz=`𝔫`,xz=`≧̸`,Sz=`≧̸`,Cz=`⩾̸`,wz=`⩾̸`,Tz=`⋙̸`,Ez=`≫⃒`,Dz=`≫̸`,Oz=`≦̸`,kz=`≦̸`,Az=`⩽̸`,jz=`⩽̸`,Mz=`⋘̸`,Nz=`≪⃒`,Pz=`≪̸`,Fz=`𝕟`,Iz=`≂̸`,Lz=`≧̸`,Rz=`≫̸`,zz=`⩾̸`,Bz=`≎̸`,Vz=`≏̸`,Hz=`⋵̸`,Uz=`⋹̸`,Wz=`⧏̸`,Gz=`≪̸`,Kz=`⩽̸`,qz=`⪢̸`,Jz=`⪡̸`,Yz=`⪯̸`,Xz=`⧐̸`,Zz=`⊏̸`,Qz=`⊐̸`,$z=`⊂⃒`,eB=`⪰̸`,tB=`≿̸`,nB=`⊃⃒`,rB=`⫽⃥`,iB=`∂̸`,aB=`⪯̸`,oB=`⪯̸`,sB=`⤳̸`,cB=`↝̸`,lB=`⪰̸`,uB=`𝒩`,dB=`𝓃`,fB=`⫅̸`,pB=`⊂⃒`,mB=`⫅̸`,hB=`⪰̸`,gB=`⫆̸`,_B=`⊃⃒`,vB=`⫆̸`,yB=`≍⃒`,bB=`≥⃒`,xB=`>⃒`,SB=`≤⃒`,CB=`<⃒`,wB=`⊴⃒`,TB=`⊵⃒`,EB=`∼⃒`,DB=`𝔒`,OB=`𝔬`,kB=`𝕆`,AB=`𝕠`,jB=`𝒪`,MB=`𝔓`,NB=`𝔭`,PB=`𝕡`,FB=`𝒫`,IB=`𝓅`,LB=`𝔔`,RB=`𝔮`,zB=`𝕢`,BB=`𝒬`,VB=`𝓆`,HB=`∽̱`,UB=`𝔯`,WB=`𝕣`,GB=`𝓇`,KB=`𝔖`,qB=`𝔰`,JB=`⪬︀`,YB=`𝕊`,XB=`𝕤`,ZB=`⊓︀`,QB=`⊔︀`,$B=`𝒮`,eV=`𝓈`,tV=`𝔗`,nV=`𝔱`,rV=` `,iV=`𝕋`,aV=`𝕥`,oV=`𝒯`,sV=`𝓉`,cV=`𝔘`,lV=`𝔲`,uV=`𝕌`,dV=`𝕦`,fV=`𝒰`,pV=`𝓊`,mV=`⊊︀`,hV=`⫋︀`,gV=`⊋︀`,_V=`⫌︀`,vV=`𝔙`,yV=`𝔳`,bV=`⊂⃒`,xV=`⊃⃒`,SV=`𝕍`,CV=`𝕧`,wV=`𝒱`,TV=`𝓋`,EV=`⫋︀`,DV=`⊊︀`,OV=`⫌︀`,kV=`⊋︀`,AV=`𝔚`,jV=`𝔴`,MV=`𝕎`,NV=`𝕨`,PV=`𝒲`,FV=`𝓌`,IV=`𝔛`,LV=`𝔵`,RV=`𝕏`,zV=`𝕩`,BV=`𝒳`,VV=`𝓍`,HV=`𝔜`,UV=`𝔶`,WV=`𝕐`,GV=`𝕪`,KV=`𝒴`,qV=`𝓎`,JV=`𝔷`,YV=`𝕫`,XV=`𝒵`,ZV=`𝓏`,QV={Aacute:`Á`,aacute:`á`,Abreve:`Ă`,abreve:`ă`,ac:`∾`,acd:`∿`,acE:UL,Acirc:`Â`,acirc:`â`,acute:`´`,Acy:`А`,acy:`а`,AElig:`Æ`,aelig:`æ`,af:``,Afr:WL,afr:GL,Agrave:`À`,agrave:`à`,alefsym:`ℵ`,aleph:`ℵ`,Alpha:`Α`,alpha:`α`,Amacr:`Ā`,amacr:`ā`,amalg:`⨿`,amp:`&`,AMP:`&`,andand:`⩕`,And:`⩓`,and:`∧`,andd:`⩜`,andslope:`⩘`,andv:`⩚`,ang:`∠`,ange:`⦤`,angle:`∠`,angmsdaa:`⦨`,angmsdab:`⦩`,angmsdac:`⦪`,angmsdad:`⦫`,angmsdae:`⦬`,angmsdaf:`⦭`,angmsdag:`⦮`,angmsdah:`⦯`,angmsd:`∡`,angrt:`∟`,angrtvb:`⊾`,angrtvbd:`⦝`,angsph:`∢`,angst:`Å`,angzarr:`⍼`,Aogon:`Ą`,aogon:`ą`,Aopf:KL,aopf:qL,apacir:`⩯`,ap:`≈`,apE:`⩰`,ape:`≊`,apid:`≋`,apos:`'`,ApplyFunction:``,approx:`≈`,approxeq:`≊`,Aring:`Å`,aring:`å`,Ascr:JL,ascr:YL,Assign:`≔`,ast:`*`,asymp:`≈`,asympeq:`≍`,Atilde:`Ã`,atilde:`ã`,Auml:`Ä`,auml:`ä`,awconint:`∳`,awint:`⨑`,backcong:`≌`,backepsilon:`϶`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,Backslash:`∖`,Barv:`⫧`,barvee:`⊽`,barwed:`⌅`,Barwed:`⌆`,barwedge:`⌅`,bbrk:`⎵`,bbrktbrk:`⎶`,bcong:`≌`,Bcy:`Б`,bcy:`б`,bdquo:`„`,becaus:`∵`,because:`∵`,Because:`∵`,bemptyv:`⦰`,bepsi:`϶`,bernou:`ℬ`,Bernoullis:`ℬ`,Beta:`Β`,beta:`β`,beth:`ℶ`,between:`≬`,Bfr:XL,bfr:ZL,bigcap:`⋂`,bigcirc:`◯`,bigcup:`⋃`,bigodot:`⨀`,bigoplus:`⨁`,bigotimes:`⨂`,bigsqcup:`⨆`,bigstar:`★`,bigtriangledown:`▽`,bigtriangleup:`△`,biguplus:`⨄`,bigvee:`⋁`,bigwedge:`⋀`,bkarow:`⤍`,blacklozenge:`⧫`,blacksquare:`▪`,blacktriangle:`▴`,blacktriangledown:`▾`,blacktriangleleft:`◂`,blacktriangleright:`▸`,blank:`␣`,blk12:`▒`,blk14:`░`,blk34:`▓`,block:`█`,bne:QL,bnequiv:$L,bNot:`⫭`,bnot:`⌐`,Bopf:eR,bopf:tR,bot:`⊥`,bottom:`⊥`,bowtie:`⋈`,boxbox:`⧉`,boxdl:`┐`,boxdL:`╕`,boxDl:`╖`,boxDL:`╗`,boxdr:`┌`,boxdR:`╒`,boxDr:`╓`,boxDR:`╔`,boxh:`─`,boxH:`═`,boxhd:`┬`,boxHd:`╤`,boxhD:`╥`,boxHD:`╦`,boxhu:`┴`,boxHu:`╧`,boxhU:`╨`,boxHU:`╩`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxul:`┘`,boxuL:`╛`,boxUl:`╜`,boxUL:`╝`,boxur:`└`,boxuR:`╘`,boxUr:`╙`,boxUR:`╚`,boxv:`│`,boxV:`║`,boxvh:`┼`,boxvH:`╪`,boxVh:`╫`,boxVH:`╬`,boxvl:`┤`,boxvL:`╡`,boxVl:`╢`,boxVL:`╣`,boxvr:`├`,boxvR:`╞`,boxVr:`╟`,boxVR:`╠`,bprime:`‵`,breve:`˘`,Breve:`˘`,brvbar:`¦`,bscr:nR,Bscr:`ℬ`,bsemi:`⁏`,bsim:`∽`,bsime:`⋍`,bsolb:`⧅`,bsol:`\\`,bsolhsub:`⟈`,bull:`•`,bullet:`•`,bump:`≎`,bumpE:`⪮`,bumpe:`≏`,Bumpeq:`≎`,bumpeq:`≏`,Cacute:`Ć`,cacute:`ć`,capand:`⩄`,capbrcup:`⩉`,capcap:`⩋`,cap:`∩`,Cap:`⋒`,capcup:`⩇`,capdot:`⩀`,CapitalDifferentialD:`ⅅ`,caps:rR,caret:`⁁`,caron:`ˇ`,Cayleys:`ℭ`,ccaps:`⩍`,Ccaron:`Č`,ccaron:`č`,Ccedil:`Ç`,ccedil:`ç`,Ccirc:`Ĉ`,ccirc:`ĉ`,Cconint:`∰`,ccups:`⩌`,ccupssm:`⩐`,Cdot:`Ċ`,cdot:`ċ`,cedil:`¸`,Cedilla:`¸`,cemptyv:`⦲`,cent:`¢`,centerdot:`·`,CenterDot:`·`,cfr:iR,Cfr:`ℭ`,CHcy:`Ч`,chcy:`ч`,check:`✓`,checkmark:`✓`,Chi:`Χ`,chi:`χ`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,CircleDot:`⊙`,circledR:`®`,circledS:`Ⓢ`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,cir:`○`,cirE:`⧃`,cire:`≗`,cirfnint:`⨐`,cirmid:`⫯`,cirscir:`⧂`,ClockwiseContourIntegral:`∲`,CloseCurlyDoubleQuote:`”`,CloseCurlyQuote:`’`,clubs:`♣`,clubsuit:`♣`,colon:`:`,Colon:`∷`,Colone:`⩴`,colone:`≔`,coloneq:`≔`,comma:`,`,commat:`@`,comp:`∁`,compfn:`∘`,complement:`∁`,complexes:`ℂ`,cong:`≅`,congdot:`⩭`,Congruent:`≡`,conint:`∮`,Conint:`∯`,ContourIntegral:`∮`,copf:aR,Copf:`ℂ`,coprod:`∐`,Coproduct:`∐`,copy:`©`,COPY:`©`,copysr:`℗`,CounterClockwiseContourIntegral:`∳`,crarr:`↵`,cross:`✗`,Cross:`⨯`,Cscr:oR,cscr:sR,csub:`⫏`,csube:`⫑`,csup:`⫐`,csupe:`⫒`,ctdot:`⋯`,cudarrl:`⤸`,cudarrr:`⤵`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cularrp:`⤽`,cupbrcap:`⩈`,cupcap:`⩆`,CupCap:`≍`,cup:`∪`,Cup:`⋓`,cupcup:`⩊`,cupdot:`⊍`,cupor:`⩅`,cups:cR,curarr:`↷`,curarrm:`⤼`,curlyeqprec:`⋞`,curlyeqsucc:`⋟`,curlyvee:`⋎`,curlywedge:`⋏`,curren:`¤`,curvearrowleft:`↶`,curvearrowright:`↷`,cuvee:`⋎`,cuwed:`⋏`,cwconint:`∲`,cwint:`∱`,cylcty:`⌭`,dagger:`†`,Dagger:`‡`,daleth:`ℸ`,darr:`↓`,Darr:`↡`,dArr:`⇓`,dash:`‐`,Dashv:`⫤`,dashv:`⊣`,dbkarow:`⤏`,dblac:`˝`,Dcaron:`Ď`,dcaron:`ď`,Dcy:`Д`,dcy:`д`,ddagger:`‡`,ddarr:`⇊`,DD:`ⅅ`,dd:`ⅆ`,DDotrahd:`⤑`,ddotseq:`⩷`,deg:`°`,Del:`∇`,Delta:`Δ`,delta:`δ`,demptyv:`⦱`,dfisht:`⥿`,Dfr:lR,dfr:uR,dHar:`⥥`,dharl:`⇃`,dharr:`⇂`,DiacriticalAcute:`´`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,DiacriticalGrave:"`",DiacriticalTilde:`˜`,diam:`⋄`,diamond:`⋄`,Diamond:`⋄`,diamondsuit:`♦`,diams:`♦`,die:`¨`,DifferentialD:`ⅆ`,digamma:`ϝ`,disin:`⋲`,div:`÷`,divide:`÷`,divideontimes:`⋇`,divonx:`⋇`,DJcy:`Ђ`,djcy:`ђ`,dlcorn:`⌞`,dlcrop:`⌍`,dollar:`$`,Dopf:dR,dopf:fR,Dot:`¨`,dot:`˙`,DotDot:`⃜`,doteq:`≐`,doteqdot:`≑`,DotEqual:`≐`,dotminus:`∸`,dotplus:`∔`,dotsquare:`⊡`,doublebarwedge:`⌆`,DoubleContourIntegral:`∯`,DoubleDot:`¨`,DoubleDownArrow:`⇓`,DoubleLeftArrow:`⇐`,DoubleLeftRightArrow:`⇔`,DoubleLeftTee:`⫤`,DoubleLongLeftArrow:`⟸`,DoubleLongLeftRightArrow:`⟺`,DoubleLongRightArrow:`⟹`,DoubleRightArrow:`⇒`,DoubleRightTee:`⊨`,DoubleUpArrow:`⇑`,DoubleUpDownArrow:`⇕`,DoubleVerticalBar:`∥`,DownArrowBar:`⤓`,downarrow:`↓`,DownArrow:`↓`,Downarrow:`⇓`,DownArrowUpArrow:`⇵`,DownBreve:`̑`,downdownarrows:`⇊`,downharpoonleft:`⇃`,downharpoonright:`⇂`,DownLeftRightVector:`⥐`,DownLeftTeeVector:`⥞`,DownLeftVectorBar:`⥖`,DownLeftVector:`↽`,DownRightTeeVector:`⥟`,DownRightVectorBar:`⥗`,DownRightVector:`⇁`,DownTeeArrow:`↧`,DownTee:`⊤`,drbkarow:`⤐`,drcorn:`⌟`,drcrop:`⌌`,Dscr:pR,dscr:mR,DScy:`Ѕ`,dscy:`ѕ`,dsol:`⧶`,Dstrok:`Đ`,dstrok:`đ`,dtdot:`⋱`,dtri:`▿`,dtrif:`▾`,duarr:`⇵`,duhar:`⥯`,dwangle:`⦦`,DZcy:`Џ`,dzcy:`џ`,dzigrarr:`⟿`,Eacute:`É`,eacute:`é`,easter:`⩮`,Ecaron:`Ě`,ecaron:`ě`,Ecirc:`Ê`,ecirc:`ê`,ecir:`≖`,ecolon:`≕`,Ecy:`Э`,ecy:`э`,eDDot:`⩷`,Edot:`Ė`,edot:`ė`,eDot:`≑`,ee:`ⅇ`,efDot:`≒`,Efr:hR,efr:gR,eg:`⪚`,Egrave:`È`,egrave:`è`,egs:`⪖`,egsdot:`⪘`,el:`⪙`,Element:`∈`,elinters:`⏧`,ell:`ℓ`,els:`⪕`,elsdot:`⪗`,Emacr:`Ē`,emacr:`ē`,empty:`∅`,emptyset:`∅`,EmptySmallSquare:`◻`,emptyv:`∅`,EmptyVerySmallSquare:`▫`,emsp13:` `,emsp14:` `,emsp:` `,ENG:`Ŋ`,eng:`ŋ`,ensp:` `,Eogon:`Ę`,eogon:`ę`,Eopf:_R,eopf:vR,epar:`⋕`,eparsl:`⧣`,eplus:`⩱`,epsi:`ε`,Epsilon:`Ε`,epsilon:`ε`,epsiv:`ϵ`,eqcirc:`≖`,eqcolon:`≕`,eqsim:`≂`,eqslantgtr:`⪖`,eqslantless:`⪕`,Equal:`⩵`,equals:`=`,EqualTilde:`≂`,equest:`≟`,Equilibrium:`⇌`,equiv:`≡`,equivDD:`⩸`,eqvparsl:`⧥`,erarr:`⥱`,erDot:`≓`,escr:`ℯ`,Escr:`ℰ`,esdot:`≐`,Esim:`⩳`,esim:`≂`,Eta:`Η`,eta:`η`,ETH:`Ð`,eth:`ð`,Euml:`Ë`,euml:`ë`,euro:`€`,excl:`!`,exist:`∃`,Exists:`∃`,expectation:`ℰ`,exponentiale:`ⅇ`,ExponentialE:`ⅇ`,fallingdotseq:`≒`,Fcy:`Ф`,fcy:`ф`,female:`♀`,ffilig:`ffi`,fflig:`ff`,ffllig:`ffl`,Ffr:yR,ffr:bR,filig:`fi`,FilledSmallSquare:`◼`,FilledVerySmallSquare:`▪`,fjlig:`fj`,flat:`♭`,fllig:`fl`,fltns:`▱`,fnof:`ƒ`,Fopf:xR,fopf:SR,forall:`∀`,ForAll:`∀`,fork:`⋔`,forkv:`⫙`,Fouriertrf:`ℱ`,fpartint:`⨍`,frac12:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`,frown:`⌢`,fscr:CR,Fscr:`ℱ`,gacute:`ǵ`,Gamma:`Γ`,gamma:`γ`,Gammad:`Ϝ`,gammad:`ϝ`,gap:`⪆`,Gbreve:`Ğ`,gbreve:`ğ`,Gcedil:`Ģ`,Gcirc:`Ĝ`,gcirc:`ĝ`,Gcy:`Г`,gcy:`г`,Gdot:`Ġ`,gdot:`ġ`,ge:`≥`,gE:`≧`,gEl:`⪌`,gel:`⋛`,geq:`≥`,geqq:`≧`,geqslant:`⩾`,gescc:`⪩`,ges:`⩾`,gesdot:`⪀`,gesdoto:`⪂`,gesdotol:`⪄`,gesl:wR,gesles:`⪔`,Gfr:TR,gfr:ER,gg:`≫`,Gg:`⋙`,ggg:`⋙`,gimel:`ℷ`,GJcy:`Ѓ`,gjcy:`ѓ`,gla:`⪥`,gl:`≷`,glE:`⪒`,glj:`⪤`,gnap:`⪊`,gnapprox:`⪊`,gne:`⪈`,gnE:`≩`,gneq:`⪈`,gneqq:`≩`,gnsim:`⋧`,Gopf:DR,gopf:OR,grave:"`",GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterGreater:`⪢`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Gscr:kR,gscr:`ℊ`,gsim:`≳`,gsime:`⪎`,gsiml:`⪐`,gtcc:`⪧`,gtcir:`⩺`,gt:`>`,GT:`>`,Gt:`≫`,gtdot:`⋗`,gtlPar:`⦕`,gtquest:`⩼`,gtrapprox:`⪆`,gtrarr:`⥸`,gtrdot:`⋗`,gtreqless:`⋛`,gtreqqless:`⪌`,gtrless:`≷`,gtrsim:`≳`,gvertneqq:AR,gvnE:jR,Hacek:`ˇ`,hairsp:` `,half:`½`,hamilt:`ℋ`,HARDcy:`Ъ`,hardcy:`ъ`,harrcir:`⥈`,harr:`↔`,hArr:`⇔`,harrw:`↭`,Hat:`^`,hbar:`ℏ`,Hcirc:`Ĥ`,hcirc:`ĥ`,hearts:`♥`,heartsuit:`♥`,hellip:`…`,hercon:`⊹`,hfr:MR,Hfr:`ℌ`,HilbertSpace:`ℋ`,hksearow:`⤥`,hkswarow:`⤦`,hoarr:`⇿`,homtht:`∻`,hookleftarrow:`↩`,hookrightarrow:`↪`,hopf:NR,Hopf:`ℍ`,horbar:`―`,HorizontalLine:`─`,hscr:PR,Hscr:`ℋ`,hslash:`ℏ`,Hstrok:`Ħ`,hstrok:`ħ`,HumpDownHump:`≎`,HumpEqual:`≏`,hybull:`⁃`,hyphen:`‐`,Iacute:`Í`,iacute:`í`,ic:``,Icirc:`Î`,icirc:`î`,Icy:`И`,icy:`и`,Idot:`İ`,IEcy:`Е`,iecy:`е`,iexcl:`¡`,iff:`⇔`,ifr:FR,Ifr:`ℑ`,Igrave:`Ì`,igrave:`ì`,ii:`ⅈ`,iiiint:`⨌`,iiint:`∭`,iinfin:`⧜`,iiota:`℩`,IJlig:`IJ`,ijlig:`ij`,Imacr:`Ī`,imacr:`ī`,image:`ℑ`,ImaginaryI:`ⅈ`,imagline:`ℐ`,imagpart:`ℑ`,imath:`ı`,Im:`ℑ`,imof:`⊷`,imped:`Ƶ`,Implies:`⇒`,incare:`℅`,in:`∈`,infin:`∞`,infintie:`⧝`,inodot:`ı`,intcal:`⊺`,int:`∫`,Int:`∬`,integers:`ℤ`,Integral:`∫`,intercal:`⊺`,Intersection:`⋂`,intlarhk:`⨗`,intprod:`⨼`,InvisibleComma:``,InvisibleTimes:``,IOcy:`Ё`,iocy:`ё`,Iogon:`Į`,iogon:`į`,Iopf:IR,iopf:LR,Iota:`Ι`,iota:`ι`,iprod:`⨼`,iquest:`¿`,iscr:RR,Iscr:`ℐ`,isin:`∈`,isindot:`⋵`,isinE:`⋹`,isins:`⋴`,isinsv:`⋳`,isinv:`∈`,it:``,Itilde:`Ĩ`,itilde:`ĩ`,Iukcy:`І`,iukcy:`і`,Iuml:`Ï`,iuml:`ï`,Jcirc:`Ĵ`,jcirc:`ĵ`,Jcy:`Й`,jcy:`й`,Jfr:zR,jfr:BR,jmath:`ȷ`,Jopf:VR,jopf:HR,Jscr:UR,jscr:WR,Jsercy:`Ј`,jsercy:`ј`,Jukcy:`Є`,jukcy:`є`,Kappa:`Κ`,kappa:`κ`,kappav:`ϰ`,Kcedil:`Ķ`,kcedil:`ķ`,Kcy:`К`,kcy:`к`,Kfr:GR,kfr:KR,kgreen:`ĸ`,KHcy:`Х`,khcy:`х`,KJcy:`Ќ`,kjcy:`ќ`,Kopf:qR,kopf:JR,Kscr:YR,kscr:XR,lAarr:`⇚`,Lacute:`Ĺ`,lacute:`ĺ`,laemptyv:`⦴`,lagran:`ℒ`,Lambda:`Λ`,lambda:`λ`,lang:`⟨`,Lang:`⟪`,langd:`⦑`,langle:`⟨`,lap:`⪅`,Laplacetrf:`ℒ`,laquo:`«`,larrb:`⇤`,larrbfs:`⤟`,larr:`←`,Larr:`↞`,lArr:`⇐`,larrfs:`⤝`,larrhk:`↩`,larrlp:`↫`,larrpl:`⤹`,larrsim:`⥳`,larrtl:`↢`,latail:`⤙`,lAtail:`⤛`,lat:`⪫`,late:`⪭`,lates:ZR,lbarr:`⤌`,lBarr:`⤎`,lbbrk:`❲`,lbrace:`{`,lbrack:`[`,lbrke:`⦋`,lbrksld:`⦏`,lbrkslu:`⦍`,Lcaron:`Ľ`,lcaron:`ľ`,Lcedil:`Ļ`,lcedil:`ļ`,lceil:`⌈`,lcub:`{`,Lcy:`Л`,lcy:`л`,ldca:`⤶`,ldquo:`“`,ldquor:`„`,ldrdhar:`⥧`,ldrushar:`⥋`,ldsh:`↲`,le:`≤`,lE:`≦`,LeftAngleBracket:`⟨`,LeftArrowBar:`⇤`,leftarrow:`←`,LeftArrow:`←`,Leftarrow:`⇐`,LeftArrowRightArrow:`⇆`,leftarrowtail:`↢`,LeftCeiling:`⌈`,LeftDoubleBracket:`⟦`,LeftDownTeeVector:`⥡`,LeftDownVectorBar:`⥙`,LeftDownVector:`⇃`,LeftFloor:`⌊`,leftharpoondown:`↽`,leftharpoonup:`↼`,leftleftarrows:`⇇`,leftrightarrow:`↔`,LeftRightArrow:`↔`,Leftrightarrow:`⇔`,leftrightarrows:`⇆`,leftrightharpoons:`⇋`,leftrightsquigarrow:`↭`,LeftRightVector:`⥎`,LeftTeeArrow:`↤`,LeftTee:`⊣`,LeftTeeVector:`⥚`,leftthreetimes:`⋋`,LeftTriangleBar:`⧏`,LeftTriangle:`⊲`,LeftTriangleEqual:`⊴`,LeftUpDownVector:`⥑`,LeftUpTeeVector:`⥠`,LeftUpVectorBar:`⥘`,LeftUpVector:`↿`,LeftVectorBar:`⥒`,LeftVector:`↼`,lEg:`⪋`,leg:`⋚`,leq:`≤`,leqq:`≦`,leqslant:`⩽`,lescc:`⪨`,les:`⩽`,lesdot:`⩿`,lesdoto:`⪁`,lesdotor:`⪃`,lesg:QR,lesges:`⪓`,lessapprox:`⪅`,lessdot:`⋖`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,lessgtr:`≶`,LessLess:`⪡`,lesssim:`≲`,LessSlantEqual:`⩽`,LessTilde:`≲`,lfisht:`⥼`,lfloor:`⌊`,Lfr:$R,lfr:ez,lg:`≶`,lgE:`⪑`,lHar:`⥢`,lhard:`↽`,lharu:`↼`,lharul:`⥪`,lhblk:`▄`,LJcy:`Љ`,ljcy:`љ`,llarr:`⇇`,ll:`≪`,Ll:`⋘`,llcorner:`⌞`,Lleftarrow:`⇚`,llhard:`⥫`,lltri:`◺`,Lmidot:`Ŀ`,lmidot:`ŀ`,lmoustache:`⎰`,lmoust:`⎰`,lnap:`⪉`,lnapprox:`⪉`,lne:`⪇`,lnE:`≨`,lneq:`⪇`,lneqq:`≨`,lnsim:`⋦`,loang:`⟬`,loarr:`⇽`,lobrk:`⟦`,longleftarrow:`⟵`,LongLeftArrow:`⟵`,Longleftarrow:`⟸`,longleftrightarrow:`⟷`,LongLeftRightArrow:`⟷`,Longleftrightarrow:`⟺`,longmapsto:`⟼`,longrightarrow:`⟶`,LongRightArrow:`⟶`,Longrightarrow:`⟹`,looparrowleft:`↫`,looparrowright:`↬`,lopar:`⦅`,Lopf:tz,lopf:nz,loplus:`⨭`,lotimes:`⨴`,lowast:`∗`,lowbar:`_`,LowerLeftArrow:`↙`,LowerRightArrow:`↘`,loz:`◊`,lozenge:`◊`,lozf:`⧫`,lpar:`(`,lparlt:`⦓`,lrarr:`⇆`,lrcorner:`⌟`,lrhar:`⇋`,lrhard:`⥭`,lrm:``,lrtri:`⊿`,lsaquo:`‹`,lscr:rz,Lscr:`ℒ`,lsh:`↰`,Lsh:`↰`,lsim:`≲`,lsime:`⪍`,lsimg:`⪏`,lsqb:`[`,lsquo:`‘`,lsquor:`‚`,Lstrok:`Ł`,lstrok:`ł`,ltcc:`⪦`,ltcir:`⩹`,lt:`<`,LT:`<`,Lt:`≪`,ltdot:`⋖`,lthree:`⋋`,ltimes:`⋉`,ltlarr:`⥶`,ltquest:`⩻`,ltri:`◃`,ltrie:`⊴`,ltrif:`◂`,ltrPar:`⦖`,lurdshar:`⥊`,luruhar:`⥦`,lvertneqq:iz,lvnE:az,macr:`¯`,male:`♂`,malt:`✠`,maltese:`✠`,Map:`⤅`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,mapstoleft:`↤`,mapstoup:`↥`,marker:`▮`,mcomma:`⨩`,Mcy:`М`,mcy:`м`,mdash:`—`,mDDot:`∺`,measuredangle:`∡`,MediumSpace:` `,Mellintrf:`ℳ`,Mfr:oz,mfr:sz,mho:`℧`,micro:`µ`,midast:`*`,midcir:`⫰`,mid:`∣`,middot:`·`,minusb:`⊟`,minus:`−`,minusd:`∸`,minusdu:`⨪`,MinusPlus:`∓`,mlcp:`⫛`,mldr:`…`,mnplus:`∓`,models:`⊧`,Mopf:cz,mopf:lz,mp:`∓`,mscr:uz,Mscr:`ℳ`,mstpos:`∾`,Mu:`Μ`,mu:`μ`,multimap:`⊸`,mumap:`⊸`,nabla:`∇`,Nacute:`Ń`,nacute:`ń`,nang:dz,nap:`≉`,napE:fz,napid:pz,napos:`ʼn`,napprox:`≉`,natural:`♮`,naturals:`ℕ`,natur:`♮`,nbsp:`\xA0`,nbump:mz,nbumpe:hz,ncap:`⩃`,Ncaron:`Ň`,ncaron:`ň`,Ncedil:`Ņ`,ncedil:`ņ`,ncong:`≇`,ncongdot:gz,ncup:`⩂`,Ncy:`Н`,ncy:`н`,ndash:`–`,nearhk:`⤤`,nearr:`↗`,neArr:`⇗`,nearrow:`↗`,ne:`≠`,nedot:_z,NegativeMediumSpace:``,NegativeThickSpace:``,NegativeThinSpace:``,NegativeVeryThinSpace:``,nequiv:`≢`,nesear:`⤨`,nesim:vz,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NewLine:`
|
|
162
162
|
`,nexist:`∄`,nexists:`∄`,Nfr:yz,nfr:bz,ngE:xz,nge:`≱`,ngeq:`≱`,ngeqq:Sz,ngeqslant:Cz,nges:wz,nGg:Tz,ngsim:`≵`,nGt:Ez,ngt:`≯`,ngtr:`≯`,nGtv:Dz,nharr:`↮`,nhArr:`⇎`,nhpar:`⫲`,ni:`∋`,nis:`⋼`,nisd:`⋺`,niv:`∋`,NJcy:`Њ`,njcy:`њ`,nlarr:`↚`,nlArr:`⇍`,nldr:`‥`,nlE:Oz,nle:`≰`,nleftarrow:`↚`,nLeftarrow:`⇍`,nleftrightarrow:`↮`,nLeftrightarrow:`⇎`,nleq:`≰`,nleqq:kz,nleqslant:Az,nles:jz,nless:`≮`,nLl:Mz,nlsim:`≴`,nLt:Nz,nlt:`≮`,nltri:`⋪`,nltrie:`⋬`,nLtv:Pz,nmid:`∤`,NoBreak:``,NonBreakingSpace:`\xA0`,nopf:Fz,Nopf:`ℕ`,Not:`⫬`,not:`¬`,NotCongruent:`≢`,NotCupCap:`≭`,NotDoubleVerticalBar:`∦`,NotElement:`∉`,NotEqual:`≠`,NotEqualTilde:Iz,NotExists:`∄`,NotGreater:`≯`,NotGreaterEqual:`≱`,NotGreaterFullEqual:Lz,NotGreaterGreater:Rz,NotGreaterLess:`≹`,NotGreaterSlantEqual:zz,NotGreaterTilde:`≵`,NotHumpDownHump:Bz,NotHumpEqual:Vz,notin:`∉`,notindot:Hz,notinE:Uz,notinva:`∉`,notinvb:`⋷`,notinvc:`⋶`,NotLeftTriangleBar:Wz,NotLeftTriangle:`⋪`,NotLeftTriangleEqual:`⋬`,NotLess:`≮`,NotLessEqual:`≰`,NotLessGreater:`≸`,NotLessLess:Gz,NotLessSlantEqual:Kz,NotLessTilde:`≴`,NotNestedGreaterGreater:qz,NotNestedLessLess:Jz,notni:`∌`,notniva:`∌`,notnivb:`⋾`,notnivc:`⋽`,NotPrecedes:`⊀`,NotPrecedesEqual:Yz,NotPrecedesSlantEqual:`⋠`,NotReverseElement:`∌`,NotRightTriangleBar:Xz,NotRightTriangle:`⋫`,NotRightTriangleEqual:`⋭`,NotSquareSubset:Zz,NotSquareSubsetEqual:`⋢`,NotSquareSuperset:Qz,NotSquareSupersetEqual:`⋣`,NotSubset:$z,NotSubsetEqual:`⊈`,NotSucceeds:`⊁`,NotSucceedsEqual:eB,NotSucceedsSlantEqual:`⋡`,NotSucceedsTilde:tB,NotSuperset:nB,NotSupersetEqual:`⊉`,NotTilde:`≁`,NotTildeEqual:`≄`,NotTildeFullEqual:`≇`,NotTildeTilde:`≉`,NotVerticalBar:`∤`,nparallel:`∦`,npar:`∦`,nparsl:rB,npart:iB,npolint:`⨔`,npr:`⊀`,nprcue:`⋠`,nprec:`⊀`,npreceq:aB,npre:oB,nrarrc:sB,nrarr:`↛`,nrArr:`⇏`,nrarrw:cB,nrightarrow:`↛`,nRightarrow:`⇏`,nrtri:`⋫`,nrtrie:`⋭`,nsc:`⊁`,nsccue:`⋡`,nsce:lB,Nscr:uB,nscr:dB,nshortmid:`∤`,nshortparallel:`∦`,nsim:`≁`,nsime:`≄`,nsimeq:`≄`,nsmid:`∤`,nspar:`∦`,nsqsube:`⋢`,nsqsupe:`⋣`,nsub:`⊄`,nsubE:fB,nsube:`⊈`,nsubset:pB,nsubseteq:`⊈`,nsubseteqq:mB,nsucc:`⊁`,nsucceq:hB,nsup:`⊅`,nsupE:gB,nsupe:`⊉`,nsupset:_B,nsupseteq:`⊉`,nsupseteqq:vB,ntgl:`≹`,Ntilde:`Ñ`,ntilde:`ñ`,ntlg:`≸`,ntriangleleft:`⋪`,ntrianglelefteq:`⋬`,ntriangleright:`⋫`,ntrianglerighteq:`⋭`,Nu:`Ν`,nu:`ν`,num:`#`,numero:`№`,numsp:` `,nvap:yB,nvdash:`⊬`,nvDash:`⊭`,nVdash:`⊮`,nVDash:`⊯`,nvge:bB,nvgt:xB,nvHarr:`⤄`,nvinfin:`⧞`,nvlArr:`⤂`,nvle:SB,nvlt:CB,nvltrie:wB,nvrArr:`⤃`,nvrtrie:TB,nvsim:EB,nwarhk:`⤣`,nwarr:`↖`,nwArr:`⇖`,nwarrow:`↖`,nwnear:`⤧`,Oacute:`Ó`,oacute:`ó`,oast:`⊛`,Ocirc:`Ô`,ocirc:`ô`,ocir:`⊚`,Ocy:`О`,ocy:`о`,odash:`⊝`,Odblac:`Ő`,odblac:`ő`,odiv:`⨸`,odot:`⊙`,odsold:`⦼`,OElig:`Œ`,oelig:`œ`,ofcir:`⦿`,Ofr:DB,ofr:OB,ogon:`˛`,Ograve:`Ò`,ograve:`ò`,ogt:`⧁`,ohbar:`⦵`,ohm:`Ω`,oint:`∮`,olarr:`↺`,olcir:`⦾`,olcross:`⦻`,oline:`‾`,olt:`⧀`,Omacr:`Ō`,omacr:`ō`,Omega:`Ω`,omega:`ω`,Omicron:`Ο`,omicron:`ο`,omid:`⦶`,ominus:`⊖`,Oopf:kB,oopf:AB,opar:`⦷`,OpenCurlyDoubleQuote:`“`,OpenCurlyQuote:`‘`,operp:`⦹`,oplus:`⊕`,orarr:`↻`,Or:`⩔`,or:`∨`,ord:`⩝`,order:`ℴ`,orderof:`ℴ`,ordf:`ª`,ordm:`º`,origof:`⊶`,oror:`⩖`,orslope:`⩗`,orv:`⩛`,oS:`Ⓢ`,Oscr:jB,oscr:`ℴ`,Oslash:`Ø`,oslash:`ø`,osol:`⊘`,Otilde:`Õ`,otilde:`õ`,otimesas:`⨶`,Otimes:`⨷`,otimes:`⊗`,Ouml:`Ö`,ouml:`ö`,ovbar:`⌽`,OverBar:`‾`,OverBrace:`⏞`,OverBracket:`⎴`,OverParenthesis:`⏜`,para:`¶`,parallel:`∥`,par:`∥`,parsim:`⫳`,parsl:`⫽`,part:`∂`,PartialD:`∂`,Pcy:`П`,pcy:`п`,percnt:`%`,period:`.`,permil:`‰`,perp:`⊥`,pertenk:`‱`,Pfr:MB,pfr:NB,Phi:`Φ`,phi:`φ`,phiv:`ϕ`,phmmat:`ℳ`,phone:`☎`,Pi:`Π`,pi:`π`,pitchfork:`⋔`,piv:`ϖ`,planck:`ℏ`,planckh:`ℎ`,plankv:`ℏ`,plusacir:`⨣`,plusb:`⊞`,pluscir:`⨢`,plus:`+`,plusdo:`∔`,plusdu:`⨥`,pluse:`⩲`,PlusMinus:`±`,plusmn:`±`,plussim:`⨦`,plustwo:`⨧`,pm:`±`,Poincareplane:`ℌ`,pointint:`⨕`,popf:PB,Popf:`ℙ`,pound:`£`,prap:`⪷`,Pr:`⪻`,pr:`≺`,prcue:`≼`,precapprox:`⪷`,prec:`≺`,preccurlyeq:`≼`,Precedes:`≺`,PrecedesEqual:`⪯`,PrecedesSlantEqual:`≼`,PrecedesTilde:`≾`,preceq:`⪯`,precnapprox:`⪹`,precneqq:`⪵`,precnsim:`⋨`,pre:`⪯`,prE:`⪳`,precsim:`≾`,prime:`′`,Prime:`″`,primes:`ℙ`,prnap:`⪹`,prnE:`⪵`,prnsim:`⋨`,prod:`∏`,Product:`∏`,profalar:`⌮`,profline:`⌒`,profsurf:`⌓`,prop:`∝`,Proportional:`∝`,Proportion:`∷`,propto:`∝`,prsim:`≾`,prurel:`⊰`,Pscr:FB,pscr:IB,Psi:`Ψ`,psi:`ψ`,puncsp:` `,Qfr:LB,qfr:RB,qint:`⨌`,qopf:zB,Qopf:`ℚ`,qprime:`⁗`,Qscr:BB,qscr:VB,quaternions:`ℍ`,quatint:`⨖`,quest:`?`,questeq:`≟`,quot:`"`,QUOT:`"`,rAarr:`⇛`,race:HB,Racute:`Ŕ`,racute:`ŕ`,radic:`√`,raemptyv:`⦳`,rang:`⟩`,Rang:`⟫`,rangd:`⦒`,range:`⦥`,rangle:`⟩`,raquo:`»`,rarrap:`⥵`,rarrb:`⇥`,rarrbfs:`⤠`,rarrc:`⤳`,rarr:`→`,Rarr:`↠`,rArr:`⇒`,rarrfs:`⤞`,rarrhk:`↪`,rarrlp:`↬`,rarrpl:`⥅`,rarrsim:`⥴`,Rarrtl:`⤖`,rarrtl:`↣`,rarrw:`↝`,ratail:`⤚`,rAtail:`⤜`,ratio:`∶`,rationals:`ℚ`,rbarr:`⤍`,rBarr:`⤏`,RBarr:`⤐`,rbbrk:`❳`,rbrace:`}`,rbrack:`]`,rbrke:`⦌`,rbrksld:`⦎`,rbrkslu:`⦐`,Rcaron:`Ř`,rcaron:`ř`,Rcedil:`Ŗ`,rcedil:`ŗ`,rceil:`⌉`,rcub:`}`,Rcy:`Р`,rcy:`р`,rdca:`⤷`,rdldhar:`⥩`,rdquo:`”`,rdquor:`”`,rdsh:`↳`,real:`ℜ`,realine:`ℛ`,realpart:`ℜ`,reals:`ℝ`,Re:`ℜ`,rect:`▭`,reg:`®`,REG:`®`,ReverseElement:`∋`,ReverseEquilibrium:`⇋`,ReverseUpEquilibrium:`⥯`,rfisht:`⥽`,rfloor:`⌋`,rfr:UB,Rfr:`ℜ`,rHar:`⥤`,rhard:`⇁`,rharu:`⇀`,rharul:`⥬`,Rho:`Ρ`,rho:`ρ`,rhov:`ϱ`,RightAngleBracket:`⟩`,RightArrowBar:`⇥`,rightarrow:`→`,RightArrow:`→`,Rightarrow:`⇒`,RightArrowLeftArrow:`⇄`,rightarrowtail:`↣`,RightCeiling:`⌉`,RightDoubleBracket:`⟧`,RightDownTeeVector:`⥝`,RightDownVectorBar:`⥕`,RightDownVector:`⇂`,RightFloor:`⌋`,rightharpoondown:`⇁`,rightharpoonup:`⇀`,rightleftarrows:`⇄`,rightleftharpoons:`⇌`,rightrightarrows:`⇉`,rightsquigarrow:`↝`,RightTeeArrow:`↦`,RightTee:`⊢`,RightTeeVector:`⥛`,rightthreetimes:`⋌`,RightTriangleBar:`⧐`,RightTriangle:`⊳`,RightTriangleEqual:`⊵`,RightUpDownVector:`⥏`,RightUpTeeVector:`⥜`,RightUpVectorBar:`⥔`,RightUpVector:`↾`,RightVectorBar:`⥓`,RightVector:`⇀`,ring:`˚`,risingdotseq:`≓`,rlarr:`⇄`,rlhar:`⇌`,rlm:``,rmoustache:`⎱`,rmoust:`⎱`,rnmid:`⫮`,roang:`⟭`,roarr:`⇾`,robrk:`⟧`,ropar:`⦆`,ropf:WB,Ropf:`ℝ`,roplus:`⨮`,rotimes:`⨵`,RoundImplies:`⥰`,rpar:`)`,rpargt:`⦔`,rppolint:`⨒`,rrarr:`⇉`,Rrightarrow:`⇛`,rsaquo:`›`,rscr:GB,Rscr:`ℛ`,rsh:`↱`,Rsh:`↱`,rsqb:`]`,rsquo:`’`,rsquor:`’`,rthree:`⋌`,rtimes:`⋊`,rtri:`▹`,rtrie:`⊵`,rtrif:`▸`,rtriltri:`⧎`,RuleDelayed:`⧴`,ruluhar:`⥨`,rx:`℞`,Sacute:`Ś`,sacute:`ś`,sbquo:`‚`,scap:`⪸`,Scaron:`Š`,scaron:`š`,Sc:`⪼`,sc:`≻`,sccue:`≽`,sce:`⪰`,scE:`⪴`,Scedil:`Ş`,scedil:`ş`,Scirc:`Ŝ`,scirc:`ŝ`,scnap:`⪺`,scnE:`⪶`,scnsim:`⋩`,scpolint:`⨓`,scsim:`≿`,Scy:`С`,scy:`с`,sdotb:`⊡`,sdot:`⋅`,sdote:`⩦`,searhk:`⤥`,searr:`↘`,seArr:`⇘`,searrow:`↘`,sect:`§`,semi:`;`,seswar:`⤩`,setminus:`∖`,setmn:`∖`,sext:`✶`,Sfr:KB,sfr:qB,sfrown:`⌢`,sharp:`♯`,SHCHcy:`Щ`,shchcy:`щ`,SHcy:`Ш`,shcy:`ш`,ShortDownArrow:`↓`,ShortLeftArrow:`←`,shortmid:`∣`,shortparallel:`∥`,ShortRightArrow:`→`,ShortUpArrow:`↑`,shy:``,Sigma:`Σ`,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,sim:`∼`,simdot:`⩪`,sime:`≃`,simeq:`≃`,simg:`⪞`,simgE:`⪠`,siml:`⪝`,simlE:`⪟`,simne:`≆`,simplus:`⨤`,simrarr:`⥲`,slarr:`←`,SmallCircle:`∘`,smallsetminus:`∖`,smashp:`⨳`,smeparsl:`⧤`,smid:`∣`,smile:`⌣`,smt:`⪪`,smte:`⪬`,smtes:JB,SOFTcy:`Ь`,softcy:`ь`,solbar:`⌿`,solb:`⧄`,sol:`/`,Sopf:YB,sopf:XB,spades:`♠`,spadesuit:`♠`,spar:`∥`,sqcap:`⊓`,sqcaps:ZB,sqcup:`⊔`,sqcups:QB,Sqrt:`√`,sqsub:`⊏`,sqsube:`⊑`,sqsubset:`⊏`,sqsubseteq:`⊑`,sqsup:`⊐`,sqsupe:`⊒`,sqsupset:`⊐`,sqsupseteq:`⊒`,square:`□`,Square:`□`,SquareIntersection:`⊓`,SquareSubset:`⊏`,SquareSubsetEqual:`⊑`,SquareSuperset:`⊐`,SquareSupersetEqual:`⊒`,SquareUnion:`⊔`,squarf:`▪`,squ:`□`,squf:`▪`,srarr:`→`,Sscr:$B,sscr:eV,ssetmn:`∖`,ssmile:`⌣`,sstarf:`⋆`,Star:`⋆`,star:`☆`,starf:`★`,straightepsilon:`ϵ`,straightphi:`ϕ`,strns:`¯`,sub:`⊂`,Sub:`⋐`,subdot:`⪽`,subE:`⫅`,sube:`⊆`,subedot:`⫃`,submult:`⫁`,subnE:`⫋`,subne:`⊊`,subplus:`⪿`,subrarr:`⥹`,subset:`⊂`,Subset:`⋐`,subseteq:`⊆`,subseteqq:`⫅`,SubsetEqual:`⊆`,subsetneq:`⊊`,subsetneqq:`⫋`,subsim:`⫇`,subsub:`⫕`,subsup:`⫓`,succapprox:`⪸`,succ:`≻`,succcurlyeq:`≽`,Succeeds:`≻`,SucceedsEqual:`⪰`,SucceedsSlantEqual:`≽`,SucceedsTilde:`≿`,succeq:`⪰`,succnapprox:`⪺`,succneqq:`⪶`,succnsim:`⋩`,succsim:`≿`,SuchThat:`∋`,sum:`∑`,Sum:`∑`,sung:`♪`,sup1:`¹`,sup2:`²`,sup3:`³`,sup:`⊃`,Sup:`⋑`,supdot:`⪾`,supdsub:`⫘`,supE:`⫆`,supe:`⊇`,supedot:`⫄`,Superset:`⊃`,SupersetEqual:`⊇`,suphsol:`⟉`,suphsub:`⫗`,suplarr:`⥻`,supmult:`⫂`,supnE:`⫌`,supne:`⊋`,supplus:`⫀`,supset:`⊃`,Supset:`⋑`,supseteq:`⊇`,supseteqq:`⫆`,supsetneq:`⊋`,supsetneqq:`⫌`,supsim:`⫈`,supsub:`⫔`,supsup:`⫖`,swarhk:`⤦`,swarr:`↙`,swArr:`⇙`,swarrow:`↙`,swnwar:`⤪`,szlig:`ß`,Tab:` `,target:`⌖`,Tau:`Τ`,tau:`τ`,tbrk:`⎴`,Tcaron:`Ť`,tcaron:`ť`,Tcedil:`Ţ`,tcedil:`ţ`,Tcy:`Т`,tcy:`т`,tdot:`⃛`,telrec:`⌕`,Tfr:tV,tfr:nV,there4:`∴`,therefore:`∴`,Therefore:`∴`,Theta:`Θ`,theta:`θ`,thetasym:`ϑ`,thetav:`ϑ`,thickapprox:`≈`,thicksim:`∼`,ThickSpace:rV,ThinSpace:` `,thinsp:` `,thkap:`≈`,thksim:`∼`,THORN:`Þ`,thorn:`þ`,tilde:`˜`,Tilde:`∼`,TildeEqual:`≃`,TildeFullEqual:`≅`,TildeTilde:`≈`,timesbar:`⨱`,timesb:`⊠`,times:`×`,timesd:`⨰`,tint:`∭`,toea:`⤨`,topbot:`⌶`,topcir:`⫱`,top:`⊤`,Topf:iV,topf:aV,topfork:`⫚`,tosa:`⤩`,tprime:`‴`,trade:`™`,TRADE:`™`,triangle:`▵`,triangledown:`▿`,triangleleft:`◃`,trianglelefteq:`⊴`,triangleq:`≜`,triangleright:`▹`,trianglerighteq:`⊵`,tridot:`◬`,trie:`≜`,triminus:`⨺`,TripleDot:`⃛`,triplus:`⨹`,trisb:`⧍`,tritime:`⨻`,trpezium:`⏢`,Tscr:oV,tscr:sV,TScy:`Ц`,tscy:`ц`,TSHcy:`Ћ`,tshcy:`ћ`,Tstrok:`Ŧ`,tstrok:`ŧ`,twixt:`≬`,twoheadleftarrow:`↞`,twoheadrightarrow:`↠`,Uacute:`Ú`,uacute:`ú`,uarr:`↑`,Uarr:`↟`,uArr:`⇑`,Uarrocir:`⥉`,Ubrcy:`Ў`,ubrcy:`ў`,Ubreve:`Ŭ`,ubreve:`ŭ`,Ucirc:`Û`,ucirc:`û`,Ucy:`У`,ucy:`у`,udarr:`⇅`,Udblac:`Ű`,udblac:`ű`,udhar:`⥮`,ufisht:`⥾`,Ufr:cV,ufr:lV,Ugrave:`Ù`,ugrave:`ù`,uHar:`⥣`,uharl:`↿`,uharr:`↾`,uhblk:`▀`,ulcorn:`⌜`,ulcorner:`⌜`,ulcrop:`⌏`,ultri:`◸`,Umacr:`Ū`,umacr:`ū`,uml:`¨`,UnderBar:`_`,UnderBrace:`⏟`,UnderBracket:`⎵`,UnderParenthesis:`⏝`,Union:`⋃`,UnionPlus:`⊎`,Uogon:`Ų`,uogon:`ų`,Uopf:uV,uopf:dV,UpArrowBar:`⤒`,uparrow:`↑`,UpArrow:`↑`,Uparrow:`⇑`,UpArrowDownArrow:`⇅`,updownarrow:`↕`,UpDownArrow:`↕`,Updownarrow:`⇕`,UpEquilibrium:`⥮`,upharpoonleft:`↿`,upharpoonright:`↾`,uplus:`⊎`,UpperLeftArrow:`↖`,UpperRightArrow:`↗`,upsi:`υ`,Upsi:`ϒ`,upsih:`ϒ`,Upsilon:`Υ`,upsilon:`υ`,UpTeeArrow:`↥`,UpTee:`⊥`,upuparrows:`⇈`,urcorn:`⌝`,urcorner:`⌝`,urcrop:`⌎`,Uring:`Ů`,uring:`ů`,urtri:`◹`,Uscr:fV,uscr:pV,utdot:`⋰`,Utilde:`Ũ`,utilde:`ũ`,utri:`▵`,utrif:`▴`,uuarr:`⇈`,Uuml:`Ü`,uuml:`ü`,uwangle:`⦧`,vangrt:`⦜`,varepsilon:`ϵ`,varkappa:`ϰ`,varnothing:`∅`,varphi:`ϕ`,varpi:`ϖ`,varpropto:`∝`,varr:`↕`,vArr:`⇕`,varrho:`ϱ`,varsigma:`ς`,varsubsetneq:mV,varsubsetneqq:hV,varsupsetneq:gV,varsupsetneqq:_V,vartheta:`ϑ`,vartriangleleft:`⊲`,vartriangleright:`⊳`,vBar:`⫨`,Vbar:`⫫`,vBarv:`⫩`,Vcy:`В`,vcy:`в`,vdash:`⊢`,vDash:`⊨`,Vdash:`⊩`,VDash:`⊫`,Vdashl:`⫦`,veebar:`⊻`,vee:`∨`,Vee:`⋁`,veeeq:`≚`,vellip:`⋮`,verbar:`|`,Verbar:`‖`,vert:`|`,Vert:`‖`,VerticalBar:`∣`,VerticalLine:`|`,VerticalSeparator:`❘`,VerticalTilde:`≀`,VeryThinSpace:` `,Vfr:vV,vfr:yV,vltri:`⊲`,vnsub:bV,vnsup:xV,Vopf:SV,vopf:CV,vprop:`∝`,vrtri:`⊳`,Vscr:wV,vscr:TV,vsubnE:EV,vsubne:DV,vsupnE:OV,vsupne:kV,Vvdash:`⊪`,vzigzag:`⦚`,Wcirc:`Ŵ`,wcirc:`ŵ`,wedbar:`⩟`,wedge:`∧`,Wedge:`⋀`,wedgeq:`≙`,weierp:`℘`,Wfr:AV,wfr:jV,Wopf:MV,wopf:NV,wp:`℘`,wr:`≀`,wreath:`≀`,Wscr:PV,wscr:FV,xcap:`⋂`,xcirc:`◯`,xcup:`⋃`,xdtri:`▽`,Xfr:IV,xfr:LV,xharr:`⟷`,xhArr:`⟺`,Xi:`Ξ`,xi:`ξ`,xlarr:`⟵`,xlArr:`⟸`,xmap:`⟼`,xnis:`⋻`,xodot:`⨀`,Xopf:RV,xopf:zV,xoplus:`⨁`,xotime:`⨂`,xrarr:`⟶`,xrArr:`⟹`,Xscr:BV,xscr:VV,xsqcup:`⨆`,xuplus:`⨄`,xutri:`△`,xvee:`⋁`,xwedge:`⋀`,Yacute:`Ý`,yacute:`ý`,YAcy:`Я`,yacy:`я`,Ycirc:`Ŷ`,ycirc:`ŷ`,Ycy:`Ы`,ycy:`ы`,yen:`¥`,Yfr:HV,yfr:UV,YIcy:`Ї`,yicy:`ї`,Yopf:WV,yopf:GV,Yscr:KV,yscr:qV,YUcy:`Ю`,yucy:`ю`,yuml:`ÿ`,Yuml:`Ÿ`,Zacute:`Ź`,zacute:`ź`,Zcaron:`Ž`,zcaron:`ž`,Zcy:`З`,zcy:`з`,Zdot:`Ż`,zdot:`ż`,zeetrf:`ℨ`,ZeroWidthSpace:``,Zeta:`Ζ`,zeta:`ζ`,zfr:JV,Zfr:`ℨ`,ZHcy:`Ж`,zhcy:`ж`,zigrarr:`⇝`,zopf:YV,Zopf:`ℤ`,Zscr:XV,zscr:ZV,zwj:``,zwnj:``}})),eH=n({AElig:()=>`Æ`,AMP:()=>`&`,Aacute:()=>`Á`,Acirc:()=>`Â`,Agrave:()=>`À`,Aring:()=>`Å`,Atilde:()=>`Ã`,Auml:()=>`Ä`,COPY:()=>`©`,Ccedil:()=>`Ç`,ETH:()=>`Ð`,Eacute:()=>`É`,Ecirc:()=>`Ê`,Egrave:()=>`È`,Euml:()=>`Ë`,GT:()=>`>`,Iacute:()=>`Í`,Icirc:()=>`Î`,Igrave:()=>`Ì`,Iuml:()=>`Ï`,LT:()=>`<`,Ntilde:()=>`Ñ`,Oacute:()=>`Ó`,Ocirc:()=>`Ô`,Ograve:()=>`Ò`,Oslash:()=>`Ø`,Otilde:()=>`Õ`,Ouml:()=>`Ö`,QUOT:()=>`"`,REG:()=>`®`,THORN:()=>`Þ`,Uacute:()=>`Ú`,Ucirc:()=>`Û`,Ugrave:()=>`Ù`,Uuml:()=>`Ü`,Yacute:()=>`Ý`,aacute:()=>`á`,acirc:()=>`â`,acute:()=>`´`,aelig:()=>`æ`,agrave:()=>`à`,amp:()=>`&`,aring:()=>`å`,atilde:()=>`ã`,auml:()=>`ä`,brvbar:()=>`¦`,ccedil:()=>`ç`,cedil:()=>`¸`,cent:()=>`¢`,copy:()=>`©`,curren:()=>`¤`,default:()=>tH,deg:()=>`°`,divide:()=>`÷`,eacute:()=>`é`,ecirc:()=>`ê`,egrave:()=>`è`,eth:()=>`ð`,euml:()=>`ë`,frac12:()=>`½`,frac14:()=>`¼`,frac34:()=>`¾`,gt:()=>`>`,iacute:()=>`í`,icirc:()=>`î`,iexcl:()=>`¡`,igrave:()=>`ì`,iquest:()=>`¿`,iuml:()=>`ï`,laquo:()=>`«`,lt:()=>`<`,macr:()=>`¯`,micro:()=>`µ`,middot:()=>`·`,nbsp:()=>`\xA0`,not:()=>`¬`,ntilde:()=>`ñ`,oacute:()=>`ó`,ocirc:()=>`ô`,ograve:()=>`ò`,ordf:()=>`ª`,ordm:()=>`º`,oslash:()=>`ø`,otilde:()=>`õ`,ouml:()=>`ö`,para:()=>`¶`,plusmn:()=>`±`,pound:()=>`£`,quot:()=>`"`,raquo:()=>`»`,reg:()=>`®`,sect:()=>`§`,shy:()=>``,sup1:()=>`¹`,sup2:()=>`²`,sup3:()=>`³`,szlig:()=>`ß`,thorn:()=>`þ`,times:()=>`×`,uacute:()=>`ú`,ucirc:()=>`û`,ugrave:()=>`ù`,uml:()=>`¨`,uuml:()=>`ü`,yacute:()=>`ý`,yen:()=>`¥`,yuml:()=>`ÿ`}),tH,nH=t((()=>{tH={Aacute:`Á`,aacute:`á`,Acirc:`Â`,acirc:`â`,acute:`´`,AElig:`Æ`,aelig:`æ`,Agrave:`À`,agrave:`à`,amp:`&`,AMP:`&`,Aring:`Å`,aring:`å`,Atilde:`Ã`,atilde:`ã`,Auml:`Ä`,auml:`ä`,brvbar:`¦`,Ccedil:`Ç`,ccedil:`ç`,cedil:`¸`,cent:`¢`,copy:`©`,COPY:`©`,curren:`¤`,deg:`°`,divide:`÷`,Eacute:`É`,eacute:`é`,Ecirc:`Ê`,ecirc:`ê`,Egrave:`È`,egrave:`è`,ETH:`Ð`,eth:`ð`,Euml:`Ë`,euml:`ë`,frac12:`½`,frac14:`¼`,frac34:`¾`,gt:`>`,GT:`>`,Iacute:`Í`,iacute:`í`,Icirc:`Î`,icirc:`î`,iexcl:`¡`,Igrave:`Ì`,igrave:`ì`,iquest:`¿`,Iuml:`Ï`,iuml:`ï`,laquo:`«`,lt:`<`,LT:`<`,macr:`¯`,micro:`µ`,middot:`·`,nbsp:`\xA0`,not:`¬`,Ntilde:`Ñ`,ntilde:`ñ`,Oacute:`Ó`,oacute:`ó`,Ocirc:`Ô`,ocirc:`ô`,Ograve:`Ò`,ograve:`ò`,ordf:`ª`,ordm:`º`,Oslash:`Ø`,oslash:`ø`,Otilde:`Õ`,otilde:`õ`,Ouml:`Ö`,ouml:`ö`,para:`¶`,plusmn:`±`,pound:`£`,quot:`"`,QUOT:`"`,raquo:`»`,reg:`®`,REG:`®`,sect:`§`,shy:``,sup1:`¹`,sup2:`²`,sup3:`³`,szlig:`ß`,THORN:`Þ`,thorn:`þ`,times:`×`,Uacute:`Ú`,uacute:`ú`,Ucirc:`Û`,ucirc:`û`,Ugrave:`Ù`,ugrave:`ù`,uml:`¨`,Uuml:`Ü`,uuml:`ü`,Yacute:`Ý`,yacute:`ý`,yen:`¥`,yuml:`ÿ`}})),rH=n({amp:()=>`&`,apos:()=>`'`,default:()=>iH,gt:()=>`>`,lt:()=>`<`,quot:()=>`"`}),iH,aH=t((()=>{iH={amp:`&`,apos:`'`,gt:`>`,lt:`<`,quot:`"`}})),oH=n({default:()=>sH}),sH,cH=t((()=>{sH={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}})),lH=r((t=>{var n=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n((cH(),e(oH).default)),i=String.fromCodePoint||function(e){var t=``;return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function a(e){return e>=55296&&e<=57343||e>1114111?`�`:(e in r.default&&(e=r.default[e]),i(e))}t.default=a})),uH=r((t=>{var n=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeHTML=t.decodeHTMLStrict=t.decodeXML=void 0;var r=n(($V(),e(HL).default)),i=n((nH(),e(eH).default)),a=n((aH(),e(rH).default)),o=n(lH()),s=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;t.decodeXML=c(a.default),t.decodeHTMLStrict=c(r.default);function c(e){var t=u(e);return function(e){return String(e).replace(s,t)}}var l=function(e,t){return e<t?1:-1};t.decodeHTML=(function(){for(var e=Object.keys(i.default).sort(l),t=Object.keys(r.default).sort(l),n=0,a=0;n<t.length;n++)e[a]===t[n]?(t[n]+=`;?`,a++):t[n]+=`;`;var o=RegExp(`&(?:`+t.join(`|`)+`|#[xX][\\da-fA-F]+;?|#\\d+;?)`,`g`),s=u(r.default);function c(e){return e.substr(-1)!==`;`&&(e+=`;`),s(e)}return function(e){return String(e).replace(o,c)}})();function u(e){return function(t){if(t.charAt(1)===`#`){var n=t.charAt(2);return n===`X`||n===`x`?o.default(parseInt(t.substr(3),16)):o.default(parseInt(t.substr(2),10))}return e[t.slice(1,-1)]||t}}})),dH=r((t=>{var n=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=void 0;var r=o(n((aH(),e(rH).default)).default),i=s(r);t.encodeXML=h(r);var a=o(n(($V(),e(HL).default)).default);t.encodeHTML=d(a,s(a)),t.encodeNonAsciiHTML=h(a);function o(e){return Object.keys(e).sort().reduce(function(t,n){return t[e[n]]=`&`+n+`;`,t},{})}function s(e){for(var t=[],n=[],r=0,i=Object.keys(e);r<i.length;r++){var a=i[r];a.length===1?t.push(`\\`+a):n.push(a)}t.sort();for(var o=0;o<t.length-1;o++){for(var s=o;s<t.length-1&&t[s].charCodeAt(1)+1===t[s+1].charCodeAt(1);)s+=1;var c=1+s-o;c<3||t.splice(o,c,t[o]+`-`+t[s])}return n.unshift(`[`+t.join(``)+`]`),new RegExp(n.join(`|`),`g`)}var c=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,l=String.prototype.codePointAt==null?function(e){return(e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536}:function(e){return e.codePointAt(0)};function u(e){return`&#x`+(e.length>1?l(e):e.charCodeAt(0)).toString(16).toUpperCase()+`;`}function d(e,t){return function(n){return n.replace(t,function(t){return e[t]}).replace(c,u)}}var f=RegExp(i.source+`|`+c.source,`g`);function p(e){return e.replace(f,u)}t.escape=p;function m(e){return e.replace(i,u)}t.escapeUTF8=m;function h(e){return function(t){return t.replace(f,function(t){return e[t]||u(t)})}}})),fH=r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXMLStrict=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTML5=e.decodeHTML4=e.decodeHTMLStrict=e.decodeHTML=e.decodeXML=e.encodeHTML5=e.encodeHTML4=e.escapeUTF8=e.escape=e.encodeNonAsciiHTML=e.encodeHTML=e.encodeXML=e.encode=e.decodeStrict=e.decode=void 0;var t=uH(),n=dH();function r(e,n){return(!n||n<=0?t.decodeXML:t.decodeHTML)(e)}e.decode=r;function i(e,n){return(!n||n<=0?t.decodeXML:t.decodeHTMLStrict)(e)}e.decodeStrict=i;function a(e,t){return(!t||t<=0?n.encodeXML:n.encodeHTML)(e)}e.encode=a;var o=dH();Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return o.encodeXML}}),Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return o.encodeNonAsciiHTML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return o.escape}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return o.escapeUTF8}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return o.encodeHTML}});var s=uH();Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return s.decodeXML}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return s.decodeXML}})})),pH=r(((e,t)=>{function n(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}function a(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=o(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
163
163
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,s=!1,c;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,c=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(s)throw c}}}}function o(e,t){if(e){if(typeof e==`string`)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}}function s(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var c=fH(),l={fg:`#FFF`,bg:`#000`,newline:!1,escapeXML:!1,stream:!1,colors:u()};function u(){var e={0:`#000`,1:`#A00`,2:`#0A0`,3:`#A50`,4:`#00A`,5:`#A0A`,6:`#0AA`,7:`#AAA`,8:`#555`,9:`#F55`,10:`#5F5`,11:`#FF5`,12:`#55F`,13:`#F5F`,14:`#5FF`,15:`#FFF`};return v(0,5).forEach(function(t){v(0,5).forEach(function(n){v(0,5).forEach(function(r){return d(t,n,r,e)})})}),v(0,23).forEach(function(t){var n=t+232,r=f(t*10+8);e[n]=`#`+r+r+r}),e}function d(e,t,n,r){var i=16+e*36+t*6+n;r[i]=p([e>0?e*40+55:0,t>0?t*40+55:0,n>0?n*40+55:0])}function f(e){for(var t=e.toString(16);t.length<2;)t=`0`+t;return t}function p(e){var t=[],n=a(e),r;try{for(n.s();!(r=n.n()).done;){var i=r.value;t.push(f(i))}}catch(e){n.e(e)}finally{n.f()}return`#`+t.join(``)}function m(e,t,n,r){var i;return t===`text`?i=x(n,r):t===`display`?i=g(e,n,r):t===`xterm256Foreground`?i=w(e,r.colors[n]):t===`xterm256Background`?i=T(e,r.colors[n]):t===`rgb`&&(i=h(e,n)),i}function h(e,t){t=t.substring(2).slice(0,-1);var n=+t.substr(0,2),r=t.substring(5).split(`;`).map(function(e){return(`0`+Number(e).toString(16)).substr(-2)}).join(``);return C(e,(n===38?`color:#`:`background-color:#`)+r)}function g(e,t,n){t=parseInt(t,10);var r={"-1":function(){return`<br/>`},0:function(){return e.length&&_(e)},1:function(){return S(e,`b`)},3:function(){return S(e,`i`)},4:function(){return S(e,`u`)},8:function(){return C(e,`display:none`)},9:function(){return S(e,`strike`)},22:function(){return C(e,`font-weight:normal;text-decoration:none;font-style:normal`)},23:function(){return E(e,`i`)},24:function(){return E(e,`u`)},39:function(){return w(e,n.fg)},49:function(){return T(e,n.bg)},53:function(){return C(e,`text-decoration:overline`)}},i;return r[t]?i=r[t]():4<t&&t<7?i=S(e,`blink`):29<t&&t<38?i=w(e,n.colors[t-30]):39<t&&t<48?i=T(e,n.colors[t-40]):89<t&&t<98?i=w(e,n.colors[8+(t-90)]):99<t&&t<108&&(i=T(e,n.colors[8+(t-100)])),i}function _(e){var t=e.slice(0);return e.length=0,t.reverse().map(function(e){return`</`+e+`>`}).join(``)}function v(e,t){for(var n=[],r=e;r<=t;r++)n.push(r);return n}function y(e){return function(t){return(e===null||t.category!==e)&&e!==`all`}}function b(e){e=parseInt(e,10);var t=null;return e===0?t=`all`:e===1?t=`bold`:2<e&&e<5?t=`underline`:4<e&&e<7?t=`blink`:e===8?t=`hide`:e===9?t=`strike`:29<e&&e<38||e===39||89<e&&e<98?t=`foreground-color`:(39<e&&e<48||e===49||99<e&&e<108)&&(t=`background-color`),t}function x(e,t){return t.escapeXML?c.encodeXML(e):e}function S(e,t,n){return n||=``,e.push(t),`<${t}${n?` style="${n}"`:``}>`}function C(e,t){return S(e,`span`,t)}function w(e,t){return S(e,`span`,`color:`+t)}function T(e,t){return S(e,`span`,`background-color:`+t)}function E(e,t){var n;if(e.slice(-1)[0]===t&&(n=e.pop()),n)return`</`+t+`>`}function D(e,t,n){var r=!1,i=3;function o(){return``}function s(e,t){return n(`xterm256Foreground`,t),``}function c(e,t){return n(`xterm256Background`,t),``}function l(e){return t.newline?n(`display`,-1):n(`text`,e),``}function u(e,t){r=!0,t.trim().length===0&&(t=`0`),t=t.trimRight(`;`).split(`;`);var i=a(t),o;try{for(i.s();!(o=i.n()).done;){var s=o.value;n(`display`,s)}}catch(e){i.e(e)}finally{i.f()}return``}function d(e){return n(`text`,e),``}function f(e){return n(`rgb`,e),``}var p=[{pattern:/^\x08+/,sub:o},{pattern:/^\x1b\[[012]?K/,sub:o},{pattern:/^\x1b\[\(B/,sub:o},{pattern:/^\x1b\[[34]8;2;\d+;\d+;\d+m/,sub:f},{pattern:/^\x1b\[38;5;(\d+)m/,sub:s},{pattern:/^\x1b\[48;5;(\d+)m/,sub:c},{pattern:/^\n/,sub:l},{pattern:/^\r+\n/,sub:l},{pattern:/^\r/,sub:l},{pattern:/^\x1b\[((?:\d{1,3};?)+|)m/,sub:u},{pattern:/^\x1b\[\d?J/,sub:o},{pattern:/^\x1b\[\d{0,3};\d{0,3}f/,sub:o},{pattern:/^\x1b\[?[\d;]{0,3}/,sub:o},{pattern:/^(([^\x1b\x08\r\n])+)/,sub:d}];function m(t,n){n>i&&r||(r=!1,e=e.replace(t.pattern,t.sub))}var h=[],g=e.length;outer:for(;g>0;){for(var _=0,v=0,y=p.length;v<y;_=++v){var b=p[_];if(m(b,_),e.length!==g){g=e.length;continue outer}}if(e.length===g)break;h.push(0),g=e.length}return h}function O(e,t,n){return t!==`text`&&(e=e.filter(y(b(n))),e.push({token:t,data:n,category:b(n)})),e}t.exports=function(){function e(t){n(this,e),t||={},t.colors&&=Object.assign({},l.colors,t.colors),this.options=Object.assign({},l,t),this.stack=[],this.stickyStack=[]}return i(e,[{key:`toHtml`,value:function(e){var t=this;e=typeof e==`string`?[e]:e;var n=this.stack,r=this.options,i=[];return this.stickyStack.forEach(function(e){var t=m(n,e.token,e.data,r);t&&i.push(t)}),D(e.join(``),r,function(e,a){var o=m(n,e,a,r);o&&i.push(o),r.stream&&(t.stickyStack=O(t.stickyStack,e,a))}),n.length&&i.push(_(n)),i.join(``)}}]),e}()}));function mH(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var hH=mH();function gH(e){hH=e}var _H={exec:()=>null};function vH(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function yH(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(xH.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var bH=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),xH={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:vH(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:vH(e=>RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:vH(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:vH(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:vH(e=>RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,`i`)),blockquoteBeginRegex:vH(e=>RegExp(`^ {0,${e}}>`))},SH=/^(?:[ \t]*(?:\n|$))+/,CH=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,wH=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,TH=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,EH=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,DH=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,OH=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,kH=yH(OH).replace(/bull/g,DH).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),AH=yH(OH).replace(/bull/g,DH).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),jH=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,MH=/^[^\n]+/,NH=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,PH=yH(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,NH).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),FH=yH(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,DH).getRegex(),IH=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,LH=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,RH=yH(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,LH).replace(`tag`,IH).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),zH=yH(jH).replace(`hr`,TH).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,IH).getRegex(),BH={blockquote:yH(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,zH).getRegex(),code:CH,def:PH,fences:wH,heading:EH,hr:TH,html:RH,lheading:kH,list:FH,newline:SH,paragraph:zH,table:_H,text:MH},VH=yH(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,TH).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,IH).getRegex(),HH={...BH,lheading:AH,table:VH,paragraph:yH(jH).replace(`hr`,TH).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,VH).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,IH).getRegex()},UH={...BH,html:yH(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,LH).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_H,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:yH(jH).replace(`hr`,TH).replace(`heading`,` *#{1,6} *[^
|
|
@@ -223,4 +223,4 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
223
223
|
${e}</tr>
|
|
224
224
|
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
225
225
|
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${kU(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=AU(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+kU(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=AU(e);if(i===null)return kU(n);e=i;let a=`<img src="${e}" alt="${kU(n)}"`;return t&&(a+=` title="${kU(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:kU(e.text)}},VU=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},HU=class e{options;renderer;textRenderer;constructor(e){this.options=e||hH,this.options.renderer=this.options.renderer||new BU,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new VU}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},UU=class{options;block;constructor(e){this.options=e||hH}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?zU.lex:zU.lexInline}provideParser(e=this.block){return e?HU.parse:HU.parseInline}},WU=new class{defaults=mH();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=HU;Renderer=BU;TextRenderer=VU;Lexer=zU;Tokenizer=RU;Hooks=UU;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new BU(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new RU(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new UU;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];UU.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&UU.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return zU.lex(e,t??this.defaults)}parser(e,t){return HU.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?zU.lex:zU.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?HU.parse:HU.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?zU.lex:zU.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?HU.parse:HU.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
226
|
-
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+kU(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function GU(e,t){return WU.parse(e,t)}GU.options=GU.setOptions=function(e){return WU.setOptions(e),GU.defaults=WU.defaults,gH(GU.defaults),GU},GU.getDefaults=mH,GU.defaults=hH,GU.use=function(...e){return WU.use(...e),GU.defaults=WU.defaults,gH(GU.defaults),GU},GU.walkTokens=function(e,t){return WU.walkTokens(e,t)},GU.parseInline=WU.parseInline,GU.Parser=HU,GU.parser=HU.parse,GU.Renderer=BU,GU.TextRenderer=VU,GU.Lexer=zU,GU.lexer=zU.lex,GU.Tokenizer=RU,GU.Hooks=UU,GU.parse=GU,GU.options,GU.setOptions,GU.use,GU.walkTokens,GU.parseInline,HU.parse,zU.lex;export{Fc as a,
|
|
226
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+kU(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function GU(e,t){return WU.parse(e,t)}GU.options=GU.setOptions=function(e){return WU.setOptions(e),GU.defaults=WU.defaults,gH(GU.defaults),GU},GU.getDefaults=mH,GU.defaults=hH,GU.use=function(...e){return WU.use(...e),GU.defaults=WU.defaults,gH(GU.defaults),GU},GU.walkTokens=function(e,t){return WU.walkTokens(e,t)},GU.parseInline=WU.parseInline,GU.Parser=HU,GU.parser=HU.parse,GU.Renderer=BU,GU.TextRenderer=VU,GU.Lexer=zU,GU.lexer=zU.lex,GU.Tokenizer=RU,GU.Hooks=UU,GU.parse=GU,GU.options,GU.setOptions,GU.use,GU.walkTokens,GU.parseInline,HU.parse,zU.lex;export{Fc as a,Pe as c,El as i,Je as l,pH as n,la as o,_N as r,ua as s,GU as t,Ye as u};
|