@epic-web/workshop-app 5.3.8 → 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.
Files changed (116) hide show
  1. package/build/client/assets/{_-CWSCXcBv.js → _-BrkpfnBb.js} +2 -2
  2. package/build/client/assets/{_-CWSCXcBv.js.map → _-BrkpfnBb.js.map} +1 -1
  3. package/build/client/assets/{_exerciseNumber-DvMYZgqk.js → _exerciseNumber-DCSM0NCG.js} +2 -2
  4. package/build/client/assets/{_exerciseNumber-DvMYZgqk.js.map → _exerciseNumber-DCSM0NCG.js.map} +1 -1
  5. package/build/client/assets/{_exerciseNumber_._stepNumber-BA2Xhzqs.js → _exerciseNumber_._stepNumber-BIMJh_sg.js} +2 -2
  6. package/build/client/assets/{_exerciseNumber_._stepNumber-BA2Xhzqs.js.map → _exerciseNumber_._stepNumber-BIMJh_sg.js.map} +1 -1
  7. package/build/client/assets/{_exerciseNumber_.finished-DYN2QHN6.js → _exerciseNumber_.finished-nbpk1ToO.js} +2 -2
  8. package/build/client/assets/{_exerciseNumber_.finished-DYN2QHN6.js.map → _exerciseNumber_.finished-nbpk1ToO.js.map} +1 -1
  9. package/build/client/assets/{_layout-BK7mLImi.js → _layout-Cbz7Qt-S.js} +2 -2
  10. package/build/client/assets/{_layout-BK7mLImi.js.map → _layout-Cbz7Qt-S.js.map} +1 -1
  11. package/build/client/assets/{_layout-BH5PQW0M.js → _layout-DTAM9xh5.js} +2 -2
  12. package/build/client/assets/{_layout-BH5PQW0M.js.map → _layout-DTAM9xh5.js.map} +1 -1
  13. package/build/client/assets/_layout-Dfmv2zcn.js +2 -0
  14. package/build/client/assets/_layout-Dfmv2zcn.js.map +1 -0
  15. package/build/client/assets/{accordion-DC885Li1.js → accordion-D9-D-n9p.js} +2 -2
  16. package/build/client/assets/{accordion-DC885Li1.js.map → accordion-D9-D-n9p.js.map} +1 -1
  17. package/build/client/assets/account-C4Piztoz.js +2 -0
  18. package/build/client/assets/account-C4Piztoz.js.map +1 -0
  19. package/build/client/assets/app-DgTXXO8s.js +2 -0
  20. package/build/client/assets/{app-CM8yuYni.js.map → app-DgTXXO8s.js.map} +1 -1
  21. package/build/client/assets/{button-DQ001ob0.js → button-_qPvcoqR.js} +2 -2
  22. package/build/client/assets/{button-DQ001ob0.js.map → button-_qPvcoqR.js.map} +1 -1
  23. package/build/client/assets/{components-9EGYHTc_.js → components-Be92gVxW.js} +2 -2
  24. package/build/client/assets/{components-9EGYHTc_.js.map → components-Be92gVxW.js.map} +1 -1
  25. package/build/client/assets/{diff-C2Hm_DHX.js → diff-8nlDkmpc.js} +2 -2
  26. package/build/client/assets/{diff-C2Hm_DHX.js.map → diff-8nlDkmpc.js.map} +1 -1
  27. package/build/client/assets/diff-BhRAIPKc.js +2 -0
  28. package/build/client/assets/{diff-CbIF8Oq1.js.map → diff-BhRAIPKc.js.map} +1 -1
  29. package/build/client/assets/discord-BUWZUTEC.js +2 -0
  30. package/build/client/assets/discord-BUWZUTEC.js.map +1 -0
  31. package/build/client/assets/discord-Bdnx7fu-.js +2 -0
  32. package/build/client/assets/discord-Bdnx7fu-.js.map +1 -0
  33. package/build/client/assets/{entry.client-BTYTUpFV.js → entry.client-DqIWuxf8.js} +2 -2
  34. package/build/client/assets/{entry.client-BTYTUpFV.js.map → entry.client-DqIWuxf8.js.map} +1 -1
  35. package/build/client/assets/{epic-video-Bxtz3elt.js → epic-video-Bp4BOD2R.js} +2 -2
  36. package/build/client/assets/{epic-video-Bxtz3elt.js.map → epic-video-Bp4BOD2R.js.map} +1 -1
  37. package/build/client/assets/{error-boundary-1-dmC941.js → error-boundary-BZA-ffa8.js} +2 -2
  38. package/build/client/assets/{error-boundary-1-dmC941.js.map → error-boundary-BZA-ffa8.js.map} +1 -1
  39. package/build/client/assets/{finished--PGQDzya.js → finished-C0cpfAFL.js} +2 -2
  40. package/build/client/assets/{finished--PGQDzya.js.map → finished-C0cpfAFL.js.map} +1 -1
  41. package/build/client/assets/{index-BuoaxPEj.js → index-BCTr8uu6.js} +2 -2
  42. package/build/client/assets/{index-BuoaxPEj.js.map → index-BCTr8uu6.js.map} +1 -1
  43. package/build/client/assets/{index-_J-F_Dnc.js → index-Bdg3v8tC.js} +2 -2
  44. package/build/client/assets/{index-_J-F_Dnc.js.map → index-Bdg3v8tC.js.map} +1 -1
  45. package/build/client/assets/{index-C2MH9l6b.js → index-Bi1TbRTj.js} +2 -2
  46. package/build/client/assets/{index-C2MH9l6b.js.map → index-Bi1TbRTj.js.map} +1 -1
  47. package/build/client/assets/{index-DRH72MzK.js → index-C9Hx0Dey.js} +2 -2
  48. package/build/client/assets/{index-DRH72MzK.js.map → index-C9Hx0Dey.js.map} +1 -1
  49. package/build/client/assets/{index-oZkQrXic.js → index-Ca4vBON4.js} +2 -2
  50. package/build/client/assets/{index-oZkQrXic.js.map → index-Ca4vBON4.js.map} +1 -1
  51. package/build/client/assets/{index-BuA_RWlU.js → index-DZDhtMuq.js} +2 -2
  52. package/build/client/assets/{index-BuA_RWlU.js.map → index-DZDhtMuq.js.map} +1 -1
  53. package/build/client/assets/index-pkiQppkK.js +2 -0
  54. package/build/client/assets/index-pkiQppkK.js.map +1 -0
  55. package/build/client/assets/{loading-Dk0n07O3.js → loading-XhMtj4mp.js} +2 -2
  56. package/build/client/assets/{loading-Dk0n07O3.js.map → loading-XhMtj4mp.js.map} +1 -1
  57. package/build/client/assets/{login-pZYDEC_l.js → login-C1oOgi98.js} +2 -2
  58. package/build/client/assets/{login-pZYDEC_l.js.map → login-C1oOgi98.js.map} +1 -1
  59. package/build/client/assets/manifest-bc809ee6.js +1 -0
  60. package/build/client/assets/{mdx-DIAWAXtT.js → mdx-CEjzXoEx.js} +2 -2
  61. package/build/client/assets/{mdx-DIAWAXtT.js.map → mdx-CEjzXoEx.js.map} +1 -1
  62. package/build/client/assets/{misc-BJtHv_Jh.js → misc-DUy_whwE.js} +2 -2
  63. package/build/client/assets/{misc-BJtHv_Jh.js.map → misc-DUy_whwE.js.map} +1 -1
  64. package/build/client/assets/{nav-chevrons-CgbSMLeb.js → nav-chevrons-DnR25VLp.js} +2 -2
  65. package/build/client/assets/{nav-chevrons-CgbSMLeb.js.map → nav-chevrons-DnR25VLp.js.map} +1 -1
  66. package/build/client/assets/{onboarding-BAVmCIKn.js → onboarding-C2YNq60k.js} +2 -2
  67. package/build/client/assets/{onboarding-BAVmCIKn.js.map → onboarding-C2YNq60k.js.map} +1 -1
  68. package/build/client/assets/{presence-DyppfK2V.js → presence-DJGFvdDh.js} +2 -2
  69. package/build/client/assets/{presence-DyppfK2V.js.map → presence-DJGFvdDh.js.map} +1 -1
  70. package/build/client/assets/{preview-CW_12I0i.js → preview-DaZd0wMb.js} +2 -2
  71. package/build/client/assets/{preview-CW_12I0i.js.map → preview-DaZd0wMb.js.map} +1 -1
  72. package/build/client/assets/{product-C1ynnrN_.js → product-DIAmCwmZ.js} +2 -2
  73. package/build/client/assets/{product-C1ynnrN_.js.map → product-DIAmCwmZ.js.map} +1 -1
  74. package/build/client/assets/{progress-DAB3nDa2.js → progress-DQt_Bn9o.js} +2 -2
  75. package/build/client/assets/{progress-DAB3nDa2.js.map → progress-DQt_Bn9o.js.map} +1 -1
  76. package/build/client/assets/{progress-bar-Cj5R4Zk7.js → progress-bar-BaTU3Yx_.js} +2 -2
  77. package/build/client/assets/{progress-bar-Cj5R4Zk7.js.map → progress-bar-BaTU3Yx_.js.map} +1 -1
  78. package/build/client/assets/{request-info-DCIQLE6H.js → request-info-ByUEfOil.js} +2 -2
  79. package/build/client/assets/{request-info-DCIQLE6H.js.map → request-info-ByUEfOil.js.map} +1 -1
  80. package/build/client/assets/{revalidation-ws-DU-PzW-_.js → revalidation-ws-dUa9CAqr.js} +2 -2
  81. package/build/client/assets/{revalidation-ws-DU-PzW-_.js.map → revalidation-ws-dUa9CAqr.js.map} +1 -1
  82. package/build/client/assets/{root-DCfiv1cO.js → root-a3d3Qwip.js} +2 -2
  83. package/build/client/assets/{root-DCfiv1cO.js.map → root-a3d3Qwip.js.map} +1 -1
  84. package/build/client/assets/{set-playground-S_rIwJAa.js → set-playground-CBHBA46B.js} +2 -2
  85. package/build/client/assets/{set-playground-S_rIwJAa.js.map → set-playground-CBHBA46B.js.map} +1 -1
  86. package/build/client/assets/{support-BNS-kEhc.js → support-CIz02V_r.js} +2 -2
  87. package/build/client/assets/{support-BNS-kEhc.js.map → support-CIz02V_r.js.map} +1 -1
  88. package/build/client/assets/test-DoKJvNug.js +2 -0
  89. package/build/client/assets/{test-3x2HHA0t.js.map → test-DoKJvNug.js.map} +1 -1
  90. package/build/client/assets/{tests-GmyhBOwD.js → tests-DbuyD2cI.js} +2 -2
  91. package/build/client/assets/{tests-GmyhBOwD.js.map → tests-DbuyD2cI.js.map} +1 -1
  92. package/build/client/assets/{tooltip-BgynKV2c.js → tooltip-DO9uwurQ.js} +2 -2
  93. package/build/client/assets/{tooltip-BgynKV2c.js.map → tooltip-DO9uwurQ.js.map} +1 -1
  94. package/build/client/assets/user-Bv6wYhQP.js +2 -0
  95. package/build/client/assets/{user-CFunCRfr.js.map → user-Bv6wYhQP.js.map} +1 -1
  96. package/build/client/assets/version-CaywAlNQ.js +2 -0
  97. package/build/client/assets/version-CaywAlNQ.js.map +1 -0
  98. package/build/client/assets/{workshop-config-DJY2cXU_.js → workshop-config-WVltG_BV.js} +2 -2
  99. package/build/client/assets/{workshop-config-DJY2cXU_.js.map → workshop-config-WVltG_BV.js.map} +1 -1
  100. package/build/server/index.js +368 -218
  101. package/build/server/index.js.map +1 -1
  102. package/package.json +3 -3
  103. package/start.js +6 -0
  104. package/build/client/assets/_layout-gyrNluke.js +0 -2
  105. package/build/client/assets/_layout-gyrNluke.js.map +0 -1
  106. package/build/client/assets/account-B5baO5pg.js +0 -2
  107. package/build/client/assets/account-B5baO5pg.js.map +0 -1
  108. package/build/client/assets/app-CM8yuYni.js +0 -2
  109. package/build/client/assets/diff-CbIF8Oq1.js +0 -2
  110. package/build/client/assets/discord-BnQDHWJj.js +0 -2
  111. package/build/client/assets/discord-BnQDHWJj.js.map +0 -1
  112. package/build/client/assets/discord-DcHxc30v.js +0 -2
  113. package/build/client/assets/discord-DcHxc30v.js.map +0 -1
  114. package/build/client/assets/manifest-7f4f8707.js +0 -1
  115. package/build/client/assets/test-3x2HHA0t.js +0 -2
  116. package/build/client/assets/user-CFunCRfr.js +0 -2
@@ -1,2 +1,2 @@
1
- import{j as e}from"./index-BFGhCX_U.js";import{I as t}from"./misc-BJtHv_Jh.js";import{L as o}from"./components-9EGYHTc_.js";function l({prev:r,next:a}){return e.jsxs("div",{className:"relative flex h-full overflow-hidden",children:[r?e.jsx(o,{prefetch:"intent",...r,className:"group flex h-full items-center justify-center border-l px-7",children:e.jsxs(e.Fragment,{children:[e.jsx(t,{name:"ChevronLeft",className:"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0"}),e.jsx(t,{name:"ChevronLeft",className:"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100"})]})}):null,a?e.jsx(o,{prefetch:"intent",...a,className:"group flex h-full items-center justify-center border-l px-7",children:e.jsxs(e.Fragment,{children:[e.jsx(t,{name:"ChevronRight",className:"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0"}),e.jsx(t,{name:"ChevronRight",className:"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100"})]})}):null]})}export{l as N};
2
- //# sourceMappingURL=nav-chevrons-CgbSMLeb.js.map
1
+ import{j as e}from"./index-BFGhCX_U.js";import{I as t}from"./misc-DUy_whwE.js";import{L as o}from"./components-Be92gVxW.js";function l({prev:r,next:a}){return e.jsxs("div",{className:"relative flex h-full overflow-hidden",children:[r?e.jsx(o,{prefetch:"intent",...r,className:"group flex h-full items-center justify-center border-l px-7",children:e.jsxs(e.Fragment,{children:[e.jsx(t,{name:"ChevronLeft",className:"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0"}),e.jsx(t,{name:"ChevronLeft",className:"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100"})]})}):null,a?e.jsx(o,{prefetch:"intent",...a,className:"group flex h-full items-center justify-center border-l px-7",children:e.jsxs(e.Fragment,{children:[e.jsx(t,{name:"ChevronRight",className:"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0"}),e.jsx(t,{name:"ChevronRight",className:"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100"})]})}):null]})}export{l as N};
2
+ //# sourceMappingURL=nav-chevrons-DnR25VLp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nav-chevrons-CgbSMLeb.js","sources":["../../../app/components/nav-chevrons.tsx"],"sourcesContent":["import { Link, type LinkProps } from '@remix-run/react'\nimport { Icon } from './icons.tsx'\n\nexport function NavChevrons({\n\tprev,\n\tnext,\n}: {\n\tprev?: LinkProps | null\n\tnext?: LinkProps | null\n}) {\n\treturn (\n\t\t<div className=\"relative flex h-full overflow-hidden\">\n\t\t\t{prev ? (\n\t\t\t\t<Link\n\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t{...prev}\n\t\t\t\t\tclassName=\"group flex h-full items-center justify-center border-l px-7\"\n\t\t\t\t\tchildren={\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronLeft\"\n\t\t\t\t\t\t\t\tclassName=\"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronLeft\"\n\t\t\t\t\t\t\t\tclassName=\"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t\t{next ? (\n\t\t\t\t<Link\n\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t{...next}\n\t\t\t\t\tclassName=\"group flex h-full items-center justify-center border-l px-7\"\n\t\t\t\t\tchildren={\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronRight\"\n\t\t\t\t\t\t\t\tclassName=\"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronRight\"\n\t\t\t\t\t\t\t\tclassName=\"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t</div>\n\t)\n}\n"],"names":["NavChevrons","prev","next","jsxs","jsx","Link","Fragment","Icon"],"mappings":"4HAGO,SAASA,EAAY,CAC3B,KAAAC,EACA,KAAAC,CACD,EAGG,CAED,OAAAC,EAAA,KAAC,MAAI,CAAA,UAAU,uCACb,SAAA,CACAF,EAAAG,EAAA,IAACC,EAAA,CACA,SAAS,SACR,GAAGJ,EACJ,UAAU,8DACV,SAEEE,EAAA,KAAAG,WAAA,CAAA,SAAA,CAAAF,EAAA,IAACG,EAAA,CACA,KAAK,cACL,UAAU,2GAAA,CACX,EACAH,EAAA,IAACG,EAAA,CACA,KAAK,cACL,UAAU,0HAAA,CACX,CAAA,EACD,CAAA,CAAA,EAGC,KACHL,EACAE,EAAA,IAACC,EAAA,CACA,SAAS,SACR,GAAGH,EACJ,UAAU,8DACV,SAEEC,EAAA,KAAAG,WAAA,CAAA,SAAA,CAAAF,EAAA,IAACG,EAAA,CACA,KAAK,eACL,UAAU,2GAAA,CACX,EACAH,EAAA,IAACG,EAAA,CACA,KAAK,eACL,UAAU,0HAAA,CACX,CAAA,EACD,CAAA,CAAA,EAGC,IACL,CAAA,CAAA,CAEF"}
1
+ {"version":3,"file":"nav-chevrons-DnR25VLp.js","sources":["../../../app/components/nav-chevrons.tsx"],"sourcesContent":["import { Link, type LinkProps } from '@remix-run/react'\nimport { Icon } from './icons.tsx'\n\nexport function NavChevrons({\n\tprev,\n\tnext,\n}: {\n\tprev?: LinkProps | null\n\tnext?: LinkProps | null\n}) {\n\treturn (\n\t\t<div className=\"relative flex h-full overflow-hidden\">\n\t\t\t{prev ? (\n\t\t\t\t<Link\n\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t{...prev}\n\t\t\t\t\tclassName=\"group flex h-full items-center justify-center border-l px-7\"\n\t\t\t\t\tchildren={\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronLeft\"\n\t\t\t\t\t\t\t\tclassName=\"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronLeft\"\n\t\t\t\t\t\t\t\tclassName=\"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t\t{next ? (\n\t\t\t\t<Link\n\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t{...next}\n\t\t\t\t\tclassName=\"group flex h-full items-center justify-center border-l px-7\"\n\t\t\t\t\tchildren={\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronRight\"\n\t\t\t\t\t\t\t\tclassName=\"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronRight\"\n\t\t\t\t\t\t\t\tclassName=\"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t</div>\n\t)\n}\n"],"names":["NavChevrons","prev","next","jsxs","jsx","Link","Fragment","Icon"],"mappings":"4HAGO,SAASA,EAAY,CAC3B,KAAAC,EACA,KAAAC,CACD,EAGG,CAED,OAAAC,EAAA,KAAC,MAAI,CAAA,UAAU,uCACb,SAAA,CACAF,EAAAG,EAAA,IAACC,EAAA,CACA,SAAS,SACR,GAAGJ,EACJ,UAAU,8DACV,SAEEE,EAAA,KAAAG,WAAA,CAAA,SAAA,CAAAF,EAAA,IAACG,EAAA,CACA,KAAK,cACL,UAAU,2GAAA,CACX,EACAH,EAAA,IAACG,EAAA,CACA,KAAK,cACL,UAAU,0HAAA,CACX,CAAA,EACD,CAAA,CAAA,EAGC,KACHL,EACAE,EAAA,IAACC,EAAA,CACA,SAAS,SACR,GAAGH,EACJ,UAAU,8DACV,SAEEC,EAAA,KAAAG,WAAA,CAAA,SAAA,CAAAF,EAAA,IAACG,EAAA,CACA,KAAK,eACL,UAAU,2GAAA,CACX,EACAH,EAAA,IAACG,EAAA,CACA,KAAK,eACL,UAAU,0HAAA,CACX,CAAA,EACD,CAAA,CAAA,EAGC,IACL,CAAA,CAAA,CAEF"}
@@ -1,2 +1,2 @@
1
- import{j as e}from"./index-BFGhCX_U.js";import{B as t}from"./button-DQ001ob0.js";import{E as r,D as i}from"./epic-video-Bxtz3elt.js";import{u as s,F as l}from"./components-9EGYHTc_.js";import"./misc-BJtHv_Jh.js";import"./index-_J-F_Dnc.js";import"./request-info-DCIQLE6H.js";import"./tooltip-BgynKV2c.js";import"./pe-ChIwTk8v.js";import"./loading-Dk0n07O3.js";import"./user-CFunCRfr.js";import"./workshop-config-DJY2cXU_.js";const w={getSitemapEntries:()=>null};function b(){const o=s();return e.jsxs("main",{className:"flex h-full w-full flex-col items-center justify-between gap-4",children:[e.jsxs("div",{className:"container flex h-full w-full max-w-5xl flex-1 flex-col items-center gap-4 overflow-y-scroll py-12 scrollbar-thin scrollbar-thumb-scrollbar",children:[e.jsx("h1",{className:"text-5xl",children:"Onboarding"}),e.jsx("p",{className:"text-xl",children:"Welcome to EpicWeb.dev!"}),e.jsxs("p",{className:"text-lg",children:["Before you get started, ",e.jsx("strong",{children:"you must watch the tour video"}),"! You're going to be spending a lot of time in here, so it's important you understand how to work effectively in this workshop"]}),e.jsx("div",{className:"w-[780px] max-w-full",children:e.jsx(r,{epicVideoInfosPromise:o.videoInfos,children:e.jsx(i,{url:o.onboardingVideo})})})]}),e.jsx(l,{method:"post",className:"pb-4",children:e.jsx(t,{name:"intent",value:"complete",varient:"primary",children:"I've watched it. Let's go!"})})]})}export{b as default,w as handle};
2
- //# sourceMappingURL=onboarding-BAVmCIKn.js.map
1
+ import{j as e}from"./index-BFGhCX_U.js";import{B as t}from"./button-_qPvcoqR.js";import{E as r,D as i}from"./epic-video-Bp4BOD2R.js";import{u as s,F as l}from"./components-Be92gVxW.js";import"./misc-DUy_whwE.js";import"./index-Bdg3v8tC.js";import"./request-info-ByUEfOil.js";import"./tooltip-DO9uwurQ.js";import"./pe-ChIwTk8v.js";import"./loading-XhMtj4mp.js";import"./user-Bv6wYhQP.js";import"./workshop-config-WVltG_BV.js";const w={getSitemapEntries:()=>null};function b(){const o=s();return e.jsxs("main",{className:"flex h-full w-full flex-col items-center justify-between gap-4",children:[e.jsxs("div",{className:"container flex h-full w-full max-w-5xl flex-1 flex-col items-center gap-4 overflow-y-scroll py-12 scrollbar-thin scrollbar-thumb-scrollbar",children:[e.jsx("h1",{className:"text-5xl",children:"Onboarding"}),e.jsx("p",{className:"text-xl",children:"Welcome to EpicWeb.dev!"}),e.jsxs("p",{className:"text-lg",children:["Before you get started, ",e.jsx("strong",{children:"you must watch the tour video"}),"! You're going to be spending a lot of time in here, so it's important you understand how to work effectively in this workshop"]}),e.jsx("div",{className:"w-[780px] max-w-full",children:e.jsx(r,{epicVideoInfosPromise:o.videoInfos,children:e.jsx(i,{url:o.onboardingVideo})})})]}),e.jsx(l,{method:"post",className:"pb-4",children:e.jsx(t,{name:"intent",value:"complete",varient:"primary",children:"I've watched it. Let's go!"})})]})}export{b as default,w as handle};
2
+ //# sourceMappingURL=onboarding-C2YNq60k.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"onboarding-BAVmCIKn.js","sources":["../../../app/routes/onboarding.tsx"],"sourcesContent":["import { invariantResponse } from '@epic-web/invariant'\nimport { getWorkshopConfig } from '@epic-web/workshop-utils/config.server'\nimport {\n\tgetAuthInfo,\n\tmarkOnboardingVideoWatched,\n} from '@epic-web/workshop-utils/db.server'\nimport { makeTimings } from '@epic-web/workshop-utils/timing.server'\nimport { type SEOHandle } from '@nasa-gcn/remix-seo'\nimport {\n\tunstable_data as data,\n\tredirect,\n\ttype ActionFunctionArgs,\n\ttype HeadersFunction,\n\ttype LoaderFunctionArgs,\n} from '@remix-run/node'\nimport { Form, useLoaderData } from '@remix-run/react'\nimport { Button } from '#app/components/button.tsx'\nimport {\n\tDeferredEpicVideo,\n\tEpicVideoInfoProvider,\n} from '#app/components/epic-video.tsx'\nimport { getEpicVideoInfos } from '#app/utils/epic-api.ts'\n\nexport const handle: SEOHandle = {\n\tgetSitemapEntries: () => null,\n}\n\nexport async function loader({ request }: LoaderFunctionArgs) {\n\tconst timings = makeTimings('onboarding')\n\n\tconst { onboardingVideo } = getWorkshopConfig()\n\tconst videoInfos = getEpicVideoInfos([onboardingVideo], { request, timings })\n\treturn data(\n\t\t{ onboardingVideo, videoInfos },\n\t\t{ headers: { 'Server-Timing': timings.toString() } },\n\t)\n}\n\nexport const headers: HeadersFunction = ({ loaderHeaders }) => {\n\tconst headers = {\n\t\t'Server-Timing': loaderHeaders.get('Server-Timing') ?? '',\n\t}\n\treturn headers\n}\n\nexport async function action({ request }: ActionFunctionArgs) {\n\tconst data = await request.formData()\n\tconst authInfo = await getAuthInfo()\n\tconst intent = data.get('intent')\n\tinvariantResponse(intent === 'complete', 'Invalid intent')\n\tconst { onboardingVideo } = getWorkshopConfig()\n\tawait markOnboardingVideoWatched(onboardingVideo)\n\n\tif (authInfo) throw redirect('/')\n\telse throw redirect('/login')\n}\n\nexport default function Onboarding() {\n\tconst data = useLoaderData<typeof loader>()\n\treturn (\n\t\t<main className=\"flex h-full w-full flex-col items-center justify-between gap-4\">\n\t\t\t<div className=\"container flex h-full w-full max-w-5xl flex-1 flex-col items-center gap-4 overflow-y-scroll py-12 scrollbar-thin scrollbar-thumb-scrollbar\">\n\t\t\t\t<h1 className=\"text-5xl\">Onboarding</h1>\n\t\t\t\t<p className=\"text-xl\">Welcome to EpicWeb.dev!</p>\n\t\t\t\t<p className=\"text-lg\">\n\t\t\t\t\tBefore you get started, <strong>you must watch the tour video</strong>\n\t\t\t\t\t! You're going to be spending a lot of time in here, so it's important\n\t\t\t\t\tyou understand how to work effectively in this workshop\n\t\t\t\t</p>\n\t\t\t\t<div className=\"w-[780px] max-w-full\">\n\t\t\t\t\t<EpicVideoInfoProvider epicVideoInfosPromise={data.videoInfos}>\n\t\t\t\t\t\t<DeferredEpicVideo url={data.onboardingVideo} />\n\t\t\t\t\t</EpicVideoInfoProvider>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<Form method=\"post\" className=\"pb-4\">\n\t\t\t\t<Button name=\"intent\" value=\"complete\" varient=\"primary\">\n\t\t\t\t\tI've watched it. Let's go!\n\t\t\t\t</Button>\n\t\t\t</Form>\n\t\t</main>\n\t)\n}\n"],"names":["handle","getSitemapEntries","Onboarding","data","useLoaderData","jsxs","className","children","jsx","EpicVideoInfoProvider","epicVideoInfosPromise","videoInfos","DeferredEpicVideo","url","onboardingVideo","Form","method","Button","name","value","varient"],"mappings":"yaAuBO,MAAMA,EAAoB,CAChCC,kBAAmBA,IAAM,IAC1B,EAgCA,SAAwBC,GAAa,CACpC,MAAMC,EAAOC,IAEZ,OAAAC,EAAAA,KAAC,OAAK,CAAAC,UAAU,iEACfC,SAAA,CAACF,EAAA,KAAA,MAAA,CAAIC,UAAU,6IACdC,SAAA,CAACC,EAAA,IAAA,KAAA,CAAGF,UAAU,WAAWC,SAAU,YAAA,CAAA,EAClCC,EAAA,IAAA,IAAA,CAAEF,UAAU,UAAUC,SAAuB,yBAAA,CAAA,EAC9CF,EAAA,KAAC,IAAE,CAAAC,UAAU,UAAUC,SAAA,CAAA,2BACEC,EAAA,IAAC,UAAOD,SAA6B,+BAAA,CAAA,EAAS,gIAAA,CAGvE,CAAA,EACCC,EAAA,IAAA,MAAA,CAAIF,UAAU,uBACdC,eAACE,EAAsB,CAAAC,sBAAuBP,EAAKQ,WAClDJ,eAACK,EAAkB,CAAAC,IAAKV,EAAKW,gBAAiB,EAC/C,CACD,CAAA,CAAA,CACD,CAAA,EACCN,EAAA,IAAAO,EAAA,CAAKC,OAAO,OAAOV,UAAU,OAC7BC,SAAAC,EAAA,IAACS,EAAO,CAAAC,KAAK,SAASC,MAAM,WAAWC,QAAQ,UAAUb,sCAEzD,CACD,CAAA,CAAA,CACD,CAAA,CAEF"}
1
+ {"version":3,"file":"onboarding-C2YNq60k.js","sources":["../../../app/routes/onboarding.tsx"],"sourcesContent":["import { invariantResponse } from '@epic-web/invariant'\nimport { getWorkshopConfig } from '@epic-web/workshop-utils/config.server'\nimport {\n\tgetAuthInfo,\n\tmarkOnboardingVideoWatched,\n} from '@epic-web/workshop-utils/db.server'\nimport { makeTimings } from '@epic-web/workshop-utils/timing.server'\nimport { type SEOHandle } from '@nasa-gcn/remix-seo'\nimport {\n\tunstable_data as data,\n\tredirect,\n\ttype ActionFunctionArgs,\n\ttype HeadersFunction,\n\ttype LoaderFunctionArgs,\n} from '@remix-run/node'\nimport { Form, useLoaderData } from '@remix-run/react'\nimport { Button } from '#app/components/button.tsx'\nimport {\n\tDeferredEpicVideo,\n\tEpicVideoInfoProvider,\n} from '#app/components/epic-video.tsx'\nimport { getEpicVideoInfos } from '#app/utils/epic-api.ts'\n\nexport const handle: SEOHandle = {\n\tgetSitemapEntries: () => null,\n}\n\nexport async function loader({ request }: LoaderFunctionArgs) {\n\tconst timings = makeTimings('onboarding')\n\n\tconst { onboardingVideo } = getWorkshopConfig()\n\tconst videoInfos = getEpicVideoInfos([onboardingVideo], { request, timings })\n\treturn data(\n\t\t{ onboardingVideo, videoInfos },\n\t\t{ headers: { 'Server-Timing': timings.toString() } },\n\t)\n}\n\nexport const headers: HeadersFunction = ({ loaderHeaders }) => {\n\tconst headers = {\n\t\t'Server-Timing': loaderHeaders.get('Server-Timing') ?? '',\n\t}\n\treturn headers\n}\n\nexport async function action({ request }: ActionFunctionArgs) {\n\tconst data = await request.formData()\n\tconst authInfo = await getAuthInfo()\n\tconst intent = data.get('intent')\n\tinvariantResponse(intent === 'complete', 'Invalid intent')\n\tconst { onboardingVideo } = getWorkshopConfig()\n\tawait markOnboardingVideoWatched(onboardingVideo)\n\n\tif (authInfo) throw redirect('/')\n\telse throw redirect('/login')\n}\n\nexport default function Onboarding() {\n\tconst data = useLoaderData<typeof loader>()\n\treturn (\n\t\t<main className=\"flex h-full w-full flex-col items-center justify-between gap-4\">\n\t\t\t<div className=\"container flex h-full w-full max-w-5xl flex-1 flex-col items-center gap-4 overflow-y-scroll py-12 scrollbar-thin scrollbar-thumb-scrollbar\">\n\t\t\t\t<h1 className=\"text-5xl\">Onboarding</h1>\n\t\t\t\t<p className=\"text-xl\">Welcome to EpicWeb.dev!</p>\n\t\t\t\t<p className=\"text-lg\">\n\t\t\t\t\tBefore you get started, <strong>you must watch the tour video</strong>\n\t\t\t\t\t! You're going to be spending a lot of time in here, so it's important\n\t\t\t\t\tyou understand how to work effectively in this workshop\n\t\t\t\t</p>\n\t\t\t\t<div className=\"w-[780px] max-w-full\">\n\t\t\t\t\t<EpicVideoInfoProvider epicVideoInfosPromise={data.videoInfos}>\n\t\t\t\t\t\t<DeferredEpicVideo url={data.onboardingVideo} />\n\t\t\t\t\t</EpicVideoInfoProvider>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<Form method=\"post\" className=\"pb-4\">\n\t\t\t\t<Button name=\"intent\" value=\"complete\" varient=\"primary\">\n\t\t\t\t\tI've watched it. Let's go!\n\t\t\t\t</Button>\n\t\t\t</Form>\n\t\t</main>\n\t)\n}\n"],"names":["handle","getSitemapEntries","Onboarding","data","useLoaderData","jsxs","className","children","jsx","EpicVideoInfoProvider","epicVideoInfosPromise","videoInfos","DeferredEpicVideo","url","onboardingVideo","Form","method","Button","name","value","varient"],"mappings":"yaAuBO,MAAMA,EAAoB,CAChCC,kBAAmBA,IAAM,IAC1B,EAgCA,SAAwBC,GAAa,CACpC,MAAMC,EAAOC,IAEZ,OAAAC,EAAAA,KAAC,OAAK,CAAAC,UAAU,iEACfC,SAAA,CAACF,EAAA,KAAA,MAAA,CAAIC,UAAU,6IACdC,SAAA,CAACC,EAAA,IAAA,KAAA,CAAGF,UAAU,WAAWC,SAAU,YAAA,CAAA,EAClCC,EAAA,IAAA,IAAA,CAAEF,UAAU,UAAUC,SAAuB,yBAAA,CAAA,EAC9CF,EAAA,KAAC,IAAE,CAAAC,UAAU,UAAUC,SAAA,CAAA,2BACEC,EAAA,IAAC,UAAOD,SAA6B,+BAAA,CAAA,EAAS,gIAAA,CAGvE,CAAA,EACCC,EAAA,IAAA,MAAA,CAAIF,UAAU,uBACdC,eAACE,EAAsB,CAAAC,sBAAuBP,EAAKQ,WAClDJ,eAACK,EAAkB,CAAAC,IAAKV,EAAKW,gBAAiB,EAC/C,CACD,CAAA,CAAA,CACD,CAAA,EACCN,EAAA,IAAAO,EAAA,CAAKC,OAAO,OAAOV,UAAU,OAC7BC,SAAAC,EAAA,IAACS,EAAO,CAAAC,KAAK,SAASC,MAAM,WAAWC,QAAQ,UAAUb,sCAEzD,CACD,CAAA,CAAA,CACD,CAAA,CAEF"}
@@ -1,4 +1,4 @@
1
- var it=Object.defineProperty;var ct=(e,n,t)=>n in e?it(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var p=(e,n,t)=>ct(e,typeof n!="symbol"?n+"":n,t);import{n as te,r as x,j as at,b as ut}from"./index-BFGhCX_U.js";import{z as d,u as lt}from"./request-info-DCIQLE6H.js";import{e as q}from"./components-9EGYHTc_.js";const ae="epic-web-presence",ht=`https://epic-web-presence.kentcdodds.partykit.dev/parties/main/${ae}`,V=d.object({id:d.string(),hasAccess:d.boolean().nullable().optional(),avatarUrl:d.string().nullable().optional(),imageUrlSmall:d.string().nullable().optional(),imageUrlLarge:d.string().nullable().optional(),name:d.string().nullable().optional(),location:d.object({workshopTitle:d.string().nullable().optional(),origin:d.string().nullable().optional(),exercise:d.object({type:d.union([d.literal("problem"),d.literal("solution")]).nullable().optional(),exerciseNumber:d.number().nullable().optional(),stepNumber:d.number().nullable().optional()}).nullable().optional()}).nullable().optional()}),ft=d.object({type:d.literal("remove-user"),payload:d.object({id:d.string()})}).or(d.object({type:d.literal("add-user"),payload:V})).or(d.object({type:d.literal("presence"),payload:d.object({users:d.array(V)})}));d.object({users:d.array(V)});var B={},_={},S={};Object.defineProperty(S,"__esModule",{value:!0});S.isBytes=le;S.number=G;S.bool=ue;S.bytes=J;S.hash=he;S.exists=fe;S.output=de;function G(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function ue(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function le(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function J(e,...n){if(!le(e))throw new Error("Uint8Array expected");if(n.length>0&&!n.includes(e.length))throw new Error(`Uint8Array expected of length ${n}, not of length=${e.length}`)}function he(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");G(e.outputLen),G(e.blockLen)}function fe(e,n=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(n&&e.finished)throw new Error("Hash#digest() has already been called")}function de(e,n){J(e);const t=n.outputLen;if(e.length<t)throw new Error(`digestInto() expects output buffer of length at least ${t}`)}const dt={number:G,bool:ue,bytes:J,hash:he,exists:fe,output:de};S.default=dt;var u={};Object.defineProperty(u,"__esModule",{value:!0});u.add5L=u.add5H=u.add4H=u.add4L=u.add3H=u.add3L=u.rotlBL=u.rotlBH=u.rotlSL=u.rotlSH=u.rotr32L=u.rotr32H=u.rotrBL=u.rotrBH=u.rotrSL=u.rotrSH=u.shrSL=u.shrSH=u.toBig=void 0;u.fromBig=Y;u.split=pe;u.add=Oe;const $=BigInt(2**32-1),K=BigInt(32);function Y(e,n=!1){return n?{h:Number(e&$),l:Number(e>>K&$)}:{h:Number(e>>K&$)|0,l:Number(e&$)|0}}function pe(e,n=!1){let t=new Uint32Array(e.length),s=new Uint32Array(e.length);for(let r=0;r<e.length;r++){const{h:i,l:c}=Y(e[r],n);[t[r],s[r]]=[i,c]}return[t,s]}const ye=(e,n)=>BigInt(e>>>0)<<K|BigInt(n>>>0);u.toBig=ye;const _e=(e,n,t)=>e>>>t;u.shrSH=_e;const ge=(e,n,t)=>e<<32-t|n>>>t;u.shrSL=ge;const me=(e,n,t)=>e>>>t|n<<32-t;u.rotrSH=me;const be=(e,n,t)=>e<<32-t|n>>>t;u.rotrSL=be;const we=(e,n,t)=>e<<64-t|n>>>t-32;u.rotrBH=we;const Le=(e,n,t)=>e>>>t-32|n<<64-t;u.rotrBL=Le;const ke=(e,n)=>n;u.rotr32H=ke;const xe=(e,n)=>e;u.rotr32L=xe;const ve=(e,n,t)=>e<<t|n>>>32-t;u.rotlSH=ve;const Ee=(e,n,t)=>n<<t|e>>>32-t;u.rotlSL=Ee;const Se=(e,n,t)=>n<<t-32|e>>>64-t;u.rotlBH=Se;const Te=(e,n,t)=>e<<t-32|n>>>64-t;u.rotlBL=Te;function Oe(e,n,t,s){const r=(n>>>0)+(s>>>0);return{h:e+t+(r/2**32|0)|0,l:r|0}}const Ce=(e,n,t)=>(e>>>0)+(n>>>0)+(t>>>0);u.add3L=Ce;const Ie=(e,n,t,s)=>n+t+s+(e/2**32|0)|0;u.add3H=Ie;const Be=(e,n,t,s)=>(e>>>0)+(n>>>0)+(t>>>0)+(s>>>0);u.add4L=Be;const Ue=(e,n,t,s,r)=>n+t+s+r+(e/2**32|0)|0;u.add4H=Ue;const Ae=(e,n,t,s,r)=>(e>>>0)+(n>>>0)+(t>>>0)+(s>>>0)+(r>>>0);u.add5L=Ae;const Ne=(e,n,t,s,r,i)=>n+t+s+r+i+(e/2**32|0)|0;u.add5H=Ne;const pt={fromBig:Y,split:pe,toBig:ye,shrSH:_e,shrSL:ge,rotrSH:me,rotrSL:be,rotrBH:we,rotrBL:Le,rotr32H:ke,rotr32L:xe,rotlSH:ve,rotlSL:Ee,rotlBH:Se,rotlBL:Te,add:Oe,add3L:Ce,add3H:Ie,add4L:Be,add4H:Ue,add5H:Ne,add5L:Ae};u.default=pt;var Pe={},X={};Object.defineProperty(X,"__esModule",{value:!0});X.crypto=void 0;X.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.Hash=e.nextTick=e.byteSwapIfBE=e.byteSwap=e.isLE=e.rotl=e.rotr=e.createView=e.u32=e.u8=void 0,e.isBytes=s,e.byteSwap32=y,e.bytesToHex=v,e.hexToBytes=C,e.asyncLoop=I,e.utf8ToBytes=T,e.toBytes=D,e.concatBytes=Je,e.checkOpts=et,e.wrapConstructor=tt,e.wrapConstructorWithOpts=nt,e.wrapXOFConstructorWithOpts=st,e.randomBytes=rt;const n=X,t=S;function s(o){return o instanceof Uint8Array||o!=null&&typeof o=="object"&&o.constructor.name==="Uint8Array"}const r=o=>new Uint8Array(o.buffer,o.byteOffset,o.byteLength);e.u8=r;const i=o=>new Uint32Array(o.buffer,o.byteOffset,Math.floor(o.byteLength/4));e.u32=i;const c=o=>new DataView(o.buffer,o.byteOffset,o.byteLength);e.createView=c;const a=(o,l)=>o<<32-l|o>>>l;e.rotr=a;const h=(o,l)=>o<<l|o>>>32-l>>>0;e.rotl=h,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;const f=o=>o<<24&4278190080|o<<8&16711680|o>>>8&65280|o>>>24&255;e.byteSwap=f,e.byteSwapIfBE=e.isLE?o=>o:o=>(0,e.byteSwap)(o);function y(o){for(let l=0;l<o.length;l++)o[l]=(0,e.byteSwap)(o[l])}const L=Array.from({length:256},(o,l)=>l.toString(16).padStart(2,"0"));function v(o){(0,t.bytes)(o);let l="";for(let b=0;b<o.length;b++)l+=L[o[b]];return l}const m={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function E(o){if(o>=m._0&&o<=m._9)return o-m._0;if(o>=m._A&&o<=m._F)return o-(m._A-10);if(o>=m._a&&o<=m._f)return o-(m._a-10)}function C(o){if(typeof o!="string")throw new Error("hex string expected, got "+typeof o);const l=o.length,b=l/2;if(l%2)throw new Error("padded hex string expected, got unpadded hex of length "+l);const g=new Uint8Array(b);for(let w=0,k=0;w<b;w++,k+=2){const Z=E(o.charCodeAt(k)),ee=E(o.charCodeAt(k+1));if(Z===void 0||ee===void 0){const ot=o[k]+o[k+1];throw new Error('hex string expected, got non-hex character "'+ot+'" at index '+k)}g[w]=Z*16+ee}return g}const j=async()=>{};e.nextTick=j;async function I(o,l,b){let g=Date.now();for(let w=0;w<o;w++){b(w);const k=Date.now()-g;k>=0&&k<l||(await(0,e.nextTick)(),g+=k)}}function T(o){if(typeof o!="string")throw new Error(`utf8ToBytes expected string, got ${typeof o}`);return new Uint8Array(new TextEncoder().encode(o))}function D(o){return typeof o=="string"&&(o=T(o)),(0,t.bytes)(o),o}function Je(...o){let l=0;for(let g=0;g<o.length;g++){const w=o[g];(0,t.bytes)(w),l+=w.length}const b=new Uint8Array(l);for(let g=0,w=0;g<o.length;g++){const k=o[g];b.set(k,w),w+=k.length}return b}class Ye{clone(){return this._cloneInto()}}e.Hash=Ye;const Ze={}.toString;function et(o,l){if(l!==void 0&&Ze.call(l)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(o,l)}function tt(o){const l=g=>o().update(D(g)).digest(),b=o();return l.outputLen=b.outputLen,l.blockLen=b.blockLen,l.create=()=>o(),l}function nt(o){const l=(g,w)=>o(w).update(D(g)).digest(),b=o({});return l.outputLen=b.outputLen,l.blockLen=b.blockLen,l.create=g=>o(g),l}function st(o){const l=(g,w)=>o(w).update(D(g)).digest(),b=o({});return l.outputLen=b.outputLen,l.blockLen=b.blockLen,l.create=g=>o(g),l}function rt(o=32){if(n.crypto&&typeof n.crypto.getRandomValues=="function")return n.crypto.getRandomValues(new Uint8Array(o));if(n.crypto&&typeof n.crypto.randomBytes=="function")return n.crypto.randomBytes(o);throw new Error("crypto.getRandomValues must be defined")}})(Pe);Object.defineProperty(_,"__esModule",{value:!0});_.shake256=_.shake128=_.keccak_512=_.keccak_384=_.keccak_256=_.keccak_224=_.sha3_512=_.sha3_384=_.sha3_256=_.sha3_224=_.Keccak=void 0;_.keccakP=We;const P=S,M=u,O=Pe,He=[],Re=[],Me=[],yt=BigInt(0),H=BigInt(1),_t=BigInt(2),gt=BigInt(7),mt=BigInt(256),bt=BigInt(113);for(let e=0,n=H,t=1,s=0;e<24;e++){[t,s]=[s,(2*t+3*s)%5],He.push(2*(5*s+t)),Re.push((e+1)*(e+2)/2%64);let r=yt;for(let i=0;i<7;i++)n=(n<<H^(n>>gt)*bt)%mt,n&_t&&(r^=H<<(H<<BigInt(i))-H);Me.push(r)}const[wt,Lt]=(0,M.split)(Me,!0),ne=(e,n,t)=>t>32?(0,M.rotlBH)(e,n,t):(0,M.rotlSH)(e,n,t),se=(e,n,t)=>t>32?(0,M.rotlBL)(e,n,t):(0,M.rotlSL)(e,n,t);function We(e,n=24){const t=new Uint32Array(10);for(let s=24-n;s<24;s++){for(let c=0;c<10;c++)t[c]=e[c]^e[c+10]^e[c+20]^e[c+30]^e[c+40];for(let c=0;c<10;c+=2){const a=(c+8)%10,h=(c+2)%10,f=t[h],y=t[h+1],L=ne(f,y,1)^t[a],v=se(f,y,1)^t[a+1];for(let m=0;m<50;m+=10)e[c+m]^=L,e[c+m+1]^=v}let r=e[2],i=e[3];for(let c=0;c<24;c++){const a=Re[c],h=ne(r,i,a),f=se(r,i,a),y=He[c];r=e[y],i=e[y+1],e[y]=h,e[y+1]=f}for(let c=0;c<50;c+=10){for(let a=0;a<10;a++)t[a]=e[c+a];for(let a=0;a<10;a++)e[c+a]^=~t[(a+2)%10]&t[(a+4)%10]}e[0]^=wt[s],e[1]^=Lt[s]}t.fill(0)}class W extends O.Hash{constructor(n,t,s,r=!1,i=24){if(super(),this.blockLen=n,this.suffix=t,this.outputLen=s,this.enableXOF=r,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,P.number)(s),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,O.u32)(this.state)}keccak(){O.isLE||(0,O.byteSwap32)(this.state32),We(this.state32,this.rounds),O.isLE||(0,O.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(n){(0,P.exists)(this);const{blockLen:t,state:s}=this;n=(0,O.toBytes)(n);const r=n.length;for(let i=0;i<r;){const c=Math.min(t-this.pos,r-i);for(let a=0;a<c;a++)s[this.pos++]^=n[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:n,suffix:t,pos:s,blockLen:r}=this;n[s]^=t,t&128&&s===r-1&&this.keccak(),n[r-1]^=128,this.keccak()}writeInto(n){(0,P.exists)(this,!1),(0,P.bytes)(n),this.finish();const t=this.state,{blockLen:s}=this;for(let r=0,i=n.length;r<i;){this.posOut>=s&&this.keccak();const c=Math.min(s-this.posOut,i-r);n.set(t.subarray(this.posOut,this.posOut+c),r),this.posOut+=c,r+=c}return n}xofInto(n){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(n)}xof(n){return(0,P.number)(n),this.xofInto(new Uint8Array(n))}digestInto(n){if((0,P.output)(n,this),this.finished)throw new Error("digest() was already called");return this.writeInto(n),this.destroy(),n}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(n){const{blockLen:t,suffix:s,outputLen:r,rounds:i,enableXOF:c}=this;return n||(n=new W(t,s,r,c,i)),n.state32.set(this.state32),n.pos=this.pos,n.posOut=this.posOut,n.finished=this.finished,n.rounds=i,n.suffix=s,n.outputLen=r,n.enableXOF=c,n.destroyed=this.destroyed,n}}_.Keccak=W;const U=(e,n,t)=>(0,O.wrapConstructor)(()=>new W(n,e,t));_.sha3_224=U(6,144,224/8);_.sha3_256=U(6,136,256/8);_.sha3_384=U(6,104,384/8);_.sha3_512=U(6,72,512/8);_.keccak_224=U(1,144,224/8);_.keccak_256=U(1,136,256/8);_.keccak_384=U(1,104,384/8);_.keccak_512=U(1,72,512/8);const je=(e,n,t)=>(0,O.wrapXOFConstructorWithOpts)((s={})=>new W(n,e,s.dkLen===void 0?t:s.dkLen,!0));_.shake128=je(31,168,128/8);_.shake256=je(31,136,256/8);const{sha3_512:kt}=_,De=24,R=32,z=(e=4,n=Math.random)=>{let t="";for(;t.length<e;)t=t+Math.floor(n()*36).toString(36);return t};function $e(e){let n=8n,t=0n;for(const s of e.values()){const r=BigInt(s);t=(t<<n)+r}return t}const Fe=(e="")=>$e(kt(e)).toString(36).slice(1),re=Array.from({length:26},(e,n)=>String.fromCharCode(n+97)),xt=e=>re[Math.floor(e()*re.length)],qe=({globalObj:e=typeof te<"u"?te:typeof window<"u"?window:{},random:n=Math.random}={})=>{const t=Object.keys(e).toString(),s=t.length?t+z(R,n):z(R,n);return Fe(s).substring(0,R)},Ge=e=>()=>e++,vt=476782367,Xe=({random:e=Math.random,counter:n=Ge(Math.floor(e()*vt)),length:t=De,fingerprint:s=qe({random:e})}={})=>function(){const i=xt(e),c=Date.now().toString(36),a=n().toString(36),h=z(t,e),f=`${c+h+a+s}`;return`${i+Fe(f).substring(1,t)}`},Et=Xe(),St=(e,{minLength:n=2,maxLength:t=R}={})=>{const s=e.length,r=/^[0-9a-z]+$/;try{if(typeof e=="string"&&s>=n&&s<=t&&r.test(e))return!0}finally{}return!1};B.getConstants=()=>({defaultLength:De,bigLength:R});B.init=Xe;B.createId=Et;B.bufToBigInt=$e;B.createCounter=Ge;B.createFingerprint=qe;B.isCuid=St;const{createId:Tt,init:zt,getConstants:Jt,isCuid:Yt}=B;var Ot=Tt;(!globalThis.EventTarget||!globalThis.Event)&&console.error(`
1
+ var it=Object.defineProperty;var ct=(e,n,t)=>n in e?it(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var p=(e,n,t)=>ct(e,typeof n!="symbol"?n+"":n,t);import{n as te,r as x,j as at,b as ut}from"./index-BFGhCX_U.js";import{z as d,u as lt}from"./request-info-ByUEfOil.js";import{c as q}from"./components-Be92gVxW.js";const ae="epic-web-presence",ht=`https://epic-web-presence.kentcdodds.partykit.dev/parties/main/${ae}`,V=d.object({id:d.string(),hasAccess:d.boolean().nullable().optional(),avatarUrl:d.string().nullable().optional(),imageUrlSmall:d.string().nullable().optional(),imageUrlLarge:d.string().nullable().optional(),name:d.string().nullable().optional(),location:d.object({workshopTitle:d.string().nullable().optional(),origin:d.string().nullable().optional(),exercise:d.object({type:d.union([d.literal("problem"),d.literal("solution")]).nullable().optional(),exerciseNumber:d.number().nullable().optional(),stepNumber:d.number().nullable().optional()}).nullable().optional()}).nullable().optional()}),ft=d.object({type:d.literal("remove-user"),payload:d.object({id:d.string()})}).or(d.object({type:d.literal("add-user"),payload:V})).or(d.object({type:d.literal("presence"),payload:d.object({users:d.array(V)})}));d.object({users:d.array(V)});var B={},_={},S={};Object.defineProperty(S,"__esModule",{value:!0});S.isBytes=le;S.number=G;S.bool=ue;S.bytes=J;S.hash=he;S.exists=fe;S.output=de;function G(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function ue(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function le(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function J(e,...n){if(!le(e))throw new Error("Uint8Array expected");if(n.length>0&&!n.includes(e.length))throw new Error(`Uint8Array expected of length ${n}, not of length=${e.length}`)}function he(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");G(e.outputLen),G(e.blockLen)}function fe(e,n=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(n&&e.finished)throw new Error("Hash#digest() has already been called")}function de(e,n){J(e);const t=n.outputLen;if(e.length<t)throw new Error(`digestInto() expects output buffer of length at least ${t}`)}const dt={number:G,bool:ue,bytes:J,hash:he,exists:fe,output:de};S.default=dt;var u={};Object.defineProperty(u,"__esModule",{value:!0});u.add5L=u.add5H=u.add4H=u.add4L=u.add3H=u.add3L=u.rotlBL=u.rotlBH=u.rotlSL=u.rotlSH=u.rotr32L=u.rotr32H=u.rotrBL=u.rotrBH=u.rotrSL=u.rotrSH=u.shrSL=u.shrSH=u.toBig=void 0;u.fromBig=Y;u.split=pe;u.add=Oe;const $=BigInt(2**32-1),K=BigInt(32);function Y(e,n=!1){return n?{h:Number(e&$),l:Number(e>>K&$)}:{h:Number(e>>K&$)|0,l:Number(e&$)|0}}function pe(e,n=!1){let t=new Uint32Array(e.length),s=new Uint32Array(e.length);for(let r=0;r<e.length;r++){const{h:i,l:c}=Y(e[r],n);[t[r],s[r]]=[i,c]}return[t,s]}const ye=(e,n)=>BigInt(e>>>0)<<K|BigInt(n>>>0);u.toBig=ye;const _e=(e,n,t)=>e>>>t;u.shrSH=_e;const ge=(e,n,t)=>e<<32-t|n>>>t;u.shrSL=ge;const me=(e,n,t)=>e>>>t|n<<32-t;u.rotrSH=me;const be=(e,n,t)=>e<<32-t|n>>>t;u.rotrSL=be;const we=(e,n,t)=>e<<64-t|n>>>t-32;u.rotrBH=we;const Le=(e,n,t)=>e>>>t-32|n<<64-t;u.rotrBL=Le;const ke=(e,n)=>n;u.rotr32H=ke;const xe=(e,n)=>e;u.rotr32L=xe;const ve=(e,n,t)=>e<<t|n>>>32-t;u.rotlSH=ve;const Ee=(e,n,t)=>n<<t|e>>>32-t;u.rotlSL=Ee;const Se=(e,n,t)=>n<<t-32|e>>>64-t;u.rotlBH=Se;const Te=(e,n,t)=>e<<t-32|n>>>64-t;u.rotlBL=Te;function Oe(e,n,t,s){const r=(n>>>0)+(s>>>0);return{h:e+t+(r/2**32|0)|0,l:r|0}}const Ce=(e,n,t)=>(e>>>0)+(n>>>0)+(t>>>0);u.add3L=Ce;const Ie=(e,n,t,s)=>n+t+s+(e/2**32|0)|0;u.add3H=Ie;const Be=(e,n,t,s)=>(e>>>0)+(n>>>0)+(t>>>0)+(s>>>0);u.add4L=Be;const Ue=(e,n,t,s,r)=>n+t+s+r+(e/2**32|0)|0;u.add4H=Ue;const Ae=(e,n,t,s,r)=>(e>>>0)+(n>>>0)+(t>>>0)+(s>>>0)+(r>>>0);u.add5L=Ae;const Ne=(e,n,t,s,r,i)=>n+t+s+r+i+(e/2**32|0)|0;u.add5H=Ne;const pt={fromBig:Y,split:pe,toBig:ye,shrSH:_e,shrSL:ge,rotrSH:me,rotrSL:be,rotrBH:we,rotrBL:Le,rotr32H:ke,rotr32L:xe,rotlSH:ve,rotlSL:Ee,rotlBH:Se,rotlBL:Te,add:Oe,add3L:Ce,add3H:Ie,add4L:Be,add4H:Ue,add5H:Ne,add5L:Ae};u.default=pt;var Pe={},X={};Object.defineProperty(X,"__esModule",{value:!0});X.crypto=void 0;X.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.Hash=e.nextTick=e.byteSwapIfBE=e.byteSwap=e.isLE=e.rotl=e.rotr=e.createView=e.u32=e.u8=void 0,e.isBytes=s,e.byteSwap32=y,e.bytesToHex=v,e.hexToBytes=C,e.asyncLoop=I,e.utf8ToBytes=T,e.toBytes=D,e.concatBytes=Je,e.checkOpts=et,e.wrapConstructor=tt,e.wrapConstructorWithOpts=nt,e.wrapXOFConstructorWithOpts=st,e.randomBytes=rt;const n=X,t=S;function s(o){return o instanceof Uint8Array||o!=null&&typeof o=="object"&&o.constructor.name==="Uint8Array"}const r=o=>new Uint8Array(o.buffer,o.byteOffset,o.byteLength);e.u8=r;const i=o=>new Uint32Array(o.buffer,o.byteOffset,Math.floor(o.byteLength/4));e.u32=i;const c=o=>new DataView(o.buffer,o.byteOffset,o.byteLength);e.createView=c;const a=(o,l)=>o<<32-l|o>>>l;e.rotr=a;const h=(o,l)=>o<<l|o>>>32-l>>>0;e.rotl=h,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;const f=o=>o<<24&4278190080|o<<8&16711680|o>>>8&65280|o>>>24&255;e.byteSwap=f,e.byteSwapIfBE=e.isLE?o=>o:o=>(0,e.byteSwap)(o);function y(o){for(let l=0;l<o.length;l++)o[l]=(0,e.byteSwap)(o[l])}const L=Array.from({length:256},(o,l)=>l.toString(16).padStart(2,"0"));function v(o){(0,t.bytes)(o);let l="";for(let b=0;b<o.length;b++)l+=L[o[b]];return l}const m={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function E(o){if(o>=m._0&&o<=m._9)return o-m._0;if(o>=m._A&&o<=m._F)return o-(m._A-10);if(o>=m._a&&o<=m._f)return o-(m._a-10)}function C(o){if(typeof o!="string")throw new Error("hex string expected, got "+typeof o);const l=o.length,b=l/2;if(l%2)throw new Error("padded hex string expected, got unpadded hex of length "+l);const g=new Uint8Array(b);for(let w=0,k=0;w<b;w++,k+=2){const Z=E(o.charCodeAt(k)),ee=E(o.charCodeAt(k+1));if(Z===void 0||ee===void 0){const ot=o[k]+o[k+1];throw new Error('hex string expected, got non-hex character "'+ot+'" at index '+k)}g[w]=Z*16+ee}return g}const j=async()=>{};e.nextTick=j;async function I(o,l,b){let g=Date.now();for(let w=0;w<o;w++){b(w);const k=Date.now()-g;k>=0&&k<l||(await(0,e.nextTick)(),g+=k)}}function T(o){if(typeof o!="string")throw new Error(`utf8ToBytes expected string, got ${typeof o}`);return new Uint8Array(new TextEncoder().encode(o))}function D(o){return typeof o=="string"&&(o=T(o)),(0,t.bytes)(o),o}function Je(...o){let l=0;for(let g=0;g<o.length;g++){const w=o[g];(0,t.bytes)(w),l+=w.length}const b=new Uint8Array(l);for(let g=0,w=0;g<o.length;g++){const k=o[g];b.set(k,w),w+=k.length}return b}class Ye{clone(){return this._cloneInto()}}e.Hash=Ye;const Ze={}.toString;function et(o,l){if(l!==void 0&&Ze.call(l)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(o,l)}function tt(o){const l=g=>o().update(D(g)).digest(),b=o();return l.outputLen=b.outputLen,l.blockLen=b.blockLen,l.create=()=>o(),l}function nt(o){const l=(g,w)=>o(w).update(D(g)).digest(),b=o({});return l.outputLen=b.outputLen,l.blockLen=b.blockLen,l.create=g=>o(g),l}function st(o){const l=(g,w)=>o(w).update(D(g)).digest(),b=o({});return l.outputLen=b.outputLen,l.blockLen=b.blockLen,l.create=g=>o(g),l}function rt(o=32){if(n.crypto&&typeof n.crypto.getRandomValues=="function")return n.crypto.getRandomValues(new Uint8Array(o));if(n.crypto&&typeof n.crypto.randomBytes=="function")return n.crypto.randomBytes(o);throw new Error("crypto.getRandomValues must be defined")}})(Pe);Object.defineProperty(_,"__esModule",{value:!0});_.shake256=_.shake128=_.keccak_512=_.keccak_384=_.keccak_256=_.keccak_224=_.sha3_512=_.sha3_384=_.sha3_256=_.sha3_224=_.Keccak=void 0;_.keccakP=We;const P=S,M=u,O=Pe,He=[],Re=[],Me=[],yt=BigInt(0),H=BigInt(1),_t=BigInt(2),gt=BigInt(7),mt=BigInt(256),bt=BigInt(113);for(let e=0,n=H,t=1,s=0;e<24;e++){[t,s]=[s,(2*t+3*s)%5],He.push(2*(5*s+t)),Re.push((e+1)*(e+2)/2%64);let r=yt;for(let i=0;i<7;i++)n=(n<<H^(n>>gt)*bt)%mt,n&_t&&(r^=H<<(H<<BigInt(i))-H);Me.push(r)}const[wt,Lt]=(0,M.split)(Me,!0),ne=(e,n,t)=>t>32?(0,M.rotlBH)(e,n,t):(0,M.rotlSH)(e,n,t),se=(e,n,t)=>t>32?(0,M.rotlBL)(e,n,t):(0,M.rotlSL)(e,n,t);function We(e,n=24){const t=new Uint32Array(10);for(let s=24-n;s<24;s++){for(let c=0;c<10;c++)t[c]=e[c]^e[c+10]^e[c+20]^e[c+30]^e[c+40];for(let c=0;c<10;c+=2){const a=(c+8)%10,h=(c+2)%10,f=t[h],y=t[h+1],L=ne(f,y,1)^t[a],v=se(f,y,1)^t[a+1];for(let m=0;m<50;m+=10)e[c+m]^=L,e[c+m+1]^=v}let r=e[2],i=e[3];for(let c=0;c<24;c++){const a=Re[c],h=ne(r,i,a),f=se(r,i,a),y=He[c];r=e[y],i=e[y+1],e[y]=h,e[y+1]=f}for(let c=0;c<50;c+=10){for(let a=0;a<10;a++)t[a]=e[c+a];for(let a=0;a<10;a++)e[c+a]^=~t[(a+2)%10]&t[(a+4)%10]}e[0]^=wt[s],e[1]^=Lt[s]}t.fill(0)}class W extends O.Hash{constructor(n,t,s,r=!1,i=24){if(super(),this.blockLen=n,this.suffix=t,this.outputLen=s,this.enableXOF=r,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,P.number)(s),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,O.u32)(this.state)}keccak(){O.isLE||(0,O.byteSwap32)(this.state32),We(this.state32,this.rounds),O.isLE||(0,O.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(n){(0,P.exists)(this);const{blockLen:t,state:s}=this;n=(0,O.toBytes)(n);const r=n.length;for(let i=0;i<r;){const c=Math.min(t-this.pos,r-i);for(let a=0;a<c;a++)s[this.pos++]^=n[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:n,suffix:t,pos:s,blockLen:r}=this;n[s]^=t,t&128&&s===r-1&&this.keccak(),n[r-1]^=128,this.keccak()}writeInto(n){(0,P.exists)(this,!1),(0,P.bytes)(n),this.finish();const t=this.state,{blockLen:s}=this;for(let r=0,i=n.length;r<i;){this.posOut>=s&&this.keccak();const c=Math.min(s-this.posOut,i-r);n.set(t.subarray(this.posOut,this.posOut+c),r),this.posOut+=c,r+=c}return n}xofInto(n){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(n)}xof(n){return(0,P.number)(n),this.xofInto(new Uint8Array(n))}digestInto(n){if((0,P.output)(n,this),this.finished)throw new Error("digest() was already called");return this.writeInto(n),this.destroy(),n}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(n){const{blockLen:t,suffix:s,outputLen:r,rounds:i,enableXOF:c}=this;return n||(n=new W(t,s,r,c,i)),n.state32.set(this.state32),n.pos=this.pos,n.posOut=this.posOut,n.finished=this.finished,n.rounds=i,n.suffix=s,n.outputLen=r,n.enableXOF=c,n.destroyed=this.destroyed,n}}_.Keccak=W;const U=(e,n,t)=>(0,O.wrapConstructor)(()=>new W(n,e,t));_.sha3_224=U(6,144,224/8);_.sha3_256=U(6,136,256/8);_.sha3_384=U(6,104,384/8);_.sha3_512=U(6,72,512/8);_.keccak_224=U(1,144,224/8);_.keccak_256=U(1,136,256/8);_.keccak_384=U(1,104,384/8);_.keccak_512=U(1,72,512/8);const je=(e,n,t)=>(0,O.wrapXOFConstructorWithOpts)((s={})=>new W(n,e,s.dkLen===void 0?t:s.dkLen,!0));_.shake128=je(31,168,128/8);_.shake256=je(31,136,256/8);const{sha3_512:kt}=_,De=24,R=32,z=(e=4,n=Math.random)=>{let t="";for(;t.length<e;)t=t+Math.floor(n()*36).toString(36);return t};function $e(e){let n=8n,t=0n;for(const s of e.values()){const r=BigInt(s);t=(t<<n)+r}return t}const Fe=(e="")=>$e(kt(e)).toString(36).slice(1),re=Array.from({length:26},(e,n)=>String.fromCharCode(n+97)),xt=e=>re[Math.floor(e()*re.length)],qe=({globalObj:e=typeof te<"u"?te:typeof window<"u"?window:{},random:n=Math.random}={})=>{const t=Object.keys(e).toString(),s=t.length?t+z(R,n):z(R,n);return Fe(s).substring(0,R)},Ge=e=>()=>e++,vt=476782367,Xe=({random:e=Math.random,counter:n=Ge(Math.floor(e()*vt)),length:t=De,fingerprint:s=qe({random:e})}={})=>function(){const i=xt(e),c=Date.now().toString(36),a=n().toString(36),h=z(t,e),f=`${c+h+a+s}`;return`${i+Fe(f).substring(1,t)}`},Et=Xe(),St=(e,{minLength:n=2,maxLength:t=R}={})=>{const s=e.length,r=/^[0-9a-z]+$/;try{if(typeof e=="string"&&s>=n&&s<=t&&r.test(e))return!0}finally{}return!1};B.getConstants=()=>({defaultLength:De,bigLength:R});B.init=Xe;B.createId=Et;B.bufToBigInt=$e;B.createCounter=Ge;B.createFingerprint=qe;B.isCuid=St;const{createId:Tt,init:zt,getConstants:Jt,isCuid:Yt}=B;var Ot=Tt;(!globalThis.EventTarget||!globalThis.Event)&&console.error(`
2
2
  PartySocket requires a global 'EventTarget' class to be available!
3
3
  You can polyfill this global by adding this to your code before any partysocket imports:
4
4
 
@@ -25,4 +25,4 @@ const partysocket = new PartySocket({
25
25
  * https://github.com/pladaria/reconnecting-websocket
26
26
  * License MIT
27
27
  */var Nt=e=>e[1]!==null&&e[1]!==void 0;function Pt(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let e=new Date().getTime(),n=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){let s=Math.random()*16;return e>0?(s=(e+s)%16|0,e=Math.floor(e/16)):(s=(n+s)%16|0,n=Math.floor(n/16)),(t==="x"?s:s&3|8).toString(16)})}function Ke(e,n,t={}){const{host:s,path:r,protocol:i,room:c,party:a,prefix:h,query:f}=e;let y=s.replace(/^(http|https|ws|wss):\/\//,"");if(y.endsWith("/")&&(y=y.slice(0,-1)),r&&r.startsWith("/"))throw new Error("path must not start with a slash");const L=a??"main",v=r?`/${r}`:"",m=i||(y.startsWith("localhost:")||y.startsWith("127.0.0.1:")||y.startsWith("192.168.")||y.startsWith("10.")||y.startsWith("172.")&&y.split(".")[1]>="16"&&y.split(".")[1]<="31"||y.startsWith("[::ffff:7f00:1]:")?n:n+"s"),E=`${m}://${y}/${h||`parties/${L}/${c}`}${v}`,C=(I={})=>`${E}?${new URLSearchParams([...Object.entries(t),...Object.entries(I).filter(Nt)])}`,j=typeof f=="function"?async()=>C(await f()):C(f);return{host:y,path:v,room:c,name:L,protocol:m,partyUrl:E,urlProvider:j}}var Ht=class extends At{constructor(n){const t=ie(n);super(t.urlProvider,t.protocols,t.socketOptions);p(this,"_pk");p(this,"_pkurl");p(this,"name");p(this,"room");p(this,"host");p(this,"path");this.partySocketOptions=n,this.setWSProperties(t)}updateProperties(n){const t=ie({...this.partySocketOptions,...n,host:n.host??this.host,room:n.room??this.room,path:n.path??this.path});this._url=t.urlProvider,this._protocols=t.protocols,this._options=t.socketOptions,this.setWSProperties(t)}setWSProperties(n){const{_pk:t,_pkurl:s,name:r,room:i,host:c,path:a}=n;this._pk=t,this._pkurl=s,this.name=r,this.room=i,this.host=c,this.path=a}reconnect(n,t){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(n,t)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(n,t){const s=Ke(n,"http"),r=typeof s.urlProvider=="string"?s.urlProvider:await s.urlProvider();return(n.fetch??fetch)(r,t)}};function ie(e){const{id:n,host:t,path:s,party:r,room:i,protocol:c,query:a,protocols:h,...f}=e,y=n||Pt(),L=Ke(e,"ws",{_pk:y});return{_pk:y,_pkurl:L.partyUrl,name:L.name,room:L.room,host:L.host,path:L.path,protocols:h,socketOptions:f,urlProvider:L.urlProvider}}var Rt=(e,n)=>{const t=x.useRef(n);t.current=n,x.useEffect(()=>{const s=a=>{var h,f;return(f=(h=t.current)==null?void 0:h.onOpen)==null?void 0:f.call(h,a)},r=a=>{var h,f;return(f=(h=t.current)==null?void 0:h.onMessage)==null?void 0:f.call(h,a)},i=a=>{var h,f;return(f=(h=t.current)==null?void 0:h.onClose)==null?void 0:f.call(h,a)},c=a=>{var h,f;return(f=(h=t.current)==null?void 0:h.onError)==null?void 0:f.call(h,a)};return e.addEventListener("open",s),e.addEventListener("close",i),e.addEventListener("error",c),e.addEventListener("message",r),()=>{e.removeEventListener("open",s),e.removeEventListener("close",i),e.removeEventListener("error",c),e.removeEventListener("message",r)}},[e])},Mt=e=>[e.startClosed,e.minUptime,e.maxRetries,e.connectionTimeout,e.maxEnqueuedMessages,e.maxReconnectionDelay,e.minReconnectionDelay,e.reconnectionDelayGrowFactor,e.debug];function Wt({options:e,createSocket:n,createSocketMemoKey:t}){const s=t(e),r=x.useMemo(()=>e,[s]),[i,c]=x.useState(()=>n({...r,startClosed:!0})),a=x.useRef(null),h=x.useRef(n);return h.current=n,x.useEffect(()=>{if(a.current===i){const f=h.current({...r,startClosed:!1});c(f)}else return!a.current&&r.startClosed!==!0&&i.reconnect(),a.current=i,()=>{i.close()}},[i,r]),i}function jt(e){const{host:n,...t}=e,s=Wt({options:{host:n||(typeof window<"u"?window.location.host:"dummy-domain.com"),...t},createSocket:r=>new Ht(r),createSocketMemoKey:r=>JSON.stringify([r.query,r.id,r.host,r.room,r.party,r.path,r.protocol,r.protocols,...Mt(r)])});return Rt(s,e),s}const ze=x.createContext(null);function Dt(){var n;const e=q("root");return((n=e==null?void 0:e.preferences)==null?void 0:n.presence)??null}function $t(){const e=q("root");return(e==null?void 0:e.workshopTitle)??null}const Ft=d.object({type:d.union([d.literal("problem"),d.literal("solution")]).optional(),exerciseNumber:d.coerce.number().finite(),stepNumber:d.coerce.number().finite().optional()});function qt(e){const n=$t(),{userHasAccess:t=!1}=q("root")??{},s=lt(),r=ut(),i=Dt(),c=q("root"),[a,h]=x.useState((c==null?void 0:c.presence.users)??[]),[f]=x.useState(()=>{if(typeof document>"u")return null;if(e)return e.id;const I=sessionStorage.getItem("clientId");if(I)return I;const T=Ot();return sessionStorage.setItem("clientId",T),T}),y=jt({host:new URL(ht).host,room:ae,onMessage(I){const T=ft.safeParse(JSON.parse(String(I.data)));T.success&&T.data.type==="presence"&&h(T.data.payload.users)}}),L=Ft.safeParse(r),v=L.success?L.data:null,m={workshopTitle:n,origin:s.origin,...v?{exercise:{type:v.type,exerciseNumber:v.exerciseNumber,stepNumber:v.stepNumber}}:null};let E=null;(!e||i!=null&&i.optOut)&&f?(e&&(E={type:"remove-user",payload:{id:e.id}}),E={type:"add-user",payload:{id:f,location:m}}):e&&(E={type:"add-user",payload:{id:e.id,name:e.name,hasAccess:t,imageUrlSmall:e.imageUrlSmall,imageUrlLarge:e.imageUrlLarge,location:m}});const C=E?JSON.stringify(E):null;return x.useEffect(()=>{C&&y.send(C)},[C,y]),{users:Gt(m,a)}}function Gt(e,n){return n.map(s=>{var c,a,h,f;let r=0;const i=5;return s.hasAccess&&(r+=1),(e==null?void 0:e.workshopTitle)===((c=s.location)==null?void 0:c.workshopTitle)&&(r+=1,(a=e==null?void 0:e.exercise)!=null&&a.exerciseNumber&&e.exercise.exerciseNumber===((f=(h=s.location)==null?void 0:h.exercise)==null?void 0:f.exerciseNumber)&&(r+=1,e.exercise.stepNumber&&e.exercise.stepNumber===s.location.exercise.stepNumber&&(r+=1,e.exercise.type&&e.exercise.type===s.location.exercise.type&&(r+=1)))),{user:s,score:Math.floor(r/i*10)/10}}).sort((s,r)=>s.score===r.score?0:s.score>r.score?-1:1)}function Zt({user:e,children:n}){return at.jsx(ze.Provider,{value:qt(e),children:n})}function en(){const e=x.useContext(ze);if(!e)throw new Error("usePresence must be used within a PresenceProvider");return e}export{Zt as P,en as a,Dt as u};
28
- //# sourceMappingURL=presence-DyppfK2V.js.map
28
+ //# sourceMappingURL=presence-DJGFvdDh.js.map