@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,4327 @@
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 _extends() {
12
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
13
+ for (var i = 1; i < arguments.length; i++) {
14
+ var source = arguments[i];
15
+ for (var key in source) {
16
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
17
+ target[key] = source[key];
18
+ }
19
+ }
20
+ }
21
+ return target;
22
+ };
23
+ return _extends.apply(this, arguments);
24
+ }
25
+
26
+ ////////////////////////////////////////////////////////////////////////////////
27
+ //#region Types and Constants
28
+ ////////////////////////////////////////////////////////////////////////////////
29
+ /**
30
+ * Actions represent the type of change to a location value.
31
+ */
32
+ var Action;
33
+ (function (Action) {
34
+ /**
35
+ * A POP indicates a change to an arbitrary index in the history stack, such
36
+ * as a back or forward navigation. It does not describe the direction of the
37
+ * navigation, only that the current index changed.
38
+ *
39
+ * Note: This is the default action for newly created history objects.
40
+ */
41
+ Action["Pop"] = "POP";
42
+ /**
43
+ * A PUSH indicates a new entry being added to the history stack, such as when
44
+ * a link is clicked and a new page loads. When this happens, all subsequent
45
+ * entries in the stack are lost.
46
+ */
47
+ Action["Push"] = "PUSH";
48
+ /**
49
+ * A REPLACE indicates the entry at the current index in the history stack
50
+ * being replaced by a new one.
51
+ */
52
+ Action["Replace"] = "REPLACE";
53
+ })(Action || (Action = {}));
54
+ const PopStateEventType = "popstate";
55
+ /**
56
+ * Memory history stores the current location in memory. It is designed for use
57
+ * in stateful non-browser environments like tests and React Native.
58
+ */
59
+ function createMemoryHistory(options) {
60
+ if (options === void 0) {
61
+ options = {};
62
+ }
63
+ let {
64
+ initialEntries = ["/"],
65
+ initialIndex,
66
+ v5Compat = false
67
+ } = options;
68
+ let entries; // Declare so we can access from createMemoryLocation
69
+ entries = initialEntries.map((entry, index) => createMemoryLocation(entry, typeof entry === "string" ? null : entry.state, index === 0 ? "default" : undefined));
70
+ let index = clampIndex(initialIndex == null ? entries.length - 1 : initialIndex);
71
+ let action = Action.Pop;
72
+ let listener = null;
73
+ function clampIndex(n) {
74
+ return Math.min(Math.max(n, 0), entries.length - 1);
75
+ }
76
+ function getCurrentLocation() {
77
+ return entries[index];
78
+ }
79
+ function createMemoryLocation(to, state, key) {
80
+ if (state === void 0) {
81
+ state = null;
82
+ }
83
+ let location = createLocation(entries ? getCurrentLocation().pathname : "/", to, state, key);
84
+ warning(location.pathname.charAt(0) === "/", "relative pathnames are not supported in memory history: " + JSON.stringify(to));
85
+ return location;
86
+ }
87
+ function createHref(to) {
88
+ return typeof to === "string" ? to : createPath(to);
89
+ }
90
+ let history = {
91
+ get index() {
92
+ return index;
93
+ },
94
+ get action() {
95
+ return action;
96
+ },
97
+ get location() {
98
+ return getCurrentLocation();
99
+ },
100
+ createHref,
101
+ createURL(to) {
102
+ return new URL(createHref(to), "http://localhost");
103
+ },
104
+ encodeLocation(to) {
105
+ let path = typeof to === "string" ? parsePath(to) : to;
106
+ return {
107
+ pathname: path.pathname || "",
108
+ search: path.search || "",
109
+ hash: path.hash || ""
110
+ };
111
+ },
112
+ push(to, state) {
113
+ action = Action.Push;
114
+ let nextLocation = createMemoryLocation(to, state);
115
+ index += 1;
116
+ entries.splice(index, entries.length, nextLocation);
117
+ if (v5Compat && listener) {
118
+ listener({
119
+ action,
120
+ location: nextLocation,
121
+ delta: 1
122
+ });
123
+ }
124
+ },
125
+ replace(to, state) {
126
+ action = Action.Replace;
127
+ let nextLocation = createMemoryLocation(to, state);
128
+ entries[index] = nextLocation;
129
+ if (v5Compat && listener) {
130
+ listener({
131
+ action,
132
+ location: nextLocation,
133
+ delta: 0
134
+ });
135
+ }
136
+ },
137
+ go(delta) {
138
+ action = Action.Pop;
139
+ let nextIndex = clampIndex(index + delta);
140
+ let nextLocation = entries[nextIndex];
141
+ index = nextIndex;
142
+ if (listener) {
143
+ listener({
144
+ action,
145
+ location: nextLocation,
146
+ delta
147
+ });
148
+ }
149
+ },
150
+ listen(fn) {
151
+ listener = fn;
152
+ return () => {
153
+ listener = null;
154
+ };
155
+ }
156
+ };
157
+ return history;
158
+ }
159
+ /**
160
+ * Browser history stores the location in regular URLs. This is the standard for
161
+ * most web apps, but it requires some configuration on the server to ensure you
162
+ * serve the same app at multiple URLs.
163
+ *
164
+ * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory
165
+ */
166
+ function createBrowserHistory(options) {
167
+ if (options === void 0) {
168
+ options = {};
169
+ }
170
+ function createBrowserLocation(window, globalHistory) {
171
+ let {
172
+ pathname,
173
+ search,
174
+ hash
175
+ } = window.location;
176
+ return createLocation("", {
177
+ pathname,
178
+ search,
179
+ hash
180
+ },
181
+ // state defaults to `null` because `window.history.state` does
182
+ globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || "default");
183
+ }
184
+ function createBrowserHref(window, to) {
185
+ return typeof to === "string" ? to : createPath(to);
186
+ }
187
+ return getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options);
188
+ }
189
+ /**
190
+ * Hash history stores the location in window.location.hash. This makes it ideal
191
+ * for situations where you don't want to send the location to the server for
192
+ * some reason, either because you do cannot configure it or the URL space is
193
+ * reserved for something else.
194
+ *
195
+ * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory
196
+ */
197
+ function createHashHistory(options) {
198
+ if (options === void 0) {
199
+ options = {};
200
+ }
201
+ function createHashLocation(window, globalHistory) {
202
+ let {
203
+ pathname = "/",
204
+ search = "",
205
+ hash = ""
206
+ } = parsePath(window.location.hash.substr(1));
207
+ // Hash URL should always have a leading / just like window.location.pathname
208
+ // does, so if an app ends up at a route like /#something then we add a
209
+ // leading slash so all of our path-matching behaves the same as if it would
210
+ // in a browser router. This is particularly important when there exists a
211
+ // root splat route (<Route path="*">) since that matches internally against
212
+ // "/*" and we'd expect /#something to 404 in a hash router app.
213
+ if (!pathname.startsWith("/") && !pathname.startsWith(".")) {
214
+ pathname = "/" + pathname;
215
+ }
216
+ return createLocation("", {
217
+ pathname,
218
+ search,
219
+ hash
220
+ },
221
+ // state defaults to `null` because `window.history.state` does
222
+ globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || "default");
223
+ }
224
+ function createHashHref(window, to) {
225
+ let base = window.document.querySelector("base");
226
+ let href = "";
227
+ if (base && base.getAttribute("href")) {
228
+ let url = window.location.href;
229
+ let hashIndex = url.indexOf("#");
230
+ href = hashIndex === -1 ? url : url.slice(0, hashIndex);
231
+ }
232
+ return href + "#" + (typeof to === "string" ? to : createPath(to));
233
+ }
234
+ function validateHashLocation(location, to) {
235
+ warning(location.pathname.charAt(0) === "/", "relative pathnames are not supported in hash history.push(" + JSON.stringify(to) + ")");
236
+ }
237
+ return getUrlBasedHistory(createHashLocation, createHashHref, validateHashLocation, options);
238
+ }
239
+ function invariant(value, message) {
240
+ if (value === false || value === null || typeof value === "undefined") {
241
+ throw new Error(message);
242
+ }
243
+ }
244
+ function warning(cond, message) {
245
+ if (!cond) {
246
+ // eslint-disable-next-line no-console
247
+ if (typeof console !== "undefined") console.warn(message);
248
+ try {
249
+ // Welcome to debugging history!
250
+ //
251
+ // This error is thrown as a convenience, so you can more easily
252
+ // find the source for a warning that appears in the console by
253
+ // enabling "pause on exceptions" in your JavaScript debugger.
254
+ throw new Error(message);
255
+ // eslint-disable-next-line no-empty
256
+ } catch (e) {}
257
+ }
258
+ }
259
+ function createKey() {
260
+ return Math.random().toString(36).substr(2, 8);
261
+ }
262
+ /**
263
+ * For browser-based histories, we combine the state and key into an object
264
+ */
265
+ function getHistoryState(location, index) {
266
+ return {
267
+ usr: location.state,
268
+ key: location.key,
269
+ idx: index
270
+ };
271
+ }
272
+ /**
273
+ * Creates a Location object with a unique key from the given Path
274
+ */
275
+ function createLocation(current, to, state, key) {
276
+ if (state === void 0) {
277
+ state = null;
278
+ }
279
+ let location = _extends({
280
+ pathname: typeof current === "string" ? current : current.pathname,
281
+ search: "",
282
+ hash: ""
283
+ }, typeof to === "string" ? parsePath(to) : to, {
284
+ state,
285
+ // TODO: This could be cleaned up. push/replace should probably just take
286
+ // full Locations now and avoid the need to run through this flow at all
287
+ // But that's a pretty big refactor to the current test suite so going to
288
+ // keep as is for the time being and just let any incoming keys take precedence
289
+ key: to && to.key || key || createKey()
290
+ });
291
+ return location;
292
+ }
293
+ /**
294
+ * Creates a string URL path from the given pathname, search, and hash components.
295
+ */
296
+ function createPath(_ref) {
297
+ let {
298
+ pathname = "/",
299
+ search = "",
300
+ hash = ""
301
+ } = _ref;
302
+ if (search && search !== "?") pathname += search.charAt(0) === "?" ? search : "?" + search;
303
+ if (hash && hash !== "#") pathname += hash.charAt(0) === "#" ? hash : "#" + hash;
304
+ return pathname;
305
+ }
306
+ /**
307
+ * Parses a string URL path into its separate pathname, search, and hash components.
308
+ */
309
+ function parsePath(path) {
310
+ let parsedPath = {};
311
+ if (path) {
312
+ let hashIndex = path.indexOf("#");
313
+ if (hashIndex >= 0) {
314
+ parsedPath.hash = path.substr(hashIndex);
315
+ path = path.substr(0, hashIndex);
316
+ }
317
+ let searchIndex = path.indexOf("?");
318
+ if (searchIndex >= 0) {
319
+ parsedPath.search = path.substr(searchIndex);
320
+ path = path.substr(0, searchIndex);
321
+ }
322
+ if (path) {
323
+ parsedPath.pathname = path;
324
+ }
325
+ }
326
+ return parsedPath;
327
+ }
328
+ function getUrlBasedHistory(getLocation, createHref, validateLocation, options) {
329
+ if (options === void 0) {
330
+ options = {};
331
+ }
332
+ let {
333
+ window = document.defaultView,
334
+ v5Compat = false
335
+ } = options;
336
+ let globalHistory = window.history;
337
+ let action = Action.Pop;
338
+ let listener = null;
339
+ let index = getIndex();
340
+ // Index should only be null when we initialize. If not, it's because the
341
+ // user called history.pushState or history.replaceState directly, in which
342
+ // case we should log a warning as it will result in bugs.
343
+ if (index == null) {
344
+ index = 0;
345
+ globalHistory.replaceState(_extends({}, globalHistory.state, {
346
+ idx: index
347
+ }), "");
348
+ }
349
+ function getIndex() {
350
+ let state = globalHistory.state || {
351
+ idx: null
352
+ };
353
+ return state.idx;
354
+ }
355
+ function handlePop() {
356
+ action = Action.Pop;
357
+ let nextIndex = getIndex();
358
+ let delta = nextIndex == null ? null : nextIndex - index;
359
+ index = nextIndex;
360
+ if (listener) {
361
+ listener({
362
+ action,
363
+ location: history.location,
364
+ delta
365
+ });
366
+ }
367
+ }
368
+ function push(to, state) {
369
+ action = Action.Push;
370
+ let location = createLocation(history.location, to, state);
371
+ if (validateLocation) validateLocation(location, to);
372
+ index = getIndex() + 1;
373
+ let historyState = getHistoryState(location, index);
374
+ let url = history.createHref(location);
375
+ // try...catch because iOS limits us to 100 pushState calls :/
376
+ try {
377
+ globalHistory.pushState(historyState, "", url);
378
+ } catch (error) {
379
+ // If the exception is because `state` can't be serialized, let that throw
380
+ // outwards just like a replace call would so the dev knows the cause
381
+ // https://html.spec.whatwg.org/multipage/nav-history-apis.html#shared-history-push/replace-state-steps
382
+ // https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal
383
+ if (error instanceof DOMException && error.name === "DataCloneError") {
384
+ throw error;
385
+ }
386
+ // They are going to lose state here, but there is no real
387
+ // way to warn them about it since the page will refresh...
388
+ window.location.assign(url);
389
+ }
390
+ if (v5Compat && listener) {
391
+ listener({
392
+ action,
393
+ location: history.location,
394
+ delta: 1
395
+ });
396
+ }
397
+ }
398
+ function replace(to, state) {
399
+ action = Action.Replace;
400
+ let location = createLocation(history.location, to, state);
401
+ if (validateLocation) validateLocation(location, to);
402
+ index = getIndex();
403
+ let historyState = getHistoryState(location, index);
404
+ let url = history.createHref(location);
405
+ globalHistory.replaceState(historyState, "", url);
406
+ if (v5Compat && listener) {
407
+ listener({
408
+ action,
409
+ location: history.location,
410
+ delta: 0
411
+ });
412
+ }
413
+ }
414
+ function createURL(to) {
415
+ // window.location.origin is "null" (the literal string value) in Firefox
416
+ // under certain conditions, notably when serving from a local HTML file
417
+ // See https://bugzilla.mozilla.org/show_bug.cgi?id=878297
418
+ let base = window.location.origin !== "null" ? window.location.origin : window.location.href;
419
+ let href = typeof to === "string" ? to : createPath(to);
420
+ // Treating this as a full URL will strip any trailing spaces so we need to
421
+ // pre-encode them since they might be part of a matching splat param from
422
+ // an ancestor route
423
+ href = href.replace(/ $/, "%20");
424
+ invariant(base, "No window.location.(origin|href) available to create URL for href: " + href);
425
+ return new URL(href, base);
426
+ }
427
+ let history = {
428
+ get action() {
429
+ return action;
430
+ },
431
+ get location() {
432
+ return getLocation(window, globalHistory);
433
+ },
434
+ listen(fn) {
435
+ if (listener) {
436
+ throw new Error("A history only accepts one active listener");
437
+ }
438
+ window.addEventListener(PopStateEventType, handlePop);
439
+ listener = fn;
440
+ return () => {
441
+ window.removeEventListener(PopStateEventType, handlePop);
442
+ listener = null;
443
+ };
444
+ },
445
+ createHref(to) {
446
+ return createHref(window, to);
447
+ },
448
+ createURL,
449
+ encodeLocation(to) {
450
+ // Encode a Location the same way window.location would
451
+ let url = createURL(to);
452
+ return {
453
+ pathname: url.pathname,
454
+ search: url.search,
455
+ hash: url.hash
456
+ };
457
+ },
458
+ push,
459
+ replace,
460
+ go(n) {
461
+ return globalHistory.go(n);
462
+ }
463
+ };
464
+ return history;
465
+ }
466
+ //#endregion
467
+
468
+ var ResultType;
469
+ (function (ResultType) {
470
+ ResultType["data"] = "data";
471
+ ResultType["deferred"] = "deferred";
472
+ ResultType["redirect"] = "redirect";
473
+ ResultType["error"] = "error";
474
+ })(ResultType || (ResultType = {}));
475
+ const immutableRouteKeys = new Set(["lazy", "caseSensitive", "path", "id", "index", "children"]);
476
+ function isIndexRoute(route) {
477
+ return route.index === true;
478
+ }
479
+ // Walk the route tree generating unique IDs where necessary, so we are working
480
+ // solely with AgnosticDataRouteObject's within the Router
481
+ function convertRoutesToDataRoutes(routes, mapRouteProperties, parentPath, manifest) {
482
+ if (parentPath === void 0) {
483
+ parentPath = [];
484
+ }
485
+ if (manifest === void 0) {
486
+ manifest = {};
487
+ }
488
+ return routes.map((route, index) => {
489
+ let treePath = [...parentPath, index];
490
+ let id = typeof route.id === "string" ? route.id : treePath.join("-");
491
+ invariant(route.index !== true || !route.children, "Cannot specify children on an index route");
492
+ invariant(!manifest[id], "Found a route id collision on id \"" + id + "\". Route " + "id's must be globally unique within Data Router usages");
493
+ if (isIndexRoute(route)) {
494
+ let indexRoute = _extends({}, route, mapRouteProperties(route), {
495
+ id
496
+ });
497
+ manifest[id] = indexRoute;
498
+ return indexRoute;
499
+ } else {
500
+ let pathOrLayoutRoute = _extends({}, route, mapRouteProperties(route), {
501
+ id,
502
+ children: undefined
503
+ });
504
+ manifest[id] = pathOrLayoutRoute;
505
+ if (route.children) {
506
+ pathOrLayoutRoute.children = convertRoutesToDataRoutes(route.children, mapRouteProperties, treePath, manifest);
507
+ }
508
+ return pathOrLayoutRoute;
509
+ }
510
+ });
511
+ }
512
+ /**
513
+ * Matches the given routes to a location and returns the match data.
514
+ *
515
+ * @see https://reactrouter.com/utils/match-routes
516
+ */
517
+ function matchRoutes(routes, locationArg, basename) {
518
+ if (basename === void 0) {
519
+ basename = "/";
520
+ }
521
+ let location = typeof locationArg === "string" ? parsePath(locationArg) : locationArg;
522
+ let pathname = stripBasename(location.pathname || "/", basename);
523
+ if (pathname == null) {
524
+ return null;
525
+ }
526
+ let branches = flattenRoutes(routes);
527
+ rankRouteBranches(branches);
528
+ let matches = null;
529
+ for (let i = 0; matches == null && i < branches.length; ++i) {
530
+ // Incoming pathnames are generally encoded from either window.location
531
+ // or from router.navigate, but we want to match against the unencoded
532
+ // paths in the route definitions. Memory router locations won't be
533
+ // encoded here but there also shouldn't be anything to decode so this
534
+ // should be a safe operation. This avoids needing matchRoutes to be
535
+ // history-aware.
536
+ let decoded = decodePath(pathname);
537
+ matches = matchRouteBranch(branches[i], decoded);
538
+ }
539
+ return matches;
540
+ }
541
+ function convertRouteMatchToUiMatch(match, loaderData) {
542
+ let {
543
+ route,
544
+ pathname,
545
+ params
546
+ } = match;
547
+ return {
548
+ id: route.id,
549
+ pathname,
550
+ params,
551
+ data: loaderData[route.id],
552
+ handle: route.handle
553
+ };
554
+ }
555
+ function flattenRoutes(routes, branches, parentsMeta, parentPath) {
556
+ if (branches === void 0) {
557
+ branches = [];
558
+ }
559
+ if (parentsMeta === void 0) {
560
+ parentsMeta = [];
561
+ }
562
+ if (parentPath === void 0) {
563
+ parentPath = "";
564
+ }
565
+ let flattenRoute = (route, index, relativePath) => {
566
+ let meta = {
567
+ relativePath: relativePath === undefined ? route.path || "" : relativePath,
568
+ caseSensitive: route.caseSensitive === true,
569
+ childrenIndex: index,
570
+ route
571
+ };
572
+ if (meta.relativePath.startsWith("/")) {
573
+ 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.");
574
+ meta.relativePath = meta.relativePath.slice(parentPath.length);
575
+ }
576
+ let path = joinPaths([parentPath, meta.relativePath]);
577
+ let routesMeta = parentsMeta.concat(meta);
578
+ // Add the children before adding this route to the array, so we traverse the
579
+ // route tree depth-first and child routes appear before their parents in
580
+ // the "flattened" version.
581
+ if (route.children && route.children.length > 0) {
582
+ invariant(
583
+ // Our types know better, but runtime JS may not!
584
+ // @ts-expect-error
585
+ route.index !== true, "Index routes must not have child routes. Please remove " + ("all child routes from route path \"" + path + "\"."));
586
+ flattenRoutes(route.children, branches, routesMeta, path);
587
+ }
588
+ // Routes without a path shouldn't ever match by themselves unless they are
589
+ // index routes, so don't add them to the list of possible branches.
590
+ if (route.path == null && !route.index) {
591
+ return;
592
+ }
593
+ branches.push({
594
+ path,
595
+ score: computeScore(path, route.index),
596
+ routesMeta
597
+ });
598
+ };
599
+ routes.forEach((route, index) => {
600
+ var _route$path;
601
+ // coarse-grain check for optional params
602
+ if (route.path === "" || !((_route$path = route.path) != null && _route$path.includes("?"))) {
603
+ flattenRoute(route, index);
604
+ } else {
605
+ for (let exploded of explodeOptionalSegments(route.path)) {
606
+ flattenRoute(route, index, exploded);
607
+ }
608
+ }
609
+ });
610
+ return branches;
611
+ }
612
+ /**
613
+ * Computes all combinations of optional path segments for a given path,
614
+ * excluding combinations that are ambiguous and of lower priority.
615
+ *
616
+ * For example, `/one/:two?/three/:four?/:five?` explodes to:
617
+ * - `/one/three`
618
+ * - `/one/:two/three`
619
+ * - `/one/three/:four`
620
+ * - `/one/three/:five`
621
+ * - `/one/:two/three/:four`
622
+ * - `/one/:two/three/:five`
623
+ * - `/one/three/:four/:five`
624
+ * - `/one/:two/three/:four/:five`
625
+ */
626
+ function explodeOptionalSegments(path) {
627
+ let segments = path.split("/");
628
+ if (segments.length === 0) return [];
629
+ let [first, ...rest] = segments;
630
+ // Optional path segments are denoted by a trailing `?`
631
+ let isOptional = first.endsWith("?");
632
+ // Compute the corresponding required segment: `foo?` -> `foo`
633
+ let required = first.replace(/\?$/, "");
634
+ if (rest.length === 0) {
635
+ // Intepret empty string as omitting an optional segment
636
+ // `["one", "", "three"]` corresponds to omitting `:two` from `/one/:two?/three` -> `/one/three`
637
+ return isOptional ? [required, ""] : [required];
638
+ }
639
+ let restExploded = explodeOptionalSegments(rest.join("/"));
640
+ let result = [];
641
+ // All child paths with the prefix. Do this for all children before the
642
+ // optional version for all children, so we get consistent ordering where the
643
+ // parent optional aspect is preferred as required. Otherwise, we can get
644
+ // child sections interspersed where deeper optional segments are higher than
645
+ // parent optional segments, where for example, /:two would explode _earlier_
646
+ // then /:one. By always including the parent as required _for all children_
647
+ // first, we avoid this issue
648
+ result.push(...restExploded.map(subpath => subpath === "" ? required : [required, subpath].join("/")));
649
+ // Then, if this is an optional value, add all child versions without
650
+ if (isOptional) {
651
+ result.push(...restExploded);
652
+ }
653
+ // for absolute paths, ensure `/` instead of empty segment
654
+ return result.map(exploded => path.startsWith("/") && exploded === "" ? "/" : exploded);
655
+ }
656
+ function rankRouteBranches(branches) {
657
+ branches.sort((a, b) => a.score !== b.score ? b.score - a.score // Higher score first
658
+ : compareIndexes(a.routesMeta.map(meta => meta.childrenIndex), b.routesMeta.map(meta => meta.childrenIndex)));
659
+ }
660
+ const paramRe = /^:[\w-]+$/;
661
+ const dynamicSegmentValue = 3;
662
+ const indexRouteValue = 2;
663
+ const emptySegmentValue = 1;
664
+ const staticSegmentValue = 10;
665
+ const splatPenalty = -2;
666
+ const isSplat = s => s === "*";
667
+ function computeScore(path, index) {
668
+ let segments = path.split("/");
669
+ let initialScore = segments.length;
670
+ if (segments.some(isSplat)) {
671
+ initialScore += splatPenalty;
672
+ }
673
+ if (index) {
674
+ initialScore += indexRouteValue;
675
+ }
676
+ return segments.filter(s => !isSplat(s)).reduce((score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === "" ? emptySegmentValue : staticSegmentValue), initialScore);
677
+ }
678
+ function compareIndexes(a, b) {
679
+ let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);
680
+ return siblings ?
681
+ // If two routes are siblings, we should try to match the earlier sibling
682
+ // first. This allows people to have fine-grained control over the matching
683
+ // behavior by simply putting routes with identical paths in the order they
684
+ // want them tried.
685
+ a[a.length - 1] - b[b.length - 1] :
686
+ // Otherwise, it doesn't really make sense to rank non-siblings by index,
687
+ // so they sort equally.
688
+ 0;
689
+ }
690
+ function matchRouteBranch(branch, pathname) {
691
+ let {
692
+ routesMeta
693
+ } = branch;
694
+ let matchedParams = {};
695
+ let matchedPathname = "/";
696
+ let matches = [];
697
+ for (let i = 0; i < routesMeta.length; ++i) {
698
+ let meta = routesMeta[i];
699
+ let end = i === routesMeta.length - 1;
700
+ let remainingPathname = matchedPathname === "/" ? pathname : pathname.slice(matchedPathname.length) || "/";
701
+ let match = matchPath({
702
+ path: meta.relativePath,
703
+ caseSensitive: meta.caseSensitive,
704
+ end
705
+ }, remainingPathname);
706
+ if (!match) return null;
707
+ Object.assign(matchedParams, match.params);
708
+ let route = meta.route;
709
+ matches.push({
710
+ // TODO: Can this as be avoided?
711
+ params: matchedParams,
712
+ pathname: joinPaths([matchedPathname, match.pathname]),
713
+ pathnameBase: normalizePathname(joinPaths([matchedPathname, match.pathnameBase])),
714
+ route
715
+ });
716
+ if (match.pathnameBase !== "/") {
717
+ matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);
718
+ }
719
+ }
720
+ return matches;
721
+ }
722
+ /**
723
+ * Returns a path with params interpolated.
724
+ *
725
+ * @see https://reactrouter.com/utils/generate-path
726
+ */
727
+ function generatePath(originalPath, params) {
728
+ if (params === void 0) {
729
+ params = {};
730
+ }
731
+ let path = originalPath;
732
+ if (path.endsWith("*") && path !== "*" && !path.endsWith("/*")) {
733
+ 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(/\*$/, "/*") + "\"."));
734
+ path = path.replace(/\*$/, "/*");
735
+ }
736
+ // ensure `/` is added at the beginning if the path is absolute
737
+ const prefix = path.startsWith("/") ? "/" : "";
738
+ const stringify = p => p == null ? "" : typeof p === "string" ? p : String(p);
739
+ const segments = path.split(/\/+/).map((segment, index, array) => {
740
+ const isLastSegment = index === array.length - 1;
741
+ // only apply the splat if it's the last segment
742
+ if (isLastSegment && segment === "*") {
743
+ const star = "*";
744
+ // Apply the splat
745
+ return stringify(params[star]);
746
+ }
747
+ const keyMatch = segment.match(/^:([\w-]+)(\??)$/);
748
+ if (keyMatch) {
749
+ const [, key, optional] = keyMatch;
750
+ let param = params[key];
751
+ invariant(optional === "?" || param != null, "Missing \":" + key + "\" param");
752
+ return stringify(param);
753
+ }
754
+ // Remove any optional markers from optional static segments
755
+ return segment.replace(/\?$/g, "");
756
+ })
757
+ // Remove empty segments
758
+ .filter(segment => !!segment);
759
+ return prefix + segments.join("/");
760
+ }
761
+ /**
762
+ * Performs pattern matching on a URL pathname and returns information about
763
+ * the match.
764
+ *
765
+ * @see https://reactrouter.com/utils/match-path
766
+ */
767
+ function matchPath(pattern, pathname) {
768
+ if (typeof pattern === "string") {
769
+ pattern = {
770
+ path: pattern,
771
+ caseSensitive: false,
772
+ end: true
773
+ };
774
+ }
775
+ let [matcher, compiledParams] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);
776
+ let match = pathname.match(matcher);
777
+ if (!match) return null;
778
+ let matchedPathname = match[0];
779
+ let pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1");
780
+ let captureGroups = match.slice(1);
781
+ let params = compiledParams.reduce((memo, _ref, index) => {
782
+ let {
783
+ paramName,
784
+ isOptional
785
+ } = _ref;
786
+ // We need to compute the pathnameBase here using the raw splat value
787
+ // instead of using params["*"] later because it will be decoded then
788
+ if (paramName === "*") {
789
+ let splatValue = captureGroups[index] || "";
790
+ pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, "$1");
791
+ }
792
+ const value = captureGroups[index];
793
+ if (isOptional && !value) {
794
+ memo[paramName] = undefined;
795
+ } else {
796
+ memo[paramName] = (value || "").replace(/%2F/g, "/");
797
+ }
798
+ return memo;
799
+ }, {});
800
+ return {
801
+ params,
802
+ pathname: matchedPathname,
803
+ pathnameBase,
804
+ pattern
805
+ };
806
+ }
807
+ function compilePath(path, caseSensitive, end) {
808
+ if (caseSensitive === void 0) {
809
+ caseSensitive = false;
810
+ }
811
+ if (end === void 0) {
812
+ end = true;
813
+ }
814
+ 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(/\*$/, "/*") + "\"."));
815
+ let params = [];
816
+ let regexpSource = "^" + path.replace(/\/*\*?$/, "") // Ignore trailing / and /*, we'll handle it below
817
+ .replace(/^\/*/, "/") // Make sure it has a leading /
818
+ .replace(/[\\.*+^${}|()[\]]/g, "\\$&") // Escape special regex chars
819
+ .replace(/\/:([\w-]+)(\?)?/g, (_, paramName, isOptional) => {
820
+ params.push({
821
+ paramName,
822
+ isOptional: isOptional != null
823
+ });
824
+ return isOptional ? "/?([^\\/]+)?" : "/([^\\/]+)";
825
+ });
826
+ if (path.endsWith("*")) {
827
+ params.push({
828
+ paramName: "*"
829
+ });
830
+ regexpSource += path === "*" || path === "/*" ? "(.*)$" // Already matched the initial /, just match the rest
831
+ : "(?:\\/(.+)|\\/*)$"; // Don't include the / in params["*"]
832
+ } else if (end) {
833
+ // When matching to the end, ignore trailing slashes
834
+ regexpSource += "\\/*$";
835
+ } else if (path !== "" && path !== "/") {
836
+ // If our path is non-empty and contains anything beyond an initial slash,
837
+ // then we have _some_ form of path in our regex, so we should expect to
838
+ // match only if we find the end of this path segment. Look for an optional
839
+ // non-captured trailing slash (to match a portion of the URL) or the end
840
+ // of the path (if we've matched to the end). We used to do this with a
841
+ // word boundary but that gives false positives on routes like
842
+ // /user-preferences since `-` counts as a word boundary.
843
+ regexpSource += "(?:(?=\\/|$))";
844
+ } else ;
845
+ let matcher = new RegExp(regexpSource, caseSensitive ? undefined : "i");
846
+ return [matcher, params];
847
+ }
848
+ function decodePath(value) {
849
+ try {
850
+ return value.split("/").map(v => decodeURIComponent(v).replace(/\//g, "%2F")).join("/");
851
+ } catch (error) {
852
+ 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 + ")."));
853
+ return value;
854
+ }
855
+ }
856
+ /**
857
+ * @private
858
+ */
859
+ function stripBasename(pathname, basename) {
860
+ if (basename === "/") return pathname;
861
+ if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {
862
+ return null;
863
+ }
864
+ // We want to leave trailing slash behavior in the user's control, so if they
865
+ // specify a basename with a trailing slash, we should support it
866
+ let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length;
867
+ let nextChar = pathname.charAt(startIndex);
868
+ if (nextChar && nextChar !== "/") {
869
+ // pathname does not start with basename/
870
+ return null;
871
+ }
872
+ return pathname.slice(startIndex) || "/";
873
+ }
874
+ /**
875
+ * Returns a resolved path object relative to the given pathname.
876
+ *
877
+ * @see https://reactrouter.com/utils/resolve-path
878
+ */
879
+ function resolvePath(to, fromPathname) {
880
+ if (fromPathname === void 0) {
881
+ fromPathname = "/";
882
+ }
883
+ let {
884
+ pathname: toPathname,
885
+ search = "",
886
+ hash = ""
887
+ } = typeof to === "string" ? parsePath(to) : to;
888
+ let pathname = toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;
889
+ return {
890
+ pathname,
891
+ search: normalizeSearch(search),
892
+ hash: normalizeHash(hash)
893
+ };
894
+ }
895
+ function resolvePathname(relativePath, fromPathname) {
896
+ let segments = fromPathname.replace(/\/+$/, "").split("/");
897
+ let relativeSegments = relativePath.split("/");
898
+ relativeSegments.forEach(segment => {
899
+ if (segment === "..") {
900
+ // Keep the root "" segment so the pathname starts at /
901
+ if (segments.length > 1) segments.pop();
902
+ } else if (segment !== ".") {
903
+ segments.push(segment);
904
+ }
905
+ });
906
+ return segments.length > 1 ? segments.join("/") : "/";
907
+ }
908
+ function getInvalidPathError(char, field, dest, path) {
909
+ 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.";
910
+ }
911
+ /**
912
+ * @private
913
+ *
914
+ * When processing relative navigation we want to ignore ancestor routes that
915
+ * do not contribute to the path, such that index/pathless layout routes don't
916
+ * interfere.
917
+ *
918
+ * For example, when moving a route element into an index route and/or a
919
+ * pathless layout route, relative link behavior contained within should stay
920
+ * the same. Both of the following examples should link back to the root:
921
+ *
922
+ * <Route path="/">
923
+ * <Route path="accounts" element={<Link to=".."}>
924
+ * </Route>
925
+ *
926
+ * <Route path="/">
927
+ * <Route path="accounts">
928
+ * <Route element={<AccountsLayout />}> // <-- Does not contribute
929
+ * <Route index element={<Link to=".."} /> // <-- Does not contribute
930
+ * </Route
931
+ * </Route>
932
+ * </Route>
933
+ */
934
+ function getPathContributingMatches(matches) {
935
+ return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);
936
+ }
937
+ // Return the array of pathnames for the current route matches - used to
938
+ // generate the routePathnames input for resolveTo()
939
+ function getResolveToMatches(matches, v7_relativeSplatPath) {
940
+ let pathMatches = getPathContributingMatches(matches);
941
+ // When v7_relativeSplatPath is enabled, use the full pathname for the leaf
942
+ // match so we include splat values for "." links. See:
943
+ // https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329
944
+ if (v7_relativeSplatPath) {
945
+ return pathMatches.map((match, idx) => idx === matches.length - 1 ? match.pathname : match.pathnameBase);
946
+ }
947
+ return pathMatches.map(match => match.pathnameBase);
948
+ }
949
+ /**
950
+ * @private
951
+ */
952
+ function resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {
953
+ if (isPathRelative === void 0) {
954
+ isPathRelative = false;
955
+ }
956
+ let to;
957
+ if (typeof toArg === "string") {
958
+ to = parsePath(toArg);
959
+ } else {
960
+ to = _extends({}, toArg);
961
+ invariant(!to.pathname || !to.pathname.includes("?"), getInvalidPathError("?", "pathname", "search", to));
962
+ invariant(!to.pathname || !to.pathname.includes("#"), getInvalidPathError("#", "pathname", "hash", to));
963
+ invariant(!to.search || !to.search.includes("#"), getInvalidPathError("#", "search", "hash", to));
964
+ }
965
+ let isEmptyPath = toArg === "" || to.pathname === "";
966
+ let toPathname = isEmptyPath ? "/" : to.pathname;
967
+ let from;
968
+ // Routing is relative to the current pathname if explicitly requested.
969
+ //
970
+ // If a pathname is explicitly provided in `to`, it should be relative to the
971
+ // route context. This is explained in `Note on `<Link to>` values` in our
972
+ // migration guide from v5 as a means of disambiguation between `to` values
973
+ // that begin with `/` and those that do not. However, this is problematic for
974
+ // `to` values that do not provide a pathname. `to` can simply be a search or
975
+ // hash string, in which case we should assume that the navigation is relative
976
+ // to the current location's pathname and *not* the route pathname.
977
+ if (toPathname == null) {
978
+ from = locationPathname;
979
+ } else {
980
+ let routePathnameIndex = routePathnames.length - 1;
981
+ // With relative="route" (the default), each leading .. segment means
982
+ // "go up one route" instead of "go up one URL segment". This is a key
983
+ // difference from how <a href> works and a major reason we call this a
984
+ // "to" value instead of a "href".
985
+ if (!isPathRelative && toPathname.startsWith("..")) {
986
+ let toSegments = toPathname.split("/");
987
+ while (toSegments[0] === "..") {
988
+ toSegments.shift();
989
+ routePathnameIndex -= 1;
990
+ }
991
+ to.pathname = toSegments.join("/");
992
+ }
993
+ from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";
994
+ }
995
+ let path = resolvePath(to, from);
996
+ // Ensure the pathname has a trailing slash if the original "to" had one
997
+ let hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/");
998
+ // Or if this was a link to the current path which has a trailing slash
999
+ let hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/");
1000
+ if (!path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {
1001
+ path.pathname += "/";
1002
+ }
1003
+ return path;
1004
+ }
1005
+ /**
1006
+ * @private
1007
+ */
1008
+ function getToPathname(to) {
1009
+ // Empty strings should be treated the same as / paths
1010
+ return to === "" || to.pathname === "" ? "/" : typeof to === "string" ? parsePath(to).pathname : to.pathname;
1011
+ }
1012
+ /**
1013
+ * @private
1014
+ */
1015
+ const joinPaths = paths => paths.join("/").replace(/\/\/+/g, "/");
1016
+ /**
1017
+ * @private
1018
+ */
1019
+ const normalizePathname = pathname => pathname.replace(/\/+$/, "").replace(/^\/*/, "/");
1020
+ /**
1021
+ * @private
1022
+ */
1023
+ const normalizeSearch = search => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
1024
+ /**
1025
+ * @private
1026
+ */
1027
+ const normalizeHash = hash => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
1028
+ /**
1029
+ * This is a shortcut for creating `application/json` responses. Converts `data`
1030
+ * to JSON and sets the `Content-Type` header.
1031
+ */
1032
+ const json = function json(data, init) {
1033
+ if (init === void 0) {
1034
+ init = {};
1035
+ }
1036
+ let responseInit = typeof init === "number" ? {
1037
+ status: init
1038
+ } : init;
1039
+ let headers = new Headers(responseInit.headers);
1040
+ if (!headers.has("Content-Type")) {
1041
+ headers.set("Content-Type", "application/json; charset=utf-8");
1042
+ }
1043
+ return new Response(JSON.stringify(data), _extends({}, responseInit, {
1044
+ headers
1045
+ }));
1046
+ };
1047
+ class AbortedDeferredError extends Error {}
1048
+ class DeferredData {
1049
+ constructor(data, responseInit) {
1050
+ this.pendingKeysSet = new Set();
1051
+ this.subscribers = new Set();
1052
+ this.deferredKeys = [];
1053
+ invariant(data && typeof data === "object" && !Array.isArray(data), "defer() only accepts plain objects");
1054
+ // Set up an AbortController + Promise we can race against to exit early
1055
+ // cancellation
1056
+ let reject;
1057
+ this.abortPromise = new Promise((_, r) => reject = r);
1058
+ this.controller = new AbortController();
1059
+ let onAbort = () => reject(new AbortedDeferredError("Deferred data aborted"));
1060
+ this.unlistenAbortSignal = () => this.controller.signal.removeEventListener("abort", onAbort);
1061
+ this.controller.signal.addEventListener("abort", onAbort);
1062
+ this.data = Object.entries(data).reduce((acc, _ref2) => {
1063
+ let [key, value] = _ref2;
1064
+ return Object.assign(acc, {
1065
+ [key]: this.trackPromise(key, value)
1066
+ });
1067
+ }, {});
1068
+ if (this.done) {
1069
+ // All incoming values were resolved
1070
+ this.unlistenAbortSignal();
1071
+ }
1072
+ this.init = responseInit;
1073
+ }
1074
+ trackPromise(key, value) {
1075
+ if (!(value instanceof Promise)) {
1076
+ return value;
1077
+ }
1078
+ this.deferredKeys.push(key);
1079
+ this.pendingKeysSet.add(key);
1080
+ // We store a little wrapper promise that will be extended with
1081
+ // _data/_error props upon resolve/reject
1082
+ let promise = Promise.race([value, this.abortPromise]).then(data => this.onSettle(promise, key, undefined, data), error => this.onSettle(promise, key, error));
1083
+ // Register rejection listeners to avoid uncaught promise rejections on
1084
+ // errors or aborted deferred values
1085
+ promise.catch(() => {});
1086
+ Object.defineProperty(promise, "_tracked", {
1087
+ get: () => true
1088
+ });
1089
+ return promise;
1090
+ }
1091
+ onSettle(promise, key, error, data) {
1092
+ if (this.controller.signal.aborted && error instanceof AbortedDeferredError) {
1093
+ this.unlistenAbortSignal();
1094
+ Object.defineProperty(promise, "_error", {
1095
+ get: () => error
1096
+ });
1097
+ return Promise.reject(error);
1098
+ }
1099
+ this.pendingKeysSet.delete(key);
1100
+ if (this.done) {
1101
+ // Nothing left to abort!
1102
+ this.unlistenAbortSignal();
1103
+ }
1104
+ // If the promise was resolved/rejected with undefined, we'll throw an error as you
1105
+ // should always resolve with a value or null
1106
+ if (error === undefined && data === undefined) {
1107
+ let undefinedError = new Error("Deferred data for key \"" + key + "\" resolved/rejected with `undefined`, " + "you must resolve/reject with a value or `null`.");
1108
+ Object.defineProperty(promise, "_error", {
1109
+ get: () => undefinedError
1110
+ });
1111
+ this.emit(false, key);
1112
+ return Promise.reject(undefinedError);
1113
+ }
1114
+ if (data === undefined) {
1115
+ Object.defineProperty(promise, "_error", {
1116
+ get: () => error
1117
+ });
1118
+ this.emit(false, key);
1119
+ return Promise.reject(error);
1120
+ }
1121
+ Object.defineProperty(promise, "_data", {
1122
+ get: () => data
1123
+ });
1124
+ this.emit(false, key);
1125
+ return data;
1126
+ }
1127
+ emit(aborted, settledKey) {
1128
+ this.subscribers.forEach(subscriber => subscriber(aborted, settledKey));
1129
+ }
1130
+ subscribe(fn) {
1131
+ this.subscribers.add(fn);
1132
+ return () => this.subscribers.delete(fn);
1133
+ }
1134
+ cancel() {
1135
+ this.controller.abort();
1136
+ this.pendingKeysSet.forEach((v, k) => this.pendingKeysSet.delete(k));
1137
+ this.emit(true);
1138
+ }
1139
+ async resolveData(signal) {
1140
+ let aborted = false;
1141
+ if (!this.done) {
1142
+ let onAbort = () => this.cancel();
1143
+ signal.addEventListener("abort", onAbort);
1144
+ aborted = await new Promise(resolve => {
1145
+ this.subscribe(aborted => {
1146
+ signal.removeEventListener("abort", onAbort);
1147
+ if (aborted || this.done) {
1148
+ resolve(aborted);
1149
+ }
1150
+ });
1151
+ });
1152
+ }
1153
+ return aborted;
1154
+ }
1155
+ get done() {
1156
+ return this.pendingKeysSet.size === 0;
1157
+ }
1158
+ get unwrappedData() {
1159
+ invariant(this.data !== null && this.done, "Can only unwrap data on initialized and settled deferreds");
1160
+ return Object.entries(this.data).reduce((acc, _ref3) => {
1161
+ let [key, value] = _ref3;
1162
+ return Object.assign(acc, {
1163
+ [key]: unwrapTrackedPromise(value)
1164
+ });
1165
+ }, {});
1166
+ }
1167
+ get pendingKeys() {
1168
+ return Array.from(this.pendingKeysSet);
1169
+ }
1170
+ }
1171
+ function isTrackedPromise(value) {
1172
+ return value instanceof Promise && value._tracked === true;
1173
+ }
1174
+ function unwrapTrackedPromise(value) {
1175
+ if (!isTrackedPromise(value)) {
1176
+ return value;
1177
+ }
1178
+ if (value._error) {
1179
+ throw value._error;
1180
+ }
1181
+ return value._data;
1182
+ }
1183
+ const defer = function defer(data, init) {
1184
+ if (init === void 0) {
1185
+ init = {};
1186
+ }
1187
+ let responseInit = typeof init === "number" ? {
1188
+ status: init
1189
+ } : init;
1190
+ return new DeferredData(data, responseInit);
1191
+ };
1192
+ /**
1193
+ * A redirect response. Sets the status code and the `Location` header.
1194
+ * Defaults to "302 Found".
1195
+ */
1196
+ const redirect = function redirect(url, init) {
1197
+ if (init === void 0) {
1198
+ init = 302;
1199
+ }
1200
+ let responseInit = init;
1201
+ if (typeof responseInit === "number") {
1202
+ responseInit = {
1203
+ status: responseInit
1204
+ };
1205
+ } else if (typeof responseInit.status === "undefined") {
1206
+ responseInit.status = 302;
1207
+ }
1208
+ let headers = new Headers(responseInit.headers);
1209
+ headers.set("Location", url);
1210
+ return new Response(null, _extends({}, responseInit, {
1211
+ headers
1212
+ }));
1213
+ };
1214
+ /**
1215
+ * A redirect response that will force a document reload to the new location.
1216
+ * Sets the status code and the `Location` header.
1217
+ * Defaults to "302 Found".
1218
+ */
1219
+ const redirectDocument = (url, init) => {
1220
+ let response = redirect(url, init);
1221
+ response.headers.set("X-Remix-Reload-Document", "true");
1222
+ return response;
1223
+ };
1224
+ /**
1225
+ * @private
1226
+ * Utility class we use to hold auto-unwrapped 4xx/5xx Response bodies
1227
+ *
1228
+ * We don't export the class for public use since it's an implementation
1229
+ * detail, but we export the interface above so folks can build their own
1230
+ * abstractions around instances via isRouteErrorResponse()
1231
+ */
1232
+ class ErrorResponseImpl {
1233
+ constructor(status, statusText, data, internal) {
1234
+ if (internal === void 0) {
1235
+ internal = false;
1236
+ }
1237
+ this.status = status;
1238
+ this.statusText = statusText || "";
1239
+ this.internal = internal;
1240
+ if (data instanceof Error) {
1241
+ this.data = data.toString();
1242
+ this.error = data;
1243
+ } else {
1244
+ this.data = data;
1245
+ }
1246
+ }
1247
+ }
1248
+ /**
1249
+ * Check if the given error is an ErrorResponse generated from a 4xx/5xx
1250
+ * Response thrown from an action/loader
1251
+ */
1252
+ function isRouteErrorResponse(error) {
1253
+ return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
1254
+ }
1255
+
1256
+ const validMutationMethodsArr = ["post", "put", "patch", "delete"];
1257
+ const validMutationMethods = new Set(validMutationMethodsArr);
1258
+ const validRequestMethodsArr = ["get", ...validMutationMethodsArr];
1259
+ const validRequestMethods = new Set(validRequestMethodsArr);
1260
+ const redirectStatusCodes = new Set([301, 302, 303, 307, 308]);
1261
+ const redirectPreserveMethodStatusCodes = new Set([307, 308]);
1262
+ const IDLE_NAVIGATION = {
1263
+ state: "idle",
1264
+ location: undefined,
1265
+ formMethod: undefined,
1266
+ formAction: undefined,
1267
+ formEncType: undefined,
1268
+ formData: undefined,
1269
+ json: undefined,
1270
+ text: undefined
1271
+ };
1272
+ const IDLE_FETCHER = {
1273
+ state: "idle",
1274
+ data: undefined,
1275
+ formMethod: undefined,
1276
+ formAction: undefined,
1277
+ formEncType: undefined,
1278
+ formData: undefined,
1279
+ json: undefined,
1280
+ text: undefined
1281
+ };
1282
+ const IDLE_BLOCKER = {
1283
+ state: "unblocked",
1284
+ proceed: undefined,
1285
+ reset: undefined,
1286
+ location: undefined
1287
+ };
1288
+ const ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
1289
+ const defaultMapRouteProperties = route => ({
1290
+ hasErrorBoundary: Boolean(route.hasErrorBoundary)
1291
+ });
1292
+ const TRANSITIONS_STORAGE_KEY = "remix-router-transitions";
1293
+ //#endregion
1294
+ ////////////////////////////////////////////////////////////////////////////////
1295
+ //#region createRouter
1296
+ ////////////////////////////////////////////////////////////////////////////////
1297
+ /**
1298
+ * Create a router and listen to history POP navigations
1299
+ */
1300
+ function createRouter(init) {
1301
+ const routerWindow = init.window ? init.window : typeof window !== "undefined" ? window : undefined;
1302
+ const isBrowser = typeof routerWindow !== "undefined" && typeof routerWindow.document !== "undefined" && typeof routerWindow.document.createElement !== "undefined";
1303
+ const isServer = !isBrowser;
1304
+ invariant(init.routes.length > 0, "You must provide a non-empty routes array to createRouter");
1305
+ let mapRouteProperties;
1306
+ if (init.mapRouteProperties) {
1307
+ mapRouteProperties = init.mapRouteProperties;
1308
+ } else if (init.detectErrorBoundary) {
1309
+ // If they are still using the deprecated version, wrap it with the new API
1310
+ let detectErrorBoundary = init.detectErrorBoundary;
1311
+ mapRouteProperties = route => ({
1312
+ hasErrorBoundary: detectErrorBoundary(route)
1313
+ });
1314
+ } else {
1315
+ mapRouteProperties = defaultMapRouteProperties;
1316
+ }
1317
+ // Routes keyed by ID
1318
+ let manifest = {};
1319
+ // Routes in tree format for matching
1320
+ let dataRoutes = convertRoutesToDataRoutes(init.routes, mapRouteProperties, undefined, manifest);
1321
+ let inFlightDataRoutes;
1322
+ let basename = init.basename || "/";
1323
+ // Config driven behavior flags
1324
+ let future = _extends({
1325
+ v7_fetcherPersist: false,
1326
+ v7_normalizeFormMethod: false,
1327
+ v7_partialHydration: false,
1328
+ v7_prependBasename: false,
1329
+ v7_relativeSplatPath: false
1330
+ }, init.future);
1331
+ // Cleanup function for history
1332
+ let unlistenHistory = null;
1333
+ // Externally-provided functions to call on all state changes
1334
+ let subscribers = new Set();
1335
+ // Externally-provided object to hold scroll restoration locations during routing
1336
+ let savedScrollPositions = null;
1337
+ // Externally-provided function to get scroll restoration keys
1338
+ let getScrollRestorationKey = null;
1339
+ // Externally-provided function to get current scroll position
1340
+ let getScrollPosition = null;
1341
+ // One-time flag to control the initial hydration scroll restoration. Because
1342
+ // we don't get the saved positions from <ScrollRestoration /> until _after_
1343
+ // the initial render, we need to manually trigger a separate updateState to
1344
+ // send along the restoreScrollPosition
1345
+ // Set to true if we have `hydrationData` since we assume we were SSR'd and that
1346
+ // SSR did the initial scroll restoration.
1347
+ let initialScrollRestored = init.hydrationData != null;
1348
+ let initialMatches = matchRoutes(dataRoutes, init.history.location, basename);
1349
+ let initialErrors = null;
1350
+ if (initialMatches == null) {
1351
+ // If we do not match a user-provided-route, fall back to the root
1352
+ // to allow the error boundary to take over
1353
+ let error = getInternalRouterError(404, {
1354
+ pathname: init.history.location.pathname
1355
+ });
1356
+ let {
1357
+ matches,
1358
+ route
1359
+ } = getShortCircuitMatches(dataRoutes);
1360
+ initialMatches = matches;
1361
+ initialErrors = {
1362
+ [route.id]: error
1363
+ };
1364
+ }
1365
+ let initialized;
1366
+ let hasLazyRoutes = initialMatches.some(m => m.route.lazy);
1367
+ let hasLoaders = initialMatches.some(m => m.route.loader);
1368
+ if (hasLazyRoutes) {
1369
+ // All initialMatches need to be loaded before we're ready. If we have lazy
1370
+ // functions around still then we'll need to run them in initialize()
1371
+ initialized = false;
1372
+ } else if (!hasLoaders) {
1373
+ // If we've got no loaders to run, then we're good to go
1374
+ initialized = true;
1375
+ } else if (future.v7_partialHydration) {
1376
+ // If partial hydration is enabled, we're initialized so long as we were
1377
+ // provided with hydrationData for every route with a loader, and no loaders
1378
+ // were marked for explicit hydration
1379
+ let loaderData = init.hydrationData ? init.hydrationData.loaderData : null;
1380
+ let errors = init.hydrationData ? init.hydrationData.errors : null;
1381
+ let isRouteInitialized = m => {
1382
+ // No loader, nothing to initialize
1383
+ if (!m.route.loader) return true;
1384
+ // Explicitly opting-in to running on hydration
1385
+ if (m.route.loader.hydrate === true) return false;
1386
+ // Otherwise, initialized if hydrated with data or an error
1387
+ return loaderData && loaderData[m.route.id] !== undefined || errors && errors[m.route.id] !== undefined;
1388
+ };
1389
+ // If errors exist, don't consider routes below the boundary
1390
+ if (errors) {
1391
+ let idx = initialMatches.findIndex(m => errors[m.route.id] !== undefined);
1392
+ initialized = initialMatches.slice(0, idx + 1).every(isRouteInitialized);
1393
+ } else {
1394
+ initialized = initialMatches.every(isRouteInitialized);
1395
+ }
1396
+ } else {
1397
+ // Without partial hydration - we're initialized if we were provided any
1398
+ // hydrationData - which is expected to be complete
1399
+ initialized = init.hydrationData != null;
1400
+ }
1401
+ let router;
1402
+ let state = {
1403
+ historyAction: init.history.action,
1404
+ location: init.history.location,
1405
+ matches: initialMatches,
1406
+ initialized,
1407
+ navigation: IDLE_NAVIGATION,
1408
+ // Don't restore on initial updateState() if we were SSR'd
1409
+ restoreScrollPosition: init.hydrationData != null ? false : null,
1410
+ preventScrollReset: false,
1411
+ revalidation: "idle",
1412
+ loaderData: init.hydrationData && init.hydrationData.loaderData || {},
1413
+ actionData: init.hydrationData && init.hydrationData.actionData || null,
1414
+ errors: init.hydrationData && init.hydrationData.errors || initialErrors,
1415
+ fetchers: new Map(),
1416
+ blockers: new Map()
1417
+ };
1418
+ // -- Stateful internal variables to manage navigations --
1419
+ // Current navigation in progress (to be committed in completeNavigation)
1420
+ let pendingAction = Action.Pop;
1421
+ // Should the current navigation prevent the scroll reset if scroll cannot
1422
+ // be restored?
1423
+ let pendingPreventScrollReset = false;
1424
+ // AbortController for the active navigation
1425
+ let pendingNavigationController;
1426
+ // Should the current navigation enable document.startViewTransition?
1427
+ let pendingViewTransitionEnabled = false;
1428
+ // Store applied view transitions so we can apply them on POP
1429
+ let appliedViewTransitions = new Map();
1430
+ // Cleanup function for persisting applied transitions to sessionStorage
1431
+ let removePageHideEventListener = null;
1432
+ // We use this to avoid touching history in completeNavigation if a
1433
+ // revalidation is entirely uninterrupted
1434
+ let isUninterruptedRevalidation = false;
1435
+ // Use this internal flag to force revalidation of all loaders:
1436
+ // - submissions (completed or interrupted)
1437
+ // - useRevalidator()
1438
+ // - X-Remix-Revalidate (from redirect)
1439
+ let isRevalidationRequired = false;
1440
+ // Use this internal array to capture routes that require revalidation due
1441
+ // to a cancelled deferred on action submission
1442
+ let cancelledDeferredRoutes = [];
1443
+ // Use this internal array to capture fetcher loads that were cancelled by an
1444
+ // action navigation and require revalidation
1445
+ let cancelledFetcherLoads = [];
1446
+ // AbortControllers for any in-flight fetchers
1447
+ let fetchControllers = new Map();
1448
+ // Track loads based on the order in which they started
1449
+ let incrementingLoadId = 0;
1450
+ // Track the outstanding pending navigation data load to be compared against
1451
+ // the globally incrementing load when a fetcher load lands after a completed
1452
+ // navigation
1453
+ let pendingNavigationLoadId = -1;
1454
+ // Fetchers that triggered data reloads as a result of their actions
1455
+ let fetchReloadIds = new Map();
1456
+ // Fetchers that triggered redirect navigations
1457
+ let fetchRedirectIds = new Set();
1458
+ // Most recent href/match for fetcher.load calls for fetchers
1459
+ let fetchLoadMatches = new Map();
1460
+ // Ref-count mounted fetchers so we know when it's ok to clean them up
1461
+ let activeFetchers = new Map();
1462
+ // Fetchers that have requested a delete when using v7_fetcherPersist,
1463
+ // they'll be officially removed after they return to idle
1464
+ let deletedFetchers = new Set();
1465
+ // Store DeferredData instances for active route matches. When a
1466
+ // route loader returns defer() we stick one in here. Then, when a nested
1467
+ // promise resolves we update loaderData. If a new navigation starts we
1468
+ // cancel active deferreds for eliminated routes.
1469
+ let activeDeferreds = new Map();
1470
+ // Store blocker functions in a separate Map outside of router state since
1471
+ // we don't need to update UI state if they change
1472
+ let blockerFunctions = new Map();
1473
+ // Flag to ignore the next history update, so we can revert the URL change on
1474
+ // a POP navigation that was blocked by the user without touching router state
1475
+ let ignoreNextHistoryUpdate = false;
1476
+ // Initialize the router, all side effects should be kicked off from here.
1477
+ // Implemented as a Fluent API for ease of:
1478
+ // let router = createRouter(init).initialize();
1479
+ function initialize() {
1480
+ // If history informs us of a POP navigation, start the navigation but do not update
1481
+ // state. We'll update our own state once the navigation completes
1482
+ unlistenHistory = init.history.listen(_ref => {
1483
+ let {
1484
+ action: historyAction,
1485
+ location,
1486
+ delta
1487
+ } = _ref;
1488
+ // Ignore this event if it was just us resetting the URL from a
1489
+ // blocked POP navigation
1490
+ if (ignoreNextHistoryUpdate) {
1491
+ ignoreNextHistoryUpdate = false;
1492
+ return;
1493
+ }
1494
+ 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.");
1495
+ let blockerKey = shouldBlockNavigation({
1496
+ currentLocation: state.location,
1497
+ nextLocation: location,
1498
+ historyAction
1499
+ });
1500
+ if (blockerKey && delta != null) {
1501
+ // Restore the URL to match the current UI, but don't update router state
1502
+ ignoreNextHistoryUpdate = true;
1503
+ init.history.go(delta * -1);
1504
+ // Put the blocker into a blocked state
1505
+ updateBlocker(blockerKey, {
1506
+ state: "blocked",
1507
+ location,
1508
+ proceed() {
1509
+ updateBlocker(blockerKey, {
1510
+ state: "proceeding",
1511
+ proceed: undefined,
1512
+ reset: undefined,
1513
+ location
1514
+ });
1515
+ // Re-do the same POP navigation we just blocked
1516
+ init.history.go(delta);
1517
+ },
1518
+ reset() {
1519
+ let blockers = new Map(state.blockers);
1520
+ blockers.set(blockerKey, IDLE_BLOCKER);
1521
+ updateState({
1522
+ blockers
1523
+ });
1524
+ }
1525
+ });
1526
+ return;
1527
+ }
1528
+ return startNavigation(historyAction, location);
1529
+ });
1530
+ if (isBrowser) {
1531
+ // FIXME: This feels gross. How can we cleanup the lines between
1532
+ // scrollRestoration/appliedTransitions persistance?
1533
+ restoreAppliedTransitions(routerWindow, appliedViewTransitions);
1534
+ let _saveAppliedTransitions = () => persistAppliedTransitions(routerWindow, appliedViewTransitions);
1535
+ routerWindow.addEventListener("pagehide", _saveAppliedTransitions);
1536
+ removePageHideEventListener = () => routerWindow.removeEventListener("pagehide", _saveAppliedTransitions);
1537
+ }
1538
+ // Kick off initial data load if needed. Use Pop to avoid modifying history
1539
+ // Note we don't do any handling of lazy here. For SPA's it'll get handled
1540
+ // in the normal navigation flow. For SSR it's expected that lazy modules are
1541
+ // resolved prior to router creation since we can't go into a fallbackElement
1542
+ // UI for SSR'd apps
1543
+ if (!state.initialized) {
1544
+ startNavigation(Action.Pop, state.location, {
1545
+ initialHydration: true
1546
+ });
1547
+ }
1548
+ return router;
1549
+ }
1550
+ // Clean up a router and it's side effects
1551
+ function dispose() {
1552
+ if (unlistenHistory) {
1553
+ unlistenHistory();
1554
+ }
1555
+ if (removePageHideEventListener) {
1556
+ removePageHideEventListener();
1557
+ }
1558
+ subscribers.clear();
1559
+ pendingNavigationController && pendingNavigationController.abort();
1560
+ state.fetchers.forEach((_, key) => deleteFetcher(key));
1561
+ state.blockers.forEach((_, key) => deleteBlocker(key));
1562
+ }
1563
+ // Subscribe to state updates for the router
1564
+ function subscribe(fn) {
1565
+ subscribers.add(fn);
1566
+ return () => subscribers.delete(fn);
1567
+ }
1568
+ // Update our state and notify the calling context of the change
1569
+ function updateState(newState, opts) {
1570
+ if (opts === void 0) {
1571
+ opts = {};
1572
+ }
1573
+ state = _extends({}, state, newState);
1574
+ // Prep fetcher cleanup so we can tell the UI which fetcher data entries
1575
+ // can be removed
1576
+ let completedFetchers = [];
1577
+ let deletedFetchersKeys = [];
1578
+ if (future.v7_fetcherPersist) {
1579
+ state.fetchers.forEach((fetcher, key) => {
1580
+ if (fetcher.state === "idle") {
1581
+ if (deletedFetchers.has(key)) {
1582
+ // Unmounted from the UI and can be totally removed
1583
+ deletedFetchersKeys.push(key);
1584
+ } else {
1585
+ // Returned to idle but still mounted in the UI, so semi-remains for
1586
+ // revalidations and such
1587
+ completedFetchers.push(key);
1588
+ }
1589
+ }
1590
+ });
1591
+ }
1592
+ // Iterate over a local copy so that if flushSync is used and we end up
1593
+ // removing and adding a new subscriber due to the useCallback dependencies,
1594
+ // we don't get ourselves into a loop calling the new subscriber immediately
1595
+ [...subscribers].forEach(subscriber => subscriber(state, {
1596
+ deletedFetchers: deletedFetchersKeys,
1597
+ unstable_viewTransitionOpts: opts.viewTransitionOpts,
1598
+ unstable_flushSync: opts.flushSync === true
1599
+ }));
1600
+ // Remove idle fetchers from state since we only care about in-flight fetchers.
1601
+ if (future.v7_fetcherPersist) {
1602
+ completedFetchers.forEach(key => state.fetchers.delete(key));
1603
+ deletedFetchersKeys.forEach(key => deleteFetcher(key));
1604
+ }
1605
+ }
1606
+ // Complete a navigation returning the state.navigation back to the IDLE_NAVIGATION
1607
+ // and setting state.[historyAction/location/matches] to the new route.
1608
+ // - Location is a required param
1609
+ // - Navigation will always be set to IDLE_NAVIGATION
1610
+ // - Can pass any other state in newState
1611
+ function completeNavigation(location, newState, _temp) {
1612
+ var _location$state, _location$state2;
1613
+ let {
1614
+ flushSync
1615
+ } = _temp === void 0 ? {} : _temp;
1616
+ // Deduce if we're in a loading/actionReload state:
1617
+ // - We have committed actionData in the store
1618
+ // - The current navigation was a mutation submission
1619
+ // - We're past the submitting state and into the loading state
1620
+ // - The location being loaded is not the result of a redirect
1621
+ 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;
1622
+ let actionData;
1623
+ if (newState.actionData) {
1624
+ if (Object.keys(newState.actionData).length > 0) {
1625
+ actionData = newState.actionData;
1626
+ } else {
1627
+ // Empty actionData -> clear prior actionData due to an action error
1628
+ actionData = null;
1629
+ }
1630
+ } else if (isActionReload) {
1631
+ // Keep the current data if we're wrapping up the action reload
1632
+ actionData = state.actionData;
1633
+ } else {
1634
+ // Clear actionData on any other completed navigations
1635
+ actionData = null;
1636
+ }
1637
+ // Always preserve any existing loaderData from re-used routes
1638
+ let loaderData = newState.loaderData ? mergeLoaderData(state.loaderData, newState.loaderData, newState.matches || [], newState.errors) : state.loaderData;
1639
+ // On a successful navigation we can assume we got through all blockers
1640
+ // so we can start fresh
1641
+ let blockers = state.blockers;
1642
+ if (blockers.size > 0) {
1643
+ blockers = new Map(blockers);
1644
+ blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER));
1645
+ }
1646
+ // Always respect the user flag. Otherwise don't reset on mutation
1647
+ // submission navigations unless they redirect
1648
+ let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && ((_location$state2 = location.state) == null ? void 0 : _location$state2._isRedirect) !== true;
1649
+ if (inFlightDataRoutes) {
1650
+ dataRoutes = inFlightDataRoutes;
1651
+ inFlightDataRoutes = undefined;
1652
+ }
1653
+ if (isUninterruptedRevalidation) ; else if (pendingAction === Action.Pop) ; else if (pendingAction === Action.Push) {
1654
+ init.history.push(location, location.state);
1655
+ } else if (pendingAction === Action.Replace) {
1656
+ init.history.replace(location, location.state);
1657
+ }
1658
+ let viewTransitionOpts;
1659
+ // On POP, enable transitions if they were enabled on the original navigation
1660
+ if (pendingAction === Action.Pop) {
1661
+ // Forward takes precedence so they behave like the original navigation
1662
+ let priorPaths = appliedViewTransitions.get(state.location.pathname);
1663
+ if (priorPaths && priorPaths.has(location.pathname)) {
1664
+ viewTransitionOpts = {
1665
+ currentLocation: state.location,
1666
+ nextLocation: location
1667
+ };
1668
+ } else if (appliedViewTransitions.has(location.pathname)) {
1669
+ // If we don't have a previous forward nav, assume we're popping back to
1670
+ // the new location and enable if that location previously enabled
1671
+ viewTransitionOpts = {
1672
+ currentLocation: location,
1673
+ nextLocation: state.location
1674
+ };
1675
+ }
1676
+ } else if (pendingViewTransitionEnabled) {
1677
+ // Store the applied transition on PUSH/REPLACE
1678
+ let toPaths = appliedViewTransitions.get(state.location.pathname);
1679
+ if (toPaths) {
1680
+ toPaths.add(location.pathname);
1681
+ } else {
1682
+ toPaths = new Set([location.pathname]);
1683
+ appliedViewTransitions.set(state.location.pathname, toPaths);
1684
+ }
1685
+ viewTransitionOpts = {
1686
+ currentLocation: state.location,
1687
+ nextLocation: location
1688
+ };
1689
+ }
1690
+ updateState(_extends({}, newState, {
1691
+ actionData,
1692
+ loaderData,
1693
+ historyAction: pendingAction,
1694
+ location,
1695
+ initialized: true,
1696
+ navigation: IDLE_NAVIGATION,
1697
+ revalidation: "idle",
1698
+ restoreScrollPosition: getSavedScrollPosition(location, newState.matches || state.matches),
1699
+ preventScrollReset,
1700
+ blockers
1701
+ }), {
1702
+ viewTransitionOpts,
1703
+ flushSync: flushSync === true
1704
+ });
1705
+ // Reset stateful navigation vars
1706
+ pendingAction = Action.Pop;
1707
+ pendingPreventScrollReset = false;
1708
+ pendingViewTransitionEnabled = false;
1709
+ isUninterruptedRevalidation = false;
1710
+ isRevalidationRequired = false;
1711
+ cancelledDeferredRoutes = [];
1712
+ cancelledFetcherLoads = [];
1713
+ }
1714
+ // Trigger a navigation event, which can either be a numerical POP or a PUSH
1715
+ // replace with an optional submission
1716
+ async function navigate(to, opts) {
1717
+ if (typeof to === "number") {
1718
+ init.history.go(to);
1719
+ return;
1720
+ }
1721
+ 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);
1722
+ let {
1723
+ path,
1724
+ submission,
1725
+ error
1726
+ } = normalizeNavigateOptions(future.v7_normalizeFormMethod, false, normalizedPath, opts);
1727
+ let currentLocation = state.location;
1728
+ let nextLocation = createLocation(state.location, path, opts && opts.state);
1729
+ // When using navigate as a PUSH/REPLACE we aren't reading an already-encoded
1730
+ // URL from window.location, so we need to encode it here so the behavior
1731
+ // remains the same as POP and non-data-router usages. new URL() does all
1732
+ // the same encoding we'd get from a history.pushState/window.location read
1733
+ // without having to touch history
1734
+ nextLocation = _extends({}, nextLocation, init.history.encodeLocation(nextLocation));
1735
+ let userReplace = opts && opts.replace != null ? opts.replace : undefined;
1736
+ let historyAction = Action.Push;
1737
+ if (userReplace === true) {
1738
+ historyAction = Action.Replace;
1739
+ } else if (userReplace === false) ; else if (submission != null && isMutationMethod(submission.formMethod) && submission.formAction === state.location.pathname + state.location.search) {
1740
+ // By default on submissions to the current location we REPLACE so that
1741
+ // users don't have to double-click the back button to get to the prior
1742
+ // location. If the user redirects to a different location from the
1743
+ // action/loader this will be ignored and the redirect will be a PUSH
1744
+ historyAction = Action.Replace;
1745
+ }
1746
+ let preventScrollReset = opts && "preventScrollReset" in opts ? opts.preventScrollReset === true : undefined;
1747
+ let flushSync = (opts && opts.unstable_flushSync) === true;
1748
+ let blockerKey = shouldBlockNavigation({
1749
+ currentLocation,
1750
+ nextLocation,
1751
+ historyAction
1752
+ });
1753
+ if (blockerKey) {
1754
+ // Put the blocker into a blocked state
1755
+ updateBlocker(blockerKey, {
1756
+ state: "blocked",
1757
+ location: nextLocation,
1758
+ proceed() {
1759
+ updateBlocker(blockerKey, {
1760
+ state: "proceeding",
1761
+ proceed: undefined,
1762
+ reset: undefined,
1763
+ location: nextLocation
1764
+ });
1765
+ // Send the same navigation through
1766
+ navigate(to, opts);
1767
+ },
1768
+ reset() {
1769
+ let blockers = new Map(state.blockers);
1770
+ blockers.set(blockerKey, IDLE_BLOCKER);
1771
+ updateState({
1772
+ blockers
1773
+ });
1774
+ }
1775
+ });
1776
+ return;
1777
+ }
1778
+ return await startNavigation(historyAction, nextLocation, {
1779
+ submission,
1780
+ // Send through the formData serialization error if we have one so we can
1781
+ // render at the right error boundary after we match routes
1782
+ pendingError: error,
1783
+ preventScrollReset,
1784
+ replace: opts && opts.replace,
1785
+ enableViewTransition: opts && opts.unstable_viewTransition,
1786
+ flushSync
1787
+ });
1788
+ }
1789
+ // Revalidate all current loaders. If a navigation is in progress or if this
1790
+ // is interrupted by a navigation, allow this to "succeed" by calling all
1791
+ // loaders during the next loader round
1792
+ function revalidate() {
1793
+ interruptActiveLoads();
1794
+ updateState({
1795
+ revalidation: "loading"
1796
+ });
1797
+ // If we're currently submitting an action, we don't need to start a new
1798
+ // navigation, we'll just let the follow up loader execution call all loaders
1799
+ if (state.navigation.state === "submitting") {
1800
+ return;
1801
+ }
1802
+ // If we're currently in an idle state, start a new navigation for the current
1803
+ // action/location and mark it as uninterrupted, which will skip the history
1804
+ // update in completeNavigation
1805
+ if (state.navigation.state === "idle") {
1806
+ startNavigation(state.historyAction, state.location, {
1807
+ startUninterruptedRevalidation: true
1808
+ });
1809
+ return;
1810
+ }
1811
+ // Otherwise, if we're currently in a loading state, just start a new
1812
+ // navigation to the navigation.location but do not trigger an uninterrupted
1813
+ // revalidation so that history correctly updates once the navigation completes
1814
+ startNavigation(pendingAction || state.historyAction, state.navigation.location, {
1815
+ overrideNavigation: state.navigation
1816
+ });
1817
+ }
1818
+ // Start a navigation to the given action/location. Can optionally provide a
1819
+ // overrideNavigation which will override the normalLoad in the case of a redirect
1820
+ // navigation
1821
+ async function startNavigation(historyAction, location, opts) {
1822
+ // Abort any in-progress navigations and start a new one. Unset any ongoing
1823
+ // uninterrupted revalidations unless told otherwise, since we want this
1824
+ // new navigation to update history normally
1825
+ pendingNavigationController && pendingNavigationController.abort();
1826
+ pendingNavigationController = null;
1827
+ pendingAction = historyAction;
1828
+ isUninterruptedRevalidation = (opts && opts.startUninterruptedRevalidation) === true;
1829
+ // Save the current scroll position every time we start a new navigation,
1830
+ // and track whether we should reset scroll on completion
1831
+ saveScrollPosition(state.location, state.matches);
1832
+ pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;
1833
+ pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true;
1834
+ let routesToUse = inFlightDataRoutes || dataRoutes;
1835
+ let loadingNavigation = opts && opts.overrideNavigation;
1836
+ let matches = matchRoutes(routesToUse, location, basename);
1837
+ let flushSync = (opts && opts.flushSync) === true;
1838
+ // Short circuit with a 404 on the root error boundary if we match nothing
1839
+ if (!matches) {
1840
+ let error = getInternalRouterError(404, {
1841
+ pathname: location.pathname
1842
+ });
1843
+ let {
1844
+ matches: notFoundMatches,
1845
+ route
1846
+ } = getShortCircuitMatches(routesToUse);
1847
+ // Cancel all pending deferred on 404s since we don't keep any routes
1848
+ cancelActiveDeferreds();
1849
+ completeNavigation(location, {
1850
+ matches: notFoundMatches,
1851
+ loaderData: {},
1852
+ errors: {
1853
+ [route.id]: error
1854
+ }
1855
+ }, {
1856
+ flushSync
1857
+ });
1858
+ return;
1859
+ }
1860
+ // Short circuit if it's only a hash change and not a revalidation or
1861
+ // mutation submission.
1862
+ //
1863
+ // Ignore on initial page loads because since the initial load will always
1864
+ // be "same hash". For example, on /page#hash and submit a <Form method="post">
1865
+ // which will default to a navigation to /page
1866
+ if (state.initialized && !isRevalidationRequired && isHashChangeOnly(state.location, location) && !(opts && opts.submission && isMutationMethod(opts.submission.formMethod))) {
1867
+ completeNavigation(location, {
1868
+ matches
1869
+ }, {
1870
+ flushSync
1871
+ });
1872
+ return;
1873
+ }
1874
+ // Create a controller/Request for this navigation
1875
+ pendingNavigationController = new AbortController();
1876
+ let request = createClientSideRequest(init.history, location, pendingNavigationController.signal, opts && opts.submission);
1877
+ let pendingActionData;
1878
+ let pendingError;
1879
+ if (opts && opts.pendingError) {
1880
+ // If we have a pendingError, it means the user attempted a GET submission
1881
+ // with binary FormData so assign here and skip to handleLoaders. That
1882
+ // way we handle calling loaders above the boundary etc. It's not really
1883
+ // different from an actionError in that sense.
1884
+ pendingError = {
1885
+ [findNearestBoundary(matches).route.id]: opts.pendingError
1886
+ };
1887
+ } else if (opts && opts.submission && isMutationMethod(opts.submission.formMethod)) {
1888
+ // Call action if we received an action submission
1889
+ let actionOutput = await handleAction(request, location, opts.submission, matches, {
1890
+ replace: opts.replace,
1891
+ flushSync
1892
+ });
1893
+ if (actionOutput.shortCircuited) {
1894
+ return;
1895
+ }
1896
+ pendingActionData = actionOutput.pendingActionData;
1897
+ pendingError = actionOutput.pendingActionError;
1898
+ loadingNavigation = getLoadingNavigation(location, opts.submission);
1899
+ flushSync = false;
1900
+ // Create a GET request for the loaders
1901
+ request = new Request(request.url, {
1902
+ signal: request.signal
1903
+ });
1904
+ }
1905
+ // Call loaders
1906
+ let {
1907
+ shortCircuited,
1908
+ loaderData,
1909
+ errors
1910
+ } = await handleLoaders(request, location, matches, loadingNavigation, opts && opts.submission, opts && opts.fetcherSubmission, opts && opts.replace, opts && opts.initialHydration === true, flushSync, pendingActionData, pendingError);
1911
+ if (shortCircuited) {
1912
+ return;
1913
+ }
1914
+ // Clean up now that the action/loaders have completed. Don't clean up if
1915
+ // we short circuited because pendingNavigationController will have already
1916
+ // been assigned to a new controller for the next navigation
1917
+ pendingNavigationController = null;
1918
+ completeNavigation(location, _extends({
1919
+ matches
1920
+ }, pendingActionData ? {
1921
+ actionData: pendingActionData
1922
+ } : {}, {
1923
+ loaderData,
1924
+ errors
1925
+ }));
1926
+ }
1927
+ // Call the action matched by the leaf route for this navigation and handle
1928
+ // redirects/errors
1929
+ async function handleAction(request, location, submission, matches, opts) {
1930
+ if (opts === void 0) {
1931
+ opts = {};
1932
+ }
1933
+ interruptActiveLoads();
1934
+ // Put us in a submitting state
1935
+ let navigation = getSubmittingNavigation(location, submission);
1936
+ updateState({
1937
+ navigation
1938
+ }, {
1939
+ flushSync: opts.flushSync === true
1940
+ });
1941
+ // Call our action and get the result
1942
+ let result;
1943
+ let actionMatch = getTargetMatch(matches, location);
1944
+ if (!actionMatch.route.action && !actionMatch.route.lazy) {
1945
+ result = {
1946
+ type: ResultType.error,
1947
+ error: getInternalRouterError(405, {
1948
+ method: request.method,
1949
+ pathname: location.pathname,
1950
+ routeId: actionMatch.route.id
1951
+ })
1952
+ };
1953
+ } else {
1954
+ result = await callLoaderOrAction("action", request, actionMatch, matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath);
1955
+ if (request.signal.aborted) {
1956
+ return {
1957
+ shortCircuited: true
1958
+ };
1959
+ }
1960
+ }
1961
+ if (isRedirectResult(result)) {
1962
+ let replace;
1963
+ if (opts && opts.replace != null) {
1964
+ replace = opts.replace;
1965
+ } else {
1966
+ // If the user didn't explicity indicate replace behavior, replace if
1967
+ // we redirected to the exact same location we're currently at to avoid
1968
+ // double back-buttons
1969
+ replace = result.location === state.location.pathname + state.location.search;
1970
+ }
1971
+ await startRedirectNavigation(state, result, {
1972
+ submission,
1973
+ replace
1974
+ });
1975
+ return {
1976
+ shortCircuited: true
1977
+ };
1978
+ }
1979
+ if (isErrorResult(result)) {
1980
+ // Store off the pending error - we use it to determine which loaders
1981
+ // to call and will commit it when we complete the navigation
1982
+ let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);
1983
+ // By default, all submissions are REPLACE navigations, but if the
1984
+ // action threw an error that'll be rendered in an errorElement, we fall
1985
+ // back to PUSH so that the user can use the back button to get back to
1986
+ // the pre-submission form location to try again
1987
+ if ((opts && opts.replace) !== true) {
1988
+ pendingAction = Action.Push;
1989
+ }
1990
+ return {
1991
+ // Send back an empty object we can use to clear out any prior actionData
1992
+ pendingActionData: {},
1993
+ pendingActionError: {
1994
+ [boundaryMatch.route.id]: result.error
1995
+ }
1996
+ };
1997
+ }
1998
+ if (isDeferredResult(result)) {
1999
+ throw getInternalRouterError(400, {
2000
+ type: "defer-action"
2001
+ });
2002
+ }
2003
+ return {
2004
+ pendingActionData: {
2005
+ [actionMatch.route.id]: result.data
2006
+ }
2007
+ };
2008
+ }
2009
+ // Call all applicable loaders for the given matches, handling redirects,
2010
+ // errors, etc.
2011
+ async function handleLoaders(request, location, matches, overrideNavigation, submission, fetcherSubmission, replace, initialHydration, flushSync, pendingActionData, pendingError) {
2012
+ // Figure out the right navigation we want to use for data loading
2013
+ let loadingNavigation = overrideNavigation || getLoadingNavigation(location, submission);
2014
+ // If this was a redirect from an action we don't have a "submission" but
2015
+ // we have it on the loading navigation so use that if available
2016
+ let activeSubmission = submission || fetcherSubmission || getSubmissionFromNavigation(loadingNavigation);
2017
+ let routesToUse = inFlightDataRoutes || dataRoutes;
2018
+ 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);
2019
+ // Cancel pending deferreds for no-longer-matched routes or routes we're
2020
+ // about to reload. Note that if this is an action reload we would have
2021
+ // already cancelled all pending deferreds so this would be a no-op
2022
+ cancelActiveDeferreds(routeId => !(matches && matches.some(m => m.route.id === routeId)) || matchesToLoad && matchesToLoad.some(m => m.route.id === routeId));
2023
+ pendingNavigationLoadId = ++incrementingLoadId;
2024
+ // Short circuit if we have no loaders to run
2025
+ if (matchesToLoad.length === 0 && revalidatingFetchers.length === 0) {
2026
+ let updatedFetchers = markFetchRedirectsDone();
2027
+ completeNavigation(location, _extends({
2028
+ matches,
2029
+ loaderData: {},
2030
+ // Commit pending error if we're short circuiting
2031
+ errors: pendingError || null
2032
+ }, pendingActionData ? {
2033
+ actionData: pendingActionData
2034
+ } : {}, updatedFetchers ? {
2035
+ fetchers: new Map(state.fetchers)
2036
+ } : {}), {
2037
+ flushSync
2038
+ });
2039
+ return {
2040
+ shortCircuited: true
2041
+ };
2042
+ }
2043
+ // If this is an uninterrupted revalidation, we remain in our current idle
2044
+ // state. If not, we need to switch to our loading state and load data,
2045
+ // preserving any new action data or existing action data (in the case of
2046
+ // a revalidation interrupting an actionReload)
2047
+ // If we have partialHydration enabled, then don't update the state for the
2048
+ // initial data load since it's not a "navigation"
2049
+ if (!isUninterruptedRevalidation && (!future.v7_partialHydration || !initialHydration)) {
2050
+ revalidatingFetchers.forEach(rf => {
2051
+ let fetcher = state.fetchers.get(rf.key);
2052
+ let revalidatingFetcher = getLoadingFetcher(undefined, fetcher ? fetcher.data : undefined);
2053
+ state.fetchers.set(rf.key, revalidatingFetcher);
2054
+ });
2055
+ let actionData = pendingActionData || state.actionData;
2056
+ updateState(_extends({
2057
+ navigation: loadingNavigation
2058
+ }, actionData ? Object.keys(actionData).length === 0 ? {
2059
+ actionData: null
2060
+ } : {
2061
+ actionData
2062
+ } : {}, revalidatingFetchers.length > 0 ? {
2063
+ fetchers: new Map(state.fetchers)
2064
+ } : {}), {
2065
+ flushSync
2066
+ });
2067
+ }
2068
+ revalidatingFetchers.forEach(rf => {
2069
+ if (fetchControllers.has(rf.key)) {
2070
+ abortFetcher(rf.key);
2071
+ }
2072
+ if (rf.controller) {
2073
+ // Fetchers use an independent AbortController so that aborting a fetcher
2074
+ // (via deleteFetcher) does not abort the triggering navigation that
2075
+ // triggered the revalidation
2076
+ fetchControllers.set(rf.key, rf.controller);
2077
+ }
2078
+ });
2079
+ // Proxy navigation abort through to revalidation fetchers
2080
+ let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(f => abortFetcher(f.key));
2081
+ if (pendingNavigationController) {
2082
+ pendingNavigationController.signal.addEventListener("abort", abortPendingFetchRevalidations);
2083
+ }
2084
+ let {
2085
+ results,
2086
+ loaderResults,
2087
+ fetcherResults
2088
+ } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, request);
2089
+ if (request.signal.aborted) {
2090
+ return {
2091
+ shortCircuited: true
2092
+ };
2093
+ }
2094
+ // Clean up _after_ loaders have completed. Don't clean up if we short
2095
+ // circuited because fetchControllers would have been aborted and
2096
+ // reassigned to new controllers for the next navigation
2097
+ if (pendingNavigationController) {
2098
+ pendingNavigationController.signal.removeEventListener("abort", abortPendingFetchRevalidations);
2099
+ }
2100
+ revalidatingFetchers.forEach(rf => fetchControllers.delete(rf.key));
2101
+ // If any loaders returned a redirect Response, start a new REPLACE navigation
2102
+ let redirect = findRedirect(results);
2103
+ if (redirect) {
2104
+ if (redirect.idx >= matchesToLoad.length) {
2105
+ // If this redirect came from a fetcher make sure we mark it in
2106
+ // fetchRedirectIds so it doesn't get revalidated on the next set of
2107
+ // loader executions
2108
+ let fetcherKey = revalidatingFetchers[redirect.idx - matchesToLoad.length].key;
2109
+ fetchRedirectIds.add(fetcherKey);
2110
+ }
2111
+ await startRedirectNavigation(state, redirect.result, {
2112
+ replace
2113
+ });
2114
+ return {
2115
+ shortCircuited: true
2116
+ };
2117
+ }
2118
+ // Process and commit output from loaders
2119
+ let {
2120
+ loaderData,
2121
+ errors
2122
+ } = processLoaderData(state, matches, matchesToLoad, loaderResults, pendingError, revalidatingFetchers, fetcherResults, activeDeferreds);
2123
+ // Wire up subscribers to update loaderData as promises settle
2124
+ activeDeferreds.forEach((deferredData, routeId) => {
2125
+ deferredData.subscribe(aborted => {
2126
+ // Note: No need to updateState here since the TrackedPromise on
2127
+ // loaderData is stable across resolve/reject
2128
+ // Remove this instance if we were aborted or if promises have settled
2129
+ if (aborted || deferredData.done) {
2130
+ activeDeferreds.delete(routeId);
2131
+ }
2132
+ });
2133
+ });
2134
+ // During partial hydration, preserve SSR errors for routes that don't re-run
2135
+ if (future.v7_partialHydration && initialHydration && state.errors) {
2136
+ Object.entries(state.errors).filter(_ref2 => {
2137
+ let [id] = _ref2;
2138
+ return !matchesToLoad.some(m => m.route.id === id);
2139
+ }).forEach(_ref3 => {
2140
+ let [routeId, error] = _ref3;
2141
+ errors = Object.assign(errors || {}, {
2142
+ [routeId]: error
2143
+ });
2144
+ });
2145
+ }
2146
+ let updatedFetchers = markFetchRedirectsDone();
2147
+ let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId);
2148
+ let shouldUpdateFetchers = updatedFetchers || didAbortFetchLoads || revalidatingFetchers.length > 0;
2149
+ return _extends({
2150
+ loaderData,
2151
+ errors
2152
+ }, shouldUpdateFetchers ? {
2153
+ fetchers: new Map(state.fetchers)
2154
+ } : {});
2155
+ }
2156
+ // Trigger a fetcher load/submit for the given fetcher key
2157
+ function fetch(key, routeId, href, opts) {
2158
+ if (isServer) {
2159
+ 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.");
2160
+ }
2161
+ if (fetchControllers.has(key)) abortFetcher(key);
2162
+ let flushSync = (opts && opts.unstable_flushSync) === true;
2163
+ let routesToUse = inFlightDataRoutes || dataRoutes;
2164
+ let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, href, future.v7_relativeSplatPath, routeId, opts == null ? void 0 : opts.relative);
2165
+ let matches = matchRoutes(routesToUse, normalizedPath, basename);
2166
+ if (!matches) {
2167
+ setFetcherError(key, routeId, getInternalRouterError(404, {
2168
+ pathname: normalizedPath
2169
+ }), {
2170
+ flushSync
2171
+ });
2172
+ return;
2173
+ }
2174
+ let {
2175
+ path,
2176
+ submission,
2177
+ error
2178
+ } = normalizeNavigateOptions(future.v7_normalizeFormMethod, true, normalizedPath, opts);
2179
+ if (error) {
2180
+ setFetcherError(key, routeId, error, {
2181
+ flushSync
2182
+ });
2183
+ return;
2184
+ }
2185
+ let match = getTargetMatch(matches, path);
2186
+ pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;
2187
+ if (submission && isMutationMethod(submission.formMethod)) {
2188
+ handleFetcherAction(key, routeId, path, match, matches, flushSync, submission);
2189
+ return;
2190
+ }
2191
+ // Store off the match so we can call it's shouldRevalidate on subsequent
2192
+ // revalidations
2193
+ fetchLoadMatches.set(key, {
2194
+ routeId,
2195
+ path
2196
+ });
2197
+ handleFetcherLoader(key, routeId, path, match, matches, flushSync, submission);
2198
+ }
2199
+ // Call the action for the matched fetcher.submit(), and then handle redirects,
2200
+ // errors, and revalidation
2201
+ async function handleFetcherAction(key, routeId, path, match, requestMatches, flushSync, submission) {
2202
+ interruptActiveLoads();
2203
+ fetchLoadMatches.delete(key);
2204
+ if (!match.route.action && !match.route.lazy) {
2205
+ let error = getInternalRouterError(405, {
2206
+ method: submission.formMethod,
2207
+ pathname: path,
2208
+ routeId: routeId
2209
+ });
2210
+ setFetcherError(key, routeId, error, {
2211
+ flushSync
2212
+ });
2213
+ return;
2214
+ }
2215
+ // Put this fetcher into it's submitting state
2216
+ let existingFetcher = state.fetchers.get(key);
2217
+ updateFetcherState(key, getSubmittingFetcher(submission, existingFetcher), {
2218
+ flushSync
2219
+ });
2220
+ // Call the action for the fetcher
2221
+ let abortController = new AbortController();
2222
+ let fetchRequest = createClientSideRequest(init.history, path, abortController.signal, submission);
2223
+ fetchControllers.set(key, abortController);
2224
+ let originatingLoadId = incrementingLoadId;
2225
+ let actionResult = await callLoaderOrAction("action", fetchRequest, match, requestMatches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath);
2226
+ if (fetchRequest.signal.aborted) {
2227
+ // We can delete this so long as we weren't aborted by our own fetcher
2228
+ // re-submit which would have put _new_ controller is in fetchControllers
2229
+ if (fetchControllers.get(key) === abortController) {
2230
+ fetchControllers.delete(key);
2231
+ }
2232
+ return;
2233
+ }
2234
+ // When using v7_fetcherPersist, we don't want errors bubbling up to the UI
2235
+ // or redirects processed for unmounted fetchers so we just revert them to
2236
+ // idle
2237
+ if (future.v7_fetcherPersist && deletedFetchers.has(key)) {
2238
+ if (isRedirectResult(actionResult) || isErrorResult(actionResult)) {
2239
+ updateFetcherState(key, getDoneFetcher(undefined));
2240
+ return;
2241
+ }
2242
+ // Let SuccessResult's fall through for revalidation
2243
+ } else {
2244
+ if (isRedirectResult(actionResult)) {
2245
+ fetchControllers.delete(key);
2246
+ if (pendingNavigationLoadId > originatingLoadId) {
2247
+ // A new navigation was kicked off after our action started, so that
2248
+ // should take precedence over this redirect navigation. We already
2249
+ // set isRevalidationRequired so all loaders for the new route should
2250
+ // fire unless opted out via shouldRevalidate
2251
+ updateFetcherState(key, getDoneFetcher(undefined));
2252
+ return;
2253
+ } else {
2254
+ fetchRedirectIds.add(key);
2255
+ updateFetcherState(key, getLoadingFetcher(submission));
2256
+ return startRedirectNavigation(state, actionResult, {
2257
+ fetcherSubmission: submission
2258
+ });
2259
+ }
2260
+ }
2261
+ // Process any non-redirect errors thrown
2262
+ if (isErrorResult(actionResult)) {
2263
+ setFetcherError(key, routeId, actionResult.error);
2264
+ return;
2265
+ }
2266
+ }
2267
+ if (isDeferredResult(actionResult)) {
2268
+ throw getInternalRouterError(400, {
2269
+ type: "defer-action"
2270
+ });
2271
+ }
2272
+ // Start the data load for current matches, or the next location if we're
2273
+ // in the middle of a navigation
2274
+ let nextLocation = state.navigation.location || state.location;
2275
+ let revalidationRequest = createClientSideRequest(init.history, nextLocation, abortController.signal);
2276
+ let routesToUse = inFlightDataRoutes || dataRoutes;
2277
+ let matches = state.navigation.state !== "idle" ? matchRoutes(routesToUse, state.navigation.location, basename) : state.matches;
2278
+ invariant(matches, "Didn't find any matches after fetcher action");
2279
+ let loadId = ++incrementingLoadId;
2280
+ fetchReloadIds.set(key, loadId);
2281
+ let loadFetcher = getLoadingFetcher(submission, actionResult.data);
2282
+ state.fetchers.set(key, loadFetcher);
2283
+ let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, submission, nextLocation, false, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, {
2284
+ [match.route.id]: actionResult.data
2285
+ }, undefined // No need to send through errors since we short circuit above
2286
+ );
2287
+ // Put all revalidating fetchers into the loading state, except for the
2288
+ // current fetcher which we want to keep in it's current loading state which
2289
+ // contains it's action submission info + action data
2290
+ revalidatingFetchers.filter(rf => rf.key !== key).forEach(rf => {
2291
+ let staleKey = rf.key;
2292
+ let existingFetcher = state.fetchers.get(staleKey);
2293
+ let revalidatingFetcher = getLoadingFetcher(undefined, existingFetcher ? existingFetcher.data : undefined);
2294
+ state.fetchers.set(staleKey, revalidatingFetcher);
2295
+ if (fetchControllers.has(staleKey)) {
2296
+ abortFetcher(staleKey);
2297
+ }
2298
+ if (rf.controller) {
2299
+ fetchControllers.set(staleKey, rf.controller);
2300
+ }
2301
+ });
2302
+ updateState({
2303
+ fetchers: new Map(state.fetchers)
2304
+ });
2305
+ let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(rf => abortFetcher(rf.key));
2306
+ abortController.signal.addEventListener("abort", abortPendingFetchRevalidations);
2307
+ let {
2308
+ results,
2309
+ loaderResults,
2310
+ fetcherResults
2311
+ } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, revalidationRequest);
2312
+ if (abortController.signal.aborted) {
2313
+ return;
2314
+ }
2315
+ abortController.signal.removeEventListener("abort", abortPendingFetchRevalidations);
2316
+ fetchReloadIds.delete(key);
2317
+ fetchControllers.delete(key);
2318
+ revalidatingFetchers.forEach(r => fetchControllers.delete(r.key));
2319
+ let redirect = findRedirect(results);
2320
+ if (redirect) {
2321
+ if (redirect.idx >= matchesToLoad.length) {
2322
+ // If this redirect came from a fetcher make sure we mark it in
2323
+ // fetchRedirectIds so it doesn't get revalidated on the next set of
2324
+ // loader executions
2325
+ let fetcherKey = revalidatingFetchers[redirect.idx - matchesToLoad.length].key;
2326
+ fetchRedirectIds.add(fetcherKey);
2327
+ }
2328
+ return startRedirectNavigation(state, redirect.result);
2329
+ }
2330
+ // Process and commit output from loaders
2331
+ let {
2332
+ loaderData,
2333
+ errors
2334
+ } = processLoaderData(state, state.matches, matchesToLoad, loaderResults, undefined, revalidatingFetchers, fetcherResults, activeDeferreds);
2335
+ // Since we let revalidations complete even if the submitting fetcher was
2336
+ // deleted, only put it back to idle if it hasn't been deleted
2337
+ if (state.fetchers.has(key)) {
2338
+ let doneFetcher = getDoneFetcher(actionResult.data);
2339
+ state.fetchers.set(key, doneFetcher);
2340
+ }
2341
+ abortStaleFetchLoads(loadId);
2342
+ // If we are currently in a navigation loading state and this fetcher is
2343
+ // more recent than the navigation, we want the newer data so abort the
2344
+ // navigation and complete it with the fetcher data
2345
+ if (state.navigation.state === "loading" && loadId > pendingNavigationLoadId) {
2346
+ invariant(pendingAction, "Expected pending action");
2347
+ pendingNavigationController && pendingNavigationController.abort();
2348
+ completeNavigation(state.navigation.location, {
2349
+ matches,
2350
+ loaderData,
2351
+ errors,
2352
+ fetchers: new Map(state.fetchers)
2353
+ });
2354
+ } else {
2355
+ // otherwise just update with the fetcher data, preserving any existing
2356
+ // loaderData for loaders that did not need to reload. We have to
2357
+ // manually merge here since we aren't going through completeNavigation
2358
+ updateState({
2359
+ errors,
2360
+ loaderData: mergeLoaderData(state.loaderData, loaderData, matches, errors),
2361
+ fetchers: new Map(state.fetchers)
2362
+ });
2363
+ isRevalidationRequired = false;
2364
+ }
2365
+ }
2366
+ // Call the matched loader for fetcher.load(), handling redirects, errors, etc.
2367
+ async function handleFetcherLoader(key, routeId, path, match, matches, flushSync, submission) {
2368
+ let existingFetcher = state.fetchers.get(key);
2369
+ updateFetcherState(key, getLoadingFetcher(submission, existingFetcher ? existingFetcher.data : undefined), {
2370
+ flushSync
2371
+ });
2372
+ // Call the loader for this fetcher route match
2373
+ let abortController = new AbortController();
2374
+ let fetchRequest = createClientSideRequest(init.history, path, abortController.signal);
2375
+ fetchControllers.set(key, abortController);
2376
+ let originatingLoadId = incrementingLoadId;
2377
+ let result = await callLoaderOrAction("loader", fetchRequest, match, matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath);
2378
+ // Deferred isn't supported for fetcher loads, await everything and treat it
2379
+ // as a normal load. resolveDeferredData will return undefined if this
2380
+ // fetcher gets aborted, so we just leave result untouched and short circuit
2381
+ // below if that happens
2382
+ if (isDeferredResult(result)) {
2383
+ result = (await resolveDeferredData(result, fetchRequest.signal, true)) || result;
2384
+ }
2385
+ // We can delete this so long as we weren't aborted by our our own fetcher
2386
+ // re-load which would have put _new_ controller is in fetchControllers
2387
+ if (fetchControllers.get(key) === abortController) {
2388
+ fetchControllers.delete(key);
2389
+ }
2390
+ if (fetchRequest.signal.aborted) {
2391
+ return;
2392
+ }
2393
+ // We don't want errors bubbling up or redirects followed for unmounted
2394
+ // fetchers, so short circuit here if it was removed from the UI
2395
+ if (deletedFetchers.has(key)) {
2396
+ updateFetcherState(key, getDoneFetcher(undefined));
2397
+ return;
2398
+ }
2399
+ // If the loader threw a redirect Response, start a new REPLACE navigation
2400
+ if (isRedirectResult(result)) {
2401
+ if (pendingNavigationLoadId > originatingLoadId) {
2402
+ // A new navigation was kicked off after our loader started, so that
2403
+ // should take precedence over this redirect navigation
2404
+ updateFetcherState(key, getDoneFetcher(undefined));
2405
+ return;
2406
+ } else {
2407
+ fetchRedirectIds.add(key);
2408
+ await startRedirectNavigation(state, result);
2409
+ return;
2410
+ }
2411
+ }
2412
+ // Process any non-redirect errors thrown
2413
+ if (isErrorResult(result)) {
2414
+ setFetcherError(key, routeId, result.error);
2415
+ return;
2416
+ }
2417
+ invariant(!isDeferredResult(result), "Unhandled fetcher deferred data");
2418
+ // Put the fetcher back into an idle state
2419
+ updateFetcherState(key, getDoneFetcher(result.data));
2420
+ }
2421
+ /**
2422
+ * Utility function to handle redirects returned from an action or loader.
2423
+ * Normally, a redirect "replaces" the navigation that triggered it. So, for
2424
+ * example:
2425
+ *
2426
+ * - user is on /a
2427
+ * - user clicks a link to /b
2428
+ * - loader for /b redirects to /c
2429
+ *
2430
+ * In a non-JS app the browser would track the in-flight navigation to /b and
2431
+ * then replace it with /c when it encountered the redirect response. In
2432
+ * the end it would only ever update the URL bar with /c.
2433
+ *
2434
+ * In client-side routing using pushState/replaceState, we aim to emulate
2435
+ * this behavior and we also do not update history until the end of the
2436
+ * navigation (including processed redirects). This means that we never
2437
+ * actually touch history until we've processed redirects, so we just use
2438
+ * the history action from the original navigation (PUSH or REPLACE).
2439
+ */
2440
+ async function startRedirectNavigation(state, redirect, _temp2) {
2441
+ let {
2442
+ submission,
2443
+ fetcherSubmission,
2444
+ replace
2445
+ } = _temp2 === void 0 ? {} : _temp2;
2446
+ if (redirect.revalidate) {
2447
+ isRevalidationRequired = true;
2448
+ }
2449
+ let redirectLocation = createLocation(state.location, redirect.location, {
2450
+ _isRedirect: true
2451
+ });
2452
+ invariant(redirectLocation, "Expected a location on the redirect navigation");
2453
+ if (isBrowser) {
2454
+ let isDocumentReload = false;
2455
+ if (redirect.reloadDocument) {
2456
+ // Hard reload if the response contained X-Remix-Reload-Document
2457
+ isDocumentReload = true;
2458
+ } else if (ABSOLUTE_URL_REGEX.test(redirect.location)) {
2459
+ const url = init.history.createURL(redirect.location);
2460
+ isDocumentReload =
2461
+ // Hard reload if it's an absolute URL to a new origin
2462
+ url.origin !== routerWindow.location.origin ||
2463
+ // Hard reload if it's an absolute URL that does not match our basename
2464
+ stripBasename(url.pathname, basename) == null;
2465
+ }
2466
+ if (isDocumentReload) {
2467
+ if (replace) {
2468
+ routerWindow.location.replace(redirect.location);
2469
+ } else {
2470
+ routerWindow.location.assign(redirect.location);
2471
+ }
2472
+ return;
2473
+ }
2474
+ }
2475
+ // There's no need to abort on redirects, since we don't detect the
2476
+ // redirect until the action/loaders have settled
2477
+ pendingNavigationController = null;
2478
+ let redirectHistoryAction = replace === true ? Action.Replace : Action.Push;
2479
+ // Use the incoming submission if provided, fallback on the active one in
2480
+ // state.navigation
2481
+ let {
2482
+ formMethod,
2483
+ formAction,
2484
+ formEncType
2485
+ } = state.navigation;
2486
+ if (!submission && !fetcherSubmission && formMethod && formAction && formEncType) {
2487
+ submission = getSubmissionFromNavigation(state.navigation);
2488
+ }
2489
+ // If this was a 307/308 submission we want to preserve the HTTP method and
2490
+ // re-submit the GET/POST/PUT/PATCH/DELETE as a submission navigation to the
2491
+ // redirected location
2492
+ let activeSubmission = submission || fetcherSubmission;
2493
+ if (redirectPreserveMethodStatusCodes.has(redirect.status) && activeSubmission && isMutationMethod(activeSubmission.formMethod)) {
2494
+ await startNavigation(redirectHistoryAction, redirectLocation, {
2495
+ submission: _extends({}, activeSubmission, {
2496
+ formAction: redirect.location
2497
+ }),
2498
+ // Preserve this flag across redirects
2499
+ preventScrollReset: pendingPreventScrollReset
2500
+ });
2501
+ } else {
2502
+ // If we have a navigation submission, we will preserve it through the
2503
+ // redirect navigation
2504
+ let overrideNavigation = getLoadingNavigation(redirectLocation, submission);
2505
+ await startNavigation(redirectHistoryAction, redirectLocation, {
2506
+ overrideNavigation,
2507
+ // Send fetcher submissions through for shouldRevalidate
2508
+ fetcherSubmission,
2509
+ // Preserve this flag across redirects
2510
+ preventScrollReset: pendingPreventScrollReset
2511
+ });
2512
+ }
2513
+ }
2514
+ async function callLoadersAndMaybeResolveData(currentMatches, matches, matchesToLoad, fetchersToLoad, request) {
2515
+ // Call all navigation loaders and revalidating fetcher loaders in parallel,
2516
+ // then slice off the results into separate arrays so we can handle them
2517
+ // accordingly
2518
+ let results = await Promise.all([...matchesToLoad.map(match => callLoaderOrAction("loader", request, match, matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath)), ...fetchersToLoad.map(f => {
2519
+ if (f.matches && f.match && f.controller) {
2520
+ return callLoaderOrAction("loader", createClientSideRequest(init.history, f.path, f.controller.signal), f.match, f.matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath);
2521
+ } else {
2522
+ let error = {
2523
+ type: ResultType.error,
2524
+ error: getInternalRouterError(404, {
2525
+ pathname: f.path
2526
+ })
2527
+ };
2528
+ return error;
2529
+ }
2530
+ })]);
2531
+ let loaderResults = results.slice(0, matchesToLoad.length);
2532
+ let fetcherResults = results.slice(matchesToLoad.length);
2533
+ 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)]);
2534
+ return {
2535
+ results,
2536
+ loaderResults,
2537
+ fetcherResults
2538
+ };
2539
+ }
2540
+ function interruptActiveLoads() {
2541
+ // Every interruption triggers a revalidation
2542
+ isRevalidationRequired = true;
2543
+ // Cancel pending route-level deferreds and mark cancelled routes for
2544
+ // revalidation
2545
+ cancelledDeferredRoutes.push(...cancelActiveDeferreds());
2546
+ // Abort in-flight fetcher loads
2547
+ fetchLoadMatches.forEach((_, key) => {
2548
+ if (fetchControllers.has(key)) {
2549
+ cancelledFetcherLoads.push(key);
2550
+ abortFetcher(key);
2551
+ }
2552
+ });
2553
+ }
2554
+ function updateFetcherState(key, fetcher, opts) {
2555
+ if (opts === void 0) {
2556
+ opts = {};
2557
+ }
2558
+ state.fetchers.set(key, fetcher);
2559
+ updateState({
2560
+ fetchers: new Map(state.fetchers)
2561
+ }, {
2562
+ flushSync: (opts && opts.flushSync) === true
2563
+ });
2564
+ }
2565
+ function setFetcherError(key, routeId, error, opts) {
2566
+ if (opts === void 0) {
2567
+ opts = {};
2568
+ }
2569
+ let boundaryMatch = findNearestBoundary(state.matches, routeId);
2570
+ deleteFetcher(key);
2571
+ updateState({
2572
+ errors: {
2573
+ [boundaryMatch.route.id]: error
2574
+ },
2575
+ fetchers: new Map(state.fetchers)
2576
+ }, {
2577
+ flushSync: (opts && opts.flushSync) === true
2578
+ });
2579
+ }
2580
+ function getFetcher(key) {
2581
+ if (future.v7_fetcherPersist) {
2582
+ activeFetchers.set(key, (activeFetchers.get(key) || 0) + 1);
2583
+ // If this fetcher was previously marked for deletion, unmark it since we
2584
+ // have a new instance
2585
+ if (deletedFetchers.has(key)) {
2586
+ deletedFetchers.delete(key);
2587
+ }
2588
+ }
2589
+ return state.fetchers.get(key) || IDLE_FETCHER;
2590
+ }
2591
+ function deleteFetcher(key) {
2592
+ let fetcher = state.fetchers.get(key);
2593
+ // Don't abort the controller if this is a deletion of a fetcher.submit()
2594
+ // in it's loading phase since - we don't want to abort the corresponding
2595
+ // revalidation and want them to complete and land
2596
+ if (fetchControllers.has(key) && !(fetcher && fetcher.state === "loading" && fetchReloadIds.has(key))) {
2597
+ abortFetcher(key);
2598
+ }
2599
+ fetchLoadMatches.delete(key);
2600
+ fetchReloadIds.delete(key);
2601
+ fetchRedirectIds.delete(key);
2602
+ deletedFetchers.delete(key);
2603
+ state.fetchers.delete(key);
2604
+ }
2605
+ function deleteFetcherAndUpdateState(key) {
2606
+ if (future.v7_fetcherPersist) {
2607
+ let count = (activeFetchers.get(key) || 0) - 1;
2608
+ if (count <= 0) {
2609
+ activeFetchers.delete(key);
2610
+ deletedFetchers.add(key);
2611
+ } else {
2612
+ activeFetchers.set(key, count);
2613
+ }
2614
+ } else {
2615
+ deleteFetcher(key);
2616
+ }
2617
+ updateState({
2618
+ fetchers: new Map(state.fetchers)
2619
+ });
2620
+ }
2621
+ function abortFetcher(key) {
2622
+ let controller = fetchControllers.get(key);
2623
+ invariant(controller, "Expected fetch controller: " + key);
2624
+ controller.abort();
2625
+ fetchControllers.delete(key);
2626
+ }
2627
+ function markFetchersDone(keys) {
2628
+ for (let key of keys) {
2629
+ let fetcher = getFetcher(key);
2630
+ let doneFetcher = getDoneFetcher(fetcher.data);
2631
+ state.fetchers.set(key, doneFetcher);
2632
+ }
2633
+ }
2634
+ function markFetchRedirectsDone() {
2635
+ let doneKeys = [];
2636
+ let updatedFetchers = false;
2637
+ for (let key of fetchRedirectIds) {
2638
+ let fetcher = state.fetchers.get(key);
2639
+ invariant(fetcher, "Expected fetcher: " + key);
2640
+ if (fetcher.state === "loading") {
2641
+ fetchRedirectIds.delete(key);
2642
+ doneKeys.push(key);
2643
+ updatedFetchers = true;
2644
+ }
2645
+ }
2646
+ markFetchersDone(doneKeys);
2647
+ return updatedFetchers;
2648
+ }
2649
+ function abortStaleFetchLoads(landedId) {
2650
+ let yeetedKeys = [];
2651
+ for (let [key, id] of fetchReloadIds) {
2652
+ if (id < landedId) {
2653
+ let fetcher = state.fetchers.get(key);
2654
+ invariant(fetcher, "Expected fetcher: " + key);
2655
+ if (fetcher.state === "loading") {
2656
+ abortFetcher(key);
2657
+ fetchReloadIds.delete(key);
2658
+ yeetedKeys.push(key);
2659
+ }
2660
+ }
2661
+ }
2662
+ markFetchersDone(yeetedKeys);
2663
+ return yeetedKeys.length > 0;
2664
+ }
2665
+ function getBlocker(key, fn) {
2666
+ let blocker = state.blockers.get(key) || IDLE_BLOCKER;
2667
+ if (blockerFunctions.get(key) !== fn) {
2668
+ blockerFunctions.set(key, fn);
2669
+ }
2670
+ return blocker;
2671
+ }
2672
+ function deleteBlocker(key) {
2673
+ state.blockers.delete(key);
2674
+ blockerFunctions.delete(key);
2675
+ }
2676
+ // Utility function to update blockers, ensuring valid state transitions
2677
+ function updateBlocker(key, newBlocker) {
2678
+ let blocker = state.blockers.get(key) || IDLE_BLOCKER;
2679
+ // Poor mans state machine :)
2680
+ // https://mermaid.live/edit#pako:eNqVkc9OwzAMxl8l8nnjAYrEtDIOHEBIgwvKJTReGy3_lDpIqO27k6awMG0XcrLlnz87nwdonESogKXXBuE79rq75XZO3-yHds0RJVuv70YrPlUrCEe2HfrORS3rubqZfuhtpg5C9wk5tZ4VKcRUq88q9Z8RS0-48cE1iHJkL0ugbHuFLus9L6spZy8nX9MP2CNdomVaposqu3fGayT8T8-jJQwhepo_UtpgBQaDEUom04dZhAN1aJBDlUKJBxE1ceB2Smj0Mln-IBW5AFU2dwUiktt_2Qaq2dBfaKdEup85UV7Yd-dKjlnkabl2Pvr0DTkTreM
2681
+ 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);
2682
+ let blockers = new Map(state.blockers);
2683
+ blockers.set(key, newBlocker);
2684
+ updateState({
2685
+ blockers
2686
+ });
2687
+ }
2688
+ function shouldBlockNavigation(_ref4) {
2689
+ let {
2690
+ currentLocation,
2691
+ nextLocation,
2692
+ historyAction
2693
+ } = _ref4;
2694
+ if (blockerFunctions.size === 0) {
2695
+ return;
2696
+ }
2697
+ // We ony support a single active blocker at the moment since we don't have
2698
+ // any compelling use cases for multi-blocker yet
2699
+ if (blockerFunctions.size > 1) {
2700
+ warning(false, "A router only supports one blocker at a time");
2701
+ }
2702
+ let entries = Array.from(blockerFunctions.entries());
2703
+ let [blockerKey, blockerFunction] = entries[entries.length - 1];
2704
+ let blocker = state.blockers.get(blockerKey);
2705
+ if (blocker && blocker.state === "proceeding") {
2706
+ // If the blocker is currently proceeding, we don't need to re-check
2707
+ // it and can let this navigation continue
2708
+ return;
2709
+ }
2710
+ // At this point, we know we're unblocked/blocked so we need to check the
2711
+ // user-provided blocker function
2712
+ if (blockerFunction({
2713
+ currentLocation,
2714
+ nextLocation,
2715
+ historyAction
2716
+ })) {
2717
+ return blockerKey;
2718
+ }
2719
+ }
2720
+ function cancelActiveDeferreds(predicate) {
2721
+ let cancelledRouteIds = [];
2722
+ activeDeferreds.forEach((dfd, routeId) => {
2723
+ if (!predicate || predicate(routeId)) {
2724
+ // Cancel the deferred - but do not remove from activeDeferreds here -
2725
+ // we rely on the subscribers to do that so our tests can assert proper
2726
+ // cleanup via _internalActiveDeferreds
2727
+ dfd.cancel();
2728
+ cancelledRouteIds.push(routeId);
2729
+ activeDeferreds.delete(routeId);
2730
+ }
2731
+ });
2732
+ return cancelledRouteIds;
2733
+ }
2734
+ // Opt in to capturing and reporting scroll positions during navigations,
2735
+ // used by the <ScrollRestoration> component
2736
+ function enableScrollRestoration(positions, getPosition, getKey) {
2737
+ savedScrollPositions = positions;
2738
+ getScrollPosition = getPosition;
2739
+ getScrollRestorationKey = getKey || null;
2740
+ // Perform initial hydration scroll restoration, since we miss the boat on
2741
+ // the initial updateState() because we've not yet rendered <ScrollRestoration/>
2742
+ // and therefore have no savedScrollPositions available
2743
+ if (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) {
2744
+ initialScrollRestored = true;
2745
+ let y = getSavedScrollPosition(state.location, state.matches);
2746
+ if (y != null) {
2747
+ updateState({
2748
+ restoreScrollPosition: y
2749
+ });
2750
+ }
2751
+ }
2752
+ return () => {
2753
+ savedScrollPositions = null;
2754
+ getScrollPosition = null;
2755
+ getScrollRestorationKey = null;
2756
+ };
2757
+ }
2758
+ function getScrollKey(location, matches) {
2759
+ if (getScrollRestorationKey) {
2760
+ let key = getScrollRestorationKey(location, matches.map(m => convertRouteMatchToUiMatch(m, state.loaderData)));
2761
+ return key || location.key;
2762
+ }
2763
+ return location.key;
2764
+ }
2765
+ function saveScrollPosition(location, matches) {
2766
+ if (savedScrollPositions && getScrollPosition) {
2767
+ let key = getScrollKey(location, matches);
2768
+ savedScrollPositions[key] = getScrollPosition();
2769
+ }
2770
+ }
2771
+ function getSavedScrollPosition(location, matches) {
2772
+ if (savedScrollPositions) {
2773
+ let key = getScrollKey(location, matches);
2774
+ let y = savedScrollPositions[key];
2775
+ if (typeof y === "number") {
2776
+ return y;
2777
+ }
2778
+ }
2779
+ return null;
2780
+ }
2781
+ function _internalSetRoutes(newRoutes) {
2782
+ manifest = {};
2783
+ inFlightDataRoutes = convertRoutesToDataRoutes(newRoutes, mapRouteProperties, undefined, manifest);
2784
+ }
2785
+ router = {
2786
+ get basename() {
2787
+ return basename;
2788
+ },
2789
+ get future() {
2790
+ return future;
2791
+ },
2792
+ get state() {
2793
+ return state;
2794
+ },
2795
+ get routes() {
2796
+ return dataRoutes;
2797
+ },
2798
+ get window() {
2799
+ return routerWindow;
2800
+ },
2801
+ initialize,
2802
+ subscribe,
2803
+ enableScrollRestoration,
2804
+ navigate,
2805
+ fetch,
2806
+ revalidate,
2807
+ // Passthrough to history-aware createHref used by useHref so we get proper
2808
+ // hash-aware URLs in DOM paths
2809
+ createHref: to => init.history.createHref(to),
2810
+ encodeLocation: to => init.history.encodeLocation(to),
2811
+ getFetcher,
2812
+ deleteFetcher: deleteFetcherAndUpdateState,
2813
+ dispose,
2814
+ getBlocker,
2815
+ deleteBlocker,
2816
+ _internalFetchControllers: fetchControllers,
2817
+ _internalActiveDeferreds: activeDeferreds,
2818
+ // TODO: Remove setRoutes, it's temporary to avoid dealing with
2819
+ // updating the tree while validating the update algorithm.
2820
+ _internalSetRoutes
2821
+ };
2822
+ return router;
2823
+ }
2824
+ //#endregion
2825
+ ////////////////////////////////////////////////////////////////////////////////
2826
+ //#region createStaticHandler
2827
+ ////////////////////////////////////////////////////////////////////////////////
2828
+ const UNSAFE_DEFERRED_SYMBOL = Symbol("deferred");
2829
+ function createStaticHandler(routes, opts) {
2830
+ invariant(routes.length > 0, "You must provide a non-empty routes array to createStaticHandler");
2831
+ let manifest = {};
2832
+ let basename = (opts ? opts.basename : null) || "/";
2833
+ let mapRouteProperties;
2834
+ if (opts != null && opts.mapRouteProperties) {
2835
+ mapRouteProperties = opts.mapRouteProperties;
2836
+ } else if (opts != null && opts.detectErrorBoundary) {
2837
+ // If they are still using the deprecated version, wrap it with the new API
2838
+ let detectErrorBoundary = opts.detectErrorBoundary;
2839
+ mapRouteProperties = route => ({
2840
+ hasErrorBoundary: detectErrorBoundary(route)
2841
+ });
2842
+ } else {
2843
+ mapRouteProperties = defaultMapRouteProperties;
2844
+ }
2845
+ // Config driven behavior flags
2846
+ let future = _extends({
2847
+ v7_relativeSplatPath: false,
2848
+ v7_throwAbortReason: false
2849
+ }, opts ? opts.future : null);
2850
+ let dataRoutes = convertRoutesToDataRoutes(routes, mapRouteProperties, undefined, manifest);
2851
+ /**
2852
+ * The query() method is intended for document requests, in which we want to
2853
+ * call an optional action and potentially multiple loaders for all nested
2854
+ * routes. It returns a StaticHandlerContext object, which is very similar
2855
+ * to the router state (location, loaderData, actionData, errors, etc.) and
2856
+ * also adds SSR-specific information such as the statusCode and headers
2857
+ * from action/loaders Responses.
2858
+ *
2859
+ * It _should_ never throw and should report all errors through the
2860
+ * returned context.errors object, properly associating errors to their error
2861
+ * boundary. Additionally, it tracks _deepestRenderedBoundaryId which can be
2862
+ * used to emulate React error boundaries during SSr by performing a second
2863
+ * pass only down to the boundaryId.
2864
+ *
2865
+ * The one exception where we do not return a StaticHandlerContext is when a
2866
+ * redirect response is returned or thrown from any action/loader. We
2867
+ * propagate that out and return the raw Response so the HTTP server can
2868
+ * return it directly.
2869
+ */
2870
+ async function query(request, _temp3) {
2871
+ let {
2872
+ requestContext
2873
+ } = _temp3 === void 0 ? {} : _temp3;
2874
+ let url = new URL(request.url);
2875
+ let method = request.method;
2876
+ let location = createLocation("", createPath(url), null, "default");
2877
+ let matches = matchRoutes(dataRoutes, location, basename);
2878
+ // SSR supports HEAD requests while SPA doesn't
2879
+ if (!isValidMethod(method) && method !== "HEAD") {
2880
+ let error = getInternalRouterError(405, {
2881
+ method
2882
+ });
2883
+ let {
2884
+ matches: methodNotAllowedMatches,
2885
+ route
2886
+ } = getShortCircuitMatches(dataRoutes);
2887
+ return {
2888
+ basename,
2889
+ location,
2890
+ matches: methodNotAllowedMatches,
2891
+ loaderData: {},
2892
+ actionData: null,
2893
+ errors: {
2894
+ [route.id]: error
2895
+ },
2896
+ statusCode: error.status,
2897
+ loaderHeaders: {},
2898
+ actionHeaders: {},
2899
+ activeDeferreds: null
2900
+ };
2901
+ } else if (!matches) {
2902
+ let error = getInternalRouterError(404, {
2903
+ pathname: location.pathname
2904
+ });
2905
+ let {
2906
+ matches: notFoundMatches,
2907
+ route
2908
+ } = getShortCircuitMatches(dataRoutes);
2909
+ return {
2910
+ basename,
2911
+ location,
2912
+ matches: notFoundMatches,
2913
+ loaderData: {},
2914
+ actionData: null,
2915
+ errors: {
2916
+ [route.id]: error
2917
+ },
2918
+ statusCode: error.status,
2919
+ loaderHeaders: {},
2920
+ actionHeaders: {},
2921
+ activeDeferreds: null
2922
+ };
2923
+ }
2924
+ let result = await queryImpl(request, location, matches, requestContext);
2925
+ if (isResponse(result)) {
2926
+ return result;
2927
+ }
2928
+ // When returning StaticHandlerContext, we patch back in the location here
2929
+ // since we need it for React Context. But this helps keep our submit and
2930
+ // loadRouteData operating on a Request instead of a Location
2931
+ return _extends({
2932
+ location,
2933
+ basename
2934
+ }, result);
2935
+ }
2936
+ /**
2937
+ * The queryRoute() method is intended for targeted route requests, either
2938
+ * for fetch ?_data requests or resource route requests. In this case, we
2939
+ * are only ever calling a single action or loader, and we are returning the
2940
+ * returned value directly. In most cases, this will be a Response returned
2941
+ * from the action/loader, but it may be a primitive or other value as well -
2942
+ * and in such cases the calling context should handle that accordingly.
2943
+ *
2944
+ * We do respect the throw/return differentiation, so if an action/loader
2945
+ * throws, then this method will throw the value. This is important so we
2946
+ * can do proper boundary identification in Remix where a thrown Response
2947
+ * must go to the Catch Boundary but a returned Response is happy-path.
2948
+ *
2949
+ * One thing to note is that any Router-initiated Errors that make sense
2950
+ * to associate with a status code will be thrown as an ErrorResponse
2951
+ * instance which include the raw Error, such that the calling context can
2952
+ * serialize the error as they see fit while including the proper response
2953
+ * code. Examples here are 404 and 405 errors that occur prior to reaching
2954
+ * any user-defined loaders.
2955
+ */
2956
+ async function queryRoute(request, _temp4) {
2957
+ let {
2958
+ routeId,
2959
+ requestContext
2960
+ } = _temp4 === void 0 ? {} : _temp4;
2961
+ let url = new URL(request.url);
2962
+ let method = request.method;
2963
+ let location = createLocation("", createPath(url), null, "default");
2964
+ let matches = matchRoutes(dataRoutes, location, basename);
2965
+ // SSR supports HEAD requests while SPA doesn't
2966
+ if (!isValidMethod(method) && method !== "HEAD" && method !== "OPTIONS") {
2967
+ throw getInternalRouterError(405, {
2968
+ method
2969
+ });
2970
+ } else if (!matches) {
2971
+ throw getInternalRouterError(404, {
2972
+ pathname: location.pathname
2973
+ });
2974
+ }
2975
+ let match = routeId ? matches.find(m => m.route.id === routeId) : getTargetMatch(matches, location);
2976
+ if (routeId && !match) {
2977
+ throw getInternalRouterError(403, {
2978
+ pathname: location.pathname,
2979
+ routeId
2980
+ });
2981
+ } else if (!match) {
2982
+ // This should never hit I don't think?
2983
+ throw getInternalRouterError(404, {
2984
+ pathname: location.pathname
2985
+ });
2986
+ }
2987
+ let result = await queryImpl(request, location, matches, requestContext, match);
2988
+ if (isResponse(result)) {
2989
+ return result;
2990
+ }
2991
+ let error = result.errors ? Object.values(result.errors)[0] : undefined;
2992
+ if (error !== undefined) {
2993
+ // If we got back result.errors, that means the loader/action threw
2994
+ // _something_ that wasn't a Response, but it's not guaranteed/required
2995
+ // to be an `instanceof Error` either, so we have to use throw here to
2996
+ // preserve the "error" state outside of queryImpl.
2997
+ throw error;
2998
+ }
2999
+ // Pick off the right state value to return
3000
+ if (result.actionData) {
3001
+ return Object.values(result.actionData)[0];
3002
+ }
3003
+ if (result.loaderData) {
3004
+ var _result$activeDeferre;
3005
+ let data = Object.values(result.loaderData)[0];
3006
+ if ((_result$activeDeferre = result.activeDeferreds) != null && _result$activeDeferre[match.route.id]) {
3007
+ data[UNSAFE_DEFERRED_SYMBOL] = result.activeDeferreds[match.route.id];
3008
+ }
3009
+ return data;
3010
+ }
3011
+ return undefined;
3012
+ }
3013
+ async function queryImpl(request, location, matches, requestContext, routeMatch) {
3014
+ invariant(request.signal, "query()/queryRoute() requests must contain an AbortController signal");
3015
+ try {
3016
+ if (isMutationMethod(request.method.toLowerCase())) {
3017
+ let result = await submit(request, matches, routeMatch || getTargetMatch(matches, location), requestContext, routeMatch != null);
3018
+ return result;
3019
+ }
3020
+ let result = await loadRouteData(request, matches, requestContext, routeMatch);
3021
+ return isResponse(result) ? result : _extends({}, result, {
3022
+ actionData: null,
3023
+ actionHeaders: {}
3024
+ });
3025
+ } catch (e) {
3026
+ // If the user threw/returned a Response in callLoaderOrAction, we throw
3027
+ // it to bail out and then return or throw here based on whether the user
3028
+ // returned or threw
3029
+ if (isQueryRouteResponse(e)) {
3030
+ if (e.type === ResultType.error) {
3031
+ throw e.response;
3032
+ }
3033
+ return e.response;
3034
+ }
3035
+ // Redirects are always returned since they don't propagate to catch
3036
+ // boundaries
3037
+ if (isRedirectResponse(e)) {
3038
+ return e;
3039
+ }
3040
+ throw e;
3041
+ }
3042
+ }
3043
+ async function submit(request, matches, actionMatch, requestContext, isRouteRequest) {
3044
+ let result;
3045
+ if (!actionMatch.route.action && !actionMatch.route.lazy) {
3046
+ let error = getInternalRouterError(405, {
3047
+ method: request.method,
3048
+ pathname: new URL(request.url).pathname,
3049
+ routeId: actionMatch.route.id
3050
+ });
3051
+ if (isRouteRequest) {
3052
+ throw error;
3053
+ }
3054
+ result = {
3055
+ type: ResultType.error,
3056
+ error
3057
+ };
3058
+ } else {
3059
+ result = await callLoaderOrAction("action", request, actionMatch, matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath, {
3060
+ isStaticRequest: true,
3061
+ isRouteRequest,
3062
+ requestContext
3063
+ });
3064
+ if (request.signal.aborted) {
3065
+ throwStaticHandlerAbortedError(request, isRouteRequest, future);
3066
+ }
3067
+ }
3068
+ if (isRedirectResult(result)) {
3069
+ // Uhhhh - this should never happen, we should always throw these from
3070
+ // callLoaderOrAction, but the type narrowing here keeps TS happy and we
3071
+ // can get back on the "throw all redirect responses" train here should
3072
+ // this ever happen :/
3073
+ throw new Response(null, {
3074
+ status: result.status,
3075
+ headers: {
3076
+ Location: result.location
3077
+ }
3078
+ });
3079
+ }
3080
+ if (isDeferredResult(result)) {
3081
+ let error = getInternalRouterError(400, {
3082
+ type: "defer-action"
3083
+ });
3084
+ if (isRouteRequest) {
3085
+ throw error;
3086
+ }
3087
+ result = {
3088
+ type: ResultType.error,
3089
+ error
3090
+ };
3091
+ }
3092
+ if (isRouteRequest) {
3093
+ // Note: This should only be non-Response values if we get here, since
3094
+ // isRouteRequest should throw any Response received in callLoaderOrAction
3095
+ if (isErrorResult(result)) {
3096
+ throw result.error;
3097
+ }
3098
+ return {
3099
+ matches: [actionMatch],
3100
+ loaderData: {},
3101
+ actionData: {
3102
+ [actionMatch.route.id]: result.data
3103
+ },
3104
+ errors: null,
3105
+ // Note: statusCode + headers are unused here since queryRoute will
3106
+ // return the raw Response or value
3107
+ statusCode: 200,
3108
+ loaderHeaders: {},
3109
+ actionHeaders: {},
3110
+ activeDeferreds: null
3111
+ };
3112
+ }
3113
+ if (isErrorResult(result)) {
3114
+ // Store off the pending error - we use it to determine which loaders
3115
+ // to call and will commit it when we complete the navigation
3116
+ let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);
3117
+ let context = await loadRouteData(request, matches, requestContext, undefined, {
3118
+ [boundaryMatch.route.id]: result.error
3119
+ });
3120
+ // action status codes take precedence over loader status codes
3121
+ return _extends({}, context, {
3122
+ statusCode: isRouteErrorResponse(result.error) ? result.error.status : 500,
3123
+ actionData: null,
3124
+ actionHeaders: _extends({}, result.headers ? {
3125
+ [actionMatch.route.id]: result.headers
3126
+ } : {})
3127
+ });
3128
+ }
3129
+ // Create a GET request for the loaders
3130
+ let loaderRequest = new Request(request.url, {
3131
+ headers: request.headers,
3132
+ redirect: request.redirect,
3133
+ signal: request.signal
3134
+ });
3135
+ let context = await loadRouteData(loaderRequest, matches, requestContext);
3136
+ return _extends({}, context, result.statusCode ? {
3137
+ statusCode: result.statusCode
3138
+ } : {}, {
3139
+ actionData: {
3140
+ [actionMatch.route.id]: result.data
3141
+ },
3142
+ actionHeaders: _extends({}, result.headers ? {
3143
+ [actionMatch.route.id]: result.headers
3144
+ } : {})
3145
+ });
3146
+ }
3147
+ async function loadRouteData(request, matches, requestContext, routeMatch, pendingActionError) {
3148
+ let isRouteRequest = routeMatch != null;
3149
+ // Short circuit if we have no loaders to run (queryRoute())
3150
+ if (isRouteRequest && !(routeMatch != null && routeMatch.route.loader) && !(routeMatch != null && routeMatch.route.lazy)) {
3151
+ throw getInternalRouterError(400, {
3152
+ method: request.method,
3153
+ pathname: new URL(request.url).pathname,
3154
+ routeId: routeMatch == null ? void 0 : routeMatch.route.id
3155
+ });
3156
+ }
3157
+ let requestMatches = routeMatch ? [routeMatch] : getLoaderMatchesUntilBoundary(matches, Object.keys(pendingActionError || {})[0]);
3158
+ let matchesToLoad = requestMatches.filter(m => m.route.loader || m.route.lazy);
3159
+ // Short circuit if we have no loaders to run (query())
3160
+ if (matchesToLoad.length === 0) {
3161
+ return {
3162
+ matches,
3163
+ // Add a null for all matched routes for proper revalidation on the client
3164
+ loaderData: matches.reduce((acc, m) => Object.assign(acc, {
3165
+ [m.route.id]: null
3166
+ }), {}),
3167
+ errors: pendingActionError || null,
3168
+ statusCode: 200,
3169
+ loaderHeaders: {},
3170
+ activeDeferreds: null
3171
+ };
3172
+ }
3173
+ let results = await Promise.all([...matchesToLoad.map(match => callLoaderOrAction("loader", request, match, matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath, {
3174
+ isStaticRequest: true,
3175
+ isRouteRequest,
3176
+ requestContext
3177
+ }))]);
3178
+ if (request.signal.aborted) {
3179
+ throwStaticHandlerAbortedError(request, isRouteRequest, future);
3180
+ }
3181
+ // Process and commit output from loaders
3182
+ let activeDeferreds = new Map();
3183
+ let context = processRouteLoaderData(matches, matchesToLoad, results, pendingActionError, activeDeferreds);
3184
+ // Add a null for any non-loader matches for proper revalidation on the client
3185
+ let executedLoaders = new Set(matchesToLoad.map(match => match.route.id));
3186
+ matches.forEach(match => {
3187
+ if (!executedLoaders.has(match.route.id)) {
3188
+ context.loaderData[match.route.id] = null;
3189
+ }
3190
+ });
3191
+ return _extends({}, context, {
3192
+ matches,
3193
+ activeDeferreds: activeDeferreds.size > 0 ? Object.fromEntries(activeDeferreds.entries()) : null
3194
+ });
3195
+ }
3196
+ return {
3197
+ dataRoutes,
3198
+ query,
3199
+ queryRoute
3200
+ };
3201
+ }
3202
+ //#endregion
3203
+ ////////////////////////////////////////////////////////////////////////////////
3204
+ //#region Helpers
3205
+ ////////////////////////////////////////////////////////////////////////////////
3206
+ /**
3207
+ * Given an existing StaticHandlerContext and an error thrown at render time,
3208
+ * provide an updated StaticHandlerContext suitable for a second SSR render
3209
+ */
3210
+ function getStaticContextFromError(routes, context, error) {
3211
+ let newContext = _extends({}, context, {
3212
+ statusCode: isRouteErrorResponse(error) ? error.status : 500,
3213
+ errors: {
3214
+ [context._deepestRenderedBoundaryId || routes[0].id]: error
3215
+ }
3216
+ });
3217
+ return newContext;
3218
+ }
3219
+ function throwStaticHandlerAbortedError(request, isRouteRequest, future) {
3220
+ if (future.v7_throwAbortReason && request.signal.reason !== undefined) {
3221
+ throw request.signal.reason;
3222
+ }
3223
+ let method = isRouteRequest ? "queryRoute" : "query";
3224
+ throw new Error(method + "() call aborted: " + request.method + " " + request.url);
3225
+ }
3226
+ function isSubmissionNavigation(opts) {
3227
+ return opts != null && ("formData" in opts && opts.formData != null || "body" in opts && opts.body !== undefined);
3228
+ }
3229
+ function normalizeTo(location, matches, basename, prependBasename, to, v7_relativeSplatPath, fromRouteId, relative) {
3230
+ let contextualMatches;
3231
+ let activeRouteMatch;
3232
+ if (fromRouteId) {
3233
+ // Grab matches up to the calling route so our route-relative logic is
3234
+ // relative to the correct source route
3235
+ contextualMatches = [];
3236
+ for (let match of matches) {
3237
+ contextualMatches.push(match);
3238
+ if (match.route.id === fromRouteId) {
3239
+ activeRouteMatch = match;
3240
+ break;
3241
+ }
3242
+ }
3243
+ } else {
3244
+ contextualMatches = matches;
3245
+ activeRouteMatch = matches[matches.length - 1];
3246
+ }
3247
+ // Resolve the relative path
3248
+ let path = resolveTo(to ? to : ".", getResolveToMatches(contextualMatches, v7_relativeSplatPath), stripBasename(location.pathname, basename) || location.pathname, relative === "path");
3249
+ // When `to` is not specified we inherit search/hash from the current
3250
+ // location, unlike when to="." and we just inherit the path.
3251
+ // See https://github.com/remix-run/remix/issues/927
3252
+ if (to == null) {
3253
+ path.search = location.search;
3254
+ path.hash = location.hash;
3255
+ }
3256
+ // Add an ?index param for matched index routes if we don't already have one
3257
+ if ((to == null || to === "" || to === ".") && activeRouteMatch && activeRouteMatch.route.index && !hasNakedIndexQuery(path.search)) {
3258
+ path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
3259
+ }
3260
+ // If we're operating within a basename, prepend it to the pathname. If
3261
+ // this is a root navigation, then just use the raw basename which allows
3262
+ // the basename to have full control over the presence of a trailing slash
3263
+ // on root actions
3264
+ if (prependBasename && basename !== "/") {
3265
+ path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
3266
+ }
3267
+ return createPath(path);
3268
+ }
3269
+ // Normalize navigation options by converting formMethod=GET formData objects to
3270
+ // URLSearchParams so they behave identically to links with query params
3271
+ function normalizeNavigateOptions(normalizeFormMethod, isFetcher, path, opts) {
3272
+ // Return location verbatim on non-submission navigations
3273
+ if (!opts || !isSubmissionNavigation(opts)) {
3274
+ return {
3275
+ path
3276
+ };
3277
+ }
3278
+ if (opts.formMethod && !isValidMethod(opts.formMethod)) {
3279
+ return {
3280
+ path,
3281
+ error: getInternalRouterError(405, {
3282
+ method: opts.formMethod
3283
+ })
3284
+ };
3285
+ }
3286
+ let getInvalidBodyError = () => ({
3287
+ path,
3288
+ error: getInternalRouterError(400, {
3289
+ type: "invalid-body"
3290
+ })
3291
+ });
3292
+ // Create a Submission on non-GET navigations
3293
+ let rawFormMethod = opts.formMethod || "get";
3294
+ let formMethod = normalizeFormMethod ? rawFormMethod.toUpperCase() : rawFormMethod.toLowerCase();
3295
+ let formAction = stripHashFromPath(path);
3296
+ if (opts.body !== undefined) {
3297
+ if (opts.formEncType === "text/plain") {
3298
+ // text only support POST/PUT/PATCH/DELETE submissions
3299
+ if (!isMutationMethod(formMethod)) {
3300
+ return getInvalidBodyError();
3301
+ }
3302
+ let text = typeof opts.body === "string" ? opts.body : opts.body instanceof FormData || opts.body instanceof URLSearchParams ?
3303
+ // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data
3304
+ Array.from(opts.body.entries()).reduce((acc, _ref5) => {
3305
+ let [name, value] = _ref5;
3306
+ return "" + acc + name + "=" + value + "\n";
3307
+ }, "") : String(opts.body);
3308
+ return {
3309
+ path,
3310
+ submission: {
3311
+ formMethod,
3312
+ formAction,
3313
+ formEncType: opts.formEncType,
3314
+ formData: undefined,
3315
+ json: undefined,
3316
+ text
3317
+ }
3318
+ };
3319
+ } else if (opts.formEncType === "application/json") {
3320
+ // json only supports POST/PUT/PATCH/DELETE submissions
3321
+ if (!isMutationMethod(formMethod)) {
3322
+ return getInvalidBodyError();
3323
+ }
3324
+ try {
3325
+ let json = typeof opts.body === "string" ? JSON.parse(opts.body) : opts.body;
3326
+ return {
3327
+ path,
3328
+ submission: {
3329
+ formMethod,
3330
+ formAction,
3331
+ formEncType: opts.formEncType,
3332
+ formData: undefined,
3333
+ json,
3334
+ text: undefined
3335
+ }
3336
+ };
3337
+ } catch (e) {
3338
+ return getInvalidBodyError();
3339
+ }
3340
+ }
3341
+ }
3342
+ invariant(typeof FormData === "function", "FormData is not available in this environment");
3343
+ let searchParams;
3344
+ let formData;
3345
+ if (opts.formData) {
3346
+ searchParams = convertFormDataToSearchParams(opts.formData);
3347
+ formData = opts.formData;
3348
+ } else if (opts.body instanceof FormData) {
3349
+ searchParams = convertFormDataToSearchParams(opts.body);
3350
+ formData = opts.body;
3351
+ } else if (opts.body instanceof URLSearchParams) {
3352
+ searchParams = opts.body;
3353
+ formData = convertSearchParamsToFormData(searchParams);
3354
+ } else if (opts.body == null) {
3355
+ searchParams = new URLSearchParams();
3356
+ formData = new FormData();
3357
+ } else {
3358
+ try {
3359
+ searchParams = new URLSearchParams(opts.body);
3360
+ formData = convertSearchParamsToFormData(searchParams);
3361
+ } catch (e) {
3362
+ return getInvalidBodyError();
3363
+ }
3364
+ }
3365
+ let submission = {
3366
+ formMethod,
3367
+ formAction,
3368
+ formEncType: opts && opts.formEncType || "application/x-www-form-urlencoded",
3369
+ formData,
3370
+ json: undefined,
3371
+ text: undefined
3372
+ };
3373
+ if (isMutationMethod(submission.formMethod)) {
3374
+ return {
3375
+ path,
3376
+ submission
3377
+ };
3378
+ }
3379
+ // Flatten submission onto URLSearchParams for GET submissions
3380
+ let parsedPath = parsePath(path);
3381
+ // On GET navigation submissions we can drop the ?index param from the
3382
+ // resulting location since all loaders will run. But fetcher GET submissions
3383
+ // only run a single loader so we need to preserve any incoming ?index params
3384
+ if (isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search)) {
3385
+ searchParams.append("index", "");
3386
+ }
3387
+ parsedPath.search = "?" + searchParams;
3388
+ return {
3389
+ path: createPath(parsedPath),
3390
+ submission
3391
+ };
3392
+ }
3393
+ // Filter out all routes below any caught error as they aren't going to
3394
+ // render so we don't need to load them
3395
+ function getLoaderMatchesUntilBoundary(matches, boundaryId) {
3396
+ let boundaryMatches = matches;
3397
+ if (boundaryId) {
3398
+ let index = matches.findIndex(m => m.route.id === boundaryId);
3399
+ if (index >= 0) {
3400
+ boundaryMatches = matches.slice(0, index);
3401
+ }
3402
+ }
3403
+ return boundaryMatches;
3404
+ }
3405
+ function getMatchesToLoad(history, state, matches, submission, location, isInitialLoad, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionData, pendingError) {
3406
+ let actionResult = pendingError ? Object.values(pendingError)[0] : pendingActionData ? Object.values(pendingActionData)[0] : undefined;
3407
+ let currentUrl = history.createURL(state.location);
3408
+ let nextUrl = history.createURL(location);
3409
+ // Pick navigation matches that are net-new or qualify for revalidation
3410
+ let boundaryId = pendingError ? Object.keys(pendingError)[0] : undefined;
3411
+ let boundaryMatches = getLoaderMatchesUntilBoundary(matches, boundaryId);
3412
+ let navigationMatches = boundaryMatches.filter((match, index) => {
3413
+ let {
3414
+ route
3415
+ } = match;
3416
+ if (route.lazy) {
3417
+ // We haven't loaded this route yet so we don't know if it's got a loader!
3418
+ return true;
3419
+ }
3420
+ if (route.loader == null) {
3421
+ return false;
3422
+ }
3423
+ if (isInitialLoad) {
3424
+ if (route.loader.hydrate) {
3425
+ return true;
3426
+ }
3427
+ return state.loaderData[route.id] === undefined && (
3428
+ // Don't re-run if the loader ran and threw an error
3429
+ !state.errors || state.errors[route.id] === undefined);
3430
+ }
3431
+ // Always call the loader on new route instances and pending defer cancellations
3432
+ if (isNewLoader(state.loaderData, state.matches[index], match) || cancelledDeferredRoutes.some(id => id === match.route.id)) {
3433
+ return true;
3434
+ }
3435
+ // This is the default implementation for when we revalidate. If the route
3436
+ // provides it's own implementation, then we give them full control but
3437
+ // provide this value so they can leverage it if needed after they check
3438
+ // their own specific use cases
3439
+ let currentRouteMatch = state.matches[index];
3440
+ let nextRouteMatch = match;
3441
+ return shouldRevalidateLoader(match, _extends({
3442
+ currentUrl,
3443
+ currentParams: currentRouteMatch.params,
3444
+ nextUrl,
3445
+ nextParams: nextRouteMatch.params
3446
+ }, submission, {
3447
+ actionResult,
3448
+ defaultShouldRevalidate:
3449
+ // Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate
3450
+ isRevalidationRequired ||
3451
+ // Clicked the same link, resubmitted a GET form
3452
+ currentUrl.pathname + currentUrl.search === nextUrl.pathname + nextUrl.search ||
3453
+ // Search params affect all loaders
3454
+ currentUrl.search !== nextUrl.search || isNewRouteInstance(currentRouteMatch, nextRouteMatch)
3455
+ }));
3456
+ });
3457
+ // Pick fetcher.loads that need to be revalidated
3458
+ let revalidatingFetchers = [];
3459
+ fetchLoadMatches.forEach((f, key) => {
3460
+ // Don't revalidate:
3461
+ // - on initial load (shouldn't be any fetchers then anyway)
3462
+ // - if fetcher won't be present in the subsequent render
3463
+ // - no longer matches the URL (v7_fetcherPersist=false)
3464
+ // - was unmounted but persisted due to v7_fetcherPersist=true
3465
+ if (isInitialLoad || !matches.some(m => m.route.id === f.routeId) || deletedFetchers.has(key)) {
3466
+ return;
3467
+ }
3468
+ let fetcherMatches = matchRoutes(routesToUse, f.path, basename);
3469
+ // If the fetcher path no longer matches, push it in with null matches so
3470
+ // we can trigger a 404 in callLoadersAndMaybeResolveData. Note this is
3471
+ // currently only a use-case for Remix HMR where the route tree can change
3472
+ // at runtime and remove a route previously loaded via a fetcher
3473
+ if (!fetcherMatches) {
3474
+ revalidatingFetchers.push({
3475
+ key,
3476
+ routeId: f.routeId,
3477
+ path: f.path,
3478
+ matches: null,
3479
+ match: null,
3480
+ controller: null
3481
+ });
3482
+ return;
3483
+ }
3484
+ // Revalidating fetchers are decoupled from the route matches since they
3485
+ // load from a static href. They revalidate based on explicit revalidation
3486
+ // (submission, useRevalidator, or X-Remix-Revalidate)
3487
+ let fetcher = state.fetchers.get(key);
3488
+ let fetcherMatch = getTargetMatch(fetcherMatches, f.path);
3489
+ let shouldRevalidate = false;
3490
+ if (fetchRedirectIds.has(key)) {
3491
+ // Never trigger a revalidation of an actively redirecting fetcher
3492
+ shouldRevalidate = false;
3493
+ } else if (cancelledFetcherLoads.includes(key)) {
3494
+ // Always revalidate if the fetcher was cancelled
3495
+ shouldRevalidate = true;
3496
+ } else if (fetcher && fetcher.state !== "idle" && fetcher.data === undefined) {
3497
+ // If the fetcher hasn't ever completed loading yet, then this isn't a
3498
+ // revalidation, it would just be a brand new load if an explicit
3499
+ // revalidation is required
3500
+ shouldRevalidate = isRevalidationRequired;
3501
+ } else {
3502
+ // Otherwise fall back on any user-defined shouldRevalidate, defaulting
3503
+ // to explicit revalidations only
3504
+ shouldRevalidate = shouldRevalidateLoader(fetcherMatch, _extends({
3505
+ currentUrl,
3506
+ currentParams: state.matches[state.matches.length - 1].params,
3507
+ nextUrl,
3508
+ nextParams: matches[matches.length - 1].params
3509
+ }, submission, {
3510
+ actionResult,
3511
+ defaultShouldRevalidate: isRevalidationRequired
3512
+ }));
3513
+ }
3514
+ if (shouldRevalidate) {
3515
+ revalidatingFetchers.push({
3516
+ key,
3517
+ routeId: f.routeId,
3518
+ path: f.path,
3519
+ matches: fetcherMatches,
3520
+ match: fetcherMatch,
3521
+ controller: new AbortController()
3522
+ });
3523
+ }
3524
+ });
3525
+ return [navigationMatches, revalidatingFetchers];
3526
+ }
3527
+ function isNewLoader(currentLoaderData, currentMatch, match) {
3528
+ let isNew =
3529
+ // [a] -> [a, b]
3530
+ !currentMatch ||
3531
+ // [a, b] -> [a, c]
3532
+ match.route.id !== currentMatch.route.id;
3533
+ // Handle the case that we don't have data for a re-used route, potentially
3534
+ // from a prior error or from a cancelled pending deferred
3535
+ let isMissingData = currentLoaderData[match.route.id] === undefined;
3536
+ // Always load if this is a net-new route or we don't yet have data
3537
+ return isNew || isMissingData;
3538
+ }
3539
+ function isNewRouteInstance(currentMatch, match) {
3540
+ let currentPath = currentMatch.route.path;
3541
+ return (
3542
+ // param change for this match, /users/123 -> /users/456
3543
+ currentMatch.pathname !== match.pathname ||
3544
+ // splat param changed, which is not present in match.path
3545
+ // e.g. /files/images/avatar.jpg -> files/finances.xls
3546
+ currentPath != null && currentPath.endsWith("*") && currentMatch.params["*"] !== match.params["*"]
3547
+ );
3548
+ }
3549
+ function shouldRevalidateLoader(loaderMatch, arg) {
3550
+ if (loaderMatch.route.shouldRevalidate) {
3551
+ let routeChoice = loaderMatch.route.shouldRevalidate(arg);
3552
+ if (typeof routeChoice === "boolean") {
3553
+ return routeChoice;
3554
+ }
3555
+ }
3556
+ return arg.defaultShouldRevalidate;
3557
+ }
3558
+ /**
3559
+ * Execute route.lazy() methods to lazily load route modules (loader, action,
3560
+ * shouldRevalidate) and update the routeManifest in place which shares objects
3561
+ * with dataRoutes so those get updated as well.
3562
+ */
3563
+ async function loadLazyRouteModule(route, mapRouteProperties, manifest) {
3564
+ if (!route.lazy) {
3565
+ return;
3566
+ }
3567
+ let lazyRoute = await route.lazy();
3568
+ // If the lazy route function was executed and removed by another parallel
3569
+ // call then we can return - first lazy() to finish wins because the return
3570
+ // value of lazy is expected to be static
3571
+ if (!route.lazy) {
3572
+ return;
3573
+ }
3574
+ let routeToUpdate = manifest[route.id];
3575
+ invariant(routeToUpdate, "No route found in manifest");
3576
+ // Update the route in place. This should be safe because there's no way
3577
+ // we could yet be sitting on this route as we can't get there without
3578
+ // resolving lazy() first.
3579
+ //
3580
+ // This is different than the HMR "update" use-case where we may actively be
3581
+ // on the route being updated. The main concern boils down to "does this
3582
+ // mutation affect any ongoing navigations or any current state.matches
3583
+ // values?". If not, it should be safe to update in place.
3584
+ let routeUpdates = {};
3585
+ for (let lazyRouteProperty in lazyRoute) {
3586
+ let staticRouteValue = routeToUpdate[lazyRouteProperty];
3587
+ let isPropertyStaticallyDefined = staticRouteValue !== undefined &&
3588
+ // This property isn't static since it should always be updated based
3589
+ // on the route updates
3590
+ lazyRouteProperty !== "hasErrorBoundary";
3591
+ 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."));
3592
+ if (!isPropertyStaticallyDefined && !immutableRouteKeys.has(lazyRouteProperty)) {
3593
+ routeUpdates[lazyRouteProperty] = lazyRoute[lazyRouteProperty];
3594
+ }
3595
+ }
3596
+ // Mutate the route with the provided updates. Do this first so we pass
3597
+ // the updated version to mapRouteProperties
3598
+ Object.assign(routeToUpdate, routeUpdates);
3599
+ // Mutate the `hasErrorBoundary` property on the route based on the route
3600
+ // updates and remove the `lazy` function so we don't resolve the lazy
3601
+ // route again.
3602
+ Object.assign(routeToUpdate, _extends({}, mapRouteProperties(routeToUpdate), {
3603
+ lazy: undefined
3604
+ }));
3605
+ }
3606
+ async function callLoaderOrAction(type, request, match, matches, manifest, mapRouteProperties, basename, v7_relativeSplatPath, opts) {
3607
+ if (opts === void 0) {
3608
+ opts = {};
3609
+ }
3610
+ let resultType;
3611
+ let result;
3612
+ let onReject;
3613
+ let runHandler = handler => {
3614
+ // Setup a promise we can race against so that abort signals short circuit
3615
+ let reject;
3616
+ let abortPromise = new Promise((_, r) => reject = r);
3617
+ onReject = () => reject();
3618
+ request.signal.addEventListener("abort", onReject);
3619
+ return Promise.race([handler({
3620
+ request,
3621
+ params: match.params,
3622
+ context: opts.requestContext
3623
+ }), abortPromise]);
3624
+ };
3625
+ try {
3626
+ let handler = match.route[type];
3627
+ if (match.route.lazy) {
3628
+ if (handler) {
3629
+ // Run statically defined handler in parallel with lazy()
3630
+ let handlerError;
3631
+ let values = await Promise.all([
3632
+ // If the handler throws, don't let it immediately bubble out,
3633
+ // since we need to let the lazy() execution finish so we know if this
3634
+ // route has a boundary that can handle the error
3635
+ runHandler(handler).catch(e => {
3636
+ handlerError = e;
3637
+ }), loadLazyRouteModule(match.route, mapRouteProperties, manifest)]);
3638
+ if (handlerError) {
3639
+ throw handlerError;
3640
+ }
3641
+ result = values[0];
3642
+ } else {
3643
+ // Load lazy route module, then run any returned handler
3644
+ await loadLazyRouteModule(match.route, mapRouteProperties, manifest);
3645
+ handler = match.route[type];
3646
+ if (handler) {
3647
+ // Handler still run even if we got interrupted to maintain consistency
3648
+ // with un-abortable behavior of handler execution on non-lazy or
3649
+ // previously-lazy-loaded routes
3650
+ result = await runHandler(handler);
3651
+ } else if (type === "action") {
3652
+ let url = new URL(request.url);
3653
+ let pathname = url.pathname + url.search;
3654
+ throw getInternalRouterError(405, {
3655
+ method: request.method,
3656
+ pathname,
3657
+ routeId: match.route.id
3658
+ });
3659
+ } else {
3660
+ // lazy() route has no loader to run. Short circuit here so we don't
3661
+ // hit the invariant below that errors on returning undefined.
3662
+ return {
3663
+ type: ResultType.data,
3664
+ data: undefined
3665
+ };
3666
+ }
3667
+ }
3668
+ } else if (!handler) {
3669
+ let url = new URL(request.url);
3670
+ let pathname = url.pathname + url.search;
3671
+ throw getInternalRouterError(404, {
3672
+ pathname
3673
+ });
3674
+ } else {
3675
+ result = await runHandler(handler);
3676
+ }
3677
+ 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`.");
3678
+ } catch (e) {
3679
+ resultType = ResultType.error;
3680
+ result = e;
3681
+ } finally {
3682
+ if (onReject) {
3683
+ request.signal.removeEventListener("abort", onReject);
3684
+ }
3685
+ }
3686
+ if (isResponse(result)) {
3687
+ let status = result.status;
3688
+ // Process redirects
3689
+ if (redirectStatusCodes.has(status)) {
3690
+ let location = result.headers.get("Location");
3691
+ invariant(location, "Redirects returned/thrown from loaders/actions must have a Location header");
3692
+ // Support relative routing in internal redirects
3693
+ if (!ABSOLUTE_URL_REGEX.test(location)) {
3694
+ location = normalizeTo(new URL(request.url), matches.slice(0, matches.indexOf(match) + 1), basename, true, location, v7_relativeSplatPath);
3695
+ } else if (!opts.isStaticRequest) {
3696
+ // Strip off the protocol+origin for same-origin + same-basename absolute
3697
+ // redirects. If this is a static request, we can let it go back to the
3698
+ // browser as-is
3699
+ let currentUrl = new URL(request.url);
3700
+ let url = location.startsWith("//") ? new URL(currentUrl.protocol + location) : new URL(location);
3701
+ let isSameBasename = stripBasename(url.pathname, basename) != null;
3702
+ if (url.origin === currentUrl.origin && isSameBasename) {
3703
+ location = url.pathname + url.search + url.hash;
3704
+ }
3705
+ }
3706
+ // Don't process redirects in the router during static requests requests.
3707
+ // Instead, throw the Response and let the server handle it with an HTTP
3708
+ // redirect. We also update the Location header in place in this flow so
3709
+ // basename and relative routing is taken into account
3710
+ if (opts.isStaticRequest) {
3711
+ result.headers.set("Location", location);
3712
+ throw result;
3713
+ }
3714
+ return {
3715
+ type: ResultType.redirect,
3716
+ status,
3717
+ location,
3718
+ revalidate: result.headers.get("X-Remix-Revalidate") !== null,
3719
+ reloadDocument: result.headers.get("X-Remix-Reload-Document") !== null
3720
+ };
3721
+ }
3722
+ // For SSR single-route requests, we want to hand Responses back directly
3723
+ // without unwrapping. We do this with the QueryRouteResponse wrapper
3724
+ // interface so we can know whether it was returned or thrown
3725
+ if (opts.isRouteRequest) {
3726
+ let queryRouteResponse = {
3727
+ type: resultType === ResultType.error ? ResultType.error : ResultType.data,
3728
+ response: result
3729
+ };
3730
+ throw queryRouteResponse;
3731
+ }
3732
+ let data;
3733
+ try {
3734
+ let contentType = result.headers.get("Content-Type");
3735
+ // Check between word boundaries instead of startsWith() due to the last
3736
+ // paragraph of https://httpwg.org/specs/rfc9110.html#field.content-type
3737
+ if (contentType && /\bapplication\/json\b/.test(contentType)) {
3738
+ if (result.body == null) {
3739
+ data = null;
3740
+ } else {
3741
+ data = await result.json();
3742
+ }
3743
+ } else {
3744
+ data = await result.text();
3745
+ }
3746
+ } catch (e) {
3747
+ return {
3748
+ type: ResultType.error,
3749
+ error: e
3750
+ };
3751
+ }
3752
+ if (resultType === ResultType.error) {
3753
+ return {
3754
+ type: resultType,
3755
+ error: new ErrorResponseImpl(status, result.statusText, data),
3756
+ headers: result.headers
3757
+ };
3758
+ }
3759
+ return {
3760
+ type: ResultType.data,
3761
+ data,
3762
+ statusCode: result.status,
3763
+ headers: result.headers
3764
+ };
3765
+ }
3766
+ if (resultType === ResultType.error) {
3767
+ return {
3768
+ type: resultType,
3769
+ error: result
3770
+ };
3771
+ }
3772
+ if (isDeferredData(result)) {
3773
+ var _result$init, _result$init2;
3774
+ return {
3775
+ type: ResultType.deferred,
3776
+ deferredData: result,
3777
+ statusCode: (_result$init = result.init) == null ? void 0 : _result$init.status,
3778
+ headers: ((_result$init2 = result.init) == null ? void 0 : _result$init2.headers) && new Headers(result.init.headers)
3779
+ };
3780
+ }
3781
+ return {
3782
+ type: ResultType.data,
3783
+ data: result
3784
+ };
3785
+ }
3786
+ // Utility method for creating the Request instances for loaders/actions during
3787
+ // client-side navigations and fetches. During SSR we will always have a
3788
+ // Request instance from the static handler (query/queryRoute)
3789
+ function createClientSideRequest(history, location, signal, submission) {
3790
+ let url = history.createURL(stripHashFromPath(location)).toString();
3791
+ let init = {
3792
+ signal
3793
+ };
3794
+ if (submission && isMutationMethod(submission.formMethod)) {
3795
+ let {
3796
+ formMethod,
3797
+ formEncType
3798
+ } = submission;
3799
+ // Didn't think we needed this but it turns out unlike other methods, patch
3800
+ // won't be properly normalized to uppercase and results in a 405 error.
3801
+ // See: https://fetch.spec.whatwg.org/#concept-method
3802
+ init.method = formMethod.toUpperCase();
3803
+ if (formEncType === "application/json") {
3804
+ init.headers = new Headers({
3805
+ "Content-Type": formEncType
3806
+ });
3807
+ init.body = JSON.stringify(submission.json);
3808
+ } else if (formEncType === "text/plain") {
3809
+ // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)
3810
+ init.body = submission.text;
3811
+ } else if (formEncType === "application/x-www-form-urlencoded" && submission.formData) {
3812
+ // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)
3813
+ init.body = convertFormDataToSearchParams(submission.formData);
3814
+ } else {
3815
+ // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)
3816
+ init.body = submission.formData;
3817
+ }
3818
+ }
3819
+ return new Request(url, init);
3820
+ }
3821
+ function convertFormDataToSearchParams(formData) {
3822
+ let searchParams = new URLSearchParams();
3823
+ for (let [key, value] of formData.entries()) {
3824
+ // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#converting-an-entry-list-to-a-list-of-name-value-pairs
3825
+ searchParams.append(key, typeof value === "string" ? value : value.name);
3826
+ }
3827
+ return searchParams;
3828
+ }
3829
+ function convertSearchParamsToFormData(searchParams) {
3830
+ let formData = new FormData();
3831
+ for (let [key, value] of searchParams.entries()) {
3832
+ formData.append(key, value);
3833
+ }
3834
+ return formData;
3835
+ }
3836
+ function processRouteLoaderData(matches, matchesToLoad, results, pendingError, activeDeferreds) {
3837
+ // Fill in loaderData/errors from our loaders
3838
+ let loaderData = {};
3839
+ let errors = null;
3840
+ let statusCode;
3841
+ let foundError = false;
3842
+ let loaderHeaders = {};
3843
+ // Process loader results into state.loaderData/state.errors
3844
+ results.forEach((result, index) => {
3845
+ let id = matchesToLoad[index].route.id;
3846
+ invariant(!isRedirectResult(result), "Cannot handle redirect results in processLoaderData");
3847
+ if (isErrorResult(result)) {
3848
+ // Look upwards from the matched route for the closest ancestor
3849
+ // error boundary, defaulting to the root match
3850
+ let boundaryMatch = findNearestBoundary(matches, id);
3851
+ let error = result.error;
3852
+ // If we have a pending action error, we report it at the highest-route
3853
+ // that throws a loader error, and then clear it out to indicate that
3854
+ // it was consumed
3855
+ if (pendingError) {
3856
+ error = Object.values(pendingError)[0];
3857
+ pendingError = undefined;
3858
+ }
3859
+ errors = errors || {};
3860
+ // Prefer higher error values if lower errors bubble to the same boundary
3861
+ if (errors[boundaryMatch.route.id] == null) {
3862
+ errors[boundaryMatch.route.id] = error;
3863
+ }
3864
+ // Clear our any prior loaderData for the throwing route
3865
+ loaderData[id] = undefined;
3866
+ // Once we find our first (highest) error, we set the status code and
3867
+ // prevent deeper status codes from overriding
3868
+ if (!foundError) {
3869
+ foundError = true;
3870
+ statusCode = isRouteErrorResponse(result.error) ? result.error.status : 500;
3871
+ }
3872
+ if (result.headers) {
3873
+ loaderHeaders[id] = result.headers;
3874
+ }
3875
+ } else {
3876
+ if (isDeferredResult(result)) {
3877
+ activeDeferreds.set(id, result.deferredData);
3878
+ loaderData[id] = result.deferredData.data;
3879
+ } else {
3880
+ loaderData[id] = result.data;
3881
+ }
3882
+ // Error status codes always override success status codes, but if all
3883
+ // loaders are successful we take the deepest status code.
3884
+ if (result.statusCode != null && result.statusCode !== 200 && !foundError) {
3885
+ statusCode = result.statusCode;
3886
+ }
3887
+ if (result.headers) {
3888
+ loaderHeaders[id] = result.headers;
3889
+ }
3890
+ }
3891
+ });
3892
+ // If we didn't consume the pending action error (i.e., all loaders
3893
+ // resolved), then consume it here. Also clear out any loaderData for the
3894
+ // throwing route
3895
+ if (pendingError) {
3896
+ errors = pendingError;
3897
+ loaderData[Object.keys(pendingError)[0]] = undefined;
3898
+ }
3899
+ return {
3900
+ loaderData,
3901
+ errors,
3902
+ statusCode: statusCode || 200,
3903
+ loaderHeaders
3904
+ };
3905
+ }
3906
+ function processLoaderData(state, matches, matchesToLoad, results, pendingError, revalidatingFetchers, fetcherResults, activeDeferreds) {
3907
+ let {
3908
+ loaderData,
3909
+ errors
3910
+ } = processRouteLoaderData(matches, matchesToLoad, results, pendingError, activeDeferreds);
3911
+ // Process results from our revalidating fetchers
3912
+ for (let index = 0; index < revalidatingFetchers.length; index++) {
3913
+ let {
3914
+ key,
3915
+ match,
3916
+ controller
3917
+ } = revalidatingFetchers[index];
3918
+ invariant(fetcherResults !== undefined && fetcherResults[index] !== undefined, "Did not find corresponding fetcher result");
3919
+ let result = fetcherResults[index];
3920
+ // Process fetcher non-redirect errors
3921
+ if (controller && controller.signal.aborted) {
3922
+ // Nothing to do for aborted fetchers
3923
+ continue;
3924
+ } else if (isErrorResult(result)) {
3925
+ let boundaryMatch = findNearestBoundary(state.matches, match == null ? void 0 : match.route.id);
3926
+ if (!(errors && errors[boundaryMatch.route.id])) {
3927
+ errors = _extends({}, errors, {
3928
+ [boundaryMatch.route.id]: result.error
3929
+ });
3930
+ }
3931
+ state.fetchers.delete(key);
3932
+ } else if (isRedirectResult(result)) {
3933
+ // Should never get here, redirects should get processed above, but we
3934
+ // keep this to type narrow to a success result in the else
3935
+ invariant(false, "Unhandled fetcher revalidation redirect");
3936
+ } else if (isDeferredResult(result)) {
3937
+ // Should never get here, deferred data should be awaited for fetchers
3938
+ // in resolveDeferredResults
3939
+ invariant(false, "Unhandled fetcher deferred data");
3940
+ } else {
3941
+ let doneFetcher = getDoneFetcher(result.data);
3942
+ state.fetchers.set(key, doneFetcher);
3943
+ }
3944
+ }
3945
+ return {
3946
+ loaderData,
3947
+ errors
3948
+ };
3949
+ }
3950
+ function mergeLoaderData(loaderData, newLoaderData, matches, errors) {
3951
+ let mergedLoaderData = _extends({}, newLoaderData);
3952
+ for (let match of matches) {
3953
+ let id = match.route.id;
3954
+ if (newLoaderData.hasOwnProperty(id)) {
3955
+ if (newLoaderData[id] !== undefined) {
3956
+ mergedLoaderData[id] = newLoaderData[id];
3957
+ }
3958
+ } else if (loaderData[id] !== undefined && match.route.loader) {
3959
+ // Preserve existing keys not included in newLoaderData and where a loader
3960
+ // wasn't removed by HMR
3961
+ mergedLoaderData[id] = loaderData[id];
3962
+ }
3963
+ if (errors && errors.hasOwnProperty(id)) {
3964
+ // Don't keep any loader data below the boundary
3965
+ break;
3966
+ }
3967
+ }
3968
+ return mergedLoaderData;
3969
+ }
3970
+ // Find the nearest error boundary, looking upwards from the leaf route (or the
3971
+ // route specified by routeId) for the closest ancestor error boundary,
3972
+ // defaulting to the root match
3973
+ function findNearestBoundary(matches, routeId) {
3974
+ let eligibleMatches = routeId ? matches.slice(0, matches.findIndex(m => m.route.id === routeId) + 1) : [...matches];
3975
+ return eligibleMatches.reverse().find(m => m.route.hasErrorBoundary === true) || matches[0];
3976
+ }
3977
+ function getShortCircuitMatches(routes) {
3978
+ // Prefer a root layout route if present, otherwise shim in a route object
3979
+ let route = routes.length === 1 ? routes[0] : routes.find(r => r.index || !r.path || r.path === "/") || {
3980
+ id: "__shim-error-route__"
3981
+ };
3982
+ return {
3983
+ matches: [{
3984
+ params: {},
3985
+ pathname: "",
3986
+ pathnameBase: "",
3987
+ route
3988
+ }],
3989
+ route
3990
+ };
3991
+ }
3992
+ function getInternalRouterError(status, _temp5) {
3993
+ let {
3994
+ pathname,
3995
+ routeId,
3996
+ method,
3997
+ type
3998
+ } = _temp5 === void 0 ? {} : _temp5;
3999
+ let statusText = "Unknown Server Error";
4000
+ let errorMessage = "Unknown @remix-run/router error";
4001
+ if (status === 400) {
4002
+ statusText = "Bad Request";
4003
+ if (method && pathname && routeId) {
4004
+ 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.";
4005
+ } else if (type === "defer-action") {
4006
+ errorMessage = "defer() is not supported in actions";
4007
+ } else if (type === "invalid-body") {
4008
+ errorMessage = "Unable to encode submission body";
4009
+ }
4010
+ } else if (status === 403) {
4011
+ statusText = "Forbidden";
4012
+ errorMessage = "Route \"" + routeId + "\" does not match URL \"" + pathname + "\"";
4013
+ } else if (status === 404) {
4014
+ statusText = "Not Found";
4015
+ errorMessage = "No route matches URL \"" + pathname + "\"";
4016
+ } else if (status === 405) {
4017
+ statusText = "Method Not Allowed";
4018
+ if (method && pathname && routeId) {
4019
+ 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.";
4020
+ } else if (method) {
4021
+ errorMessage = "Invalid request method \"" + method.toUpperCase() + "\"";
4022
+ }
4023
+ }
4024
+ return new ErrorResponseImpl(status || 500, statusText, new Error(errorMessage), true);
4025
+ }
4026
+ // Find any returned redirect errors, starting from the lowest match
4027
+ function findRedirect(results) {
4028
+ for (let i = results.length - 1; i >= 0; i--) {
4029
+ let result = results[i];
4030
+ if (isRedirectResult(result)) {
4031
+ return {
4032
+ result,
4033
+ idx: i
4034
+ };
4035
+ }
4036
+ }
4037
+ }
4038
+ function stripHashFromPath(path) {
4039
+ let parsedPath = typeof path === "string" ? parsePath(path) : path;
4040
+ return createPath(_extends({}, parsedPath, {
4041
+ hash: ""
4042
+ }));
4043
+ }
4044
+ function isHashChangeOnly(a, b) {
4045
+ if (a.pathname !== b.pathname || a.search !== b.search) {
4046
+ return false;
4047
+ }
4048
+ if (a.hash === "") {
4049
+ // /page -> /page#hash
4050
+ return b.hash !== "";
4051
+ } else if (a.hash === b.hash) {
4052
+ // /page#hash -> /page#hash
4053
+ return true;
4054
+ } else if (b.hash !== "") {
4055
+ // /page#hash -> /page#other
4056
+ return true;
4057
+ }
4058
+ // If the hash is removed the browser will re-perform a request to the server
4059
+ // /page#hash -> /page
4060
+ return false;
4061
+ }
4062
+ function isDeferredResult(result) {
4063
+ return result.type === ResultType.deferred;
4064
+ }
4065
+ function isErrorResult(result) {
4066
+ return result.type === ResultType.error;
4067
+ }
4068
+ function isRedirectResult(result) {
4069
+ return (result && result.type) === ResultType.redirect;
4070
+ }
4071
+ function isDeferredData(value) {
4072
+ let deferred = value;
4073
+ return deferred && typeof deferred === "object" && typeof deferred.data === "object" && typeof deferred.subscribe === "function" && typeof deferred.cancel === "function" && typeof deferred.resolveData === "function";
4074
+ }
4075
+ function isResponse(value) {
4076
+ return value != null && typeof value.status === "number" && typeof value.statusText === "string" && typeof value.headers === "object" && typeof value.body !== "undefined";
4077
+ }
4078
+ function isRedirectResponse(result) {
4079
+ if (!isResponse(result)) {
4080
+ return false;
4081
+ }
4082
+ let status = result.status;
4083
+ let location = result.headers.get("Location");
4084
+ return status >= 300 && status <= 399 && location != null;
4085
+ }
4086
+ function isQueryRouteResponse(obj) {
4087
+ return obj && isResponse(obj.response) && (obj.type === ResultType.data || obj.type === ResultType.error);
4088
+ }
4089
+ function isValidMethod(method) {
4090
+ return validRequestMethods.has(method.toLowerCase());
4091
+ }
4092
+ function isMutationMethod(method) {
4093
+ return validMutationMethods.has(method.toLowerCase());
4094
+ }
4095
+ async function resolveDeferredResults(currentMatches, matchesToLoad, results, signals, isFetcher, currentLoaderData) {
4096
+ for (let index = 0; index < results.length; index++) {
4097
+ let result = results[index];
4098
+ let match = matchesToLoad[index];
4099
+ // If we don't have a match, then we can have a deferred result to do
4100
+ // anything with. This is for revalidating fetchers where the route was
4101
+ // removed during HMR
4102
+ if (!match) {
4103
+ continue;
4104
+ }
4105
+ let currentMatch = currentMatches.find(m => m.route.id === match.route.id);
4106
+ let isRevalidatingLoader = currentMatch != null && !isNewRouteInstance(currentMatch, match) && (currentLoaderData && currentLoaderData[match.route.id]) !== undefined;
4107
+ if (isDeferredResult(result) && (isFetcher || isRevalidatingLoader)) {
4108
+ // Note: we do not have to touch activeDeferreds here since we race them
4109
+ // against the signal in resolveDeferredData and they'll get aborted
4110
+ // there if needed
4111
+ let signal = signals[index];
4112
+ invariant(signal, "Expected an AbortSignal for revalidating fetcher deferred result");
4113
+ await resolveDeferredData(result, signal, isFetcher).then(result => {
4114
+ if (result) {
4115
+ results[index] = result || results[index];
4116
+ }
4117
+ });
4118
+ }
4119
+ }
4120
+ }
4121
+ async function resolveDeferredData(result, signal, unwrap) {
4122
+ if (unwrap === void 0) {
4123
+ unwrap = false;
4124
+ }
4125
+ let aborted = await result.deferredData.resolveData(signal);
4126
+ if (aborted) {
4127
+ return;
4128
+ }
4129
+ if (unwrap) {
4130
+ try {
4131
+ return {
4132
+ type: ResultType.data,
4133
+ data: result.deferredData.unwrappedData
4134
+ };
4135
+ } catch (e) {
4136
+ // Handle any TrackedPromise._error values encountered while unwrapping
4137
+ return {
4138
+ type: ResultType.error,
4139
+ error: e
4140
+ };
4141
+ }
4142
+ }
4143
+ return {
4144
+ type: ResultType.data,
4145
+ data: result.deferredData.data
4146
+ };
4147
+ }
4148
+ function hasNakedIndexQuery(search) {
4149
+ return new URLSearchParams(search).getAll("index").some(v => v === "");
4150
+ }
4151
+ function getTargetMatch(matches, location) {
4152
+ let search = typeof location === "string" ? parsePath(location).search : location.search;
4153
+ if (matches[matches.length - 1].route.index && hasNakedIndexQuery(search || "")) {
4154
+ // Return the leaf index route when index is present
4155
+ return matches[matches.length - 1];
4156
+ }
4157
+ // Otherwise grab the deepest "path contributing" match (ignoring index and
4158
+ // pathless layout routes)
4159
+ let pathMatches = getPathContributingMatches(matches);
4160
+ return pathMatches[pathMatches.length - 1];
4161
+ }
4162
+ function getSubmissionFromNavigation(navigation) {
4163
+ let {
4164
+ formMethod,
4165
+ formAction,
4166
+ formEncType,
4167
+ text,
4168
+ formData,
4169
+ json
4170
+ } = navigation;
4171
+ if (!formMethod || !formAction || !formEncType) {
4172
+ return;
4173
+ }
4174
+ if (text != null) {
4175
+ return {
4176
+ formMethod,
4177
+ formAction,
4178
+ formEncType,
4179
+ formData: undefined,
4180
+ json: undefined,
4181
+ text
4182
+ };
4183
+ } else if (formData != null) {
4184
+ return {
4185
+ formMethod,
4186
+ formAction,
4187
+ formEncType,
4188
+ formData,
4189
+ json: undefined,
4190
+ text: undefined
4191
+ };
4192
+ } else if (json !== undefined) {
4193
+ return {
4194
+ formMethod,
4195
+ formAction,
4196
+ formEncType,
4197
+ formData: undefined,
4198
+ json,
4199
+ text: undefined
4200
+ };
4201
+ }
4202
+ }
4203
+ function getLoadingNavigation(location, submission) {
4204
+ if (submission) {
4205
+ let navigation = {
4206
+ state: "loading",
4207
+ location,
4208
+ formMethod: submission.formMethod,
4209
+ formAction: submission.formAction,
4210
+ formEncType: submission.formEncType,
4211
+ formData: submission.formData,
4212
+ json: submission.json,
4213
+ text: submission.text
4214
+ };
4215
+ return navigation;
4216
+ } else {
4217
+ let navigation = {
4218
+ state: "loading",
4219
+ location,
4220
+ formMethod: undefined,
4221
+ formAction: undefined,
4222
+ formEncType: undefined,
4223
+ formData: undefined,
4224
+ json: undefined,
4225
+ text: undefined
4226
+ };
4227
+ return navigation;
4228
+ }
4229
+ }
4230
+ function getSubmittingNavigation(location, submission) {
4231
+ let navigation = {
4232
+ state: "submitting",
4233
+ location,
4234
+ formMethod: submission.formMethod,
4235
+ formAction: submission.formAction,
4236
+ formEncType: submission.formEncType,
4237
+ formData: submission.formData,
4238
+ json: submission.json,
4239
+ text: submission.text
4240
+ };
4241
+ return navigation;
4242
+ }
4243
+ function getLoadingFetcher(submission, data) {
4244
+ if (submission) {
4245
+ let fetcher = {
4246
+ state: "loading",
4247
+ formMethod: submission.formMethod,
4248
+ formAction: submission.formAction,
4249
+ formEncType: submission.formEncType,
4250
+ formData: submission.formData,
4251
+ json: submission.json,
4252
+ text: submission.text,
4253
+ data
4254
+ };
4255
+ return fetcher;
4256
+ } else {
4257
+ let fetcher = {
4258
+ state: "loading",
4259
+ formMethod: undefined,
4260
+ formAction: undefined,
4261
+ formEncType: undefined,
4262
+ formData: undefined,
4263
+ json: undefined,
4264
+ text: undefined,
4265
+ data
4266
+ };
4267
+ return fetcher;
4268
+ }
4269
+ }
4270
+ function getSubmittingFetcher(submission, existingFetcher) {
4271
+ let fetcher = {
4272
+ state: "submitting",
4273
+ formMethod: submission.formMethod,
4274
+ formAction: submission.formAction,
4275
+ formEncType: submission.formEncType,
4276
+ formData: submission.formData,
4277
+ json: submission.json,
4278
+ text: submission.text,
4279
+ data: existingFetcher ? existingFetcher.data : undefined
4280
+ };
4281
+ return fetcher;
4282
+ }
4283
+ function getDoneFetcher(data) {
4284
+ let fetcher = {
4285
+ state: "idle",
4286
+ formMethod: undefined,
4287
+ formAction: undefined,
4288
+ formEncType: undefined,
4289
+ formData: undefined,
4290
+ json: undefined,
4291
+ text: undefined,
4292
+ data
4293
+ };
4294
+ return fetcher;
4295
+ }
4296
+ function restoreAppliedTransitions(_window, transitions) {
4297
+ try {
4298
+ let sessionPositions = _window.sessionStorage.getItem(TRANSITIONS_STORAGE_KEY);
4299
+ if (sessionPositions) {
4300
+ let json = JSON.parse(sessionPositions);
4301
+ for (let [k, v] of Object.entries(json || {})) {
4302
+ if (v && Array.isArray(v)) {
4303
+ transitions.set(k, new Set(v || []));
4304
+ }
4305
+ }
4306
+ }
4307
+ } catch (e) {
4308
+ // no-op, use default empty object
4309
+ }
4310
+ }
4311
+ function persistAppliedTransitions(_window, transitions) {
4312
+ if (transitions.size > 0) {
4313
+ let json = {};
4314
+ for (let [k, v] of transitions) {
4315
+ json[k] = [...v];
4316
+ }
4317
+ try {
4318
+ _window.sessionStorage.setItem(TRANSITIONS_STORAGE_KEY, JSON.stringify(json));
4319
+ } catch (error) {
4320
+ warning(false, "Failed to save applied view transitions in sessionStorage (" + error + ").");
4321
+ }
4322
+ }
4323
+ }
4324
+ //#endregion
4325
+
4326
+ export { AbortedDeferredError, Action, IDLE_BLOCKER, IDLE_FETCHER, IDLE_NAVIGATION, UNSAFE_DEFERRED_SYMBOL, DeferredData as UNSAFE_DeferredData, ErrorResponseImpl as UNSAFE_ErrorResponseImpl, convertRouteMatchToUiMatch as UNSAFE_convertRouteMatchToUiMatch, convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes, getResolveToMatches as UNSAFE_getResolveToMatches, invariant as UNSAFE_invariant, warning as UNSAFE_warning, createBrowserHistory, createHashHistory, createMemoryHistory, createPath, createRouter, createStaticHandler, defer, generatePath, getStaticContextFromError, getToPathname, isDeferredData, isRouteErrorResponse, joinPaths, json, matchPath, matchRoutes, normalizePathname, parsePath, redirect, redirectDocument, resolvePath, resolveTo, stripBasename };
4327
+ //# sourceMappingURL=router.js.map