intlayer-editor 9.5.8 → 9.5.9
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/client/dist/assets/{CodeBlockShiki-BdXfQVsf.js → CodeBlockShiki-BLi98smi.js} +2 -2
- package/client/dist/assets/MarkDownRender-B8Si93Ww.js +1 -0
- package/client/dist/assets/{MarkDownRender-Bh-w2jLc.js → MarkDownRender-BbiEGa-x.js} +5 -5
- package/client/dist/assets/{MarkdownEditor-DmINIU5m.js → MarkdownEditor-a0tBPXjH.js} +5 -5
- package/client/dist/assets/dynamic-B5xdznUp.js +41 -0
- package/client/dist/assets/index-Dpv6RmR7.js +59 -0
- package/client/dist/assets/{shikiBundle-Bsw9CKmM.js → shikiBundle-DXvZCLBC.js} +1 -1
- package/client/dist/index.html +2 -2
- package/package.json +11 -11
- package/client/dist/assets/MarkDownRender-CbF7t9NU.js +0 -1
- package/client/dist/assets/dynamic-CGsskyoi.js +0 -41
- package/client/dist/assets/index-MF8pl923.js +0 -59
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/shikiBundle-
|
|
2
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{n}from"./dist-CcmWBeAo.js";import{d as r,l as i,o as a,u as o}from"./MarkDownRender-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/shikiBundle-DXvZCLBC.js","assets/rolldown-runtime-hePW80VL.js","assets/MarkDownRender-BbiEGa-x.js","assets/react-Cvdyeg_0.js","assets/dynamic-B5xdznUp.js","assets/dist-CcmWBeAo.js","assets/index-Dpv6RmR7.js","assets/index-CpaN47Fo.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{n}from"./dist-CcmWBeAo.js";import{d as r,l as i,o as a,u as o}from"./MarkDownRender-BbiEGa-x.js";import{l as s}from"./index-Dpv6RmR7.js";var c=e(t(),1),l=n(),u=async(e,t)=>{let{codeToHtml:n}=await s(async()=>{let{codeToHtml:e}=await import(`./shikiBundle-DXvZCLBC.js`).then(e=>e.i);return{codeToHtml:e}},__vite__mapDeps([0,1,2,3,4,5,6,7]));return n(String(e),{lang:i(t).id,themes:a,defaultColor:!1})},d=({children:e,lang:t})=>{let[n,i]=(0,c.useState)(null);return(0,c.useEffect)(()=>{let n=!1;return u(e,t).then(e=>{n||i(e)}).catch(e=>{console.error(`Failed to highlight code:`,e),n||i(``)}),()=>{n=!0}},[e,t]),(0,l.jsx)(`div`,{className:r,children:n?(0,l.jsx)(`div`,{dangerouslySetInnerHTML:{__html:n}}):(0,l.jsx)(o,{children:e})})};export{d as CodeBlockShiki};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./MarkDownRender-BbiEGa-x.js";export{e as MarkdownRenderer};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeBlockShiki-
|
|
2
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{A as n,N as r,P as i,St as a,a as o,c as s,
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeBlockShiki-BLi98smi.js","assets/rolldown-runtime-hePW80VL.js","assets/react-Cvdyeg_0.js","assets/dist-CcmWBeAo.js","assets/index-Dpv6RmR7.js","assets/dynamic-B5xdznUp.js","assets/index-CpaN47Fo.css","assets/astro-JHDYjn39.js","assets/json-B88Oqtu5.js","assets/javascript-BzbQS41l.js","assets/typescript-j_1H8WHN.js","assets/css-LbU1hoFO.js","assets/postcss-D_Wz94rJ.js","assets/tsx-BOvsFOI6.js","assets/css-CdtkT07m.js","assets/html-DYtkB_T1.js","assets/html-B2cKP6UN.js","assets/javascript-Yelw-5ZN.js","assets/json-CaljABEy.js","assets/svelte-tEuLYt3E.js","assets/tsx-5f3ulCja.js","assets/typescript-Utq2Cl8c.js","assets/vue-Bg0byEaI.js","assets/shikiBundle-DXvZCLBC.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{A as n,N as r,P as i,St as a,a as o,c as s,i as c,j as l,l as u,m as d,mt as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,xt as b}from"./dynamic-B5xdznUp.js";import{n as x,t as S}from"./dist-CcmWBeAo.js";import{l as C}from"./index-Dpv6RmR7.js";var w={blockQuote:`0`,breakLine:`1`,breakThematic:`2`,codeBlock:`3`,codeFenced:`4`,codeInline:`5`,footnote:`6`,footnoteReference:`7`,gfmTask:`8`,heading:`9`,headingSetext:`10`,htmlBlock:`11`,htmlComment:`12`,htmlSelfClosing:`13`,customComponent:`34`,image:`14`,link:`15`,linkAngleBraceStyleDetector:`16`,linkBareUrlDetector:`17`,newlineCoalescer:`19`,orderedList:`20`,paragraph:`21`,ref:`22`,refImage:`23`,refLink:`24`,table:`25`,tableSeparator:`26`,text:`27`,textBolded:`28`,textEmphasized:`29`,textEscaped:`30`,textMarked:`31`,textStrikethroughed:`32`,unorderedList:`33`},T={MAX:0,HIGH:1,MED:2,LOW:3,MIN:4},E={BLOCK:1,INLINE:2,BOTH:3},D=E.BLOCK,O=E.INLINE,k=E.BOTH,A=`allowFullScreen.autoComplete.autoFocus.autoPlay.cellPadding.cellSpacing.charSet.classId.colSpan.contentEditable.contextMenu.crossOrigin.encType.formAction.formEncType.formMethod.formNoValidate.formTarget.frameBorder.hrefLang.inputMode.keyParams.keyType.marginHeight.marginWidth.maxLength.mediaGroup.minLength.noValidate.radioGroup.readOnly.rowSpan.spellCheck.srcDoc.srcLang.srcSet.tabIndex.useMap`.split(`.`).reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:`className`,for:`htmlFor`}),j={amp:`&`,apos:`'`,gt:`>`,lt:`<`,nbsp:`\xA0`,quot:`“`},ee=[`style`,`script`,`pre`],te=[`src`,`href`,`data`,`formAction`,`srcDoc`,`action`],ne=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,re=/\n{2,}$/,ie=/^(\s*>[\s\S]*?)(?=\n\n|$)/,ae=/^ *> ?/gm,oe=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,se=/^(?=( {2,}))\1\n/,ce=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,le=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n((?:[^\n]*(?:\n|$))*?)(?:\1\n?|$)/,ue=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,de=/^([ \t]*)(`{3,}|~{3,})/,fe=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,pe=/^(?:\n *)*\n/,me=/\r\n?/g,he=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,ge=/^\[\^([^\]]+)]/,_e=/\f/g,ve=/^---[ \t]*\n(.|\n)*?\n---[ \t]*\n/,ye=/^\s*?\[(x|\s)\]/,be=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,xe=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Se=/^([^\n]+)\n *(=|-)\2{2,} *\n/,Ce=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,we=/^<!--[\s\S]*?(?:-->)/,Te=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Ee=/^\{.*\}$/,De=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,Oe=/^<([^ >]+[:@/][^ >]+)>/,ke=/-([a-z])?/gi,Ae=/^(\|[^\n]*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:[^\n]*\|[^\n]*\n)*))?\n?/,je=/(^ *\||\| *$)/g,Me=/^ *:-+: *$/,Ne=/^ *:-+ *$/,Pe=/^ *-+: *$/,Fe=/^[^\n]+(?: {2}\n|\n{2,})/,Ie=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Le=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Re=/^\[([^\]]*)\] ?\[([^\]]*)\]/,ze=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Be=/\t/g,Ve=/^\n+/,He=/^\n*([ \t]*)/,Ue=`(?:\\d+\\.)`,We=`(?:[*+-])`,Ge=/^\\([^0-9A-Za-z\s])/,Ke=/\\([^0-9A-Za-z\s])/g,qe=/^(:[a-zA-Z0-9-_]+:)/,M=e=>`(?=[\\s\\S]+?\\1${e?`\\1`:``})`,N="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\[^\\s]|[\\s\\S])+?)",Je=RegExp(`^([*_])\\1${M(1)}${N}\\1\\1(?!\\1)`),Ye=RegExp(`^([*_])${M(0)}${N}\\1(?!\\1)`),Xe=RegExp(`^(==)${M(0)}${N}\\1`),Ze=RegExp(`^(~~)${M(0)}${N}\\1`),Qe=e=>`( *)(`+(e===1?Ue:We)+`) +`,$e=Qe(1),et=Qe(2),tt=e=>RegExp(`^`+(e===1?$e:et)),nt=tt(1),rt=tt(2),it=e=>RegExp(`^`+(e===1?$e:et)+`[^\\n]*(?:\\n(?!\\1`+(e===1?Ue:We)+` )[^\\n]*)*(\\n|$)`,`gm`),at=it(1),ot=it(2),st=e=>{let t=e===1?Ue:We;return RegExp(`^( *)(`+t+`) (?=[\\s\\S])(?:[^\\n]*(?:\\n|$))+?(?:\\n+(?! )(?!\\1`+t+` (?!`+t+` ))\\n*|\\s*$)`)},ct=st(1),lt=st(2),P=e=>{let t=e.length;for(;t>0&&e.charCodeAt(t-1)<=32;)t--;return t===e.length?e:e.slice(0,t)},F=(e,t)=>e.startsWith(t),ut=e=>{let t=e[0];return(t===`"`||t===`'`)&&e.length>=2&&e[e.length-1]===t?e.slice(1,-1):e},I=e=>e&&e.indexOf(`\\`)!==-1?e.replace(Ke,`$1`):e,dt=(...e)=>e.filter(Boolean).join(` `),ft=(e,t,n)=>{if(t.indexOf(`.`)===-1)return e?.[t]??n;let r=e,i=t.split(`.`);for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r??n},pt=[[/[ÀÁÂÃÄÅàáâãä忯]/g,`a`],[/[çÇ]/g,`c`],[/[ðÐ]/g,`d`],[/[ÈÉÊËéèêë]/g,`e`],[/[ÏïÎîÍíÌì]/g,`i`],[/[Ññ]/g,`n`],[/[øØœŒÕõÔôÓóÒò]/g,`o`],[/[ÜüÛûÚúÙù]/g,`u`],[/[ŸÿÝý]/g,`y`]],mt=/[\u0080-\uffff]/,ht=/[^a-z0-9- ]/gi,gt=/ /g,_t=e=>{let t=e;if(mt.test(t))for(let e=0;e<pt.length;e++){let[n,r]=pt[e];t=t.replace(n,r)}return t=t.replace(ht,``).replace(gt,`-`),t.toLowerCase()},vt=/(javascript|vbscript|data(?!:image)):/i,yt=/[^A-Za-z0-9/:]/g,bt=e=>{if(e.indexOf(`:`)===-1&&e.indexOf(`%`)===-1)return e;try{let t=decodeURIComponent(e).replace(yt,``);if(vt.test(t))return console.warn(`Input contains an unsafe JavaScript/VBScript/data expression, it will not be rendered.`,t),null}catch{return console.warn(`Input could not be decoded due to malformed syntax or characters, it will not be rendered.`,e),null}return e},xt=e=>{let t=e;return t.indexOf(` `)!==-1&&(t=t.replace(Be,` `)),t.indexOf(`\r`)!==-1&&(t=t.replace(me,`
|
|
3
3
|
`)),t.indexOf(`\f`)!==-1&&(t=t.replace(_e,``)),t},St=(e,t)=>{if(!t)return e;let n=e.split(`
|
|
4
4
|
`),r=null,i=(e,t)=>t&&e.startsWith(t)?e.slice(t.length):e;return n.map(e=>{let n=e.match(de);if(!r)return n&&(r={indentation:n[1],marker:n[2]}),i(e,t);let a=n?.[2]?.startsWith(r.marker),{indentation:o}=r;return a&&(r=null),i(e,o)}).join(`
|
|
5
5
|
`)},Ct=e=>(e.indexOf(`-`)!==-1&&e.match(Te)===null&&(e=e.replace(ke,(e,t)=>t.toUpperCase())),e),wt=e=>{let t=[],n=``,r=!1,i=!1,a=``;if(!e)return t;for(let o=0;o<e.length;o++){let s=e[o];if((s===`"`||s===`'`)&&!r&&(i?s===a&&(i=!1,a=``):(i=!0,a=s)),s===`(`&&n.endsWith(`url`)?r=!0:s===`)`&&r&&(r=!1),s===`;`&&!i&&!r){let e=n.trim();if(e){let n=e.indexOf(`:`);if(n>0){let r=e.slice(0,n).trim(),i=e.slice(n+1).trim();t.push([r,i])}}n=``}else n+=s}let o=n.trim();if(o){let e=o.indexOf(`:`);if(e>0){let n=o.slice(0,e).trim(),r=o.slice(e+1).trim();t.push([n,r])}}return t},Tt=(e,t,n,r)=>t===`style`?wt(n).reduce((t,[n,i])=>{let a=n.replace(/(-[a-z])/g,e=>e[1].toUpperCase());return t[a]=r(i,e,n),t},{}):te.indexOf(t)===-1?(n.match(Ee)&&(n=I(n.slice(1,n.length-1))),n===`true`||n!==`false`&&n):r(I(n),e,t),Et=e=>e.indexOf(`:`)===-1?`left`:Pe.test(e)?`right`:Me.test(e)?`center`:(Ne.test(e),`left`),Dt=e=>e.replace(je,``).split(`|`).map(Et),Ot=(e,t,n,r)=>{let i=n.inTable;n.inTable=!0;let a=0,o=e.length;for(;a<o;){let t=e.charCodeAt(a);if(t===32||t===9)a++;else break}for(;o>a;){let t=e.charCodeAt(o-1);if(t===32||t===9)o--;else break}if(a<o&&e.charCodeAt(a)===124&&a++,o>a&&e.charCodeAt(o-1)===124&&(o-2<a||e.charCodeAt(o-2)!==92)&&o--,!r){let r=t(e.slice(a,o),n);return n.inTable=i,[r]}let s=[],c=e.length,l=a,u=a,d=(r,i)=>{let a=e.slice(r,i).trim();return a===``?[]:t(a,n)},f=-1,p=-1,m=-1;for(;u<o;){if(f<u){let t=e.indexOf(`|`,u);f=t===-1?c:t}if(p<u){let t=e.indexOf(`\\`,u);p=t===-1?c:t}if(m<u){let t=e.indexOf("`",u);m=t===-1?c:t}if(u=Math.min(f,p,m),u>=o)break;if(u===p){u+=u+1<o?2:1;continue}if(u===m){let t=0;for(;u<o&&e.charCodeAt(u)===96;)t++,u++;let n=!1;for(;u<o&&!n;){let r=0;for(;u<o&&e.charCodeAt(u)===96;)r++,u++;r===t?n=!0:r===0&&u++}continue}s.push(d(l,u)),u++,l=u}return s.push(d(l,o)),n.inTable=i,s},kt=(e,t,n)=>{if(!e)return[];let r=[],i=0,a=e.length;for(;i<a;){let o=e.indexOf(`
|
|
@@ -20,6 +20,6 @@ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_
|
|
|
20
20
|
`}},[w.orderedList]:f(1),[w.unorderedList]:f(2),[w.ref]:{_scope:k,_qualify:[`[`],_match:V(Ie),_order:T.MAX,_parse(e){let t=e[1];return t!==void 0&&(r.current.references[t]={target:e[2]??``,title:e[4]}),{}},_render:W},[w.refImage]:{_scope:O,_firstChars:[33],_qualify:e=>e.startsWith(`===-1,_match:z(Le),_order:T.MAX,_parse(e){return{alt:e[1]?I(e[1]):void 0,ref:e[2]??``}},_render(t,n,i={}){let a=r.current.references[t.ref];return a?e(`img`,{key:i.key,alt:t.alt,src:c(a.target,`img`,`src`)??void 0,title:a.title}):null}},[w.refLink]:{_scope:O,_firstChars:[91],_qualify:e=>e.indexOf(`](`)===-1,_match:R(Re),_order:T.MAX,_parse(e,t,n){return{children:jt(t,e[1]??``,n),fallbackChildren:e[0]??``,ref:e[2]??``}},_render(t,n,i={}){let a=r.current.references[t.ref];return a?e(`a`,{key:i.key,href:c(a.target,`a`,`href`)??void 0,title:a.title},n(t.children,i)):e(`span`,{key:i.key},t.fallbackChildren)}},[w.table]:{_scope:D,_qualify:[`|`],_match:B(Ae),_order:T.HIGH,_parse(e,t,n){n.inline=!0;let r=e[2]?Dt(e[2]):[],i=e[3]?kt(e[3],t,n):[],a=Ot(e[1]??``,t,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:a,type:w.table}:{children:a.flat(),type:w.paragraph}},_render(t,n,r={}){let i=t,a=e=>i.align[e]&&i.align[e]!==`left`?{textAlign:i.align[e]}:{};return e(`table`,{key:r.key},e(`thead`,{key:`thead`},e(`tr`,null,...i.header.map((t,i)=>e(`th`,{key:i,style:a(i)},n(t,r))))),e(`tbody`,{key:`tbody`},...i.cells.map((t,i)=>e(`tr`,{key:i},...t.map((t,i)=>e(`td`,{key:i,style:a(i)},n(t,r)))))))}},[w.tableSeparator]:{_scope:O,_qualify:[`|`],_match:(e,t)=>t.inTable?/^\|/.exec(e):null,_order:T.HIGH,_parse(){return{type:w.tableSeparator}},_render(){return` | `}},[w.text]:{_scope:O,_match:L((e,t)=>{let n=e.length;if(e.charCodeAt(0)===10){let t=1;for(;t<n&&e.charCodeAt(t)===32;)t++;return t<n&&(e.charCodeAt(t)===42||e.charCodeAt(t)===43||e.charCodeAt(t)===45||e.charCodeAt(t)>=48&&e.charCodeAt(t)<=57)?[e.slice(0,t)]:[`
|
|
21
21
|
`]}if(e.charCodeAt(0)===58){let t=qe.exec(e);if(t)return t}return un.lastIndex=1,un.test(e),ln[0]=e.slice(0,dn(e,un.lastIndex)),ln}),_order:T.MIN,_parse(e){let t=e[0]??``;return{type:w.text,text:t.charCodeAt(0)===38?t.replace(Ce,(e,t)=>t.startsWith(`#x`)?String.fromCharCode(parseInt(t.slice(2),16)):t.startsWith(`#`)?String.fromCharCode(parseInt(t.slice(1),10)):l[t]||e):t}},_render(e){return e.text}},[w.textBolded]:{_scope:O,_firstChars:[42,95],_qualify:e=>{let t=e.charCodeAt(0);if(t===42){let t=e.charCodeAt(2);return t===32||t===10||t===9?!1:e.charCodeAt(1)===42&&e.indexOf(`**`,2)!==-1}if(t===95){let t=e.charCodeAt(2);return t===32||t===10||t===9?!1:e.charCodeAt(1)===95&&e.indexOf(`__`,2)!==-1}return!1},_match:z(Je),_order:T.MED,_parse(e,t,n){return{children:t(e[2]??``,n)}},_render(t,n,r={}){return e(`strong`,{key:r.key},n(t.children,r))}},[w.textEmphasized]:{_scope:O,_firstChars:[42,95],_qualify:e=>{let t=e.charCodeAt(0),n=e.charCodeAt(1);return n===32||n===10||n===9?!1:t===42&&e.indexOf(`*`,1)!==-1||t===95&&e.indexOf(`_`,1)!==-1},_match:z(Ye),_order:T.LOW,_parse(e,t,n){return{children:t(e[2]??``,n)}},_render(t,n,r={}){return e(`em`,{key:r.key},n(t.children,r))}},[w.textEscaped]:{_scope:O,_qualify:[`\\`],_match:z(Ge),_order:T.HIGH,_parse(e){return{text:e[1]??``,type:w.text}}},[w.textMarked]:{_scope:O,_firstChars:[61],_qualify:e=>{let t=e.charCodeAt(2);return t===32||t===10||t===9?!1:e.charCodeAt(1)===61&&e.indexOf(`==`,2)!==-1},_match:z(Xe),_order:T.LOW,_parse(e,t,n){return{children:Nt(e,t,n).children}},_render(t,n,r={}){return e(`mark`,{key:r.key},n(t.children,r))}},[w.textStrikethroughed]:{_scope:O,_firstChars:[126],_qualify:e=>{let t=e.charCodeAt(2);return t===32||t===10||t===9?!1:e.charCodeAt(1)===126&&e.indexOf(`~~`,2)!==-1},_match:z(Ze),_order:T.LOW,_parse(e,t,n){return{children:Nt(e,t,n).children}},_render(t,n,r={}){return e(`del`,{key:r.key},n(t.children,r))}}}},cn=[null,/^ {1,1}/gm,/^ {1,2}/gm,/^ {1,3}/gm,/^ {1,4}/gm,/^ {1,5}/gm,/^ {1,6}/gm,/^ {1,7}/gm,/^ {1,8}/gm],ln=[``],un=/(?:[^\n&h!*:<=[\\_`~]+|h(?!ttp))*/y,dn=(e,t)=>t>=3&&e.charCodeAt(t)===10&&e.charCodeAt(t-1)===32&&e.charCodeAt(t-2)===32?t-2:t,fn=(e,t,...n)=>({children:n,props:t,type:e}),pn=(e,t,n,r)=>{let i=(e,r)=>{if(!r?.trim())return null;let i=r.match(ne);return i?i.reduce((r,i)=>{let a=i.indexOf(`=`);if(a!==-1){let o=Ct(i.slice(0,a)).trim(),s=ut(i.slice(a+1).trim()),c=A[o]??o;if(c===`ref`)return r;r[c]=Tt(e,o,s,t.sanitizer??bt),typeof r[c]==`string`&&Zt(r[c])&&(r[c]=gn(r[c].trim(),t,n).ast)}else i!==`style`&&(r[A[i]??i]=!0);return r},{}):null},a=[ie,le,ue,n.enforceAtxHeadings?xe:be,Ae,ct,lt,Xt],o=n.disableParsingRawHTML?a:[...a,Fe,Jt,we,Yt,Xt],s=sn(e,t,n,r,i,e=>{let t=e.replace(Ve,``),n=t.length>2048?t.slice(0,2048):t;return n.indexOf(`
|
|
22
22
|
|
|
23
|
-
`)!==-1||Pt(o,n)},a);return n.disableParsingRawHTML?Object.keys(s).reduce((e,t)=>(t!==w.htmlBlock&&t!==w.htmlSelfClosing&&(e[t]=s[t]),e),{}):s},mn=(e,t,n,r,i)=>{let a=!t.preserveFrontmatter&&e.charCodeAt(0)===45?e.replace(ve,``):e,o=a.charCodeAt(0)===10?a.replace(Ve,``):a,s=t.forceInline||!t.forceBlock&&ze.test(o)===!1,c=n(s?a:`${P(o)}\n\n`,{inline:s});if(r.length>0)for(let e of r)e.parsedAst=n(e.footnote,{inline:!0});return{ast:c,footnotes:r,references:i,inline:s}},hn=(e,t,n,r,i)=>{let a=t.components??{},o=tn(t),s=e.footnotes||[],c=e.inline,l=r(e.ast,{inline:c});for(;typeof l[l.length-1]==`string`&&!l[l.length-1].trim();)l.pop();let u=(()=>{if(n.wrapper===null)return l;let e=n.wrapper??(c?`span`:`div`);if(l.length>1||n.forceWrapper)return i(e,{key:`outer`},l);if(l.length===1){let t=l[0];if(Array.isArray(t))return i(e,{key:`outer`},t);if(typeof t==`string`){let e={key:`outer`};if(!c&&a){let n=ft(a,`p.props`,{})??{},r=dt(e.className,n.className),o={...e,...n};return r&&(o.className=r),i(`span`,o,t)}return i(`span`,e,t)}return t}return i(e,{key:`outer`},null)})();return s.length?i(`div`,null,u,i(`footer`,{key:`footer`},...s.map(e=>i(`div`,{id:o(e.identifier),key:e.identifier},e.identifier,r(e.parsedAst||e.footnote,{inline:!0}))))):u},gn=(e=``,t,n={})=>{let{parse:r,scope:i}=Y(t,n,!0),a=q();return on(i,a,()=>mn(e,n,r,a.footnotes,a.references))},_n=(e,t,n={})=>{let{emit:r,createElement:i,scope:a}=Y(t,n,!1);return on(a,{footnotes:e.footnotes??[],references:e.references??{}},()=>hn(e,t,n,r,i))},vn=(e=``,t,n={})=>{if(typeof e!=`string`)throw console.error(`intlayer: the first argument must be a string. Received`,typeof e),Error(`intlayer: the first argument must be a string`);let{parse:r,emit:i,createElement:a,scope:o}=Y(t,n,!1),s=q();return on(o,s,()=>hn(mn(e,n,r,s.footnotes,s.references),t,n,i,a))},X=e(t(),1),yn;try{let e=(0,X.createElement)(`div`);yn=e&&typeof e==`object`&&`$$typeof`in e&&typeof e.$$typeof==`symbol`?e.$$typeof:Symbol.for(`react.transitional.element`)}catch{yn=Symbol.for(`react.transitional.element`)}var bn={createElement:(e,t,...n)=>{let{key:r,...i}=t??{},a=r==null?null:String(r),o=n.length;return o===1?i.children=n[0]:o>1&&(i.children=n),{$$typeof:yn,type:e,key:a,ref:null,props:i,_owner:null,_store:{},_debugStack:null,_debugTask:null}},cloneElement:(e,t,...n)=>n.length===0?(0,X.cloneElement)(e,t):(0,X.cloneElement)(e,t,...n),Fragment:X.Fragment,normalizeProps:(e,t)=>t},xn=(e=``,t={})=>{let{createElement:n,disableAutoLink:r,disableParsingRawHTML:i,enforceAtxHeadings:a,forceBlock:o,forceInline:s,forceWrapper:c,namedCodesToUnicode:l,components:u,renderRule:d,sanitizer:f,slugify:p,wrapper:m,preserveFrontmatter:h,tagfilter:g}=t,_={runtime:n?{...bn,createElement:n}:bn,components:u,namedCodesToUnicode:l,sanitizer:f,slugify:p},v={disableAutoLink:r,disableParsingRawHTML:i,enforceAtxHeadings:a,forceBlock:o,forceInline:s,forceWrapper:c,renderRule:d,wrapper:m,preserveFrontmatter:h,tagfilter:g};return typeof e==`string`?vn(e,_,v):_n(e,_,v)},Z=x(),Sn=(e,{components:t,wrapper:n,forceBlock:r,forceInline:i,preserveFrontmatter:a,tagfilter:o}={})=>xn(e,{components:t,forceBlock:r,forceInline:i,wrapper:n,forceWrapper:!!n,preserveFrontmatter:a,tagfilter:o}),Cn={name:`move-diagonal`,size:24,node:[[`path`,{d:`M11 19H5v-6`,key:`8awifj`}],[`path`,{d:`M13 5h6v6`,key:`7voy1q`}],[`path`,{d:`M19 5 5 19`,key:`wwaj1z`}]]};Cn.node;var wn=
|
|
24
|
-
`).map((e,t)=>(0,Z.jsx)(`span`,{className:`line block w-full`,children:e},`line-${t}-${e.slice(0,10)}`)):e})})}),Dn=`[&_pre.shiki]:!bg-transparent min-w-0 max-w-full overflow-auto bg-transparent [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden [&_pre.shiki]:max-w-full [&_pre.shiki]:overflow-x-auto [&_pre::-webkit-scrollbar]:hidden [&_pre]:[-ms-overflow-style:none] [&_pre]:[scrollbar-width:none]`,On=({html:e})=>(0,Z.jsx)(`div`,{className:Dn,children:(0,Z.jsx)(`div`,{dangerouslySetInnerHTML:{__html:e}})}),kn=(0,X.lazy)(()=>C(()=>import(`./CodeBlockShiki-BdXfQVsf.js`).then(e=>({default:e.CodeBlockShiki})),__vite__mapDeps([0,1,2,3,4,5,6]))),An=({className:e,onChange:t,isEditable:n,children:r,lang:i,highlightedHtml:a,...o})=>(0,Z.jsx)(`div`,{className:S(`flex w-full min-w-0 max-w-full overflow-x-auto`,e),...o,children:a?(0,Z.jsx)(On,{html:a}):(0,Z.jsx)(X.Suspense,{fallback:(0,Z.jsx)(En,{children:r}),children:(0,Z.jsx)(kn,{lang:i,children:r})})}),jn={astro:()=>C(()=>import(`./astro-JHDYjn39.js`),__vite__mapDeps([7,8,9,10,11,12,13])),bash:()=>C(()=>import(`./bash-CLZ0U2zV.js`),[]),css:()=>C(()=>import(`./css-CdtkT07m.js`),__vite__mapDeps([14,11])),html:()=>C(()=>import(`./html-DYtkB_T1.js`),__vite__mapDeps([15,16,9,11])),javascript:()=>C(()=>import(`./javascript-Yelw-5ZN.js`),__vite__mapDeps([17,9])),json:()=>C(()=>import(`./json-CaljABEy.js`),__vite__mapDeps([18,8])),json5:()=>C(()=>import(`./json5-BR5RXkoi.js`),[]),jsonc:()=>C(()=>import(`./jsonc-CYpm1nAK.js`),[]),markdown:()=>C(()=>import(`./markdown-BYOwaDjH.js`),[]),svelte:()=>C(()=>import(`./svelte-tEuLYt3E.js`),__vite__mapDeps([19,9,10,11,12])),tsx:()=>C(()=>import(`./tsx-5f3ulCja.js`),__vite__mapDeps([20,13])),typescript:()=>C(()=>import(`./typescript-Utq2Cl8c.js`),__vite__mapDeps([21,10])),vue:()=>C(()=>import(`./vue-Bg0byEaI.js`),__vite__mapDeps([22,8,9,10,11,16])),xml:()=>C(()=>import(`./xml-DMbpbO54.js`),[]),yaml:()=>C(()=>import(`./yaml-rwi0_p6S.js`),[])};Object.keys(jn);var Mn={cjs:`javascript`,console:`bash`,cts:`typescript`,htm:`html`,js:`javascript`,jsonc:`json5`,jsx:`tsx`,md:`markdown`,mdx:`markdown`,mjs:`javascript`,mts:`typescript`,postcss:`css`,sh:`bash`,shell:`bash`,shellscript:`bash`,ts:`typescript`,yml:`yaml`,zsh:`bash`},Nn=`plaintext`,Pn=e=>{let t=(e??``).trim().toLowerCase(),n=Mn[t]??t,r=jn[n];return r?{id:n,loadGrammar:r}:{id:Nn,loadGrammar:null}},Fn={light:`github-light`,dark:`github-dark`},In=e=>e?e.match(/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\?v=|shorts\/))([\w-]{11})/i)?.[1]??null:null,Ln=e=>`https://www.youtube.com/embed/${e}`,Rn=e=>`https://www.youtube.com/watch?v=${e}`,zn=`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share`,Bn=(e,t)=>{let n=In(e);return n?{isYoutubeVideo:!0,src:Ln(n),frameProps:{...t,allow:zn,allowFullScreen:!0,referrerPolicy:`strict-origin-when-cross-origin`}}:{src:e,frameProps:t,isYoutubeVideo:!1}},Vn=e=>{if(!e)return{href:``,label:``};let t=In(e);if(t)return{href:Rn(t),label:`youtube.com`};if(/^https?:\/\//i.test(e))try{let t=new URL(e);return{href:t.href,label:t.host}}catch{return{href:e,label:e}}return{href:e,label:e}},Hn=()=>{let e=(0,X.useRef)(null),[t,n]=(0,X.useState)(!1);return(0,X.useEffect)(()=>{let r=e.current;if(!r||t)return;if(typeof IntersectionObserver>`u`){n(!0);return}let i=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(n(!0),i.disconnect())},{rootMargin:`200px`});return i.observe(r),()=>i.disconnect()},[t]),{elementRef:e,hasBecomeVisible:t}},Un=({src:e,title:t,className:n,frameProps:r})=>{let{elementRef:i,hasBecomeVisible:a}=Hn();return a?(0,Z.jsx)(`iframe`,{...r,src:e,title:t,loading:`lazy`,className:n}):(0,Z.jsx)(`div`,{ref:i,"aria-hidden":!0,className:n})},Wn=e=>{let{src:t,className:n,title:r,...a}=e,[o,s]=(0,X.useState)(!1),{src:c,frameProps:d,isYoutubeVideo:f}=Bn(t,a),{href:p,label:m}=Vn(t);return(0,Z.jsxs)(u,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:[(0,Z.jsx)(Un,{src:c,title:r,frameProps:d,className:S(`block max-h-[80vh] min-h-[12rem] w-full border-0`,f&&`aspect-video`,n)}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 py-1`,children:[p?(0,Z.jsx)(h,{href:p,target:`_blank`,rel:`noopener noreferrer`,label:``,color:`neutral`,className:`inline-flex min-w-0 max-w-[calc(100%-3rem)] items-center gap-2 text-muted-foreground text-xs underline-offset-2 hover:text-foreground hover:underline`,children:m}):(0,Z.jsx)(`span`,{className:`text-neutral text-sm`,children:`Embedded frame`}),(0,Z.jsx)(i,{variant:`hoverable`,size:`icon-md`,onClick:()=>s(!0),label:`Open embedded page in fullscreen`,Icon:wn})]}),(0,Z.jsx)(l,{isOpen:o,onClose:()=>s(!1),size:`unset`,hasCloseButton:!0,isScrollable:!0,padding:`sm`,children:o&&c?(0,Z.jsx)(u,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:(0,Z.jsx)(`iframe`,{...d,src:c,title:r??`Embedded content`,allowFullScreen:!0,className:`block min-h-[82vh] w-full border-0`})}):null})]})},Gn=(0,X.createContext)({packageManager:`npm`,setPackageManager:()=>{},codeFormat:`typescript`,setCodeFormat:()=>{},contentDeclarationFormat:`typescript`,setContentDeclarationFormat:()=>{}}),Q=()=>(0,X.useContext)(Gn),Kn=({children:e})=>{let[t,r]=n(`packageManager`,`npm`),[i,a]=n(`codeFormat`,`typescript`),[o,s]=n(`contentDeclarationFormat`,`typescript`);return(0,Z.jsx)(Gn,{value:{packageManager:t,setPackageManager:r,codeFormat:i,setCodeFormat:a,contentDeclarationFormat:o,setContentDeclarationFormat:s},children:e})},qn=700,Jn=({isRollable:e=!0,minHeight:t=qn,children:n,className:i})=>{let[o,s]=(0,X.useState)(0),[c,l]=(0,X.useState)(!0),u=(0,X.useRef)(null),{expandCollapseContent:d}=a(`expand-collapse`),f=o>t,p=(0,X.useCallback)(e=>{if(u.current?.disconnect(),u.current=null,!e)return;if(typeof ResizeObserver>`u`){s(e.clientHeight);return}let t=new ResizeObserver(([e])=>{e&&s(e.contentRect.height)});t.observe(e),u.current=t},[]);return(0,X.useEffect)(()=>()=>u.current?.disconnect(),[]),e?f?(0,Z.jsxs)(r,{isHidden:c,minHeight:t,className:`w-full overflow-x-auto overflow-y-hidden`,children:[(0,Z.jsx)(`div`,{className:S(`grid w-full`,i),ref:p,children:n}),(0,Z.jsx)(`button`,{className:S(`absolute right-0 bottom-0 flex w-full cursor-pointer items-center justify-center rounded-t-2xl bg-linear-to-t from-card/80 to-transparent px-3 py-0.5 text-md text-neutral-700 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all duration-300 hover:py-1 dark:text-neutral-400`,c?`w-full`:`w-32`),type:`button`,onClick:()=>l(e=>!e),children:d(c)})]}):(0,Z.jsx)(`div`,{className:S(`grid w-full`,i),ref:p,children:n}):n},Yn=({children:e,originalLang:t,targetFormat:n,initialHtml:r})=>{let[i,a]=(0,X.useState)(r??null),o=(0,X.useRef)(r??null);(0,X.useEffect)(()=>{if(r&&n===`typescript`){o.current=r,a(r);return}let i=!1;return(async()=>{try{let r=e,s=Pn(t).id;if(n!==`typescript`){let{transformCode:a,deriveLanguage:o}=await C(async()=>{let{transformCode:e,deriveLanguage:t}=await import(`./codeTransformer-DVPQQcdP.js`);return{transformCode:e,deriveLanguage:t}},[]);if(i)return;r=a(String(e),n),s=Pn(o(t,n)).id}let{codeToHtml:c}=await C(async()=>{let{codeToHtml:e}=await import(`./shikiBundle-Bsw9CKmM.js`).then(e=>e.i);return{codeToHtml:e}},__vite__mapDeps([23,1,4,2,5,3,6]));if(i)return;let l=await c(String(r),{lang:s,themes:Fn,defaultColor:!1});i||(o.current=l,a(l))}catch{i||a(``)}})(),()=>{i=!0}},[e,t,n,r]);let s=i??o.current;return s?(0,Z.jsx)(`div`,{dangerouslySetInnerHTML:{__html:s},style:{backgroundColor:`transparent`}}):(0,Z.jsx)(`pre`,{className:`min-w-0 max-w-full overflow-x-auto`,children:(0,Z.jsx)(`code`,{children:e})})},Xn=e=>{if(e!=null){if(Array.isArray(e))return e;if(typeof e==`string`&&e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return[e]}},Zn=({children:e,...t})=>{let{packageManager:n,codeFormat:r,contentDeclarationFormat:i}=Q(),a=t.packageManager===void 0,o=n===t.packageManager,s=Xn(t.codeFormat),c=s===void 0,l=s?s.includes(r):!1,u=Xn(t.contentDeclarationFormat),d=u===void 0,f=u?u.includes(i):!1;return(a||o)&&(c||l)&&(d||f)?e:(0,Z.jsx)(Z.Fragment,{})},Qn=({availableFormats:e})=>{let{codeFormat:t,setCodeFormat:n,setContentDeclarationFormat:r}=Q(),i=a(`code-selectors`),o=t=>!e||e.includes(t);return(0,Z.jsxs)(f,{value:t,onValueChange:e=>{n(e),r(e)},children:[(0,Z.jsx)(f.Trigger,{className:`py-1!`,"aria-label":i.codeFormat.label.value,children:(0,Z.jsx)(f.Value,{placeholder:i.codeFormat.placeholder.value})}),(0,Z.jsxs)(f.Content,{children:[o(`typescript`)&&(0,Z.jsx)(f.Item,{value:`typescript`,children:`TypeScript`}),o(`esm`)&&(0,Z.jsx)(f.Item,{value:`esm`,children:`ESM`}),o(`commonjs`)&&(0,Z.jsx)(f.Item,{value:`commonjs`,children:`CommonJS`})]})]})},$n=()=>{let{contentDeclarationFormat:e,setContentDeclarationFormat:t}=Q(),n=a(`code-selectors`);return(0,Z.jsxs)(f,{value:e,onValueChange:t,children:[(0,Z.jsx)(f.Trigger,{className:`py-1!`,"aria-label":n.contentDeclarationFormat.label.value,children:(0,Z.jsx)(f.Value,{placeholder:n.contentDeclarationFormat.placeholder.value})}),(0,Z.jsxs)(f.Content,{children:[(0,Z.jsx)(f.Item,{value:`typescript`,children:`TypeScript`}),(0,Z.jsx)(f.Item,{value:`commonjs`,children:`CommonJS`}),(0,Z.jsx)(f.Item,{value:`esm`,children:`ESM`}),(0,Z.jsx)(f.Item,{value:`json`,children:`JSON`})]})]})},er=({code:e,...t})=>{let{title:n,description:r}=a(`code`);return(0,Z.jsxs)(v,{identifier:`copy`,children:[(0,Z.jsx)(p,{content:e,...t}),(0,Z.jsxs)(v.Detail,{identifier:`copy`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,Z.jsx)(`strong`,{children:n}),(0,Z.jsx)(`p`,{className:`text-neutral`,children:r})]})]})},tr=()=>{let{packageManager:e,setPackageManager:t}=Q(),n=a(`code-selectors`);return a(`code-selectors`),(0,Z.jsxs)(f,{value:e,onValueChange:t,children:[(0,Z.jsx)(f.Trigger,{className:`py-1!`,"aria-label":n.packageManager.label.value,children:(0,Z.jsx)(f.Value,{placeholder:n.packageManager.placeholder.value})}),(0,Z.jsxs)(f.Content,{children:[(0,Z.jsx)(f.Item,{value:`npm`,children:`npm`}),(0,Z.jsx)(f.Item,{value:`pnpm`,children:`pnpm`}),(0,Z.jsx)(f.Item,{value:`yarn`,children:`yarn`}),(0,Z.jsx)(f.Item,{value:`bun`,children:`bun`})]})]})},nr=700,rr=new Set([`tsx`,`jsx`]),ir=e=>{if(e){if(Array.isArray(e))return e;if(typeof e==`string`&&e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return[e]}},ar=({children:e,language:t,highlightedHtml:n,showHeader:r=!0,showLineNumbers:i=!0,className:a,fileName:o,packageManager:s,codeFormat:c,contentDeclarationFormat:l,isRollable:d=!0,lang:f,...p})=>{let{codeFormat:m,contentDeclarationFormat:h}=Q(),g=(0,X.useMemo)(()=>ir(c),[c]),_=(0,X.useMemo)(()=>ir(l),[l]),v=g!==void 0&&g.length>1&&g.includes(`typescript`),y=_!==void 0&&_.length>1&&_.includes(`typescript`),b=v||y,x=y?h:m,w=(0,X.useMemo)(()=>{let e=y?_:g;if(!e)return e;let n=e.filter(e=>e!==`json`);return rr.has(t)&&(n=n.filter(e=>e!==`commonjs`)),n},[y,_,g,t]),T=(0,X.useMemo)(()=>!w||w.includes(x)?x:w[w.length-1]??`typescript`,[w,x]),[E,D]=(0,X.useState)(o);(0,X.useEffect)(()=>{if(!b||T===`typescript`){D(o);return}if(!o)return;let e=!1;return(async()=>{let{deriveFileName:t}=await C(async()=>{let{deriveFileName:e}=await import(`./codeTransformer-DVPQQcdP.js`);return{deriveFileName:e}},[]);e||D(t(o,T))})(),()=>{e=!0}},[o,b,T]);let O=(0,X.useMemo)(()=>{let t=Array.isArray(e)?e.join(``):String(e);return t.endsWith(`
|
|
25
|
-
`)?t.slice(0,-1):t},[e]),[k,A]=(0,X.useState)(O);(0,X.useEffect)(()=>{if(!b||T===`typescript`){A(O);return}let e=!1;return(async()=>{let{transformCode:t}=await C(async()=>{let{transformCode:e}=await import(`./codeTransformer-DVPQQcdP.js`);return{transformCode:e}},[]);e||A(t(O,T))})(),()=>{e=!0}},[O,b,T]);let j=s||c||l;return(0,Z.jsx)(Zn,{packageManager:s,codeFormat:c,contentDeclarationFormat:l,children:(0,Z.jsxs)(u,{className:S(`relative min-w-0 max-w-full text-sm leading-6`,i&&`with-line-number ml-0`,a),transparency:`lg`,...p,children:[r&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`grid w-full grid-cols-[1fr_auto] items-center justify-between rounded-t-xl border-b bg-card/50 py-1.5 pr-12 pl-4 text-muted-foreground text-xs`,children:[(0,Z.jsx)(`span`,{className:`truncate`,children:E??t}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s&&(0,Z.jsx)(tr,{}),c&&(0,Z.jsx)(Qn,{availableFormats:w}),l&&(0,Z.jsx)($n,{})]})]}),(0,Z.jsx)(`div`,{className:`sticky top-46 z-20`,children:(0,Z.jsx)(`div`,{className:S(`absolute right-2 bottom-0 flex h-7 items-center`,j&&`h-11`),children:(0,Z.jsx)(er,{code:k})})})]}),(0,Z.jsx)(Jn,{minHeight:nr,isRollable:d,className:`min-w-0 max-w-full overflow-x-auto p-2`,children:b?(0,Z.jsx)(Yn,{originalLang:t,targetFormat:T,initialHtml:n,children:O}):(0,Z.jsx)(An,{lang:t,highlightedHtml:n,children:O})})]})})},or=(0,X.createContext)({tabsValues:{},setTabsValues:(()=>{})}),sr=()=>(0,X.useContext)(or),cr=({children:e})=>{let[t,n]=(0,X.useState)({});return(0,Z.jsx)(or,{value:{tabsValues:t,setTabsValues:n},children:e})},lr=e=>e.trim().replace(/\s+/g,`-`).replace(/[^\w-]/g,``),ur=e=>{let t=new Map;return e.map((e,n)=>{let r=lr(e)||String(n),i=t.get(r)??0;return t.set(r,i+1),i===0?r:`${r}-${i+1}`})},dr=(0,X.createContext)(void 0),fr=y(`relative w-full rounded-lg`,{variants:{background:{with:`border bg-background/2 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur`,without:``},variant:{default:``,bordered:`border-2`,ghost:`border-0 bg-transparent shadow-none`}},defaultVariants:{variant:`default`}}),pr=({value:e,label:t},n)=>{let r=e??t;return typeof r==`string`?r:String(n)},$=({children:e,...t})=>(0,Z.jsx)(`div`,{...t,children:e});$.displayName=`TabItem`;var mr=Object.assign(({defaultTab:e,group:t,variant:n,children:r,className:i,headerClassName:a,fullHeight:o,...s})=>{let c=X.Children.toArray(r).filter(e=>(0,X.isValidElement)(e)&&e.type===$).map((e,t)=>({...e.props,value:pr(e.props,t)})),l=c[0]?.value,{tabsValues:u,setTabsValues:d}=sr(),[f,p]=(0,X.useState)(e??l??``),m=(t&&typeof u==`object`?u?.[t]:f)??e??l,h=c.findIndex(e=>e.value===m),_=c.length,v=ur(c.map(({value:e})=>e)),{containerProps:y,dragDeltaPct:b,isDragging:x}=Tn({itemIndex:h,itemCount:_,onSwipeLeft:()=>{let e=Math.min(_-1,h+1),t=c[e]?.value;t&&C(t)},onSwipeRight:()=>{let e=Math.max(0,h-1),t=c[e]?.value;t&&C(t)}}),C=e=>{p(e),typeof d==`function`&&d(n=>({...n,[t]:e}))},w={activeTab:f??l??``,setActiveTab:C};return(0,Z.jsx)(dr.Provider,{value:w,children:(0,Z.jsxs)(`div`,{className:S(fr({variant:n}),o&&`flex h-full flex-col overflow-hidden`,i),...s,children:[(0,Z.jsx)(`div`,{className:S(`flex shrink-0 gap-3 p-3`,a),children:(0,Z.jsx)(g,{selectedChoice:m,tabs:c.map(({label:e,value:t,disabled:n},r)=>{let i=m===t,a=v[r];return(0,Z.jsx)(`button`,{className:S(`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,!i&&`text-neutral/70`),"data-active":i,disabled:n,onClick:()=>!n&&C(t),role:`tab`,"aria-selected":i,"aria-controls":`tabpanel-${a}`,id:`tab-${a}`,type:`button`,children:e??t},t)}),hoverable:!0,color:`text`})}),(0,Z.jsx)(`div`,{className:S(`relative w-full min-w-0 overflow-x-clip [-webkit-clip-path:inset(0)] [clip-path:inset(0)]`,o&&`min-h-0 flex-1`),...y,children:(0,Z.jsx)(`div`,{className:S(`grid w-full min-w-0`,o&&`h-full`,x?`transition-none`:`transition-transform duration-300 ease-in-out`),style:{gridTemplateColumns:`repeat(${c.length}, 100%)`,transform:`translateX(-${h*100-(x?b:0)}%)`},children:c.map(({value:e,children:t,className:n},r)=>{let i=r===h,a=v[r];return(0,Z.jsx)(`div`,{role:`tabpanel`,"aria-labelledby":`tab-${a}`,id:`tabpanel-${a}`,inert:!i,tabIndex:i?0:-1,"data-active":i,className:S(`w-full min-w-0 p-3 opacity-100 transition-opacity duration-300 ease-in-out`,o&&`h-full overflow-y-auto`,!i&&`pointer-events-none opacity-0`,n),children:(0,Z.jsx)(`div`,{className:S(`flex w-full min-w-0 flex-col items-stretch gap-6`,o&&`min-h-full`),children:t})},e)})})})]})})},{Item:$}),hr=({setIsModalOpen:e})=>{let{modal:t}=a(`table`);return(0,Z.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 right-4 z-10`,children:(0,Z.jsx)(`div`,{className:`pointer-events-auto sticky top-48 pt-4`,children:(0,Z.jsxs)(v,{identifier:`expand`,children:[(0,Z.jsx)(i,{variant:`hoverable`,size:`icon-md`,onClick:()=>{e(!0)},label:t.title,Icon:wn}),(0,Z.jsxs)(v.Detail,{identifier:`expand`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,Z.jsx)(`strong`,{children:t.title}),(0,Z.jsx)(`p`,{className:`text-neutral`,children:t.description})]})]})})})},gr=(0,X.forwardRef)(({className:e,isInteractive:t,...n},r)=>(0,Z.jsx)(`table`,{ref:r,className:S(`w-full table-auto border-separate border-spacing-0 overflow-hidden rounded-2xl text-left text-sm`,`[&_thead_tr:first-child_th:first-child]:rounded-tl-2xl`,`[&_thead_tr:first-child_th:last-child]:rounded-tr-2xl`,`[&_tbody_tr:last-child_td:first-child]:rounded-bl-2xl`,`[&_tbody_tr:last-child_td:last-child]:rounded-br-2xl`,`supports-[corner-shape:squircle]:rounded-3xl`,`supports-[corner-shape:squircle]:[&_thead_tr:first-child_th:first-child]:rounded-tl-3xl`,`supports-[corner-shape:squircle]:[&_thead_tr:first-child_th:last-child]:rounded-tr-3xl`,`supports-[corner-shape:squircle]:[&_tbody_tr:last-child_td:first-child]:rounded-bl-3xl`,`supports-[corner-shape:squircle]:[&_tbody_tr:last-child_td:last-child]:rounded-br-3xl`,t&&`[&_tbody_tr:hover]:bg-neutral/40 [&_tbody_tr]:cursor-pointer [&_tbody_tr]:transition-colors`,e),...n})),_r=.55,vr=5,yr=30,br=(e,t,n)=>{(0,X.useEffect)(()=>{if(!e.current)return;let n=[];Array.from(e.current.querySelectorAll(`tr`)).forEach(e=>{Array.from(e.children).forEach((e,t)=>{let r=e.textContent?.trim().length??0;(n[t]===void 0||r>n[t])&&(n[t]=r)})});let r=e=>{let t=Array.from(e.querySelectorAll(`tr`));if(t.length===0)return;let r=(e,t)=>{let r=Math.min(yr,Math.max(vr,(n[t]??0)*_r));e.style.minWidth=`${r}rem`,e.style.maxWidth=`${yr}rem`};e.querySelectorAll(`th`).forEach((e,t)=>{r(e,t)}),t.forEach(e=>{e.querySelectorAll(`td`).forEach((e,t)=>{r(e,t)})})};r(e.current),t.current&&r(t.current)},n)},xr=({className:e,isRollable:t=!1,displayModal:n,isInteractive:r,onClick:i,...a})=>{let[o,s]=(0,X.useState)(!1),[c,u]=(0,X.useState)(null),d=(0,X.useRef)(null),f=(0,X.useRef)(null);br(d,f,[a.children,o]),(0,X.useEffect)(()=>{if(o&&c!==null&&f.current){let e=f.current.rows[c];e&&(e.scrollIntoView({behavior:`smooth`,block:`center`}),e.classList.add(`bg-card`),e.style.transition=`background-color 0.3s ease-in-out`)}},[o,c]),(0,X.useEffect)(()=>{o||u(null)},[o]);let p=e=>{if(n){let t=e.target.closest(`tr`);t?.closest(`tbody`)&&(u(t.rowIndex),s(!0))}i?.(e)};return(0,Z.jsxs)(`div`,{className:`group relative`,children:[n&&(0,Z.jsx)(hr,{setIsModalOpen:s}),(0,Z.jsx)(Jn,{isRollable:t,className:`max-w-full overflow-x-auto bg-background text-left`,children:(0,Z.jsx)(gr,{ref:d,className:e,isInteractive:r??n,onClick:p,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&p(e)},...a})}),(0,Z.jsx)(l,{isOpen:o,onClose:()=>s(!1),size:`xl`,hasCloseButton:!0,isScrollable:!0,children:o?(0,Z.jsx)(`div`,{className:`grid`,children:(0,Z.jsx)(gr,{ref:f,className:S(`min-w-full max-w-full text-left`,e),isInteractive:r,...a})}):(0,Z.jsx)(Z.Fragment,{})})]})},Sr=({className:e,...t})=>(0,Z.jsx)(`th`,{className:S(`border border-b border-solid bg-neutral/10 p-4`,e),...t}),Cr=({className:e,...t})=>(0,Z.jsx)(`tr`,{className:S(`hover:bg-neutral/10`,e),...t}),wr=({className:e,...t})=>(0,Z.jsx)(`td`,{className:S(`border border-b border-solid p-4`,e),...t}),Tr=({className:e,...t})=>(0,Z.jsx)(`hr`,{className:S(`mx-6 mt-16 border-dashed text-neutral`,e),...t}),Er=e=>(0,Z.jsx)(o,{isClickable:!0,className:`mb-16 mb-8 text-foreground`,...e}),Dr=e=>(0,Z.jsx)(m,{isClickable:!0,className:`mt-16 text-foreground`,...e}),Or=e=>(0,Z.jsx)(_,{isClickable:!0,className:`mt-5 text-foreground`,...e}),kr=e=>(0,Z.jsx)(s,{isClickable:!0,className:`mt-3 text-foreground`,...e}),Ar=e=>(0,Z.jsx)(d,{isClickable:!0,className:`mt-3 text-foreground`,...e}),jr=e=>(0,Z.jsx)(b,{isClickable:!0,className:`mt-3 text-foreground`,...e}),Mr=e=>(0,Z.jsx)(`strong`,{className:`text-foreground`,...e}),Nr=(0,X.memo)(({className:e,children:t,highlightedHtml:n,lang:r,...i})=>{let a=String(t??``).replace(/\n$/,``);if(!e){let e=a.replace(/&(?:amp;)?#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10)));return(0,Z.jsx)(`code`,{className:`rounded-md border border-neutral/30 bg-card/60 box-decoration-clone px-1.5 py-0.5 font-mono text-[0.875em] leading-[inherit]`,children:e})}let o=e?.replace(/lang(?:uage)?-/,``)||`plaintext`;return(0,Z.jsx)(ar,{...i,language:o,showHeader:!0,highlightedHtml:n,className:`border`,children:a})},(e,t)=>e.children===t.children&&e.className===t.className&&e.highlightedHtml===t.highlightedHtml),Pr=e=>(0,Z.jsx)(Nr,{...e}),Fr=({className:e,...t})=>(0,Z.jsx)(`blockquote`,{className:S(`mt-5 gap-3 border-card border-l-4 pl-5 text-muted-foreground [&_strong]:text-neutral`,e),...t}),Ir=({className:e,...t})=>(0,Z.jsx)(`ul`,{className:S(`mt-5 flex list-disc flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),Lr=({className:e,...t})=>(0,Z.jsx)(`ol`,{className:S(`mt-5 flex list-decimal flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),Rr=({className:e,alt:t,src:n,...r})=>(0,Z.jsx)(`img`,{...r,alt:t??``,loading:`lazy`,className:S(`max-h-[80vh] max-w-full rounded-md`,e),src:n?.includes(`github.com`)?n?.replace(`github.com`,`raw.githubusercontent.com`).replace(`/blob/`,`/`):n}),zr=e=>t=>(0,Z.jsx)(h,{isExternalLink:t.href?.startsWith(`http`),underlined:!0,locale:e,label:``,color:`text`,...t}),Br={h1:Er,h2:Dr,h3:Or,h4:kr,h5:Ar,h6:jr,strong:Mr,blockquote:Fr,ul:Ir,ol:Lr,img:Rr,pre:e=>(0,Z.jsx)(Z.Fragment,{children:e.children}),table:e=>(0,Z.jsx)(xr,{isRollable:!0,displayModal:!0,...e}),th:Sr,tr:Cr,td:wr,hr:Tr,Tabs:e=>(0,Z.jsx)(mr,{...e,className:`rounded-xl border border-card`,headerClassName:`sticky rounded-xl top-24 z-5 bg-background/70 backdrop-blur overflow-x-auto`}),Tab:mr.Item,Columns:({className:e,...t})=>(0,Z.jsx)(`div`,{className:S(`flex gap-4 max-md:flex-col`,e),...t}),Column:({className:e,...t})=>(0,Z.jsx)(`div`,{className:S(`flex-1`,e),...t}),iframe:e=>(0,Z.jsx)(Wn,{...e})},Vr=e=>({...Br,code:Pr,a:zr(e)}),Hr=({children:e,locale:t,forceBlock:n,preserveFrontmatter:r,tagfilter:i,components:a,wrapper:o})=>{let s=Sn(e,{components:{...Vr(t),...a},wrapper:o,forceBlock:n,preserveFrontmatter:r,tagfilter:i});return(0,Z.jsx)(Kn,{children:(0,Z.jsx)(cr,{children:s})})};export{Rn as a,jn as c,Dn as d,In as i,Pn as l,Wn as n,Fn as o,Ln as r,Mn as s,Hr as t,En as u};
|
|
23
|
+
`)!==-1||Pt(o,n)},a);return n.disableParsingRawHTML?Object.keys(s).reduce((e,t)=>(t!==w.htmlBlock&&t!==w.htmlSelfClosing&&(e[t]=s[t]),e),{}):s},mn=(e,t,n,r,i)=>{let a=!t.preserveFrontmatter&&e.charCodeAt(0)===45?e.replace(ve,``):e,o=a.charCodeAt(0)===10?a.replace(Ve,``):a,s=t.forceInline||!t.forceBlock&&ze.test(o)===!1,c=n(s?a:`${P(o)}\n\n`,{inline:s});if(r.length>0)for(let e of r)e.parsedAst=n(e.footnote,{inline:!0});return{ast:c,footnotes:r,references:i,inline:s}},hn=(e,t,n,r,i)=>{let a=t.components??{},o=tn(t),s=e.footnotes||[],c=e.inline,l=r(e.ast,{inline:c});for(;typeof l[l.length-1]==`string`&&!l[l.length-1].trim();)l.pop();let u=(()=>{if(n.wrapper===null)return l;let e=n.wrapper??(c?`span`:`div`);if(l.length>1||n.forceWrapper)return i(e,{key:`outer`},l);if(l.length===1){let t=l[0];if(Array.isArray(t))return i(e,{key:`outer`},t);if(typeof t==`string`){let e={key:`outer`};if(!c&&a){let n=ft(a,`p.props`,{})??{},r=dt(e.className,n.className),o={...e,...n};return r&&(o.className=r),i(`span`,o,t)}return i(`span`,e,t)}return t}return i(e,{key:`outer`},null)})();return s.length?i(`div`,null,u,i(`footer`,{key:`footer`},...s.map(e=>i(`div`,{id:o(e.identifier),key:e.identifier},e.identifier,r(e.parsedAst||e.footnote,{inline:!0}))))):u},gn=(e=``,t,n={})=>{let{parse:r,scope:i}=Y(t,n,!0),a=q();return on(i,a,()=>mn(e,n,r,a.footnotes,a.references))},_n=(e,t,n={})=>{let{emit:r,createElement:i,scope:a}=Y(t,n,!1);return on(a,{footnotes:e.footnotes??[],references:e.references??{}},()=>hn(e,t,n,r,i))},vn=(e=``,t,n={})=>{if(typeof e!=`string`)throw console.error(`intlayer: the first argument must be a string. Received`,typeof e),Error(`intlayer: the first argument must be a string`);let{parse:r,emit:i,createElement:a,scope:o}=Y(t,n,!1),s=q();return on(o,s,()=>hn(mn(e,n,r,s.footnotes,s.references),t,n,i,a))},X=e(t(),1),yn;try{let e=(0,X.createElement)(`div`);yn=e&&typeof e==`object`&&`$$typeof`in e&&typeof e.$$typeof==`symbol`?e.$$typeof:Symbol.for(`react.transitional.element`)}catch{yn=Symbol.for(`react.transitional.element`)}var bn={createElement:(e,t,...n)=>{let{key:r,...i}=t??{},a=r==null?null:String(r),o=n.length;return o===1?i.children=n[0]:o>1&&(i.children=n),{$$typeof:yn,type:e,key:a,ref:null,props:i,_owner:null,_store:{},_debugStack:null,_debugTask:null}},cloneElement:(e,t,...n)=>n.length===0?(0,X.cloneElement)(e,t):(0,X.cloneElement)(e,t,...n),Fragment:X.Fragment,normalizeProps:(e,t)=>t},xn=(e=``,t={})=>{let{createElement:n,disableAutoLink:r,disableParsingRawHTML:i,enforceAtxHeadings:a,forceBlock:o,forceInline:s,forceWrapper:c,namedCodesToUnicode:l,components:u,renderRule:d,sanitizer:f,slugify:p,wrapper:m,preserveFrontmatter:h,tagfilter:g}=t,_={runtime:n?{...bn,createElement:n}:bn,components:u,namedCodesToUnicode:l,sanitizer:f,slugify:p},v={disableAutoLink:r,disableParsingRawHTML:i,enforceAtxHeadings:a,forceBlock:o,forceInline:s,forceWrapper:c,renderRule:d,wrapper:m,preserveFrontmatter:h,tagfilter:g};return typeof e==`string`?vn(e,_,v):_n(e,_,v)},Z=x(),Sn=(e,{components:t,wrapper:n,forceBlock:r,forceInline:i,preserveFrontmatter:a,tagfilter:o}={})=>xn(e,{components:t,forceBlock:r,forceInline:i,wrapper:n,forceWrapper:!!n,preserveFrontmatter:a,tagfilter:o}),Cn={name:`move-diagonal`,size:24,node:[[`path`,{d:`M11 19H5v-6`,key:`8awifj`}],[`path`,{d:`M13 5h6v6`,key:`7voy1q`}],[`path`,{d:`M19 5 5 19`,key:`wwaj1z`}]]};Cn.node;var wn=b(Cn),Tn=e=>{let{enable:t=!0,onSwipeLeft:n,onSwipeRight:r,itemIndex:i,itemCount:a,thresholdPct:o=20,touchAction:s=`pan-y`,disableWhenSelectingText:c=!0}=e,l=(0,X.useRef)(null),[u,d]=(0,X.useState)(!1),[f,p]=(0,X.useState)(0),m=(0,X.useRef)({pointerId:null,startX:0,startY:0,lastX:0,axisLocked:!1,isHorizontal:!1}),h=(0,X.useRef)(!1),g=()=>{let e=l.current;return e?e.clientWidth:0},_=e=>{let t=i<=0,n=i>=a-1;return t&&e>0||n&&e<0?e/(1+Math.abs(e)/30):e},v=e=>{t&&m.current.pointerId===null&&(m.current.pointerId=e.pointerId,m.current.startX=e.clientX,m.current.startY=e.clientY,m.current.lastX=e.clientX,m.current.axisLocked=!1,m.current.isHorizontal=!1,h.current=!1,d(!1),p(0))},y=e=>{if(!t||m.current.pointerId!==e.pointerId)return;let n=g();if(!n)return;let r=e.clientX-m.current.startX,i=e.clientY-m.current.startY;if(c){let e=typeof window<`u`?window.getSelection?.():null;if(e&&e.rangeCount>0&&!e.isCollapsed){h.current=!0;return}}if(!m.current.axisLocked){let e=Math.abs(r),t=Math.abs(i);(e>6||t>6)&&(m.current.axisLocked=!0,m.current.isHorizontal=e>t)}if(!m.current.isHorizontal)return;try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}e.preventDefault(),u||d(!0);let a=r/n*100;p(_(a)),m.current.lastX=e.clientX},b=e=>{try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}let t=m.current.isHorizontal,i=f;if(d(!1),p(0),m.current.pointerId=null,m.current.axisLocked=!1,m.current.isHorizontal=!1,h.current){h.current=!1;return}t&&(i>o?r?.():i<-o&&n?.())};return(0,X.useEffect)(()=>{p(0),d(!1)},[i]),{containerRef:l,isDragging:u,dragDeltaPct:f,containerProps:{ref:l,onPointerDown:v,onPointerMove:y,onPointerUp:e=>{t&&m.current.pointerId===e.pointerId&&b(e)},onPointerCancel:e=>{t&&m.current.pointerId===e.pointerId&&b(e)},style:{touchAction:s}}}},En=({children:e})=>(0,Z.jsx)(`div`,{className:`min-w-0 max-w-full overflow-x-auto`,children:(0,Z.jsx)(`pre`,{className:`min-w-0 max-w-full overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,children:(0,Z.jsx)(`code`,{children:typeof e==`string`?e.split(`
|
|
24
|
+
`).map((e,t)=>(0,Z.jsx)(`span`,{className:`line block w-full`,children:e},`line-${t}-${e.slice(0,10)}`)):e})})}),Dn=`[&_pre.shiki]:!bg-transparent min-w-0 max-w-full overflow-auto bg-transparent [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden [&_pre.shiki]:max-w-full [&_pre.shiki]:overflow-x-auto [&_pre::-webkit-scrollbar]:hidden [&_pre]:[-ms-overflow-style:none] [&_pre]:[scrollbar-width:none]`,On=({html:e})=>(0,Z.jsx)(`div`,{className:Dn,children:(0,Z.jsx)(`div`,{dangerouslySetInnerHTML:{__html:e}})}),kn=(0,X.lazy)(()=>C(()=>import(`./CodeBlockShiki-BLi98smi.js`).then(e=>({default:e.CodeBlockShiki})),__vite__mapDeps([0,1,2,3,4,5,6]))),An=({className:e,onChange:t,isEditable:n,children:r,lang:i,highlightedHtml:a,...o})=>(0,Z.jsx)(`div`,{className:S(`flex w-full min-w-0 max-w-full overflow-x-auto`,e),...o,children:a?(0,Z.jsx)(On,{html:a}):(0,Z.jsx)(X.Suspense,{fallback:(0,Z.jsx)(En,{children:r}),children:(0,Z.jsx)(kn,{lang:i,children:r})})}),jn={astro:()=>C(()=>import(`./astro-JHDYjn39.js`),__vite__mapDeps([7,8,9,10,11,12,13])),bash:()=>C(()=>import(`./bash-CLZ0U2zV.js`),[]),css:()=>C(()=>import(`./css-CdtkT07m.js`),__vite__mapDeps([14,11])),html:()=>C(()=>import(`./html-DYtkB_T1.js`),__vite__mapDeps([15,16,9,11])),javascript:()=>C(()=>import(`./javascript-Yelw-5ZN.js`),__vite__mapDeps([17,9])),json:()=>C(()=>import(`./json-CaljABEy.js`),__vite__mapDeps([18,8])),json5:()=>C(()=>import(`./json5-BR5RXkoi.js`),[]),jsonc:()=>C(()=>import(`./jsonc-CYpm1nAK.js`),[]),markdown:()=>C(()=>import(`./markdown-BYOwaDjH.js`),[]),svelte:()=>C(()=>import(`./svelte-tEuLYt3E.js`),__vite__mapDeps([19,9,10,11,12])),tsx:()=>C(()=>import(`./tsx-5f3ulCja.js`),__vite__mapDeps([20,13])),typescript:()=>C(()=>import(`./typescript-Utq2Cl8c.js`),__vite__mapDeps([21,10])),vue:()=>C(()=>import(`./vue-Bg0byEaI.js`),__vite__mapDeps([22,8,9,10,11,16])),xml:()=>C(()=>import(`./xml-DMbpbO54.js`),[]),yaml:()=>C(()=>import(`./yaml-rwi0_p6S.js`),[])};Object.keys(jn);var Mn={cjs:`javascript`,console:`bash`,cts:`typescript`,htm:`html`,js:`javascript`,jsonc:`json5`,jsx:`tsx`,md:`markdown`,mdx:`markdown`,mjs:`javascript`,mts:`typescript`,postcss:`css`,sh:`bash`,shell:`bash`,shellscript:`bash`,ts:`typescript`,yml:`yaml`,zsh:`bash`},Nn=`plaintext`,Pn=e=>{let t=(e??``).trim().toLowerCase(),n=Mn[t]??t,r=jn[n];return r?{id:n,loadGrammar:r}:{id:Nn,loadGrammar:null}},Fn={light:`github-light`,dark:`github-dark`},In=e=>e?e.match(/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\?v=|shorts\/))([\w-]{11})/i)?.[1]??null:null,Ln=e=>`https://www.youtube.com/embed/${e}`,Rn=e=>`https://www.youtube.com/watch?v=${e}`,zn=`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share`,Bn=(e,t)=>{let n=In(e);return n?{isYoutubeVideo:!0,src:Ln(n),frameProps:{...t,allow:zn,allowFullScreen:!0,referrerPolicy:`strict-origin-when-cross-origin`}}:{src:e,frameProps:t,isYoutubeVideo:!1}},Vn=e=>{if(!e)return{href:``,label:``};let t=In(e);if(t)return{href:Rn(t),label:`youtube.com`};if(/^https?:\/\//i.test(e))try{let t=new URL(e);return{href:t.href,label:t.host}}catch{return{href:e,label:e}}return{href:e,label:e}},Hn=()=>{let e=(0,X.useRef)(null),[t,n]=(0,X.useState)(!1);return(0,X.useEffect)(()=>{let r=e.current;if(!r||t)return;if(typeof IntersectionObserver>`u`){n(!0);return}let i=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(n(!0),i.disconnect())},{rootMargin:`200px`});return i.observe(r),()=>i.disconnect()},[t]),{elementRef:e,hasBecomeVisible:t}},Un=({src:e,title:t,className:n,frameProps:r})=>{let{elementRef:i,hasBecomeVisible:a}=Hn();return a?(0,Z.jsx)(`iframe`,{...r,src:e,title:t,loading:`lazy`,className:n}):(0,Z.jsx)(`div`,{ref:i,"aria-hidden":!0,className:n})},Wn=e=>{let{src:t,className:n,title:r,...a}=e,[o,s]=(0,X.useState)(!1),{src:u,frameProps:d,isYoutubeVideo:f}=Bn(t,a),{href:p,label:m}=Vn(t);return(0,Z.jsxs)(l,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:[(0,Z.jsx)(Un,{src:u,title:r,frameProps:d,className:S(`block max-h-[80vh] min-h-[12rem] w-full border-0`,f&&`aspect-video`,n)}),(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 py-1`,children:[p?(0,Z.jsx)(h,{href:p,target:`_blank`,rel:`noopener noreferrer`,label:``,color:`neutral`,className:`inline-flex min-w-0 max-w-[calc(100%-3rem)] items-center gap-2 text-muted-foreground text-xs underline-offset-2 hover:text-foreground hover:underline`,children:m}):(0,Z.jsx)(`span`,{className:`text-neutral text-sm`,children:`Embedded frame`}),(0,Z.jsx)(i,{variant:`hoverable`,size:`icon-md`,onClick:()=>s(!0),label:`Open embedded page in fullscreen`,Icon:wn})]}),(0,Z.jsx)(c,{isOpen:o,onClose:()=>s(!1),size:`unset`,hasCloseButton:!0,isScrollable:!0,padding:`sm`,children:o&&u?(0,Z.jsx)(l,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:(0,Z.jsx)(`iframe`,{...d,src:u,title:r??`Embedded content`,allowFullScreen:!0,className:`block min-h-[82vh] w-full border-0`})}):null})]})},Gn=(0,X.createContext)({packageManager:`npm`,setPackageManager:()=>{},codeFormat:`typescript`,setCodeFormat:()=>{},contentDeclarationFormat:`typescript`,setContentDeclarationFormat:()=>{}}),Q=()=>(0,X.useContext)(Gn),Kn=({children:e})=>{let[t,r]=n(`packageManager`,`npm`),[i,a]=n(`codeFormat`,`typescript`),[o,s]=n(`contentDeclarationFormat`,`typescript`);return(0,Z.jsx)(Gn,{value:{packageManager:t,setPackageManager:r,codeFormat:i,setCodeFormat:a,contentDeclarationFormat:o,setContentDeclarationFormat:s},children:e})},qn=700,Jn=({isRollable:e=!0,minHeight:t=qn,children:n,className:i})=>{let[o,s]=(0,X.useState)(0),[c,l]=(0,X.useState)(!0),u=(0,X.useRef)(null),{expandCollapseContent:d}=a(`expand-collapse`),f=o>t,p=(0,X.useCallback)(e=>{if(u.current?.disconnect(),u.current=null,!e)return;if(typeof ResizeObserver>`u`){s(e.clientHeight);return}let t=new ResizeObserver(([e])=>{e&&s(e.contentRect.height)});t.observe(e),u.current=t},[]);return(0,X.useEffect)(()=>()=>u.current?.disconnect(),[]),e?f?(0,Z.jsxs)(r,{isHidden:c,minHeight:t,className:`w-full overflow-x-auto overflow-y-hidden`,children:[(0,Z.jsx)(`div`,{className:S(`grid w-full`,i),ref:p,children:n}),(0,Z.jsx)(`button`,{className:S(`absolute right-0 bottom-0 flex w-full cursor-pointer items-center justify-center rounded-t-2xl bg-linear-to-t from-card/80 to-transparent px-3 py-0.5 text-md text-neutral-700 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all duration-300 hover:py-1 dark:text-neutral-400`,c?`w-full`:`w-32`),type:`button`,onClick:()=>l(e=>!e),children:d(c)})]}):(0,Z.jsx)(`div`,{className:S(`grid w-full`,i),ref:p,children:n}):n},Yn=({children:e,originalLang:t,targetFormat:n,initialHtml:r})=>{let[i,a]=(0,X.useState)(r??null),o=(0,X.useRef)(r??null);(0,X.useEffect)(()=>{if(r&&n===`typescript`){o.current=r,a(r);return}let i=!1;return(async()=>{try{let r=e,s=Pn(t).id;if(n!==`typescript`){let{transformCode:a,deriveLanguage:o}=await C(async()=>{let{transformCode:e,deriveLanguage:t}=await import(`./codeTransformer-DVPQQcdP.js`);return{transformCode:e,deriveLanguage:t}},[]);if(i)return;r=a(String(e),n),s=Pn(o(t,n)).id}let{codeToHtml:c}=await C(async()=>{let{codeToHtml:e}=await import(`./shikiBundle-DXvZCLBC.js`).then(e=>e.i);return{codeToHtml:e}},__vite__mapDeps([23,1,4,2,5,3,6]));if(i)return;let l=await c(String(r),{lang:s,themes:Fn,defaultColor:!1});i||(o.current=l,a(l))}catch{i||a(``)}})(),()=>{i=!0}},[e,t,n,r]);let s=i??o.current;return s?(0,Z.jsx)(`div`,{dangerouslySetInnerHTML:{__html:s},style:{backgroundColor:`transparent`}}):(0,Z.jsx)(`pre`,{className:`min-w-0 max-w-full overflow-x-auto`,children:(0,Z.jsx)(`code`,{children:e})})},Xn=e=>{if(e!=null){if(Array.isArray(e))return e;if(typeof e==`string`&&e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return[e]}},Zn=({children:e,...t})=>{let{packageManager:n,codeFormat:r,contentDeclarationFormat:i}=Q(),a=t.packageManager===void 0,o=n===t.packageManager,s=Xn(t.codeFormat),c=s===void 0,l=s?s.includes(r):!1,u=Xn(t.contentDeclarationFormat),d=u===void 0,f=u?u.includes(i):!1;return(a||o)&&(c||l)&&(d||f)?e:(0,Z.jsx)(Z.Fragment,{})},Qn=({availableFormats:e})=>{let{codeFormat:t,setCodeFormat:n,setContentDeclarationFormat:r}=Q(),i=a(`code-selectors`),o=t=>!e||e.includes(t);return(0,Z.jsxs)(d,{value:t,onValueChange:e=>{n(e),r(e)},children:[(0,Z.jsx)(d.Trigger,{className:`py-1!`,"aria-label":i.codeFormat.label.value,children:(0,Z.jsx)(d.Value,{placeholder:i.codeFormat.placeholder.value})}),(0,Z.jsxs)(d.Content,{children:[o(`typescript`)&&(0,Z.jsx)(d.Item,{value:`typescript`,children:`TypeScript`}),o(`esm`)&&(0,Z.jsx)(d.Item,{value:`esm`,children:`ESM`}),o(`commonjs`)&&(0,Z.jsx)(d.Item,{value:`commonjs`,children:`CommonJS`})]})]})},$n=()=>{let{contentDeclarationFormat:e,setContentDeclarationFormat:t}=Q(),n=a(`code-selectors`);return(0,Z.jsxs)(d,{value:e,onValueChange:t,children:[(0,Z.jsx)(d.Trigger,{className:`py-1!`,"aria-label":n.contentDeclarationFormat.label.value,children:(0,Z.jsx)(d.Value,{placeholder:n.contentDeclarationFormat.placeholder.value})}),(0,Z.jsxs)(d.Content,{children:[(0,Z.jsx)(d.Item,{value:`typescript`,children:`TypeScript`}),(0,Z.jsx)(d.Item,{value:`commonjs`,children:`CommonJS`}),(0,Z.jsx)(d.Item,{value:`esm`,children:`ESM`}),(0,Z.jsx)(d.Item,{value:`json`,children:`JSON`})]})]})},er=({code:e,...t})=>{let{title:n,description:r}=a(`code`);return(0,Z.jsxs)(v,{identifier:`copy`,children:[(0,Z.jsx)(p,{content:e,...t}),(0,Z.jsxs)(v.Detail,{identifier:`copy`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,Z.jsx)(`strong`,{children:n}),(0,Z.jsx)(`p`,{className:`text-neutral`,children:r})]})]})},tr=()=>{let{packageManager:e,setPackageManager:t}=Q(),n=a(`code-selectors`);return a(`code-selectors`),(0,Z.jsxs)(d,{value:e,onValueChange:t,children:[(0,Z.jsx)(d.Trigger,{className:`py-1!`,"aria-label":n.packageManager.label.value,children:(0,Z.jsx)(d.Value,{placeholder:n.packageManager.placeholder.value})}),(0,Z.jsxs)(d.Content,{children:[(0,Z.jsx)(d.Item,{value:`npm`,children:`npm`}),(0,Z.jsx)(d.Item,{value:`pnpm`,children:`pnpm`}),(0,Z.jsx)(d.Item,{value:`yarn`,children:`yarn`}),(0,Z.jsx)(d.Item,{value:`bun`,children:`bun`})]})]})},nr=700,rr=new Set([`tsx`,`jsx`]),ir=e=>{if(e){if(Array.isArray(e))return e;if(typeof e==`string`&&e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return[e]}},ar=({children:e,language:t,highlightedHtml:n,showHeader:r=!0,showLineNumbers:i=!0,className:a,fileName:o,packageManager:s,codeFormat:c,contentDeclarationFormat:u,isRollable:d=!0,lang:f,...p})=>{let{codeFormat:m,contentDeclarationFormat:h}=Q(),g=(0,X.useMemo)(()=>ir(c),[c]),_=(0,X.useMemo)(()=>ir(u),[u]),v=g!==void 0&&g.length>1&&g.includes(`typescript`),y=_!==void 0&&_.length>1&&_.includes(`typescript`),b=v||y,x=y?h:m,w=(0,X.useMemo)(()=>{let e=y?_:g;if(!e)return e;let n=e.filter(e=>e!==`json`);return rr.has(t)&&(n=n.filter(e=>e!==`commonjs`)),n},[y,_,g,t]),T=(0,X.useMemo)(()=>!w||w.includes(x)?x:w[w.length-1]??`typescript`,[w,x]),[E,D]=(0,X.useState)(o);(0,X.useEffect)(()=>{if(!b||T===`typescript`){D(o);return}if(!o)return;let e=!1;return(async()=>{let{deriveFileName:t}=await C(async()=>{let{deriveFileName:e}=await import(`./codeTransformer-DVPQQcdP.js`);return{deriveFileName:e}},[]);e||D(t(o,T))})(),()=>{e=!0}},[o,b,T]);let O=(0,X.useMemo)(()=>{let t=Array.isArray(e)?e.join(``):String(e);return t.endsWith(`
|
|
25
|
+
`)?t.slice(0,-1):t},[e]),[k,A]=(0,X.useState)(O);(0,X.useEffect)(()=>{if(!b||T===`typescript`){A(O);return}let e=!1;return(async()=>{let{transformCode:t}=await C(async()=>{let{transformCode:e}=await import(`./codeTransformer-DVPQQcdP.js`);return{transformCode:e}},[]);e||A(t(O,T))})(),()=>{e=!0}},[O,b,T]);let j=s||c||u;return(0,Z.jsx)(Zn,{packageManager:s,codeFormat:c,contentDeclarationFormat:u,children:(0,Z.jsxs)(l,{className:S(`relative min-w-0 max-w-full text-sm leading-6`,i&&`with-line-number ml-0`,a),transparency:`lg`,...p,children:[r&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`div`,{className:`grid w-full grid-cols-[1fr_auto] items-center justify-between rounded-t-xl border-b bg-card/50 py-1.5 pr-12 pl-4 text-muted-foreground text-xs`,children:[(0,Z.jsx)(`span`,{className:`truncate`,children:E??t}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s&&(0,Z.jsx)(tr,{}),c&&(0,Z.jsx)(Qn,{availableFormats:w}),u&&(0,Z.jsx)($n,{})]})]}),(0,Z.jsx)(`div`,{className:`sticky top-46 z-20`,children:(0,Z.jsx)(`div`,{className:S(`absolute right-2 bottom-0 flex h-7 items-center`,j&&`h-11`),children:(0,Z.jsx)(er,{code:k})})})]}),(0,Z.jsx)(Jn,{minHeight:nr,isRollable:d,className:`min-w-0 max-w-full overflow-x-auto p-2`,children:b?(0,Z.jsx)(Yn,{originalLang:t,targetFormat:T,initialHtml:n,children:O}):(0,Z.jsx)(An,{lang:t,highlightedHtml:n,children:O})})]})})},or=(0,X.createContext)({tabsValues:{},setTabsValues:(()=>{})}),sr=()=>(0,X.useContext)(or),cr=({children:e})=>{let[t,n]=(0,X.useState)({});return(0,Z.jsx)(or,{value:{tabsValues:t,setTabsValues:n},children:e})},lr=e=>e.trim().replace(/\s+/g,`-`).replace(/[^\w-]/g,``),ur=e=>{let t=new Map;return e.map((e,n)=>{let r=lr(e)||String(n),i=t.get(r)??0;return t.set(r,i+1),i===0?r:`${r}-${i+1}`})},dr=(0,X.createContext)(void 0),fr=f(`relative w-full rounded-lg`,{variants:{background:{with:`border bg-background/2 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur`,without:``},variant:{default:``,bordered:`border-2`,ghost:`border-0 bg-transparent shadow-none`}},defaultVariants:{variant:`default`}}),pr=({value:e,label:t},n)=>{let r=e??t;return typeof r==`string`?r:String(n)},$=({children:e,...t})=>(0,Z.jsx)(`div`,{...t,children:e});$.displayName=`TabItem`;var mr=Object.assign(({defaultTab:e,group:t,variant:n,children:r,className:i,headerClassName:a,fullHeight:o,...s})=>{let c=X.Children.toArray(r).filter(e=>(0,X.isValidElement)(e)&&e.type===$).map((e,t)=>({...e.props,value:pr(e.props,t)})),l=c[0]?.value,{tabsValues:u,setTabsValues:d}=sr(),[f,p]=(0,X.useState)(e??l??``),m=(t&&typeof u==`object`?u?.[t]:f)??e??l,h=c.findIndex(e=>e.value===m),_=c.length,v=ur(c.map(({value:e})=>e)),{containerProps:y,dragDeltaPct:b,isDragging:x}=Tn({itemIndex:h,itemCount:_,onSwipeLeft:()=>{let e=Math.min(_-1,h+1),t=c[e]?.value;t&&C(t)},onSwipeRight:()=>{let e=Math.max(0,h-1),t=c[e]?.value;t&&C(t)}}),C=e=>{p(e),typeof d==`function`&&d(n=>({...n,[t]:e}))},w={activeTab:f??l??``,setActiveTab:C};return(0,Z.jsx)(dr.Provider,{value:w,children:(0,Z.jsxs)(`div`,{className:S(fr({variant:n}),o&&`flex h-full flex-col overflow-hidden`,i),...s,children:[(0,Z.jsx)(`div`,{className:S(`flex shrink-0 gap-3 p-3`,a),children:(0,Z.jsx)(g,{selectedChoice:m,tabs:c.map(({label:e,value:t,disabled:n},r)=>{let i=m===t,a=v[r];return(0,Z.jsx)(`button`,{className:S(`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,!i&&`text-neutral/70`),"data-active":i,disabled:n,onClick:()=>!n&&C(t),role:`tab`,"aria-selected":i,"aria-controls":`tabpanel-${a}`,id:`tab-${a}`,type:`button`,children:e??t},t)}),hoverable:!0,color:`text`})}),(0,Z.jsx)(`div`,{className:S(`relative w-full min-w-0 overflow-x-clip [-webkit-clip-path:inset(0)] [clip-path:inset(0)]`,o&&`min-h-0 flex-1`),...y,children:(0,Z.jsx)(`div`,{className:S(`grid w-full min-w-0`,o&&`h-full`,x?`transition-none`:`transition-transform duration-300 ease-in-out`),style:{gridTemplateColumns:`repeat(${c.length}, 100%)`,transform:`translateX(-${h*100-(x?b:0)}%)`},children:c.map(({value:e,children:t,className:n},r)=>{let i=r===h,a=v[r];return(0,Z.jsx)(`div`,{role:`tabpanel`,"aria-labelledby":`tab-${a}`,id:`tabpanel-${a}`,inert:!i,tabIndex:i?0:-1,"data-active":i,className:S(`w-full min-w-0 p-3 opacity-100 transition-opacity duration-300 ease-in-out`,o&&`h-full overflow-y-auto`,!i&&`pointer-events-none opacity-0`,n),children:(0,Z.jsx)(`div`,{className:S(`flex w-full min-w-0 flex-col items-stretch gap-6`,o&&`min-h-full`),children:t})},e)})})})]})})},{Item:$}),hr=({setIsModalOpen:e})=>{let{modal:t}=a(`table`);return(0,Z.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 right-4 z-10`,children:(0,Z.jsx)(`div`,{className:`pointer-events-auto sticky top-48 pt-4`,children:(0,Z.jsxs)(v,{identifier:`expand`,children:[(0,Z.jsx)(i,{variant:`hoverable`,size:`icon-md`,onClick:()=>{e(!0)},label:t.title,Icon:wn}),(0,Z.jsxs)(v.Detail,{identifier:`expand`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,Z.jsx)(`strong`,{children:t.title}),(0,Z.jsx)(`p`,{className:`text-neutral`,children:t.description})]})]})})})},gr=(0,X.forwardRef)(({className:e,isInteractive:t,...n},r)=>(0,Z.jsx)(`table`,{ref:r,className:S(`w-full table-auto border-separate border-spacing-0 overflow-hidden rounded-2xl text-left text-sm`,`[&_thead_tr:first-child_th:first-child]:rounded-tl-2xl`,`[&_thead_tr:first-child_th:last-child]:rounded-tr-2xl`,`[&_tbody_tr:last-child_td:first-child]:rounded-bl-2xl`,`[&_tbody_tr:last-child_td:last-child]:rounded-br-2xl`,`supports-[corner-shape:squircle]:rounded-3xl`,`supports-[corner-shape:squircle]:[&_thead_tr:first-child_th:first-child]:rounded-tl-3xl`,`supports-[corner-shape:squircle]:[&_thead_tr:first-child_th:last-child]:rounded-tr-3xl`,`supports-[corner-shape:squircle]:[&_tbody_tr:last-child_td:first-child]:rounded-bl-3xl`,`supports-[corner-shape:squircle]:[&_tbody_tr:last-child_td:last-child]:rounded-br-3xl`,t&&`[&_tbody_tr:hover]:bg-neutral/40 [&_tbody_tr]:cursor-pointer [&_tbody_tr]:transition-colors`,e),...n})),_r=.55,vr=5,yr=30,br=(e,t,n)=>{(0,X.useEffect)(()=>{if(!e.current)return;let n=[];Array.from(e.current.querySelectorAll(`tr`)).forEach(e=>{Array.from(e.children).forEach((e,t)=>{let r=e.textContent?.trim().length??0;(n[t]===void 0||r>n[t])&&(n[t]=r)})});let r=e=>{let t=Array.from(e.querySelectorAll(`tr`));if(t.length===0)return;let r=(e,t)=>{let r=Math.min(yr,Math.max(vr,(n[t]??0)*_r));e.style.minWidth=`${r}rem`,e.style.maxWidth=`${yr}rem`};e.querySelectorAll(`th`).forEach((e,t)=>{r(e,t)}),t.forEach(e=>{e.querySelectorAll(`td`).forEach((e,t)=>{r(e,t)})})};r(e.current),t.current&&r(t.current)},n)},xr=({className:e,isRollable:t=!1,displayModal:n,isInteractive:r,onClick:i,...a})=>{let[o,s]=(0,X.useState)(!1),[l,u]=(0,X.useState)(null),d=(0,X.useRef)(null),f=(0,X.useRef)(null);br(d,f,[a.children,o]),(0,X.useEffect)(()=>{if(o&&l!==null&&f.current){let e=f.current.rows[l];e&&(e.scrollIntoView({behavior:`smooth`,block:`center`}),e.classList.add(`bg-card`),e.style.transition=`background-color 0.3s ease-in-out`)}},[o,l]),(0,X.useEffect)(()=>{o||u(null)},[o]);let p=e=>{if(n){let t=e.target.closest(`tr`);t?.closest(`tbody`)&&(u(t.rowIndex),s(!0))}i?.(e)};return(0,Z.jsxs)(`div`,{className:`group relative`,children:[n&&(0,Z.jsx)(hr,{setIsModalOpen:s}),(0,Z.jsx)(Jn,{isRollable:t,className:`max-w-full overflow-x-auto bg-background text-left`,children:(0,Z.jsx)(gr,{ref:d,className:e,isInteractive:r??n,onClick:p,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&p(e)},...a})}),(0,Z.jsx)(c,{isOpen:o,onClose:()=>s(!1),size:`xl`,hasCloseButton:!0,isScrollable:!0,children:o?(0,Z.jsx)(`div`,{className:`grid`,children:(0,Z.jsx)(gr,{ref:f,className:S(`min-w-full max-w-full text-left`,e),isInteractive:r,...a})}):(0,Z.jsx)(Z.Fragment,{})})]})},Sr=({className:e,...t})=>(0,Z.jsx)(`th`,{className:S(`border border-b border-solid bg-neutral/10 p-4`,e),...t}),Cr=({className:e,...t})=>(0,Z.jsx)(`tr`,{className:S(`hover:bg-neutral/10`,e),...t}),wr=({className:e,...t})=>(0,Z.jsx)(`td`,{className:S(`border border-b border-solid p-4`,e),...t}),Tr=({className:e,...t})=>(0,Z.jsx)(`hr`,{className:S(`mx-6 mt-16 border-dashed text-neutral`,e),...t}),Er=e=>(0,Z.jsx)(o,{isClickable:!0,className:`mb-16 mb-8 text-foreground`,...e}),Dr=e=>(0,Z.jsx)(m,{isClickable:!0,className:`mt-16 text-foreground`,...e}),Or=e=>(0,Z.jsx)(_,{isClickable:!0,className:`mt-5 text-foreground`,...e}),kr=e=>(0,Z.jsx)(s,{isClickable:!0,className:`mt-3 text-foreground`,...e}),Ar=e=>(0,Z.jsx)(u,{isClickable:!0,className:`mt-3 text-foreground`,...e}),jr=e=>(0,Z.jsx)(y,{isClickable:!0,className:`mt-3 text-foreground`,...e}),Mr=e=>(0,Z.jsx)(`strong`,{className:`text-foreground`,...e}),Nr=(0,X.memo)(({className:e,children:t,highlightedHtml:n,lang:r,...i})=>{let a=String(t??``).replace(/\n$/,``);if(!e){let e=a.replace(/&(?:amp;)?#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10)));return(0,Z.jsx)(`code`,{className:`rounded-md border border-neutral/30 bg-card/60 box-decoration-clone px-1.5 py-0.5 font-mono text-[0.875em] leading-[inherit]`,children:e})}let o=e?.replace(/lang(?:uage)?-/,``)||`plaintext`;return(0,Z.jsx)(ar,{...i,language:o,showHeader:!0,highlightedHtml:n,className:`border`,children:a})},(e,t)=>e.children===t.children&&e.className===t.className&&e.highlightedHtml===t.highlightedHtml),Pr=e=>(0,Z.jsx)(Nr,{...e}),Fr=({className:e,...t})=>(0,Z.jsx)(`blockquote`,{className:S(`mt-5 gap-3 border-card border-l-4 pl-5 text-muted-foreground [&_strong]:text-neutral`,e),...t}),Ir=({className:e,...t})=>(0,Z.jsx)(`ul`,{className:S(`mt-5 flex list-disc flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),Lr=({className:e,...t})=>(0,Z.jsx)(`ol`,{className:S(`mt-5 flex list-decimal flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),Rr=({className:e,alt:t,src:n,...r})=>(0,Z.jsx)(`img`,{...r,alt:t??``,loading:`lazy`,className:S(`max-h-[80vh] max-w-full rounded-md`,e),src:n?.includes(`github.com`)?n?.replace(`github.com`,`raw.githubusercontent.com`).replace(`/blob/`,`/`):n}),zr=e=>t=>(0,Z.jsx)(h,{isExternalLink:t.href?.startsWith(`http`),underlined:!0,locale:e,label:``,color:`text`,...t}),Br={h1:Er,h2:Dr,h3:Or,h4:kr,h5:Ar,h6:jr,strong:Mr,blockquote:Fr,ul:Ir,ol:Lr,img:Rr,pre:e=>(0,Z.jsx)(Z.Fragment,{children:e.children}),table:e=>(0,Z.jsx)(xr,{isRollable:!0,displayModal:!0,...e}),th:Sr,tr:Cr,td:wr,hr:Tr,Tabs:e=>(0,Z.jsx)(mr,{...e,className:`rounded-xl border border-card`,headerClassName:`sticky rounded-xl top-24 z-5 bg-background/70 backdrop-blur overflow-x-auto`}),Tab:mr.Item,Columns:({className:e,...t})=>(0,Z.jsx)(`div`,{className:S(`flex gap-4 max-md:flex-col`,e),...t}),Column:({className:e,...t})=>(0,Z.jsx)(`div`,{className:S(`flex-1`,e),...t}),iframe:e=>(0,Z.jsx)(Wn,{...e})},Vr=e=>({...Br,code:Pr,a:zr(e)}),Hr=({children:e,locale:t,forceBlock:n,preserveFrontmatter:r,tagfilter:i,components:a,wrapper:o})=>{let s=Sn(e,{components:{...Vr(t),...a},wrapper:o,forceBlock:n,preserveFrontmatter:r,tagfilter:i});return(0,Z.jsx)(Kn,{children:(0,Z.jsx)(cr,{children:s})})};export{Rn as a,jn as c,Dn as d,In as i,Pn as l,Wn as n,Fn as o,Ln as r,Mn as s,Hr as t,En as u};
|