@epic-web/workshop-app 4.19.1 → 4.20.1

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 (95) hide show
  1. package/build/client/assets/{_-DYArYM0Z.js → _-Dfo2h4rl.js} +2 -2
  2. package/build/client/assets/{_-DYArYM0Z.js.map → _-Dfo2h4rl.js.map} +1 -1
  3. package/build/client/assets/{_exerciseNumber-BLQUCLPr.js → _exerciseNumber-CfKoF9W0.js} +2 -2
  4. package/build/client/assets/{_exerciseNumber-BLQUCLPr.js.map → _exerciseNumber-CfKoF9W0.js.map} +1 -1
  5. package/build/client/assets/{_exerciseNumber_._stepNumber-Ct5BCuA1.js → _exerciseNumber_._stepNumber-DpAxO0AM.js} +2 -2
  6. package/build/client/assets/{_exerciseNumber_._stepNumber-Ct5BCuA1.js.map → _exerciseNumber_._stepNumber-DpAxO0AM.js.map} +1 -1
  7. package/build/client/assets/{_exerciseNumber_.finished-C9TSc48F.js → _exerciseNumber_.finished-czQBjiVF.js} +2 -2
  8. package/build/client/assets/{_exerciseNumber_.finished-C9TSc48F.js.map → _exerciseNumber_.finished-czQBjiVF.js.map} +1 -1
  9. package/build/client/assets/{_layout-DLIzcS5v.js → _layout-BUs3av-e.js} +2 -2
  10. package/build/client/assets/{_layout-DLIzcS5v.js.map → _layout-BUs3av-e.js.map} +1 -1
  11. package/build/client/assets/{_layout-CZ3fjUvs.js → _layout-BrGbNrqb.js} +2 -2
  12. package/build/client/assets/{_layout-CZ3fjUvs.js.map → _layout-BrGbNrqb.js.map} +1 -1
  13. package/build/client/assets/{_layout-DhP5RhPk.js → _layout-DBCEqk3b.js} +2 -2
  14. package/build/client/assets/{_layout-DhP5RhPk.js.map → _layout-DBCEqk3b.js.map} +1 -1
  15. package/build/client/assets/_layout-IOROGN78.js +6 -0
  16. package/build/client/assets/_layout-IOROGN78.js.map +1 -0
  17. package/build/client/assets/{account-LnI_Eq0t.js → account-CQNVYlpT.js} +2 -2
  18. package/build/client/assets/{account-LnI_Eq0t.js.map → account-CQNVYlpT.js.map} +1 -1
  19. package/build/client/assets/{button-BA3iiLRs.js → button-DcWUKEqR.js} +2 -2
  20. package/build/client/assets/{button-BA3iiLRs.js.map → button-DcWUKEqR.js.map} +1 -1
  21. package/build/client/assets/{client-hints-DLYDs4RF.js → client-hints-DWL_Mq1C.js} +2 -2
  22. package/build/client/assets/{client-hints-DLYDs4RF.js.map → client-hints-DWL_Mq1C.js.map} +1 -1
  23. package/build/client/assets/{components-wgHiPsTg.js → components-C17zb3Us.js} +2 -2
  24. package/build/client/assets/{components-wgHiPsTg.js.map → components-C17zb3Us.js.map} +1 -1
  25. package/build/client/assets/{diff-4FQLirNf.js → diff-CCCucBoq.js} +2 -2
  26. package/build/client/assets/{diff-4FQLirNf.js.map → diff-CCCucBoq.js.map} +1 -1
  27. package/build/client/assets/diff-DBQZWFaQ.js +2 -0
  28. package/build/client/assets/{diff-CPrD1rHd.js.map → diff-DBQZWFaQ.js.map} +1 -1
  29. package/build/client/assets/{discord-BgaWmFRC.js → discord-CBGQw7I4.js} +2 -2
  30. package/build/client/assets/{discord-BgaWmFRC.js.map → discord-CBGQw7I4.js.map} +1 -1
  31. package/build/client/assets/discord-CULpXzAC.js +2 -0
  32. package/build/client/assets/discord-CULpXzAC.js.map +1 -0
  33. package/build/client/assets/{entry.client-Cs8lBz8l.js → entry.client-C1yl0iQe.js} +2 -2
  34. package/build/client/assets/{entry.client-Cs8lBz8l.js.map → entry.client-C1yl0iQe.js.map} +1 -1
  35. package/build/client/assets/{epic-video-CfelX9-n.js → epic-video-DGVKtAan.js} +2 -2
  36. package/build/client/assets/{epic-video-CfelX9-n.js.map → epic-video-DGVKtAan.js.map} +1 -1
  37. package/build/client/assets/{error-boundary-BVTbN8PZ.js → error-boundary-yAXgvsPR.js} +2 -2
  38. package/build/client/assets/{error-boundary-BVTbN8PZ.js.map → error-boundary-yAXgvsPR.js.map} +1 -1
  39. package/build/client/assets/{finished-C0mN8TiU.js → finished-DQ70NSmN.js} +2 -2
  40. package/build/client/assets/{finished-C0mN8TiU.js.map → finished-DQ70NSmN.js.map} +1 -1
  41. package/build/client/assets/{index-Czg1ruVn.js → index-1cKOJFpX.js} +2 -2
  42. package/build/client/assets/{index-Czg1ruVn.js.map → index-1cKOJFpX.js.map} +1 -1
  43. package/build/client/assets/{index-DjzedX4O.js → index-B9w5akmN.js} +2 -2
  44. package/build/client/assets/{index-DjzedX4O.js.map → index-B9w5akmN.js.map} +1 -1
  45. package/build/client/assets/{index-C6ToujzV.js → index-DC4pM5aW.js} +2 -2
  46. package/build/client/assets/{index-C6ToujzV.js.map → index-DC4pM5aW.js.map} +1 -1
  47. package/build/client/assets/{index-yEAxvbDV.js → index-Dc-1lfub.js} +2 -2
  48. package/build/client/assets/{index-yEAxvbDV.js.map → index-Dc-1lfub.js.map} +1 -1
  49. package/build/client/assets/{index-D6ukHE4T.js → index-Dx5GmdYq.js} +2 -2
  50. package/build/client/assets/{index-D6ukHE4T.js.map → index-Dx5GmdYq.js.map} +1 -1
  51. package/build/client/assets/{index-De7yI02n.js → index-yQg0GLtS.js} +2 -2
  52. package/build/client/assets/{index-De7yI02n.js.map → index-yQg0GLtS.js.map} +1 -1
  53. package/build/client/assets/{loading-B0uKxERz.js → loading-C4Cc1EBG.js} +2 -2
  54. package/build/client/assets/{loading-B0uKxERz.js.map → loading-C4Cc1EBG.js.map} +1 -1
  55. package/build/client/assets/{login-SJlLMYmL.js → login-Bimq6Ilz.js} +2 -2
  56. package/build/client/assets/{login-SJlLMYmL.js.map → login-Bimq6Ilz.js.map} +1 -1
  57. package/build/client/assets/manifest-8371b608.js +1 -0
  58. package/build/client/assets/{mdx-CQW0I4So.js → mdx-Cb7iYGhg.js} +2 -2
  59. package/build/client/assets/{mdx-CQW0I4So.js.map → mdx-Cb7iYGhg.js.map} +1 -1
  60. package/build/client/assets/{misc-S5ZD98sI.js → misc-Bt-_bj1O.js} +2 -2
  61. package/build/client/assets/{misc-S5ZD98sI.js.map → misc-Bt-_bj1O.js.map} +1 -1
  62. package/build/client/assets/{nav-chevrons-DaXg0NPS.js → nav-chevrons-DIhkJv4W.js} +2 -2
  63. package/build/client/assets/{nav-chevrons-DaXg0NPS.js.map → nav-chevrons-DIhkJv4W.js.map} +1 -1
  64. package/build/client/assets/{onboarding-BXGyEPXy.js → onboarding-CU7IWhDE.js} +2 -2
  65. package/build/client/assets/{onboarding-BXGyEPXy.js.map → onboarding-CU7IWhDE.js.map} +1 -1
  66. package/build/client/assets/{presence-CW1_eiIo.js → presence-DgSzsRAv.js} +2 -2
  67. package/build/client/assets/{presence-CW1_eiIo.js.map → presence-DgSzsRAv.js.map} +1 -1
  68. package/build/client/assets/{progress-BwanvUpB.js → progress-C1WSMZl4.js} +2 -2
  69. package/build/client/assets/{progress-BwanvUpB.js.map → progress-C1WSMZl4.js.map} +1 -1
  70. package/build/client/assets/{progress-bar-wMXWRGq0.js → progress-bar-DMef_aq8.js} +2 -2
  71. package/build/client/assets/{progress-bar-wMXWRGq0.js.map → progress-bar-DMef_aq8.js.map} +1 -1
  72. package/build/client/assets/{request-info-DHtGM4FI.js → request-info-DU15ezmn.js} +2 -2
  73. package/build/client/assets/{request-info-DHtGM4FI.js.map → request-info-DU15ezmn.js.map} +1 -1
  74. package/build/client/assets/{root-BUqeXmeK.js → root-CX2PgcP9.js} +3 -3
  75. package/build/client/assets/root-CX2PgcP9.js.map +1 -0
  76. package/build/client/assets/{support-DilzTPHE.js → support-D6UIcaNu.js} +2 -2
  77. package/build/client/assets/{support-DilzTPHE.js.map → support-D6UIcaNu.js.map} +1 -1
  78. package/build/client/assets/{tooltip-BtzSIxlB.js → tooltip-Cqh5cQvd.js} +2 -2
  79. package/build/client/assets/{tooltip-BtzSIxlB.js.map → tooltip-Cqh5cQvd.js.map} +1 -1
  80. package/build/client/assets/{use-event-source-ySol3hbz.js → use-event-source-A_0lEOPX.js} +2 -2
  81. package/build/client/assets/{use-event-source-ySol3hbz.js.map → use-event-source-A_0lEOPX.js.map} +1 -1
  82. package/build/client/assets/use-hydrated-Citou692.js +2 -0
  83. package/build/client/assets/use-hydrated-Citou692.js.map +1 -0
  84. package/build/client/assets/{user-CdUDQ7a8.js → user-MNzkRgJ3.js} +2 -2
  85. package/build/client/assets/{user-CdUDQ7a8.js.map → user-MNzkRgJ3.js.map} +1 -1
  86. package/build/server/index.js +30 -19
  87. package/build/server/index.js.map +1 -1
  88. package/package.json +3 -3
  89. package/build/client/assets/_layout-B789acDk.js +0 -6
  90. package/build/client/assets/_layout-B789acDk.js.map +0 -1
  91. package/build/client/assets/diff-CPrD1rHd.js +0 -2
  92. package/build/client/assets/discord-Dk1wbXOn.js +0 -2
  93. package/build/client/assets/discord-Dk1wbXOn.js.map +0 -1
  94. package/build/client/assets/manifest-73106676.js +0 -1
  95. package/build/client/assets/root-BUqeXmeK.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{j as e}from"./index-Czg1ruVn.js";import{I as t}from"./misc-S5ZD98sI.js";import{L as o}from"./components-wgHiPsTg.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-DaXg0NPS.js.map
1
+ import{j as e}from"./index-1cKOJFpX.js";import{I as t}from"./misc-Bt-_bj1O.js";import{L as o}from"./components-C17zb3Us.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-DIhkJv4W.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nav-chevrons-DaXg0NPS.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-DIhkJv4W.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-Czg1ruVn.js";import{B as o}from"./button-BA3iiLRs.js";import{E as r,D as s}from"./epic-video-CfelX9-n.js";import{u as i,F as l}from"./components-wgHiPsTg.js";import"./clsx-B-dksMZM.js";import"./index-yEAxvbDV.js";import"./request-info-DHtGM4FI.js";import"./misc-S5ZD98sI.js";import"./tooltip-BtzSIxlB.js";import"./client-hints-DLYDs4RF.js";import"./loading-B0uKxERz.js";import"./user-CdUDQ7a8.js";const w={getSitemapEntries:()=>null};function v(){const t=i();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:t.videoInfos,children:e.jsx(s,{url:t.tourUrl})})})]}),e.jsx(l,{method:"post",className:"pb-4",children:e.jsx(o,{name:"intent",value:"complete",varient:"primary",children:"I've watched it. Let's go!"})})]})}export{v as default,w as handle};
2
- //# sourceMappingURL=onboarding-BXGyEPXy.js.map
1
+ import{j as e}from"./index-1cKOJFpX.js";import{B as o}from"./button-DcWUKEqR.js";import{E as r,D as s}from"./epic-video-DGVKtAan.js";import{u as i,F as l}from"./components-C17zb3Us.js";import"./clsx-B-dksMZM.js";import"./index-Dc-1lfub.js";import"./request-info-DU15ezmn.js";import"./misc-Bt-_bj1O.js";import"./tooltip-Cqh5cQvd.js";import"./client-hints-DWL_Mq1C.js";import"./loading-C4Cc1EBG.js";import"./user-MNzkRgJ3.js";const w={getSitemapEntries:()=>null};function v(){const t=i();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:t.videoInfos,children:e.jsx(s,{url:t.tourUrl})})})]}),e.jsx(l,{method:"post",className:"pb-4",children:e.jsx(o,{name:"intent",value:"complete",varient:"primary",children:"I've watched it. Let's go!"})})]})}export{v as default,w as handle};
2
+ //# sourceMappingURL=onboarding-CU7IWhDE.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"onboarding-BXGyEPXy.js","sources":["../../../app/routes/onboarding.tsx"],"sourcesContent":["import { invariantResponse } from '@epic-web/invariant'\nimport { updateOnboardingData } 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\tdefer,\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 tourUrl =\n\t\t'https://www.epicweb.dev/tips/get-started-with-the-epic-workshop-app'\n\tconst videoInfos = getEpicVideoInfos([tourUrl], { request, timings })\n\treturn defer(\n\t\t{ tourUrl, 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 intent = data.get('intent')\n\tinvariantResponse(intent === 'complete', 'Invalid intent')\n\tawait updateOnboardingData({ finishedTourVideo: true })\n\tthrow redirect('/account')\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.tourUrl} />\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","tourUrl","Form","method","Button","name","value","varient"],"mappings":"waAmBO,MAAMA,EAAoB,CAChCC,kBAAmBA,IAAM,IAC1B,EA6BA,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,QAAS,EACvC,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-CU7IWhDE.js","sources":["../../../app/routes/onboarding.tsx"],"sourcesContent":["import { invariantResponse } from '@epic-web/invariant'\nimport { updateOnboardingData } 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\tdefer,\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 tourUrl =\n\t\t'https://www.epicweb.dev/tips/get-started-with-the-epic-workshop-app'\n\tconst videoInfos = getEpicVideoInfos([tourUrl], { request, timings })\n\treturn defer(\n\t\t{ tourUrl, 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 intent = data.get('intent')\n\tinvariantResponse(intent === 'complete', 'Invalid intent')\n\tawait updateOnboardingData({ finishedTourVideo: true })\n\tthrow redirect('/account')\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.tourUrl} />\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","tourUrl","Form","method","Button","name","value","varient"],"mappings":"waAmBO,MAAMA,EAAoB,CAChCC,kBAAmBA,IAAM,IAC1B,EA6BA,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,QAAS,EACvC,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 ie=Object.defineProperty;var ce=(t,n,e)=>n in t?ie(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e;var d=(t,n,e)=>ce(t,typeof n!="symbol"?n+"":n,e);import{k as et,r as E,j as ae,b as ue}from"./index-Czg1ruVn.js";import{z as p,u as le}from"./request-info-DHtGM4FI.js";import{d as K}from"./components-wgHiPsTg.js";const at="epic-web-presence",he=`https://epic-web-presence.kentcdodds.partykit.dev/parties/main/${at}`,X=p.object({id:p.string(),avatarUrl:p.string().nullable().optional(),name:p.string().nullable().optional(),location:p.object({workshopTitle:p.string().nullable().optional(),origin:p.string().nullable().optional(),exercise:p.object({type:p.union([p.literal("problem"),p.literal("solution")]).nullable().optional(),exerciseNumber:p.number().nullable().optional(),stepNumber:p.number().nullable().optional()}).nullable().optional()}).nullable().optional()}),fe=p.object({type:p.literal("remove-user"),payload:p.object({id:p.string()})}).or(p.object({type:p.literal("add-user"),payload:X})).or(p.object({type:p.literal("presence"),payload:p.object({users:p.array(X)})}));p.object({users:p.array(X)});var B={},y={},w={};Object.defineProperty(w,"__esModule",{value:!0});w.output=w.exists=w.hash=w.bytes=w.bool=w.number=w.isBytes=void 0;function F(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}w.number=F;function ut(t){if(typeof t!="boolean")throw new Error(`boolean expected, not ${t}`)}w.bool=ut;function lt(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}w.isBytes=lt;function z(t,...n){if(!lt(t))throw new Error("Uint8Array expected");if(n.length>0&&!n.includes(t.length))throw new Error(`Uint8Array expected of length ${n}, not of length=${t.length}`)}w.bytes=z;function ht(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");F(t.outputLen),F(t.blockLen)}w.hash=ht;function ft(t,n=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(n&&t.finished)throw new Error("Hash#digest() has already been called")}w.exists=ft;function dt(t,n){z(t);const e=n.outputLen;if(t.length<e)throw new Error(`digestInto() expects output buffer of length at least ${e}`)}w.output=dt;const de={number:F,bool:ut,bytes:z,hash:ht,exists:ft,output:dt};w.default=de;var u={};Object.defineProperty(u,"__esModule",{value:!0});u.add5L=u.add5H=u.add4H=u.add4L=u.add3H=u.add3L=u.add=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=u.split=u.fromBig=void 0;const D=BigInt(2**32-1),Q=BigInt(32);function J(t,n=!1){return n?{h:Number(t&D),l:Number(t>>Q&D)}:{h:Number(t>>Q&D)|0,l:Number(t&D)|0}}u.fromBig=J;function pt(t,n=!1){let e=new Uint32Array(t.length),s=new Uint32Array(t.length);for(let r=0;r<t.length;r++){const{h:i,l:c}=J(t[r],n);[e[r],s[r]]=[i,c]}return[e,s]}u.split=pt;const yt=(t,n)=>BigInt(t>>>0)<<Q|BigInt(n>>>0);u.toBig=yt;const _t=(t,n,e)=>t>>>e;u.shrSH=_t;const gt=(t,n,e)=>t<<32-e|n>>>e;u.shrSL=gt;const mt=(t,n,e)=>t>>>e|n<<32-e;u.rotrSH=mt;const bt=(t,n,e)=>t<<32-e|n>>>e;u.rotrSL=bt;const wt=(t,n,e)=>t<<64-e|n>>>e-32;u.rotrBH=wt;const Lt=(t,n,e)=>t>>>e-32|n<<64-e;u.rotrBL=Lt;const kt=(t,n)=>n;u.rotr32H=kt;const vt=(t,n)=>t;u.rotr32L=vt;const Et=(t,n,e)=>t<<e|n>>>32-e;u.rotlSH=Et;const St=(t,n,e)=>n<<e|t>>>32-e;u.rotlSL=St;const xt=(t,n,e)=>n<<e-32|t>>>64-e;u.rotlBH=xt;const Tt=(t,n,e)=>t<<e-32|n>>>64-e;u.rotlBL=Tt;function Ot(t,n,e,s){const r=(n>>>0)+(s>>>0);return{h:t+e+(r/2**32|0)|0,l:r|0}}u.add=Ot;const Ct=(t,n,e)=>(t>>>0)+(n>>>0)+(e>>>0);u.add3L=Ct;const Bt=(t,n,e,s)=>n+e+s+(t/2**32|0)|0;u.add3H=Bt;const It=(t,n,e,s)=>(t>>>0)+(n>>>0)+(e>>>0)+(s>>>0);u.add4L=It;const Ut=(t,n,e,s,r)=>n+e+s+r+(t/2**32|0)|0;u.add4H=Ut;const Pt=(t,n,e,s,r)=>(t>>>0)+(n>>>0)+(e>>>0)+(s>>>0)+(r>>>0);u.add5L=Pt;const Nt=(t,n,e,s,r,i)=>n+e+s+r+i+(t/2**32|0)|0;u.add5H=Nt;const pe={fromBig:J,split:pt,toBig:yt,shrSH:_t,shrSL:gt,rotrSH:mt,rotrSL:bt,rotrBH:wt,rotrBL:Lt,rotr32H:kt,rotr32L:vt,rotlSH:Et,rotlSL:St,rotlBH:xt,rotlBL:Tt,add:Ot,add3L:Ct,add3H:Bt,add4L:It,add4H:Ut,add5H:Nt,add5L:Pt};u.default=pe;var Ht={},q={};Object.defineProperty(q,"__esModule",{value:!0});q.crypto=void 0;q.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;(function(t){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.byteSwap32=t.byteSwapIfBE=t.byteSwap=t.isLE=t.rotl=t.rotr=t.createView=t.u32=t.u8=t.isBytes=void 0;const n=q,e=w;function s(o){return o instanceof Uint8Array||o!=null&&typeof o=="object"&&o.constructor.name==="Uint8Array"}t.isBytes=s;const r=o=>new Uint8Array(o.buffer,o.byteOffset,o.byteLength);t.u8=r;const i=o=>new Uint32Array(o.buffer,o.byteOffset,Math.floor(o.byteLength/4));t.u32=i;const c=o=>new DataView(o.buffer,o.byteOffset,o.byteLength);t.createView=c;const a=(o,f)=>o<<32-f|o>>>f;t.rotr=a;const h=(o,f)=>o<<f|o>>>32-f>>>0;t.rotl=h,t.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;const l=o=>o<<24&4278190080|o<<8&16711680|o>>>8&65280|o>>>24&255;t.byteSwap=l,t.byteSwapIfBE=t.isLE?o=>o:o=>(0,t.byteSwap)(o);function L(o){for(let f=0;f<o.length;f++)o[f]=(0,t.byteSwap)(o[f])}t.byteSwap32=L;const b=Array.from({length:256},(o,f)=>f.toString(16).padStart(2,"0"));function S(o){(0,e.bytes)(o);let f="";for(let m=0;m<o.length;m++)f+=b[o[m]];return f}t.bytesToHex=S;const _={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function x(o){if(o>=_._0&&o<=_._9)return o-_._0;if(o>=_._A&&o<=_._F)return o-(_._A-10);if(o>=_._a&&o<=_._f)return o-(_._a-10)}function W(o){if(typeof o!="string")throw new Error("hex string expected, got "+typeof o);const f=o.length,m=f/2;if(f%2)throw new Error("padded hex string expected, got unpadded hex of length "+f);const g=new Uint8Array(m);for(let k=0,v=0;k<m;k++,v+=2){const Z=x(o.charCodeAt(v)),tt=x(o.charCodeAt(v+1));if(Z===void 0||tt===void 0){const oe=o[v]+o[v+1];throw new Error('hex string expected, got non-hex character "'+oe+'" at index '+v)}g[k]=Z*16+tt}return g}t.hexToBytes=W;const O=async()=>{};t.nextTick=O;async function C(o,f,m){let g=Date.now();for(let k=0;k<o;k++){m(k);const v=Date.now()-g;v>=0&&v<f||(await(0,t.nextTick)(),g+=v)}}t.asyncLoop=C;function Y(o){if(typeof o!="string")throw new Error(`utf8ToBytes expected string, got ${typeof o}`);return new Uint8Array(new TextEncoder().encode(o))}t.utf8ToBytes=Y;function j(o){return typeof o=="string"&&(o=Y(o)),(0,e.bytes)(o),o}t.toBytes=j;function Jt(...o){let f=0;for(let g=0;g<o.length;g++){const k=o[g];(0,e.bytes)(k),f+=k.length}const m=new Uint8Array(f);for(let g=0,k=0;g<o.length;g++){const v=o[g];m.set(v,k),k+=v.length}return m}t.concatBytes=Jt;class Yt{clone(){return this._cloneInto()}}t.Hash=Yt;const Zt={}.toString;function te(o,f){if(f!==void 0&&Zt.call(f)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(o,f)}t.checkOpts=te;function ee(o){const f=g=>o().update(j(g)).digest(),m=o();return f.outputLen=m.outputLen,f.blockLen=m.blockLen,f.create=()=>o(),f}t.wrapConstructor=ee;function ne(o){const f=(g,k)=>o(k).update(j(g)).digest(),m=o({});return f.outputLen=m.outputLen,f.blockLen=m.blockLen,f.create=g=>o(g),f}t.wrapConstructorWithOpts=ne;function se(o){const f=(g,k)=>o(k).update(j(g)).digest(),m=o({});return f.outputLen=m.outputLen,f.blockLen=m.blockLen,f.create=g=>o(g),f}t.wrapXOFConstructorWithOpts=se;function re(o=32){if(n.crypto&&typeof n.crypto.getRandomValues=="function")return n.crypto.getRandomValues(new Uint8Array(o));throw new Error("crypto.getRandomValues must be defined")}t.randomBytes=re})(Ht);Object.defineProperty(y,"__esModule",{value:!0});y.shake256=y.shake128=y.keccak_512=y.keccak_384=y.keccak_256=y.keccak_224=y.sha3_512=y.sha3_384=y.sha3_256=y.sha3_224=y.Keccak=y.keccakP=void 0;const N=w,R=u,T=Ht,At=[],Rt=[],Mt=[],ye=BigInt(0),H=BigInt(1),_e=BigInt(2),ge=BigInt(7),me=BigInt(256),be=BigInt(113);for(let t=0,n=H,e=1,s=0;t<24;t++){[e,s]=[s,(2*e+3*s)%5],At.push(2*(5*s+e)),Rt.push((t+1)*(t+2)/2%64);let r=ye;for(let i=0;i<7;i++)n=(n<<H^(n>>ge)*be)%me,n&_e&&(r^=H<<(H<<BigInt(i))-H);Mt.push(r)}const[we,Le]=(0,R.split)(Mt,!0),nt=(t,n,e)=>e>32?(0,R.rotlBH)(t,n,e):(0,R.rotlSH)(t,n,e),st=(t,n,e)=>e>32?(0,R.rotlBL)(t,n,e):(0,R.rotlSL)(t,n,e);function Wt(t,n=24){const e=new Uint32Array(10);for(let s=24-n;s<24;s++){for(let c=0;c<10;c++)e[c]=t[c]^t[c+10]^t[c+20]^t[c+30]^t[c+40];for(let c=0;c<10;c+=2){const a=(c+8)%10,h=(c+2)%10,l=e[h],L=e[h+1],b=nt(l,L,1)^e[a],S=st(l,L,1)^e[a+1];for(let _=0;_<50;_+=10)t[c+_]^=b,t[c+_+1]^=S}let r=t[2],i=t[3];for(let c=0;c<24;c++){const a=Rt[c],h=nt(r,i,a),l=st(r,i,a),L=At[c];r=t[L],i=t[L+1],t[L]=h,t[L+1]=l}for(let c=0;c<50;c+=10){for(let a=0;a<10;a++)e[a]=t[c+a];for(let a=0;a<10;a++)t[c+a]^=~e[(a+2)%10]&e[(a+4)%10]}t[0]^=we[s],t[1]^=Le[s]}e.fill(0)}y.keccakP=Wt;class M extends T.Hash{constructor(n,e,s,r=!1,i=24){if(super(),this.blockLen=n,this.suffix=e,this.outputLen=s,this.enableXOF=r,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,N.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,T.u32)(this.state)}keccak(){T.isLE||(0,T.byteSwap32)(this.state32),Wt(this.state32,this.rounds),T.isLE||(0,T.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(n){(0,N.exists)(this);const{blockLen:e,state:s}=this;n=(0,T.toBytes)(n);const r=n.length;for(let i=0;i<r;){const c=Math.min(e-this.pos,r-i);for(let a=0;a<c;a++)s[this.pos++]^=n[i++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:n,suffix:e,pos:s,blockLen:r}=this;n[s]^=e,e&128&&s===r-1&&this.keccak(),n[r-1]^=128,this.keccak()}writeInto(n){(0,N.exists)(this,!1),(0,N.bytes)(n),this.finish();const e=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(e.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,N.number)(n),this.xofInto(new Uint8Array(n))}digestInto(n){if((0,N.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:e,suffix:s,outputLen:r,rounds:i,enableXOF:c}=this;return n||(n=new M(e,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}}y.Keccak=M;const I=(t,n,e)=>(0,T.wrapConstructor)(()=>new M(n,t,e));y.sha3_224=I(6,144,224/8);y.sha3_256=I(6,136,256/8);y.sha3_384=I(6,104,384/8);y.sha3_512=I(6,72,512/8);y.keccak_224=I(1,144,224/8);y.keccak_256=I(1,136,256/8);y.keccak_384=I(1,104,384/8);y.keccak_512=I(1,72,512/8);const jt=(t,n,e)=>(0,T.wrapXOFConstructorWithOpts)((s={})=>new M(n,t,s.dkLen===void 0?e:s.dkLen,!0));y.shake128=jt(31,168,128/8);y.shake256=jt(31,136,256/8);const{sha3_512:ke}=y,Dt=24,A=32,V=(t=4,n=Math.random)=>{let e="";for(;e.length<t;)e=e+Math.floor(n()*36).toString(36);return e};function $t(t){let n=8n,e=0n;for(const s of t.values()){const r=BigInt(s);e=(e<<n)+r}return e}const Ft=(t="")=>$t(ke(t)).toString(36).slice(1),rt=Array.from({length:26},(t,n)=>String.fromCharCode(n+97)),ve=t=>rt[Math.floor(t()*rt.length)],qt=({globalObj:t=typeof et<"u"?et:typeof window<"u"?window:{},random:n=Math.random}={})=>{const e=Object.keys(t).toString(),s=e.length?e+V(A,n):V(A,n);return Ft(s).substring(0,A)},Gt=t=>()=>t++,Ee=476782367,Xt=({random:t=Math.random,counter:n=Gt(Math.floor(t()*Ee)),length:e=Dt,fingerprint:s=qt({random:t})}={})=>function(){const i=ve(t),c=Date.now().toString(36),a=n().toString(36),h=V(e,t),l=`${c+h+a+s}`;return`${i+Ft(l).substring(1,e)}`},Se=Xt(),xe=(t,{minLength:n=2,maxLength:e=A}={})=>{const s=t.length,r=/^[0-9a-z]+$/;try{if(typeof t=="string"&&s>=n&&s<=e&&r.test(t))return!0}finally{}return!1};B.getConstants=()=>({defaultLength:Dt,bigLength:A});B.init=Xt;B.createId=Se;B.bufToBigInt=$t;B.createCounter=Gt;B.createFingerprint=qt;B.isCuid=xe;const{createId:Te,init:ze,getConstants:Je,isCuid:Ye}=B;var Oe=Te;(!globalThis.EventTarget||!globalThis.Event)&&console.error(`
1
+ var ie=Object.defineProperty;var ce=(t,n,e)=>n in t?ie(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e;var d=(t,n,e)=>ce(t,typeof n!="symbol"?n+"":n,e);import{n as et,r as E,j as ae,b as ue}from"./index-1cKOJFpX.js";import{z as p,u as le}from"./request-info-DU15ezmn.js";import{d as K}from"./components-C17zb3Us.js";const at="epic-web-presence",he=`https://epic-web-presence.kentcdodds.partykit.dev/parties/main/${at}`,X=p.object({id:p.string(),avatarUrl:p.string().nullable().optional(),name:p.string().nullable().optional(),location:p.object({workshopTitle:p.string().nullable().optional(),origin:p.string().nullable().optional(),exercise:p.object({type:p.union([p.literal("problem"),p.literal("solution")]).nullable().optional(),exerciseNumber:p.number().nullable().optional(),stepNumber:p.number().nullable().optional()}).nullable().optional()}).nullable().optional()}),fe=p.object({type:p.literal("remove-user"),payload:p.object({id:p.string()})}).or(p.object({type:p.literal("add-user"),payload:X})).or(p.object({type:p.literal("presence"),payload:p.object({users:p.array(X)})}));p.object({users:p.array(X)});var B={},y={},w={};Object.defineProperty(w,"__esModule",{value:!0});w.output=w.exists=w.hash=w.bytes=w.bool=w.number=w.isBytes=void 0;function F(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}w.number=F;function ut(t){if(typeof t!="boolean")throw new Error(`boolean expected, not ${t}`)}w.bool=ut;function lt(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}w.isBytes=lt;function z(t,...n){if(!lt(t))throw new Error("Uint8Array expected");if(n.length>0&&!n.includes(t.length))throw new Error(`Uint8Array expected of length ${n}, not of length=${t.length}`)}w.bytes=z;function ht(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");F(t.outputLen),F(t.blockLen)}w.hash=ht;function ft(t,n=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(n&&t.finished)throw new Error("Hash#digest() has already been called")}w.exists=ft;function dt(t,n){z(t);const e=n.outputLen;if(t.length<e)throw new Error(`digestInto() expects output buffer of length at least ${e}`)}w.output=dt;const de={number:F,bool:ut,bytes:z,hash:ht,exists:ft,output:dt};w.default=de;var u={};Object.defineProperty(u,"__esModule",{value:!0});u.add5L=u.add5H=u.add4H=u.add4L=u.add3H=u.add3L=u.add=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=u.split=u.fromBig=void 0;const D=BigInt(2**32-1),Q=BigInt(32);function J(t,n=!1){return n?{h:Number(t&D),l:Number(t>>Q&D)}:{h:Number(t>>Q&D)|0,l:Number(t&D)|0}}u.fromBig=J;function pt(t,n=!1){let e=new Uint32Array(t.length),s=new Uint32Array(t.length);for(let r=0;r<t.length;r++){const{h:i,l:c}=J(t[r],n);[e[r],s[r]]=[i,c]}return[e,s]}u.split=pt;const yt=(t,n)=>BigInt(t>>>0)<<Q|BigInt(n>>>0);u.toBig=yt;const _t=(t,n,e)=>t>>>e;u.shrSH=_t;const gt=(t,n,e)=>t<<32-e|n>>>e;u.shrSL=gt;const mt=(t,n,e)=>t>>>e|n<<32-e;u.rotrSH=mt;const bt=(t,n,e)=>t<<32-e|n>>>e;u.rotrSL=bt;const wt=(t,n,e)=>t<<64-e|n>>>e-32;u.rotrBH=wt;const Lt=(t,n,e)=>t>>>e-32|n<<64-e;u.rotrBL=Lt;const kt=(t,n)=>n;u.rotr32H=kt;const vt=(t,n)=>t;u.rotr32L=vt;const Et=(t,n,e)=>t<<e|n>>>32-e;u.rotlSH=Et;const St=(t,n,e)=>n<<e|t>>>32-e;u.rotlSL=St;const xt=(t,n,e)=>n<<e-32|t>>>64-e;u.rotlBH=xt;const Tt=(t,n,e)=>t<<e-32|n>>>64-e;u.rotlBL=Tt;function Ot(t,n,e,s){const r=(n>>>0)+(s>>>0);return{h:t+e+(r/2**32|0)|0,l:r|0}}u.add=Ot;const Ct=(t,n,e)=>(t>>>0)+(n>>>0)+(e>>>0);u.add3L=Ct;const Bt=(t,n,e,s)=>n+e+s+(t/2**32|0)|0;u.add3H=Bt;const It=(t,n,e,s)=>(t>>>0)+(n>>>0)+(e>>>0)+(s>>>0);u.add4L=It;const Ut=(t,n,e,s,r)=>n+e+s+r+(t/2**32|0)|0;u.add4H=Ut;const Pt=(t,n,e,s,r)=>(t>>>0)+(n>>>0)+(e>>>0)+(s>>>0)+(r>>>0);u.add5L=Pt;const Nt=(t,n,e,s,r,i)=>n+e+s+r+i+(t/2**32|0)|0;u.add5H=Nt;const pe={fromBig:J,split:pt,toBig:yt,shrSH:_t,shrSL:gt,rotrSH:mt,rotrSL:bt,rotrBH:wt,rotrBL:Lt,rotr32H:kt,rotr32L:vt,rotlSH:Et,rotlSL:St,rotlBH:xt,rotlBL:Tt,add:Ot,add3L:Ct,add3H:Bt,add4L:It,add4H:Ut,add5H:Nt,add5L:Pt};u.default=pe;var Ht={},q={};Object.defineProperty(q,"__esModule",{value:!0});q.crypto=void 0;q.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;(function(t){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.byteSwap32=t.byteSwapIfBE=t.byteSwap=t.isLE=t.rotl=t.rotr=t.createView=t.u32=t.u8=t.isBytes=void 0;const n=q,e=w;function s(o){return o instanceof Uint8Array||o!=null&&typeof o=="object"&&o.constructor.name==="Uint8Array"}t.isBytes=s;const r=o=>new Uint8Array(o.buffer,o.byteOffset,o.byteLength);t.u8=r;const i=o=>new Uint32Array(o.buffer,o.byteOffset,Math.floor(o.byteLength/4));t.u32=i;const c=o=>new DataView(o.buffer,o.byteOffset,o.byteLength);t.createView=c;const a=(o,f)=>o<<32-f|o>>>f;t.rotr=a;const h=(o,f)=>o<<f|o>>>32-f>>>0;t.rotl=h,t.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;const l=o=>o<<24&4278190080|o<<8&16711680|o>>>8&65280|o>>>24&255;t.byteSwap=l,t.byteSwapIfBE=t.isLE?o=>o:o=>(0,t.byteSwap)(o);function L(o){for(let f=0;f<o.length;f++)o[f]=(0,t.byteSwap)(o[f])}t.byteSwap32=L;const b=Array.from({length:256},(o,f)=>f.toString(16).padStart(2,"0"));function S(o){(0,e.bytes)(o);let f="";for(let m=0;m<o.length;m++)f+=b[o[m]];return f}t.bytesToHex=S;const _={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function x(o){if(o>=_._0&&o<=_._9)return o-_._0;if(o>=_._A&&o<=_._F)return o-(_._A-10);if(o>=_._a&&o<=_._f)return o-(_._a-10)}function W(o){if(typeof o!="string")throw new Error("hex string expected, got "+typeof o);const f=o.length,m=f/2;if(f%2)throw new Error("padded hex string expected, got unpadded hex of length "+f);const g=new Uint8Array(m);for(let k=0,v=0;k<m;k++,v+=2){const Z=x(o.charCodeAt(v)),tt=x(o.charCodeAt(v+1));if(Z===void 0||tt===void 0){const oe=o[v]+o[v+1];throw new Error('hex string expected, got non-hex character "'+oe+'" at index '+v)}g[k]=Z*16+tt}return g}t.hexToBytes=W;const O=async()=>{};t.nextTick=O;async function C(o,f,m){let g=Date.now();for(let k=0;k<o;k++){m(k);const v=Date.now()-g;v>=0&&v<f||(await(0,t.nextTick)(),g+=v)}}t.asyncLoop=C;function Y(o){if(typeof o!="string")throw new Error(`utf8ToBytes expected string, got ${typeof o}`);return new Uint8Array(new TextEncoder().encode(o))}t.utf8ToBytes=Y;function j(o){return typeof o=="string"&&(o=Y(o)),(0,e.bytes)(o),o}t.toBytes=j;function Jt(...o){let f=0;for(let g=0;g<o.length;g++){const k=o[g];(0,e.bytes)(k),f+=k.length}const m=new Uint8Array(f);for(let g=0,k=0;g<o.length;g++){const v=o[g];m.set(v,k),k+=v.length}return m}t.concatBytes=Jt;class Yt{clone(){return this._cloneInto()}}t.Hash=Yt;const Zt={}.toString;function te(o,f){if(f!==void 0&&Zt.call(f)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(o,f)}t.checkOpts=te;function ee(o){const f=g=>o().update(j(g)).digest(),m=o();return f.outputLen=m.outputLen,f.blockLen=m.blockLen,f.create=()=>o(),f}t.wrapConstructor=ee;function ne(o){const f=(g,k)=>o(k).update(j(g)).digest(),m=o({});return f.outputLen=m.outputLen,f.blockLen=m.blockLen,f.create=g=>o(g),f}t.wrapConstructorWithOpts=ne;function se(o){const f=(g,k)=>o(k).update(j(g)).digest(),m=o({});return f.outputLen=m.outputLen,f.blockLen=m.blockLen,f.create=g=>o(g),f}t.wrapXOFConstructorWithOpts=se;function re(o=32){if(n.crypto&&typeof n.crypto.getRandomValues=="function")return n.crypto.getRandomValues(new Uint8Array(o));throw new Error("crypto.getRandomValues must be defined")}t.randomBytes=re})(Ht);Object.defineProperty(y,"__esModule",{value:!0});y.shake256=y.shake128=y.keccak_512=y.keccak_384=y.keccak_256=y.keccak_224=y.sha3_512=y.sha3_384=y.sha3_256=y.sha3_224=y.Keccak=y.keccakP=void 0;const N=w,R=u,T=Ht,At=[],Rt=[],Mt=[],ye=BigInt(0),H=BigInt(1),_e=BigInt(2),ge=BigInt(7),me=BigInt(256),be=BigInt(113);for(let t=0,n=H,e=1,s=0;t<24;t++){[e,s]=[s,(2*e+3*s)%5],At.push(2*(5*s+e)),Rt.push((t+1)*(t+2)/2%64);let r=ye;for(let i=0;i<7;i++)n=(n<<H^(n>>ge)*be)%me,n&_e&&(r^=H<<(H<<BigInt(i))-H);Mt.push(r)}const[we,Le]=(0,R.split)(Mt,!0),nt=(t,n,e)=>e>32?(0,R.rotlBH)(t,n,e):(0,R.rotlSH)(t,n,e),st=(t,n,e)=>e>32?(0,R.rotlBL)(t,n,e):(0,R.rotlSL)(t,n,e);function Wt(t,n=24){const e=new Uint32Array(10);for(let s=24-n;s<24;s++){for(let c=0;c<10;c++)e[c]=t[c]^t[c+10]^t[c+20]^t[c+30]^t[c+40];for(let c=0;c<10;c+=2){const a=(c+8)%10,h=(c+2)%10,l=e[h],L=e[h+1],b=nt(l,L,1)^e[a],S=st(l,L,1)^e[a+1];for(let _=0;_<50;_+=10)t[c+_]^=b,t[c+_+1]^=S}let r=t[2],i=t[3];for(let c=0;c<24;c++){const a=Rt[c],h=nt(r,i,a),l=st(r,i,a),L=At[c];r=t[L],i=t[L+1],t[L]=h,t[L+1]=l}for(let c=0;c<50;c+=10){for(let a=0;a<10;a++)e[a]=t[c+a];for(let a=0;a<10;a++)t[c+a]^=~e[(a+2)%10]&e[(a+4)%10]}t[0]^=we[s],t[1]^=Le[s]}e.fill(0)}y.keccakP=Wt;class M extends T.Hash{constructor(n,e,s,r=!1,i=24){if(super(),this.blockLen=n,this.suffix=e,this.outputLen=s,this.enableXOF=r,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,N.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,T.u32)(this.state)}keccak(){T.isLE||(0,T.byteSwap32)(this.state32),Wt(this.state32,this.rounds),T.isLE||(0,T.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(n){(0,N.exists)(this);const{blockLen:e,state:s}=this;n=(0,T.toBytes)(n);const r=n.length;for(let i=0;i<r;){const c=Math.min(e-this.pos,r-i);for(let a=0;a<c;a++)s[this.pos++]^=n[i++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:n,suffix:e,pos:s,blockLen:r}=this;n[s]^=e,e&128&&s===r-1&&this.keccak(),n[r-1]^=128,this.keccak()}writeInto(n){(0,N.exists)(this,!1),(0,N.bytes)(n),this.finish();const e=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(e.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,N.number)(n),this.xofInto(new Uint8Array(n))}digestInto(n){if((0,N.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:e,suffix:s,outputLen:r,rounds:i,enableXOF:c}=this;return n||(n=new M(e,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}}y.Keccak=M;const I=(t,n,e)=>(0,T.wrapConstructor)(()=>new M(n,t,e));y.sha3_224=I(6,144,224/8);y.sha3_256=I(6,136,256/8);y.sha3_384=I(6,104,384/8);y.sha3_512=I(6,72,512/8);y.keccak_224=I(1,144,224/8);y.keccak_256=I(1,136,256/8);y.keccak_384=I(1,104,384/8);y.keccak_512=I(1,72,512/8);const jt=(t,n,e)=>(0,T.wrapXOFConstructorWithOpts)((s={})=>new M(n,t,s.dkLen===void 0?e:s.dkLen,!0));y.shake128=jt(31,168,128/8);y.shake256=jt(31,136,256/8);const{sha3_512:ke}=y,Dt=24,A=32,V=(t=4,n=Math.random)=>{let e="";for(;e.length<t;)e=e+Math.floor(n()*36).toString(36);return e};function $t(t){let n=8n,e=0n;for(const s of t.values()){const r=BigInt(s);e=(e<<n)+r}return e}const Ft=(t="")=>$t(ke(t)).toString(36).slice(1),rt=Array.from({length:26},(t,n)=>String.fromCharCode(n+97)),ve=t=>rt[Math.floor(t()*rt.length)],qt=({globalObj:t=typeof et<"u"?et:typeof window<"u"?window:{},random:n=Math.random}={})=>{const e=Object.keys(t).toString(),s=e.length?e+V(A,n):V(A,n);return Ft(s).substring(0,A)},Gt=t=>()=>t++,Ee=476782367,Xt=({random:t=Math.random,counter:n=Gt(Math.floor(t()*Ee)),length:e=Dt,fingerprint:s=qt({random:t})}={})=>function(){const i=ve(t),c=Date.now().toString(36),a=n().toString(36),h=V(e,t),l=`${c+h+a+s}`;return`${i+Ft(l).substring(1,e)}`},Se=Xt(),xe=(t,{minLength:n=2,maxLength:e=A}={})=>{const s=t.length,r=/^[0-9a-z]+$/;try{if(typeof t=="string"&&s>=n&&s<=e&&r.test(t))return!0}finally{}return!1};B.getConstants=()=>({defaultLength:Dt,bigLength:A});B.init=Xt;B.createId=Se;B.bufToBigInt=$t;B.createCounter=Gt;B.createFingerprint=qt;B.isCuid=xe;const{createId:Te,init:ze,getConstants:Je,isCuid:Ye}=B;var Oe=Te;(!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 Ne=t=>t[1]!==null&&t[1]!==void 0;function He(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let t=new Date().getTime(),n=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let s=Math.random()*16;return t>0?(s=(t+s)%16|0,t=Math.floor(t/16)):(s=(n+s)%16|0,n=Math.floor(n/16)),(e==="x"?s:s&3|8).toString(16)})}function Kt(t,n,e={}){const{host:s,path:r,protocol:i,room:c,party:a,query:h}=t;let l=s.replace(/^(http|https|ws|wss):\/\//,"");if(l.endsWith("/")&&(l=l.slice(0,-1)),r&&r.startsWith("/"))throw new Error("path must not start with a slash");const L=a??"main",b=r?`/${r}`:"",S=i||(l.startsWith("localhost:")||l.startsWith("127.0.0.1:")||l.startsWith("192.168.")||l.startsWith("10.")||l.startsWith("172.")&&l.split(".")[1]>="16"&&l.split(".")[1]<="31"||l.startsWith("[::ffff:7f00:1]:")?n:n+"s"),_=`${S}://${l}/${a?`parties/${a}`:"party"}/${c}${b}`,x=(O={})=>`${_}?${new URLSearchParams([...Object.entries(e),...Object.entries(O).filter(Ne)])}`,W=typeof h=="function"?async()=>x(await h()):x(h);return{host:l,path:b,room:c,name:L,protocol:S,partyUrl:_,urlProvider:W}}var Ae=class extends Pe{constructor(n){const e=it(n);super(e.urlProvider,e.protocols,e.socketOptions);d(this,"_pk");d(this,"_pkurl");d(this,"name");d(this,"room");d(this,"host");d(this,"path");this.partySocketOptions=n,this.setWSProperties(e)}updateProperties(n){const e=it({...this.partySocketOptions,...n,host:n.host??this.host,room:n.room??this.room,path:n.path??this.path});this._url=e.urlProvider,this._protocols=e.protocols,this._options=e.socketOptions,this.setWSProperties(e)}setWSProperties(n){const{_pk:e,_pkurl:s,name:r,room:i,host:c,path:a}=n;this._pk=e,this._pkurl=s,this.name=r,this.room=i,this.host=c,this.path=a}reconnect(n,e){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,e)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(n,e){const s=Kt(n,"http"),r=typeof s.urlProvider=="string"?s.urlProvider:await s.urlProvider();return(n.fetch??fetch)(r,e)}};function it(t){const{id:n,host:e,path:s,party:r,room:i,protocol:c,query:a,protocols:h,...l}=t,L=n||He(),b=Kt(t,"ws",{_pk:L});return{_pk:L,_pkurl:b.partyUrl,name:b.name,room:b.room,host:b.host,path:b.path,protocols:h,socketOptions:l,urlProvider:b.urlProvider}}var Re=(t,n)=>{const e=E.useRef(n);e.current=n,E.useEffect(()=>{const s=a=>{var h,l;return(l=(h=e.current)==null?void 0:h.onOpen)==null?void 0:l.call(h,a)},r=a=>{var h,l;return(l=(h=e.current)==null?void 0:h.onMessage)==null?void 0:l.call(h,a)},i=a=>{var h,l;return(l=(h=e.current)==null?void 0:h.onClose)==null?void 0:l.call(h,a)},c=a=>{var h,l;return(l=(h=e.current)==null?void 0:h.onError)==null?void 0:l.call(h,a)};return t.addEventListener("open",s),t.addEventListener("close",i),t.addEventListener("error",c),t.addEventListener("message",r),()=>{t.removeEventListener("open",s),t.removeEventListener("close",i),t.removeEventListener("error",c),t.removeEventListener("message",r)}},[t])},Me=t=>[t.startClosed,t.minUptime,t.maxRetries,t.connectionTimeout,t.maxEnqueuedMessages,t.maxReconnectionDelay,t.minReconnectionDelay,t.reconnectionDelayGrowFactor,t.debug];function We({options:t,createSocket:n,createSocketMemoKey:e}){const s=e(t),r=E.useMemo(()=>t,[s]),[i,c]=E.useState(()=>n({...r,startClosed:!0})),a=E.useRef(null),h=E.useRef(n);return h.current=n,E.useEffect(()=>{if(a.current===i){const l=h.current({...r,startClosed:!1});c(l)}else return!a.current&&r.startClosed!==!0&&i.reconnect(),a.current=i,()=>{i.close()}},[i,r]),i}function je(t){const{host:n,...e}=t,s=We({options:{host:n||(typeof window<"u"?window.location.host:"dummy-domain.com"),...e},createSocket:r=>new Ae(r),createSocketMemoKey:r=>JSON.stringify([r.query,r.id,r.host,r.room,r.party,r.path,r.protocol,r.protocols,...Me(r)])});return Re(s,t),s}const zt=E.createContext(null);function De(){var n;const t=K("root");return((n=t==null?void 0:t.preferences)==null?void 0:n.presence)??null}function $e(){const t=K("root");return(t==null?void 0:t.workshopTitle)??null}const Fe=p.object({type:p.union([p.literal("problem"),p.literal("solution")]).optional(),exerciseNumber:p.coerce.number().finite(),stepNumber:p.coerce.number().finite().optional()});function qe(t){const n=$e(),e=le(),s=ue(),r=De(),i=K("root"),[c,a]=E.useState((i==null?void 0:i.presence.users)??[]),[h]=E.useState(()=>{if(typeof document>"u")return null;if(t)return t.id;const O=sessionStorage.getItem("clientId");if(O)return O;const C=Oe();return sessionStorage.setItem("clientId",C),C}),l=je({host:new URL(he).host,room:at,onMessage(O){const C=fe.safeParse(JSON.parse(String(O.data)));C.success&&C.data.type==="presence"&&a(C.data.payload.users)}}),L=Fe.safeParse(s),b=L.success?L.data:null,S={workshopTitle:n,origin:e.origin,...b?{exercise:{type:b.type,exerciseNumber:b.exerciseNumber,stepNumber:b.stepNumber}}:null};let _=null;(!t||r!=null&&r.optOut)&&h?(t&&(_={type:"remove-user",payload:{id:t.id}}),_={type:"add-user",payload:{id:h,location:S}}):t&&(_={type:"add-user",payload:{id:t.id,name:t.name,avatarUrl:t.avatarUrl,location:S}});const x=_?JSON.stringify(_):null;return E.useEffect(()=>{x&&l.send(x)},[x,l]),{users:Ge(S,c)}}function Ge(t,n){return n.map(s=>{var c,a,h,l;let r=0;const i=4;return(t==null?void 0:t.workshopTitle)===((c=s.location)==null?void 0:c.workshopTitle)&&(r+=1,(a=t==null?void 0:t.exercise)!=null&&a.exerciseNumber&&t.exercise.exerciseNumber===((l=(h=s.location)==null?void 0:h.exercise)==null?void 0:l.exerciseNumber)&&(r+=1,t.exercise.stepNumber&&t.exercise.stepNumber===s.location.exercise.stepNumber&&(r+=1,t.exercise.type&&t.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 Ze({user:t,children:n}){return ae.jsx(zt.Provider,{value:qe(t),children:n})}function tn(){const t=E.useContext(zt);if(!t)throw new Error("usePresence must be used within a PresenceProvider");return t}export{Ze as P,tn as a,De as u};
28
- //# sourceMappingURL=presence-CW1_eiIo.js.map
28
+ //# sourceMappingURL=presence-DgSzsRAv.js.map