@epic-web/workshop-app 5.1.1 → 5.2.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 (165) hide show
  1. package/build/client/assets/{_-ZHCWB__B.js → _-CWSCXcBv.js} +2 -2
  2. package/build/client/assets/{_-ZHCWB__B.js.map → _-CWSCXcBv.js.map} +1 -1
  3. package/build/client/assets/{_exerciseNumber-BFTlBdr4.js → _exerciseNumber-D6KsriIk.js} +2 -2
  4. package/build/client/assets/_exerciseNumber-D6KsriIk.js.map +1 -0
  5. package/build/client/assets/{_exerciseNumber_._stepNumber-_687iGFh.js → _exerciseNumber_._stepNumber-BA2Xhzqs.js} +2 -2
  6. package/build/client/assets/_exerciseNumber_._stepNumber-BA2Xhzqs.js.map +1 -0
  7. package/build/client/assets/{_exerciseNumber_.finished-BEfn-nJi.js → _exerciseNumber_.finished-DEzaS_Ji.js} +2 -2
  8. package/build/client/assets/_exerciseNumber_.finished-DEzaS_Ji.js.map +1 -0
  9. package/build/client/assets/{_layout-Cfbi6StB.js → _layout-88n0To1b.js} +2 -2
  10. package/build/client/assets/{_layout-Cfbi6StB.js.map → _layout-88n0To1b.js.map} +1 -1
  11. package/build/client/assets/{_layout-BriOqd2R.js → _layout-C5yGKUmm.js} +2 -2
  12. package/build/client/assets/_layout-C5yGKUmm.js.map +1 -0
  13. package/build/client/assets/{_layout-frPHZWgR.js → _layout-T2hZtl0D.js} +2 -2
  14. package/build/client/assets/_layout-T2hZtl0D.js.map +1 -0
  15. package/build/client/assets/{_layout-BLJr2x2F.js → _layout-gyrNluke.js} +2 -2
  16. package/build/client/assets/_layout-gyrNluke.js.map +1 -0
  17. package/build/client/assets/{accordion-DuE9VejZ.js → accordion-DC885Li1.js} +2 -2
  18. package/build/client/assets/{accordion-DuE9VejZ.js.map → accordion-DC885Li1.js.map} +1 -1
  19. package/build/client/assets/{account-DDuV9rZX.js → account-CPFwPYf1.js} +2 -2
  20. package/build/client/assets/account-CPFwPYf1.js.map +1 -0
  21. package/build/client/assets/app-CM8yuYni.js +2 -0
  22. package/build/client/assets/app-CM8yuYni.js.map +1 -0
  23. package/build/client/assets/{button-CMkJ8p0a.js → button-DQ001ob0.js} +2 -2
  24. package/build/client/assets/{button-CMkJ8p0a.js.map → button-DQ001ob0.js.map} +1 -1
  25. package/build/client/assets/components-9EGYHTc_.js +158 -0
  26. package/build/client/assets/components-9EGYHTc_.js.map +1 -0
  27. package/build/client/assets/{diff-B6thd_Sf.js → diff-assn_bSK.js} +2 -2
  28. package/build/client/assets/{diff-B6thd_Sf.js.map → diff-assn_bSK.js.map} +1 -1
  29. package/build/client/assets/diff-jlCv3hv0.js +2 -0
  30. package/build/client/assets/diff-jlCv3hv0.js.map +1 -0
  31. package/build/client/assets/{discord-C9bVfiZ6.js → discord-CHsbqaqM.js} +2 -2
  32. package/build/client/assets/discord-CHsbqaqM.js.map +1 -0
  33. package/build/client/assets/discord-DoeazikD.js +2 -0
  34. package/build/client/assets/discord-DoeazikD.js.map +1 -0
  35. package/build/client/assets/entry.client-BTYTUpFV.js +44 -0
  36. package/build/client/assets/entry.client-BTYTUpFV.js.map +1 -0
  37. package/build/client/assets/epic-video-GDpD7_Qt.js +3053 -0
  38. package/build/client/assets/epic-video-GDpD7_Qt.js.map +1 -0
  39. package/build/client/assets/{error-boundary-BcGxKpte.js → error-boundary-1-dmC941.js} +2 -2
  40. package/build/client/assets/{error-boundary-BcGxKpte.js.map → error-boundary-1-dmC941.js.map} +1 -1
  41. package/build/client/assets/{finished-C2dgX1d-.js → finished-DVV0zwmP.js} +2 -2
  42. package/build/client/assets/finished-DVV0zwmP.js.map +1 -0
  43. package/build/client/assets/{index-DBrRQJxF.js → index-BCxBKsqT.js} +2 -2
  44. package/build/client/assets/{index-DBrRQJxF.js.map → index-BCxBKsqT.js.map} +1 -1
  45. package/build/client/assets/index-BFGhCX_U.js +38 -0
  46. package/build/client/assets/index-BFGhCX_U.js.map +1 -0
  47. package/build/client/assets/index-BuA_RWlU.js +2 -0
  48. package/build/client/assets/index-BuA_RWlU.js.map +1 -0
  49. package/build/client/assets/index-BuoaxPEj.js +42 -0
  50. package/build/client/assets/index-BuoaxPEj.js.map +1 -0
  51. package/build/client/assets/index-CmmC-_8P.js +2 -0
  52. package/build/client/assets/index-CmmC-_8P.js.map +1 -0
  53. package/build/client/assets/{index-YtpQLUzj.js → index-DRH72MzK.js} +2 -2
  54. package/build/client/assets/{index-YtpQLUzj.js.map → index-DRH72MzK.js.map} +1 -1
  55. package/build/client/assets/{index-CuV1bRbu.js → index-KgMLc41c.js} +2 -2
  56. package/build/client/assets/index-KgMLc41c.js.map +1 -0
  57. package/build/client/assets/index-_J-F_Dnc.js +36 -0
  58. package/build/client/assets/index-_J-F_Dnc.js.map +1 -0
  59. package/build/client/assets/{loading-Br41_Pbf.js → loading-Dk0n07O3.js} +2 -2
  60. package/build/client/assets/{loading-Br41_Pbf.js.map → loading-Dk0n07O3.js.map} +1 -1
  61. package/build/client/assets/{login-kjV7hrVt.js → login-pZYDEC_l.js} +2 -2
  62. package/build/client/assets/login-pZYDEC_l.js.map +1 -0
  63. package/build/client/assets/{manifest-b22910a7.js → manifest-c9f53a94.js} +1 -1
  64. package/build/client/assets/mdx-hW1uYjc1.js +2 -0
  65. package/build/client/assets/mdx-hW1uYjc1.js.map +1 -0
  66. package/build/client/assets/misc-BJtHv_Jh.js +2 -0
  67. package/build/client/assets/misc-BJtHv_Jh.js.map +1 -0
  68. package/build/client/assets/{nav-chevrons-DYiI8EMU.js → nav-chevrons-CgbSMLeb.js} +2 -2
  69. package/build/client/assets/{nav-chevrons-DYiI8EMU.js.map → nav-chevrons-CgbSMLeb.js.map} +1 -1
  70. package/build/client/assets/{onboarding-B4Z_yevk.js → onboarding-DCuSqnkZ.js} +2 -2
  71. package/build/client/assets/onboarding-DCuSqnkZ.js.map +1 -0
  72. package/build/client/assets/{pe-CvPIToj6.js → pe-ChIwTk8v.js} +2 -2
  73. package/build/client/assets/pe-ChIwTk8v.js.map +1 -0
  74. package/build/client/assets/presence-CdyMdOKk.js +28 -0
  75. package/build/client/assets/presence-CdyMdOKk.js.map +1 -0
  76. package/build/client/assets/{preview-DZcdG4kw.js → preview-CW_12I0i.js} +2 -2
  77. package/build/client/assets/preview-CW_12I0i.js.map +1 -0
  78. package/build/client/assets/{product-mjsTrqXs.js → product-C1ynnrN_.js} +2 -2
  79. package/build/client/assets/{product-mjsTrqXs.js.map → product-C1ynnrN_.js.map} +1 -1
  80. package/build/client/assets/progress-DAB3nDa2.js +2 -0
  81. package/build/client/assets/progress-DAB3nDa2.js.map +1 -0
  82. package/build/client/assets/{progress-bar-F8_2mvYp.js → progress-bar-Cj5R4Zk7.js} +2 -2
  83. package/build/client/assets/{progress-bar-F8_2mvYp.js.map → progress-bar-Cj5R4Zk7.js.map} +1 -1
  84. package/build/client/assets/{request-info-DGnmXtfj.js → request-info-DCIQLE6H.js} +2 -2
  85. package/build/client/assets/{request-info-DGnmXtfj.js.map → request-info-DCIQLE6H.js.map} +1 -1
  86. package/build/client/assets/{revalidation-ws-DcvYvzyj.js → revalidation-ws-DU-PzW-_.js} +2 -2
  87. package/build/client/assets/{revalidation-ws-DcvYvzyj.js.map → revalidation-ws-DU-PzW-_.js.map} +1 -1
  88. package/build/client/assets/{root-Cl86OUog.js → root-DojjHZlY.js} +4 -4
  89. package/build/client/assets/root-DojjHZlY.js.map +1 -0
  90. package/build/client/assets/set-playground-S_rIwJAa.js +2 -0
  91. package/build/client/assets/set-playground-S_rIwJAa.js.map +1 -0
  92. package/build/client/assets/{support-B0E_F4Zh.js → support-BNS-kEhc.js} +2 -2
  93. package/build/client/assets/{support-B0E_F4Zh.js.map → support-BNS-kEhc.js.map} +1 -1
  94. package/build/client/assets/tailwind-B5AAMtGC.css +1 -0
  95. package/build/client/assets/test-CtH75Laz.js +2 -0
  96. package/build/client/assets/test-CtH75Laz.js.map +1 -0
  97. package/build/client/assets/{tests-BeAEgPAw.js → tests-CTs57UUU.js} +2 -2
  98. package/build/client/assets/tests-CTs57UUU.js.map +1 -0
  99. package/build/client/assets/tooltip-BgynKV2c.js +2 -0
  100. package/build/client/assets/tooltip-BgynKV2c.js.map +1 -0
  101. package/build/client/assets/use-event-source-x59d4R2Z.js +2 -0
  102. package/build/client/assets/use-event-source-x59d4R2Z.js.map +1 -0
  103. package/build/client/assets/{user-Boua6jiU.js → user-BBryXlM_.js} +2 -2
  104. package/build/client/assets/{user-Boua6jiU.js.map → user-BBryXlM_.js.map} +1 -1
  105. package/build/client/assets/{workshop-config-Ce9sSc3I.js → workshop-config-DJY2cXU_.js} +2 -2
  106. package/build/client/assets/{workshop-config-Ce9sSc3I.js.map → workshop-config-DJY2cXU_.js.map} +1 -1
  107. package/build/server/index.js +253 -238
  108. package/build/server/index.js.map +1 -1
  109. package/dist/server/index.js +7 -14
  110. package/package.json +68 -73
  111. package/build/client/assets/_exerciseNumber-BFTlBdr4.js.map +0 -1
  112. package/build/client/assets/_exerciseNumber_._stepNumber-_687iGFh.js.map +0 -1
  113. package/build/client/assets/_exerciseNumber_.finished-BEfn-nJi.js.map +0 -1
  114. package/build/client/assets/_layout-BLJr2x2F.js.map +0 -1
  115. package/build/client/assets/_layout-BriOqd2R.js.map +0 -1
  116. package/build/client/assets/_layout-frPHZWgR.js.map +0 -1
  117. package/build/client/assets/account-DDuV9rZX.js.map +0 -1
  118. package/build/client/assets/app-wbMCZEiv.js +0 -2
  119. package/build/client/assets/app-wbMCZEiv.js.map +0 -1
  120. package/build/client/assets/components-DZ8XIeZ3.js +0 -166
  121. package/build/client/assets/components-DZ8XIeZ3.js.map +0 -1
  122. package/build/client/assets/diff-BEk79KPK.js +0 -2
  123. package/build/client/assets/diff-BEk79KPK.js.map +0 -1
  124. package/build/client/assets/discord-C9bVfiZ6.js.map +0 -1
  125. package/build/client/assets/discord-DYeU0QX6.js +0 -2
  126. package/build/client/assets/discord-DYeU0QX6.js.map +0 -1
  127. package/build/client/assets/entry.client-CW5CUf_W.js +0 -43
  128. package/build/client/assets/entry.client-CW5CUf_W.js.map +0 -1
  129. package/build/client/assets/epic-video-bs7WmhbC.js +0 -2988
  130. package/build/client/assets/epic-video-bs7WmhbC.js.map +0 -1
  131. package/build/client/assets/finished-C2dgX1d-.js.map +0 -1
  132. package/build/client/assets/index-BczhSZ3e.js +0 -2
  133. package/build/client/assets/index-BczhSZ3e.js.map +0 -1
  134. package/build/client/assets/index-BjNhezSK.js +0 -42
  135. package/build/client/assets/index-BjNhezSK.js.map +0 -1
  136. package/build/client/assets/index-BvihEwfB.js +0 -36
  137. package/build/client/assets/index-BvihEwfB.js.map +0 -1
  138. package/build/client/assets/index-C2yr7Uiu.js +0 -2
  139. package/build/client/assets/index-C2yr7Uiu.js.map +0 -1
  140. package/build/client/assets/index-CuV1bRbu.js.map +0 -1
  141. package/build/client/assets/index-DF_XBInP.js +0 -37
  142. package/build/client/assets/index-DF_XBInP.js.map +0 -1
  143. package/build/client/assets/login-kjV7hrVt.js.map +0 -1
  144. package/build/client/assets/mdx-CRxPouxB.js +0 -2
  145. package/build/client/assets/mdx-CRxPouxB.js.map +0 -1
  146. package/build/client/assets/misc-BE75ioh8.js +0 -2
  147. package/build/client/assets/misc-BE75ioh8.js.map +0 -1
  148. package/build/client/assets/onboarding-B4Z_yevk.js.map +0 -1
  149. package/build/client/assets/pe-CvPIToj6.js.map +0 -1
  150. package/build/client/assets/presence-Dd98AJ_5.js +0 -28
  151. package/build/client/assets/presence-Dd98AJ_5.js.map +0 -1
  152. package/build/client/assets/preview-DZcdG4kw.js.map +0 -1
  153. package/build/client/assets/progress-Co-59mG2.js +0 -2
  154. package/build/client/assets/progress-Co-59mG2.js.map +0 -1
  155. package/build/client/assets/root-Cl86OUog.js.map +0 -1
  156. package/build/client/assets/set-playground-pMKmtPtz.js +0 -2
  157. package/build/client/assets/set-playground-pMKmtPtz.js.map +0 -1
  158. package/build/client/assets/tailwind-B9pSujyx.css +0 -1
  159. package/build/client/assets/test-B6zIK2V6.js +0 -2
  160. package/build/client/assets/test-B6zIK2V6.js.map +0 -1
  161. package/build/client/assets/tests-BeAEgPAw.js.map +0 -1
  162. package/build/client/assets/tooltip-6-WS-Xux.js +0 -2
  163. package/build/client/assets/tooltip-6-WS-Xux.js.map +0 -1
  164. package/build/client/assets/use-event-source-CCGBLG92.js +0 -2
  165. package/build/client/assets/use-event-source-CCGBLG92.js.map +0 -1
@@ -1,37 +0,0 @@
1
- function fn(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const l=Object.getOwnPropertyDescriptor(n,a);l&&Object.defineProperty(e,a,l.get?l:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Ya=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xr={exports:{}},vt={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var pn=Symbol.for("react.transitional.element"),mn=Symbol.for("react.fragment");function Sr(e,t,r){var n=null;if(r!==void 0&&(n=""+r),t.key!==void 0&&(n=""+t.key),"key"in t){r={};for(var a in t)a!=="key"&&(r[a]=t[a])}else r=t;return t=r.ref,{$$typeof:pn,type:e,key:n,ref:t!==void 0?t:null,props:r}}vt.Fragment=mn;vt.jsx=Sr;vt.jsxs=Sr;xr.exports=vt;var Ka=xr.exports,Cr={exports:{}},L={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Lt=Symbol.for("react.transitional.element"),vn=Symbol.for("react.portal"),gn=Symbol.for("react.fragment"),yn=Symbol.for("react.strict_mode"),En=Symbol.for("react.profiler"),bn=Symbol.for("react.consumer"),Rn=Symbol.for("react.context"),wn=Symbol.for("react.forward_ref"),Pn=Symbol.for("react.suspense"),xn=Symbol.for("react.memo"),_r=Symbol.for("react.lazy"),rr=Symbol.iterator;function Sn(e){return e===null||typeof e!="object"?null:(e=rr&&e[rr]||e["@@iterator"],typeof e=="function"?e:null)}var Dr={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Mr=Object.assign,Lr={};function ke(e,t,r){this.props=e,this.context=t,this.refs=Lr,this.updater=r||Dr}ke.prototype.isReactComponent={};ke.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ke.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Tr(){}Tr.prototype=ke.prototype;function Tt(e,t,r){this.props=e,this.context=t,this.refs=Lr,this.updater=r||Dr}var jt=Tt.prototype=new Tr;jt.constructor=Tt;Mr(jt,ke.prototype);jt.isPureReactComponent=!0;var nr=Array.isArray,$={H:null,A:null,T:null},jr=Object.prototype.hasOwnProperty;function Ot(e,t,r,n,a,l,o){return r=o.ref,{$$typeof:Lt,type:e,key:t,ref:r!==void 0?r:null,props:o}}function Cn(e,t){return Ot(e.type,t,null,void 0,void 0,void 0,e.props)}function At(e){return typeof e=="object"&&e!==null&&e.$$typeof===Lt}function _n(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var ar=/\/+/g;function Pt(e,t){return typeof e=="object"&&e!==null&&e.key!=null?_n(""+e.key):t.toString(36)}function or(){}function Dn(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(or,or):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Ie(e,t,r,n,a){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(l){case"bigint":case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Lt:case vn:o=!0;break;case _r:return o=e._init,Ie(o(e._payload),t,r,n,a)}}if(o)return a=a(e),o=n===""?"."+Pt(e,0):n,nr(a)?(r="",o!=null&&(r=o.replace(ar,"$&/")+"/"),Ie(a,t,r,"",function(v){return v})):a!=null&&(At(a)&&(a=Cn(a,r+(!a.key||e&&e.key===a.key?"":(""+a.key).replace(ar,"$&/")+"/")+o)),t.push(a)),1;o=0;var c=n===""?".":n+":";if(nr(e))for(var u=0;u<e.length;u++)n=e[u],l=c+Pt(n,u),o+=Ie(n,t,r,l,a);else if(u=Sn(e),typeof u=="function")for(e=u.call(e),u=0;!(n=e.next()).done;)n=n.value,l=c+Pt(n,u++),o+=Ie(n,t,r,l,a);else if(l==="object"){if(typeof e.then=="function")return Ie(Dn(e),t,r,n,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return o}function ft(e,t,r){if(e==null)return e;var n=[],a=0;return Ie(e,n,"","",function(l){return t.call(r,l,a++)}),n}function Mn(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ir=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Ln(){}L.Children={map:ft,forEach:function(e,t,r){ft(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return ft(e,function(){t++}),t},toArray:function(e){return ft(e,function(t){return t})||[]},only:function(e){if(!At(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};L.Component=ke;L.Fragment=gn;L.Profiler=En;L.PureComponent=Tt;L.StrictMode=yn;L.Suspense=Pn;L.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$;L.act=function(){throw Error("act(...) is not supported in production builds of React.")};L.cache=function(e){return function(){return e.apply(null,arguments)}};L.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var n=Mr({},e.props),a=e.key,l=void 0;if(t!=null)for(o in t.ref!==void 0&&(l=void 0),t.key!==void 0&&(a=""+t.key),t)!jr.call(t,o)||o==="key"||o==="__self"||o==="__source"||o==="ref"&&t.ref===void 0||(n[o]=t[o]);var o=arguments.length-2;if(o===1)n.children=r;else if(1<o){for(var c=Array(o),u=0;u<o;u++)c[u]=arguments[u+2];n.children=c}return Ot(e.type,a,null,void 0,void 0,l,n)};L.createContext=function(e){return e={$$typeof:Rn,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:bn,_context:e},e};L.createElement=function(e,t,r){var n,a={},l=null;if(t!=null)for(n in t.key!==void 0&&(l=""+t.key),t)jr.call(t,n)&&n!=="key"&&n!=="__self"&&n!=="__source"&&(a[n]=t[n]);var o=arguments.length-2;if(o===1)a.children=r;else if(1<o){for(var c=Array(o),u=0;u<o;u++)c[u]=arguments[u+2];a.children=c}if(e&&e.defaultProps)for(n in o=e.defaultProps,o)a[n]===void 0&&(a[n]=o[n]);return Ot(e,l,null,void 0,void 0,null,a)};L.createRef=function(){return{current:null}};L.forwardRef=function(e){return{$$typeof:wn,render:e}};L.isValidElement=At;L.lazy=function(e){return{$$typeof:_r,_payload:{_status:-1,_result:e},_init:Mn}};L.memo=function(e,t){return{$$typeof:xn,type:e,compare:t===void 0?null:t}};L.startTransition=function(e){var t=$.T,r=new Set;$.T={_callbacks:r};var n=$.T;try{var a=e();typeof a=="object"&&a!==null&&typeof a.then=="function"&&(r.forEach(function(l){return l(n,a)}),a.then(Ln,ir))}catch(l){ir(l)}finally{$.T=t}};L.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()};L.use=function(e){return $.H.use(e)};L.useActionState=function(e,t,r){return $.H.useActionState(e,t,r)};L.useCallback=function(e,t){return $.H.useCallback(e,t)};L.useContext=function(e){return $.H.useContext(e)};L.useDebugValue=function(){};L.useDeferredValue=function(e,t){return $.H.useDeferredValue(e,t)};L.useEffect=function(e,t){return $.H.useEffect(e,t)};L.useId=function(){return $.H.useId()};L.useImperativeHandle=function(e,t,r){return $.H.useImperativeHandle(e,t,r)};L.useInsertionEffect=function(e,t){return $.H.useInsertionEffect(e,t)};L.useLayoutEffect=function(e,t){return $.H.useLayoutEffect(e,t)};L.useMemo=function(e,t){return $.H.useMemo(e,t)};L.useOptimistic=function(e,t){return $.H.useOptimistic(e,t)};L.useReducer=function(e,t,r){return $.H.useReducer(e,t,r)};L.useRef=function(e){return $.H.useRef(e)};L.useState=function(e){return $.H.useState(e)};L.useSyncExternalStore=function(e,t,r){return $.H.useSyncExternalStore(e,t,r)};L.useTransition=function(){return $.H.useTransition()};L.version="19.0.0-rc-f994737d14-20240522";Cr.exports=L;var b=Cr.exports;const Tn=hn(b),Wa=fn({__proto__:null,default:Tn},[b]);/**
18
- * @remix-run/router v1.17.0
19
- *
20
- * Copyright (c) Remix Software Inc.
21
- *
22
- * This source code is licensed under the MIT license found in the
23
- * LICENSE.md file in the root directory of this source tree.
24
- *
25
- * @license MIT
26
- */function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},H.apply(this,arguments)}var J;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(J||(J={}));const lr="popstate";function Ja(e){e===void 0&&(e={});function t(n,a){let{pathname:l,search:o,hash:c}=n.location;return Qe("",{pathname:l,search:o,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:et(a)}return On(t,r,null,e)}function M(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Be(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function jn(){return Math.random().toString(36).substr(2,8)}function sr(e,t){return{usr:e.state,key:e.key,idx:t}}function Qe(e,t,r,n){return r===void 0&&(r=null),H({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Pe(t):t,{state:r,key:t&&t.key||n||jn()})}function et(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Pe(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function On(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:l=!1}=n,o=a.history,c=J.Pop,u=null,v=m();v==null&&(v=0,o.replaceState(H({},o.state,{idx:v}),""));function m(){return(o.state||{idx:null}).idx}function f(){c=J.Pop;let C=m(),z=C==null?null:C-v;v=C,u&&u({action:c,location:R.location,delta:z})}function g(C,z){c=J.Push;let A=Qe(R.location,C,z);v=m()+1;let X=sr(A,v),Z=R.createHref(A);try{o.pushState(X,"",Z)}catch(ae){if(ae instanceof DOMException&&ae.name==="DataCloneError")throw ae;a.location.assign(Z)}l&&u&&u({action:c,location:R.location,delta:1})}function j(C,z){c=J.Replace;let A=Qe(R.location,C,z);v=m();let X=sr(A,v),Z=R.createHref(A);o.replaceState(X,"",Z),l&&u&&u({action:c,location:R.location,delta:0})}function S(C){let z=a.location.origin!=="null"?a.location.origin:a.location.href,A=typeof C=="string"?C:et(C);return A=A.replace(/ $/,"%20"),M(z,"No window.location.(origin|href) available to create URL for href: "+A),new URL(A,z)}let R={get action(){return c},get location(){return e(a,o)},listen(C){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(lr,f),u=C,()=>{a.removeEventListener(lr,f),u=null}},createHref(C){return t(a,C)},createURL:S,encodeLocation(C){let z=S(C);return{pathname:z.pathname,search:z.search,hash:z.hash}},push:g,replace:j,go(C){return o.go(C)}};return R}var k;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(k||(k={}));const An=new Set(["lazy","caseSensitive","path","id","index","children"]);function Un(e){return e.index===!0}function Ze(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,l)=>{let o=[...r,String(l)],c=typeof a.id=="string"?a.id:o.join("-");if(M(a.index!==!0||!a.children,"Cannot specify children on an index route"),M(!n[c],'Found a route id collision on id "'+c+`". Route id's must be globally unique within Data Router usages`),Un(a)){let u=H({},a,t(a),{id:c});return n[c]=u,u}else{let u=H({},a,t(a),{id:c,children:void 0});return n[c]=u,a.children&&(u.children=Ze(a.children,t,o,n)),u}})}function _e(e,t,r){return r===void 0&&(r="/"),ht(e,t,r,!1)}function ht(e,t,r,n){let a=typeof t=="string"?Pe(t):t,l=tt(a.pathname||"/",r);if(l==null)return null;let o=Ar(e);Fn(o);let c=null;for(let u=0;c==null&&u<o.length;++u){let v=Jn(l);c=Kn(o[u],v,n)}return c}function Or(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}function Ar(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(l,o,c)=>{let u={relativePath:c===void 0?l.path||"":c,caseSensitive:l.caseSensitive===!0,childrenIndex:o,route:l};u.relativePath.startsWith("/")&&(M(u.relativePath.startsWith(n),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(n.length));let v=ge([n,u.relativePath]),m=r.concat(u);l.children&&l.children.length>0&&(M(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+v+'".')),Ar(l.children,t,m,v)),!(l.path==null&&!l.index)&&t.push({path:v,score:$n(v,l.index),routesMeta:m})};return e.forEach((l,o)=>{var c;if(l.path===""||!((c=l.path)!=null&&c.includes("?")))a(l,o);else for(let u of Ur(l.path))a(l,o,u)}),t}function Ur(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),l=r.replace(/\?$/,"");if(n.length===0)return a?[l,""]:[l];let o=Ur(n.join("/")),c=[];return c.push(...o.map(u=>u===""?l:[l,u].join("/"))),a&&c.push(...o),c.map(u=>e.startsWith("/")&&u===""?"/":u)}function Fn(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Yn(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Nn=/^:[\w-]+$/,In=3,Bn=2,kn=1,zn=10,Hn=-2,ur=e=>e==="*";function $n(e,t){let r=e.split("/"),n=r.length;return r.some(ur)&&(n+=Hn),t&&(n+=Bn),r.filter(a=>!ur(a)).reduce((a,l)=>a+(Nn.test(l)?In:l===""?kn:zn),n)}function Yn(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function Kn(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,a={},l="/",o=[];for(let c=0;c<n.length;++c){let u=n[c],v=c===n.length-1,m=l==="/"?t:t.slice(l.length)||"/",f=dr({path:u.relativePath,caseSensitive:u.caseSensitive,end:v},m),g=u.route;if(!f&&v&&r&&!n[n.length-1].route.index&&(f=dr({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},m)),!f)return null;Object.assign(a,f.params),o.push({params:a,pathname:ge([l,f.pathname]),pathnameBase:Xn(ge([l,f.pathnameBase])),route:g}),f.pathnameBase!=="/"&&(l=ge([l,f.pathnameBase]))}return o}function dr(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Wn(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let l=a[0],o=l.replace(/(.)\/+$/,"$1"),c=a.slice(1);return{params:n.reduce((v,m,f)=>{let{paramName:g,isOptional:j}=m;if(g==="*"){let R=c[f]||"";o=l.slice(0,l.length-R.length).replace(/(.)\/+$/,"$1")}const S=c[f];return j&&!S?v[g]=void 0:v[g]=(S||"").replace(/%2F/g,"/"),v},{}),pathname:l,pathnameBase:o,pattern:e}}function Wn(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Be(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,c,u)=>(n.push({paramName:c,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Jn(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Be(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function tt(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function Vn(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Pe(e):e;return{pathname:r?r.startsWith("/")?r:Gn(r,t):t,search:qn(n),hash:Qn(a)}}function Gn(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function xt(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Fr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Ut(e,t){let r=Fr(e);return t?r.map((n,a)=>a===e.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Ft(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=Pe(e):(a=H({},e),M(!a.pathname||!a.pathname.includes("?"),xt("?","pathname","search",a)),M(!a.pathname||!a.pathname.includes("#"),xt("#","pathname","hash",a)),M(!a.search||!a.search.includes("#"),xt("#","search","hash",a)));let l=e===""||a.pathname==="",o=l?"/":a.pathname,c;if(o==null)c=r;else{let f=t.length-1;if(!n&&o.startsWith("..")){let g=o.split("/");for(;g[0]==="..";)g.shift(),f-=1;a.pathname=g.join("/")}c=f>=0?t[f]:"/"}let u=Vn(a,c),v=o&&o!=="/"&&o.endsWith("/"),m=(l||o===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(v||m)&&(u.pathname+="/"),u}const ge=e=>e.join("/").replace(/\/\/+/g,"/"),Xn=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),qn=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Qn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class _t extends Error{}class Va{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],M(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((l,o)=>n=o),this.controller=new AbortController;let a=()=>n(new _t("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((l,o)=>{let[c,u]=o;return Object.assign(l,{[c]:this.trackPromise(c,u)})},{}),this.done&&this.unlistenAbortSignal(),this.init=r}trackPromise(t,r){if(!(r instanceof Promise))return r;this.deferredKeys.push(t),this.pendingKeysSet.add(t);let n=Promise.race([r,this.abortPromise]).then(a=>this.onSettle(n,t,void 0,a),a=>this.onSettle(n,t,a));return n.catch(()=>{}),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(t,r,n,a){if(this.controller.signal.aborted&&n instanceof _t)return this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>n}),Promise.reject(n);if(this.pendingKeysSet.delete(r),this.done&&this.unlistenAbortSignal(),n===void 0&&a===void 0){let l=new Error('Deferred data for key "'+r+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(t,"_error",{get:()=>l}),this.emit(!1,r),Promise.reject(l)}return a===void 0?(Object.defineProperty(t,"_error",{get:()=>n}),this.emit(!1,r),Promise.reject(n)):(Object.defineProperty(t,"_data",{get:()=>a}),this.emit(!1,r),a)}emit(t,r){this.subscribers.forEach(n=>n(t,r))}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((t,r)=>this.pendingKeysSet.delete(r)),this.emit(!0)}async resolveData(t){let r=!1;if(!this.done){let n=()=>this.cancel();t.addEventListener("abort",n),r=await new Promise(a=>{this.subscribe(l=>{t.removeEventListener("abort",n),(l||this.done)&&a(l)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return M(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((t,r)=>{let[n,a]=r;return Object.assign(t,{[n]:ea(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function Zn(e){return e instanceof Promise&&e._tracked===!0}function ea(e){if(!Zn(e))return e;if(e._error)throw e._error;return e._data}const Ga=function(t,r){r===void 0&&(r=302);let n=r;typeof n=="number"?n={status:n}:typeof n.status>"u"&&(n.status=302);let a=new Headers(n.headers);return a.set("Location",t),new Response(null,H({},n,{headers:a}))};class Nr{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function gt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Ir=["post","put","patch","delete"],ta=new Set(Ir),ra=["get",...Ir],na=new Set(ra),aa=new Set([301,302,303,307,308]),oa=new Set([307,308]),St={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ia={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ve={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Nt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,la=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Br="remix-router-transitions";function Xa(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;M(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let i=e.detectErrorBoundary;a=s=>({hasErrorBoundary:i(s)})}else a=la;let l={},o=Ze(e.routes,a,void 0,l),c,u=e.basename||"/",v=e.unstable_dataStrategy||fa,m=e.unstable_patchRoutesOnMiss,f=H({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),g=null,j=new Set,S=null,R=null,C=null,z=e.hydrationData!=null,A=_e(o,e.history.location,u),X=null;if(A==null&&!m){let i=Q(404,{pathname:e.history.location.pathname}),{matches:s,route:d}=br(o);A=s,X={[d.id]:i}}let Z;if(!A)Z=!1,A=[];else if(A.some(i=>i.route.lazy))Z=!1;else if(!A.some(i=>i.route.loader))Z=!0;else if(f.v7_partialHydration){let i=e.hydrationData?e.hydrationData.loaderData:null,s=e.hydrationData?e.hydrationData.errors:null,d=p=>p.route.loader?typeof p.route.loader=="function"&&p.route.loader.hydrate===!0?!1:i&&i[p.route.id]!==void 0||s&&s[p.route.id]!==void 0:!0;if(s){let p=A.findIndex(E=>s[E.route.id]!==void 0);Z=A.slice(0,p+1).every(d)}else Z=A.every(d)}else Z=e.hydrationData!=null;let ae,h={historyAction:e.history.action,location:e.history.location,matches:A,initialized:Z,navigation:St,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||X,fetchers:new Map,blockers:new Map},oe=J.Pop,ue=!1,U,te=!1,V=new Map,de=null,ce=!1,q=!1,Le=[],nt=[],K=new Map,at=0,$e=-1,Te=new Map,he=new Set,je=new Map,Ye=new Map,pe=new Set,xe=new Map,Se=new Map,Vr=new Map,Et=!1;function Gr(){if(g=e.history.listen(i=>{let{action:s,location:d,delta:p}=i;if(Et){Et=!1;return}Be(Se.size===0||p!=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.");let E=qt({currentLocation:h.location,nextLocation:d,historyAction:s});if(E&&p!=null){Et=!0,e.history.go(p*-1),it(E,{state:"blocked",location:d,proceed(){it(E,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),e.history.go(p)},reset(){let P=new Map(h.blockers);P.set(E,Ve),ee({blockers:P})}});return}return Ce(s,d)}),r){Sa(t,V);let i=()=>Ca(t,V);t.addEventListener("pagehide",i),de=()=>t.removeEventListener("pagehide",i)}return h.initialized||Ce(J.Pop,h.location,{initialHydration:!0}),ae}function Xr(){g&&g(),de&&de(),j.clear(),U&&U.abort(),h.fetchers.forEach((i,s)=>ot(s)),h.blockers.forEach((i,s)=>Xt(s))}function qr(i){return j.add(i),()=>j.delete(i)}function ee(i,s){s===void 0&&(s={}),h=H({},h,i);let d=[],p=[];f.v7_fetcherPersist&&h.fetchers.forEach((E,P)=>{E.state==="idle"&&(pe.has(P)?p.push(P):d.push(P))}),[...j].forEach(E=>E(h,{deletedFetchers:p,unstable_viewTransitionOpts:s.viewTransitionOpts,unstable_flushSync:s.flushSync===!0})),f.v7_fetcherPersist&&(d.forEach(E=>h.fetchers.delete(E)),p.forEach(E=>ot(E)))}function Oe(i,s,d){var p,E;let{flushSync:P}=d===void 0?{}:d,x=h.actionData!=null&&h.navigation.formMethod!=null&&le(h.navigation.formMethod)&&h.navigation.state==="loading"&&((p=i.state)==null?void 0:p._isRedirect)!==!0,y;s.actionData?Object.keys(s.actionData).length>0?y=s.actionData:y=null:x?y=h.actionData:y=null;let _=s.loaderData?yr(h.loaderData,s.loaderData,s.matches||[],s.errors):h.loaderData,w=h.blockers;w.size>0&&(w=new Map(w),w.forEach((O,I)=>w.set(I,Ve)));let D=ue===!0||h.navigation.formMethod!=null&&le(h.navigation.formMethod)&&((E=i.state)==null?void 0:E._isRedirect)!==!0;c&&(o=c,c=void 0),ce||oe===J.Pop||(oe===J.Push?e.history.push(i,i.state):oe===J.Replace&&e.history.replace(i,i.state));let N;if(oe===J.Pop){let O=V.get(h.location.pathname);O&&O.has(i.pathname)?N={currentLocation:h.location,nextLocation:i}:V.has(i.pathname)&&(N={currentLocation:i,nextLocation:h.location})}else if(te){let O=V.get(h.location.pathname);O?O.add(i.pathname):(O=new Set([i.pathname]),V.set(h.location.pathname,O)),N={currentLocation:h.location,nextLocation:i}}ee(H({},s,{actionData:y,loaderData:_,historyAction:oe,location:i,initialized:!0,navigation:St,revalidation:"idle",restoreScrollPosition:Zt(i,s.matches||h.matches),preventScrollReset:D,blockers:w}),{viewTransitionOpts:N,flushSync:P===!0}),oe=J.Pop,ue=!1,te=!1,ce=!1,q=!1,Le=[],nt=[]}async function $t(i,s){if(typeof i=="number"){e.history.go(i);return}let d=Dt(h.location,h.matches,u,f.v7_prependBasename,i,f.v7_relativeSplatPath,s==null?void 0:s.fromRouteId,s==null?void 0:s.relative),{path:p,submission:E,error:P}=cr(f.v7_normalizeFormMethod,!1,d,s),x=h.location,y=Qe(h.location,p,s&&s.state);y=H({},y,e.history.encodeLocation(y));let _=s&&s.replace!=null?s.replace:void 0,w=J.Push;_===!0?w=J.Replace:_===!1||E!=null&&le(E.formMethod)&&E.formAction===h.location.pathname+h.location.search&&(w=J.Replace);let D=s&&"preventScrollReset"in s?s.preventScrollReset===!0:void 0,N=(s&&s.unstable_flushSync)===!0,O=qt({currentLocation:x,nextLocation:y,historyAction:w});if(O){it(O,{state:"blocked",location:y,proceed(){it(O,{state:"proceeding",proceed:void 0,reset:void 0,location:y}),$t(i,s)},reset(){let I=new Map(h.blockers);I.set(O,Ve),ee({blockers:I})}});return}return await Ce(w,y,{submission:E,pendingError:P,preventScrollReset:D,replace:s&&s.replace,enableViewTransition:s&&s.unstable_viewTransition,flushSync:N})}function Qr(){if(bt(),ee({revalidation:"loading"}),h.navigation.state!=="submitting"){if(h.navigation.state==="idle"){Ce(h.historyAction,h.location,{startUninterruptedRevalidation:!0});return}Ce(oe||h.historyAction,h.navigation.location,{overrideNavigation:h.navigation})}}async function Ce(i,s,d){U&&U.abort(),U=null,oe=i,ce=(d&&d.startUninterruptedRevalidation)===!0,un(h.location,h.matches),ue=(d&&d.preventScrollReset)===!0,te=(d&&d.enableViewTransition)===!0;let p=c||o,E=d&&d.overrideNavigation,P=_e(p,s,u),x=(d&&d.flushSync)===!0,y=er(P,p,s.pathname);if(y.active&&y.matches&&(P=y.matches),!P){let{error:F,notFoundMatches:G,route:W}=Rt(s.pathname);Oe(s,{matches:G,loaderData:{},errors:{[W.id]:F}},{flushSync:x});return}if(h.initialized&&!q&&ya(h.location,s)&&!(d&&d.submission&&le(d.submission.formMethod))){Oe(s,{matches:P},{flushSync:x});return}U=new AbortController;let _=Ne(e.history,s,U.signal,d&&d.submission),w;if(d&&d.pendingError)w=[qe(P).route.id,{type:k.error,error:d.pendingError}];else if(d&&d.submission&&le(d.submission.formMethod)){let F=await Zr(_,s,d.submission,P,y.active,{replace:d.replace,flushSync:x});if(F.shortCircuited)return;if(F.pendingActionResult){let[G,W]=F.pendingActionResult;if(ne(W)&&gt(W.error)&&W.error.status===404){U=null,Oe(s,{matches:F.matches,loaderData:{},errors:{[G]:W.error}});return}}P=F.matches||P,w=F.pendingActionResult,E=Ct(s,d.submission),x=!1,y.active=!1,_=Ne(e.history,_.url,_.signal)}let{shortCircuited:D,matches:N,loaderData:O,errors:I}=await en(_,s,P,y.active,E,d&&d.submission,d&&d.fetcherSubmission,d&&d.replace,d&&d.initialHydration===!0,x,w);D||(U=null,Oe(s,H({matches:N||P},Er(w),{loaderData:O,errors:I})))}async function Zr(i,s,d,p,E,P){P===void 0&&(P={}),bt();let x=Pa(s,d);if(ee({navigation:x},{flushSync:P.flushSync===!0}),E){let w=await st(p,s.pathname,i.signal);if(w.type==="aborted")return{shortCircuited:!0};if(w.type==="error"){let{error:D,notFoundMatches:N,route:O}=lt(s.pathname,w);return{matches:N,pendingActionResult:[O.id,{type:k.error,error:D}]}}else if(w.matches)p=w.matches;else{let{notFoundMatches:D,error:N,route:O}=Rt(s.pathname);return{matches:D,pendingActionResult:[O.id,{type:k.error,error:N}]}}}let y,_=Xe(p,s);if(!_.route.action&&!_.route.lazy)y={type:k.error,error:Q(405,{method:i.method,pathname:s.pathname,routeId:_.route.id})};else if(y=(await We("action",i,[_],p))[0],i.signal.aborted)return{shortCircuited:!0};if(Me(y)){let w;return P&&P.replace!=null?w=P.replace:w=mr(y.response.headers.get("Location"),new URL(i.url),u)===h.location.pathname+h.location.search,await Ke(i,y,{submission:d,replace:w}),{shortCircuited:!0}}if(De(y))throw Q(400,{type:"defer-action"});if(ne(y)){let w=qe(p,_.route.id);return(P&&P.replace)!==!0&&(oe=J.Push),{matches:p,pendingActionResult:[w.route.id,y]}}return{matches:p,pendingActionResult:[_.route.id,y]}}async function en(i,s,d,p,E,P,x,y,_,w,D){let N=E||Ct(s,P),O=P||x||Pr(N),I=!ce&&(!f.v7_partialHydration||!_);if(p){if(I){let Y=Yt(D);ee(H({navigation:N},Y!==void 0?{actionData:Y}:{}),{flushSync:w})}let T=await st(d,s.pathname,i.signal);if(T.type==="aborted")return{shortCircuited:!0};if(T.type==="error"){let{error:Y,notFoundMatches:re,route:B}=lt(s.pathname,T);return{matches:re,loaderData:{},errors:{[B.id]:Y}}}else if(T.matches)d=T.matches;else{let{error:Y,notFoundMatches:re,route:B}=Rt(s.pathname);return{matches:re,loaderData:{},errors:{[B.id]:Y}}}}let F=c||o,[G,W]=fr(e.history,h,d,O,s,f.v7_partialHydration&&_===!0,f.unstable_skipActionErrorRevalidation,q,Le,nt,pe,je,he,F,u,D);if(wt(T=>!(d&&d.some(Y=>Y.route.id===T))||G&&G.some(Y=>Y.route.id===T)),$e=++at,G.length===0&&W.length===0){let T=Vt();return Oe(s,H({matches:d,loaderData:{},errors:D&&ne(D[1])?{[D[0]]:D[1].error}:null},Er(D),T?{fetchers:new Map(h.fetchers)}:{}),{flushSync:w}),{shortCircuited:!0}}if(I){let T={};if(!p){T.navigation=N;let Y=Yt(D);Y!==void 0&&(T.actionData=Y)}W.length>0&&(T.fetchers=tn(W)),ee(T,{flushSync:w})}W.forEach(T=>{K.has(T.key)&&be(T.key),T.controller&&K.set(T.key,T.controller)});let Je=()=>W.forEach(T=>be(T.key));U&&U.signal.addEventListener("abort",Je);let{loaderResults:Re,fetcherResults:Ae}=await Kt(h.matches,d,G,W,i);if(i.signal.aborted)return{shortCircuited:!0};U&&U.signal.removeEventListener("abort",Je),W.forEach(T=>K.delete(T.key));let Ue=Rr([...Re,...Ae]);if(Ue){if(Ue.idx>=G.length){let T=W[Ue.idx-G.length].key;he.add(T)}return await Ke(i,Ue.result,{replace:y}),{shortCircuited:!0}}let{loaderData:Fe,errors:fe}=gr(h,d,G,Re,D,W,Ae,xe);xe.forEach((T,Y)=>{T.subscribe(re=>{(re||T.done)&&xe.delete(Y)})}),f.v7_partialHydration&&_&&h.errors&&Object.entries(h.errors).filter(T=>{let[Y]=T;return!G.some(re=>re.route.id===Y)}).forEach(T=>{let[Y,re]=T;fe=Object.assign(fe||{},{[Y]:re})});let ut=Vt(),dt=Gt($e),ct=ut||dt||W.length>0;return H({matches:d,loaderData:Fe,errors:fe},ct?{fetchers:new Map(h.fetchers)}:{})}function Yt(i){if(i&&!ne(i[1]))return{[i[0]]:i[1].data};if(h.actionData)return Object.keys(h.actionData).length===0?null:h.actionData}function tn(i){return i.forEach(s=>{let d=h.fetchers.get(s.key),p=Ge(void 0,d?d.data:void 0);h.fetchers.set(s.key,p)}),new Map(h.fetchers)}function rn(i,s,d,p){if(n)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.");K.has(i)&&be(i);let E=(p&&p.unstable_flushSync)===!0,P=c||o,x=Dt(h.location,h.matches,u,f.v7_prependBasename,d,f.v7_relativeSplatPath,s,p==null?void 0:p.relative),y=_e(P,x,u),_=er(y,P,x);if(_.active&&_.matches&&(y=_.matches),!y){me(i,s,Q(404,{pathname:x}),{flushSync:E});return}let{path:w,submission:D,error:N}=cr(f.v7_normalizeFormMethod,!0,x,p);if(N){me(i,s,N,{flushSync:E});return}let O=Xe(y,w);if(ue=(p&&p.preventScrollReset)===!0,D&&le(D.formMethod)){nn(i,s,w,O,y,_.active,E,D);return}je.set(i,{routeId:s,path:w}),an(i,s,w,O,y,_.active,E,D)}async function nn(i,s,d,p,E,P,x,y){bt(),je.delete(i);function _(B){if(!B.route.action&&!B.route.lazy){let ve=Q(405,{method:y.formMethod,pathname:d,routeId:s});return me(i,s,ve,{flushSync:x}),!0}return!1}if(!P&&_(p))return;let w=h.fetchers.get(i);Ee(i,xa(y,w),{flushSync:x});let D=new AbortController,N=Ne(e.history,d,D.signal,y);if(P){let B=await st(E,d,N.signal);if(B.type==="aborted")return;if(B.type==="error"){let{error:ve}=lt(d,B);me(i,s,ve,{flushSync:x});return}else if(B.matches){if(E=B.matches,p=Xe(E,d),_(p))return}else{me(i,s,Q(404,{pathname:d}),{flushSync:x});return}}K.set(i,D);let O=at,F=(await We("action",N,[p],E))[0];if(N.signal.aborted){K.get(i)===D&&K.delete(i);return}if(f.v7_fetcherPersist&&pe.has(i)){if(Me(F)||ne(F)){Ee(i,we(void 0));return}}else{if(Me(F))if(K.delete(i),$e>O){Ee(i,we(void 0));return}else return he.add(i),Ee(i,Ge(y)),Ke(N,F,{fetcherSubmission:y});if(ne(F)){me(i,s,F.error);return}}if(De(F))throw Q(400,{type:"defer-action"});let G=h.navigation.location||h.location,W=Ne(e.history,G,D.signal),Je=c||o,Re=h.navigation.state!=="idle"?_e(Je,h.navigation.location,u):h.matches;M(Re,"Didn't find any matches after fetcher action");let Ae=++at;Te.set(i,Ae);let Ue=Ge(y,F.data);h.fetchers.set(i,Ue);let[Fe,fe]=fr(e.history,h,Re,y,G,!1,f.unstable_skipActionErrorRevalidation,q,Le,nt,pe,je,he,Je,u,[p.route.id,F]);fe.filter(B=>B.key!==i).forEach(B=>{let ve=B.key,tr=h.fetchers.get(ve),cn=Ge(void 0,tr?tr.data:void 0);h.fetchers.set(ve,cn),K.has(ve)&&be(ve),B.controller&&K.set(ve,B.controller)}),ee({fetchers:new Map(h.fetchers)});let ut=()=>fe.forEach(B=>be(B.key));D.signal.addEventListener("abort",ut);let{loaderResults:dt,fetcherResults:ct}=await Kt(h.matches,Re,Fe,fe,W);if(D.signal.aborted)return;D.signal.removeEventListener("abort",ut),Te.delete(i),K.delete(i),fe.forEach(B=>K.delete(B.key));let T=Rr([...dt,...ct]);if(T){if(T.idx>=Fe.length){let B=fe[T.idx-Fe.length].key;he.add(B)}return Ke(W,T.result)}let{loaderData:Y,errors:re}=gr(h,h.matches,Fe,dt,void 0,fe,ct,xe);if(h.fetchers.has(i)){let B=we(F.data);h.fetchers.set(i,B)}Gt(Ae),h.navigation.state==="loading"&&Ae>$e?(M(oe,"Expected pending action"),U&&U.abort(),Oe(h.navigation.location,{matches:Re,loaderData:Y,errors:re,fetchers:new Map(h.fetchers)})):(ee({errors:re,loaderData:yr(h.loaderData,Y,Re,re),fetchers:new Map(h.fetchers)}),q=!1)}async function an(i,s,d,p,E,P,x,y){let _=h.fetchers.get(i);Ee(i,Ge(y,_?_.data:void 0),{flushSync:x});let w=new AbortController,D=Ne(e.history,d,w.signal);if(P){let F=await st(E,d,D.signal);if(F.type==="aborted")return;if(F.type==="error"){let{error:G}=lt(d,F);me(i,s,G,{flushSync:x});return}else if(F.matches)E=F.matches,p=Xe(E,d);else{me(i,s,Q(404,{pathname:d}),{flushSync:x});return}}K.set(i,w);let N=at,I=(await We("loader",D,[p],E))[0];if(De(I)&&(I=await Yr(I,D.signal,!0)||I),K.get(i)===w&&K.delete(i),!D.signal.aborted){if(pe.has(i)){Ee(i,we(void 0));return}if(Me(I))if($e>N){Ee(i,we(void 0));return}else{he.add(i),await Ke(D,I);return}if(ne(I)){me(i,s,I.error);return}M(!De(I),"Unhandled fetcher deferred data"),Ee(i,we(I.data))}}async function Ke(i,s,d){let{submission:p,fetcherSubmission:E,replace:P}=d===void 0?{}:d;s.response.headers.has("X-Remix-Revalidate")&&(q=!0);let x=s.response.headers.get("Location");M(x,"Expected a Location header on the redirect Response"),x=mr(x,new URL(i.url),u);let y=Qe(h.location,x,{_isRedirect:!0});if(r){let I=!1;if(s.response.headers.has("X-Remix-Reload-Document"))I=!0;else if(Nt.test(x)){const F=e.history.createURL(x);I=F.origin!==t.location.origin||tt(F.pathname,u)==null}if(I){P?t.location.replace(x):t.location.assign(x);return}}U=null;let _=P===!0?J.Replace:J.Push,{formMethod:w,formAction:D,formEncType:N}=h.navigation;!p&&!E&&w&&D&&N&&(p=Pr(h.navigation));let O=p||E;if(oa.has(s.response.status)&&O&&le(O.formMethod))await Ce(_,y,{submission:H({},O,{formAction:x}),preventScrollReset:ue});else{let I=Ct(y,p);await Ce(_,y,{overrideNavigation:I,fetcherSubmission:E,preventScrollReset:ue})}}async function We(i,s,d,p){try{let E=await ha(v,i,s,d,p,l,a);return await Promise.all(E.map((P,x)=>{if(ba(P)){let y=P.result;return{type:k.redirect,response:va(y,s,d[x].route.id,p,u,f.v7_relativeSplatPath)}}return ma(P)}))}catch(E){return d.map(()=>({type:k.error,error:E}))}}async function Kt(i,s,d,p,E){let[P,...x]=await Promise.all([d.length?We("loader",E,d,s):[],...p.map(y=>{if(y.matches&&y.match&&y.controller){let _=Ne(e.history,y.path,y.controller.signal);return We("loader",_,[y.match],y.matches).then(w=>w[0])}else return Promise.resolve({type:k.error,error:Q(404,{pathname:y.path})})})]);return await Promise.all([wr(i,d,P,P.map(()=>E.signal),!1,h.loaderData),wr(i,p.map(y=>y.match),x,p.map(y=>y.controller?y.controller.signal:null),!0)]),{loaderResults:P,fetcherResults:x}}function bt(){q=!0,Le.push(...wt()),je.forEach((i,s)=>{K.has(s)&&(nt.push(s),be(s))})}function Ee(i,s,d){d===void 0&&(d={}),h.fetchers.set(i,s),ee({fetchers:new Map(h.fetchers)},{flushSync:(d&&d.flushSync)===!0})}function me(i,s,d,p){p===void 0&&(p={});let E=qe(h.matches,s);ot(i),ee({errors:{[E.route.id]:d},fetchers:new Map(h.fetchers)},{flushSync:(p&&p.flushSync)===!0})}function Wt(i){return f.v7_fetcherPersist&&(Ye.set(i,(Ye.get(i)||0)+1),pe.has(i)&&pe.delete(i)),h.fetchers.get(i)||ia}function ot(i){let s=h.fetchers.get(i);K.has(i)&&!(s&&s.state==="loading"&&Te.has(i))&&be(i),je.delete(i),Te.delete(i),he.delete(i),pe.delete(i),h.fetchers.delete(i)}function on(i){if(f.v7_fetcherPersist){let s=(Ye.get(i)||0)-1;s<=0?(Ye.delete(i),pe.add(i)):Ye.set(i,s)}else ot(i);ee({fetchers:new Map(h.fetchers)})}function be(i){let s=K.get(i);M(s,"Expected fetch controller: "+i),s.abort(),K.delete(i)}function Jt(i){for(let s of i){let d=Wt(s),p=we(d.data);h.fetchers.set(s,p)}}function Vt(){let i=[],s=!1;for(let d of he){let p=h.fetchers.get(d);M(p,"Expected fetcher: "+d),p.state==="loading"&&(he.delete(d),i.push(d),s=!0)}return Jt(i),s}function Gt(i){let s=[];for(let[d,p]of Te)if(p<i){let E=h.fetchers.get(d);M(E,"Expected fetcher: "+d),E.state==="loading"&&(be(d),Te.delete(d),s.push(d))}return Jt(s),s.length>0}function ln(i,s){let d=h.blockers.get(i)||Ve;return Se.get(i)!==s&&Se.set(i,s),d}function Xt(i){h.blockers.delete(i),Se.delete(i)}function it(i,s){let d=h.blockers.get(i)||Ve;M(d.state==="unblocked"&&s.state==="blocked"||d.state==="blocked"&&s.state==="blocked"||d.state==="blocked"&&s.state==="proceeding"||d.state==="blocked"&&s.state==="unblocked"||d.state==="proceeding"&&s.state==="unblocked","Invalid blocker state transition: "+d.state+" -> "+s.state);let p=new Map(h.blockers);p.set(i,s),ee({blockers:p})}function qt(i){let{currentLocation:s,nextLocation:d,historyAction:p}=i;if(Se.size===0)return;Se.size>1&&Be(!1,"A router only supports one blocker at a time");let E=Array.from(Se.entries()),[P,x]=E[E.length-1],y=h.blockers.get(P);if(!(y&&y.state==="proceeding")&&x({currentLocation:s,nextLocation:d,historyAction:p}))return P}function Rt(i){let s=Q(404,{pathname:i}),d=c||o,{matches:p,route:E}=br(d);return wt(),{notFoundMatches:p,route:E,error:s}}function lt(i,s){let d=s.partialMatches,p=d[d.length-1].route,E=Q(400,{type:"route-discovery",routeId:p.id,pathname:i,message:s.error!=null&&"message"in s.error?s.error:String(s.error)});return{notFoundMatches:d,route:p,error:E}}function wt(i){let s=[];return xe.forEach((d,p)=>{(!i||i(p))&&(d.cancel(),s.push(p),xe.delete(p))}),s}function sn(i,s,d){if(S=i,C=s,R=d||null,!z&&h.navigation===St){z=!0;let p=Zt(h.location,h.matches);p!=null&&ee({restoreScrollPosition:p})}return()=>{S=null,C=null,R=null}}function Qt(i,s){return R&&R(i,s.map(p=>Or(p,h.loaderData)))||i.key}function un(i,s){if(S&&C){let d=Qt(i,s);S[d]=C()}}function Zt(i,s){if(S){let d=Qt(i,s),p=S[d];if(typeof p=="number")return p}return null}function er(i,s,d){if(m)if(i){if(i[i.length-1].route.path==="*")return{active:!0,matches:ht(s,d,u,!0)}}else return{active:!0,matches:ht(s,d,u,!0)||[]};return{active:!1,matches:null}}async function st(i,s,d){let p=i,E=p.length>0?p[p.length-1].route:null;for(;;){try{await ca(m,s,p,o||c,l,a,Vr,d)}catch(w){return{type:"error",error:w,partialMatches:p}}if(d.aborted)return{type:"aborted"};let P=c||o,x=_e(P,s,u),y=!1;if(x){let w=x[x.length-1].route;if(w.index)return{type:"success",matches:x};if(w.path&&w.path.length>0)if(w.path==="*")y=!0;else return{type:"success",matches:x}}let _=ht(P,s,u,!0);if(!_||p.map(w=>w.route.id).join("-")===_.map(w=>w.route.id).join("-"))return{type:"success",matches:y?x:null};if(p=_,E=p[p.length-1].route,E.path==="*")return{type:"success",matches:p}}}function dn(i){l={},c=Ze(i,a,void 0,l)}return ae={get basename(){return u},get future(){return f},get state(){return h},get routes(){return o},get window(){return t},initialize:Gr,subscribe:qr,enableScrollRestoration:sn,navigate:$t,fetch:rn,revalidate:Qr,createHref:i=>e.history.createHref(i),encodeLocation:i=>e.history.encodeLocation(i),getFetcher:Wt,deleteFetcher:on,dispose:Xr,getBlocker:ln,deleteBlocker:Xt,patchRoutes(i,s){return zr(i,s,o||c,l,a)},_internalFetchControllers:K,_internalActiveDeferreds:xe,_internalSetRoutes:dn},ae}function sa(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Dt(e,t,r,n,a,l,o,c){let u,v;if(o){u=[];for(let f of t)if(u.push(f),f.route.id===o){v=f;break}}else u=t,v=t[t.length-1];let m=Ft(a||".",Ut(u,l),tt(e.pathname,r)||e.pathname,c==="path");return a==null&&(m.search=e.search,m.hash=e.hash),(a==null||a===""||a===".")&&v&&v.route.index&&!It(m.search)&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(m.pathname=m.pathname==="/"?r:ge([r,m.pathname])),et(m)}function cr(e,t,r,n){if(!n||!sa(n))return{path:r};if(n.formMethod&&!wa(n.formMethod))return{path:r,error:Q(405,{method:n.formMethod})};let a=()=>({path:r,error:Q(400,{type:"invalid-body"})}),l=n.formMethod||"get",o=e?l.toUpperCase():l.toLowerCase(),c=Hr(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!le(o))return a();let g=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((j,S)=>{let[R,C]=S;return""+j+R+"="+C+`
27
- `},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:g}}}else if(n.formEncType==="application/json"){if(!le(o))return a();try{let g=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:c,formEncType:n.formEncType,formData:void 0,json:g,text:void 0}}}catch{return a()}}}M(typeof FormData=="function","FormData is not available in this environment");let u,v;if(n.formData)u=Mt(n.formData),v=n.formData;else if(n.body instanceof FormData)u=Mt(n.body),v=n.body;else if(n.body instanceof URLSearchParams)u=n.body,v=vr(u);else if(n.body==null)u=new URLSearchParams,v=new FormData;else try{u=new URLSearchParams(n.body),v=vr(u)}catch{return a()}let m={formMethod:o,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:v,json:void 0,text:void 0};if(le(m.formMethod))return{path:r,submission:m};let f=Pe(r);return t&&f.search&&It(f.search)&&u.append("index",""),f.search="?"+u,{path:et(f),submission:m}}function ua(e,t){let r=e;if(t){let n=e.findIndex(a=>a.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function fr(e,t,r,n,a,l,o,c,u,v,m,f,g,j,S,R){let C=R?ne(R[1])?R[1].error:R[1].data:void 0,z=e.createURL(t.location),A=e.createURL(a),X=R&&ne(R[1])?R[0]:void 0,Z=X?ua(r,X):r,ae=R?R[1].statusCode:void 0,h=o&&ae&&ae>=400,oe=Z.filter((U,te)=>{let{route:V}=U;if(V.lazy)return!0;if(V.loader==null)return!1;if(l)return typeof V.loader!="function"||V.loader.hydrate?!0:t.loaderData[V.id]===void 0&&(!t.errors||t.errors[V.id]===void 0);if(da(t.loaderData,t.matches[te],U)||u.some(q=>q===U.route.id))return!0;let de=t.matches[te],ce=U;return hr(U,H({currentUrl:z,currentParams:de.params,nextUrl:A,nextParams:ce.params},n,{actionResult:C,unstable_actionStatus:ae,defaultShouldRevalidate:h?!1:c||z.pathname+z.search===A.pathname+A.search||z.search!==A.search||kr(de,ce)}))}),ue=[];return f.forEach((U,te)=>{if(l||!r.some(Le=>Le.route.id===U.routeId)||m.has(te))return;let V=_e(j,U.path,S);if(!V){ue.push({key:te,routeId:U.routeId,path:U.path,matches:null,match:null,controller:null});return}let de=t.fetchers.get(te),ce=Xe(V,U.path),q=!1;g.has(te)?q=!1:v.includes(te)?q=!0:de&&de.state!=="idle"&&de.data===void 0?q=c:q=hr(ce,H({currentUrl:z,currentParams:t.matches[t.matches.length-1].params,nextUrl:A,nextParams:r[r.length-1].params},n,{actionResult:C,unstable_actionStatus:ae,defaultShouldRevalidate:h?!1:c})),q&&ue.push({key:te,routeId:U.routeId,path:U.path,matches:V,match:ce,controller:new AbortController})}),[oe,ue]}function da(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function kr(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function hr(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function ca(e,t,r,n,a,l,o,c){let u=[t,...r.map(v=>v.route.id)].join("-");try{let v=o.get(u);v||(v=e({path:t,matches:r,patch:(m,f)=>{c.aborted||zr(m,f,n,a,l)}}),o.set(u,v)),v&&Ea(v)&&await v}finally{o.delete(u)}}function zr(e,t,r,n,a){if(e){var l;let o=n[e];M(o,"No route found to patch children into: routeId = "+e);let c=Ze(t,a,[e,"patch",String(((l=o.children)==null?void 0:l.length)||"0")],n);o.children?o.children.push(...c):o.children=c}else{let o=Ze(t,a,["patch",String(r.length||"0")],n);r.push(...o)}}async function pr(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];M(a,"No route found in manifest");let l={};for(let o in n){let u=a[o]!==void 0&&o!=="hasErrorBoundary";Be(!u,'Route "'+a.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!u&&!An.has(o)&&(l[o]=n[o])}Object.assign(a,l),Object.assign(a,H({},t(a),{lazy:void 0}))}function fa(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function ha(e,t,r,n,a,l,o,c){let u=n.reduce((f,g)=>f.add(g.route.id),new Set),v=new Set,m=await e({matches:a.map(f=>{let g=u.has(f.route.id);return H({},f,{shouldLoad:g,resolve:S=>(v.add(f.route.id),g?pa(t,r,f,l,o,S,c):Promise.resolve({type:k.data,result:void 0}))})}),request:r,params:a[0].params,context:c});return a.forEach(f=>M(v.has(f.route.id),'`match.resolve()` was not called for route id "'+f.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),m.filter((f,g)=>u.has(a[g].route.id))}async function pa(e,t,r,n,a,l,o){let c,u,v=m=>{let f,g=new Promise((R,C)=>f=C);u=()=>f(),t.signal.addEventListener("abort",u);let j=R=>typeof m!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):m({request:t,params:r.params,context:o},...R!==void 0?[R]:[]),S;return l?S=l(R=>j(R)):S=(async()=>{try{return{type:"data",result:await j()}}catch(R){return{type:"error",result:R}}})(),Promise.race([S,g])};try{let m=r.route[e];if(r.route.lazy)if(m){let f,[g]=await Promise.all([v(m).catch(j=>{f=j}),pr(r.route,a,n)]);if(f!==void 0)throw f;c=g}else if(await pr(r.route,a,n),m=r.route[e],m)c=await v(m);else if(e==="action"){let f=new URL(t.url),g=f.pathname+f.search;throw Q(405,{method:t.method,pathname:g,routeId:r.route.id})}else return{type:k.data,result:void 0};else if(m)c=await v(m);else{let f=new URL(t.url),g=f.pathname+f.search;throw Q(404,{pathname:g})}M(c.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(m){return{type:k.error,result:m}}finally{u&&t.signal.removeEventListener("abort",u)}return c}async function ma(e){let{result:t,type:r,status:n}=e;if($r(t)){let o;try{let c=t.headers.get("Content-Type");c&&/\bapplication\/json\b/.test(c)?t.body==null?o=null:o=await t.json():o=await t.text()}catch(c){return{type:k.error,error:c}}return r===k.error?{type:k.error,error:new Nr(t.status,t.statusText,o),statusCode:t.status,headers:t.headers}:{type:k.data,data:o,statusCode:t.status,headers:t.headers}}if(r===k.error)return{type:k.error,error:t,statusCode:gt(t)?t.status:n};if(Ra(t)){var a,l;return{type:k.deferred,deferredData:t,statusCode:(a=t.init)==null?void 0:a.status,headers:((l=t.init)==null?void 0:l.headers)&&new Headers(t.init.headers)}}return{type:k.data,data:t,statusCode:n}}function va(e,t,r,n,a,l){let o=e.headers.get("Location");if(M(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!Nt.test(o)){let c=n.slice(0,n.findIndex(u=>u.route.id===r)+1);o=Dt(new URL(t.url),c,a,!0,o,l),e.headers.set("Location",o)}return e}function mr(e,t,r){if(Nt.test(e)){let n=e,a=n.startsWith("//")?new URL(t.protocol+n):new URL(n),l=tt(a.pathname,r)!=null;if(a.origin===t.origin&&l)return a.pathname+a.search+a.hash}return e}function Ne(e,t,r,n){let a=e.createURL(Hr(t)).toString(),l={signal:r};if(n&&le(n.formMethod)){let{formMethod:o,formEncType:c}=n;l.method=o.toUpperCase(),c==="application/json"?(l.headers=new Headers({"Content-Type":c}),l.body=JSON.stringify(n.json)):c==="text/plain"?l.body=n.text:c==="application/x-www-form-urlencoded"&&n.formData?l.body=Mt(n.formData):l.body=n.formData}return new Request(a,l)}function Mt(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function vr(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function ga(e,t,r,n,a,l){let o={},c=null,u,v=!1,m={},f=n&&ne(n[1])?n[1].error:void 0;return r.forEach((g,j)=>{let S=t[j].route.id;if(M(!Me(g),"Cannot handle redirect results in processLoaderData"),ne(g)){let R=g.error;f!==void 0&&(R=f,f=void 0),c=c||{};{let C=qe(e,S);c[C.route.id]==null&&(c[C.route.id]=R)}o[S]=void 0,v||(v=!0,u=gt(g.error)?g.error.status:500),g.headers&&(m[S]=g.headers)}else De(g)?(a.set(S,g.deferredData),o[S]=g.deferredData.data,g.statusCode!=null&&g.statusCode!==200&&!v&&(u=g.statusCode),g.headers&&(m[S]=g.headers)):(o[S]=g.data,g.statusCode&&g.statusCode!==200&&!v&&(u=g.statusCode),g.headers&&(m[S]=g.headers))}),f!==void 0&&n&&(c={[n[0]]:f},o[n[0]]=void 0),{loaderData:o,errors:c,statusCode:u||200,loaderHeaders:m}}function gr(e,t,r,n,a,l,o,c){let{loaderData:u,errors:v}=ga(t,r,n,a,c);for(let m=0;m<l.length;m++){let{key:f,match:g,controller:j}=l[m];M(o!==void 0&&o[m]!==void 0,"Did not find corresponding fetcher result");let S=o[m];if(!(j&&j.signal.aborted))if(ne(S)){let R=qe(e.matches,g==null?void 0:g.route.id);v&&v[R.route.id]||(v=H({},v,{[R.route.id]:S.error})),e.fetchers.delete(f)}else if(Me(S))M(!1,"Unhandled fetcher revalidation redirect");else if(De(S))M(!1,"Unhandled fetcher deferred data");else{let R=we(S.data);e.fetchers.set(f,R)}}return{loaderData:u,errors:v}}function yr(e,t,r,n){let a=H({},t);for(let l of r){let o=l.route.id;if(t.hasOwnProperty(o)?t[o]!==void 0&&(a[o]=t[o]):e[o]!==void 0&&l.route.loader&&(a[o]=e[o]),n&&n.hasOwnProperty(o))break}return a}function Er(e){return e?ne(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function qe(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function br(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Q(e,t){let{pathname:r,routeId:n,method:a,type:l,message:o}=t===void 0?{}:t,c="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(c="Bad Request",l==="route-discovery"?u='Unable to match URL "'+r+'" - the `children()` function for '+("route `"+n+"` threw the following error:\n"+o):a&&r&&n?u="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":l==="defer-action"?u="defer() is not supported in actions":l==="invalid-body"&&(u="Unable to encode submission body")):e===403?(c="Forbidden",u='Route "'+n+'" does not match URL "'+r+'"'):e===404?(c="Not Found",u='No route matches URL "'+r+'"'):e===405&&(c="Method Not Allowed",a&&r&&n?u="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":a&&(u='Invalid request method "'+a.toUpperCase()+'"')),new Nr(e||500,c,new Error(u),!0)}function Rr(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Me(r))return{result:r,idx:t}}}function Hr(e){let t=typeof e=="string"?Pe(e):e;return et(H({},t,{hash:""}))}function ya(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Ea(e){return typeof e=="object"&&e!=null&&"then"in e}function ba(e){return $r(e.result)&&aa.has(e.result.status)}function De(e){return e.type===k.deferred}function ne(e){return e.type===k.error}function Me(e){return(e&&e.type)===k.redirect}function Ra(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function $r(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function wa(e){return na.has(e.toLowerCase())}function le(e){return ta.has(e.toLowerCase())}async function wr(e,t,r,n,a,l){for(let o=0;o<r.length;o++){let c=r[o],u=t[o];if(!u)continue;let v=e.find(f=>f.route.id===u.route.id),m=v!=null&&!kr(v,u)&&(l&&l[u.route.id])!==void 0;if(De(c)&&(a||m)){let f=n[o];M(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await Yr(c,f,a).then(g=>{g&&(r[o]=g||r[o])})}}}async function Yr(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:k.data,data:e.deferredData.unwrappedData}}catch(a){return{type:k.error,error:a}}return{type:k.data,data:e.deferredData.data}}}function It(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Xe(e,t){let r=typeof t=="string"?Pe(t).search:t.search;if(e[e.length-1].route.index&&It(r||""))return e[e.length-1];let n=Fr(e);return n[n.length-1]}function Pr(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:l,json:o}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(l!=null)return{formMethod:t,formAction:r,formEncType:n,formData:l,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function Ct(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Pa(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Ge(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function xa(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function we(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Sa(e,t){try{let r=e.sessionStorage.getItem(Br);if(r){let n=JSON.parse(r);for(let[a,l]of Object.entries(n||{}))l&&Array.isArray(l)&&t.set(a,new Set(l||[]))}}catch{}}function Ca(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(Br,JSON.stringify(r))}catch(n){Be(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/**
28
- * React Router v6.24.0
29
- *
30
- * Copyright (c) Remix Software Inc.
31
- *
32
- * This source code is licensed under the MIT license found in the
33
- * LICENSE.md file in the root directory of this source tree.
34
- *
35
- * @license MIT
36
- */function pt(){return pt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pt.apply(this,arguments)}const Bt=b.createContext(null),_a=b.createContext(null),mt=b.createContext(null),ze=b.createContext(null),kt=b.createContext(null),ye=b.createContext({outlet:null,matches:[],isDataRoute:!1}),Kr=b.createContext(null);function qa(e,t){let{relative:r}=t===void 0?{}:t;rt()||M(!1);let{basename:n,navigator:a}=b.useContext(ze),{hash:l,pathname:o,search:c}=Ta(e,{relative:r}),u=o;return n!=="/"&&(u=o==="/"?n:ge([n,o])),a.createHref({pathname:u,search:c,hash:l})}function rt(){return b.useContext(kt)!=null}function zt(){return rt()||M(!1),b.useContext(kt).location}function Wr(e){b.useContext(ze).static||b.useLayoutEffect(e)}function Qa(){let{isDataRoute:e}=b.useContext(ye);return e?ka():Da()}function Da(){rt()||M(!1);let e=b.useContext(Bt),{basename:t,future:r,navigator:n}=b.useContext(ze),{matches:a}=b.useContext(ye),{pathname:l}=zt(),o=JSON.stringify(Ut(a,r.v7_relativeSplatPath)),c=b.useRef(!1);return Wr(()=>{c.current=!0}),b.useCallback(function(v,m){if(m===void 0&&(m={}),!c.current)return;if(typeof v=="number"){n.go(v);return}let f=Ft(v,JSON.parse(o),l,m.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:ge([t,f.pathname])),(m.replace?n.replace:n.push)(f,m.state,m)},[t,n,o,l,e])}const Ma=b.createContext(null);function La(e){let t=b.useContext(ye).outlet;return t&&b.createElement(Ma.Provider,{value:e},t)}function Za(){let{matches:e}=b.useContext(ye),t=e[e.length-1];return t?t.params:{}}function Ta(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=b.useContext(ze),{matches:a}=b.useContext(ye),{pathname:l}=zt(),o=JSON.stringify(Ut(a,n.v7_relativeSplatPath));return b.useMemo(()=>Ft(e,JSON.parse(o),l,r==="path"),[e,o,l,r])}function eo(e,t,r,n){rt()||M(!1);let{navigator:a}=b.useContext(ze),{matches:l}=b.useContext(ye),o=l[l.length-1],c=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:"/";o&&o.route;let v=zt(),m;m=v;let f=m.pathname||"/",g=f;if(u!=="/"){let R=u.replace(/^\//,"").split("/");g="/"+f.replace(/^\//,"").split("/").slice(R.length).join("/")}let j=_e(e,{pathname:g});return Fa(j&&j.map(R=>Object.assign({},R,{params:Object.assign({},c,R.params),pathname:ge([u,a.encodeLocation?a.encodeLocation(R.pathname).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?u:ge([u,a.encodeLocation?a.encodeLocation(R.pathnameBase).pathname:R.pathnameBase])})),l,r,n)}function ja(){let e=Ia(),t=gt(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),r?b.createElement("pre",{style:a},r):null,null)}const Oa=b.createElement(ja,null);class Aa extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?b.createElement(ye.Provider,{value:this.props.routeContext},b.createElement(Kr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ua(e){let{routeContext:t,match:r,children:n}=e,a=b.useContext(Bt);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),b.createElement(ye.Provider,{value:t},n)}function Fa(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var l;if((l=r)!=null&&l.errors)e=r.matches;else return null}let o=e,c=(a=r)==null?void 0:a.errors;if(c!=null){let m=o.findIndex(f=>f.route.id&&(c==null?void 0:c[f.route.id])!==void 0);m>=0||M(!1),o=o.slice(0,Math.min(o.length,m+1))}let u=!1,v=-1;if(r&&n&&n.v7_partialHydration)for(let m=0;m<o.length;m++){let f=o[m];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(v=m),f.route.id){let{loaderData:g,errors:j}=r,S=f.route.loader&&g[f.route.id]===void 0&&(!j||j[f.route.id]===void 0);if(f.route.lazy||S){u=!0,v>=0?o=o.slice(0,v+1):o=[o[0]];break}}}return o.reduceRight((m,f,g)=>{let j,S=!1,R=null,C=null;r&&(j=c&&f.route.id?c[f.route.id]:void 0,R=f.route.errorElement||Oa,u&&(v<0&&g===0?(S=!0,C=null):v===g&&(S=!0,C=f.route.hydrateFallbackElement||null)));let z=t.concat(o.slice(0,g+1)),A=()=>{let X;return j?X=R:S?X=C:f.route.Component?X=b.createElement(f.route.Component,null):f.route.element?X=f.route.element:X=m,b.createElement(Ua,{match:f,routeContext:{outlet:m,matches:z,isDataRoute:r!=null},children:X})};return r&&(f.route.ErrorBoundary||f.route.errorElement||g===0)?b.createElement(Aa,{location:r.location,revalidation:r.revalidation,component:R,error:j,children:A(),routeContext:{outlet:null,matches:z,isDataRoute:!0}}):A()},null)}var Ht=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Ht||{}),se=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(se||{});function Jr(e){let t=b.useContext(Bt);return t||M(!1),t}function He(e){let t=b.useContext(_a);return t||M(!1),t}function Na(e){let t=b.useContext(ye);return t||M(!1),t}function yt(e){let t=Na(),r=t.matches[t.matches.length-1];return r.route.id||M(!1),r.route.id}function to(){return yt(se.UseRouteId)}function ro(){return He(se.UseNavigation).navigation}function no(){let e=Jr(Ht.UseRevalidator),t=He(se.UseRevalidator);return b.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}function ao(){let{matches:e,loaderData:t}=He(se.UseMatches);return b.useMemo(()=>e.map(r=>Or(r,t)),[e,t])}function oo(){let e=He(se.UseLoaderData),t=yt(se.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function io(e){return He(se.UseRouteLoaderData).loaderData[e]}function Ia(){var e;let t=b.useContext(Kr),r=He(se.UseRouteError),n=yt(se.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Ba(){let e=b.useContext(mt);return e==null?void 0:e._data}function lo(){let e=b.useContext(mt);return e==null?void 0:e._error}function ka(){let{router:e}=Jr(Ht.UseNavigateStable),t=yt(se.UseNavigateStable),r=b.useRef(!1);return Wr(()=>{r.current=!0}),b.useCallback(function(a,l){l===void 0&&(l={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,pt({fromRouteId:t},l)))},[e,t])}function so(e){return La(e.context)}function uo(e){let{basename:t="/",children:r=null,location:n,navigationType:a=J.Pop,navigator:l,static:o=!1,future:c}=e;rt()&&M(!1);let u=t.replace(/^\/*/,"/"),v=b.useMemo(()=>({basename:u,navigator:l,static:o,future:pt({v7_relativeSplatPath:!1},c)}),[u,c,l,o]);typeof n=="string"&&(n=Pe(n));let{pathname:m="/",search:f="",hash:g="",state:j=null,key:S="default"}=n,R=b.useMemo(()=>{let C=tt(m,u);return C==null?null:{location:{pathname:C,search:f,hash:g,state:j,key:S},navigationType:a}},[u,m,f,g,j,S,a]);return R==null?null:b.createElement(ze.Provider,{value:v},b.createElement(kt.Provider,{children:r,value:R}))}function co(e){let{children:t,errorElement:r,resolve:n}=e;return b.createElement(Ha,{resolve:n,errorElement:r},b.createElement($a,null,t))}var ie=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(ie||{});const za=new Promise(()=>{});class Ha extends b.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,r){console.error("<Await> caught the following error during render",t,r)}render(){let{children:t,errorElement:r,resolve:n}=this.props,a=null,l=ie.pending;if(!(n instanceof Promise))l=ie.success,a=Promise.resolve(),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_data",{get:()=>n});else if(this.state.error){l=ie.error;let o=this.state.error;a=Promise.reject().catch(()=>{}),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_error",{get:()=>o})}else n._tracked?(a=n,l="_error"in a?ie.error:"_data"in a?ie.success:ie.pending):(l=ie.pending,Object.defineProperty(n,"_tracked",{get:()=>!0}),a=n.then(o=>Object.defineProperty(n,"_data",{get:()=>o}),o=>Object.defineProperty(n,"_error",{get:()=>o})));if(l===ie.error&&a._error instanceof _t)throw za;if(l===ie.error&&!r)throw a._error;if(l===ie.error)return b.createElement(mt.Provider,{value:a,children:r});if(l===ie.success)return b.createElement(mt.Provider,{value:a,children:t});throw a}}function $a(e){let{children:t}=e,r=Ba(),n=typeof t=="function"?t(r):t;return b.createElement(b.Fragment,null,n)}function fo(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:b.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:b.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:b.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}export{qa as A,Wa as B,dr as C,Bt as D,Nr as E,Pe as F,_t as G,Va as H,ia as I,Ga as J,oo as K,co as L,lo as M,ze as N,so as O,io as P,Tn as R,Ia as a,Za as b,ro as c,no as d,Qa as e,Xa as f,Ja as g,fo as h,gt as i,Ka as j,ao as k,hn as l,_e as m,Ya as n,to as o,ye as p,M as q,b as r,Ta as s,ge as t,zt as u,et as v,tt as w,_a as x,uo as y,eo as z};
37
- //# sourceMappingURL=index-DF_XBInP.js.map