@epic-web/workshop-app 5.28.0 → 5.29.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 (311) hide show
  1. package/build/client/assets/_-DTLUa7j2.js +2 -0
  2. package/build/client/assets/_-DTLUa7j2.js.map +1 -0
  3. package/build/client/assets/{_basePickBy-lB0X5x6U.js → _basePickBy-Bkju64MX.js} +2 -2
  4. package/build/client/assets/{_basePickBy-lB0X5x6U.js.map → _basePickBy-Bkju64MX.js.map} +1 -1
  5. package/build/client/assets/{_baseUniq-BOjGYEEK.js → _baseUniq-Cp1g4BpN.js} +2 -2
  6. package/build/client/assets/{_baseUniq-BOjGYEEK.js.map → _baseUniq-Cp1g4BpN.js.map} +1 -1
  7. package/build/client/assets/_exerciseNumber-Co7M7Ztw.js +2 -0
  8. package/build/client/assets/_exerciseNumber-Co7M7Ztw.js.map +1 -0
  9. package/build/client/assets/_exerciseNumber_._stepNumber-Don1A9mU.js +2 -0
  10. package/build/client/assets/_exerciseNumber_._stepNumber-Don1A9mU.js.map +1 -0
  11. package/build/client/assets/_exerciseNumber_.finished-BqsavTTe.js +2 -0
  12. package/build/client/assets/_exerciseNumber_.finished-BqsavTTe.js.map +1 -0
  13. package/build/client/assets/_layout-BFto7KzZ.js +2 -0
  14. package/build/client/assets/_layout-BFto7KzZ.js.map +1 -0
  15. package/build/client/assets/_layout-BvOre76Q.js +2 -0
  16. package/build/client/assets/_layout-BvOre76Q.js.map +1 -0
  17. package/build/client/assets/_layout-CSP6lWdg.js +2 -0
  18. package/build/client/assets/_layout-CSP6lWdg.js.map +1 -0
  19. package/build/client/assets/_layout-DDOZBbUH.js +6 -0
  20. package/build/client/assets/_layout-DDOZBbUH.js.map +1 -0
  21. package/build/client/assets/accordion-BNzI0wOK.js +2 -0
  22. package/build/client/assets/{accordion-CpiLc1m2.js.map → accordion-BNzI0wOK.js.map} +1 -1
  23. package/build/client/assets/account-2uOW4wHE.js +2 -0
  24. package/build/client/assets/account-2uOW4wHE.js.map +1 -0
  25. package/build/client/assets/app-DfAmumll.js +2 -0
  26. package/build/client/assets/app-DfAmumll.js.map +1 -0
  27. package/build/client/assets/{arc-DmQZ2TPB.js → arc-BgUWL_JM.js} +2 -2
  28. package/build/client/assets/{arc-DmQZ2TPB.js.map → arc-BgUWL_JM.js.map} +1 -1
  29. package/build/client/assets/architectureDiagram-IEHRJDOE-VEDL5YJR.js +37 -0
  30. package/build/client/assets/{architectureDiagram-IEHRJDOE-BqPvrjLh.js.map → architectureDiagram-IEHRJDOE-VEDL5YJR.js.map} +1 -1
  31. package/build/client/assets/{blockDiagram-JOT3LUYC-D8OFd78i.js → blockDiagram-JOT3LUYC-CJojWhFE.js} +3 -3
  32. package/build/client/assets/{blockDiagram-JOT3LUYC-D8OFd78i.js.map → blockDiagram-JOT3LUYC-CJojWhFE.js.map} +1 -1
  33. package/build/client/assets/button-DRpue1NG.js +2 -0
  34. package/build/client/assets/button-DRpue1NG.js.map +1 -0
  35. package/build/client/assets/{c4Diagram-VJAJSXHY-DjROjsr_.js → c4Diagram-VJAJSXHY-CDiBL4DZ.js} +3 -3
  36. package/build/client/assets/{c4Diagram-VJAJSXHY-DjROjsr_.js.map → c4Diagram-VJAJSXHY-CDiBL4DZ.js.map} +1 -1
  37. package/build/client/assets/channel-CAodiiwJ.js +2 -0
  38. package/build/client/assets/{channel-DnqeaSfB.js.map → channel-CAodiiwJ.js.map} +1 -1
  39. package/build/client/assets/{chunk-4BMEZGHF-CNL-bCj2.js → chunk-4BMEZGHF-Dn8dm6h4.js} +2 -2
  40. package/build/client/assets/{chunk-4BMEZGHF-CNL-bCj2.js.map → chunk-4BMEZGHF-Dn8dm6h4.js.map} +1 -1
  41. package/build/client/assets/{chunk-A2AXSNBT-PeSyIKDm.js → chunk-A2AXSNBT-4MnudWit.js} +2 -2
  42. package/build/client/assets/{chunk-A2AXSNBT-PeSyIKDm.js.map → chunk-A2AXSNBT-4MnudWit.js.map} +1 -1
  43. package/build/client/assets/{chunk-AEK57VVT-B1JqGB_s.js → chunk-AEK57VVT-CqDnkZ4u.js} +2 -2
  44. package/build/client/assets/{chunk-AEK57VVT-B1JqGB_s.js.map → chunk-AEK57VVT-CqDnkZ4u.js.map} +1 -1
  45. package/build/client/assets/{chunk-D6G4REZN-C1e0nCkL.js → chunk-D6G4REZN-Brt3as5d.js} +2 -2
  46. package/build/client/assets/{chunk-D6G4REZN-C1e0nCkL.js.map → chunk-D6G4REZN-Brt3as5d.js.map} +1 -1
  47. package/build/client/assets/chunk-QMGIS6GS-CTjj1G71.js +44 -0
  48. package/build/client/assets/chunk-QMGIS6GS-CTjj1G71.js.map +1 -0
  49. package/build/client/assets/{chunk-RZ5BOZE2-D5pIwNeA.js → chunk-RZ5BOZE2-DRDeFo9p.js} +2 -2
  50. package/build/client/assets/{chunk-RZ5BOZE2-D5pIwNeA.js.map → chunk-RZ5BOZE2-DRDeFo9p.js.map} +1 -1
  51. package/build/client/assets/{chunk-XZIHB7SX-FbrNggxP.js → chunk-XZIHB7SX-jEJwVQJf.js} +2 -2
  52. package/build/client/assets/{chunk-XZIHB7SX-FbrNggxP.js.map → chunk-XZIHB7SX-jEJwVQJf.js.map} +1 -1
  53. package/build/client/assets/classDiagram-GIVACNV2-H_7kh---.js +2 -0
  54. package/build/client/assets/{classDiagram-GIVACNV2-cXWx-aYi.js.map → classDiagram-GIVACNV2-H_7kh---.js.map} +1 -1
  55. package/build/client/assets/classDiagram-v2-COTLJTTW-H_7kh---.js +2 -0
  56. package/build/client/assets/{classDiagram-v2-COTLJTTW-cXWx-aYi.js.map → classDiagram-v2-COTLJTTW-H_7kh---.js.map} +1 -1
  57. package/build/client/assets/clone-DRQ0Dnbp.js +2 -0
  58. package/build/client/assets/{clone-Bj8ANPCv.js.map → clone-DRQ0Dnbp.js.map} +1 -1
  59. package/build/client/assets/dagre-OKDRZEBW-BPnUPPO5.js +5 -0
  60. package/build/client/assets/{dagre-OKDRZEBW-DT9ZQRxf.js.map → dagre-OKDRZEBW-BPnUPPO5.js.map} +1 -1
  61. package/build/client/assets/diagram-SSKATNLV-Bh_ZXdjr.js +44 -0
  62. package/build/client/assets/{diagram-SSKATNLV-CcKCni9R.js.map → diagram-SSKATNLV-Bh_ZXdjr.js.map} +1 -1
  63. package/build/client/assets/diagram-VNBRO52H-D5zqYvJa.js +25 -0
  64. package/build/client/assets/{diagram-VNBRO52H-DWoRAiqO.js.map → diagram-VNBRO52H-D5zqYvJa.js.map} +1 -1
  65. package/build/client/assets/diff-CQ7A0nZj.js +2 -0
  66. package/build/client/assets/diff-CQ7A0nZj.js.map +1 -0
  67. package/build/client/assets/{diff-D5_VwPLF.js → diff-CtGU9cxI.js} +2 -2
  68. package/build/client/assets/diff-CtGU9cxI.js.map +1 -0
  69. package/build/client/assets/discord-91JJKnJ5.js +2 -0
  70. package/build/client/assets/discord-91JJKnJ5.js.map +1 -0
  71. package/build/client/assets/discord-D4appJa-.js +2 -0
  72. package/build/client/assets/discord-D4appJa-.js.map +1 -0
  73. package/build/client/assets/entry.client-uKxtCCau.js +35 -0
  74. package/build/client/assets/entry.client-uKxtCCau.js.map +1 -0
  75. package/build/client/assets/{epic-video-CmlkW6Rw.js → epic-video-D_3otytp.js} +3 -3
  76. package/build/client/assets/{epic-video-CmlkW6Rw.js.map → epic-video-D_3otytp.js.map} +1 -1
  77. package/build/client/assets/{erDiagram-Q7BY3M3F-DXkEmvKk.js → erDiagram-Q7BY3M3F-BxueSNDf.js} +3 -3
  78. package/build/client/assets/{erDiagram-Q7BY3M3F-DXkEmvKk.js.map → erDiagram-Q7BY3M3F-BxueSNDf.js.map} +1 -1
  79. package/build/client/assets/error-boundary-BLyHIxcu.js +2 -0
  80. package/build/client/assets/error-boundary-BLyHIxcu.js.map +1 -0
  81. package/build/client/assets/finished-BiOz59BB.js +2 -0
  82. package/build/client/assets/finished-BiOz59BB.js.map +1 -0
  83. package/build/client/assets/{flowDiagram-4HSFHLVR-DCodZaNW.js → flowDiagram-4HSFHLVR-CfL3E-FD.js} +3 -3
  84. package/build/client/assets/{flowDiagram-4HSFHLVR-DCodZaNW.js.map → flowDiagram-4HSFHLVR-CfL3E-FD.js.map} +1 -1
  85. package/build/client/assets/ganttDiagram-APWFNJXF-DxEqrjXE.js +258 -0
  86. package/build/client/assets/{ganttDiagram-APWFNJXF-TfB6wYvN.js.map → ganttDiagram-APWFNJXF-DxEqrjXE.js.map} +1 -1
  87. package/build/client/assets/gitGraphDiagram-7IBYFJ6S-csni0XOM.js +66 -0
  88. package/build/client/assets/{gitGraphDiagram-7IBYFJ6S-D2NQnQv2.js.map → gitGraphDiagram-7IBYFJ6S-csni0XOM.js.map} +1 -1
  89. package/build/client/assets/{graph-eJUngNSH.js → graph-DiSezMy_.js} +2 -2
  90. package/build/client/assets/{graph-eJUngNSH.js.map → graph-DiSezMy_.js.map} +1 -1
  91. package/build/client/assets/index-AKpqKc27.js +2 -0
  92. package/build/client/assets/index-AKpqKc27.js.map +1 -0
  93. package/build/client/assets/index-BGtlU-cD.js +2 -0
  94. package/build/client/assets/index-BGtlU-cD.js.map +1 -0
  95. package/build/client/assets/index-BP1ceC2h.js +10 -0
  96. package/build/client/assets/index-BP1ceC2h.js.map +1 -0
  97. package/build/client/assets/index-BSJLLJJ3.js +2 -0
  98. package/build/client/assets/index-BSJLLJJ3.js.map +1 -0
  99. package/build/client/assets/index-C0Fh_zu0.js +36 -0
  100. package/build/client/assets/{index-DLC5u33j.js.map → index-C0Fh_zu0.js.map} +1 -1
  101. package/build/client/assets/index-Co8qgD4k.js +2 -0
  102. package/build/client/assets/{index-BmMpCvYx.js.map → index-Co8qgD4k.js.map} +1 -1
  103. package/build/client/assets/index-D0dQzJhy.js +2 -0
  104. package/build/client/assets/index-D0dQzJhy.js.map +1 -0
  105. package/build/client/assets/index-DJsDENYs.js +42 -0
  106. package/build/client/assets/{index-Do-KWT0a.js.map → index-DJsDENYs.js.map} +1 -1
  107. package/build/client/assets/index-DWV7tDz3.js +3 -0
  108. package/build/client/assets/{index-DvQyydjU.js.map → index-DWV7tDz3.js.map} +1 -1
  109. package/build/client/assets/infoDiagram-PH2N3AL5-Dr2v4fFk.js +3 -0
  110. package/build/client/assets/{infoDiagram-PH2N3AL5-D-nEozcT.js.map → infoDiagram-PH2N3AL5-Dr2v4fFk.js.map} +1 -1
  111. package/build/client/assets/{journeyDiagram-U35MCT3I-Dc8g8jIX.js → journeyDiagram-U35MCT3I-iX4x5HVK.js} +3 -3
  112. package/build/client/assets/{journeyDiagram-U35MCT3I-Dc8g8jIX.js.map → journeyDiagram-U35MCT3I-iX4x5HVK.js.map} +1 -1
  113. package/build/client/assets/jsx-runtime-BjG_zV1W.js +10 -0
  114. package/build/client/assets/jsx-runtime-BjG_zV1W.js.map +1 -0
  115. package/build/client/assets/{kanban-definition-NDS4AKOZ-BwwcaZU2.js → kanban-definition-NDS4AKOZ-BwP5uDj3.js} +3 -3
  116. package/build/client/assets/{kanban-definition-NDS4AKOZ-BwwcaZU2.js.map → kanban-definition-NDS4AKOZ-BwP5uDj3.js.map} +1 -1
  117. package/build/client/assets/l-CVlzRdDg.js +2 -0
  118. package/build/client/assets/l-CVlzRdDg.js.map +1 -0
  119. package/build/client/assets/{layout-BAeq0-Is.js → layout-X8Y3Cf_B.js} +2 -2
  120. package/build/client/assets/{layout-BAeq0-Is.js.map → layout-X8Y3Cf_B.js.map} +1 -1
  121. package/build/client/assets/{linear-LWRPSVMz.js → linear-1DrdUlCY.js} +2 -2
  122. package/build/client/assets/{linear-LWRPSVMz.js.map → linear-1DrdUlCY.js.map} +1 -1
  123. package/build/client/assets/loading-CXEQXwx8.js +2 -0
  124. package/build/client/assets/{loading-b1FV2pQh.js.map → loading-CXEQXwx8.js.map} +1 -1
  125. package/build/client/assets/login-CaIyI5Cd.js +2 -0
  126. package/build/client/assets/login-CaIyI5Cd.js.map +1 -0
  127. package/build/client/assets/manifest-953eedfa.js +1 -0
  128. package/build/client/assets/mdx-DD5XL3ew.js +3 -0
  129. package/build/client/assets/mdx-DD5XL3ew.js.map +1 -0
  130. package/build/client/assets/{mermaid.core-q9C-HfFu.js → mermaid.core-D4QVSd3D.js} +5 -5
  131. package/build/client/assets/{mermaid.core-q9C-HfFu.js.map → mermaid.core-D4QVSd3D.js.map} +1 -1
  132. package/build/client/assets/mindmap-definition-ALO5MXBD-tl5KlWaB.js +96 -0
  133. package/build/client/assets/{mindmap-definition-ALO5MXBD-BhzLy0Zl.js.map → mindmap-definition-ALO5MXBD-tl5KlWaB.js.map} +1 -1
  134. package/build/client/assets/misc-yfWFSwMN.js +2 -0
  135. package/build/client/assets/{misc-2sBiisF5.js.map → misc-yfWFSwMN.js.map} +1 -1
  136. package/build/client/assets/nav-chevrons-CokHxUSB.js +2 -0
  137. package/build/client/assets/nav-chevrons-CokHxUSB.js.map +1 -0
  138. package/build/client/assets/onboarding-DyrGJaVn.js +2 -0
  139. package/build/client/assets/onboarding-DyrGJaVn.js.map +1 -0
  140. package/build/client/assets/online-CFV79-RX.js +2 -0
  141. package/build/client/assets/{online-DZKJk3C2.js.map → online-CFV79-RX.js.map} +1 -1
  142. package/build/client/assets/pe-C53l4u-6.js +2 -0
  143. package/build/client/assets/{pe-BShc2dvc.js.map → pe-C53l4u-6.js.map} +1 -1
  144. package/build/client/assets/pieDiagram-IB7DONF6-y5DqPNpS.js +31 -0
  145. package/build/client/assets/{pieDiagram-IB7DONF6-CaTGj8RH.js.map → pieDiagram-IB7DONF6-y5DqPNpS.js.map} +1 -1
  146. package/build/client/assets/preferences-C2zlOkAS.js +2 -0
  147. package/build/client/assets/preferences-C2zlOkAS.js.map +1 -0
  148. package/build/client/assets/{presence-C9bUSihT.js → presence-BoFXYAd7.js} +3 -3
  149. package/build/client/assets/{presence-C9bUSihT.js.map → presence-BoFXYAd7.js.map} +1 -1
  150. package/build/client/assets/preview-CE_VqYU4.js +2 -0
  151. package/build/client/assets/preview-CE_VqYU4.js.map +1 -0
  152. package/build/client/assets/product-TKJyOyif.js +2 -0
  153. package/build/client/assets/{product-DJOWNuL-.js.map → product-TKJyOyif.js.map} +1 -1
  154. package/build/client/assets/progress-CtGAFS2P.js +2 -0
  155. package/build/client/assets/{progress-BJ4ADF-s.js.map → progress-CtGAFS2P.js.map} +1 -1
  156. package/build/client/assets/progress-bar-DTYORRrG.js +2 -0
  157. package/build/client/assets/progress-bar-DTYORRrG.js.map +1 -0
  158. package/build/client/assets/{quadrantDiagram-7GDLP6J5-B4Od6z6p.js → quadrantDiagram-7GDLP6J5-ymq7Ot51.js} +3 -3
  159. package/build/client/assets/{quadrantDiagram-7GDLP6J5-B4Od6z6p.js.map → quadrantDiagram-7GDLP6J5-ymq7Ot51.js.map} +1 -1
  160. package/build/client/assets/{radar-MK3ICKWK-CENXhI0E.js → radar-MK3ICKWK-B8xuvUo7.js} +2 -2
  161. package/build/client/assets/{radar-MK3ICKWK-CENXhI0E.js.map → radar-MK3ICKWK-B8xuvUo7.js.map} +1 -1
  162. package/build/client/assets/{requirementDiagram-KVF5MWMF-_w0WuUxy.js → requirementDiagram-KVF5MWMF-B4D4Pi12.js} +3 -3
  163. package/build/client/assets/{requirementDiagram-KVF5MWMF-_w0WuUxy.js.map → requirementDiagram-KVF5MWMF-B4D4Pi12.js.map} +1 -1
  164. package/build/client/assets/revalidation-ws-89FLt73b.js +2 -0
  165. package/build/client/assets/revalidation-ws-89FLt73b.js.map +1 -0
  166. package/build/client/assets/root-Dd9--OJ3.js +2 -0
  167. package/build/client/assets/root-Dd9--OJ3.js.map +1 -0
  168. package/build/client/assets/sankeyDiagram-QLVOVGJD-BAY-vMZj.js +11 -0
  169. package/build/client/assets/{sankeyDiagram-QLVOVGJD-Bt8556P1.js.map → sankeyDiagram-QLVOVGJD-BAY-vMZj.js.map} +1 -1
  170. package/build/client/assets/{sequenceDiagram-X6HHIX6F-y2-oW3Ob.js → sequenceDiagram-X6HHIX6F-CDjFTgBk.js} +3 -3
  171. package/build/client/assets/{sequenceDiagram-X6HHIX6F-y2-oW3Ob.js.map → sequenceDiagram-X6HHIX6F-CDjFTgBk.js.map} +1 -1
  172. package/build/client/assets/set-playground-DtZ5ki7i.js +2 -0
  173. package/build/client/assets/set-playground-DtZ5ki7i.js.map +1 -0
  174. package/build/client/assets/stateDiagram-DGXRK772-DFekjeUZ.js +2 -0
  175. package/build/client/assets/{stateDiagram-DGXRK772-B3BuD15b.js.map → stateDiagram-DGXRK772-DFekjeUZ.js.map} +1 -1
  176. package/build/client/assets/stateDiagram-v2-YXO3MK2T-CSkUdkOW.js +2 -0
  177. package/build/client/assets/{stateDiagram-v2-YXO3MK2T-BzFxWpqR.js.map → stateDiagram-v2-YXO3MK2T-CSkUdkOW.js.map} +1 -1
  178. package/build/client/assets/support-drzs9wuf.js +2 -0
  179. package/build/client/assets/support-drzs9wuf.js.map +1 -0
  180. package/build/client/assets/test-psaYrMGK.js +2 -0
  181. package/build/client/assets/test-psaYrMGK.js.map +1 -0
  182. package/build/client/assets/{tests-B1ak2CDI.js → tests-7juFXgcY.js} +3 -3
  183. package/build/client/assets/tests-7juFXgcY.js.map +1 -0
  184. package/build/client/assets/{timeline-definition-BDJGKUSR-DUa2yfAV.js → timeline-definition-BDJGKUSR-1WjIsnZH.js} +3 -3
  185. package/build/client/assets/{timeline-definition-BDJGKUSR-DUa2yfAV.js.map → timeline-definition-BDJGKUSR-1WjIsnZH.js.map} +1 -1
  186. package/build/client/assets/tooltip-C6xKzWST.js +2 -0
  187. package/build/client/assets/{tooltip-Bzd6O8vq.js.map → tooltip-C6xKzWST.js.map} +1 -1
  188. package/build/client/assets/use-event-source-B411g-uF.js +2 -0
  189. package/build/client/assets/{use-event-source-Dar8h_B8.js.map → use-event-source-B411g-uF.js.map} +1 -1
  190. package/build/client/assets/user-Dmcddqge.js +2 -0
  191. package/build/client/assets/user-Dmcddqge.js.map +1 -0
  192. package/build/client/assets/version-BAECczgY.js +2 -0
  193. package/build/client/assets/version-BAECczgY.js.map +1 -0
  194. package/build/client/assets/workshop-config-gFAnGhSV.js +2 -0
  195. package/build/client/assets/workshop-config-gFAnGhSV.js.map +1 -0
  196. package/build/client/assets/{xychartDiagram-VJFVF3MP-JztjcODi.js → xychartDiagram-VJFVF3MP-Cp8GqXc6.js} +3 -3
  197. package/build/client/assets/{xychartDiagram-VJFVF3MP-JztjcODi.js.map → xychartDiagram-VJFVF3MP-Cp8GqXc6.js.map} +1 -1
  198. package/build/server/index.js +4439 -4072
  199. package/build/server/index.js.map +1 -1
  200. package/dist/server/index.js +2 -2
  201. package/package.json +13 -13
  202. package/build/client/assets/_-BaHOmd8F.js +0 -2
  203. package/build/client/assets/_-BaHOmd8F.js.map +0 -1
  204. package/build/client/assets/_exerciseNumber-Dqi7TgL9.js +0 -2
  205. package/build/client/assets/_exerciseNumber-Dqi7TgL9.js.map +0 -1
  206. package/build/client/assets/_exerciseNumber_._stepNumber-DoOFEk-P.js +0 -2
  207. package/build/client/assets/_exerciseNumber_._stepNumber-DoOFEk-P.js.map +0 -1
  208. package/build/client/assets/_exerciseNumber_.finished-C5m6M0gM.js +0 -2
  209. package/build/client/assets/_exerciseNumber_.finished-C5m6M0gM.js.map +0 -1
  210. package/build/client/assets/_layout-B_BIIcpM.js +0 -2
  211. package/build/client/assets/_layout-B_BIIcpM.js.map +0 -1
  212. package/build/client/assets/_layout-B_NrRv0S.js +0 -6
  213. package/build/client/assets/_layout-B_NrRv0S.js.map +0 -1
  214. package/build/client/assets/_layout-D7_F6t3x.js +0 -2
  215. package/build/client/assets/_layout-D7_F6t3x.js.map +0 -1
  216. package/build/client/assets/_layout-QRe2q83m.js +0 -2
  217. package/build/client/assets/_layout-QRe2q83m.js.map +0 -1
  218. package/build/client/assets/accordion-CpiLc1m2.js +0 -2
  219. package/build/client/assets/account-CbFDiVNd.js +0 -2
  220. package/build/client/assets/account-CbFDiVNd.js.map +0 -1
  221. package/build/client/assets/app-BYSDu0vh.js +0 -2
  222. package/build/client/assets/app-BYSDu0vh.js.map +0 -1
  223. package/build/client/assets/architectureDiagram-IEHRJDOE-BqPvrjLh.js +0 -37
  224. package/build/client/assets/button-Dt4EcDfR.js +0 -2
  225. package/build/client/assets/button-Dt4EcDfR.js.map +0 -1
  226. package/build/client/assets/channel-DnqeaSfB.js +0 -2
  227. package/build/client/assets/classDiagram-GIVACNV2-cXWx-aYi.js +0 -2
  228. package/build/client/assets/classDiagram-v2-COTLJTTW-cXWx-aYi.js +0 -2
  229. package/build/client/assets/clone-Bj8ANPCv.js +0 -2
  230. package/build/client/assets/components-5arJTWsS.js +0 -158
  231. package/build/client/assets/components-5arJTWsS.js.map +0 -1
  232. package/build/client/assets/dagre-OKDRZEBW-DT9ZQRxf.js +0 -5
  233. package/build/client/assets/diagram-SSKATNLV-CcKCni9R.js +0 -44
  234. package/build/client/assets/diagram-VNBRO52H-DWoRAiqO.js +0 -25
  235. package/build/client/assets/diff-BKR4usVv.js +0 -2
  236. package/build/client/assets/diff-BKR4usVv.js.map +0 -1
  237. package/build/client/assets/diff-D5_VwPLF.js.map +0 -1
  238. package/build/client/assets/discord-BU7RzE6-.js +0 -2
  239. package/build/client/assets/discord-BU7RzE6-.js.map +0 -1
  240. package/build/client/assets/discord-ut4t-aMQ.js +0 -2
  241. package/build/client/assets/discord-ut4t-aMQ.js.map +0 -1
  242. package/build/client/assets/entry.client-BLUlgPHE.js +0 -44
  243. package/build/client/assets/entry.client-BLUlgPHE.js.map +0 -1
  244. package/build/client/assets/error-boundary-B07cWiEy.js +0 -2
  245. package/build/client/assets/error-boundary-B07cWiEy.js.map +0 -1
  246. package/build/client/assets/finished-MrsevkkK.js +0 -2
  247. package/build/client/assets/finished-MrsevkkK.js.map +0 -1
  248. package/build/client/assets/ganttDiagram-APWFNJXF-TfB6wYvN.js +0 -258
  249. package/build/client/assets/gitGraphDiagram-7IBYFJ6S-D2NQnQv2.js +0 -66
  250. package/build/client/assets/index-9euhNa27.js +0 -2
  251. package/build/client/assets/index-9euhNa27.js.map +0 -1
  252. package/build/client/assets/index-B8yUFowV.js +0 -2
  253. package/build/client/assets/index-B8yUFowV.js.map +0 -1
  254. package/build/client/assets/index-BmMpCvYx.js +0 -2
  255. package/build/client/assets/index-DLC5u33j.js +0 -36
  256. package/build/client/assets/index-DPHVg8Eh.js +0 -2
  257. package/build/client/assets/index-DPHVg8Eh.js.map +0 -1
  258. package/build/client/assets/index-Do-KWT0a.js +0 -42
  259. package/build/client/assets/index-Dsusf_Av.js +0 -38
  260. package/build/client/assets/index-Dsusf_Av.js.map +0 -1
  261. package/build/client/assets/index-DvQyydjU.js +0 -3
  262. package/build/client/assets/index-Fw2eA3AF.js +0 -2
  263. package/build/client/assets/index-Fw2eA3AF.js.map +0 -1
  264. package/build/client/assets/infoDiagram-PH2N3AL5-D-nEozcT.js +0 -3
  265. package/build/client/assets/l-ChG-6rmU.js +0 -2
  266. package/build/client/assets/l-ChG-6rmU.js.map +0 -1
  267. package/build/client/assets/loading-b1FV2pQh.js +0 -2
  268. package/build/client/assets/login-Ci7cdiuj.js +0 -2
  269. package/build/client/assets/login-Ci7cdiuj.js.map +0 -1
  270. package/build/client/assets/manifest-f9e2a790.js +0 -1
  271. package/build/client/assets/mdx-C7imFHZE.js +0 -3
  272. package/build/client/assets/mdx-C7imFHZE.js.map +0 -1
  273. package/build/client/assets/mindmap-definition-ALO5MXBD-BhzLy0Zl.js +0 -96
  274. package/build/client/assets/misc-2sBiisF5.js +0 -2
  275. package/build/client/assets/nav-chevrons-CV-dpXNR.js +0 -2
  276. package/build/client/assets/nav-chevrons-CV-dpXNR.js.map +0 -1
  277. package/build/client/assets/onboarding-c9ZuxLsm.js +0 -2
  278. package/build/client/assets/onboarding-c9ZuxLsm.js.map +0 -1
  279. package/build/client/assets/online-DZKJk3C2.js +0 -2
  280. package/build/client/assets/pe-BShc2dvc.js +0 -2
  281. package/build/client/assets/pieDiagram-IB7DONF6-CaTGj8RH.js +0 -31
  282. package/build/client/assets/preferences-BkWQyRCq.js +0 -2
  283. package/build/client/assets/preferences-BkWQyRCq.js.map +0 -1
  284. package/build/client/assets/preview-CqZGJtsE.js +0 -2
  285. package/build/client/assets/preview-CqZGJtsE.js.map +0 -1
  286. package/build/client/assets/product-DJOWNuL-.js +0 -2
  287. package/build/client/assets/progress-BJ4ADF-s.js +0 -2
  288. package/build/client/assets/progress-bar-DgnkQxQw.js +0 -2
  289. package/build/client/assets/progress-bar-DgnkQxQw.js.map +0 -1
  290. package/build/client/assets/revalidation-ws-B0skixgr.js +0 -2
  291. package/build/client/assets/revalidation-ws-B0skixgr.js.map +0 -1
  292. package/build/client/assets/root-C_WG23OF.js +0 -11
  293. package/build/client/assets/root-C_WG23OF.js.map +0 -1
  294. package/build/client/assets/sankeyDiagram-QLVOVGJD-Bt8556P1.js +0 -11
  295. package/build/client/assets/set-playground-DW2Ys-rV.js +0 -2
  296. package/build/client/assets/set-playground-DW2Ys-rV.js.map +0 -1
  297. package/build/client/assets/stateDiagram-DGXRK772-B3BuD15b.js +0 -2
  298. package/build/client/assets/stateDiagram-v2-YXO3MK2T-BzFxWpqR.js +0 -2
  299. package/build/client/assets/support-Bg0iSyle.js +0 -2
  300. package/build/client/assets/support-Bg0iSyle.js.map +0 -1
  301. package/build/client/assets/test-DdUNKtkF.js +0 -2
  302. package/build/client/assets/test-DdUNKtkF.js.map +0 -1
  303. package/build/client/assets/tests-B1ak2CDI.js.map +0 -1
  304. package/build/client/assets/tooltip-Bzd6O8vq.js +0 -2
  305. package/build/client/assets/use-event-source-Dar8h_B8.js +0 -2
  306. package/build/client/assets/user-DNSnhqGn.js +0 -2
  307. package/build/client/assets/user-DNSnhqGn.js.map +0 -1
  308. package/build/client/assets/version-DriSvNMy.js +0 -2
  309. package/build/client/assets/version-DriSvNMy.js.map +0 -1
  310. package/build/client/assets/workshop-config-DchzGYJM.js +0 -2
  311. package/build/client/assets/workshop-config-DchzGYJM.js.map +0 -1
@@ -1,2 +0,0 @@
1
- import{j as e}from"./index-Dsusf_Av.js";import{B as t}from"./button-Dt4EcDfR.js";import{E as r,D as i}from"./epic-video-CmlkW6Rw.js";import{u as s,F as l}from"./components-5arJTWsS.js";import"./misc-2sBiisF5.js";import"./index-DLC5u33j.js";import"./tooltip-Bzd6O8vq.js";import"./pe-BShc2dvc.js";import"./online-DZKJk3C2.js";import"./loading-b1FV2pQh.js";import"./user-DNSnhqGn.js";import"./workshop-config-DchzGYJM.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-c9ZuxLsm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"onboarding-c9ZuxLsm.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 { getEpicVideoInfos } from '@epic-web/workshop-utils/epic-api.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'\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":"maAuBO,MAAMA,EAAoB,CAChCC,kBAAmBA,IAAM,IAC1B,EAgCA,SAAwBC,GAAa,CACpC,MAAMC,EAAOC,EAA6B,EAEzC,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,eAAiB,CAAA,CAC/C,CAAA,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,qCAEzD,CAAA,CACD,CAAA,CAAA,CACD,CAAA,CAEF"}
@@ -1,2 +0,0 @@
1
- import{r as e}from"./index-Dsusf_Av.js";import{a as o}from"./index-DLC5u33j.js";function t(){return window.navigator.onLine}function r(n){return window.addEventListener("online",n),window.addEventListener("offline",n),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",n)}}function u(){const n=o();return e.useSyncExternalStore(r,t,()=>n.online)}export{u};
2
- //# sourceMappingURL=online-DZKJk3C2.js.map
@@ -1,2 +0,0 @@
1
- import{r as e,u,j as n}from"./index-Dsusf_Av.js";function a(){return()=>{}}function s(){return e.useSyncExternalStore(a,()=>!0,()=>!1)}function o({children:t,fallback:r=null}){return s()?e.createElement(e.Fragment,null,r):e.createElement(e.Fragment,null,t())}const c="__PE_redirectTo";function l(){const t=u();return n.jsx(o,{children:()=>n.jsx("input",{type:"hidden",name:c,value:t.pathname})})}export{s as a,l as u};
2
- //# sourceMappingURL=pe-BShc2dvc.js.map
@@ -1,31 +0,0 @@
1
- import{p as V}from"./chunk-4BMEZGHF-CNL-bCj2.js";import{Q as y,T as z,aF as U,_ as p,g as j,s as q,a as H,b as K,t as Q,q as Z,l as F,c as J,F as X,K as Y,a4 as tt,e as et,z as at,H as rt}from"./mermaid.core-q9C-HfFu.js";import{p as nt}from"./radar-MK3ICKWK-CENXhI0E.js";import{d as P}from"./arc-DmQZ2TPB.js";import{o as it}from"./ordinal-Cboi1Yqb.js";import"./mdx-C7imFHZE.js";import"./index-Dsusf_Av.js";import"./misc-2sBiisF5.js";import"./components-5arJTWsS.js";import"./epic-video-CmlkW6Rw.js";import"./index-DLC5u33j.js";import"./tooltip-Bzd6O8vq.js";import"./pe-BShc2dvc.js";import"./online-DZKJk3C2.js";import"./loading-b1FV2pQh.js";import"./user-DNSnhqGn.js";import"./workshop-config-DchzGYJM.js";import"./progress-bar-DgnkQxQw.js";import"./_baseUniq-BOjGYEEK.js";import"./_basePickBy-lB0X5x6U.js";import"./clone-Bj8ANPCv.js";import"./init-Gi6I4Gst.js";function ot(t,a){return a<t?-1:a>t?1:a>=t?0:NaN}function st(t){return t}function lt(){var t=st,a=ot,m=null,s=y(0),u=y(z),x=y(0);function i(e){var r,l=(e=U(e)).length,g,A,h=0,c=new Array(l),n=new Array(l),v=+s.apply(this,arguments),w=Math.min(z,Math.max(-z,u.apply(this,arguments)-v)),f,T=Math.min(Math.abs(w)/l,x.apply(this,arguments)),$=T*(w<0?-1:1),d;for(r=0;r<l;++r)(d=n[c[r]=r]=+t(e[r],r,e))>0&&(h+=d);for(a!=null?c.sort(function(S,C){return a(n[S],n[C])}):m!=null&&c.sort(function(S,C){return m(e[S],e[C])}),r=0,A=h?(w-l*$)/h:0;r<l;++r,v=f)g=c[r],d=n[g],f=v+(d>0?d*A:0)+$,n[g]={data:e[g],index:r,value:d,startAngle:v,endAngle:f,padAngle:T};return n}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:y(+e),i):t},i.sortValues=function(e){return arguments.length?(a=e,m=null,i):a},i.sort=function(e){return arguments.length?(m=e,a=null,i):m},i.startAngle=function(e){return arguments.length?(s=typeof e=="function"?e:y(+e),i):s},i.endAngle=function(e){return arguments.length?(u=typeof e=="function"?e:y(+e),i):u},i.padAngle=function(e){return arguments.length?(x=typeof e=="function"?e:y(+e),i):x},i}var ct=rt.pie,G={sections:new Map,showData:!1},b=G.sections,W=G.showData,pt=structuredClone(ct),ut=p(()=>structuredClone(pt),"getConfig"),gt=p(()=>{b=new Map,W=G.showData,at()},"clear"),dt=p(({label:t,value:a})=>{b.has(t)||(b.set(t,a),F.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),ft=p(()=>b,"getSections"),mt=p(t=>{W=t},"setShowData"),ht=p(()=>W,"getShowData"),R={getConfig:ut,clear:gt,setDiagramTitle:Z,getDiagramTitle:Q,setAccTitle:K,getAccTitle:H,setAccDescription:q,getAccDescription:j,addSection:dt,getSections:ft,setShowData:mt,getShowData:ht},vt=p((t,a)=>{V(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),St={parse:p(async t=>{const a=await nt("pie",t);F.debug(a),vt(a,R)},"parse")},yt=p(t=>`
2
- .pieCircle{
3
- stroke: ${t.pieStrokeColor};
4
- stroke-width : ${t.pieStrokeWidth};
5
- opacity : ${t.pieOpacity};
6
- }
7
- .pieOuterCircle{
8
- stroke: ${t.pieOuterStrokeColor};
9
- stroke-width: ${t.pieOuterStrokeWidth};
10
- fill: none;
11
- }
12
- .pieTitleText {
13
- text-anchor: middle;
14
- font-size: ${t.pieTitleTextSize};
15
- fill: ${t.pieTitleTextColor};
16
- font-family: ${t.fontFamily};
17
- }
18
- .slice {
19
- font-family: ${t.fontFamily};
20
- fill: ${t.pieSectionTextColor};
21
- font-size:${t.pieSectionTextSize};
22
- // fill: white;
23
- }
24
- .legend text {
25
- fill: ${t.pieLegendTextColor};
26
- font-family: ${t.fontFamily};
27
- font-size: ${t.pieLegendTextSize};
28
- }
29
- `,"getStyles"),xt=yt,At=p(t=>{const a=[...t.entries()].map(s=>({label:s[0],value:s[1]})).sort((s,u)=>u.value-s.value);return lt().value(s=>s.value)(a)},"createPieArcs"),wt=p((t,a,m,s)=>{F.debug(`rendering pie chart
30
- `+t);const u=s.db,x=J(),i=X(u.getConfig(),x.pie),e=40,r=18,l=4,g=450,A=g,h=Y(a),c=h.append("g");c.attr("transform","translate("+A/2+","+g/2+")");const{themeVariables:n}=x;let[v]=tt(n.pieOuterStrokeWidth);v??(v=2);const w=i.textPosition,f=Math.min(A,g)/2-e,T=P().innerRadius(0).outerRadius(f),$=P().innerRadius(f*w).outerRadius(f*w);c.append("circle").attr("cx",0).attr("cy",0).attr("r",f+v/2).attr("class","pieOuterCircle");const d=u.getSections(),S=At(d),C=[n.pie1,n.pie2,n.pie3,n.pie4,n.pie5,n.pie6,n.pie7,n.pie8,n.pie9,n.pie10,n.pie11,n.pie12],D=it(C);c.selectAll("mySlices").data(S).enter().append("path").attr("d",T).attr("fill",o=>D(o.data.label)).attr("class","pieCircle");let N=0;d.forEach(o=>{N+=o}),c.selectAll("mySlices").data(S).enter().append("text").text(o=>(o.data.value/N*100).toFixed(0)+"%").attr("transform",o=>"translate("+$.centroid(o)+")").style("text-anchor","middle").attr("class","slice"),c.append("text").text(u.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText");const M=c.selectAll(".legend").data(D.domain()).enter().append("g").attr("class","legend").attr("transform",(o,k)=>{const E=r+l,L=E*D.domain().length/2,_=12*r,B=k*E-L;return"translate("+_+","+B+")"});M.append("rect").attr("width",r).attr("height",r).style("fill",D).style("stroke",D),M.data(S).append("text").attr("x",r+l).attr("y",r-l).text(o=>{const{label:k,value:E}=o.data;return u.getShowData()?`${k} [${E}]`:k});const I=Math.max(...M.selectAll("text").nodes().map(o=>(o==null?void 0:o.getBoundingClientRect().width)??0)),O=A+e+r+l+I;h.attr("viewBox",`0 0 ${O} ${g}`),et(h,g,O,i.useMaxWidth)},"draw"),Ct={draw:wt},qt={parser:St,db:R,renderer:Ct,styles:xt};export{qt as diagram};
31
- //# sourceMappingURL=pieDiagram-IB7DONF6-CaTGj8RH.js.map
@@ -1,2 +0,0 @@
1
- import{c as u,j as e}from"./index-Dsusf_Av.js";import{B as p}from"./button-Dt4EcDfR.js";import{I as l}from"./misc-2sBiisF5.js";import{S as o}from"./tooltip-Bzd6O8vq.js";import{b as h,F as j}from"./components-5arJTWsS.js";function P(){var a,c,d,x;const s=h("root"),n=(a=s==null?void 0:s.preferences)==null?void 0:a.player,m=(c=s==null?void 0:s.preferences)==null?void 0:c.fontSize,t=(d=s==null?void 0:s.preferences)==null?void 0:d.presence,i=(x=s==null?void 0:s.preferences)==null?void 0:x.playground,r=u().state==="submitting";return e.jsxs("main",{className:"container mt-12 flex h-full w-full max-w-3xl flex-grow flex-col gap-4",children:[e.jsx("h1",{className:"mb-4 text-h1",children:"Preferences"}),e.jsxs(j,{method:"post",className:"flex w-full max-w-sm flex-col gap-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"mb-2 text-body-xl",children:"Video Player Preferences"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"minResolution",children:"Minimum Resolution:"}),e.jsxs("select",{id:"minResolution",name:"minResolution",defaultValue:n==null?void 0:n.minResolution,className:"rounded-md border border-border bg-background px-2 py-1 text-foreground",children:[e.jsx("option",{value:"",children:"Auto"}),e.jsx("option",{value:"480",children:"480p"}),e.jsx("option",{value:"720",children:"720p"}),e.jsx("option",{value:"1080",children:"1080p"}),e.jsx("option",{value:"1440",children:"1440p"}),e.jsx("option",{value:"2160",children:"2160p (4K)"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"maxResolution",children:"Maximum Resolution:"}),e.jsxs("select",{id:"maxResolution",name:"maxResolution",defaultValue:n==null?void 0:n.maxResolution,className:"rounded-md border border-border bg-background px-2 py-1 text-foreground",children:[e.jsx("option",{value:"",children:"Auto"}),e.jsx("option",{value:"720",children:"720p"}),e.jsx("option",{value:"1080",children:"1080p"}),e.jsx("option",{value:"1440",children:"1440p"}),e.jsx("option",{value:"2160",children:"2160p (4K)"})]})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[e.jsx("h2",{className:"text-body-xl",children:"Font Size Preference"}),e.jsx(o,{content:"Defaults to 16px",children:e.jsx(l,{name:"Question",tabIndex:0})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"fontSize",children:"Font Size"}),e.jsx("input",{type:"number",id:"fontSize",name:"fontSize",defaultValue:m??16,step:"1",min:"12",max:"26",className:"rounded-md border border-border bg-background px-2 py-1 text-foreground"})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[e.jsx("h2",{className:"text-body-xl",children:"Presence Preference"}),e.jsx(o,{content:"This controls whether your name and avatar are displayed in the pile of faces in navigation",children:e.jsx(l,{name:"Question",tabIndex:0})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",id:"optOutPresence",name:"optOutPresence",defaultChecked:t==null?void 0:t.optOut}),e.jsx("label",{htmlFor:"optOutPresence",children:"Opt out of presence features"})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[e.jsx("h2",{className:"text-body-xl",children:"Persist Playground"}),e.jsx(o,{content:'When enabled, clicking "Set to Playground" will save the current playground in the "saved-playgrounds" directory.',children:e.jsx(l,{name:"Question",tabIndex:0})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",id:"persistPlayground",name:"persistPlayground",defaultChecked:i==null?void 0:i.persist}),e.jsx("label",{htmlFor:"persistPlayground",children:"Enable saving playground"})]})]}),e.jsx("div",{className:"h-4"}),e.jsx(p,{varient:"primary",type:"submit",name:"intent",value:"update-preferences",disabled:r,children:r?"Updating...":"Update Preferences"})]})]})}export{P as default};
2
- //# sourceMappingURL=preferences-BkWQyRCq.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"preferences-BkWQyRCq.js","sources":["../../../app/routes/_app+/preferences.tsx"],"sourcesContent":["import {\n\tgetPreferences,\n\tsetPreferences,\n} from '@epic-web/workshop-utils/db.server'\nimport { Form, useNavigation, useRouteLoaderData } from '@remix-run/react'\nimport { Button } from '#app/components/button.tsx'\nimport { Icon } from '#app/components/icons.tsx'\nimport { SimpleTooltip } from '#app/components/ui/tooltip.tsx'\nimport { type loader as rootLoader } from '#app/root.tsx'\nimport { ensureUndeployed } from '#app/utils/misc.tsx'\nimport { redirectWithToast } from '#app/utils/toast.server.ts'\n\nexport async function loader() {\n\tensureUndeployed()\n\tconst preferences = await getPreferences()\n\treturn { preferences }\n}\n\nexport async function action({ request }: { request: Request }) {\n\tensureUndeployed()\n\tconst formData = await request.formData()\n\n\tconst minResolution = formData.get('minResolution')\n\tconst maxResolution = formData.get('maxResolution')\n\tconst fontSize = formData.get('fontSize')\n\tconst optOutPresence = formData.get('optOutPresence') === 'on'\n\tconst persistPlayground = formData.get('persistPlayground') === 'on'\n\n\tawait setPreferences({\n\t\tplayer: {\n\t\t\tminResolution: minResolution ? Number(minResolution) : undefined,\n\t\t\tmaxResolution: maxResolution ? Number(maxResolution) : undefined,\n\t\t},\n\t\tfontSize: fontSize ? Number(fontSize) : undefined,\n\t\tpresence: { optOut: optOutPresence },\n\t\tplayground: { persist: persistPlayground },\n\t})\n\n\treturn redirectWithToast('/preferences', {\n\t\ttitle: 'Preferences updated',\n\t\tdescription: 'Your preferences have been updated.',\n\t\ttype: 'success',\n\t})\n}\n\nexport default function AccountSettings() {\n\tconst data = useRouteLoaderData<typeof rootLoader>('root')\n\tconst playerPreferences = data?.preferences?.player\n\tconst fontSizePreference = data?.preferences?.fontSize\n\tconst presencePreferences = data?.preferences?.presence\n\tconst playgroundPreferences = data?.preferences?.playground\n\tconst navigation = useNavigation()\n\n\tconst isSubmitting = navigation.state === 'submitting'\n\n\treturn (\n\t\t<main className=\"container mt-12 flex h-full w-full max-w-3xl flex-grow flex-col gap-4\">\n\t\t\t<h1 className=\"mb-4 text-h1\">Preferences</h1>\n\t\t\t<Form method=\"post\" className=\"flex w-full max-w-sm flex-col gap-4\">\n\t\t\t\t<div>\n\t\t\t\t\t<h2 className=\"mb-2 text-body-xl\">Video Player Preferences</h2>\n\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<label htmlFor=\"minResolution\">Minimum Resolution:</label>\n\t\t\t\t\t\t<select\n\t\t\t\t\t\t\tid=\"minResolution\"\n\t\t\t\t\t\t\tname=\"minResolution\"\n\t\t\t\t\t\t\tdefaultValue={playerPreferences?.minResolution}\n\t\t\t\t\t\t\tclassName=\"rounded-md border border-border bg-background px-2 py-1 text-foreground\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<option value=\"\">Auto</option>\n\t\t\t\t\t\t\t<option value=\"480\">480p</option>\n\t\t\t\t\t\t\t<option value=\"720\">720p</option>\n\t\t\t\t\t\t\t<option value=\"1080\">1080p</option>\n\t\t\t\t\t\t\t<option value=\"1440\">1440p</option>\n\t\t\t\t\t\t\t<option value=\"2160\">2160p (4K)</option>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<label htmlFor=\"maxResolution\">Maximum Resolution:</label>\n\t\t\t\t\t\t<select\n\t\t\t\t\t\t\tid=\"maxResolution\"\n\t\t\t\t\t\t\tname=\"maxResolution\"\n\t\t\t\t\t\t\tdefaultValue={playerPreferences?.maxResolution}\n\t\t\t\t\t\t\tclassName=\"rounded-md border border-border bg-background px-2 py-1 text-foreground\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<option value=\"\">Auto</option>\n\t\t\t\t\t\t\t<option value=\"720\">720p</option>\n\t\t\t\t\t\t\t<option value=\"1080\">1080p</option>\n\t\t\t\t\t\t\t<option value=\"1440\">1440p</option>\n\t\t\t\t\t\t\t<option value=\"2160\">2160p (4K)</option>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div>\n\t\t\t\t\t<div className=\"mb-2 flex items-center gap-2\">\n\t\t\t\t\t\t<h2 className=\"text-body-xl\">Font Size Preference</h2>\n\t\t\t\t\t\t<SimpleTooltip content=\"Defaults to 16px\">\n\t\t\t\t\t\t\t<Icon name=\"Question\" tabIndex={0} />\n\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<label htmlFor=\"fontSize\">Font Size</label>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\tid=\"fontSize\"\n\t\t\t\t\t\t\tname=\"fontSize\"\n\t\t\t\t\t\t\tdefaultValue={fontSizePreference ?? 16}\n\t\t\t\t\t\t\tstep=\"1\"\n\t\t\t\t\t\t\tmin=\"12\"\n\t\t\t\t\t\t\tmax=\"26\"\n\t\t\t\t\t\t\tclassName=\"rounded-md border border-border bg-background px-2 py-1 text-foreground\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div>\n\t\t\t\t\t<div className=\"mb-2 flex items-center gap-2\">\n\t\t\t\t\t\t<h2 className=\"text-body-xl\">Presence Preference</h2>\n\n\t\t\t\t\t\t<SimpleTooltip content=\"This controls whether your name and avatar are displayed in the pile of faces in navigation\">\n\t\t\t\t\t\t\t<Icon name=\"Question\" tabIndex={0} />\n\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\tid=\"optOutPresence\"\n\t\t\t\t\t\t\tname=\"optOutPresence\"\n\t\t\t\t\t\t\tdefaultChecked={presencePreferences?.optOut}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<label htmlFor=\"optOutPresence\">Opt out of presence features</label>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div>\n\t\t\t\t\t<div className=\"mb-2 flex items-center gap-2\">\n\t\t\t\t\t\t<h2 className=\"text-body-xl\">Persist Playground</h2>\n\n\t\t\t\t\t\t<SimpleTooltip\n\t\t\t\t\t\t\tcontent={`When enabled, clicking \"Set to Playground\" will save the current playground in the \"saved-playgrounds\" directory.`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Icon name=\"Question\" tabIndex={0} />\n\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\tid=\"persistPlayground\"\n\t\t\t\t\t\t\tname=\"persistPlayground\"\n\t\t\t\t\t\t\tdefaultChecked={playgroundPreferences?.persist}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<label htmlFor=\"persistPlayground\">Enable saving playground</label>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"h-4\" />\n\n\t\t\t\t<Button\n\t\t\t\t\tvarient=\"primary\"\n\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\tname=\"intent\"\n\t\t\t\t\tvalue=\"update-preferences\"\n\t\t\t\t\tdisabled={isSubmitting}\n\t\t\t\t>\n\t\t\t\t\t{isSubmitting ? 'Updating...' : 'Update Preferences'}\n\t\t\t\t</Button>\n\t\t\t</Form>\n\t\t</main>\n\t)\n}\n"],"names":["AccountSettings","data","useRouteLoaderData","playerPreferences","preferences","player","fontSizePreference","fontSize","presencePreferences","presence","playgroundPreferences","playground","isSubmitting","useNavigation","state","jsxs","className","children","jsx","Form","method","htmlFor","id","name","defaultValue","minResolution","value","maxResolution","SimpleTooltip","content","Icon","tabIndex","type","step","min","max","defaultChecked","optOut","persist","Button","varient","disabled"],"mappings":"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"}
@@ -1,2 +0,0 @@
1
- import{j as e,r as n}from"./index-Dsusf_Av.js";import{u as fe,b as se,I as T,c as me,a as ne}from"./misc-2sBiisF5.js";import{B as ae,L as pe}from"./button-Dt4EcDfR.js";import{L as ie}from"./loading-b1FV2pQh.js";import{s as M}from"./progress-bar-DgnkQxQw.js";import{u as W}from"./pe-BShc2dvc.js";import{a as K,e as xe,F as ge}from"./components-5arJTWsS.js";import{a as oe,u as G,d as A,i as we,o as u,l as w,t as N,e as E,s as F,n as te}from"./index-DLC5u33j.js";import{T as ye,a as B,b as L,c as U}from"./tooltip-Bzd6O8vq.js";function je({name:a}){var o;const t=K(),i=W(),l=(o=t.formData)==null?void 0:o.get("intent"),c=l==="stop"?"Stopping App":l==="restart"?"Restarting App":null,d=fe();return e.jsxs(t.Form,{method:"POST",action:"/start",children:[i,M,e.jsx("input",{type:"hidden",name:"name",value:a}),e.jsx("button",{type:"submit",name:"intent",value:d?"restart":"stop",className:"h-full border-r px-3 py-4 font-mono text-xs uppercase leading-none",children:c||(d?"Restart App":"Stop App")})]})}function le({port:a}){const t=K(),i=W();return e.jsxs(t.Form,{method:"POST",action:"/start",children:[i,M,e.jsx("input",{type:"hidden",name:"port",value:a}),e.jsx(ae,{varient:"mono",type:"submit",name:"intent",value:"stop-port",children:t.state==="idle"?"Stop Port":"Stopping Port"})]})}function be({name:a}){var l;const t=K(),i=W();return((l=t.data)==null?void 0:l.status)==="app-not-started"?t.data.error==="port-unavailable"?e.jsxs("div",{children:["The port is unavailable. Would you like to stop whatever is running on that port and try again?",e.jsx(le,{port:t.data.port})]}):e.jsx("div",{children:"An unknown error has happened."}):e.jsxs(t.Form,{method:"POST",action:"/start",children:[i,M,e.jsx("input",{type:"hidden",name:"name",value:a}),t.state==="idle"?e.jsx(ae,{type:"submit",name:"intent",value:"start",varient:"mono",children:"Start App"}):e.jsx("div",{children:e.jsx(ie,{children:"Starting App"})})]})}const Se=we(u({type:w("epicshop:history-call")}),A([u({method:w("pushState"),args:A([N([u({}).passthrough(),E()]),N([u({}).passthrough(),E(),F()])])}),u({method:w("replaceState"),args:A([N([u({}).passthrough(),E()]),N([u({}).passthrough(),E(),F()])])}),u({method:w("go"),args:N([te().optional()])}),u({method:w("forward"),args:N([])}),u({method:w("back"),args:N([])}),u({method:w("popstate"),pathname:F(),delta:te()})])),Ne=u({type:w("epicshop:loaded"),url:F()}),Re=A([Se,Ne]);function re(a,t,i){return Math.min(Math.max(a+t,0),i)}const Pe=n.forwardRef(ke);function ke({name:a,port:t,portIsAvailable:i,isRunning:l,baseUrl:c,id:d,initialRoute:o},x){const y=oe(),[g,p]=n.useState(!1);return l||g?e.jsx(Ie,{baseUrl:c,id:d,name:a,ref:x,initialRoute:o}):i===!1?e.jsxs("div",{className:"flex flex-col items-center justify-center",children:[e.jsxs("p",{className:"max-w-xs pb-5 text-center",role:"status",children:["The port for this app is unavailable. It could be that you're running it ",e.jsx("a",{href:se({domain:y.domain,port:t}),className:"underline",target:"_blank",rel:"noreferrer",children:"elsewhere"}),". ",e.jsx(pe,{onClick:()=>p(!0),children:"Show here anyway"})]}),e.jsx(le,{port:t})]}):e.jsx(be,{name:a})}const Ie=n.forwardRef(ve);function ve({baseUrl:a,id:t,name:i,initialRoute:l},c){const d=G(),[o,x]=xe(),y=o.get("pathname")??l,[g,p]=n.useState(0),ce=t+g,R=n.useRef("new"),D=n.useRef(null),[j,O]=n.useState({history:[y],index:0}),[V,q]=n.useState(y),z=n.useRef(null),b=new URL(y,a),Y=n.useRef(b);n.useEffect(()=>{Y.current=b});const[$,J]=n.useState(b),H=n.useRef(t);H.current!==t&&(H.current=t,J(Y.current)),n.useEffect(()=>{H.current=t}),n.useEffect(()=>{function s(h){var C;if(h.source!==((C=z.current)==null?void 0:C.contentWindow))return;const I=Re.safeParse(h.data,{path:["messageEvent","data"]});if(!I.success)return;const{data:f}=I;if(f.type==="epicshop:loaded"){O(r=>{const S=P=>re(r.index,P,r.history.length-1);if(R.current==="back")return{...r,index:S(-1)};if(R.current==="forward")return{...r,index:S(1)};if(R.current==="new"){const P=r.history[r.index],m=new URL(f.url),v=m.pathname+m.search;if(P===v)return r;const ee=[...r.history.slice(0,r.index+1),v];return{history:ee,index:ee.length-1}}else throw new Error("Unexpected lastDirectionRef value")});return}const{method:he}=f;O(r=>{const S=m=>re(r.index,m,r.history.length-1),P=r.history[r.index];switch(he){case"popstate":return{...r,index:S(f.delta)};case"forward":return{...r,index:S(1)};case"back":return{...r,index:S(-1)};case"pushState":{const m=f.args[2]??P,v=[...r.history.slice(0,r.index+1),m].filter(Boolean);return{...r,history:v,index:v.length-1}}case"replaceState":{const m=f.args[2]??P;return{...r,history:[...r.history.slice(0,r.index),m,...r.history.slice(r.index+1)].filter(Boolean)}}case"go":{const[m=0]=f.args;return{...r,index:S(m)}}}})}return window.addEventListener("message",s),()=>{window.removeEventListener("message",s)}},[]);const Q=n.useRef(x);n.useEffect(()=>{Q.current=x},[x]);const k=j.history[j.index];n.useEffect(()=>{if(!k)return;q(k);const s=new URLSearchParams(window.location.search);k==="/"?s.delete("pathname"):s.set("pathname",k),`?${s.toString()}`!==window.location.search&&Q.current(s,{replace:!0})},[k]);const _=(...s)=>{var I,f;const h=s[0];typeof h=="number"?R.current=h>0?"forward":"back":R.current="new",D.current&&clearTimeout(D.current),D.current=setTimeout(()=>{R.current="new"},100),(f=(I=z.current)==null?void 0:I.contentWindow)==null||f.postMessage({type:"epicshop:navigate-call",params:s},"*")};function X(s=V){q(s);const h=j.history[j.index];_(s,{replace:h===s})}n.useImperativeHandle(c,()=>({handleExtrnalNavigation:X}));const ue=j.index===j.history.length-1,de=j.index<=0,Z=[];for(const[s,h]of o.entries())s!=="pathname"&&Z.push(e.jsx("input",{type:"hidden",name:s,value:h},s));return e.jsx(ye,{children:e.jsxs("div",{className:"flex h-full flex-grow flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between border-b pl-1.5",children:[e.jsxs("div",{className:"mr-2 flex items-center justify-center gap-2 px-1",children:[e.jsxs(B,{children:[e.jsx(L,{asChild:!0,children:e.jsx("button",{type:"button",className:"hidden aspect-square h-full w-full items-center justify-center p-1 transition disabled:opacity-40 sm:flex",disabled:de,onClick:()=>_(-1),children:e.jsx(T,{name:"ArrowLeft","aria-hidden":"true"})})}),e.jsx(U,{children:"Go back"})]}),e.jsxs(B,{children:[e.jsx(L,{asChild:!0,children:e.jsx("button",{type:"button",className:"hidden aspect-square h-full w-full items-center justify-center p-1 transition disabled:opacity-40 sm:flex",disabled:ue,onClick:()=>_(1),children:e.jsx(T,{name:"ArrowRight","aria-hidden":"true"})})}),e.jsx(U,{children:"Go forward"})]}),e.jsxs(B,{children:[e.jsx(L,{asChild:!0,children:e.jsx("button",{type:"button",className:"flex aspect-square h-full w-full items-center justify-center p-1 transition disabled:opacity-40",onClick:()=>{J(b),p(g+1),O({history:[b.pathname],index:0})},children:e.jsx(T,{name:"Refresh","aria-hidden":"true"})})}),e.jsx(U,{children:"Refresh"})]})]}),e.jsxs(ge,{method:"get",replace:!0,className:"flex flex-1 gap-2",onSubmit:()=>X(),children:[Z,e.jsxs("div",{className:"flex flex-1 items-center border-x bg-background p-3 leading-none text-foreground",children:[e.jsx("a",{href:b.toString(),target:"_blank",rel:"noreferrer",children:$.host}),e.jsx("input",{"aria-label":"pathname",className:"w-full flex-1 bg-background focus-visible:outline-none",value:V,name:"pathname",onChange:s=>q(s.currentTarget.value)})]})]}),e.jsx(je,{name:i}),e.jsxs(B,{children:[e.jsx(L,{asChild:!0,children:e.jsx("a",{href:b.toString(),target:"_blank",rel:"noreferrer",className:me("flex aspect-square items-center justify-center px-3.5"),children:e.jsx(T,{name:"ExternalLink"})})}),e.jsx(U,{children:"Open in new tab"})]})]}),e.jsx("div",{className:"flex h-full w-full flex-grow dark:bg-white",children:e.jsx("iframe",{title:i,ref:z,src:$.toString(),className:"h-full w-full flex-grow bg-white",style:{colorScheme:d}},ce)})]})})}function ze({id:a,appInfo:t,inBrowserBrowserRef:i}){const l=oe(),c=G();if(!t)return e.jsx("p",{children:"No app here. Sorry."});const{isRunning:d,dev:o,name:x,portIsAvailable:y,title:g}=t;if(ENV.EPICSHOP_DEPLOYED&&t.stackBlitzUrl){const p=new URL(t.stackBlitzUrl);return p.searchParams.set("embed","1"),p.searchParams.set("theme",c),e.jsx(Te,{title:g,url:p.toString(),loadingContent:e.jsx(ie,{children:e.jsxs("span",{children:["Loading"," ",e.jsxs("a",{className:"underline",href:t.stackBlitzUrl,children:['"',g,'"']})]})})})}if(o.type==="script"){const p=se({domain:l.domain,port:o.portNumber});return e.jsx(Pe,{ref:i,isRunning:d,id:a??x,name:x,portIsAvailable:y,port:o.portNumber,baseUrl:p,initialRoute:o.initialRoute})}else return o.type==="browser"?e.jsxs("div",{className:"relative h-full flex-grow overflow-y-auto scrollbar-thin scrollbar-thumb-scrollbar",children:[e.jsxs("a",{href:o.pathname,target:"_blank",rel:"noreferrer",className:ne("absolute bottom-5 right-5 flex items-center justify-center rounded-full bg-gray-100 p-2.5 transition hover:bg-gray-200 dark:bg-gray-800 hover:dark:bg-gray-600"),children:[e.jsx(T,{name:"ExternalLink","aria-hidden":"true"}),e.jsx("span",{className:"sr-only",children:"Open in New Window"})]}),e.jsx("iframe",{title:g,src:o.pathname,className:"yo yo h-full w-full flex-grow bg-white",style:{colorScheme:c}})]}):e.jsx("div",{className:"flex h-full items-center justify-center text-lg",children:e.jsxs("p",{children:["Preview for dev type of ",e.jsx("code",{children:o.type})," not supported."]})})}function Te({url:a,title:t,loadingContent:i}){const l=G(),[c,d]=n.useState(!1);return e.jsxs("div",{className:"h-full w-full flex-grow",children:[c?null:e.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:i}),e.jsx("iframe",{onLoad:()=>d(!0),onError:()=>d(!0),src:a,className:ne("h-full w-full flex-grow transition-opacity duration-300",c?"opacity-100":"opacity-0"),title:t,sandbox:"allow-forms allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox",style:{colorScheme:l}})]})}export{ze as P};
2
- //# sourceMappingURL=preview-CqZGJtsE.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"preview-CqZGJtsE.js","sources":["../../../app/routes/start.tsx","../../../app/components/in-browser-browser.tsx","../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/__shared/preview.tsx"],"sourcesContent":["import { invariant, invariantResponse } from '@epic-web/invariant'\nimport { getAppByName } from '@epic-web/workshop-utils/apps.server'\nimport {\n\tcloseProcess,\n\trunAppDev,\n\tstopPort,\n\twaitOnApp,\n} from '@epic-web/workshop-utils/process-manager.server'\nimport { unstable_data as data, type ActionFunctionArgs } from '@remix-run/node'\nimport { useFetcher } from '@remix-run/react'\nimport { Button } from '#app/components/button.tsx'\nimport { Loading } from '#app/components/loading.tsx'\nimport { showProgressBarField } from '#app/components/progress-bar.tsx'\nimport { ensureUndeployed, useAltDown } from '#app/utils/misc.tsx'\nimport { dataWithPE, usePERedirectInput } from '#app/utils/pe.js'\nimport { createToastHeaders } from '#app/utils/toast.server'\n\nexport async function action({ request }: ActionFunctionArgs) {\n\tensureUndeployed()\n\tconst formData = await request.formData()\n\tconst intent = formData.get('intent')\n\tinvariantResponse(typeof intent === 'string', 'intent is required')\n\n\tif (intent === 'start' || intent === 'stop' || intent === 'restart') {\n\t\tconst name = formData.get('name')\n\t\tinvariantResponse(typeof name === 'string', 'name is required')\n\t\tconst app = await getAppByName(name)\n\t\tif (!app) {\n\t\t\tthrow new Response('Not found', { status: 404 })\n\t\t}\n\t\tif (app.dev.type !== 'script') {\n\t\t\tthrow new Response(`App \"${name}\" does not have a server`, {\n\t\t\t\tstatus: 400,\n\t\t\t})\n\t\t}\n\n\t\tasync function startApp() {\n\t\t\tinvariant(app, 'app must be defined')\n\t\t\tconst result = await runAppDev(app)\n\t\t\tif (result.running) {\n\t\t\t\tconst appRunningResult = await waitOnApp(app)\n\t\t\t\tif (appRunningResult?.status === 'success') {\n\t\t\t\t\t// wait another 200ms just in case the build output for assets isn't finished\n\t\t\t\t\tawait new Promise((resolve) => setTimeout(resolve, 200))\n\t\t\t\t\treturn dataWithPE(formData, { status: 'app-started' } as const)\n\t\t\t\t} else if (app.dev.type === 'script') {\n\t\t\t\t\tconst errorMessage = appRunningResult\n\t\t\t\t\t\t? appRunningResult.error\n\t\t\t\t\t\t: 'Unknown error'\n\t\t\t\t\treturn data(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstatus: 'app-not-started',\n\t\t\t\t\t\t\terror: errorMessage,\n\t\t\t\t\t\t\tport: app.dev.portNumber,\n\t\t\t\t\t\t} as const,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstatus: 500,\n\t\t\t\t\t\t\tstatusText: 'App did not start',\n\t\t\t\t\t\t\theaders: await createToastHeaders({\n\t\t\t\t\t\t\t\tdescription: errorMessage,\n\t\t\t\t\t\t\t\ttitle: 'App did not start',\n\t\t\t\t\t\t\t\ttype: 'error',\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} else if (result.portNumber) {\n\t\t\t\treturn dataWithPE(formData, {\n\t\t\t\t\tstatus: 'app-not-started',\n\t\t\t\t\terror: result.status,\n\t\t\t\t\tport: result.portNumber,\n\t\t\t\t} as const)\n\t\t\t} else {\n\t\t\t\tthrow new Response(\n\t\t\t\t\t'Tried starting a server for an app that does not have one',\n\t\t\t\t\t{ status: 400 },\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\tasync function stopApp() {\n\t\t\tinvariant(app, 'app must be defined')\n\t\t\tawait closeProcess(app.name)\n\t\t\treturn dataWithPE(formData, { status: 'app-stopped' } as const)\n\t\t}\n\n\t\tswitch (intent) {\n\t\t\tcase 'start': {\n\t\t\t\treturn startApp()\n\t\t\t}\n\t\t\tcase 'stop': {\n\t\t\t\treturn stopApp()\n\t\t\t}\n\t\t\tcase 'restart': {\n\t\t\t\tawait stopApp()\n\t\t\t\treturn startApp()\n\t\t\t}\n\t\t}\n\t}\n\n\tif (intent === 'stop-port') {\n\t\tconst port = formData.get('port')\n\t\tinvariantResponse(typeof port === 'string', 'port is required')\n\t\tawait stopPort(port)\n\t\treturn dataWithPE(formData, { status: 'port-stopped' } as const)\n\t}\n\tthrow new Error(`Unknown intent: ${intent}`)\n}\n\nexport function AppStopper({ name }: { name: string }) {\n\tconst fetcher = useFetcher<typeof action>()\n\tconst peRedirectInput = usePERedirectInput()\n\tconst inFlightIntent = fetcher.formData?.get('intent')\n\tconst inFlightState =\n\t\tinFlightIntent === 'stop'\n\t\t\t? 'Stopping App'\n\t\t\t: inFlightIntent === 'restart'\n\t\t\t\t? 'Restarting App'\n\t\t\t\t: null\n\tconst altDown = useAltDown()\n\treturn (\n\t\t<fetcher.Form method=\"POST\" action=\"/start\">\n\t\t\t{peRedirectInput}\n\t\t\t{showProgressBarField}\n\t\t\t<input type=\"hidden\" name=\"name\" value={name} />\n\t\t\t<button\n\t\t\t\ttype=\"submit\"\n\t\t\t\tname=\"intent\"\n\t\t\t\tvalue={altDown ? 'restart' : 'stop'}\n\t\t\t\tclassName=\"h-full border-r px-3 py-4 font-mono text-xs uppercase leading-none\"\n\t\t\t>\n\t\t\t\t{inFlightState ? inFlightState : altDown ? 'Restart App' : 'Stop App'}\n\t\t\t</button>\n\t\t</fetcher.Form>\n\t)\n}\n\nexport function PortStopper({ port }: { port: number | string }) {\n\tconst fetcher = useFetcher<typeof action>()\n\tconst peRedirectInput = usePERedirectInput()\n\treturn (\n\t\t<fetcher.Form method=\"POST\" action=\"/start\">\n\t\t\t{peRedirectInput}\n\t\t\t{showProgressBarField}\n\t\t\t<input type=\"hidden\" name=\"port\" value={port} />\n\t\t\t<Button varient=\"mono\" type=\"submit\" name=\"intent\" value=\"stop-port\">\n\t\t\t\t{fetcher.state === 'idle' ? 'Stop Port' : 'Stopping Port'}\n\t\t\t</Button>\n\t\t</fetcher.Form>\n\t)\n}\n\nexport function AppStarter({ name }: { name: string }) {\n\tconst fetcher = useFetcher<typeof action>()\n\tconst peRedirectInput = usePERedirectInput()\n\tif (fetcher.data?.status === 'app-not-started') {\n\t\tif (fetcher.data.error === 'port-unavailable') {\n\t\t\treturn (\n\t\t\t\t<div>\n\t\t\t\t\tThe port is unavailable. Would you like to stop whatever is running on\n\t\t\t\t\tthat port and try again?\n\t\t\t\t\t<PortStopper port={fetcher.data.port} />\n\t\t\t\t</div>\n\t\t\t)\n\t\t} else {\n\t\t\treturn <div>An unknown error has happened.</div>\n\t\t}\n\t}\n\treturn (\n\t\t<fetcher.Form method=\"POST\" action=\"/start\">\n\t\t\t{peRedirectInput}\n\t\t\t{showProgressBarField}\n\t\t\t<input type=\"hidden\" name=\"name\" value={name} />\n\t\t\t{fetcher.state === 'idle' ? (\n\t\t\t\t<Button type=\"submit\" name=\"intent\" value=\"start\" varient=\"mono\">\n\t\t\t\t\tStart App\n\t\t\t\t</Button>\n\t\t\t) : (\n\t\t\t\t<div>\n\t\t\t\t\t<Loading>Starting App</Loading>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</fetcher.Form>\n\t)\n}\n","import { Form, useSearchParams, type NavigateFunction } from '@remix-run/react'\nimport { clsx } from 'clsx'\nimport {\n\tforwardRef,\n\tuseEffect,\n\tuseImperativeHandle,\n\tuseRef,\n\tuseState,\n\ttype ForwardedRef,\n} from 'react'\nimport { z } from 'zod'\nimport { Icon } from '#app/components/icons.tsx'\nimport { AppStarter, AppStopper, PortStopper } from '#app/routes/start.tsx'\nimport { useTheme } from '#app/routes/theme/index.tsx'\nimport { getBaseUrl } from '#app/utils/misc.tsx'\nimport { useRequestInfo } from '#app/utils/request-info.ts'\nimport { LinkButton } from './button.tsx'\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from './ui/tooltip.tsx'\n\nconst historyCallDataSchema = z.intersection(\n\tz.object({\n\t\ttype: z.literal('epicshop:history-call'),\n\t}),\n\tz.union([\n\t\tz.object({\n\t\t\tmethod: z.literal('pushState'),\n\t\t\targs: z.union([\n\t\t\t\tz.tuple([z.object({}).passthrough(), z.unknown()]),\n\t\t\t\tz.tuple([z.object({}).passthrough(), z.unknown(), z.string()]),\n\t\t\t]),\n\t\t}),\n\t\tz.object({\n\t\t\tmethod: z.literal('replaceState'),\n\t\t\targs: z.union([\n\t\t\t\tz.tuple([z.object({}).passthrough(), z.unknown()]),\n\t\t\t\tz.tuple([z.object({}).passthrough(), z.unknown(), z.string()]),\n\t\t\t]),\n\t\t}),\n\t\tz.object({\n\t\t\tmethod: z.literal('go'),\n\t\t\targs: z.tuple([z.number().optional()]),\n\t\t}),\n\t\tz.object({ method: z.literal('forward'), args: z.tuple([]) }),\n\t\tz.object({ method: z.literal('back'), args: z.tuple([]) }),\n\t\tz.object({\n\t\t\tmethod: z.literal('popstate'),\n\t\t\tpathname: z.string(),\n\t\t\tdelta: z.number(),\n\t\t}),\n\t]),\n)\n\nconst loadedSchema = z.object({\n\ttype: z.literal('epicshop:loaded'),\n\turl: z.string(),\n})\n\nconst messageSchema = z.union([historyCallDataSchema, loadedSchema])\n\nfunction getNewIndex(prevIndex: number, delta: number, max: number) {\n\t// keep the index bound between 0 and the history length\n\treturn Math.min(Math.max(prevIndex + delta, 0), max)\n}\n\ntype Props = {\n\tid: string\n\tname: string\n\tport: number\n\tportIsAvailable: boolean | null\n\tisRunning: boolean\n\tbaseUrl: string\n\tinitialRoute: string\n}\n\nexport type InBrowserBrowserRef = {\n\thandleExtrnalNavigation: (pathname?: string) => void\n}\n\nexport const InBrowserBrowser = forwardRef<InBrowserBrowserRef, Props>(\n\tInBrowserBrowserImpl,\n)\n\nfunction InBrowserBrowserImpl(\n\t{ name, port, portIsAvailable, isRunning, baseUrl, id, initialRoute }: Props,\n\tref: ForwardedRef<InBrowserBrowserRef>,\n) {\n\tconst requestInfo = useRequestInfo()\n\tconst [showUnmanaged, setShowUnmanaged] = useState(false)\n\tif (isRunning || showUnmanaged) {\n\t\treturn (\n\t\t\t<InBrowserBrowserForRealz\n\t\t\t\tbaseUrl={baseUrl}\n\t\t\t\tid={id}\n\t\t\t\tname={name}\n\t\t\t\tref={ref}\n\t\t\t\tinitialRoute={initialRoute}\n\t\t\t/>\n\t\t)\n\t} else if (portIsAvailable === false) {\n\t\treturn (\n\t\t\t<div className=\"flex flex-col items-center justify-center\">\n\t\t\t\t<p className=\"max-w-xs pb-5 text-center\" role=\"status\">\n\t\t\t\t\t{`The port for this app is unavailable. It could be that you're running it `}\n\t\t\t\t\t<a\n\t\t\t\t\t\thref={getBaseUrl({ domain: requestInfo.domain, port })}\n\t\t\t\t\t\tclassName=\"underline\"\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\t>\n\t\t\t\t\t\telsewhere\n\t\t\t\t\t</a>\n\t\t\t\t\t{'. '}\n\t\t\t\t\t<LinkButton onClick={() => setShowUnmanaged(true)}>\n\t\t\t\t\t\tShow here anyway\n\t\t\t\t\t</LinkButton>\n\t\t\t\t</p>\n\t\t\t\t<PortStopper port={port} />\n\t\t\t</div>\n\t\t)\n\t} else {\n\t\treturn <AppStarter name={name} />\n\t}\n}\ntype RealBrowserProps = {\n\tbaseUrl: string\n\tid: string\n\tname: string\n\tinitialRoute: string\n}\n\nconst InBrowserBrowserForRealz = forwardRef<\n\tInBrowserBrowserRef,\n\tRealBrowserProps\n>(InBrowserBrowserForRealzImpl)\n\n// we're doing this to ensure all of this complex stuff doesn't happen unless\n// the iframe is actually rendered.\nfunction InBrowserBrowserForRealzImpl(\n\t{ baseUrl, id, name, initialRoute }: RealBrowserProps,\n\tref: ForwardedRef<InBrowserBrowserRef>,\n) {\n\tconst theme = useTheme()\n\tconst [searchParams, setSearchParams] = useSearchParams()\n\tconst searchParamsPathname = searchParams.get('pathname') ?? initialRoute\n\tconst [iframeKeyNumber, setIframeKeyNumber] = useState(0)\n\tconst iframeKey = id + iframeKeyNumber\n\tconst lastDirectionRef = useRef<'forward' | 'back' | 'new'>('new')\n\tconst lastDirectionTimeout = useRef<ReturnType<typeof setTimeout> | null>(\n\t\tnull,\n\t)\n\tconst [iframeContext, setIFrameContext] = useState({\n\t\thistory: [searchParamsPathname],\n\t\tindex: 0,\n\t})\n\tconst [pathnameInputValue, setPathnameInputValue] =\n\t\tuseState(searchParamsPathname)\n\tconst iframeRef = useRef<HTMLIFrameElement>(null)\n\n\tconst appUrl = new URL(searchParamsPathname, baseUrl)\n\tconst currentAppUrl = useRef(appUrl)\n\tuseEffect(() => {\n\t\tcurrentAppUrl.current = appUrl\n\t})\n\n\t/** changing the iframeSrcUrl will trigger a reload of the iframe */\n\tconst [iframeSrcUrl, setIframeSrcUrl] = useState(appUrl)\n\n\tconst currentId = useRef(id)\n\t// if the id changes, then we're going to reload the iframe, but we want to\n\t// make sure to preserve the pathname so we set the src to the current pathname\n\t// this is one of the few side-effects in render that are \"ok\"\n\tif (currentId.current !== id) {\n\t\tcurrentId.current = id\n\t\tsetIframeSrcUrl(currentAppUrl.current)\n\t}\n\tuseEffect(() => {\n\t\tcurrentId.current = id\n\t})\n\n\tuseEffect(() => {\n\t\tfunction handleMessage(messageEvent: MessageEvent) {\n\t\t\tif (messageEvent.source !== iframeRef.current?.contentWindow) return\n\n\t\t\tconst result = messageSchema.safeParse(messageEvent.data, {\n\t\t\t\tpath: ['messageEvent', 'data'],\n\t\t\t})\n\t\t\tif (!result.success) return\n\t\t\tconst { data } = result\n\n\t\t\tif (data.type === 'epicshop:loaded') {\n\t\t\t\tsetIFrameContext((prevContext) => {\n\t\t\t\t\tconst newIndex = (i: number) =>\n\t\t\t\t\t\tgetNewIndex(prevContext.index, i, prevContext.history.length - 1)\n\t\t\t\t\tif (lastDirectionRef.current === 'back') {\n\t\t\t\t\t\treturn { ...prevContext, index: newIndex(-1) }\n\t\t\t\t\t} else if (lastDirectionRef.current === 'forward') {\n\t\t\t\t\t\treturn { ...prevContext, index: newIndex(1) }\n\t\t\t\t\t} else if (lastDirectionRef.current === 'new') {\n\t\t\t\t\t\tconst currentFullPath = prevContext.history[prevContext.index]\n\t\t\t\t\t\tconst newUrl = new URL(data.url)\n\t\t\t\t\t\tconst newFullPath = newUrl.pathname + newUrl.search\n\n\t\t\t\t\t\tif (currentFullPath === newFullPath) return prevContext\n\n\t\t\t\t\t\tconst newHistory = [\n\t\t\t\t\t\t\t...prevContext.history.slice(0, prevContext.index + 1),\n\t\t\t\t\t\t\tnewFullPath,\n\t\t\t\t\t\t]\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\thistory: newHistory,\n\t\t\t\t\t\t\tindex: newHistory.length - 1,\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error('Unexpected lastDirectionRef value')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst { method } = data\n\t\t\tsetIFrameContext((prevContext) => {\n\t\t\t\tconst newIndex = (i: number) =>\n\t\t\t\t\tgetNewIndex(prevContext.index, i, prevContext.history.length - 1)\n\t\t\t\tconst currentPathname = prevContext.history[prevContext.index]\n\t\t\t\tswitch (method) {\n\t\t\t\t\tcase 'popstate': {\n\t\t\t\t\t\treturn { ...prevContext, index: newIndex(data.delta) }\n\t\t\t\t\t}\n\t\t\t\t\tcase 'forward': {\n\t\t\t\t\t\treturn { ...prevContext, index: newIndex(1) }\n\t\t\t\t\t}\n\t\t\t\t\tcase 'back': {\n\t\t\t\t\t\treturn { ...prevContext, index: newIndex(-1) }\n\t\t\t\t\t}\n\t\t\t\t\tcase 'pushState': {\n\t\t\t\t\t\tconst pathname = data.args[2] ?? currentPathname\n\t\t\t\t\t\tconst newHistory = [\n\t\t\t\t\t\t\t...prevContext.history.slice(0, prevContext.index + 1),\n\t\t\t\t\t\t\tpathname,\n\t\t\t\t\t\t].filter(Boolean)\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...prevContext,\n\t\t\t\t\t\t\thistory: newHistory,\n\t\t\t\t\t\t\tindex: newHistory.length - 1,\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcase 'replaceState': {\n\t\t\t\t\t\tconst pathname = data.args[2] ?? currentPathname\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...prevContext,\n\t\t\t\t\t\t\thistory: [\n\t\t\t\t\t\t\t\t...prevContext.history.slice(0, prevContext.index),\n\t\t\t\t\t\t\t\tpathname,\n\t\t\t\t\t\t\t\t...prevContext.history.slice(prevContext.index + 1),\n\t\t\t\t\t\t\t].filter(Boolean),\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcase 'go': {\n\t\t\t\t\t\tconst [delta = 0] = data.args\n\t\t\t\t\t\treturn { ...prevContext, index: newIndex(delta) }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\twindow.addEventListener('message', handleMessage)\n\t\treturn () => {\n\t\t\twindow.removeEventListener('message', handleMessage)\n\t\t}\n\t}, [])\n\n\t// setSearchParams is unstable\n\t// https://github.com/remix-run/react-router/issues/9991\n\tconst setSearchParamsLatestRef = useRef(setSearchParams)\n\tuseEffect(() => {\n\t\tsetSearchParamsLatestRef.current = setSearchParams\n\t}, [setSearchParams])\n\n\tconst iframePathname = iframeContext.history[iframeContext.index]\n\tuseEffect(() => {\n\t\tif (!iframePathname) return\n\n\t\tsetPathnameInputValue(iframePathname)\n\n\t\tconst newSearchParams = new URLSearchParams(window.location.search)\n\t\tif (iframePathname === '/') {\n\t\t\tnewSearchParams.delete('pathname')\n\t\t} else {\n\t\t\tnewSearchParams.set('pathname', iframePathname)\n\t\t}\n\t\tconst newSearch = newSearchParams.toString()\n\t\tif (`?${newSearch}` !== window.location.search) {\n\t\t\tsetSearchParamsLatestRef.current(newSearchParams, { replace: true })\n\t\t}\n\t}, [iframePathname])\n\n\tconst navigateChild: NavigateFunction = (...params) => {\n\t\tconst to = params[0]\n\t\tif (typeof to === 'number') {\n\t\t\t// this part feels very brittle to me...\n\t\t\tlastDirectionRef.current = to > 0 ? 'forward' : 'back'\n\t\t} else {\n\t\t\tlastDirectionRef.current = 'new'\n\t\t}\n\t\tif (lastDirectionTimeout.current) {\n\t\t\tclearTimeout(lastDirectionTimeout.current)\n\t\t}\n\t\tlastDirectionTimeout.current = setTimeout(() => {\n\t\t\tlastDirectionRef.current = 'new'\n\t\t}, 100)\n\t\tiframeRef.current?.contentWindow?.postMessage(\n\t\t\t{ type: 'epicshop:navigate-call', params },\n\t\t\t'*',\n\t\t)\n\t}\n\n\tfunction handleExtrnalNavigation(\n\t\tnewPathnameInputValue: string = pathnameInputValue,\n\t) {\n\t\tsetPathnameInputValue(newPathnameInputValue)\n\n\t\tconst currentPathname = iframeContext.history[iframeContext.index]\n\t\tnavigateChild(newPathnameInputValue, {\n\t\t\treplace: currentPathname === newPathnameInputValue,\n\t\t})\n\t}\n\n\tuseImperativeHandle(ref, () => ({ handleExtrnalNavigation }))\n\n\tconst atEndOfHistory =\n\t\tiframeContext.index === iframeContext.history.length - 1\n\tconst atStartOfHistory = iframeContext.index <= 0\n\tconst existingSearchParamHiddenInputs: Array<React.ReactElement> = []\n\tfor (const [key, value] of searchParams.entries()) {\n\t\tif (key === 'pathname') continue\n\n\t\texistingSearchParamHiddenInputs.push(\n\t\t\t<input key={key} type=\"hidden\" name={key} value={value} />,\n\t\t)\n\t}\n\n\treturn (\n\t\t<TooltipProvider>\n\t\t\t<div className=\"flex h-full flex-grow flex-col\">\n\t\t\t\t<div className=\"flex items-center justify-between border-b pl-1.5\">\n\t\t\t\t\t<div className=\"mr-2 flex items-center justify-center gap-2 px-1\">\n\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tclassName=\"hidden aspect-square h-full w-full items-center justify-center p-1 transition disabled:opacity-40 sm:flex\"\n\t\t\t\t\t\t\t\t\tdisabled={atStartOfHistory}\n\t\t\t\t\t\t\t\t\tonClick={() => navigateChild(-1)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon name=\"ArrowLeft\" aria-hidden=\"true\" />\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t<TooltipContent>Go back</TooltipContent>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tclassName=\"hidden aspect-square h-full w-full items-center justify-center p-1 transition disabled:opacity-40 sm:flex\"\n\t\t\t\t\t\t\t\t\tdisabled={atEndOfHistory}\n\t\t\t\t\t\t\t\t\tonClick={() => navigateChild(1)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon name=\"ArrowRight\" aria-hidden=\"true\" />\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t<TooltipContent>Go forward</TooltipContent>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tclassName=\"flex aspect-square h-full w-full items-center justify-center p-1 transition disabled:opacity-40\"\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\tsetIframeSrcUrl(appUrl)\n\t\t\t\t\t\t\t\t\t\tsetIframeKeyNumber(iframeKeyNumber + 1)\n\t\t\t\t\t\t\t\t\t\t// TODO: figure out how we can avoid having to do this...\n\t\t\t\t\t\t\t\t\t\t// I stayed up for hours one night trying and couldn't work out\n\t\t\t\t\t\t\t\t\t\t// why react router wouldn't update the UI when using back/forward\n\t\t\t\t\t\t\t\t\t\t// after a refresh.\n\t\t\t\t\t\t\t\t\t\tsetIFrameContext({\n\t\t\t\t\t\t\t\t\t\t\thistory: [appUrl.pathname],\n\t\t\t\t\t\t\t\t\t\t\tindex: 0,\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon name=\"Refresh\" aria-hidden=\"true\" />\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t<TooltipContent>Refresh</TooltipContent>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t</div>\n\t\t\t\t\t<Form\n\t\t\t\t\t\tmethod=\"get\"\n\t\t\t\t\t\treplace\n\t\t\t\t\t\tclassName=\"flex flex-1 gap-2\"\n\t\t\t\t\t\tonSubmit={() => handleExtrnalNavigation()}\n\t\t\t\t\t>\n\t\t\t\t\t\t{existingSearchParamHiddenInputs}\n\t\t\t\t\t\t<div className=\"flex flex-1 items-center border-x bg-background p-3 leading-none text-foreground\">\n\t\t\t\t\t\t\t<a href={appUrl.toString()} target=\"_blank\" rel=\"noreferrer\">\n\t\t\t\t\t\t\t\t{iframeSrcUrl.host}\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\taria-label=\"pathname\"\n\t\t\t\t\t\t\t\tclassName=\"w-full flex-1 bg-background focus-visible:outline-none\"\n\t\t\t\t\t\t\t\tvalue={pathnameInputValue}\n\t\t\t\t\t\t\t\tname=\"pathname\"\n\t\t\t\t\t\t\t\tonChange={(e) => setPathnameInputValue(e.currentTarget.value)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{/* TODO: Reconsider if this is needed as browsers don't usually have a submit button in address bar */}\n\t\t\t\t\t\t{/* <button type=\"submit\">Go</button> */}\n\t\t\t\t\t</Form>\n\t\t\t\t\t<AppStopper name={name} />\n\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\thref={appUrl.toString()}\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\t\t\t\tclassName={clsx(\n\t\t\t\t\t\t\t\t\t'flex aspect-square items-center justify-center px-3.5',\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Icon name=\"ExternalLink\" />\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t<TooltipContent>Open in new tab</TooltipContent>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"flex h-full w-full flex-grow dark:bg-white\">\n\t\t\t\t\t<iframe\n\t\t\t\t\t\ttitle={name}\n\t\t\t\t\t\tkey={iframeKey}\n\t\t\t\t\t\tref={iframeRef}\n\t\t\t\t\t\tsrc={iframeSrcUrl.toString()}\n\t\t\t\t\t\tclassName=\"h-full w-full flex-grow bg-white\"\n\t\t\t\t\t\tstyle={{ colorScheme: theme }}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</TooltipProvider>\n\t)\n}\n","import { type BaseExerciseStepApp } from '@epic-web/workshop-utils/apps.server'\nimport { useState } from 'react'\nimport { Icon } from '#app/components/icons'\nimport {\n\tInBrowserBrowser,\n\ttype InBrowserBrowserRef,\n} from '#app/components/in-browser-browser'\nimport { Loading } from '#app/components/loading.js'\nimport { useTheme } from '#app/routes/theme/index.js'\nimport { cn, getBaseUrl } from '#app/utils/misc'\nimport { useRequestInfo } from '#app/utils/request-info'\n\nexport function Preview({\n\tid,\n\tappInfo,\n\tinBrowserBrowserRef,\n}: {\n\tid?: string\n\tappInfo: {\n\t\tisRunning: boolean\n\t\tappName?: string\n\t\tname: string\n\t\ttitle: string\n\t\tportIsAvailable: boolean | null\n\t\ttype: string\n\t\tfullPath: string\n\t\tdev: BaseExerciseStepApp['dev']\n\t\ttest: BaseExerciseStepApp['test']\n\t\tstackBlitzUrl: BaseExerciseStepApp['stackBlitzUrl']\n\t} | null\n\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n}) {\n\tconst requestInfo = useRequestInfo()\n\tconst theme = useTheme()\n\tif (!appInfo) return <p>No app here. Sorry.</p>\n\tconst { isRunning, dev, name, portIsAvailable, title } = appInfo\n\n\tif (ENV.EPICSHOP_DEPLOYED && appInfo.stackBlitzUrl) {\n\t\tconst url = new URL(appInfo.stackBlitzUrl)\n\t\turl.searchParams.set('embed', '1')\n\t\turl.searchParams.set('theme', theme)\n\n\t\treturn (\n\t\t\t<StackBlitzEmbed\n\t\t\t\ttitle={title}\n\t\t\t\turl={url.toString()}\n\t\t\t\tloadingContent={\n\t\t\t\t\t<Loading>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\tLoading{' '}\n\t\t\t\t\t\t\t<a className=\"underline\" href={appInfo.stackBlitzUrl}>\n\t\t\t\t\t\t\t\t\"{title}\"\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Loading>\n\t\t\t\t}\n\t\t\t/>\n\t\t)\n\t}\n\n\tif (dev.type === 'script') {\n\t\tconst baseUrl = getBaseUrl({\n\t\t\tdomain: requestInfo.domain,\n\t\t\tport: dev.portNumber,\n\t\t})\n\t\treturn (\n\t\t\t<InBrowserBrowser\n\t\t\t\tref={inBrowserBrowserRef}\n\t\t\t\tisRunning={isRunning}\n\t\t\t\tid={id ?? name}\n\t\t\t\tname={name}\n\t\t\t\tportIsAvailable={portIsAvailable}\n\t\t\t\tport={dev.portNumber}\n\t\t\t\tbaseUrl={baseUrl}\n\t\t\t\tinitialRoute={dev.initialRoute}\n\t\t\t/>\n\t\t)\n\t} else if (dev.type === 'browser') {\n\t\treturn (\n\t\t\t<div className=\"relative h-full flex-grow overflow-y-auto scrollbar-thin scrollbar-thumb-scrollbar\">\n\t\t\t\t<a\n\t\t\t\t\thref={dev.pathname}\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'absolute bottom-5 right-5 flex items-center justify-center rounded-full bg-gray-100 p-2.5 transition hover:bg-gray-200 dark:bg-gray-800 hover:dark:bg-gray-600',\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<Icon name=\"ExternalLink\" aria-hidden=\"true\" />\n\t\t\t\t\t<span className=\"sr-only\">Open in New Window</span>\n\t\t\t\t</a>\n\t\t\t\t<iframe\n\t\t\t\t\ttitle={title}\n\t\t\t\t\tsrc={dev.pathname}\n\t\t\t\t\tclassName=\"yo yo h-full w-full flex-grow bg-white\"\n\t\t\t\t\tstyle={{ colorScheme: theme }}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t)\n\t} else {\n\t\treturn (\n\t\t\t<div className=\"flex h-full items-center justify-center text-lg\">\n\t\t\t\t<p>\n\t\t\t\t\tPreview for dev type of <code>{dev.type}</code> not supported.\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t)\n\t}\n}\n\nexport function StackBlitzEmbed({\n\turl,\n\ttitle,\n\tloadingContent,\n}: {\n\turl: string\n\ttitle?: string\n\tloadingContent: React.ReactNode\n}) {\n\tconst theme = useTheme()\n\tconst [iframeLoaded, setIframeLoaded] = useState(false)\n\n\treturn (\n\t\t<div className=\"h-full w-full flex-grow\">\n\t\t\t{iframeLoaded ? null : (\n\t\t\t\t<div className=\"absolute inset-0 z-10 flex items-center justify-center\">\n\t\t\t\t\t{loadingContent}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t<iframe\n\t\t\t\tonLoad={() => setIframeLoaded(true)}\n\t\t\t\t// show what would have shown if there is an error\n\t\t\t\tonError={() => setIframeLoaded(true)}\n\t\t\t\tsrc={url}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'h-full w-full flex-grow transition-opacity duration-300',\n\t\t\t\t\tiframeLoaded ? 'opacity-100' : 'opacity-0',\n\t\t\t\t)}\n\t\t\t\ttitle={title}\n\t\t\t\tsandbox=\"allow-forms allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox\"\n\t\t\t\tstyle={{ colorScheme: theme }}\n\t\t\t/>\n\t\t</div>\n\t)\n}\n"],"names":["AppStopper","name","fetcher","useFetcher","peRedirectInput","usePERedirectInput","inFlightIntent","formData","get","inFlightState","altDown","useAltDown","Form","method","action","children","showProgressBarField","type","value","jsx","className","PortStopper","port","Button","varient","state","AppStarter","data","status","error","Loading","historyCallDataSchema","z.intersection","z.object","z.literal","z.union","z.tuple","z.unknown","z.string","z.number","loadedSchema","messageSchema","getNewIndex","prevIndex","delta","max","InBrowserBrowser","forwardRef","InBrowserBrowserImpl","portIsAvailable","isRunning","baseUrl","id","initialRoute","ref","requestInfo","useRequestInfo","showUnmanaged","setShowUnmanaged","useState","InBrowserBrowserForRealz","jsxs","getBaseUrl","LinkButton","InBrowserBrowserForRealzImpl","theme","useTheme","searchParams","setSearchParams","useSearchParams","searchParamsPathname","iframeKeyNumber","setIframeKeyNumber","iframeKey","lastDirectionRef","useRef","lastDirectionTimeout","iframeContext","setIFrameContext","pathnameInputValue","setPathnameInputValue","iframeRef","appUrl","currentAppUrl","useEffect","iframeSrcUrl","setIframeSrcUrl","currentId","handleMessage","messageEvent","_a","result","prevContext","newIndex","i","currentFullPath","newUrl","newFullPath","newHistory","currentPathname","pathname","setSearchParamsLatestRef","iframePathname","newSearchParams","navigateChild","params","to","_b","handleExtrnalNavigation","newPathnameInputValue","useImperativeHandle","atEndOfHistory","atStartOfHistory","existingSearchParamHiddenInputs","key","TooltipProvider","Tooltip","TooltipTrigger","Icon","TooltipContent","e","clsx","Preview","appInfo","inBrowserBrowserRef","dev","title","url","StackBlitzEmbed","cn","loadingContent","iframeLoaded","setIframeLoaded"],"mappings":"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"}
@@ -1,2 +0,0 @@
1
- import{j as e}from"./index-Dsusf_Av.js";import{u as g}from"./index-DLC5u33j.js";import{a as r}from"./misc-2sBiisF5.js";import{u as p}from"./workshop-config-DchzGYJM.js";const i={font:"w-[1em] h-[1em]",xs:"w-3 h-3",sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6",xl:"w-7 h-7","2xl":"w-8 h-8"},x={font:"gap-1.5",xs:"gap-1.5",sm:"gap-1.5",md:"gap-2",lg:"gap-2",xl:"gap-3","2xl":"gap-4"};function w({size:s="font",style:c="themed",className:o,children:t,...m}){const{product:{logo:n,displayName:l}}=p(),h=g(),a=n.includes(".svg")?e.jsxs("svg",{...m,className:r(i[s],"inline self-center",o),children:[e.jsx("title",{children:l}),e.jsx("use",{href:`${n}#${c==="themed"?h:"monochrome"}`})]}):e.jsx("img",{src:n,alt:l,...m,className:r(i[s],"inline self-center",o)});return t?e.jsxs("span",{className:`inline-flex items-center ${x[s]}`,children:[a,t]}):a}export{w as L};
2
- //# sourceMappingURL=product-DJOWNuL-.js.map
@@ -1,2 +0,0 @@
1
- import{r as b,j as K,u as Vs,c as ir}from"./index-Dsusf_Av.js";import{c as hn}from"./misc-2sBiisF5.js";import{u as rr}from"./pe-BShc2dvc.js";import{a as or,b as ar,c as lr}from"./components-5arJTWsS.js";const Cs=b.createContext({});function ur(t){const e=b.useRef(null);return e.current===null&&(e.current=t()),e.current}const Me=b.createContext(null),Ds=b.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function cr(t=!0){const e=b.useContext(Me);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=b.useId();b.useEffect(()=>{t&&i(o)},[t]);const r=b.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const Re=typeof window<"u",hr=Re?b.useLayoutEffect:b.useEffect,j=t=>t;let Ms=j;function Ee(t){let e;return()=>(e===void 0&&(e=t()),e)}const ht=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},z=t=>t*1e3,H=t=>t/1e3,fr={useManualTiming:!1};function dr(t){let e=new Set,n=new Set,s=!1,i=!1;const o=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function a(u){o.has(u)&&(l.schedule(u),t()),u(r)}const l={schedule:(u,c=!1,h=!1)=>{const d=h&&s?e:n;return c&&o.add(u),d.has(u)||d.add(u),u},cancel:u=>{n.delete(u),o.delete(u)},process:u=>{if(r=u,s){i=!0;return}s=!0,[e,n]=[n,e],e.forEach(a),e.clear(),s=!1,i&&(i=!1,l.process(u))}};return l}const Ft=["read","resolveKeyframes","update","preRender","render","postRender"],mr=40;function Rs(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Ft.reduce((g,v)=>(g[v]=dr(o),g),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:f}=r,d=()=>{const g=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(g-i.timestamp,mr),1),i.timestamp=g,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(d))},m=()=>{n=!0,s=!0,i.isProcessing||t(d)};return{schedule:Ft.reduce((g,v)=>{const x=r[v];return g[v]=(A,P=!1,w=!1)=>(n||m(),x.schedule(A,P,w)),g},{}),cancel:g=>{for(let v=0;v<Ft.length;v++)r[Ft[v]].cancel(g)},state:i,steps:r}}const{schedule:V,cancel:q,state:E,steps:Qt}=Rs(typeof requestAnimationFrame<"u"?requestAnimationFrame:j,!0),Es=b.createContext({strict:!1}),fn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ft={};for(const t in fn)ft[t]={isEnabled:e=>fn[t].some(n=>!!e[n])};function pr(t){for(const e in t)ft[e]={...ft[e],...t[e]}}const gr=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Nt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||gr.has(t)}let Ls=t=>!Nt(t);function yr(t){t&&(Ls=e=>e.startsWith("on")?!Nt(e):t(e))}try{yr(require("@emotion/is-prop-valid").default)}catch{}function vr(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Ls(i)||n===!0&&Nt(i)||!e&&!Nt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function xr(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...s)=>t(...s);return new Proxy(n,{get:(s,i)=>i==="create"?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}const zt=b.createContext({});function At(t){return typeof t=="string"||Array.isArray(t)}function Ht(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Le=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Fe=["initial",...Le];function Xt(t){return Ht(t.animate)||Fe.some(e=>At(t[e]))}function Fs(t){return!!(Xt(t)||t.variants)}function Tr(t,e){if(Xt(t)){const{initial:n,animate:s}=t;return{initial:n===!1||At(n)?n:void 0,animate:At(s)?s:void 0}}return t.inherit!==!1?e:{}}function Pr(t){const{initial:e,animate:n}=Tr(t,b.useContext(zt));return b.useMemo(()=>({initial:e,animate:n}),[dn(e),dn(n)])}function dn(t){return Array.isArray(t)?t.join(" "):t}const br=Symbol.for("motionComponentSymbol");function ot(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Sr(t,e,n){return b.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):ot(n)&&(n.current=s))},[e])}const ke=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ar="framerAppearId",ks="data-"+ke(Ar),{schedule:Be}=Rs(queueMicrotask,!1),Bs=b.createContext({});function wr(t,e,n,s,i){var o,r;const{visualElement:a}=b.useContext(zt),l=b.useContext(Es),u=b.useContext(Me),c=b.useContext(Ds).reducedMotion,h=b.useRef(null);s=s||l.renderer,!h.current&&s&&(h.current=s(t,{visualState:e,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const f=h.current,d=b.useContext(Bs);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&Vr(h.current,n,i,d);const m=b.useRef(!1);b.useInsertionEffect(()=>{f&&m.current&&f.update(n,u)});const p=n[ks],y=b.useRef(!!p&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,p))&&((r=window.MotionHasOptimisedAnimation)===null||r===void 0?void 0:r.call(window,p)));return hr(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Be.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),b.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var g;(g=window.MotionHandoffMarkAsComplete)===null||g===void 0||g.call(window,p)}),y.current=!1))}),f}function Vr(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:js(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&ot(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,layoutScroll:l,layoutRoot:u})}function js(t){if(t)return t.options.allowProjection!==!1?t.projection:js(t.parent)}function Cr({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){var o,r;t&&pr(t);function a(u,c){let h;const f={...b.useContext(Ds),...u,layoutId:Dr(u)},{isStatic:d}=f,m=Pr(u),p=s(u,d);if(!d&&Re){Mr();const y=Rr(f);h=y.MeasureLayout,m.visualElement=wr(i,p,f,e,y.ProjectionNode)}return K.jsxs(zt.Provider,{value:m,children:[h&&m.visualElement?K.jsx(h,{visualElement:m.visualElement,...f}):null,n(i,u,Sr(p,m.visualElement,c),p,d,m.visualElement)]})}a.displayName=`motion.${typeof i=="string"?i:`create(${(r=(o=i.displayName)!==null&&o!==void 0?o:i.name)!==null&&r!==void 0?r:""})`}`;const l=b.forwardRef(a);return l[br]=i,l}function Dr({layoutId:t}){const e=b.useContext(Cs).id;return e&&t!==void 0?e+"-"+t:t}function Mr(t,e){b.useContext(Es).strict}function Rr(t){const{drag:e,layout:n}=ft;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const Er=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function je(t){return typeof t!="string"||t.includes("-")?!1:!!(Er.indexOf(t)>-1||/[A-Z]/u.test(t))}function mn(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Ie(t,e,n,s){if(typeof e=="function"){const[i,o]=mn(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=mn(s);e=e(n!==void 0?n:t.custom,i,o)}return e}const de=t=>Array.isArray(t),Lr=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Fr=t=>de(t)?t[t.length-1]||0:t,F=t=>!!(t&&t.getVelocity);function jt(t){const e=F(t)?t.get():t;return Lr(e)?e.toValue():e}function kr({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},s,i,o){const r={latestValues:Br(s,i,o,t),renderState:e()};return n&&(r.onMount=a=>n({props:s,current:a,...r}),r.onUpdate=a=>n(a)),r}const Is=t=>(e,n)=>{const s=b.useContext(zt),i=b.useContext(Me),o=()=>kr(t,e,s,i);return n?o():ur(o)};function Br(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=jt(o[f]);let{initial:r,animate:a}=t;const l=Xt(t),u=Fs(t);e&&u&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const h=c?a:r;if(h&&typeof h!="boolean"&&!Ht(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const m=Ie(t,f[d]);if(m){const{transitionEnd:p,transition:y,...g}=m;for(const v in g){let x=g[v];if(Array.isArray(x)){const A=c?x.length-1:0;x=x[A]}x!==null&&(i[v]=x)}for(const v in p)i[v]=p[v]}}}return i}const mt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],it=new Set(mt),Os=t=>e=>typeof e=="string"&&e.startsWith(t),Ns=Os("--"),jr=Os("var(--"),Oe=t=>jr(t)?Ir.test(t.split("/*")[0].trim()):!1,Ir=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Us=(t,e)=>e&&typeof t=="number"?e.transform(t):t,X=(t,e,n)=>n>e?e:n<t?t:n,pt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},wt={...pt,transform:t=>X(0,1,t)},kt={...pt,default:1},Mt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Y=Mt("deg"),W=Mt("%"),T=Mt("px"),Or=Mt("vh"),Nr=Mt("vw"),pn={...W,parse:t=>W.parse(t)/100,transform:t=>W.transform(t*100)},Ur={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,radius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,backgroundPositionX:T,backgroundPositionY:T},_r={rotate:Y,rotateX:Y,rotateY:Y,rotateZ:Y,scale:kt,scaleX:kt,scaleY:kt,scaleZ:kt,skew:Y,skewX:Y,skewY:Y,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:wt,originX:pn,originY:pn,originZ:T},gn={...pt,transform:Math.round},Ne={...Ur,..._r,zIndex:gn,size:T,fillOpacity:wt,strokeOpacity:wt,numOctaves:gn},Kr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Wr=mt.length;function $r(t,e,n){let s="",i=!0;for(let o=0;o<Wr;o++){const r=mt[o],a=t[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=Us(a,Ne[r]);if(!l){i=!1;const c=Kr[r]||r;s+=`${c}(${u}) `}n&&(e[r]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Ue(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const u=e[l];if(it.has(l)){r=!0;continue}else if(Ns(l)){i[l]=u;continue}else{const c=Us(u,Ne[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(e.transform||(r||n?s.transform=$r(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;s.transformOrigin=`${l} ${u} ${c}`}}const Gr={offset:"stroke-dashoffset",array:"stroke-dasharray"},zr={offset:"strokeDashoffset",array:"strokeDasharray"};function Hr(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Gr:zr;t[o.offset]=T.transform(-s);const r=T.transform(e),a=T.transform(n);t[o.array]=`${r} ${a}`}function yn(t,e,n){return typeof t=="string"?t:T.transform(e+n*t)}function Xr(t,e,n){const s=yn(e,t.x,t.width),i=yn(n,t.y,t.height);return`${s} ${i}`}function _e(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Ue(t,u,h),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d,dimensions:m}=t;f.transform&&(m&&(d.transform=f.transform),delete f.transform),m&&(i!==void 0||o!==void 0||d.transform)&&(d.transformOrigin=Xr(m,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),r!==void 0&&Hr(f,r,a,l,!1)}const Ke=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),_s=()=>({...Ke(),attrs:{}}),We=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Ks(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}const Ws=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function $s(t,e,n,s){Ks(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Ws.has(i)?i:ke(i),e.attrs[i])}const Ut={};function Yr(t){Object.assign(Ut,t)}function Gs(t,{layout:e,layoutId:n}){return it.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ut[t]||t==="opacity")}function $e(t,e,n){var s;const{style:i}=t,o={};for(const r in i)(F(i[r])||e.style&&F(e.style[r])||Gs(r,t)||((s=n==null?void 0:n.getValue(r))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(o[r]=i[r]);return o}function zs(t,e,n){const s=$e(t,e,n);for(const i in t)if(F(t[i])||F(e[i])){const o=mt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}function qr(t,e){try{e.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}const vn=["x","y","width","height","cx","cy","r"],Zr={useVisualState:Is({scrapeMotionValuesFromProps:zs,createRenderState:_s,onUpdate:({props:t,prevProps:e,current:n,renderState:s,latestValues:i})=>{if(!n)return;let o=!!t.drag;if(!o){for(const a in i)if(it.has(a)){o=!0;break}}if(!o)return;let r=!e;if(e)for(let a=0;a<vn.length;a++){const l=vn[a];t[l]!==e[l]&&(r=!0)}r&&V.read(()=>{qr(n,s),V.render(()=>{_e(s,i,We(n.tagName),t.transformTemplate),$s(n,s)})})}})},Jr={useVisualState:Is({scrapeMotionValuesFromProps:$e,createRenderState:Ke})};function Hs(t,e,n){for(const s in e)!F(e[s])&&!Gs(s,n)&&(t[s]=e[s])}function Qr({transformTemplate:t},e){return b.useMemo(()=>{const n=Ke();return Ue(n,e,t),Object.assign({},n.vars,n.style)},[e])}function to(t,e){const n=t.style||{},s={};return Hs(s,n,t),Object.assign(s,Qr(t,e)),s}function eo(t,e){const n={},s=to(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}function no(t,e,n,s){const i=b.useMemo(()=>{const o=_s();return _e(o,e,We(s),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Hs(o,t.style,t),i.style={...o,...i.style}}return i}function so(t=!1){return(n,s,i,{latestValues:o},r)=>{const l=(je(n)?no:eo)(s,o,r,n),u=vr(s,typeof n=="string",t),c=n!==b.Fragment?{...u,...l,ref:i}:{},{children:h}=s,f=b.useMemo(()=>F(h)?h.get():h,[h]);return b.createElement(n,{...c,children:f})}}function io(t,e){return function(s,{forwardMotionProps:i}={forwardMotionProps:!1}){const r={...je(s)?Zr:Jr,preloadedFeatures:t,useRender:so(i),createVisualElement:e,Component:s};return Cr(r)}}function Xs(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function Yt(t,e,n){const s=t.getProps();return Ie(s,e,n!==void 0?n:s.custom,t)}const ro=Ee(()=>window.ScrollTimeline!==void 0);class oo{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s<this.animations.length;s++)this.animations[s][e]=n}attachTimeline(e,n){const s=this.animations.map(i=>{if(ro()&&i.attachTimeline)return i.attachTimeline(e);if(typeof n=="function")return n(i)});return()=>{s.forEach((i,o)=>{i&&i(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class ao extends oo{then(e,n){return Promise.all(this.animations).then(e).catch(n)}}function Ge(t,e){return t?t[e]||t.default||t:void 0}const me=2e4;function Ys(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<me;)e+=n,s=t.next(e);return e>=me?1/0:e}function ze(t){return typeof t=="function"}function xn(t,e){t.timeline=e,t.onfinish=null}const He=t=>Array.isArray(t)&&typeof t[0]=="number",lo={linearEasing:void 0};function uo(t,e){const n=Ee(t);return()=>{var s;return(s=lo[e])!==null&&s!==void 0?s:n()}}const _t=uo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),qs=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=t(ht(0,i-1,o))+", ";return`linear(${s.substring(0,s.length-2)})`};function Zs(t){return!!(typeof t=="function"&&_t()||!t||typeof t=="string"&&(t in pe||_t())||He(t)||Array.isArray(t)&&t.every(Zs))}const yt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,pe={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yt([0,.65,.55,1]),circOut:yt([.55,0,1,.45]),backIn:yt([.31,.01,.66,-.59]),backOut:yt([.33,1.53,.69,.99])};function Js(t,e){if(t)return typeof t=="function"&&_t()?qs(t,e):He(t)?yt(t):Array.isArray(t)?t.map(n=>Js(n,e)||pe.easeOut):pe[t]}const _={x:!1,y:!1};function Qs(){return _.x||_.y}function co(t,e,n){var s;if(t instanceof Element)return[t];if(typeof t=="string"){let i=document;const o=(s=void 0)!==null&&s!==void 0?s:i.querySelectorAll(t);return o?Array.from(o):[]}return Array.from(t)}function ti(t,e){const n=co(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Tn(t){return e=>{e.pointerType==="touch"||Qs()||t(e)}}function ho(t,e,n={}){const[s,i,o]=ti(t,n),r=Tn(a=>{const{target:l}=a,u=e(a);if(typeof u!="function"||!l)return;const c=Tn(h=>{u(h),l.removeEventListener("pointerleave",c)});l.addEventListener("pointerleave",c,i)});return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const ei=(t,e)=>e?t===e?!0:ei(t,e.parentElement):!1,Xe=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,fo=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function mo(t){return fo.has(t.tagName)||t.tabIndex!==-1}const vt=new WeakSet;function Pn(t){return e=>{e.key==="Enter"&&t(e)}}function te(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const po=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Pn(()=>{if(vt.has(n))return;te(n,"down");const i=Pn(()=>{te(n,"up")}),o=()=>te(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function bn(t){return Xe(t)&&!Qs()}function go(t,e,n={}){const[s,i,o]=ti(t,n),r=a=>{const l=a.currentTarget;if(!bn(a)||vt.has(l))return;vt.add(l);const u=e(a),c=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),!(!bn(d)||!vt.has(l))&&(vt.delete(l),typeof u=="function"&&u(d,{success:m}))},h=d=>{c(d,n.useGlobalTarget||ei(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{!mo(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),a.addEventListener("focus",u=>po(u,i),i)}),o}function yo(t){return t==="x"||t==="y"?_[t]?null:(_[t]=!0,()=>{_[t]=!1}):_.x||_.y?null:(_.x=_.y=!0,()=>{_.x=_.y=!1})}const ni=new Set(["width","height","top","left","right","bottom",...mt]);let It;function vo(){It=void 0}const $={now:()=>(It===void 0&&$.set(E.isProcessing||fr.useManualTiming?E.timestamp:performance.now()),It),set:t=>{It=t,queueMicrotask(vo)}};function Ye(t,e){t.indexOf(e)===-1&&t.push(e)}function qe(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Ze{constructor(){this.subscriptions=[]}add(e){return Ye(this.subscriptions,e),()=>qe(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function si(t,e){return e?t*(1e3/e):0}const Sn=30,xo=t=>!isNaN(parseFloat(t));class To{constructor(e,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const o=$.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=$.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=xo(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Ze);const s=this.events[e].add(n);return e==="change"?()=>{s(),V.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=$.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Sn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Sn);return si(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Vt(t,e){return new To(t,e)}function Po(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Vt(n))}function bo(t,e){const n=Yt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Fr(o[r]);Po(t,r,a)}}function So(t){return!!(F(t)&&t.add)}function ge(t,e){const n=t.getValue("willChange");if(So(n))return n.add(e)}function ii(t){return t.props[ks]}const ri=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Ao=1e-7,wo=12;function Vo(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=ri(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Ao&&++a<wo);return r}function Rt(t,e,n,s){if(t===e&&n===s)return j;const i=o=>Vo(o,0,1,t,n);return o=>o===0||o===1?o:ri(i(o),e,s)}const oi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ai=t=>e=>1-t(1-e),li=Rt(.33,1.53,.69,.99),Je=ai(li),ui=oi(Je),ci=t=>(t*=2)<1?.5*Je(t):.5*(2-Math.pow(2,-10*(t-1))),Qe=t=>1-Math.sin(Math.acos(t)),hi=ai(Qe),fi=oi(Qe),di=t=>/^0[^.\s]+$/u.test(t);function Co(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||di(t):!0}const Tt=t=>Math.round(t*1e5)/1e5,tn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Do(t){return t==null}const Mo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,en=(t,e)=>n=>!!(typeof n=="string"&&Mo.test(n)&&n.startsWith(t)||e&&!Do(n)&&Object.prototype.hasOwnProperty.call(n,e)),mi=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(tn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Ro=t=>X(0,255,t),ee={...pt,transform:t=>Math.round(Ro(t))},nt={test:en("rgb","red"),parse:mi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ee.transform(t)+", "+ee.transform(e)+", "+ee.transform(n)+", "+Tt(wt.transform(s))+")"};function Eo(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const ye={test:en("#"),parse:Eo,transform:nt.transform},at={test:en("hsl","hue"),parse:mi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+W.transform(Tt(e))+", "+W.transform(Tt(n))+", "+Tt(wt.transform(s))+")"},L={test:t=>nt.test(t)||ye.test(t)||at.test(t),parse:t=>nt.test(t)?nt.parse(t):at.test(t)?at.parse(t):ye.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?nt.transform(t):at.transform(t)},Lo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Fo(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(tn))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Lo))===null||n===void 0?void 0:n.length)||0)>0}const pi="number",gi="color",ko="var",Bo="var(",An="${}",jo=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ct(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(jo,l=>(L.test(l)?(s.color.push(o),i.push(gi),n.push(L.parse(l))):l.startsWith(Bo)?(s.var.push(o),i.push(ko),n.push(l)):(s.number.push(o),i.push(pi),n.push(parseFloat(l))),++o,An)).split(An);return{values:n,split:a,indexes:s,types:i}}function yi(t){return Ct(t).values}function vi(t){const{split:e,types:n}=Ct(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===pi?o+=Tt(i[r]):a===gi?o+=L.transform(i[r]):o+=i[r]}return o}}const Io=t=>typeof t=="number"?0:t;function Oo(t){const e=yi(t);return vi(t)(e.map(Io))}const Z={test:Fo,parse:yi,createTransformer:vi,getAnimatableNone:Oo},No=new Set(["brightness","contrast","saturate","opacity"]);function Uo(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(tn)||[];if(!s)return t;const i=n.replace(s,"");let o=No.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const _o=/\b([a-z-]*)\(.*?\)/gu,ve={...Z,getAnimatableNone:t=>{const e=t.match(_o);return e?e.map(Uo).join(" "):t}},Ko={...Ne,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:ve,WebkitFilter:ve},nn=t=>Ko[t];function xi(t,e){let n=nn(t);return n!==ve&&(n=Z),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Wo=new Set(["auto","none","0"]);function $o(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Wo.has(o)&&Ct(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=xi(n,i)}const wn=t=>t===pt||t===T,Vn=(t,e)=>parseFloat(t.split(", ")[e]),Cn=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return Vn(i[1],e);{const o=s.match(/^matrix\((.+)\)$/u);return o?Vn(o[1],t):0}},Go=new Set(["x","y","z"]),zo=mt.filter(t=>!Go.has(t));function Ho(t){const e=[];return zo.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const dt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Cn(4,13),y:Cn(5,14)};dt.translateX=dt.x;dt.translateY=dt.y;const st=new Set;let xe=!1,Te=!1;function Ti(){if(Te){const t=Array.from(st).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Ho(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{var a;(a=s.getValue(o))===null||a===void 0||a.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Te=!1,xe=!1,st.forEach(t=>t.complete()),st.clear()}function Pi(){st.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Te=!0)})}function Xo(){Pi(),Ti()}class sn{constructor(e,n,s,i,o,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(st.add(this),xe||(xe=!0,V.read(Pi),V.resolveKeyframes(Ti))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let o=0;o<e.length;o++)if(e[o]===null)if(o===0){const r=i==null?void 0:i.get(),a=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const l=s.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),i&&r===void 0&&i.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),st.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,st.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const bi=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Yo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function qo(t){const e=Yo.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Si(t,e,n=1){const[s,i]=qo(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return bi(r)?parseFloat(r):r}return Oe(i)?Si(i,e,n+1):i}const Ai=t=>e=>e.test(t),Zo={test:t=>t==="auto",parse:t=>t},wi=[pt,T,W,Y,Nr,Or,Zo],Dn=t=>wi.find(Ai(t));class Vi extends sn{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),Oe(u))){const c=Si(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!ni.has(s)||e.length!==2)return;const[i,o]=e,r=Dn(i),a=Dn(o);if(r!==a)if(wn(r)&&wn(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)Co(e[i])&&s.push(i);s.length&&$o(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=dt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const o=n.getValue(s);o&&o.jump(this.measuredOrigin,!1);const r=i.length-1,a=i[r];i[r]=dt[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const Mn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Z.test(t)||t==="0")&&!t.startsWith("url("));function Jo(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Qo(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=Mn(i,e),a=Mn(o,e);return!r||!a?!1:Jo(t)||(n==="spring"||ze(n))&&s}const ta=t=>t!==null;function qt(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(ta),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||s===void 0?i[o]:s}const ea=40;class Ci{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=$.now(),this.options={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>ea?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Xo(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=$.now(),this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:o,delay:r,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!Qo(e,s,i,o))if(r)this.options.duration=0;else{l&&l(qt(e,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const c=this.initPlayback(e,n);c!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const C=(t,e,n)=>t+(e-t)*n;function ne(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function na({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=ne(l,a,t+1/3),o=ne(l,a,t),r=ne(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Kt(t,e){return n=>n>0?e:t}const se=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},sa=[ye,nt,at],ia=t=>sa.find(e=>e.test(t));function Rn(t){const e=ia(t);if(!e)return!1;let n=e.parse(t);return e===at&&(n=na(n)),n}const En=(t,e)=>{const n=Rn(t),s=Rn(e);if(!n||!s)return Kt(t,e);const i={...n};return o=>(i.red=se(n.red,s.red,o),i.green=se(n.green,s.green,o),i.blue=se(n.blue,s.blue,o),i.alpha=C(n.alpha,s.alpha,o),nt.transform(i))},ra=(t,e)=>n=>e(t(n)),Et=(...t)=>t.reduce(ra),Pe=new Set(["none","hidden"]);function oa(t,e){return Pe.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function aa(t,e){return n=>C(t,e,n)}function rn(t){return typeof t=="number"?aa:typeof t=="string"?Oe(t)?Kt:L.test(t)?En:ca:Array.isArray(t)?Di:typeof t=="object"?L.test(t)?En:la:Kt}function Di(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>rn(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function la(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=rn(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function ua(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],a=t.indexes[r][i[r]],l=(n=t.values[a])!==null&&n!==void 0?n:0;s[o]=l,i[r]++}return s}const ca=(t,e)=>{const n=Z.createTransformer(e),s=Ct(t),i=Ct(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Pe.has(t)&&!i.values.length||Pe.has(e)&&!s.values.length?oa(t,e):Et(Di(ua(s,i),i.values),n):Kt(t,e)};function Mi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?C(t,e,n):rn(t)(t,e)}const ha=5;function Ri(t,e,n){const s=Math.max(e-ha,0);return si(n-t(s),e-s)}const D={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},ie=.001;function fa({duration:t=D.duration,bounce:e=D.bounce,velocity:n=D.velocity,mass:s=D.mass}){let i,o,r=1-e;r=X(D.minDamping,D.maxDamping,r),t=X(D.minDuration,D.maxDuration,H(t)),r<1?(i=u=>{const c=u*r,h=c*t,f=c-n,d=be(u,r),m=Math.exp(-h);return ie-f/d*m},o=u=>{const h=u*r*t,f=h*n+n,d=Math.pow(r,2)*Math.pow(u,2)*t,m=Math.exp(-h),p=be(Math.pow(u,2),r);return(-i(u)+ie>0?-1:1)*((f-d)*m)/p}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-ie+c*h},o=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=ma(i,o,a);if(t=z(t),isNaN(l))return{stiffness:D.stiffness,damping:D.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const da=12;function ma(t,e,n){let s=n;for(let i=1;i<da;i++)s=s-t(s)/e(s);return s}function be(t,e){return t*Math.sqrt(1-e*e)}const pa=["duration","bounce"],ga=["stiffness","damping","mass"];function Ln(t,e){return e.some(n=>t[n]!==void 0)}function ya(t){let e={velocity:D.velocity,stiffness:D.stiffness,damping:D.damping,mass:D.mass,isResolvedFromDuration:!1,...t};if(!Ln(t,ga)&&Ln(t,pa))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*X(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:D.mass,stiffness:i,damping:o}}else{const n=fa(t);e={...e,...n,mass:D.mass},e.isResolvedFromDuration=!0}return e}function Ei(t=D.visualDuration,e=D.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=ya({...n,velocity:-H(n.velocity||0)}),m=f||0,p=u/(2*Math.sqrt(l*c)),y=r-o,g=H(Math.sqrt(l/c)),v=Math.abs(y)<5;s||(s=v?D.restSpeed.granular:D.restSpeed.default),i||(i=v?D.restDelta.granular:D.restDelta.default);let x;if(p<1){const P=be(g,p);x=w=>{const R=Math.exp(-p*g*w);return r-R*((m+p*g*y)/P*Math.sin(P*w)+y*Math.cos(P*w))}}else if(p===1)x=P=>r-Math.exp(-g*P)*(y+(m+g*y)*P);else{const P=g*Math.sqrt(p*p-1);x=w=>{const R=Math.exp(-p*g*w),S=Math.min(P*w,300);return r-R*((m+p*g*y)*Math.sinh(S)+P*y*Math.cosh(S))/P}}const A={calculatedDuration:d&&h||null,next:P=>{const w=x(P);if(d)a.done=P>=h;else{let R=0;p<1&&(R=P===0?z(m):Ri(x,P,w));const S=Math.abs(R)<=s,B=Math.abs(r-w)<=i;a.done=S&&B}return a.value=a.done?r:w,a},toString:()=>{const P=Math.min(Ys(A),me),w=qs(R=>A.next(P*R).value,P,30);return P+"ms "+w}};return A}function Fn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=S=>a!==void 0&&S<a||l!==void 0&&S>l,m=S=>a===void 0?l:l===void 0||Math.abs(a-S)<Math.abs(l-S)?a:l;let p=n*e;const y=h+p,g=r===void 0?y:r(y);g!==y&&(p=g-h);const v=S=>-p*Math.exp(-S/s),x=S=>g+v(S),A=S=>{const B=v(S),O=x(S);f.done=Math.abs(B)<=u,f.value=f.done?g:O};let P,w;const R=S=>{d(f.value)&&(P=S,w=Ei({keyframes:[f.value,m(f.value)],velocity:Ri(x,S,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return R(0),{calculatedDuration:null,next:S=>{let B=!1;return!w&&P===void 0&&(B=!0,A(S),R(S)),P!==void 0&&S>=P?w.next(S-P):(!B&&A(S),f)}}}const va=Rt(.42,0,1,1),xa=Rt(0,0,.58,1),Li=Rt(.42,0,.58,1),Ta=t=>Array.isArray(t)&&typeof t[0]!="number",Pa={linear:j,easeIn:va,easeInOut:Li,easeOut:xa,circIn:Qe,circInOut:fi,circOut:hi,backIn:Je,backInOut:ui,backOut:li,anticipate:ci},kn=t=>{if(He(t)){Ms(t.length===4);const[e,n,s,i]=t;return Rt(e,n,s,i)}else if(typeof t=="string")return Pa[t];return t};function ba(t,e,n){const s=[],i=n||Mi,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||j:e;a=Et(l,a)}s.push(a)}return s}function Sa(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(Ms(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=ba(e,s,i),l=a.length,u=c=>{if(r&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=ht(t[h],t[h+1],c);return a[h](f)};return n?c=>u(X(t[0],t[o-1],c)):u}function Aa(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=ht(0,e,s);t.push(C(n,1,i))}}function wa(t){const e=[0];return Aa(e,t.length-1),e}function Va(t,e){return t.map(n=>n*e)}function Ca(t,e){return t.map(()=>e||Li).splice(0,t.length-1)}function Wt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Ta(s)?s.map(kn):kn(s),o={done:!1,value:e[0]},r=Va(n&&n.length===e.length?n:wa(e),t),a=Sa(r,e,{ease:Array.isArray(i)?i:Ca(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Da=t=>{const e=({timestamp:n})=>t(n);return{start:()=>V.update(e,!0),stop:()=>q(e),now:()=>E.isProcessing?E.timestamp:$.now()}},Ma={decay:Fn,inertia:Fn,tween:Wt,keyframes:Wt,spring:Ei},Ra=t=>t/100;class on extends Ci{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:s,element:i,keyframes:o}=this.options,r=(i==null?void 0:i.KeyframeResolver)||sn,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new r(o,a,n,s,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=this.options,a=ze(n)?n:Ma[n]||Wt;let l,u;a!==Wt&&typeof e[0]!="number"&&(l=Et(Ra,Mi(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});o==="mirror"&&(u=a({...this.options,keyframes:[...e].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=Ys(c));const{calculatedDuration:h}=c,f=h+i,d=f*(s+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:f,totalDuration:d}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:S}=this.options;return{done:!0,value:S[S.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:r,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:h}=s;if(this.startTime===null)return o.next(0);const{delay:f,repeat:d,repeatType:m,repeatDelay:p,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-f*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let x=this.currentTime,A=o;if(d){const S=Math.min(this.currentTime,c)/h;let B=Math.floor(S),O=S%1;!O&&S>=1&&(O=1),O===1&&B--,B=Math.min(B,d+1),!!(B%2)&&(m==="reverse"?(O=1-O,p&&(O-=p/h)):m==="mirror"&&(A=r)),x=X(0,1,O)*h}const P=v?{done:!1,value:l[0]}:A.next(x);a&&(P.value=a(P.value));let{done:w}=P;!v&&u!==null&&(w=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return R&&i!==void 0&&(P.value=qt(l,this.options,i)),y&&y(P.value),R&&this.finish(),P}get duration(){const{resolved:e}=this;return e?H(e.calculatedDuration):0}get time(){return H(this.currentTime)}set time(e){e=z(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=H(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=Da,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Ea=new Set(["opacity","clipPath","filter","transform"]);function La(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeInOut",times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=Js(a,i);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}const Fa=Ee(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),$t=10,ka=2e4;function Ba(t){return ze(t.type)||t.type==="spring"||!Zs(t.ease)}function ja(t,e){const n=new on({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let o=0;for(;!s.done&&o<ka;)s=n.sample(o),i.push(s.value),o+=$t;return{times:void 0,keyframes:i,duration:o-$t,ease:"linear"}}const Fi={anticipate:ci,backInOut:ui,circInOut:fi};function Ia(t){return t in Fi}class Bn extends Ci{constructor(e){super(e);const{name:n,motionValue:s,element:i,keyframes:o}=this.options;this.resolver=new Vi(o,(r,a)=>this.onKeyframesResolved(r,a),n,s,i),this.resolver.scheduleResolve()}initPlayback(e,n){let{duration:s=300,times:i,ease:o,type:r,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof o=="string"&&_t()&&Ia(o)&&(o=Fi[o]),Ba(this.options)){const{onComplete:h,onUpdate:f,motionValue:d,element:m,...p}=this.options,y=ja(e,p);e=y.keyframes,e.length===1&&(e[1]=e[0]),s=y.duration,i=y.times,o=y.ease,r="keyframes"}const c=La(a.owner.current,l,e,{...this.options,duration:s,times:i,ease:o});return c.startTime=u??this.calcStartTime(),this.pendingTimeline?(xn(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:h}=this.options;a.set(qt(e,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:s,times:i,type:r,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return H(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return H(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=z(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return j;const{animation:s}=n;xn(s,e)}return j}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:o,ease:r,times:a}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:h,element:f,...d}=this.options,m=new on({...d,keyframes:s,duration:i,type:o,ease:r,times:a,isGenerator:!0}),p=z(this.time);u.setWithVelocity(m.sample(p-$t).value,m.sample(p).value,$t)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:o,damping:r,type:a}=e;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return Fa()&&s&&Ea.has(s)&&!l&&!u&&!i&&o!=="mirror"&&r!==0&&a!=="inertia"}}const Oa={type:"spring",stiffness:500,damping:25,restSpeed:10},Na=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Ua={type:"keyframes",duration:.8},_a={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ka=(t,{keyframes:e})=>e.length>2?Ua:it.has(t)?t.startsWith("scale")?Na(e[1]):Oa:_a;function Wa({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const an=(t,e,n,s={},i,o)=>r=>{const a=Ge(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-z(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Wa(a)||(c={...c,...Ka(t,c)}),c.duration&&(c.duration=z(c.duration)),c.repeatDelay&&(c.repeatDelay=z(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(h=!0)),h&&!o&&e.get()!==void 0){const f=qt(c.keyframes,a);if(f!==void 0)return V.update(()=>{c.onUpdate(f),c.onComplete()}),new ao([])}return!o&&Bn.supports(c)?new Bn(c):new on(c)};function $a({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function ki(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;s&&(r=s);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const h in l){const f=t.getValue(h,(o=t.latestValues[h])!==null&&o!==void 0?o:null),d=l[h];if(d===void 0||c&&$a(c,h))continue;const m={delay:n,...Ge(r||{},h)};let p=!1;if(window.MotionHandoffAnimation){const g=ii(t);if(g){const v=window.MotionHandoffAnimation(g,h,V);v!==null&&(m.startTime=v,p=!0)}}ge(t,h),f.start(an(h,f,d,t.shouldReduceMotion&&ni.has(h)?{type:!1}:m,t,p));const y=f.animation;y&&u.push(y)}return a&&Promise.all(u).then(()=>{V.update(()=>{a&&bo(t,a)})}),u}function Se(t,e,n={}){var s;const i=Yt(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const r=i?()=>Promise.all(ki(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=o;return Ga(t,e,c+u,h,f,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,c]=l==="beforeChildren"?[r,a]:[a,r];return u().then(()=>c())}else return Promise.all([r(),a(n.delay)])}function Ga(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,l=i===1?(u=0)=>u*s:(u=0)=>a-u*s;return Array.from(t.variantChildren).sort(za).forEach((u,c)=>{u.notify("AnimationStart",e),r.push(Se(u,e,{...o,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(r)}function za(t,e){return t.sortNodePosition(e)}function Ha(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>Se(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=Se(t,e,n);else{const i=typeof e=="function"?Yt(t,e,n.custom):e;s=Promise.all(ki(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Xa=Fe.length;function Bi(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Bi(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Xa;n++){const s=Fe[n],i=t.props[s];(At(i)||i===!1)&&(e[s]=i)}return e}const Ya=[...Le].reverse(),qa=Le.length;function Za(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Ha(t,n,s)))}function Ja(t){let e=Za(t),n=jn(),s=!0;const i=l=>(u,c)=>{var h;const f=Yt(t,c,l==="exit"?(h=t.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:d,transitionEnd:m,...p}=f;u={...u,...p,...m}}return u};function o(l){e=l(t)}function r(l){const{props:u}=t,c=Bi(t.parent)||{},h=[],f=new Set;let d={},m=1/0;for(let y=0;y<qa;y++){const g=Ya[y],v=n[g],x=u[g]!==void 0?u[g]:c[g],A=At(x),P=g===l?v.isActive:null;P===!1&&(m=y);let w=x===c[g]&&x!==u[g]&&A;if(w&&s&&t.manuallyAnimateOnMount&&(w=!1),v.protectedKeys={...d},!v.isActive&&P===null||!x&&!v.prevProp||Ht(x)||typeof x=="boolean")continue;const R=Qa(v.prevProp,x);let S=R||g===l&&v.isActive&&!w&&A||y>m&&A,B=!1;const O=Array.isArray(x)?x:[x];let rt=O.reduce(i(g),{});P===!1&&(rt={});const{prevResolvedValues:un={}}=v,sr={...un,...rt},cn=k=>{S=!0,f.has(k)&&(B=!0,f.delete(k)),v.needsAnimating[k]=!0;const G=t.getValue(k);G&&(G.liveStyle=!1)};for(const k in sr){const G=rt[k],Zt=un[k];if(d.hasOwnProperty(k))continue;let Jt=!1;de(G)&&de(Zt)?Jt=!Xs(G,Zt):Jt=G!==Zt,Jt?G!=null?cn(k):f.add(k):G!==void 0&&f.has(k)?cn(k):v.protectedKeys[k]=!0}v.prevProp=x,v.prevResolvedValues=rt,v.isActive&&(d={...d,...rt}),s&&t.blockInitialAnimation&&(S=!1),S&&(!(w&&R)||B)&&h.push(...O.map(k=>({animation:k,options:{type:g}})))}if(f.size){const y={};f.forEach(g=>{const v=t.getBaseTarget(g),x=t.getValue(g);x&&(x.liveStyle=!0),y[g]=v??null}),h.push({animation:y})}let p=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(p=!1),s=!1,p?e(h):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=t.variantChildren)===null||c===void 0||c.forEach(f=>{var d;return(d=f.animationState)===null||d===void 0?void 0:d.setActive(l,u)}),n[l].isActive=u;const h=r(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=jn(),s=!0}}}function Qa(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Xs(e,t):!1}function Q(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function jn(){return{animate:Q(!0),whileInView:Q(),whileHover:Q(),whileTap:Q(),whileDrag:Q(),whileFocus:Q(),exit:Q()}}class J{constructor(e){this.isMounted=!1,this.node=e}update(){}}class tl extends J{constructor(e){super(e),e.animationState||(e.animationState=Ja(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ht(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let el=0;class nl extends J{constructor(){super(...arguments),this.id=el++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const sl={animation:{Feature:tl},exit:{Feature:nl}};function Dt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function Lt(t){return{point:{x:t.pageX,y:t.pageY}}}const il=t=>e=>Xe(e)&&t(e,Lt(e));function Pt(t,e,n,s){return Dt(t,e,il(n),s)}const In=(t,e)=>Math.abs(t-e);function rl(t,e){const n=In(t.x,e.x),s=In(t.y,e.y);return Math.sqrt(n**2+s**2)}class ji{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=oe(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=rl(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:m}=h,{timestamp:p}=E;this.history.push({...m,timestamp:p});const{onStart:y,onMove:g}=this.handlers;f||(y&&y(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=re(f,this.transformPagePoint),V.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:m,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=oe(h.type==="pointercancel"?this.lastMoveEventInfo:re(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,y),m&&m(h,y)},!Xe(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const r=Lt(e),a=re(r,this.transformPagePoint),{point:l}=a,{timestamp:u}=E;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(e,oe(a,this.history)),this.removeListeners=Et(Pt(this.contextWindow,"pointermove",this.handlePointerMove),Pt(this.contextWindow,"pointerup",this.handlePointerUp),Pt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),q(this.updatePoint)}}function re(t,e){return e?{point:e(t.point)}:t}function On(t,e){return{x:t.x-e.x,y:t.y-e.y}}function oe({point:t},e){return{point:t,delta:On(t,Ii(e)),offset:On(t,ol(e)),velocity:al(e,.1)}}function ol(t){return t[0]}function Ii(t){return t[t.length-1]}function al(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Ii(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>z(e)));)n--;if(!s)return{x:0,y:0};const o=H(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}const Oi=1e-4,ll=1-Oi,ul=1+Oi,Ni=.01,cl=0-Ni,hl=0+Ni;function I(t){return t.max-t.min}function fl(t,e,n){return Math.abs(t-e)<=n}function Nn(t,e,n,s=.5){t.origin=s,t.originPoint=C(e.min,e.max,t.origin),t.scale=I(n)/I(e),t.translate=C(n.min,n.max,t.origin)-t.originPoint,(t.scale>=ll&&t.scale<=ul||isNaN(t.scale))&&(t.scale=1),(t.translate>=cl&&t.translate<=hl||isNaN(t.translate))&&(t.translate=0)}function bt(t,e,n,s){Nn(t.x,e.x,n.x,s?s.originX:void 0),Nn(t.y,e.y,n.y,s?s.originY:void 0)}function Un(t,e,n){t.min=n.min+e.min,t.max=t.min+I(e)}function dl(t,e,n){Un(t.x,e.x,n.x),Un(t.y,e.y,n.y)}function _n(t,e,n){t.min=e.min-n.min,t.max=t.min+I(e)}function St(t,e,n){_n(t.x,e.x,n.x),_n(t.y,e.y,n.y)}function ml(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?C(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?C(n,t,s.max):Math.min(t,n)),t}function Kn(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function pl(t,{top:e,left:n,bottom:s,right:i}){return{x:Kn(t.x,n,i),y:Kn(t.y,e,s)}}function Wn(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function gl(t,e){return{x:Wn(t.x,e.x),y:Wn(t.y,e.y)}}function yl(t,e){let n=.5;const s=I(t),i=I(e);return i>s?n=ht(e.min,e.max-s,t.min):s>i&&(n=ht(t.min,t.max-i,e.min)),X(0,1,n)}function vl(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Ae=.35;function xl(t=Ae){return t===!1?t=0:t===!0&&(t=Ae),{x:$n(t,"left","right"),y:$n(t,"top","bottom")}}function $n(t,e,n){return{min:Gn(t,e),max:Gn(t,n)}}function Gn(t,e){return typeof t=="number"?t:t[e]||0}const zn=()=>({translate:0,scale:1,origin:0,originPoint:0}),lt=()=>({x:zn(),y:zn()}),Hn=()=>({min:0,max:0}),M=()=>({x:Hn(),y:Hn()});function U(t){return[t("x"),t("y")]}function Ui({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Tl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Pl(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ae(t){return t===void 0||t===1}function we({scale:t,scaleX:e,scaleY:n}){return!ae(t)||!ae(e)||!ae(n)}function tt(t){return we(t)||_i(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function _i(t){return Xn(t.x)||Xn(t.y)}function Xn(t){return t&&t!=="0%"}function Gt(t,e,n){const s=t-n,i=e*s;return n+i}function Yn(t,e,n,s,i){return i!==void 0&&(t=Gt(t,i,s)),Gt(t,n,s)+e}function Ve(t,e=0,n=1,s,i){t.min=Yn(t.min,e,n,s,i),t.max=Yn(t.max,e,n,s,i)}function Ki(t,{x:e,y:n}){Ve(t.x,e.translate,e.scale,e.originPoint),Ve(t.y,n.translate,n.scale,n.originPoint)}const qn=.999999999999,Zn=1.0000000000001;function bl(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&ct(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Ki(t,r)),s&&tt(o.latestValues)&&ct(t,o.latestValues))}e.x<Zn&&e.x>qn&&(e.x=1),e.y<Zn&&e.y>qn&&(e.y=1)}function ut(t,e){t.min=t.min+e,t.max=t.max+e}function Jn(t,e,n,s,i=.5){const o=C(t.min,t.max,i);Ve(t,e,n,o,s)}function ct(t,e){Jn(t.x,e.x,e.scaleX,e.scale,e.originX),Jn(t.y,e.y,e.scaleY,e.scale,e.originY)}function Wi(t,e){return Ui(Pl(t.getBoundingClientRect(),e))}function Sl(t,e,n){const s=Wi(t,n),{scroll:i}=e;return i&&(ut(s.x,i.offset.x),ut(s.y,i.offset.y)),s}const $i=({current:t})=>t?t.ownerDocument.defaultView:null,Al=new WeakMap;class wl{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=M(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Lt(c).point)},o=(c,h)=>{const{drag:f,dragPropagation:d,onDragStart:m}=this.getProps();if(f&&!d&&(this.openDragLock&&this.openDragLock(),this.openDragLock=yo(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),U(y=>{let g=this.getAxisMotionValue(y).get()||0;if(W.test(g)){const{projection:v}=this.visualElement;if(v&&v.layout){const x=v.layout.layoutBox[y];x&&(g=I(x)*(parseFloat(g)/100))}}this.originPoint[y]=g}),m&&V.postRender(()=>m(c,h)),ge(this.visualElement,"transform");const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},r=(c,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:m,onDrag:p}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:y}=h;if(d&&this.currentDirection===null){this.currentDirection=Vl(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),p&&p(c,h)},a=(c,h)=>this.stop(c,h),l=()=>U(c=>{var h;return this.getAnimationState(c)==="paused"&&((h=this.getAxisMotionValue(c).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new ji(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:$i(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&V.postRender(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Bt(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=ml(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,o=this.constraints;n&&ot(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=pl(i.layoutBox,n):this.constraints=!1,this.elastic=xl(s),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&U(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=vl(i.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!ot(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Sl(s,i.root,this.visualElement.getTransformPagePoint());let r=gl(i.layout.layoutBox,o);if(n){const a=n(Tl(r));this.hasMutatedConstraints=!!a,a&&(r=Ui(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=U(c=>{if(!Bt(c,n,this.currentDirection))return;let h=l&&l[c]||{};r&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return ge(this.visualElement,e),s.start(an(e,s,0,n,this.visualElement,!1))}stopAnimation(){U(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){U(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){U(n=>{const{drag:s}=this.getProps();if(!Bt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-C(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!ot(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};U(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=yl({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),U(r=>{if(!Bt(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(C(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;Al.set(this.visualElement,this);const e=this.visualElement.current,n=Pt(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();ot(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),V.read(s);const r=Dt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(U(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Ae,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Bt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Vl(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Cl extends J{constructor(e){super(e),this.removeGroupControls=j,this.removeListeners=j,this.controls=new wl(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||j}unmount(){this.removeGroupControls(),this.removeListeners()}}const Qn=t=>(e,n)=>{t&&V.postRender(()=>t(e,n))};class Dl extends J{constructor(){super(...arguments),this.removePointerDownListener=j}onPointerDown(e){this.session=new ji(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$i(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Qn(e),onStart:Qn(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&V.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=Pt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ot={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ts(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const gt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;const n=ts(t,e.target.x),s=ts(t,e.target.y);return`${n}% ${s}%`}},Ml={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=Z.parse(t);if(i.length>5)return s;const o=Z.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const u=C(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}};class Rl extends b.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;Yr(El),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Ot.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,r=s.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||V.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Be.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Gi(t){const[e,n]=cr(),s=b.useContext(Cs);return K.jsx(Rl,{...t,layoutGroup:s,switchLayoutGroup:b.useContext(Bs),isPresent:e,safeToRemove:n})}const El={borderRadius:{...gt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:gt,borderTopRightRadius:gt,borderBottomLeftRadius:gt,borderBottomRightRadius:gt,boxShadow:Ml};function Ll(t,e,n){const s=F(t)?t:Vt(t);return s.start(an("",s,e,n)),s.animation}function Fl(t){return t instanceof SVGElement&&t.tagName!=="svg"}const kl=(t,e)=>t.depth-e.depth;class Bl{constructor(){this.children=[],this.isDirty=!1}add(e){Ye(this.children,e),this.isDirty=!0}remove(e){qe(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(kl),this.isDirty=!1,this.children.forEach(e)}}function jl(t,e){const n=$.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(q(s),t(o-e))};return V.read(s,!0),()=>q(s)}const zi=["TopLeft","TopRight","BottomLeft","BottomRight"],Il=zi.length,es=t=>typeof t=="string"?parseFloat(t):t,ns=t=>typeof t=="number"||T.test(t);function Ol(t,e,n,s,i,o){i?(t.opacity=C(0,n.opacity!==void 0?n.opacity:1,Nl(s)),t.opacityExit=C(e.opacity!==void 0?e.opacity:1,0,Ul(s))):o&&(t.opacity=C(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let r=0;r<Il;r++){const a=`border${zi[r]}Radius`;let l=ss(e,a),u=ss(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||ns(l)===ns(u)?(t[a]=Math.max(C(es(l),es(u),s),0),(W.test(u)||W.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=C(e.rotate||0,n.rotate||0,s))}function ss(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Nl=Hi(0,.5,hi),Ul=Hi(.5,.95,j);function Hi(t,e,n){return s=>s<t?0:s>e?1:n(ht(t,e,s))}function is(t,e){t.min=e.min,t.max=e.max}function N(t,e){is(t.x,e.x),is(t.y,e.y)}function rs(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function os(t,e,n,s,i){return t-=e,t=Gt(t,1/n,s),i!==void 0&&(t=Gt(t,1/i,s)),t}function _l(t,e=0,n=1,s=.5,i,o=t,r=t){if(W.test(e)&&(e=parseFloat(e),e=C(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=C(o.min,o.max,s);t===o&&(a-=e),t.min=os(t.min,e,n,a,i),t.max=os(t.max,e,n,a,i)}function as(t,e,[n,s,i],o,r){_l(t,e[n],e[s],e[i],e.scale,o,r)}const Kl=["x","scaleX","originX"],Wl=["y","scaleY","originY"];function ls(t,e,n,s){as(t.x,e,Kl,n?n.x:void 0,s?s.x:void 0),as(t.y,e,Wl,n?n.y:void 0,s?s.y:void 0)}function us(t){return t.translate===0&&t.scale===1}function Xi(t){return us(t.x)&&us(t.y)}function cs(t,e){return t.min===e.min&&t.max===e.max}function $l(t,e){return cs(t.x,e.x)&&cs(t.y,e.y)}function hs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Yi(t,e){return hs(t.x,e.x)&&hs(t.y,e.y)}function fs(t){return I(t.x)/I(t.y)}function ds(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Gl{constructor(){this.members=[]}add(e){Ye(this.members,e),e.scheduleRender()}remove(e){if(qe(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function zl(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=(n==null?void 0:n.z)||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const et={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},xt=typeof window<"u"&&window.MotionDebug!==void 0,le=["","X","Y","Z"],Hl={visibility:"hidden"},ms=1e3;let Xl=0;function ue(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function qi(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ii(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",V,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&qi(s)}function Zi({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=Xl++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,xt&&(et.totalNodes=et.resolvedTargetDeltas=et.recalculatedProjection=0),this.nodes.forEach(Zl),this.nodes.forEach(nu),this.nodes.forEach(su),this.nodes.forEach(Jl),xt&&window.MotionDebug.record(et)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Bl)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Ze),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Fl(r),this.instance=r;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=jl(f,250),Ot.hasAnimatedSinceResize&&(Ot.hasAnimatedSinceResize=!1,this.nodes.forEach(gs))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:d,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||lu,{onLayoutAnimationStart:y,onLayoutAnimationComplete:g}=c.getProps(),v=!this.targetLayout||!Yi(this.targetLayout,m)||d,x=!f&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,x);const A={...Ge(p,"layout"),onPlay:y,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A)}else f||gs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,q(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(iu),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&qi(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ps);return}this.isUpdating||this.nodes.forEach(tu),this.isUpdating=!1,this.nodes.forEach(eu),this.nodes.forEach(Yl),this.nodes.forEach(ql),this.clearAllSnapshots();const a=$.now();E.delta=X(0,1e3/60,a-E.timestamp),E.timestamp=a,E.isProcessing=!0,Qt.update.process(E),Qt.preRender.process(E),Qt.render.process(E),E.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Be.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ql),this.sharedNodes.forEach(ru)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,V.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){V.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=M(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Xi(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&(a||tt(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),uu(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var r;const{visualElement:a}=this.options;if(!a)return M();const l=a.measureViewportBox();if(!(((r=this.scroll)===null||r===void 0?void 0:r.wasRoot)||this.path.some(cu))){const{scroll:c}=this.root;c&&(ut(l.x,c.offset.x),ut(l.y,c.offset.y))}return l}removeElementScroll(r){var a;const l=M();if(N(l,r),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:h,options:f}=c;c!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&N(l,r),ut(l.x,h.offset.x),ut(l.y,h.offset.y))}return l}applyTransform(r,a=!1){const l=M();N(l,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&ct(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),tt(c.latestValues)&&ct(l,c.latestValues)}return tt(this.latestValues)&&ct(l,this.latestValues),l}removeTransform(r){const a=M();N(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!tt(u.latestValues))continue;we(u.latestValues)&&u.updateSnapshot();const c=M(),h=u.measurePageBox();N(c,h),ls(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return tt(this.latestValues)&&ls(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==E.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(r||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=E.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=M(),this.relativeTargetOrigin=M(),St(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),N(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=M(),this.targetWithTransforms=M()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),dl(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):N(this.target,this.layout.layoutBox),Ki(this.target,this.targetDelta)):N(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=M(),this.relativeTargetOrigin=M(),St(this.relativeTargetOrigin,this.target,d.target),N(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}xt&&et.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||we(this.parent.latestValues)||_i(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var r;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((r=this.parent)===null||r===void 0)&&r.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===E.timestamp&&(u=!1),u)return;const{layout:c,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||h))return;N(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;bl(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=M());const{target:m}=a;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(rs(this.prevProjectionDelta.x,this.projectionDelta.x),rs(this.prevProjectionDelta.y,this.projectionDelta.y)),bt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!ds(this.projectionDelta.x,this.prevProjectionDelta.x)||!ds(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),xt&&et.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),r){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=lt(),this.projectionDelta=lt(),this.projectionDeltaWithTransform=lt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=lt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=M(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=d!==m,y=this.getStack(),g=!y||y.members.length<=1,v=!!(p&&!g&&this.options.crossfade===!0&&!this.path.some(au));this.animationProgress=0;let x;this.mixTargetDelta=A=>{const P=A/1e3;ys(h.x,r.x,P),ys(h.y,r.y,P),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(St(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ou(this.relativeTarget,this.relativeTargetOrigin,f,P),x&&$l(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=M()),N(x,this.relativeTarget)),p&&(this.animationValues=c,Ol(c,u,this.latestValues,P,v,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(q(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(()=>{Ot.hasAnimatedSinceResize=!0,this.currentAnimation=Ll(0,ms,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ms),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&Ji(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||M();const h=I(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=I(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}N(a,l),ct(a,c),bt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Gl),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:a}=this.options;return a?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:a}=this.options;return a?(r=this.getStack())===null||r===void 0?void 0:r.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&ue("z",r,u,this.animationValues);for(let c=0;c<le.length;c++)ue(`rotate${le[c]}`,r,u,this.animationValues),ue(`skew${le[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}getProjectionStyles(r){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Hl;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=jt(r==null?void 0:r.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=jt(r==null?void 0:r.pointerEvents)||""),this.hasProjected&&!tt(this.latestValues)&&(p.transform=c?c({},""):"none",this.hasProjected=!1),p}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),u.transform=zl(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));const{x:d,y:m}=this.projectionDelta;u.transformOrigin=`${d.origin*100}% ${m.origin*100}% 0`,h.animationValues?u.opacity=h===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const p in Ut){if(f[p]===void 0)continue;const{correct:y,applyTo:g}=Ut[p],v=u.transform==="none"?f[p]:y(f[p],h);if(g){const x=g.length;for(let A=0;A<x;A++)u[g[A]]=v}else u[p]=v}return this.options.layoutId&&(u.pointerEvents=h===this?jt(r==null?void 0:r.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(ps),this.root.sharedNodes.clear()}}}function Yl(t){t.updateLayout()}function ql(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=n.source!==t.layout.source;o==="size"?U(h=>{const f=r?n.measuredBox[h]:n.layoutBox[h],d=I(f);f.min=s[h].min,f.max=f.min+d}):Ji(o,n.layoutBox,s)&&U(h=>{const f=r?n.measuredBox[h]:n.layoutBox[h],d=I(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=lt();bt(a,s,n.layoutBox);const l=lt();r?bt(l,t.applyTransform(i,!0),n.measuredBox):bt(l,s,n.layoutBox);const u=!Xi(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const m=M();St(m,n.layoutBox,f.layoutBox);const p=M();St(p,s,d.layoutBox),Yi(m,p)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Zl(t){xt&&et.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Jl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ql(t){t.clearSnapshot()}function ps(t){t.clearMeasurements()}function tu(t){t.isLayoutDirty=!1}function eu(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function gs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function nu(t){t.resolveTargetDelta()}function su(t){t.calcProjection()}function iu(t){t.resetSkewAndRotation()}function ru(t){t.removeLeadSnapshot()}function ys(t,e,n){t.translate=C(e.translate,0,n),t.scale=C(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function vs(t,e,n,s){t.min=C(e.min,n.min,s),t.max=C(e.max,n.max,s)}function ou(t,e,n,s){vs(t.x,e.x,n.x,s),vs(t.y,e.y,n.y,s)}function au(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const lu={duration:.45,ease:[.4,0,.1,1]},xs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ts=xs("applewebkit/")&&!xs("chrome/")?Math.round:j;function Ps(t){t.min=Ts(t.min),t.max=Ts(t.max)}function uu(t){Ps(t.x),Ps(t.y)}function Ji(t,e,n){return t==="position"||t==="preserve-aspect"&&!fl(fs(e),fs(n),.2)}function cu(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const hu=Zi({attachResizeListener:(t,e)=>Dt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ce={current:void 0},Qi=Zi({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ce.current){const t=new hu({});t.mount(window),t.setOptions({layoutScroll:!0}),ce.current=t}return ce.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),fu={pan:{Feature:Dl},drag:{Feature:Cl,ProjectionNode:Qi,MeasureLayout:Gi}};function bs(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&V.postRender(()=>o(e,Lt(e)))}class du extends J{mount(){const{current:e}=this.node;e&&(this.unmount=ho(e,n=>(bs(this.node,n,"Start"),s=>bs(this.node,s,"End"))))}unmount(){}}class mu extends J{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Et(Dt(this.node.current,"focus",()=>this.onFocus()),Dt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ss(t,e,n){const{props:s}=t;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&V.postRender(()=>o(e,Lt(e)))}class pu extends J{mount(){const{current:e}=this.node;e&&(this.unmount=go(e,n=>(Ss(this.node,n,"Start"),(s,{success:i})=>Ss(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ce=new WeakMap,he=new WeakMap,gu=t=>{const e=Ce.get(t.target);e&&e(t)},yu=t=>{t.forEach(gu)};function vu({root:t,...e}){const n=t||document;he.has(n)||he.set(n,{});const s=he.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(yu,{root:t,...e})),s[i]}function xu(t,e,n){const s=vu(e);return Ce.set(t,n),s.observe(t),()=>{Ce.delete(t),s.unobserve(t)}}const Tu={some:0,all:1};class Pu extends J{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Tu[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return xu(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(bu(e,n))&&this.startObserver()}unmount(){}}function bu({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Su={inView:{Feature:Pu},tap:{Feature:pu},focus:{Feature:mu},hover:{Feature:du}},Au={layout:{ProjectionNode:Qi,MeasureLayout:Gi}},De={current:null},tr={current:!1};function wu(){if(tr.current=!0,!!Re)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>De.current=t.matches;t.addListener(e),e()}else De.current=!1}const Vu=[...wi,L,Z],Cu=t=>Vu.find(Ai(t)),As=new WeakMap;function Du(t,e,n){for(const s in e){const i=e[s],o=n[s];if(F(i))t.addValue(s,i);else if(F(o))t.addValue(s,Vt(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,Vt(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const ws=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Mu{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=sn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=$.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,V.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:c}=r;this.onUpdate=c,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Xt(n),this.isVariantNode=Fs(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const m=f[d];l[d]!==void 0&&F(m)&&m.set(l[d],!1)}}mount(e){this.current=e,As.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),tr.current||wu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:De.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){As.delete(this.current),this.projection&&this.projection.unmount(),q(this.notifyUpdate),q(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=it.has(e),i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&V.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in ft){const n=ft[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):M()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<ws.length;s++){const i=ws[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Du(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Vt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(bi(i)||di(i))?i=parseFloat(i):!Cu(i)&&Z.test(n)&&(i=xi(e,n)),this.setBaseTarget(e,F(i)?i.get():i)),F(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const r=Ie(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);r&&(i=r[e])}if(s&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!F(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Ze),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class er extends Mu{constructor(){super(...arguments),this.KeyframeResolver=Vi}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;F(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ru(t){return window.getComputedStyle(t)}class Eu extends er{constructor(){super(...arguments),this.type="html",this.renderInstance=Ks}readValueFromInstance(e,n){if(it.has(n)){const s=nn(n);return s&&s.default||0}else{const s=Ru(e),i=(Ns(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Wi(e,n)}build(e,n,s){Ue(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return $e(e,n,s)}}class Lu extends er{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=M}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(it.has(n)){const s=nn(n);return s&&s.default||0}return n=Ws.has(n)?n:ke(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return zs(e,n,s)}build(e,n,s){_e(e,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,n,s,i){$s(e,n,s,i)}mount(e){this.isSVGTag=We(e.tagName),super.mount(e)}}const Fu=(t,e)=>je(t)?new Lu(e):new Eu(e,{allowProjection:t!==b.Fragment}),ku=io({...sl,...Su,...fu,...Au},Fu),fe=xr(ku);function ln(){const t=ar("root"),e=lr().find(n=>{var s;return n.formAction==="/progress"&&((s=n.formData)==null?void 0:s.has("complete"))});return!e||!(t!=null&&t.progress)?(t==null?void 0:t.progress)??null:t.progress.map(n=>{var o,r;const s=((o=e.formData)==null?void 0:o.get("complete"))==="true";return((r=e.formData)==null?void 0:r.get("lessonSlug"))===n.epicLessonSlug?{...n,epicCompletedAt:s?Date.now():null}:n})}function Wu(){const t=Vs().pathname,e=ln();if(!e)return null;const n=a=>a.type==="workshop-instructions"?0:a.type==="workshop-finished"?1e4:a.type==="instructions"?a.exerciseNumber*100:a.type==="step"?a.exerciseNumber*100+a.stepNumber:a.type==="finished"?a.exerciseNumber*100+100:a.type==="unknown"?1e5:-1,i=e.sort((a,l)=>n(a)-n(l)).find(a=>!a.epicCompletedAt);if(!i||i.type==="unknown")return null;if(i.type==="workshop-instructions")return"/";if(i.type==="workshop-finished")return"/finished";const o=i.exerciseNumber.toString().padStart(2,"0");if(i.type==="instructions")return`/exercise/${o}`;if(i.type==="finished")return`/exercise/${o}/finished`;const r=i.stepNumber.toString().padStart(2,"0");if(i.type==="step"){const a=`/exercise/${o}/${r}/problem`,l=`/exercise/${o}/${r}/solution`;return t===a||t===l?l:a}return null}const Bu={0:"",1:"before:h-[10%]",2:"before:h-[20%]",3:"before:h-[30%]",4:"before:h-[40%]",5:"before:h-[50%]",6:"before:h-[60%]",7:"before:h-[70%]",8:"before:h-[80%]",9:"before:h-[90%]",10:"before:h-[100%]"};function $u(t){const e=ln();if(!(e!=null&&e.length))return null;const n=e.filter(o=>(o.type==="instructions"||o.type==="step"||o.type==="finished")&&o.exerciseNumber===t);if(!n.length)return null;const s=n.reduce((o,r)=>r.epicCompletedAt?o+1:o,0)/n.length,i=Math[s>.1?"floor":"ceil"](s*10);return`relative ${Bu[i]} before:bg-highlight before:absolute before:left-0 before:top-0 before:w-[4px]`}function Gu(t){const e=nr(t);return e!=null&&e.epicCompletedAt?"relative before:h-[100%] before:bg-highlight before:absolute before:left-0 before:top-0 before:w-[4px]":null}function nr({exerciseNumber:t,stepNumber:e,type:n}){const s=ln();return s!=null&&s.length?n==="workshop-finished"||n==="workshop-instructions"?s.find(i=>i.type===n)??null:n==="instructions"||n==="finished"?s.find(i=>i.type===n&&i.exerciseNumber===t)??null:n==="step"?s.find(i=>i.type===n&&i.exerciseNumber===t&&i.stepNumber===e)??null:null:null}function zu({className:t,...e}){var p,y,g,v;const n=or(),s=rr(),i=nr(e),o=b.useRef(null),r=b.useRef(null),a=(p=n.formData)!=null&&p.has("complete")?n.formData.get("complete")==="true":!!(i!=null&&i.epicCompletedAt),[l,u]=b.useState(!1),c=Vs(),h=ir(),f=(g=(y=h.location)==null?void 0:y.state)==null?void 0:g.from,d=(v=h.location)==null?void 0:v.pathname,m=c.pathname;return b.useEffect(()=>{var x;f==="continue next lesson button"&&m===d&&(u(!0),(x=r.current)==null||x.focus())},[c.key,m,d,f]),b.useEffect(()=>{let x=!0;if(l)return new Promise(A=>setTimeout(A,200)).then(async()=>{if(!x||!o.current)return;const A=o.current.getAnimations().map(({finished:P})=>P);return Promise.allSettled(A).then(()=>{x&&u(!1)})}),()=>{x=!1}},[l]),ENV.EPICSHOP_DEPLOYED||!i?null:K.jsxs(n.Form,{method:"POST",action:"/progress",children:[s,K.jsx("input",{type:"hidden",name:"lessonSlug",value:i.epicLessonSlug}),K.jsx("input",{type:"hidden",name:"complete",value:(!a).toString()}),K.jsxs(fe.button,{ref:r,onClick:()=>{u(!a)},type:"submit",className:hn("group relative flex w-full items-center justify-between overflow-hidden transition hover:bg-[hsl(var(--foreground)/0.02)] focus:bg-[hsl(var(--foreground)/0.02)]",t),children:[a?"Mark as incomplete":"Mark as complete",l?K.jsx(fe.div,{ref:o,className:"absolute right-0 h-20 w-20 rounded-full bg-foreground/20",initial:{scale:.5,opacity:0},animate:{scale:[.5,2],opacity:[0,1,0]},transition:{duration:1,ease:"easeInOut"}}):null,K.jsx(fe.div,{"aria-hidden":!0,className:hn("relative flex h-8 w-8 items-center justify-center overflow-hidden rounded-full border transition",{"bg-foreground text-background duration-1000":a,"duration-100 group-hover:bg-background":!a}),children:a?"✓":K.jsx("div",{className:"absolute -translate-y-10 opacity-25 transition group-hover:translate-y-0",children:"✓"})})]})]})}export{zu as P,ln as a,Ha as b,ur as c,hr as d,Wu as e,Gu as f,fe as m,bo as s,$u as u};
2
- //# sourceMappingURL=progress-BJ4ADF-s.js.map
@@ -1,2 +0,0 @@
1
- import{c as g,r as a,j as n}from"./index-Dsusf_Av.js";import{d as h,a as x}from"./misc-2sBiisF5.js";import{c as v}from"./components-5arJTWsS.js";const E=n.jsx("input",{type:"hidden",name:"show-progress-bar",value:"true"});function j(){const l=g(),u=v().filter(e=>{var i;return((i=e.formData)==null?void 0:i.get("show-progress-bar"))==="true"}),s=[l.state,...u.map(e=>e.state)],m=s.some(e=>e!=="idle"),t=h.useSpinDelay(m,{delay:600,minDuration:400}),o=a.useRef(null),[c,r]=a.useState(!0),d=s.every(e=>e==="idle"),p=s.some(e=>e==="submitting"),f=s.some(e=>e==="loading");return a.useEffect(()=>{if(!o.current)return;t&&r(!1);const e=o.current.getAnimations().map(({finished:i})=>i);Promise.allSettled(e).then(()=>{t||r(!0)})},[t]),n.jsx("div",{role:"progressbar","aria-hidden":t?void 0:!0,"aria-valuetext":t?"Loading":void 0,className:"fixed inset-x-0 left-0 top-0 z-50 h-[0.20rem] animate-pulse",children:n.jsx("div",{ref:o,className:x("h-full w-0 bg-highlight duration-500 ease-in-out",d&&(c?"transition-none":"w-full opacity-0 transition-all"),t&&p&&"w-5/12",t&&f&&"w-8/12")})})}export{j as E,E as s};
2
- //# sourceMappingURL=progress-bar-DgnkQxQw.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"progress-bar-DgnkQxQw.js","sources":["../../../app/components/progress-bar.tsx"],"sourcesContent":["import { useFetchers, useNavigation } from '@remix-run/react'\nimport { useEffect, useRef, useState } from 'react'\nimport { useSpinDelay } from 'spin-delay'\nimport { cn } from '#app/utils/misc.tsx'\n\nexport const showProgressBarField = (\n\t<input type=\"hidden\" name=\"show-progress-bar\" value=\"true\" />\n)\n\nfunction EpicProgress() {\n\tconst transition = useNavigation()\n\tconst fetchers = useFetchers().filter(\n\t\t(fetcher) => fetcher.formData?.get('show-progress-bar') === 'true',\n\t)\n\tconst states = [transition.state, ...fetchers.map((f) => f.state)]\n\tconst busy = states.some((s) => s !== 'idle')\n\tconst delayedPending = useSpinDelay(busy, {\n\t\tdelay: 600,\n\t\tminDuration: 400,\n\t})\n\tconst ref = useRef<HTMLDivElement>(null)\n\tconst [animationComplete, setAnimationComplete] = useState(true)\n\n\tconst isIdle = states.every((s) => s === 'idle')\n\tconst isSubmitting = states.some((s) => s === 'submitting')\n\tconst isLoading = states.some((s) => s === 'loading')\n\n\tuseEffect(() => {\n\t\tif (!ref.current) return\n\t\tif (delayedPending) setAnimationComplete(false)\n\n\t\tconst animationPromises = ref.current\n\t\t\t.getAnimations()\n\t\t\t.map(({ finished }) => finished)\n\n\t\tvoid Promise.allSettled(animationPromises).then(() => {\n\t\t\tif (!delayedPending) setAnimationComplete(true)\n\t\t})\n\t}, [delayedPending])\n\n\treturn (\n\t\t<div\n\t\t\trole=\"progressbar\"\n\t\t\taria-hidden={delayedPending ? undefined : true}\n\t\t\taria-valuetext={delayedPending ? 'Loading' : undefined}\n\t\t\tclassName=\"fixed inset-x-0 left-0 top-0 z-50 h-[0.20rem] animate-pulse\"\n\t\t>\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'h-full w-0 bg-highlight duration-500 ease-in-out',\n\t\t\t\t\tisIdle &&\n\t\t\t\t\t\t(animationComplete\n\t\t\t\t\t\t\t? 'transition-none'\n\t\t\t\t\t\t\t: 'w-full opacity-0 transition-all'),\n\t\t\t\t\tdelayedPending && isSubmitting && 'w-5/12',\n\t\t\t\t\tdelayedPending && isLoading && 'w-8/12',\n\t\t\t\t)}\n\t\t\t/>\n\t\t</div>\n\t)\n}\n\nexport { EpicProgress }\n"],"names":["showProgressBarField","EpicProgress","transition","useNavigation","fetchers","useFetchers","fetcher","_a","states","f","busy","s","delayedPending","useSpinDelay","ref","useRef","animationComplete","setAnimationComplete","useState","isIdle","isSubmitting","isLoading","useEffect","animationPromises","finished","jsx","cn"],"mappings":"iJAKa,MAAAA,QACX,QAAM,CAAA,KAAK,SAAS,KAAK,oBAAoB,MAAM,MAAO,CAAA,EAG5D,SAASC,GAAe,CACvB,MAAMC,EAAaC,EAAc,EAC3BC,EAAWC,IAAc,OAC7BC,GAAY,OAAA,QAAAC,EAAAD,EAAQ,WAAR,YAAAC,EAAkB,IAAI,wBAAyB,OAC7D,EACMC,EAAS,CAACN,EAAW,MAAO,GAAGE,EAAS,IAAKK,GAAMA,EAAE,KAAK,CAAC,EAC3DC,EAAOF,EAAO,KAAMG,GAAMA,IAAM,MAAM,EACtCC,EAAiBC,eAAaH,EAAM,CACzC,MAAO,IACP,YAAa,GAAA,CACb,EACKI,EAAMC,SAAuB,IAAI,EACjC,CAACC,EAAmBC,CAAoB,EAAIC,EAAAA,SAAS,EAAI,EAEzDC,EAASX,EAAO,MAAOG,GAAMA,IAAM,MAAM,EACzCS,EAAeZ,EAAO,KAAMG,GAAMA,IAAM,YAAY,EACpDU,EAAYb,EAAO,KAAMG,GAAMA,IAAM,SAAS,EAEpDW,OAAAA,EAAAA,UAAU,IAAM,CACX,GAAA,CAACR,EAAI,QAAS,OACdF,KAAqC,EAAK,EAExC,MAAAW,EAAoBT,EAAI,QAC5B,cAAc,EACd,IAAI,CAAC,CAAE,SAAAU,CAAS,IAAMA,CAAQ,EAE3B,QAAQ,WAAWD,CAAiB,EAAE,KAAK,IAAM,CAChDX,GAAgBK,EAAqB,EAAI,CAAA,CAC9C,CAAA,EACC,CAACL,CAAc,CAAC,EAGlBa,EAAA,IAAC,MAAA,CACA,KAAK,cACL,cAAab,EAAiB,OAAY,GAC1C,iBAAgBA,EAAiB,UAAY,OAC7C,UAAU,8DAEV,SAAAa,EAAA,IAAC,MAAA,CACA,IAAAX,EACA,UAAWY,EACV,mDACAP,IACEH,EACE,kBACA,mCACJJ,GAAkBQ,GAAgB,SAClCR,GAAkBS,GAAa,QAAA,CAChC,CAAA,CACD,CACD,CAEF"}