@epic-web/workshop-app 4.2.1 → 4.2.3
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/build/client/assets/{_exerciseNumber-B_VU-pG1.js → _exerciseNumber-s_qbmGEJ.js} +2 -2
- package/build/client/assets/{_exerciseNumber-B_VU-pG1.js.map → _exerciseNumber-s_qbmGEJ.js.map} +1 -1
- package/build/client/assets/{_exerciseNumber_.finished-DldgXnJy.js → _exerciseNumber_.finished-DJgT9oaU.js} +2 -2
- package/build/client/assets/{_exerciseNumber_.finished-DldgXnJy.js.map → _exerciseNumber_.finished-DJgT9oaU.js.map} +1 -1
- package/build/client/assets/{_layout-CGXamJB4.js → _layout-49l6Rvwp.js} +2 -2
- package/build/client/assets/_layout-49l6Rvwp.js.map +1 -0
- package/build/client/assets/{_layout-CPxDcKGb.js → _layout-D7Qo_r0X.js} +2 -2
- package/build/client/assets/{_layout-CPxDcKGb.js.map → _layout-D7Qo_r0X.js.map} +1 -1
- package/build/client/assets/client-hints-KnbHFIgn.js +36 -0
- package/build/client/assets/client-hints-KnbHFIgn.js.map +1 -0
- package/build/client/assets/{diff-Blb5EPiO.js → diff-CLRdJhCn.js} +2 -2
- package/build/client/assets/{diff-Blb5EPiO.js.map → diff-CLRdJhCn.js.map} +1 -1
- package/build/client/assets/{diff-MSYB00VZ.js → diff-CT3-9rtW.js} +2 -2
- package/build/client/assets/{diff-MSYB00VZ.js.map → diff-CT3-9rtW.js.map} +1 -1
- package/build/client/assets/{epic-video-BwJwnV_j.js → epic-video-Df7qGSN7.js} +2 -2
- package/build/client/assets/{epic-video-BwJwnV_j.js.map → epic-video-Df7qGSN7.js.map} +1 -1
- package/build/client/assets/{finished-CGll5TOI.js → finished-Dw3SJA8A.js} +2 -2
- package/build/client/assets/{finished-CGll5TOI.js.map → finished-Dw3SJA8A.js.map} +1 -1
- package/build/client/assets/{index-zG3_j9lj.js → index-CLnz0tXz.js} +2 -2
- package/build/client/assets/{index-zG3_j9lj.js.map → index-CLnz0tXz.js.map} +1 -1
- package/build/client/assets/{index-DqBktlAI.js → index-YgRENgjt.js} +2 -2
- package/build/client/assets/{index-DqBktlAI.js.map → index-YgRENgjt.js.map} +1 -1
- package/build/client/assets/{loading-CaagEELb.js → loading-D-DClzm1.js} +2 -2
- package/build/client/assets/{loading-CaagEELb.js.map → loading-D-DClzm1.js.map} +1 -1
- package/build/client/assets/{login-2BiFV7_R.js → login-CjvZj820.js} +2 -2
- package/build/client/assets/{login-2BiFV7_R.js.map → login-CjvZj820.js.map} +1 -1
- package/build/client/assets/{manifest-5e8d103b.js → manifest-50f87ab0.js} +1 -1
- package/build/client/assets/{mdx-DdywIxB6.js → mdx-ytg-y2nh.js} +2 -2
- package/build/client/assets/{mdx-DdywIxB6.js.map → mdx-ytg-y2nh.js.map} +1 -1
- package/build/client/assets/{onboarding-eFvyCmxD.js → onboarding-BxcIdiGj.js} +2 -2
- package/build/client/assets/{onboarding-eFvyCmxD.js.map → onboarding-BxcIdiGj.js.map} +1 -1
- package/build/client/assets/{root-D_snSGY7.js → root-B02acrJe.js} +2 -2
- package/build/client/assets/{root-D_snSGY7.js.map → root-B02acrJe.js.map} +1 -1
- package/build/server/index.js +2 -2
- package/build/server/index.js.map +1 -1
- package/node_modules/@epic-web/client-hints/dist/index.js +32 -20
- package/node_modules/@epic-web/client-hints/package.json +1 -1
- package/package.json +4 -4
- package/build/client/assets/_layout-CGXamJB4.js.map +0 -1
- package/build/client/assets/client-hints-BHTHvBjk.js +0 -24
- package/build/client/assets/client-hints-BHTHvBjk.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e}from"./index-D1WEsmVZ.js";import{E as t}from"./index-BfoHqrT5.js";import{P as a,u as l}from"./progress-CBZt2pmu.js";import{E as i}from"./epic-video-
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{j as e}from"./index-D1WEsmVZ.js";import{E as t}from"./index-BfoHqrT5.js";import{P as a,u as l}from"./progress-CBZt2pmu.js";import{E as i}from"./epic-video-Df7qGSN7.js";import{G as m}from"./error-boundary-Bg54_knF.js";import{M as n,E as c}from"./mdx-ytg-y2nh.js";import{c as d}from"./misc-CXGQ7VS9.js";import{u as p,L as x}from"./components-Dj3sm47B.js";import"./clsx-B-dksMZM.js";import"./loading-D-DClzm1.js";import"./client-hints-KnbHFIgn.js";import"./index-CLnz0tXz.js";import"./index-B8k-Gd1G.js";import"./tooltip-CVFWPOu0.js";import"./progress-bar-DX6yYES2.js";function h({exercise:r}){const s=l(r.exerciseNumber);return e.jsx("li",{children:e.jsxs(x,{className:d("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:bg-gray-50 hover:after:translate-x-0 hover:after:opacity-100 dark:hover:bg-white/5",s),to:`${r.exerciseNumber.toString().padStart(2,"0")}`,children:[e.jsx("span",{className:"text-xs font-normal tabular-nums opacity-50",children:r.exerciseNumber}),e.jsx("span",{children:r.title})]})},r.exerciseNumber)}const f={h1:()=>null};function G(){const r=p(),s=e.jsxs("ul",{className:"flex flex-col divide-y divide-border dark:divide-border/50",children:[e.jsx("strong",{className:"px-10 pb-3 font-mono text-xs uppercase",children:"Exercises"}),r.exercises.map(o=>e.jsx(h,{exercise:o},o.exerciseNumber))]});return e.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:[e.jsxs("article",{id:r.articleId,className:"shadow-on-scrollbox flex w-full flex-1 flex-col gap-12 overflow-y-scroll px-3 py-4 pt-6 scrollbar-thin scrollbar-thumb-scrollbar md:px-10 md:py-12 md:pt-16",children:[e.jsx("div",{children:e.jsx("h1",{className:"px-10 text-[clamp(3rem,6vw,8.5rem)] font-extrabold leading-none",children:r.title})}),e.jsxs("div",{className:"w-full max-w-none scroll-pt-6 border-t px-3 pt-3 md:px-10 md:pt-8",children:[e.jsx("h2",{className:"pb-5 font-mono text-xs font-semibold uppercase",children:"Intro"}),r.workshopReadme.compiled.status==="success"&&r.workshopReadme.compiled.code?e.jsx(i,{epicVideoInfosPromise:r.epicVideoInfosPromise,children:e.jsx("div",{className:"prose dark:prose-invert sm:prose-lg",children:e.jsx(n,{code:r.workshopReadme.compiled.code,components:f})})}):r.workshopReadme.compiled.status==="error"?e.jsxs("div",{className:"text-red-500",children:["There was an error:",e.jsx("pre",{children:r.workshopReadme.compiled.error})]}):"No instructions yet..."]}),e.jsx("div",{className:"pb-5 pt-10",children:r.workshopReadme.compiled.status==="success"&&r.workshopReadme.compiled.code&&r.workshopReadme.compiled.code.length>500?s:null})]}),e.jsx(t,{elementQuery:`#${r.articleId}`}),e.jsx(a,{type:"workshop-instructions",className:"h-14 border-t px-6"}),e.jsx("div",{className:"flex h-16 justify-center border-t",children:e.jsx(c,{file:r.workshopReadme.file,relativePath:r.workshopReadme.relativePath})})]})}function S(){return e.jsx(m,{})}export{S as ErrorBoundary,G as default};
|
|
2
|
+
//# sourceMappingURL=index-YgRENgjt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-YgRENgjt.js","sources":["../../../app/routes/_app+/index.tsx"],"sourcesContent":["import { ElementScrollRestoration } from '@epic-web/restore-scroll'\nimport {\n\tgetExercises,\n\tgetWorkshopInstructions,\n\tgetWorkshopTitle,\n} from '@epic-web/workshop-utils/apps.server'\nimport {\n\tcombineServerTimings,\n\tgetServerTimeHeader,\n\tmakeTimings,\n\ttime,\n} from '@epic-web/workshop-utils/timing.server'\nimport {\n\tdefer,\n\ttype LoaderFunctionArgs,\n\ttype HeadersFunction,\n\ttype SerializeFrom,\n} from '@remix-run/node'\nimport { Link, useLoaderData } from '@remix-run/react'\nimport slugify from '@sindresorhus/slugify'\nimport { ProgressToggle, useExerciseProgressClassName } from '../progress.tsx'\nimport { EpicVideoInfoProvider } from '#app/components/epic-video.tsx'\nimport { GeneralErrorBoundary } from '#app/components/error-boundary.tsx'\nimport { EditFileOnGitHub } from '#app/routes/launch-editor.tsx'\nimport { getEpicVideoInfos } from '#app/utils/epic-api.ts'\nimport { Mdx } from '#app/utils/mdx.tsx'\nimport { cn } from '#app/utils/misc.tsx'\n\nexport async function loader({ request }: LoaderFunctionArgs) {\n\tconst timings = makeTimings('indexLoader')\n\tconst [title, exercises, workshopReadme] = await Promise.all([\n\t\ttime(() => getWorkshopTitle(), {\n\t\t\ttimings,\n\t\t\ttype: 'getWorkshopTitle',\n\t\t\tdesc: 'getWorkshopTitle in index',\n\t\t}),\n\t\ttime(() => getExercises({ request, timings }), {\n\t\t\ttimings,\n\t\t\ttype: 'getExercises',\n\t\t\tdesc: 'getExercises in index',\n\t\t}),\n\t\ttime(() => getWorkshopInstructions({ request }), {\n\t\t\ttimings,\n\t\t\ttype: 'compileMdx',\n\t\t\tdesc: 'compileMdx in index',\n\t\t}),\n\t])\n\n\treturn defer(\n\t\t{\n\t\t\tarticleId: `workshop-${slugify(title)}-instructions`,\n\t\t\ttitle:\n\t\t\t\tworkshopReadme.compiled.status === 'success'\n\t\t\t\t\t? workshopReadme.compiled.title\n\t\t\t\t\t: title,\n\t\t\texercises: exercises.map(e => ({\n\t\t\t\texerciseNumber: e.exerciseNumber,\n\t\t\t\ttitle: e.title,\n\t\t\t})),\n\t\t\tworkshopReadme,\n\t\t\tepicVideoInfosPromise:\n\t\t\t\tworkshopReadme.compiled.status === 'success'\n\t\t\t\t\t? getEpicVideoInfos(workshopReadme.compiled.epicVideoEmbeds, {\n\t\t\t\t\t\t\trequest,\n\t\t\t\t\t\t})\n\t\t\t\t\t: null,\n\t\t},\n\t\t{\n\t\t\theaders: {\n\t\t\t\t'Server-Timing': getServerTimeHeader(timings),\n\t\t\t},\n\t\t},\n\t)\n}\n\nexport const headers: HeadersFunction = ({ loaderHeaders, parentHeaders }) => {\n\tconst headers = {\n\t\t'Cache-Control': loaderHeaders.get('Cache-Control') ?? '',\n\t\t'Server-Timing': combineServerTimings(loaderHeaders, parentHeaders),\n\t}\n\treturn headers\n}\n\nfunction ExerciseListItem({\n\texercise,\n}: {\n\texercise: SerializeFrom<typeof loader>['exercises'][number]\n}) {\n\tconst progressClassName = useExerciseProgressClassName(\n\t\texercise.exerciseNumber,\n\t)\n\treturn (\n\t\t<li key={exercise.exerciseNumber}>\n\t\t\t<Link\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"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:bg-gray-50 hover:after:translate-x-0 hover:after:opacity-100 dark:hover:bg-white/5\",\n\t\t\t\t\tprogressClassName,\n\t\t\t\t)}\n\t\t\t\tto={`${exercise.exerciseNumber.toString().padStart(2, '0')}`}\n\t\t\t>\n\t\t\t\t<span className=\"text-xs font-normal tabular-nums opacity-50\">\n\t\t\t\t\t{exercise.exerciseNumber}\n\t\t\t\t</span>\n\t\t\t\t<span>{exercise.title}</span>\n\t\t\t</Link>\n\t\t</li>\n\t)\n}\n\nconst mdxComponents = { h1: () => null }\n\nexport default function Index() {\n\tconst data = useLoaderData<typeof loader>()\n\n\tconst exerciseLinks = (\n\t\t<ul className=\"flex flex-col divide-y divide-border dark:divide-border/50\">\n\t\t\t<strong className=\"px-10 pb-3 font-mono text-xs uppercase\">\n\t\t\t\tExercises\n\t\t\t</strong>\n\t\t\t{data.exercises.map(exercise => (\n\t\t\t\t<ExerciseListItem key={exercise.exerciseNumber} exercise={exercise} />\n\t\t\t))}\n\t\t</ul>\n\t)\n\treturn (\n\t\t<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\">\n\t\t\t<article\n\t\t\t\tid={data.articleId}\n\t\t\t\tclassName=\"shadow-on-scrollbox flex w-full flex-1 flex-col gap-12 overflow-y-scroll px-3 py-4 pt-6 scrollbar-thin scrollbar-thumb-scrollbar md:px-10 md:py-12 md:pt-16\"\n\t\t\t>\n\t\t\t\t<div>\n\t\t\t\t\t<h1 className=\"px-10 text-[clamp(3rem,6vw,8.5rem)] font-extrabold leading-none\">\n\t\t\t\t\t\t{data.title}\n\t\t\t\t\t</h1>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"w-full max-w-none scroll-pt-6 border-t px-3 pt-3 md:px-10 md:pt-8\">\n\t\t\t\t\t<h2 className=\"pb-5 font-mono text-xs font-semibold uppercase\">\n\t\t\t\t\t\tIntro\n\t\t\t\t\t</h2>\n\t\t\t\t\t{data.workshopReadme.compiled.status === 'success' &&\n\t\t\t\t\tdata.workshopReadme.compiled.code ? (\n\t\t\t\t\t\t<EpicVideoInfoProvider\n\t\t\t\t\t\t\tepicVideoInfosPromise={data.epicVideoInfosPromise}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"prose dark:prose-invert sm:prose-lg\">\n\t\t\t\t\t\t\t\t<Mdx\n\t\t\t\t\t\t\t\t\tcode={data.workshopReadme.compiled.code}\n\t\t\t\t\t\t\t\t\tcomponents={mdxComponents}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</EpicVideoInfoProvider>\n\t\t\t\t\t) : data.workshopReadme.compiled.status === 'error' ? (\n\t\t\t\t\t\t<div className=\"text-red-500\">\n\t\t\t\t\t\t\tThere was an error:\n\t\t\t\t\t\t\t<pre>{data.workshopReadme.compiled.error}</pre>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t'No instructions yet...'\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"pb-5 pt-10\">\n\t\t\t\t\t{data.workshopReadme.compiled.status === 'success' &&\n\t\t\t\t\tdata.workshopReadme.compiled.code &&\n\t\t\t\t\tdata.workshopReadme.compiled.code.length > 500\n\t\t\t\t\t\t? exerciseLinks\n\t\t\t\t\t\t: null}\n\t\t\t\t</div>\n\t\t\t</article>\n\t\t\t<ElementScrollRestoration elementQuery={`#${data.articleId}`} />\n\t\t\t<ProgressToggle\n\t\t\t\ttype=\"workshop-instructions\"\n\t\t\t\tclassName=\"h-14 border-t px-6\"\n\t\t\t/>\n\t\t\t<div className=\"flex h-16 justify-center border-t\">\n\t\t\t\t<EditFileOnGitHub\n\t\t\t\t\tfile={data.workshopReadme.file}\n\t\t\t\t\trelativePath={data.workshopReadme.relativePath}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</main>\n\t)\n}\n\nexport function ErrorBoundary() {\n\treturn <GeneralErrorBoundary />\n}\n"],"names":["ExerciseListItem","exercise","progressClassName","useExerciseProgressClassName","jsx","jsxs","Link","cn","mdxComponents","Index","data","useLoaderData","exerciseLinks","EpicVideoInfoProvider","headers","ElementScrollRestoration","ProgressToggle","EditFileOnGitHub","ErrorBoundary","GeneralErrorBoundary"],"mappings":"6jBAOC,SACAA,EAAA,CACA,SAAAC,CAAA,EACA,CACM,MAAAC,EAAAC,EAAAF,EAAA,cAAA,EACP,OAAAG,EAAAA,IAAA,KAAA,CACC,SAAAC,EAAA,KAAAC,EAAA,CAIM,UAAAC,EAAA,+QAAAL,CAAA,EACP,QAAoC,eAAA,SAAA,EAAA,SAAA,EAAA,GAAA,CAAA,GACpC,SAAoB,CAAAE,EAAA,IAAA,OAAA,CACpB,wDACA,SAAsCH,EAAA,cACtC,CAAA,EAAqCG,EAAA,IAAA,OAAA,CACrC,SAAiCH,EAAA,KACjC,CAAA,CAAA,CACA,CAAA,CACA,EAAAA,EAAmB,cAAA,CAEnB,CACC,MAAMO,GACN,GAAA,IAAc,IAA+C,EAE3D,SAAAC,GAAA,CAAA,MACMC,EAAAC,IACAC,EAAAP,EAAA,KAAA,KAAA,CACP,UAAC,6DACD,SAAW,CAAeD,EAAS,IAAA,SAAA,CAClC,UAAA,yCACA,SAAM,WAAA,CAAA,EACAM,EAAA,UAAA,IAAAT,GAAAG,EAAA,IAAAJ,EAAA,CACN,SAAAC,CAAA,IACU,cAAA,CAAA,CAAA,CAAsC,CAChD,EAAA,OACMI,EAAAA,KAAA,OAAA,CAAA,UACA,4FACP,SAAC,CAAAA,EAAA,KAAA,UAAA,CACD,GAAAK,EAAA,UAEM,UAAA,8JACN,SAAA,CAAAN,EAAA,IAAA,MAAA,CACY,SAAoBA,EAAA,IAAA,KAAM,WAErB,kEAGhB,SAAqBM,EAAA,KAAU,EACZ,CAAA,EACTL,EAAA,KAAA,MAAA,CACR,UAAA,oEACF,SAAA,CAAAD,EAAA,IAAA,KAAA,CACA,UAAA,iDAGI,SAAA,OAEA,CAAA,EAAAM,EAAA,eAAA,SAAA,SAAA,WAAAA,EAAA,eAAA,SAAA,KAAAN,EAAAA,IAAAS,EAAA,CACL,sBAAAH,EAAA,sBACA,SAAAN,EAAA,IAAA,MAAA,CACU,UAAA,sCACR,iBAA4C,CAC7C,KAAAM,EAAA,eAAA,SAAA,KACD,WAAAF,CAAA,CACD,CACD,CAAA,CAEO,CAAA,EAAME,EAA2B,eAAG,0BAAmCL,EAAA,KAAA,MAAA,CAC7D,UAAA,eACE,SAAA,CAAA,sBAAsCD,EAAA,IAAA,MAAA,CACvD,SAAsCM,EAAA,eAAA,SAAA,KAA4B,CACnE,CAAA,CACOI,CAAAA,EAAAA,wBAAAA,CACR,CAAA,EAAAV,EAAA,IAAA,MAAA,CAEA,UAA0B,aACzB,SAAAM,EAAA,eAAA,SAAA,SAAA,WAAAA,EAAA,eAAA,SAAA,MAAAA,EAAA,eAAA,SAAA,KAAA,OAAA,IAAAE,EAAA,IACD,CAEG,CAAA,CACF,CAAA,EAA0BR,EAAA,IAAAW,EAAA,CAChB,aAAA,IAAAL,EAAA,SAAA,EAAA,CACV,EAAAN,EAAA,IAAAY,EAAA,CACA,6BAEG,UAAA,oBAAA,CAAA,EAAAZ,EAAA,IAAA,MAAA,CACA,UAAW,oCACV,SAAAA,EAAA,IAAAa,EAAA,CACA,KAAAP,EAAA,eAAA,KACD,aAAAA,EAAA,eAAA,YAAA,CACA,CAA0D,CAE1D,CAAA,CAAA,CAAA,CAEA,CACsB,SAAAQ,GAAA,CAAA,OAAAd,EAAA,IAAAe,EAAA,CAAA,CAAA,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as r,r as n}from"./index-D1WEsmVZ.js";import{u as d}from"./client-hints-
|
|
2
|
-
//# sourceMappingURL=loading-
|
|
1
|
+
import{j as r,r as n}from"./index-D1WEsmVZ.js";import{u as d}from"./client-hints-KnbHFIgn.js";function x({children:t="Loading"}){const{reducedMotion:e}=d();return e==="reduce"?r.jsx("div",{className:"animate-pulse",children:t}):r.jsxs("div",{className:"flex items-center gap-2 font-mono text-sm font-medium uppercase",role:"status",children:[r.jsx("div",{"aria-hidden":"true",children:r.jsx(u,{})}),t,r.jsx("div",{"aria-hidden":"true",children:r.jsx(u,{})})]})}const o="█<▓█ ▒░/▒░ █░>▒▓/ █▒▒ ▓▒▓/█<░▒ ▓/░>",i=()=>o[Math.floor(Math.random()*o.length)];function u(){const[t,e]=n.useState(o[0]),[s,c]=n.useState(o[1]);return f(()=>{e(i()),c(i())},80),r.jsxs("span",{children:[t,s]})}function f(t,e=1e3){const s=n.useRef();n.useEffect(()=>{s.current=t},[t]),n.useEffect(()=>{function c(){var a;(a=s.current)==null||a.call(s)}if(e!==null){const a=setInterval(c,e);return()=>clearInterval(a)}},[e])}export{x as L};
|
|
2
|
+
//# sourceMappingURL=loading-D-DClzm1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loading-
|
|
1
|
+
{"version":3,"file":"loading-D-DClzm1.js","sources":["../../../app/components/loading.tsx"],"sourcesContent":["// originally this was based on baffle-react, but it was unnecessarily bloated\n// and very out-dated. I've replaced it with a simple Characters component that\n// does the same thing we were using baffle-react for\nimport { useEffect, useRef, useState } from 'react'\nimport { useHints } from '#app/utils/client-hints.tsx'\n\nexport function Loading({\n\tchildren = 'Loading',\n}: {\n\tchildren?: React.ReactNode\n}) {\n\tconst { reducedMotion } = useHints()\n\tif (reducedMotion === 'reduce') {\n\t\treturn <div className=\"animate-pulse\">{children}</div>\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"flex items-center gap-2 font-mono text-sm font-medium uppercase\"\n\t\t\trole=\"status\"\n\t\t>\n\t\t\t<div aria-hidden=\"true\">\n\t\t\t\t<Characters />\n\t\t\t</div>\n\t\t\t{children}\n\t\t\t<div aria-hidden=\"true\">\n\t\t\t\t<Characters />\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n\nconst characters = '█<▓█ ▒░/▒░ █░>▒▓/ █▒▒ ▓▒▓/█<░▒ ▓/░>'\nconst randomCharacter = () =>\n\tcharacters[Math.floor(Math.random() * characters.length)]\nexport function Characters() {\n\tconst [char1, setChar1] = useState(characters[0])\n\tconst [char2, setChar2] = useState(characters[1])\n\n\tuseInterval(() => {\n\t\tsetChar1(randomCharacter())\n\t\tsetChar2(randomCharacter())\n\t}, 80)\n\n\treturn (\n\t\t<span>\n\t\t\t{char1}\n\t\t\t{char2}\n\t\t</span>\n\t)\n}\n\nfunction useInterval(callback: () => void, delay: number | null = 1000) {\n\tconst savedCallback = useRef<() => void>()\n\n\t// Remember the latest function.\n\tuseEffect(() => {\n\t\tsavedCallback.current = callback\n\t}, [callback])\n\n\t// Set up the interval.\n\tuseEffect(() => {\n\t\tfunction tick() {\n\t\t\tsavedCallback.current?.()\n\t\t}\n\t\tif (delay !== null) {\n\t\t\tconst id = setInterval(tick, delay)\n\t\t\treturn () => clearInterval(id)\n\t\t}\n\t}, [delay])\n}\n"],"names":["Loading","children","reducedMotion","useHints","jsx","jsxs","Characters","characters","randomCharacter","char1","setChar1","useState","char2","setChar2","useInterval","callback","delay","savedCallback","useRef","useEffect","tick","_a","id"],"mappings":"8FAMO,SAASA,EAAQ,CACvB,SAAAC,EAAW,SACZ,EAEG,CACI,KAAA,CAAE,cAAAC,GAAkBC,IAC1B,OAAID,IAAkB,SACbE,EAAAA,IAAA,MAAA,CAAI,UAAU,gBAAiB,SAAAH,CAAS,CAAA,EAIhDI,EAAA,KAAC,MAAA,CACA,UAAU,kEACV,KAAK,SAEL,SAAA,CAAAD,MAAC,MAAI,CAAA,cAAY,OAChB,SAAAA,MAACE,GAAW,CAAA,EACb,EACCL,QACA,MAAI,CAAA,cAAY,OAChB,SAAAG,MAACE,GAAW,CAAA,EACb,CAAA,CAAA,CAAA,CAGH,CAEA,MAAMC,EAAa,sCACbC,EAAkB,IACvBD,EAAW,KAAK,MAAM,KAAK,SAAWA,EAAW,MAAM,CAAC,EAClD,SAASD,GAAa,CAC5B,KAAM,CAACG,EAAOC,CAAQ,EAAIC,EAAS,SAAAJ,EAAW,CAAC,CAAC,EAC1C,CAACK,EAAOC,CAAQ,EAAIF,EAAS,SAAAJ,EAAW,CAAC,CAAC,EAEhD,OAAAO,EAAY,IAAM,CACjBJ,EAASF,GAAiB,EAC1BK,EAASL,GAAiB,GACxB,EAAE,SAGH,OACC,CAAA,SAAA,CAAAC,EACAG,CACF,CAAA,CAAA,CAEF,CAEA,SAASE,EAAYC,EAAsBC,EAAuB,IAAM,CACvE,MAAMC,EAAgBC,EAAAA,SAGtBC,EAAAA,UAAU,IAAM,CACfF,EAAc,QAAUF,CAAA,EACtB,CAACA,CAAQ,CAAC,EAGbI,EAAAA,UAAU,IAAM,CACf,SAASC,GAAO,QACfC,EAAAJ,EAAc,UAAd,MAAAI,EAAA,KAAAJ,EACD,CACA,GAAID,IAAU,KAAM,CACb,MAAAM,EAAK,YAAYF,EAAMJ,CAAK,EAC3B,MAAA,IAAM,cAAcM,CAAE,CAC9B,CAAA,EACE,CAACN,CAAK,CAAC,CACX"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as i,d as h,e as C,j as e}from"./index-D1WEsmVZ.js";import{u as j}from"./use-event-source-DXlRuRq2.js";import{z as t}from"./index-B8k-Gd1G.js";import{a as g,B as v}from"./button-DnQOyJAN.js";import{L as R}from"./loading-
|
|
2
|
-
//# sourceMappingURL=login-
|
|
1
|
+
import{r as i,d as h,e as C,j as e}from"./index-D1WEsmVZ.js";import{u as j}from"./use-event-source-DXlRuRq2.js";import{z as t}from"./index-B8k-Gd1G.js";import{a as g,B as v}from"./button-DnQOyJAN.js";import{L as R}from"./loading-D-DClzm1.js";import{a as L}from"./components-Dj3sm47B.js";import"./clsx-B-dksMZM.js";import"./client-hints-KnbHFIgn.js";const r={USER_CODE_RECEIVED:"USER_CODE_RECEIVED",AUTH_RESOLVED:"AUTH_RESOLVED",AUTH_REJECTED:"AUTH_REJECTED"},S=t.object({type:t.literal(r.USER_CODE_RECEIVED),code:t.string(),url:t.string()}),b=t.object({type:t.literal(r.AUTH_RESOLVED)}),w=t.object({type:t.literal(r.AUTH_REJECTED),error:t.string().optional().default("Unknown error")}),y=t.union([S,b,w]);function F(){var x;const s=L(),[u,E]=i.useState(!1),[n,f]=i.useState(null),[l,m]=i.useState(null),c=h(),d=C(),o=j("/login-sse");return i.useEffect(()=>{if(!o)return;const p=JSON.parse(o),a=y.safeParse(p);if(!a.success){console.error(a.error.flatten());return}switch(a.data.type){case r.USER_CODE_RECEIVED:{m(a.data);break}case r.AUTH_RESOLVED:{d.revalidate(),c("/");break}case r.AUTH_REJECTED:{f(a.data.error);break}}},[o,c,d]),e.jsx("main",{className:"flex h-full w-full flex-grow flex-col items-center justify-center p-10 text-center",children:e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx(_,{className:"h-16 w-16"}),e.jsx("h1",{className:"pt-5 text-2xl font-semibold md:text-3xl",children:"Authenticate with EpicWeb.dev"}),e.jsx("h2",{className:"max-w-sm pt-3 text-base text-gray-700 dark:text-gray-300",children:"If you have purchased Epic Web, you'll be able to watch videos, track progress, and more!"}),e.jsxs("div",{className:"flex w-full flex-col items-center pt-5",children:[l?e.jsxs("div",{className:"flex w-full flex-col items-center gap-3",children:[e.jsxs("div",{className:"my-2 flex w-full flex-col items-center gap-2",children:[e.jsx("p",{className:"text-lg",children:"Your verification code is: "}),e.jsx("div",{className:"mb-3 w-full bg-gray-100 px-5 py-3 text-lg font-bold dark:bg-black/40",children:e.jsx("code",{children:l.code})})]}),e.jsx(g,{varient:"primary",to:l.url,target:"_blank",rel:"noreferrer",onClick:()=>E(!0),children:"Continue"}),u?e.jsx("div",{className:"pt-5 opacity-60",children:e.jsx(R,{children:"Waiting for confirmation"})}):null]}):e.jsx(s.Form,{method:"POST",children:e.jsx(v,{varient:"primary",type:"submit",children:s.state==="idle"&&((x=s.data)==null?void 0:x.status)!=="pending"?"Retrieve Code":"Retrieving Code..."})}),n?e.jsxs("div",{className:"mt-4 text-red-500",children:["There was an error: ",e.jsx("pre",{children:n})]}):null]})]})})}function _({className:s=""}){return e.jsxs("svg",{className:s,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[e.jsx("path",{d:"M12.438 11.5677C12.0131 11.8026 11.5249 12.0534 10.9784 12.3047C8.80704 13.3031 5.70429 14.314 1.986 14.3555L1.55773 14.3603L1.48003 13.9391C1.36509 13.316 1.29793 12.6714 1.29793 12.006C1.29793 6.10441 6.09863 1.30372 12.0002 1.30372C13.6287 1.30372 15.1745 1.66961 16.5585 2.32369L17.9801 1.59897C16.2189 0.582162 14.1769 0 12.0002 0C5.38709 0 0 5.38709 0 12.0002C0 14.6402 0.858474 17.0847 2.31072 19.0692C4.79741 18.6457 6.35749 17.6495 6.35749 17.6495C6.35749 17.6495 5.36137 19.2075 4.93785 21.6946C6.92114 23.1439 9.36321 24.0005 12.0002 24.0005C18.6134 24.0005 24.0005 18.6134 24.0005 12.0002C24.0005 9.82732 23.4199 7.78762 22.4053 6.02738L21.6818 7.44613C22.3364 8.83057 22.7025 10.3769 22.7025 12.006C22.7025 17.9076 17.9018 22.7083 12.0002 22.7083C11.3345 22.7083 10.6959 22.6411 10.0681 22.5264L9.646 22.4493L9.65079 22.0203C9.6923 18.2991 10.7031 15.1964 11.7016 13.0257C11.9527 12.4797 12.2033 11.9921 12.438 11.5677Z",fill:"url(#epicGradient)"}),e.jsx("path",{d:"M18.2525 9.31052L15.4992 8.50683L14.6953 5.74778L23.8291 0.171387L18.2525 9.31052Z",fill:"currentColor"}),e.jsx("defs",{children:e.jsxs("linearGradient",{id:"epicGradient",x1:"16.9703",y1:"7.03022",x2:"7.05798",y2:"16.948",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#4F75FF"}),e.jsx("stop",{offset:"1",stopColor:"#30AFFF"})]})})]})}export{F as default};
|
|
2
|
+
//# sourceMappingURL=login-CjvZj820.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login-2BiFV7_R.js","sources":["../../../app/utils/auth-events.ts","../../../app/routes/login-sse.tsx","../../../app/routes/_app+/login.tsx"],"sourcesContent":["export const EVENTS = {\n\tUSER_CODE_RECEIVED: 'USER_CODE_RECEIVED',\n\tAUTH_RESOLVED: 'AUTH_RESOLVED',\n\tAUTH_REJECTED: 'AUTH_REJECTED',\n} as const\nexport type EventTypes = keyof typeof EVENTS\n","import { type LoaderFunctionArgs } from '@remix-run/node'\nimport { eventStream } from 'remix-utils/sse/server'\nimport { z } from 'zod'\nimport { EVENTS } from '#app/utils/auth-events.ts'\nimport { authEmitter } from '#app/utils/auth.server.ts'\nimport { ensureUndeployed } from '#app/utils/misc.tsx'\n\nconst CodeReceivedEventSchema = z.object({\n\ttype: z.literal(EVENTS.USER_CODE_RECEIVED),\n\tcode: z.string(),\n\turl: z.string(),\n})\nconst AuthResolvedEventSchema = z.object({\n\ttype: z.literal(EVENTS.AUTH_RESOLVED),\n})\nconst AuthRejectedEventSchema = z.object({\n\ttype: z.literal(EVENTS.AUTH_REJECTED),\n\terror: z.string().optional().default('Unknown error'),\n})\nexport const EventSchema = z.union([\n\tCodeReceivedEventSchema,\n\tAuthResolvedEventSchema,\n\tAuthRejectedEventSchema,\n])\n\nexport async function loader({ request }: LoaderFunctionArgs) {\n\tensureUndeployed()\n\treturn eventStream(request.signal, function setup(send) {\n\t\tfunction handleCodeReceived(data: any) {\n\t\t\tsend({\n\t\t\t\tdata: JSON.stringify(\n\t\t\t\t\tCodeReceivedEventSchema.parse({\n\t\t\t\t\t\ttype: EVENTS.USER_CODE_RECEIVED,\n\t\t\t\t\t\t...data,\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t})\n\t\t}\n\t\tfunction handleAuthResolved() {\n\t\t\tsend({ data: JSON.stringify({ type: EVENTS.AUTH_RESOLVED }) })\n\t\t}\n\t\tfunction handleAuthRejected(data: any) {\n\t\t\tconst result = AuthRejectedEventSchema.safeParse(data)\n\t\t\tif (result.success) {\n\t\t\t\tsend({ data: JSON.stringify(result.data) })\n\t\t\t} else {\n\t\t\t\tconsole.error('Error parsing auth rejected event', result.error, data)\n\t\t\t}\n\t\t}\n\t\tauthEmitter.on(EVENTS.USER_CODE_RECEIVED, handleCodeReceived)\n\t\tauthEmitter.on(EVENTS.AUTH_RESOLVED, handleAuthResolved)\n\t\tauthEmitter.on(EVENTS.AUTH_REJECTED, handleAuthRejected)\n\t\treturn () => {\n\t\t\tauthEmitter.off(EVENTS.USER_CODE_RECEIVED, handleCodeReceived)\n\t\t\tauthEmitter.off(EVENTS.AUTH_RESOLVED, handleAuthResolved)\n\t\t\tauthEmitter.off(EVENTS.AUTH_REJECTED, handleAuthRejected)\n\t\t}\n\t})\n}\n","import { getAuthInfo } from '@epic-web/workshop-utils/db.server'\nimport { json, redirect } from '@remix-run/node'\nimport { useFetcher, useNavigate, useRevalidator } from '@remix-run/react'\nimport { useEffect, useState } from 'react'\nimport { useEventSource } from 'remix-utils/sse/react'\nimport { EventSchema } from '../login-sse.tsx'\nimport { Button, ButtonLink } from '#app/components/button.tsx'\nimport { Loading } from '#app/components/loading.tsx'\nimport { EVENTS } from '#app/utils/auth-events.ts'\nimport { registerDevice } from '#app/utils/auth.server.ts'\nimport { ensureUndeployed } from '#app/utils/misc.tsx'\n\nexport async function loader() {\n\tensureUndeployed()\n\tconst isAuthenticated = Boolean(await getAuthInfo())\n\tif (isAuthenticated) throw redirect('/account')\n\treturn json({})\n}\n\nexport async function action() {\n\tensureUndeployed()\n\tvoid registerDevice()\n\treturn json({ status: 'pending' } as const)\n}\n\nexport default function Login() {\n\tconst loginFetcher = useFetcher<typeof action>()\n\tconst [clickedVerificationLink, setClickedVerificationLink] = useState(false)\n\tconst [authError, setAuthError] = useState<null | string>(null)\n\tconst [userCodeInfo, setUserCodeInfo] = useState<null | {\n\t\tcode: string\n\t\turl: string\n\t}>(null)\n\tconst navigate = useNavigate()\n\tconst revalidator = useRevalidator()\n\tconst lastMessage = useEventSource(`/login-sse`)\n\tuseEffect(() => {\n\t\tif (!lastMessage) return\n\n\t\tconst parsed = JSON.parse(lastMessage)\n\t\tconst result = EventSchema.safeParse(parsed)\n\t\tif (!result.success) {\n\t\t\tconsole.error(result.error.flatten())\n\t\t\treturn\n\t\t}\n\t\tswitch (result.data.type) {\n\t\t\tcase EVENTS.USER_CODE_RECEIVED: {\n\t\t\t\tsetUserCodeInfo(result.data)\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase EVENTS.AUTH_RESOLVED: {\n\t\t\t\trevalidator.revalidate()\n\t\t\t\tnavigate('/')\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase EVENTS.AUTH_REJECTED: {\n\t\t\t\tsetAuthError(result.data.error)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}, [lastMessage, navigate, revalidator])\n\n\treturn (\n\t\t<main className=\"flex h-full w-full flex-grow flex-col items-center justify-center p-10 text-center\">\n\t\t\t<div className=\"flex flex-col items-center\">\n\t\t\t\t<Logo className=\"h-16 w-16\" />\n\t\t\t\t<h1 className=\"pt-5 text-2xl font-semibold md:text-3xl\">\n\t\t\t\t\tAuthenticate with EpicWeb.dev\n\t\t\t\t</h1>\n\t\t\t\t<h2 className=\"max-w-sm pt-3 text-base text-gray-700 dark:text-gray-300\">\n\t\t\t\t\tIf you have purchased Epic Web, you'll be able to watch videos, track\n\t\t\t\t\tprogress, and more!\n\t\t\t\t</h2>\n\t\t\t\t<div className=\"flex w-full flex-col items-center pt-5\">\n\t\t\t\t\t{userCodeInfo ? (\n\t\t\t\t\t\t<div className=\"flex w-full flex-col items-center gap-3\">\n\t\t\t\t\t\t\t<div className=\"my-2 flex w-full flex-col items-center gap-2\">\n\t\t\t\t\t\t\t\t<p className=\"text-lg\">Your verification code is: </p>\n\t\t\t\t\t\t\t\t<div className=\"mb-3 w-full bg-gray-100 px-5 py-3 text-lg font-bold dark:bg-black/40\">\n\t\t\t\t\t\t\t\t\t<code>{userCodeInfo.code}</code>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<ButtonLink\n\t\t\t\t\t\t\t\tvarient=\"primary\"\n\t\t\t\t\t\t\t\tto={userCodeInfo.url}\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\t\t\t\tonClick={() => setClickedVerificationLink(true)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tContinue\n\t\t\t\t\t\t\t</ButtonLink>\n\t\t\t\t\t\t\t{clickedVerificationLink ? (\n\t\t\t\t\t\t\t\t<div className=\"pt-5 opacity-60\">\n\t\t\t\t\t\t\t\t\t<Loading>Waiting for confirmation</Loading>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<loginFetcher.Form method=\"POST\">\n\t\t\t\t\t\t\t<Button varient=\"primary\" type=\"submit\">\n\t\t\t\t\t\t\t\t{loginFetcher.state === 'idle' &&\n\t\t\t\t\t\t\t\tloginFetcher.data?.status !== 'pending'\n\t\t\t\t\t\t\t\t\t? `Retrieve Code`\n\t\t\t\t\t\t\t\t\t: `Retrieving Code...`}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</loginFetcher.Form>\n\t\t\t\t\t)}\n\t\t\t\t\t{authError ? (\n\t\t\t\t\t\t<div className=\"mt-4 text-red-500\">\n\t\t\t\t\t\t\tThere was an error: <pre>{authError}</pre>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : null}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</main>\n\t)\n}\n\nfunction Logo({ className = '' }) {\n\t// svg sprites do not support gradients\n\treturn (\n\t\t<svg\n\t\t\tclassName={className}\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\taria-hidden=\"true\"\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M12.438 11.5677C12.0131 11.8026 11.5249 12.0534 10.9784 12.3047C8.80704 13.3031 5.70429 14.314 1.986 14.3555L1.55773 14.3603L1.48003 13.9391C1.36509 13.316 1.29793 12.6714 1.29793 12.006C1.29793 6.10441 6.09863 1.30372 12.0002 1.30372C13.6287 1.30372 15.1745 1.66961 16.5585 2.32369L17.9801 1.59897C16.2189 0.582162 14.1769 0 12.0002 0C5.38709 0 0 5.38709 0 12.0002C0 14.6402 0.858474 17.0847 2.31072 19.0692C4.79741 18.6457 6.35749 17.6495 6.35749 17.6495C6.35749 17.6495 5.36137 19.2075 4.93785 21.6946C6.92114 23.1439 9.36321 24.0005 12.0002 24.0005C18.6134 24.0005 24.0005 18.6134 24.0005 12.0002C24.0005 9.82732 23.4199 7.78762 22.4053 6.02738L21.6818 7.44613C22.3364 8.83057 22.7025 10.3769 22.7025 12.006C22.7025 17.9076 17.9018 22.7083 12.0002 22.7083C11.3345 22.7083 10.6959 22.6411 10.0681 22.5264L9.646 22.4493L9.65079 22.0203C9.6923 18.2991 10.7031 15.1964 11.7016 13.0257C11.9527 12.4797 12.2033 11.9921 12.438 11.5677Z\"\n\t\t\t\tfill=\"url(#epicGradient)\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M18.2525 9.31052L15.4992 8.50683L14.6953 5.74778L23.8291 0.171387L18.2525 9.31052Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t\t<defs>\n\t\t\t\t<linearGradient\n\t\t\t\t\tid=\"epicGradient\"\n\t\t\t\t\tx1=\"16.9703\"\n\t\t\t\t\ty1=\"7.03022\"\n\t\t\t\t\tx2=\"7.05798\"\n\t\t\t\t\ty2=\"16.948\"\n\t\t\t\t\tgradientUnits=\"userSpaceOnUse\"\n\t\t\t\t>\n\t\t\t\t\t<stop stopColor=\"#4F75FF\" />\n\t\t\t\t\t<stop offset=\"1\" stopColor=\"#30AFFF\" />\n\t\t\t\t</linearGradient>\n\t\t\t</defs>\n\t\t</svg>\n\t)\n}\n"],"names":["EVENTS","CodeReceivedEventSchema","z","AuthResolvedEventSchema","AuthRejectedEventSchema","EventSchema","Login","loginFetcher","useFetcher","clickedVerificationLink","setClickedVerificationLink","useState","authError","setAuthError","userCodeInfo","setUserCodeInfo","navigate","useNavigate","revalidator","useRevalidator","lastMessage","useEventSource","useEffect","parsed","result","jsx","jsxs","Logo","ButtonLink","Loading","Button","_a","className"],"mappings":"6VAAO,MAAMA,EAAS,CACrB,mBAAoB,qBACpB,cAAe,gBACf,cAAe,eAChB,ECDAC,EAAuBC,EAAA,OAAA,CACvB,KAAAA,EAA4B,QAAAF,EAAA,kBAAA,EAC5B,KAAAE,EAAiC,OAAA,EAE3B,IAAAA,EAAA,OAAA,CAAmC,CAAA,EAExCC,EAAeD,EAAA,OAAA,CACf,OAAc,QAAAF,EAAA,aAAA,CACf,CAAC,EACKI,EAA0BF,EAAE,OAAO,CACxC,KAAMA,EAAE,QAAQF,EAAO,aAAa,EACpC,MAAAE,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,eAAA,CACD,CAAM,EACWG,EAAoBH,EAAA,MAAA,CAAAD,EAAAE,EAAAC,CAAA,CAAA,ECTb,SAAAE,GAAA,OACxB,MAAAC,EAAuBC,IACvB,CAASC,EAAsBC,CAAA,EAAAC,EAAA,SAAA,EAAA,EAC/B,CAASC,EAAwBC,CAAA,EAAAF,EAAA,SAAA,IAAA,EAEjC,CAAAG,EAA+BC,CAAA,EAAAJ,EAAA,SAAA,IAAA,EACbK,EAAAC,IACXC,EAAkBC,IACpBC,EAAAC,EAAA,YAAA,EAAiBC,OAAAA,EAAAA,eACd,GAAA,CAAAF,EAAO,OACf,MAAAG,EAAA,KAAA,MAAAH,CAAA,EAEAI,EAAAnB,EAA+B,UAAAkB,CAAA,EACb,GAAA,CAAAC,EAAA,QAAA,CACjB,QAAoB,MAAAA,EAAA,MAAA,QAAA,CAAA,EACpB,MACD,CAEA,OAAAA,EAAA,KAAwB,KAAQ,CAC/B,0BACM,CACCT,EAAuBS,EAAA,MACvB,MAKP,qBACM,CACNN,EAAgB,WAAA,EACVF,EAAA,GAAA,EAAa,KAEZ,CACA,KAAAhB,EAAA,cACF,CACHa,EAAcW,EAAa,KAAA,KAAA,EAC3B,KACD,CACQ,CACP,EAAA,CAAAJ,EAAgCJ,EAAAE,CAAA,CAAA,EACfO,EAAAA,WAAW,CAC3B,UAAA,qFACD,SAAAC,EAAA,KAAA,MAAA,CACA,uCACC,SAAA,CAAuBD,EAAA,IAAAE,EAAA,CACvB,UAAY,WACZ,CAAA,EAAAF,EAAA,IAAA,KAAA,CACD,UAAA,0CACA,SAAY,+BACX,CAAa,EAAAA,EAAO,SAAU,CAC9B,UAAA,2DACD,SAAA,2FAAA,CACD,EAAAC,EAAA,KAAA,MAAA,CACgB,UAAA,yCAEjB,YACOA,cAEH,UAAA,0CACA,SAAA,CAAaA,EAAA,KAAA,MAAA,CAGb,UAAA,+CAID,SAAA,CAAKD,EAAA,IAAA,IACH,CACA,UAAA,UACE,SAAA,6BACA,CAAC,EAAAA,EAAA,IAAA,MAAY,CACb,UAAA,uEAGD,SAAAA,EAAA,IAAA,OAAA,CACA,SAAAX,EAAA,IAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,EACQW,EAAA,IAAAG,EAAA,CACR,QAAiB,UACjB,GAAOd,EAAA,IACP,OAAI,SACJ,IAAA,aACA,QAAA,IAAAJ,EAAA,EAAA,EAAA,SAAA,UAAA,CAED,EAAAD,EAAAgB,EAAA,IAAA,MAAA,CACC,UAAA,kBAKF,SAEcA,EAAA,IAAAI,EAAA,CAUd,SAAA,0BAAmC,CAAA,CACd,CAAA,EAAA,IAAA,CAAgB,CACrC,EACGJ,EAAAA,IAAAlB,EAAA,KAAA,CACL,OAAA,OAEF,SAAAkB,EAAA,IAAAK,EAAA,CAEF,QAAA,UAEc,KAAc,SAG1B,SAAAvB,EAAA,QAAA,UAAAwB,EAAAxB,EAAA,OAAA,YAAAwB,EAAA,UAAA,UAAA,gBAAA,oBAAA,CAAC,CAAA,CAAA,EAAAnB,EAAAc,EAAA,KAAA,MAAA,CACA,UAAA,oBACQ,SAAA,CAAA,uBAAAD,EAAA,IAAA,MAAA,CACH,SAAAb,CAAA,CACC,CAAA,CACM,CAAA,EAAA,IAAA,CAAA,CAEZ,CAAA,CAAA,CAAA,CAAA,CAAC,CAAA,CAAA,SAAAe,EACE,CAAA,UAAAK,EACG,EAAA,EAAA,CACN,OAAAN,EAAAA,KAAA,MAAA,CACA,UAAAM,EAAC,QAAA,YAAA,KAAA,OAAA,MAAA,6BACE,cACG,OAAA,SAAA,CAAAP,EAAA,IAAA,OAAA,CACN,EAAA,u6BAAA,yBAEC,CAAC,EAAAA,EAAA,IAAA,OAAA,CAAA,EAAA,qFAAA,KACA,cAAG,CAAA,EACAA,EAAA,IAAA,OAAA,CAAA,SACAC,EAAA,KAAA,iBAAA,CAAA,GACH,eAAG,GACH,UAAG,GACH,UAEA,GAAA,UAAC,GAAA,SAAyB,cACzB,iBAAoC,SAAA,CAAAD,EAAA,IAAA,OAAA,CAAA,UAAA,SAAA,CAEvC,EAAAA,EAAA,IAAA,OAAA,CAAA,OAAA,IAAA,UAAA,SAAA,CACD,CAAA,CAEF,CAAA"}
|
|
1
|
+
{"version":3,"file":"login-CjvZj820.js","sources":["../../../app/utils/auth-events.ts","../../../app/routes/login-sse.tsx","../../../app/routes/_app+/login.tsx"],"sourcesContent":["export const EVENTS = {\n\tUSER_CODE_RECEIVED: 'USER_CODE_RECEIVED',\n\tAUTH_RESOLVED: 'AUTH_RESOLVED',\n\tAUTH_REJECTED: 'AUTH_REJECTED',\n} as const\nexport type EventTypes = keyof typeof EVENTS\n","import { type LoaderFunctionArgs } from '@remix-run/node'\nimport { eventStream } from 'remix-utils/sse/server'\nimport { z } from 'zod'\nimport { EVENTS } from '#app/utils/auth-events.ts'\nimport { authEmitter } from '#app/utils/auth.server.ts'\nimport { ensureUndeployed } from '#app/utils/misc.tsx'\n\nconst CodeReceivedEventSchema = z.object({\n\ttype: z.literal(EVENTS.USER_CODE_RECEIVED),\n\tcode: z.string(),\n\turl: z.string(),\n})\nconst AuthResolvedEventSchema = z.object({\n\ttype: z.literal(EVENTS.AUTH_RESOLVED),\n})\nconst AuthRejectedEventSchema = z.object({\n\ttype: z.literal(EVENTS.AUTH_REJECTED),\n\terror: z.string().optional().default('Unknown error'),\n})\nexport const EventSchema = z.union([\n\tCodeReceivedEventSchema,\n\tAuthResolvedEventSchema,\n\tAuthRejectedEventSchema,\n])\n\nexport async function loader({ request }: LoaderFunctionArgs) {\n\tensureUndeployed()\n\treturn eventStream(request.signal, function setup(send) {\n\t\tfunction handleCodeReceived(data: any) {\n\t\t\tsend({\n\t\t\t\tdata: JSON.stringify(\n\t\t\t\t\tCodeReceivedEventSchema.parse({\n\t\t\t\t\t\ttype: EVENTS.USER_CODE_RECEIVED,\n\t\t\t\t\t\t...data,\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t})\n\t\t}\n\t\tfunction handleAuthResolved() {\n\t\t\tsend({ data: JSON.stringify({ type: EVENTS.AUTH_RESOLVED }) })\n\t\t}\n\t\tfunction handleAuthRejected(data: any) {\n\t\t\tconst result = AuthRejectedEventSchema.safeParse(data)\n\t\t\tif (result.success) {\n\t\t\t\tsend({ data: JSON.stringify(result.data) })\n\t\t\t} else {\n\t\t\t\tconsole.error('Error parsing auth rejected event', result.error, data)\n\t\t\t}\n\t\t}\n\t\tauthEmitter.on(EVENTS.USER_CODE_RECEIVED, handleCodeReceived)\n\t\tauthEmitter.on(EVENTS.AUTH_RESOLVED, handleAuthResolved)\n\t\tauthEmitter.on(EVENTS.AUTH_REJECTED, handleAuthRejected)\n\t\treturn () => {\n\t\t\tauthEmitter.off(EVENTS.USER_CODE_RECEIVED, handleCodeReceived)\n\t\t\tauthEmitter.off(EVENTS.AUTH_RESOLVED, handleAuthResolved)\n\t\t\tauthEmitter.off(EVENTS.AUTH_REJECTED, handleAuthRejected)\n\t\t}\n\t})\n}\n","import { getAuthInfo } from '@epic-web/workshop-utils/db.server'\nimport { json, redirect } from '@remix-run/node'\nimport { useFetcher, useNavigate, useRevalidator } from '@remix-run/react'\nimport { useEffect, useState } from 'react'\nimport { useEventSource } from 'remix-utils/sse/react'\nimport { EventSchema } from '../login-sse.tsx'\nimport { Button, ButtonLink } from '#app/components/button.tsx'\nimport { Loading } from '#app/components/loading.tsx'\nimport { EVENTS } from '#app/utils/auth-events.ts'\nimport { registerDevice } from '#app/utils/auth.server.ts'\nimport { ensureUndeployed } from '#app/utils/misc.tsx'\n\nexport async function loader() {\n\tensureUndeployed()\n\tconst isAuthenticated = Boolean(await getAuthInfo())\n\tif (isAuthenticated) throw redirect('/account')\n\treturn json({})\n}\n\nexport async function action() {\n\tensureUndeployed()\n\tvoid registerDevice()\n\treturn json({ status: 'pending' } as const)\n}\n\nexport default function Login() {\n\tconst loginFetcher = useFetcher<typeof action>()\n\tconst [clickedVerificationLink, setClickedVerificationLink] = useState(false)\n\tconst [authError, setAuthError] = useState<null | string>(null)\n\tconst [userCodeInfo, setUserCodeInfo] = useState<null | {\n\t\tcode: string\n\t\turl: string\n\t}>(null)\n\tconst navigate = useNavigate()\n\tconst revalidator = useRevalidator()\n\tconst lastMessage = useEventSource(`/login-sse`)\n\tuseEffect(() => {\n\t\tif (!lastMessage) return\n\n\t\tconst parsed = JSON.parse(lastMessage)\n\t\tconst result = EventSchema.safeParse(parsed)\n\t\tif (!result.success) {\n\t\t\tconsole.error(result.error.flatten())\n\t\t\treturn\n\t\t}\n\t\tswitch (result.data.type) {\n\t\t\tcase EVENTS.USER_CODE_RECEIVED: {\n\t\t\t\tsetUserCodeInfo(result.data)\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase EVENTS.AUTH_RESOLVED: {\n\t\t\t\trevalidator.revalidate()\n\t\t\t\tnavigate('/')\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase EVENTS.AUTH_REJECTED: {\n\t\t\t\tsetAuthError(result.data.error)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}, [lastMessage, navigate, revalidator])\n\n\treturn (\n\t\t<main className=\"flex h-full w-full flex-grow flex-col items-center justify-center p-10 text-center\">\n\t\t\t<div className=\"flex flex-col items-center\">\n\t\t\t\t<Logo className=\"h-16 w-16\" />\n\t\t\t\t<h1 className=\"pt-5 text-2xl font-semibold md:text-3xl\">\n\t\t\t\t\tAuthenticate with EpicWeb.dev\n\t\t\t\t</h1>\n\t\t\t\t<h2 className=\"max-w-sm pt-3 text-base text-gray-700 dark:text-gray-300\">\n\t\t\t\t\tIf you have purchased Epic Web, you'll be able to watch videos, track\n\t\t\t\t\tprogress, and more!\n\t\t\t\t</h2>\n\t\t\t\t<div className=\"flex w-full flex-col items-center pt-5\">\n\t\t\t\t\t{userCodeInfo ? (\n\t\t\t\t\t\t<div className=\"flex w-full flex-col items-center gap-3\">\n\t\t\t\t\t\t\t<div className=\"my-2 flex w-full flex-col items-center gap-2\">\n\t\t\t\t\t\t\t\t<p className=\"text-lg\">Your verification code is: </p>\n\t\t\t\t\t\t\t\t<div className=\"mb-3 w-full bg-gray-100 px-5 py-3 text-lg font-bold dark:bg-black/40\">\n\t\t\t\t\t\t\t\t\t<code>{userCodeInfo.code}</code>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<ButtonLink\n\t\t\t\t\t\t\t\tvarient=\"primary\"\n\t\t\t\t\t\t\t\tto={userCodeInfo.url}\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\t\t\t\tonClick={() => setClickedVerificationLink(true)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tContinue\n\t\t\t\t\t\t\t</ButtonLink>\n\t\t\t\t\t\t\t{clickedVerificationLink ? (\n\t\t\t\t\t\t\t\t<div className=\"pt-5 opacity-60\">\n\t\t\t\t\t\t\t\t\t<Loading>Waiting for confirmation</Loading>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<loginFetcher.Form method=\"POST\">\n\t\t\t\t\t\t\t<Button varient=\"primary\" type=\"submit\">\n\t\t\t\t\t\t\t\t{loginFetcher.state === 'idle' &&\n\t\t\t\t\t\t\t\tloginFetcher.data?.status !== 'pending'\n\t\t\t\t\t\t\t\t\t? `Retrieve Code`\n\t\t\t\t\t\t\t\t\t: `Retrieving Code...`}\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</loginFetcher.Form>\n\t\t\t\t\t)}\n\t\t\t\t\t{authError ? (\n\t\t\t\t\t\t<div className=\"mt-4 text-red-500\">\n\t\t\t\t\t\t\tThere was an error: <pre>{authError}</pre>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : null}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</main>\n\t)\n}\n\nfunction Logo({ className = '' }) {\n\t// svg sprites do not support gradients\n\treturn (\n\t\t<svg\n\t\t\tclassName={className}\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\taria-hidden=\"true\"\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M12.438 11.5677C12.0131 11.8026 11.5249 12.0534 10.9784 12.3047C8.80704 13.3031 5.70429 14.314 1.986 14.3555L1.55773 14.3603L1.48003 13.9391C1.36509 13.316 1.29793 12.6714 1.29793 12.006C1.29793 6.10441 6.09863 1.30372 12.0002 1.30372C13.6287 1.30372 15.1745 1.66961 16.5585 2.32369L17.9801 1.59897C16.2189 0.582162 14.1769 0 12.0002 0C5.38709 0 0 5.38709 0 12.0002C0 14.6402 0.858474 17.0847 2.31072 19.0692C4.79741 18.6457 6.35749 17.6495 6.35749 17.6495C6.35749 17.6495 5.36137 19.2075 4.93785 21.6946C6.92114 23.1439 9.36321 24.0005 12.0002 24.0005C18.6134 24.0005 24.0005 18.6134 24.0005 12.0002C24.0005 9.82732 23.4199 7.78762 22.4053 6.02738L21.6818 7.44613C22.3364 8.83057 22.7025 10.3769 22.7025 12.006C22.7025 17.9076 17.9018 22.7083 12.0002 22.7083C11.3345 22.7083 10.6959 22.6411 10.0681 22.5264L9.646 22.4493L9.65079 22.0203C9.6923 18.2991 10.7031 15.1964 11.7016 13.0257C11.9527 12.4797 12.2033 11.9921 12.438 11.5677Z\"\n\t\t\t\tfill=\"url(#epicGradient)\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M18.2525 9.31052L15.4992 8.50683L14.6953 5.74778L23.8291 0.171387L18.2525 9.31052Z\"\n\t\t\t\tfill=\"currentColor\"\n\t\t\t/>\n\t\t\t<defs>\n\t\t\t\t<linearGradient\n\t\t\t\t\tid=\"epicGradient\"\n\t\t\t\t\tx1=\"16.9703\"\n\t\t\t\t\ty1=\"7.03022\"\n\t\t\t\t\tx2=\"7.05798\"\n\t\t\t\t\ty2=\"16.948\"\n\t\t\t\t\tgradientUnits=\"userSpaceOnUse\"\n\t\t\t\t>\n\t\t\t\t\t<stop stopColor=\"#4F75FF\" />\n\t\t\t\t\t<stop offset=\"1\" stopColor=\"#30AFFF\" />\n\t\t\t\t</linearGradient>\n\t\t\t</defs>\n\t\t</svg>\n\t)\n}\n"],"names":["EVENTS","CodeReceivedEventSchema","z","AuthResolvedEventSchema","AuthRejectedEventSchema","EventSchema","Login","loginFetcher","useFetcher","clickedVerificationLink","setClickedVerificationLink","useState","authError","setAuthError","userCodeInfo","setUserCodeInfo","navigate","useNavigate","revalidator","useRevalidator","lastMessage","useEventSource","useEffect","parsed","result","jsx","jsxs","Logo","ButtonLink","Loading","Button","_a","className"],"mappings":"6VAAO,MAAMA,EAAS,CACrB,mBAAoB,qBACpB,cAAe,gBACf,cAAe,eAChB,ECDAC,EAAuBC,EAAA,OAAA,CACvB,KAAAA,EAA4B,QAAAF,EAAA,kBAAA,EAC5B,KAAAE,EAAiC,OAAA,EAE3B,IAAAA,EAAA,OAAA,CAAmC,CAAA,EAExCC,EAAeD,EAAA,OAAA,CACf,OAAc,QAAAF,EAAA,aAAA,CACf,CAAC,EACKI,EAA0BF,EAAE,OAAO,CACxC,KAAMA,EAAE,QAAQF,EAAO,aAAa,EACpC,MAAAE,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,eAAA,CACD,CAAM,EACWG,EAAoBH,EAAA,MAAA,CAAAD,EAAAE,EAAAC,CAAA,CAAA,ECTb,SAAAE,GAAA,OACxB,MAAAC,EAAuBC,IACvB,CAASC,EAAsBC,CAAA,EAAAC,EAAA,SAAA,EAAA,EAC/B,CAASC,EAAwBC,CAAA,EAAAF,EAAA,SAAA,IAAA,EAEjC,CAAAG,EAA+BC,CAAA,EAAAJ,EAAA,SAAA,IAAA,EACbK,EAAAC,IACXC,EAAkBC,IACpBC,EAAAC,EAAA,YAAA,EAAiBC,OAAAA,EAAAA,eACd,GAAA,CAAAF,EAAO,OACf,MAAAG,EAAA,KAAA,MAAAH,CAAA,EAEAI,EAAAnB,EAA+B,UAAAkB,CAAA,EACb,GAAA,CAAAC,EAAA,QAAA,CACjB,QAAoB,MAAAA,EAAA,MAAA,QAAA,CAAA,EACpB,MACD,CAEA,OAAAA,EAAA,KAAwB,KAAQ,CAC/B,0BACM,CACCT,EAAuBS,EAAA,MACvB,MAKP,qBACM,CACNN,EAAgB,WAAA,EACVF,EAAA,GAAA,EAAa,KAEZ,CACA,KAAAhB,EAAA,cACF,CACHa,EAAcW,EAAa,KAAA,KAAA,EAC3B,KACD,CACQ,CACP,EAAA,CAAAJ,EAAgCJ,EAAAE,CAAA,CAAA,EACfO,EAAAA,WAAW,CAC3B,UAAA,qFACD,SAAAC,EAAA,KAAA,MAAA,CACA,uCACC,SAAA,CAAuBD,EAAA,IAAAE,EAAA,CACvB,UAAY,WACZ,CAAA,EAAAF,EAAA,IAAA,KAAA,CACD,UAAA,0CACA,SAAY,+BACX,CAAa,EAAAA,EAAO,SAAU,CAC9B,UAAA,2DACD,SAAA,2FAAA,CACD,EAAAC,EAAA,KAAA,MAAA,CACgB,UAAA,yCAEjB,YACOA,cAEH,UAAA,0CACA,SAAA,CAAaA,EAAA,KAAA,MAAA,CAGb,UAAA,+CAID,SAAA,CAAKD,EAAA,IAAA,IACH,CACA,UAAA,UACE,SAAA,6BACA,CAAC,EAAAA,EAAA,IAAA,MAAY,CACb,UAAA,uEAGD,SAAAA,EAAA,IAAA,OAAA,CACA,SAAAX,EAAA,IAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,EACQW,EAAA,IAAAG,EAAA,CACR,QAAiB,UACjB,GAAOd,EAAA,IACP,OAAI,SACJ,IAAA,aACA,QAAA,IAAAJ,EAAA,EAAA,EAAA,SAAA,UAAA,CAED,EAAAD,EAAAgB,EAAA,IAAA,MAAA,CACC,UAAA,kBAKF,SAEcA,EAAA,IAAAI,EAAA,CAUd,SAAA,0BAAmC,CAAA,CACd,CAAA,EAAA,IAAA,CAAgB,CACrC,EACGJ,EAAAA,IAAAlB,EAAA,KAAA,CACL,OAAA,OAEF,SAAAkB,EAAA,IAAAK,EAAA,CAEF,QAAA,UAEc,KAAc,SAG1B,SAAAvB,EAAA,QAAA,UAAAwB,EAAAxB,EAAA,OAAA,YAAAwB,EAAA,UAAA,UAAA,gBAAA,oBAAA,CAAC,CAAA,CAAA,EAAAnB,EAAAc,EAAA,KAAA,MAAA,CACA,UAAA,oBACQ,SAAA,CAAA,uBAAAD,EAAA,IAAA,MAAA,CACH,SAAAb,CAAA,CACC,CAAA,CACM,CAAA,EAAA,IAAA,CAAA,CAEZ,CAAA,CAAA,CAAA,CAAA,CAAC,CAAA,CAAA,SAAAe,EACE,CAAA,UAAAK,EACG,EAAA,EAAA,CACN,OAAAN,EAAAA,KAAA,MAAA,CACA,UAAAM,EAAC,QAAA,YAAA,KAAA,OAAA,MAAA,6BACE,cACG,OAAA,SAAA,CAAAP,EAAA,IAAA,OAAA,CACN,EAAA,u6BAAA,yBAEC,CAAC,EAAAA,EAAA,IAAA,OAAA,CAAA,EAAA,qFAAA,KACA,cAAG,CAAA,EACAA,EAAA,IAAA,OAAA,CAAA,SACAC,EAAA,KAAA,iBAAA,CAAA,GACH,eAAG,GACH,UAAG,GACH,UAEA,GAAA,UAAC,GAAA,SAAyB,cACzB,iBAAoC,SAAA,CAAAD,EAAA,IAAA,OAAA,CAAA,UAAA,SAAA,CAEvC,EAAAA,EAAA,IAAA,OAAA,CAAA,OAAA,IAAA,UAAA,SAAA,CACD,CAAA,CAEF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
window.__remixManifest={"entry":{"module":"/assets/entry.client-DBBrAxtJ.js","imports":["/assets/index-D1WEsmVZ.js","/assets/components-Dj3sm47B.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":true,"module":"/assets/root-D_snSGY7.js","imports":["/assets/index-D1WEsmVZ.js","/assets/components-Dj3sm47B.js","/assets/clsx-B-dksMZM.js","/assets/misc-CXGQ7VS9.js","/assets/index-B8k-Gd1G.js","/assets/tooltip-CVFWPOu0.js","/assets/client-hints-BHTHvBjk.js","/assets/error-boundary-Bg54_knF.js","/assets/progress-bar-DX6yYES2.js","/assets/index-BL4aE6WC.js","/assets/index-zG3_j9lj.js","/assets/presence-u-05JV3Z.js"],"css":[]},"routes/$":{"id":"routes/$","parentId":"root","path":"*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":true,"module":"/assets/_-ByTWgb53.js","imports":["/assets/index-D1WEsmVZ.js","/assets/clsx-B-dksMZM.js","/assets/components-Dj3sm47B.js","/assets/misc-CXGQ7VS9.js","/assets/error-boundary-Bg54_knF.js"],"css":[]},"routes/_app+/_layout":{"id":"routes/_app+/_layout","parentId":"root","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/_layout-CPxDcKGb.js","imports":["/assets/index-D1WEsmVZ.js","/assets/clsx-B-dksMZM.js","/assets/components-Dj3sm47B.js","/assets/misc-CXGQ7VS9.js","/assets/index-B8k-Gd1G.js","/assets/tooltip-CVFWPOu0.js","/assets/client-hints-BHTHvBjk.js","/assets/progress-CBZt2pmu.js","/assets/index-zG3_j9lj.js","/assets/user-DiGtbaa7.js","/assets/presence-u-05JV3Z.js"],"css":[]},"routes/_app+/_exercises+/_layout":{"id":"routes/_app+/_exercises+/_layout","parentId":"routes/_app+/_layout","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/_layout-Bj9PyQQD.js","imports":["/assets/index-D1WEsmVZ.js"],"css":[]},"routes/_app+/_exercises+/$exerciseNumber":{"id":"routes/_app+/_exercises+/$exerciseNumber","parentId":"routes/_app+/_exercises+/_layout","path":":exerciseNumber","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":true,"module":"/assets/_exerciseNumber-B_VU-pG1.js","imports":["/assets/index-D1WEsmVZ.js","/assets/components-Dj3sm47B.js","/assets/clsx-B-dksMZM.js","/assets/client-hints-BHTHvBjk.js","/assets/misc-CXGQ7VS9.js","/assets/index-B8k-Gd1G.js","/assets/tooltip-CVFWPOu0.js","/assets/loading-CaagEELb.js","/assets/index-zG3_j9lj.js","/assets/epic-video-BwJwnV_j.js","/assets/progress-bar-DX6yYES2.js","/assets/index-BfoHqrT5.js","/assets/mdx-DdywIxB6.js","/assets/progress-CBZt2pmu.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/_app+/_exercises+/$exerciseNumber_.$stepNumber":{"id":"routes/_app+/_exercises+/$exerciseNumber_.$stepNumber","parentId":"routes/_app+/_exercises+/_layout","path":":exerciseNumber/:stepNumber","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":true,"module":"/assets/_exerciseNumber_._stepNumber-D1wwEMQx.js","imports":["/assets/index-D1WEsmVZ.js","/assets/clsx-B-dksMZM.js","/assets/components-Dj3sm47B.js","/assets/misc-CXGQ7VS9.js"],"css":[]},"routes/_app+/_exercises+/$exerciseNumber_.$stepNumber.$type+/_layout":{"id":"routes/_app+/_exercises+/$exerciseNumber_.$stepNumber.$type+/_layout","parentId":"routes/_app+/_exercises+/$exerciseNumber_.$stepNumber","path":":type","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":true,"module":"/assets/_layout-CGXamJB4.js","imports":["/assets/index-D1WEsmVZ.js","/assets/components-Dj3sm47B.js","/assets/clsx-B-dksMZM.js","/assets/misc-CXGQ7VS9.js","/assets/client-hints-BHTHvBjk.js","/assets/index-B8k-Gd1G.js","/assets/tooltip-CVFWPOu0.js","/assets/loading-CaagEELb.js","/assets/index-zG3_j9lj.js","/assets/epic-video-BwJwnV_j.js","/assets/progress-bar-DX6yYES2.js","/assets/mdx-DdywIxB6.js","/assets/user-DiGtbaa7.js","/assets/index-BfoHqrT5.js","/assets/diff-MSYB00VZ.js","/assets/discord-CsluX01E.js","/assets/index-BL4aE6WC.js","/assets/button-DnQOyJAN.js","/assets/use-event-source-DXlRuRq2.js","/assets/error-boundary-Bg54_knF.js","/assets/nav-chevrons-D8c9lJW6.js","/assets/progress-CBZt2pmu.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/_app+/_exercises+/$exerciseNumber_.$stepNumber.index":{"id":"routes/_app+/_exercises+/$exerciseNumber_.$stepNumber.index","parentId":"routes/_app+/_exercises+/$exerciseNumber_.$stepNumber","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/_exerciseNumber_._stepNumber.index-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/_exercises+/$exerciseNumber_.finished":{"id":"routes/_app+/_exercises+/$exerciseNumber_.finished","parentId":"routes/_app+/_exercises+/_layout","path":":exerciseNumber/finished","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/_exerciseNumber_.finished-DldgXnJy.js","imports":["/assets/index-D1WEsmVZ.js","/assets/components-Dj3sm47B.js","/assets/clsx-B-dksMZM.js","/assets/client-hints-BHTHvBjk.js","/assets/misc-CXGQ7VS9.js","/assets/index-B8k-Gd1G.js","/assets/tooltip-CVFWPOu0.js","/assets/loading-CaagEELb.js","/assets/index-zG3_j9lj.js","/assets/epic-video-BwJwnV_j.js","/assets/progress-bar-DX6yYES2.js","/assets/index-BfoHqrT5.js","/assets/nav-chevrons-D8c9lJW6.js","/assets/mdx-DdywIxB6.js","/assets/progress-CBZt2pmu.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/_app+/account":{"id":"routes/_app+/account","parentId":"routes/_app+/_layout","path":"account","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/account-Bk4o4AzZ.js","imports":["/assets/index-D1WEsmVZ.js","/assets/clsx-B-dksMZM.js","/assets/components-Dj3sm47B.js","/assets/index-B8k-Gd1G.js","/assets/button-DnQOyJAN.js","/assets/misc-CXGQ7VS9.js","/assets/user-DiGtbaa7.js","/assets/presence-u-05JV3Z.js"],"css":[]},"routes/_app+/app.$appName+/$":{"id":"routes/_app+/app.$appName+/$","parentId":"routes/_app+/_layout","path":"app/:appName/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/_-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$appName+/api.$":{"id":"routes/_app+/app.$appName+/api.$","parentId":"routes/_app+/_layout","path":"app/:appName/api/*","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api._-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$appName+/index":{"id":"routes/_app+/app.$appName+/index","parentId":"routes/_app+/_layout","path":"app/:appName/","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/index-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$appName+/kcd_ws[.js]":{"id":"routes/_app+/app.$appName+/kcd_ws[.js]","parentId":"routes/_app+/_layout","path":"app/:appName/kcd_ws.js","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/kcd_ws_.js_-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$appName+/test.$testName":{"id":"routes/_app+/app.$appName+/test.$testName","parentId":"routes/_app+/_layout","path":"app/:appName/test/:testName","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/test._testName-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$id":{"id":"routes/_app+/app.$id","parentId":"routes/_app+/_layout","path":"app/:id","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/app._id-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$id.$":{"id":"routes/_app+/app.$id.$","parentId":"routes/_app+/app.$id","path":"*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/app._id._-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$id.api.$":{"id":"routes/_app+/app.$id.api.$","parentId":"routes/_app+/app.$id","path":"api/*","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/app._id.api._-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$id.epic_ws[.js]":{"id":"routes/_app+/app.$id.epic_ws[.js]","parentId":"routes/_app+/app.$id","path":"epic_ws.js","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/app._id.epic_ws_.js_-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$id.test.$testName":{"id":"routes/_app+/app.$id.test.$testName","parentId":"routes/_app+/app.$id","path":"test/:testName","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/app._id.test._testName-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/discord":{"id":"routes/_app+/discord","parentId":"routes/_app+/_layout","path":"discord","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/discord-CK7yz4w6.js","imports":["/assets/index-D1WEsmVZ.js","/assets/clsx-B-dksMZM.js","/assets/components-Dj3sm47B.js","/assets/misc-CXGQ7VS9.js","/assets/user-DiGtbaa7.js","/assets/discord-CsluX01E.js"],"css":[]},"routes/_app+/finished":{"id":"routes/_app+/finished","parentId":"routes/_app+/_layout","path":"finished","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/finished-CGll5TOI.js","imports":["/assets/index-D1WEsmVZ.js","/assets/components-Dj3sm47B.js","/assets/clsx-B-dksMZM.js","/assets/client-hints-BHTHvBjk.js","/assets/misc-CXGQ7VS9.js","/assets/index-B8k-Gd1G.js","/assets/tooltip-CVFWPOu0.js","/assets/loading-CaagEELb.js","/assets/index-zG3_j9lj.js","/assets/epic-video-BwJwnV_j.js","/assets/progress-bar-DX6yYES2.js","/assets/index-BfoHqrT5.js","/assets/mdx-DdywIxB6.js","/assets/progress-CBZt2pmu.js","/assets/nav-chevrons-D8c9lJW6.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/_app+/index":{"id":"routes/_app+/index","parentId":"routes/_app+/_layout","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":true,"module":"/assets/index-DqBktlAI.js","imports":["/assets/index-D1WEsmVZ.js","/assets/components-Dj3sm47B.js","/assets/clsx-B-dksMZM.js","/assets/client-hints-BHTHvBjk.js","/assets/misc-CXGQ7VS9.js","/assets/index-B8k-Gd1G.js","/assets/tooltip-CVFWPOu0.js","/assets/loading-CaagEELb.js","/assets/index-zG3_j9lj.js","/assets/epic-video-BwJwnV_j.js","/assets/progress-bar-DX6yYES2.js","/assets/index-BfoHqrT5.js","/assets/progress-CBZt2pmu.js","/assets/error-boundary-Bg54_knF.js","/assets/mdx-DdywIxB6.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/_app+/login":{"id":"routes/_app+/login","parentId":"routes/_app+/_layout","path":"login","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/login-2BiFV7_R.js","imports":["/assets/index-D1WEsmVZ.js","/assets/clsx-B-dksMZM.js","/assets/components-Dj3sm47B.js","/assets/client-hints-BHTHvBjk.js","/assets/use-event-source-DXlRuRq2.js","/assets/index-B8k-Gd1G.js","/assets/button-DnQOyJAN.js","/assets/loading-CaagEELb.js"],"css":[]},"routes/_app+/support":{"id":"routes/_app+/support","parentId":"routes/_app+/_layout","path":"support","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/support-QTdmLyE7.js","imports":["/assets/index-D1WEsmVZ.js","/assets/components-Dj3sm47B.js"],"css":[]},"routes/admin+/_layout":{"id":"routes/admin+/_layout","parentId":"root","path":"admin","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/_layout-BaPtC79F.js","imports":["/assets/index-D1WEsmVZ.js","/assets/clsx-B-dksMZM.js","/assets/components-Dj3sm47B.js","/assets/misc-CXGQ7VS9.js","/assets/tooltip-CVFWPOu0.js","/assets/progress-CBZt2pmu.js"],"css":[]},"routes/admin+/apps":{"id":"routes/admin+/apps","parentId":"routes/admin+/_layout","path":"apps","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/apps-DP2rzg_V.js","imports":[],"css":[]},"routes/apps":{"id":"routes/apps","parentId":"root","path":"apps","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/apps-l0sNRNKZ.js","imports":[],"css":[]},"routes/diff":{"id":"routes/diff","parentId":"root","path":"diff","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/diff-Blb5EPiO.js","imports":["/assets/index-D1WEsmVZ.js","/assets/clsx-B-dksMZM.js","/assets/components-Dj3sm47B.js","/assets/misc-CXGQ7VS9.js","/assets/client-hints-BHTHvBjk.js","/assets/index-B8k-Gd1G.js","/assets/tooltip-CVFWPOu0.js","/assets/loading-CaagEELb.js","/assets/index-zG3_j9lj.js","/assets/epic-video-BwJwnV_j.js","/assets/progress-bar-DX6yYES2.js","/assets/mdx-DdywIxB6.js","/assets/diff-MSYB00VZ.js","/assets/nav-chevrons-D8c9lJW6.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/discord.callback":{"id":"routes/discord.callback","parentId":"root","path":"discord/callback","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/discord.callback-l0sNRNKZ.js","imports":[],"css":[]},"routes/exercises":{"id":"routes/exercises","parentId":"root","path":"exercises","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/exercises-l0sNRNKZ.js","imports":[],"css":[]},"routes/launch-editor":{"id":"routes/launch-editor","parentId":"root","path":"launch-editor","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/launch-editor-l0sNRNKZ.js","imports":[],"css":[]},"routes/login-sse":{"id":"routes/login-sse","parentId":"root","path":"login-sse","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/login-sse-l0sNRNKZ.js","imports":[],"css":[]},"routes/onboarding":{"id":"routes/onboarding","parentId":"root","path":"onboarding","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/onboarding-eFvyCmxD.js","imports":["/assets/index-D1WEsmVZ.js","/assets/clsx-B-dksMZM.js","/assets/components-Dj3sm47B.js","/assets/client-hints-BHTHvBjk.js","/assets/misc-CXGQ7VS9.js","/assets/index-B8k-Gd1G.js","/assets/tooltip-CVFWPOu0.js","/assets/loading-CaagEELb.js","/assets/index-zG3_j9lj.js","/assets/button-DnQOyJAN.js","/assets/epic-video-BwJwnV_j.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/processes":{"id":"routes/processes","parentId":"root","path":"processes","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/processes-l0sNRNKZ.js","imports":[],"css":[]},"routes/progress":{"id":"routes/progress","parentId":"root","path":"progress","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/progress-l0sNRNKZ.js","imports":[],"css":[]},"routes/set-playground":{"id":"routes/set-playground","parentId":"root","path":"set-playground","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/set-playground-l0sNRNKZ.js","imports":[],"css":[]},"routes/start":{"id":"routes/start","parentId":"root","path":"start","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/start-l0sNRNKZ.js","imports":[],"css":[]},"routes/test":{"id":"routes/test","parentId":"root","path":"test","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/test-l0sNRNKZ.js","imports":[],"css":[]},"routes/theme/index":{"id":"routes/theme/index","parentId":"root","path":"theme","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/index-DP2rzg_V.js","imports":[],"css":[]},"routes/update-mdx-cache":{"id":"routes/update-mdx-cache","parentId":"root","path":"update-mdx-cache","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/update-mdx-cache-l0sNRNKZ.js","imports":[],"css":[]},"routes/video-player/index":{"id":"routes/video-player/index","parentId":"root","path":"video-player","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/index-K6Dvbx-E.js","imports":[],"css":[]}},"url":"/assets/manifest-5e8d103b.js","version":"5e8d103b"};
|
|
1
|
+
window.__remixManifest={"entry":{"module":"/assets/entry.client-DBBrAxtJ.js","imports":["/assets/index-D1WEsmVZ.js","/assets/components-Dj3sm47B.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":true,"module":"/assets/root-B02acrJe.js","imports":["/assets/index-D1WEsmVZ.js","/assets/components-Dj3sm47B.js","/assets/clsx-B-dksMZM.js","/assets/misc-CXGQ7VS9.js","/assets/index-B8k-Gd1G.js","/assets/tooltip-CVFWPOu0.js","/assets/client-hints-KnbHFIgn.js","/assets/error-boundary-Bg54_knF.js","/assets/progress-bar-DX6yYES2.js","/assets/index-BL4aE6WC.js","/assets/index-CLnz0tXz.js","/assets/presence-u-05JV3Z.js"],"css":[]},"routes/$":{"id":"routes/$","parentId":"root","path":"*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":true,"module":"/assets/_-ByTWgb53.js","imports":["/assets/index-D1WEsmVZ.js","/assets/clsx-B-dksMZM.js","/assets/components-Dj3sm47B.js","/assets/misc-CXGQ7VS9.js","/assets/error-boundary-Bg54_knF.js"],"css":[]},"routes/_app+/_layout":{"id":"routes/_app+/_layout","parentId":"root","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/_layout-D7Qo_r0X.js","imports":["/assets/index-D1WEsmVZ.js","/assets/clsx-B-dksMZM.js","/assets/components-Dj3sm47B.js","/assets/misc-CXGQ7VS9.js","/assets/index-B8k-Gd1G.js","/assets/tooltip-CVFWPOu0.js","/assets/client-hints-KnbHFIgn.js","/assets/progress-CBZt2pmu.js","/assets/index-CLnz0tXz.js","/assets/user-DiGtbaa7.js","/assets/presence-u-05JV3Z.js"],"css":[]},"routes/_app+/_exercises+/_layout":{"id":"routes/_app+/_exercises+/_layout","parentId":"routes/_app+/_layout","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/_layout-Bj9PyQQD.js","imports":["/assets/index-D1WEsmVZ.js"],"css":[]},"routes/_app+/_exercises+/$exerciseNumber":{"id":"routes/_app+/_exercises+/$exerciseNumber","parentId":"routes/_app+/_exercises+/_layout","path":":exerciseNumber","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":true,"module":"/assets/_exerciseNumber-s_qbmGEJ.js","imports":["/assets/index-D1WEsmVZ.js","/assets/components-Dj3sm47B.js","/assets/clsx-B-dksMZM.js","/assets/client-hints-KnbHFIgn.js","/assets/misc-CXGQ7VS9.js","/assets/index-B8k-Gd1G.js","/assets/tooltip-CVFWPOu0.js","/assets/loading-D-DClzm1.js","/assets/index-CLnz0tXz.js","/assets/epic-video-Df7qGSN7.js","/assets/progress-bar-DX6yYES2.js","/assets/index-BfoHqrT5.js","/assets/mdx-ytg-y2nh.js","/assets/progress-CBZt2pmu.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/_app+/_exercises+/$exerciseNumber_.$stepNumber":{"id":"routes/_app+/_exercises+/$exerciseNumber_.$stepNumber","parentId":"routes/_app+/_exercises+/_layout","path":":exerciseNumber/:stepNumber","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":true,"module":"/assets/_exerciseNumber_._stepNumber-D1wwEMQx.js","imports":["/assets/index-D1WEsmVZ.js","/assets/clsx-B-dksMZM.js","/assets/components-Dj3sm47B.js","/assets/misc-CXGQ7VS9.js"],"css":[]},"routes/_app+/_exercises+/$exerciseNumber_.$stepNumber.$type+/_layout":{"id":"routes/_app+/_exercises+/$exerciseNumber_.$stepNumber.$type+/_layout","parentId":"routes/_app+/_exercises+/$exerciseNumber_.$stepNumber","path":":type","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":true,"module":"/assets/_layout-49l6Rvwp.js","imports":["/assets/index-D1WEsmVZ.js","/assets/components-Dj3sm47B.js","/assets/clsx-B-dksMZM.js","/assets/misc-CXGQ7VS9.js","/assets/client-hints-KnbHFIgn.js","/assets/index-B8k-Gd1G.js","/assets/tooltip-CVFWPOu0.js","/assets/loading-D-DClzm1.js","/assets/index-CLnz0tXz.js","/assets/epic-video-Df7qGSN7.js","/assets/progress-bar-DX6yYES2.js","/assets/mdx-ytg-y2nh.js","/assets/user-DiGtbaa7.js","/assets/index-BfoHqrT5.js","/assets/diff-CT3-9rtW.js","/assets/discord-CsluX01E.js","/assets/index-BL4aE6WC.js","/assets/button-DnQOyJAN.js","/assets/use-event-source-DXlRuRq2.js","/assets/error-boundary-Bg54_knF.js","/assets/nav-chevrons-D8c9lJW6.js","/assets/progress-CBZt2pmu.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/_app+/_exercises+/$exerciseNumber_.$stepNumber.index":{"id":"routes/_app+/_exercises+/$exerciseNumber_.$stepNumber.index","parentId":"routes/_app+/_exercises+/$exerciseNumber_.$stepNumber","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/_exerciseNumber_._stepNumber.index-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/_exercises+/$exerciseNumber_.finished":{"id":"routes/_app+/_exercises+/$exerciseNumber_.finished","parentId":"routes/_app+/_exercises+/_layout","path":":exerciseNumber/finished","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/_exerciseNumber_.finished-DJgT9oaU.js","imports":["/assets/index-D1WEsmVZ.js","/assets/components-Dj3sm47B.js","/assets/clsx-B-dksMZM.js","/assets/client-hints-KnbHFIgn.js","/assets/misc-CXGQ7VS9.js","/assets/index-B8k-Gd1G.js","/assets/tooltip-CVFWPOu0.js","/assets/loading-D-DClzm1.js","/assets/index-CLnz0tXz.js","/assets/epic-video-Df7qGSN7.js","/assets/progress-bar-DX6yYES2.js","/assets/index-BfoHqrT5.js","/assets/nav-chevrons-D8c9lJW6.js","/assets/mdx-ytg-y2nh.js","/assets/progress-CBZt2pmu.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/_app+/account":{"id":"routes/_app+/account","parentId":"routes/_app+/_layout","path":"account","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/account-Bk4o4AzZ.js","imports":["/assets/index-D1WEsmVZ.js","/assets/clsx-B-dksMZM.js","/assets/components-Dj3sm47B.js","/assets/index-B8k-Gd1G.js","/assets/button-DnQOyJAN.js","/assets/misc-CXGQ7VS9.js","/assets/user-DiGtbaa7.js","/assets/presence-u-05JV3Z.js"],"css":[]},"routes/_app+/app.$appName+/$":{"id":"routes/_app+/app.$appName+/$","parentId":"routes/_app+/_layout","path":"app/:appName/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/_-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$appName+/api.$":{"id":"routes/_app+/app.$appName+/api.$","parentId":"routes/_app+/_layout","path":"app/:appName/api/*","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/api._-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$appName+/index":{"id":"routes/_app+/app.$appName+/index","parentId":"routes/_app+/_layout","path":"app/:appName/","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/index-K6Dvbx-E.js","imports":[],"css":[]},"routes/_app+/app.$appName+/kcd_ws[.js]":{"id":"routes/_app+/app.$appName+/kcd_ws[.js]","parentId":"routes/_app+/_layout","path":"app/:appName/kcd_ws.js","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/kcd_ws_.js_-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$appName+/test.$testName":{"id":"routes/_app+/app.$appName+/test.$testName","parentId":"routes/_app+/_layout","path":"app/:appName/test/:testName","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/test._testName-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$id":{"id":"routes/_app+/app.$id","parentId":"routes/_app+/_layout","path":"app/:id","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/app._id-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$id.$":{"id":"routes/_app+/app.$id.$","parentId":"routes/_app+/app.$id","path":"*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/app._id._-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$id.api.$":{"id":"routes/_app+/app.$id.api.$","parentId":"routes/_app+/app.$id","path":"api/*","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/app._id.api._-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$id.epic_ws[.js]":{"id":"routes/_app+/app.$id.epic_ws[.js]","parentId":"routes/_app+/app.$id","path":"epic_ws.js","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/app._id.epic_ws_.js_-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/app.$id.test.$testName":{"id":"routes/_app+/app.$id.test.$testName","parentId":"routes/_app+/app.$id","path":"test/:testName","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/app._id.test._testName-l0sNRNKZ.js","imports":[],"css":[]},"routes/_app+/discord":{"id":"routes/_app+/discord","parentId":"routes/_app+/_layout","path":"discord","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/discord-CK7yz4w6.js","imports":["/assets/index-D1WEsmVZ.js","/assets/clsx-B-dksMZM.js","/assets/components-Dj3sm47B.js","/assets/misc-CXGQ7VS9.js","/assets/user-DiGtbaa7.js","/assets/discord-CsluX01E.js"],"css":[]},"routes/_app+/finished":{"id":"routes/_app+/finished","parentId":"routes/_app+/_layout","path":"finished","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/finished-Dw3SJA8A.js","imports":["/assets/index-D1WEsmVZ.js","/assets/components-Dj3sm47B.js","/assets/clsx-B-dksMZM.js","/assets/client-hints-KnbHFIgn.js","/assets/misc-CXGQ7VS9.js","/assets/index-B8k-Gd1G.js","/assets/tooltip-CVFWPOu0.js","/assets/loading-D-DClzm1.js","/assets/index-CLnz0tXz.js","/assets/epic-video-Df7qGSN7.js","/assets/progress-bar-DX6yYES2.js","/assets/index-BfoHqrT5.js","/assets/mdx-ytg-y2nh.js","/assets/progress-CBZt2pmu.js","/assets/nav-chevrons-D8c9lJW6.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/_app+/index":{"id":"routes/_app+/index","parentId":"routes/_app+/_layout","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":true,"module":"/assets/index-YgRENgjt.js","imports":["/assets/index-D1WEsmVZ.js","/assets/components-Dj3sm47B.js","/assets/clsx-B-dksMZM.js","/assets/client-hints-KnbHFIgn.js","/assets/misc-CXGQ7VS9.js","/assets/index-B8k-Gd1G.js","/assets/tooltip-CVFWPOu0.js","/assets/loading-D-DClzm1.js","/assets/index-CLnz0tXz.js","/assets/epic-video-Df7qGSN7.js","/assets/progress-bar-DX6yYES2.js","/assets/index-BfoHqrT5.js","/assets/progress-CBZt2pmu.js","/assets/error-boundary-Bg54_knF.js","/assets/mdx-ytg-y2nh.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/_app+/login":{"id":"routes/_app+/login","parentId":"routes/_app+/_layout","path":"login","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/login-CjvZj820.js","imports":["/assets/index-D1WEsmVZ.js","/assets/clsx-B-dksMZM.js","/assets/components-Dj3sm47B.js","/assets/client-hints-KnbHFIgn.js","/assets/use-event-source-DXlRuRq2.js","/assets/index-B8k-Gd1G.js","/assets/button-DnQOyJAN.js","/assets/loading-D-DClzm1.js"],"css":[]},"routes/_app+/support":{"id":"routes/_app+/support","parentId":"routes/_app+/_layout","path":"support","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/support-QTdmLyE7.js","imports":["/assets/index-D1WEsmVZ.js","/assets/components-Dj3sm47B.js"],"css":[]},"routes/admin+/_layout":{"id":"routes/admin+/_layout","parentId":"root","path":"admin","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/_layout-BaPtC79F.js","imports":["/assets/index-D1WEsmVZ.js","/assets/clsx-B-dksMZM.js","/assets/components-Dj3sm47B.js","/assets/misc-CXGQ7VS9.js","/assets/tooltip-CVFWPOu0.js","/assets/progress-CBZt2pmu.js"],"css":[]},"routes/admin+/apps":{"id":"routes/admin+/apps","parentId":"routes/admin+/_layout","path":"apps","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/apps-l0sNRNKZ.js","imports":[],"css":[]},"routes/apps":{"id":"routes/apps","parentId":"root","path":"apps","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/apps-DP2rzg_V.js","imports":[],"css":[]},"routes/diff":{"id":"routes/diff","parentId":"root","path":"diff","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/diff-CLRdJhCn.js","imports":["/assets/index-D1WEsmVZ.js","/assets/clsx-B-dksMZM.js","/assets/components-Dj3sm47B.js","/assets/misc-CXGQ7VS9.js","/assets/client-hints-KnbHFIgn.js","/assets/index-B8k-Gd1G.js","/assets/tooltip-CVFWPOu0.js","/assets/loading-D-DClzm1.js","/assets/index-CLnz0tXz.js","/assets/epic-video-Df7qGSN7.js","/assets/progress-bar-DX6yYES2.js","/assets/mdx-ytg-y2nh.js","/assets/diff-CT3-9rtW.js","/assets/nav-chevrons-D8c9lJW6.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/discord.callback":{"id":"routes/discord.callback","parentId":"root","path":"discord/callback","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/discord.callback-l0sNRNKZ.js","imports":[],"css":[]},"routes/exercises":{"id":"routes/exercises","parentId":"root","path":"exercises","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/exercises-l0sNRNKZ.js","imports":[],"css":[]},"routes/launch-editor":{"id":"routes/launch-editor","parentId":"root","path":"launch-editor","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/launch-editor-l0sNRNKZ.js","imports":[],"css":[]},"routes/login-sse":{"id":"routes/login-sse","parentId":"root","path":"login-sse","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/login-sse-l0sNRNKZ.js","imports":[],"css":[]},"routes/onboarding":{"id":"routes/onboarding","parentId":"root","path":"onboarding","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/onboarding-BxcIdiGj.js","imports":["/assets/index-D1WEsmVZ.js","/assets/clsx-B-dksMZM.js","/assets/components-Dj3sm47B.js","/assets/client-hints-KnbHFIgn.js","/assets/misc-CXGQ7VS9.js","/assets/index-B8k-Gd1G.js","/assets/tooltip-CVFWPOu0.js","/assets/loading-D-DClzm1.js","/assets/index-CLnz0tXz.js","/assets/button-DnQOyJAN.js","/assets/epic-video-Df7qGSN7.js"],"css":["/assets/epic-video-DUnRvy1A.css"]},"routes/processes":{"id":"routes/processes","parentId":"root","path":"processes","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/processes-l0sNRNKZ.js","imports":[],"css":[]},"routes/progress":{"id":"routes/progress","parentId":"root","path":"progress","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/progress-l0sNRNKZ.js","imports":[],"css":[]},"routes/set-playground":{"id":"routes/set-playground","parentId":"root","path":"set-playground","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/set-playground-l0sNRNKZ.js","imports":[],"css":[]},"routes/start":{"id":"routes/start","parentId":"root","path":"start","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/start-l0sNRNKZ.js","imports":[],"css":[]},"routes/test":{"id":"routes/test","parentId":"root","path":"test","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/test-l0sNRNKZ.js","imports":[],"css":[]},"routes/theme/index":{"id":"routes/theme/index","parentId":"root","path":"theme","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/index-l0sNRNKZ.js","imports":[],"css":[]},"routes/update-mdx-cache":{"id":"routes/update-mdx-cache","parentId":"root","path":"update-mdx-cache","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/update-mdx-cache-l0sNRNKZ.js","imports":[],"css":[]},"routes/video-player/index":{"id":"routes/video-player/index","parentId":"root","path":"video-player","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasErrorBoundary":false,"module":"/assets/index-DP2rzg_V.js","imports":[],"css":[]}},"url":"/assets/manifest-50f87ab0.js","version":"50f87ab0"};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var re=Object.defineProperty;var oe=(n,e,i)=>e in n?re(n,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[e]=i;var O=(n,e,i)=>(oe(n,typeof e!="symbol"?e+"":e,i),i),zt=(n,e,i)=>{if(!e.has(n))throw TypeError("Cannot "+i)};var t=(n,e,i)=>(zt(n,e,"read from private field"),i?i.call(n):e.get(n)),g=(n,e,i)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,i)},u=(n,e,i,s)=>(zt(n,e,"write to private field"),s?s.call(n,i):e.set(n,i),i);var Ot=(n,e,i,s)=>({set _(o){u(n,e,o,i)},get _(){return t(n,e,s)}}),c=(n,e,i)=>(zt(n,e,"access private method"),i);import{j as d,r as ct}from"./index-D1WEsmVZ.js";import{c as Tt}from"./clsx-B-dksMZM.js";import{b as ae,L as Xt,a as he,r as le,u as ce}from"./components-Dj3sm47B.js";import{I as ue,c as fe,H as ut,A as de}from"./misc-CXGQ7VS9.js";import{V as pe,D as ge}from"./epic-video-BwJwnV_j.js";import{s as me}from"./progress-bar-DX6yYES2.js";import{S as be}from"./tooltip-CVFWPOu0.js";import{a as we}from"./client-hints-BHTHvBjk.js";function _e(){const n=ae("root");if(!n)throw new Error("useApps requires a data object from the root loader");return n.apps}function Yt(n){const e=he();return ct.useEffect(()=>{e.state==="idle"&&e.data!=null&&(n==null||n("fetcher-done"))},[e,n]),e}function ye({file:n,appFile:e,appName:i,syncTo:s,line:o,column:r,children:a,onUpdate:h}){var W;const l=Yt(h),m=typeof e=="string"?[e]:e,F=n?"file":e?"appFile":"",b=s!=null&&s.file?"file":s!=null&&s.appFile?"appFile":"";return d.jsxs(l.Form,{action:"/launch-editor",method:"POST",className:"flex items-center",children:[me,d.jsx("input",{type:"hidden",name:"line",value:o}),d.jsx("input",{type:"hidden",name:"column",value:r}),d.jsx("input",{type:"hidden",name:"type",value:F}),d.jsx("input",{type:"hidden",name:"file",value:n}),d.jsx("input",{type:"hidden",name:"appName",value:i}),m==null?void 0:m.map(_=>d.jsx("input",{type:"hidden",name:"appFile",value:_},_)),s?d.jsxs(d.Fragment,{children:[d.jsx("input",{type:"hidden",name:"syncTo.type",value:b}),d.jsx("input",{type:"hidden",name:"syncTo.file",value:s.file}),d.jsx("input",{type:"hidden",name:"syncTo.appName",value:s.appName}),d.jsx("input",{type:"hidden",name:"syncTo.appFile",value:s.appFile})]}):null,d.jsx("button",{type:"submit",className:Tt("launch_button",l.state==="idle"?null:"cursor-progress",((W=l.data)==null?void 0:W.status)==="error"?"cursor-not-allowed":null),children:a})]})}function Se({file:n,appFile:e,appName:i,line:s,children:o}){const r=_e(),a=we();if(Array.isArray(e))return d.jsx("div",{children:"Cannot open more than one file"});if(n){const m=F=>F.replace(/\\/g,"/");return d.jsx("a",{className:"launch_button !no-underline",href:m(n).replace(m(ENV.EPICSHOP_CONTEXT_CWD),ENV.EPICSHOP_GITHUB_ROOT)+(s?`#L${s}`:""),rel:"noreferrer",target:"_blank",children:o})}const h=r.find(m=>m.name===i),l=[...(h==null?void 0:h.relativePath.split(a.separator))??[],e+(s?`#L${s}`:"")].join("/");return d.jsx("a",{className:"launch_button !no-underline",href:`${ENV.EPICSHOP_GITHUB_ROOT}/${l}`,rel:"noreferrer",target:"_blank",children:o})}function Ve({appFile:n="README.mdx",appName:e,file:i,relativePath:s}){const o=Yt(),r=h=>{if(!h.altKey||ENV.EPICSHOP_DEPLOYED)return;h.preventDefault();const l=new FormData,m=i?"file":"appFile";l.append(m,i??n),l.append("type",m),e&&l.append("appName",e),o.submit(l,{method:"POST",action:"/launch-editor"})},a=ENV.EPICSHOP_GITHUB_ROOT.replace(/\/tree\/|\/blob\//,"/edit/");return d.jsxs(Xt,{className:"self-center font-mono text-sm",onClick:r,target:"_blank",to:`${a}/${s}/${n}`.replace(/\\/g,"/"),children:[d.jsx("span",{className:"block md:hidden",children:"Edit on GitHub"}),d.jsx("span",{className:"hidden md:block",children:"Edit this page on GitHub"})]})}const Kt=ENV.EPICSHOP_DEPLOYED?ENV.EPICSHOP_GITHUB_ROOT?Se:({children:n})=>d.jsx(be,{content:"Cannot open files in deployed app",children:d.jsx("button",{className:"launch_button cursor-not-allowed",children:n})}):ye,ft=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Zt=new Set,Rt=typeof process=="object"&&process?process:{},Jt=(n,e,i,s)=>{typeof Rt.emitWarning=="function"?Rt.emitWarning(n,e,i,s):console.error(`[${i}] ${e}: ${n}`)};let jt=globalThis.AbortController,$t=globalThis.AbortSignal;var qt;if(typeof jt>"u"){$t=class{constructor(){O(this,"onabort");O(this,"_onabort",[]);O(this,"reason");O(this,"aborted",!1)}addEventListener(s,o){this._onabort.push(o)}},jt=class{constructor(){O(this,"signal",new $t);e()}abort(s){var o,r;if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=!0;for(const a of this.signal._onabort)a(s);(r=(o=this.signal).onabort)==null||r.call(o,s)}}};let n=((qt=Rt.env)==null?void 0:qt.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{n&&(n=!1,Jt("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const Ee=n=>!Zt.has(n),et=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),Qt=n=>et(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?vt:null:null;class vt extends Array{constructor(e){super(e),this.fill(0)}}var dt;const ot=class ot{constructor(e,i){O(this,"heap");O(this,"length");if(!t(ot,dt))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new i(e),this.length=0}static create(e){const i=Qt(e);if(!i)return[];u(ot,dt,!0);const s=new ot(e,i);return u(ot,dt,!1),s}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};dt=new WeakMap,g(ot,dt,!1);let Wt=ot;var U,I,V,B,pt,A,$,v,E,p,N,M,z,C,q,T,X,Y,G,K,nt,R,_t,It,at,Q,yt,H,Ct,te,ht,gt,St,Z,it,J,st,Et,Mt,Ne,mt,At,bt,Ft,w,S,xt,Gt,lt,wt;const Ut=class Ut{constructor(e){g(this,_t);g(this,Ct);g(this,Z);g(this,J);g(this,Et);g(this,mt);g(this,bt);g(this,w);g(this,xt);g(this,lt);g(this,U,void 0);g(this,I,void 0);g(this,V,void 0);g(this,B,void 0);g(this,pt,void 0);O(this,"ttl");O(this,"ttlResolution");O(this,"ttlAutopurge");O(this,"updateAgeOnGet");O(this,"updateAgeOnHas");O(this,"allowStale");O(this,"noDisposeOnSet");O(this,"noUpdateTTL");O(this,"maxEntrySize");O(this,"sizeCalculation");O(this,"noDeleteOnFetchRejection");O(this,"noDeleteOnStaleGet");O(this,"allowStaleOnFetchAbort");O(this,"allowStaleOnFetchRejection");O(this,"ignoreFetchAbort");g(this,A,void 0);g(this,$,void 0);g(this,v,void 0);g(this,E,void 0);g(this,p,void 0);g(this,N,void 0);g(this,M,void 0);g(this,z,void 0);g(this,C,void 0);g(this,q,void 0);g(this,T,void 0);g(this,X,void 0);g(this,Y,void 0);g(this,G,void 0);g(this,K,void 0);g(this,nt,void 0);g(this,R,void 0);g(this,at,()=>{});g(this,Q,()=>{});g(this,yt,()=>{});g(this,H,()=>!1);g(this,ht,e=>{});g(this,gt,(e,i,s)=>{});g(this,St,(e,i,s,o)=>{if(s||o)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});O(this,Ne,"LRUCache");const{max:i=0,ttl:s,ttlResolution:o=1,ttlAutopurge:r,updateAgeOnGet:a,updateAgeOnHas:h,allowStale:l,dispose:m,disposeAfter:F,noDisposeOnSet:b,noUpdateTTL:W,maxSize:_=0,maxEntrySize:P=0,sizeCalculation:x,fetchMethod:j,noDeleteOnFetchRejection:f,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:L,allowStaleOnFetchAbort:D,ignoreFetchAbort:k}=e;if(i!==0&&!et(i))throw new TypeError("max option must be a nonnegative integer");const rt=i?Qt(i):Array;if(!rt)throw new Error("invalid max value: "+i);if(u(this,U,i),u(this,I,_),this.maxEntrySize=P||t(this,I),this.sizeCalculation=x,this.sizeCalculation){if(!t(this,I)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(j!==void 0&&typeof j!="function")throw new TypeError("fetchMethod must be a function if specified");if(u(this,pt,j),u(this,nt,!!j),u(this,v,new Map),u(this,E,new Array(i).fill(void 0)),u(this,p,new Array(i).fill(void 0)),u(this,N,new rt(i)),u(this,M,new rt(i)),u(this,z,0),u(this,C,0),u(this,q,Wt.create(i)),u(this,A,0),u(this,$,0),typeof m=="function"&&u(this,V,m),typeof F=="function"?(u(this,B,F),u(this,T,[])):(u(this,B,void 0),u(this,T,void 0)),u(this,K,!!t(this,V)),u(this,R,!!t(this,B)),this.noDisposeOnSet=!!b,this.noUpdateTTL=!!W,this.noDeleteOnFetchRejection=!!f,this.allowStaleOnFetchRejection=!!L,this.allowStaleOnFetchAbort=!!D,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(t(this,I)!==0&&!et(t(this,I)))throw new TypeError("maxSize must be a positive integer if specified");if(!et(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");c(this,Ct,te).call(this)}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!h,this.ttlResolution=et(o)||o===0?o:1,this.ttlAutopurge=!!r,this.ttl=s||0,this.ttl){if(!et(this.ttl))throw new TypeError("ttl must be a positive integer if specified");c(this,_t,It).call(this)}if(t(this,U)===0&&this.ttl===0&&t(this,I)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!t(this,U)&&!t(this,I)){const tt="LRU_CACHE_UNBOUNDED";Ee(tt)&&(Zt.add(tt),Jt("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",tt,Ut))}}static unsafeExposeInternals(e){return{starts:t(e,Y),ttls:t(e,G),sizes:t(e,X),keyMap:t(e,v),keyList:t(e,E),valList:t(e,p),next:t(e,N),prev:t(e,M),get head(){return t(e,z)},get tail(){return t(e,C)},free:t(e,q),isBackgroundFetch:i=>{var s;return c(s=e,w,S).call(s,i)},backgroundFetch:(i,s,o,r)=>{var a;return c(a=e,bt,Ft).call(a,i,s,o,r)},moveToTail:i=>{var s;return c(s=e,lt,wt).call(s,i)},indexes:i=>{var s;return c(s=e,Z,it).call(s,i)},rindexes:i=>{var s;return c(s=e,J,st).call(s,i)},isStale:i=>{var s;return t(s=e,H).call(s,i)}}}get max(){return t(this,U)}get maxSize(){return t(this,I)}get calculatedSize(){return t(this,$)}get size(){return t(this,A)}get fetchMethod(){return t(this,pt)}get dispose(){return t(this,V)}get disposeAfter(){return t(this,B)}getRemainingTTL(e){return t(this,v).has(e)?1/0:0}*entries(){for(const e of c(this,Z,it).call(this))t(this,p)[e]!==void 0&&t(this,E)[e]!==void 0&&!c(this,w,S).call(this,t(this,p)[e])&&(yield[t(this,E)[e],t(this,p)[e]])}*rentries(){for(const e of c(this,J,st).call(this))t(this,p)[e]!==void 0&&t(this,E)[e]!==void 0&&!c(this,w,S).call(this,t(this,p)[e])&&(yield[t(this,E)[e],t(this,p)[e]])}*keys(){for(const e of c(this,Z,it).call(this)){const i=t(this,E)[e];i!==void 0&&!c(this,w,S).call(this,t(this,p)[e])&&(yield i)}}*rkeys(){for(const e of c(this,J,st).call(this)){const i=t(this,E)[e];i!==void 0&&!c(this,w,S).call(this,t(this,p)[e])&&(yield i)}}*values(){for(const e of c(this,Z,it).call(this))t(this,p)[e]!==void 0&&!c(this,w,S).call(this,t(this,p)[e])&&(yield t(this,p)[e])}*rvalues(){for(const e of c(this,J,st).call(this))t(this,p)[e]!==void 0&&!c(this,w,S).call(this,t(this,p)[e])&&(yield t(this,p)[e])}[Symbol.iterator](){return this.entries()}find(e,i={}){for(const s of c(this,Z,it).call(this)){const o=t(this,p)[s],r=c(this,w,S).call(this,o)?o.__staleWhileFetching:o;if(r!==void 0&&e(r,t(this,E)[s],this))return this.get(t(this,E)[s],i)}}forEach(e,i=this){for(const s of c(this,Z,it).call(this)){const o=t(this,p)[s],r=c(this,w,S).call(this,o)?o.__staleWhileFetching:o;r!==void 0&&e.call(i,r,t(this,E)[s],this)}}rforEach(e,i=this){for(const s of c(this,J,st).call(this)){const o=t(this,p)[s],r=c(this,w,S).call(this,o)?o.__staleWhileFetching:o;r!==void 0&&e.call(i,r,t(this,E)[s],this)}}purgeStale(){let e=!1;for(const i of c(this,J,st).call(this,{allowStale:!0}))t(this,H).call(this,i)&&(this.delete(t(this,E)[i]),e=!0);return e}info(e){const i=t(this,v).get(e);if(i===void 0)return;const s=t(this,p)[i],o=c(this,w,S).call(this,s)?s.__staleWhileFetching:s;if(o===void 0)return;const r={value:o};if(t(this,G)&&t(this,Y)){const a=t(this,G)[i],h=t(this,Y)[i];if(a&&h){const l=a-(ft.now()-h);r.ttl=l,r.start=Date.now()}}return t(this,X)&&(r.size=t(this,X)[i]),r}dump(){const e=[];for(const i of c(this,Z,it).call(this,{allowStale:!0})){const s=t(this,E)[i],o=t(this,p)[i],r=c(this,w,S).call(this,o)?o.__staleWhileFetching:o;if(r===void 0||s===void 0)continue;const a={value:r};if(t(this,G)&&t(this,Y)){a.ttl=t(this,G)[i];const h=ft.now()-t(this,Y)[i];a.start=Math.floor(Date.now()-h)}t(this,X)&&(a.size=t(this,X)[i]),e.unshift([s,a])}return e}load(e){this.clear();for(const[i,s]of e){if(s.start){const o=Date.now()-s.start;s.start=ft.now()-o}this.set(i,s.value,s)}}set(e,i,s={}){var W,_,P,x,j;if(i===void 0)return this.delete(e),this;const{ttl:o=this.ttl,start:r,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:h=this.sizeCalculation,status:l}=s;let{noUpdateTTL:m=this.noUpdateTTL}=s;const F=t(this,St).call(this,e,i,s.size||0,h);if(this.maxEntrySize&&F>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(e),this;let b=t(this,A)===0?void 0:t(this,v).get(e);if(b===void 0)b=t(this,A)===0?t(this,C):t(this,q).length!==0?t(this,q).pop():t(this,A)===t(this,U)?c(this,mt,At).call(this,!1):t(this,A),t(this,E)[b]=e,t(this,p)[b]=i,t(this,v).set(e,b),t(this,N)[t(this,C)]=b,t(this,M)[b]=t(this,C),u(this,C,b),Ot(this,A)._++,t(this,gt).call(this,b,F,l),l&&(l.set="add"),m=!1;else{c(this,lt,wt).call(this,b);const f=t(this,p)[b];if(i!==f){if(t(this,nt)&&c(this,w,S).call(this,f)){f.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:y}=f;y!==void 0&&!a&&(t(this,K)&&((W=t(this,V))==null||W.call(this,y,e,"set")),t(this,R)&&((_=t(this,T))==null||_.push([y,e,"set"])))}else a||(t(this,K)&&((P=t(this,V))==null||P.call(this,f,e,"set")),t(this,R)&&((x=t(this,T))==null||x.push([f,e,"set"])));if(t(this,ht).call(this,b),t(this,gt).call(this,b,F,l),t(this,p)[b]=i,l){l.set="replace";const y=f&&c(this,w,S).call(this,f)?f.__staleWhileFetching:f;y!==void 0&&(l.oldValue=y)}}else l&&(l.set="update")}if(o!==0&&!t(this,G)&&c(this,_t,It).call(this),t(this,G)&&(m||t(this,yt).call(this,b,o,r),l&&t(this,Q).call(this,l,b)),!a&&t(this,R)&&t(this,T)){const f=t(this,T);let y;for(;y=f==null?void 0:f.shift();)(j=t(this,B))==null||j.call(this,...y)}return this}pop(){var e;try{for(;t(this,A);){const i=t(this,p)[t(this,z)];if(c(this,mt,At).call(this,!0),c(this,w,S).call(this,i)){if(i.__staleWhileFetching)return i.__staleWhileFetching}else if(i!==void 0)return i}}finally{if(t(this,R)&&t(this,T)){const i=t(this,T);let s;for(;s=i==null?void 0:i.shift();)(e=t(this,B))==null||e.call(this,...s)}}}has(e,i={}){const{updateAgeOnHas:s=this.updateAgeOnHas,status:o}=i,r=t(this,v).get(e);if(r!==void 0){const a=t(this,p)[r];if(c(this,w,S).call(this,a)&&a.__staleWhileFetching===void 0)return!1;if(t(this,H).call(this,r))o&&(o.has="stale",t(this,Q).call(this,o,r));else return s&&t(this,at).call(this,r),o&&(o.has="hit",t(this,Q).call(this,o,r)),!0}else o&&(o.has="miss");return!1}peek(e,i={}){const{allowStale:s=this.allowStale}=i,o=t(this,v).get(e);if(o===void 0||!s&&t(this,H).call(this,o))return;const r=t(this,p)[o];return c(this,w,S).call(this,r)?r.__staleWhileFetching:r}async fetch(e,i={}){const{allowStale:s=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:l=0,sizeCalculation:m=this.sizeCalculation,noUpdateTTL:F=this.noUpdateTTL,noDeleteOnFetchRejection:b=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:W=this.allowStaleOnFetchRejection,ignoreFetchAbort:_=this.ignoreFetchAbort,allowStaleOnFetchAbort:P=this.allowStaleOnFetchAbort,context:x,forceRefresh:j=!1,status:f,signal:y}=i;if(!t(this,nt))return f&&(f.fetch="get"),this.get(e,{allowStale:s,updateAgeOnGet:o,noDeleteOnStaleGet:r,status:f});const L={allowStale:s,updateAgeOnGet:o,noDeleteOnStaleGet:r,ttl:a,noDisposeOnSet:h,size:l,sizeCalculation:m,noUpdateTTL:F,noDeleteOnFetchRejection:b,allowStaleOnFetchRejection:W,allowStaleOnFetchAbort:P,ignoreFetchAbort:_,status:f,signal:y};let D=t(this,v).get(e);if(D===void 0){f&&(f.fetch="miss");const k=c(this,bt,Ft).call(this,e,D,L,x);return k.__returned=k}else{const k=t(this,p)[D];if(c(this,w,S).call(this,k)){const Bt=s&&k.__staleWhileFetching!==void 0;return f&&(f.fetch="inflight",Bt&&(f.returnedStale=!0)),Bt?k.__staleWhileFetching:k.__returned=k}const rt=t(this,H).call(this,D);if(!j&&!rt)return f&&(f.fetch="hit"),c(this,lt,wt).call(this,D),o&&t(this,at).call(this,D),f&&t(this,Q).call(this,f,D),k;const tt=c(this,bt,Ft).call(this,e,D,L,x),Vt=tt.__staleWhileFetching!==void 0&&s;return f&&(f.fetch=rt?"stale":"refresh",Vt&&rt&&(f.returnedStale=!0)),Vt?tt.__staleWhileFetching:tt.__returned=tt}}get(e,i={}){const{allowStale:s=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:a}=i,h=t(this,v).get(e);if(h!==void 0){const l=t(this,p)[h],m=c(this,w,S).call(this,l);return a&&t(this,Q).call(this,a,h),t(this,H).call(this,h)?(a&&(a.get="stale"),m?(a&&s&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),s?l.__staleWhileFetching:void 0):(r||this.delete(e),a&&s&&(a.returnedStale=!0),s?l:void 0)):(a&&(a.get="hit"),m?l.__staleWhileFetching:(c(this,lt,wt).call(this,h),o&&t(this,at).call(this,h),l))}else a&&(a.get="miss")}delete(e){var s,o,r,a;let i=!1;if(t(this,A)!==0){const h=t(this,v).get(e);if(h!==void 0)if(i=!0,t(this,A)===1)this.clear();else{t(this,ht).call(this,h);const l=t(this,p)[h];if(c(this,w,S).call(this,l)?l.__abortController.abort(new Error("deleted")):(t(this,K)||t(this,R))&&(t(this,K)&&((s=t(this,V))==null||s.call(this,l,e,"delete")),t(this,R)&&((o=t(this,T))==null||o.push([l,e,"delete"]))),t(this,v).delete(e),t(this,E)[h]=void 0,t(this,p)[h]=void 0,h===t(this,C))u(this,C,t(this,M)[h]);else if(h===t(this,z))u(this,z,t(this,N)[h]);else{const m=t(this,M)[h];t(this,N)[m]=t(this,N)[h];const F=t(this,N)[h];t(this,M)[F]=t(this,M)[h]}Ot(this,A)._--,t(this,q).push(h)}}if(t(this,R)&&((r=t(this,T))!=null&&r.length)){const h=t(this,T);let l;for(;l=h==null?void 0:h.shift();)(a=t(this,B))==null||a.call(this,...l)}return i}clear(){var e,i,s;for(const o of c(this,J,st).call(this,{allowStale:!0})){const r=t(this,p)[o];if(c(this,w,S).call(this,r))r.__abortController.abort(new Error("deleted"));else{const a=t(this,E)[o];t(this,K)&&((e=t(this,V))==null||e.call(this,r,a,"delete")),t(this,R)&&((i=t(this,T))==null||i.push([r,a,"delete"]))}}if(t(this,v).clear(),t(this,p).fill(void 0),t(this,E).fill(void 0),t(this,G)&&t(this,Y)&&(t(this,G).fill(0),t(this,Y).fill(0)),t(this,X)&&t(this,X).fill(0),u(this,z,0),u(this,C,0),t(this,q).length=0,u(this,$,0),u(this,A,0),t(this,R)&&t(this,T)){const o=t(this,T);let r;for(;r=o==null?void 0:o.shift();)(s=t(this,B))==null||s.call(this,...r)}}};Ne=Symbol.toStringTag,U=new WeakMap,I=new WeakMap,V=new WeakMap,B=new WeakMap,pt=new WeakMap,A=new WeakMap,$=new WeakMap,v=new WeakMap,E=new WeakMap,p=new WeakMap,N=new WeakMap,M=new WeakMap,z=new WeakMap,C=new WeakMap,q=new WeakMap,T=new WeakMap,X=new WeakMap,Y=new WeakMap,G=new WeakMap,K=new WeakMap,nt=new WeakMap,R=new WeakMap,_t=new WeakSet,It=function(){const e=new vt(t(this,U)),i=new vt(t(this,U));u(this,G,e),u(this,Y,i),u(this,yt,(r,a,h=ft.now())=>{if(i[r]=a!==0?h:0,e[r]=a,a!==0&&this.ttlAutopurge){const l=setTimeout(()=>{t(this,H).call(this,r)&&this.delete(t(this,E)[r])},a+1);l.unref&&l.unref()}}),u(this,at,r=>{i[r]=e[r]!==0?ft.now():0}),u(this,Q,(r,a)=>{if(e[a]){const h=e[a],l=i[a];if(!h||!l)return;r.ttl=h,r.start=l,r.now=s||o();const m=r.now-l;r.remainingTTL=h-m}});let s=0;const o=()=>{const r=ft.now();if(this.ttlResolution>0){s=r;const a=setTimeout(()=>s=0,this.ttlResolution);a.unref&&a.unref()}return r};this.getRemainingTTL=r=>{const a=t(this,v).get(r);if(a===void 0)return 0;const h=e[a],l=i[a];if(!h||!l)return 1/0;const m=(s||o())-l;return h-m},u(this,H,r=>{const a=i[r],h=e[r];return!!h&&!!a&&(s||o())-a>h})},at=new WeakMap,Q=new WeakMap,yt=new WeakMap,H=new WeakMap,Ct=new WeakSet,te=function(){const e=new vt(t(this,U));u(this,$,0),u(this,X,e),u(this,ht,i=>{u(this,$,t(this,$)-e[i]),e[i]=0}),u(this,St,(i,s,o,r)=>{if(c(this,w,S).call(this,s))return 0;if(!et(o))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(o=r(s,i),!et(o))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return o}),u(this,gt,(i,s,o)=>{if(e[i]=s,t(this,I)){const r=t(this,I)-e[i];for(;t(this,$)>r;)c(this,mt,At).call(this,!0)}u(this,$,t(this,$)+e[i]),o&&(o.entrySize=s,o.totalCalculatedSize=t(this,$))})},ht=new WeakMap,gt=new WeakMap,St=new WeakMap,Z=new WeakSet,it=function*({allowStale:e=this.allowStale}={}){if(t(this,A))for(let i=t(this,C);!(!c(this,Et,Mt).call(this,i)||((e||!t(this,H).call(this,i))&&(yield i),i===t(this,z)));)i=t(this,M)[i]},J=new WeakSet,st=function*({allowStale:e=this.allowStale}={}){if(t(this,A))for(let i=t(this,z);!(!c(this,Et,Mt).call(this,i)||((e||!t(this,H).call(this,i))&&(yield i),i===t(this,C)));)i=t(this,N)[i]},Et=new WeakSet,Mt=function(e){return e!==void 0&&t(this,v).get(t(this,E)[e])===e},mt=new WeakSet,At=function(e){var r,a;const i=t(this,z),s=t(this,E)[i],o=t(this,p)[i];return t(this,nt)&&c(this,w,S).call(this,o)?o.__abortController.abort(new Error("evicted")):(t(this,K)||t(this,R))&&(t(this,K)&&((r=t(this,V))==null||r.call(this,o,s,"evict")),t(this,R)&&((a=t(this,T))==null||a.push([o,s,"evict"]))),t(this,ht).call(this,i),e&&(t(this,E)[i]=void 0,t(this,p)[i]=void 0,t(this,q).push(i)),t(this,A)===1?(u(this,z,u(this,C,0)),t(this,q).length=0):u(this,z,t(this,N)[i]),t(this,v).delete(s),Ot(this,A)._--,i},bt=new WeakSet,Ft=function(e,i,s,o){const r=i===void 0?void 0:t(this,p)[i];if(c(this,w,S).call(this,r))return r;const a=new jt,{signal:h}=s;h==null||h.addEventListener("abort",()=>a.abort(h.reason),{signal:a.signal});const l={signal:a.signal,options:s,context:o},m=(x,j=!1)=>{const{aborted:f}=a.signal,y=s.ignoreFetchAbort&&x!==void 0;if(s.status&&(f&&!j?(s.status.fetchAborted=!0,s.status.fetchError=a.signal.reason,y&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),f&&!y&&!j)return b(a.signal.reason);const L=_;return t(this,p)[i]===_&&(x===void 0?L.__staleWhileFetching?t(this,p)[i]=L.__staleWhileFetching:this.delete(e):(s.status&&(s.status.fetchUpdated=!0),this.set(e,x,l.options))),x},F=x=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=x),b(x)),b=x=>{const{aborted:j}=a.signal,f=j&&s.allowStaleOnFetchAbort,y=f||s.allowStaleOnFetchRejection,L=y||s.noDeleteOnFetchRejection,D=_;if(t(this,p)[i]===_&&(!L||D.__staleWhileFetching===void 0?this.delete(e):f||(t(this,p)[i]=D.__staleWhileFetching)),y)return s.status&&D.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),D.__staleWhileFetching;if(D.__returned===D)throw x},W=(x,j)=>{var y;const f=(y=t(this,pt))==null?void 0:y.call(this,e,r,l);f&&f instanceof Promise&&f.then(L=>x(L===void 0?void 0:L),j),a.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(x(void 0),s.allowStaleOnFetchAbort&&(x=L=>m(L,!0)))})};s.status&&(s.status.fetchDispatched=!0);const _=new Promise(W).then(m,F),P=Object.assign(_,{__abortController:a,__staleWhileFetching:r,__returned:void 0});return i===void 0?(this.set(e,P,{...l.options,status:void 0}),i=t(this,v).get(e)):t(this,p)[i]=P,P},w=new WeakSet,S=function(e){if(!t(this,nt))return!1;const i=e;return!!i&&i instanceof Promise&&i.hasOwnProperty("__staleWhileFetching")&&i.__abortController instanceof jt},xt=new WeakSet,Gt=function(e,i){t(this,M)[i]=e,t(this,N)[e]=i},lt=new WeakSet,wt=function(e){e!==t(this,C)&&(e===t(this,z)?u(this,z,t(this,N)[e]):c(this,xt,Gt).call(this,t(this,M)[e],t(this,N)[e]),c(this,xt,Gt).call(this,t(this,C),e),u(this,C,e))};let Lt=Ut;var Dt={};Object.defineProperty(Dt,"__esModule",{value:!0});Dt.getMDXComponent=Ae;Dt.getMDXExport=ie;var xe=kt(ct),Oe=kt(d),ve=kt(le);function ee(n){if(typeof WeakMap!="function")return null;var e=new WeakMap,i=new WeakMap;return(ee=function(s){return s?i:e})(n)}function kt(n,e){if(!e&&n&&n.__esModule)return n;if(n===null||typeof n!="object"&&typeof n!="function")return{default:n};var i=ee(e);if(i&&i.has(n))return i.get(n);var s={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in n)if(r!=="default"&&{}.hasOwnProperty.call(n,r)){var a=o?Object.getOwnPropertyDescriptor(n,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=n[r]}return s.default=n,i&&i.set(n,s),s}function Ae(n,e){return ie(n,e).default}function ie(n,e){const i={React:xe,ReactDOM:ve,_jsx_runtime:Oe,...e};return new Function(...Object.keys(i),n)(...Object.values(i))}var Fe=Dt;const Pt=n=>n.replace(/\\/g,"/");function se(n,e,i){const[,s]=n.replace(/\\|\//g,e).split(`${i==="playground"?"example":"exercises"}${e}`);return s}const Ht="border-border bg-[var(--shiki-background)] hover:bg-foreground/20 active:bg-foreground/30 box-content block rounded border-2 px-2 py-0.5 font-mono text-xs font-semibold outline-none transition duration-300 ease-in-out";function je({"data-buttons":n,"data-filename":e,"data-fullpath":i,"data-sep":s="/","data-start":o,"data-type":r}){var W;const a=ce();if(r==="other"||!n||!e||!i)return null;const h=Pt(((W=a[a.type])==null?void 0:W.fullPath)??""),l=!i.startsWith(h),m=ENV.EPICSHOP_DEPLOYED?["problem","solution"]:["problem","solution","playground"],F=n.split(","),b=m.filter(_=>F.includes(_));return d.jsx(d.Fragment,{children:b.map(_=>{var f;const P=a[_];if(_==="playground"){const y=a.playground&&a.playground.appName!==((f=a.problem)==null?void 0:f.name);if(!P||y||l)return d.jsxs("button",{className:Tt(Ht,"cursor-not-allowed"),title:y?"Playground is not set to the right app":l?"This file is from different app":"You must 'Set to Playground' before opening a file",children:[d.jsx("span",{className:"uppercase",children:"Open"})," in ",_]},_)}if(!P||!P.fullPath)return null;const x=[Pt(P.fullPath),Pt(e)].join(s),j=se(x,s,_);return d.jsx(Kt,{file:x,line:Number(o??1),children:d.jsxs("span",{title:j,className:Ht,children:[d.jsx("span",{className:"uppercase",children:"Open"})," in ",_]})},_)})})}function Ce(){const[n,e]=ct.useState(!1);return ct.useEffect(()=>{if(n){const i=setTimeout(()=>e(!1),1500);return()=>clearTimeout(i)}},[n]),d.jsx("button",{className:fe(Ht,"w-12 uppercase"),onClick:i=>{var r,a,h;e(!0);const o=((h=(a=(r=i.currentTarget.parentElement)==null?void 0:r.parentElement)==null?void 0:a.querySelector("pre"))==null?void 0:h.textContent)||"";navigator.clipboard.writeText(o)},children:n?"copied":"copy"})}function Te({children:n,...e}){const{"data-buttons":i,"data-filename":s,"data-fullpath":o,"data-nocopy":r,"data-sep":a}=e,h=r===void 0;function l(){if(o&&a)return!s||s.includes("..")?{"data-filename":se(o,a)}:{"data-filename":s.replace(/\//g,a)}}return d.jsxs("div",{className:"group relative",children:[d.jsxs("div",{className:"absolute right-0 top-0 z-50 m-2 flex items-baseline justify-end gap-4 opacity-0 transition duration-300 ease-in-out focus-within:opacity-100 group-hover:opacity-100",children:[i?d.jsx(je,{...e}):null,h?d.jsx(Ce,{}):null]}),d.jsx("pre",{...e,className:Tt("scrollbar-thin scrollbar-thumb-scrollbar",e.className??""),...l(),children:n})]})}const De={h1:n=>d.jsx(ut,{...n,as:"h1"}),h2:n=>d.jsx(ut,{...n,as:"h2"}),h3:n=>d.jsx(ut,{...n,as:"h3"}),h4:n=>d.jsx(ut,{...n,as:"h4"}),h5:n=>d.jsx(ut,{...n,as:"h5"}),h6:n=>d.jsx(ut,{...n,as:"h6"}),a:de,p:n=>d.jsx("div",{...n}),pre:n=>d.jsx("pre",{...n,className:Tt("scrollbar-thin scrollbar-thumb-scrollbar",n.className??"")}),LaunchEditor:Kt,VideoEmbed:pe,EpicVideo:ge};function ze(n){const e=Fe.getMDXComponent(n);function i({components:s,...o}){const r=ct.useMemo(()=>({...De,...s}),[s]);return d.jsx(e,{components:r,...o})}return i}const Nt=new Lt({max:1e3});function Pe(n){return ct.useMemo(()=>{if(Nt.has(n))return Nt.get(n);const e=ze(n);return Nt.set(n,e),e},[n])}function qe({code:n,components:e}){const i=Pe(n),s=ct.useMemo(()=>({Icon:ue,pre:Te,Link:Xt,...e}),[e]);return d.jsx(i,{components:s})}export{Ve as E,Kt as L,qe as M};
|
|
2
|
-
//# sourceMappingURL=mdx-
|
|
1
|
+
var re=Object.defineProperty;var oe=(n,e,i)=>e in n?re(n,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[e]=i;var O=(n,e,i)=>(oe(n,typeof e!="symbol"?e+"":e,i),i),zt=(n,e,i)=>{if(!e.has(n))throw TypeError("Cannot "+i)};var t=(n,e,i)=>(zt(n,e,"read from private field"),i?i.call(n):e.get(n)),g=(n,e,i)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,i)},u=(n,e,i,s)=>(zt(n,e,"write to private field"),s?s.call(n,i):e.set(n,i),i);var Ot=(n,e,i,s)=>({set _(o){u(n,e,o,i)},get _(){return t(n,e,s)}}),c=(n,e,i)=>(zt(n,e,"access private method"),i);import{j as d,r as ct}from"./index-D1WEsmVZ.js";import{c as Tt}from"./clsx-B-dksMZM.js";import{b as ae,L as Xt,a as he,r as le,u as ce}from"./components-Dj3sm47B.js";import{I as ue,c as fe,H as ut,A as de}from"./misc-CXGQ7VS9.js";import{V as pe,D as ge}from"./epic-video-Df7qGSN7.js";import{s as me}from"./progress-bar-DX6yYES2.js";import{S as be}from"./tooltip-CVFWPOu0.js";import{a as we}from"./client-hints-KnbHFIgn.js";function _e(){const n=ae("root");if(!n)throw new Error("useApps requires a data object from the root loader");return n.apps}function Yt(n){const e=he();return ct.useEffect(()=>{e.state==="idle"&&e.data!=null&&(n==null||n("fetcher-done"))},[e,n]),e}function ye({file:n,appFile:e,appName:i,syncTo:s,line:o,column:r,children:a,onUpdate:h}){var W;const l=Yt(h),m=typeof e=="string"?[e]:e,F=n?"file":e?"appFile":"",b=s!=null&&s.file?"file":s!=null&&s.appFile?"appFile":"";return d.jsxs(l.Form,{action:"/launch-editor",method:"POST",className:"flex items-center",children:[me,d.jsx("input",{type:"hidden",name:"line",value:o}),d.jsx("input",{type:"hidden",name:"column",value:r}),d.jsx("input",{type:"hidden",name:"type",value:F}),d.jsx("input",{type:"hidden",name:"file",value:n}),d.jsx("input",{type:"hidden",name:"appName",value:i}),m==null?void 0:m.map(_=>d.jsx("input",{type:"hidden",name:"appFile",value:_},_)),s?d.jsxs(d.Fragment,{children:[d.jsx("input",{type:"hidden",name:"syncTo.type",value:b}),d.jsx("input",{type:"hidden",name:"syncTo.file",value:s.file}),d.jsx("input",{type:"hidden",name:"syncTo.appName",value:s.appName}),d.jsx("input",{type:"hidden",name:"syncTo.appFile",value:s.appFile})]}):null,d.jsx("button",{type:"submit",className:Tt("launch_button",l.state==="idle"?null:"cursor-progress",((W=l.data)==null?void 0:W.status)==="error"?"cursor-not-allowed":null),children:a})]})}function Se({file:n,appFile:e,appName:i,line:s,children:o}){const r=_e(),a=we();if(Array.isArray(e))return d.jsx("div",{children:"Cannot open more than one file"});if(n){const m=F=>F.replace(/\\/g,"/");return d.jsx("a",{className:"launch_button !no-underline",href:m(n).replace(m(ENV.EPICSHOP_CONTEXT_CWD),ENV.EPICSHOP_GITHUB_ROOT)+(s?`#L${s}`:""),rel:"noreferrer",target:"_blank",children:o})}const h=r.find(m=>m.name===i),l=[...(h==null?void 0:h.relativePath.split(a.separator))??[],e+(s?`#L${s}`:"")].join("/");return d.jsx("a",{className:"launch_button !no-underline",href:`${ENV.EPICSHOP_GITHUB_ROOT}/${l}`,rel:"noreferrer",target:"_blank",children:o})}function Ve({appFile:n="README.mdx",appName:e,file:i,relativePath:s}){const o=Yt(),r=h=>{if(!h.altKey||ENV.EPICSHOP_DEPLOYED)return;h.preventDefault();const l=new FormData,m=i?"file":"appFile";l.append(m,i??n),l.append("type",m),e&&l.append("appName",e),o.submit(l,{method:"POST",action:"/launch-editor"})},a=ENV.EPICSHOP_GITHUB_ROOT.replace(/\/tree\/|\/blob\//,"/edit/");return d.jsxs(Xt,{className:"self-center font-mono text-sm",onClick:r,target:"_blank",to:`${a}/${s}/${n}`.replace(/\\/g,"/"),children:[d.jsx("span",{className:"block md:hidden",children:"Edit on GitHub"}),d.jsx("span",{className:"hidden md:block",children:"Edit this page on GitHub"})]})}const Kt=ENV.EPICSHOP_DEPLOYED?ENV.EPICSHOP_GITHUB_ROOT?Se:({children:n})=>d.jsx(be,{content:"Cannot open files in deployed app",children:d.jsx("button",{className:"launch_button cursor-not-allowed",children:n})}):ye,ft=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Zt=new Set,Rt=typeof process=="object"&&process?process:{},Jt=(n,e,i,s)=>{typeof Rt.emitWarning=="function"?Rt.emitWarning(n,e,i,s):console.error(`[${i}] ${e}: ${n}`)};let jt=globalThis.AbortController,$t=globalThis.AbortSignal;var qt;if(typeof jt>"u"){$t=class{constructor(){O(this,"onabort");O(this,"_onabort",[]);O(this,"reason");O(this,"aborted",!1)}addEventListener(s,o){this._onabort.push(o)}},jt=class{constructor(){O(this,"signal",new $t);e()}abort(s){var o,r;if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=!0;for(const a of this.signal._onabort)a(s);(r=(o=this.signal).onabort)==null||r.call(o,s)}}};let n=((qt=Rt.env)==null?void 0:qt.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{n&&(n=!1,Jt("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const Ee=n=>!Zt.has(n),et=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),Qt=n=>et(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?vt:null:null;class vt extends Array{constructor(e){super(e),this.fill(0)}}var dt;const ot=class ot{constructor(e,i){O(this,"heap");O(this,"length");if(!t(ot,dt))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new i(e),this.length=0}static create(e){const i=Qt(e);if(!i)return[];u(ot,dt,!0);const s=new ot(e,i);return u(ot,dt,!1),s}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};dt=new WeakMap,g(ot,dt,!1);let Wt=ot;var U,I,V,B,pt,A,$,v,E,p,N,M,z,C,q,T,X,Y,G,K,nt,R,_t,It,at,Q,yt,H,Ct,te,ht,gt,St,Z,it,J,st,Et,Mt,Ne,mt,At,bt,Ft,w,S,xt,Gt,lt,wt;const Ut=class Ut{constructor(e){g(this,_t);g(this,Ct);g(this,Z);g(this,J);g(this,Et);g(this,mt);g(this,bt);g(this,w);g(this,xt);g(this,lt);g(this,U,void 0);g(this,I,void 0);g(this,V,void 0);g(this,B,void 0);g(this,pt,void 0);O(this,"ttl");O(this,"ttlResolution");O(this,"ttlAutopurge");O(this,"updateAgeOnGet");O(this,"updateAgeOnHas");O(this,"allowStale");O(this,"noDisposeOnSet");O(this,"noUpdateTTL");O(this,"maxEntrySize");O(this,"sizeCalculation");O(this,"noDeleteOnFetchRejection");O(this,"noDeleteOnStaleGet");O(this,"allowStaleOnFetchAbort");O(this,"allowStaleOnFetchRejection");O(this,"ignoreFetchAbort");g(this,A,void 0);g(this,$,void 0);g(this,v,void 0);g(this,E,void 0);g(this,p,void 0);g(this,N,void 0);g(this,M,void 0);g(this,z,void 0);g(this,C,void 0);g(this,q,void 0);g(this,T,void 0);g(this,X,void 0);g(this,Y,void 0);g(this,G,void 0);g(this,K,void 0);g(this,nt,void 0);g(this,R,void 0);g(this,at,()=>{});g(this,Q,()=>{});g(this,yt,()=>{});g(this,H,()=>!1);g(this,ht,e=>{});g(this,gt,(e,i,s)=>{});g(this,St,(e,i,s,o)=>{if(s||o)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});O(this,Ne,"LRUCache");const{max:i=0,ttl:s,ttlResolution:o=1,ttlAutopurge:r,updateAgeOnGet:a,updateAgeOnHas:h,allowStale:l,dispose:m,disposeAfter:F,noDisposeOnSet:b,noUpdateTTL:W,maxSize:_=0,maxEntrySize:P=0,sizeCalculation:x,fetchMethod:j,noDeleteOnFetchRejection:f,noDeleteOnStaleGet:y,allowStaleOnFetchRejection:L,allowStaleOnFetchAbort:D,ignoreFetchAbort:k}=e;if(i!==0&&!et(i))throw new TypeError("max option must be a nonnegative integer");const rt=i?Qt(i):Array;if(!rt)throw new Error("invalid max value: "+i);if(u(this,U,i),u(this,I,_),this.maxEntrySize=P||t(this,I),this.sizeCalculation=x,this.sizeCalculation){if(!t(this,I)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(j!==void 0&&typeof j!="function")throw new TypeError("fetchMethod must be a function if specified");if(u(this,pt,j),u(this,nt,!!j),u(this,v,new Map),u(this,E,new Array(i).fill(void 0)),u(this,p,new Array(i).fill(void 0)),u(this,N,new rt(i)),u(this,M,new rt(i)),u(this,z,0),u(this,C,0),u(this,q,Wt.create(i)),u(this,A,0),u(this,$,0),typeof m=="function"&&u(this,V,m),typeof F=="function"?(u(this,B,F),u(this,T,[])):(u(this,B,void 0),u(this,T,void 0)),u(this,K,!!t(this,V)),u(this,R,!!t(this,B)),this.noDisposeOnSet=!!b,this.noUpdateTTL=!!W,this.noDeleteOnFetchRejection=!!f,this.allowStaleOnFetchRejection=!!L,this.allowStaleOnFetchAbort=!!D,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(t(this,I)!==0&&!et(t(this,I)))throw new TypeError("maxSize must be a positive integer if specified");if(!et(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");c(this,Ct,te).call(this)}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!y,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!h,this.ttlResolution=et(o)||o===0?o:1,this.ttlAutopurge=!!r,this.ttl=s||0,this.ttl){if(!et(this.ttl))throw new TypeError("ttl must be a positive integer if specified");c(this,_t,It).call(this)}if(t(this,U)===0&&this.ttl===0&&t(this,I)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!t(this,U)&&!t(this,I)){const tt="LRU_CACHE_UNBOUNDED";Ee(tt)&&(Zt.add(tt),Jt("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",tt,Ut))}}static unsafeExposeInternals(e){return{starts:t(e,Y),ttls:t(e,G),sizes:t(e,X),keyMap:t(e,v),keyList:t(e,E),valList:t(e,p),next:t(e,N),prev:t(e,M),get head(){return t(e,z)},get tail(){return t(e,C)},free:t(e,q),isBackgroundFetch:i=>{var s;return c(s=e,w,S).call(s,i)},backgroundFetch:(i,s,o,r)=>{var a;return c(a=e,bt,Ft).call(a,i,s,o,r)},moveToTail:i=>{var s;return c(s=e,lt,wt).call(s,i)},indexes:i=>{var s;return c(s=e,Z,it).call(s,i)},rindexes:i=>{var s;return c(s=e,J,st).call(s,i)},isStale:i=>{var s;return t(s=e,H).call(s,i)}}}get max(){return t(this,U)}get maxSize(){return t(this,I)}get calculatedSize(){return t(this,$)}get size(){return t(this,A)}get fetchMethod(){return t(this,pt)}get dispose(){return t(this,V)}get disposeAfter(){return t(this,B)}getRemainingTTL(e){return t(this,v).has(e)?1/0:0}*entries(){for(const e of c(this,Z,it).call(this))t(this,p)[e]!==void 0&&t(this,E)[e]!==void 0&&!c(this,w,S).call(this,t(this,p)[e])&&(yield[t(this,E)[e],t(this,p)[e]])}*rentries(){for(const e of c(this,J,st).call(this))t(this,p)[e]!==void 0&&t(this,E)[e]!==void 0&&!c(this,w,S).call(this,t(this,p)[e])&&(yield[t(this,E)[e],t(this,p)[e]])}*keys(){for(const e of c(this,Z,it).call(this)){const i=t(this,E)[e];i!==void 0&&!c(this,w,S).call(this,t(this,p)[e])&&(yield i)}}*rkeys(){for(const e of c(this,J,st).call(this)){const i=t(this,E)[e];i!==void 0&&!c(this,w,S).call(this,t(this,p)[e])&&(yield i)}}*values(){for(const e of c(this,Z,it).call(this))t(this,p)[e]!==void 0&&!c(this,w,S).call(this,t(this,p)[e])&&(yield t(this,p)[e])}*rvalues(){for(const e of c(this,J,st).call(this))t(this,p)[e]!==void 0&&!c(this,w,S).call(this,t(this,p)[e])&&(yield t(this,p)[e])}[Symbol.iterator](){return this.entries()}find(e,i={}){for(const s of c(this,Z,it).call(this)){const o=t(this,p)[s],r=c(this,w,S).call(this,o)?o.__staleWhileFetching:o;if(r!==void 0&&e(r,t(this,E)[s],this))return this.get(t(this,E)[s],i)}}forEach(e,i=this){for(const s of c(this,Z,it).call(this)){const o=t(this,p)[s],r=c(this,w,S).call(this,o)?o.__staleWhileFetching:o;r!==void 0&&e.call(i,r,t(this,E)[s],this)}}rforEach(e,i=this){for(const s of c(this,J,st).call(this)){const o=t(this,p)[s],r=c(this,w,S).call(this,o)?o.__staleWhileFetching:o;r!==void 0&&e.call(i,r,t(this,E)[s],this)}}purgeStale(){let e=!1;for(const i of c(this,J,st).call(this,{allowStale:!0}))t(this,H).call(this,i)&&(this.delete(t(this,E)[i]),e=!0);return e}info(e){const i=t(this,v).get(e);if(i===void 0)return;const s=t(this,p)[i],o=c(this,w,S).call(this,s)?s.__staleWhileFetching:s;if(o===void 0)return;const r={value:o};if(t(this,G)&&t(this,Y)){const a=t(this,G)[i],h=t(this,Y)[i];if(a&&h){const l=a-(ft.now()-h);r.ttl=l,r.start=Date.now()}}return t(this,X)&&(r.size=t(this,X)[i]),r}dump(){const e=[];for(const i of c(this,Z,it).call(this,{allowStale:!0})){const s=t(this,E)[i],o=t(this,p)[i],r=c(this,w,S).call(this,o)?o.__staleWhileFetching:o;if(r===void 0||s===void 0)continue;const a={value:r};if(t(this,G)&&t(this,Y)){a.ttl=t(this,G)[i];const h=ft.now()-t(this,Y)[i];a.start=Math.floor(Date.now()-h)}t(this,X)&&(a.size=t(this,X)[i]),e.unshift([s,a])}return e}load(e){this.clear();for(const[i,s]of e){if(s.start){const o=Date.now()-s.start;s.start=ft.now()-o}this.set(i,s.value,s)}}set(e,i,s={}){var W,_,P,x,j;if(i===void 0)return this.delete(e),this;const{ttl:o=this.ttl,start:r,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:h=this.sizeCalculation,status:l}=s;let{noUpdateTTL:m=this.noUpdateTTL}=s;const F=t(this,St).call(this,e,i,s.size||0,h);if(this.maxEntrySize&&F>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(e),this;let b=t(this,A)===0?void 0:t(this,v).get(e);if(b===void 0)b=t(this,A)===0?t(this,C):t(this,q).length!==0?t(this,q).pop():t(this,A)===t(this,U)?c(this,mt,At).call(this,!1):t(this,A),t(this,E)[b]=e,t(this,p)[b]=i,t(this,v).set(e,b),t(this,N)[t(this,C)]=b,t(this,M)[b]=t(this,C),u(this,C,b),Ot(this,A)._++,t(this,gt).call(this,b,F,l),l&&(l.set="add"),m=!1;else{c(this,lt,wt).call(this,b);const f=t(this,p)[b];if(i!==f){if(t(this,nt)&&c(this,w,S).call(this,f)){f.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:y}=f;y!==void 0&&!a&&(t(this,K)&&((W=t(this,V))==null||W.call(this,y,e,"set")),t(this,R)&&((_=t(this,T))==null||_.push([y,e,"set"])))}else a||(t(this,K)&&((P=t(this,V))==null||P.call(this,f,e,"set")),t(this,R)&&((x=t(this,T))==null||x.push([f,e,"set"])));if(t(this,ht).call(this,b),t(this,gt).call(this,b,F,l),t(this,p)[b]=i,l){l.set="replace";const y=f&&c(this,w,S).call(this,f)?f.__staleWhileFetching:f;y!==void 0&&(l.oldValue=y)}}else l&&(l.set="update")}if(o!==0&&!t(this,G)&&c(this,_t,It).call(this),t(this,G)&&(m||t(this,yt).call(this,b,o,r),l&&t(this,Q).call(this,l,b)),!a&&t(this,R)&&t(this,T)){const f=t(this,T);let y;for(;y=f==null?void 0:f.shift();)(j=t(this,B))==null||j.call(this,...y)}return this}pop(){var e;try{for(;t(this,A);){const i=t(this,p)[t(this,z)];if(c(this,mt,At).call(this,!0),c(this,w,S).call(this,i)){if(i.__staleWhileFetching)return i.__staleWhileFetching}else if(i!==void 0)return i}}finally{if(t(this,R)&&t(this,T)){const i=t(this,T);let s;for(;s=i==null?void 0:i.shift();)(e=t(this,B))==null||e.call(this,...s)}}}has(e,i={}){const{updateAgeOnHas:s=this.updateAgeOnHas,status:o}=i,r=t(this,v).get(e);if(r!==void 0){const a=t(this,p)[r];if(c(this,w,S).call(this,a)&&a.__staleWhileFetching===void 0)return!1;if(t(this,H).call(this,r))o&&(o.has="stale",t(this,Q).call(this,o,r));else return s&&t(this,at).call(this,r),o&&(o.has="hit",t(this,Q).call(this,o,r)),!0}else o&&(o.has="miss");return!1}peek(e,i={}){const{allowStale:s=this.allowStale}=i,o=t(this,v).get(e);if(o===void 0||!s&&t(this,H).call(this,o))return;const r=t(this,p)[o];return c(this,w,S).call(this,r)?r.__staleWhileFetching:r}async fetch(e,i={}){const{allowStale:s=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:h=this.noDisposeOnSet,size:l=0,sizeCalculation:m=this.sizeCalculation,noUpdateTTL:F=this.noUpdateTTL,noDeleteOnFetchRejection:b=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:W=this.allowStaleOnFetchRejection,ignoreFetchAbort:_=this.ignoreFetchAbort,allowStaleOnFetchAbort:P=this.allowStaleOnFetchAbort,context:x,forceRefresh:j=!1,status:f,signal:y}=i;if(!t(this,nt))return f&&(f.fetch="get"),this.get(e,{allowStale:s,updateAgeOnGet:o,noDeleteOnStaleGet:r,status:f});const L={allowStale:s,updateAgeOnGet:o,noDeleteOnStaleGet:r,ttl:a,noDisposeOnSet:h,size:l,sizeCalculation:m,noUpdateTTL:F,noDeleteOnFetchRejection:b,allowStaleOnFetchRejection:W,allowStaleOnFetchAbort:P,ignoreFetchAbort:_,status:f,signal:y};let D=t(this,v).get(e);if(D===void 0){f&&(f.fetch="miss");const k=c(this,bt,Ft).call(this,e,D,L,x);return k.__returned=k}else{const k=t(this,p)[D];if(c(this,w,S).call(this,k)){const Bt=s&&k.__staleWhileFetching!==void 0;return f&&(f.fetch="inflight",Bt&&(f.returnedStale=!0)),Bt?k.__staleWhileFetching:k.__returned=k}const rt=t(this,H).call(this,D);if(!j&&!rt)return f&&(f.fetch="hit"),c(this,lt,wt).call(this,D),o&&t(this,at).call(this,D),f&&t(this,Q).call(this,f,D),k;const tt=c(this,bt,Ft).call(this,e,D,L,x),Vt=tt.__staleWhileFetching!==void 0&&s;return f&&(f.fetch=rt?"stale":"refresh",Vt&&rt&&(f.returnedStale=!0)),Vt?tt.__staleWhileFetching:tt.__returned=tt}}get(e,i={}){const{allowStale:s=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:a}=i,h=t(this,v).get(e);if(h!==void 0){const l=t(this,p)[h],m=c(this,w,S).call(this,l);return a&&t(this,Q).call(this,a,h),t(this,H).call(this,h)?(a&&(a.get="stale"),m?(a&&s&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),s?l.__staleWhileFetching:void 0):(r||this.delete(e),a&&s&&(a.returnedStale=!0),s?l:void 0)):(a&&(a.get="hit"),m?l.__staleWhileFetching:(c(this,lt,wt).call(this,h),o&&t(this,at).call(this,h),l))}else a&&(a.get="miss")}delete(e){var s,o,r,a;let i=!1;if(t(this,A)!==0){const h=t(this,v).get(e);if(h!==void 0)if(i=!0,t(this,A)===1)this.clear();else{t(this,ht).call(this,h);const l=t(this,p)[h];if(c(this,w,S).call(this,l)?l.__abortController.abort(new Error("deleted")):(t(this,K)||t(this,R))&&(t(this,K)&&((s=t(this,V))==null||s.call(this,l,e,"delete")),t(this,R)&&((o=t(this,T))==null||o.push([l,e,"delete"]))),t(this,v).delete(e),t(this,E)[h]=void 0,t(this,p)[h]=void 0,h===t(this,C))u(this,C,t(this,M)[h]);else if(h===t(this,z))u(this,z,t(this,N)[h]);else{const m=t(this,M)[h];t(this,N)[m]=t(this,N)[h];const F=t(this,N)[h];t(this,M)[F]=t(this,M)[h]}Ot(this,A)._--,t(this,q).push(h)}}if(t(this,R)&&((r=t(this,T))!=null&&r.length)){const h=t(this,T);let l;for(;l=h==null?void 0:h.shift();)(a=t(this,B))==null||a.call(this,...l)}return i}clear(){var e,i,s;for(const o of c(this,J,st).call(this,{allowStale:!0})){const r=t(this,p)[o];if(c(this,w,S).call(this,r))r.__abortController.abort(new Error("deleted"));else{const a=t(this,E)[o];t(this,K)&&((e=t(this,V))==null||e.call(this,r,a,"delete")),t(this,R)&&((i=t(this,T))==null||i.push([r,a,"delete"]))}}if(t(this,v).clear(),t(this,p).fill(void 0),t(this,E).fill(void 0),t(this,G)&&t(this,Y)&&(t(this,G).fill(0),t(this,Y).fill(0)),t(this,X)&&t(this,X).fill(0),u(this,z,0),u(this,C,0),t(this,q).length=0,u(this,$,0),u(this,A,0),t(this,R)&&t(this,T)){const o=t(this,T);let r;for(;r=o==null?void 0:o.shift();)(s=t(this,B))==null||s.call(this,...r)}}};Ne=Symbol.toStringTag,U=new WeakMap,I=new WeakMap,V=new WeakMap,B=new WeakMap,pt=new WeakMap,A=new WeakMap,$=new WeakMap,v=new WeakMap,E=new WeakMap,p=new WeakMap,N=new WeakMap,M=new WeakMap,z=new WeakMap,C=new WeakMap,q=new WeakMap,T=new WeakMap,X=new WeakMap,Y=new WeakMap,G=new WeakMap,K=new WeakMap,nt=new WeakMap,R=new WeakMap,_t=new WeakSet,It=function(){const e=new vt(t(this,U)),i=new vt(t(this,U));u(this,G,e),u(this,Y,i),u(this,yt,(r,a,h=ft.now())=>{if(i[r]=a!==0?h:0,e[r]=a,a!==0&&this.ttlAutopurge){const l=setTimeout(()=>{t(this,H).call(this,r)&&this.delete(t(this,E)[r])},a+1);l.unref&&l.unref()}}),u(this,at,r=>{i[r]=e[r]!==0?ft.now():0}),u(this,Q,(r,a)=>{if(e[a]){const h=e[a],l=i[a];if(!h||!l)return;r.ttl=h,r.start=l,r.now=s||o();const m=r.now-l;r.remainingTTL=h-m}});let s=0;const o=()=>{const r=ft.now();if(this.ttlResolution>0){s=r;const a=setTimeout(()=>s=0,this.ttlResolution);a.unref&&a.unref()}return r};this.getRemainingTTL=r=>{const a=t(this,v).get(r);if(a===void 0)return 0;const h=e[a],l=i[a];if(!h||!l)return 1/0;const m=(s||o())-l;return h-m},u(this,H,r=>{const a=i[r],h=e[r];return!!h&&!!a&&(s||o())-a>h})},at=new WeakMap,Q=new WeakMap,yt=new WeakMap,H=new WeakMap,Ct=new WeakSet,te=function(){const e=new vt(t(this,U));u(this,$,0),u(this,X,e),u(this,ht,i=>{u(this,$,t(this,$)-e[i]),e[i]=0}),u(this,St,(i,s,o,r)=>{if(c(this,w,S).call(this,s))return 0;if(!et(o))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(o=r(s,i),!et(o))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return o}),u(this,gt,(i,s,o)=>{if(e[i]=s,t(this,I)){const r=t(this,I)-e[i];for(;t(this,$)>r;)c(this,mt,At).call(this,!0)}u(this,$,t(this,$)+e[i]),o&&(o.entrySize=s,o.totalCalculatedSize=t(this,$))})},ht=new WeakMap,gt=new WeakMap,St=new WeakMap,Z=new WeakSet,it=function*({allowStale:e=this.allowStale}={}){if(t(this,A))for(let i=t(this,C);!(!c(this,Et,Mt).call(this,i)||((e||!t(this,H).call(this,i))&&(yield i),i===t(this,z)));)i=t(this,M)[i]},J=new WeakSet,st=function*({allowStale:e=this.allowStale}={}){if(t(this,A))for(let i=t(this,z);!(!c(this,Et,Mt).call(this,i)||((e||!t(this,H).call(this,i))&&(yield i),i===t(this,C)));)i=t(this,N)[i]},Et=new WeakSet,Mt=function(e){return e!==void 0&&t(this,v).get(t(this,E)[e])===e},mt=new WeakSet,At=function(e){var r,a;const i=t(this,z),s=t(this,E)[i],o=t(this,p)[i];return t(this,nt)&&c(this,w,S).call(this,o)?o.__abortController.abort(new Error("evicted")):(t(this,K)||t(this,R))&&(t(this,K)&&((r=t(this,V))==null||r.call(this,o,s,"evict")),t(this,R)&&((a=t(this,T))==null||a.push([o,s,"evict"]))),t(this,ht).call(this,i),e&&(t(this,E)[i]=void 0,t(this,p)[i]=void 0,t(this,q).push(i)),t(this,A)===1?(u(this,z,u(this,C,0)),t(this,q).length=0):u(this,z,t(this,N)[i]),t(this,v).delete(s),Ot(this,A)._--,i},bt=new WeakSet,Ft=function(e,i,s,o){const r=i===void 0?void 0:t(this,p)[i];if(c(this,w,S).call(this,r))return r;const a=new jt,{signal:h}=s;h==null||h.addEventListener("abort",()=>a.abort(h.reason),{signal:a.signal});const l={signal:a.signal,options:s,context:o},m=(x,j=!1)=>{const{aborted:f}=a.signal,y=s.ignoreFetchAbort&&x!==void 0;if(s.status&&(f&&!j?(s.status.fetchAborted=!0,s.status.fetchError=a.signal.reason,y&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),f&&!y&&!j)return b(a.signal.reason);const L=_;return t(this,p)[i]===_&&(x===void 0?L.__staleWhileFetching?t(this,p)[i]=L.__staleWhileFetching:this.delete(e):(s.status&&(s.status.fetchUpdated=!0),this.set(e,x,l.options))),x},F=x=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=x),b(x)),b=x=>{const{aborted:j}=a.signal,f=j&&s.allowStaleOnFetchAbort,y=f||s.allowStaleOnFetchRejection,L=y||s.noDeleteOnFetchRejection,D=_;if(t(this,p)[i]===_&&(!L||D.__staleWhileFetching===void 0?this.delete(e):f||(t(this,p)[i]=D.__staleWhileFetching)),y)return s.status&&D.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),D.__staleWhileFetching;if(D.__returned===D)throw x},W=(x,j)=>{var y;const f=(y=t(this,pt))==null?void 0:y.call(this,e,r,l);f&&f instanceof Promise&&f.then(L=>x(L===void 0?void 0:L),j),a.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(x(void 0),s.allowStaleOnFetchAbort&&(x=L=>m(L,!0)))})};s.status&&(s.status.fetchDispatched=!0);const _=new Promise(W).then(m,F),P=Object.assign(_,{__abortController:a,__staleWhileFetching:r,__returned:void 0});return i===void 0?(this.set(e,P,{...l.options,status:void 0}),i=t(this,v).get(e)):t(this,p)[i]=P,P},w=new WeakSet,S=function(e){if(!t(this,nt))return!1;const i=e;return!!i&&i instanceof Promise&&i.hasOwnProperty("__staleWhileFetching")&&i.__abortController instanceof jt},xt=new WeakSet,Gt=function(e,i){t(this,M)[i]=e,t(this,N)[e]=i},lt=new WeakSet,wt=function(e){e!==t(this,C)&&(e===t(this,z)?u(this,z,t(this,N)[e]):c(this,xt,Gt).call(this,t(this,M)[e],t(this,N)[e]),c(this,xt,Gt).call(this,t(this,C),e),u(this,C,e))};let Lt=Ut;var Dt={};Object.defineProperty(Dt,"__esModule",{value:!0});Dt.getMDXComponent=Ae;Dt.getMDXExport=ie;var xe=kt(ct),Oe=kt(d),ve=kt(le);function ee(n){if(typeof WeakMap!="function")return null;var e=new WeakMap,i=new WeakMap;return(ee=function(s){return s?i:e})(n)}function kt(n,e){if(!e&&n&&n.__esModule)return n;if(n===null||typeof n!="object"&&typeof n!="function")return{default:n};var i=ee(e);if(i&&i.has(n))return i.get(n);var s={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in n)if(r!=="default"&&{}.hasOwnProperty.call(n,r)){var a=o?Object.getOwnPropertyDescriptor(n,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=n[r]}return s.default=n,i&&i.set(n,s),s}function Ae(n,e){return ie(n,e).default}function ie(n,e){const i={React:xe,ReactDOM:ve,_jsx_runtime:Oe,...e};return new Function(...Object.keys(i),n)(...Object.values(i))}var Fe=Dt;const Pt=n=>n.replace(/\\/g,"/");function se(n,e,i){const[,s]=n.replace(/\\|\//g,e).split(`${i==="playground"?"example":"exercises"}${e}`);return s}const Ht="border-border bg-[var(--shiki-background)] hover:bg-foreground/20 active:bg-foreground/30 box-content block rounded border-2 px-2 py-0.5 font-mono text-xs font-semibold outline-none transition duration-300 ease-in-out";function je({"data-buttons":n,"data-filename":e,"data-fullpath":i,"data-sep":s="/","data-start":o,"data-type":r}){var W;const a=ce();if(r==="other"||!n||!e||!i)return null;const h=Pt(((W=a[a.type])==null?void 0:W.fullPath)??""),l=!i.startsWith(h),m=ENV.EPICSHOP_DEPLOYED?["problem","solution"]:["problem","solution","playground"],F=n.split(","),b=m.filter(_=>F.includes(_));return d.jsx(d.Fragment,{children:b.map(_=>{var f;const P=a[_];if(_==="playground"){const y=a.playground&&a.playground.appName!==((f=a.problem)==null?void 0:f.name);if(!P||y||l)return d.jsxs("button",{className:Tt(Ht,"cursor-not-allowed"),title:y?"Playground is not set to the right app":l?"This file is from different app":"You must 'Set to Playground' before opening a file",children:[d.jsx("span",{className:"uppercase",children:"Open"})," in ",_]},_)}if(!P||!P.fullPath)return null;const x=[Pt(P.fullPath),Pt(e)].join(s),j=se(x,s,_);return d.jsx(Kt,{file:x,line:Number(o??1),children:d.jsxs("span",{title:j,className:Ht,children:[d.jsx("span",{className:"uppercase",children:"Open"})," in ",_]})},_)})})}function Ce(){const[n,e]=ct.useState(!1);return ct.useEffect(()=>{if(n){const i=setTimeout(()=>e(!1),1500);return()=>clearTimeout(i)}},[n]),d.jsx("button",{className:fe(Ht,"w-12 uppercase"),onClick:i=>{var r,a,h;e(!0);const o=((h=(a=(r=i.currentTarget.parentElement)==null?void 0:r.parentElement)==null?void 0:a.querySelector("pre"))==null?void 0:h.textContent)||"";navigator.clipboard.writeText(o)},children:n?"copied":"copy"})}function Te({children:n,...e}){const{"data-buttons":i,"data-filename":s,"data-fullpath":o,"data-nocopy":r,"data-sep":a}=e,h=r===void 0;function l(){if(o&&a)return!s||s.includes("..")?{"data-filename":se(o,a)}:{"data-filename":s.replace(/\//g,a)}}return d.jsxs("div",{className:"group relative",children:[d.jsxs("div",{className:"absolute right-0 top-0 z-50 m-2 flex items-baseline justify-end gap-4 opacity-0 transition duration-300 ease-in-out focus-within:opacity-100 group-hover:opacity-100",children:[i?d.jsx(je,{...e}):null,h?d.jsx(Ce,{}):null]}),d.jsx("pre",{...e,className:Tt("scrollbar-thin scrollbar-thumb-scrollbar",e.className??""),...l(),children:n})]})}const De={h1:n=>d.jsx(ut,{...n,as:"h1"}),h2:n=>d.jsx(ut,{...n,as:"h2"}),h3:n=>d.jsx(ut,{...n,as:"h3"}),h4:n=>d.jsx(ut,{...n,as:"h4"}),h5:n=>d.jsx(ut,{...n,as:"h5"}),h6:n=>d.jsx(ut,{...n,as:"h6"}),a:de,p:n=>d.jsx("div",{...n}),pre:n=>d.jsx("pre",{...n,className:Tt("scrollbar-thin scrollbar-thumb-scrollbar",n.className??"")}),LaunchEditor:Kt,VideoEmbed:pe,EpicVideo:ge};function ze(n){const e=Fe.getMDXComponent(n);function i({components:s,...o}){const r=ct.useMemo(()=>({...De,...s}),[s]);return d.jsx(e,{components:r,...o})}return i}const Nt=new Lt({max:1e3});function Pe(n){return ct.useMemo(()=>{if(Nt.has(n))return Nt.get(n);const e=ze(n);return Nt.set(n,e),e},[n])}function qe({code:n,components:e}){const i=Pe(n),s=ct.useMemo(()=>({Icon:ue,pre:Te,Link:Xt,...e}),[e]);return d.jsx(i,{components:s})}export{Ve as E,Kt as L,qe as M};
|
|
2
|
+
//# sourceMappingURL=mdx-ytg-y2nh.js.map
|