@epic-web/workshop-app 5.3.7 → 5.4.0
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/{_-CWSCXcBv.js → _-BrkpfnBb.js} +2 -2
- package/build/client/assets/{_-CWSCXcBv.js.map → _-BrkpfnBb.js.map} +1 -1
- package/build/client/assets/{_exerciseNumber-BnwWTYFw.js → _exerciseNumber-DCSM0NCG.js} +2 -2
- package/build/client/assets/{_exerciseNumber-BnwWTYFw.js.map → _exerciseNumber-DCSM0NCG.js.map} +1 -1
- package/build/client/assets/{_exerciseNumber_._stepNumber-BA2Xhzqs.js → _exerciseNumber_._stepNumber-BIMJh_sg.js} +2 -2
- package/build/client/assets/{_exerciseNumber_._stepNumber-BA2Xhzqs.js.map → _exerciseNumber_._stepNumber-BIMJh_sg.js.map} +1 -1
- package/build/client/assets/{_exerciseNumber_.finished-BfeMSie-.js → _exerciseNumber_.finished-nbpk1ToO.js} +2 -2
- package/build/client/assets/{_exerciseNumber_.finished-BfeMSie-.js.map → _exerciseNumber_.finished-nbpk1ToO.js.map} +1 -1
- package/build/client/assets/{_layout-pUNfVRe2.js → _layout-Cbz7Qt-S.js} +2 -2
- package/build/client/assets/{_layout-pUNfVRe2.js.map → _layout-Cbz7Qt-S.js.map} +1 -1
- package/build/client/assets/{_layout-Bpho30KN.js → _layout-DTAM9xh5.js} +2 -2
- package/build/client/assets/{_layout-Bpho30KN.js.map → _layout-DTAM9xh5.js.map} +1 -1
- package/build/client/assets/_layout-Dfmv2zcn.js +2 -0
- package/build/client/assets/_layout-Dfmv2zcn.js.map +1 -0
- package/build/client/assets/{accordion-DC885Li1.js → accordion-D9-D-n9p.js} +2 -2
- package/build/client/assets/{accordion-DC885Li1.js.map → accordion-D9-D-n9p.js.map} +1 -1
- package/build/client/assets/account-C4Piztoz.js +2 -0
- package/build/client/assets/account-C4Piztoz.js.map +1 -0
- package/build/client/assets/app-DgTXXO8s.js +2 -0
- package/build/client/assets/{app-CM8yuYni.js.map → app-DgTXXO8s.js.map} +1 -1
- package/build/client/assets/{button-DQ001ob0.js → button-_qPvcoqR.js} +2 -2
- package/build/client/assets/{button-DQ001ob0.js.map → button-_qPvcoqR.js.map} +1 -1
- package/build/client/assets/{components-9EGYHTc_.js → components-Be92gVxW.js} +2 -2
- package/build/client/assets/{components-9EGYHTc_.js.map → components-Be92gVxW.js.map} +1 -1
- package/build/client/assets/{diff-CyIaJAoJ.js → diff-8nlDkmpc.js} +2 -2
- package/build/client/assets/{diff-CyIaJAoJ.js.map → diff-8nlDkmpc.js.map} +1 -1
- package/build/client/assets/diff-BhRAIPKc.js +2 -0
- package/build/client/assets/{diff-Cnw7IcG5.js.map → diff-BhRAIPKc.js.map} +1 -1
- package/build/client/assets/discord-BUWZUTEC.js +2 -0
- package/build/client/assets/discord-BUWZUTEC.js.map +1 -0
- package/build/client/assets/discord-Bdnx7fu-.js +2 -0
- package/build/client/assets/discord-Bdnx7fu-.js.map +1 -0
- package/build/client/assets/{entry.client-BTYTUpFV.js → entry.client-DqIWuxf8.js} +2 -2
- package/build/client/assets/{entry.client-BTYTUpFV.js.map → entry.client-DqIWuxf8.js.map} +1 -1
- package/build/client/assets/{epic-video-1XLXSFCL.js → epic-video-Bp4BOD2R.js} +2 -2
- package/build/client/assets/{epic-video-1XLXSFCL.js.map → epic-video-Bp4BOD2R.js.map} +1 -1
- package/build/client/assets/{error-boundary-1-dmC941.js → error-boundary-BZA-ffa8.js} +2 -2
- package/build/client/assets/{error-boundary-1-dmC941.js.map → error-boundary-BZA-ffa8.js.map} +1 -1
- package/build/client/assets/{finished-DjF_kSoF.js → finished-C0cpfAFL.js} +2 -2
- package/build/client/assets/{finished-DjF_kSoF.js.map → finished-C0cpfAFL.js.map} +1 -1
- package/build/client/assets/{index-BuoaxPEj.js → index-BCTr8uu6.js} +2 -2
- package/build/client/assets/{index-BuoaxPEj.js.map → index-BCTr8uu6.js.map} +1 -1
- package/build/client/assets/{index-_J-F_Dnc.js → index-Bdg3v8tC.js} +2 -2
- package/build/client/assets/{index-_J-F_Dnc.js.map → index-Bdg3v8tC.js.map} +1 -1
- package/build/client/assets/index-Bi1TbRTj.js +2 -0
- package/build/client/assets/index-Bi1TbRTj.js.map +1 -0
- package/build/client/assets/{index-DRH72MzK.js → index-C9Hx0Dey.js} +2 -2
- package/build/client/assets/{index-DRH72MzK.js.map → index-C9Hx0Dey.js.map} +1 -1
- package/build/client/assets/{index-f5Q6XZEy.js → index-Ca4vBON4.js} +2 -2
- package/build/client/assets/{index-f5Q6XZEy.js.map → index-Ca4vBON4.js.map} +1 -1
- package/build/client/assets/{index-BuA_RWlU.js → index-DZDhtMuq.js} +2 -2
- package/build/client/assets/{index-BuA_RWlU.js.map → index-DZDhtMuq.js.map} +1 -1
- package/build/client/assets/index-pkiQppkK.js +2 -0
- package/build/client/assets/index-pkiQppkK.js.map +1 -0
- package/build/client/assets/{loading-Dk0n07O3.js → loading-XhMtj4mp.js} +2 -2
- package/build/client/assets/{loading-Dk0n07O3.js.map → loading-XhMtj4mp.js.map} +1 -1
- package/build/client/assets/{login-pZYDEC_l.js → login-C1oOgi98.js} +2 -2
- package/build/client/assets/{login-pZYDEC_l.js.map → login-C1oOgi98.js.map} +1 -1
- package/build/client/assets/manifest-bc809ee6.js +1 -0
- package/build/client/assets/{mdx-DiFCTSLR.js → mdx-CEjzXoEx.js} +2 -2
- package/build/client/assets/{mdx-DiFCTSLR.js.map → mdx-CEjzXoEx.js.map} +1 -1
- package/build/client/assets/{misc-BJtHv_Jh.js → misc-DUy_whwE.js} +2 -2
- package/build/client/assets/{misc-BJtHv_Jh.js.map → misc-DUy_whwE.js.map} +1 -1
- package/build/client/assets/{nav-chevrons-CgbSMLeb.js → nav-chevrons-DnR25VLp.js} +2 -2
- package/build/client/assets/{nav-chevrons-CgbSMLeb.js.map → nav-chevrons-DnR25VLp.js.map} +1 -1
- package/build/client/assets/{onboarding-DXICEaMi.js → onboarding-C2YNq60k.js} +2 -2
- package/build/client/assets/{onboarding-DXICEaMi.js.map → onboarding-C2YNq60k.js.map} +1 -1
- package/build/client/assets/{presence-DyppfK2V.js → presence-DJGFvdDh.js} +2 -2
- package/build/client/assets/{presence-DyppfK2V.js.map → presence-DJGFvdDh.js.map} +1 -1
- package/build/client/assets/{preview-CW_12I0i.js → preview-DaZd0wMb.js} +2 -2
- package/build/client/assets/{preview-CW_12I0i.js.map → preview-DaZd0wMb.js.map} +1 -1
- package/build/client/assets/{product-C1ynnrN_.js → product-DIAmCwmZ.js} +2 -2
- package/build/client/assets/{product-C1ynnrN_.js.map → product-DIAmCwmZ.js.map} +1 -1
- package/build/client/assets/{progress-DAB3nDa2.js → progress-DQt_Bn9o.js} +2 -2
- package/build/client/assets/{progress-DAB3nDa2.js.map → progress-DQt_Bn9o.js.map} +1 -1
- package/build/client/assets/{progress-bar-Cj5R4Zk7.js → progress-bar-BaTU3Yx_.js} +2 -2
- package/build/client/assets/{progress-bar-Cj5R4Zk7.js.map → progress-bar-BaTU3Yx_.js.map} +1 -1
- package/build/client/assets/{request-info-DCIQLE6H.js → request-info-ByUEfOil.js} +2 -2
- package/build/client/assets/{request-info-DCIQLE6H.js.map → request-info-ByUEfOil.js.map} +1 -1
- package/build/client/assets/{revalidation-ws-DU-PzW-_.js → revalidation-ws-dUa9CAqr.js} +2 -2
- package/build/client/assets/{revalidation-ws-DU-PzW-_.js.map → revalidation-ws-dUa9CAqr.js.map} +1 -1
- package/build/client/assets/{root-DCfiv1cO.js → root-a3d3Qwip.js} +2 -2
- package/build/client/assets/{root-DCfiv1cO.js.map → root-a3d3Qwip.js.map} +1 -1
- package/build/client/assets/{set-playground-S_rIwJAa.js → set-playground-CBHBA46B.js} +2 -2
- package/build/client/assets/{set-playground-S_rIwJAa.js.map → set-playground-CBHBA46B.js.map} +1 -1
- package/build/client/assets/{support-BNS-kEhc.js → support-CIz02V_r.js} +2 -2
- package/build/client/assets/{support-BNS-kEhc.js.map → support-CIz02V_r.js.map} +1 -1
- package/build/client/assets/test-DoKJvNug.js +2 -0
- package/build/client/assets/{test-CvzcNTDp.js.map → test-DoKJvNug.js.map} +1 -1
- package/build/client/assets/{tests-Bp85P9FF.js → tests-DbuyD2cI.js} +2 -2
- package/build/client/assets/{tests-Bp85P9FF.js.map → tests-DbuyD2cI.js.map} +1 -1
- package/build/client/assets/{tooltip-BgynKV2c.js → tooltip-DO9uwurQ.js} +2 -2
- package/build/client/assets/{tooltip-BgynKV2c.js.map → tooltip-DO9uwurQ.js.map} +1 -1
- package/build/client/assets/user-Bv6wYhQP.js +2 -0
- package/build/client/assets/user-Bv6wYhQP.js.map +1 -0
- package/build/client/assets/version-CaywAlNQ.js +2 -0
- package/build/client/assets/version-CaywAlNQ.js.map +1 -0
- package/build/client/assets/{workshop-config-DJY2cXU_.js → workshop-config-WVltG_BV.js} +2 -2
- package/build/client/assets/{workshop-config-DJY2cXU_.js.map → workshop-config-WVltG_BV.js.map} +1 -1
- package/build/server/index.js +420 -361
- package/build/server/index.js.map +1 -1
- package/package.json +3 -3
- package/start.js +6 -0
- package/build/client/assets/_layout-gyrNluke.js +0 -2
- package/build/client/assets/_layout-gyrNluke.js.map +0 -1
- package/build/client/assets/account-RJjysGnp.js +0 -2
- package/build/client/assets/account-RJjysGnp.js.map +0 -1
- package/build/client/assets/app-CM8yuYni.js +0 -2
- package/build/client/assets/diff-Cnw7IcG5.js +0 -2
- package/build/client/assets/discord-DxisvcaU.js +0 -2
- package/build/client/assets/discord-DxisvcaU.js.map +0 -1
- package/build/client/assets/discord-lXkS53K3.js +0 -2
- package/build/client/assets/discord-lXkS53K3.js.map +0 -1
- package/build/client/assets/discord.callback-l0sNRNKZ.js +0 -2
- package/build/client/assets/discord.callback-l0sNRNKZ.js.map +0 -1
- package/build/client/assets/index-DZ0It6pH.js +0 -2
- package/build/client/assets/index-DZ0It6pH.js.map +0 -1
- package/build/client/assets/manifest-9328c766.js +0 -1
- package/build/client/assets/test-CvzcNTDp.js +0 -2
- package/build/client/assets/user-DJiL1Lk-.js +0 -2
- package/build/client/assets/user-DJiL1Lk-.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as p,j as r,O as Q}from"./index-BFGhCX_U.js";import{E as Z}from"./index-BCxBKsqT.js";import{G as J}from"./error-boundary-1-dmC941.js";import{N as X}from"./nav-chevrons-CgbSMLeb.js";import{u as ee}from"./revalidation-ws-DU-PzW-_.js";import{M as re,L as b,E as te}from"./mdx-DiFCTSLR.js";import{P as oe}from"./progress-DAB3nDa2.js";import{S as D}from"./set-playground-S_rIwJAa.js";import{g as ne}from"./seo-pBpFCWsy.js";import{b as se,a as A,I as C,i as ie}from"./misc-BJtHv_Jh.js";import{E as ae}from"./epic-video-1XLXSFCL.js";import{S,d as le,j as k,A as _,h as I,P as L,f as j,g as F,k as ce,D as pe,C as ue,l as de,u as fe,R as me,e as xe}from"./tooltip-BgynKV2c.js";import{u as he}from"./request-info-DCIQLE6H.js";import{u as P,L as v,b as ve,A as ge}from"./components-9EGYHTc_.js";import{h as Pe,R as je,u as Ne,F as be,P as Ce}from"./index-BuoaxPEj.js";import"./progress-bar-Cj5R4Zk7.js";import"./pe-ChIwTk8v.js";import"./index-BuA_RWlU.js";import"./index-_J-F_Dnc.js";import"./loading-Dk0n07O3.js";import"./user-DJiL1Lk-.js";import"./workshop-config-DJY2cXU_.js";const $=p.createContext(null);function Se(){const e=p.useContext($);if(!e)throw new Error("useStepContext must be used within a StepContext.Provider");return e}function Ee({children:e,inBrowserBrowserRef:o}){return r.jsx($.Provider,{value:{inBrowserBrowserRef:o},children:e})}const we={DiffLink:E,PrevDiffLink:Re,NextDiffLink:Oe,InlineFile:Ae,LinkToApp:ke};function ye({inBrowserBrowserRef:e}){const o=P();return o.exerciseStepApp.instructionsCode?r.jsx(Ee,{inBrowserBrowserRef:e,children:r.jsx(ae,{epicVideoInfosPromise:o.epicVideoInfosPromise,children:r.jsx("div",{className:"prose dark:prose-invert sm:prose-lg",children:r.jsx(re,{code:o.exerciseStepApp.instructionsCode,components:we})})})}):null}function T(e,o,t){const n=new URLSearchParams(e);return t===null?n.delete(o):n.set(o,t),n}function Oe({app:e=0,fullPage:o=!1,children:t}){return r.jsx(E,{app1:e,app2:e+1,fullPage:o,children:t})}function Re({app:e=-1,fullPage:o=!1,children:t}){return r.jsx(E,{app1:e,app2:e+1,fullPage:o,children:t})}function E({app1:e=0,app2:o=1,children:t,fullPage:n=!1,to:i}){const s=P();if(!i&&!e&&!o)return r.jsx("callout-danger",{className:"notification",children:r.jsx("div",{className:"title",children:"DiffLink Error: invalid input"})});function a(d){var f;if(typeof d=="number"){const m=s.exerciseIndex+d;return(f=s.allApps[m])==null?void 0:f.name}if(!d)return null;for(const{name:m,stepName:x}of s.allApps)if(d===m||d===x)return m;return null}if(i){const d=new URLSearchParams(i);e=d.get("app1"),o=d.get("app2")}const l=a(e),c=a(o);if(!l||!c)return r.jsxs("callout-danger",{className:"notification",children:[r.jsx("div",{className:"title",children:"DiffLink Error: invalid input"}),!l&&r.jsxs("div",{children:['app1: "',e,'" is not a valid app name']}),!c&&r.jsxs("div",{children:['app2: "',o,'" is not a valid app name']})]});i||(i=`app1=${l}&app2=${c}`);const u=n?`/diff?${i}`:`?${decodeURIComponent(T(new URLSearchParams,"preview",`diff&${i}`).toString())}`;return t||(t=r.jsxs("span",{children:["Go to Diff ",n?"":"Preview"," from: ",r.jsx("code",{children:l})," to:"," ",r.jsx("code",{children:c})]})),r.jsx(v,{to:u,children:t})}function Ae({file:e,type:o="playground",children:t=r.jsx("code",{children:e}),...n}){const i=P(),s=i[o]||i[i.type],a=r.jsxs("div",{className:"launch-editor-button-wrapper flex underline underline-offset-4",children:[t," ",r.jsx("svg",{height:24,width:24,children:r.jsx("use",{href:`${ie}#Keyboard`})})]});return ENV.EPICSHOP_DEPLOYED&&s?r.jsx("div",{className:"inline-block grow",children:r.jsx(b,{appFile:e,appName:s.name,...n,children:a})}):s?r.jsx("div",{className:"inline-block grow",children:r.jsx(b,{appFile:e,appName:s.name,...n,children:a})}):o==="playground"?r.jsx(S,{content:"You must 'Set to Playground' before opening a file",children:r.jsx("div",{className:"inline-block grow cursor-not-allowed",children:a})}):r.jsx(r.Fragment,{children:"children"})}function De(e){return e==="problem"?"problem":e==="solution"?"solution":"playground"}function ke({to:e,children:o=r.jsx("code",{children:e.toString()}),...t}){var m;const[n]=ve(),i=`?${T(n,"pathname",e.toString()).toString()}`,s=P(),a=De(n.get("preview")),l=he(),c=s[a],u=(c==null?void 0:c.dev.type)==="script"?se({domain:l.domain,port:c.dev.portNumber}):((m=s.playground)==null?void 0:m.dev.type)==="browser"?s.playground.dev.pathname:null,{inBrowserBrowserRef:d}=Se(),f=u?u.slice(0,-1)+e.toString():null;return r.jsxs("div",{className:"inline-flex items-center justify-between gap-1",children:[r.jsx(v,{to:i,...t,className:A(t.className,{"cursor-not-allowed":ENV.EPICSHOP_DEPLOYED}),title:ENV.EPICSHOP_DEPLOYED?"Cannot link to app in deployed version":void 0,onClick:x=>{var O,R;ENV.EPICSHOP_DEPLOYED&&x.preventDefault(),(O=t.onClick)==null||O.call(t,x),(R=d.current)==null||R.handleExtrnalNavigation(e.toString())},children:o}),f?r.jsx(S,{content:"Open in new tab",children:r.jsx("a",{href:f,target:"_blank",rel:"noreferrer",className:A("flex aspect-square items-center justify-center",{"cursor-not-allowed":ENV.EPICSHOP_DEPLOYED}),title:ENV.EPICSHOP_DEPLOYED?"Cannot link to app in deployed version":"Open in new tab",onClick:x=>{ENV.EPICSHOP_DEPLOYED&&x.preventDefault()},children:r.jsx(C,{name:"ExternalLink"})})}):null]})}var w="Popover",[M,xr]=le(w,[k]),N=k(),[_e,h]=M(w),H=e=>{const{__scopePopover:o,children:t,open:n,defaultOpen:i,onOpenChange:s,modal:a=!1}=e,l=N(o),c=p.useRef(null),[u,d]=p.useState(!1),[f=!1,m]=fe({prop:n,defaultProp:i,onChange:s});return r.jsx(me,{...l,children:r.jsx(_e,{scope:o,contentId:xe(),triggerRef:c,open:f,onOpenChange:m,onOpenToggle:p.useCallback(()=>m(x=>!x),[m]),hasCustomAnchor:u,onCustomAnchorAdd:p.useCallback(()=>d(!0),[]),onCustomAnchorRemove:p.useCallback(()=>d(!1),[]),modal:a,children:t})})};H.displayName=w;var U="PopoverAnchor",Ie=p.forwardRef((e,o)=>{const{__scopePopover:t,...n}=e,i=h(U,t),s=N(t),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=i;return p.useEffect(()=>(a(),()=>l()),[a,l]),r.jsx(_,{...s,...n,ref:o})});Ie.displayName=U;var V="PopoverTrigger",Y=p.forwardRef((e,o)=>{const{__scopePopover:t,...n}=e,i=h(V,t),s=N(t),a=I(o,i.triggerRef),l=r.jsx(L.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":W(i.open),...n,ref:a,onClick:j(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:r.jsx(_,{asChild:!0,...s,children:l})});Y.displayName=V;var y="PopoverPortal",[Le,Fe]=M(y,{forceMount:void 0}),B=e=>{const{__scopePopover:o,forceMount:t,children:n,container:i}=e,s=h(y,o);return r.jsx(Le,{scope:o,forceMount:t,children:r.jsx(F,{present:t||s.open,children:r.jsx(Ce,{asChild:!0,container:i,children:n})})})};B.displayName=y;var g="PopoverContent",G=p.forwardRef((e,o)=>{const t=Fe(g,e.__scopePopover),{forceMount:n=t.forceMount,...i}=e,s=h(g,e.__scopePopover);return r.jsx(F,{present:n||s.open,children:s.modal?r.jsx($e,{...i,ref:o}):r.jsx(Te,{...i,ref:o})})});G.displayName=g;var $e=p.forwardRef((e,o)=>{const t=h(g,e.__scopePopover),n=p.useRef(null),i=I(o,n),s=p.useRef(!1);return p.useEffect(()=>{const a=n.current;if(a)return Pe(a)},[]),r.jsx(je,{as:ce,allowPinchZoom:!0,children:r.jsx(q,{...e,ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:j(e.onCloseAutoFocus,a=>{var l;a.preventDefault(),s.current||(l=t.triggerRef.current)==null||l.focus()}),onPointerDownOutside:j(e.onPointerDownOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:j(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),Te=p.forwardRef((e,o)=>{const t=h(g,e.__scopePopover),n=p.useRef(!1),i=p.useRef(!1);return r.jsx(q,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(n.current||(l=t.triggerRef.current)==null||l.focus(),s.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:s=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;((u=t.triggerRef.current)==null?void 0:u.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),q=p.forwardRef((e,o)=>{const{__scopePopover:t,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...f}=e,m=h(g,t),x=N(t);return Ne(),r.jsx(be,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s,children:r.jsx(pe,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>m.onOpenChange(!1),children:r.jsx(ue,{"data-state":W(m.open),role:"dialog",id:m.contentId,...x,...f,ref:o,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),K="PopoverClose",Me=p.forwardRef((e,o)=>{const{__scopePopover:t,...n}=e,i=h(K,t);return r.jsx(L.button,{type:"button",...n,ref:o,onClick:j(e.onClick,()=>i.onOpenChange(!1))})});Me.displayName=K;var He="PopoverArrow",Ue=p.forwardRef((e,o)=>{const{__scopePopover:t,...n}=e,i=N(t);return r.jsx(de,{...i,...n,ref:o})});Ue.displayName=He;function W(e){return e?"open":"closed"}var Ve=H,Ye=Y,Be=B,Ge=G;function qe({diffFilesPromise:e}){var l,c;const o=P(),[t,n]=p.useState(!1),i=p.useRef(null);function s(){n(!1)}const a=(l=o.playground)==null?void 0:l.appName;return r.jsx(r.Fragment,{children:r.jsxs(Ve,{open:t,onOpenChange:n,children:[r.jsx(Ye,{asChild:!0,children:r.jsxs("button",{className:"flex h-full items-center gap-1 border-r px-6 py-3 font-mono text-sm uppercase","aria-label":"Relevant Files",children:[r.jsx(C,{name:"Files"}),"Files"]})}),r.jsx(Be,{children:r.jsx(Ge,{ref:i,className:"slideRightContent lg:slideUpContent invert-theme z-10 select-none rounded bg-background px-9 py-8 text-foreground",align:"start",sideOffset:5,children:r.jsxs("div",{className:"launch-editor-wrapper",children:[r.jsx("strong",{className:"inline-block px-2 pb-4 font-semibold uppercase",children:"Relevant Files"}),o.problem&&((c=o.playground)==null?void 0:c.appName)!==o.problem.name?r.jsx("div",{className:"mb-2 rounded p-1 font-mono font-medium",children:r.jsx(D,{appName:o.problem.name})}):null,r.jsx("div",{id:"files",children:r.jsx(p.Suspense,{fallback:r.jsx(S,{content:"Loading diff",children:r.jsx("div",{className:"flex justify-center",children:r.jsx(C,{name:"Refresh",className:"h-8 w-8 animate-spin"})})}),children:r.jsx(ge,{resolve:e,errorElement:r.jsx("div",{className:"text-foreground-danger",children:"Something went wrong."}),children:u=>{if(!u)return r.jsx("p",{className:"text-foreground-danger",children:"Unable to determine diff"});if(typeof u=="string")return r.jsx("p",{className:"text-foreground-danger",children:u});if(!u.length)return r.jsx("p",{children:"No files changed"});const d=a||ENV.EPICSHOP_GITHUB_ROOT?{}:{title:"You must 'Set to Playground' before opening a file",className:"not-allowed"};return r.jsxs("ul",{...d,children:[u.length>1&&!ENV.EPICSHOP_DEPLOYED?r.jsx("div",{className:"mb-2 border-b border-b-gray-50 border-opacity-50 pb-2 font-sans",children:r.jsx(b,{appFile:u.map(f=>`${f.path},${f.line},1`),appName:"playground",onUpdate:s,children:r.jsx("p",{children:"Open All Files"})})}):null,u.map(f=>{var m;return r.jsx("li",{"data-state":f.status,children:r.jsx(b,{appFile:`${f.path},${f.line},1`,appName:ENV.EPICSHOP_DEPLOYED?((m=o.problem)==null?void 0:m.name)??"playground":"playground",onUpdate:s,children:r.jsx("code",{children:f.path})})},f.path)})]})}})})})]})})})]})})}function z(e,o){var a;const t=(e==null?void 0:e.exerciseStepApp.exerciseNumber.toString().padStart(2,"0"))??"00",n=(e==null?void 0:e.exerciseStepApp.stepNumber.toString().padStart(2,"0"))??"00",i={problem:"💪",solution:"🏁"}[(e==null?void 0:e.type)??"problem"],s=((a=e==null?void 0:e[e.type])==null?void 0:a.title)??"N/A";return{emoji:i,stepNumber:n,title:s,exerciseNumber:t,exerciseTitle:(e==null?void 0:e.exerciseTitle)??"Unknown exercise",workshopTitle:o,type:(e==null?void 0:e.type)??"problem"}}const hr=({data:e,matches:o,params:t})=>{var u;const n=(u=o.find(d=>d.id==="root"))==null?void 0:u.data;if(!e||!n)return[{title:"🦉 | Error"}];const{emoji:i,stepNumber:s,title:a,exerciseNumber:l,exerciseTitle:c}=z(e);return ne({title:`${i} | ${s}. ${a} | ${l}. ${c} | ${n.workshopTitle}`,description:`${t.type} step for exercise ${l}. ${c}`,ogTitle:a,ogDescription:`${c} step ${Number(s)} ${t.type}`,instructor:n.instructor,requestInfo:n.requestInfo})};function vr(){var n;const e=P(),o=p.useRef(null),t=z(e);return ee({watchPaths:[`${e.exerciseStepApp.relativePath}/README.mdx`]}),r.jsx("div",{className:"flex max-w-full flex-grow flex-col",children:r.jsxs("main",{className:"flex flex-grow flex-col sm:grid sm:h-full sm:min-h-[800px] sm:grid-cols-1 sm:grid-rows-2 md:min-h-[unset] lg:grid-cols-2 lg:grid-rows-1",children:[r.jsxs("div",{className:"relative flex flex-col sm:col-span-1 sm:row-span-1 sm:h-full lg:border-r",children:[r.jsx("h1",{className:"h-14 border-b pl-10 pr-5 text-sm font-medium leading-tight",children:r.jsxs("div",{className:"flex h-14 flex-wrap items-center justify-between gap-x-2 py-2",children:[r.jsxs("div",{className:"flex items-center justify-start gap-x-2 uppercase",children:[r.jsxs(v,{to:`/${t.exerciseNumber}`,className:"hover:underline",children:[t.exerciseNumber,". ",t.exerciseTitle]}),"/",r.jsxs(v,{to:".",className:"hover:underline",children:[t.stepNumber,". ",t.title," (",t.emoji," ",t.type,")"]})]}),e.problem&&((n=e.playground)==null?void 0:n.appName)!==e.problem.name?r.jsx("div",{className:"hidden md:block",children:r.jsx(D,{appName:e.problem.name})}):null]})}),r.jsxs("article",{id:e.articleId,className:"shadow-on-scrollbox flex h-full w-full max-w-none flex-1 scroll-pt-6 flex-col justify-between space-y-6 overflow-y-auto p-2 scrollbar-thin scrollbar-thumb-scrollbar sm:p-10 sm:pt-8",children:[e.exerciseStepApp.instructionsCode?r.jsx(ye,{inBrowserBrowserRef:o}):r.jsx("div",{className:"flex h-full items-center justify-center text-lg",children:r.jsx("p",{children:"No instructions yet..."})}),r.jsxs("div",{className:"mt-auto flex justify-between",children:[e.prevStepLink?r.jsx(v,{to:e.prevStepLink.to,"aria-label":"Previous Step",prefetch:"intent",children:"← Previous"}):r.jsx("span",{}),e.nextStepLink?r.jsx(v,{to:e.nextStepLink.to,"aria-label":"Next Step",prefetch:"intent",children:"Next →"}):r.jsx("span",{})]})]},e.articleId),r.jsx(Z,{elementQuery:`#${e.articleId}`},`scroll-${e.articleId}`),e.type==="solution"?r.jsx(oe,{type:"step",exerciseNumber:e.exerciseStepApp.exerciseNumber,stepNumber:e.exerciseStepApp.stepNumber,className:"h-14 border-t px-6"}):null,r.jsxs("div",{className:"flex h-16 justify-between border-b-4 border-t lg:border-b-0",children:[r.jsx("div",{children:r.jsx("div",{className:"h-full",children:r.jsx(qe,{diffFilesPromise:e.diffFiles})})}),r.jsx(te,{appName:e.exerciseStepApp.name,relativePath:e.exerciseStepApp.relativePath}),r.jsx(X,{prev:e.prevStepLink?{to:e.prevStepLink.to,"aria-label":"Previous Step"}:null,next:e.nextStepLink?{to:e.nextStepLink.to,"aria-label":"Next Step"}:null})]})]}),r.jsx(Q,{})]})})}function gr(){return r.jsx(J,{statusHandlers:{404:()=>r.jsx("p",{children:"Sorry, we couldn't find an app here."})}})}export{gr as ErrorBoundary,vr as default,hr as meta};
|
|
2
|
-
//# sourceMappingURL=_layout-
|
|
1
|
+
import{r as p,j as r,O as Q}from"./index-BFGhCX_U.js";import{E as Z}from"./index-BCxBKsqT.js";import{G as J}from"./error-boundary-BZA-ffa8.js";import{N as X}from"./nav-chevrons-DnR25VLp.js";import{u as ee}from"./revalidation-ws-dUa9CAqr.js";import{M as re,L as b,E as te}from"./mdx-CEjzXoEx.js";import{P as oe}from"./progress-DQt_Bn9o.js";import{S as D}from"./set-playground-CBHBA46B.js";import{g as ne}from"./seo-pBpFCWsy.js";import{b as se,a as A,I as C,i as ie}from"./misc-DUy_whwE.js";import{E as ae}from"./epic-video-Bp4BOD2R.js";import{S,d as le,j as k,A as _,h as I,P as L,f as j,g as F,k as ce,D as pe,C as ue,l as de,u as fe,R as me,e as xe}from"./tooltip-DO9uwurQ.js";import{u as he}from"./request-info-ByUEfOil.js";import{u as P,L as v,e as ve,A as ge}from"./components-Be92gVxW.js";import{h as Pe,R as je,u as Ne,F as be,P as Ce}from"./index-BCTr8uu6.js";import"./progress-bar-BaTU3Yx_.js";import"./pe-ChIwTk8v.js";import"./index-DZDhtMuq.js";import"./index-Bdg3v8tC.js";import"./loading-XhMtj4mp.js";import"./user-Bv6wYhQP.js";import"./workshop-config-WVltG_BV.js";const $=p.createContext(null);function Se(){const e=p.useContext($);if(!e)throw new Error("useStepContext must be used within a StepContext.Provider");return e}function Ee({children:e,inBrowserBrowserRef:o}){return r.jsx($.Provider,{value:{inBrowserBrowserRef:o},children:e})}const we={DiffLink:E,PrevDiffLink:Re,NextDiffLink:Oe,InlineFile:Ae,LinkToApp:ke};function ye({inBrowserBrowserRef:e}){const o=P();return o.exerciseStepApp.instructionsCode?r.jsx(Ee,{inBrowserBrowserRef:e,children:r.jsx(ae,{epicVideoInfosPromise:o.epicVideoInfosPromise,children:r.jsx("div",{className:"prose dark:prose-invert sm:prose-lg",children:r.jsx(re,{code:o.exerciseStepApp.instructionsCode,components:we})})})}):null}function T(e,o,t){const n=new URLSearchParams(e);return t===null?n.delete(o):n.set(o,t),n}function Oe({app:e=0,fullPage:o=!1,children:t}){return r.jsx(E,{app1:e,app2:e+1,fullPage:o,children:t})}function Re({app:e=-1,fullPage:o=!1,children:t}){return r.jsx(E,{app1:e,app2:e+1,fullPage:o,children:t})}function E({app1:e=0,app2:o=1,children:t,fullPage:n=!1,to:i}){const s=P();if(!i&&!e&&!o)return r.jsx("callout-danger",{className:"notification",children:r.jsx("div",{className:"title",children:"DiffLink Error: invalid input"})});function a(d){var f;if(typeof d=="number"){const m=s.exerciseIndex+d;return(f=s.allApps[m])==null?void 0:f.name}if(!d)return null;for(const{name:m,stepName:x}of s.allApps)if(d===m||d===x)return m;return null}if(i){const d=new URLSearchParams(i);e=d.get("app1"),o=d.get("app2")}const l=a(e),c=a(o);if(!l||!c)return r.jsxs("callout-danger",{className:"notification",children:[r.jsx("div",{className:"title",children:"DiffLink Error: invalid input"}),!l&&r.jsxs("div",{children:['app1: "',e,'" is not a valid app name']}),!c&&r.jsxs("div",{children:['app2: "',o,'" is not a valid app name']})]});i||(i=`app1=${l}&app2=${c}`);const u=n?`/diff?${i}`:`?${decodeURIComponent(T(new URLSearchParams,"preview",`diff&${i}`).toString())}`;return t||(t=r.jsxs("span",{children:["Go to Diff ",n?"":"Preview"," from: ",r.jsx("code",{children:l})," to:"," ",r.jsx("code",{children:c})]})),r.jsx(v,{to:u,children:t})}function Ae({file:e,type:o="playground",children:t=r.jsx("code",{children:e}),...n}){const i=P(),s=i[o]||i[i.type],a=r.jsxs("div",{className:"launch-editor-button-wrapper flex underline underline-offset-4",children:[t," ",r.jsx("svg",{height:24,width:24,children:r.jsx("use",{href:`${ie}#Keyboard`})})]});return ENV.EPICSHOP_DEPLOYED&&s?r.jsx("div",{className:"inline-block grow",children:r.jsx(b,{appFile:e,appName:s.name,...n,children:a})}):s?r.jsx("div",{className:"inline-block grow",children:r.jsx(b,{appFile:e,appName:s.name,...n,children:a})}):o==="playground"?r.jsx(S,{content:"You must 'Set to Playground' before opening a file",children:r.jsx("div",{className:"inline-block grow cursor-not-allowed",children:a})}):r.jsx(r.Fragment,{children:"children"})}function De(e){return e==="problem"?"problem":e==="solution"?"solution":"playground"}function ke({to:e,children:o=r.jsx("code",{children:e.toString()}),...t}){var m;const[n]=ve(),i=`?${T(n,"pathname",e.toString()).toString()}`,s=P(),a=De(n.get("preview")),l=he(),c=s[a],u=(c==null?void 0:c.dev.type)==="script"?se({domain:l.domain,port:c.dev.portNumber}):((m=s.playground)==null?void 0:m.dev.type)==="browser"?s.playground.dev.pathname:null,{inBrowserBrowserRef:d}=Se(),f=u?u.slice(0,-1)+e.toString():null;return r.jsxs("div",{className:"inline-flex items-center justify-between gap-1",children:[r.jsx(v,{to:i,...t,className:A(t.className,{"cursor-not-allowed":ENV.EPICSHOP_DEPLOYED}),title:ENV.EPICSHOP_DEPLOYED?"Cannot link to app in deployed version":void 0,onClick:x=>{var O,R;ENV.EPICSHOP_DEPLOYED&&x.preventDefault(),(O=t.onClick)==null||O.call(t,x),(R=d.current)==null||R.handleExtrnalNavigation(e.toString())},children:o}),f?r.jsx(S,{content:"Open in new tab",children:r.jsx("a",{href:f,target:"_blank",rel:"noreferrer",className:A("flex aspect-square items-center justify-center",{"cursor-not-allowed":ENV.EPICSHOP_DEPLOYED}),title:ENV.EPICSHOP_DEPLOYED?"Cannot link to app in deployed version":"Open in new tab",onClick:x=>{ENV.EPICSHOP_DEPLOYED&&x.preventDefault()},children:r.jsx(C,{name:"ExternalLink"})})}):null]})}var w="Popover",[M,xr]=le(w,[k]),N=k(),[_e,h]=M(w),H=e=>{const{__scopePopover:o,children:t,open:n,defaultOpen:i,onOpenChange:s,modal:a=!1}=e,l=N(o),c=p.useRef(null),[u,d]=p.useState(!1),[f=!1,m]=fe({prop:n,defaultProp:i,onChange:s});return r.jsx(me,{...l,children:r.jsx(_e,{scope:o,contentId:xe(),triggerRef:c,open:f,onOpenChange:m,onOpenToggle:p.useCallback(()=>m(x=>!x),[m]),hasCustomAnchor:u,onCustomAnchorAdd:p.useCallback(()=>d(!0),[]),onCustomAnchorRemove:p.useCallback(()=>d(!1),[]),modal:a,children:t})})};H.displayName=w;var U="PopoverAnchor",Ie=p.forwardRef((e,o)=>{const{__scopePopover:t,...n}=e,i=h(U,t),s=N(t),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=i;return p.useEffect(()=>(a(),()=>l()),[a,l]),r.jsx(_,{...s,...n,ref:o})});Ie.displayName=U;var V="PopoverTrigger",Y=p.forwardRef((e,o)=>{const{__scopePopover:t,...n}=e,i=h(V,t),s=N(t),a=I(o,i.triggerRef),l=r.jsx(L.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":W(i.open),...n,ref:a,onClick:j(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:r.jsx(_,{asChild:!0,...s,children:l})});Y.displayName=V;var y="PopoverPortal",[Le,Fe]=M(y,{forceMount:void 0}),B=e=>{const{__scopePopover:o,forceMount:t,children:n,container:i}=e,s=h(y,o);return r.jsx(Le,{scope:o,forceMount:t,children:r.jsx(F,{present:t||s.open,children:r.jsx(Ce,{asChild:!0,container:i,children:n})})})};B.displayName=y;var g="PopoverContent",G=p.forwardRef((e,o)=>{const t=Fe(g,e.__scopePopover),{forceMount:n=t.forceMount,...i}=e,s=h(g,e.__scopePopover);return r.jsx(F,{present:n||s.open,children:s.modal?r.jsx($e,{...i,ref:o}):r.jsx(Te,{...i,ref:o})})});G.displayName=g;var $e=p.forwardRef((e,o)=>{const t=h(g,e.__scopePopover),n=p.useRef(null),i=I(o,n),s=p.useRef(!1);return p.useEffect(()=>{const a=n.current;if(a)return Pe(a)},[]),r.jsx(je,{as:ce,allowPinchZoom:!0,children:r.jsx(q,{...e,ref:i,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:j(e.onCloseAutoFocus,a=>{var l;a.preventDefault(),s.current||(l=t.triggerRef.current)==null||l.focus()}),onPointerDownOutside:j(e.onPointerDownOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:j(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),Te=p.forwardRef((e,o)=>{const t=h(g,e.__scopePopover),n=p.useRef(!1),i=p.useRef(!1);return r.jsx(q,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(n.current||(l=t.triggerRef.current)==null||l.focus(),s.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:s=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;((u=t.triggerRef.current)==null?void 0:u.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),q=p.forwardRef((e,o)=>{const{__scopePopover:t,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...f}=e,m=h(g,t),x=N(t);return Ne(),r.jsx(be,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:s,children:r.jsx(pe,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>m.onOpenChange(!1),children:r.jsx(ue,{"data-state":W(m.open),role:"dialog",id:m.contentId,...x,...f,ref:o,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),K="PopoverClose",Me=p.forwardRef((e,o)=>{const{__scopePopover:t,...n}=e,i=h(K,t);return r.jsx(L.button,{type:"button",...n,ref:o,onClick:j(e.onClick,()=>i.onOpenChange(!1))})});Me.displayName=K;var He="PopoverArrow",Ue=p.forwardRef((e,o)=>{const{__scopePopover:t,...n}=e,i=N(t);return r.jsx(de,{...i,...n,ref:o})});Ue.displayName=He;function W(e){return e?"open":"closed"}var Ve=H,Ye=Y,Be=B,Ge=G;function qe({diffFilesPromise:e}){var l,c;const o=P(),[t,n]=p.useState(!1),i=p.useRef(null);function s(){n(!1)}const a=(l=o.playground)==null?void 0:l.appName;return r.jsx(r.Fragment,{children:r.jsxs(Ve,{open:t,onOpenChange:n,children:[r.jsx(Ye,{asChild:!0,children:r.jsxs("button",{className:"flex h-full items-center gap-1 border-r px-6 py-3 font-mono text-sm uppercase","aria-label":"Relevant Files",children:[r.jsx(C,{name:"Files"}),"Files"]})}),r.jsx(Be,{children:r.jsx(Ge,{ref:i,className:"slideRightContent lg:slideUpContent invert-theme z-10 select-none rounded bg-background px-9 py-8 text-foreground",align:"start",sideOffset:5,children:r.jsxs("div",{className:"launch-editor-wrapper",children:[r.jsx("strong",{className:"inline-block px-2 pb-4 font-semibold uppercase",children:"Relevant Files"}),o.problem&&((c=o.playground)==null?void 0:c.appName)!==o.problem.name?r.jsx("div",{className:"mb-2 rounded p-1 font-mono font-medium",children:r.jsx(D,{appName:o.problem.name})}):null,r.jsx("div",{id:"files",children:r.jsx(p.Suspense,{fallback:r.jsx(S,{content:"Loading diff",children:r.jsx("div",{className:"flex justify-center",children:r.jsx(C,{name:"Refresh",className:"h-8 w-8 animate-spin"})})}),children:r.jsx(ge,{resolve:e,errorElement:r.jsx("div",{className:"text-foreground-danger",children:"Something went wrong."}),children:u=>{if(!u)return r.jsx("p",{className:"text-foreground-danger",children:"Unable to determine diff"});if(typeof u=="string")return r.jsx("p",{className:"text-foreground-danger",children:u});if(!u.length)return r.jsx("p",{children:"No files changed"});const d=a||ENV.EPICSHOP_GITHUB_ROOT?{}:{title:"You must 'Set to Playground' before opening a file",className:"not-allowed"};return r.jsxs("ul",{...d,children:[u.length>1&&!ENV.EPICSHOP_DEPLOYED?r.jsx("div",{className:"mb-2 border-b border-b-gray-50 border-opacity-50 pb-2 font-sans",children:r.jsx(b,{appFile:u.map(f=>`${f.path},${f.line},1`),appName:"playground",onUpdate:s,children:r.jsx("p",{children:"Open All Files"})})}):null,u.map(f=>{var m;return r.jsx("li",{"data-state":f.status,children:r.jsx(b,{appFile:`${f.path},${f.line},1`,appName:ENV.EPICSHOP_DEPLOYED?((m=o.problem)==null?void 0:m.name)??"playground":"playground",onUpdate:s,children:r.jsx("code",{children:f.path})})},f.path)})]})}})})})]})})})]})})}function z(e,o){var a;const t=(e==null?void 0:e.exerciseStepApp.exerciseNumber.toString().padStart(2,"0"))??"00",n=(e==null?void 0:e.exerciseStepApp.stepNumber.toString().padStart(2,"0"))??"00",i={problem:"💪",solution:"🏁"}[(e==null?void 0:e.type)??"problem"],s=((a=e==null?void 0:e[e.type])==null?void 0:a.title)??"N/A";return{emoji:i,stepNumber:n,title:s,exerciseNumber:t,exerciseTitle:(e==null?void 0:e.exerciseTitle)??"Unknown exercise",workshopTitle:o,type:(e==null?void 0:e.type)??"problem"}}const hr=({data:e,matches:o,params:t})=>{var u;const n=(u=o.find(d=>d.id==="root"))==null?void 0:u.data;if(!e||!n)return[{title:"🦉 | Error"}];const{emoji:i,stepNumber:s,title:a,exerciseNumber:l,exerciseTitle:c}=z(e);return ne({title:`${i} | ${s}. ${a} | ${l}. ${c} | ${n.workshopTitle}`,description:`${t.type} step for exercise ${l}. ${c}`,ogTitle:a,ogDescription:`${c} step ${Number(s)} ${t.type}`,instructor:n.instructor,requestInfo:n.requestInfo})};function vr(){var n;const e=P(),o=p.useRef(null),t=z(e);return ee({watchPaths:[`${e.exerciseStepApp.relativePath}/README.mdx`]}),r.jsx("div",{className:"flex max-w-full flex-grow flex-col",children:r.jsxs("main",{className:"flex flex-grow flex-col sm:grid sm:h-full sm:min-h-[800px] sm:grid-cols-1 sm:grid-rows-2 md:min-h-[unset] lg:grid-cols-2 lg:grid-rows-1",children:[r.jsxs("div",{className:"relative flex flex-col sm:col-span-1 sm:row-span-1 sm:h-full lg:border-r",children:[r.jsx("h1",{className:"h-14 border-b pl-10 pr-5 text-sm font-medium leading-tight",children:r.jsxs("div",{className:"flex h-14 flex-wrap items-center justify-between gap-x-2 py-2",children:[r.jsxs("div",{className:"flex items-center justify-start gap-x-2 uppercase",children:[r.jsxs(v,{to:`/${t.exerciseNumber}`,className:"hover:underline",children:[t.exerciseNumber,". ",t.exerciseTitle]}),"/",r.jsxs(v,{to:".",className:"hover:underline",children:[t.stepNumber,". ",t.title," (",t.emoji," ",t.type,")"]})]}),e.problem&&((n=e.playground)==null?void 0:n.appName)!==e.problem.name?r.jsx("div",{className:"hidden md:block",children:r.jsx(D,{appName:e.problem.name})}):null]})}),r.jsxs("article",{id:e.articleId,className:"shadow-on-scrollbox flex h-full w-full max-w-none flex-1 scroll-pt-6 flex-col justify-between space-y-6 overflow-y-auto p-2 scrollbar-thin scrollbar-thumb-scrollbar sm:p-10 sm:pt-8",children:[e.exerciseStepApp.instructionsCode?r.jsx(ye,{inBrowserBrowserRef:o}):r.jsx("div",{className:"flex h-full items-center justify-center text-lg",children:r.jsx("p",{children:"No instructions yet..."})}),r.jsxs("div",{className:"mt-auto flex justify-between",children:[e.prevStepLink?r.jsx(v,{to:e.prevStepLink.to,"aria-label":"Previous Step",prefetch:"intent",children:"← Previous"}):r.jsx("span",{}),e.nextStepLink?r.jsx(v,{to:e.nextStepLink.to,"aria-label":"Next Step",prefetch:"intent",children:"Next →"}):r.jsx("span",{})]})]},e.articleId),r.jsx(Z,{elementQuery:`#${e.articleId}`},`scroll-${e.articleId}`),e.type==="solution"?r.jsx(oe,{type:"step",exerciseNumber:e.exerciseStepApp.exerciseNumber,stepNumber:e.exerciseStepApp.stepNumber,className:"h-14 border-t px-6"}):null,r.jsxs("div",{className:"flex h-16 justify-between border-b-4 border-t lg:border-b-0",children:[r.jsx("div",{children:r.jsx("div",{className:"h-full",children:r.jsx(qe,{diffFilesPromise:e.diffFiles})})}),r.jsx(te,{appName:e.exerciseStepApp.name,relativePath:e.exerciseStepApp.relativePath}),r.jsx(X,{prev:e.prevStepLink?{to:e.prevStepLink.to,"aria-label":"Previous Step"}:null,next:e.nextStepLink?{to:e.nextStepLink.to,"aria-label":"Next Step"}:null})]})]}),r.jsx(Q,{})]})})}function gr(){return r.jsx(J,{statusHandlers:{404:()=>r.jsx("p",{children:"Sorry, we couldn't find an app here."})}})}export{gr as ErrorBoundary,vr as default,hr as meta};
|
|
2
|
+
//# sourceMappingURL=_layout-DTAM9xh5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_layout-Bpho30KN.js","sources":["../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/__shared/step-mdx.tsx","../../../../../node_modules/@radix-ui/react-popover/dist/index.mjs","../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/__shared/touched-files.tsx","../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/_layout.tsx"],"sourcesContent":["import {\n\tLink,\n\tuseLoaderData,\n\tuseSearchParams,\n\ttype LinkProps,\n} from '@remix-run/react'\nimport * as React from 'react'\nimport { type PropsWithChildren } from 'react'\nimport iconsSvg from '#app/assets/icons.svg'\nimport { EpicVideoInfoProvider } from '#app/components/epic-video.tsx'\nimport { Icon } from '#app/components/icons.tsx'\nimport { type InBrowserBrowserRef } from '#app/components/in-browser-browser.tsx'\nimport { SimpleTooltip } from '#app/components/ui/tooltip.tsx'\nimport { LaunchEditor } from '#app/routes/launch-editor.tsx'\nimport { Mdx } from '#app/utils/mdx.tsx'\nimport { cn, getBaseUrl } from '#app/utils/misc.tsx'\nimport { useRequestInfo } from '#app/utils/request-info.ts'\nimport { type loader } from '../_layout.tsx'\n\ntype StepContextType = {\n\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n}\nconst StepContext = React.createContext<StepContextType | null>(null)\n\nfunction useStepContext() {\n\tconst context = React.useContext(StepContext)\n\tif (!context) {\n\t\tthrow new Error('useStepContext must be used within a StepContext.Provider')\n\t}\n\treturn context\n}\n\nfunction StepContextProvider({\n\tchildren,\n\tinBrowserBrowserRef,\n}: {\n\tchildren: React.ReactNode\n\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n}) {\n\treturn (\n\t\t<StepContext.Provider value={{ inBrowserBrowserRef }}>\n\t\t\t{children}\n\t\t</StepContext.Provider>\n\t)\n}\n\nconst stepMdxComponents = {\n\tDiffLink,\n\tPrevDiffLink,\n\tNextDiffLink,\n\tInlineFile,\n\tLinkToApp,\n}\n\nexport function StepMdx({\n\tinBrowserBrowserRef,\n}: {\n\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n}) {\n\tconst data = useLoaderData<typeof loader>()\n\tif (!data.exerciseStepApp.instructionsCode) return null\n\treturn (\n\t\t<StepContextProvider inBrowserBrowserRef={inBrowserBrowserRef}>\n\t\t\t<EpicVideoInfoProvider epicVideoInfosPromise={data.epicVideoInfosPromise}>\n\t\t\t\t<div className=\"prose dark:prose-invert sm:prose-lg\">\n\t\t\t\t\t<Mdx\n\t\t\t\t\t\tcode={data.exerciseStepApp.instructionsCode}\n\t\t\t\t\t\tcomponents={stepMdxComponents}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</EpicVideoInfoProvider>\n\t\t</StepContextProvider>\n\t)\n}\n\nfunction withParam(\n\tsearchParams: URLSearchParams,\n\tkey: string,\n\tvalue: string | null,\n) {\n\tconst newSearchParams = new URLSearchParams(searchParams)\n\tif (value === null) {\n\t\tnewSearchParams.delete(key)\n\t} else {\n\t\tnewSearchParams.set(key, value)\n\t}\n\treturn newSearchParams\n}\n\nfunction NextDiffLink({\n\tapp = 0,\n\tfullPage = false,\n\tchildren,\n}: {\n\tapp: number\n\tfullPage?: boolean\n\tchildren?: React.ReactNode\n}) {\n\treturn (\n\t\t<DiffLink app1={app} app2={app + 1} fullPage={fullPage}>\n\t\t\t{children}\n\t\t</DiffLink>\n\t)\n}\n\nfunction PrevDiffLink({\n\tapp = -1,\n\tfullPage = false,\n\tchildren,\n}: {\n\tapp: number\n\tfullPage?: boolean\n\tchildren?: React.ReactNode\n}) {\n\treturn (\n\t\t<DiffLink app1={app} app2={app + 1} fullPage={fullPage}>\n\t\t\t{children}\n\t\t</DiffLink>\n\t)\n}\n\nfunction DiffLink({\n\tapp1 = 0,\n\tapp2 = 1,\n\tchildren,\n\tfullPage = false,\n\tto,\n}: {\n\tapp1?: string | number | null\n\tapp2?: string | number | null\n\tto?: string\n\tfullPage?: boolean\n\tchildren?: React.ReactNode\n}) {\n\tconst data = useLoaderData<typeof loader>()\n\tif (!to && !app1 && !app2) {\n\t\treturn (\n\t\t\t// @ts-expect-error 🤷♂️\n\t\t\t<callout-danger className=\"notification\">\n\t\t\t\t<div className=\"title\">DiffLink Error: invalid input</div>\n\t\t\t\t{/* @ts-expect-error 🤷♂️ */}\n\t\t\t</callout-danger>\n\t\t)\n\t}\n\n\tfunction getAppName(input: typeof app1) {\n\t\tif (typeof input === 'number') {\n\t\t\tconst stepIndex = data.exerciseIndex + input\n\t\t\treturn data.allApps[stepIndex]?.name\n\t\t}\n\t\tif (!input) return null\n\t\tfor (const { name, stepName } of data.allApps) {\n\t\t\tif (input === name || input === stepName) {\n\t\t\t\treturn name\n\t\t\t}\n\t\t}\n\t\treturn null\n\t}\n\n\tif (to) {\n\t\tconst params = new URLSearchParams(to)\n\t\tapp1 = params.get('app1')\n\t\tapp2 = params.get('app2')\n\t}\n\tconst app1Name = getAppName(app1)\n\tconst app2Name = getAppName(app2)\n\tif (!app1Name || !app2Name) {\n\t\treturn (\n\t\t\t// @ts-expect-error 🤷♂️\n\t\t\t<callout-danger className=\"notification\">\n\t\t\t\t<div className=\"title\">DiffLink Error: invalid input</div>\n\t\t\t\t{!app1Name && <div>app1: \"{app1}\" is not a valid app name</div>}\n\t\t\t\t{!app2Name && <div>app2: \"{app2}\" is not a valid app name</div>}\n\t\t\t\t{/* @ts-expect-error 🤷♂️ */}\n\t\t\t</callout-danger>\n\t\t)\n\t}\n\n\tif (!to) {\n\t\tto = `app1=${app1Name}&app2=${app2Name}`\n\t}\n\tconst pathToDiff = fullPage\n\t\t? `/diff?${to}`\n\t\t: `?${decodeURIComponent(\n\t\t\t\twithParam(new URLSearchParams(), 'preview', `diff&${to}`).toString(),\n\t\t\t)}`\n\n\tif (!children) {\n\t\tchildren = (\n\t\t\t<span>\n\t\t\t\tGo to Diff {fullPage ? '' : 'Preview'} from: <code>{app1Name}</code> to:{' '}\n\t\t\t\t<code>{app2Name}</code>\n\t\t\t</span>\n\t\t)\n\t}\n\n\treturn <Link to={pathToDiff}>{children}</Link>\n}\n\nfunction InlineFile({\n\tfile,\n\ttype = 'playground',\n\tchildren = <code>{file}</code>,\n\t...props\n}: Omit<PropsWithChildren<typeof LaunchEditor>, 'appName'> & {\n\tfile: string\n\ttype?: 'playground' | 'solution' | 'problem'\n}) {\n\tconst data = useLoaderData<typeof loader>()\n\tconst app = data[type] || data[data.type]\n\n\tconst info = (\n\t\t<div className=\"launch-editor-button-wrapper flex underline underline-offset-4\">\n\t\t\t{children}{' '}\n\t\t\t<svg height={24} width={24}>\n\t\t\t\t<use href={`${iconsSvg}#Keyboard`} />\n\t\t\t</svg>\n\t\t</div>\n\t)\n\n\treturn ENV.EPICSHOP_DEPLOYED && app ? (\n\t\t<div className=\"inline-block grow\">\n\t\t\t<LaunchEditor appFile={file} appName={app.name} {...props}>\n\t\t\t\t{info}\n\t\t\t</LaunchEditor>\n\t\t</div>\n\t) : app ? (\n\t\t<div className=\"inline-block grow\">\n\t\t\t<LaunchEditor appFile={file} appName={app.name} {...props}>\n\t\t\t\t{info}\n\t\t\t</LaunchEditor>\n\t\t</div>\n\t) : type === 'playground' ? (\n\t\t// playground does not exist yet\n\t\t<SimpleTooltip content=\"You must 'Set to Playground' before opening a file\">\n\t\t\t<div className=\"inline-block grow cursor-not-allowed\">{info}</div>\n\t\t</SimpleTooltip>\n\t) : (\n\t\t<>children</>\n\t)\n}\n\nfunction getPreviewType(\n\tpreview: string | null,\n): 'playground' | 'problem' | 'solution' {\n\tif (preview === 'problem') return 'problem'\n\tif (preview === 'solution') return 'solution'\n\treturn 'playground'\n}\n\nfunction LinkToApp({\n\tto: appTo,\n\tchildren = <code>{appTo.toString()}</code>,\n\t...props\n}: LinkProps) {\n\tconst [searchParams] = useSearchParams()\n\tconst to = `?${withParam(\n\t\tsearchParams,\n\t\t'pathname',\n\t\tappTo.toString(),\n\t).toString()}`\n\tconst data = useLoaderData<typeof loader>()\n\tconst type = getPreviewType(searchParams.get('preview'))\n\tconst requestInfo = useRequestInfo()\n\tconst app = data[type]\n\tconst previewAppUrl =\n\t\tapp?.dev.type === 'script'\n\t\t\t? getBaseUrl({\n\t\t\t\t\tdomain: requestInfo.domain,\n\t\t\t\t\tport: app.dev.portNumber,\n\t\t\t\t})\n\t\t\t: data.playground?.dev.type === 'browser'\n\t\t\t\t? data.playground.dev.pathname\n\t\t\t\t: null\n\tconst { inBrowserBrowserRef } = useStepContext()\n\tconst href = previewAppUrl\n\t\t? previewAppUrl.slice(0, -1) + appTo.toString()\n\t\t: null\n\treturn (\n\t\t<div className=\"inline-flex items-center justify-between gap-1\">\n\t\t\t<Link\n\t\t\t\tto={to}\n\t\t\t\t{...props}\n\t\t\t\tclassName={cn(props.className, {\n\t\t\t\t\t'cursor-not-allowed': ENV.EPICSHOP_DEPLOYED,\n\t\t\t\t})}\n\t\t\t\ttitle={\n\t\t\t\t\tENV.EPICSHOP_DEPLOYED\n\t\t\t\t\t\t? 'Cannot link to app in deployed version'\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\tonClick={(event) => {\n\t\t\t\t\tif (ENV.EPICSHOP_DEPLOYED) event.preventDefault()\n\n\t\t\t\t\tprops.onClick?.(event)\n\t\t\t\t\tinBrowserBrowserRef.current?.handleExtrnalNavigation(appTo.toString())\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Link>\n\t\t\t{href ? (\n\t\t\t\t<SimpleTooltip content=\"Open in new tab\">\n\t\t\t\t\t<a\n\t\t\t\t\t\thref={href}\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\t\tclassName={cn('flex aspect-square items-center justify-center', {\n\t\t\t\t\t\t\t'cursor-not-allowed': ENV.EPICSHOP_DEPLOYED,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\tENV.EPICSHOP_DEPLOYED\n\t\t\t\t\t\t\t\t? 'Cannot link to app in deployed version'\n\t\t\t\t\t\t\t\t: 'Open in new tab'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonClick={(event) => {\n\t\t\t\t\t\t\tif (ENV.EPICSHOP_DEPLOYED) event.preventDefault()\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon name=\"ExternalLink\" />\n\t\t\t\t\t</a>\n\t\t\t\t</SimpleTooltip>\n\t\t\t) : null}\n\t\t</div>\n\t)\n}\n","\"use client\";\n\n// packages/react/popover/src/Popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as Popover from '@radix-ui/react-popover'\nimport { type SerializeFrom } from '@remix-run/node'\nimport { Await, useLoaderData } from '@remix-run/react'\nimport * as React from 'react'\nimport { Icon } from '#app/components/icons.tsx'\nimport { SimpleTooltip } from '#app/components/ui/tooltip.tsx'\nimport { LaunchEditor } from '#app/routes/launch-editor.tsx'\nimport { SetAppToPlayground } from '#app/routes/set-playground.tsx'\nimport { type loader } from '../_layout.tsx'\n\nfunction TouchedFiles({\n\tdiffFilesPromise,\n}: {\n\tdiffFilesPromise: SerializeFrom<typeof loader>['diffFiles']\n}) {\n\tconst data = useLoaderData<typeof loader>()\n\n\tconst [open, setOpen] = React.useState(false)\n\tconst contentRef = React.useRef<HTMLDivElement>(null)\n\n\tfunction handleLaunchUpdate() {\n\t\tsetOpen(false)\n\t}\n\n\tconst appName = data.playground?.appName\n\n\treturn (\n\t\t<>\n\t\t\t<Popover.Root open={open} onOpenChange={setOpen}>\n\t\t\t\t<Popover.Trigger asChild>\n\t\t\t\t\t<button\n\t\t\t\t\t\tclassName=\"flex h-full items-center gap-1 border-r px-6 py-3 font-mono text-sm uppercase\"\n\t\t\t\t\t\taria-label=\"Relevant Files\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon name=\"Files\" />\n\t\t\t\t\t\tFiles\n\t\t\t\t\t</button>\n\t\t\t\t</Popover.Trigger>\n\t\t\t\t<Popover.Portal>\n\t\t\t\t\t<Popover.Content\n\t\t\t\t\t\tref={contentRef}\n\t\t\t\t\t\tclassName=\"slideRightContent lg:slideUpContent invert-theme z-10 select-none rounded bg-background px-9 py-8 text-foreground\"\n\t\t\t\t\t\talign=\"start\"\n\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"launch-editor-wrapper\">\n\t\t\t\t\t\t\t<strong className=\"inline-block px-2 pb-4 font-semibold uppercase\">\n\t\t\t\t\t\t\t\tRelevant Files\n\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t{data.problem &&\n\t\t\t\t\t\t\tdata.playground?.appName !== data.problem.name ? (\n\t\t\t\t\t\t\t\t<div className=\"mb-2 rounded p-1 font-mono font-medium\">\n\t\t\t\t\t\t\t\t\t<SetAppToPlayground appName={data.problem.name} />\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\t<div id=\"files\">\n\t\t\t\t\t\t\t\t<React.Suspense\n\t\t\t\t\t\t\t\t\tfallback={\n\t\t\t\t\t\t\t\t\t\t<SimpleTooltip content=\"Loading diff\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex justify-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon name=\"Refresh\" className=\"h-8 w-8 animate-spin\" />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Await\n\t\t\t\t\t\t\t\t\t\tresolve={diffFilesPromise}\n\t\t\t\t\t\t\t\t\t\terrorElement={\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-foreground-danger\">\n\t\t\t\t\t\t\t\t\t\t\t\tSomething went wrong.\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{(diffFiles) => {\n\t\t\t\t\t\t\t\t\t\t\tif (!diffFiles) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-foreground-danger\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tUnable to determine diff\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif (typeof diffFiles === 'string') {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-foreground-danger\">{diffFiles}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif (!diffFiles.length) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn <p>No files changed</p>\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tconst props =\n\t\t\t\t\t\t\t\t\t\t\t\tappName || ENV.EPICSHOP_GITHUB_ROOT\n\t\t\t\t\t\t\t\t\t\t\t\t\t? {}\n\t\t\t\t\t\t\t\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"You must 'Set to Playground' before opening a file\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName: 'not-allowed',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<ul {...props}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{diffFiles.length > 1 && !ENV.EPICSHOP_DEPLOYED ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"mb-2 border-b border-b-gray-50 border-opacity-50 pb-2 font-sans\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<LaunchEditor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappFile={diffFiles.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(file) => `${file.path},${file.line},1`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappName=\"playground\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonUpdate={handleLaunchUpdate}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Open All Files</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</LaunchEditor>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{diffFiles.map((file) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li key={file.path} data-state={file.status}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<LaunchEditor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappFile={`${file.path},${file.line},1`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappName={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tENV.EPICSHOP_DEPLOYED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? data.problem?.name ?? 'playground'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'playground'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonUpdate={handleLaunchUpdate}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<code>{file.path}</code>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</LaunchEditor>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t</Await>\n\t\t\t\t\t\t\t\t</React.Suspense>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Popover.Content>\n\t\t\t\t</Popover.Portal>\n\t\t\t</Popover.Root>\n\t\t</>\n\t)\n}\n\nexport default TouchedFiles\n","import { ElementScrollRestoration } from '@epic-web/restore-scroll'\nimport {\n\tgetAppDisplayName,\n\tgetAppPageRoute,\n\tgetApps,\n\tgetExerciseApp,\n\tgetNextExerciseApp,\n\tgetPrevExerciseApp,\n\tisExerciseStepApp,\n\tisPlaygroundApp,\n\trequireExercise,\n\trequireExerciseApp,\n\ttype App,\n\ttype ExerciseStepApp,\n} from '@epic-web/workshop-utils/apps.server'\nimport { getWorkshopConfig } from '@epic-web/workshop-utils/config.server'\nimport {\n\tcombineServerTimings,\n\tgetServerTimeHeader,\n\tmakeTimings,\n} from '@epic-web/workshop-utils/timing.server'\nimport {\n\tunstable_data as data,\n\tredirect,\n\ttype HeadersFunction,\n\ttype LoaderFunctionArgs,\n\ttype MetaFunction,\n\ttype SerializeFrom,\n} from '@remix-run/node'\nimport { Link, Outlet, useLoaderData } from '@remix-run/react'\nimport slugify from '@sindresorhus/slugify'\nimport { useRef } from 'react'\nimport { GeneralErrorBoundary } from '#app/components/error-boundary.tsx'\nimport { type InBrowserBrowserRef } from '#app/components/in-browser-browser.tsx'\nimport { NavChevrons } from '#app/components/nav-chevrons.tsx'\nimport { useRevalidationWS } from '#app/components/revalidation-ws.js'\nimport { type loader as rootLoader } from '#app/root.tsx'\nimport { EditFileOnGitHub } from '#app/routes/launch-editor.tsx'\nimport { ProgressToggle } from '#app/routes/progress.tsx'\nimport { SetAppToPlayground } from '#app/routes/set-playground.tsx'\nimport { getDiffFiles } from '#app/utils/diff.server.js'\nimport { getEpicVideoInfos } from '#app/utils/epic-api.ts'\nimport { getSeoMetaTags } from '#app/utils/seo.js'\nimport { StepMdx } from './__shared/step-mdx.tsx'\nimport TouchedFiles from './__shared/touched-files.tsx'\n\nfunction pageTitle(\n\tdata: SerializeFrom<typeof loader> | undefined,\n\tworkshopTitle?: string,\n) {\n\tconst exerciseNumber =\n\t\tdata?.exerciseStepApp.exerciseNumber.toString().padStart(2, '0') ?? '00'\n\tconst stepNumber =\n\t\tdata?.exerciseStepApp.stepNumber.toString().padStart(2, '0') ?? '00'\n\tconst emoji = (\n\t\t{\n\t\t\tproblem: '💪',\n\t\t\tsolution: '🏁',\n\t\t} as const\n\t)[data?.type ?? 'problem']\n\tconst title = data?.[data.type]?.title ?? 'N/A'\n\treturn {\n\t\temoji,\n\t\tstepNumber,\n\t\ttitle,\n\t\texerciseNumber,\n\t\texerciseTitle: data?.exerciseTitle ?? 'Unknown exercise',\n\t\tworkshopTitle,\n\t\ttype: data?.type ?? 'problem',\n\t}\n}\n\nexport const meta: MetaFunction<typeof loader, { root: typeof rootLoader }> = ({\n\tdata,\n\tmatches,\n\tparams,\n}) => {\n\tconst rootData = matches.find((m) => m.id === 'root')?.data\n\tif (!data || !rootData) return [{ title: '🦉 | Error' }]\n\tconst { emoji, stepNumber, title, exerciseNumber, exerciseTitle } =\n\t\tpageTitle(data)\n\n\treturn getSeoMetaTags({\n\t\ttitle: `${emoji} | ${stepNumber}. ${title} | ${exerciseNumber}. ${exerciseTitle} | ${rootData.workshopTitle}`,\n\t\tdescription: `${params.type} step for exercise ${exerciseNumber}. ${exerciseTitle}`,\n\t\togTitle: title,\n\t\togDescription: `${exerciseTitle} step ${Number(stepNumber)} ${params.type}`,\n\t\tinstructor: rootData.instructor,\n\t\trequestInfo: rootData.requestInfo,\n\t})\n}\n\nexport async function loader({ request, params }: LoaderFunctionArgs) {\n\tconst timings = makeTimings('exerciseStepTypeLayoutLoader')\n\tconst url = new URL(request.url)\n\tconst { title: workshopTitle } = getWorkshopConfig()\n\tconst cacheOptions = { request, timings }\n\tconst exerciseStepApp = await requireExerciseApp(params, cacheOptions)\n\tconst exercise = await requireExercise(\n\t\texerciseStepApp.exerciseNumber,\n\t\tcacheOptions,\n\t)\n\tconst reqUrl = new URL(request.url)\n\n\tconst pathnameParam = reqUrl.searchParams.get('pathname')\n\tif (pathnameParam === '' || pathnameParam === '/') {\n\t\treqUrl.searchParams.delete('pathname')\n\t\tthrow redirect(reqUrl.toString())\n\t}\n\n\tconst problemApp = await getExerciseApp(\n\t\t{ ...params, type: 'problem' },\n\t\tcacheOptions,\n\t)\n\tconst solutionApp = await getExerciseApp(\n\t\t{ ...params, type: 'solution' },\n\t\tcacheOptions,\n\t)\n\n\tif (!problemApp && !solutionApp) {\n\t\tthrow new Response('Not found', { status: 404 })\n\t}\n\n\tconst allAppsFull = await getApps(cacheOptions)\n\tconst playgroundApp = allAppsFull.find(isPlaygroundApp)\n\n\tfunction getStepId(a: ExerciseStepApp) {\n\t\treturn (\n\t\t\ta.exerciseNumber * 1000 +\n\t\t\ta.stepNumber * 10 +\n\t\t\t(a.type === 'problem' ? 0 : 1)\n\t\t)\n\t}\n\n\tfunction getStepNameAndId(a: App) {\n\t\tif (isExerciseStepApp(a)) {\n\t\t\tconst exerciseNumberStr = String(a.exerciseNumber).padStart(2, '0')\n\t\t\tconst stepNumberStr = String(a.stepNumber).padStart(2, '0')\n\n\t\t\treturn {\n\t\t\t\tstepName: `${exerciseNumberStr}/${stepNumberStr}.${a.type}`,\n\t\t\t\tstepId: getStepId(a),\n\t\t\t}\n\t\t}\n\t\treturn { stepName: '', stepId: -1 }\n\t}\n\n\tconst allApps = allAppsFull\n\t\t.filter((a, i, ar) => ar.findIndex((b) => a.name === b.name) === i)\n\t\t.map((a) => ({\n\t\t\tdisplayName: getAppDisplayName(a, allAppsFull),\n\t\t\tname: a.name,\n\t\t\ttitle: a.title,\n\t\t\ttype: a.type,\n\t\t\t...getStepNameAndId(a),\n\t\t}))\n\n\tallApps.sort((a, b) => {\n\t\t// order them by their stepId\n\t\tif (a.stepId > 0 && b.stepId > 0) return a.stepId - b.stepId\n\n\t\t// non-step apps should come after step apps\n\t\tif (a.stepId > 0) return -1\n\t\tif (b.stepId > 0) return 1\n\n\t\treturn 0\n\t})\n\tconst exerciseId = getStepId(exerciseStepApp)\n\tconst exerciseIndex = allApps.findIndex((step) => step.stepId === exerciseId)\n\n\tconst exerciseApps = allAppsFull\n\t\t.filter(isExerciseStepApp)\n\t\t.filter((app) => app.exerciseNumber === exerciseStepApp.exerciseNumber)\n\tconst isLastStep =\n\t\texerciseApps[exerciseApps.length - 1]?.name === exerciseStepApp.name\n\tconst isFirstStep = exerciseApps[0]?.name === exerciseStepApp.name\n\n\tconst nextApp = await getNextExerciseApp(exerciseStepApp, cacheOptions)\n\tconst prevApp = await getPrevExerciseApp(exerciseStepApp, cacheOptions)\n\n\tconst articleId = `workshop-${slugify(workshopTitle)}-${\n\t\texercise.exerciseNumber\n\t}-${exerciseStepApp.stepNumber}-${exerciseStepApp.type}`\n\n\tconst subroute = url.pathname.split(\n\t\t`/exercise/${params.exerciseNumber}/${params.stepNumber}/${params.type}/`,\n\t)[1]\n\treturn data(\n\t\t{\n\t\t\tarticleId,\n\t\t\ttype: params.type as 'problem' | 'solution',\n\t\t\texerciseStepApp,\n\t\t\texerciseTitle: exercise.title,\n\t\t\tepicVideoInfosPromise: getEpicVideoInfos(exerciseStepApp.epicVideoEmbeds),\n\t\t\texerciseIndex,\n\t\t\tallApps,\n\t\t\tprevStepLink: isFirstStep\n\t\t\t\t? {\n\t\t\t\t\t\tto: `/exercise/${exerciseStepApp.exerciseNumber\n\t\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t\t.padStart(2, '0')}`,\n\t\t\t\t\t}\n\t\t\t\t: prevApp\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tto: getAppPageRoute(prevApp, {\n\t\t\t\t\t\t\t\tsubroute,\n\t\t\t\t\t\t\t\tsearchParams: url.searchParams,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t}\n\t\t\t\t\t: null,\n\t\t\tnextStepLink: isLastStep\n\t\t\t\t? {\n\t\t\t\t\t\tto: `/exercise/${exerciseStepApp.exerciseNumber\n\t\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t\t.padStart(2, '0')}/finished`,\n\t\t\t\t\t}\n\t\t\t\t: nextApp\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tto: getAppPageRoute(nextApp, {\n\t\t\t\t\t\t\t\tsubroute,\n\t\t\t\t\t\t\t\tsearchParams: url.searchParams,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t}\n\t\t\t\t\t: null,\n\t\t\tplayground: playgroundApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'playground',\n\t\t\t\t\t\tappName: playgroundApp.appName,\n\t\t\t\t\t\tname: playgroundApp.name,\n\t\t\t\t\t\tfullPath: playgroundApp.fullPath,\n\t\t\t\t\t\tdev: playgroundApp.dev,\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tproblem: problemApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'problem',\n\t\t\t\t\t\ttitle: problemApp.title,\n\t\t\t\t\t\tname: problemApp.name,\n\t\t\t\t\t\tfullPath: problemApp.fullPath,\n\t\t\t\t\t\tdev: problemApp.dev,\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tsolution: solutionApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'solution',\n\t\t\t\t\t\ttitle: solutionApp.title,\n\t\t\t\t\t\tname: solutionApp.name,\n\t\t\t\t\t\tfullPath: solutionApp.fullPath,\n\t\t\t\t\t\tdev: solutionApp.dev,\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tdiffFiles:\n\t\t\t\tproblemApp && solutionApp\n\t\t\t\t\t? getDiffFiles(problemApp, solutionApp, {\n\t\t\t\t\t\t\t...cacheOptions,\n\t\t\t\t\t\t\tforceFresh: url.searchParams.get('forceFresh') === 'diff',\n\t\t\t\t\t\t}).catch((e) => {\n\t\t\t\t\t\t\tconsole.error(e)\n\t\t\t\t\t\t\treturn 'There was a problem generating the diff (check the terminal output)'\n\t\t\t\t\t\t})\n\t\t\t\t\t: 'No diff available',\n\t\t} as const,\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'Server-Timing': combineServerTimings(loaderHeaders, parentHeaders),\n\t}\n\treturn headers\n}\n\nexport default function ExercisePartRoute() {\n\tconst data = useLoaderData<typeof loader>()\n\n\tconst inBrowserBrowserRef = useRef<InBrowserBrowserRef>(null)\n\n\tconst titleBits = pageTitle(data)\n\n\tuseRevalidationWS({\n\t\twatchPaths: [`${data.exerciseStepApp.relativePath}/README.mdx`],\n\t})\n\n\treturn (\n\t\t<div className=\"flex max-w-full flex-grow flex-col\">\n\t\t\t<main className=\"flex flex-grow flex-col sm:grid sm:h-full sm:min-h-[800px] sm:grid-cols-1 sm:grid-rows-2 md:min-h-[unset] lg:grid-cols-2 lg:grid-rows-1\">\n\t\t\t\t<div className=\"relative flex flex-col sm:col-span-1 sm:row-span-1 sm:h-full lg:border-r\">\n\t\t\t\t\t<h1 className=\"h-14 border-b pl-10 pr-5 text-sm font-medium leading-tight\">\n\t\t\t\t\t\t<div className=\"flex h-14 flex-wrap items-center justify-between gap-x-2 py-2\">\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-start gap-x-2 uppercase\">\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\tto={`/${titleBits.exerciseNumber}`}\n\t\t\t\t\t\t\t\t\tclassName=\"hover:underline\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{titleBits.exerciseNumber}. {titleBits.exerciseTitle}\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t{'/'}\n\t\t\t\t\t\t\t\t<Link to=\".\" className=\"hover:underline\">\n\t\t\t\t\t\t\t\t\t{titleBits.stepNumber}. {titleBits.title}\n\t\t\t\t\t\t\t\t\t{' ('}\n\t\t\t\t\t\t\t\t\t{titleBits.emoji} {titleBits.type}\n\t\t\t\t\t\t\t\t\t{')'}\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{data.problem &&\n\t\t\t\t\t\t\tdata.playground?.appName !== data.problem.name ? (\n\t\t\t\t\t\t\t\t<div className=\"hidden md:block\">\n\t\t\t\t\t\t\t\t\t<SetAppToPlayground appName={data.problem.name} />\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</h1>\n\t\t\t\t\t<article\n\t\t\t\t\t\tid={data.articleId}\n\t\t\t\t\t\tkey={data.articleId}\n\t\t\t\t\t\tclassName=\"shadow-on-scrollbox flex h-full w-full max-w-none flex-1 scroll-pt-6 flex-col justify-between space-y-6 overflow-y-auto p-2 scrollbar-thin scrollbar-thumb-scrollbar sm:p-10 sm:pt-8\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{data.exerciseStepApp.instructionsCode ? (\n\t\t\t\t\t\t\t<StepMdx inBrowserBrowserRef={inBrowserBrowserRef} />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"flex h-full items-center justify-center text-lg\">\n\t\t\t\t\t\t\t\t<p>No instructions yet...</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<div className=\"mt-auto flex justify-between\">\n\t\t\t\t\t\t\t{data.prevStepLink ? (\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\tto={data.prevStepLink.to}\n\t\t\t\t\t\t\t\t\taria-label=\"Previous Step\"\n\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t← Previous\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<span />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{data.nextStepLink ? (\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\tto={data.nextStepLink.to}\n\t\t\t\t\t\t\t\t\taria-label=\"Next Step\"\n\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tNext →\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<span />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</article>\n\t\t\t\t\t<ElementScrollRestoration\n\t\t\t\t\t\telementQuery={`#${data.articleId}`}\n\t\t\t\t\t\tkey={`scroll-${data.articleId}`}\n\t\t\t\t\t/>\n\t\t\t\t\t{data.type === 'solution' ? (\n\t\t\t\t\t\t<ProgressToggle\n\t\t\t\t\t\t\ttype=\"step\"\n\t\t\t\t\t\t\texerciseNumber={data.exerciseStepApp.exerciseNumber}\n\t\t\t\t\t\t\tstepNumber={data.exerciseStepApp.stepNumber}\n\t\t\t\t\t\t\tclassName=\"h-14 border-t px-6\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : null}\n\t\t\t\t\t<div className=\"flex h-16 justify-between border-b-4 border-t lg:border-b-0\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<div className=\"h-full\">\n\t\t\t\t\t\t\t\t<TouchedFiles diffFilesPromise={data.diffFiles} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<EditFileOnGitHub\n\t\t\t\t\t\t\tappName={data.exerciseStepApp.name}\n\t\t\t\t\t\t\trelativePath={data.exerciseStepApp.relativePath}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<NavChevrons\n\t\t\t\t\t\t\tprev={\n\t\t\t\t\t\t\t\tdata.prevStepLink\n\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\tto: data.prevStepLink.to,\n\t\t\t\t\t\t\t\t\t\t\t'aria-label': 'Previous Step',\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tnext={\n\t\t\t\t\t\t\t\tdata.nextStepLink\n\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\tto: data.nextStepLink.to,\n\t\t\t\t\t\t\t\t\t\t\t'aria-label': 'Next Step',\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<Outlet />\n\t\t\t</main>\n\t\t</div>\n\t)\n}\n\nexport function ErrorBoundary() {\n\treturn (\n\t\t<GeneralErrorBoundary\n\t\t\tstatusHandlers={{\n\t\t\t\t404: () => <p>Sorry, we couldn't find an app here.</p>,\n\t\t\t}}\n\t\t/>\n\t)\n}\n"],"names":["StepContext","React.createContext","useStepContext","context","React.useContext","StepContextProvider","children","inBrowserBrowserRef","jsx","stepMdxComponents","DiffLink","PrevDiffLink","NextDiffLink","InlineFile","LinkToApp","StepMdx","data","useLoaderData","EpicVideoInfoProvider","Mdx","withParam","searchParams","key","value","newSearchParams","app","fullPage","app1","app2","to","getAppName","input","stepIndex","_a","name","stepName","params","app1Name","app2Name","jsxs","pathToDiff","Link","file","type","props","info","iconsSvg","LaunchEditor","SimpleTooltip","getPreviewType","preview","appTo","useSearchParams","requestInfo","useRequestInfo","previewAppUrl","getBaseUrl","href","cn","event","_b","Icon","POPOVER_NAME","createPopoverContext","createPopoverScope","createContextScope","createPopperScope","usePopperScope","PopoverProvider","usePopoverContext","Popover","__scopePopover","openProp","defaultOpen","onOpenChange","modal","popperScope","triggerRef","React.useRef","hasCustomAnchor","setHasCustomAnchor","React.useState","open","setOpen","useControllableState","PopperPrimitive.Root","useId","React.useCallback","prevOpen","ANCHOR_NAME","PopoverAnchor","React.forwardRef","forwardedRef","anchorProps","onCustomAnchorAdd","onCustomAnchorRemove","React.useEffect","PopperPrimitive.Anchor","TRIGGER_NAME","PopoverTrigger","triggerProps","composedTriggerRef","useComposedRefs","trigger","Primitive","getState","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","PopoverPortal","forceMount","container","Presence","PortalPrimitive","CONTENT_NAME","PopoverContent","portalContext","contentProps","PopoverContentModal","PopoverContentNonModal","contentRef","composedRefs","isRightClickOutsideRef","content","hideOthers","RemoveScroll","Slot","PopoverContentImpl","originalEvent","ctrlLeftClick","isRightClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","target","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","useFocusGuards","FocusScope","DismissableLayer","PopperPrimitive.Content","CLOSE_NAME","PopoverClose","closeProps","ARROW_NAME","PopoverArrow","arrowProps","PopperPrimitive.Arrow","Root2","Trigger","Portal","Content2","TouchedFiles","diffFilesPromise","handleLaunchUpdate","appName","Popover.Root","Popover.Trigger","Popover.Portal","Popover.Content","SetAppToPlayground","React.Suspense","Await","diffFiles","pageTitle","workshopTitle","exerciseNumber","exerciseStepApp","toString","padStart","stepNumber","emoji","problem","solution","title","exerciseTitle","meta","matches","rootData","find","m","id","getSeoMetaTags","description","ogTitle","ogDescription","Number","instructor","ExercisePartRoute","useRef","titleBits","useRevalidationWS","watchPaths","relativePath","className","playground","articleId","instructionsCode","prevStepLink","prefetch","nextStepLink","ElementScrollRestoration","elementQuery","ProgressToggle","EditFileOnGitHub","NavChevrons","prev","next","Outlet","ErrorBoundary","GeneralErrorBoundary","statusHandlers"],"mappings":"sjCAsBA,MAAMA,EAAcC,EAAAA,cAA4C,IAAI,EAEpE,SAASC,IAAiB,CACnB,MAAAC,EAAUC,aAAiBJ,CAAW,EAC5C,GA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WACjCwB,UAAU,qBACX,EACG,KACJjK,EAAA,KAAC,MAAI,CAAAiK,UAAU,8DACdlM,SAAA,CAACE,EAAA,IAAA,MAAA,CACAF,SAACE,EAAA,IAAA,MAAA,CAAIgM,UAAU,SACdlM,SAACE,EAAA,IAAAsJ,GAAA,CAAaC,iBAAkB/I,EAAKyJ,UAAW,EACjD,CACD,CAAA,EACAjK,EAAA,IAAC0M,GAAA,CACAjD,QAASjJ,EAAK6J,gBAAgB3I,KAC9BqK,aAAcvL,EAAK6J,gBAAgB0B,YAAA,CACpC,EACA/L,EAAA,IAAC2M,EAAA,CACAC,KACCpM,EAAK4L,aACF,CACA/K,GAAIb,EAAK4L,aAAa/K,GACtB,aAAc,eACf,EACC,KAEJwL,KACCrM,EAAK8L,aACF,CACAjL,GAAIb,EAAK8L,aAAajL,GACtB,aAAc,WACf,EACC,IAAA,CAEL,CAAA,CACD,CAAA,CAAA,CACD,CAAA,QACCyL,EAAO,CAAA,CAAA,CAAA,EACT,CACD,CAAA,CAEF,CAEO,SAASC,IAAgB,CAE9B,OAAA/M,EAAAA,IAACgN,EAAA,CACAC,eAAgB,CACf,IAAK,IAAOjN,EAAA,IAAA,IAAA,CAAEF,SAAoC,uCAAA,CACnD,CAAA,CACD,CAEF","x_google_ignoreList":[1]}
|
|
1
|
+
{"version":3,"file":"_layout-DTAM9xh5.js","sources":["../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/__shared/step-mdx.tsx","../../../../../node_modules/@radix-ui/react-popover/dist/index.mjs","../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/__shared/touched-files.tsx","../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/_layout.tsx"],"sourcesContent":["import {\n\tLink,\n\tuseLoaderData,\n\tuseSearchParams,\n\ttype LinkProps,\n} from '@remix-run/react'\nimport * as React from 'react'\nimport { type PropsWithChildren } from 'react'\nimport iconsSvg from '#app/assets/icons.svg'\nimport { EpicVideoInfoProvider } from '#app/components/epic-video.tsx'\nimport { Icon } from '#app/components/icons.tsx'\nimport { type InBrowserBrowserRef } from '#app/components/in-browser-browser.tsx'\nimport { SimpleTooltip } from '#app/components/ui/tooltip.tsx'\nimport { LaunchEditor } from '#app/routes/launch-editor.tsx'\nimport { Mdx } from '#app/utils/mdx.tsx'\nimport { cn, getBaseUrl } from '#app/utils/misc.tsx'\nimport { useRequestInfo } from '#app/utils/request-info.ts'\nimport { type loader } from '../_layout.tsx'\n\ntype StepContextType = {\n\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n}\nconst StepContext = React.createContext<StepContextType | null>(null)\n\nfunction useStepContext() {\n\tconst context = React.useContext(StepContext)\n\tif (!context) {\n\t\tthrow new Error('useStepContext must be used within a StepContext.Provider')\n\t}\n\treturn context\n}\n\nfunction StepContextProvider({\n\tchildren,\n\tinBrowserBrowserRef,\n}: {\n\tchildren: React.ReactNode\n\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n}) {\n\treturn (\n\t\t<StepContext.Provider value={{ inBrowserBrowserRef }}>\n\t\t\t{children}\n\t\t</StepContext.Provider>\n\t)\n}\n\nconst stepMdxComponents = {\n\tDiffLink,\n\tPrevDiffLink,\n\tNextDiffLink,\n\tInlineFile,\n\tLinkToApp,\n}\n\nexport function StepMdx({\n\tinBrowserBrowserRef,\n}: {\n\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n}) {\n\tconst data = useLoaderData<typeof loader>()\n\tif (!data.exerciseStepApp.instructionsCode) return null\n\treturn (\n\t\t<StepContextProvider inBrowserBrowserRef={inBrowserBrowserRef}>\n\t\t\t<EpicVideoInfoProvider epicVideoInfosPromise={data.epicVideoInfosPromise}>\n\t\t\t\t<div className=\"prose dark:prose-invert sm:prose-lg\">\n\t\t\t\t\t<Mdx\n\t\t\t\t\t\tcode={data.exerciseStepApp.instructionsCode}\n\t\t\t\t\t\tcomponents={stepMdxComponents}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</EpicVideoInfoProvider>\n\t\t</StepContextProvider>\n\t)\n}\n\nfunction withParam(\n\tsearchParams: URLSearchParams,\n\tkey: string,\n\tvalue: string | null,\n) {\n\tconst newSearchParams = new URLSearchParams(searchParams)\n\tif (value === null) {\n\t\tnewSearchParams.delete(key)\n\t} else {\n\t\tnewSearchParams.set(key, value)\n\t}\n\treturn newSearchParams\n}\n\nfunction NextDiffLink({\n\tapp = 0,\n\tfullPage = false,\n\tchildren,\n}: {\n\tapp: number\n\tfullPage?: boolean\n\tchildren?: React.ReactNode\n}) {\n\treturn (\n\t\t<DiffLink app1={app} app2={app + 1} fullPage={fullPage}>\n\t\t\t{children}\n\t\t</DiffLink>\n\t)\n}\n\nfunction PrevDiffLink({\n\tapp = -1,\n\tfullPage = false,\n\tchildren,\n}: {\n\tapp: number\n\tfullPage?: boolean\n\tchildren?: React.ReactNode\n}) {\n\treturn (\n\t\t<DiffLink app1={app} app2={app + 1} fullPage={fullPage}>\n\t\t\t{children}\n\t\t</DiffLink>\n\t)\n}\n\nfunction DiffLink({\n\tapp1 = 0,\n\tapp2 = 1,\n\tchildren,\n\tfullPage = false,\n\tto,\n}: {\n\tapp1?: string | number | null\n\tapp2?: string | number | null\n\tto?: string\n\tfullPage?: boolean\n\tchildren?: React.ReactNode\n}) {\n\tconst data = useLoaderData<typeof loader>()\n\tif (!to && !app1 && !app2) {\n\t\treturn (\n\t\t\t// @ts-expect-error 🤷♂️\n\t\t\t<callout-danger className=\"notification\">\n\t\t\t\t<div className=\"title\">DiffLink Error: invalid input</div>\n\t\t\t\t{/* @ts-expect-error 🤷♂️ */}\n\t\t\t</callout-danger>\n\t\t)\n\t}\n\n\tfunction getAppName(input: typeof app1) {\n\t\tif (typeof input === 'number') {\n\t\t\tconst stepIndex = data.exerciseIndex + input\n\t\t\treturn data.allApps[stepIndex]?.name\n\t\t}\n\t\tif (!input) return null\n\t\tfor (const { name, stepName } of data.allApps) {\n\t\t\tif (input === name || input === stepName) {\n\t\t\t\treturn name\n\t\t\t}\n\t\t}\n\t\treturn null\n\t}\n\n\tif (to) {\n\t\tconst params = new URLSearchParams(to)\n\t\tapp1 = params.get('app1')\n\t\tapp2 = params.get('app2')\n\t}\n\tconst app1Name = getAppName(app1)\n\tconst app2Name = getAppName(app2)\n\tif (!app1Name || !app2Name) {\n\t\treturn (\n\t\t\t// @ts-expect-error 🤷♂️\n\t\t\t<callout-danger className=\"notification\">\n\t\t\t\t<div className=\"title\">DiffLink Error: invalid input</div>\n\t\t\t\t{!app1Name && <div>app1: \"{app1}\" is not a valid app name</div>}\n\t\t\t\t{!app2Name && <div>app2: \"{app2}\" is not a valid app name</div>}\n\t\t\t\t{/* @ts-expect-error 🤷♂️ */}\n\t\t\t</callout-danger>\n\t\t)\n\t}\n\n\tif (!to) {\n\t\tto = `app1=${app1Name}&app2=${app2Name}`\n\t}\n\tconst pathToDiff = fullPage\n\t\t? `/diff?${to}`\n\t\t: `?${decodeURIComponent(\n\t\t\t\twithParam(new URLSearchParams(), 'preview', `diff&${to}`).toString(),\n\t\t\t)}`\n\n\tif (!children) {\n\t\tchildren = (\n\t\t\t<span>\n\t\t\t\tGo to Diff {fullPage ? '' : 'Preview'} from: <code>{app1Name}</code> to:{' '}\n\t\t\t\t<code>{app2Name}</code>\n\t\t\t</span>\n\t\t)\n\t}\n\n\treturn <Link to={pathToDiff}>{children}</Link>\n}\n\nfunction InlineFile({\n\tfile,\n\ttype = 'playground',\n\tchildren = <code>{file}</code>,\n\t...props\n}: Omit<PropsWithChildren<typeof LaunchEditor>, 'appName'> & {\n\tfile: string\n\ttype?: 'playground' | 'solution' | 'problem'\n}) {\n\tconst data = useLoaderData<typeof loader>()\n\tconst app = data[type] || data[data.type]\n\n\tconst info = (\n\t\t<div className=\"launch-editor-button-wrapper flex underline underline-offset-4\">\n\t\t\t{children}{' '}\n\t\t\t<svg height={24} width={24}>\n\t\t\t\t<use href={`${iconsSvg}#Keyboard`} />\n\t\t\t</svg>\n\t\t</div>\n\t)\n\n\treturn ENV.EPICSHOP_DEPLOYED && app ? (\n\t\t<div className=\"inline-block grow\">\n\t\t\t<LaunchEditor appFile={file} appName={app.name} {...props}>\n\t\t\t\t{info}\n\t\t\t</LaunchEditor>\n\t\t</div>\n\t) : app ? (\n\t\t<div className=\"inline-block grow\">\n\t\t\t<LaunchEditor appFile={file} appName={app.name} {...props}>\n\t\t\t\t{info}\n\t\t\t</LaunchEditor>\n\t\t</div>\n\t) : type === 'playground' ? (\n\t\t// playground does not exist yet\n\t\t<SimpleTooltip content=\"You must 'Set to Playground' before opening a file\">\n\t\t\t<div className=\"inline-block grow cursor-not-allowed\">{info}</div>\n\t\t</SimpleTooltip>\n\t) : (\n\t\t<>children</>\n\t)\n}\n\nfunction getPreviewType(\n\tpreview: string | null,\n): 'playground' | 'problem' | 'solution' {\n\tif (preview === 'problem') return 'problem'\n\tif (preview === 'solution') return 'solution'\n\treturn 'playground'\n}\n\nfunction LinkToApp({\n\tto: appTo,\n\tchildren = <code>{appTo.toString()}</code>,\n\t...props\n}: LinkProps) {\n\tconst [searchParams] = useSearchParams()\n\tconst to = `?${withParam(\n\t\tsearchParams,\n\t\t'pathname',\n\t\tappTo.toString(),\n\t).toString()}`\n\tconst data = useLoaderData<typeof loader>()\n\tconst type = getPreviewType(searchParams.get('preview'))\n\tconst requestInfo = useRequestInfo()\n\tconst app = data[type]\n\tconst previewAppUrl =\n\t\tapp?.dev.type === 'script'\n\t\t\t? getBaseUrl({\n\t\t\t\t\tdomain: requestInfo.domain,\n\t\t\t\t\tport: app.dev.portNumber,\n\t\t\t\t})\n\t\t\t: data.playground?.dev.type === 'browser'\n\t\t\t\t? data.playground.dev.pathname\n\t\t\t\t: null\n\tconst { inBrowserBrowserRef } = useStepContext()\n\tconst href = previewAppUrl\n\t\t? previewAppUrl.slice(0, -1) + appTo.toString()\n\t\t: null\n\treturn (\n\t\t<div className=\"inline-flex items-center justify-between gap-1\">\n\t\t\t<Link\n\t\t\t\tto={to}\n\t\t\t\t{...props}\n\t\t\t\tclassName={cn(props.className, {\n\t\t\t\t\t'cursor-not-allowed': ENV.EPICSHOP_DEPLOYED,\n\t\t\t\t})}\n\t\t\t\ttitle={\n\t\t\t\t\tENV.EPICSHOP_DEPLOYED\n\t\t\t\t\t\t? 'Cannot link to app in deployed version'\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\tonClick={(event) => {\n\t\t\t\t\tif (ENV.EPICSHOP_DEPLOYED) event.preventDefault()\n\n\t\t\t\t\tprops.onClick?.(event)\n\t\t\t\t\tinBrowserBrowserRef.current?.handleExtrnalNavigation(appTo.toString())\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Link>\n\t\t\t{href ? (\n\t\t\t\t<SimpleTooltip content=\"Open in new tab\">\n\t\t\t\t\t<a\n\t\t\t\t\t\thref={href}\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\t\tclassName={cn('flex aspect-square items-center justify-center', {\n\t\t\t\t\t\t\t'cursor-not-allowed': ENV.EPICSHOP_DEPLOYED,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\tENV.EPICSHOP_DEPLOYED\n\t\t\t\t\t\t\t\t? 'Cannot link to app in deployed version'\n\t\t\t\t\t\t\t\t: 'Open in new tab'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonClick={(event) => {\n\t\t\t\t\t\t\tif (ENV.EPICSHOP_DEPLOYED) event.preventDefault()\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon name=\"ExternalLink\" />\n\t\t\t\t\t</a>\n\t\t\t\t</SimpleTooltip>\n\t\t\t) : null}\n\t\t</div>\n\t)\n}\n","\"use client\";\n\n// packages/react/popover/src/Popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as Popover from '@radix-ui/react-popover'\nimport { type SerializeFrom } from '@remix-run/node'\nimport { Await, useLoaderData } from '@remix-run/react'\nimport * as React from 'react'\nimport { Icon } from '#app/components/icons.tsx'\nimport { SimpleTooltip } from '#app/components/ui/tooltip.tsx'\nimport { LaunchEditor } from '#app/routes/launch-editor.tsx'\nimport { SetAppToPlayground } from '#app/routes/set-playground.tsx'\nimport { type loader } from '../_layout.tsx'\n\nfunction TouchedFiles({\n\tdiffFilesPromise,\n}: {\n\tdiffFilesPromise: SerializeFrom<typeof loader>['diffFiles']\n}) {\n\tconst data = useLoaderData<typeof loader>()\n\n\tconst [open, setOpen] = React.useState(false)\n\tconst contentRef = React.useRef<HTMLDivElement>(null)\n\n\tfunction handleLaunchUpdate() {\n\t\tsetOpen(false)\n\t}\n\n\tconst appName = data.playground?.appName\n\n\treturn (\n\t\t<>\n\t\t\t<Popover.Root open={open} onOpenChange={setOpen}>\n\t\t\t\t<Popover.Trigger asChild>\n\t\t\t\t\t<button\n\t\t\t\t\t\tclassName=\"flex h-full items-center gap-1 border-r px-6 py-3 font-mono text-sm uppercase\"\n\t\t\t\t\t\taria-label=\"Relevant Files\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon name=\"Files\" />\n\t\t\t\t\t\tFiles\n\t\t\t\t\t</button>\n\t\t\t\t</Popover.Trigger>\n\t\t\t\t<Popover.Portal>\n\t\t\t\t\t<Popover.Content\n\t\t\t\t\t\tref={contentRef}\n\t\t\t\t\t\tclassName=\"slideRightContent lg:slideUpContent invert-theme z-10 select-none rounded bg-background px-9 py-8 text-foreground\"\n\t\t\t\t\t\talign=\"start\"\n\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"launch-editor-wrapper\">\n\t\t\t\t\t\t\t<strong className=\"inline-block px-2 pb-4 font-semibold uppercase\">\n\t\t\t\t\t\t\t\tRelevant Files\n\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t{data.problem &&\n\t\t\t\t\t\t\tdata.playground?.appName !== data.problem.name ? (\n\t\t\t\t\t\t\t\t<div className=\"mb-2 rounded p-1 font-mono font-medium\">\n\t\t\t\t\t\t\t\t\t<SetAppToPlayground appName={data.problem.name} />\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\t<div id=\"files\">\n\t\t\t\t\t\t\t\t<React.Suspense\n\t\t\t\t\t\t\t\t\tfallback={\n\t\t\t\t\t\t\t\t\t\t<SimpleTooltip content=\"Loading diff\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex justify-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon name=\"Refresh\" className=\"h-8 w-8 animate-spin\" />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Await\n\t\t\t\t\t\t\t\t\t\tresolve={diffFilesPromise}\n\t\t\t\t\t\t\t\t\t\terrorElement={\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-foreground-danger\">\n\t\t\t\t\t\t\t\t\t\t\t\tSomething went wrong.\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{(diffFiles) => {\n\t\t\t\t\t\t\t\t\t\t\tif (!diffFiles) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-foreground-danger\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tUnable to determine diff\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif (typeof diffFiles === 'string') {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-foreground-danger\">{diffFiles}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif (!diffFiles.length) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn <p>No files changed</p>\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tconst props =\n\t\t\t\t\t\t\t\t\t\t\t\tappName || ENV.EPICSHOP_GITHUB_ROOT\n\t\t\t\t\t\t\t\t\t\t\t\t\t? {}\n\t\t\t\t\t\t\t\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"You must 'Set to Playground' before opening a file\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName: 'not-allowed',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<ul {...props}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{diffFiles.length > 1 && !ENV.EPICSHOP_DEPLOYED ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"mb-2 border-b border-b-gray-50 border-opacity-50 pb-2 font-sans\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<LaunchEditor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappFile={diffFiles.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(file) => `${file.path},${file.line},1`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappName=\"playground\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonUpdate={handleLaunchUpdate}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Open All Files</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</LaunchEditor>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{diffFiles.map((file) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li key={file.path} data-state={file.status}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<LaunchEditor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappFile={`${file.path},${file.line},1`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappName={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tENV.EPICSHOP_DEPLOYED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? data.problem?.name ?? 'playground'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'playground'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonUpdate={handleLaunchUpdate}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<code>{file.path}</code>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</LaunchEditor>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t</Await>\n\t\t\t\t\t\t\t\t</React.Suspense>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Popover.Content>\n\t\t\t\t</Popover.Portal>\n\t\t\t</Popover.Root>\n\t\t</>\n\t)\n}\n\nexport default TouchedFiles\n","import { ElementScrollRestoration } from '@epic-web/restore-scroll'\nimport {\n\tgetAppDisplayName,\n\tgetAppPageRoute,\n\tgetApps,\n\tgetExerciseApp,\n\tgetNextExerciseApp,\n\tgetPrevExerciseApp,\n\tisExerciseStepApp,\n\tisPlaygroundApp,\n\trequireExercise,\n\trequireExerciseApp,\n\ttype App,\n\ttype ExerciseStepApp,\n} from '@epic-web/workshop-utils/apps.server'\nimport { getWorkshopConfig } from '@epic-web/workshop-utils/config.server'\nimport {\n\tcombineServerTimings,\n\tgetServerTimeHeader,\n\tmakeTimings,\n} from '@epic-web/workshop-utils/timing.server'\nimport {\n\tunstable_data as data,\n\tredirect,\n\ttype HeadersFunction,\n\ttype LoaderFunctionArgs,\n\ttype MetaFunction,\n\ttype SerializeFrom,\n} from '@remix-run/node'\nimport { Link, Outlet, useLoaderData } from '@remix-run/react'\nimport slugify from '@sindresorhus/slugify'\nimport { useRef } from 'react'\nimport { GeneralErrorBoundary } from '#app/components/error-boundary.tsx'\nimport { type InBrowserBrowserRef } from '#app/components/in-browser-browser.tsx'\nimport { NavChevrons } from '#app/components/nav-chevrons.tsx'\nimport { useRevalidationWS } from '#app/components/revalidation-ws.js'\nimport { type loader as rootLoader } from '#app/root.tsx'\nimport { EditFileOnGitHub } from '#app/routes/launch-editor.tsx'\nimport { ProgressToggle } from '#app/routes/progress.tsx'\nimport { SetAppToPlayground } from '#app/routes/set-playground.tsx'\nimport { getDiffFiles } from '#app/utils/diff.server.js'\nimport { getEpicVideoInfos } from '#app/utils/epic-api.ts'\nimport { getSeoMetaTags } from '#app/utils/seo.js'\nimport { StepMdx } from './__shared/step-mdx.tsx'\nimport TouchedFiles from './__shared/touched-files.tsx'\n\nfunction pageTitle(\n\tdata: SerializeFrom<typeof loader> | undefined,\n\tworkshopTitle?: string,\n) {\n\tconst exerciseNumber =\n\t\tdata?.exerciseStepApp.exerciseNumber.toString().padStart(2, '0') ?? '00'\n\tconst stepNumber =\n\t\tdata?.exerciseStepApp.stepNumber.toString().padStart(2, '0') ?? '00'\n\tconst emoji = (\n\t\t{\n\t\t\tproblem: '💪',\n\t\t\tsolution: '🏁',\n\t\t} as const\n\t)[data?.type ?? 'problem']\n\tconst title = data?.[data.type]?.title ?? 'N/A'\n\treturn {\n\t\temoji,\n\t\tstepNumber,\n\t\ttitle,\n\t\texerciseNumber,\n\t\texerciseTitle: data?.exerciseTitle ?? 'Unknown exercise',\n\t\tworkshopTitle,\n\t\ttype: data?.type ?? 'problem',\n\t}\n}\n\nexport const meta: MetaFunction<typeof loader, { root: typeof rootLoader }> = ({\n\tdata,\n\tmatches,\n\tparams,\n}) => {\n\tconst rootData = matches.find((m) => m.id === 'root')?.data\n\tif (!data || !rootData) return [{ title: '🦉 | Error' }]\n\tconst { emoji, stepNumber, title, exerciseNumber, exerciseTitle } =\n\t\tpageTitle(data)\n\n\treturn getSeoMetaTags({\n\t\ttitle: `${emoji} | ${stepNumber}. ${title} | ${exerciseNumber}. ${exerciseTitle} | ${rootData.workshopTitle}`,\n\t\tdescription: `${params.type} step for exercise ${exerciseNumber}. ${exerciseTitle}`,\n\t\togTitle: title,\n\t\togDescription: `${exerciseTitle} step ${Number(stepNumber)} ${params.type}`,\n\t\tinstructor: rootData.instructor,\n\t\trequestInfo: rootData.requestInfo,\n\t})\n}\n\nexport async function loader({ request, params }: LoaderFunctionArgs) {\n\tconst timings = makeTimings('exerciseStepTypeLayoutLoader')\n\tconst url = new URL(request.url)\n\tconst { title: workshopTitle } = getWorkshopConfig()\n\tconst cacheOptions = { request, timings }\n\tconst exerciseStepApp = await requireExerciseApp(params, cacheOptions)\n\tconst exercise = await requireExercise(\n\t\texerciseStepApp.exerciseNumber,\n\t\tcacheOptions,\n\t)\n\tconst reqUrl = new URL(request.url)\n\n\tconst pathnameParam = reqUrl.searchParams.get('pathname')\n\tif (pathnameParam === '' || pathnameParam === '/') {\n\t\treqUrl.searchParams.delete('pathname')\n\t\tthrow redirect(reqUrl.toString())\n\t}\n\n\tconst problemApp = await getExerciseApp(\n\t\t{ ...params, type: 'problem' },\n\t\tcacheOptions,\n\t)\n\tconst solutionApp = await getExerciseApp(\n\t\t{ ...params, type: 'solution' },\n\t\tcacheOptions,\n\t)\n\n\tif (!problemApp && !solutionApp) {\n\t\tthrow new Response('Not found', { status: 404 })\n\t}\n\n\tconst allAppsFull = await getApps(cacheOptions)\n\tconst playgroundApp = allAppsFull.find(isPlaygroundApp)\n\n\tfunction getStepId(a: ExerciseStepApp) {\n\t\treturn (\n\t\t\ta.exerciseNumber * 1000 +\n\t\t\ta.stepNumber * 10 +\n\t\t\t(a.type === 'problem' ? 0 : 1)\n\t\t)\n\t}\n\n\tfunction getStepNameAndId(a: App) {\n\t\tif (isExerciseStepApp(a)) {\n\t\t\tconst exerciseNumberStr = String(a.exerciseNumber).padStart(2, '0')\n\t\t\tconst stepNumberStr = String(a.stepNumber).padStart(2, '0')\n\n\t\t\treturn {\n\t\t\t\tstepName: `${exerciseNumberStr}/${stepNumberStr}.${a.type}`,\n\t\t\t\tstepId: getStepId(a),\n\t\t\t}\n\t\t}\n\t\treturn { stepName: '', stepId: -1 }\n\t}\n\n\tconst allApps = allAppsFull\n\t\t.filter((a, i, ar) => ar.findIndex((b) => a.name === b.name) === i)\n\t\t.map((a) => ({\n\t\t\tdisplayName: getAppDisplayName(a, allAppsFull),\n\t\t\tname: a.name,\n\t\t\ttitle: a.title,\n\t\t\ttype: a.type,\n\t\t\t...getStepNameAndId(a),\n\t\t}))\n\n\tallApps.sort((a, b) => {\n\t\t// order them by their stepId\n\t\tif (a.stepId > 0 && b.stepId > 0) return a.stepId - b.stepId\n\n\t\t// non-step apps should come after step apps\n\t\tif (a.stepId > 0) return -1\n\t\tif (b.stepId > 0) return 1\n\n\t\treturn 0\n\t})\n\tconst exerciseId = getStepId(exerciseStepApp)\n\tconst exerciseIndex = allApps.findIndex((step) => step.stepId === exerciseId)\n\n\tconst exerciseApps = allAppsFull\n\t\t.filter(isExerciseStepApp)\n\t\t.filter((app) => app.exerciseNumber === exerciseStepApp.exerciseNumber)\n\tconst isLastStep =\n\t\texerciseApps[exerciseApps.length - 1]?.name === exerciseStepApp.name\n\tconst isFirstStep = exerciseApps[0]?.name === exerciseStepApp.name\n\n\tconst nextApp = await getNextExerciseApp(exerciseStepApp, cacheOptions)\n\tconst prevApp = await getPrevExerciseApp(exerciseStepApp, cacheOptions)\n\n\tconst articleId = `workshop-${slugify(workshopTitle)}-${\n\t\texercise.exerciseNumber\n\t}-${exerciseStepApp.stepNumber}-${exerciseStepApp.type}`\n\n\tconst subroute = url.pathname.split(\n\t\t`/exercise/${params.exerciseNumber}/${params.stepNumber}/${params.type}/`,\n\t)[1]\n\treturn data(\n\t\t{\n\t\t\tarticleId,\n\t\t\ttype: params.type as 'problem' | 'solution',\n\t\t\texerciseStepApp,\n\t\t\texerciseTitle: exercise.title,\n\t\t\tepicVideoInfosPromise: getEpicVideoInfos(exerciseStepApp.epicVideoEmbeds),\n\t\t\texerciseIndex,\n\t\t\tallApps,\n\t\t\tprevStepLink: isFirstStep\n\t\t\t\t? {\n\t\t\t\t\t\tto: `/exercise/${exerciseStepApp.exerciseNumber\n\t\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t\t.padStart(2, '0')}`,\n\t\t\t\t\t}\n\t\t\t\t: prevApp\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tto: getAppPageRoute(prevApp, {\n\t\t\t\t\t\t\t\tsubroute,\n\t\t\t\t\t\t\t\tsearchParams: url.searchParams,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t}\n\t\t\t\t\t: null,\n\t\t\tnextStepLink: isLastStep\n\t\t\t\t? {\n\t\t\t\t\t\tto: `/exercise/${exerciseStepApp.exerciseNumber\n\t\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t\t.padStart(2, '0')}/finished`,\n\t\t\t\t\t}\n\t\t\t\t: nextApp\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tto: getAppPageRoute(nextApp, {\n\t\t\t\t\t\t\t\tsubroute,\n\t\t\t\t\t\t\t\tsearchParams: url.searchParams,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t}\n\t\t\t\t\t: null,\n\t\t\tplayground: playgroundApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'playground',\n\t\t\t\t\t\tappName: playgroundApp.appName,\n\t\t\t\t\t\tname: playgroundApp.name,\n\t\t\t\t\t\tfullPath: playgroundApp.fullPath,\n\t\t\t\t\t\tdev: playgroundApp.dev,\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tproblem: problemApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'problem',\n\t\t\t\t\t\ttitle: problemApp.title,\n\t\t\t\t\t\tname: problemApp.name,\n\t\t\t\t\t\tfullPath: problemApp.fullPath,\n\t\t\t\t\t\tdev: problemApp.dev,\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tsolution: solutionApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'solution',\n\t\t\t\t\t\ttitle: solutionApp.title,\n\t\t\t\t\t\tname: solutionApp.name,\n\t\t\t\t\t\tfullPath: solutionApp.fullPath,\n\t\t\t\t\t\tdev: solutionApp.dev,\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tdiffFiles:\n\t\t\t\tproblemApp && solutionApp\n\t\t\t\t\t? getDiffFiles(problemApp, solutionApp, {\n\t\t\t\t\t\t\t...cacheOptions,\n\t\t\t\t\t\t\tforceFresh: url.searchParams.get('forceFresh') === 'diff',\n\t\t\t\t\t\t}).catch((e) => {\n\t\t\t\t\t\t\tconsole.error(e)\n\t\t\t\t\t\t\treturn 'There was a problem generating the diff (check the terminal output)'\n\t\t\t\t\t\t})\n\t\t\t\t\t: 'No diff available',\n\t\t} as const,\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'Server-Timing': combineServerTimings(loaderHeaders, parentHeaders),\n\t}\n\treturn headers\n}\n\nexport default function ExercisePartRoute() {\n\tconst data = useLoaderData<typeof loader>()\n\n\tconst inBrowserBrowserRef = useRef<InBrowserBrowserRef>(null)\n\n\tconst titleBits = pageTitle(data)\n\n\tuseRevalidationWS({\n\t\twatchPaths: [`${data.exerciseStepApp.relativePath}/README.mdx`],\n\t})\n\n\treturn (\n\t\t<div className=\"flex max-w-full flex-grow flex-col\">\n\t\t\t<main className=\"flex flex-grow flex-col sm:grid sm:h-full sm:min-h-[800px] sm:grid-cols-1 sm:grid-rows-2 md:min-h-[unset] lg:grid-cols-2 lg:grid-rows-1\">\n\t\t\t\t<div className=\"relative flex flex-col sm:col-span-1 sm:row-span-1 sm:h-full lg:border-r\">\n\t\t\t\t\t<h1 className=\"h-14 border-b pl-10 pr-5 text-sm font-medium leading-tight\">\n\t\t\t\t\t\t<div className=\"flex h-14 flex-wrap items-center justify-between gap-x-2 py-2\">\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-start gap-x-2 uppercase\">\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\tto={`/${titleBits.exerciseNumber}`}\n\t\t\t\t\t\t\t\t\tclassName=\"hover:underline\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{titleBits.exerciseNumber}. {titleBits.exerciseTitle}\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t{'/'}\n\t\t\t\t\t\t\t\t<Link to=\".\" className=\"hover:underline\">\n\t\t\t\t\t\t\t\t\t{titleBits.stepNumber}. {titleBits.title}\n\t\t\t\t\t\t\t\t\t{' ('}\n\t\t\t\t\t\t\t\t\t{titleBits.emoji} {titleBits.type}\n\t\t\t\t\t\t\t\t\t{')'}\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{data.problem &&\n\t\t\t\t\t\t\tdata.playground?.appName !== data.problem.name ? (\n\t\t\t\t\t\t\t\t<div className=\"hidden md:block\">\n\t\t\t\t\t\t\t\t\t<SetAppToPlayground appName={data.problem.name} />\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</h1>\n\t\t\t\t\t<article\n\t\t\t\t\t\tid={data.articleId}\n\t\t\t\t\t\tkey={data.articleId}\n\t\t\t\t\t\tclassName=\"shadow-on-scrollbox flex h-full w-full max-w-none flex-1 scroll-pt-6 flex-col justify-between space-y-6 overflow-y-auto p-2 scrollbar-thin scrollbar-thumb-scrollbar sm:p-10 sm:pt-8\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{data.exerciseStepApp.instructionsCode ? (\n\t\t\t\t\t\t\t<StepMdx inBrowserBrowserRef={inBrowserBrowserRef} />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div className=\"flex h-full items-center justify-center text-lg\">\n\t\t\t\t\t\t\t\t<p>No instructions yet...</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<div className=\"mt-auto flex justify-between\">\n\t\t\t\t\t\t\t{data.prevStepLink ? (\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\tto={data.prevStepLink.to}\n\t\t\t\t\t\t\t\t\taria-label=\"Previous Step\"\n\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t← Previous\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<span />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{data.nextStepLink ? (\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\tto={data.nextStepLink.to}\n\t\t\t\t\t\t\t\t\taria-label=\"Next Step\"\n\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tNext →\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<span />\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</article>\n\t\t\t\t\t<ElementScrollRestoration\n\t\t\t\t\t\telementQuery={`#${data.articleId}`}\n\t\t\t\t\t\tkey={`scroll-${data.articleId}`}\n\t\t\t\t\t/>\n\t\t\t\t\t{data.type === 'solution' ? (\n\t\t\t\t\t\t<ProgressToggle\n\t\t\t\t\t\t\ttype=\"step\"\n\t\t\t\t\t\t\texerciseNumber={data.exerciseStepApp.exerciseNumber}\n\t\t\t\t\t\t\tstepNumber={data.exerciseStepApp.stepNumber}\n\t\t\t\t\t\t\tclassName=\"h-14 border-t px-6\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : null}\n\t\t\t\t\t<div className=\"flex h-16 justify-between border-b-4 border-t lg:border-b-0\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<div className=\"h-full\">\n\t\t\t\t\t\t\t\t<TouchedFiles diffFilesPromise={data.diffFiles} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<EditFileOnGitHub\n\t\t\t\t\t\t\tappName={data.exerciseStepApp.name}\n\t\t\t\t\t\t\trelativePath={data.exerciseStepApp.relativePath}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<NavChevrons\n\t\t\t\t\t\t\tprev={\n\t\t\t\t\t\t\t\tdata.prevStepLink\n\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\tto: data.prevStepLink.to,\n\t\t\t\t\t\t\t\t\t\t\t'aria-label': 'Previous Step',\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tnext={\n\t\t\t\t\t\t\t\tdata.nextStepLink\n\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\tto: data.nextStepLink.to,\n\t\t\t\t\t\t\t\t\t\t\t'aria-label': 'Next Step',\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<Outlet />\n\t\t\t</main>\n\t\t</div>\n\t)\n}\n\nexport function ErrorBoundary() {\n\treturn (\n\t\t<GeneralErrorBoundary\n\t\t\tstatusHandlers={{\n\t\t\t\t404: () => <p>Sorry, we couldn't find an app here.</p>,\n\t\t\t}}\n\t\t/>\n\t)\n}\n"],"names":["StepContext","React.createContext","useStepContext","context","React.useContext","StepContextProvider","children","inBrowserBrowserRef","jsx","stepMdxComponents","DiffLink","PrevDiffLink","NextDiffLink","InlineFile","LinkToApp","StepMdx","data","useLoaderData","EpicVideoInfoProvider","Mdx","withParam","searchParams","key","value","newSearchParams","app","fullPage","app1","app2","to","getAppName","input","stepIndex","_a","name","stepName","params","app1Name","app2Name","jsxs","pathToDiff","Link","file","type","props","info","iconsSvg","LaunchEditor","SimpleTooltip","getPreviewType","preview","appTo","useSearchParams","requestInfo","useRequestInfo","previewAppUrl","getBaseUrl","href","cn","event","_b","Icon","POPOVER_NAME","createPopoverContext","createPopoverScope","createContextScope","createPopperScope","usePopperScope","PopoverProvider","usePopoverContext","Popover","__scopePopover","openProp","defaultOpen","onOpenChange","modal","popperScope","triggerRef","React.useRef","hasCustomAnchor","setHasCustomAnchor","React.useState","open","setOpen","useControllableState","PopperPrimitive.Root","useId","React.useCallback","prevOpen","ANCHOR_NAME","PopoverAnchor","React.forwardRef","forwardedRef","anchorProps","onCustomAnchorAdd","onCustomAnchorRemove","React.useEffect","PopperPrimitive.Anchor","TRIGGER_NAME","PopoverTrigger","triggerProps","composedTriggerRef","useComposedRefs","trigger","Primitive","getState","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","PopoverPortal","forceMount","container","Presence","PortalPrimitive","CONTENT_NAME","PopoverContent","portalContext","contentProps","PopoverContentModal","PopoverContentNonModal","contentRef","composedRefs","isRightClickOutsideRef","content","hideOthers","RemoveScroll","Slot","PopoverContentImpl","originalEvent","ctrlLeftClick","isRightClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","target","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","useFocusGuards","FocusScope","DismissableLayer","PopperPrimitive.Content","CLOSE_NAME","PopoverClose","closeProps","ARROW_NAME","PopoverArrow","arrowProps","PopperPrimitive.Arrow","Root2","Trigger","Portal","Content2","TouchedFiles","diffFilesPromise","handleLaunchUpdate","appName","Popover.Root","Popover.Trigger","Popover.Portal","Popover.Content","SetAppToPlayground","React.Suspense","Await","diffFiles","pageTitle","workshopTitle","exerciseNumber","exerciseStepApp","toString","padStart","stepNumber","emoji","problem","solution","title","exerciseTitle","meta","matches","rootData","find","m","id","getSeoMetaTags","description","ogTitle","ogDescription","Number","instructor","ExercisePartRoute","useRef","titleBits","useRevalidationWS","watchPaths","relativePath","className","playground","articleId","instructionsCode","prevStepLink","prefetch","nextStepLink","ElementScrollRestoration","elementQuery","ProgressToggle","EditFileOnGitHub","NavChevrons","prev","next","Outlet","ErrorBoundary","GeneralErrorBoundary","statusHandlers"],"mappings":"sjCAsBA,MAAMA,EAAcC,EAAAA,cAA4C,IAAI,EAEpE,SAASC,IAAiB,CACnB,MAAAC,EAAUC,aAAiBJ,CAAW,EAC5C,GAAI,CAACG,EACE,MAAA,IAAI,MAAM,2DAA2D,EAErE,OAAAA,CACR,CAEA,SAASE,GAAoB,CAC5B,SAAAC,EACA,oBAAAC,CACD,EAGG,CAED,OAAAC,EAAA,IAACR,EAAY,S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SACdlM,SAACE,EAAA,IAAAsJ,GAAA,CAAaC,iBAAkB/I,EAAKyJ,UAAW,EACjD,CACD,CAAA,EACAjK,EAAA,IAAC0M,GAAA,CACAjD,QAASjJ,EAAK6J,gBAAgB3I,KAC9BqK,aAAcvL,EAAK6J,gBAAgB0B,YAAA,CACpC,EACA/L,EAAA,IAAC2M,EAAA,CACAC,KACCpM,EAAK4L,aACF,CACA/K,GAAIb,EAAK4L,aAAa/K,GACtB,aAAc,eACf,EACC,KAEJwL,KACCrM,EAAK8L,aACF,CACAjL,GAAIb,EAAK8L,aAAajL,GACtB,aAAc,WACf,EACC,IAAA,CAEL,CAAA,CACD,CAAA,CAAA,CACD,CAAA,QACCyL,EAAO,CAAA,CAAA,CAAA,EACT,CACD,CAAA,CAEF,CAEO,SAASC,IAAgB,CAE9B,OAAA/M,EAAAA,IAACgN,EAAA,CACAC,eAAgB,CACf,IAAK,IAAOjN,EAAA,IAAA,IAAA,CAAEF,SAAoC,uCAAA,CACnD,CAAA,CACD,CAEF","x_google_ignoreList":[1]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{j as e,O as a}from"./index-BFGhCX_U.js";import{L as s}from"./components-Be92gVxW.js";const c={getSitemapEntries:()=>null},o=({matches:l})=>{var i;const n=(i=l.find(r=>r.id==="root"))==null?void 0:i.data;return[{title:`👷 | ${n==null?void 0:n.workshopTitle}`}]};function m(){return e.jsxs("main",{className:"container mx-auto mt-8",children:[e.jsx("h1",{className:"text-4xl font-bold",children:"Admin"}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("nav",{children:e.jsxs("ul",{className:"flex gap-3",children:[e.jsx("li",{children:e.jsx(s,{className:"underline",to:"/",children:"Home"})}),e.jsx("li",{children:e.jsx(s,{className:"underline",to:"/admin",children:"Admin"})}),e.jsx("li",{children:e.jsx(s,{className:"underline",to:"/diff",children:"Diff Viewer"})}),e.jsx("li",{children:e.jsx(s,{className:"underline",to:"version",children:"Version"})})]})}),e.jsx(a,{})]})]})}export{m as default,c as handle,o as meta};
|
|
2
|
+
//# sourceMappingURL=_layout-Dfmv2zcn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_layout-Dfmv2zcn.js","sources":["../../../app/routes/admin+/_layout.tsx"],"sourcesContent":["import { type SEOHandle } from '@nasa-gcn/remix-seo'\nimport { type LoaderFunction, type MetaFunction } from '@remix-run/node'\nimport { Link, Outlet } from '@remix-run/react'\nimport { type loader as rootLoader } from '#app/root.tsx'\n\nexport const handle: SEOHandle = {\n\tgetSitemapEntries: () => null,\n}\n\nexport const meta: MetaFunction<\n\tLoaderFunction,\n\t{ root: typeof rootLoader }\n> = ({ matches }) => {\n\tconst rootData = matches.find((m) => m.id === 'root')?.data\n\treturn [{ title: `👷 | ${rootData?.workshopTitle}` }]\n}\n\nexport default function AdminLayout() {\n\treturn (\n\t\t<main className=\"container mx-auto mt-8\">\n\t\t\t<h1 className=\"text-4xl font-bold\">Admin</h1>\n\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t<nav>\n\t\t\t\t\t<ul className=\"flex gap-3\">\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Link className=\"underline\" to=\"/\">\n\t\t\t\t\t\t\t\tHome\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Link className=\"underline\" to=\"/admin\">\n\t\t\t\t\t\t\t\tAdmin\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Link className=\"underline\" to=\"/diff\">\n\t\t\t\t\t\t\t\tDiff Viewer\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t<Link className=\"underline\" to=\"version\">\n\t\t\t\t\t\t\t\tVersion\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</nav>\n\t\t\t\t<Outlet />\n\t\t\t</div>\n\t\t</main>\n\t)\n}\n"],"names":["handle","getSitemapEntries","meta","matches","rootData","find","m","id","data","title","workshopTitle","AdminLayout","jsxs","className","children","jsx","Link","to","Outlet"],"mappings":"4FAKO,MAAMA,EAAoB,CAChCC,kBAAmBA,IAAM,IAC1B,EAEaC,EAGTA,CAAC,CAAEC,QAAAA,CAAQ,IAAM,OACd,MAAAC,GAAWD,EAAAA,EAAQE,KAAMC,GAAMA,EAAEC,KAAO,MAAM,IAAnCJ,YAAAA,EAAsCK,KACvD,MAAO,CAAC,CAAEC,MAAO,QAAQL,GAAAA,YAAAA,EAAUM,aAAa,EAAG,CAAC,CACrD,EAEA,SAAwBC,GAAc,CAEpC,OAAAC,EAAAA,KAAC,OAAK,CAAAC,UAAU,yBACfC,SAAA,CAACC,EAAA,IAAA,KAAA,CAAGF,UAAU,qBAAqBC,SAAK,OAAA,CAAA,EACxCF,EAAA,KAAC,MAAI,CAAAC,UAAU,sBACdC,SAAA,CAAAC,EAAA,IAAC,MACA,CAAAD,SAAAF,EAAA,KAAC,KAAG,CAAAC,UAAU,aACbC,SAAA,CAACC,EAAA,IAAA,KAAA,CACAD,eAACE,EAAK,CAAAH,UAAU,YAAYI,GAAG,IAAIH,gBAEnC,CACD,CAAA,EACAC,EAAA,IAAC,MACAD,SAACC,EAAA,IAAAC,EAAA,CAAKH,UAAU,YAAYI,GAAG,SAASH,SAAA,QAExC,CACD,CAAA,EACAC,EAAA,IAAC,MACAD,SAACC,EAAA,IAAAC,EAAA,CAAKH,UAAU,YAAYI,GAAG,QAAQH,SAAA,cAEvC,CACD,CAAA,EACAC,EAAA,IAAC,MACAD,SAACC,EAAA,IAAAC,EAAA,CAAKH,UAAU,YAAYI,GAAG,UAAUH,SAAA,UAEzC,CACD,CAAA,CAAA,EACD,CACD,CAAA,QACCI,EAAO,CAAA,CAAA,CAAA,CACT,CAAA,CAAA,CACD,CAAA,CAEF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as p,j as t,R as f}from"./index-BFGhCX_U.js";import{d as B,u as O,e as U,P as j,f as q,g as ue,h as Y,i as fe}from"./tooltip-
|
|
2
|
-
//# sourceMappingURL=accordion-
|
|
1
|
+
import{r as p,j as t,R as f}from"./index-BFGhCX_U.js";import{d as B,u as O,e as U,P as j,f as q,g as ue,h as Y,i as fe}from"./tooltip-DO9uwurQ.js";import{f as me,u as xe}from"./index-DZDhtMuq.js";import{c as M,I}from"./misc-DUy_whwE.js";var k="Collapsible",[ve,J]=B(k),[Ce,V]=ve(k),Q=p.forwardRef((e,s)=>{const{__scopeCollapsible:o,open:n,defaultOpen:r,disabled:a,onOpenChange:c,...l}=e,[d=!1,u]=O({prop:n,defaultProp:r,onChange:c});return t.jsx(Ce,{scope:o,disabled:a,contentId:U(),open:d,onOpenToggle:p.useCallback(()=>u(m=>!m),[u]),children:t.jsx(j.div,{"data-state":H(d),"data-disabled":a?"":void 0,...l,ref:s})})});Q.displayName=k;var W="CollapsibleTrigger",X=p.forwardRef((e,s)=>{const{__scopeCollapsible:o,...n}=e,r=V(W,o);return t.jsx(j.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":H(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...n,ref:s,onClick:q(e.onClick,r.onOpenToggle)})});X.displayName=W;var L="CollapsibleContent",Z=p.forwardRef((e,s)=>{const{forceMount:o,...n}=e,r=V(L,e.__scopeCollapsible);return t.jsx(ue,{present:o||r.open,children:({present:a})=>t.jsx(be,{...n,ref:s,present:a})})});Z.displayName=L;var be=p.forwardRef((e,s)=>{const{__scopeCollapsible:o,present:n,children:r,...a}=e,c=V(L,o),[l,d]=p.useState(n),u=p.useRef(null),m=Y(s,u),x=p.useRef(0),A=x.current,C=p.useRef(0),w=C.current,b=c.open||l,g=p.useRef(b),h=p.useRef();return p.useEffect(()=>{const i=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(i)},[]),fe(()=>{const i=u.current;if(i){h.current=h.current||{transitionDuration:i.style.transitionDuration,animationName:i.style.animationName},i.style.transitionDuration="0s",i.style.animationName="none";const R=i.getBoundingClientRect();x.current=R.height,C.current=R.width,g.current||(i.style.transitionDuration=h.current.transitionDuration,i.style.animationName=h.current.animationName),d(n)}},[c.open,n]),t.jsx(j.div,{"data-state":H(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!b,...a,ref:m,style:{"--radix-collapsible-content-height":A?`${A}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:b&&r})});function H(e){return e?"open":"closed"}var ge=Q,he=X,Ae=Z,v="Accordion",Re=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[$,Ie,je]=me(v),[_,Ge]=B(v,[je,J]),G=J(),ee=f.forwardRef((e,s)=>{const{type:o,...n}=e,r=n,a=n;return t.jsx($.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?t.jsx(Pe,{...a,ref:s}):t.jsx(_e,{...r,ref:s})})});ee.displayName=v;var[oe,we]=_(v),[te,Ne]=_(v,{collapsible:!1}),_e=f.forwardRef((e,s)=>{const{value:o,defaultValue:n,onValueChange:r=()=>{},collapsible:a=!1,...c}=e,[l,d]=O({prop:o,defaultProp:n,onChange:r});return t.jsx(oe,{scope:e.__scopeAccordion,value:l?[l]:[],onItemOpen:d,onItemClose:f.useCallback(()=>a&&d(""),[a,d]),children:t.jsx(te,{scope:e.__scopeAccordion,collapsible:a,children:t.jsx(ne,{...c,ref:s})})})}),Pe=f.forwardRef((e,s)=>{const{value:o,defaultValue:n,onValueChange:r=()=>{},...a}=e,[c=[],l]=O({prop:o,defaultProp:n,onChange:r}),d=f.useCallback(m=>l((x=[])=>[...x,m]),[l]),u=f.useCallback(m=>l((x=[])=>x.filter(A=>A!==m)),[l]);return t.jsx(oe,{scope:e.__scopeAccordion,value:c,onItemOpen:d,onItemClose:u,children:t.jsx(te,{scope:e.__scopeAccordion,collapsible:!0,children:t.jsx(ne,{...a,ref:s})})})}),[ye,P]=_(v),ne=f.forwardRef((e,s)=>{const{__scopeAccordion:o,disabled:n,dir:r,orientation:a="vertical",...c}=e,l=f.useRef(null),d=Y(l,s),u=Ie(o),x=xe(r)==="ltr",A=q(e.onKeyDown,C=>{var F;if(!Re.includes(C.key))return;const w=C.target,b=u().filter(D=>{var z;return!((z=D.ref.current)!=null&&z.disabled)}),g=b.findIndex(D=>D.ref.current===w),h=b.length;if(g===-1)return;C.preventDefault();let i=g;const R=0,y=h-1,E=()=>{i=g+1,i>y&&(i=R)},S=()=>{i=g-1,i<R&&(i=y)};switch(C.key){case"Home":i=R;break;case"End":i=y;break;case"ArrowRight":a==="horizontal"&&(x?E():S());break;case"ArrowDown":a==="vertical"&&E();break;case"ArrowLeft":a==="horizontal"&&(x?S():E());break;case"ArrowUp":a==="vertical"&&S();break}const pe=i%h;(F=b[pe].ref.current)==null||F.focus()});return t.jsx(ye,{scope:o,disabled:n,direction:r,orientation:a,children:t.jsx($.Slot,{scope:o,children:t.jsx(j.div,{...c,"data-orientation":a,ref:d,onKeyDown:n?void 0:A})})})}),N="AccordionItem",[Ee,K]=_(N),re=f.forwardRef((e,s)=>{const{__scopeAccordion:o,value:n,...r}=e,a=P(N,o),c=we(N,o),l=G(o),d=U(),u=n&&c.value.includes(n)||!1,m=a.disabled||e.disabled;return t.jsx(Ee,{scope:o,open:u,disabled:m,triggerId:d,children:t.jsx(ge,{"data-orientation":a.orientation,"data-state":de(u),...l,...r,ref:s,disabled:m,open:u,onOpenChange:x=>{x?c.onItemOpen(n):c.onItemClose(n)}})})});re.displayName=N;var ae="AccordionHeader",se=f.forwardRef((e,s)=>{const{__scopeAccordion:o,...n}=e,r=P(v,o),a=K(ae,o);return t.jsx(j.h3,{"data-orientation":r.orientation,"data-state":de(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:s})});se.displayName=ae;var T="AccordionTrigger",ce=f.forwardRef((e,s)=>{const{__scopeAccordion:o,...n}=e,r=P(v,o),a=K(T,o),c=Ne(T,o),l=G(o);return t.jsx($.ItemSlot,{scope:o,children:t.jsx(he,{"aria-disabled":a.open&&!c.collapsible||void 0,"data-orientation":r.orientation,id:a.triggerId,...l,...n,ref:s})})});ce.displayName=T;var ie="AccordionContent",le=f.forwardRef((e,s)=>{const{__scopeAccordion:o,...n}=e,r=P(v,o),a=K(ie,o),c=G(o);return t.jsx(Ae,{role:"region","aria-labelledby":a.triggerId,"data-orientation":r.orientation,...c,...n,ref:s,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});le.displayName=ie;function de(e){return e?"open":"closed"}var Ke=ee,Se=re,De=se,Te=ce,Oe=le;const Fe=({title:e,children:s,variant:o,icon:n,forceMount:r=!1})=>{const a=()=>{switch(o){case"changed":return t.jsx(I,{name:"Modified","aria-label":"Modified",className:"text-[#fb923c]"});case"renamed":return t.jsx(I,{name:"Renamed","aria-label":"Renamed",className:"text-[#fb923c]"});case"added":return t.jsx(I,{name:"Added","aria-label":"Added",className:"text-[#10b981]"});case"deleted":return t.jsx(I,{name:"Deleted","aria-label":"Deleted",className:"text-[#ef4444]"});default:return t.jsx(I,{name:"Modified","aria-label":"Modified",className:"text-[#fb923c]"})}},c=()=>{switch(o){case"changed":return"modified";default:return o}},l=e.replace(/\\\\/g,"\\");return t.jsxs(Se,{value:e,children:[t.jsxs(Me,{variant:c(),children:[n||a()," ",l]}),t.jsx(ke,{forceMount:r,className:M("prose max-w-none whitespace-pre-wrap dark:prose-invert prose-pre:m-0 prose-pre:mb-1 prose-pre:rounded-none",{"radix-state-closed:hidden":r}),children:s})]})},Me=p.forwardRef(({children:e,className:s,variant:o,...n},r)=>t.jsx(De,{className:"flex",asChild:!0,children:t.jsxs(Te,{className:M("group flex w-full items-center justify-between border-b p-4 pr-3 font-mono text-sm font-medium leading-none hover:bg-foreground/20",s),...n,ref:r,children:[t.jsx("div",{className:"flex items-center gap-1.5",children:e}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"font-mono text-xs font-normal uppercase text-muted-foreground",children:o}),t.jsx(I,{name:"TriangleDownSmall",className:"transition group-radix-state-open:rotate-180","aria-hidden":!0})]})]})})),ke=p.forwardRef(({children:e,className:s,...o},n)=>t.jsx(Oe,{className:M("",s),...o,ref:n,children:t.jsx("div",{children:e})}));export{Fe as A,Ke as R};
|
|
2
|
+
//# sourceMappingURL=accordion-D9-D-n9p.js.map
|