1globalThis.STRADA_RELEASE={commit:`8baab3aec8ff48dc5fbac483694f40eec8e5f6b2`,branch:`preview`,deploymentId:`8baab3aec8ff48dc5fbac483694f40eec8e5f6b2`};import{s as e}from"./rolldown-runtime-BO1D7fPK.js";import{t}from"./jsx-runtime-B44_mNpU.js";import{t as n}from"./react-BIe5H-YT.js";var r=e(n(),1);function bleedClass(e){return e===!0||e===`both`?`bleed`:e===`right`?`bleed-right`:``}function hasLeftBleed(e){return e===!0||e===`both`}var i=e(t(),1);function CopyIcon(){return(0,i.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,i.jsx)(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`,ry:`2`}),(0,i.jsx)(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`})]})}function CheckIcon(){return(0,i.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,i.jsx)(`polyline`,{points:`20 6 9 17 4 12`})})}function parseHighlightLines(e,t){let n=new Set;for(let r of e.split(`,`)){let e=r.trim();if(!e)continue;let i=/^(\d+)(?:-(\d+))?$/.exec(e);if(!i)return;let a=Number(i[1]),o=Number(i[2]??i[1]);if(a<1||o<a)return;for(let e=a;e<=Math.min(o,t);e++)n.add(e)}return n.size>0?n:void 0}function CodeBlock({children:e,lang:t=`jsx`,lineHeight:n,showLineNumbers:a=!0,bleed:o=!1,title:s,highlight:c,wrap:l=!1,highlightedHtml:u}){let d=n??(t===`diagram`?`1.3`:`1.6`);l&&(a=!1,c=void 0);let f=e.split(` 2`),[p,m]=(0,r.useState)(!1),h=(0,r.useCallback)(()=>{navigator.clipboard.writeText(e).then(()=>{m(!0),setTimeout(()=>m(!1),1500)},()=>{})},[e]),g=(0,r.useMemo)(()=>c?parseHighlightLines(c,f.length):void 0,[c,f.length]),_=bleedClass(o),v=hasLeftBleed(o),y=l?{whiteSpace:`pre-wrap`,overflowWrap:`anywhere`,minWidth:0,flex:`1 1 0`,background:`none`,padding:0,lineHeight:d}:{whiteSpace:`pre`,background:`none`,padding:0,lineHeight:d};return(0,i.jsxs)(`figure`,{className:`group/code relative m-0${_?` ${_}`:``}`,style:{background:`var(--code-block-background)`,border:`var(--code-block-border)`,boxShadow:`var(--code-block-shadow)`,borderRadius:`var(--code-block-radius)`,paddingLeft:`var(--code-block-padding-x)`,paddingRight:`var(--code-block-padding-x)`,paddingTop:`var(--code-block-padding-y)`,paddingBottom:`var(--code-block-padding-y)`},children:[s&&(0,i.jsx)(`div`,{className:`font-mono pb-1`,style:{fontSize:`var(--type-code-size)`,color:`var(--muted-foreground)`,paddingLeft:a?v?`var(--bleed)`:`26px`:void 0,paddingRight:`36px`},children:s}),(0,i.jsxs)(`div`,{className:`relative`,style:{fontFamily:`var(--font-code)`,fontSize:`var(--type-code-size)`,lineHeight:d},children:[(0,i.jsx)(`pre`,{className:`overflow-x-auto scrollbar-none`,style:{margin:0},children:(0,i.jsxs)(`div`,{className:`flex`,style:{fontWeight:`var(--weight-regular)`,letterSpacing:`normal`,color:`var(--foreground)`,tabSize:2},children:[a&&(0,i.jsx)(`span`,{className:`select-none shrink-0`,"aria-hidden":`true`,style:{color:`var(--text-tertiary)`,textAlign:`right`,paddingRight:v?`var(--bleed)`:`16px`,width:v?`var(--bleed)`:`26px`,overflow:`hidden`,userSelect:`none`},children:f.map((e,t)=>(0,i.jsx)(`span`,{className:`block`,children:t+1},t))}),u?(0,i.jsx)(`code`,{className:t?`language-${t}`:void 0,style:y,dangerouslySetInnerHTML:{__html:u}}):(0,i.jsx)(`code`,{className:t?`language-${t}`:void 0,style:y,children:e})]})}),g&&(0,i.jsx)(`div`,{"aria-hidden":`true`,className:`absolute inset-0 pointer-events-none`,children:f.map((e,t)=>(0,i.jsx)(`div`,{style:{height:`1lh`,background:g.has(t+1)?`transparent`:`var(--background)`,opacity:g.has(t+1)?0:.4}},t))})]}),(0,i.jsx)(`button`,{type:`button`,onClick:h,"aria-label":`Copy code`,className:`absolute z-10 flex size-[28px] curs
2or-pointer items-center justify-center rounded-md bg-background/80 text-muted-foreground opacity-0 backdrop-blur-sm transition-all hover:text-foreground group-hover/code:opacity-100 focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,style:{opacity:p?1:void 0,top:`var(--code-block-padding-y)`,right:`calc(var(--code-block-padding-x) + 4px)`},children:p?(0,i.jsx)(CheckIcon,{}):(0,i.jsx)(CopyIcon,{})})]})}export{CodeBlock as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.