PageSourceSearch

https://awellis-diagnostic-tool-spec.hf.space/assets/markdown-renderer-CbuqHMPu.js

js awellis-diagnostic-tool-spec.hf.space collected 2026-10-03 16:44:06 UTC 5,598 bytes, 5 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dist-C204e66A.js","./micromark-factory-space-DzSMahmM.js","./chunk-LvLJmgfZ.js","./katex-M9SX-Gs-.js"])))=>i.map(i=>d[i]);
2import{s as v}from"./chunk-LvLJmgfZ.js";import{u as H}from"./useEvent-D91BmmQi.js";import{t as J}from"./react-Bj1aDYRI.js";import{E as K,Vt as Q,Xt as X,__tla as Y}from"./cells-DAxz8J5R.js";import{t as N}from"./compiler-runtime-B3qBwwSJ.js";import{o as Z}from"./utils-BrXijSdZ.js";import{t as tt}from"./jsx-runtime-BqBOg78p.js";import{t as A}from"./button-D9nb17Rw.js";import{at as et}from"./dist-BrR4M-k3.js";import{t as rt}from"./createLucideIcon-D5guW7EU.js";import{n as at,t as nt,__tla as ot}from"./LazyAnyLanguageCodeMirror-BF3xpDgO.js";import{t as st}from"./preload-helper-DItdS47A.js";import{r as lt}from"./useTheme-DFXuDFj9.js";import{n as it}from"./copy-BCF-tANo.js";import{n as ct}from"./useAsyncData-BFC6lWG9.js";import{o as ut,__tla as mt}from"./chunk-5FQGJX7Z-e_arGD4o.js";import{r as dt}from"./html-to-image-v-_444d3.js";import{o as ft}from"./focus-Crs_4nnQ.js";let S,E,U,I,j,T,$,B,C,L,k,V,pt=Promise.all([(()=>{try{return Y}catch{}})(),(()=>{try{return ot}catch{}})(),(()=>{try{return mt}catch{}})()]).then(async()=>{let y,d,x,b;I=rt("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),y=N(),d=v(J(),1),x={},b={},U=function(e){let t=(0,y.c)(6),[r,a]=(0,d.useState)(x[e]??!1),n,o;t[0]!==e||t[1]!==r?(n=()=>{x[e]=r},o=[e,r],t[0]=e,t[1]=r,t[2]=n,t[3]=o):(n=t[2],o=t[3]),(0,d.useEffect)(n,o);let s;return t[4]===r?s=t[5]:(s=[r,a],t[4]=r,t[5]=s),s},V=function(e){let t=(0,y.c)(6),[r,a]=(0,d.useState)(b[e]??!1),n,o;t[0]!==e||t[1]!==r?(n=()=>{b[e]=r},o=[e,r],t[0]=e,t[1]=r,t[2]=n,t[3]=o):(n=t[2],o=t[3]),(0,d.useEffect)(n,o);let s;return t[4]===r?s=t[5]:(s=[r,a],t[4]=r,t[5]=s),s},T=function(e){return e==null||e.data==null||e.data===""},$=function(e,t){return`data:${t};base64,${e}`},L=function(e){return e.startsWith("data:")&&e.includes(";base64,")},B=function(e){return e.split(",")[1]};function q(e){let t=globalThis.atob(e),r=t.length,a=new Uint8Array(r);for(let n=0;n<r;n++)a[n]=t.charCodeAt(n);return a}j=Uint8Array.fromBase64??q,C=function(e){let t=j(e);return new DataView(t.buffer)};function z(e){let t="",r=e.length;for(let a=0;a<r;a++)t+=String.fromCharCode(e[a]);return globalThis.btoa(t)}const D="toBase64"in Uint8Array.prototype?e=>e.toBase64():z;S=function(e){return D(new Uint8Array(e.buffer,e.byteOffset,e.byteLength))},E=function(e){return(e.buffers??[]).map(C)};var g=N(),l=v(tt(),1),M=[et.lineWrapping];function O(e,t){return e?e==="python"?{language:e,code:t}:e==="sql"?{language:"python",code:Q.fromQuery(t)}:e==="markdown"?{language:"python",code:X.fromMarkdown(t)}:e==="shell"||e==="bash"?{language:"python",code:`import subprocess
3subprocess.run("${t}")`}:{language:"python",code:`_${e} = """
4${t}
5"""`}:{language:"python",code:t}}var P=e=>{let t=(0,g.c)(9),{code:r,language:a}=e,{createNewCell:n}=K(),o=ft(),s=H(Z),i;t[0]!==s||t[1]!==r||t[2]!==n||t[3]!==a||t[4]!==o?(i=()=>{let f=O(a,r);a==="sql"&&dt({autoInstantiate:s,createNewCell:n,fromCellId:o}),n({code:f.code,before:!1,cellId:o??"__end__"})},t[0]=s,t[1]=r,t[2]=n,t[3]=a,t[4]=o,t[5]=i):i=t[5];let c=i,m;t[6]===Symbol.for("react.memo_cache_sentinel")?(m=(0,l.jsx)(at,{className:"ml-2 h-4 w-4"}),t[6]=m):m=t[6];let u;return t[7]===c?u=t[8]:(u=(0,l.jsxs)(A,{size:"xs",variant:"outline",onClick:c,children:["Add to Notebook",m]}),t[7]=c,t[8]=u),u},R=e=>{let t=(0,g.c)(17),{code:r,language:a}=e,{theme:n}=lt(),[o,s]=(0,d.useState)(r);o!==r&&s(r);let i;t[0]===o?i=t[1]:(i=async()=>{await it(o)},t[0]=o,t[1]=i);let c=i,m=n==="dark"?"dark":"light",u;t[2]!==a||t[3]!==m||t[4]!==o?(u=(0,l.jsx)(d.Suspense,{children:(0,l.jsx)(nt,{theme:m,language:a,hideUnsupportedLanguageErrors:!0,className:"cm border rounded overflow-hidden",extensions:M,value:o,onChange:s})}),t[2]=a,t[3]=m,t[4]=o,t[5]=u):u=t[5];let f;t[6]===c?f=t[7]:(f=(0,l.jsx)(W,{size:"xs",variant:"outline",onClick:c,children:"Copy"}),t[6]=c,t[7]=f);let p;t[8]!==a||t[9]!==o?(p=(0,l.jsx)(P,{code:o,language:a}),t[8]=a,t[9]=o,t[10]=p):p=t[10];let h;t[11]!==f||t[12]!==p?(h=(0,l.jsxs)("div",{className:"flex justify-end mt-2 space-x-2",children:[f,p]}),t[11]=f,t[12]=p,t[13]=h):h=t[13];let _;return t[14]!==u||t[15]!==h?(_=(0,l.jsxs)("div",{className:"relative",children:[u,h]}
5),t[14]=u,t[15]=h,t[16]=_):_=t[16],_},W=e=>{let t=(0,g.c)(9),r,a;t[0]===e?(r=t[1],a=t[2]):({onClick:r,...a}=e,t[0]=e,t[1]=r,t[2]=a);let[n,o]=(0,d.useState)(!1),s;t[3]===r?s=t[4]:(s=m=>{r==null||r(m),o(!0),setTimeout(()=>o(!1),1e3)},t[3]=r,t[4]=s);let i=n?"Copied":"Copy",c;return t[5]!==a||t[6]!==s||t[7]!==i?(c=(0,l.jsx)(A,{...a,onClick:s,children:i}),t[5]=a,t[6]=s,t[7]=i,t[8]=c):c=t[8],c},F={code:({children:e,className:t})=>{let r=t==null?void 0:t.replace("language-","");if(r&&typeof e=="string"){let a=e.trim();return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-xs text-muted-foreground pl-1",children:r}),(0,l.jsx)(R,{code:a,language:r})]})}return(0,l.jsx)("code",{className:t,children:e})}},w,G=()=>{let{data:e}=ct(async()=>w||(w={math:(await st(()=>import("./dist-C204e66A.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([0,1,2,3]),import.meta.url)).math},w),[]);return e};k=(0,d.memo)(e=>{let t=(0,g.c)(3),{content:r}=e,a=G(),n;return t[0]!==r||t[1]!==a?(n=(0,l.jsx)(ut,{components:F,plugins:a,className:"mo-markdown-renderer",children:r}),t[0]=r,t[1]=a,t[2]=n):n=t[2],n}),k.displayName="MarkdownRenderer"});export{pt as __tla,S as a,E as c,U as d,I as f,j as i,T as l,$ as n,B as o,C as r,L as s,k as t,V as u};

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.