import{w as l,a as n,L as a}from"./chunk-EVOBXE3Y-Bmgys8-c.js";import{j as r}from"./jsx-runtime-hUI6LOBV.js";import{E as m}from"./index-J1nVA_jb.js";import{E as d}from"./epic-video-CaAYhEZJ.js";import{G as c}from"./error-boundary-C8cCfAXR.js";import{E as p}from"./launch-editor-DiQgdwg7.js";import{M as x}from"./mdx-C9OwPmWH.js";import{c as f}from"./misc-BNcbB3dR.js";import{P as u,u as h}from"./progress-DohUumej.js";import"./index-CFdT0RIo.js";import"./loading-Cf-_cX4u.js";import"./index-BiGqsMpe.js";import"./tooltip-CoTdGGXz.js";import"./index-ZNADqOyW.js";import"./root-loader-ByAKsmmv.js";import"./pe-BRA_K7Pt.js";import"./schemas-Bn3zadsT.js";import"./index-Bh67Vwl7.js";import"./online-BM9kpW1W.js";import"./format-C6HW_OzJ.js";import"./user-BrD2IM_u.js";import"./workshop-config-BNvMPSev.js";import"./preload-helper-DLdknYSj.js";import"./progress-bar-8MSIg-hJ.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};o.SENTRY_RELEASE={id:"66e9b849450b819e11683314a547a341cb57f7d0"};var e=new o.Error().stack;e&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[e]="806eb251-01d4-464f-927a-bb506bc54589",o._sentryDebugIdIdentifier="sentry-dbid-806eb251-01d4-464f-927a-bb506bc54589")}catch{}})();function b({index:o,exercise:e}){const s=h(e.exerciseNumber);return r.jsx("li",{children:r.jsxs(a,{className:f("hover:bg-muted/60 relative flex items-center gap-4 px-4 py-3 text-lg font-semibold transition after:absolute after:right-10 after:-translate-x-2 after:opacity-0 after:transition after:content-['→'] hover:after:translate-x-0 hover:after:opacity-100",s),to:`${e.exerciseNumber.toString().padStart(2,"0")}`,"data-keyboard-action":o===0?"g+n":void 0,children:[r.jsx("span",{className:"text-xs font-normal tabular-nums opacity-50",children:e.exerciseNumber}),r.jsx("span",{children:e.title})]})},e.exerciseNumber)}const w={h1:()=>null},O=l(function({loaderData:e}){const s=r.jsxs("ul",{className:"divide-border dark:divide-border/50 flex flex-col divide-y",children:[r.jsx("strong",{className:"px-10 pb-3 font-mono text-xs uppercase",children:"Exercises"}),e.exercises.map((t,i)=>r.jsx(b,{index:i,exercise:t},t.exerciseNumber))]});return r.jsxs("main",{className:"relative flex h-full w-full max-w-5xl flex-col justify-between border-r md:w-3/4 xl:w-2/3",children:[r.jsxs("article",{id:e.articleId,className:"shadow-on-scrollbox scrollbar-thin scrollbar-thumb-scrollbar flex w-full flex-1 flex-col gap-12 overflow-y-scroll px-3 py-4 pt-6 md:px-10 md:py-12 md:pt-16",children:[r.jsx("div",{children:r.jsx("h1",{className:"px-10 text-[clamp(3rem,6vw,7.5rem)] leading-none font-extrabold",children:e.title})}),r.jsxs("div",{className:"w-full max-w-none scroll-pt-6 border-t px-3 pt-3 md:px-10 md:pt-8",children:[r.jsx("h2",{className:"pb-5 font-mono text-xs font-semibold uppercase",children:"Intro"}),e.workshopReadme.compiled.status==="success"&&e.workshopReadme.compiled.code?r.jsx(d,{epicVideoInfosPromise:e.epicVideoInfosPromise,children:r.jsx("div",{className:"prose dark:prose-invert sm:prose-lg",children:r.jsx(x,{code:e.workshopReadme.compiled.code,components:w})})}):e.workshopReadme.compiled.status==="error"?r.jsxs("div",{className:"text-foreground-destructive",children:["There was an error:",r.jsx("pre",{children:e.workshopReadme.compiled.error})]}):"No instructions yet..."]}),r.jsx("div",{className:"pt-10 pb-5",children:e.workshopReadme.compiled.status==="success"&&e.workshopReadme.compiled.code&&e.workshopReadme.compiled.code.length>500?s:null})]}),r.jsx(m,{elementQuery:`#${e.articleId}`}),r.jsx(u,{type:"workshop-instructions",className:"h-14 border-t px-6"}),r.jsx("div",{className:"@container flex h-16 justify-center border-t",children:r.jsx(p,{file:e.workshopReadme.file,relativePath:e.workshopReadme.relativePath})})]})}),Q=n(function(){return r.jsx(c,{})});export{Q as ErrorBoundary,O as default};
//# sourceMappingURL=index-BlgqdxwS.js.map
