@epic-web/workshop-app 4.0.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 (2191) hide show
  1. package/README.md +10 -0
  2. package/bin/epicshop.js +84 -0
  3. package/build/client/app-default.css +39 -0
  4. package/build/client/assets/_-ByTWgb53.js +2 -0
  5. package/build/client/assets/_-ByTWgb53.js.map +1 -0
  6. package/build/client/assets/_-l0sNRNKZ.js +2 -0
  7. package/build/client/assets/_-l0sNRNKZ.js.map +1 -0
  8. package/build/client/assets/_exerciseNumber-B_VU-pG1.js +2 -0
  9. package/build/client/assets/_exerciseNumber-B_VU-pG1.js.map +1 -0
  10. package/build/client/assets/_exerciseNumber_._stepNumber-D1wwEMQx.js +2 -0
  11. package/build/client/assets/_exerciseNumber_._stepNumber-D1wwEMQx.js.map +1 -0
  12. package/build/client/assets/_exerciseNumber_._stepNumber.index-l0sNRNKZ.js +2 -0
  13. package/build/client/assets/_exerciseNumber_._stepNumber.index-l0sNRNKZ.js.map +1 -0
  14. package/build/client/assets/_exerciseNumber_.finished-DldgXnJy.js +2 -0
  15. package/build/client/assets/_exerciseNumber_.finished-DldgXnJy.js.map +1 -0
  16. package/build/client/assets/_layout--icRfEZS.js +2 -0
  17. package/build/client/assets/_layout--icRfEZS.js.map +1 -0
  18. package/build/client/assets/_layout-BaPtC79F.js +2 -0
  19. package/build/client/assets/_layout-BaPtC79F.js.map +1 -0
  20. package/build/client/assets/_layout-Bj9PyQQD.js +2 -0
  21. package/build/client/assets/_layout-Bj9PyQQD.js.map +1 -0
  22. package/build/client/assets/_layout-CIgVeko6.js +2 -0
  23. package/build/client/assets/_layout-CIgVeko6.js.map +1 -0
  24. package/build/client/assets/account-Bk4o4AzZ.js +2 -0
  25. package/build/client/assets/account-Bk4o4AzZ.js.map +1 -0
  26. package/build/client/assets/api._-l0sNRNKZ.js +2 -0
  27. package/build/client/assets/api._-l0sNRNKZ.js.map +1 -0
  28. package/build/client/assets/app-B0HiIPBO.css +1 -0
  29. package/build/client/assets/app._id-l0sNRNKZ.js +2 -0
  30. package/build/client/assets/app._id-l0sNRNKZ.js.map +1 -0
  31. package/build/client/assets/app._id._-l0sNRNKZ.js +2 -0
  32. package/build/client/assets/app._id._-l0sNRNKZ.js.map +1 -0
  33. package/build/client/assets/app._id.api._-l0sNRNKZ.js +2 -0
  34. package/build/client/assets/app._id.api._-l0sNRNKZ.js.map +1 -0
  35. package/build/client/assets/app._id.epic_ws_.js_-l0sNRNKZ.js +2 -0
  36. package/build/client/assets/app._id.epic_ws_.js_-l0sNRNKZ.js.map +1 -0
  37. package/build/client/assets/app._id.test._testName-l0sNRNKZ.js +2 -0
  38. package/build/client/assets/app._id.test._testName-l0sNRNKZ.js.map +1 -0
  39. package/build/client/assets/apps-DP2rzg_V.js +2 -0
  40. package/build/client/assets/apps-DP2rzg_V.js.map +1 -0
  41. package/build/client/assets/apps-l0sNRNKZ.js +2 -0
  42. package/build/client/assets/apps-l0sNRNKZ.js.map +1 -0
  43. package/build/client/assets/button-DnQOyJAN.js +2 -0
  44. package/build/client/assets/button-DnQOyJAN.js.map +1 -0
  45. package/build/client/assets/client-hints-BHTHvBjk.js +24 -0
  46. package/build/client/assets/client-hints-BHTHvBjk.js.map +1 -0
  47. package/build/client/assets/clsx-B-dksMZM.js +2 -0
  48. package/build/client/assets/clsx-B-dksMZM.js.map +1 -0
  49. package/build/client/assets/components-Dj3sm47B.js +100 -0
  50. package/build/client/assets/components-Dj3sm47B.js.map +1 -0
  51. package/build/client/assets/diff-Blb5EPiO.js +2 -0
  52. package/build/client/assets/diff-Blb5EPiO.js.map +1 -0
  53. package/build/client/assets/diff-MSYB00VZ.js +42 -0
  54. package/build/client/assets/diff-MSYB00VZ.js.map +1 -0
  55. package/build/client/assets/discord-CK7yz4w6.js +2 -0
  56. package/build/client/assets/discord-CK7yz4w6.js.map +1 -0
  57. package/build/client/assets/discord-CsluX01E.js +2 -0
  58. package/build/client/assets/discord-CsluX01E.js.map +1 -0
  59. package/build/client/assets/discord.callback-l0sNRNKZ.js +2 -0
  60. package/build/client/assets/discord.callback-l0sNRNKZ.js.map +1 -0
  61. package/build/client/assets/entry.client-DBBrAxtJ.js +73 -0
  62. package/build/client/assets/entry.client-DBBrAxtJ.js.map +1 -0
  63. package/build/client/assets/epic-video-BwJwnV_j.js +2992 -0
  64. package/build/client/assets/epic-video-BwJwnV_j.js.map +1 -0
  65. package/build/client/assets/epic-video-DUnRvy1A.css +1 -0
  66. package/build/client/assets/error-boundary-Bg54_knF.js +2 -0
  67. package/build/client/assets/error-boundary-Bg54_knF.js.map +1 -0
  68. package/build/client/assets/exercises-l0sNRNKZ.js +2 -0
  69. package/build/client/assets/exercises-l0sNRNKZ.js.map +1 -0
  70. package/build/client/assets/finished-CGll5TOI.js +2 -0
  71. package/build/client/assets/finished-CGll5TOI.js.map +1 -0
  72. package/build/client/assets/index-B8k-Gd1G.js +2 -0
  73. package/build/client/assets/index-B8k-Gd1G.js.map +1 -0
  74. package/build/client/assets/index-BL4aE6WC.js +8 -0
  75. package/build/client/assets/index-BL4aE6WC.js.map +1 -0
  76. package/build/client/assets/index-BfoHqrT5.js +2 -0
  77. package/build/client/assets/index-BfoHqrT5.js.map +1 -0
  78. package/build/client/assets/index-D1WEsmVZ.js +36 -0
  79. package/build/client/assets/index-D1WEsmVZ.js.map +1 -0
  80. package/build/client/assets/index-DP2rzg_V.js +2 -0
  81. package/build/client/assets/index-DP2rzg_V.js.map +1 -0
  82. package/build/client/assets/index-DqBktlAI.js +2 -0
  83. package/build/client/assets/index-DqBktlAI.js.map +1 -0
  84. package/build/client/assets/index-K6Dvbx-E.js +2 -0
  85. package/build/client/assets/index-K6Dvbx-E.js.map +1 -0
  86. package/build/client/assets/index-l0sNRNKZ.js +2 -0
  87. package/build/client/assets/index-l0sNRNKZ.js.map +1 -0
  88. package/build/client/assets/index-zG3_j9lj.js +2 -0
  89. package/build/client/assets/index-zG3_j9lj.js.map +1 -0
  90. package/build/client/assets/kcd_ws_.js_-l0sNRNKZ.js +2 -0
  91. package/build/client/assets/kcd_ws_.js_-l0sNRNKZ.js.map +1 -0
  92. package/build/client/assets/launch-editor-l0sNRNKZ.js +2 -0
  93. package/build/client/assets/launch-editor-l0sNRNKZ.js.map +1 -0
  94. package/build/client/assets/loading-CaagEELb.js +2 -0
  95. package/build/client/assets/loading-CaagEELb.js.map +1 -0
  96. package/build/client/assets/login-2BiFV7_R.js +2 -0
  97. package/build/client/assets/login-2BiFV7_R.js.map +1 -0
  98. package/build/client/assets/login-sse-l0sNRNKZ.js +2 -0
  99. package/build/client/assets/login-sse-l0sNRNKZ.js.map +1 -0
  100. package/build/client/assets/manifest-92896199.js +1 -0
  101. package/build/client/assets/mdx-DdywIxB6.js +2 -0
  102. package/build/client/assets/mdx-DdywIxB6.js.map +1 -0
  103. package/build/client/assets/misc-CXGQ7VS9.js +2 -0
  104. package/build/client/assets/misc-CXGQ7VS9.js.map +1 -0
  105. package/build/client/assets/nav-chevrons-D8c9lJW6.js +2 -0
  106. package/build/client/assets/nav-chevrons-D8c9lJW6.js.map +1 -0
  107. package/build/client/assets/onboarding-eFvyCmxD.js +2 -0
  108. package/build/client/assets/onboarding-eFvyCmxD.js.map +1 -0
  109. package/build/client/assets/presence-u-05JV3Z.js +28 -0
  110. package/build/client/assets/presence-u-05JV3Z.js.map +1 -0
  111. package/build/client/assets/processes-l0sNRNKZ.js +2 -0
  112. package/build/client/assets/processes-l0sNRNKZ.js.map +1 -0
  113. package/build/client/assets/progress-CBZt2pmu.js +2 -0
  114. package/build/client/assets/progress-CBZt2pmu.js.map +1 -0
  115. package/build/client/assets/progress-bar-DX6yYES2.js +2 -0
  116. package/build/client/assets/progress-bar-DX6yYES2.js.map +1 -0
  117. package/build/client/assets/progress-l0sNRNKZ.js +2 -0
  118. package/build/client/assets/progress-l0sNRNKZ.js.map +1 -0
  119. package/build/client/assets/root-BLcghf_N.js +68 -0
  120. package/build/client/assets/root-BLcghf_N.js.map +1 -0
  121. package/build/client/assets/set-playground-l0sNRNKZ.js +2 -0
  122. package/build/client/assets/set-playground-l0sNRNKZ.js.map +1 -0
  123. package/build/client/assets/start-l0sNRNKZ.js +2 -0
  124. package/build/client/assets/start-l0sNRNKZ.js.map +1 -0
  125. package/build/client/assets/support-QTdmLyE7.js +2 -0
  126. package/build/client/assets/support-QTdmLyE7.js.map +1 -0
  127. package/build/client/assets/tailwind-BStGdHyu.css +1 -0
  128. package/build/client/assets/test-l0sNRNKZ.js +2 -0
  129. package/build/client/assets/test-l0sNRNKZ.js.map +1 -0
  130. package/build/client/assets/test._testName-l0sNRNKZ.js +2 -0
  131. package/build/client/assets/test._testName-l0sNRNKZ.js.map +1 -0
  132. package/build/client/assets/tooltip-CVFWPOu0.js +2 -0
  133. package/build/client/assets/tooltip-CVFWPOu0.js.map +1 -0
  134. package/build/client/assets/update-mdx-cache-l0sNRNKZ.js +2 -0
  135. package/build/client/assets/update-mdx-cache-l0sNRNKZ.js.map +1 -0
  136. package/build/client/assets/use-event-source-DXlRuRq2.js +2 -0
  137. package/build/client/assets/use-event-source-DXlRuRq2.js.map +1 -0
  138. package/build/client/assets/user-DiGtbaa7.js +2 -0
  139. package/build/client/assets/user-DiGtbaa7.js.map +1 -0
  140. package/build/client/favicon.ico +0 -0
  141. package/build/client/favicon.png +0 -0
  142. package/build/client/favicon.svg +13 -0
  143. package/build/client/fonts/neogrotesk/0b8b755c-fee2-4661-9c8b-c5d1fbea901b.woff2 +0 -0
  144. package/build/client/fonts/neogrotesk/146d9d20-3e53-4e5d-beb2-1209bba5ac61.woff2 +0 -0
  145. package/build/client/fonts/neogrotesk/1798ef2b-5ee0-4f39-8b2c-ae3e36f07cd1.woff2 +0 -0
  146. package/build/client/fonts/neogrotesk/1eb2cb40-6822-4654-856c-8cbe652366b6.woff +0 -0
  147. package/build/client/fonts/neogrotesk/3b64793c-0bdb-4e4f-bf0e-cdf2e974d5f2.woff +0 -0
  148. package/build/client/fonts/neogrotesk/3bb44ed4-cf17-469c-8d0d-5946d10fdad1.woff +0 -0
  149. package/build/client/fonts/neogrotesk/4bd29470-1701-41fe-94b6-4a147512160c.woff +0 -0
  150. package/build/client/fonts/neogrotesk/5cdbf070-a094-44c8-b8f1-17a00a19c959.woff2 +0 -0
  151. package/build/client/fonts/neogrotesk/6d439be9-37df-4912-ac09-388ce938fa46.woff2 +0 -0
  152. package/build/client/fonts/neogrotesk/7fc2971f-a9c2-4e09-bd24-bfd4ee6e97b3.woff +0 -0
  153. package/build/client/fonts/neogrotesk/861b65ee-56bd-4057-9af4-3b2903af231e.woff +0 -0
  154. package/build/client/fonts/neogrotesk/8cf836d9-a49e-4387-bcbd-4800766e5d24.woff +0 -0
  155. package/build/client/fonts/neogrotesk/8d61128d-534c-4793-9668-b98bcc2e5969.woff2 +0 -0
  156. package/build/client/fonts/neogrotesk/98423f75-c341-4161-8b92-7cd5c05081e5.woff +0 -0
  157. package/build/client/fonts/neogrotesk/a1456726-ad0d-4f5e-9d8f-ce92e8ce375d.woff2 +0 -0
  158. package/build/client/fonts/neogrotesk/af81e7d2-0bb1-4aa0-bc76-adb78338c568.woff +0 -0
  159. package/build/client/fonts/neogrotesk/d1302ad5-ceee-47cb-a0fa-2da6bd0d4d54.woff2 +0 -0
  160. package/build/client/fonts/neogrotesk/e7e15c31-aad1-4384-abd3-0671ccd03251.woff +0 -0
  161. package/build/client/fonts/neogrotesk/ec6cb127-161b-469c-9816-69489032a234.woff2 +0 -0
  162. package/build/client/fonts/neogrotesk/f480430c-6c50-4ae3-9abb-e92c484f84d6.woff2 +0 -0
  163. package/build/client/icons.svg +529 -0
  164. package/build/client/neogrotesk-font.css +100 -0
  165. package/build/server/index.js +12875 -0
  166. package/build/server/index.js.map +1 -0
  167. package/dist/server/index.js +176 -0
  168. package/node_modules/@babel/runtime/LICENSE +22 -0
  169. package/node_modules/@babel/runtime/README.md +19 -0
  170. package/node_modules/@babel/runtime/helpers/AsyncGenerator.js +64 -0
  171. package/node_modules/@babel/runtime/helpers/AwaitValue.js +4 -0
  172. package/node_modules/@babel/runtime/helpers/OverloadYield.js +4 -0
  173. package/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js +24 -0
  174. package/node_modules/@babel/runtime/helpers/applyDecs.js +236 -0
  175. package/node_modules/@babel/runtime/helpers/applyDecs2203.js +184 -0
  176. package/node_modules/@babel/runtime/helpers/applyDecs2203R.js +191 -0
  177. package/node_modules/@babel/runtime/helpers/applyDecs2301.js +222 -0
  178. package/node_modules/@babel/runtime/helpers/applyDecs2305.js +133 -0
  179. package/node_modules/@babel/runtime/helpers/applyDecs2311.js +124 -0
  180. package/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +6 -0
  181. package/node_modules/@babel/runtime/helpers/arrayWithHoles.js +4 -0
  182. package/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +5 -0
  183. package/node_modules/@babel/runtime/helpers/assertClassBrand.js +5 -0
  184. package/node_modules/@babel/runtime/helpers/assertThisInitialized.js +7 -0
  185. package/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js +24 -0
  186. package/node_modules/@babel/runtime/helpers/asyncIterator.js +45 -0
  187. package/node_modules/@babel/runtime/helpers/asyncToGenerator.js +31 -0
  188. package/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js +5 -0
  189. package/node_modules/@babel/runtime/helpers/callSuper.js +7 -0
  190. package/node_modules/@babel/runtime/helpers/checkInRHS.js +6 -0
  191. package/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js +6 -0
  192. package/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +18 -0
  193. package/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +7 -0
  194. package/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +11 -0
  195. package/node_modules/@babel/runtime/helpers/classCallCheck.js +6 -0
  196. package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +5 -0
  197. package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +6 -0
  198. package/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +5 -0
  199. package/node_modules/@babel/runtime/helpers/classNameTDZError.js +4 -0
  200. package/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +7 -0
  201. package/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +7 -0
  202. package/node_modules/@babel/runtime/helpers/classPrivateFieldGet2.js +5 -0
  203. package/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js +6 -0
  204. package/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js +7 -0
  205. package/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js +5 -0
  206. package/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +8 -0
  207. package/node_modules/@babel/runtime/helpers/classPrivateFieldSet2.js +5 -0
  208. package/node_modules/@babel/runtime/helpers/classPrivateGetter.js +5 -0
  209. package/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +6 -0
  210. package/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js +6 -0
  211. package/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +4 -0
  212. package/node_modules/@babel/runtime/helpers/classPrivateSetter.js +5 -0
  213. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +9 -0
  214. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +9 -0
  215. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +10 -0
  216. package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js +6 -0
  217. package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +4 -0
  218. package/node_modules/@babel/runtime/helpers/construct.js +10 -0
  219. package/node_modules/@babel/runtime/helpers/createClass.js +19 -0
  220. package/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +53 -0
  221. package/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js +20 -0
  222. package/node_modules/@babel/runtime/helpers/createSuper.js +18 -0
  223. package/node_modules/@babel/runtime/helpers/decorate.js +343 -0
  224. package/node_modules/@babel/runtime/helpers/defaults.js +12 -0
  225. package/node_modules/@babel/runtime/helpers/defineAccessor.js +8 -0
  226. package/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +20 -0
  227. package/node_modules/@babel/runtime/helpers/defineProperty.js +16 -0
  228. package/node_modules/@babel/runtime/helpers/dispose.js +28 -0
  229. package/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js +63 -0
  230. package/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +3 -0
  231. package/node_modules/@babel/runtime/helpers/esm/OverloadYield.js +3 -0
  232. package/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js +23 -0
  233. package/node_modules/@babel/runtime/helpers/esm/applyDecs.js +235 -0
  234. package/node_modules/@babel/runtime/helpers/esm/applyDecs2203.js +183 -0
  235. package/node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js +190 -0
  236. package/node_modules/@babel/runtime/helpers/esm/applyDecs2301.js +221 -0
  237. package/node_modules/@babel/runtime/helpers/esm/applyDecs2305.js +132 -0
  238. package/node_modules/@babel/runtime/helpers/esm/applyDecs2311.js +123 -0
  239. package/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +5 -0
  240. package/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +3 -0
  241. package/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +4 -0
  242. package/node_modules/@babel/runtime/helpers/esm/assertClassBrand.js +4 -0
  243. package/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +6 -0
  244. package/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js +23 -0
  245. package/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +44 -0
  246. package/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +30 -0
  247. package/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js +4 -0
  248. package/node_modules/@babel/runtime/helpers/esm/callSuper.js +6 -0
  249. package/node_modules/@babel/runtime/helpers/esm/checkInRHS.js +5 -0
  250. package/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js +5 -0
  251. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +17 -0
  252. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +6 -0
  253. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +10 -0
  254. package/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +5 -0
  255. package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +4 -0
  256. package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +5 -0
  257. package/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +4 -0
  258. package/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js +3 -0
  259. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +6 -0
  260. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +6 -0
  261. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js +4 -0
  262. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js +5 -0
  263. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js +6 -0
  264. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js +4 -0
  265. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +7 -0
  266. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js +4 -0
  267. package/node_modules/@babel/runtime/helpers/esm/classPrivateGetter.js +4 -0
  268. package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +5 -0
  269. package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js +5 -0
  270. package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +3 -0
  271. package/node_modules/@babel/runtime/helpers/esm/classPrivateSetter.js +4 -0
  272. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +8 -0
  273. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +8 -0
  274. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +9 -0
  275. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js +5 -0
  276. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +3 -0
  277. package/node_modules/@babel/runtime/helpers/esm/construct.js +9 -0
  278. package/node_modules/@babel/runtime/helpers/esm/createClass.js +18 -0
  279. package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +52 -0
  280. package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js +19 -0
  281. package/node_modules/@babel/runtime/helpers/esm/createSuper.js +17 -0
  282. package/node_modules/@babel/runtime/helpers/esm/decorate.js +342 -0
  283. package/node_modules/@babel/runtime/helpers/esm/defaults.js +11 -0
  284. package/node_modules/@babel/runtime/helpers/esm/defineAccessor.js +7 -0
  285. package/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +19 -0
  286. package/node_modules/@babel/runtime/helpers/esm/defineProperty.js +15 -0
  287. package/node_modules/@babel/runtime/helpers/esm/dispose.js +27 -0
  288. package/node_modules/@babel/runtime/helpers/esm/extends.js +14 -0
  289. package/node_modules/@babel/runtime/helpers/esm/get.js +17 -0
  290. package/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +6 -0
  291. package/node_modules/@babel/runtime/helpers/esm/identity.js +3 -0
  292. package/node_modules/@babel/runtime/helpers/esm/importDeferProxy.js +26 -0
  293. package/node_modules/@babel/runtime/helpers/esm/inherits.js +17 -0
  294. package/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +6 -0
  295. package/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js +9 -0
  296. package/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js +3 -0
  297. package/node_modules/@babel/runtime/helpers/esm/instanceof.js +7 -0
  298. package/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js +5 -0
  299. package/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +26 -0
  300. package/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +7 -0
  301. package/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +8 -0
  302. package/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +3 -0
  303. package/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +27 -0
  304. package/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js +9 -0
  305. package/node_modules/@babel/runtime/helpers/esm/jsx.js +21 -0
  306. package/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js +8 -0
  307. package/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js +5 -0
  308. package/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +3 -0
  309. package/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +3 -0
  310. package/node_modules/@babel/runtime/helpers/esm/nullishReceiverError.js +3 -0
  311. package/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js +3 -0
  312. package/node_modules/@babel/runtime/helpers/esm/objectSpread.js +16 -0
  313. package/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +22 -0
  314. package/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +16 -0
  315. package/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +12 -0
  316. package/node_modules/@babel/runtime/helpers/esm/package.json +3 -0
  317. package/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +10 -0
  318. package/node_modules/@babel/runtime/helpers/esm/readOnlyError.js +3 -0
  319. package/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js +303 -0
  320. package/node_modules/@babel/runtime/helpers/esm/set.js +40 -0
  321. package/node_modules/@babel/runtime/helpers/esm/setFunctionName.js +11 -0
  322. package/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +7 -0
  323. package/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js +7 -0
  324. package/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +7 -0
  325. package/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js +7 -0
  326. package/node_modules/@babel/runtime/helpers/esm/superPropBase.js +8 -0
  327. package/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +10 -0
  328. package/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js +7 -0
  329. package/node_modules/@babel/runtime/helpers/esm/tdz.js +3 -0
  330. package/node_modules/@babel/runtime/helpers/esm/temporalRef.js +5 -0
  331. package/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js +1 -0
  332. package/node_modules/@babel/runtime/helpers/esm/toArray.js +7 -0
  333. package/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +7 -0
  334. package/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +11 -0
  335. package/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +6 -0
  336. package/node_modules/@babel/runtime/helpers/esm/toSetter.js +9 -0
  337. package/node_modules/@babel/runtime/helpers/esm/typeof.js +9 -0
  338. package/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +9 -0
  339. package/node_modules/@babel/runtime/helpers/esm/using.js +11 -0
  340. package/node_modules/@babel/runtime/helpers/esm/usingCtx.js +43 -0
  341. package/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +6 -0
  342. package/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +30 -0
  343. package/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +50 -0
  344. package/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js +3 -0
  345. package/node_modules/@babel/runtime/helpers/extends.js +15 -0
  346. package/node_modules/@babel/runtime/helpers/get.js +18 -0
  347. package/node_modules/@babel/runtime/helpers/getPrototypeOf.js +7 -0
  348. package/node_modules/@babel/runtime/helpers/identity.js +4 -0
  349. package/node_modules/@babel/runtime/helpers/importDeferProxy.js +27 -0
  350. package/node_modules/@babel/runtime/helpers/inherits.js +18 -0
  351. package/node_modules/@babel/runtime/helpers/inheritsLoose.js +7 -0
  352. package/node_modules/@babel/runtime/helpers/initializerDefineProperty.js +10 -0
  353. package/node_modules/@babel/runtime/helpers/initializerWarningHelper.js +4 -0
  354. package/node_modules/@babel/runtime/helpers/instanceof.js +8 -0
  355. package/node_modules/@babel/runtime/helpers/interopRequireDefault.js +6 -0
  356. package/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +27 -0
  357. package/node_modules/@babel/runtime/helpers/isNativeFunction.js +8 -0
  358. package/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +9 -0
  359. package/node_modules/@babel/runtime/helpers/iterableToArray.js +4 -0
  360. package/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +28 -0
  361. package/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js +10 -0
  362. package/node_modules/@babel/runtime/helpers/jsx.js +22 -0
  363. package/node_modules/@babel/runtime/helpers/maybeArrayLike.js +9 -0
  364. package/node_modules/@babel/runtime/helpers/newArrowCheck.js +6 -0
  365. package/node_modules/@babel/runtime/helpers/nonIterableRest.js +4 -0
  366. package/node_modules/@babel/runtime/helpers/nonIterableSpread.js +4 -0
  367. package/node_modules/@babel/runtime/helpers/nullishReceiverError.js +4 -0
  368. package/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js +4 -0
  369. package/node_modules/@babel/runtime/helpers/objectSpread.js +17 -0
  370. package/node_modules/@babel/runtime/helpers/objectSpread2.js +23 -0
  371. package/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +17 -0
  372. package/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +13 -0
  373. package/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +11 -0
  374. package/node_modules/@babel/runtime/helpers/readOnlyError.js +4 -0
  375. package/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +304 -0
  376. package/node_modules/@babel/runtime/helpers/set.js +41 -0
  377. package/node_modules/@babel/runtime/helpers/setFunctionName.js +12 -0
  378. package/node_modules/@babel/runtime/helpers/setPrototypeOf.js +8 -0
  379. package/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js +8 -0
  380. package/node_modules/@babel/runtime/helpers/slicedToArray.js +8 -0
  381. package/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js +8 -0
  382. package/node_modules/@babel/runtime/helpers/superPropBase.js +9 -0
  383. package/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +11 -0
  384. package/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js +8 -0
  385. package/node_modules/@babel/runtime/helpers/tdz.js +4 -0
  386. package/node_modules/@babel/runtime/helpers/temporalRef.js +6 -0
  387. package/node_modules/@babel/runtime/helpers/temporalUndefined.js +2 -0
  388. package/node_modules/@babel/runtime/helpers/toArray.js +8 -0
  389. package/node_modules/@babel/runtime/helpers/toConsumableArray.js +8 -0
  390. package/node_modules/@babel/runtime/helpers/toPrimitive.js +12 -0
  391. package/node_modules/@babel/runtime/helpers/toPropertyKey.js +7 -0
  392. package/node_modules/@babel/runtime/helpers/toSetter.js +10 -0
  393. package/node_modules/@babel/runtime/helpers/typeof.js +10 -0
  394. package/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +10 -0
  395. package/node_modules/@babel/runtime/helpers/using.js +12 -0
  396. package/node_modules/@babel/runtime/helpers/usingCtx.js +44 -0
  397. package/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +7 -0
  398. package/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +31 -0
  399. package/node_modules/@babel/runtime/helpers/wrapRegExp.js +51 -0
  400. package/node_modules/@babel/runtime/helpers/writeOnlyError.js +4 -0
  401. package/node_modules/@babel/runtime/package.json +1065 -0
  402. package/node_modules/@babel/runtime/regenerator/index.js +15 -0
  403. package/node_modules/@conform-to/dom/LICENSE +21 -0
  404. package/node_modules/@conform-to/dom/README +37 -0
  405. package/node_modules/@conform-to/dom/_virtual/_rollupPluginBabelHelpers.js +58 -0
  406. package/node_modules/@conform-to/dom/_virtual/_rollupPluginBabelHelpers.mjs +51 -0
  407. package/node_modules/@conform-to/dom/dom.d.ts +43 -0
  408. package/node_modules/@conform-to/dom/dom.js +104 -0
  409. package/node_modules/@conform-to/dom/dom.mjs +95 -0
  410. package/node_modules/@conform-to/dom/form.d.ts +147 -0
  411. package/node_modules/@conform-to/dom/form.js +578 -0
  412. package/node_modules/@conform-to/dom/form.mjs +574 -0
  413. package/node_modules/@conform-to/dom/formdata.d.ts +61 -0
  414. package/node_modules/@conform-to/dom/formdata.js +234 -0
  415. package/node_modules/@conform-to/dom/formdata.mjs +220 -0
  416. package/node_modules/@conform-to/dom/index.d.ts +4 -0
  417. package/node_modules/@conform-to/dom/index.js +20 -0
  418. package/node_modules/@conform-to/dom/index.mjs +4 -0
  419. package/node_modules/@conform-to/dom/package.json +42 -0
  420. package/node_modules/@conform-to/dom/submission.d.ts +135 -0
  421. package/node_modules/@conform-to/dom/submission.js +303 -0
  422. package/node_modules/@conform-to/dom/submission.mjs +286 -0
  423. package/node_modules/@conform-to/dom/util.d.ts +3 -0
  424. package/node_modules/@conform-to/dom/util.js +19 -0
  425. package/node_modules/@conform-to/dom/util.mjs +13 -0
  426. package/node_modules/@conform-to/react/LICENSE +21 -0
  427. package/node_modules/@conform-to/react/README +37 -0
  428. package/node_modules/@conform-to/react/_virtual/_rollupPluginBabelHelpers.js +87 -0
  429. package/node_modules/@conform-to/react/_virtual/_rollupPluginBabelHelpers.mjs +78 -0
  430. package/node_modules/@conform-to/react/context.d.ts +72 -0
  431. package/node_modules/@conform-to/react/context.js +258 -0
  432. package/node_modules/@conform-to/react/context.mjs +243 -0
  433. package/node_modules/@conform-to/react/helpers.d.ts +208 -0
  434. package/node_modules/@conform-to/react/helpers.js +222 -0
  435. package/node_modules/@conform-to/react/helpers.mjs +211 -0
  436. package/node_modules/@conform-to/react/hooks.d.ts +34 -0
  437. package/node_modules/@conform-to/react/hooks.js +88 -0
  438. package/node_modules/@conform-to/react/hooks.mjs +79 -0
  439. package/node_modules/@conform-to/react/index.d.ts +5 -0
  440. package/node_modules/@conform-to/react/index.js +30 -0
  441. package/node_modules/@conform-to/react/index.mjs +5 -0
  442. package/node_modules/@conform-to/react/integrations.d.ts +45 -0
  443. package/node_modules/@conform-to/react/integrations.js +285 -0
  444. package/node_modules/@conform-to/react/integrations.mjs +271 -0
  445. package/node_modules/@conform-to/react/package.json +53 -0
  446. package/node_modules/@conform-to/zod/LICENSE +21 -0
  447. package/node_modules/@conform-to/zod/README +37 -0
  448. package/node_modules/@conform-to/zod/_virtual/_rollupPluginBabelHelpers.js +58 -0
  449. package/node_modules/@conform-to/zod/_virtual/_rollupPluginBabelHelpers.mjs +51 -0
  450. package/node_modules/@conform-to/zod/coercion.d.ts +26 -0
  451. package/node_modules/@conform-to/zod/coercion.js +169 -0
  452. package/node_modules/@conform-to/zod/coercion.mjs +162 -0
  453. package/node_modules/@conform-to/zod/constraint.d.ts +3 -0
  454. package/node_modules/@conform-to/zod/constraint.js +100 -0
  455. package/node_modules/@conform-to/zod/constraint.mjs +96 -0
  456. package/node_modules/@conform-to/zod/index.d.ts +2 -0
  457. package/node_modules/@conform-to/zod/index.js +12 -0
  458. package/node_modules/@conform-to/zod/index.mjs +2 -0
  459. package/node_modules/@conform-to/zod/package.json +46 -0
  460. package/node_modules/@conform-to/zod/parse.d.ts +28 -0
  461. package/node_modules/@conform-to/zod/parse.js +64 -0
  462. package/node_modules/@conform-to/zod/parse.mjs +59 -0
  463. package/node_modules/@epic-web/client-hints/README.md +221 -0
  464. package/node_modules/@epic-web/client-hints/dist/color-scheme.d.ts +12 -0
  465. package/node_modules/@epic-web/client-hints/dist/color-scheme.js +25 -0
  466. package/node_modules/@epic-web/client-hints/dist/index.d.ts +6 -0
  467. package/node_modules/@epic-web/client-hints/dist/index.js +67 -0
  468. package/node_modules/@epic-web/client-hints/dist/reduced-motion.d.ts +12 -0
  469. package/node_modules/@epic-web/client-hints/dist/reduced-motion.js +25 -0
  470. package/node_modules/@epic-web/client-hints/dist/time-zone.d.ts +5 -0
  471. package/node_modules/@epic-web/client-hints/dist/time-zone.js +5 -0
  472. package/node_modules/@epic-web/client-hints/dist/utils.d.ts +9 -0
  473. package/node_modules/@epic-web/client-hints/dist/utils.js +1 -0
  474. package/node_modules/@epic-web/client-hints/package.json +71 -0
  475. package/node_modules/@epic-web/restore-scroll/README.md +103 -0
  476. package/node_modules/@epic-web/restore-scroll/dist/index.d.ts +4 -0
  477. package/node_modules/@epic-web/restore-scroll/dist/index.js +77 -0
  478. package/node_modules/@epic-web/restore-scroll/package.json +64 -0
  479. package/node_modules/@floating-ui/core/LICENSE +20 -0
  480. package/node_modules/@floating-ui/core/README.md +4 -0
  481. package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs +1 -0
  482. package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.mjs +1141 -0
  483. package/node_modules/@floating-ui/core/dist/floating-ui.core.d.mts +521 -0
  484. package/node_modules/@floating-ui/core/dist/floating-ui.core.d.ts +521 -0
  485. package/node_modules/@floating-ui/core/dist/floating-ui.core.esm.js +1022 -0
  486. package/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +1022 -0
  487. package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.js +1160 -0
  488. package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.min.js +1 -0
  489. package/node_modules/@floating-ui/core/package.json +62 -0
  490. package/node_modules/@floating-ui/dom/LICENSE +20 -0
  491. package/node_modules/@floating-ui/dom/README.md +4 -0
  492. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.min.mjs +1 -0
  493. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.mjs +816 -0
  494. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.mts +315 -0
  495. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts +315 -0
  496. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js +679 -0
  497. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +679 -0
  498. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.js +840 -0
  499. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.min.js +1 -0
  500. package/node_modules/@floating-ui/dom/package.json +70 -0
  501. package/node_modules/@floating-ui/react-dom/LICENSE +20 -0
  502. package/node_modules/@floating-ui/react-dom/README.md +3 -0
  503. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.d.mts +258 -0
  504. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.d.ts +258 -0
  505. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js +273 -0
  506. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs +273 -0
  507. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.umd.js +348 -0
  508. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.umd.min.js +1 -0
  509. package/node_modules/@floating-ui/react-dom/package.json +76 -0
  510. package/node_modules/@floating-ui/utils/LICENSE +20 -0
  511. package/node_modules/@floating-ui/utils/README.md +4 -0
  512. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.browser.min.mjs +1 -0
  513. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.browser.mjs +129 -0
  514. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.mts +98 -0
  515. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.ts +98 -0
  516. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.browser.min.mjs +1 -0
  517. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.browser.mjs +128 -0
  518. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.mts +43 -0
  519. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.ts +43 -0
  520. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.esm.js +128 -0
  521. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +128 -0
  522. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.js +153 -0
  523. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.min.js +1 -0
  524. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.esm.js +129 -0
  525. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +129 -0
  526. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.js +160 -0
  527. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.min.js +1 -0
  528. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.d.ts +43 -0
  529. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js +128 -0
  530. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.umd.js +153 -0
  531. package/node_modules/@floating-ui/utils/dom/package.json +6 -0
  532. package/node_modules/@floating-ui/utils/package.json +69 -0
  533. package/node_modules/@radix-ui/number/README.md +13 -0
  534. package/node_modules/@radix-ui/number/dist/index.d.mts +3 -0
  535. package/node_modules/@radix-ui/number/dist/index.d.ts +3 -0
  536. package/node_modules/@radix-ui/number/dist/index.d.ts.map +1 -0
  537. package/node_modules/@radix-ui/number/dist/index.js +13 -0
  538. package/node_modules/@radix-ui/number/dist/index.js.map +1 -0
  539. package/node_modules/@radix-ui/number/dist/index.mjs +9 -0
  540. package/node_modules/@radix-ui/number/dist/index.mjs.map +1 -0
  541. package/node_modules/@radix-ui/number/package.json +41 -0
  542. package/node_modules/@radix-ui/primitive/README.md +13 -0
  543. package/node_modules/@radix-ui/primitive/dist/index.d.mts +5 -0
  544. package/node_modules/@radix-ui/primitive/dist/index.d.ts +5 -0
  545. package/node_modules/@radix-ui/primitive/dist/index.d.ts.map +1 -0
  546. package/node_modules/@radix-ui/primitive/dist/index.js +16 -0
  547. package/node_modules/@radix-ui/primitive/dist/index.js.map +1 -0
  548. package/node_modules/@radix-ui/primitive/dist/index.mjs +12 -0
  549. package/node_modules/@radix-ui/primitive/dist/index.mjs.map +1 -0
  550. package/node_modules/@radix-ui/primitive/package.json +41 -0
  551. package/node_modules/@radix-ui/react-accordion/README.md +13 -0
  552. package/node_modules/@radix-ui/react-accordion/dist/index.d.mts +113 -0
  553. package/node_modules/@radix-ui/react-accordion/dist/index.d.ts +113 -0
  554. package/node_modules/@radix-ui/react-accordion/dist/index.d.ts.map +1 -0
  555. package/node_modules/@radix-ui/react-accordion/dist/index.js +342 -0
  556. package/node_modules/@radix-ui/react-accordion/dist/index.js.map +1 -0
  557. package/node_modules/@radix-ui/react-accordion/dist/index.mjs +325 -0
  558. package/node_modules/@radix-ui/react-accordion/dist/index.mjs.map +1 -0
  559. package/node_modules/@radix-ui/react-accordion/package.json +64 -0
  560. package/node_modules/@radix-ui/react-arrow/README.md +13 -0
  561. package/node_modules/@radix-ui/react-arrow/dist/index.d.mts +10 -0
  562. package/node_modules/@radix-ui/react-arrow/dist/index.d.ts +10 -0
  563. package/node_modules/@radix-ui/react-arrow/dist/index.d.ts.map +1 -0
  564. package/node_modules/@radix-ui/react-arrow/dist/index.js +40 -0
  565. package/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -0
  566. package/node_modules/@radix-ui/react-arrow/dist/index.mjs +32 -0
  567. package/node_modules/@radix-ui/react-arrow/dist/index.mjs.map +1 -0
  568. package/node_modules/@radix-ui/react-arrow/package.json +56 -0
  569. package/node_modules/@radix-ui/react-collapsible/README.md +13 -0
  570. package/node_modules/@radix-ui/react-collapsible/dist/index.d.mts +32 -0
  571. package/node_modules/@radix-ui/react-collapsible/dist/index.d.ts +32 -0
  572. package/node_modules/@radix-ui/react-collapsible/dist/index.d.ts.map +1 -0
  573. package/node_modules/@radix-ui/react-collapsible/dist/index.js +177 -0
  574. package/node_modules/@radix-ui/react-collapsible/dist/index.js.map +1 -0
  575. package/node_modules/@radix-ui/react-collapsible/dist/index.mjs +164 -0
  576. package/node_modules/@radix-ui/react-collapsible/dist/index.mjs.map +1 -0
  577. package/node_modules/@radix-ui/react-collapsible/package.json +63 -0
  578. package/node_modules/@radix-ui/react-collection/README.md +13 -0
  579. package/node_modules/@radix-ui/react-collection/dist/index.d.mts +22 -0
  580. package/node_modules/@radix-ui/react-collection/dist/index.d.ts +22 -0
  581. package/node_modules/@radix-ui/react-collection/dist/index.d.ts.map +1 -0
  582. package/node_modules/@radix-ui/react-collection/dist/index.js +117 -0
  583. package/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -0
  584. package/node_modules/@radix-ui/react-collection/dist/index.mjs +110 -0
  585. package/node_modules/@radix-ui/react-collection/dist/index.mjs.map +1 -0
  586. package/node_modules/@radix-ui/react-collection/package.json +59 -0
  587. package/node_modules/@radix-ui/react-compose-refs/README.md +13 -0
  588. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.mts +14 -0
  589. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.ts +14 -0
  590. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.ts.map +1 -0
  591. package/node_modules/@radix-ui/react-compose-refs/dist/index.js +36 -0
  592. package/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
  593. package/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +31 -0
  594. package/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.map +1 -0
  595. package/node_modules/@radix-ui/react-compose-refs/package.json +50 -0
  596. package/node_modules/@radix-ui/react-context/README.md +13 -0
  597. package/node_modules/@radix-ui/react-context/dist/index.d.mts +26 -0
  598. package/node_modules/@radix-ui/react-context/dist/index.d.ts +26 -0
  599. package/node_modules/@radix-ui/react-context/dist/index.d.ts.map +1 -0
  600. package/node_modules/@radix-ui/react-context/dist/index.js +133 -0
  601. package/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
  602. package/node_modules/@radix-ui/react-context/dist/index.mjs +128 -0
  603. package/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
  604. package/node_modules/@radix-ui/react-context/package.json +50 -0
  605. package/node_modules/@radix-ui/react-direction/README.md +13 -0
  606. package/node_modules/@radix-ui/react-direction/dist/index.d.mts +11 -0
  607. package/node_modules/@radix-ui/react-direction/dist/index.d.ts +11 -0
  608. package/node_modules/@radix-ui/react-direction/dist/index.d.ts.map +1 -0
  609. package/node_modules/@radix-ui/react-direction/dist/index.js +29 -0
  610. package/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -0
  611. package/node_modules/@radix-ui/react-direction/dist/index.mjs +23 -0
  612. package/node_modules/@radix-ui/react-direction/dist/index.mjs.map +1 -0
  613. package/node_modules/@radix-ui/react-direction/package.json +50 -0
  614. package/node_modules/@radix-ui/react-dismissable-layer/README.md +13 -0
  615. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.mts +51 -0
  616. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.ts +51 -0
  617. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.ts.map +1 -0
  618. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +293 -0
  619. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -0
  620. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +283 -0
  621. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map +1 -0
  622. package/node_modules/@radix-ui/react-dismissable-layer/package.json +63 -0
  623. package/node_modules/@radix-ui/react-focus-guards/README.md +13 -0
  624. package/node_modules/@radix-ui/react-focus-guards/dist/index.d.mts +9 -0
  625. package/node_modules/@radix-ui/react-focus-guards/dist/index.d.ts +9 -0
  626. package/node_modules/@radix-ui/react-focus-guards/dist/index.d.ts.map +1 -0
  627. package/node_modules/@radix-ui/react-focus-guards/dist/index.js +45 -0
  628. package/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -0
  629. package/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +39 -0
  630. package/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map +1 -0
  631. package/node_modules/@radix-ui/react-focus-guards/package.json +50 -0
  632. package/node_modules/@radix-ui/react-focus-scope/README.md +13 -0
  633. package/node_modules/@radix-ui/react-focus-scope/dist/index.d.mts +32 -0
  634. package/node_modules/@radix-ui/react-focus-scope/dist/index.d.ts +32 -0
  635. package/node_modules/@radix-ui/react-focus-scope/dist/index.d.ts.map +1 -0
  636. package/node_modules/@radix-ui/react-focus-scope/dist/index.js +300 -0
  637. package/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -0
  638. package/node_modules/@radix-ui/react-focus-scope/dist/index.mjs +292 -0
  639. package/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.map +1 -0
  640. package/node_modules/@radix-ui/react-focus-scope/package.json +58 -0
  641. package/node_modules/@radix-ui/react-id/README.md +13 -0
  642. package/node_modules/@radix-ui/react-id/dist/index.d.mts +3 -0
  643. package/node_modules/@radix-ui/react-id/dist/index.d.ts +3 -0
  644. package/node_modules/@radix-ui/react-id/dist/index.d.ts.map +1 -0
  645. package/node_modules/@radix-ui/react-id/dist/index.js +28 -0
  646. package/node_modules/@radix-ui/react-id/dist/index.js.map +1 -0
  647. package/node_modules/@radix-ui/react-id/dist/index.mjs +24 -0
  648. package/node_modules/@radix-ui/react-id/dist/index.mjs.map +1 -0
  649. package/node_modules/@radix-ui/react-id/package.json +51 -0
  650. package/node_modules/@radix-ui/react-popover/README.md +13 -0
  651. package/node_modules/@radix-ui/react-popover/dist/index.d.mts +84 -0
  652. package/node_modules/@radix-ui/react-popover/dist/index.d.ts +84 -0
  653. package/node_modules/@radix-ui/react-popover/dist/index.d.ts.map +1 -0
  654. package/node_modules/@radix-ui/react-popover/dist/index.js +342 -0
  655. package/node_modules/@radix-ui/react-popover/dist/index.js.map +1 -0
  656. package/node_modules/@radix-ui/react-popover/dist/index.mjs +321 -0
  657. package/node_modules/@radix-ui/react-popover/dist/index.mjs.map +1 -0
  658. package/node_modules/@radix-ui/react-popover/package.json +70 -0
  659. package/node_modules/@radix-ui/react-popper/README.md +13 -0
  660. package/node_modules/@radix-ui/react-popper/dist/index.d.mts +45 -0
  661. package/node_modules/@radix-ui/react-popper/dist/index.d.ts +45 -0
  662. package/node_modules/@radix-ui/react-popper/dist/index.d.ts.map +1 -0
  663. package/node_modules/@radix-ui/react-popper/dist/index.js +341 -0
  664. package/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -0
  665. package/node_modules/@radix-ui/react-popper/dist/index.mjs +324 -0
  666. package/node_modules/@radix-ui/react-popper/dist/index.mjs.map +1 -0
  667. package/node_modules/@radix-ui/react-popper/package.json +65 -0
  668. package/node_modules/@radix-ui/react-portal/README.md +13 -0
  669. package/node_modules/@radix-ui/react-portal/dist/index.d.mts +14 -0
  670. package/node_modules/@radix-ui/react-portal/dist/index.d.ts +14 -0
  671. package/node_modules/@radix-ui/react-portal/dist/index.d.ts.map +1 -0
  672. package/node_modules/@radix-ui/react-portal/dist/index.js +37 -0
  673. package/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -0
  674. package/node_modules/@radix-ui/react-portal/dist/index.mjs +29 -0
  675. package/node_modules/@radix-ui/react-portal/dist/index.mjs.map +1 -0
  676. package/node_modules/@radix-ui/react-portal/package.json +56 -0
  677. package/node_modules/@radix-ui/react-presence/README.md +13 -0
  678. package/node_modules/@radix-ui/react-presence/dist/index.d.mts +10 -0
  679. package/node_modules/@radix-ui/react-presence/dist/index.d.ts +10 -0
  680. package/node_modules/@radix-ui/react-presence/dist/index.d.ts.map +1 -0
  681. package/node_modules/@radix-ui/react-presence/dist/index.js +143 -0
  682. package/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -0
  683. package/node_modules/@radix-ui/react-presence/dist/index.mjs +139 -0
  684. package/node_modules/@radix-ui/react-presence/dist/index.mjs.map +1 -0
  685. package/node_modules/@radix-ui/react-presence/package.json +57 -0
  686. package/node_modules/@radix-ui/react-primitive/README.md +13 -0
  687. package/node_modules/@radix-ui/react-primitive/dist/index.d.mts +53 -0
  688. package/node_modules/@radix-ui/react-primitive/dist/index.d.ts +53 -0
  689. package/node_modules/@radix-ui/react-primitive/dist/index.d.ts.map +1 -0
  690. package/node_modules/@radix-ui/react-primitive/dist/index.js +105 -0
  691. package/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
  692. package/node_modules/@radix-ui/react-primitive/dist/index.mjs +96 -0
  693. package/node_modules/@radix-ui/react-primitive/dist/index.mjs.map +1 -0
  694. package/node_modules/@radix-ui/react-primitive/package.json +59 -0
  695. package/node_modules/@radix-ui/react-roving-focus/README.md +13 -0
  696. package/node_modules/@radix-ui/react-roving-focus/dist/index.d.mts +43 -0
  697. package/node_modules/@radix-ui/react-roving-focus/dist/index.d.ts +43 -0
  698. package/node_modules/@radix-ui/react-roving-focus/dist/index.d.ts.map +1 -0
  699. package/node_modules/@radix-ui/react-roving-focus/dist/index.js +268 -0
  700. package/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -0
  701. package/node_modules/@radix-ui/react-roving-focus/dist/index.mjs +257 -0
  702. package/node_modules/@radix-ui/react-roving-focus/dist/index.mjs.map +1 -0
  703. package/node_modules/@radix-ui/react-roving-focus/package.json +64 -0
  704. package/node_modules/@radix-ui/react-select/README.md +13 -0
  705. package/node_modules/@radix-ui/react-select/dist/index.d.mts +132 -0
  706. package/node_modules/@radix-ui/react-select/dist/index.d.ts +132 -0
  707. package/node_modules/@radix-ui/react-select/dist/index.d.ts.map +1 -0
  708. package/node_modules/@radix-ui/react-select/dist/index.js +1310 -0
  709. package/node_modules/@radix-ui/react-select/dist/index.js.map +1 -0
  710. package/node_modules/@radix-ui/react-select/dist/index.mjs +1271 -0
  711. package/node_modules/@radix-ui/react-select/dist/index.mjs.map +1 -0
  712. package/node_modules/@radix-ui/react-select/package.json +76 -0
  713. package/node_modules/@radix-ui/react-slot/README.md +13 -0
  714. package/node_modules/@radix-ui/react-slot/dist/index.d.mts +11 -0
  715. package/node_modules/@radix-ui/react-slot/dist/index.d.ts +11 -0
  716. package/node_modules/@radix-ui/react-slot/dist/index.d.ts.map +1 -0
  717. package/node_modules/@radix-ui/react-slot/dist/index.js +98 -0
  718. package/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
  719. package/node_modules/@radix-ui/react-slot/dist/index.mjs +89 -0
  720. package/node_modules/@radix-ui/react-slot/dist/index.mjs.map +1 -0
  721. package/node_modules/@radix-ui/react-slot/package.json +51 -0
  722. package/node_modules/@radix-ui/react-tabs/README.md +13 -0
  723. package/node_modules/@radix-ui/react-tabs/dist/index.d.mts +55 -0
  724. package/node_modules/@radix-ui/react-tabs/dist/index.d.ts +55 -0
  725. package/node_modules/@radix-ui/react-tabs/dist/index.d.ts.map +1 -0
  726. package/node_modules/@radix-ui/react-tabs/dist/index.js +198 -0
  727. package/node_modules/@radix-ui/react-tabs/dist/index.js.map +1 -0
  728. package/node_modules/@radix-ui/react-tabs/dist/index.mjs +183 -0
  729. package/node_modules/@radix-ui/react-tabs/dist/index.mjs.map +1 -0
  730. package/node_modules/@radix-ui/react-tabs/package.json +63 -0
  731. package/node_modules/@radix-ui/react-toast/README.md +13 -0
  732. package/node_modules/@radix-ui/react-toast/dist/index.d.mts +119 -0
  733. package/node_modules/@radix-ui/react-toast/dist/index.d.ts +119 -0
  734. package/node_modules/@radix-ui/react-toast/dist/index.d.ts.map +1 -0
  735. package/node_modules/@radix-ui/react-toast/dist/index.js +751 -0
  736. package/node_modules/@radix-ui/react-toast/dist/index.js.map +1 -0
  737. package/node_modules/@radix-ui/react-toast/dist/index.mjs +730 -0
  738. package/node_modules/@radix-ui/react-toast/dist/index.mjs.map +1 -0
  739. package/node_modules/@radix-ui/react-toast/package.json +67 -0
  740. package/node_modules/@radix-ui/react-use-callback-ref/README.md +13 -0
  741. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.mts +7 -0
  742. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.ts +7 -0
  743. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.ts.map +1 -0
  744. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +27 -0
  745. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -0
  746. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs +23 -0
  747. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.map +1 -0
  748. package/node_modules/@radix-ui/react-use-callback-ref/package.json +50 -0
  749. package/node_modules/@radix-ui/react-use-controllable-state/README.md +13 -0
  750. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.mts +9 -0
  751. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.ts +9 -0
  752. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.ts.map +1 -0
  753. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +57 -0
  754. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -0
  755. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs +53 -0
  756. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.map +1 -0
  757. package/node_modules/@radix-ui/react-use-controllable-state/package.json +51 -0
  758. package/node_modules/@radix-ui/react-use-escape-keydown/README.md +13 -0
  759. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.mts +6 -0
  760. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.ts +6 -0
  761. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.ts.map +1 -0
  762. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +31 -0
  763. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -0
  764. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs +27 -0
  765. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs.map +1 -0
  766. package/node_modules/@radix-ui/react-use-escape-keydown/package.json +51 -0
  767. package/node_modules/@radix-ui/react-use-layout-effect/README.md +13 -0
  768. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.mts +11 -0
  769. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.ts +11 -0
  770. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.ts.map +1 -0
  771. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +20 -0
  772. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -0
  773. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs +16 -0
  774. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.map +1 -0
  775. package/node_modules/@radix-ui/react-use-layout-effect/package.json +50 -0
  776. package/node_modules/@radix-ui/react-use-previous/README.md +13 -0
  777. package/node_modules/@radix-ui/react-use-previous/dist/index.d.mts +3 -0
  778. package/node_modules/@radix-ui/react-use-previous/dist/index.d.ts +3 -0
  779. package/node_modules/@radix-ui/react-use-previous/dist/index.d.ts.map +1 -0
  780. package/node_modules/@radix-ui/react-use-previous/dist/index.js +30 -0
  781. package/node_modules/@radix-ui/react-use-previous/dist/index.js.map +1 -0
  782. package/node_modules/@radix-ui/react-use-previous/dist/index.mjs +26 -0
  783. package/node_modules/@radix-ui/react-use-previous/dist/index.mjs.map +1 -0
  784. package/node_modules/@radix-ui/react-use-previous/package.json +50 -0
  785. package/node_modules/@radix-ui/react-use-rect/README.md +13 -0
  786. package/node_modules/@radix-ui/react-use-rect/dist/index.d.mts +8 -0
  787. package/node_modules/@radix-ui/react-use-rect/dist/index.d.ts +8 -0
  788. package/node_modules/@radix-ui/react-use-rect/dist/index.d.ts.map +1 -0
  789. package/node_modules/@radix-ui/react-use-rect/dist/index.js +34 -0
  790. package/node_modules/@radix-ui/react-use-rect/dist/index.js.map +1 -0
  791. package/node_modules/@radix-ui/react-use-rect/dist/index.mjs +30 -0
  792. package/node_modules/@radix-ui/react-use-rect/dist/index.mjs.map +1 -0
  793. package/node_modules/@radix-ui/react-use-rect/package.json +51 -0
  794. package/node_modules/@radix-ui/react-use-size/README.md +13 -0
  795. package/node_modules/@radix-ui/react-use-size/dist/index.d.mts +6 -0
  796. package/node_modules/@radix-ui/react-use-size/dist/index.d.ts +6 -0
  797. package/node_modules/@radix-ui/react-use-size/dist/index.d.ts.map +1 -0
  798. package/node_modules/@radix-ui/react-use-size/dist/index.js +61 -0
  799. package/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -0
  800. package/node_modules/@radix-ui/react-use-size/dist/index.mjs +57 -0
  801. package/node_modules/@radix-ui/react-use-size/dist/index.mjs.map +1 -0
  802. package/node_modules/@radix-ui/react-use-size/package.json +54 -0
  803. package/node_modules/@radix-ui/react-visually-hidden/README.md +13 -0
  804. package/node_modules/@radix-ui/react-visually-hidden/dist/index.d.mts +10 -0
  805. package/node_modules/@radix-ui/react-visually-hidden/dist/index.d.ts +10 -0
  806. package/node_modules/@radix-ui/react-visually-hidden/dist/index.d.ts.map +1 -0
  807. package/node_modules/@radix-ui/react-visually-hidden/dist/index.js +47 -0
  808. package/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +1 -0
  809. package/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs +39 -0
  810. package/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs.map +1 -0
  811. package/node_modules/@radix-ui/react-visually-hidden/package.json +56 -0
  812. package/node_modules/@radix-ui/rect/README.md +13 -0
  813. package/node_modules/@radix-ui/rect/dist/index.d.mts +16 -0
  814. package/node_modules/@radix-ui/rect/dist/index.d.ts +16 -0
  815. package/node_modules/@radix-ui/rect/dist/index.d.ts.map +1 -0
  816. package/node_modules/@radix-ui/rect/dist/index.js +70 -0
  817. package/node_modules/@radix-ui/rect/dist/index.js.map +1 -0
  818. package/node_modules/@radix-ui/rect/dist/index.mjs +66 -0
  819. package/node_modules/@radix-ui/rect/dist/index.mjs.map +1 -0
  820. package/node_modules/@radix-ui/rect/package.json +41 -0
  821. package/node_modules/@remix-run/react/CHANGELOG.md +907 -0
  822. package/node_modules/@remix-run/react/LICENSE.md +22 -0
  823. package/node_modules/@remix-run/react/README.md +13 -0
  824. package/node_modules/@remix-run/react/dist/_virtual/_rollupPluginBabelHelpers.js +30 -0
  825. package/node_modules/@remix-run/react/dist/browser.d.ts +35 -0
  826. package/node_modules/@remix-run/react/dist/browser.js +221 -0
  827. package/node_modules/@remix-run/react/dist/components.d.ts +128 -0
  828. package/node_modules/@remix-run/react/dist/components.js +874 -0
  829. package/node_modules/@remix-run/react/dist/data.d.ts +14 -0
  830. package/node_modules/@remix-run/react/dist/data.js +275 -0
  831. package/node_modules/@remix-run/react/dist/entry.d.ts +38 -0
  832. package/node_modules/@remix-run/react/dist/errorBoundaries.d.ts +33 -0
  833. package/node_modules/@remix-run/react/dist/errorBoundaries.js +165 -0
  834. package/node_modules/@remix-run/react/dist/errors.d.ts +2 -0
  835. package/node_modules/@remix-run/react/dist/errors.js +53 -0
  836. package/node_modules/@remix-run/react/dist/esm/_virtual/_rollupPluginBabelHelpers.js +26 -0
  837. package/node_modules/@remix-run/react/dist/esm/browser.js +261 -0
  838. package/node_modules/@remix-run/react/dist/esm/components.js +841 -0
  839. package/node_modules/@remix-run/react/dist/esm/data.js +263 -0
  840. package/node_modules/@remix-run/react/dist/esm/errorBoundaries.js +139 -0
  841. package/node_modules/@remix-run/react/dist/esm/errors.js +49 -0
  842. package/node_modules/@remix-run/react/dist/esm/fallback.js +35 -0
  843. package/node_modules/@remix-run/react/dist/esm/index.js +16 -0
  844. package/node_modules/@remix-run/react/dist/esm/invariant.js +17 -0
  845. package/node_modules/@remix-run/react/dist/esm/links.js +258 -0
  846. package/node_modules/@remix-run/react/dist/esm/markup.js +34 -0
  847. package/node_modules/@remix-run/react/dist/esm/routeModules.js +89 -0
  848. package/node_modules/@remix-run/react/dist/esm/routes.js +407 -0
  849. package/node_modules/@remix-run/react/dist/esm/scroll-restoration.js +84 -0
  850. package/node_modules/@remix-run/react/dist/esm/server.js +84 -0
  851. package/node_modules/@remix-run/react/dist/fallback.d.ts +2 -0
  852. package/node_modules/@remix-run/react/dist/fallback.js +59 -0
  853. package/node_modules/@remix-run/react/dist/index.d.ts +14 -0
  854. package/node_modules/@remix-run/react/dist/index.js +224 -0
  855. package/node_modules/@remix-run/react/dist/invariant.d.ts +2 -0
  856. package/node_modules/@remix-run/react/dist/invariant.js +19 -0
  857. package/node_modules/@remix-run/react/dist/links.d.ts +128 -0
  858. package/node_modules/@remix-run/react/dist/links.js +268 -0
  859. package/node_modules/@remix-run/react/dist/markup.d.ts +5 -0
  860. package/node_modules/@remix-run/react/dist/markup.js +39 -0
  861. package/node_modules/@remix-run/react/dist/routeModules.d.ts +132 -0
  862. package/node_modules/@remix-run/react/dist/routeModules.js +111 -0
  863. package/node_modules/@remix-run/react/dist/routes.d.ts +32 -0
  864. package/node_modules/@remix-run/react/dist/routes.js +434 -0
  865. package/node_modules/@remix-run/react/dist/scroll-restoration.d.ts +12 -0
  866. package/node_modules/@remix-run/react/dist/scroll-restoration.js +108 -0
  867. package/node_modules/@remix-run/react/dist/server.d.ts +13 -0
  868. package/node_modules/@remix-run/react/dist/server.js +108 -0
  869. package/node_modules/@remix-run/react/dist/tsconfig.tsbuildinfo +1 -0
  870. package/node_modules/@remix-run/react/dist/warnings.d.ts +1 -0
  871. package/node_modules/@remix-run/react/node_modules/@remix-run/router/CHANGELOG.md +716 -0
  872. package/node_modules/@remix-run/react/node_modules/@remix-run/router/LICENSE.md +23 -0
  873. package/node_modules/@remix-run/react/node_modules/@remix-run/router/README.md +135 -0
  874. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/history.d.ts +250 -0
  875. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/index.d.ts +9 -0
  876. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.cjs.js +4870 -0
  877. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.cjs.js.map +1 -0
  878. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.d.ts +508 -0
  879. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.js +4327 -0
  880. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.js.map +1 -0
  881. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.umd.js +4876 -0
  882. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.umd.js.map +1 -0
  883. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.umd.min.js +12 -0
  884. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.umd.min.js.map +1 -0
  885. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/utils.d.ts +502 -0
  886. package/node_modules/@remix-run/react/node_modules/@remix-run/router/history.ts +746 -0
  887. package/node_modules/@remix-run/react/node_modules/@remix-run/router/index.ts +96 -0
  888. package/node_modules/@remix-run/react/node_modules/@remix-run/router/package.json +33 -0
  889. package/node_modules/@remix-run/react/node_modules/@remix-run/router/router.ts +4915 -0
  890. package/node_modules/@remix-run/react/node_modules/@remix-run/router/utils.ts +1598 -0
  891. package/node_modules/@remix-run/react/package.json +52 -0
  892. package/node_modules/@remix-run/server-runtime/CHANGELOG.md +957 -0
  893. package/node_modules/@remix-run/server-runtime/LICENSE.md +22 -0
  894. package/node_modules/@remix-run/server-runtime/README.md +26 -0
  895. package/node_modules/@remix-run/server-runtime/dist/build.d.ts +38 -0
  896. package/node_modules/@remix-run/server-runtime/dist/cookies.d.ts +69 -0
  897. package/node_modules/@remix-run/server-runtime/dist/cookies.js +173 -0
  898. package/node_modules/@remix-run/server-runtime/dist/crypto.d.ts +2 -0
  899. package/node_modules/@remix-run/server-runtime/dist/data.d.ts +28 -0
  900. package/node_modules/@remix-run/server-runtime/dist/data.js +114 -0
  901. package/node_modules/@remix-run/server-runtime/dist/dev.d.ts +10 -0
  902. package/node_modules/@remix-run/server-runtime/dist/dev.js +53 -0
  903. package/node_modules/@remix-run/server-runtime/dist/entry.d.ts +30 -0
  904. package/node_modules/@remix-run/server-runtime/dist/entry.js +22 -0
  905. package/node_modules/@remix-run/server-runtime/dist/errors.d.ts +51 -0
  906. package/node_modules/@remix-run/server-runtime/dist/errors.js +122 -0
  907. package/node_modules/@remix-run/server-runtime/dist/esm/cookies.js +168 -0
  908. package/node_modules/@remix-run/server-runtime/dist/esm/data.js +109 -0
  909. package/node_modules/@remix-run/server-runtime/dist/esm/dev.js +46 -0
  910. package/node_modules/@remix-run/server-runtime/dist/esm/entry.js +18 -0
  911. package/node_modules/@remix-run/server-runtime/dist/esm/errors.js +115 -0
  912. package/node_modules/@remix-run/server-runtime/dist/esm/formData.js +55 -0
  913. package/node_modules/@remix-run/server-runtime/dist/esm/headers.js +90 -0
  914. package/node_modules/@remix-run/server-runtime/dist/esm/index.js +20 -0
  915. package/node_modules/@remix-run/server-runtime/dist/esm/invariant.js +18 -0
  916. package/node_modules/@remix-run/server-runtime/dist/esm/markup.js +29 -0
  917. package/node_modules/@remix-run/server-runtime/dist/esm/mode.js +24 -0
  918. package/node_modules/@remix-run/server-runtime/dist/esm/responses.js +123 -0
  919. package/node_modules/@remix-run/server-runtime/dist/esm/routeMatching.js +23 -0
  920. package/node_modules/@remix-run/server-runtime/dist/esm/routes.js +77 -0
  921. package/node_modules/@remix-run/server-runtime/dist/esm/server.js +343 -0
  922. package/node_modules/@remix-run/server-runtime/dist/esm/serverHandoff.js +20 -0
  923. package/node_modules/@remix-run/server-runtime/dist/esm/sessions/cookieStorage.js +51 -0
  924. package/node_modules/@remix-run/server-runtime/dist/esm/sessions/memoryStorage.js +61 -0
  925. package/node_modules/@remix-run/server-runtime/dist/esm/sessions.js +145 -0
  926. package/node_modules/@remix-run/server-runtime/dist/esm/upload/errors.js +19 -0
  927. package/node_modules/@remix-run/server-runtime/dist/esm/upload/memoryUploadHandler.js +50 -0
  928. package/node_modules/@remix-run/server-runtime/dist/esm/warnings.js +19 -0
  929. package/node_modules/@remix-run/server-runtime/dist/formData.d.ts +15 -0
  930. package/node_modules/@remix-run/server-runtime/dist/formData.js +60 -0
  931. package/node_modules/@remix-run/server-runtime/dist/headers.d.ts +3 -0
  932. package/node_modules/@remix-run/server-runtime/dist/headers.js +94 -0
  933. package/node_modules/@remix-run/server-runtime/dist/index.d.ts +12 -0
  934. package/node_modules/@remix-run/server-runtime/dist/index.js +46 -0
  935. package/node_modules/@remix-run/server-runtime/dist/interface.d.ts +6 -0
  936. package/node_modules/@remix-run/server-runtime/dist/invariant.d.ts +2 -0
  937. package/node_modules/@remix-run/server-runtime/dist/invariant.js +22 -0
  938. package/node_modules/@remix-run/server-runtime/dist/jsonify.d.ts +33 -0
  939. package/node_modules/@remix-run/server-runtime/dist/links.d.ts +104 -0
  940. package/node_modules/@remix-run/server-runtime/dist/markup.d.ts +1 -0
  941. package/node_modules/@remix-run/server-runtime/dist/markup.js +33 -0
  942. package/node_modules/@remix-run/server-runtime/dist/mode.d.ts +9 -0
  943. package/node_modules/@remix-run/server-runtime/dist/mode.js +29 -0
  944. package/node_modules/@remix-run/server-runtime/dist/reexport.d.ts +14 -0
  945. package/node_modules/@remix-run/server-runtime/dist/responses.d.ts +47 -0
  946. package/node_modules/@remix-run/server-runtime/dist/responses.js +135 -0
  947. package/node_modules/@remix-run/server-runtime/dist/routeMatching.d.ts +8 -0
  948. package/node_modules/@remix-run/server-runtime/dist/routeMatching.js +27 -0
  949. package/node_modules/@remix-run/server-runtime/dist/routeModules.d.ts +211 -0
  950. package/node_modules/@remix-run/server-runtime/dist/routes.d.ts +31 -0
  951. package/node_modules/@remix-run/server-runtime/dist/routes.js +82 -0
  952. package/node_modules/@remix-run/server-runtime/dist/serialize.d.ts +25 -0
  953. package/node_modules/@remix-run/server-runtime/dist/server.d.ts +5 -0
  954. package/node_modules/@remix-run/server-runtime/dist/server.js +347 -0
  955. package/node_modules/@remix-run/server-runtime/dist/serverHandoff.d.ts +12 -0
  956. package/node_modules/@remix-run/server-runtime/dist/serverHandoff.js +24 -0
  957. package/node_modules/@remix-run/server-runtime/dist/sessions/cookieStorage.d.ts +23 -0
  958. package/node_modules/@remix-run/server-runtime/dist/sessions/cookieStorage.js +55 -0
  959. package/node_modules/@remix-run/server-runtime/dist/sessions/memoryStorage.d.ts +20 -0
  960. package/node_modules/@remix-run/server-runtime/dist/sessions/memoryStorage.js +65 -0
  961. package/node_modules/@remix-run/server-runtime/dist/sessions.d.ts +143 -0
  962. package/node_modules/@remix-run/server-runtime/dist/sessions.js +152 -0
  963. package/node_modules/@remix-run/server-runtime/dist/tsconfig.tsbuildinfo +1 -0
  964. package/node_modules/@remix-run/server-runtime/dist/typecheck.d.ts +4 -0
  965. package/node_modules/@remix-run/server-runtime/dist/upload/errors.d.ts +5 -0
  966. package/node_modules/@remix-run/server-runtime/dist/upload/errors.js +23 -0
  967. package/node_modules/@remix-run/server-runtime/dist/upload/memoryUploadHandler.d.ts +21 -0
  968. package/node_modules/@remix-run/server-runtime/dist/upload/memoryUploadHandler.js +54 -0
  969. package/node_modules/@remix-run/server-runtime/dist/warnings.d.ts +1 -0
  970. package/node_modules/@remix-run/server-runtime/dist/warnings.js +23 -0
  971. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/CHANGELOG.md +716 -0
  972. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/LICENSE.md +23 -0
  973. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/README.md +135 -0
  974. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/history.d.ts +250 -0
  975. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/index.d.ts +9 -0
  976. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.cjs.js +4870 -0
  977. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.cjs.js.map +1 -0
  978. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.d.ts +508 -0
  979. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.js +4327 -0
  980. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.js.map +1 -0
  981. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.umd.js +4876 -0
  982. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.umd.js.map +1 -0
  983. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.umd.min.js +12 -0
  984. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.umd.min.js.map +1 -0
  985. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/utils.d.ts +502 -0
  986. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/history.ts +746 -0
  987. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/index.ts +96 -0
  988. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/package.json +33 -0
  989. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/router.ts +4915 -0
  990. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/utils.ts +1598 -0
  991. package/node_modules/@remix-run/server-runtime/package.json +47 -0
  992. package/node_modules/@types/cookie/LICENSE +21 -0
  993. package/node_modules/@types/cookie/README.md +15 -0
  994. package/node_modules/@types/cookie/index.d.ts +154 -0
  995. package/node_modules/@types/cookie/package.json +30 -0
  996. package/node_modules/@web3-storage/multipart-parser/README.md +37 -0
  997. package/node_modules/@web3-storage/multipart-parser/cjs/src/index.js +218 -0
  998. package/node_modules/@web3-storage/multipart-parser/cjs/src/search.js +269 -0
  999. package/node_modules/@web3-storage/multipart-parser/cjs/src/utils.js +37 -0
  1000. package/node_modules/@web3-storage/multipart-parser/esm/package.json +4 -0
  1001. package/node_modules/@web3-storage/multipart-parser/esm/src/index.js +219 -0
  1002. package/node_modules/@web3-storage/multipart-parser/esm/src/search.js +269 -0
  1003. package/node_modules/@web3-storage/multipart-parser/esm/src/utils.js +28 -0
  1004. package/node_modules/@web3-storage/multipart-parser/index.js +1 -0
  1005. package/node_modules/@web3-storage/multipart-parser/package.json +44 -0
  1006. package/node_modules/@web3-storage/multipart-parser/src/index.js +257 -0
  1007. package/node_modules/@web3-storage/multipart-parser/src/search.js +329 -0
  1008. package/node_modules/@web3-storage/multipart-parser/src/utils.js +43 -0
  1009. package/node_modules/@web3-storage/multipart-parser/test/test.spec.js +65 -0
  1010. package/node_modules/@web3-storage/multipart-parser/tsconfig.json +41 -0
  1011. package/node_modules/@web3-storage/multipart-parser/types/index.d.ts +15 -0
  1012. package/node_modules/@web3-storage/multipart-parser/types/index.d.ts.map +1 -0
  1013. package/node_modules/@web3-storage/multipart-parser/types/search.d.ts +36 -0
  1014. package/node_modules/@web3-storage/multipart-parser/types/search.d.ts.map +1 -0
  1015. package/node_modules/@web3-storage/multipart-parser/types/utils.d.ts +18 -0
  1016. package/node_modules/@web3-storage/multipart-parser/types/utils.d.ts.map +1 -0
  1017. package/node_modules/aria-hidden/LICENSE +21 -0
  1018. package/node_modules/aria-hidden/README.md +99 -0
  1019. package/node_modules/aria-hidden/dist/es2015/index.d.ts +29 -0
  1020. package/node_modules/aria-hidden/dist/es2015/index.js +166 -0
  1021. package/node_modules/aria-hidden/dist/es2019/index.d.ts +29 -0
  1022. package/node_modules/aria-hidden/dist/es2019/index.js +155 -0
  1023. package/node_modules/aria-hidden/dist/es5/index.d.ts +29 -0
  1024. package/node_modules/aria-hidden/dist/es5/index.js +173 -0
  1025. package/node_modules/aria-hidden/package.json +70 -0
  1026. package/node_modules/assertion-error/LICENSE +21 -0
  1027. package/node_modules/assertion-error/README.md +68 -0
  1028. package/node_modules/assertion-error/index.d.ts +27 -0
  1029. package/node_modules/assertion-error/index.js +60 -0
  1030. package/node_modules/assertion-error/package.json +32 -0
  1031. package/node_modules/chai/CODEOWNERS +1 -0
  1032. package/node_modules/chai/CODE_OF_CONDUCT.md +58 -0
  1033. package/node_modules/chai/CONTRIBUTING.md +218 -0
  1034. package/node_modules/chai/History.md +1059 -0
  1035. package/node_modules/chai/LICENSE +21 -0
  1036. package/node_modules/chai/README.md +154 -0
  1037. package/node_modules/chai/ReleaseNotes.md +737 -0
  1038. package/node_modules/chai/chai.js +3992 -0
  1039. package/node_modules/chai/index.js +1 -0
  1040. package/node_modules/chai/lib/chai/assertion.js +164 -0
  1041. package/node_modules/chai/lib/chai/config.js +120 -0
  1042. package/node_modules/chai/lib/chai/core/assertions.js +3937 -0
  1043. package/node_modules/chai/lib/chai/interface/assert.js +3003 -0
  1044. package/node_modules/chai/lib/chai/interface/expect.js +50 -0
  1045. package/node_modules/chai/lib/chai/interface/should.js +211 -0
  1046. package/node_modules/chai/lib/chai/utils/addChainableMethod.js +148 -0
  1047. package/node_modules/chai/lib/chai/utils/addLengthGuard.js +60 -0
  1048. package/node_modules/chai/lib/chai/utils/addMethod.js +68 -0
  1049. package/node_modules/chai/lib/chai/utils/addProperty.js +72 -0
  1050. package/node_modules/chai/lib/chai/utils/compareByInspect.js +27 -0
  1051. package/node_modules/chai/lib/chai/utils/expectTypes.js +51 -0
  1052. package/node_modules/chai/lib/chai/utils/flag.js +33 -0
  1053. package/node_modules/chai/lib/chai/utils/getActual.js +20 -0
  1054. package/node_modules/chai/lib/chai/utils/getEnumerableProperties.js +26 -0
  1055. package/node_modules/chai/lib/chai/utils/getMessage.js +46 -0
  1056. package/node_modules/chai/lib/chai/utils/getOperator.js +54 -0
  1057. package/node_modules/chai/lib/chai/utils/getOwnEnumerableProperties.js +25 -0
  1058. package/node_modules/chai/lib/chai/utils/getOwnEnumerablePropertySymbols.js +27 -0
  1059. package/node_modules/chai/lib/chai/utils/getProperties.js +36 -0
  1060. package/node_modules/chai/lib/chai/utils/index.js +91 -0
  1061. package/node_modules/chai/lib/chai/utils/inspect.js +30 -0
  1062. package/node_modules/chai/lib/chai/utils/isNaN.js +26 -0
  1063. package/node_modules/chai/lib/chai/utils/isProxyEnabled.js +24 -0
  1064. package/node_modules/chai/lib/chai/utils/objDisplay.js +47 -0
  1065. package/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js +69 -0
  1066. package/node_modules/chai/lib/chai/utils/overwriteMethod.js +92 -0
  1067. package/node_modules/chai/lib/chai/utils/overwriteProperty.js +92 -0
  1068. package/node_modules/chai/lib/chai/utils/proxify.js +147 -0
  1069. package/node_modules/chai/lib/chai/utils/test.js +24 -0
  1070. package/node_modules/chai/lib/chai/utils/transferFlags.js +45 -0
  1071. package/node_modules/chai/lib/chai/utils/type-detect.js +16 -0
  1072. package/node_modules/chai/lib/chai.js +65 -0
  1073. package/node_modules/chai/package.json +58 -0
  1074. package/node_modules/chai/register-assert.cjs +3 -0
  1075. package/node_modules/chai/register-assert.js +3 -0
  1076. package/node_modules/chai/register-expect.cjs +3 -0
  1077. package/node_modules/chai/register-expect.js +3 -0
  1078. package/node_modules/chai/register-should.cjs +3 -0
  1079. package/node_modules/chai/register-should.js +3 -0
  1080. package/node_modules/chai/web-test-runner.config.js +17 -0
  1081. package/node_modules/chai-dom/.eslintrc +22 -0
  1082. package/node_modules/chai-dom/.travis.yml +15 -0
  1083. package/node_modules/chai-dom/LICENSE +24 -0
  1084. package/node_modules/chai-dom/README.md +267 -0
  1085. package/node_modules/chai-dom/bower.json +31 -0
  1086. package/node_modules/chai-dom/chai-dom.js +429 -0
  1087. package/node_modules/chai-dom/package.json +44 -0
  1088. package/node_modules/chai-dom/test/.eslintrc +12 -0
  1089. package/node_modules/chai-dom/test/index.html +27 -0
  1090. package/node_modules/chai-dom/test/tests.js +1124 -0
  1091. package/node_modules/chai-dom/testem.js +31 -0
  1092. package/node_modules/check-error/LICENSE +19 -0
  1093. package/node_modules/check-error/README.md +204 -0
  1094. package/node_modules/check-error/index.js +125 -0
  1095. package/node_modules/check-error/package.json +79 -0
  1096. package/node_modules/clsx/clsx.d.mts +6 -0
  1097. package/node_modules/clsx/clsx.d.ts +10 -0
  1098. package/node_modules/clsx/dist/clsx.js +1 -0
  1099. package/node_modules/clsx/dist/clsx.min.js +1 -0
  1100. package/node_modules/clsx/dist/clsx.mjs +1 -0
  1101. package/node_modules/clsx/dist/lite.js +1 -0
  1102. package/node_modules/clsx/dist/lite.mjs +1 -0
  1103. package/node_modules/clsx/license +9 -0
  1104. package/node_modules/clsx/package.json +60 -0
  1105. package/node_modules/clsx/readme.md +154 -0
  1106. package/node_modules/cookie/HISTORY.md +147 -0
  1107. package/node_modules/cookie/LICENSE +24 -0
  1108. package/node_modules/cookie/README.md +317 -0
  1109. package/node_modules/cookie/SECURITY.md +25 -0
  1110. package/node_modules/cookie/index.js +274 -0
  1111. package/node_modules/cookie/package.json +44 -0
  1112. package/node_modules/deep-eql/LICENSE +19 -0
  1113. package/node_modules/deep-eql/README.md +93 -0
  1114. package/node_modules/deep-eql/index.js +508 -0
  1115. package/node_modules/deep-eql/package.json +73 -0
  1116. package/node_modules/detect-node-es/LICENSE +21 -0
  1117. package/node_modules/detect-node-es/Readme.md +39 -0
  1118. package/node_modules/detect-node-es/es5/browser.js +2 -0
  1119. package/node_modules/detect-node-es/es5/node.d.ts +4 -0
  1120. package/node_modules/detect-node-es/es5/node.js +2 -0
  1121. package/node_modules/detect-node-es/esm/browser.js +2 -0
  1122. package/node_modules/detect-node-es/esm/node.js +2 -0
  1123. package/node_modules/detect-node-es/package.json +29 -0
  1124. package/node_modules/framer-motion/LICENSE.md +21 -0
  1125. package/node_modules/framer-motion/README.md +105 -0
  1126. package/node_modules/framer-motion/dist/cjs/dom-entry.js +53 -0
  1127. package/node_modules/framer-motion/dist/cjs/index-legacy-94465f57.js +5926 -0
  1128. package/node_modules/framer-motion/dist/cjs/index.js +6391 -0
  1129. package/node_modules/framer-motion/dist/dom-entry.d.ts +951 -0
  1130. package/node_modules/framer-motion/dist/dom.js +1 -0
  1131. package/node_modules/framer-motion/dist/es/animation/GroupPlaybackControls.mjs +81 -0
  1132. package/node_modules/framer-motion/dist/es/animation/animate.mjs +83 -0
  1133. package/node_modules/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +295 -0
  1134. package/node_modules/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +84 -0
  1135. package/node_modules/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +378 -0
  1136. package/node_modules/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs +17 -0
  1137. package/node_modules/framer-motion/dist/es/animation/animators/utils/can-animate.mjs +33 -0
  1138. package/node_modules/framer-motion/dist/es/animation/animators/waapi/easing.mjs +31 -0
  1139. package/node_modules/framer-motion/dist/es/animation/animators/waapi/index.mjs +23 -0
  1140. package/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +12 -0
  1141. package/node_modules/framer-motion/dist/es/animation/generators/inertia.mjs +87 -0
  1142. package/node_modules/framer-motion/dist/es/animation/generators/keyframes.mjs +51 -0
  1143. package/node_modules/framer-motion/dist/es/animation/generators/spring/find.mjs +89 -0
  1144. package/node_modules/framer-motion/dist/es/animation/generators/spring/index.mjs +131 -0
  1145. package/node_modules/framer-motion/dist/es/animation/generators/utils/calc-duration.mjs +17 -0
  1146. package/node_modules/framer-motion/dist/es/animation/generators/utils/velocity.mjs +9 -0
  1147. package/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs +80 -0
  1148. package/node_modules/framer-motion/dist/es/animation/hooks/use-animate.mjs +17 -0
  1149. package/node_modules/framer-motion/dist/es/animation/hooks/use-animated-state.mjs +62 -0
  1150. package/node_modules/framer-motion/dist/es/animation/hooks/use-animation.mjs +41 -0
  1151. package/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs +109 -0
  1152. package/node_modules/framer-motion/dist/es/animation/interfaces/single-value.mjs +11 -0
  1153. package/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +80 -0
  1154. package/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs +66 -0
  1155. package/node_modules/framer-motion/dist/es/animation/interfaces/visual-element.mjs +29 -0
  1156. package/node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.mjs +6 -0
  1157. package/node_modules/framer-motion/dist/es/animation/optimized-appear/handoff.mjs +62 -0
  1158. package/node_modules/framer-motion/dist/es/animation/optimized-appear/start.mjs +80 -0
  1159. package/node_modules/framer-motion/dist/es/animation/optimized-appear/store-id.mjs +3 -0
  1160. package/node_modules/framer-motion/dist/es/animation/optimized-appear/store.mjs +3 -0
  1161. package/node_modules/framer-motion/dist/es/animation/sequence/create.mjs +227 -0
  1162. package/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +21 -0
  1163. package/node_modules/framer-motion/dist/es/animation/sequence/utils/edit.mjs +31 -0
  1164. package/node_modules/framer-motion/dist/es/animation/sequence/utils/sort.mjs +14 -0
  1165. package/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.mjs +32 -0
  1166. package/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs +40 -0
  1167. package/node_modules/framer-motion/dist/es/animation/utils/is-animatable.mjs +30 -0
  1168. package/node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs +7 -0
  1169. package/node_modules/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +5 -0
  1170. package/node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs +5 -0
  1171. package/node_modules/framer-motion/dist/es/animation/utils/is-none.mjs +15 -0
  1172. package/node_modules/framer-motion/dist/es/animation/utils/stagger.mjs +26 -0
  1173. package/node_modules/framer-motion/dist/es/animation/utils/transitions.mjs +13 -0
  1174. package/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs +75 -0
  1175. package/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs +56 -0
  1176. package/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs +169 -0
  1177. package/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs +66 -0
  1178. package/node_modules/framer-motion/dist/es/components/AnimateSharedLayout.mjs +14 -0
  1179. package/node_modules/framer-motion/dist/es/components/LayoutGroup/index.mjs +31 -0
  1180. package/node_modules/framer-motion/dist/es/components/LazyMotion/index.mjs +67 -0
  1181. package/node_modules/framer-motion/dist/es/components/MotionConfig/index.mjs +43 -0
  1182. package/node_modules/framer-motion/dist/es/components/Reorder/Group.mjs +53 -0
  1183. package/node_modules/framer-motion/dist/es/components/Reorder/Item.mjs +33 -0
  1184. package/node_modules/framer-motion/dist/es/components/Reorder/index.mjs +9 -0
  1185. package/node_modules/framer-motion/dist/es/components/Reorder/utils/check-reorder.mjs +24 -0
  1186. package/node_modules/framer-motion/dist/es/context/DeprecatedLayoutGroupContext.mjs +10 -0
  1187. package/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs +5 -0
  1188. package/node_modules/framer-motion/dist/es/context/LazyContext.mjs +5 -0
  1189. package/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs +12 -0
  1190. package/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs +13 -0
  1191. package/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs +5 -0
  1192. package/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs +17 -0
  1193. package/node_modules/framer-motion/dist/es/context/PresenceContext.mjs +8 -0
  1194. package/node_modules/framer-motion/dist/es/context/ReorderContext.mjs +5 -0
  1195. package/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs +8 -0
  1196. package/node_modules/framer-motion/dist/es/debug/record.mjs +7 -0
  1197. package/node_modules/framer-motion/dist/es/dom-entry.mjs +25 -0
  1198. package/node_modules/framer-motion/dist/es/easing/anticipate.mjs +5 -0
  1199. package/node_modules/framer-motion/dist/es/easing/back.mjs +9 -0
  1200. package/node_modules/framer-motion/dist/es/easing/circ.mjs +8 -0
  1201. package/node_modules/framer-motion/dist/es/easing/cubic-bezier.mjs +51 -0
  1202. package/node_modules/framer-motion/dist/es/easing/ease.mjs +7 -0
  1203. package/node_modules/framer-motion/dist/es/easing/modifiers/mirror.mjs +5 -0
  1204. package/node_modules/framer-motion/dist/es/easing/modifiers/reverse.mjs +5 -0
  1205. package/node_modules/framer-motion/dist/es/easing/utils/create-generator-easing.mjs +18 -0
  1206. package/node_modules/framer-motion/dist/es/easing/utils/get-easing-for-segment.mjs +8 -0
  1207. package/node_modules/framer-motion/dist/es/easing/utils/is-bezier-definition.mjs +3 -0
  1208. package/node_modules/framer-motion/dist/es/easing/utils/is-easing-array.mjs +5 -0
  1209. package/node_modules/framer-motion/dist/es/easing/utils/map.mjs +37 -0
  1210. package/node_modules/framer-motion/dist/es/events/add-dom-event.mjs +6 -0
  1211. package/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs +8 -0
  1212. package/node_modules/framer-motion/dist/es/events/event-info.mjs +15 -0
  1213. package/node_modules/framer-motion/dist/es/events/use-dom-event.mjs +34 -0
  1214. package/node_modules/framer-motion/dist/es/events/utils/is-primary-pointer.mjs +18 -0
  1215. package/node_modules/framer-motion/dist/es/frameloop/batcher.mjs +65 -0
  1216. package/node_modules/framer-motion/dist/es/frameloop/frame.mjs +6 -0
  1217. package/node_modules/framer-motion/dist/es/frameloop/index-legacy.mjs +20 -0
  1218. package/node_modules/framer-motion/dist/es/frameloop/microtask.mjs +5 -0
  1219. package/node_modules/framer-motion/dist/es/frameloop/render-step.mjs +104 -0
  1220. package/node_modules/framer-motion/dist/es/frameloop/sync-time.mjs +31 -0
  1221. package/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs +478 -0
  1222. package/node_modules/framer-motion/dist/es/gestures/drag/index.mjs +27 -0
  1223. package/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs +88 -0
  1224. package/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs +129 -0
  1225. package/node_modules/framer-motion/dist/es/gestures/drag/utils/lock.mjs +53 -0
  1226. package/node_modules/framer-motion/dist/es/gestures/focus.mjs +41 -0
  1227. package/node_modules/framer-motion/dist/es/gestures/hover.mjs +31 -0
  1228. package/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs +156 -0
  1229. package/node_modules/framer-motion/dist/es/gestures/pan/index.mjs +48 -0
  1230. package/node_modules/framer-motion/dist/es/gestures/press.mjs +116 -0
  1231. package/node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.mjs +20 -0
  1232. package/node_modules/framer-motion/dist/es/index.mjs +101 -0
  1233. package/node_modules/framer-motion/dist/es/motion/features/Feature.mjs +9 -0
  1234. package/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs +31 -0
  1235. package/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs +38 -0
  1236. package/node_modules/framer-motion/dist/es/motion/features/animations.mjs +13 -0
  1237. package/node_modules/framer-motion/dist/es/motion/features/definitions.mjs +28 -0
  1238. package/node_modules/framer-motion/dist/es/motion/features/drag.mjs +17 -0
  1239. package/node_modules/framer-motion/dist/es/motion/features/gestures.mjs +21 -0
  1240. package/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs +132 -0
  1241. package/node_modules/framer-motion/dist/es/motion/features/layout.mjs +11 -0
  1242. package/node_modules/framer-motion/dist/es/motion/features/load-features.mjs +12 -0
  1243. package/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs +72 -0
  1244. package/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs +49 -0
  1245. package/node_modules/framer-motion/dist/es/motion/index.mjs +79 -0
  1246. package/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +11 -0
  1247. package/node_modules/framer-motion/dist/es/motion/utils/is-motion-component.mjs +12 -0
  1248. package/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs +3 -0
  1249. package/node_modules/framer-motion/dist/es/motion/utils/unwrap-motion-component.mjs +17 -0
  1250. package/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs +33 -0
  1251. package/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs +75 -0
  1252. package/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs +81 -0
  1253. package/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs +57 -0
  1254. package/node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs +93 -0
  1255. package/node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs +33 -0
  1256. package/node_modules/framer-motion/dist/es/projection/geometry/copy.mjs +20 -0
  1257. package/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs +122 -0
  1258. package/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs +41 -0
  1259. package/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs +54 -0
  1260. package/node_modules/framer-motion/dist/es/projection/geometry/models.mjs +17 -0
  1261. package/node_modules/framer-motion/dist/es/projection/geometry/utils.mjs +25 -0
  1262. package/node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs +13 -0
  1263. package/node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs +27 -0
  1264. package/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs +1519 -0
  1265. package/node_modules/framer-motion/dist/es/projection/node/group.mjs +24 -0
  1266. package/node_modules/framer-motion/dist/es/projection/node/state.mjs +19 -0
  1267. package/node_modules/framer-motion/dist/es/projection/shared/stack.mjs +112 -0
  1268. package/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs +41 -0
  1269. package/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs +35 -0
  1270. package/node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs +6 -0
  1271. package/node_modules/framer-motion/dist/es/projection/styles/transform.mjs +49 -0
  1272. package/node_modules/framer-motion/dist/es/projection/use-instant-layout-transition.mjs +14 -0
  1273. package/node_modules/framer-motion/dist/es/projection/use-reset-projection.mjs +14 -0
  1274. package/node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs +5 -0
  1275. package/node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs +26 -0
  1276. package/node_modules/framer-motion/dist/es/projection/utils/measure.mjs +17 -0
  1277. package/node_modules/framer-motion/dist/es/render/VisualElement.mjs +534 -0
  1278. package/node_modules/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs +121 -0
  1279. package/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +26 -0
  1280. package/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs +15 -0
  1281. package/node_modules/framer-motion/dist/es/render/dom/features-animation.mjs +14 -0
  1282. package/node_modules/framer-motion/dist/es/render/dom/features-max.mjs +14 -0
  1283. package/node_modules/framer-motion/dist/es/render/dom/motion-minimal.mjs +9 -0
  1284. package/node_modules/framer-motion/dist/es/render/dom/motion-proxy.mjs +47 -0
  1285. package/node_modules/framer-motion/dist/es/render/dom/motion.mjs +42 -0
  1286. package/node_modules/framer-motion/dist/es/render/dom/resize/handle-element.mjs +64 -0
  1287. package/node_modules/framer-motion/dist/es/render/dom/resize/handle-window.mjs +30 -0
  1288. package/node_modules/framer-motion/dist/es/render/dom/resize/index.mjs +8 -0
  1289. package/node_modules/framer-motion/dist/es/render/dom/scroll/index.mjs +36 -0
  1290. package/node_modules/framer-motion/dist/es/render/dom/scroll/info.mjs +56 -0
  1291. package/node_modules/framer-motion/dist/es/render/dom/scroll/observe.mjs +18 -0
  1292. package/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +45 -0
  1293. package/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +59 -0
  1294. package/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +45 -0
  1295. package/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +35 -0
  1296. package/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +20 -0
  1297. package/node_modules/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +48 -0
  1298. package/node_modules/framer-motion/dist/es/render/dom/scroll/supports.mjs +5 -0
  1299. package/node_modules/framer-motion/dist/es/render/dom/scroll/track.mjs +84 -0
  1300. package/node_modules/framer-motion/dist/es/render/dom/use-render.mjs +33 -0
  1301. package/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs +6 -0
  1302. package/node_modules/framer-motion/dist/es/render/dom/utils/create-config.mjs +19 -0
  1303. package/node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs +42 -0
  1304. package/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs +57 -0
  1305. package/node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs +13 -0
  1306. package/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs +30 -0
  1307. package/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs +5 -0
  1308. package/node_modules/framer-motion/dist/es/render/dom/utils/resolve-element.mjs +28 -0
  1309. package/node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs +65 -0
  1310. package/node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs +15 -0
  1311. package/node_modules/framer-motion/dist/es/render/dom/value-types/defaults.mjs +30 -0
  1312. package/node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.mjs +15 -0
  1313. package/node_modules/framer-motion/dist/es/render/dom/value-types/find.mjs +15 -0
  1314. package/node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs +10 -0
  1315. package/node_modules/framer-motion/dist/es/render/dom/value-types/number.mjs +74 -0
  1316. package/node_modules/framer-motion/dist/es/render/dom/value-types/test.mjs +6 -0
  1317. package/node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.mjs +9 -0
  1318. package/node_modules/framer-motion/dist/es/render/dom/value-types/type-int.mjs +8 -0
  1319. package/node_modules/framer-motion/dist/es/render/dom/viewport/index.mjs +43 -0
  1320. package/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +59 -0
  1321. package/node_modules/framer-motion/dist/es/render/html/config-motion.mjs +12 -0
  1322. package/node_modules/framer-motion/dist/es/render/html/use-props.mjs +57 -0
  1323. package/node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs +74 -0
  1324. package/node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs +45 -0
  1325. package/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs +8 -0
  1326. package/node_modules/framer-motion/dist/es/render/html/utils/make-none-animatable.mjs +27 -0
  1327. package/node_modules/framer-motion/dist/es/render/html/utils/render.mjs +9 -0
  1328. package/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +19 -0
  1329. package/node_modules/framer-motion/dist/es/render/html/utils/transform.mjs +28 -0
  1330. package/node_modules/framer-motion/dist/es/render/store.mjs +3 -0
  1331. package/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +47 -0
  1332. package/node_modules/framer-motion/dist/es/render/svg/config-motion.mjs +40 -0
  1333. package/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs +33 -0
  1334. package/node_modules/framer-motion/dist/es/render/svg/use-props.mjs +24 -0
  1335. package/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +52 -0
  1336. package/node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs +30 -0
  1337. package/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs +8 -0
  1338. package/node_modules/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs +3 -0
  1339. package/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs +32 -0
  1340. package/node_modules/framer-motion/dist/es/render/svg/utils/render.mjs +12 -0
  1341. package/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +18 -0
  1342. package/node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.mjs +18 -0
  1343. package/node_modules/framer-motion/dist/es/render/utils/KeyframesResolver.mjs +157 -0
  1344. package/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs +320 -0
  1345. package/node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs +3 -0
  1346. package/node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs +24 -0
  1347. package/node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs +13 -0
  1348. package/node_modules/framer-motion/dist/es/render/utils/is-variant-label.mjs +8 -0
  1349. package/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs +67 -0
  1350. package/node_modules/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs +24 -0
  1351. package/node_modules/framer-motion/dist/es/render/utils/resolve-variants.mjs +26 -0
  1352. package/node_modules/framer-motion/dist/es/render/utils/setters.mjs +27 -0
  1353. package/node_modules/framer-motion/dist/es/render/utils/variant-props.mjs +12 -0
  1354. package/node_modules/framer-motion/dist/es/utils/GlobalConfig.mjs +6 -0
  1355. package/node_modules/framer-motion/dist/es/utils/array.mjs +21 -0
  1356. package/node_modules/framer-motion/dist/es/utils/clamp.mjs +9 -0
  1357. package/node_modules/framer-motion/dist/es/utils/delay.mjs +20 -0
  1358. package/node_modules/framer-motion/dist/es/utils/distance.mjs +9 -0
  1359. package/node_modules/framer-motion/dist/es/utils/errors.mjs +18 -0
  1360. package/node_modules/framer-motion/dist/es/utils/get-context-window.mjs +6 -0
  1361. package/node_modules/framer-motion/dist/es/utils/hsla-to-rgba.mjs +42 -0
  1362. package/node_modules/framer-motion/dist/es/utils/interpolate.mjs +75 -0
  1363. package/node_modules/framer-motion/dist/es/utils/is-browser.mjs +3 -0
  1364. package/node_modules/framer-motion/dist/es/utils/is-numerical-string.mjs +6 -0
  1365. package/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs +7 -0
  1366. package/node_modules/framer-motion/dist/es/utils/is-zero-value-string.mjs +6 -0
  1367. package/node_modules/framer-motion/dist/es/utils/memo.mjs +10 -0
  1368. package/node_modules/framer-motion/dist/es/utils/mix/color.mjs +41 -0
  1369. package/node_modules/framer-motion/dist/es/utils/mix/complex.mjs +89 -0
  1370. package/node_modules/framer-motion/dist/es/utils/mix/index.mjs +14 -0
  1371. package/node_modules/framer-motion/dist/es/utils/mix/number.mjs +26 -0
  1372. package/node_modules/framer-motion/dist/es/utils/noop.mjs +3 -0
  1373. package/node_modules/framer-motion/dist/es/utils/offsets/default.mjs +9 -0
  1374. package/node_modules/framer-motion/dist/es/utils/offsets/fill.mjs +12 -0
  1375. package/node_modules/framer-motion/dist/es/utils/offsets/time.mjs +5 -0
  1376. package/node_modules/framer-motion/dist/es/utils/pipe.mjs +11 -0
  1377. package/node_modules/framer-motion/dist/es/utils/progress.mjs +18 -0
  1378. package/node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs +19 -0
  1379. package/node_modules/framer-motion/dist/es/utils/reduced-motion/state.mjs +5 -0
  1380. package/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs +19 -0
  1381. package/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.mjs +47 -0
  1382. package/node_modules/framer-motion/dist/es/utils/resolve-value.mjs +11 -0
  1383. package/node_modules/framer-motion/dist/es/utils/shallow-compare.mjs +14 -0
  1384. package/node_modules/framer-motion/dist/es/utils/subscription-manager.mjs +40 -0
  1385. package/node_modules/framer-motion/dist/es/utils/time-conversion.mjs +10 -0
  1386. package/node_modules/framer-motion/dist/es/utils/transform.mjs +21 -0
  1387. package/node_modules/framer-motion/dist/es/utils/use-animation-frame.mjs +21 -0
  1388. package/node_modules/framer-motion/dist/es/utils/use-constant.mjs +18 -0
  1389. package/node_modules/framer-motion/dist/es/utils/use-cycle.mjs +47 -0
  1390. package/node_modules/framer-motion/dist/es/utils/use-force-update.mjs +19 -0
  1391. package/node_modules/framer-motion/dist/es/utils/use-in-view.mjs +23 -0
  1392. package/node_modules/framer-motion/dist/es/utils/use-instant-transition-state.mjs +5 -0
  1393. package/node_modules/framer-motion/dist/es/utils/use-instant-transition.mjs +41 -0
  1394. package/node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs +15 -0
  1395. package/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs +6 -0
  1396. package/node_modules/framer-motion/dist/es/utils/use-motion-value-event.mjs +13 -0
  1397. package/node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs +7 -0
  1398. package/node_modules/framer-motion/dist/es/utils/velocity-per-second.mjs +11 -0
  1399. package/node_modules/framer-motion/dist/es/utils/warn-once.mjs +11 -0
  1400. package/node_modules/framer-motion/dist/es/utils/wrap.mjs +6 -0
  1401. package/node_modules/framer-motion/dist/es/value/index.mjs +317 -0
  1402. package/node_modules/framer-motion/dist/es/value/scroll/use-element-scroll.mjs +14 -0
  1403. package/node_modules/framer-motion/dist/es/value/scroll/use-viewport-scroll.mjs +14 -0
  1404. package/node_modules/framer-motion/dist/es/value/types/color/hex.mjs +40 -0
  1405. package/node_modules/framer-motion/dist/es/value/types/color/hsla.mjs +22 -0
  1406. package/node_modules/framer-motion/dist/es/value/types/color/index.mjs +28 -0
  1407. package/node_modules/framer-motion/dist/es/value/types/color/rgba.mjs +25 -0
  1408. package/node_modules/framer-motion/dist/es/value/types/color/utils.mjs +23 -0
  1409. package/node_modules/framer-motion/dist/es/value/types/complex/filter.mjs +30 -0
  1410. package/node_modules/framer-motion/dist/es/value/types/complex/index.mjs +90 -0
  1411. package/node_modules/framer-motion/dist/es/value/types/numbers/index.mjs +17 -0
  1412. package/node_modules/framer-motion/dist/es/value/types/numbers/units.mjs +19 -0
  1413. package/node_modules/framer-motion/dist/es/value/types/utils.mjs +15 -0
  1414. package/node_modules/framer-motion/dist/es/value/use-combine-values.mjs +37 -0
  1415. package/node_modules/framer-motion/dist/es/value/use-computed.mjs +19 -0
  1416. package/node_modules/framer-motion/dist/es/value/use-inverted-scale.mjs +52 -0
  1417. package/node_modules/framer-motion/dist/es/value/use-motion-template.mjs +45 -0
  1418. package/node_modules/framer-motion/dist/es/value/use-motion-value.mjs +38 -0
  1419. package/node_modules/framer-motion/dist/es/value/use-scroll.mjs +39 -0
  1420. package/node_modules/framer-motion/dist/es/value/use-spring.mjs +73 -0
  1421. package/node_modules/framer-motion/dist/es/value/use-time.mjs +10 -0
  1422. package/node_modules/framer-motion/dist/es/value/use-transform.mjs +29 -0
  1423. package/node_modules/framer-motion/dist/es/value/use-velocity.mjs +35 -0
  1424. package/node_modules/framer-motion/dist/es/value/use-will-change/index.mjs +50 -0
  1425. package/node_modules/framer-motion/dist/es/value/use-will-change/is.mjs +7 -0
  1426. package/node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs +3 -0
  1427. package/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +16 -0
  1428. package/node_modules/framer-motion/dist/framer-motion.dev.js +12195 -0
  1429. package/node_modules/framer-motion/dist/framer-motion.js +1 -0
  1430. package/node_modules/framer-motion/dist/index.d.ts +5242 -0
  1431. package/node_modules/framer-motion/dist/projection.dev.js +6433 -0
  1432. package/node_modules/framer-motion/dist/three-entry.d.ts +2977 -0
  1433. package/node_modules/framer-motion/dom/README.md +1 -0
  1434. package/node_modules/framer-motion/dom/package.json +6 -0
  1435. package/node_modules/framer-motion/package.json +122 -0
  1436. package/node_modules/get-func-name/LICENSE +19 -0
  1437. package/node_modules/get-func-name/README.md +123 -0
  1438. package/node_modules/get-func-name/get-func-name.js +1 -0
  1439. package/node_modules/get-func-name/index.js +52 -0
  1440. package/node_modules/get-func-name/package.json +85 -0
  1441. package/node_modules/get-nonce/LICENSE +21 -0
  1442. package/node_modules/get-nonce/README.md +54 -0
  1443. package/node_modules/get-nonce/dist/es2015/index.d.ts +2 -0
  1444. package/node_modules/get-nonce/dist/es2015/index.js +13 -0
  1445. package/node_modules/get-nonce/dist/es5/index.d.ts +2 -0
  1446. package/node_modules/get-nonce/dist/es5/index.js +15 -0
  1447. package/node_modules/get-nonce/package.json +68 -0
  1448. package/node_modules/invariant/LICENSE +21 -0
  1449. package/node_modules/invariant/README.md +37 -0
  1450. package/node_modules/invariant/browser.js +49 -0
  1451. package/node_modules/invariant/invariant.js +51 -0
  1452. package/node_modules/invariant/invariant.js.flow +7 -0
  1453. package/node_modules/invariant/package.json +35 -0
  1454. package/node_modules/js-tokens/LICENSE +21 -0
  1455. package/node_modules/js-tokens/README.md +240 -0
  1456. package/node_modules/js-tokens/index.js +23 -0
  1457. package/node_modules/js-tokens/package.json +30 -0
  1458. package/node_modules/loose-envify/LICENSE +21 -0
  1459. package/node_modules/loose-envify/README.md +45 -0
  1460. package/node_modules/loose-envify/cli.js +16 -0
  1461. package/node_modules/loose-envify/custom.js +4 -0
  1462. package/node_modules/loose-envify/index.js +3 -0
  1463. package/node_modules/loose-envify/loose-envify.js +36 -0
  1464. package/node_modules/loose-envify/package.json +36 -0
  1465. package/node_modules/loose-envify/replace.js +65 -0
  1466. package/node_modules/loupe/LICENSE +9 -0
  1467. package/node_modules/loupe/README.md +63 -0
  1468. package/node_modules/loupe/lib/arguments.d.ts +3 -0
  1469. package/node_modules/loupe/lib/arguments.d.ts.map +1 -0
  1470. package/node_modules/loupe/lib/arguments.js +7 -0
  1471. package/node_modules/loupe/lib/array.d.ts +3 -0
  1472. package/node_modules/loupe/lib/array.d.ts.map +1 -0
  1473. package/node_modules/loupe/lib/array.js +16 -0
  1474. package/node_modules/loupe/lib/bigint.d.ts +3 -0
  1475. package/node_modules/loupe/lib/bigint.d.ts.map +1 -0
  1476. package/node_modules/loupe/lib/bigint.js +7 -0
  1477. package/node_modules/loupe/lib/class.d.ts +5 -0
  1478. package/node_modules/loupe/lib/class.d.ts.map +1 -0
  1479. package/node_modules/loupe/lib/class.js +15 -0
  1480. package/node_modules/loupe/lib/date.d.ts +3 -0
  1481. package/node_modules/loupe/lib/date.d.ts.map +1 -0
  1482. package/node_modules/loupe/lib/date.js +11 -0
  1483. package/node_modules/loupe/lib/error.d.ts +3 -0
  1484. package/node_modules/loupe/lib/error.d.ts.map +1 -0
  1485. package/node_modules/loupe/lib/error.js +29 -0
  1486. package/node_modules/loupe/lib/function.d.ts +7 -0
  1487. package/node_modules/loupe/lib/function.d.ts.map +1 -0
  1488. package/node_modules/loupe/lib/function.js +9 -0
  1489. package/node_modules/loupe/lib/helpers.d.ts +7 -0
  1490. package/node_modules/loupe/lib/helpers.d.ts.map +1 -0
  1491. package/node_modules/loupe/lib/helpers.js +152 -0
  1492. package/node_modules/loupe/lib/html.d.ts +5 -0
  1493. package/node_modules/loupe/lib/html.d.ts.map +1 -0
  1494. package/node_modules/loupe/lib/html.js +34 -0
  1495. package/node_modules/loupe/lib/index.d.ts +7 -0
  1496. package/node_modules/loupe/lib/index.d.ts.map +1 -0
  1497. package/node_modules/loupe/lib/index.js +161 -0
  1498. package/node_modules/loupe/lib/map.d.ts +3 -0
  1499. package/node_modules/loupe/lib/map.d.ts.map +1 -0
  1500. package/node_modules/loupe/lib/map.js +24 -0
  1501. package/node_modules/loupe/lib/number.d.ts +3 -0
  1502. package/node_modules/loupe/lib/number.d.ts.map +1 -0
  1503. package/node_modules/loupe/lib/number.js +17 -0
  1504. package/node_modules/loupe/lib/object.d.ts +3 -0
  1505. package/node_modules/loupe/lib/object.d.ts.map +1 -0
  1506. package/node_modules/loupe/lib/object.js +22 -0
  1507. package/node_modules/loupe/lib/promise.d.ts +5 -0
  1508. package/node_modules/loupe/lib/promise.d.ts.map +1 -0
  1509. package/node_modules/loupe/lib/promise.js +18 -0
  1510. package/node_modules/loupe/lib/regexp.d.ts +3 -0
  1511. package/node_modules/loupe/lib/regexp.d.ts.map +1 -0
  1512. package/node_modules/loupe/lib/regexp.js +7 -0
  1513. package/node_modules/loupe/lib/set.d.ts +3 -0
  1514. package/node_modules/loupe/lib/set.d.ts.map +1 -0
  1515. package/node_modules/loupe/lib/set.js +15 -0
  1516. package/node_modules/loupe/lib/string.d.ts +3 -0
  1517. package/node_modules/loupe/lib/string.d.ts.map +1 -0
  1518. package/node_modules/loupe/lib/string.js +24 -0
  1519. package/node_modules/loupe/lib/symbol.d.ts +2 -0
  1520. package/node_modules/loupe/lib/symbol.d.ts.map +1 -0
  1521. package/node_modules/loupe/lib/symbol.js +6 -0
  1522. package/node_modules/loupe/lib/typedarray.d.ts +5 -0
  1523. package/node_modules/loupe/lib/typedarray.d.ts.map +1 -0
  1524. package/node_modules/loupe/lib/typedarray.js +38 -0
  1525. package/node_modules/loupe/lib/types.d.ts +15 -0
  1526. package/node_modules/loupe/lib/types.d.ts.map +1 -0
  1527. package/node_modules/loupe/lib/types.js +1 -0
  1528. package/node_modules/loupe/loupe.js +637 -0
  1529. package/node_modules/loupe/package.json +126 -0
  1530. package/node_modules/pathval/LICENSE +16 -0
  1531. package/node_modules/pathval/README.md +147 -0
  1532. package/node_modules/pathval/index.js +292 -0
  1533. package/node_modules/pathval/package.json +73 -0
  1534. package/node_modules/pathval/pathval.js +1 -0
  1535. package/node_modules/react-remove-scroll/LICENSE +21 -0
  1536. package/node_modules/react-remove-scroll/README.md +152 -0
  1537. package/node_modules/react-remove-scroll/UI/UI.d.ts +1 -0
  1538. package/node_modules/react-remove-scroll/UI/package.json +8 -0
  1539. package/node_modules/react-remove-scroll/dist/es2015/Combination.d.ts +3 -0
  1540. package/node_modules/react-remove-scroll/dist/es2015/Combination.js +7 -0
  1541. package/node_modules/react-remove-scroll/dist/es2015/SideEffect.d.ts +5 -0
  1542. package/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +146 -0
  1543. package/node_modules/react-remove-scroll/dist/es2015/UI.d.ts +7 -0
  1544. package/node_modules/react-remove-scroll/dist/es2015/UI.js +36 -0
  1545. package/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.d.ts +3 -0
  1546. package/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +19 -0
  1547. package/node_modules/react-remove-scroll/dist/es2015/handleScroll.d.ts +3 -0
  1548. package/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +96 -0
  1549. package/node_modules/react-remove-scroll/dist/es2015/index.d.ts +2 -0
  1550. package/node_modules/react-remove-scroll/dist/es2015/index.js +2 -0
  1551. package/node_modules/react-remove-scroll/dist/es2015/medium.d.ts +2 -0
  1552. package/node_modules/react-remove-scroll/dist/es2015/medium.js +2 -0
  1553. package/node_modules/react-remove-scroll/dist/es2015/pinchAndZoom.d.ts +8 -0
  1554. package/node_modules/react-remove-scroll/dist/es2015/pinchAndZoom.js +33 -0
  1555. package/node_modules/react-remove-scroll/dist/es2015/sidecar.d.ts +2 -0
  1556. package/node_modules/react-remove-scroll/dist/es2015/sidecar.js +4 -0
  1557. package/node_modules/react-remove-scroll/dist/es2015/types.d.ts +90 -0
  1558. package/node_modules/react-remove-scroll/dist/es2015/types.js +1 -0
  1559. package/node_modules/react-remove-scroll/dist/es2019/Combination.d.ts +3 -0
  1560. package/node_modules/react-remove-scroll/dist/es2019/Combination.js +6 -0
  1561. package/node_modules/react-remove-scroll/dist/es2019/SideEffect.d.ts +5 -0
  1562. package/node_modules/react-remove-scroll/dist/es2019/SideEffect.js +144 -0
  1563. package/node_modules/react-remove-scroll/dist/es2019/UI.d.ts +7 -0
  1564. package/node_modules/react-remove-scroll/dist/es2019/UI.js +41 -0
  1565. package/node_modules/react-remove-scroll/dist/es2019/aggresiveCapture.d.ts +3 -0
  1566. package/node_modules/react-remove-scroll/dist/es2019/aggresiveCapture.js +19 -0
  1567. package/node_modules/react-remove-scroll/dist/es2019/handleScroll.d.ts +3 -0
  1568. package/node_modules/react-remove-scroll/dist/es2019/handleScroll.js +84 -0
  1569. package/node_modules/react-remove-scroll/dist/es2019/index.d.ts +2 -0
  1570. package/node_modules/react-remove-scroll/dist/es2019/index.js +2 -0
  1571. package/node_modules/react-remove-scroll/dist/es2019/medium.d.ts +2 -0
  1572. package/node_modules/react-remove-scroll/dist/es2019/medium.js +2 -0
  1573. package/node_modules/react-remove-scroll/dist/es2019/pinchAndZoom.d.ts +8 -0
  1574. package/node_modules/react-remove-scroll/dist/es2019/pinchAndZoom.js +33 -0
  1575. package/node_modules/react-remove-scroll/dist/es2019/sidecar.d.ts +2 -0
  1576. package/node_modules/react-remove-scroll/dist/es2019/sidecar.js +4 -0
  1577. package/node_modules/react-remove-scroll/dist/es2019/types.d.ts +90 -0
  1578. package/node_modules/react-remove-scroll/dist/es2019/types.js +1 -0
  1579. package/node_modules/react-remove-scroll/dist/es5/Combination.d.ts +3 -0
  1580. package/node_modules/react-remove-scroll/dist/es5/Combination.js +9 -0
  1581. package/node_modules/react-remove-scroll/dist/es5/SideEffect.d.ts +5 -0
  1582. package/node_modules/react-remove-scroll/dist/es5/SideEffect.js +152 -0
  1583. package/node_modules/react-remove-scroll/dist/es5/UI.d.ts +7 -0
  1584. package/node_modules/react-remove-scroll/dist/es5/UI.js +39 -0
  1585. package/node_modules/react-remove-scroll/dist/es5/aggresiveCapture.d.ts +3 -0
  1586. package/node_modules/react-remove-scroll/dist/es5/aggresiveCapture.js +22 -0
  1587. package/node_modules/react-remove-scroll/dist/es5/handleScroll.d.ts +3 -0
  1588. package/node_modules/react-remove-scroll/dist/es5/handleScroll.js +101 -0
  1589. package/node_modules/react-remove-scroll/dist/es5/index.d.ts +2 -0
  1590. package/node_modules/react-remove-scroll/dist/es5/index.js +6 -0
  1591. package/node_modules/react-remove-scroll/dist/es5/medium.d.ts +2 -0
  1592. package/node_modules/react-remove-scroll/dist/es5/medium.js +5 -0
  1593. package/node_modules/react-remove-scroll/dist/es5/pinchAndZoom.d.ts +8 -0
  1594. package/node_modules/react-remove-scroll/dist/es5/pinchAndZoom.js +37 -0
  1595. package/node_modules/react-remove-scroll/dist/es5/sidecar.d.ts +2 -0
  1596. package/node_modules/react-remove-scroll/dist/es5/sidecar.js +6 -0
  1597. package/node_modules/react-remove-scroll/dist/es5/types.d.ts +90 -0
  1598. package/node_modules/react-remove-scroll/dist/es5/types.js +2 -0
  1599. package/node_modules/react-remove-scroll/package.json +96 -0
  1600. package/node_modules/react-remove-scroll/sidecar/package.json +7 -0
  1601. package/node_modules/react-remove-scroll/sidecar/sidecar.d.ts +5 -0
  1602. package/node_modules/react-remove-scroll-bar/README.md +52 -0
  1603. package/node_modules/react-remove-scroll-bar/constants/package.json +8 -0
  1604. package/node_modules/react-remove-scroll-bar/dist/es2015/component.d.ts +13 -0
  1605. package/node_modules/react-remove-scroll-bar/dist/es2015/component.js +53 -0
  1606. package/node_modules/react-remove-scroll-bar/dist/es2015/constants.d.ts +8 -0
  1607. package/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +8 -0
  1608. package/node_modules/react-remove-scroll-bar/dist/es2015/index.d.ts +4 -0
  1609. package/node_modules/react-remove-scroll-bar/dist/es2015/index.js +4 -0
  1610. package/node_modules/react-remove-scroll-bar/dist/es2015/utils.d.ts +14 -0
  1611. package/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +29 -0
  1612. package/node_modules/react-remove-scroll-bar/dist/es2019/component.d.ts +13 -0
  1613. package/node_modules/react-remove-scroll-bar/dist/es2019/component.js +85 -0
  1614. package/node_modules/react-remove-scroll-bar/dist/es2019/constants.d.ts +8 -0
  1615. package/node_modules/react-remove-scroll-bar/dist/es2019/constants.js +8 -0
  1616. package/node_modules/react-remove-scroll-bar/dist/es2019/index.d.ts +4 -0
  1617. package/node_modules/react-remove-scroll-bar/dist/es2019/index.js +4 -0
  1618. package/node_modules/react-remove-scroll-bar/dist/es2019/utils.d.ts +14 -0
  1619. package/node_modules/react-remove-scroll-bar/dist/es2019/utils.js +28 -0
  1620. package/node_modules/react-remove-scroll-bar/dist/es5/component.d.ts +13 -0
  1621. package/node_modules/react-remove-scroll-bar/dist/es5/component.js +59 -0
  1622. package/node_modules/react-remove-scroll-bar/dist/es5/constants.d.ts +8 -0
  1623. package/node_modules/react-remove-scroll-bar/dist/es5/constants.js +11 -0
  1624. package/node_modules/react-remove-scroll-bar/dist/es5/index.d.ts +4 -0
  1625. package/node_modules/react-remove-scroll-bar/dist/es5/index.js +12 -0
  1626. package/node_modules/react-remove-scroll-bar/dist/es5/utils.d.ts +14 -0
  1627. package/node_modules/react-remove-scroll-bar/dist/es5/utils.js +33 -0
  1628. package/node_modules/react-remove-scroll-bar/package.json +85 -0
  1629. package/node_modules/react-router/CHANGELOG.md +688 -0
  1630. package/node_modules/react-router/LICENSE.md +23 -0
  1631. package/node_modules/react-router/README.md +16 -0
  1632. package/node_modules/react-router/dist/index.d.ts +25 -0
  1633. package/node_modules/react-router/dist/index.js +1454 -0
  1634. package/node_modules/react-router/dist/index.js.map +1 -0
  1635. package/node_modules/react-router/dist/lib/components.d.ts +157 -0
  1636. package/node_modules/react-router/dist/lib/context.d.ts +102 -0
  1637. package/node_modules/react-router/dist/lib/hooks.d.ts +181 -0
  1638. package/node_modules/react-router/dist/main.js +19 -0
  1639. package/node_modules/react-router/dist/react-router.development.js +1350 -0
  1640. package/node_modules/react-router/dist/react-router.development.js.map +1 -0
  1641. package/node_modules/react-router/dist/react-router.production.min.js +12 -0
  1642. package/node_modules/react-router/dist/react-router.production.min.js.map +1 -0
  1643. package/node_modules/react-router/dist/umd/react-router.development.js +1572 -0
  1644. package/node_modules/react-router/dist/umd/react-router.development.js.map +1 -0
  1645. package/node_modules/react-router/dist/umd/react-router.production.min.js +12 -0
  1646. package/node_modules/react-router/dist/umd/react-router.production.min.js.map +1 -0
  1647. package/node_modules/react-router/node_modules/@remix-run/router/CHANGELOG.md +716 -0
  1648. package/node_modules/react-router/node_modules/@remix-run/router/LICENSE.md +23 -0
  1649. package/node_modules/react-router/node_modules/@remix-run/router/README.md +135 -0
  1650. package/node_modules/react-router/node_modules/@remix-run/router/dist/history.d.ts +250 -0
  1651. package/node_modules/react-router/node_modules/@remix-run/router/dist/index.d.ts +9 -0
  1652. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.cjs.js +4870 -0
  1653. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.cjs.js.map +1 -0
  1654. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.d.ts +508 -0
  1655. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.js +4327 -0
  1656. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.js.map +1 -0
  1657. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.umd.js +4876 -0
  1658. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.umd.js.map +1 -0
  1659. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.umd.min.js +12 -0
  1660. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.umd.min.js.map +1 -0
  1661. package/node_modules/react-router/node_modules/@remix-run/router/dist/utils.d.ts +502 -0
  1662. package/node_modules/react-router/node_modules/@remix-run/router/history.ts +746 -0
  1663. package/node_modules/react-router/node_modules/@remix-run/router/index.ts +96 -0
  1664. package/node_modules/react-router/node_modules/@remix-run/router/package.json +33 -0
  1665. package/node_modules/react-router/node_modules/@remix-run/router/router.ts +4915 -0
  1666. package/node_modules/react-router/node_modules/@remix-run/router/utils.ts +1598 -0
  1667. package/node_modules/react-router/package.json +43 -0
  1668. package/node_modules/react-router-dom/CHANGELOG.md +825 -0
  1669. package/node_modules/react-router-dom/LICENSE.md +23 -0
  1670. package/node_modules/react-router-dom/README.md +5 -0
  1671. package/node_modules/react-router-dom/dist/dom.d.ts +104 -0
  1672. package/node_modules/react-router-dom/dist/index.d.ts +317 -0
  1673. package/node_modules/react-router-dom/dist/index.js +1442 -0
  1674. package/node_modules/react-router-dom/dist/index.js.map +1 -0
  1675. package/node_modules/react-router-dom/dist/main.js +19 -0
  1676. package/node_modules/react-router-dom/dist/react-router-dom.development.js +1483 -0
  1677. package/node_modules/react-router-dom/dist/react-router-dom.development.js.map +1 -0
  1678. package/node_modules/react-router-dom/dist/react-router-dom.production.min.js +12 -0
  1679. package/node_modules/react-router-dom/dist/react-router-dom.production.min.js.map +1 -0
  1680. package/node_modules/react-router-dom/dist/server.d.ts +31 -0
  1681. package/node_modules/react-router-dom/dist/server.js +318 -0
  1682. package/node_modules/react-router-dom/dist/server.mjs +293 -0
  1683. package/node_modules/react-router-dom/dist/umd/react-router-dom.development.js +1779 -0
  1684. package/node_modules/react-router-dom/dist/umd/react-router-dom.development.js.map +1 -0
  1685. package/node_modules/react-router-dom/dist/umd/react-router-dom.production.min.js +12 -0
  1686. package/node_modules/react-router-dom/dist/umd/react-router-dom.production.min.js.map +1 -0
  1687. package/node_modules/react-router-dom/node_modules/@remix-run/router/CHANGELOG.md +716 -0
  1688. package/node_modules/react-router-dom/node_modules/@remix-run/router/LICENSE.md +23 -0
  1689. package/node_modules/react-router-dom/node_modules/@remix-run/router/README.md +135 -0
  1690. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/history.d.ts +250 -0
  1691. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/index.d.ts +9 -0
  1692. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.cjs.js +4870 -0
  1693. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.cjs.js.map +1 -0
  1694. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.d.ts +508 -0
  1695. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.js +4327 -0
  1696. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.js.map +1 -0
  1697. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.umd.js +4876 -0
  1698. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.umd.js.map +1 -0
  1699. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.umd.min.js +12 -0
  1700. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.umd.min.js.map +1 -0
  1701. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/utils.d.ts +502 -0
  1702. package/node_modules/react-router-dom/node_modules/@remix-run/router/history.ts +746 -0
  1703. package/node_modules/react-router-dom/node_modules/@remix-run/router/index.ts +96 -0
  1704. package/node_modules/react-router-dom/node_modules/@remix-run/router/package.json +33 -0
  1705. package/node_modules/react-router-dom/node_modules/@remix-run/router/router.ts +4915 -0
  1706. package/node_modules/react-router-dom/node_modules/@remix-run/router/utils.ts +1598 -0
  1707. package/node_modules/react-router-dom/package.json +49 -0
  1708. package/node_modules/react-router-dom/server.d.ts +31 -0
  1709. package/node_modules/react-router-dom/server.js +318 -0
  1710. package/node_modules/react-router-dom/server.mjs +293 -0
  1711. package/node_modules/react-style-singleton/README.md +41 -0
  1712. package/node_modules/react-style-singleton/dist/es2015/component.d.ts +21 -0
  1713. package/node_modules/react-style-singleton/dist/es2015/component.js +16 -0
  1714. package/node_modules/react-style-singleton/dist/es2015/hook.d.ts +23 -0
  1715. package/node_modules/react-style-singleton/dist/es2015/hook.js +22 -0
  1716. package/node_modules/react-style-singleton/dist/es2015/index.d.ts +3 -0
  1717. package/node_modules/react-style-singleton/dist/es2015/index.js +3 -0
  1718. package/node_modules/react-style-singleton/dist/es2015/singleton.d.ts +4 -0
  1719. package/node_modules/react-style-singleton/dist/es2015/singleton.js +48 -0
  1720. package/node_modules/react-style-singleton/dist/es2019/component.d.ts +21 -0
  1721. package/node_modules/react-style-singleton/dist/es2019/component.js +15 -0
  1722. package/node_modules/react-style-singleton/dist/es2019/hook.d.ts +23 -0
  1723. package/node_modules/react-style-singleton/dist/es2019/hook.js +22 -0
  1724. package/node_modules/react-style-singleton/dist/es2019/index.d.ts +3 -0
  1725. package/node_modules/react-style-singleton/dist/es2019/index.js +3 -0
  1726. package/node_modules/react-style-singleton/dist/es2019/singleton.d.ts +4 -0
  1727. package/node_modules/react-style-singleton/dist/es2019/singleton.js +48 -0
  1728. package/node_modules/react-style-singleton/dist/es5/component.d.ts +21 -0
  1729. package/node_modules/react-style-singleton/dist/es5/component.js +20 -0
  1730. package/node_modules/react-style-singleton/dist/es5/hook.d.ts +23 -0
  1731. package/node_modules/react-style-singleton/dist/es5/hook.js +27 -0
  1732. package/node_modules/react-style-singleton/dist/es5/index.d.ts +3 -0
  1733. package/node_modules/react-style-singleton/dist/es5/index.js +9 -0
  1734. package/node_modules/react-style-singleton/dist/es5/singleton.d.ts +4 -0
  1735. package/node_modules/react-style-singleton/dist/es5/singleton.js +52 -0
  1736. package/node_modules/react-style-singleton/dist/index.js +1 -0
  1737. package/node_modules/react-style-singleton/package.json +87 -0
  1738. package/node_modules/regenerator-runtime/LICENSE +21 -0
  1739. package/node_modules/regenerator-runtime/README.md +31 -0
  1740. package/node_modules/regenerator-runtime/package.json +19 -0
  1741. package/node_modules/regenerator-runtime/path.js +11 -0
  1742. package/node_modules/regenerator-runtime/runtime.js +761 -0
  1743. package/node_modules/remix-utils/.eslintrc.cjs +54 -0
  1744. package/node_modules/remix-utils/LICENSE +21 -0
  1745. package/node_modules/remix-utils/README.md +2141 -0
  1746. package/node_modules/remix-utils/build/client/cache-assets.d.ts +22 -0
  1747. package/node_modules/remix-utils/build/client/cache-assets.js +66 -0
  1748. package/node_modules/remix-utils/build/common/promise.d.ts +87 -0
  1749. package/node_modules/remix-utils/build/common/promise.js +112 -0
  1750. package/node_modules/remix-utils/build/common/timers.d.ts +27 -0
  1751. package/node_modules/remix-utils/build/common/timers.js +47 -0
  1752. package/node_modules/remix-utils/build/react/authenticity-token.d.ts +50 -0
  1753. package/node_modules/remix-utils/build/react/authenticity-token.js +54 -0
  1754. package/node_modules/remix-utils/build/react/client-only.d.ts +27 -0
  1755. package/node_modules/remix-utils/build/react/client-only.js +20 -0
  1756. package/node_modules/remix-utils/build/react/existing-search-params.d.ts +34 -0
  1757. package/node_modules/remix-utils/build/react/existing-search-params.js +32 -0
  1758. package/node_modules/remix-utils/build/react/external-scripts.d.ts +91 -0
  1759. package/node_modules/remix-utils/build/react/external-scripts.js +106 -0
  1760. package/node_modules/remix-utils/build/react/fetcher-type.d.ts +31 -0
  1761. package/node_modules/remix-utils/build/react/fetcher-type.js +53 -0
  1762. package/node_modules/remix-utils/build/react/handle-conventions.d.ts +10 -0
  1763. package/node_modules/remix-utils/build/react/handle-conventions.js +1 -0
  1764. package/node_modules/remix-utils/build/react/honeypot.d.ts +11 -0
  1765. package/node_modules/remix-utils/build/react/honeypot.js +16 -0
  1766. package/node_modules/remix-utils/build/react/server-only.d.ts +25 -0
  1767. package/node_modules/remix-utils/build/react/server-only.js +18 -0
  1768. package/node_modules/remix-utils/build/react/use-debounce-fetcher.d.ts +28 -0
  1769. package/node_modules/remix-utils/build/react/use-debounce-fetcher.js +27 -0
  1770. package/node_modules/remix-utils/build/react/use-debounce-submit.d.ts +7 -0
  1771. package/node_modules/remix-utils/build/react/use-debounce-submit.js +41 -0
  1772. package/node_modules/remix-utils/build/react/use-delegated-anchors.d.ts +6 -0
  1773. package/node_modules/remix-utils/build/react/use-delegated-anchors.js +69 -0
  1774. package/node_modules/remix-utils/build/react/use-event-source.d.ts +17 -0
  1775. package/node_modules/remix-utils/build/react/use-event-source.js +37 -0
  1776. package/node_modules/remix-utils/build/react/use-global-navigation-state.d.ts +33 -0
  1777. package/node_modules/remix-utils/build/react/use-global-navigation-state.js +67 -0
  1778. package/node_modules/remix-utils/build/react/use-hydrated.d.ts +18 -0
  1779. package/node_modules/remix-utils/build/react/use-hydrated.js +24 -0
  1780. package/node_modules/remix-utils/build/react/use-locales.d.ts +24 -0
  1781. package/node_modules/remix-utils/build/react/use-locales.js +56 -0
  1782. package/node_modules/remix-utils/build/react/use-should-hydrate.d.ts +21 -0
  1783. package/node_modules/remix-utils/build/react/use-should-hydrate.js +44 -0
  1784. package/node_modules/remix-utils/build/server/cors.d.ts +101 -0
  1785. package/node_modules/remix-utils/build/server/cors.js +179 -0
  1786. package/node_modules/remix-utils/build/server/csrf.d.ts +75 -0
  1787. package/node_modules/remix-utils/build/server/csrf.js +106 -0
  1788. package/node_modules/remix-utils/build/server/event-stream.d.ts +27 -0
  1789. package/node_modules/remix-utils/build/server/event-stream.js +44 -0
  1790. package/node_modules/remix-utils/build/server/get-client-ip-address.d.ts +29 -0
  1791. package/node_modules/remix-utils/build/server/get-client-ip-address.js +51 -0
  1792. package/node_modules/remix-utils/build/server/get-client-locales.d.ts +18 -0
  1793. package/node_modules/remix-utils/build/server/get-client-locales.js +18 -0
  1794. package/node_modules/remix-utils/build/server/get-headers.d.ts +6 -0
  1795. package/node_modules/remix-utils/build/server/get-headers.js +11 -0
  1796. package/node_modules/remix-utils/build/server/honeypot.d.ts +32 -0
  1797. package/node_modules/remix-utils/build/server/honeypot.js +96 -0
  1798. package/node_modules/remix-utils/build/server/is-prefetch.d.ts +16 -0
  1799. package/node_modules/remix-utils/build/server/is-prefetch.js +11 -0
  1800. package/node_modules/remix-utils/build/server/json-hash.d.ts +6 -0
  1801. package/node_modules/remix-utils/build/server/json-hash.js +16 -0
  1802. package/node_modules/remix-utils/build/server/named-action.d.ts +19 -0
  1803. package/node_modules/remix-utils/build/server/named-action.js +62 -0
  1804. package/node_modules/remix-utils/build/server/parse-accept-header.d.ts +12 -0
  1805. package/node_modules/remix-utils/build/server/parse-accept-header.js +17 -0
  1806. package/node_modules/remix-utils/build/server/preload-route-assets.d.ts +80 -0
  1807. package/node_modules/remix-utils/build/server/preload-route-assets.js +120 -0
  1808. package/node_modules/remix-utils/build/server/redirect-back.d.ts +17 -0
  1809. package/node_modules/remix-utils/build/server/redirect-back.js +29 -0
  1810. package/node_modules/remix-utils/build/server/respond-to.d.ts +40 -0
  1811. package/node_modules/remix-utils/build/server/respond-to.js +22 -0
  1812. package/node_modules/remix-utils/build/server/responses.d.ts +100 -0
  1813. package/node_modules/remix-utils/build/server/responses.js +167 -0
  1814. package/node_modules/remix-utils/build/server/rolling-cookie.d.ts +4 -0
  1815. package/node_modules/remix-utils/build/server/rolling-cookie.js +9 -0
  1816. package/node_modules/remix-utils/build/server/safe-redirect.d.ts +10 -0
  1817. package/node_modules/remix-utils/build/server/safe-redirect.js +22 -0
  1818. package/node_modules/remix-utils/build/server/sec-fetch.d.ts +43 -0
  1819. package/node_modules/remix-utils/build/server/sec-fetch.js +67 -0
  1820. package/node_modules/remix-utils/build/server/typed-cookie.d.ts +17 -0
  1821. package/node_modules/remix-utils/build/server/typed-cookie.js +58 -0
  1822. package/node_modules/remix-utils/build/server/typed-session.d.ts +59 -0
  1823. package/node_modules/remix-utils/build/server/typed-session.js +88 -0
  1824. package/node_modules/remix-utils/package.json +182 -0
  1825. package/node_modules/remix-utils/scripts/check-pkg-exports.ts +61 -0
  1826. package/node_modules/set-cookie-parser/LICENSE +21 -0
  1827. package/node_modules/set-cookie-parser/README.md +199 -0
  1828. package/node_modules/set-cookie-parser/lib/set-cookie.js +226 -0
  1829. package/node_modules/set-cookie-parser/package.json +43 -0
  1830. package/node_modules/source-map/LICENSE +28 -0
  1831. package/node_modules/source-map/README.md +822 -0
  1832. package/node_modules/source-map/dist/source-map.js +1 -0
  1833. package/node_modules/source-map/lib/array-set.js +100 -0
  1834. package/node_modules/source-map/lib/base64-vlq.js +111 -0
  1835. package/node_modules/source-map/lib/base64.js +18 -0
  1836. package/node_modules/source-map/lib/binary-search.js +107 -0
  1837. package/node_modules/source-map/lib/mapping-list.js +80 -0
  1838. package/node_modules/source-map/lib/mappings.wasm +0 -0
  1839. package/node_modules/source-map/lib/read-wasm.js +49 -0
  1840. package/node_modules/source-map/lib/source-map-consumer.js +1237 -0
  1841. package/node_modules/source-map/lib/source-map-generator.js +413 -0
  1842. package/node_modules/source-map/lib/source-node.js +404 -0
  1843. package/node_modules/source-map/lib/util.js +546 -0
  1844. package/node_modules/source-map/lib/wasm.js +107 -0
  1845. package/node_modules/source-map/package.json +91 -0
  1846. package/node_modules/source-map/source-map.d.ts +369 -0
  1847. package/node_modules/source-map/source-map.js +8 -0
  1848. package/node_modules/tailwind-merge/LICENSE.md +21 -0
  1849. package/node_modules/tailwind-merge/README.md +38 -0
  1850. package/node_modules/tailwind-merge/dist/bundle-cjs.js +2595 -0
  1851. package/node_modules/tailwind-merge/dist/bundle-cjs.js.map +1 -0
  1852. package/node_modules/tailwind-merge/dist/bundle-mjs.mjs +2583 -0
  1853. package/node_modules/tailwind-merge/dist/bundle-mjs.mjs.map +1 -0
  1854. package/node_modules/tailwind-merge/dist/es5/bundle-cjs.js +2645 -0
  1855. package/node_modules/tailwind-merge/dist/es5/bundle-cjs.js.map +1 -0
  1856. package/node_modules/tailwind-merge/dist/es5/bundle-mjs.mjs +2633 -0
  1857. package/node_modules/tailwind-merge/dist/es5/bundle-mjs.mjs.map +1 -0
  1858. package/node_modules/tailwind-merge/dist/types.d.ts +2143 -0
  1859. package/node_modules/tailwind-merge/package.json +95 -0
  1860. package/node_modules/tailwind-merge/src/index.ts +14 -0
  1861. package/node_modules/tailwind-merge/src/lib/class-utils.ts +215 -0
  1862. package/node_modules/tailwind-merge/src/lib/config-utils.ts +14 -0
  1863. package/node_modules/tailwind-merge/src/lib/create-tailwind-merge.ts +50 -0
  1864. package/node_modules/tailwind-merge/src/lib/default-config.ts +1866 -0
  1865. package/node_modules/tailwind-merge/src/lib/extend-tailwind-merge.ts +26 -0
  1866. package/node_modules/tailwind-merge/src/lib/from-theme.ts +13 -0
  1867. package/node_modules/tailwind-merge/src/lib/lru-cache.ts +52 -0
  1868. package/node_modules/tailwind-merge/src/lib/merge-classlist.ts +99 -0
  1869. package/node_modules/tailwind-merge/src/lib/merge-configs.ts +72 -0
  1870. package/node_modules/tailwind-merge/src/lib/modifier-utils.ts +95 -0
  1871. package/node_modules/tailwind-merge/src/lib/tw-join.ts +50 -0
  1872. package/node_modules/tailwind-merge/src/lib/tw-merge.ts +4 -0
  1873. package/node_modules/tailwind-merge/src/lib/types.ts +412 -0
  1874. package/node_modules/tailwind-merge/src/lib/validators.ts +104 -0
  1875. package/node_modules/tslib/CopyrightNotice.txt +15 -0
  1876. package/node_modules/tslib/LICENSE.txt +12 -0
  1877. package/node_modules/tslib/README.md +164 -0
  1878. package/node_modules/tslib/SECURITY.md +41 -0
  1879. package/node_modules/tslib/modules/index.d.ts +37 -0
  1880. package/node_modules/tslib/modules/index.js +68 -0
  1881. package/node_modules/tslib/modules/package.json +3 -0
  1882. package/node_modules/tslib/package.json +47 -0
  1883. package/node_modules/tslib/tslib.d.ts +453 -0
  1884. package/node_modules/tslib/tslib.es6.html +1 -0
  1885. package/node_modules/tslib/tslib.es6.js +370 -0
  1886. package/node_modules/tslib/tslib.es6.mjs +370 -0
  1887. package/node_modules/tslib/tslib.html +1 -0
  1888. package/node_modules/tslib/tslib.js +421 -0
  1889. package/node_modules/type-fest/index.d.ts +153 -0
  1890. package/node_modules/type-fest/package.json +71 -0
  1891. package/node_modules/type-fest/readme.md +971 -0
  1892. package/node_modules/type-fest/source/array-indices.d.ts +23 -0
  1893. package/node_modules/type-fest/source/array-slice.d.ts +106 -0
  1894. package/node_modules/type-fest/source/array-splice.d.ts +97 -0
  1895. package/node_modules/type-fest/source/array-values.d.ts +22 -0
  1896. package/node_modules/type-fest/source/async-return-type.d.ts +23 -0
  1897. package/node_modules/type-fest/source/asyncify.d.ts +32 -0
  1898. package/node_modules/type-fest/source/basic.d.ts +68 -0
  1899. package/node_modules/type-fest/source/camel-case.d.ts +80 -0
  1900. package/node_modules/type-fest/source/camel-cased-properties-deep.d.ts +54 -0
  1901. package/node_modules/type-fest/source/camel-cased-properties.d.ts +36 -0
  1902. package/node_modules/type-fest/source/conditional-except.d.ts +45 -0
  1903. package/node_modules/type-fest/source/conditional-keys.d.ts +45 -0
  1904. package/node_modules/type-fest/source/conditional-pick-deep.d.ts +104 -0
  1905. package/node_modules/type-fest/source/conditional-pick.d.ts +44 -0
  1906. package/node_modules/type-fest/source/conditional-simplify.d.ts +32 -0
  1907. package/node_modules/type-fest/source/delimiter-case.d.ts +99 -0
  1908. package/node_modules/type-fest/source/delimiter-cased-properties-deep.d.ts +82 -0
  1909. package/node_modules/type-fest/source/delimiter-cased-properties.d.ts +37 -0
  1910. package/node_modules/type-fest/source/distributed-omit.d.ts +89 -0
  1911. package/node_modules/type-fest/source/distributed-pick.d.ts +85 -0
  1912. package/node_modules/type-fest/source/empty-object.d.ts +46 -0
  1913. package/node_modules/type-fest/source/enforce-optional.d.ts +47 -0
  1914. package/node_modules/type-fest/source/entries.d.ts +62 -0
  1915. package/node_modules/type-fest/source/entry.d.ts +65 -0
  1916. package/node_modules/type-fest/source/exact.d.ts +63 -0
  1917. package/node_modules/type-fest/source/except.d.ts +80 -0
  1918. package/node_modules/type-fest/source/fixed-length-array.d.ts +43 -0
  1919. package/node_modules/type-fest/source/get.d.ts +191 -0
  1920. package/node_modules/type-fest/source/global-this.d.ts +21 -0
  1921. package/node_modules/type-fest/source/greater-than-or-equal.d.ts +22 -0
  1922. package/node_modules/type-fest/source/greater-than.d.ts +49 -0
  1923. package/node_modules/type-fest/source/has-optional-keys.d.ts +21 -0
  1924. package/node_modules/type-fest/source/has-readonly-keys.d.ts +21 -0
  1925. package/node_modules/type-fest/source/has-required-keys.d.ts +59 -0
  1926. package/node_modules/type-fest/source/has-writable-keys.d.ts +21 -0
  1927. package/node_modules/type-fest/source/if-any.d.ts +24 -0
  1928. package/node_modules/type-fest/source/if-empty-object.d.ts +26 -0
  1929. package/node_modules/type-fest/source/if-never.d.ts +24 -0
  1930. package/node_modules/type-fest/source/if-unknown.d.ts +24 -0
  1931. package/node_modules/type-fest/source/includes.d.ts +22 -0
  1932. package/node_modules/type-fest/source/int-range.d.ts +53 -0
  1933. package/node_modules/type-fest/source/internal.d.ts +824 -0
  1934. package/node_modules/type-fest/source/invariant-of.d.ts +78 -0
  1935. package/node_modules/type-fest/source/is-any.d.ts +29 -0
  1936. package/node_modules/type-fest/source/is-equal.d.ts +31 -0
  1937. package/node_modules/type-fest/source/is-literal.d.ts +256 -0
  1938. package/node_modules/type-fest/source/is-never.d.ts +49 -0
  1939. package/node_modules/type-fest/source/is-unknown.d.ts +52 -0
  1940. package/node_modules/type-fest/source/iterable-element.d.ts +54 -0
  1941. package/node_modules/type-fest/source/join.d.ts +68 -0
  1942. package/node_modules/type-fest/source/jsonifiable.d.ts +37 -0
  1943. package/node_modules/type-fest/source/jsonify.d.ts +121 -0
  1944. package/node_modules/type-fest/source/kebab-case.d.ts +38 -0
  1945. package/node_modules/type-fest/source/kebab-cased-properties-deep.d.ts +47 -0
  1946. package/node_modules/type-fest/source/kebab-cased-properties.d.ts +30 -0
  1947. package/node_modules/type-fest/source/keys-of-union.d.ts +40 -0
  1948. package/node_modules/type-fest/source/last-array-element.d.ts +38 -0
  1949. package/node_modules/type-fest/source/less-than-or-equal.d.ts +22 -0
  1950. package/node_modules/type-fest/source/less-than.d.ts +22 -0
  1951. package/node_modules/type-fest/source/literal-to-primitive-deep.d.ts +36 -0
  1952. package/node_modules/type-fest/source/literal-to-primitive.d.ts +36 -0
  1953. package/node_modules/type-fest/source/literal-union.d.ts +35 -0
  1954. package/node_modules/type-fest/source/merge-deep.d.ts +487 -0
  1955. package/node_modules/type-fest/source/merge-exclusive.d.ts +41 -0
  1956. package/node_modules/type-fest/source/merge.d.ts +48 -0
  1957. package/node_modules/type-fest/source/multidimensional-array.d.ts +44 -0
  1958. package/node_modules/type-fest/source/multidimensional-readonly-array.d.ts +48 -0
  1959. package/node_modules/type-fest/source/non-empty-object.d.ts +35 -0
  1960. package/node_modules/type-fest/source/numeric.d.ts +187 -0
  1961. package/node_modules/type-fest/source/observable-like.d.ts +63 -0
  1962. package/node_modules/type-fest/source/omit-deep.d.ts +140 -0
  1963. package/node_modules/type-fest/source/omit-index-signature.d.ts +107 -0
  1964. package/node_modules/type-fest/source/opaque.d.ts +250 -0
  1965. package/node_modules/type-fest/source/optional-keys-of.d.ts +38 -0
  1966. package/node_modules/type-fest/source/override-properties.d.ts +36 -0
  1967. package/node_modules/type-fest/source/package-json.d.ts +676 -0
  1968. package/node_modules/type-fest/source/partial-deep.d.ts +109 -0
  1969. package/node_modules/type-fest/source/partial-on-undefined-deep.d.ts +71 -0
  1970. package/node_modules/type-fest/source/pascal-case.d.ts +38 -0
  1971. package/node_modules/type-fest/source/pascal-cased-properties-deep.d.ts +55 -0
  1972. package/node_modules/type-fest/source/pascal-cased-properties.d.ts +35 -0
  1973. package/node_modules/type-fest/source/paths.d.ts +79 -0
  1974. package/node_modules/type-fest/source/pick-deep.d.ts +149 -0
  1975. package/node_modules/type-fest/source/pick-index-signature.d.ts +102 -0
  1976. package/node_modules/type-fest/source/primitive.d.ts +13 -0
  1977. package/node_modules/type-fest/source/promisable.d.ts +25 -0
  1978. package/node_modules/type-fest/source/readonly-deep.d.ts +81 -0
  1979. package/node_modules/type-fest/source/readonly-keys-of.d.ts +29 -0
  1980. package/node_modules/type-fest/source/readonly-tuple.d.ts +41 -0
  1981. package/node_modules/type-fest/source/replace.d.ts +67 -0
  1982. package/node_modules/type-fest/source/require-all-or-none.d.ts +42 -0
  1983. package/node_modules/type-fest/source/require-at-least-one.d.ts +34 -0
  1984. package/node_modules/type-fest/source/require-exactly-one.d.ts +34 -0
  1985. package/node_modules/type-fest/source/require-one-or-none.d.ts +37 -0
  1986. package/node_modules/type-fest/source/required-deep.d.ts +78 -0
  1987. package/node_modules/type-fest/source/required-keys-of.d.ts +29 -0
  1988. package/node_modules/type-fest/source/schema.d.ts +71 -0
  1989. package/node_modules/type-fest/source/screaming-snake-case.d.ts +33 -0
  1990. package/node_modules/type-fest/source/set-field-type.d.ts +37 -0
  1991. package/node_modules/type-fest/source/set-non-nullable.d.ts +39 -0
  1992. package/node_modules/type-fest/source/set-optional.d.ts +35 -0
  1993. package/node_modules/type-fest/source/set-parameter-type.d.ts +117 -0
  1994. package/node_modules/type-fest/source/set-readonly.d.ts +38 -0
  1995. package/node_modules/type-fest/source/set-required.d.ts +40 -0
  1996. package/node_modules/type-fest/source/set-return-type.d.ts +29 -0
  1997. package/node_modules/type-fest/source/shared-union-fields-deep.d.ts +168 -0
  1998. package/node_modules/type-fest/source/simplify.d.ts +58 -0
  1999. package/node_modules/type-fest/source/single-key-object.d.ts +29 -0
  2000. package/node_modules/type-fest/source/snake-case.d.ts +38 -0
  2001. package/node_modules/type-fest/source/snake-cased-properties-deep.d.ts +47 -0
  2002. package/node_modules/type-fest/source/snake-cased-properties.d.ts +30 -0
  2003. package/node_modules/type-fest/source/split-words.d.ts +57 -0
  2004. package/node_modules/type-fest/source/split.d.ts +29 -0
  2005. package/node_modules/type-fest/source/spread.d.ts +85 -0
  2006. package/node_modules/type-fest/source/string-key-of.d.ts +25 -0
  2007. package/node_modules/type-fest/source/string-slice.d.ts +37 -0
  2008. package/node_modules/type-fest/source/stringified.d.ts +23 -0
  2009. package/node_modules/type-fest/source/subtract.d.ts +68 -0
  2010. package/node_modules/type-fest/source/sum.d.ts +68 -0
  2011. package/node_modules/type-fest/source/tagged-union.d.ts +51 -0
  2012. package/node_modules/type-fest/source/trim.d.ts +27 -0
  2013. package/node_modules/type-fest/source/tsconfig-json.d.ts +1180 -0
  2014. package/node_modules/type-fest/source/tuple-to-union.d.ts +51 -0
  2015. package/node_modules/type-fest/source/typed-array.d.ts +17 -0
  2016. package/node_modules/type-fest/source/undefined-on-partial-deep.d.ts +81 -0
  2017. package/node_modules/type-fest/source/union-to-intersection.d.ts +61 -0
  2018. package/node_modules/type-fest/source/unknown-array.d.ts +25 -0
  2019. package/node_modules/type-fest/source/unknown-record.d.ts +31 -0
  2020. package/node_modules/type-fest/source/value-of.d.ts +42 -0
  2021. package/node_modules/type-fest/source/writable-deep.d.ts +83 -0
  2022. package/node_modules/type-fest/source/writable-keys-of.d.ts +30 -0
  2023. package/node_modules/type-fest/source/writable.d.ts +68 -0
  2024. package/node_modules/use-callback-ref/LICENSE +21 -0
  2025. package/node_modules/use-callback-ref/README.md +170 -0
  2026. package/node_modules/use-callback-ref/dist/es2015/assignRef.d.ts +15 -0
  2027. package/node_modules/use-callback-ref/dist/es2015/assignRef.js +22 -0
  2028. package/node_modules/use-callback-ref/dist/es2015/createRef.d.ts +10 -0
  2029. package/node_modules/use-callback-ref/dist/es2015/createRef.js +23 -0
  2030. package/node_modules/use-callback-ref/dist/es2015/index.d.ts +8 -0
  2031. package/node_modules/use-callback-ref/dist/es2015/index.js +12 -0
  2032. package/node_modules/use-callback-ref/dist/es2015/mergeRef.d.ts +16 -0
  2033. package/node_modules/use-callback-ref/dist/es2015/mergeRef.js +18 -0
  2034. package/node_modules/use-callback-ref/dist/es2015/refToCallback.d.ts +24 -0
  2035. package/node_modules/use-callback-ref/dist/es2015/refToCallback.js +48 -0
  2036. package/node_modules/use-callback-ref/dist/es2015/transformRef.d.ts +11 -0
  2037. package/node_modules/use-callback-ref/dist/es2015/transformRef.js +14 -0
  2038. package/node_modules/use-callback-ref/dist/es2015/types.d.ts +5 -0
  2039. package/node_modules/use-callback-ref/dist/es2015/types.js +1 -0
  2040. package/node_modules/use-callback-ref/dist/es2015/useMergeRef.d.ts +17 -0
  2041. package/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +45 -0
  2042. package/node_modules/use-callback-ref/dist/es2015/useRef.d.ts +16 -0
  2043. package/node_modules/use-callback-ref/dist/es2015/useRef.js +39 -0
  2044. package/node_modules/use-callback-ref/dist/es2015/useTransformRef.d.ts +15 -0
  2045. package/node_modules/use-callback-ref/dist/es2015/useTransformRef.js +18 -0
  2046. package/node_modules/use-callback-ref/dist/es2019/assignRef.d.ts +15 -0
  2047. package/node_modules/use-callback-ref/dist/es2019/assignRef.js +22 -0
  2048. package/node_modules/use-callback-ref/dist/es2019/createRef.d.ts +10 -0
  2049. package/node_modules/use-callback-ref/dist/es2019/createRef.js +23 -0
  2050. package/node_modules/use-callback-ref/dist/es2019/index.d.ts +8 -0
  2051. package/node_modules/use-callback-ref/dist/es2019/index.js +12 -0
  2052. package/node_modules/use-callback-ref/dist/es2019/mergeRef.d.ts +16 -0
  2053. package/node_modules/use-callback-ref/dist/es2019/mergeRef.js +18 -0
  2054. package/node_modules/use-callback-ref/dist/es2019/refToCallback.d.ts +24 -0
  2055. package/node_modules/use-callback-ref/dist/es2019/refToCallback.js +48 -0
  2056. package/node_modules/use-callback-ref/dist/es2019/transformRef.d.ts +11 -0
  2057. package/node_modules/use-callback-ref/dist/es2019/transformRef.js +14 -0
  2058. package/node_modules/use-callback-ref/dist/es2019/types.d.ts +5 -0
  2059. package/node_modules/use-callback-ref/dist/es2019/types.js +1 -0
  2060. package/node_modules/use-callback-ref/dist/es2019/useMergeRef.d.ts +17 -0
  2061. package/node_modules/use-callback-ref/dist/es2019/useMergeRef.js +43 -0
  2062. package/node_modules/use-callback-ref/dist/es2019/useRef.d.ts +16 -0
  2063. package/node_modules/use-callback-ref/dist/es2019/useRef.js +39 -0
  2064. package/node_modules/use-callback-ref/dist/es2019/useTransformRef.d.ts +15 -0
  2065. package/node_modules/use-callback-ref/dist/es2019/useTransformRef.js +18 -0
  2066. package/node_modules/use-callback-ref/dist/es5/assignRef.d.ts +15 -0
  2067. package/node_modules/use-callback-ref/dist/es5/assignRef.js +26 -0
  2068. package/node_modules/use-callback-ref/dist/es5/createRef.d.ts +10 -0
  2069. package/node_modules/use-callback-ref/dist/es5/createRef.js +27 -0
  2070. package/node_modules/use-callback-ref/dist/es5/index.d.ts +8 -0
  2071. package/node_modules/use-callback-ref/dist/es5/index.js +24 -0
  2072. package/node_modules/use-callback-ref/dist/es5/mergeRef.d.ts +16 -0
  2073. package/node_modules/use-callback-ref/dist/es5/mergeRef.js +22 -0
  2074. package/node_modules/use-callback-ref/dist/es5/refToCallback.d.ts +24 -0
  2075. package/node_modules/use-callback-ref/dist/es5/refToCallback.js +53 -0
  2076. package/node_modules/use-callback-ref/dist/es5/transformRef.d.ts +11 -0
  2077. package/node_modules/use-callback-ref/dist/es5/transformRef.js +18 -0
  2078. package/node_modules/use-callback-ref/dist/es5/types.d.ts +5 -0
  2079. package/node_modules/use-callback-ref/dist/es5/types.js +2 -0
  2080. package/node_modules/use-callback-ref/dist/es5/useMergeRef.d.ts +17 -0
  2081. package/node_modules/use-callback-ref/dist/es5/useMergeRef.js +50 -0
  2082. package/node_modules/use-callback-ref/dist/es5/useRef.d.ts +16 -0
  2083. package/node_modules/use-callback-ref/dist/es5/useRef.js +43 -0
  2084. package/node_modules/use-callback-ref/dist/es5/useTransformRef.d.ts +15 -0
  2085. package/node_modules/use-callback-ref/dist/es5/useTransformRef.js +22 -0
  2086. package/node_modules/use-callback-ref/package.json +84 -0
  2087. package/node_modules/use-sidecar/LICENSE +21 -0
  2088. package/node_modules/use-sidecar/README.md +349 -0
  2089. package/node_modules/use-sidecar/dist/es2015/config.d.ts +5 -0
  2090. package/node_modules/use-sidecar/dist/es2015/config.js +6 -0
  2091. package/node_modules/use-sidecar/dist/es2015/env.d.ts +4 -0
  2092. package/node_modules/use-sidecar/dist/es2015/env.js +5 -0
  2093. package/node_modules/use-sidecar/dist/es2015/exports.d.ts +3 -0
  2094. package/node_modules/use-sidecar/dist/es2015/exports.js +18 -0
  2095. package/node_modules/use-sidecar/dist/es2015/hoc.d.ts +3 -0
  2096. package/node_modules/use-sidecar/dist/es2015/hoc.js +15 -0
  2097. package/node_modules/use-sidecar/dist/es2015/hook.d.ts +2 -0
  2098. package/node_modules/use-sidecar/dist/es2015/hook.js +41 -0
  2099. package/node_modules/use-sidecar/dist/es2015/index.d.ts +7 -0
  2100. package/node_modules/use-sidecar/dist/es2015/index.js +6 -0
  2101. package/node_modules/use-sidecar/dist/es2015/medium.d.ts +3 -0
  2102. package/node_modules/use-sidecar/dist/es2015/medium.js +78 -0
  2103. package/node_modules/use-sidecar/dist/es2015/renderProp.d.ts +8 -0
  2104. package/node_modules/use-sidecar/dist/es2015/renderProp.js +35 -0
  2105. package/node_modules/use-sidecar/dist/es2015/types.d.ts +47 -0
  2106. package/node_modules/use-sidecar/dist/es2015/types.js +1 -0
  2107. package/node_modules/use-sidecar/dist/es2019/config.d.ts +5 -0
  2108. package/node_modules/use-sidecar/dist/es2019/config.js +6 -0
  2109. package/node_modules/use-sidecar/dist/es2019/env.d.ts +4 -0
  2110. package/node_modules/use-sidecar/dist/es2019/env.js +5 -0
  2111. package/node_modules/use-sidecar/dist/es2019/exports.d.ts +3 -0
  2112. package/node_modules/use-sidecar/dist/es2019/exports.js +16 -0
  2113. package/node_modules/use-sidecar/dist/es2019/hoc.d.ts +3 -0
  2114. package/node_modules/use-sidecar/dist/es2019/hoc.js +14 -0
  2115. package/node_modules/use-sidecar/dist/es2019/hook.d.ts +2 -0
  2116. package/node_modules/use-sidecar/dist/es2019/hook.js +41 -0
  2117. package/node_modules/use-sidecar/dist/es2019/index.d.ts +7 -0
  2118. package/node_modules/use-sidecar/dist/es2019/index.js +6 -0
  2119. package/node_modules/use-sidecar/dist/es2019/medium.d.ts +3 -0
  2120. package/node_modules/use-sidecar/dist/es2019/medium.js +78 -0
  2121. package/node_modules/use-sidecar/dist/es2019/renderProp.d.ts +8 -0
  2122. package/node_modules/use-sidecar/dist/es2019/renderProp.js +28 -0
  2123. package/node_modules/use-sidecar/dist/es2019/types.d.ts +47 -0
  2124. package/node_modules/use-sidecar/dist/es2019/types.js +1 -0
  2125. package/node_modules/use-sidecar/dist/es5/config.d.ts +5 -0
  2126. package/node_modules/use-sidecar/dist/es5/config.js +10 -0
  2127. package/node_modules/use-sidecar/dist/es5/env.d.ts +4 -0
  2128. package/node_modules/use-sidecar/dist/es5/env.js +8 -0
  2129. package/node_modules/use-sidecar/dist/es5/exports.d.ts +3 -0
  2130. package/node_modules/use-sidecar/dist/es5/exports.js +22 -0
  2131. package/node_modules/use-sidecar/dist/es5/hoc.d.ts +3 -0
  2132. package/node_modules/use-sidecar/dist/es5/hoc.js +19 -0
  2133. package/node_modules/use-sidecar/dist/es5/hook.d.ts +2 -0
  2134. package/node_modules/use-sidecar/dist/es5/hook.js +45 -0
  2135. package/node_modules/use-sidecar/dist/es5/index.d.ts +7 -0
  2136. package/node_modules/use-sidecar/dist/es5/index.js +16 -0
  2137. package/node_modules/use-sidecar/dist/es5/medium.d.ts +3 -0
  2138. package/node_modules/use-sidecar/dist/es5/medium.js +83 -0
  2139. package/node_modules/use-sidecar/dist/es5/renderProp.d.ts +8 -0
  2140. package/node_modules/use-sidecar/dist/es5/renderProp.js +39 -0
  2141. package/node_modules/use-sidecar/dist/es5/types.d.ts +47 -0
  2142. package/node_modules/use-sidecar/dist/es5/types.js +2 -0
  2143. package/node_modules/use-sidecar/package.json +89 -0
  2144. package/node_modules/zod/LICENSE +21 -0
  2145. package/node_modules/zod/README.md +2834 -0
  2146. package/node_modules/zod/index.d.ts +2 -0
  2147. package/node_modules/zod/lib/ZodError.d.ts +163 -0
  2148. package/node_modules/zod/lib/ZodError.js +132 -0
  2149. package/node_modules/zod/lib/__tests__/Mocker.d.ts +17 -0
  2150. package/node_modules/zod/lib/__tests__/Mocker.js +57 -0
  2151. package/node_modules/zod/lib/benchmarks/discriminatedUnion.d.ts +5 -0
  2152. package/node_modules/zod/lib/benchmarks/discriminatedUnion.js +79 -0
  2153. package/node_modules/zod/lib/benchmarks/index.d.ts +1 -0
  2154. package/node_modules/zod/lib/benchmarks/index.js +46 -0
  2155. package/node_modules/zod/lib/benchmarks/object.d.ts +5 -0
  2156. package/node_modules/zod/lib/benchmarks/object.js +70 -0
  2157. package/node_modules/zod/lib/benchmarks/primitives.d.ts +5 -0
  2158. package/node_modules/zod/lib/benchmarks/primitives.js +136 -0
  2159. package/node_modules/zod/lib/benchmarks/realworld.d.ts +5 -0
  2160. package/node_modules/zod/lib/benchmarks/realworld.js +56 -0
  2161. package/node_modules/zod/lib/benchmarks/string.d.ts +5 -0
  2162. package/node_modules/zod/lib/benchmarks/string.js +55 -0
  2163. package/node_modules/zod/lib/benchmarks/union.d.ts +5 -0
  2164. package/node_modules/zod/lib/benchmarks/union.js +79 -0
  2165. package/node_modules/zod/lib/errors.d.ts +5 -0
  2166. package/node_modules/zod/lib/errors.js +17 -0
  2167. package/node_modules/zod/lib/external.d.ts +6 -0
  2168. package/node_modules/zod/lib/external.js +18 -0
  2169. package/node_modules/zod/lib/helpers/enumUtil.d.ts +8 -0
  2170. package/node_modules/zod/lib/helpers/enumUtil.js +2 -0
  2171. package/node_modules/zod/lib/helpers/errorUtil.d.ts +9 -0
  2172. package/node_modules/zod/lib/helpers/errorUtil.js +8 -0
  2173. package/node_modules/zod/lib/helpers/parseUtil.d.ts +78 -0
  2174. package/node_modules/zod/lib/helpers/parseUtil.js +115 -0
  2175. package/node_modules/zod/lib/helpers/partialUtil.d.ts +8 -0
  2176. package/node_modules/zod/lib/helpers/partialUtil.js +2 -0
  2177. package/node_modules/zod/lib/helpers/typeAliases.d.ts +2 -0
  2178. package/node_modules/zod/lib/helpers/typeAliases.js +2 -0
  2179. package/node_modules/zod/lib/helpers/util.d.ts +68 -0
  2180. package/node_modules/zod/lib/helpers/util.js +142 -0
  2181. package/node_modules/zod/lib/index.d.ts +4 -0
  2182. package/node_modules/zod/lib/index.js +29 -0
  2183. package/node_modules/zod/lib/index.mjs +4017 -0
  2184. package/node_modules/zod/lib/index.umd.js +4131 -0
  2185. package/node_modules/zod/lib/locales/en.d.ts +3 -0
  2186. package/node_modules/zod/lib/locales/en.js +129 -0
  2187. package/node_modules/zod/lib/types.d.ts +1057 -0
  2188. package/node_modules/zod/lib/types.js +3495 -0
  2189. package/node_modules/zod/package.json +119 -0
  2190. package/package.json +191 -0
  2191. package/start.js +52 -0
@@ -0,0 +1,4876 @@
1
+ /**
2
+ * @remix-run/router v1.15.3
3
+ *
4
+ * Copyright (c) Remix Software Inc.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */
11
+ (function (global, factory) {
12
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
13
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
14
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.RemixRouter = {}));
15
+ })(this, (function (exports) { 'use strict';
16
+
17
+ function _extends() {
18
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
19
+ for (var i = 1; i < arguments.length; i++) {
20
+ var source = arguments[i];
21
+ for (var key in source) {
22
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
23
+ target[key] = source[key];
24
+ }
25
+ }
26
+ }
27
+ return target;
28
+ };
29
+ return _extends.apply(this, arguments);
30
+ }
31
+
32
+ ////////////////////////////////////////////////////////////////////////////////
33
+ //#region Types and Constants
34
+ ////////////////////////////////////////////////////////////////////////////////
35
+
36
+ /**
37
+ * Actions represent the type of change to a location value.
38
+ */
39
+ let Action = /*#__PURE__*/function (Action) {
40
+ Action["Pop"] = "POP";
41
+ Action["Push"] = "PUSH";
42
+ Action["Replace"] = "REPLACE";
43
+ return Action;
44
+ }({});
45
+
46
+ /**
47
+ * The pathname, search, and hash values of a URL.
48
+ */
49
+
50
+ // TODO: (v7) Change the Location generic default from `any` to `unknown` and
51
+ // remove Remix `useLocation` wrapper.
52
+ /**
53
+ * An entry in a history stack. A location contains information about the
54
+ * URL path, as well as possibly some arbitrary state and a key.
55
+ */
56
+ /**
57
+ * A change to the current location.
58
+ */
59
+ /**
60
+ * A function that receives notifications about location changes.
61
+ */
62
+ /**
63
+ * Describes a location that is the destination of some navigation, either via
64
+ * `history.push` or `history.replace`. This may be either a URL or the pieces
65
+ * of a URL path.
66
+ */
67
+ /**
68
+ * A history is an interface to the navigation stack. The history serves as the
69
+ * source of truth for the current location, as well as provides a set of
70
+ * methods that may be used to change it.
71
+ *
72
+ * It is similar to the DOM's `window.history` object, but with a smaller, more
73
+ * focused API.
74
+ */
75
+ const PopStateEventType = "popstate";
76
+ //#endregion
77
+
78
+ ////////////////////////////////////////////////////////////////////////////////
79
+ //#region Memory History
80
+ ////////////////////////////////////////////////////////////////////////////////
81
+
82
+ /**
83
+ * A user-supplied object that describes a location. Used when providing
84
+ * entries to `createMemoryHistory` via its `initialEntries` option.
85
+ */
86
+ /**
87
+ * A memory history stores locations in memory. This is useful in stateful
88
+ * environments where there is no web browser, such as node tests or React
89
+ * Native.
90
+ */
91
+ /**
92
+ * Memory history stores the current location in memory. It is designed for use
93
+ * in stateful non-browser environments like tests and React Native.
94
+ */
95
+ function createMemoryHistory(options) {
96
+ if (options === void 0) {
97
+ options = {};
98
+ }
99
+ let {
100
+ initialEntries = ["/"],
101
+ initialIndex,
102
+ v5Compat = false
103
+ } = options;
104
+ let entries; // Declare so we can access from createMemoryLocation
105
+ entries = initialEntries.map((entry, index) => createMemoryLocation(entry, typeof entry === "string" ? null : entry.state, index === 0 ? "default" : undefined));
106
+ let index = clampIndex(initialIndex == null ? entries.length - 1 : initialIndex);
107
+ let action = Action.Pop;
108
+ let listener = null;
109
+ function clampIndex(n) {
110
+ return Math.min(Math.max(n, 0), entries.length - 1);
111
+ }
112
+ function getCurrentLocation() {
113
+ return entries[index];
114
+ }
115
+ function createMemoryLocation(to, state, key) {
116
+ if (state === void 0) {
117
+ state = null;
118
+ }
119
+ let location = createLocation(entries ? getCurrentLocation().pathname : "/", to, state, key);
120
+ warning(location.pathname.charAt(0) === "/", "relative pathnames are not supported in memory history: " + JSON.stringify(to));
121
+ return location;
122
+ }
123
+ function createHref(to) {
124
+ return typeof to === "string" ? to : createPath(to);
125
+ }
126
+ let history = {
127
+ get index() {
128
+ return index;
129
+ },
130
+ get action() {
131
+ return action;
132
+ },
133
+ get location() {
134
+ return getCurrentLocation();
135
+ },
136
+ createHref,
137
+ createURL(to) {
138
+ return new URL(createHref(to), "http://localhost");
139
+ },
140
+ encodeLocation(to) {
141
+ let path = typeof to === "string" ? parsePath(to) : to;
142
+ return {
143
+ pathname: path.pathname || "",
144
+ search: path.search || "",
145
+ hash: path.hash || ""
146
+ };
147
+ },
148
+ push(to, state) {
149
+ action = Action.Push;
150
+ let nextLocation = createMemoryLocation(to, state);
151
+ index += 1;
152
+ entries.splice(index, entries.length, nextLocation);
153
+ if (v5Compat && listener) {
154
+ listener({
155
+ action,
156
+ location: nextLocation,
157
+ delta: 1
158
+ });
159
+ }
160
+ },
161
+ replace(to, state) {
162
+ action = Action.Replace;
163
+ let nextLocation = createMemoryLocation(to, state);
164
+ entries[index] = nextLocation;
165
+ if (v5Compat && listener) {
166
+ listener({
167
+ action,
168
+ location: nextLocation,
169
+ delta: 0
170
+ });
171
+ }
172
+ },
173
+ go(delta) {
174
+ action = Action.Pop;
175
+ let nextIndex = clampIndex(index + delta);
176
+ let nextLocation = entries[nextIndex];
177
+ index = nextIndex;
178
+ if (listener) {
179
+ listener({
180
+ action,
181
+ location: nextLocation,
182
+ delta
183
+ });
184
+ }
185
+ },
186
+ listen(fn) {
187
+ listener = fn;
188
+ return () => {
189
+ listener = null;
190
+ };
191
+ }
192
+ };
193
+ return history;
194
+ }
195
+ //#endregion
196
+
197
+ ////////////////////////////////////////////////////////////////////////////////
198
+ //#region Browser History
199
+ ////////////////////////////////////////////////////////////////////////////////
200
+
201
+ /**
202
+ * A browser history stores the current location in regular URLs in a web
203
+ * browser environment. This is the standard for most web apps and provides the
204
+ * cleanest URLs the browser's address bar.
205
+ *
206
+ * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#browserhistory
207
+ */
208
+ /**
209
+ * Browser history stores the location in regular URLs. This is the standard for
210
+ * most web apps, but it requires some configuration on the server to ensure you
211
+ * serve the same app at multiple URLs.
212
+ *
213
+ * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory
214
+ */
215
+ function createBrowserHistory(options) {
216
+ if (options === void 0) {
217
+ options = {};
218
+ }
219
+ function createBrowserLocation(window, globalHistory) {
220
+ let {
221
+ pathname,
222
+ search,
223
+ hash
224
+ } = window.location;
225
+ return createLocation("", {
226
+ pathname,
227
+ search,
228
+ hash
229
+ },
230
+ // state defaults to `null` because `window.history.state` does
231
+ globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || "default");
232
+ }
233
+ function createBrowserHref(window, to) {
234
+ return typeof to === "string" ? to : createPath(to);
235
+ }
236
+ return getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options);
237
+ }
238
+ //#endregion
239
+
240
+ ////////////////////////////////////////////////////////////////////////////////
241
+ //#region Hash History
242
+ ////////////////////////////////////////////////////////////////////////////////
243
+
244
+ /**
245
+ * A hash history stores the current location in the fragment identifier portion
246
+ * of the URL in a web browser environment.
247
+ *
248
+ * This is ideal for apps that do not control the server for some reason
249
+ * (because the fragment identifier is never sent to the server), including some
250
+ * shared hosting environments that do not provide fine-grained controls over
251
+ * which pages are served at which URLs.
252
+ *
253
+ * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#hashhistory
254
+ */
255
+ /**
256
+ * Hash history stores the location in window.location.hash. This makes it ideal
257
+ * for situations where you don't want to send the location to the server for
258
+ * some reason, either because you do cannot configure it or the URL space is
259
+ * reserved for something else.
260
+ *
261
+ * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory
262
+ */
263
+ function createHashHistory(options) {
264
+ if (options === void 0) {
265
+ options = {};
266
+ }
267
+ function createHashLocation(window, globalHistory) {
268
+ let {
269
+ pathname = "/",
270
+ search = "",
271
+ hash = ""
272
+ } = parsePath(window.location.hash.substr(1));
273
+
274
+ // Hash URL should always have a leading / just like window.location.pathname
275
+ // does, so if an app ends up at a route like /#something then we add a
276
+ // leading slash so all of our path-matching behaves the same as if it would
277
+ // in a browser router. This is particularly important when there exists a
278
+ // root splat route (<Route path="*">) since that matches internally against
279
+ // "/*" and we'd expect /#something to 404 in a hash router app.
280
+ if (!pathname.startsWith("/") && !pathname.startsWith(".")) {
281
+ pathname = "/" + pathname;
282
+ }
283
+ return createLocation("", {
284
+ pathname,
285
+ search,
286
+ hash
287
+ },
288
+ // state defaults to `null` because `window.history.state` does
289
+ globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || "default");
290
+ }
291
+ function createHashHref(window, to) {
292
+ let base = window.document.querySelector("base");
293
+ let href = "";
294
+ if (base && base.getAttribute("href")) {
295
+ let url = window.location.href;
296
+ let hashIndex = url.indexOf("#");
297
+ href = hashIndex === -1 ? url : url.slice(0, hashIndex);
298
+ }
299
+ return href + "#" + (typeof to === "string" ? to : createPath(to));
300
+ }
301
+ function validateHashLocation(location, to) {
302
+ warning(location.pathname.charAt(0) === "/", "relative pathnames are not supported in hash history.push(" + JSON.stringify(to) + ")");
303
+ }
304
+ return getUrlBasedHistory(createHashLocation, createHashHref, validateHashLocation, options);
305
+ }
306
+ //#endregion
307
+
308
+ ////////////////////////////////////////////////////////////////////////////////
309
+ //#region UTILS
310
+ ////////////////////////////////////////////////////////////////////////////////
311
+
312
+ /**
313
+ * @private
314
+ */
315
+ function invariant(value, message) {
316
+ if (value === false || value === null || typeof value === "undefined") {
317
+ throw new Error(message);
318
+ }
319
+ }
320
+ function warning(cond, message) {
321
+ if (!cond) {
322
+ // eslint-disable-next-line no-console
323
+ if (typeof console !== "undefined") console.warn(message);
324
+ try {
325
+ // Welcome to debugging history!
326
+ //
327
+ // This error is thrown as a convenience, so you can more easily
328
+ // find the source for a warning that appears in the console by
329
+ // enabling "pause on exceptions" in your JavaScript debugger.
330
+ throw new Error(message);
331
+ // eslint-disable-next-line no-empty
332
+ } catch (e) {}
333
+ }
334
+ }
335
+ function createKey() {
336
+ return Math.random().toString(36).substr(2, 8);
337
+ }
338
+
339
+ /**
340
+ * For browser-based histories, we combine the state and key into an object
341
+ */
342
+ function getHistoryState(location, index) {
343
+ return {
344
+ usr: location.state,
345
+ key: location.key,
346
+ idx: index
347
+ };
348
+ }
349
+
350
+ /**
351
+ * Creates a Location object with a unique key from the given Path
352
+ */
353
+ function createLocation(current, to, state, key) {
354
+ if (state === void 0) {
355
+ state = null;
356
+ }
357
+ let location = _extends({
358
+ pathname: typeof current === "string" ? current : current.pathname,
359
+ search: "",
360
+ hash: ""
361
+ }, typeof to === "string" ? parsePath(to) : to, {
362
+ state,
363
+ // TODO: This could be cleaned up. push/replace should probably just take
364
+ // full Locations now and avoid the need to run through this flow at all
365
+ // But that's a pretty big refactor to the current test suite so going to
366
+ // keep as is for the time being and just let any incoming keys take precedence
367
+ key: to && to.key || key || createKey()
368
+ });
369
+ return location;
370
+ }
371
+
372
+ /**
373
+ * Creates a string URL path from the given pathname, search, and hash components.
374
+ */
375
+ function createPath(_ref) {
376
+ let {
377
+ pathname = "/",
378
+ search = "",
379
+ hash = ""
380
+ } = _ref;
381
+ if (search && search !== "?") pathname += search.charAt(0) === "?" ? search : "?" + search;
382
+ if (hash && hash !== "#") pathname += hash.charAt(0) === "#" ? hash : "#" + hash;
383
+ return pathname;
384
+ }
385
+
386
+ /**
387
+ * Parses a string URL path into its separate pathname, search, and hash components.
388
+ */
389
+ function parsePath(path) {
390
+ let parsedPath = {};
391
+ if (path) {
392
+ let hashIndex = path.indexOf("#");
393
+ if (hashIndex >= 0) {
394
+ parsedPath.hash = path.substr(hashIndex);
395
+ path = path.substr(0, hashIndex);
396
+ }
397
+ let searchIndex = path.indexOf("?");
398
+ if (searchIndex >= 0) {
399
+ parsedPath.search = path.substr(searchIndex);
400
+ path = path.substr(0, searchIndex);
401
+ }
402
+ if (path) {
403
+ parsedPath.pathname = path;
404
+ }
405
+ }
406
+ return parsedPath;
407
+ }
408
+ function getUrlBasedHistory(getLocation, createHref, validateLocation, options) {
409
+ if (options === void 0) {
410
+ options = {};
411
+ }
412
+ let {
413
+ window = document.defaultView,
414
+ v5Compat = false
415
+ } = options;
416
+ let globalHistory = window.history;
417
+ let action = Action.Pop;
418
+ let listener = null;
419
+ let index = getIndex();
420
+ // Index should only be null when we initialize. If not, it's because the
421
+ // user called history.pushState or history.replaceState directly, in which
422
+ // case we should log a warning as it will result in bugs.
423
+ if (index == null) {
424
+ index = 0;
425
+ globalHistory.replaceState(_extends({}, globalHistory.state, {
426
+ idx: index
427
+ }), "");
428
+ }
429
+ function getIndex() {
430
+ let state = globalHistory.state || {
431
+ idx: null
432
+ };
433
+ return state.idx;
434
+ }
435
+ function handlePop() {
436
+ action = Action.Pop;
437
+ let nextIndex = getIndex();
438
+ let delta = nextIndex == null ? null : nextIndex - index;
439
+ index = nextIndex;
440
+ if (listener) {
441
+ listener({
442
+ action,
443
+ location: history.location,
444
+ delta
445
+ });
446
+ }
447
+ }
448
+ function push(to, state) {
449
+ action = Action.Push;
450
+ let location = createLocation(history.location, to, state);
451
+ if (validateLocation) validateLocation(location, to);
452
+ index = getIndex() + 1;
453
+ let historyState = getHistoryState(location, index);
454
+ let url = history.createHref(location);
455
+
456
+ // try...catch because iOS limits us to 100 pushState calls :/
457
+ try {
458
+ globalHistory.pushState(historyState, "", url);
459
+ } catch (error) {
460
+ // If the exception is because `state` can't be serialized, let that throw
461
+ // outwards just like a replace call would so the dev knows the cause
462
+ // https://html.spec.whatwg.org/multipage/nav-history-apis.html#shared-history-push/replace-state-steps
463
+ // https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal
464
+ if (error instanceof DOMException && error.name === "DataCloneError") {
465
+ throw error;
466
+ }
467
+ // They are going to lose state here, but there is no real
468
+ // way to warn them about it since the page will refresh...
469
+ window.location.assign(url);
470
+ }
471
+ if (v5Compat && listener) {
472
+ listener({
473
+ action,
474
+ location: history.location,
475
+ delta: 1
476
+ });
477
+ }
478
+ }
479
+ function replace(to, state) {
480
+ action = Action.Replace;
481
+ let location = createLocation(history.location, to, state);
482
+ if (validateLocation) validateLocation(location, to);
483
+ index = getIndex();
484
+ let historyState = getHistoryState(location, index);
485
+ let url = history.createHref(location);
486
+ globalHistory.replaceState(historyState, "", url);
487
+ if (v5Compat && listener) {
488
+ listener({
489
+ action,
490
+ location: history.location,
491
+ delta: 0
492
+ });
493
+ }
494
+ }
495
+ function createURL(to) {
496
+ // window.location.origin is "null" (the literal string value) in Firefox
497
+ // under certain conditions, notably when serving from a local HTML file
498
+ // See https://bugzilla.mozilla.org/show_bug.cgi?id=878297
499
+ let base = window.location.origin !== "null" ? window.location.origin : window.location.href;
500
+ let href = typeof to === "string" ? to : createPath(to);
501
+ // Treating this as a full URL will strip any trailing spaces so we need to
502
+ // pre-encode them since they might be part of a matching splat param from
503
+ // an ancestor route
504
+ href = href.replace(/ $/, "%20");
505
+ invariant(base, "No window.location.(origin|href) available to create URL for href: " + href);
506
+ return new URL(href, base);
507
+ }
508
+ let history = {
509
+ get action() {
510
+ return action;
511
+ },
512
+ get location() {
513
+ return getLocation(window, globalHistory);
514
+ },
515
+ listen(fn) {
516
+ if (listener) {
517
+ throw new Error("A history only accepts one active listener");
518
+ }
519
+ window.addEventListener(PopStateEventType, handlePop);
520
+ listener = fn;
521
+ return () => {
522
+ window.removeEventListener(PopStateEventType, handlePop);
523
+ listener = null;
524
+ };
525
+ },
526
+ createHref(to) {
527
+ return createHref(window, to);
528
+ },
529
+ createURL,
530
+ encodeLocation(to) {
531
+ // Encode a Location the same way window.location would
532
+ let url = createURL(to);
533
+ return {
534
+ pathname: url.pathname,
535
+ search: url.search,
536
+ hash: url.hash
537
+ };
538
+ },
539
+ push,
540
+ replace,
541
+ go(n) {
542
+ return globalHistory.go(n);
543
+ }
544
+ };
545
+ return history;
546
+ }
547
+
548
+ //#endregion
549
+
550
+ /**
551
+ * Map of routeId -> data returned from a loader/action/error
552
+ */
553
+
554
+ let ResultType = /*#__PURE__*/function (ResultType) {
555
+ ResultType["data"] = "data";
556
+ ResultType["deferred"] = "deferred";
557
+ ResultType["redirect"] = "redirect";
558
+ ResultType["error"] = "error";
559
+ return ResultType;
560
+ }({});
561
+
562
+ /**
563
+ * Successful result from a loader or action
564
+ */
565
+
566
+ /**
567
+ * Successful defer() result from a loader or action
568
+ */
569
+
570
+ /**
571
+ * Redirect result from a loader or action
572
+ */
573
+
574
+ /**
575
+ * Unsuccessful result from a loader or action
576
+ */
577
+
578
+ /**
579
+ * Result from a loader or action - potentially successful or unsuccessful
580
+ */
581
+
582
+ /**
583
+ * Users can specify either lowercase or uppercase form methods on `<Form>`,
584
+ * useSubmit(), `<fetcher.Form>`, etc.
585
+ */
586
+
587
+ /**
588
+ * Active navigation/fetcher form methods are exposed in lowercase on the
589
+ * RouterState
590
+ */
591
+
592
+ /**
593
+ * In v7, active navigation/fetcher form methods are exposed in uppercase on the
594
+ * RouterState. This is to align with the normalization done via fetch().
595
+ */
596
+
597
+ // Thanks https://github.com/sindresorhus/type-fest!
598
+
599
+ /**
600
+ * @private
601
+ * Internal interface to pass around for action submissions, not intended for
602
+ * external consumption
603
+ */
604
+
605
+ /**
606
+ * @private
607
+ * Arguments passed to route loader/action functions. Same for now but we keep
608
+ * this as a private implementation detail in case they diverge in the future.
609
+ */
610
+
611
+ // TODO: (v7) Change the defaults from any to unknown in and remove Remix wrappers:
612
+ // ActionFunction, ActionFunctionArgs, LoaderFunction, LoaderFunctionArgs
613
+ // Also, make them a type alias instead of an interface
614
+ /**
615
+ * Arguments passed to loader functions
616
+ */
617
+ /**
618
+ * Arguments passed to action functions
619
+ */
620
+ /**
621
+ * Loaders and actions can return anything except `undefined` (`null` is a
622
+ * valid return value if there is no data to return). Responses are preferred
623
+ * and will ease any future migration to Remix
624
+ */
625
+ /**
626
+ * Route loader function signature
627
+ */
628
+ /**
629
+ * Route action function signature
630
+ */
631
+ /**
632
+ * Arguments passed to shouldRevalidate function
633
+ */
634
+ /**
635
+ * Route shouldRevalidate function signature. This runs after any submission
636
+ * (navigation or fetcher), so we flatten the navigation/fetcher submission
637
+ * onto the arguments. It shouldn't matter whether it came from a navigation
638
+ * or a fetcher, what really matters is the URLs and the formData since loaders
639
+ * have to re-run based on the data models that were potentially mutated.
640
+ */
641
+ /**
642
+ * Function provided by the framework-aware layers to set `hasErrorBoundary`
643
+ * from the framework-aware `errorElement` prop
644
+ *
645
+ * @deprecated Use `mapRouteProperties` instead
646
+ */
647
+ /**
648
+ * Function provided by the framework-aware layers to set any framework-specific
649
+ * properties from framework-agnostic properties
650
+ */
651
+ /**
652
+ * Keys we cannot change from within a lazy() function. We spread all other keys
653
+ * onto the route. Either they're meaningful to the router, or they'll get
654
+ * ignored.
655
+ */
656
+ const immutableRouteKeys = new Set(["lazy", "caseSensitive", "path", "id", "index", "children"]);
657
+
658
+ /**
659
+ * lazy() function to load a route definition, which can add non-matching
660
+ * related properties to a route
661
+ */
662
+
663
+ /**
664
+ * Base RouteObject with common props shared by all types of routes
665
+ */
666
+
667
+ /**
668
+ * Index routes must not have children
669
+ */
670
+
671
+ /**
672
+ * Non-index routes may have children, but cannot have index
673
+ */
674
+
675
+ /**
676
+ * A route object represents a logical route, with (optionally) its child
677
+ * routes organized in a tree-like structure.
678
+ */
679
+
680
+ /**
681
+ * A data route object, which is just a RouteObject with a required unique ID
682
+ */
683
+
684
+ // Recursive helper for finding path parameters in the absence of wildcards
685
+
686
+ /**
687
+ * Examples:
688
+ * "/a/b/*" -> "*"
689
+ * ":a" -> "a"
690
+ * "/a/:b" -> "b"
691
+ * "/a/blahblahblah:b" -> "b"
692
+ * "/:a/:b" -> "a" | "b"
693
+ * "/:a/b/:c/*" -> "a" | "c" | "*"
694
+ */
695
+
696
+ // Attempt to parse the given string segment. If it fails, then just return the
697
+ // plain string type as a default fallback. Otherwise, return the union of the
698
+ // parsed string literals that were referenced as dynamic segments in the route.
699
+ /**
700
+ * The parameters that were parsed from the URL path.
701
+ */
702
+ /**
703
+ * A RouteMatch contains info about how a route matched a URL.
704
+ */
705
+ function isIndexRoute(route) {
706
+ return route.index === true;
707
+ }
708
+
709
+ // Walk the route tree generating unique IDs where necessary, so we are working
710
+ // solely with AgnosticDataRouteObject's within the Router
711
+ function convertRoutesToDataRoutes(routes, mapRouteProperties, parentPath, manifest) {
712
+ if (parentPath === void 0) {
713
+ parentPath = [];
714
+ }
715
+ if (manifest === void 0) {
716
+ manifest = {};
717
+ }
718
+ return routes.map((route, index) => {
719
+ let treePath = [...parentPath, index];
720
+ let id = typeof route.id === "string" ? route.id : treePath.join("-");
721
+ invariant(route.index !== true || !route.children, "Cannot specify children on an index route");
722
+ invariant(!manifest[id], "Found a route id collision on id \"" + id + "\". Route " + "id's must be globally unique within Data Router usages");
723
+ if (isIndexRoute(route)) {
724
+ let indexRoute = _extends({}, route, mapRouteProperties(route), {
725
+ id
726
+ });
727
+ manifest[id] = indexRoute;
728
+ return indexRoute;
729
+ } else {
730
+ let pathOrLayoutRoute = _extends({}, route, mapRouteProperties(route), {
731
+ id,
732
+ children: undefined
733
+ });
734
+ manifest[id] = pathOrLayoutRoute;
735
+ if (route.children) {
736
+ pathOrLayoutRoute.children = convertRoutesToDataRoutes(route.children, mapRouteProperties, treePath, manifest);
737
+ }
738
+ return pathOrLayoutRoute;
739
+ }
740
+ });
741
+ }
742
+
743
+ /**
744
+ * Matches the given routes to a location and returns the match data.
745
+ *
746
+ * @see https://reactrouter.com/utils/match-routes
747
+ */
748
+ function matchRoutes(routes, locationArg, basename) {
749
+ if (basename === void 0) {
750
+ basename = "/";
751
+ }
752
+ let location = typeof locationArg === "string" ? parsePath(locationArg) : locationArg;
753
+ let pathname = stripBasename(location.pathname || "/", basename);
754
+ if (pathname == null) {
755
+ return null;
756
+ }
757
+ let branches = flattenRoutes(routes);
758
+ rankRouteBranches(branches);
759
+ let matches = null;
760
+ for (let i = 0; matches == null && i < branches.length; ++i) {
761
+ // Incoming pathnames are generally encoded from either window.location
762
+ // or from router.navigate, but we want to match against the unencoded
763
+ // paths in the route definitions. Memory router locations won't be
764
+ // encoded here but there also shouldn't be anything to decode so this
765
+ // should be a safe operation. This avoids needing matchRoutes to be
766
+ // history-aware.
767
+ let decoded = decodePath(pathname);
768
+ matches = matchRouteBranch(branches[i], decoded);
769
+ }
770
+ return matches;
771
+ }
772
+ function convertRouteMatchToUiMatch(match, loaderData) {
773
+ let {
774
+ route,
775
+ pathname,
776
+ params
777
+ } = match;
778
+ return {
779
+ id: route.id,
780
+ pathname,
781
+ params,
782
+ data: loaderData[route.id],
783
+ handle: route.handle
784
+ };
785
+ }
786
+ function flattenRoutes(routes, branches, parentsMeta, parentPath) {
787
+ if (branches === void 0) {
788
+ branches = [];
789
+ }
790
+ if (parentsMeta === void 0) {
791
+ parentsMeta = [];
792
+ }
793
+ if (parentPath === void 0) {
794
+ parentPath = "";
795
+ }
796
+ let flattenRoute = (route, index, relativePath) => {
797
+ let meta = {
798
+ relativePath: relativePath === undefined ? route.path || "" : relativePath,
799
+ caseSensitive: route.caseSensitive === true,
800
+ childrenIndex: index,
801
+ route
802
+ };
803
+ if (meta.relativePath.startsWith("/")) {
804
+ invariant(meta.relativePath.startsWith(parentPath), "Absolute route path \"" + meta.relativePath + "\" nested under path " + ("\"" + parentPath + "\" is not valid. An absolute child route path ") + "must start with the combined path of all its parent routes.");
805
+ meta.relativePath = meta.relativePath.slice(parentPath.length);
806
+ }
807
+ let path = joinPaths([parentPath, meta.relativePath]);
808
+ let routesMeta = parentsMeta.concat(meta);
809
+
810
+ // Add the children before adding this route to the array, so we traverse the
811
+ // route tree depth-first and child routes appear before their parents in
812
+ // the "flattened" version.
813
+ if (route.children && route.children.length > 0) {
814
+ invariant(
815
+ // Our types know better, but runtime JS may not!
816
+ // @ts-expect-error
817
+ route.index !== true, "Index routes must not have child routes. Please remove " + ("all child routes from route path \"" + path + "\"."));
818
+ flattenRoutes(route.children, branches, routesMeta, path);
819
+ }
820
+
821
+ // Routes without a path shouldn't ever match by themselves unless they are
822
+ // index routes, so don't add them to the list of possible branches.
823
+ if (route.path == null && !route.index) {
824
+ return;
825
+ }
826
+ branches.push({
827
+ path,
828
+ score: computeScore(path, route.index),
829
+ routesMeta
830
+ });
831
+ };
832
+ routes.forEach((route, index) => {
833
+ var _route$path;
834
+ // coarse-grain check for optional params
835
+ if (route.path === "" || !((_route$path = route.path) != null && _route$path.includes("?"))) {
836
+ flattenRoute(route, index);
837
+ } else {
838
+ for (let exploded of explodeOptionalSegments(route.path)) {
839
+ flattenRoute(route, index, exploded);
840
+ }
841
+ }
842
+ });
843
+ return branches;
844
+ }
845
+
846
+ /**
847
+ * Computes all combinations of optional path segments for a given path,
848
+ * excluding combinations that are ambiguous and of lower priority.
849
+ *
850
+ * For example, `/one/:two?/three/:four?/:five?` explodes to:
851
+ * - `/one/three`
852
+ * - `/one/:two/three`
853
+ * - `/one/three/:four`
854
+ * - `/one/three/:five`
855
+ * - `/one/:two/three/:four`
856
+ * - `/one/:two/three/:five`
857
+ * - `/one/three/:four/:five`
858
+ * - `/one/:two/three/:four/:five`
859
+ */
860
+ function explodeOptionalSegments(path) {
861
+ let segments = path.split("/");
862
+ if (segments.length === 0) return [];
863
+ let [first, ...rest] = segments;
864
+
865
+ // Optional path segments are denoted by a trailing `?`
866
+ let isOptional = first.endsWith("?");
867
+ // Compute the corresponding required segment: `foo?` -> `foo`
868
+ let required = first.replace(/\?$/, "");
869
+ if (rest.length === 0) {
870
+ // Intepret empty string as omitting an optional segment
871
+ // `["one", "", "three"]` corresponds to omitting `:two` from `/one/:two?/three` -> `/one/three`
872
+ return isOptional ? [required, ""] : [required];
873
+ }
874
+ let restExploded = explodeOptionalSegments(rest.join("/"));
875
+ let result = [];
876
+
877
+ // All child paths with the prefix. Do this for all children before the
878
+ // optional version for all children, so we get consistent ordering where the
879
+ // parent optional aspect is preferred as required. Otherwise, we can get
880
+ // child sections interspersed where deeper optional segments are higher than
881
+ // parent optional segments, where for example, /:two would explode _earlier_
882
+ // then /:one. By always including the parent as required _for all children_
883
+ // first, we avoid this issue
884
+ result.push(...restExploded.map(subpath => subpath === "" ? required : [required, subpath].join("/")));
885
+
886
+ // Then, if this is an optional value, add all child versions without
887
+ if (isOptional) {
888
+ result.push(...restExploded);
889
+ }
890
+
891
+ // for absolute paths, ensure `/` instead of empty segment
892
+ return result.map(exploded => path.startsWith("/") && exploded === "" ? "/" : exploded);
893
+ }
894
+ function rankRouteBranches(branches) {
895
+ branches.sort((a, b) => a.score !== b.score ? b.score - a.score // Higher score first
896
+ : compareIndexes(a.routesMeta.map(meta => meta.childrenIndex), b.routesMeta.map(meta => meta.childrenIndex)));
897
+ }
898
+ const paramRe = /^:[\w-]+$/;
899
+ const dynamicSegmentValue = 3;
900
+ const indexRouteValue = 2;
901
+ const emptySegmentValue = 1;
902
+ const staticSegmentValue = 10;
903
+ const splatPenalty = -2;
904
+ const isSplat = s => s === "*";
905
+ function computeScore(path, index) {
906
+ let segments = path.split("/");
907
+ let initialScore = segments.length;
908
+ if (segments.some(isSplat)) {
909
+ initialScore += splatPenalty;
910
+ }
911
+ if (index) {
912
+ initialScore += indexRouteValue;
913
+ }
914
+ return segments.filter(s => !isSplat(s)).reduce((score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === "" ? emptySegmentValue : staticSegmentValue), initialScore);
915
+ }
916
+ function compareIndexes(a, b) {
917
+ let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);
918
+ return siblings ?
919
+ // If two routes are siblings, we should try to match the earlier sibling
920
+ // first. This allows people to have fine-grained control over the matching
921
+ // behavior by simply putting routes with identical paths in the order they
922
+ // want them tried.
923
+ a[a.length - 1] - b[b.length - 1] :
924
+ // Otherwise, it doesn't really make sense to rank non-siblings by index,
925
+ // so they sort equally.
926
+ 0;
927
+ }
928
+ function matchRouteBranch(branch, pathname) {
929
+ let {
930
+ routesMeta
931
+ } = branch;
932
+ let matchedParams = {};
933
+ let matchedPathname = "/";
934
+ let matches = [];
935
+ for (let i = 0; i < routesMeta.length; ++i) {
936
+ let meta = routesMeta[i];
937
+ let end = i === routesMeta.length - 1;
938
+ let remainingPathname = matchedPathname === "/" ? pathname : pathname.slice(matchedPathname.length) || "/";
939
+ let match = matchPath({
940
+ path: meta.relativePath,
941
+ caseSensitive: meta.caseSensitive,
942
+ end
943
+ }, remainingPathname);
944
+ if (!match) return null;
945
+ Object.assign(matchedParams, match.params);
946
+ let route = meta.route;
947
+ matches.push({
948
+ // TODO: Can this as be avoided?
949
+ params: matchedParams,
950
+ pathname: joinPaths([matchedPathname, match.pathname]),
951
+ pathnameBase: normalizePathname(joinPaths([matchedPathname, match.pathnameBase])),
952
+ route
953
+ });
954
+ if (match.pathnameBase !== "/") {
955
+ matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);
956
+ }
957
+ }
958
+ return matches;
959
+ }
960
+
961
+ /**
962
+ * Returns a path with params interpolated.
963
+ *
964
+ * @see https://reactrouter.com/utils/generate-path
965
+ */
966
+ function generatePath(originalPath, params) {
967
+ if (params === void 0) {
968
+ params = {};
969
+ }
970
+ let path = originalPath;
971
+ if (path.endsWith("*") && path !== "*" && !path.endsWith("/*")) {
972
+ warning(false, "Route path \"" + path + "\" will be treated as if it were " + ("\"" + path.replace(/\*$/, "/*") + "\" because the `*` character must ") + "always follow a `/` in the pattern. To get rid of this warning, " + ("please change the route path to \"" + path.replace(/\*$/, "/*") + "\"."));
973
+ path = path.replace(/\*$/, "/*");
974
+ }
975
+
976
+ // ensure `/` is added at the beginning if the path is absolute
977
+ const prefix = path.startsWith("/") ? "/" : "";
978
+ const stringify = p => p == null ? "" : typeof p === "string" ? p : String(p);
979
+ const segments = path.split(/\/+/).map((segment, index, array) => {
980
+ const isLastSegment = index === array.length - 1;
981
+
982
+ // only apply the splat if it's the last segment
983
+ if (isLastSegment && segment === "*") {
984
+ const star = "*";
985
+ // Apply the splat
986
+ return stringify(params[star]);
987
+ }
988
+ const keyMatch = segment.match(/^:([\w-]+)(\??)$/);
989
+ if (keyMatch) {
990
+ const [, key, optional] = keyMatch;
991
+ let param = params[key];
992
+ invariant(optional === "?" || param != null, "Missing \":" + key + "\" param");
993
+ return stringify(param);
994
+ }
995
+
996
+ // Remove any optional markers from optional static segments
997
+ return segment.replace(/\?$/g, "");
998
+ })
999
+ // Remove empty segments
1000
+ .filter(segment => !!segment);
1001
+ return prefix + segments.join("/");
1002
+ }
1003
+
1004
+ /**
1005
+ * A PathPattern is used to match on some portion of a URL pathname.
1006
+ */
1007
+
1008
+ /**
1009
+ * A PathMatch contains info about how a PathPattern matched on a URL pathname.
1010
+ */
1011
+
1012
+ /**
1013
+ * Performs pattern matching on a URL pathname and returns information about
1014
+ * the match.
1015
+ *
1016
+ * @see https://reactrouter.com/utils/match-path
1017
+ */
1018
+ function matchPath(pattern, pathname) {
1019
+ if (typeof pattern === "string") {
1020
+ pattern = {
1021
+ path: pattern,
1022
+ caseSensitive: false,
1023
+ end: true
1024
+ };
1025
+ }
1026
+ let [matcher, compiledParams] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);
1027
+ let match = pathname.match(matcher);
1028
+ if (!match) return null;
1029
+ let matchedPathname = match[0];
1030
+ let pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1");
1031
+ let captureGroups = match.slice(1);
1032
+ let params = compiledParams.reduce((memo, _ref, index) => {
1033
+ let {
1034
+ paramName,
1035
+ isOptional
1036
+ } = _ref;
1037
+ // We need to compute the pathnameBase here using the raw splat value
1038
+ // instead of using params["*"] later because it will be decoded then
1039
+ if (paramName === "*") {
1040
+ let splatValue = captureGroups[index] || "";
1041
+ pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, "$1");
1042
+ }
1043
+ const value = captureGroups[index];
1044
+ if (isOptional && !value) {
1045
+ memo[paramName] = undefined;
1046
+ } else {
1047
+ memo[paramName] = (value || "").replace(/%2F/g, "/");
1048
+ }
1049
+ return memo;
1050
+ }, {});
1051
+ return {
1052
+ params,
1053
+ pathname: matchedPathname,
1054
+ pathnameBase,
1055
+ pattern
1056
+ };
1057
+ }
1058
+ function compilePath(path, caseSensitive, end) {
1059
+ if (caseSensitive === void 0) {
1060
+ caseSensitive = false;
1061
+ }
1062
+ if (end === void 0) {
1063
+ end = true;
1064
+ }
1065
+ warning(path === "*" || !path.endsWith("*") || path.endsWith("/*"), "Route path \"" + path + "\" will be treated as if it were " + ("\"" + path.replace(/\*$/, "/*") + "\" because the `*` character must ") + "always follow a `/` in the pattern. To get rid of this warning, " + ("please change the route path to \"" + path.replace(/\*$/, "/*") + "\"."));
1066
+ let params = [];
1067
+ let regexpSource = "^" + path.replace(/\/*\*?$/, "") // Ignore trailing / and /*, we'll handle it below
1068
+ .replace(/^\/*/, "/") // Make sure it has a leading /
1069
+ .replace(/[\\.*+^${}|()[\]]/g, "\\$&") // Escape special regex chars
1070
+ .replace(/\/:([\w-]+)(\?)?/g, (_, paramName, isOptional) => {
1071
+ params.push({
1072
+ paramName,
1073
+ isOptional: isOptional != null
1074
+ });
1075
+ return isOptional ? "/?([^\\/]+)?" : "/([^\\/]+)";
1076
+ });
1077
+ if (path.endsWith("*")) {
1078
+ params.push({
1079
+ paramName: "*"
1080
+ });
1081
+ regexpSource += path === "*" || path === "/*" ? "(.*)$" // Already matched the initial /, just match the rest
1082
+ : "(?:\\/(.+)|\\/*)$"; // Don't include the / in params["*"]
1083
+ } else if (end) {
1084
+ // When matching to the end, ignore trailing slashes
1085
+ regexpSource += "\\/*$";
1086
+ } else if (path !== "" && path !== "/") {
1087
+ // If our path is non-empty and contains anything beyond an initial slash,
1088
+ // then we have _some_ form of path in our regex, so we should expect to
1089
+ // match only if we find the end of this path segment. Look for an optional
1090
+ // non-captured trailing slash (to match a portion of the URL) or the end
1091
+ // of the path (if we've matched to the end). We used to do this with a
1092
+ // word boundary but that gives false positives on routes like
1093
+ // /user-preferences since `-` counts as a word boundary.
1094
+ regexpSource += "(?:(?=\\/|$))";
1095
+ } else ;
1096
+ let matcher = new RegExp(regexpSource, caseSensitive ? undefined : "i");
1097
+ return [matcher, params];
1098
+ }
1099
+ function decodePath(value) {
1100
+ try {
1101
+ return value.split("/").map(v => decodeURIComponent(v).replace(/\//g, "%2F")).join("/");
1102
+ } catch (error) {
1103
+ warning(false, "The URL path \"" + value + "\" could not be decoded because it is is a " + "malformed URL segment. This is probably due to a bad percent " + ("encoding (" + error + ")."));
1104
+ return value;
1105
+ }
1106
+ }
1107
+
1108
+ /**
1109
+ * @private
1110
+ */
1111
+ function stripBasename(pathname, basename) {
1112
+ if (basename === "/") return pathname;
1113
+ if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {
1114
+ return null;
1115
+ }
1116
+
1117
+ // We want to leave trailing slash behavior in the user's control, so if they
1118
+ // specify a basename with a trailing slash, we should support it
1119
+ let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length;
1120
+ let nextChar = pathname.charAt(startIndex);
1121
+ if (nextChar && nextChar !== "/") {
1122
+ // pathname does not start with basename/
1123
+ return null;
1124
+ }
1125
+ return pathname.slice(startIndex) || "/";
1126
+ }
1127
+
1128
+ /**
1129
+ * Returns a resolved path object relative to the given pathname.
1130
+ *
1131
+ * @see https://reactrouter.com/utils/resolve-path
1132
+ */
1133
+ function resolvePath(to, fromPathname) {
1134
+ if (fromPathname === void 0) {
1135
+ fromPathname = "/";
1136
+ }
1137
+ let {
1138
+ pathname: toPathname,
1139
+ search = "",
1140
+ hash = ""
1141
+ } = typeof to === "string" ? parsePath(to) : to;
1142
+ let pathname = toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;
1143
+ return {
1144
+ pathname,
1145
+ search: normalizeSearch(search),
1146
+ hash: normalizeHash(hash)
1147
+ };
1148
+ }
1149
+ function resolvePathname(relativePath, fromPathname) {
1150
+ let segments = fromPathname.replace(/\/+$/, "").split("/");
1151
+ let relativeSegments = relativePath.split("/");
1152
+ relativeSegments.forEach(segment => {
1153
+ if (segment === "..") {
1154
+ // Keep the root "" segment so the pathname starts at /
1155
+ if (segments.length > 1) segments.pop();
1156
+ } else if (segment !== ".") {
1157
+ segments.push(segment);
1158
+ }
1159
+ });
1160
+ return segments.length > 1 ? segments.join("/") : "/";
1161
+ }
1162
+ function getInvalidPathError(char, field, dest, path) {
1163
+ return "Cannot include a '" + char + "' character in a manually specified " + ("`to." + field + "` field [" + JSON.stringify(path) + "]. Please separate it out to the ") + ("`to." + dest + "` field. Alternatively you may provide the full path as ") + "a string in <Link to=\"...\"> and the router will parse it for you.";
1164
+ }
1165
+
1166
+ /**
1167
+ * @private
1168
+ *
1169
+ * When processing relative navigation we want to ignore ancestor routes that
1170
+ * do not contribute to the path, such that index/pathless layout routes don't
1171
+ * interfere.
1172
+ *
1173
+ * For example, when moving a route element into an index route and/or a
1174
+ * pathless layout route, relative link behavior contained within should stay
1175
+ * the same. Both of the following examples should link back to the root:
1176
+ *
1177
+ * <Route path="/">
1178
+ * <Route path="accounts" element={<Link to=".."}>
1179
+ * </Route>
1180
+ *
1181
+ * <Route path="/">
1182
+ * <Route path="accounts">
1183
+ * <Route element={<AccountsLayout />}> // <-- Does not contribute
1184
+ * <Route index element={<Link to=".."} /> // <-- Does not contribute
1185
+ * </Route
1186
+ * </Route>
1187
+ * </Route>
1188
+ */
1189
+ function getPathContributingMatches(matches) {
1190
+ return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);
1191
+ }
1192
+
1193
+ // Return the array of pathnames for the current route matches - used to
1194
+ // generate the routePathnames input for resolveTo()
1195
+ function getResolveToMatches(matches, v7_relativeSplatPath) {
1196
+ let pathMatches = getPathContributingMatches(matches);
1197
+
1198
+ // When v7_relativeSplatPath is enabled, use the full pathname for the leaf
1199
+ // match so we include splat values for "." links. See:
1200
+ // https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329
1201
+ if (v7_relativeSplatPath) {
1202
+ return pathMatches.map((match, idx) => idx === matches.length - 1 ? match.pathname : match.pathnameBase);
1203
+ }
1204
+ return pathMatches.map(match => match.pathnameBase);
1205
+ }
1206
+
1207
+ /**
1208
+ * @private
1209
+ */
1210
+ function resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {
1211
+ if (isPathRelative === void 0) {
1212
+ isPathRelative = false;
1213
+ }
1214
+ let to;
1215
+ if (typeof toArg === "string") {
1216
+ to = parsePath(toArg);
1217
+ } else {
1218
+ to = _extends({}, toArg);
1219
+ invariant(!to.pathname || !to.pathname.includes("?"), getInvalidPathError("?", "pathname", "search", to));
1220
+ invariant(!to.pathname || !to.pathname.includes("#"), getInvalidPathError("#", "pathname", "hash", to));
1221
+ invariant(!to.search || !to.search.includes("#"), getInvalidPathError("#", "search", "hash", to));
1222
+ }
1223
+ let isEmptyPath = toArg === "" || to.pathname === "";
1224
+ let toPathname = isEmptyPath ? "/" : to.pathname;
1225
+ let from;
1226
+
1227
+ // Routing is relative to the current pathname if explicitly requested.
1228
+ //
1229
+ // If a pathname is explicitly provided in `to`, it should be relative to the
1230
+ // route context. This is explained in `Note on `<Link to>` values` in our
1231
+ // migration guide from v5 as a means of disambiguation between `to` values
1232
+ // that begin with `/` and those that do not. However, this is problematic for
1233
+ // `to` values that do not provide a pathname. `to` can simply be a search or
1234
+ // hash string, in which case we should assume that the navigation is relative
1235
+ // to the current location's pathname and *not* the route pathname.
1236
+ if (toPathname == null) {
1237
+ from = locationPathname;
1238
+ } else {
1239
+ let routePathnameIndex = routePathnames.length - 1;
1240
+
1241
+ // With relative="route" (the default), each leading .. segment means
1242
+ // "go up one route" instead of "go up one URL segment". This is a key
1243
+ // difference from how <a href> works and a major reason we call this a
1244
+ // "to" value instead of a "href".
1245
+ if (!isPathRelative && toPathname.startsWith("..")) {
1246
+ let toSegments = toPathname.split("/");
1247
+ while (toSegments[0] === "..") {
1248
+ toSegments.shift();
1249
+ routePathnameIndex -= 1;
1250
+ }
1251
+ to.pathname = toSegments.join("/");
1252
+ }
1253
+ from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";
1254
+ }
1255
+ let path = resolvePath(to, from);
1256
+
1257
+ // Ensure the pathname has a trailing slash if the original "to" had one
1258
+ let hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/");
1259
+ // Or if this was a link to the current path which has a trailing slash
1260
+ let hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/");
1261
+ if (!path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {
1262
+ path.pathname += "/";
1263
+ }
1264
+ return path;
1265
+ }
1266
+
1267
+ /**
1268
+ * @private
1269
+ */
1270
+ function getToPathname(to) {
1271
+ // Empty strings should be treated the same as / paths
1272
+ return to === "" || to.pathname === "" ? "/" : typeof to === "string" ? parsePath(to).pathname : to.pathname;
1273
+ }
1274
+
1275
+ /**
1276
+ * @private
1277
+ */
1278
+ const joinPaths = paths => paths.join("/").replace(/\/\/+/g, "/");
1279
+
1280
+ /**
1281
+ * @private
1282
+ */
1283
+ const normalizePathname = pathname => pathname.replace(/\/+$/, "").replace(/^\/*/, "/");
1284
+
1285
+ /**
1286
+ * @private
1287
+ */
1288
+ const normalizeSearch = search => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
1289
+
1290
+ /**
1291
+ * @private
1292
+ */
1293
+ const normalizeHash = hash => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
1294
+ /**
1295
+ * This is a shortcut for creating `application/json` responses. Converts `data`
1296
+ * to JSON and sets the `Content-Type` header.
1297
+ */
1298
+ const json = function json(data, init) {
1299
+ if (init === void 0) {
1300
+ init = {};
1301
+ }
1302
+ let responseInit = typeof init === "number" ? {
1303
+ status: init
1304
+ } : init;
1305
+ let headers = new Headers(responseInit.headers);
1306
+ if (!headers.has("Content-Type")) {
1307
+ headers.set("Content-Type", "application/json; charset=utf-8");
1308
+ }
1309
+ return new Response(JSON.stringify(data), _extends({}, responseInit, {
1310
+ headers
1311
+ }));
1312
+ };
1313
+ class AbortedDeferredError extends Error {}
1314
+ class DeferredData {
1315
+ constructor(data, responseInit) {
1316
+ this.pendingKeysSet = new Set();
1317
+ this.subscribers = new Set();
1318
+ this.deferredKeys = [];
1319
+ invariant(data && typeof data === "object" && !Array.isArray(data), "defer() only accepts plain objects");
1320
+
1321
+ // Set up an AbortController + Promise we can race against to exit early
1322
+ // cancellation
1323
+ let reject;
1324
+ this.abortPromise = new Promise((_, r) => reject = r);
1325
+ this.controller = new AbortController();
1326
+ let onAbort = () => reject(new AbortedDeferredError("Deferred data aborted"));
1327
+ this.unlistenAbortSignal = () => this.controller.signal.removeEventListener("abort", onAbort);
1328
+ this.controller.signal.addEventListener("abort", onAbort);
1329
+ this.data = Object.entries(data).reduce((acc, _ref2) => {
1330
+ let [key, value] = _ref2;
1331
+ return Object.assign(acc, {
1332
+ [key]: this.trackPromise(key, value)
1333
+ });
1334
+ }, {});
1335
+ if (this.done) {
1336
+ // All incoming values were resolved
1337
+ this.unlistenAbortSignal();
1338
+ }
1339
+ this.init = responseInit;
1340
+ }
1341
+ trackPromise(key, value) {
1342
+ if (!(value instanceof Promise)) {
1343
+ return value;
1344
+ }
1345
+ this.deferredKeys.push(key);
1346
+ this.pendingKeysSet.add(key);
1347
+
1348
+ // We store a little wrapper promise that will be extended with
1349
+ // _data/_error props upon resolve/reject
1350
+ let promise = Promise.race([value, this.abortPromise]).then(data => this.onSettle(promise, key, undefined, data), error => this.onSettle(promise, key, error));
1351
+
1352
+ // Register rejection listeners to avoid uncaught promise rejections on
1353
+ // errors or aborted deferred values
1354
+ promise.catch(() => {});
1355
+ Object.defineProperty(promise, "_tracked", {
1356
+ get: () => true
1357
+ });
1358
+ return promise;
1359
+ }
1360
+ onSettle(promise, key, error, data) {
1361
+ if (this.controller.signal.aborted && error instanceof AbortedDeferredError) {
1362
+ this.unlistenAbortSignal();
1363
+ Object.defineProperty(promise, "_error", {
1364
+ get: () => error
1365
+ });
1366
+ return Promise.reject(error);
1367
+ }
1368
+ this.pendingKeysSet.delete(key);
1369
+ if (this.done) {
1370
+ // Nothing left to abort!
1371
+ this.unlistenAbortSignal();
1372
+ }
1373
+
1374
+ // If the promise was resolved/rejected with undefined, we'll throw an error as you
1375
+ // should always resolve with a value or null
1376
+ if (error === undefined && data === undefined) {
1377
+ let undefinedError = new Error("Deferred data for key \"" + key + "\" resolved/rejected with `undefined`, " + "you must resolve/reject with a value or `null`.");
1378
+ Object.defineProperty(promise, "_error", {
1379
+ get: () => undefinedError
1380
+ });
1381
+ this.emit(false, key);
1382
+ return Promise.reject(undefinedError);
1383
+ }
1384
+ if (data === undefined) {
1385
+ Object.defineProperty(promise, "_error", {
1386
+ get: () => error
1387
+ });
1388
+ this.emit(false, key);
1389
+ return Promise.reject(error);
1390
+ }
1391
+ Object.defineProperty(promise, "_data", {
1392
+ get: () => data
1393
+ });
1394
+ this.emit(false, key);
1395
+ return data;
1396
+ }
1397
+ emit(aborted, settledKey) {
1398
+ this.subscribers.forEach(subscriber => subscriber(aborted, settledKey));
1399
+ }
1400
+ subscribe(fn) {
1401
+ this.subscribers.add(fn);
1402
+ return () => this.subscribers.delete(fn);
1403
+ }
1404
+ cancel() {
1405
+ this.controller.abort();
1406
+ this.pendingKeysSet.forEach((v, k) => this.pendingKeysSet.delete(k));
1407
+ this.emit(true);
1408
+ }
1409
+ async resolveData(signal) {
1410
+ let aborted = false;
1411
+ if (!this.done) {
1412
+ let onAbort = () => this.cancel();
1413
+ signal.addEventListener("abort", onAbort);
1414
+ aborted = await new Promise(resolve => {
1415
+ this.subscribe(aborted => {
1416
+ signal.removeEventListener("abort", onAbort);
1417
+ if (aborted || this.done) {
1418
+ resolve(aborted);
1419
+ }
1420
+ });
1421
+ });
1422
+ }
1423
+ return aborted;
1424
+ }
1425
+ get done() {
1426
+ return this.pendingKeysSet.size === 0;
1427
+ }
1428
+ get unwrappedData() {
1429
+ invariant(this.data !== null && this.done, "Can only unwrap data on initialized and settled deferreds");
1430
+ return Object.entries(this.data).reduce((acc, _ref3) => {
1431
+ let [key, value] = _ref3;
1432
+ return Object.assign(acc, {
1433
+ [key]: unwrapTrackedPromise(value)
1434
+ });
1435
+ }, {});
1436
+ }
1437
+ get pendingKeys() {
1438
+ return Array.from(this.pendingKeysSet);
1439
+ }
1440
+ }
1441
+ function isTrackedPromise(value) {
1442
+ return value instanceof Promise && value._tracked === true;
1443
+ }
1444
+ function unwrapTrackedPromise(value) {
1445
+ if (!isTrackedPromise(value)) {
1446
+ return value;
1447
+ }
1448
+ if (value._error) {
1449
+ throw value._error;
1450
+ }
1451
+ return value._data;
1452
+ }
1453
+ const defer = function defer(data, init) {
1454
+ if (init === void 0) {
1455
+ init = {};
1456
+ }
1457
+ let responseInit = typeof init === "number" ? {
1458
+ status: init
1459
+ } : init;
1460
+ return new DeferredData(data, responseInit);
1461
+ };
1462
+ /**
1463
+ * A redirect response. Sets the status code and the `Location` header.
1464
+ * Defaults to "302 Found".
1465
+ */
1466
+ const redirect = function redirect(url, init) {
1467
+ if (init === void 0) {
1468
+ init = 302;
1469
+ }
1470
+ let responseInit = init;
1471
+ if (typeof responseInit === "number") {
1472
+ responseInit = {
1473
+ status: responseInit
1474
+ };
1475
+ } else if (typeof responseInit.status === "undefined") {
1476
+ responseInit.status = 302;
1477
+ }
1478
+ let headers = new Headers(responseInit.headers);
1479
+ headers.set("Location", url);
1480
+ return new Response(null, _extends({}, responseInit, {
1481
+ headers
1482
+ }));
1483
+ };
1484
+
1485
+ /**
1486
+ * A redirect response that will force a document reload to the new location.
1487
+ * Sets the status code and the `Location` header.
1488
+ * Defaults to "302 Found".
1489
+ */
1490
+ const redirectDocument = (url, init) => {
1491
+ let response = redirect(url, init);
1492
+ response.headers.set("X-Remix-Reload-Document", "true");
1493
+ return response;
1494
+ };
1495
+ /**
1496
+ * @private
1497
+ * Utility class we use to hold auto-unwrapped 4xx/5xx Response bodies
1498
+ *
1499
+ * We don't export the class for public use since it's an implementation
1500
+ * detail, but we export the interface above so folks can build their own
1501
+ * abstractions around instances via isRouteErrorResponse()
1502
+ */
1503
+ class ErrorResponseImpl {
1504
+ constructor(status, statusText, data, internal) {
1505
+ if (internal === void 0) {
1506
+ internal = false;
1507
+ }
1508
+ this.status = status;
1509
+ this.statusText = statusText || "";
1510
+ this.internal = internal;
1511
+ if (data instanceof Error) {
1512
+ this.data = data.toString();
1513
+ this.error = data;
1514
+ } else {
1515
+ this.data = data;
1516
+ }
1517
+ }
1518
+ }
1519
+
1520
+ /**
1521
+ * Check if the given error is an ErrorResponse generated from a 4xx/5xx
1522
+ * Response thrown from an action/loader
1523
+ */
1524
+ function isRouteErrorResponse(error) {
1525
+ return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
1526
+ }
1527
+
1528
+ ////////////////////////////////////////////////////////////////////////////////
1529
+ //#region Types and Constants
1530
+ ////////////////////////////////////////////////////////////////////////////////
1531
+
1532
+ /**
1533
+ * A Router instance manages all navigation and data loading/mutations
1534
+ */
1535
+ /**
1536
+ * State maintained internally by the router. During a navigation, all states
1537
+ * reflect the the "old" location unless otherwise noted.
1538
+ */
1539
+ /**
1540
+ * Data that can be passed into hydrate a Router from SSR
1541
+ */
1542
+ /**
1543
+ * Future flags to toggle new feature behavior
1544
+ */
1545
+ /**
1546
+ * Initialization options for createRouter
1547
+ */
1548
+ /**
1549
+ * State returned from a server-side query() call
1550
+ */
1551
+ /**
1552
+ * A StaticHandler instance manages a singular SSR navigation/fetch event
1553
+ */
1554
+ /**
1555
+ * Subscriber function signature for changes to router state
1556
+ */
1557
+ /**
1558
+ * Function signature for determining the key to be used in scroll restoration
1559
+ * for a given location
1560
+ */
1561
+ /**
1562
+ * Function signature for determining the current scroll position
1563
+ */
1564
+ // Allowed for any navigation or fetch
1565
+ // Only allowed for navigations
1566
+ // Only allowed for submission navigations
1567
+ /**
1568
+ * Options for a navigate() call for a normal (non-submission) navigation
1569
+ */
1570
+ /**
1571
+ * Options for a navigate() call for a submission navigation
1572
+ */
1573
+ /**
1574
+ * Options to pass to navigate() for a navigation
1575
+ */
1576
+ /**
1577
+ * Options for a fetch() load
1578
+ */
1579
+ /**
1580
+ * Options for a fetch() submission
1581
+ */
1582
+ /**
1583
+ * Options to pass to fetch()
1584
+ */
1585
+ /**
1586
+ * Potential states for state.navigation
1587
+ */
1588
+ /**
1589
+ * Potential states for fetchers
1590
+ */
1591
+ /**
1592
+ * Cached info for active fetcher.load() instances so they can participate
1593
+ * in revalidation
1594
+ */
1595
+ /**
1596
+ * Identified fetcher.load() calls that need to be revalidated
1597
+ */
1598
+ /**
1599
+ * Wrapper object to allow us to throw any response out from callLoaderOrAction
1600
+ * for queryRouter while preserving whether or not it was thrown or returned
1601
+ * from the loader/action
1602
+ */
1603
+ const validMutationMethodsArr = ["post", "put", "patch", "delete"];
1604
+ const validMutationMethods = new Set(validMutationMethodsArr);
1605
+ const validRequestMethodsArr = ["get", ...validMutationMethodsArr];
1606
+ const validRequestMethods = new Set(validRequestMethodsArr);
1607
+ const redirectStatusCodes = new Set([301, 302, 303, 307, 308]);
1608
+ const redirectPreserveMethodStatusCodes = new Set([307, 308]);
1609
+ const IDLE_NAVIGATION = {
1610
+ state: "idle",
1611
+ location: undefined,
1612
+ formMethod: undefined,
1613
+ formAction: undefined,
1614
+ formEncType: undefined,
1615
+ formData: undefined,
1616
+ json: undefined,
1617
+ text: undefined
1618
+ };
1619
+ const IDLE_FETCHER = {
1620
+ state: "idle",
1621
+ data: undefined,
1622
+ formMethod: undefined,
1623
+ formAction: undefined,
1624
+ formEncType: undefined,
1625
+ formData: undefined,
1626
+ json: undefined,
1627
+ text: undefined
1628
+ };
1629
+ const IDLE_BLOCKER = {
1630
+ state: "unblocked",
1631
+ proceed: undefined,
1632
+ reset: undefined,
1633
+ location: undefined
1634
+ };
1635
+ const ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
1636
+ const defaultMapRouteProperties = route => ({
1637
+ hasErrorBoundary: Boolean(route.hasErrorBoundary)
1638
+ });
1639
+ const TRANSITIONS_STORAGE_KEY = "remix-router-transitions";
1640
+
1641
+ //#endregion
1642
+
1643
+ ////////////////////////////////////////////////////////////////////////////////
1644
+ //#region createRouter
1645
+ ////////////////////////////////////////////////////////////////////////////////
1646
+
1647
+ /**
1648
+ * Create a router and listen to history POP navigations
1649
+ */
1650
+ function createRouter(init) {
1651
+ const routerWindow = init.window ? init.window : typeof window !== "undefined" ? window : undefined;
1652
+ const isBrowser = typeof routerWindow !== "undefined" && typeof routerWindow.document !== "undefined" && typeof routerWindow.document.createElement !== "undefined";
1653
+ const isServer = !isBrowser;
1654
+ invariant(init.routes.length > 0, "You must provide a non-empty routes array to createRouter");
1655
+ let mapRouteProperties;
1656
+ if (init.mapRouteProperties) {
1657
+ mapRouteProperties = init.mapRouteProperties;
1658
+ } else if (init.detectErrorBoundary) {
1659
+ // If they are still using the deprecated version, wrap it with the new API
1660
+ let detectErrorBoundary = init.detectErrorBoundary;
1661
+ mapRouteProperties = route => ({
1662
+ hasErrorBoundary: detectErrorBoundary(route)
1663
+ });
1664
+ } else {
1665
+ mapRouteProperties = defaultMapRouteProperties;
1666
+ }
1667
+
1668
+ // Routes keyed by ID
1669
+ let manifest = {};
1670
+ // Routes in tree format for matching
1671
+ let dataRoutes = convertRoutesToDataRoutes(init.routes, mapRouteProperties, undefined, manifest);
1672
+ let inFlightDataRoutes;
1673
+ let basename = init.basename || "/";
1674
+ // Config driven behavior flags
1675
+ let future = _extends({
1676
+ v7_fetcherPersist: false,
1677
+ v7_normalizeFormMethod: false,
1678
+ v7_partialHydration: false,
1679
+ v7_prependBasename: false,
1680
+ v7_relativeSplatPath: false
1681
+ }, init.future);
1682
+ // Cleanup function for history
1683
+ let unlistenHistory = null;
1684
+ // Externally-provided functions to call on all state changes
1685
+ let subscribers = new Set();
1686
+ // Externally-provided object to hold scroll restoration locations during routing
1687
+ let savedScrollPositions = null;
1688
+ // Externally-provided function to get scroll restoration keys
1689
+ let getScrollRestorationKey = null;
1690
+ // Externally-provided function to get current scroll position
1691
+ let getScrollPosition = null;
1692
+ // One-time flag to control the initial hydration scroll restoration. Because
1693
+ // we don't get the saved positions from <ScrollRestoration /> until _after_
1694
+ // the initial render, we need to manually trigger a separate updateState to
1695
+ // send along the restoreScrollPosition
1696
+ // Set to true if we have `hydrationData` since we assume we were SSR'd and that
1697
+ // SSR did the initial scroll restoration.
1698
+ let initialScrollRestored = init.hydrationData != null;
1699
+ let initialMatches = matchRoutes(dataRoutes, init.history.location, basename);
1700
+ let initialErrors = null;
1701
+ if (initialMatches == null) {
1702
+ // If we do not match a user-provided-route, fall back to the root
1703
+ // to allow the error boundary to take over
1704
+ let error = getInternalRouterError(404, {
1705
+ pathname: init.history.location.pathname
1706
+ });
1707
+ let {
1708
+ matches,
1709
+ route
1710
+ } = getShortCircuitMatches(dataRoutes);
1711
+ initialMatches = matches;
1712
+ initialErrors = {
1713
+ [route.id]: error
1714
+ };
1715
+ }
1716
+ let initialized;
1717
+ let hasLazyRoutes = initialMatches.some(m => m.route.lazy);
1718
+ let hasLoaders = initialMatches.some(m => m.route.loader);
1719
+ if (hasLazyRoutes) {
1720
+ // All initialMatches need to be loaded before we're ready. If we have lazy
1721
+ // functions around still then we'll need to run them in initialize()
1722
+ initialized = false;
1723
+ } else if (!hasLoaders) {
1724
+ // If we've got no loaders to run, then we're good to go
1725
+ initialized = true;
1726
+ } else if (future.v7_partialHydration) {
1727
+ // If partial hydration is enabled, we're initialized so long as we were
1728
+ // provided with hydrationData for every route with a loader, and no loaders
1729
+ // were marked for explicit hydration
1730
+ let loaderData = init.hydrationData ? init.hydrationData.loaderData : null;
1731
+ let errors = init.hydrationData ? init.hydrationData.errors : null;
1732
+ let isRouteInitialized = m => {
1733
+ // No loader, nothing to initialize
1734
+ if (!m.route.loader) return true;
1735
+ // Explicitly opting-in to running on hydration
1736
+ if (m.route.loader.hydrate === true) return false;
1737
+ // Otherwise, initialized if hydrated with data or an error
1738
+ return loaderData && loaderData[m.route.id] !== undefined || errors && errors[m.route.id] !== undefined;
1739
+ };
1740
+
1741
+ // If errors exist, don't consider routes below the boundary
1742
+ if (errors) {
1743
+ let idx = initialMatches.findIndex(m => errors[m.route.id] !== undefined);
1744
+ initialized = initialMatches.slice(0, idx + 1).every(isRouteInitialized);
1745
+ } else {
1746
+ initialized = initialMatches.every(isRouteInitialized);
1747
+ }
1748
+ } else {
1749
+ // Without partial hydration - we're initialized if we were provided any
1750
+ // hydrationData - which is expected to be complete
1751
+ initialized = init.hydrationData != null;
1752
+ }
1753
+ let router;
1754
+ let state = {
1755
+ historyAction: init.history.action,
1756
+ location: init.history.location,
1757
+ matches: initialMatches,
1758
+ initialized,
1759
+ navigation: IDLE_NAVIGATION,
1760
+ // Don't restore on initial updateState() if we were SSR'd
1761
+ restoreScrollPosition: init.hydrationData != null ? false : null,
1762
+ preventScrollReset: false,
1763
+ revalidation: "idle",
1764
+ loaderData: init.hydrationData && init.hydrationData.loaderData || {},
1765
+ actionData: init.hydrationData && init.hydrationData.actionData || null,
1766
+ errors: init.hydrationData && init.hydrationData.errors || initialErrors,
1767
+ fetchers: new Map(),
1768
+ blockers: new Map()
1769
+ };
1770
+
1771
+ // -- Stateful internal variables to manage navigations --
1772
+ // Current navigation in progress (to be committed in completeNavigation)
1773
+ let pendingAction = Action.Pop;
1774
+
1775
+ // Should the current navigation prevent the scroll reset if scroll cannot
1776
+ // be restored?
1777
+ let pendingPreventScrollReset = false;
1778
+
1779
+ // AbortController for the active navigation
1780
+ let pendingNavigationController;
1781
+
1782
+ // Should the current navigation enable document.startViewTransition?
1783
+ let pendingViewTransitionEnabled = false;
1784
+
1785
+ // Store applied view transitions so we can apply them on POP
1786
+ let appliedViewTransitions = new Map();
1787
+
1788
+ // Cleanup function for persisting applied transitions to sessionStorage
1789
+ let removePageHideEventListener = null;
1790
+
1791
+ // We use this to avoid touching history in completeNavigation if a
1792
+ // revalidation is entirely uninterrupted
1793
+ let isUninterruptedRevalidation = false;
1794
+
1795
+ // Use this internal flag to force revalidation of all loaders:
1796
+ // - submissions (completed or interrupted)
1797
+ // - useRevalidator()
1798
+ // - X-Remix-Revalidate (from redirect)
1799
+ let isRevalidationRequired = false;
1800
+
1801
+ // Use this internal array to capture routes that require revalidation due
1802
+ // to a cancelled deferred on action submission
1803
+ let cancelledDeferredRoutes = [];
1804
+
1805
+ // Use this internal array to capture fetcher loads that were cancelled by an
1806
+ // action navigation and require revalidation
1807
+ let cancelledFetcherLoads = [];
1808
+
1809
+ // AbortControllers for any in-flight fetchers
1810
+ let fetchControllers = new Map();
1811
+
1812
+ // Track loads based on the order in which they started
1813
+ let incrementingLoadId = 0;
1814
+
1815
+ // Track the outstanding pending navigation data load to be compared against
1816
+ // the globally incrementing load when a fetcher load lands after a completed
1817
+ // navigation
1818
+ let pendingNavigationLoadId = -1;
1819
+
1820
+ // Fetchers that triggered data reloads as a result of their actions
1821
+ let fetchReloadIds = new Map();
1822
+
1823
+ // Fetchers that triggered redirect navigations
1824
+ let fetchRedirectIds = new Set();
1825
+
1826
+ // Most recent href/match for fetcher.load calls for fetchers
1827
+ let fetchLoadMatches = new Map();
1828
+
1829
+ // Ref-count mounted fetchers so we know when it's ok to clean them up
1830
+ let activeFetchers = new Map();
1831
+
1832
+ // Fetchers that have requested a delete when using v7_fetcherPersist,
1833
+ // they'll be officially removed after they return to idle
1834
+ let deletedFetchers = new Set();
1835
+
1836
+ // Store DeferredData instances for active route matches. When a
1837
+ // route loader returns defer() we stick one in here. Then, when a nested
1838
+ // promise resolves we update loaderData. If a new navigation starts we
1839
+ // cancel active deferreds for eliminated routes.
1840
+ let activeDeferreds = new Map();
1841
+
1842
+ // Store blocker functions in a separate Map outside of router state since
1843
+ // we don't need to update UI state if they change
1844
+ let blockerFunctions = new Map();
1845
+
1846
+ // Flag to ignore the next history update, so we can revert the URL change on
1847
+ // a POP navigation that was blocked by the user without touching router state
1848
+ let ignoreNextHistoryUpdate = false;
1849
+
1850
+ // Initialize the router, all side effects should be kicked off from here.
1851
+ // Implemented as a Fluent API for ease of:
1852
+ // let router = createRouter(init).initialize();
1853
+ function initialize() {
1854
+ // If history informs us of a POP navigation, start the navigation but do not update
1855
+ // state. We'll update our own state once the navigation completes
1856
+ unlistenHistory = init.history.listen(_ref => {
1857
+ let {
1858
+ action: historyAction,
1859
+ location,
1860
+ delta
1861
+ } = _ref;
1862
+ // Ignore this event if it was just us resetting the URL from a
1863
+ // blocked POP navigation
1864
+ if (ignoreNextHistoryUpdate) {
1865
+ ignoreNextHistoryUpdate = false;
1866
+ return;
1867
+ }
1868
+ warning(blockerFunctions.size === 0 || delta != null, "You are trying to use a blocker on a POP navigation to a location " + "that was not created by @remix-run/router. This will fail silently in " + "production. This can happen if you are navigating outside the router " + "via `window.history.pushState`/`window.location.hash` instead of using " + "router navigation APIs. This can also happen if you are using " + "createHashRouter and the user manually changes the URL.");
1869
+ let blockerKey = shouldBlockNavigation({
1870
+ currentLocation: state.location,
1871
+ nextLocation: location,
1872
+ historyAction
1873
+ });
1874
+ if (blockerKey && delta != null) {
1875
+ // Restore the URL to match the current UI, but don't update router state
1876
+ ignoreNextHistoryUpdate = true;
1877
+ init.history.go(delta * -1);
1878
+
1879
+ // Put the blocker into a blocked state
1880
+ updateBlocker(blockerKey, {
1881
+ state: "blocked",
1882
+ location,
1883
+ proceed() {
1884
+ updateBlocker(blockerKey, {
1885
+ state: "proceeding",
1886
+ proceed: undefined,
1887
+ reset: undefined,
1888
+ location
1889
+ });
1890
+ // Re-do the same POP navigation we just blocked
1891
+ init.history.go(delta);
1892
+ },
1893
+ reset() {
1894
+ let blockers = new Map(state.blockers);
1895
+ blockers.set(blockerKey, IDLE_BLOCKER);
1896
+ updateState({
1897
+ blockers
1898
+ });
1899
+ }
1900
+ });
1901
+ return;
1902
+ }
1903
+ return startNavigation(historyAction, location);
1904
+ });
1905
+ if (isBrowser) {
1906
+ // FIXME: This feels gross. How can we cleanup the lines between
1907
+ // scrollRestoration/appliedTransitions persistance?
1908
+ restoreAppliedTransitions(routerWindow, appliedViewTransitions);
1909
+ let _saveAppliedTransitions = () => persistAppliedTransitions(routerWindow, appliedViewTransitions);
1910
+ routerWindow.addEventListener("pagehide", _saveAppliedTransitions);
1911
+ removePageHideEventListener = () => routerWindow.removeEventListener("pagehide", _saveAppliedTransitions);
1912
+ }
1913
+
1914
+ // Kick off initial data load if needed. Use Pop to avoid modifying history
1915
+ // Note we don't do any handling of lazy here. For SPA's it'll get handled
1916
+ // in the normal navigation flow. For SSR it's expected that lazy modules are
1917
+ // resolved prior to router creation since we can't go into a fallbackElement
1918
+ // UI for SSR'd apps
1919
+ if (!state.initialized) {
1920
+ startNavigation(Action.Pop, state.location, {
1921
+ initialHydration: true
1922
+ });
1923
+ }
1924
+ return router;
1925
+ }
1926
+
1927
+ // Clean up a router and it's side effects
1928
+ function dispose() {
1929
+ if (unlistenHistory) {
1930
+ unlistenHistory();
1931
+ }
1932
+ if (removePageHideEventListener) {
1933
+ removePageHideEventListener();
1934
+ }
1935
+ subscribers.clear();
1936
+ pendingNavigationController && pendingNavigationController.abort();
1937
+ state.fetchers.forEach((_, key) => deleteFetcher(key));
1938
+ state.blockers.forEach((_, key) => deleteBlocker(key));
1939
+ }
1940
+
1941
+ // Subscribe to state updates for the router
1942
+ function subscribe(fn) {
1943
+ subscribers.add(fn);
1944
+ return () => subscribers.delete(fn);
1945
+ }
1946
+
1947
+ // Update our state and notify the calling context of the change
1948
+ function updateState(newState, opts) {
1949
+ if (opts === void 0) {
1950
+ opts = {};
1951
+ }
1952
+ state = _extends({}, state, newState);
1953
+
1954
+ // Prep fetcher cleanup so we can tell the UI which fetcher data entries
1955
+ // can be removed
1956
+ let completedFetchers = [];
1957
+ let deletedFetchersKeys = [];
1958
+ if (future.v7_fetcherPersist) {
1959
+ state.fetchers.forEach((fetcher, key) => {
1960
+ if (fetcher.state === "idle") {
1961
+ if (deletedFetchers.has(key)) {
1962
+ // Unmounted from the UI and can be totally removed
1963
+ deletedFetchersKeys.push(key);
1964
+ } else {
1965
+ // Returned to idle but still mounted in the UI, so semi-remains for
1966
+ // revalidations and such
1967
+ completedFetchers.push(key);
1968
+ }
1969
+ }
1970
+ });
1971
+ }
1972
+
1973
+ // Iterate over a local copy so that if flushSync is used and we end up
1974
+ // removing and adding a new subscriber due to the useCallback dependencies,
1975
+ // we don't get ourselves into a loop calling the new subscriber immediately
1976
+ [...subscribers].forEach(subscriber => subscriber(state, {
1977
+ deletedFetchers: deletedFetchersKeys,
1978
+ unstable_viewTransitionOpts: opts.viewTransitionOpts,
1979
+ unstable_flushSync: opts.flushSync === true
1980
+ }));
1981
+
1982
+ // Remove idle fetchers from state since we only care about in-flight fetchers.
1983
+ if (future.v7_fetcherPersist) {
1984
+ completedFetchers.forEach(key => state.fetchers.delete(key));
1985
+ deletedFetchersKeys.forEach(key => deleteFetcher(key));
1986
+ }
1987
+ }
1988
+
1989
+ // Complete a navigation returning the state.navigation back to the IDLE_NAVIGATION
1990
+ // and setting state.[historyAction/location/matches] to the new route.
1991
+ // - Location is a required param
1992
+ // - Navigation will always be set to IDLE_NAVIGATION
1993
+ // - Can pass any other state in newState
1994
+ function completeNavigation(location, newState, _temp) {
1995
+ var _location$state, _location$state2;
1996
+ let {
1997
+ flushSync
1998
+ } = _temp === void 0 ? {} : _temp;
1999
+ // Deduce if we're in a loading/actionReload state:
2000
+ // - We have committed actionData in the store
2001
+ // - The current navigation was a mutation submission
2002
+ // - We're past the submitting state and into the loading state
2003
+ // - The location being loaded is not the result of a redirect
2004
+ let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === "loading" && ((_location$state = location.state) == null ? void 0 : _location$state._isRedirect) !== true;
2005
+ let actionData;
2006
+ if (newState.actionData) {
2007
+ if (Object.keys(newState.actionData).length > 0) {
2008
+ actionData = newState.actionData;
2009
+ } else {
2010
+ // Empty actionData -> clear prior actionData due to an action error
2011
+ actionData = null;
2012
+ }
2013
+ } else if (isActionReload) {
2014
+ // Keep the current data if we're wrapping up the action reload
2015
+ actionData = state.actionData;
2016
+ } else {
2017
+ // Clear actionData on any other completed navigations
2018
+ actionData = null;
2019
+ }
2020
+
2021
+ // Always preserve any existing loaderData from re-used routes
2022
+ let loaderData = newState.loaderData ? mergeLoaderData(state.loaderData, newState.loaderData, newState.matches || [], newState.errors) : state.loaderData;
2023
+
2024
+ // On a successful navigation we can assume we got through all blockers
2025
+ // so we can start fresh
2026
+ let blockers = state.blockers;
2027
+ if (blockers.size > 0) {
2028
+ blockers = new Map(blockers);
2029
+ blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER));
2030
+ }
2031
+
2032
+ // Always respect the user flag. Otherwise don't reset on mutation
2033
+ // submission navigations unless they redirect
2034
+ let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && ((_location$state2 = location.state) == null ? void 0 : _location$state2._isRedirect) !== true;
2035
+ if (inFlightDataRoutes) {
2036
+ dataRoutes = inFlightDataRoutes;
2037
+ inFlightDataRoutes = undefined;
2038
+ }
2039
+ if (isUninterruptedRevalidation) ; else if (pendingAction === Action.Pop) ; else if (pendingAction === Action.Push) {
2040
+ init.history.push(location, location.state);
2041
+ } else if (pendingAction === Action.Replace) {
2042
+ init.history.replace(location, location.state);
2043
+ }
2044
+ let viewTransitionOpts;
2045
+
2046
+ // On POP, enable transitions if they were enabled on the original navigation
2047
+ if (pendingAction === Action.Pop) {
2048
+ // Forward takes precedence so they behave like the original navigation
2049
+ let priorPaths = appliedViewTransitions.get(state.location.pathname);
2050
+ if (priorPaths && priorPaths.has(location.pathname)) {
2051
+ viewTransitionOpts = {
2052
+ currentLocation: state.location,
2053
+ nextLocation: location
2054
+ };
2055
+ } else if (appliedViewTransitions.has(location.pathname)) {
2056
+ // If we don't have a previous forward nav, assume we're popping back to
2057
+ // the new location and enable if that location previously enabled
2058
+ viewTransitionOpts = {
2059
+ currentLocation: location,
2060
+ nextLocation: state.location
2061
+ };
2062
+ }
2063
+ } else if (pendingViewTransitionEnabled) {
2064
+ // Store the applied transition on PUSH/REPLACE
2065
+ let toPaths = appliedViewTransitions.get(state.location.pathname);
2066
+ if (toPaths) {
2067
+ toPaths.add(location.pathname);
2068
+ } else {
2069
+ toPaths = new Set([location.pathname]);
2070
+ appliedViewTransitions.set(state.location.pathname, toPaths);
2071
+ }
2072
+ viewTransitionOpts = {
2073
+ currentLocation: state.location,
2074
+ nextLocation: location
2075
+ };
2076
+ }
2077
+ updateState(_extends({}, newState, {
2078
+ // matches, errors, fetchers go through as-is
2079
+ actionData,
2080
+ loaderData,
2081
+ historyAction: pendingAction,
2082
+ location,
2083
+ initialized: true,
2084
+ navigation: IDLE_NAVIGATION,
2085
+ revalidation: "idle",
2086
+ restoreScrollPosition: getSavedScrollPosition(location, newState.matches || state.matches),
2087
+ preventScrollReset,
2088
+ blockers
2089
+ }), {
2090
+ viewTransitionOpts,
2091
+ flushSync: flushSync === true
2092
+ });
2093
+
2094
+ // Reset stateful navigation vars
2095
+ pendingAction = Action.Pop;
2096
+ pendingPreventScrollReset = false;
2097
+ pendingViewTransitionEnabled = false;
2098
+ isUninterruptedRevalidation = false;
2099
+ isRevalidationRequired = false;
2100
+ cancelledDeferredRoutes = [];
2101
+ cancelledFetcherLoads = [];
2102
+ }
2103
+
2104
+ // Trigger a navigation event, which can either be a numerical POP or a PUSH
2105
+ // replace with an optional submission
2106
+ async function navigate(to, opts) {
2107
+ if (typeof to === "number") {
2108
+ init.history.go(to);
2109
+ return;
2110
+ }
2111
+ let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, to, future.v7_relativeSplatPath, opts == null ? void 0 : opts.fromRouteId, opts == null ? void 0 : opts.relative);
2112
+ let {
2113
+ path,
2114
+ submission,
2115
+ error
2116
+ } = normalizeNavigateOptions(future.v7_normalizeFormMethod, false, normalizedPath, opts);
2117
+ let currentLocation = state.location;
2118
+ let nextLocation = createLocation(state.location, path, opts && opts.state);
2119
+
2120
+ // When using navigate as a PUSH/REPLACE we aren't reading an already-encoded
2121
+ // URL from window.location, so we need to encode it here so the behavior
2122
+ // remains the same as POP and non-data-router usages. new URL() does all
2123
+ // the same encoding we'd get from a history.pushState/window.location read
2124
+ // without having to touch history
2125
+ nextLocation = _extends({}, nextLocation, init.history.encodeLocation(nextLocation));
2126
+ let userReplace = opts && opts.replace != null ? opts.replace : undefined;
2127
+ let historyAction = Action.Push;
2128
+ if (userReplace === true) {
2129
+ historyAction = Action.Replace;
2130
+ } else if (userReplace === false) ; else if (submission != null && isMutationMethod(submission.formMethod) && submission.formAction === state.location.pathname + state.location.search) {
2131
+ // By default on submissions to the current location we REPLACE so that
2132
+ // users don't have to double-click the back button to get to the prior
2133
+ // location. If the user redirects to a different location from the
2134
+ // action/loader this will be ignored and the redirect will be a PUSH
2135
+ historyAction = Action.Replace;
2136
+ }
2137
+ let preventScrollReset = opts && "preventScrollReset" in opts ? opts.preventScrollReset === true : undefined;
2138
+ let flushSync = (opts && opts.unstable_flushSync) === true;
2139
+ let blockerKey = shouldBlockNavigation({
2140
+ currentLocation,
2141
+ nextLocation,
2142
+ historyAction
2143
+ });
2144
+ if (blockerKey) {
2145
+ // Put the blocker into a blocked state
2146
+ updateBlocker(blockerKey, {
2147
+ state: "blocked",
2148
+ location: nextLocation,
2149
+ proceed() {
2150
+ updateBlocker(blockerKey, {
2151
+ state: "proceeding",
2152
+ proceed: undefined,
2153
+ reset: undefined,
2154
+ location: nextLocation
2155
+ });
2156
+ // Send the same navigation through
2157
+ navigate(to, opts);
2158
+ },
2159
+ reset() {
2160
+ let blockers = new Map(state.blockers);
2161
+ blockers.set(blockerKey, IDLE_BLOCKER);
2162
+ updateState({
2163
+ blockers
2164
+ });
2165
+ }
2166
+ });
2167
+ return;
2168
+ }
2169
+ return await startNavigation(historyAction, nextLocation, {
2170
+ submission,
2171
+ // Send through the formData serialization error if we have one so we can
2172
+ // render at the right error boundary after we match routes
2173
+ pendingError: error,
2174
+ preventScrollReset,
2175
+ replace: opts && opts.replace,
2176
+ enableViewTransition: opts && opts.unstable_viewTransition,
2177
+ flushSync
2178
+ });
2179
+ }
2180
+
2181
+ // Revalidate all current loaders. If a navigation is in progress or if this
2182
+ // is interrupted by a navigation, allow this to "succeed" by calling all
2183
+ // loaders during the next loader round
2184
+ function revalidate() {
2185
+ interruptActiveLoads();
2186
+ updateState({
2187
+ revalidation: "loading"
2188
+ });
2189
+
2190
+ // If we're currently submitting an action, we don't need to start a new
2191
+ // navigation, we'll just let the follow up loader execution call all loaders
2192
+ if (state.navigation.state === "submitting") {
2193
+ return;
2194
+ }
2195
+
2196
+ // If we're currently in an idle state, start a new navigation for the current
2197
+ // action/location and mark it as uninterrupted, which will skip the history
2198
+ // update in completeNavigation
2199
+ if (state.navigation.state === "idle") {
2200
+ startNavigation(state.historyAction, state.location, {
2201
+ startUninterruptedRevalidation: true
2202
+ });
2203
+ return;
2204
+ }
2205
+
2206
+ // Otherwise, if we're currently in a loading state, just start a new
2207
+ // navigation to the navigation.location but do not trigger an uninterrupted
2208
+ // revalidation so that history correctly updates once the navigation completes
2209
+ startNavigation(pendingAction || state.historyAction, state.navigation.location, {
2210
+ overrideNavigation: state.navigation
2211
+ });
2212
+ }
2213
+
2214
+ // Start a navigation to the given action/location. Can optionally provide a
2215
+ // overrideNavigation which will override the normalLoad in the case of a redirect
2216
+ // navigation
2217
+ async function startNavigation(historyAction, location, opts) {
2218
+ // Abort any in-progress navigations and start a new one. Unset any ongoing
2219
+ // uninterrupted revalidations unless told otherwise, since we want this
2220
+ // new navigation to update history normally
2221
+ pendingNavigationController && pendingNavigationController.abort();
2222
+ pendingNavigationController = null;
2223
+ pendingAction = historyAction;
2224
+ isUninterruptedRevalidation = (opts && opts.startUninterruptedRevalidation) === true;
2225
+
2226
+ // Save the current scroll position every time we start a new navigation,
2227
+ // and track whether we should reset scroll on completion
2228
+ saveScrollPosition(state.location, state.matches);
2229
+ pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;
2230
+ pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true;
2231
+ let routesToUse = inFlightDataRoutes || dataRoutes;
2232
+ let loadingNavigation = opts && opts.overrideNavigation;
2233
+ let matches = matchRoutes(routesToUse, location, basename);
2234
+ let flushSync = (opts && opts.flushSync) === true;
2235
+
2236
+ // Short circuit with a 404 on the root error boundary if we match nothing
2237
+ if (!matches) {
2238
+ let error = getInternalRouterError(404, {
2239
+ pathname: location.pathname
2240
+ });
2241
+ let {
2242
+ matches: notFoundMatches,
2243
+ route
2244
+ } = getShortCircuitMatches(routesToUse);
2245
+ // Cancel all pending deferred on 404s since we don't keep any routes
2246
+ cancelActiveDeferreds();
2247
+ completeNavigation(location, {
2248
+ matches: notFoundMatches,
2249
+ loaderData: {},
2250
+ errors: {
2251
+ [route.id]: error
2252
+ }
2253
+ }, {
2254
+ flushSync
2255
+ });
2256
+ return;
2257
+ }
2258
+
2259
+ // Short circuit if it's only a hash change and not a revalidation or
2260
+ // mutation submission.
2261
+ //
2262
+ // Ignore on initial page loads because since the initial load will always
2263
+ // be "same hash". For example, on /page#hash and submit a <Form method="post">
2264
+ // which will default to a navigation to /page
2265
+ if (state.initialized && !isRevalidationRequired && isHashChangeOnly(state.location, location) && !(opts && opts.submission && isMutationMethod(opts.submission.formMethod))) {
2266
+ completeNavigation(location, {
2267
+ matches
2268
+ }, {
2269
+ flushSync
2270
+ });
2271
+ return;
2272
+ }
2273
+
2274
+ // Create a controller/Request for this navigation
2275
+ pendingNavigationController = new AbortController();
2276
+ let request = createClientSideRequest(init.history, location, pendingNavigationController.signal, opts && opts.submission);
2277
+ let pendingActionData;
2278
+ let pendingError;
2279
+ if (opts && opts.pendingError) {
2280
+ // If we have a pendingError, it means the user attempted a GET submission
2281
+ // with binary FormData so assign here and skip to handleLoaders. That
2282
+ // way we handle calling loaders above the boundary etc. It's not really
2283
+ // different from an actionError in that sense.
2284
+ pendingError = {
2285
+ [findNearestBoundary(matches).route.id]: opts.pendingError
2286
+ };
2287
+ } else if (opts && opts.submission && isMutationMethod(opts.submission.formMethod)) {
2288
+ // Call action if we received an action submission
2289
+ let actionOutput = await handleAction(request, location, opts.submission, matches, {
2290
+ replace: opts.replace,
2291
+ flushSync
2292
+ });
2293
+ if (actionOutput.shortCircuited) {
2294
+ return;
2295
+ }
2296
+ pendingActionData = actionOutput.pendingActionData;
2297
+ pendingError = actionOutput.pendingActionError;
2298
+ loadingNavigation = getLoadingNavigation(location, opts.submission);
2299
+ flushSync = false;
2300
+
2301
+ // Create a GET request for the loaders
2302
+ request = new Request(request.url, {
2303
+ signal: request.signal
2304
+ });
2305
+ }
2306
+
2307
+ // Call loaders
2308
+ let {
2309
+ shortCircuited,
2310
+ loaderData,
2311
+ errors
2312
+ } = await handleLoaders(request, location, matches, loadingNavigation, opts && opts.submission, opts && opts.fetcherSubmission, opts && opts.replace, opts && opts.initialHydration === true, flushSync, pendingActionData, pendingError);
2313
+ if (shortCircuited) {
2314
+ return;
2315
+ }
2316
+
2317
+ // Clean up now that the action/loaders have completed. Don't clean up if
2318
+ // we short circuited because pendingNavigationController will have already
2319
+ // been assigned to a new controller for the next navigation
2320
+ pendingNavigationController = null;
2321
+ completeNavigation(location, _extends({
2322
+ matches
2323
+ }, pendingActionData ? {
2324
+ actionData: pendingActionData
2325
+ } : {}, {
2326
+ loaderData,
2327
+ errors
2328
+ }));
2329
+ }
2330
+
2331
+ // Call the action matched by the leaf route for this navigation and handle
2332
+ // redirects/errors
2333
+ async function handleAction(request, location, submission, matches, opts) {
2334
+ if (opts === void 0) {
2335
+ opts = {};
2336
+ }
2337
+ interruptActiveLoads();
2338
+
2339
+ // Put us in a submitting state
2340
+ let navigation = getSubmittingNavigation(location, submission);
2341
+ updateState({
2342
+ navigation
2343
+ }, {
2344
+ flushSync: opts.flushSync === true
2345
+ });
2346
+
2347
+ // Call our action and get the result
2348
+ let result;
2349
+ let actionMatch = getTargetMatch(matches, location);
2350
+ if (!actionMatch.route.action && !actionMatch.route.lazy) {
2351
+ result = {
2352
+ type: ResultType.error,
2353
+ error: getInternalRouterError(405, {
2354
+ method: request.method,
2355
+ pathname: location.pathname,
2356
+ routeId: actionMatch.route.id
2357
+ })
2358
+ };
2359
+ } else {
2360
+ result = await callLoaderOrAction("action", request, actionMatch, matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath);
2361
+ if (request.signal.aborted) {
2362
+ return {
2363
+ shortCircuited: true
2364
+ };
2365
+ }
2366
+ }
2367
+ if (isRedirectResult(result)) {
2368
+ let replace;
2369
+ if (opts && opts.replace != null) {
2370
+ replace = opts.replace;
2371
+ } else {
2372
+ // If the user didn't explicity indicate replace behavior, replace if
2373
+ // we redirected to the exact same location we're currently at to avoid
2374
+ // double back-buttons
2375
+ replace = result.location === state.location.pathname + state.location.search;
2376
+ }
2377
+ await startRedirectNavigation(state, result, {
2378
+ submission,
2379
+ replace
2380
+ });
2381
+ return {
2382
+ shortCircuited: true
2383
+ };
2384
+ }
2385
+ if (isErrorResult(result)) {
2386
+ // Store off the pending error - we use it to determine which loaders
2387
+ // to call and will commit it when we complete the navigation
2388
+ let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);
2389
+
2390
+ // By default, all submissions are REPLACE navigations, but if the
2391
+ // action threw an error that'll be rendered in an errorElement, we fall
2392
+ // back to PUSH so that the user can use the back button to get back to
2393
+ // the pre-submission form location to try again
2394
+ if ((opts && opts.replace) !== true) {
2395
+ pendingAction = Action.Push;
2396
+ }
2397
+ return {
2398
+ // Send back an empty object we can use to clear out any prior actionData
2399
+ pendingActionData: {},
2400
+ pendingActionError: {
2401
+ [boundaryMatch.route.id]: result.error
2402
+ }
2403
+ };
2404
+ }
2405
+ if (isDeferredResult(result)) {
2406
+ throw getInternalRouterError(400, {
2407
+ type: "defer-action"
2408
+ });
2409
+ }
2410
+ return {
2411
+ pendingActionData: {
2412
+ [actionMatch.route.id]: result.data
2413
+ }
2414
+ };
2415
+ }
2416
+
2417
+ // Call all applicable loaders for the given matches, handling redirects,
2418
+ // errors, etc.
2419
+ async function handleLoaders(request, location, matches, overrideNavigation, submission, fetcherSubmission, replace, initialHydration, flushSync, pendingActionData, pendingError) {
2420
+ // Figure out the right navigation we want to use for data loading
2421
+ let loadingNavigation = overrideNavigation || getLoadingNavigation(location, submission);
2422
+
2423
+ // If this was a redirect from an action we don't have a "submission" but
2424
+ // we have it on the loading navigation so use that if available
2425
+ let activeSubmission = submission || fetcherSubmission || getSubmissionFromNavigation(loadingNavigation);
2426
+ let routesToUse = inFlightDataRoutes || dataRoutes;
2427
+ let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, activeSubmission, location, future.v7_partialHydration && initialHydration === true, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionData, pendingError);
2428
+
2429
+ // Cancel pending deferreds for no-longer-matched routes or routes we're
2430
+ // about to reload. Note that if this is an action reload we would have
2431
+ // already cancelled all pending deferreds so this would be a no-op
2432
+ cancelActiveDeferreds(routeId => !(matches && matches.some(m => m.route.id === routeId)) || matchesToLoad && matchesToLoad.some(m => m.route.id === routeId));
2433
+ pendingNavigationLoadId = ++incrementingLoadId;
2434
+
2435
+ // Short circuit if we have no loaders to run
2436
+ if (matchesToLoad.length === 0 && revalidatingFetchers.length === 0) {
2437
+ let updatedFetchers = markFetchRedirectsDone();
2438
+ completeNavigation(location, _extends({
2439
+ matches,
2440
+ loaderData: {},
2441
+ // Commit pending error if we're short circuiting
2442
+ errors: pendingError || null
2443
+ }, pendingActionData ? {
2444
+ actionData: pendingActionData
2445
+ } : {}, updatedFetchers ? {
2446
+ fetchers: new Map(state.fetchers)
2447
+ } : {}), {
2448
+ flushSync
2449
+ });
2450
+ return {
2451
+ shortCircuited: true
2452
+ };
2453
+ }
2454
+
2455
+ // If this is an uninterrupted revalidation, we remain in our current idle
2456
+ // state. If not, we need to switch to our loading state and load data,
2457
+ // preserving any new action data or existing action data (in the case of
2458
+ // a revalidation interrupting an actionReload)
2459
+ // If we have partialHydration enabled, then don't update the state for the
2460
+ // initial data load since it's not a "navigation"
2461
+ if (!isUninterruptedRevalidation && (!future.v7_partialHydration || !initialHydration)) {
2462
+ revalidatingFetchers.forEach(rf => {
2463
+ let fetcher = state.fetchers.get(rf.key);
2464
+ let revalidatingFetcher = getLoadingFetcher(undefined, fetcher ? fetcher.data : undefined);
2465
+ state.fetchers.set(rf.key, revalidatingFetcher);
2466
+ });
2467
+ let actionData = pendingActionData || state.actionData;
2468
+ updateState(_extends({
2469
+ navigation: loadingNavigation
2470
+ }, actionData ? Object.keys(actionData).length === 0 ? {
2471
+ actionData: null
2472
+ } : {
2473
+ actionData
2474
+ } : {}, revalidatingFetchers.length > 0 ? {
2475
+ fetchers: new Map(state.fetchers)
2476
+ } : {}), {
2477
+ flushSync
2478
+ });
2479
+ }
2480
+ revalidatingFetchers.forEach(rf => {
2481
+ if (fetchControllers.has(rf.key)) {
2482
+ abortFetcher(rf.key);
2483
+ }
2484
+ if (rf.controller) {
2485
+ // Fetchers use an independent AbortController so that aborting a fetcher
2486
+ // (via deleteFetcher) does not abort the triggering navigation that
2487
+ // triggered the revalidation
2488
+ fetchControllers.set(rf.key, rf.controller);
2489
+ }
2490
+ });
2491
+
2492
+ // Proxy navigation abort through to revalidation fetchers
2493
+ let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(f => abortFetcher(f.key));
2494
+ if (pendingNavigationController) {
2495
+ pendingNavigationController.signal.addEventListener("abort", abortPendingFetchRevalidations);
2496
+ }
2497
+ let {
2498
+ results,
2499
+ loaderResults,
2500
+ fetcherResults
2501
+ } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, request);
2502
+ if (request.signal.aborted) {
2503
+ return {
2504
+ shortCircuited: true
2505
+ };
2506
+ }
2507
+
2508
+ // Clean up _after_ loaders have completed. Don't clean up if we short
2509
+ // circuited because fetchControllers would have been aborted and
2510
+ // reassigned to new controllers for the next navigation
2511
+ if (pendingNavigationController) {
2512
+ pendingNavigationController.signal.removeEventListener("abort", abortPendingFetchRevalidations);
2513
+ }
2514
+ revalidatingFetchers.forEach(rf => fetchControllers.delete(rf.key));
2515
+
2516
+ // If any loaders returned a redirect Response, start a new REPLACE navigation
2517
+ let redirect = findRedirect(results);
2518
+ if (redirect) {
2519
+ if (redirect.idx >= matchesToLoad.length) {
2520
+ // If this redirect came from a fetcher make sure we mark it in
2521
+ // fetchRedirectIds so it doesn't get revalidated on the next set of
2522
+ // loader executions
2523
+ let fetcherKey = revalidatingFetchers[redirect.idx - matchesToLoad.length].key;
2524
+ fetchRedirectIds.add(fetcherKey);
2525
+ }
2526
+ await startRedirectNavigation(state, redirect.result, {
2527
+ replace
2528
+ });
2529
+ return {
2530
+ shortCircuited: true
2531
+ };
2532
+ }
2533
+
2534
+ // Process and commit output from loaders
2535
+ let {
2536
+ loaderData,
2537
+ errors
2538
+ } = processLoaderData(state, matches, matchesToLoad, loaderResults, pendingError, revalidatingFetchers, fetcherResults, activeDeferreds);
2539
+
2540
+ // Wire up subscribers to update loaderData as promises settle
2541
+ activeDeferreds.forEach((deferredData, routeId) => {
2542
+ deferredData.subscribe(aborted => {
2543
+ // Note: No need to updateState here since the TrackedPromise on
2544
+ // loaderData is stable across resolve/reject
2545
+ // Remove this instance if we were aborted or if promises have settled
2546
+ if (aborted || deferredData.done) {
2547
+ activeDeferreds.delete(routeId);
2548
+ }
2549
+ });
2550
+ });
2551
+
2552
+ // During partial hydration, preserve SSR errors for routes that don't re-run
2553
+ if (future.v7_partialHydration && initialHydration && state.errors) {
2554
+ Object.entries(state.errors).filter(_ref2 => {
2555
+ let [id] = _ref2;
2556
+ return !matchesToLoad.some(m => m.route.id === id);
2557
+ }).forEach(_ref3 => {
2558
+ let [routeId, error] = _ref3;
2559
+ errors = Object.assign(errors || {}, {
2560
+ [routeId]: error
2561
+ });
2562
+ });
2563
+ }
2564
+ let updatedFetchers = markFetchRedirectsDone();
2565
+ let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId);
2566
+ let shouldUpdateFetchers = updatedFetchers || didAbortFetchLoads || revalidatingFetchers.length > 0;
2567
+ return _extends({
2568
+ loaderData,
2569
+ errors
2570
+ }, shouldUpdateFetchers ? {
2571
+ fetchers: new Map(state.fetchers)
2572
+ } : {});
2573
+ }
2574
+
2575
+ // Trigger a fetcher load/submit for the given fetcher key
2576
+ function fetch(key, routeId, href, opts) {
2577
+ if (isServer) {
2578
+ throw new Error("router.fetch() was called during the server render, but it shouldn't be. " + "You are likely calling a useFetcher() method in the body of your component. " + "Try moving it to a useEffect or a callback.");
2579
+ }
2580
+ if (fetchControllers.has(key)) abortFetcher(key);
2581
+ let flushSync = (opts && opts.unstable_flushSync) === true;
2582
+ let routesToUse = inFlightDataRoutes || dataRoutes;
2583
+ let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, href, future.v7_relativeSplatPath, routeId, opts == null ? void 0 : opts.relative);
2584
+ let matches = matchRoutes(routesToUse, normalizedPath, basename);
2585
+ if (!matches) {
2586
+ setFetcherError(key, routeId, getInternalRouterError(404, {
2587
+ pathname: normalizedPath
2588
+ }), {
2589
+ flushSync
2590
+ });
2591
+ return;
2592
+ }
2593
+ let {
2594
+ path,
2595
+ submission,
2596
+ error
2597
+ } = normalizeNavigateOptions(future.v7_normalizeFormMethod, true, normalizedPath, opts);
2598
+ if (error) {
2599
+ setFetcherError(key, routeId, error, {
2600
+ flushSync
2601
+ });
2602
+ return;
2603
+ }
2604
+ let match = getTargetMatch(matches, path);
2605
+ pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;
2606
+ if (submission && isMutationMethod(submission.formMethod)) {
2607
+ handleFetcherAction(key, routeId, path, match, matches, flushSync, submission);
2608
+ return;
2609
+ }
2610
+
2611
+ // Store off the match so we can call it's shouldRevalidate on subsequent
2612
+ // revalidations
2613
+ fetchLoadMatches.set(key, {
2614
+ routeId,
2615
+ path
2616
+ });
2617
+ handleFetcherLoader(key, routeId, path, match, matches, flushSync, submission);
2618
+ }
2619
+
2620
+ // Call the action for the matched fetcher.submit(), and then handle redirects,
2621
+ // errors, and revalidation
2622
+ async function handleFetcherAction(key, routeId, path, match, requestMatches, flushSync, submission) {
2623
+ interruptActiveLoads();
2624
+ fetchLoadMatches.delete(key);
2625
+ if (!match.route.action && !match.route.lazy) {
2626
+ let error = getInternalRouterError(405, {
2627
+ method: submission.formMethod,
2628
+ pathname: path,
2629
+ routeId: routeId
2630
+ });
2631
+ setFetcherError(key, routeId, error, {
2632
+ flushSync
2633
+ });
2634
+ return;
2635
+ }
2636
+
2637
+ // Put this fetcher into it's submitting state
2638
+ let existingFetcher = state.fetchers.get(key);
2639
+ updateFetcherState(key, getSubmittingFetcher(submission, existingFetcher), {
2640
+ flushSync
2641
+ });
2642
+
2643
+ // Call the action for the fetcher
2644
+ let abortController = new AbortController();
2645
+ let fetchRequest = createClientSideRequest(init.history, path, abortController.signal, submission);
2646
+ fetchControllers.set(key, abortController);
2647
+ let originatingLoadId = incrementingLoadId;
2648
+ let actionResult = await callLoaderOrAction("action", fetchRequest, match, requestMatches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath);
2649
+ if (fetchRequest.signal.aborted) {
2650
+ // We can delete this so long as we weren't aborted by our own fetcher
2651
+ // re-submit which would have put _new_ controller is in fetchControllers
2652
+ if (fetchControllers.get(key) === abortController) {
2653
+ fetchControllers.delete(key);
2654
+ }
2655
+ return;
2656
+ }
2657
+
2658
+ // When using v7_fetcherPersist, we don't want errors bubbling up to the UI
2659
+ // or redirects processed for unmounted fetchers so we just revert them to
2660
+ // idle
2661
+ if (future.v7_fetcherPersist && deletedFetchers.has(key)) {
2662
+ if (isRedirectResult(actionResult) || isErrorResult(actionResult)) {
2663
+ updateFetcherState(key, getDoneFetcher(undefined));
2664
+ return;
2665
+ }
2666
+ // Let SuccessResult's fall through for revalidation
2667
+ } else {
2668
+ if (isRedirectResult(actionResult)) {
2669
+ fetchControllers.delete(key);
2670
+ if (pendingNavigationLoadId > originatingLoadId) {
2671
+ // A new navigation was kicked off after our action started, so that
2672
+ // should take precedence over this redirect navigation. We already
2673
+ // set isRevalidationRequired so all loaders for the new route should
2674
+ // fire unless opted out via shouldRevalidate
2675
+ updateFetcherState(key, getDoneFetcher(undefined));
2676
+ return;
2677
+ } else {
2678
+ fetchRedirectIds.add(key);
2679
+ updateFetcherState(key, getLoadingFetcher(submission));
2680
+ return startRedirectNavigation(state, actionResult, {
2681
+ fetcherSubmission: submission
2682
+ });
2683
+ }
2684
+ }
2685
+
2686
+ // Process any non-redirect errors thrown
2687
+ if (isErrorResult(actionResult)) {
2688
+ setFetcherError(key, routeId, actionResult.error);
2689
+ return;
2690
+ }
2691
+ }
2692
+ if (isDeferredResult(actionResult)) {
2693
+ throw getInternalRouterError(400, {
2694
+ type: "defer-action"
2695
+ });
2696
+ }
2697
+
2698
+ // Start the data load for current matches, or the next location if we're
2699
+ // in the middle of a navigation
2700
+ let nextLocation = state.navigation.location || state.location;
2701
+ let revalidationRequest = createClientSideRequest(init.history, nextLocation, abortController.signal);
2702
+ let routesToUse = inFlightDataRoutes || dataRoutes;
2703
+ let matches = state.navigation.state !== "idle" ? matchRoutes(routesToUse, state.navigation.location, basename) : state.matches;
2704
+ invariant(matches, "Didn't find any matches after fetcher action");
2705
+ let loadId = ++incrementingLoadId;
2706
+ fetchReloadIds.set(key, loadId);
2707
+ let loadFetcher = getLoadingFetcher(submission, actionResult.data);
2708
+ state.fetchers.set(key, loadFetcher);
2709
+ let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, submission, nextLocation, false, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, {
2710
+ [match.route.id]: actionResult.data
2711
+ }, undefined // No need to send through errors since we short circuit above
2712
+ );
2713
+
2714
+ // Put all revalidating fetchers into the loading state, except for the
2715
+ // current fetcher which we want to keep in it's current loading state which
2716
+ // contains it's action submission info + action data
2717
+ revalidatingFetchers.filter(rf => rf.key !== key).forEach(rf => {
2718
+ let staleKey = rf.key;
2719
+ let existingFetcher = state.fetchers.get(staleKey);
2720
+ let revalidatingFetcher = getLoadingFetcher(undefined, existingFetcher ? existingFetcher.data : undefined);
2721
+ state.fetchers.set(staleKey, revalidatingFetcher);
2722
+ if (fetchControllers.has(staleKey)) {
2723
+ abortFetcher(staleKey);
2724
+ }
2725
+ if (rf.controller) {
2726
+ fetchControllers.set(staleKey, rf.controller);
2727
+ }
2728
+ });
2729
+ updateState({
2730
+ fetchers: new Map(state.fetchers)
2731
+ });
2732
+ let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(rf => abortFetcher(rf.key));
2733
+ abortController.signal.addEventListener("abort", abortPendingFetchRevalidations);
2734
+ let {
2735
+ results,
2736
+ loaderResults,
2737
+ fetcherResults
2738
+ } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, revalidationRequest);
2739
+ if (abortController.signal.aborted) {
2740
+ return;
2741
+ }
2742
+ abortController.signal.removeEventListener("abort", abortPendingFetchRevalidations);
2743
+ fetchReloadIds.delete(key);
2744
+ fetchControllers.delete(key);
2745
+ revalidatingFetchers.forEach(r => fetchControllers.delete(r.key));
2746
+ let redirect = findRedirect(results);
2747
+ if (redirect) {
2748
+ if (redirect.idx >= matchesToLoad.length) {
2749
+ // If this redirect came from a fetcher make sure we mark it in
2750
+ // fetchRedirectIds so it doesn't get revalidated on the next set of
2751
+ // loader executions
2752
+ let fetcherKey = revalidatingFetchers[redirect.idx - matchesToLoad.length].key;
2753
+ fetchRedirectIds.add(fetcherKey);
2754
+ }
2755
+ return startRedirectNavigation(state, redirect.result);
2756
+ }
2757
+
2758
+ // Process and commit output from loaders
2759
+ let {
2760
+ loaderData,
2761
+ errors
2762
+ } = processLoaderData(state, state.matches, matchesToLoad, loaderResults, undefined, revalidatingFetchers, fetcherResults, activeDeferreds);
2763
+
2764
+ // Since we let revalidations complete even if the submitting fetcher was
2765
+ // deleted, only put it back to idle if it hasn't been deleted
2766
+ if (state.fetchers.has(key)) {
2767
+ let doneFetcher = getDoneFetcher(actionResult.data);
2768
+ state.fetchers.set(key, doneFetcher);
2769
+ }
2770
+ abortStaleFetchLoads(loadId);
2771
+
2772
+ // If we are currently in a navigation loading state and this fetcher is
2773
+ // more recent than the navigation, we want the newer data so abort the
2774
+ // navigation and complete it with the fetcher data
2775
+ if (state.navigation.state === "loading" && loadId > pendingNavigationLoadId) {
2776
+ invariant(pendingAction, "Expected pending action");
2777
+ pendingNavigationController && pendingNavigationController.abort();
2778
+ completeNavigation(state.navigation.location, {
2779
+ matches,
2780
+ loaderData,
2781
+ errors,
2782
+ fetchers: new Map(state.fetchers)
2783
+ });
2784
+ } else {
2785
+ // otherwise just update with the fetcher data, preserving any existing
2786
+ // loaderData for loaders that did not need to reload. We have to
2787
+ // manually merge here since we aren't going through completeNavigation
2788
+ updateState({
2789
+ errors,
2790
+ loaderData: mergeLoaderData(state.loaderData, loaderData, matches, errors),
2791
+ fetchers: new Map(state.fetchers)
2792
+ });
2793
+ isRevalidationRequired = false;
2794
+ }
2795
+ }
2796
+
2797
+ // Call the matched loader for fetcher.load(), handling redirects, errors, etc.
2798
+ async function handleFetcherLoader(key, routeId, path, match, matches, flushSync, submission) {
2799
+ let existingFetcher = state.fetchers.get(key);
2800
+ updateFetcherState(key, getLoadingFetcher(submission, existingFetcher ? existingFetcher.data : undefined), {
2801
+ flushSync
2802
+ });
2803
+
2804
+ // Call the loader for this fetcher route match
2805
+ let abortController = new AbortController();
2806
+ let fetchRequest = createClientSideRequest(init.history, path, abortController.signal);
2807
+ fetchControllers.set(key, abortController);
2808
+ let originatingLoadId = incrementingLoadId;
2809
+ let result = await callLoaderOrAction("loader", fetchRequest, match, matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath);
2810
+
2811
+ // Deferred isn't supported for fetcher loads, await everything and treat it
2812
+ // as a normal load. resolveDeferredData will return undefined if this
2813
+ // fetcher gets aborted, so we just leave result untouched and short circuit
2814
+ // below if that happens
2815
+ if (isDeferredResult(result)) {
2816
+ result = (await resolveDeferredData(result, fetchRequest.signal, true)) || result;
2817
+ }
2818
+
2819
+ // We can delete this so long as we weren't aborted by our our own fetcher
2820
+ // re-load which would have put _new_ controller is in fetchControllers
2821
+ if (fetchControllers.get(key) === abortController) {
2822
+ fetchControllers.delete(key);
2823
+ }
2824
+ if (fetchRequest.signal.aborted) {
2825
+ return;
2826
+ }
2827
+
2828
+ // We don't want errors bubbling up or redirects followed for unmounted
2829
+ // fetchers, so short circuit here if it was removed from the UI
2830
+ if (deletedFetchers.has(key)) {
2831
+ updateFetcherState(key, getDoneFetcher(undefined));
2832
+ return;
2833
+ }
2834
+
2835
+ // If the loader threw a redirect Response, start a new REPLACE navigation
2836
+ if (isRedirectResult(result)) {
2837
+ if (pendingNavigationLoadId > originatingLoadId) {
2838
+ // A new navigation was kicked off after our loader started, so that
2839
+ // should take precedence over this redirect navigation
2840
+ updateFetcherState(key, getDoneFetcher(undefined));
2841
+ return;
2842
+ } else {
2843
+ fetchRedirectIds.add(key);
2844
+ await startRedirectNavigation(state, result);
2845
+ return;
2846
+ }
2847
+ }
2848
+
2849
+ // Process any non-redirect errors thrown
2850
+ if (isErrorResult(result)) {
2851
+ setFetcherError(key, routeId, result.error);
2852
+ return;
2853
+ }
2854
+ invariant(!isDeferredResult(result), "Unhandled fetcher deferred data");
2855
+
2856
+ // Put the fetcher back into an idle state
2857
+ updateFetcherState(key, getDoneFetcher(result.data));
2858
+ }
2859
+
2860
+ /**
2861
+ * Utility function to handle redirects returned from an action or loader.
2862
+ * Normally, a redirect "replaces" the navigation that triggered it. So, for
2863
+ * example:
2864
+ *
2865
+ * - user is on /a
2866
+ * - user clicks a link to /b
2867
+ * - loader for /b redirects to /c
2868
+ *
2869
+ * In a non-JS app the browser would track the in-flight navigation to /b and
2870
+ * then replace it with /c when it encountered the redirect response. In
2871
+ * the end it would only ever update the URL bar with /c.
2872
+ *
2873
+ * In client-side routing using pushState/replaceState, we aim to emulate
2874
+ * this behavior and we also do not update history until the end of the
2875
+ * navigation (including processed redirects). This means that we never
2876
+ * actually touch history until we've processed redirects, so we just use
2877
+ * the history action from the original navigation (PUSH or REPLACE).
2878
+ */
2879
+ async function startRedirectNavigation(state, redirect, _temp2) {
2880
+ let {
2881
+ submission,
2882
+ fetcherSubmission,
2883
+ replace
2884
+ } = _temp2 === void 0 ? {} : _temp2;
2885
+ if (redirect.revalidate) {
2886
+ isRevalidationRequired = true;
2887
+ }
2888
+ let redirectLocation = createLocation(state.location, redirect.location, {
2889
+ _isRedirect: true
2890
+ });
2891
+ invariant(redirectLocation, "Expected a location on the redirect navigation");
2892
+ if (isBrowser) {
2893
+ let isDocumentReload = false;
2894
+ if (redirect.reloadDocument) {
2895
+ // Hard reload if the response contained X-Remix-Reload-Document
2896
+ isDocumentReload = true;
2897
+ } else if (ABSOLUTE_URL_REGEX.test(redirect.location)) {
2898
+ const url = init.history.createURL(redirect.location);
2899
+ isDocumentReload =
2900
+ // Hard reload if it's an absolute URL to a new origin
2901
+ url.origin !== routerWindow.location.origin ||
2902
+ // Hard reload if it's an absolute URL that does not match our basename
2903
+ stripBasename(url.pathname, basename) == null;
2904
+ }
2905
+ if (isDocumentReload) {
2906
+ if (replace) {
2907
+ routerWindow.location.replace(redirect.location);
2908
+ } else {
2909
+ routerWindow.location.assign(redirect.location);
2910
+ }
2911
+ return;
2912
+ }
2913
+ }
2914
+
2915
+ // There's no need to abort on redirects, since we don't detect the
2916
+ // redirect until the action/loaders have settled
2917
+ pendingNavigationController = null;
2918
+ let redirectHistoryAction = replace === true ? Action.Replace : Action.Push;
2919
+
2920
+ // Use the incoming submission if provided, fallback on the active one in
2921
+ // state.navigation
2922
+ let {
2923
+ formMethod,
2924
+ formAction,
2925
+ formEncType
2926
+ } = state.navigation;
2927
+ if (!submission && !fetcherSubmission && formMethod && formAction && formEncType) {
2928
+ submission = getSubmissionFromNavigation(state.navigation);
2929
+ }
2930
+
2931
+ // If this was a 307/308 submission we want to preserve the HTTP method and
2932
+ // re-submit the GET/POST/PUT/PATCH/DELETE as a submission navigation to the
2933
+ // redirected location
2934
+ let activeSubmission = submission || fetcherSubmission;
2935
+ if (redirectPreserveMethodStatusCodes.has(redirect.status) && activeSubmission && isMutationMethod(activeSubmission.formMethod)) {
2936
+ await startNavigation(redirectHistoryAction, redirectLocation, {
2937
+ submission: _extends({}, activeSubmission, {
2938
+ formAction: redirect.location
2939
+ }),
2940
+ // Preserve this flag across redirects
2941
+ preventScrollReset: pendingPreventScrollReset
2942
+ });
2943
+ } else {
2944
+ // If we have a navigation submission, we will preserve it through the
2945
+ // redirect navigation
2946
+ let overrideNavigation = getLoadingNavigation(redirectLocation, submission);
2947
+ await startNavigation(redirectHistoryAction, redirectLocation, {
2948
+ overrideNavigation,
2949
+ // Send fetcher submissions through for shouldRevalidate
2950
+ fetcherSubmission,
2951
+ // Preserve this flag across redirects
2952
+ preventScrollReset: pendingPreventScrollReset
2953
+ });
2954
+ }
2955
+ }
2956
+ async function callLoadersAndMaybeResolveData(currentMatches, matches, matchesToLoad, fetchersToLoad, request) {
2957
+ // Call all navigation loaders and revalidating fetcher loaders in parallel,
2958
+ // then slice off the results into separate arrays so we can handle them
2959
+ // accordingly
2960
+ let results = await Promise.all([...matchesToLoad.map(match => callLoaderOrAction("loader", request, match, matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath)), ...fetchersToLoad.map(f => {
2961
+ if (f.matches && f.match && f.controller) {
2962
+ return callLoaderOrAction("loader", createClientSideRequest(init.history, f.path, f.controller.signal), f.match, f.matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath);
2963
+ } else {
2964
+ let error = {
2965
+ type: ResultType.error,
2966
+ error: getInternalRouterError(404, {
2967
+ pathname: f.path
2968
+ })
2969
+ };
2970
+ return error;
2971
+ }
2972
+ })]);
2973
+ let loaderResults = results.slice(0, matchesToLoad.length);
2974
+ let fetcherResults = results.slice(matchesToLoad.length);
2975
+ await Promise.all([resolveDeferredResults(currentMatches, matchesToLoad, loaderResults, loaderResults.map(() => request.signal), false, state.loaderData), resolveDeferredResults(currentMatches, fetchersToLoad.map(f => f.match), fetcherResults, fetchersToLoad.map(f => f.controller ? f.controller.signal : null), true)]);
2976
+ return {
2977
+ results,
2978
+ loaderResults,
2979
+ fetcherResults
2980
+ };
2981
+ }
2982
+ function interruptActiveLoads() {
2983
+ // Every interruption triggers a revalidation
2984
+ isRevalidationRequired = true;
2985
+
2986
+ // Cancel pending route-level deferreds and mark cancelled routes for
2987
+ // revalidation
2988
+ cancelledDeferredRoutes.push(...cancelActiveDeferreds());
2989
+
2990
+ // Abort in-flight fetcher loads
2991
+ fetchLoadMatches.forEach((_, key) => {
2992
+ if (fetchControllers.has(key)) {
2993
+ cancelledFetcherLoads.push(key);
2994
+ abortFetcher(key);
2995
+ }
2996
+ });
2997
+ }
2998
+ function updateFetcherState(key, fetcher, opts) {
2999
+ if (opts === void 0) {
3000
+ opts = {};
3001
+ }
3002
+ state.fetchers.set(key, fetcher);
3003
+ updateState({
3004
+ fetchers: new Map(state.fetchers)
3005
+ }, {
3006
+ flushSync: (opts && opts.flushSync) === true
3007
+ });
3008
+ }
3009
+ function setFetcherError(key, routeId, error, opts) {
3010
+ if (opts === void 0) {
3011
+ opts = {};
3012
+ }
3013
+ let boundaryMatch = findNearestBoundary(state.matches, routeId);
3014
+ deleteFetcher(key);
3015
+ updateState({
3016
+ errors: {
3017
+ [boundaryMatch.route.id]: error
3018
+ },
3019
+ fetchers: new Map(state.fetchers)
3020
+ }, {
3021
+ flushSync: (opts && opts.flushSync) === true
3022
+ });
3023
+ }
3024
+ function getFetcher(key) {
3025
+ if (future.v7_fetcherPersist) {
3026
+ activeFetchers.set(key, (activeFetchers.get(key) || 0) + 1);
3027
+ // If this fetcher was previously marked for deletion, unmark it since we
3028
+ // have a new instance
3029
+ if (deletedFetchers.has(key)) {
3030
+ deletedFetchers.delete(key);
3031
+ }
3032
+ }
3033
+ return state.fetchers.get(key) || IDLE_FETCHER;
3034
+ }
3035
+ function deleteFetcher(key) {
3036
+ let fetcher = state.fetchers.get(key);
3037
+ // Don't abort the controller if this is a deletion of a fetcher.submit()
3038
+ // in it's loading phase since - we don't want to abort the corresponding
3039
+ // revalidation and want them to complete and land
3040
+ if (fetchControllers.has(key) && !(fetcher && fetcher.state === "loading" && fetchReloadIds.has(key))) {
3041
+ abortFetcher(key);
3042
+ }
3043
+ fetchLoadMatches.delete(key);
3044
+ fetchReloadIds.delete(key);
3045
+ fetchRedirectIds.delete(key);
3046
+ deletedFetchers.delete(key);
3047
+ state.fetchers.delete(key);
3048
+ }
3049
+ function deleteFetcherAndUpdateState(key) {
3050
+ if (future.v7_fetcherPersist) {
3051
+ let count = (activeFetchers.get(key) || 0) - 1;
3052
+ if (count <= 0) {
3053
+ activeFetchers.delete(key);
3054
+ deletedFetchers.add(key);
3055
+ } else {
3056
+ activeFetchers.set(key, count);
3057
+ }
3058
+ } else {
3059
+ deleteFetcher(key);
3060
+ }
3061
+ updateState({
3062
+ fetchers: new Map(state.fetchers)
3063
+ });
3064
+ }
3065
+ function abortFetcher(key) {
3066
+ let controller = fetchControllers.get(key);
3067
+ invariant(controller, "Expected fetch controller: " + key);
3068
+ controller.abort();
3069
+ fetchControllers.delete(key);
3070
+ }
3071
+ function markFetchersDone(keys) {
3072
+ for (let key of keys) {
3073
+ let fetcher = getFetcher(key);
3074
+ let doneFetcher = getDoneFetcher(fetcher.data);
3075
+ state.fetchers.set(key, doneFetcher);
3076
+ }
3077
+ }
3078
+ function markFetchRedirectsDone() {
3079
+ let doneKeys = [];
3080
+ let updatedFetchers = false;
3081
+ for (let key of fetchRedirectIds) {
3082
+ let fetcher = state.fetchers.get(key);
3083
+ invariant(fetcher, "Expected fetcher: " + key);
3084
+ if (fetcher.state === "loading") {
3085
+ fetchRedirectIds.delete(key);
3086
+ doneKeys.push(key);
3087
+ updatedFetchers = true;
3088
+ }
3089
+ }
3090
+ markFetchersDone(doneKeys);
3091
+ return updatedFetchers;
3092
+ }
3093
+ function abortStaleFetchLoads(landedId) {
3094
+ let yeetedKeys = [];
3095
+ for (let [key, id] of fetchReloadIds) {
3096
+ if (id < landedId) {
3097
+ let fetcher = state.fetchers.get(key);
3098
+ invariant(fetcher, "Expected fetcher: " + key);
3099
+ if (fetcher.state === "loading") {
3100
+ abortFetcher(key);
3101
+ fetchReloadIds.delete(key);
3102
+ yeetedKeys.push(key);
3103
+ }
3104
+ }
3105
+ }
3106
+ markFetchersDone(yeetedKeys);
3107
+ return yeetedKeys.length > 0;
3108
+ }
3109
+ function getBlocker(key, fn) {
3110
+ let blocker = state.blockers.get(key) || IDLE_BLOCKER;
3111
+ if (blockerFunctions.get(key) !== fn) {
3112
+ blockerFunctions.set(key, fn);
3113
+ }
3114
+ return blocker;
3115
+ }
3116
+ function deleteBlocker(key) {
3117
+ state.blockers.delete(key);
3118
+ blockerFunctions.delete(key);
3119
+ }
3120
+
3121
+ // Utility function to update blockers, ensuring valid state transitions
3122
+ function updateBlocker(key, newBlocker) {
3123
+ let blocker = state.blockers.get(key) || IDLE_BLOCKER;
3124
+
3125
+ // Poor mans state machine :)
3126
+ // https://mermaid.live/edit#pako:eNqVkc9OwzAMxl8l8nnjAYrEtDIOHEBIgwvKJTReGy3_lDpIqO27k6awMG0XcrLlnz87nwdonESogKXXBuE79rq75XZO3-yHds0RJVuv70YrPlUrCEe2HfrORS3rubqZfuhtpg5C9wk5tZ4VKcRUq88q9Z8RS0-48cE1iHJkL0ugbHuFLus9L6spZy8nX9MP2CNdomVaposqu3fGayT8T8-jJQwhepo_UtpgBQaDEUom04dZhAN1aJBDlUKJBxE1ceB2Smj0Mln-IBW5AFU2dwUiktt_2Qaq2dBfaKdEup85UV7Yd-dKjlnkabl2Pvr0DTkTreM
3127
+ invariant(blocker.state === "unblocked" && newBlocker.state === "blocked" || blocker.state === "blocked" && newBlocker.state === "blocked" || blocker.state === "blocked" && newBlocker.state === "proceeding" || blocker.state === "blocked" && newBlocker.state === "unblocked" || blocker.state === "proceeding" && newBlocker.state === "unblocked", "Invalid blocker state transition: " + blocker.state + " -> " + newBlocker.state);
3128
+ let blockers = new Map(state.blockers);
3129
+ blockers.set(key, newBlocker);
3130
+ updateState({
3131
+ blockers
3132
+ });
3133
+ }
3134
+ function shouldBlockNavigation(_ref4) {
3135
+ let {
3136
+ currentLocation,
3137
+ nextLocation,
3138
+ historyAction
3139
+ } = _ref4;
3140
+ if (blockerFunctions.size === 0) {
3141
+ return;
3142
+ }
3143
+
3144
+ // We ony support a single active blocker at the moment since we don't have
3145
+ // any compelling use cases for multi-blocker yet
3146
+ if (blockerFunctions.size > 1) {
3147
+ warning(false, "A router only supports one blocker at a time");
3148
+ }
3149
+ let entries = Array.from(blockerFunctions.entries());
3150
+ let [blockerKey, blockerFunction] = entries[entries.length - 1];
3151
+ let blocker = state.blockers.get(blockerKey);
3152
+ if (blocker && blocker.state === "proceeding") {
3153
+ // If the blocker is currently proceeding, we don't need to re-check
3154
+ // it and can let this navigation continue
3155
+ return;
3156
+ }
3157
+
3158
+ // At this point, we know we're unblocked/blocked so we need to check the
3159
+ // user-provided blocker function
3160
+ if (blockerFunction({
3161
+ currentLocation,
3162
+ nextLocation,
3163
+ historyAction
3164
+ })) {
3165
+ return blockerKey;
3166
+ }
3167
+ }
3168
+ function cancelActiveDeferreds(predicate) {
3169
+ let cancelledRouteIds = [];
3170
+ activeDeferreds.forEach((dfd, routeId) => {
3171
+ if (!predicate || predicate(routeId)) {
3172
+ // Cancel the deferred - but do not remove from activeDeferreds here -
3173
+ // we rely on the subscribers to do that so our tests can assert proper
3174
+ // cleanup via _internalActiveDeferreds
3175
+ dfd.cancel();
3176
+ cancelledRouteIds.push(routeId);
3177
+ activeDeferreds.delete(routeId);
3178
+ }
3179
+ });
3180
+ return cancelledRouteIds;
3181
+ }
3182
+
3183
+ // Opt in to capturing and reporting scroll positions during navigations,
3184
+ // used by the <ScrollRestoration> component
3185
+ function enableScrollRestoration(positions, getPosition, getKey) {
3186
+ savedScrollPositions = positions;
3187
+ getScrollPosition = getPosition;
3188
+ getScrollRestorationKey = getKey || null;
3189
+
3190
+ // Perform initial hydration scroll restoration, since we miss the boat on
3191
+ // the initial updateState() because we've not yet rendered <ScrollRestoration/>
3192
+ // and therefore have no savedScrollPositions available
3193
+ if (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) {
3194
+ initialScrollRestored = true;
3195
+ let y = getSavedScrollPosition(state.location, state.matches);
3196
+ if (y != null) {
3197
+ updateState({
3198
+ restoreScrollPosition: y
3199
+ });
3200
+ }
3201
+ }
3202
+ return () => {
3203
+ savedScrollPositions = null;
3204
+ getScrollPosition = null;
3205
+ getScrollRestorationKey = null;
3206
+ };
3207
+ }
3208
+ function getScrollKey(location, matches) {
3209
+ if (getScrollRestorationKey) {
3210
+ let key = getScrollRestorationKey(location, matches.map(m => convertRouteMatchToUiMatch(m, state.loaderData)));
3211
+ return key || location.key;
3212
+ }
3213
+ return location.key;
3214
+ }
3215
+ function saveScrollPosition(location, matches) {
3216
+ if (savedScrollPositions && getScrollPosition) {
3217
+ let key = getScrollKey(location, matches);
3218
+ savedScrollPositions[key] = getScrollPosition();
3219
+ }
3220
+ }
3221
+ function getSavedScrollPosition(location, matches) {
3222
+ if (savedScrollPositions) {
3223
+ let key = getScrollKey(location, matches);
3224
+ let y = savedScrollPositions[key];
3225
+ if (typeof y === "number") {
3226
+ return y;
3227
+ }
3228
+ }
3229
+ return null;
3230
+ }
3231
+ function _internalSetRoutes(newRoutes) {
3232
+ manifest = {};
3233
+ inFlightDataRoutes = convertRoutesToDataRoutes(newRoutes, mapRouteProperties, undefined, manifest);
3234
+ }
3235
+ router = {
3236
+ get basename() {
3237
+ return basename;
3238
+ },
3239
+ get future() {
3240
+ return future;
3241
+ },
3242
+ get state() {
3243
+ return state;
3244
+ },
3245
+ get routes() {
3246
+ return dataRoutes;
3247
+ },
3248
+ get window() {
3249
+ return routerWindow;
3250
+ },
3251
+ initialize,
3252
+ subscribe,
3253
+ enableScrollRestoration,
3254
+ navigate,
3255
+ fetch,
3256
+ revalidate,
3257
+ // Passthrough to history-aware createHref used by useHref so we get proper
3258
+ // hash-aware URLs in DOM paths
3259
+ createHref: to => init.history.createHref(to),
3260
+ encodeLocation: to => init.history.encodeLocation(to),
3261
+ getFetcher,
3262
+ deleteFetcher: deleteFetcherAndUpdateState,
3263
+ dispose,
3264
+ getBlocker,
3265
+ deleteBlocker,
3266
+ _internalFetchControllers: fetchControllers,
3267
+ _internalActiveDeferreds: activeDeferreds,
3268
+ // TODO: Remove setRoutes, it's temporary to avoid dealing with
3269
+ // updating the tree while validating the update algorithm.
3270
+ _internalSetRoutes
3271
+ };
3272
+ return router;
3273
+ }
3274
+ //#endregion
3275
+
3276
+ ////////////////////////////////////////////////////////////////////////////////
3277
+ //#region createStaticHandler
3278
+ ////////////////////////////////////////////////////////////////////////////////
3279
+
3280
+ const UNSAFE_DEFERRED_SYMBOL = Symbol("deferred");
3281
+
3282
+ /**
3283
+ * Future flags to toggle new feature behavior
3284
+ */
3285
+
3286
+ function createStaticHandler(routes, opts) {
3287
+ invariant(routes.length > 0, "You must provide a non-empty routes array to createStaticHandler");
3288
+ let manifest = {};
3289
+ let basename = (opts ? opts.basename : null) || "/";
3290
+ let mapRouteProperties;
3291
+ if (opts != null && opts.mapRouteProperties) {
3292
+ mapRouteProperties = opts.mapRouteProperties;
3293
+ } else if (opts != null && opts.detectErrorBoundary) {
3294
+ // If they are still using the deprecated version, wrap it with the new API
3295
+ let detectErrorBoundary = opts.detectErrorBoundary;
3296
+ mapRouteProperties = route => ({
3297
+ hasErrorBoundary: detectErrorBoundary(route)
3298
+ });
3299
+ } else {
3300
+ mapRouteProperties = defaultMapRouteProperties;
3301
+ }
3302
+ // Config driven behavior flags
3303
+ let future = _extends({
3304
+ v7_relativeSplatPath: false,
3305
+ v7_throwAbortReason: false
3306
+ }, opts ? opts.future : null);
3307
+ let dataRoutes = convertRoutesToDataRoutes(routes, mapRouteProperties, undefined, manifest);
3308
+
3309
+ /**
3310
+ * The query() method is intended for document requests, in which we want to
3311
+ * call an optional action and potentially multiple loaders for all nested
3312
+ * routes. It returns a StaticHandlerContext object, which is very similar
3313
+ * to the router state (location, loaderData, actionData, errors, etc.) and
3314
+ * also adds SSR-specific information such as the statusCode and headers
3315
+ * from action/loaders Responses.
3316
+ *
3317
+ * It _should_ never throw and should report all errors through the
3318
+ * returned context.errors object, properly associating errors to their error
3319
+ * boundary. Additionally, it tracks _deepestRenderedBoundaryId which can be
3320
+ * used to emulate React error boundaries during SSr by performing a second
3321
+ * pass only down to the boundaryId.
3322
+ *
3323
+ * The one exception where we do not return a StaticHandlerContext is when a
3324
+ * redirect response is returned or thrown from any action/loader. We
3325
+ * propagate that out and return the raw Response so the HTTP server can
3326
+ * return it directly.
3327
+ */
3328
+ async function query(request, _temp3) {
3329
+ let {
3330
+ requestContext
3331
+ } = _temp3 === void 0 ? {} : _temp3;
3332
+ let url = new URL(request.url);
3333
+ let method = request.method;
3334
+ let location = createLocation("", createPath(url), null, "default");
3335
+ let matches = matchRoutes(dataRoutes, location, basename);
3336
+
3337
+ // SSR supports HEAD requests while SPA doesn't
3338
+ if (!isValidMethod(method) && method !== "HEAD") {
3339
+ let error = getInternalRouterError(405, {
3340
+ method
3341
+ });
3342
+ let {
3343
+ matches: methodNotAllowedMatches,
3344
+ route
3345
+ } = getShortCircuitMatches(dataRoutes);
3346
+ return {
3347
+ basename,
3348
+ location,
3349
+ matches: methodNotAllowedMatches,
3350
+ loaderData: {},
3351
+ actionData: null,
3352
+ errors: {
3353
+ [route.id]: error
3354
+ },
3355
+ statusCode: error.status,
3356
+ loaderHeaders: {},
3357
+ actionHeaders: {},
3358
+ activeDeferreds: null
3359
+ };
3360
+ } else if (!matches) {
3361
+ let error = getInternalRouterError(404, {
3362
+ pathname: location.pathname
3363
+ });
3364
+ let {
3365
+ matches: notFoundMatches,
3366
+ route
3367
+ } = getShortCircuitMatches(dataRoutes);
3368
+ return {
3369
+ basename,
3370
+ location,
3371
+ matches: notFoundMatches,
3372
+ loaderData: {},
3373
+ actionData: null,
3374
+ errors: {
3375
+ [route.id]: error
3376
+ },
3377
+ statusCode: error.status,
3378
+ loaderHeaders: {},
3379
+ actionHeaders: {},
3380
+ activeDeferreds: null
3381
+ };
3382
+ }
3383
+ let result = await queryImpl(request, location, matches, requestContext);
3384
+ if (isResponse(result)) {
3385
+ return result;
3386
+ }
3387
+
3388
+ // When returning StaticHandlerContext, we patch back in the location here
3389
+ // since we need it for React Context. But this helps keep our submit and
3390
+ // loadRouteData operating on a Request instead of a Location
3391
+ return _extends({
3392
+ location,
3393
+ basename
3394
+ }, result);
3395
+ }
3396
+
3397
+ /**
3398
+ * The queryRoute() method is intended for targeted route requests, either
3399
+ * for fetch ?_data requests or resource route requests. In this case, we
3400
+ * are only ever calling a single action or loader, and we are returning the
3401
+ * returned value directly. In most cases, this will be a Response returned
3402
+ * from the action/loader, but it may be a primitive or other value as well -
3403
+ * and in such cases the calling context should handle that accordingly.
3404
+ *
3405
+ * We do respect the throw/return differentiation, so if an action/loader
3406
+ * throws, then this method will throw the value. This is important so we
3407
+ * can do proper boundary identification in Remix where a thrown Response
3408
+ * must go to the Catch Boundary but a returned Response is happy-path.
3409
+ *
3410
+ * One thing to note is that any Router-initiated Errors that make sense
3411
+ * to associate with a status code will be thrown as an ErrorResponse
3412
+ * instance which include the raw Error, such that the calling context can
3413
+ * serialize the error as they see fit while including the proper response
3414
+ * code. Examples here are 404 and 405 errors that occur prior to reaching
3415
+ * any user-defined loaders.
3416
+ */
3417
+ async function queryRoute(request, _temp4) {
3418
+ let {
3419
+ routeId,
3420
+ requestContext
3421
+ } = _temp4 === void 0 ? {} : _temp4;
3422
+ let url = new URL(request.url);
3423
+ let method = request.method;
3424
+ let location = createLocation("", createPath(url), null, "default");
3425
+ let matches = matchRoutes(dataRoutes, location, basename);
3426
+
3427
+ // SSR supports HEAD requests while SPA doesn't
3428
+ if (!isValidMethod(method) && method !== "HEAD" && method !== "OPTIONS") {
3429
+ throw getInternalRouterError(405, {
3430
+ method
3431
+ });
3432
+ } else if (!matches) {
3433
+ throw getInternalRouterError(404, {
3434
+ pathname: location.pathname
3435
+ });
3436
+ }
3437
+ let match = routeId ? matches.find(m => m.route.id === routeId) : getTargetMatch(matches, location);
3438
+ if (routeId && !match) {
3439
+ throw getInternalRouterError(403, {
3440
+ pathname: location.pathname,
3441
+ routeId
3442
+ });
3443
+ } else if (!match) {
3444
+ // This should never hit I don't think?
3445
+ throw getInternalRouterError(404, {
3446
+ pathname: location.pathname
3447
+ });
3448
+ }
3449
+ let result = await queryImpl(request, location, matches, requestContext, match);
3450
+ if (isResponse(result)) {
3451
+ return result;
3452
+ }
3453
+ let error = result.errors ? Object.values(result.errors)[0] : undefined;
3454
+ if (error !== undefined) {
3455
+ // If we got back result.errors, that means the loader/action threw
3456
+ // _something_ that wasn't a Response, but it's not guaranteed/required
3457
+ // to be an `instanceof Error` either, so we have to use throw here to
3458
+ // preserve the "error" state outside of queryImpl.
3459
+ throw error;
3460
+ }
3461
+
3462
+ // Pick off the right state value to return
3463
+ if (result.actionData) {
3464
+ return Object.values(result.actionData)[0];
3465
+ }
3466
+ if (result.loaderData) {
3467
+ var _result$activeDeferre;
3468
+ let data = Object.values(result.loaderData)[0];
3469
+ if ((_result$activeDeferre = result.activeDeferreds) != null && _result$activeDeferre[match.route.id]) {
3470
+ data[UNSAFE_DEFERRED_SYMBOL] = result.activeDeferreds[match.route.id];
3471
+ }
3472
+ return data;
3473
+ }
3474
+ return undefined;
3475
+ }
3476
+ async function queryImpl(request, location, matches, requestContext, routeMatch) {
3477
+ invariant(request.signal, "query()/queryRoute() requests must contain an AbortController signal");
3478
+ try {
3479
+ if (isMutationMethod(request.method.toLowerCase())) {
3480
+ let result = await submit(request, matches, routeMatch || getTargetMatch(matches, location), requestContext, routeMatch != null);
3481
+ return result;
3482
+ }
3483
+ let result = await loadRouteData(request, matches, requestContext, routeMatch);
3484
+ return isResponse(result) ? result : _extends({}, result, {
3485
+ actionData: null,
3486
+ actionHeaders: {}
3487
+ });
3488
+ } catch (e) {
3489
+ // If the user threw/returned a Response in callLoaderOrAction, we throw
3490
+ // it to bail out and then return or throw here based on whether the user
3491
+ // returned or threw
3492
+ if (isQueryRouteResponse(e)) {
3493
+ if (e.type === ResultType.error) {
3494
+ throw e.response;
3495
+ }
3496
+ return e.response;
3497
+ }
3498
+ // Redirects are always returned since they don't propagate to catch
3499
+ // boundaries
3500
+ if (isRedirectResponse(e)) {
3501
+ return e;
3502
+ }
3503
+ throw e;
3504
+ }
3505
+ }
3506
+ async function submit(request, matches, actionMatch, requestContext, isRouteRequest) {
3507
+ let result;
3508
+ if (!actionMatch.route.action && !actionMatch.route.lazy) {
3509
+ let error = getInternalRouterError(405, {
3510
+ method: request.method,
3511
+ pathname: new URL(request.url).pathname,
3512
+ routeId: actionMatch.route.id
3513
+ });
3514
+ if (isRouteRequest) {
3515
+ throw error;
3516
+ }
3517
+ result = {
3518
+ type: ResultType.error,
3519
+ error
3520
+ };
3521
+ } else {
3522
+ result = await callLoaderOrAction("action", request, actionMatch, matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath, {
3523
+ isStaticRequest: true,
3524
+ isRouteRequest,
3525
+ requestContext
3526
+ });
3527
+ if (request.signal.aborted) {
3528
+ throwStaticHandlerAbortedError(request, isRouteRequest, future);
3529
+ }
3530
+ }
3531
+ if (isRedirectResult(result)) {
3532
+ // Uhhhh - this should never happen, we should always throw these from
3533
+ // callLoaderOrAction, but the type narrowing here keeps TS happy and we
3534
+ // can get back on the "throw all redirect responses" train here should
3535
+ // this ever happen :/
3536
+ throw new Response(null, {
3537
+ status: result.status,
3538
+ headers: {
3539
+ Location: result.location
3540
+ }
3541
+ });
3542
+ }
3543
+ if (isDeferredResult(result)) {
3544
+ let error = getInternalRouterError(400, {
3545
+ type: "defer-action"
3546
+ });
3547
+ if (isRouteRequest) {
3548
+ throw error;
3549
+ }
3550
+ result = {
3551
+ type: ResultType.error,
3552
+ error
3553
+ };
3554
+ }
3555
+ if (isRouteRequest) {
3556
+ // Note: This should only be non-Response values if we get here, since
3557
+ // isRouteRequest should throw any Response received in callLoaderOrAction
3558
+ if (isErrorResult(result)) {
3559
+ throw result.error;
3560
+ }
3561
+ return {
3562
+ matches: [actionMatch],
3563
+ loaderData: {},
3564
+ actionData: {
3565
+ [actionMatch.route.id]: result.data
3566
+ },
3567
+ errors: null,
3568
+ // Note: statusCode + headers are unused here since queryRoute will
3569
+ // return the raw Response or value
3570
+ statusCode: 200,
3571
+ loaderHeaders: {},
3572
+ actionHeaders: {},
3573
+ activeDeferreds: null
3574
+ };
3575
+ }
3576
+ if (isErrorResult(result)) {
3577
+ // Store off the pending error - we use it to determine which loaders
3578
+ // to call and will commit it when we complete the navigation
3579
+ let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);
3580
+ let context = await loadRouteData(request, matches, requestContext, undefined, {
3581
+ [boundaryMatch.route.id]: result.error
3582
+ });
3583
+
3584
+ // action status codes take precedence over loader status codes
3585
+ return _extends({}, context, {
3586
+ statusCode: isRouteErrorResponse(result.error) ? result.error.status : 500,
3587
+ actionData: null,
3588
+ actionHeaders: _extends({}, result.headers ? {
3589
+ [actionMatch.route.id]: result.headers
3590
+ } : {})
3591
+ });
3592
+ }
3593
+
3594
+ // Create a GET request for the loaders
3595
+ let loaderRequest = new Request(request.url, {
3596
+ headers: request.headers,
3597
+ redirect: request.redirect,
3598
+ signal: request.signal
3599
+ });
3600
+ let context = await loadRouteData(loaderRequest, matches, requestContext);
3601
+ return _extends({}, context, result.statusCode ? {
3602
+ statusCode: result.statusCode
3603
+ } : {}, {
3604
+ actionData: {
3605
+ [actionMatch.route.id]: result.data
3606
+ },
3607
+ actionHeaders: _extends({}, result.headers ? {
3608
+ [actionMatch.route.id]: result.headers
3609
+ } : {})
3610
+ });
3611
+ }
3612
+ async function loadRouteData(request, matches, requestContext, routeMatch, pendingActionError) {
3613
+ let isRouteRequest = routeMatch != null;
3614
+
3615
+ // Short circuit if we have no loaders to run (queryRoute())
3616
+ if (isRouteRequest && !(routeMatch != null && routeMatch.route.loader) && !(routeMatch != null && routeMatch.route.lazy)) {
3617
+ throw getInternalRouterError(400, {
3618
+ method: request.method,
3619
+ pathname: new URL(request.url).pathname,
3620
+ routeId: routeMatch == null ? void 0 : routeMatch.route.id
3621
+ });
3622
+ }
3623
+ let requestMatches = routeMatch ? [routeMatch] : getLoaderMatchesUntilBoundary(matches, Object.keys(pendingActionError || {})[0]);
3624
+ let matchesToLoad = requestMatches.filter(m => m.route.loader || m.route.lazy);
3625
+
3626
+ // Short circuit if we have no loaders to run (query())
3627
+ if (matchesToLoad.length === 0) {
3628
+ return {
3629
+ matches,
3630
+ // Add a null for all matched routes for proper revalidation on the client
3631
+ loaderData: matches.reduce((acc, m) => Object.assign(acc, {
3632
+ [m.route.id]: null
3633
+ }), {}),
3634
+ errors: pendingActionError || null,
3635
+ statusCode: 200,
3636
+ loaderHeaders: {},
3637
+ activeDeferreds: null
3638
+ };
3639
+ }
3640
+ let results = await Promise.all([...matchesToLoad.map(match => callLoaderOrAction("loader", request, match, matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath, {
3641
+ isStaticRequest: true,
3642
+ isRouteRequest,
3643
+ requestContext
3644
+ }))]);
3645
+ if (request.signal.aborted) {
3646
+ throwStaticHandlerAbortedError(request, isRouteRequest, future);
3647
+ }
3648
+
3649
+ // Process and commit output from loaders
3650
+ let activeDeferreds = new Map();
3651
+ let context = processRouteLoaderData(matches, matchesToLoad, results, pendingActionError, activeDeferreds);
3652
+
3653
+ // Add a null for any non-loader matches for proper revalidation on the client
3654
+ let executedLoaders = new Set(matchesToLoad.map(match => match.route.id));
3655
+ matches.forEach(match => {
3656
+ if (!executedLoaders.has(match.route.id)) {
3657
+ context.loaderData[match.route.id] = null;
3658
+ }
3659
+ });
3660
+ return _extends({}, context, {
3661
+ matches,
3662
+ activeDeferreds: activeDeferreds.size > 0 ? Object.fromEntries(activeDeferreds.entries()) : null
3663
+ });
3664
+ }
3665
+ return {
3666
+ dataRoutes,
3667
+ query,
3668
+ queryRoute
3669
+ };
3670
+ }
3671
+
3672
+ //#endregion
3673
+
3674
+ ////////////////////////////////////////////////////////////////////////////////
3675
+ //#region Helpers
3676
+ ////////////////////////////////////////////////////////////////////////////////
3677
+
3678
+ /**
3679
+ * Given an existing StaticHandlerContext and an error thrown at render time,
3680
+ * provide an updated StaticHandlerContext suitable for a second SSR render
3681
+ */
3682
+ function getStaticContextFromError(routes, context, error) {
3683
+ let newContext = _extends({}, context, {
3684
+ statusCode: isRouteErrorResponse(error) ? error.status : 500,
3685
+ errors: {
3686
+ [context._deepestRenderedBoundaryId || routes[0].id]: error
3687
+ }
3688
+ });
3689
+ return newContext;
3690
+ }
3691
+ function throwStaticHandlerAbortedError(request, isRouteRequest, future) {
3692
+ if (future.v7_throwAbortReason && request.signal.reason !== undefined) {
3693
+ throw request.signal.reason;
3694
+ }
3695
+ let method = isRouteRequest ? "queryRoute" : "query";
3696
+ throw new Error(method + "() call aborted: " + request.method + " " + request.url);
3697
+ }
3698
+ function isSubmissionNavigation(opts) {
3699
+ return opts != null && ("formData" in opts && opts.formData != null || "body" in opts && opts.body !== undefined);
3700
+ }
3701
+ function normalizeTo(location, matches, basename, prependBasename, to, v7_relativeSplatPath, fromRouteId, relative) {
3702
+ let contextualMatches;
3703
+ let activeRouteMatch;
3704
+ if (fromRouteId) {
3705
+ // Grab matches up to the calling route so our route-relative logic is
3706
+ // relative to the correct source route
3707
+ contextualMatches = [];
3708
+ for (let match of matches) {
3709
+ contextualMatches.push(match);
3710
+ if (match.route.id === fromRouteId) {
3711
+ activeRouteMatch = match;
3712
+ break;
3713
+ }
3714
+ }
3715
+ } else {
3716
+ contextualMatches = matches;
3717
+ activeRouteMatch = matches[matches.length - 1];
3718
+ }
3719
+
3720
+ // Resolve the relative path
3721
+ let path = resolveTo(to ? to : ".", getResolveToMatches(contextualMatches, v7_relativeSplatPath), stripBasename(location.pathname, basename) || location.pathname, relative === "path");
3722
+
3723
+ // When `to` is not specified we inherit search/hash from the current
3724
+ // location, unlike when to="." and we just inherit the path.
3725
+ // See https://github.com/remix-run/remix/issues/927
3726
+ if (to == null) {
3727
+ path.search = location.search;
3728
+ path.hash = location.hash;
3729
+ }
3730
+
3731
+ // Add an ?index param for matched index routes if we don't already have one
3732
+ if ((to == null || to === "" || to === ".") && activeRouteMatch && activeRouteMatch.route.index && !hasNakedIndexQuery(path.search)) {
3733
+ path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
3734
+ }
3735
+
3736
+ // If we're operating within a basename, prepend it to the pathname. If
3737
+ // this is a root navigation, then just use the raw basename which allows
3738
+ // the basename to have full control over the presence of a trailing slash
3739
+ // on root actions
3740
+ if (prependBasename && basename !== "/") {
3741
+ path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
3742
+ }
3743
+ return createPath(path);
3744
+ }
3745
+
3746
+ // Normalize navigation options by converting formMethod=GET formData objects to
3747
+ // URLSearchParams so they behave identically to links with query params
3748
+ function normalizeNavigateOptions(normalizeFormMethod, isFetcher, path, opts) {
3749
+ // Return location verbatim on non-submission navigations
3750
+ if (!opts || !isSubmissionNavigation(opts)) {
3751
+ return {
3752
+ path
3753
+ };
3754
+ }
3755
+ if (opts.formMethod && !isValidMethod(opts.formMethod)) {
3756
+ return {
3757
+ path,
3758
+ error: getInternalRouterError(405, {
3759
+ method: opts.formMethod
3760
+ })
3761
+ };
3762
+ }
3763
+ let getInvalidBodyError = () => ({
3764
+ path,
3765
+ error: getInternalRouterError(400, {
3766
+ type: "invalid-body"
3767
+ })
3768
+ });
3769
+
3770
+ // Create a Submission on non-GET navigations
3771
+ let rawFormMethod = opts.formMethod || "get";
3772
+ let formMethod = normalizeFormMethod ? rawFormMethod.toUpperCase() : rawFormMethod.toLowerCase();
3773
+ let formAction = stripHashFromPath(path);
3774
+ if (opts.body !== undefined) {
3775
+ if (opts.formEncType === "text/plain") {
3776
+ // text only support POST/PUT/PATCH/DELETE submissions
3777
+ if (!isMutationMethod(formMethod)) {
3778
+ return getInvalidBodyError();
3779
+ }
3780
+ let text = typeof opts.body === "string" ? opts.body : opts.body instanceof FormData || opts.body instanceof URLSearchParams ?
3781
+ // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data
3782
+ Array.from(opts.body.entries()).reduce((acc, _ref5) => {
3783
+ let [name, value] = _ref5;
3784
+ return "" + acc + name + "=" + value + "\n";
3785
+ }, "") : String(opts.body);
3786
+ return {
3787
+ path,
3788
+ submission: {
3789
+ formMethod,
3790
+ formAction,
3791
+ formEncType: opts.formEncType,
3792
+ formData: undefined,
3793
+ json: undefined,
3794
+ text
3795
+ }
3796
+ };
3797
+ } else if (opts.formEncType === "application/json") {
3798
+ // json only supports POST/PUT/PATCH/DELETE submissions
3799
+ if (!isMutationMethod(formMethod)) {
3800
+ return getInvalidBodyError();
3801
+ }
3802
+ try {
3803
+ let json = typeof opts.body === "string" ? JSON.parse(opts.body) : opts.body;
3804
+ return {
3805
+ path,
3806
+ submission: {
3807
+ formMethod,
3808
+ formAction,
3809
+ formEncType: opts.formEncType,
3810
+ formData: undefined,
3811
+ json,
3812
+ text: undefined
3813
+ }
3814
+ };
3815
+ } catch (e) {
3816
+ return getInvalidBodyError();
3817
+ }
3818
+ }
3819
+ }
3820
+ invariant(typeof FormData === "function", "FormData is not available in this environment");
3821
+ let searchParams;
3822
+ let formData;
3823
+ if (opts.formData) {
3824
+ searchParams = convertFormDataToSearchParams(opts.formData);
3825
+ formData = opts.formData;
3826
+ } else if (opts.body instanceof FormData) {
3827
+ searchParams = convertFormDataToSearchParams(opts.body);
3828
+ formData = opts.body;
3829
+ } else if (opts.body instanceof URLSearchParams) {
3830
+ searchParams = opts.body;
3831
+ formData = convertSearchParamsToFormData(searchParams);
3832
+ } else if (opts.body == null) {
3833
+ searchParams = new URLSearchParams();
3834
+ formData = new FormData();
3835
+ } else {
3836
+ try {
3837
+ searchParams = new URLSearchParams(opts.body);
3838
+ formData = convertSearchParamsToFormData(searchParams);
3839
+ } catch (e) {
3840
+ return getInvalidBodyError();
3841
+ }
3842
+ }
3843
+ let submission = {
3844
+ formMethod,
3845
+ formAction,
3846
+ formEncType: opts && opts.formEncType || "application/x-www-form-urlencoded",
3847
+ formData,
3848
+ json: undefined,
3849
+ text: undefined
3850
+ };
3851
+ if (isMutationMethod(submission.formMethod)) {
3852
+ return {
3853
+ path,
3854
+ submission
3855
+ };
3856
+ }
3857
+
3858
+ // Flatten submission onto URLSearchParams for GET submissions
3859
+ let parsedPath = parsePath(path);
3860
+ // On GET navigation submissions we can drop the ?index param from the
3861
+ // resulting location since all loaders will run. But fetcher GET submissions
3862
+ // only run a single loader so we need to preserve any incoming ?index params
3863
+ if (isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search)) {
3864
+ searchParams.append("index", "");
3865
+ }
3866
+ parsedPath.search = "?" + searchParams;
3867
+ return {
3868
+ path: createPath(parsedPath),
3869
+ submission
3870
+ };
3871
+ }
3872
+
3873
+ // Filter out all routes below any caught error as they aren't going to
3874
+ // render so we don't need to load them
3875
+ function getLoaderMatchesUntilBoundary(matches, boundaryId) {
3876
+ let boundaryMatches = matches;
3877
+ if (boundaryId) {
3878
+ let index = matches.findIndex(m => m.route.id === boundaryId);
3879
+ if (index >= 0) {
3880
+ boundaryMatches = matches.slice(0, index);
3881
+ }
3882
+ }
3883
+ return boundaryMatches;
3884
+ }
3885
+ function getMatchesToLoad(history, state, matches, submission, location, isInitialLoad, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionData, pendingError) {
3886
+ let actionResult = pendingError ? Object.values(pendingError)[0] : pendingActionData ? Object.values(pendingActionData)[0] : undefined;
3887
+ let currentUrl = history.createURL(state.location);
3888
+ let nextUrl = history.createURL(location);
3889
+
3890
+ // Pick navigation matches that are net-new or qualify for revalidation
3891
+ let boundaryId = pendingError ? Object.keys(pendingError)[0] : undefined;
3892
+ let boundaryMatches = getLoaderMatchesUntilBoundary(matches, boundaryId);
3893
+ let navigationMatches = boundaryMatches.filter((match, index) => {
3894
+ let {
3895
+ route
3896
+ } = match;
3897
+ if (route.lazy) {
3898
+ // We haven't loaded this route yet so we don't know if it's got a loader!
3899
+ return true;
3900
+ }
3901
+ if (route.loader == null) {
3902
+ return false;
3903
+ }
3904
+ if (isInitialLoad) {
3905
+ if (route.loader.hydrate) {
3906
+ return true;
3907
+ }
3908
+ return state.loaderData[route.id] === undefined && (
3909
+ // Don't re-run if the loader ran and threw an error
3910
+ !state.errors || state.errors[route.id] === undefined);
3911
+ }
3912
+
3913
+ // Always call the loader on new route instances and pending defer cancellations
3914
+ if (isNewLoader(state.loaderData, state.matches[index], match) || cancelledDeferredRoutes.some(id => id === match.route.id)) {
3915
+ return true;
3916
+ }
3917
+
3918
+ // This is the default implementation for when we revalidate. If the route
3919
+ // provides it's own implementation, then we give them full control but
3920
+ // provide this value so they can leverage it if needed after they check
3921
+ // their own specific use cases
3922
+ let currentRouteMatch = state.matches[index];
3923
+ let nextRouteMatch = match;
3924
+ return shouldRevalidateLoader(match, _extends({
3925
+ currentUrl,
3926
+ currentParams: currentRouteMatch.params,
3927
+ nextUrl,
3928
+ nextParams: nextRouteMatch.params
3929
+ }, submission, {
3930
+ actionResult,
3931
+ defaultShouldRevalidate:
3932
+ // Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate
3933
+ isRevalidationRequired ||
3934
+ // Clicked the same link, resubmitted a GET form
3935
+ currentUrl.pathname + currentUrl.search === nextUrl.pathname + nextUrl.search ||
3936
+ // Search params affect all loaders
3937
+ currentUrl.search !== nextUrl.search || isNewRouteInstance(currentRouteMatch, nextRouteMatch)
3938
+ }));
3939
+ });
3940
+
3941
+ // Pick fetcher.loads that need to be revalidated
3942
+ let revalidatingFetchers = [];
3943
+ fetchLoadMatches.forEach((f, key) => {
3944
+ // Don't revalidate:
3945
+ // - on initial load (shouldn't be any fetchers then anyway)
3946
+ // - if fetcher won't be present in the subsequent render
3947
+ // - no longer matches the URL (v7_fetcherPersist=false)
3948
+ // - was unmounted but persisted due to v7_fetcherPersist=true
3949
+ if (isInitialLoad || !matches.some(m => m.route.id === f.routeId) || deletedFetchers.has(key)) {
3950
+ return;
3951
+ }
3952
+ let fetcherMatches = matchRoutes(routesToUse, f.path, basename);
3953
+
3954
+ // If the fetcher path no longer matches, push it in with null matches so
3955
+ // we can trigger a 404 in callLoadersAndMaybeResolveData. Note this is
3956
+ // currently only a use-case for Remix HMR where the route tree can change
3957
+ // at runtime and remove a route previously loaded via a fetcher
3958
+ if (!fetcherMatches) {
3959
+ revalidatingFetchers.push({
3960
+ key,
3961
+ routeId: f.routeId,
3962
+ path: f.path,
3963
+ matches: null,
3964
+ match: null,
3965
+ controller: null
3966
+ });
3967
+ return;
3968
+ }
3969
+
3970
+ // Revalidating fetchers are decoupled from the route matches since they
3971
+ // load from a static href. They revalidate based on explicit revalidation
3972
+ // (submission, useRevalidator, or X-Remix-Revalidate)
3973
+ let fetcher = state.fetchers.get(key);
3974
+ let fetcherMatch = getTargetMatch(fetcherMatches, f.path);
3975
+ let shouldRevalidate = false;
3976
+ if (fetchRedirectIds.has(key)) {
3977
+ // Never trigger a revalidation of an actively redirecting fetcher
3978
+ shouldRevalidate = false;
3979
+ } else if (cancelledFetcherLoads.includes(key)) {
3980
+ // Always revalidate if the fetcher was cancelled
3981
+ shouldRevalidate = true;
3982
+ } else if (fetcher && fetcher.state !== "idle" && fetcher.data === undefined) {
3983
+ // If the fetcher hasn't ever completed loading yet, then this isn't a
3984
+ // revalidation, it would just be a brand new load if an explicit
3985
+ // revalidation is required
3986
+ shouldRevalidate = isRevalidationRequired;
3987
+ } else {
3988
+ // Otherwise fall back on any user-defined shouldRevalidate, defaulting
3989
+ // to explicit revalidations only
3990
+ shouldRevalidate = shouldRevalidateLoader(fetcherMatch, _extends({
3991
+ currentUrl,
3992
+ currentParams: state.matches[state.matches.length - 1].params,
3993
+ nextUrl,
3994
+ nextParams: matches[matches.length - 1].params
3995
+ }, submission, {
3996
+ actionResult,
3997
+ defaultShouldRevalidate: isRevalidationRequired
3998
+ }));
3999
+ }
4000
+ if (shouldRevalidate) {
4001
+ revalidatingFetchers.push({
4002
+ key,
4003
+ routeId: f.routeId,
4004
+ path: f.path,
4005
+ matches: fetcherMatches,
4006
+ match: fetcherMatch,
4007
+ controller: new AbortController()
4008
+ });
4009
+ }
4010
+ });
4011
+ return [navigationMatches, revalidatingFetchers];
4012
+ }
4013
+ function isNewLoader(currentLoaderData, currentMatch, match) {
4014
+ let isNew =
4015
+ // [a] -> [a, b]
4016
+ !currentMatch ||
4017
+ // [a, b] -> [a, c]
4018
+ match.route.id !== currentMatch.route.id;
4019
+
4020
+ // Handle the case that we don't have data for a re-used route, potentially
4021
+ // from a prior error or from a cancelled pending deferred
4022
+ let isMissingData = currentLoaderData[match.route.id] === undefined;
4023
+
4024
+ // Always load if this is a net-new route or we don't yet have data
4025
+ return isNew || isMissingData;
4026
+ }
4027
+ function isNewRouteInstance(currentMatch, match) {
4028
+ let currentPath = currentMatch.route.path;
4029
+ return (
4030
+ // param change for this match, /users/123 -> /users/456
4031
+ currentMatch.pathname !== match.pathname ||
4032
+ // splat param changed, which is not present in match.path
4033
+ // e.g. /files/images/avatar.jpg -> files/finances.xls
4034
+ currentPath != null && currentPath.endsWith("*") && currentMatch.params["*"] !== match.params["*"]
4035
+ );
4036
+ }
4037
+ function shouldRevalidateLoader(loaderMatch, arg) {
4038
+ if (loaderMatch.route.shouldRevalidate) {
4039
+ let routeChoice = loaderMatch.route.shouldRevalidate(arg);
4040
+ if (typeof routeChoice === "boolean") {
4041
+ return routeChoice;
4042
+ }
4043
+ }
4044
+ return arg.defaultShouldRevalidate;
4045
+ }
4046
+
4047
+ /**
4048
+ * Execute route.lazy() methods to lazily load route modules (loader, action,
4049
+ * shouldRevalidate) and update the routeManifest in place which shares objects
4050
+ * with dataRoutes so those get updated as well.
4051
+ */
4052
+ async function loadLazyRouteModule(route, mapRouteProperties, manifest) {
4053
+ if (!route.lazy) {
4054
+ return;
4055
+ }
4056
+ let lazyRoute = await route.lazy();
4057
+
4058
+ // If the lazy route function was executed and removed by another parallel
4059
+ // call then we can return - first lazy() to finish wins because the return
4060
+ // value of lazy is expected to be static
4061
+ if (!route.lazy) {
4062
+ return;
4063
+ }
4064
+ let routeToUpdate = manifest[route.id];
4065
+ invariant(routeToUpdate, "No route found in manifest");
4066
+
4067
+ // Update the route in place. This should be safe because there's no way
4068
+ // we could yet be sitting on this route as we can't get there without
4069
+ // resolving lazy() first.
4070
+ //
4071
+ // This is different than the HMR "update" use-case where we may actively be
4072
+ // on the route being updated. The main concern boils down to "does this
4073
+ // mutation affect any ongoing navigations or any current state.matches
4074
+ // values?". If not, it should be safe to update in place.
4075
+ let routeUpdates = {};
4076
+ for (let lazyRouteProperty in lazyRoute) {
4077
+ let staticRouteValue = routeToUpdate[lazyRouteProperty];
4078
+ let isPropertyStaticallyDefined = staticRouteValue !== undefined &&
4079
+ // This property isn't static since it should always be updated based
4080
+ // on the route updates
4081
+ lazyRouteProperty !== "hasErrorBoundary";
4082
+ warning(!isPropertyStaticallyDefined, "Route \"" + routeToUpdate.id + "\" has a static property \"" + lazyRouteProperty + "\" " + "defined but its lazy function is also returning a value for this property. " + ("The lazy route property \"" + lazyRouteProperty + "\" will be ignored."));
4083
+ if (!isPropertyStaticallyDefined && !immutableRouteKeys.has(lazyRouteProperty)) {
4084
+ routeUpdates[lazyRouteProperty] = lazyRoute[lazyRouteProperty];
4085
+ }
4086
+ }
4087
+
4088
+ // Mutate the route with the provided updates. Do this first so we pass
4089
+ // the updated version to mapRouteProperties
4090
+ Object.assign(routeToUpdate, routeUpdates);
4091
+
4092
+ // Mutate the `hasErrorBoundary` property on the route based on the route
4093
+ // updates and remove the `lazy` function so we don't resolve the lazy
4094
+ // route again.
4095
+ Object.assign(routeToUpdate, _extends({}, mapRouteProperties(routeToUpdate), {
4096
+ lazy: undefined
4097
+ }));
4098
+ }
4099
+ async function callLoaderOrAction(type, request, match, matches, manifest, mapRouteProperties, basename, v7_relativeSplatPath, opts) {
4100
+ if (opts === void 0) {
4101
+ opts = {};
4102
+ }
4103
+ let resultType;
4104
+ let result;
4105
+ let onReject;
4106
+ let runHandler = handler => {
4107
+ // Setup a promise we can race against so that abort signals short circuit
4108
+ let reject;
4109
+ let abortPromise = new Promise((_, r) => reject = r);
4110
+ onReject = () => reject();
4111
+ request.signal.addEventListener("abort", onReject);
4112
+ return Promise.race([handler({
4113
+ request,
4114
+ params: match.params,
4115
+ context: opts.requestContext
4116
+ }), abortPromise]);
4117
+ };
4118
+ try {
4119
+ let handler = match.route[type];
4120
+ if (match.route.lazy) {
4121
+ if (handler) {
4122
+ // Run statically defined handler in parallel with lazy()
4123
+ let handlerError;
4124
+ let values = await Promise.all([
4125
+ // If the handler throws, don't let it immediately bubble out,
4126
+ // since we need to let the lazy() execution finish so we know if this
4127
+ // route has a boundary that can handle the error
4128
+ runHandler(handler).catch(e => {
4129
+ handlerError = e;
4130
+ }), loadLazyRouteModule(match.route, mapRouteProperties, manifest)]);
4131
+ if (handlerError) {
4132
+ throw handlerError;
4133
+ }
4134
+ result = values[0];
4135
+ } else {
4136
+ // Load lazy route module, then run any returned handler
4137
+ await loadLazyRouteModule(match.route, mapRouteProperties, manifest);
4138
+ handler = match.route[type];
4139
+ if (handler) {
4140
+ // Handler still run even if we got interrupted to maintain consistency
4141
+ // with un-abortable behavior of handler execution on non-lazy or
4142
+ // previously-lazy-loaded routes
4143
+ result = await runHandler(handler);
4144
+ } else if (type === "action") {
4145
+ let url = new URL(request.url);
4146
+ let pathname = url.pathname + url.search;
4147
+ throw getInternalRouterError(405, {
4148
+ method: request.method,
4149
+ pathname,
4150
+ routeId: match.route.id
4151
+ });
4152
+ } else {
4153
+ // lazy() route has no loader to run. Short circuit here so we don't
4154
+ // hit the invariant below that errors on returning undefined.
4155
+ return {
4156
+ type: ResultType.data,
4157
+ data: undefined
4158
+ };
4159
+ }
4160
+ }
4161
+ } else if (!handler) {
4162
+ let url = new URL(request.url);
4163
+ let pathname = url.pathname + url.search;
4164
+ throw getInternalRouterError(404, {
4165
+ pathname
4166
+ });
4167
+ } else {
4168
+ result = await runHandler(handler);
4169
+ }
4170
+ invariant(result !== undefined, "You defined " + (type === "action" ? "an action" : "a loader") + " for route " + ("\"" + match.route.id + "\" but didn't return anything from your `" + type + "` ") + "function. Please return a value or `null`.");
4171
+ } catch (e) {
4172
+ resultType = ResultType.error;
4173
+ result = e;
4174
+ } finally {
4175
+ if (onReject) {
4176
+ request.signal.removeEventListener("abort", onReject);
4177
+ }
4178
+ }
4179
+ if (isResponse(result)) {
4180
+ let status = result.status;
4181
+
4182
+ // Process redirects
4183
+ if (redirectStatusCodes.has(status)) {
4184
+ let location = result.headers.get("Location");
4185
+ invariant(location, "Redirects returned/thrown from loaders/actions must have a Location header");
4186
+
4187
+ // Support relative routing in internal redirects
4188
+ if (!ABSOLUTE_URL_REGEX.test(location)) {
4189
+ location = normalizeTo(new URL(request.url), matches.slice(0, matches.indexOf(match) + 1), basename, true, location, v7_relativeSplatPath);
4190
+ } else if (!opts.isStaticRequest) {
4191
+ // Strip off the protocol+origin for same-origin + same-basename absolute
4192
+ // redirects. If this is a static request, we can let it go back to the
4193
+ // browser as-is
4194
+ let currentUrl = new URL(request.url);
4195
+ let url = location.startsWith("//") ? new URL(currentUrl.protocol + location) : new URL(location);
4196
+ let isSameBasename = stripBasename(url.pathname, basename) != null;
4197
+ if (url.origin === currentUrl.origin && isSameBasename) {
4198
+ location = url.pathname + url.search + url.hash;
4199
+ }
4200
+ }
4201
+
4202
+ // Don't process redirects in the router during static requests requests.
4203
+ // Instead, throw the Response and let the server handle it with an HTTP
4204
+ // redirect. We also update the Location header in place in this flow so
4205
+ // basename and relative routing is taken into account
4206
+ if (opts.isStaticRequest) {
4207
+ result.headers.set("Location", location);
4208
+ throw result;
4209
+ }
4210
+ return {
4211
+ type: ResultType.redirect,
4212
+ status,
4213
+ location,
4214
+ revalidate: result.headers.get("X-Remix-Revalidate") !== null,
4215
+ reloadDocument: result.headers.get("X-Remix-Reload-Document") !== null
4216
+ };
4217
+ }
4218
+
4219
+ // For SSR single-route requests, we want to hand Responses back directly
4220
+ // without unwrapping. We do this with the QueryRouteResponse wrapper
4221
+ // interface so we can know whether it was returned or thrown
4222
+ if (opts.isRouteRequest) {
4223
+ let queryRouteResponse = {
4224
+ type: resultType === ResultType.error ? ResultType.error : ResultType.data,
4225
+ response: result
4226
+ };
4227
+ throw queryRouteResponse;
4228
+ }
4229
+ let data;
4230
+ try {
4231
+ let contentType = result.headers.get("Content-Type");
4232
+ // Check between word boundaries instead of startsWith() due to the last
4233
+ // paragraph of https://httpwg.org/specs/rfc9110.html#field.content-type
4234
+ if (contentType && /\bapplication\/json\b/.test(contentType)) {
4235
+ if (result.body == null) {
4236
+ data = null;
4237
+ } else {
4238
+ data = await result.json();
4239
+ }
4240
+ } else {
4241
+ data = await result.text();
4242
+ }
4243
+ } catch (e) {
4244
+ return {
4245
+ type: ResultType.error,
4246
+ error: e
4247
+ };
4248
+ }
4249
+ if (resultType === ResultType.error) {
4250
+ return {
4251
+ type: resultType,
4252
+ error: new ErrorResponseImpl(status, result.statusText, data),
4253
+ headers: result.headers
4254
+ };
4255
+ }
4256
+ return {
4257
+ type: ResultType.data,
4258
+ data,
4259
+ statusCode: result.status,
4260
+ headers: result.headers
4261
+ };
4262
+ }
4263
+ if (resultType === ResultType.error) {
4264
+ return {
4265
+ type: resultType,
4266
+ error: result
4267
+ };
4268
+ }
4269
+ if (isDeferredData(result)) {
4270
+ var _result$init, _result$init2;
4271
+ return {
4272
+ type: ResultType.deferred,
4273
+ deferredData: result,
4274
+ statusCode: (_result$init = result.init) == null ? void 0 : _result$init.status,
4275
+ headers: ((_result$init2 = result.init) == null ? void 0 : _result$init2.headers) && new Headers(result.init.headers)
4276
+ };
4277
+ }
4278
+ return {
4279
+ type: ResultType.data,
4280
+ data: result
4281
+ };
4282
+ }
4283
+
4284
+ // Utility method for creating the Request instances for loaders/actions during
4285
+ // client-side navigations and fetches. During SSR we will always have a
4286
+ // Request instance from the static handler (query/queryRoute)
4287
+ function createClientSideRequest(history, location, signal, submission) {
4288
+ let url = history.createURL(stripHashFromPath(location)).toString();
4289
+ let init = {
4290
+ signal
4291
+ };
4292
+ if (submission && isMutationMethod(submission.formMethod)) {
4293
+ let {
4294
+ formMethod,
4295
+ formEncType
4296
+ } = submission;
4297
+ // Didn't think we needed this but it turns out unlike other methods, patch
4298
+ // won't be properly normalized to uppercase and results in a 405 error.
4299
+ // See: https://fetch.spec.whatwg.org/#concept-method
4300
+ init.method = formMethod.toUpperCase();
4301
+ if (formEncType === "application/json") {
4302
+ init.headers = new Headers({
4303
+ "Content-Type": formEncType
4304
+ });
4305
+ init.body = JSON.stringify(submission.json);
4306
+ } else if (formEncType === "text/plain") {
4307
+ // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)
4308
+ init.body = submission.text;
4309
+ } else if (formEncType === "application/x-www-form-urlencoded" && submission.formData) {
4310
+ // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)
4311
+ init.body = convertFormDataToSearchParams(submission.formData);
4312
+ } else {
4313
+ // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)
4314
+ init.body = submission.formData;
4315
+ }
4316
+ }
4317
+ return new Request(url, init);
4318
+ }
4319
+ function convertFormDataToSearchParams(formData) {
4320
+ let searchParams = new URLSearchParams();
4321
+ for (let [key, value] of formData.entries()) {
4322
+ // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#converting-an-entry-list-to-a-list-of-name-value-pairs
4323
+ searchParams.append(key, typeof value === "string" ? value : value.name);
4324
+ }
4325
+ return searchParams;
4326
+ }
4327
+ function convertSearchParamsToFormData(searchParams) {
4328
+ let formData = new FormData();
4329
+ for (let [key, value] of searchParams.entries()) {
4330
+ formData.append(key, value);
4331
+ }
4332
+ return formData;
4333
+ }
4334
+ function processRouteLoaderData(matches, matchesToLoad, results, pendingError, activeDeferreds) {
4335
+ // Fill in loaderData/errors from our loaders
4336
+ let loaderData = {};
4337
+ let errors = null;
4338
+ let statusCode;
4339
+ let foundError = false;
4340
+ let loaderHeaders = {};
4341
+
4342
+ // Process loader results into state.loaderData/state.errors
4343
+ results.forEach((result, index) => {
4344
+ let id = matchesToLoad[index].route.id;
4345
+ invariant(!isRedirectResult(result), "Cannot handle redirect results in processLoaderData");
4346
+ if (isErrorResult(result)) {
4347
+ // Look upwards from the matched route for the closest ancestor
4348
+ // error boundary, defaulting to the root match
4349
+ let boundaryMatch = findNearestBoundary(matches, id);
4350
+ let error = result.error;
4351
+ // If we have a pending action error, we report it at the highest-route
4352
+ // that throws a loader error, and then clear it out to indicate that
4353
+ // it was consumed
4354
+ if (pendingError) {
4355
+ error = Object.values(pendingError)[0];
4356
+ pendingError = undefined;
4357
+ }
4358
+ errors = errors || {};
4359
+
4360
+ // Prefer higher error values if lower errors bubble to the same boundary
4361
+ if (errors[boundaryMatch.route.id] == null) {
4362
+ errors[boundaryMatch.route.id] = error;
4363
+ }
4364
+
4365
+ // Clear our any prior loaderData for the throwing route
4366
+ loaderData[id] = undefined;
4367
+
4368
+ // Once we find our first (highest) error, we set the status code and
4369
+ // prevent deeper status codes from overriding
4370
+ if (!foundError) {
4371
+ foundError = true;
4372
+ statusCode = isRouteErrorResponse(result.error) ? result.error.status : 500;
4373
+ }
4374
+ if (result.headers) {
4375
+ loaderHeaders[id] = result.headers;
4376
+ }
4377
+ } else {
4378
+ if (isDeferredResult(result)) {
4379
+ activeDeferreds.set(id, result.deferredData);
4380
+ loaderData[id] = result.deferredData.data;
4381
+ } else {
4382
+ loaderData[id] = result.data;
4383
+ }
4384
+
4385
+ // Error status codes always override success status codes, but if all
4386
+ // loaders are successful we take the deepest status code.
4387
+ if (result.statusCode != null && result.statusCode !== 200 && !foundError) {
4388
+ statusCode = result.statusCode;
4389
+ }
4390
+ if (result.headers) {
4391
+ loaderHeaders[id] = result.headers;
4392
+ }
4393
+ }
4394
+ });
4395
+
4396
+ // If we didn't consume the pending action error (i.e., all loaders
4397
+ // resolved), then consume it here. Also clear out any loaderData for the
4398
+ // throwing route
4399
+ if (pendingError) {
4400
+ errors = pendingError;
4401
+ loaderData[Object.keys(pendingError)[0]] = undefined;
4402
+ }
4403
+ return {
4404
+ loaderData,
4405
+ errors,
4406
+ statusCode: statusCode || 200,
4407
+ loaderHeaders
4408
+ };
4409
+ }
4410
+ function processLoaderData(state, matches, matchesToLoad, results, pendingError, revalidatingFetchers, fetcherResults, activeDeferreds) {
4411
+ let {
4412
+ loaderData,
4413
+ errors
4414
+ } = processRouteLoaderData(matches, matchesToLoad, results, pendingError, activeDeferreds);
4415
+
4416
+ // Process results from our revalidating fetchers
4417
+ for (let index = 0; index < revalidatingFetchers.length; index++) {
4418
+ let {
4419
+ key,
4420
+ match,
4421
+ controller
4422
+ } = revalidatingFetchers[index];
4423
+ invariant(fetcherResults !== undefined && fetcherResults[index] !== undefined, "Did not find corresponding fetcher result");
4424
+ let result = fetcherResults[index];
4425
+
4426
+ // Process fetcher non-redirect errors
4427
+ if (controller && controller.signal.aborted) {
4428
+ // Nothing to do for aborted fetchers
4429
+ continue;
4430
+ } else if (isErrorResult(result)) {
4431
+ let boundaryMatch = findNearestBoundary(state.matches, match == null ? void 0 : match.route.id);
4432
+ if (!(errors && errors[boundaryMatch.route.id])) {
4433
+ errors = _extends({}, errors, {
4434
+ [boundaryMatch.route.id]: result.error
4435
+ });
4436
+ }
4437
+ state.fetchers.delete(key);
4438
+ } else if (isRedirectResult(result)) {
4439
+ // Should never get here, redirects should get processed above, but we
4440
+ // keep this to type narrow to a success result in the else
4441
+ invariant(false, "Unhandled fetcher revalidation redirect");
4442
+ } else if (isDeferredResult(result)) {
4443
+ // Should never get here, deferred data should be awaited for fetchers
4444
+ // in resolveDeferredResults
4445
+ invariant(false, "Unhandled fetcher deferred data");
4446
+ } else {
4447
+ let doneFetcher = getDoneFetcher(result.data);
4448
+ state.fetchers.set(key, doneFetcher);
4449
+ }
4450
+ }
4451
+ return {
4452
+ loaderData,
4453
+ errors
4454
+ };
4455
+ }
4456
+ function mergeLoaderData(loaderData, newLoaderData, matches, errors) {
4457
+ let mergedLoaderData = _extends({}, newLoaderData);
4458
+ for (let match of matches) {
4459
+ let id = match.route.id;
4460
+ if (newLoaderData.hasOwnProperty(id)) {
4461
+ if (newLoaderData[id] !== undefined) {
4462
+ mergedLoaderData[id] = newLoaderData[id];
4463
+ }
4464
+ } else if (loaderData[id] !== undefined && match.route.loader) {
4465
+ // Preserve existing keys not included in newLoaderData and where a loader
4466
+ // wasn't removed by HMR
4467
+ mergedLoaderData[id] = loaderData[id];
4468
+ }
4469
+ if (errors && errors.hasOwnProperty(id)) {
4470
+ // Don't keep any loader data below the boundary
4471
+ break;
4472
+ }
4473
+ }
4474
+ return mergedLoaderData;
4475
+ }
4476
+
4477
+ // Find the nearest error boundary, looking upwards from the leaf route (or the
4478
+ // route specified by routeId) for the closest ancestor error boundary,
4479
+ // defaulting to the root match
4480
+ function findNearestBoundary(matches, routeId) {
4481
+ let eligibleMatches = routeId ? matches.slice(0, matches.findIndex(m => m.route.id === routeId) + 1) : [...matches];
4482
+ return eligibleMatches.reverse().find(m => m.route.hasErrorBoundary === true) || matches[0];
4483
+ }
4484
+ function getShortCircuitMatches(routes) {
4485
+ // Prefer a root layout route if present, otherwise shim in a route object
4486
+ let route = routes.length === 1 ? routes[0] : routes.find(r => r.index || !r.path || r.path === "/") || {
4487
+ id: "__shim-error-route__"
4488
+ };
4489
+ return {
4490
+ matches: [{
4491
+ params: {},
4492
+ pathname: "",
4493
+ pathnameBase: "",
4494
+ route
4495
+ }],
4496
+ route
4497
+ };
4498
+ }
4499
+ function getInternalRouterError(status, _temp5) {
4500
+ let {
4501
+ pathname,
4502
+ routeId,
4503
+ method,
4504
+ type
4505
+ } = _temp5 === void 0 ? {} : _temp5;
4506
+ let statusText = "Unknown Server Error";
4507
+ let errorMessage = "Unknown @remix-run/router error";
4508
+ if (status === 400) {
4509
+ statusText = "Bad Request";
4510
+ if (method && pathname && routeId) {
4511
+ errorMessage = "You made a " + method + " request to \"" + pathname + "\" but " + ("did not provide a `loader` for route \"" + routeId + "\", ") + "so there is no way to handle the request.";
4512
+ } else if (type === "defer-action") {
4513
+ errorMessage = "defer() is not supported in actions";
4514
+ } else if (type === "invalid-body") {
4515
+ errorMessage = "Unable to encode submission body";
4516
+ }
4517
+ } else if (status === 403) {
4518
+ statusText = "Forbidden";
4519
+ errorMessage = "Route \"" + routeId + "\" does not match URL \"" + pathname + "\"";
4520
+ } else if (status === 404) {
4521
+ statusText = "Not Found";
4522
+ errorMessage = "No route matches URL \"" + pathname + "\"";
4523
+ } else if (status === 405) {
4524
+ statusText = "Method Not Allowed";
4525
+ if (method && pathname && routeId) {
4526
+ errorMessage = "You made a " + method.toUpperCase() + " request to \"" + pathname + "\" but " + ("did not provide an `action` for route \"" + routeId + "\", ") + "so there is no way to handle the request.";
4527
+ } else if (method) {
4528
+ errorMessage = "Invalid request method \"" + method.toUpperCase() + "\"";
4529
+ }
4530
+ }
4531
+ return new ErrorResponseImpl(status || 500, statusText, new Error(errorMessage), true);
4532
+ }
4533
+
4534
+ // Find any returned redirect errors, starting from the lowest match
4535
+ function findRedirect(results) {
4536
+ for (let i = results.length - 1; i >= 0; i--) {
4537
+ let result = results[i];
4538
+ if (isRedirectResult(result)) {
4539
+ return {
4540
+ result,
4541
+ idx: i
4542
+ };
4543
+ }
4544
+ }
4545
+ }
4546
+ function stripHashFromPath(path) {
4547
+ let parsedPath = typeof path === "string" ? parsePath(path) : path;
4548
+ return createPath(_extends({}, parsedPath, {
4549
+ hash: ""
4550
+ }));
4551
+ }
4552
+ function isHashChangeOnly(a, b) {
4553
+ if (a.pathname !== b.pathname || a.search !== b.search) {
4554
+ return false;
4555
+ }
4556
+ if (a.hash === "") {
4557
+ // /page -> /page#hash
4558
+ return b.hash !== "";
4559
+ } else if (a.hash === b.hash) {
4560
+ // /page#hash -> /page#hash
4561
+ return true;
4562
+ } else if (b.hash !== "") {
4563
+ // /page#hash -> /page#other
4564
+ return true;
4565
+ }
4566
+
4567
+ // If the hash is removed the browser will re-perform a request to the server
4568
+ // /page#hash -> /page
4569
+ return false;
4570
+ }
4571
+ function isDeferredResult(result) {
4572
+ return result.type === ResultType.deferred;
4573
+ }
4574
+ function isErrorResult(result) {
4575
+ return result.type === ResultType.error;
4576
+ }
4577
+ function isRedirectResult(result) {
4578
+ return (result && result.type) === ResultType.redirect;
4579
+ }
4580
+ function isDeferredData(value) {
4581
+ let deferred = value;
4582
+ return deferred && typeof deferred === "object" && typeof deferred.data === "object" && typeof deferred.subscribe === "function" && typeof deferred.cancel === "function" && typeof deferred.resolveData === "function";
4583
+ }
4584
+ function isResponse(value) {
4585
+ return value != null && typeof value.status === "number" && typeof value.statusText === "string" && typeof value.headers === "object" && typeof value.body !== "undefined";
4586
+ }
4587
+ function isRedirectResponse(result) {
4588
+ if (!isResponse(result)) {
4589
+ return false;
4590
+ }
4591
+ let status = result.status;
4592
+ let location = result.headers.get("Location");
4593
+ return status >= 300 && status <= 399 && location != null;
4594
+ }
4595
+ function isQueryRouteResponse(obj) {
4596
+ return obj && isResponse(obj.response) && (obj.type === ResultType.data || obj.type === ResultType.error);
4597
+ }
4598
+ function isValidMethod(method) {
4599
+ return validRequestMethods.has(method.toLowerCase());
4600
+ }
4601
+ function isMutationMethod(method) {
4602
+ return validMutationMethods.has(method.toLowerCase());
4603
+ }
4604
+ async function resolveDeferredResults(currentMatches, matchesToLoad, results, signals, isFetcher, currentLoaderData) {
4605
+ for (let index = 0; index < results.length; index++) {
4606
+ let result = results[index];
4607
+ let match = matchesToLoad[index];
4608
+ // If we don't have a match, then we can have a deferred result to do
4609
+ // anything with. This is for revalidating fetchers where the route was
4610
+ // removed during HMR
4611
+ if (!match) {
4612
+ continue;
4613
+ }
4614
+ let currentMatch = currentMatches.find(m => m.route.id === match.route.id);
4615
+ let isRevalidatingLoader = currentMatch != null && !isNewRouteInstance(currentMatch, match) && (currentLoaderData && currentLoaderData[match.route.id]) !== undefined;
4616
+ if (isDeferredResult(result) && (isFetcher || isRevalidatingLoader)) {
4617
+ // Note: we do not have to touch activeDeferreds here since we race them
4618
+ // against the signal in resolveDeferredData and they'll get aborted
4619
+ // there if needed
4620
+ let signal = signals[index];
4621
+ invariant(signal, "Expected an AbortSignal for revalidating fetcher deferred result");
4622
+ await resolveDeferredData(result, signal, isFetcher).then(result => {
4623
+ if (result) {
4624
+ results[index] = result || results[index];
4625
+ }
4626
+ });
4627
+ }
4628
+ }
4629
+ }
4630
+ async function resolveDeferredData(result, signal, unwrap) {
4631
+ if (unwrap === void 0) {
4632
+ unwrap = false;
4633
+ }
4634
+ let aborted = await result.deferredData.resolveData(signal);
4635
+ if (aborted) {
4636
+ return;
4637
+ }
4638
+ if (unwrap) {
4639
+ try {
4640
+ return {
4641
+ type: ResultType.data,
4642
+ data: result.deferredData.unwrappedData
4643
+ };
4644
+ } catch (e) {
4645
+ // Handle any TrackedPromise._error values encountered while unwrapping
4646
+ return {
4647
+ type: ResultType.error,
4648
+ error: e
4649
+ };
4650
+ }
4651
+ }
4652
+ return {
4653
+ type: ResultType.data,
4654
+ data: result.deferredData.data
4655
+ };
4656
+ }
4657
+ function hasNakedIndexQuery(search) {
4658
+ return new URLSearchParams(search).getAll("index").some(v => v === "");
4659
+ }
4660
+ function getTargetMatch(matches, location) {
4661
+ let search = typeof location === "string" ? parsePath(location).search : location.search;
4662
+ if (matches[matches.length - 1].route.index && hasNakedIndexQuery(search || "")) {
4663
+ // Return the leaf index route when index is present
4664
+ return matches[matches.length - 1];
4665
+ }
4666
+ // Otherwise grab the deepest "path contributing" match (ignoring index and
4667
+ // pathless layout routes)
4668
+ let pathMatches = getPathContributingMatches(matches);
4669
+ return pathMatches[pathMatches.length - 1];
4670
+ }
4671
+ function getSubmissionFromNavigation(navigation) {
4672
+ let {
4673
+ formMethod,
4674
+ formAction,
4675
+ formEncType,
4676
+ text,
4677
+ formData,
4678
+ json
4679
+ } = navigation;
4680
+ if (!formMethod || !formAction || !formEncType) {
4681
+ return;
4682
+ }
4683
+ if (text != null) {
4684
+ return {
4685
+ formMethod,
4686
+ formAction,
4687
+ formEncType,
4688
+ formData: undefined,
4689
+ json: undefined,
4690
+ text
4691
+ };
4692
+ } else if (formData != null) {
4693
+ return {
4694
+ formMethod,
4695
+ formAction,
4696
+ formEncType,
4697
+ formData,
4698
+ json: undefined,
4699
+ text: undefined
4700
+ };
4701
+ } else if (json !== undefined) {
4702
+ return {
4703
+ formMethod,
4704
+ formAction,
4705
+ formEncType,
4706
+ formData: undefined,
4707
+ json,
4708
+ text: undefined
4709
+ };
4710
+ }
4711
+ }
4712
+ function getLoadingNavigation(location, submission) {
4713
+ if (submission) {
4714
+ let navigation = {
4715
+ state: "loading",
4716
+ location,
4717
+ formMethod: submission.formMethod,
4718
+ formAction: submission.formAction,
4719
+ formEncType: submission.formEncType,
4720
+ formData: submission.formData,
4721
+ json: submission.json,
4722
+ text: submission.text
4723
+ };
4724
+ return navigation;
4725
+ } else {
4726
+ let navigation = {
4727
+ state: "loading",
4728
+ location,
4729
+ formMethod: undefined,
4730
+ formAction: undefined,
4731
+ formEncType: undefined,
4732
+ formData: undefined,
4733
+ json: undefined,
4734
+ text: undefined
4735
+ };
4736
+ return navigation;
4737
+ }
4738
+ }
4739
+ function getSubmittingNavigation(location, submission) {
4740
+ let navigation = {
4741
+ state: "submitting",
4742
+ location,
4743
+ formMethod: submission.formMethod,
4744
+ formAction: submission.formAction,
4745
+ formEncType: submission.formEncType,
4746
+ formData: submission.formData,
4747
+ json: submission.json,
4748
+ text: submission.text
4749
+ };
4750
+ return navigation;
4751
+ }
4752
+ function getLoadingFetcher(submission, data) {
4753
+ if (submission) {
4754
+ let fetcher = {
4755
+ state: "loading",
4756
+ formMethod: submission.formMethod,
4757
+ formAction: submission.formAction,
4758
+ formEncType: submission.formEncType,
4759
+ formData: submission.formData,
4760
+ json: submission.json,
4761
+ text: submission.text,
4762
+ data
4763
+ };
4764
+ return fetcher;
4765
+ } else {
4766
+ let fetcher = {
4767
+ state: "loading",
4768
+ formMethod: undefined,
4769
+ formAction: undefined,
4770
+ formEncType: undefined,
4771
+ formData: undefined,
4772
+ json: undefined,
4773
+ text: undefined,
4774
+ data
4775
+ };
4776
+ return fetcher;
4777
+ }
4778
+ }
4779
+ function getSubmittingFetcher(submission, existingFetcher) {
4780
+ let fetcher = {
4781
+ state: "submitting",
4782
+ formMethod: submission.formMethod,
4783
+ formAction: submission.formAction,
4784
+ formEncType: submission.formEncType,
4785
+ formData: submission.formData,
4786
+ json: submission.json,
4787
+ text: submission.text,
4788
+ data: existingFetcher ? existingFetcher.data : undefined
4789
+ };
4790
+ return fetcher;
4791
+ }
4792
+ function getDoneFetcher(data) {
4793
+ let fetcher = {
4794
+ state: "idle",
4795
+ formMethod: undefined,
4796
+ formAction: undefined,
4797
+ formEncType: undefined,
4798
+ formData: undefined,
4799
+ json: undefined,
4800
+ text: undefined,
4801
+ data
4802
+ };
4803
+ return fetcher;
4804
+ }
4805
+ function restoreAppliedTransitions(_window, transitions) {
4806
+ try {
4807
+ let sessionPositions = _window.sessionStorage.getItem(TRANSITIONS_STORAGE_KEY);
4808
+ if (sessionPositions) {
4809
+ let json = JSON.parse(sessionPositions);
4810
+ for (let [k, v] of Object.entries(json || {})) {
4811
+ if (v && Array.isArray(v)) {
4812
+ transitions.set(k, new Set(v || []));
4813
+ }
4814
+ }
4815
+ }
4816
+ } catch (e) {
4817
+ // no-op, use default empty object
4818
+ }
4819
+ }
4820
+ function persistAppliedTransitions(_window, transitions) {
4821
+ if (transitions.size > 0) {
4822
+ let json = {};
4823
+ for (let [k, v] of transitions) {
4824
+ json[k] = [...v];
4825
+ }
4826
+ try {
4827
+ _window.sessionStorage.setItem(TRANSITIONS_STORAGE_KEY, JSON.stringify(json));
4828
+ } catch (error) {
4829
+ warning(false, "Failed to save applied view transitions in sessionStorage (" + error + ").");
4830
+ }
4831
+ }
4832
+ }
4833
+
4834
+ //#endregion
4835
+
4836
+ exports.AbortedDeferredError = AbortedDeferredError;
4837
+ exports.Action = Action;
4838
+ exports.IDLE_BLOCKER = IDLE_BLOCKER;
4839
+ exports.IDLE_FETCHER = IDLE_FETCHER;
4840
+ exports.IDLE_NAVIGATION = IDLE_NAVIGATION;
4841
+ exports.UNSAFE_DEFERRED_SYMBOL = UNSAFE_DEFERRED_SYMBOL;
4842
+ exports.UNSAFE_DeferredData = DeferredData;
4843
+ exports.UNSAFE_ErrorResponseImpl = ErrorResponseImpl;
4844
+ exports.UNSAFE_convertRouteMatchToUiMatch = convertRouteMatchToUiMatch;
4845
+ exports.UNSAFE_convertRoutesToDataRoutes = convertRoutesToDataRoutes;
4846
+ exports.UNSAFE_getResolveToMatches = getResolveToMatches;
4847
+ exports.UNSAFE_invariant = invariant;
4848
+ exports.UNSAFE_warning = warning;
4849
+ exports.createBrowserHistory = createBrowserHistory;
4850
+ exports.createHashHistory = createHashHistory;
4851
+ exports.createMemoryHistory = createMemoryHistory;
4852
+ exports.createPath = createPath;
4853
+ exports.createRouter = createRouter;
4854
+ exports.createStaticHandler = createStaticHandler;
4855
+ exports.defer = defer;
4856
+ exports.generatePath = generatePath;
4857
+ exports.getStaticContextFromError = getStaticContextFromError;
4858
+ exports.getToPathname = getToPathname;
4859
+ exports.isDeferredData = isDeferredData;
4860
+ exports.isRouteErrorResponse = isRouteErrorResponse;
4861
+ exports.joinPaths = joinPaths;
4862
+ exports.json = json;
4863
+ exports.matchPath = matchPath;
4864
+ exports.matchRoutes = matchRoutes;
4865
+ exports.normalizePathname = normalizePathname;
4866
+ exports.parsePath = parsePath;
4867
+ exports.redirect = redirect;
4868
+ exports.redirectDocument = redirectDocument;
4869
+ exports.resolvePath = resolvePath;
4870
+ exports.resolveTo = resolveTo;
4871
+ exports.stripBasename = stripBasename;
4872
+
4873
+ Object.defineProperty(exports, '__esModule', { value: true });
4874
+
4875
+ }));
4876
+ //# sourceMappingURL=router.umd.js.map