@ug.software/opposer 3.0.10 → 3.0.11

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 (227) hide show
  1. package/lib/bin/commands/build.js +15 -28
  2. package/lib/bin/commands/init.js +27 -30
  3. package/lib/esm/server/security/jwt/index.d.ts +1 -1
  4. package/lib/esm/server/security/jwt/index.js +21 -29
  5. package/lib/esm/system/index.d.ts +1 -1
  6. package/lib/esm/system/index.js +42 -55
  7. package/package.json +3 -3
  8. package/lib/cjs/examples/full-app/index.d.ts +0 -1
  9. package/lib/cjs/examples/full-app/index.js +0 -102
  10. package/lib/cjs/examples/full-app/models/author.d.ts +0 -7
  11. package/lib/cjs/examples/full-app/models/author.js +0 -42
  12. package/lib/cjs/examples/full-app/models/book.d.ts +0 -9
  13. package/lib/cjs/examples/full-app/models/book.js +0 -51
  14. package/lib/cjs/examples/full-app/models/category.d.ts +0 -4
  15. package/lib/cjs/examples/full-app/models/category.js +0 -26
  16. package/lib/cjs/examples/full-app/schedules/catalog-refresh.d.ts +0 -28
  17. package/lib/cjs/examples/full-app/schedules/catalog-refresh.js +0 -149
  18. package/lib/cjs/examples/full-app/schedules/inventory-sync.d.ts +0 -12
  19. package/lib/cjs/examples/full-app/schedules/inventory-sync.js +0 -61
  20. package/lib/cjs/examples/full-app/schedules/library-alerts.d.ts +0 -11
  21. package/lib/cjs/examples/full-app/schedules/library-alerts.js +0 -55
  22. package/lib/cjs/examples/minimal/src/handlers/book.d.ts +0 -11
  23. package/lib/cjs/examples/minimal/src/handlers/book.js +0 -51
  24. package/lib/cjs/examples/minimal/src/index.d.ts +0 -1
  25. package/lib/cjs/examples/minimal/src/index.js +0 -14
  26. package/lib/cjs/examples/minimal/src/models/books.d.ts +0 -4
  27. package/lib/cjs/examples/minimal/src/models/books.js +0 -26
  28. package/lib/cjs/examples/orm/models/permission.d.ts +0 -6
  29. package/lib/cjs/examples/orm/models/permission.js +0 -38
  30. package/lib/cjs/examples/orm/models/profile.d.ts +0 -7
  31. package/lib/cjs/examples/orm/models/profile.js +0 -42
  32. package/lib/cjs/examples/orm/models/user.d.ts +0 -11
  33. package/lib/cjs/examples/orm/models/user.js +0 -70
  34. package/lib/cjs/examples/orm/mysql/index.d.ts +0 -1
  35. package/lib/cjs/examples/orm/mysql/index.js +0 -44
  36. package/lib/cjs/examples/orm/postgres/index.d.ts +0 -1
  37. package/lib/cjs/examples/orm/postgres/index.js +0 -40
  38. package/lib/cjs/examples/orm/sqlite/index.d.ts +0 -1
  39. package/lib/cjs/examples/orm/sqlite/index.js +0 -41
  40. package/lib/cjs/index.d.ts +0 -2
  41. package/lib/cjs/index.js +0 -23
  42. package/lib/cjs/interfaces/controller.d.ts +0 -109
  43. package/lib/cjs/interfaces/controller.js +0 -2
  44. package/lib/cjs/interfaces/field.d.ts +0 -23
  45. package/lib/cjs/interfaces/field.js +0 -2
  46. package/lib/cjs/interfaces/handler.d.ts +0 -18
  47. package/lib/cjs/interfaces/handler.js +0 -2
  48. package/lib/cjs/interfaces/jwt.d.ts +0 -21
  49. package/lib/cjs/interfaces/jwt.js +0 -2
  50. package/lib/cjs/interfaces/model.d.ts +0 -9
  51. package/lib/cjs/interfaces/model.js +0 -2
  52. package/lib/cjs/interfaces/request.d.ts +0 -13
  53. package/lib/cjs/interfaces/request.js +0 -2
  54. package/lib/cjs/interfaces/schema.d.ts +0 -9
  55. package/lib/cjs/interfaces/schema.js +0 -2
  56. package/lib/cjs/interfaces/security.d.ts +0 -32
  57. package/lib/cjs/interfaces/security.js +0 -2
  58. package/lib/cjs/interfaces/server.d.ts +0 -37
  59. package/lib/cjs/interfaces/server.js +0 -2
  60. package/lib/cjs/interfaces/system.d.ts +0 -41
  61. package/lib/cjs/interfaces/system.js +0 -2
  62. package/lib/cjs/orm/decorators/index.d.ts +0 -33
  63. package/lib/cjs/orm/decorators/index.js +0 -131
  64. package/lib/cjs/orm/driver/mysql.d.ts +0 -14
  65. package/lib/cjs/orm/driver/mysql.js +0 -103
  66. package/lib/cjs/orm/driver/postgres.d.ts +0 -14
  67. package/lib/cjs/orm/driver/postgres.js +0 -105
  68. package/lib/cjs/orm/driver/sqlite.d.ts +0 -14
  69. package/lib/cjs/orm/driver/sqlite.js +0 -143
  70. package/lib/cjs/orm/index.d.ts +0 -8
  71. package/lib/cjs/orm/index.js +0 -28
  72. package/lib/cjs/orm/metadata.d.ts +0 -47
  73. package/lib/cjs/orm/metadata.js +0 -47
  74. package/lib/cjs/orm/opposer.d.ts +0 -30
  75. package/lib/cjs/orm/opposer.js +0 -33
  76. package/lib/cjs/orm/query-builder.d.ts +0 -32
  77. package/lib/cjs/orm/query-builder.js +0 -278
  78. package/lib/cjs/orm/repository.d.ts +0 -54
  79. package/lib/cjs/orm/repository.js +0 -325
  80. package/lib/cjs/orm/validation.d.ts +0 -44
  81. package/lib/cjs/orm/validation.js +0 -128
  82. package/lib/cjs/package.json +0 -3
  83. package/lib/cjs/persistent/cache/core-context.d.ts +0 -17
  84. package/lib/cjs/persistent/cache/core-context.js +0 -39
  85. package/lib/cjs/persistent/cache/global.d.ts +0 -18
  86. package/lib/cjs/persistent/cache/global.js +0 -22
  87. package/lib/cjs/persistent/cache/index.d.ts +0 -3
  88. package/lib/cjs/persistent/cache/index.js +0 -12
  89. package/lib/cjs/persistent/cache/session.d.ts +0 -19
  90. package/lib/cjs/persistent/cache/session.js +0 -39
  91. package/lib/cjs/persistent/cache/storage.d.ts +0 -14
  92. package/lib/cjs/persistent/cache/storage.js +0 -88
  93. package/lib/cjs/persistent/cache/store.d.ts +0 -16
  94. package/lib/cjs/persistent/cache/store.js +0 -112
  95. package/lib/cjs/persistent/context/index.d.ts +0 -3
  96. package/lib/cjs/persistent/context/index.js +0 -5
  97. package/lib/cjs/persistent/decorators/global.d.ts +0 -1
  98. package/lib/cjs/persistent/decorators/global.js +0 -25
  99. package/lib/cjs/persistent/decorators/session.d.ts +0 -1
  100. package/lib/cjs/persistent/decorators/session.js +0 -27
  101. package/lib/cjs/persistent/index.d.ts +0 -6
  102. package/lib/cjs/persistent/index.js +0 -18
  103. package/lib/cjs/persistent/interfaces/context.d.ts +0 -5
  104. package/lib/cjs/persistent/interfaces/context.js +0 -2
  105. package/lib/cjs/persistent/interfaces/system.d.ts +0 -47
  106. package/lib/cjs/persistent/interfaces/system.js +0 -29
  107. package/lib/cjs/persistent/system/index.d.ts +0 -7
  108. package/lib/cjs/persistent/system/index.js +0 -44
  109. package/lib/cjs/persistent/utils/memory.d.ts +0 -8
  110. package/lib/cjs/persistent/utils/memory.js +0 -44
  111. package/lib/cjs/persistent/utils/timer.d.ts +0 -14
  112. package/lib/cjs/persistent/utils/timer.js +0 -21
  113. package/lib/cjs/playground/build/client/assets/AddRounded-ByHfnsiW.js +0 -4
  114. package/lib/cjs/playground/build/client/assets/Button-DLrxHRm7.js +0 -1
  115. package/lib/cjs/playground/build/client/assets/Container-CgITmmbk.js +0 -1
  116. package/lib/cjs/playground/build/client/assets/Divider-B_Wx9srO.js +0 -1
  117. package/lib/cjs/playground/build/client/assets/List-juBjUmfP.js +0 -1
  118. package/lib/cjs/playground/build/client/assets/ListItemText-DgWZmgzc.js +0 -1
  119. package/lib/cjs/playground/build/client/assets/MenuItem-D_5SuVKQ.js +0 -1
  120. package/lib/cjs/playground/build/client/assets/Modal-BwXR_5Bh.js +0 -1
  121. package/lib/cjs/playground/build/client/assets/TableRow-B9hAmlnV.js +0 -2
  122. package/lib/cjs/playground/build/client/assets/TextField-UybdTIGB.js +0 -3
  123. package/lib/cjs/playground/build/client/assets/Tooltip-BGcUWUcF.js +0 -1
  124. package/lib/cjs/playground/build/client/assets/auth-CD1rXHzz.js +0 -1
  125. package/lib/cjs/playground/build/client/assets/auth-GyTIVKy5.js +0 -1
  126. package/lib/cjs/playground/build/client/assets/confirm-Dr0pbiV6.js +0 -1
  127. package/lib/cjs/playground/build/client/assets/dividerClasses-CIiqeEPO.js +0 -1
  128. package/lib/cjs/playground/build/client/assets/entry.client-D6FYz1yh.js +0 -13
  129. package/lib/cjs/playground/build/client/assets/index-CJ0wdt6Z.js +0 -1
  130. package/lib/cjs/playground/build/client/assets/index-CQc11yq_.js +0 -1153
  131. package/lib/cjs/playground/build/client/assets/index-Cr4I-4J2.js +0 -1
  132. package/lib/cjs/playground/build/client/assets/index-CtPqstFl.js +0 -26
  133. package/lib/cjs/playground/build/client/assets/index-Ct_NE85o.js +0 -1
  134. package/lib/cjs/playground/build/client/assets/index-D0I6xwmb.js +0 -1
  135. package/lib/cjs/playground/build/client/assets/index-DmDCpKb3.js +0 -1
  136. package/lib/cjs/playground/build/client/assets/index-DsSkAwyn.js +0 -1
  137. package/lib/cjs/playground/build/client/assets/index-_DMgWZ3Y.js +0 -1
  138. package/lib/cjs/playground/build/client/assets/listItemIconClasses-39Itzgzt.js +0 -1
  139. package/lib/cjs/playground/build/client/assets/listItemTextClasses-EQFLPLzt.js +0 -1
  140. package/lib/cjs/playground/build/client/assets/manifest-c06e9a7f.js +0 -1
  141. package/lib/cjs/playground/build/client/assets/mergeSlotProps-DptgQgAT.js +0 -1
  142. package/lib/cjs/playground/build/client/assets/playground-Hl52p9f5.js +0 -108
  143. package/lib/cjs/playground/build/client/assets/root-CQTBmuv8.js +0 -1
  144. package/lib/cjs/playground/build/client/assets/toast-CsAH5FIf.js +0 -1
  145. package/lib/cjs/playground/build/client/assets/use-request-BZNkzlTr.js +0 -1
  146. package/lib/cjs/playground/build/client/favicon.ico +0 -0
  147. package/lib/cjs/playground/build/client/index.html +0 -6
  148. package/lib/cjs/playground/index.d.ts +0 -2
  149. package/lib/cjs/playground/index.js +0 -135
  150. package/lib/cjs/scheduler/controllers/index.d.ts +0 -19
  151. package/lib/cjs/scheduler/controllers/index.js +0 -62
  152. package/lib/cjs/scheduler/decorators/index.d.ts +0 -9
  153. package/lib/cjs/scheduler/decorators/index.js +0 -21
  154. package/lib/cjs/scheduler/handlers/index.d.ts +0 -19
  155. package/lib/cjs/scheduler/handlers/index.js +0 -62
  156. package/lib/cjs/scheduler/index.d.ts +0 -24
  157. package/lib/cjs/scheduler/index.js +0 -110
  158. package/lib/cjs/scheduler/models/history.d.ts +0 -10
  159. package/lib/cjs/scheduler/models/history.js +0 -50
  160. package/lib/cjs/server/constants/index.d.ts +0 -78
  161. package/lib/cjs/server/constants/index.js +0 -372
  162. package/lib/cjs/server/context/index.d.ts +0 -17
  163. package/lib/cjs/server/context/index.js +0 -33
  164. package/lib/cjs/server/controller/index.d.ts +0 -3
  165. package/lib/cjs/server/controller/index.js +0 -217
  166. package/lib/cjs/server/controllers/index.d.ts +0 -5
  167. package/lib/cjs/server/controllers/index.js +0 -72
  168. package/lib/cjs/server/core/index.d.ts +0 -16
  169. package/lib/cjs/server/core/index.js +0 -110
  170. package/lib/cjs/server/core/middleware/body-parser.d.ts +0 -2
  171. package/lib/cjs/server/core/middleware/body-parser.js +0 -27
  172. package/lib/cjs/server/core/middleware/cors.d.ts +0 -4
  173. package/lib/cjs/server/core/middleware/cors.js +0 -32
  174. package/lib/cjs/server/core/middleware/logger.d.ts +0 -2
  175. package/lib/cjs/server/core/middleware/logger.js +0 -15
  176. package/lib/cjs/server/decorators/controller.d.ts +0 -3
  177. package/lib/cjs/server/decorators/controller.js +0 -14
  178. package/lib/cjs/server/decorators/field.d.ts +0 -2
  179. package/lib/cjs/server/decorators/field.js +0 -36
  180. package/lib/cjs/server/decorators/handler.d.ts +0 -3
  181. package/lib/cjs/server/decorators/handler.js +0 -14
  182. package/lib/cjs/server/decorators/index.d.ts +0 -7
  183. package/lib/cjs/server/decorators/index.js +0 -26
  184. package/lib/cjs/server/decorators/is-public-method.d.ts +0 -3
  185. package/lib/cjs/server/decorators/is-public-method.js +0 -16
  186. package/lib/cjs/server/decorators/is-public.d.ts +0 -3
  187. package/lib/cjs/server/decorators/is-public.js +0 -14
  188. package/lib/cjs/server/decorators/method.d.ts +0 -3
  189. package/lib/cjs/server/decorators/method.js +0 -16
  190. package/lib/cjs/server/decorators/payload.d.ts +0 -3
  191. package/lib/cjs/server/decorators/payload.js +0 -15
  192. package/lib/cjs/server/handlers/index.d.ts +0 -5
  193. package/lib/cjs/server/handlers/index.js +0 -72
  194. package/lib/cjs/server/helpers/index.d.ts +0 -17
  195. package/lib/cjs/server/helpers/index.js +0 -39
  196. package/lib/cjs/server/index.d.ts +0 -12
  197. package/lib/cjs/server/index.js +0 -176
  198. package/lib/cjs/server/security/controller/auth.d.ts +0 -76
  199. package/lib/cjs/server/security/controller/auth.js +0 -346
  200. package/lib/cjs/server/security/index.d.ts +0 -2
  201. package/lib/cjs/server/security/index.js +0 -10
  202. package/lib/cjs/server/security/jwt/index.d.ts +0 -23
  203. package/lib/cjs/server/security/jwt/index.js +0 -108
  204. package/lib/cjs/server/security/middleware/autorization.d.ts +0 -3
  205. package/lib/cjs/server/security/middleware/autorization.js +0 -46
  206. package/lib/cjs/server/security/middleware/permission.d.ts +0 -3
  207. package/lib/cjs/server/security/middleware/permission.js +0 -138
  208. package/lib/cjs/server/security/models/crp.d.ts +0 -8
  209. package/lib/cjs/server/security/models/crp.js +0 -42
  210. package/lib/cjs/server/security/models/ke.d.ts +0 -7
  211. package/lib/cjs/server/security/models/ke.js +0 -38
  212. package/lib/cjs/server/security/models/rl.d.ts +0 -9
  213. package/lib/cjs/server/security/models/rl.js +0 -50
  214. package/lib/cjs/server/security/models/se.d.ts +0 -11
  215. package/lib/cjs/server/security/models/se.js +0 -54
  216. package/lib/cjs/server/security/models/usr.d.ts +0 -14
  217. package/lib/cjs/server/security/models/usr.js +0 -82
  218. package/lib/cjs/server/services/delete.d.ts +0 -13
  219. package/lib/cjs/server/services/delete.js +0 -49
  220. package/lib/cjs/server/services/get.d.ts +0 -4
  221. package/lib/cjs/server/services/get.js +0 -145
  222. package/lib/cjs/server/services/insert.d.ts +0 -13
  223. package/lib/cjs/server/services/insert.js +0 -74
  224. package/lib/cjs/server/services/update.d.ts +0 -13
  225. package/lib/cjs/server/services/update.js +0 -60
  226. package/lib/cjs/system/index.d.ts +0 -13
  227. package/lib/cjs/system/index.js +0 -237
@@ -1 +0,0 @@
1
- import{w as T,b as c,v as e}from"./index-CtPqstFl.js";import{s,B as o,P as x,l as u,h as k,C as M,d,i as v}from"./playground-Hl52p9f5.js";import{T as w,a as D,b as I,c as m,d as l,e as L}from"./TableRow-B9hAmlnV.js";import{a as S,L as B,b as O}from"./ListItemText-DgWZmgzc.js";import{u as W}from"./use-request-BZNkzlTr.js";import{u as E}from"./toast-CsAH5FIf.js";import{L as P}from"./List-juBjUmfP.js";import{D as R}from"./Divider-B_Wx9srO.js";import"./listItemTextClasses-EQFLPLzt.js";import"./dividerClasses-CIiqeEPO.js";const z=s(o)({display:"flex",height:"100%"}),A=s(o)(({theme:a})=>({height:"100%",width:"13rem",minWidth:"13rem",padding:"2rem 10px 0 0"})),F=s(o)({height:"100vh",width:"100%",padding:"2rem",overflowY:"auto"}),G=s(x)(({theme:a})=>({padding:"2rem",borderRadius:"15px",backgroundColor:a.palette.background.paper,width:"100%",maxWidth:"800px",margin:"0 auto"})),H=s(w)({marginTop:"1.5rem",borderRadius:"8px","& .MuiTableCell-head":{fontWeight:"bold",backgroundColor:u("#000",.05)}}),$=s(S)(({selected:a,theme:i})=>({...a&&{backgroundColor:`${u(i.palette.background.default,.1)} !important`,".MuiListItemText-root":{color:"white"}}}));function _(){return[{title:"Opposer - Database Models"}]}const ee=T(function(){const[i,b]=c.useState({controllers:{},models:{}}),[n,p]=c.useState(""),{showToast:g}=E(),[j,f]=W(async()=>{const t=await v.getAppMap();if(t.success&&t.data){b(t.data);const r=Object.keys(t.data.models)[0];r&&p(r)}else g(t.error||"Erro ao carregar mapa da aplicação","error");return null});c.useEffect(()=>{f()},[]);const h=n?i.models[n]:null,y=h?.model||{},C=h?.description||"Database Entity Definition";return e.jsxs(z,{children:[e.jsx(k,{sx:t=>({zIndex:t.zIndex.drawer+1}),open:j,children:e.jsx(M,{size:50})}),e.jsxs(A,{children:[e.jsx(d,{variant:"h6",sx:{px:2,mb:2,fontWeight:"bold"},children:"Entities"}),e.jsx(P,{children:Object.keys(i.models).map((t,r)=>e.jsx(B,{disablePadding:!0,disableGutters:!0,children:e.jsx($,{selected:n===t,onClick:()=>p(t),children:e.jsx(O,{slotProps:{primary:{noWrap:!0}},inset:!0,primary:t})})},r))})]}),e.jsx(F,{children:n?e.jsxs(G,{elevation:0,children:[e.jsxs(o,{mb:3,children:[e.jsx(d,{variant:"h4",color:"primary",gutterBottom:!0,children:n}),e.jsx(d,{variant:"body2",color:"textSecondary",children:C})]}),e.jsx(R,{}),e.jsx(H,{component:x,elevation:0,children:e.jsxs(D,{stickyHeader:!0,children:[e.jsx(I,{children:e.jsxs(m,{children:[e.jsx(l,{sx:{backgroundColor:"background.paper"},children:"Field Name"}),e.jsx(l,{align:"right",sx:{backgroundColor:"background.paper"},children:"Data Type"})]})}),e.jsx(L,{children:Object.entries(y).map(([t,r])=>e.jsxs(m,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[e.jsx(l,{component:"th",scope:"row",sx:{fontWeight:500},children:t}),e.jsx(l,{align:"right",children:e.jsx(o,{component:"span",sx:{px:1,py:.5,borderRadius:"4px",backgroundColor:"action.hover",fontFormat:"monospace",fontSize:"0.85rem"},children:r})})]},t))})]})})]}):e.jsx(o,{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",children:e.jsx(d,{variant:"h6",color:"textSecondary",children:"Select an entity to view its model"})})})]})});export{ee as default,_ as meta};
@@ -1,26 +0,0 @@
1
- function Ya(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 o=Object.getOwnPropertyDescriptor(n,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var ys=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kt={exports:{}},ot={};var Jr;function Va(){if(Jr)return ot;Jr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,o){var i=null;if(o!==void 0&&(i=""+o),a.key!==void 0&&(i=""+a.key),"key"in a){o={};for(var u in a)u!=="key"&&(o[u]=a[u])}else o=a;return a=o.ref,{$$typeof:e,type:n,key:i,ref:a!==void 0?a:null,props:o}}return ot.Fragment=t,ot.jsx=r,ot.jsxs=r,ot}var Gr;function Ja(){return Gr||(Gr=1,Kt.exports=Va()),Kt.exports}var vs=Ja(),qt={exports:{}},z={};var Xr;function Ga(){if(Xr)return z;Xr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),i=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),c=Symbol.for("react.activity"),p=Symbol.iterator;function g(m){return m===null||typeof m!="object"?null:(m=p&&m[p]||m["@@iterator"],typeof m=="function"?m:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,w={};function x(m,L,N){this.props=m,this.context=L,this.refs=w,this.updater=N||R}x.prototype.isReactComponent={},x.prototype.setState=function(m,L){if(typeof m!="object"&&typeof m!="function"&&m!=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,m,L,"setState")},x.prototype.forceUpdate=function(m){this.updater.enqueueForceUpdate(this,m,"forceUpdate")};function S(){}S.prototype=x.prototype;function _(m,L,N){this.props=m,this.context=L,this.refs=w,this.updater=N||R}var T=_.prototype=new S;T.constructor=_,b(T,x.prototype),T.isPureReactComponent=!0;var M=Array.isArray;function O(){}var k={H:null,A:null,T:null,S:null},v=Object.prototype.hasOwnProperty;function B(m,L,N){var I=N.ref;return{$$typeof:e,type:m,key:L,ref:I!==void 0?I:null,props:N}}function G(m,L){return B(m.type,L,m.props)}function re(m){return typeof m=="object"&&m!==null&&m.$$typeof===e}function X(m){var L={"=":"=0",":":"=2"};return"$"+m.replace(/[=:]/g,function(N){return L[N]})}var se=/\/+/g;function te(m,L){return typeof m=="object"&&m!==null&&m.key!=null?X(""+m.key):L.toString(36)}function J(m){switch(m.status){case"fulfilled":return m.value;case"rejected":throw m.reason;default:switch(typeof m.status=="string"?m.then(O,O):(m.status="pending",m.then(function(L){m.status==="pending"&&(m.status="fulfilled",m.value=L)},function(L){m.status==="pending"&&(m.status="rejected",m.reason=L)})),m.status){case"fulfilled":return m.value;case"rejected":throw m.reason}}throw m}function q(m,L,N,I,W){var Y=typeof m;(Y==="undefined"||Y==="boolean")&&(m=null);var Q=!1;if(m===null)Q=!0;else switch(Y){case"bigint":case"string":case"number":Q=!0;break;case"object":switch(m.$$typeof){case e:case t:Q=!0;break;case d:return Q=m._init,q(Q(m._payload),L,N,I,W)}}if(Q)return W=W(m),Q=I===""?"."+te(m,0):I,M(W)?(N="",Q!=null&&(N=Q.replace(se,"$&/")+"/"),q(W,L,N,"",function(Yt){return Yt})):W!=null&&(re(W)&&(W=G(W,N+(W.key==null||m&&m.key===W.key?"":(""+W.key).replace(se,"$&/")+"/")+Q)),L.push(W)),1;Q=0;var ge=I===""?".":I+":";if(M(m))for(var ce=0;ce<m.length;ce++)I=m[ce],Y=ge+te(I,ce),Q+=q(I,L,N,Y,W);else if(ce=g(m),typeof ce=="function")for(m=ce.call(m),ce=0;!(I=m.next()).done;)I=I.value,Y=ge+te(I,ce++),Q+=q(I,L,N,Y,W);else if(Y==="object"){if(typeof m.then=="function")return q(J(m),L,N,I,W);throw L=String(m),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(m).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return Q}function ue(m,L,N){if(m==null)return m;var I=[],W=0;return q(m,I,"","",function(Y){return L.call(N,Y,W++)}),I}function fe(m){if(m._status===-1){var L=m._result;L=L(),L.then(function(N){(m._status===0||m._status===-1)&&(m._status=1,m._result=N)},function(N){(m._status===0||m._status===-1)&&(m._status=2,m._result=N)}),m._status===-1&&(m._status=0,m._result=L)}if(m._status===1)return m._result.default;throw m._result}var K=typeof reportError=="function"?reportError:function(m){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof m=="object"&&m!==null&&typeof m.message=="string"?String(m.message):String(m),error:m});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",m);return}console.error(m)},ve={map:ue,forEach:function(m,L,N){ue(m,function(){L.apply(this,arguments)},N)},count:function(m){var L=0;return ue(m,function(){L++}),L},toArray:function(m){return ue(m,function(L){return L})||[]},only:function(m){if(!re(m))throw Error("React.Children.only expected to receive a single React element child.");return m}};return z.Activity=c,z.Children=ve,z.Component=x,z.Fragment=r,z.Profiler=a,z.PureComponent=_,z.StrictMode=n,z.Suspense=s,z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,z.__COMPILER_RUNTIME={__proto__:null,c:function(m){return k.H.useMemoCache(m)}},z.cache=function(m){return function(){return m.apply(null,arguments)}},z.cacheSignal=function(){return null},z.cloneElement=function(m,L,N){if(m==null)throw Error("The argument must be a React element, but you passed "+m+".");var I=b({},m.props),W=m.key;if(L!=null)for(Y in L.key!==void 0&&(W=""+L.key),L)!v.call(L,Y)||Y==="key"||Y==="__self"||Y==="__source"||Y==="ref"&&L.ref===void 0||(I[Y]=L[Y]);var Y=arguments.length-2;if(Y===1)I.children=N;else if(1<Y){for(var Q=Array(Y),ge=0;ge<Y;ge++)Q[ge]=arguments[ge+2];I.children=Q}return B(m.type,W,I)},z.createContext=function(m){return m={$$typeof:i,_currentValue:m,_currentValue2:m,_threadCount:0,Provider:null,Consumer:null},m.Provider=m,m.Consumer={$$typeof:o,_context:m},m},z.createElement=function(m,L,N){var I,W={},Y=null;if(L!=null)for(I in L.key!==void 0&&(Y=""+L.key),L)v.call(L,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(W[I]=L[I]);var Q=arguments.length-2;if(Q===1)W.children=N;else if(1<Q){for(var ge=Array(Q),ce=0;ce<Q;ce++)ge[ce]=arguments[ce+2];W.children=ge}if(m&&m.defaultProps)for(I in Q=m.defaultProps,Q)W[I]===void 0&&(W[I]=Q[I]);return B(m,Y,W)},z.createRef=function(){return{current:null}},z.forwardRef=function(m){return{$$typeof:u,render:m}},z.isValidElement=re,z.lazy=function(m){return{$$typeof:d,_payload:{_status:-1,_result:m},_init:fe}},z.memo=function(m,L){return{$$typeof:l,type:m,compare:L===void 0?null:L}},z.startTransition=function(m){var L=k.T,N={};k.T=N;try{var I=m(),W=k.S;W!==null&&W(N,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(O,K)}catch(Y){K(Y)}finally{L!==null&&N.types!==null&&(L.types=N.types),k.T=L}},z.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},z.use=function(m){return k.H.use(m)},z.useActionState=function(m,L,N){return k.H.useActionState(m,L,N)},z.useCallback=function(m,L){return k.H.useCallback(m,L)},z.useContext=function(m){return k.H.useContext(m)},z.useDebugValue=function(){},z.useDeferredValue=function(m,L){return k.H.useDeferredValue(m,L)},z.useEffect=function(m,L){return k.H.useEffect(m,L)},z.useEffectEvent=function(m){return k.H.useEffectEvent(m)},z.useId=function(){return k.H.useId()},z.useImperativeHandle=function(m,L,N){return k.H.useImperativeHandle(m,L,N)},z.useInsertionEffect=function(m,L){return k.H.useInsertionEffect(m,L)},z.useLayoutEffect=function(m,L){return k.H.useLayoutEffect(m,L)},z.useMemo=function(m,L){return k.H.useMemo(m,L)},z.useOptimistic=function(m,L){return k.H.useOptimistic(m,L)},z.useReducer=function(m,L,N){return k.H.useReducer(m,L,N)},z.useRef=function(m){return k.H.useRef(m)},z.useState=function(m){return k.H.useState(m)},z.useSyncExternalStore=function(m,L,N){return k.H.useSyncExternalStore(m,L,N)},z.useTransition=function(){return k.H.useTransition()},z.version="19.2.4",z}var Kr;function On(){return Kr||(Kr=1,qt.exports=Ga()),qt.exports}var h=On();const Xa=Dn(h),Ka=Ya({__proto__:null,default:Xa},[h]);var Qt={exports:{}},pe={};var qr;function qa(){if(qr)return pe;qr=1;var e=On();function t(s){var l="https://react.dev/errors/"+s;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for("react.portal");function o(s,l,d){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:c==null?null:""+c,children:s,containerInfo:l,implementation:d}}var i=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(s,l){if(s==="font")return"";if(typeof l=="string")return l==="use-credentials"?l:""}return pe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,pe.createPortal=function(s,l){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)throw Error(t(299));return o(s,l,null,d)},pe.flushSync=function(s){var l=i.T,d=n.p;try{if(i.T=null,n.p=2,s)return s()}finally{i.T=l,n.p=d,n.d.f()}},pe.preconnect=function(s,l){typeof s=="string"&&(l?(l=l.crossOrigin,l=typeof l=="string"?l==="use-credentials"?l:"":void 0):l=null,n.d.C(s,l))},pe.prefetchDNS=function(s){typeof s=="string"&&n.d.D(s)},pe.preinit=function(s,l){if(typeof s=="string"&&l&&typeof l.as=="string"){var d=l.as,c=u(d,l.crossOrigin),p=typeof l.integrity=="string"?l.integrity:void 0,g=typeof l.fetchPriority=="string"?l.fetchPriority:void 0;d==="style"?n.d.S(s,typeof l.precedence=="string"?l.precedence:void 0,{crossOrigin:c,integrity:p,fetchPriority:g}):d==="script"&&n.d.X(s,{crossOrigin:c,integrity:p,fetchPriority:g,nonce:typeof l.nonce=="string"?l.nonce:void 0})}},pe.preinitModule=function(s,l){if(typeof s=="string")if(typeof l=="object"&&l!==null){if(l.as==null||l.as==="script"){var d=u(l.as,l.crossOrigin);n.d.M(s,{crossOrigin:d,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0})}}else l==null&&n.d.M(s)},pe.preload=function(s,l){if(typeof s=="string"&&typeof l=="object"&&l!==null&&typeof l.as=="string"){var d=l.as,c=u(d,l.crossOrigin);n.d.L(s,d,{crossOrigin:c,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0,type:typeof l.type=="string"?l.type:void 0,fetchPriority:typeof l.fetchPriority=="string"?l.fetchPriority:void 0,referrerPolicy:typeof l.referrerPolicy=="string"?l.referrerPolicy:void 0,imageSrcSet:typeof l.imageSrcSet=="string"?l.imageSrcSet:void 0,imageSizes:typeof l.imageSizes=="string"?l.imageSizes:void 0,media:typeof l.media=="string"?l.media:void 0})}},pe.preloadModule=function(s,l){if(typeof s=="string")if(l){var d=u(l.as,l.crossOrigin);n.d.m(s,{as:typeof l.as=="string"&&l.as!=="script"?l.as:void 0,crossOrigin:d,integrity:typeof l.integrity=="string"?l.integrity:void 0})}else n.d.m(s)},pe.requestFormReset=function(s){n.d.r(s)},pe.unstable_batchedUpdates=function(s,l){return s(l)},pe.useFormState=function(s,l,d){return i.H.useFormState(s,l,d)},pe.useFormStatus=function(){return i.H.useHostTransitionStatus()},pe.version="19.2.4",pe}var Qr;function Qa(){if(Qr)return Qt.exports;Qr=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Qt.exports=qa(),Qt.exports}var kn=e=>{throw TypeError(e)},Za=(e,t,r)=>t.has(e)||kn("Cannot "+r),Zt=(e,t,r)=>(Za(e,t,"read from private field"),r?r.call(e):t.get(e)),eo=(e,t,r)=>t.has(e)?kn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Zr="popstate";function en(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function gs(e={}){function t(n,a){let o=a.state?.masked,{pathname:i,search:u,hash:s}=o||n.location;return ft("",{pathname:i,search:u,hash:s},a.state&&a.state.usr||null,a.state&&a.state.key||"default",o?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function r(n,a){return typeof a=="string"?a:Pe(a)}return ro(t,r,null,e)}function V(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function le(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function to(){return Math.random().toString(36).substring(2,10)}function tn(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ft(e,t,r=null,n,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ie(t):t,state:r,key:t&&t.key||n||to(),unstable_mask:a}}function Pe({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Ie(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function ro(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,u="POP",s=null,l=d();l==null&&(l=0,i.replaceState({...i.state,idx:l},""));function d(){return(i.state||{idx:null}).idx}function c(){u="POP";let w=d(),x=w==null?null:w-l;l=w,s&&s({action:u,location:b.location,delta:x})}function p(w,x){u="PUSH";let S=en(w)?w:ft(b.location,w,x);l=d()+1;let _=tn(S,l),T=b.createHref(S.unstable_mask||S);try{i.pushState(_,"",T)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;a.location.assign(T)}o&&s&&s({action:u,location:b.location,delta:1})}function g(w,x){u="REPLACE";let S=en(w)?w:ft(b.location,w,x);l=d();let _=tn(S,l),T=b.createHref(S.unstable_mask||S);i.replaceState(_,"",T),o&&s&&s({action:u,location:b.location,delta:0})}function R(w){return An(w)}let b={get action(){return u},get location(){return e(a,i)},listen(w){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(Zr,c),s=w,()=>{a.removeEventListener(Zr,c),s=null}},createHref(w){return t(a,w)},createURL:R,encodeLocation(w){let x=R(w);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:p,replace:g,go(w){return i.go(w)}};return b}function An(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),V(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:Pe(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}var ut,rn=class{constructor(e){if(eo(this,ut,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(Zt(this,ut).has(e))return Zt(this,ut).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Zt(this,ut).set(e,t)}};ut=new WeakMap;var no=new Set(["lazy","caseSensitive","path","id","index","children"]);function ao(e){return no.has(e)}var oo=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function io(e){return oo.has(e)}function lo(e){return e.index===!0}function ht(e,t,r=[],n={},a=!1){return e.map((o,i)=>{let u=[...r,String(i)],s=typeof o.id=="string"?o.id:u.join("-");if(V(o.index!==!0||!o.children,"Cannot specify children on an index route"),V(a||!n[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),lo(o)){let l={...o,id:s};return n[s]=nn(l,t(l)),l}else{let l={...o,id:s,children:void 0};return n[s]=nn(l,t(l)),o.children&&(l.children=ht(o.children,t,u,n,a)),l}})}function nn(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Ne(e,t,r="/"){return ct(e,t,r,!1)}function ct(e,t,r,n){let a=typeof t=="string"?Ie(t):t,o=Se(a.pathname||"/",r);if(o==null)return null;let i=In(e);so(i);let u=null;for(let s=0;u==null&&s<i.length;++s){let l=wo(o);u=go(i[s],l,n)}return u}function Nn(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function In(e,t=[],r=[],n="",a=!1){let o=(i,u,s=a,l)=>{let d={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:u,route:i};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(n)&&s)return;V(d.relativePath.startsWith(n),`Absolute route path "${d.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(n.length)}let c=xe([n,d.relativePath]),p=r.concat(d);i.children&&i.children.length>0&&(V(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),In(i.children,t,p,c,s)),!(i.path==null&&!i.index)&&t.push({path:c,score:yo(c,i.index),routesMeta:p})};return e.forEach((i,u)=>{if(i.path===""||!i.path?.includes("?"))o(i,u);else for(let s of $n(i.path))o(i,u,!0,s)}),t}function $n(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let i=$n(n.join("/")),u=[];return u.push(...i.map(s=>s===""?o:[o,s].join("/"))),a&&u.push(...i),u.map(s=>e.startsWith("/")&&s===""?"/":s)}function so(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:vo(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var uo=/^:[\w-]+$/,co=3,fo=2,ho=1,mo=10,po=-2,an=e=>e==="*";function yo(e,t){let r=e.split("/"),n=r.length;return r.some(an)&&(n+=po),t&&(n+=fo),r.filter(a=>!an(a)).reduce((a,o)=>a+(uo.test(o)?co:o===""?ho:mo),n)}function vo(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 go(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",i=[];for(let u=0;u<n.length;++u){let s=n[u],l=u===n.length-1,d=o==="/"?t:t.slice(o.length)||"/",c=It({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},d),p=s.route;if(!c&&l&&r&&!n[n.length-1].route.index&&(c=It({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},d)),!c)return null;Object.assign(a,c.params),i.push({params:a,pathname:xe([o,c.pathname]),pathnameBase:bo(xe([o,c.pathnameBase])),route:p}),c.pathnameBase!=="/"&&(o=xe([o,c.pathnameBase]))}return i}function It(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Fn(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:n.reduce((l,{paramName:d,isOptional:c},p)=>{if(d==="*"){let R=u[p]||"";i=o.slice(0,o.length-R.length).replace(/(.)\/+$/,"$1")}const g=u[p];return c&&!g?l[d]=void 0:l[d]=(g||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:i,pattern:e}}function Fn(e,t=!1,r=!0){le(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,(i,u,s,l,d)=>{if(n.push({paramName:u,isOptional:s!=null}),s){let c=d.charAt(l+i.length);return c&&c!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function wo(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return le(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Se(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 Eo({basename:e,pathname:t}){return t==="/"?e:xe([e,t])}var jn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wr=e=>jn.test(e);function Ro(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Ie(e):e,o;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?o=on(r.substring(1),"/"):o=on(r,t)):o=t,{pathname:o,search:So(n),hash:Lo(a)}}function on(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 er(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 Un(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Er(e){let t=Un(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function jt(e,t,r,n=!1){let a;typeof e=="string"?a=Ie(e):(a={...e},V(!a.pathname||!a.pathname.includes("?"),er("?","pathname","search",a)),V(!a.pathname||!a.pathname.includes("#"),er("#","pathname","hash",a)),V(!a.search||!a.search.includes("#"),er("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,u;if(i==null)u=r;else{let c=t.length-1;if(!n&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),c-=1;a.pathname=p.join("/")}u=c>=0?t[c]:"/"}let s=Ro(a,u),l=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(l||d)&&(s.pathname+="/"),s}var xe=e=>e.join("/").replace(/\/\/+/g,"/"),bo=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),So=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Lo=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Co=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function xo(e,t){return new Co(e,typeof t=="number"?{status:t}:t)}var Po=(e,t=302)=>{let r=t;typeof r=="number"?r={status:r}:typeof r.status>"u"&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,{...r,headers:n})},Ue=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Je(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function pt(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Hn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function zn(e,t){let r=e;if(typeof r!="string"||!jn.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(Hn)try{let o=new URL(window.location.href),i=r.startsWith("//")?new URL(o.protocol+r):new URL(r),u=Se(i.pathname,t);i.origin===o.origin&&u!=null?r=u+i.search+i.hash:a=!0}catch{le(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:a,to:r}}var je=Symbol("Uninstrumented");function _o(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(a=>a({id:t.id,index:t.index,path:t.path,instrument(o){let i=Object.keys(r);for(let u of i)o[u]&&r[u].push(o[u])}}));let n={};if(typeof t.lazy=="function"&&r.lazy.length>0){let a=Qe(r.lazy,t.lazy,()=>{});a&&(n.lazy=a)}if(typeof t.lazy=="object"){let a=t.lazy;["middleware","loader","action"].forEach(o=>{let i=a[o],u=r[`lazy.${o}`];if(typeof i=="function"&&u.length>0){let s=Qe(u,i,()=>{});s&&(n.lazy=Object.assign(n.lazy||{},{[o]:s}))}})}return["loader","action"].forEach(a=>{let o=t[a];if(typeof o=="function"&&r[a].length>0){let i=o[je]??o,u=Qe(r[a],i,(...s)=>ln(s[0]));u&&(a==="loader"&&i.hydrate===!0&&(u.hydrate=!0),u[je]=i,n[a]=u)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(n.middleware=t.middleware.map(a=>{let o=a[je]??a,i=Qe(r.middleware,o,(...u)=>ln(u[0]));return i?(i[je]=o,i):a})),n}function To(e,t){let r={navigate:[],fetch:[]};if(t.forEach(n=>n({instrument(a){let o=Object.keys(a);for(let i of o)a[i]&&r[i].push(a[i])}})),r.navigate.length>0){let n=e.navigate[je]??e.navigate,a=Qe(r.navigate,n,(...o)=>{let[i,u]=o;return{to:typeof i=="number"||typeof i=="string"?i:i?Pe(i):".",...sn(e,u??{})}});a&&(a[je]=n,e.navigate=a)}if(r.fetch.length>0){let n=e.fetch[je]??e.fetch,a=Qe(r.fetch,n,(...o)=>{let[i,,u,s]=o;return{href:u??".",fetcherKey:i,...sn(e,s??{})}});a&&(a[je]=n,e.fetch=a)}return e}function Qe(e,t,r){return e.length===0?null:async(...n)=>{let a=await Bn(e,r(...n),()=>t(...n),e.length-1);if(a.type==="error")throw a.value;return a.value}}async function Bn(e,t,r,n){let a=e[n],o;if(a){let i,u=async()=>(i?console.error("You cannot call instrumented handlers more than once"):i=Bn(e,t,r,n-1),o=await i,V(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await a(u,t)}catch(s){console.error("An instrumentation function threw an error:",s)}i||await u(),await i}else try{o={type:"success",value:await r()}}catch(i){o={type:"error",value:i}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function ln(e){let{request:t,context:r,params:n,unstable_pattern:a}=e;return{request:Mo(t),params:{...n},unstable_pattern:a,context:Do(r)}}function sn(e,t){return{currentUrl:Pe(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function Mo(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Do(e){if(ko(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var Oo=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ko(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===Oo}var Wn=["POST","PUT","PATCH","DELETE"],Ao=new Set(Wn),No=["GET",...Wn],Io=new Set(No),Yn=new Set([301,302,303,307,308]),$o=new Set([307,308]),tr={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Fo={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},it={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},jo=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Vn="remix-router-transitions",Jn=Symbol("ResetLoaderData");function ws(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";V(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n=e.hydrationRouteProperties||[],a=e.mapRouteProperties||jo,o=a;if(e.unstable_instrumentations){let f=e.unstable_instrumentations;o=y=>({...a(y),..._o(f.map(E=>E.route).filter(Boolean),y)})}let i={},u=ht(e.routes,o,void 0,i),s,l=e.basename||"/";l.startsWith("/")||(l=`/${l}`);let d=e.dataStrategy||Wo,c={...e.future},p=null,g=new Set,R=null,b=null,w=null,x=e.hydrationData!=null,S=Ne(u,e.history.location,l),_=!1,T=null,M,O;if(S==null&&!e.patchRoutesOnNavigation){let f=Ce(404,{pathname:e.history.location.pathname}),{matches:y,route:E}=xt(u);M=!0,O=!M,S=y,T={[E.id]:f}}else if(S&&!e.hydrationData&&Rt(S,u,e.history.location.pathname).active&&(S=null),S)if(S.some(f=>f.route.lazy))M=!1,O=!M;else if(!S.some(f=>Rr(f.route)))M=!0,O=!M;else{let f=e.hydrationData?e.hydrationData.loaderData:null,y=e.hydrationData?e.hydrationData.errors:null,E=S;if(y){let C=S.findIndex(P=>y[P.route.id]!==void 0);E=E.slice(0,C+1)}O=!1,M=E.every(C=>{let P=Gn(C.route,f,y);return O=O||P.renderFallback,!P.shouldLoad})}else{M=!1,O=!M,S=[];let f=Rt(null,u,e.history.location.pathname);f.active&&f.matches&&(_=!0,S=f.matches)}let k,v={historyAction:e.history.action,location:e.history.location,matches:S,initialized:M,renderFallback:O,navigation:tr,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||T,fetchers:new Map,blockers:new Map},B="POP",G=null,re=!1,X,se=!1,te=new Map,J=null,q=!1,ue=!1,fe=new Set,K=new Map,ve=0,m=-1,L=new Map,N=new Set,I=new Map,W=new Map,Y=new Set,Q=new Map,ge,ce=null;function Yt(){if(p=e.history.listen(({action:f,location:y,delta:E})=>{if(ge){ge(),ge=void 0;return}le(Q.size===0||E!=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 C=zr({currentLocation:v.location,nextLocation:y,historyAction:f});if(C&&E!=null){let P=new Promise($=>{ge=$});e.history.go(E*-1),Et(C,{state:"blocked",location:y,proceed(){Et(C,{state:"proceeding",proceed:void 0,reset:void 0,location:y}),P.then(()=>e.history.go(E))},reset(){let $=new Map(v.blockers);$.set(C,it),he({blockers:$})}}),G?.resolve(),G=null;return}return He(f,y)}),r){si(t,te);let f=()=>ui(t,te);t.addEventListener("pagehide",f),J=()=>t.removeEventListener("pagehide",f)}return v.initialized||He("POP",v.location,{initialHydration:!0}),k}function _a(){p&&p(),J&&J(),g.clear(),X&&X.abort(),v.fetchers.forEach((f,y)=>Jt(y)),v.blockers.forEach((f,y)=>Hr(y))}function Ta(f){return g.add(f),()=>g.delete(f)}function he(f,y={}){f.matches&&(f.matches=f.matches.map(P=>{let $=i[P.route.id],D=P.route;return D.element!==$.element||D.errorElement!==$.errorElement||D.hydrateFallbackElement!==$.hydrateFallbackElement?{...P,route:$}:P})),v={...v,...f};let E=[],C=[];v.fetchers.forEach((P,$)=>{P.state==="idle"&&(Y.has($)?E.push($):C.push($))}),Y.forEach(P=>{!v.fetchers.has(P)&&!K.has(P)&&E.push(P)}),[...g].forEach(P=>P(v,{deletedFetchers:E,newErrors:f.errors??null,viewTransitionOpts:y.viewTransitionOpts,flushSync:y.flushSync===!0})),E.forEach(P=>Jt(P)),C.forEach(P=>v.fetchers.delete(P))}function Xe(f,y,{flushSync:E}={}){let C=v.actionData!=null&&v.navigation.formMethod!=null&&ye(v.navigation.formMethod)&&v.navigation.state==="loading"&&f.state?._isRedirect!==!0,P;y.actionData?Object.keys(y.actionData).length>0?P=y.actionData:P=null:C?P=v.actionData:P=null;let $=y.loaderData?gn(v.loaderData,y.loaderData,y.matches||[],y.errors):v.loaderData,D=v.blockers;D.size>0&&(D=new Map(D),D.forEach((H,F)=>D.set(F,it)));let j=q?!1:Wr(f,y.matches||v.matches),A=re===!0||v.navigation.formMethod!=null&&ye(v.navigation.formMethod)&&f.state?._isRedirect!==!0;s&&(u=s,s=void 0),q||B==="POP"||(B==="PUSH"?e.history.push(f,f.state):B==="REPLACE"&&e.history.replace(f,f.state));let U;if(B==="POP"){let H=te.get(v.location.pathname);H&&H.has(f.pathname)?U={currentLocation:v.location,nextLocation:f}:te.has(f.pathname)&&(U={currentLocation:f,nextLocation:v.location})}else if(se){let H=te.get(v.location.pathname);H?H.add(f.pathname):(H=new Set([f.pathname]),te.set(v.location.pathname,H)),U={currentLocation:v.location,nextLocation:f}}he({...y,actionData:P,loaderData:$,historyAction:B,location:f,initialized:!0,renderFallback:!1,navigation:tr,revalidation:"idle",restoreScrollPosition:j,preventScrollReset:A,blockers:D},{viewTransitionOpts:U,flushSync:E===!0}),B="POP",re=!1,se=!1,q=!1,ue=!1,G?.resolve(),G=null,ce?.resolve(),ce=null}async function Ar(f,y){if(G?.resolve(),G=null,typeof f=="number"){G||(G=Rn());let oe=G.promise;return e.history.go(f),oe}let E=sr(v.location,v.matches,l,f,y?.fromRouteId,y?.relative),{path:C,submission:P,error:$}=un(!1,E,y),D;y?.unstable_mask&&(D={pathname:"",search:"",hash:"",...typeof y.unstable_mask=="string"?Ie(y.unstable_mask):{...v.location.unstable_mask,...y.unstable_mask}});let j=v.location,A=ft(j,C,y&&y.state,void 0,D);A={...A,...e.history.encodeLocation(A)};let U=y&&y.replace!=null?y.replace:void 0,H="PUSH";U===!0?H="REPLACE":U===!1||P!=null&&ye(P.formMethod)&&P.formAction===v.location.pathname+v.location.search&&(H="REPLACE");let F=y&&"preventScrollReset"in y?y.preventScrollReset===!0:void 0,ne=(y&&y.flushSync)===!0,ee=zr({currentLocation:j,nextLocation:A,historyAction:H});if(ee){Et(ee,{state:"blocked",location:A,proceed(){Et(ee,{state:"proceeding",proceed:void 0,reset:void 0,location:A}),Ar(f,y)},reset(){let oe=new Map(v.blockers);oe.set(ee,it),he({blockers:oe})}});return}await He(H,A,{submission:P,pendingError:$,preventScrollReset:F,replace:y&&y.replace,enableViewTransition:y&&y.viewTransition,flushSync:ne,callSiteDefaultShouldRevalidate:y&&y.unstable_defaultShouldRevalidate})}function Ma(){ce||(ce=Rn()),Vt(),he({revalidation:"loading"});let f=ce.promise;return v.navigation.state==="submitting"?f:v.navigation.state==="idle"?(He(v.historyAction,v.location,{startUninterruptedRevalidation:!0}),f):(He(B||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation,enableViewTransition:se===!0}),f)}async function He(f,y,E){X&&X.abort(),X=null,B=f,q=(E&&E.startUninterruptedRevalidation)===!0,Ha(v.location,v.matches),re=(E&&E.preventScrollReset)===!0,se=(E&&E.enableViewTransition)===!0;let C=s||u,P=E&&E.overrideNavigation,$=E?.initialHydration&&v.matches&&v.matches.length>0&&!_?v.matches:Ne(C,y,l),D=(E&&E.flushSync)===!0;if($&&v.initialized&&!ue&&Qo(v.location,y)&&!(E&&E.submission&&ye(E.submission.formMethod))){Xe(y,{matches:$},{flushSync:D});return}let j=Rt($,C,y.pathname);if(j.active&&j.matches&&($=j.matches),!$){let{error:de,notFoundMatches:we,route:ae}=Gt(y.pathname);Xe(y,{matches:we,loaderData:{},errors:{[ae.id]:de}},{flushSync:D});return}X=new AbortController;let A=qe(e.history,y,X.signal,E&&E.submission),U=e.getContext?await e.getContext():new rn,H;if(E&&E.pendingError)H=[Fe($).route.id,{type:"error",error:E.pendingError}];else if(E&&E.submission&&ye(E.submission.formMethod)){let de=await Da(A,y,E.submission,$,U,j.active,E&&E.initialHydration===!0,{replace:E.replace,flushSync:D});if(de.shortCircuited)return;if(de.pendingActionResult){let[we,ae]=de.pendingActionResult;if(be(ae)&&Je(ae.error)&&ae.error.status===404){X=null,Xe(y,{matches:de.matches,loaderData:{},errors:{[we]:ae.error}});return}}$=de.matches||$,H=de.pendingActionResult,P=rr(y,E.submission),D=!1,j.active=!1,A=qe(e.history,A.url,A.signal)}let{shortCircuited:F,matches:ne,loaderData:ee,errors:oe}=await Oa(A,y,$,U,j.active,P,E&&E.submission,E&&E.fetcherSubmission,E&&E.replace,E&&E.initialHydration===!0,D,H,E&&E.callSiteDefaultShouldRevalidate);F||(X=null,Xe(y,{matches:ne||$,...wn(H),loaderData:ee,errors:oe}))}async function Da(f,y,E,C,P,$,D,j={}){Vt();let A=ii(y,E);if(he({navigation:A},{flushSync:j.flushSync===!0}),$){let F=await bt(C,y.pathname,f.signal);if(F.type==="aborted")return{shortCircuited:!0};if(F.type==="error"){if(F.partialMatches.length===0){let{matches:ee,route:oe}=xt(u);return{matches:ee,pendingActionResult:[oe.id,{type:"error",error:F.error}]}}let ne=Fe(F.partialMatches).route.id;return{matches:F.partialMatches,pendingActionResult:[ne,{type:"error",error:F.error}]}}else if(F.matches)C=F.matches;else{let{notFoundMatches:ne,error:ee,route:oe}=Gt(y.pathname);return{matches:ne,pendingActionResult:[oe.id,{type:"error",error:ee}]}}}let U,H=Ot(C,y);if(!H.route.action&&!H.route.lazy)U={type:"error",error:Ce(405,{method:f.method,pathname:y.pathname,routeId:H.route.id})};else{let F=Ze(o,i,f,C,H,D?[]:n,P),ne=await rt(f,F,P,null);if(U=ne[H.route.id],!U){for(let ee of C)if(ne[ee.route.id]){U=ne[ee.route.id];break}}if(f.signal.aborted)return{shortCircuited:!0}}if(Ve(U)){let F;return j&&j.replace!=null?F=j.replace:F=pn(U.response.headers.get("Location"),new URL(f.url),l,e.history)===v.location.pathname+v.location.search,await ze(f,U,!0,{submission:E,replace:F}),{shortCircuited:!0}}if(be(U)){let F=Fe(C,H.route.id);return(j&&j.replace)!==!0&&(B="PUSH"),{matches:C,pendingActionResult:[F.route.id,U,H.route.id]}}return{matches:C,pendingActionResult:[H.route.id,U]}}async function Oa(f,y,E,C,P,$,D,j,A,U,H,F,ne){let ee=$||rr(y,D),oe=D||j||En(ee),de=!q&&!U;if(P){if(de){let me=Nr(F);he({navigation:ee,...me!==void 0?{actionData:me}:{}},{flushSync:H})}let Z=await bt(E,y.pathname,f.signal);if(Z.type==="aborted")return{shortCircuited:!0};if(Z.type==="error"){if(Z.partialMatches.length===0){let{matches:Ke,route:Ye}=xt(u);return{matches:Ke,loaderData:{},errors:{[Ye.id]:Z.error}}}let me=Fe(Z.partialMatches).route.id;return{matches:Z.partialMatches,loaderData:{},errors:{[me]:Z.error}}}else if(Z.matches)E=Z.matches;else{let{error:me,notFoundMatches:Ke,route:Ye}=Gt(y.pathname);return{matches:Ke,loaderData:{},errors:{[Ye.id]:me}}}}let we=s||u,{dsMatches:ae,revalidatingFetchers:Le}=cn(f,C,o,i,e.history,v,E,oe,y,U?[]:n,U===!0,ue,fe,Y,I,N,we,l,e.patchRoutesOnNavigation!=null,F,ne);if(m=++ve,!e.dataStrategy&&!ae.some(Z=>Z.shouldLoad)&&!ae.some(Z=>Z.route.middleware&&Z.route.middleware.length>0)&&Le.length===0){let Z=jr();return Xe(y,{matches:E,loaderData:{},errors:F&&be(F[1])?{[F[0]]:F[1].error}:null,...wn(F),...Z?{fetchers:new Map(v.fetchers)}:{}},{flushSync:H}),{shortCircuited:!0}}if(de){let Z={};if(!P){Z.navigation=ee;let me=Nr(F);me!==void 0&&(Z.actionData=me)}Le.length>0&&(Z.fetchers=ka(Le)),he(Z,{flushSync:H})}Le.forEach(Z=>{ke(Z.key),Z.controller&&K.set(Z.key,Z.controller)});let Be=()=>Le.forEach(Z=>ke(Z.key));X&&X.signal.addEventListener("abort",Be);let{loaderResults:nt,fetcherResults:$e}=await Ir(ae,Le,f,C);if(f.signal.aborted)return{shortCircuited:!0};X&&X.signal.removeEventListener("abort",Be),Le.forEach(Z=>K.delete(Z.key));let Me=Pt(nt);if(Me)return await ze(f,Me.result,!0,{replace:A}),{shortCircuited:!0};if(Me=Pt($e),Me)return N.add(Me.key),await ze(f,Me.result,!0,{replace:A}),{shortCircuited:!0};let{loaderData:Xt,errors:at}=vn(v,E,nt,F,Le,$e);U&&v.errors&&(at={...v.errors,...at});let We=jr(),St=Ur(m),Lt=We||St||Le.length>0;return{matches:E,loaderData:Xt,errors:at,...Lt?{fetchers:new Map(v.fetchers)}:{}}}function Nr(f){if(f&&!be(f[1]))return{[f[0]]:f[1].data};if(v.actionData)return Object.keys(v.actionData).length===0?null:v.actionData}function ka(f){return f.forEach(y=>{let E=v.fetchers.get(y.key),C=lt(void 0,E?E.data:void 0);v.fetchers.set(y.key,C)}),new Map(v.fetchers)}async function Aa(f,y,E,C){ke(f);let P=(C&&C.flushSync)===!0,$=s||u,D=sr(v.location,v.matches,l,E,y,C?.relative),j=Ne($,D,l),A=Rt(j,$,D);if(A.active&&A.matches&&(j=A.matches),!j){Oe(f,y,Ce(404,{pathname:D}),{flushSync:P});return}let{path:U,submission:H,error:F}=un(!0,D,C);if(F){Oe(f,y,F,{flushSync:P});return}let ne=e.getContext?await e.getContext():new rn,ee=(C&&C.preventScrollReset)===!0;if(H&&ye(H.formMethod)){await Na(f,y,U,j,ne,A.active,P,ee,H,C&&C.unstable_defaultShouldRevalidate);return}I.set(f,{routeId:y,path:U}),await Ia(f,y,U,j,ne,A.active,P,ee,H)}async function Na(f,y,E,C,P,$,D,j,A,U){Vt(),I.delete(f);let H=v.fetchers.get(f);De(f,li(A,H),{flushSync:D});let F=new AbortController,ne=qe(e.history,E,F.signal,A);if($){let ie=await bt(C,new URL(ne.url).pathname,ne.signal,f);if(ie.type==="aborted")return;if(ie.type==="error"){Oe(f,y,ie.error,{flushSync:D});return}else if(ie.matches)C=ie.matches;else{Oe(f,y,Ce(404,{pathname:E}),{flushSync:D});return}}let ee=Ot(C,E);if(!ee.route.action&&!ee.route.lazy){let ie=Ce(405,{method:A.formMethod,pathname:E,routeId:y});Oe(f,y,ie,{flushSync:D});return}K.set(f,F);let oe=ve,de=Ze(o,i,ne,C,ee,n,P),we=await rt(ne,de,P,f),ae=we[ee.route.id];if(!ae){for(let ie of de)if(we[ie.route.id]){ae=we[ie.route.id];break}}if(ne.signal.aborted){K.get(f)===F&&K.delete(f);return}if(Y.has(f)){if(Ve(ae)||be(ae)){De(f,Ae(void 0));return}}else{if(Ve(ae))if(K.delete(f),m>oe){De(f,Ae(void 0));return}else return N.add(f),De(f,lt(A)),ze(ne,ae,!1,{fetcherSubmission:A,preventScrollReset:j});if(be(ae)){Oe(f,y,ae.error);return}}let Le=v.navigation.location||v.location,Be=qe(e.history,Le,F.signal),nt=s||u,$e=v.navigation.state!=="idle"?Ne(nt,v.navigation.location,l):v.matches;V($e,"Didn't find any matches after fetcher action");let Me=++ve;L.set(f,Me);let Xt=lt(A,ae.data);v.fetchers.set(f,Xt);let{dsMatches:at,revalidatingFetchers:We}=cn(Be,P,o,i,e.history,v,$e,A,Le,n,!1,ue,fe,Y,I,N,nt,l,e.patchRoutesOnNavigation!=null,[ee.route.id,ae],U);We.filter(ie=>ie.key!==f).forEach(ie=>{let Ct=ie.key,Vr=v.fetchers.get(Ct),Wa=lt(void 0,Vr?Vr.data:void 0);v.fetchers.set(Ct,Wa),ke(Ct),ie.controller&&K.set(Ct,ie.controller)}),he({fetchers:new Map(v.fetchers)});let St=()=>We.forEach(ie=>ke(ie.key));F.signal.addEventListener("abort",St);let{loaderResults:Lt,fetcherResults:Z}=await Ir(at,We,Be,P);if(F.signal.aborted)return;if(F.signal.removeEventListener("abort",St),L.delete(f),K.delete(f),We.forEach(ie=>K.delete(ie.key)),v.fetchers.has(f)){let ie=Ae(ae.data);v.fetchers.set(f,ie)}let me=Pt(Lt);if(me)return ze(Be,me.result,!1,{preventScrollReset:j});if(me=Pt(Z),me)return N.add(me.key),ze(Be,me.result,!1,{preventScrollReset:j});let{loaderData:Ke,errors:Ye}=vn(v,$e,Lt,void 0,We,Z);Ur(Me),v.navigation.state==="loading"&&Me>m?(V(B,"Expected pending action"),X&&X.abort(),Xe(v.navigation.location,{matches:$e,loaderData:Ke,errors:Ye,fetchers:new Map(v.fetchers)})):(he({errors:Ye,loaderData:gn(v.loaderData,Ke,$e,Ye),fetchers:new Map(v.fetchers)}),ue=!1)}async function Ia(f,y,E,C,P,$,D,j,A){let U=v.fetchers.get(f);De(f,lt(A,U?U.data:void 0),{flushSync:D});let H=new AbortController,F=qe(e.history,E,H.signal);if($){let ae=await bt(C,new URL(F.url).pathname,F.signal,f);if(ae.type==="aborted")return;if(ae.type==="error"){Oe(f,y,ae.error,{flushSync:D});return}else if(ae.matches)C=ae.matches;else{Oe(f,y,Ce(404,{pathname:E}),{flushSync:D});return}}let ne=Ot(C,E);K.set(f,H);let ee=ve,oe=Ze(o,i,F,C,ne,n,P),we=(await rt(F,oe,P,f))[ne.route.id];if(K.get(f)===H&&K.delete(f),!F.signal.aborted){if(Y.has(f)){De(f,Ae(void 0));return}if(Ve(we))if(m>ee){De(f,Ae(void 0));return}else{N.add(f),await ze(F,we,!1,{preventScrollReset:j});return}if(be(we)){Oe(f,y,we.error);return}De(f,Ae(we.data))}}async function ze(f,y,E,{submission:C,fetcherSubmission:P,preventScrollReset:$,replace:D}={}){E||(G?.resolve(),G=null),y.response.headers.has("X-Remix-Revalidate")&&(ue=!0);let j=y.response.headers.get("Location");V(j,"Expected a Location header on the redirect Response"),j=pn(j,new URL(f.url),l,e.history);let A=ft(v.location,j,{_isRedirect:!0});if(r){let oe=!1;if(y.response.headers.has("X-Remix-Reload-Document"))oe=!0;else if(wr(j)){const de=An(j,!0);oe=de.origin!==t.location.origin||Se(de.pathname,l)==null}if(oe){D?t.location.replace(j):t.location.assign(j);return}}X=null;let U=D===!0||y.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:H,formAction:F,formEncType:ne}=v.navigation;!C&&!P&&H&&F&&ne&&(C=En(v.navigation));let ee=C||P;if($o.has(y.response.status)&&ee&&ye(ee.formMethod))await He(U,A,{submission:{...ee,formAction:j},preventScrollReset:$||re,enableViewTransition:E?se:void 0});else{let oe=rr(A,C);await He(U,A,{overrideNavigation:oe,fetcherSubmission:P,preventScrollReset:$||re,enableViewTransition:E?se:void 0})}}async function rt(f,y,E,C){let P,$={};try{P=await Vo(d,f,y,C,E,!1)}catch(D){return y.filter(j=>j.shouldLoad).forEach(j=>{$[j.route.id]={type:"error",error:D}}),$}if(f.signal.aborted)return $;if(!ye(f.method))for(let D of y){if(P[D.route.id]?.type==="error")break;!P.hasOwnProperty(D.route.id)&&!v.loaderData.hasOwnProperty(D.route.id)&&(!v.errors||!v.errors.hasOwnProperty(D.route.id))&&D.shouldCallHandler()&&(P[D.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${D.route.id}`)})}for(let[D,j]of Object.entries(P))if(ri(j)){let A=j.result;$[D]={type:"redirect",response:Ko(A,f,D,y,l)}}else $[D]=await Xo(j);return $}async function Ir(f,y,E,C){let P=rt(E,f,C,null),$=Promise.all(y.map(async A=>{if(A.matches&&A.match&&A.request&&A.controller){let H=(await rt(A.request,A.matches,C,A.key))[A.match.route.id];return{[A.key]:H}}else return Promise.resolve({[A.key]:{type:"error",error:Ce(404,{pathname:A.path})}})})),D=await P,j=(await $).reduce((A,U)=>Object.assign(A,U),{});return{loaderResults:D,fetcherResults:j}}function Vt(){ue=!0,I.forEach((f,y)=>{K.has(y)&&fe.add(y),ke(y)})}function De(f,y,E={}){v.fetchers.set(f,y),he({fetchers:new Map(v.fetchers)},{flushSync:(E&&E.flushSync)===!0})}function Oe(f,y,E,C={}){let P=Fe(v.matches,y);Jt(f),he({errors:{[P.route.id]:E},fetchers:new Map(v.fetchers)},{flushSync:(C&&C.flushSync)===!0})}function $r(f){return W.set(f,(W.get(f)||0)+1),Y.has(f)&&Y.delete(f),v.fetchers.get(f)||Fo}function $a(f,y){ke(f,y?.reason),De(f,Ae(null))}function Jt(f){let y=v.fetchers.get(f);K.has(f)&&!(y&&y.state==="loading"&&L.has(f))&&ke(f),I.delete(f),L.delete(f),N.delete(f),Y.delete(f),fe.delete(f),v.fetchers.delete(f)}function Fa(f){let y=(W.get(f)||0)-1;y<=0?(W.delete(f),Y.add(f)):W.set(f,y),he({fetchers:new Map(v.fetchers)})}function ke(f,y){let E=K.get(f);E&&(E.abort(y),K.delete(f))}function Fr(f){for(let y of f){let E=$r(y),C=Ae(E.data);v.fetchers.set(y,C)}}function jr(){let f=[],y=!1;for(let E of N){let C=v.fetchers.get(E);V(C,`Expected fetcher: ${E}`),C.state==="loading"&&(N.delete(E),f.push(E),y=!0)}return Fr(f),y}function Ur(f){let y=[];for(let[E,C]of L)if(C<f){let P=v.fetchers.get(E);V(P,`Expected fetcher: ${E}`),P.state==="loading"&&(ke(E),L.delete(E),y.push(E))}return Fr(y),y.length>0}function ja(f,y){let E=v.blockers.get(f)||it;return Q.get(f)!==y&&Q.set(f,y),E}function Hr(f){v.blockers.delete(f),Q.delete(f)}function Et(f,y){let E=v.blockers.get(f)||it;V(E.state==="unblocked"&&y.state==="blocked"||E.state==="blocked"&&y.state==="blocked"||E.state==="blocked"&&y.state==="proceeding"||E.state==="blocked"&&y.state==="unblocked"||E.state==="proceeding"&&y.state==="unblocked",`Invalid blocker state transition: ${E.state} -> ${y.state}`);let C=new Map(v.blockers);C.set(f,y),he({blockers:C})}function zr({currentLocation:f,nextLocation:y,historyAction:E}){if(Q.size===0)return;Q.size>1&&le(!1,"A router only supports one blocker at a time");let C=Array.from(Q.entries()),[P,$]=C[C.length-1],D=v.blockers.get(P);if(!(D&&D.state==="proceeding")&&$({currentLocation:f,nextLocation:y,historyAction:E}))return P}function Gt(f){let y=Ce(404,{pathname:f}),E=s||u,{matches:C,route:P}=xt(E);return{notFoundMatches:C,route:P,error:y}}function Ua(f,y,E){if(R=f,w=y,b=E||null,!x&&v.navigation===tr){x=!0;let C=Wr(v.location,v.matches);C!=null&&he({restoreScrollPosition:C})}return()=>{R=null,w=null,b=null}}function Br(f,y){return b&&b(f,y.map(C=>Nn(C,v.loaderData)))||f.key}function Ha(f,y){if(R&&w){let E=Br(f,y);R[E]=w()}}function Wr(f,y){if(R){let E=Br(f,y),C=R[E];if(typeof C=="number")return C}return null}function Rt(f,y,E){if(e.patchRoutesOnNavigation)if(f){if(Object.keys(f[0].params).length>0)return{active:!0,matches:ct(y,E,l,!0)}}else return{active:!0,matches:ct(y,E,l,!0)||[]};return{active:!1,matches:null}}async function bt(f,y,E,C){if(!e.patchRoutesOnNavigation)return{type:"success",matches:f};let P=f;for(;;){let $=s==null,D=s||u,j=i;try{await e.patchRoutesOnNavigation({signal:E,path:y,matches:P,fetcherKey:C,patch:(H,F)=>{E.aborted||dn(H,F,D,j,o,!1)}})}catch(H){return{type:"error",error:H,partialMatches:P}}finally{$&&!E.aborted&&(u=[...u])}if(E.aborted)return{type:"aborted"};let A=Ne(D,y,l),U=null;if(A){if(Object.keys(A[0].params).length===0)return{type:"success",matches:A};if(U=ct(D,y,l,!0),!(U&&P.length<U.length&&Yr(P,U.slice(0,P.length))))return{type:"success",matches:A}}if(U||(U=ct(D,y,l,!0)),!U||Yr(P,U))return{type:"success",matches:null};P=U}}function Yr(f,y){return f.length===y.length&&f.every((E,C)=>E.route.id===y[C].route.id)}function za(f){i={},s=ht(f,o,void 0,i)}function Ba(f,y,E=!1){let C=s==null;dn(f,y,s||u,i,o,E),C&&(u=[...u],he({}))}return k={get basename(){return l},get future(){return c},get state(){return v},get routes(){return u},get window(){return t},initialize:Yt,subscribe:Ta,enableScrollRestoration:Ua,navigate:Ar,fetch:Aa,revalidate:Ma,createHref:f=>e.history.createHref(f),encodeLocation:f=>e.history.encodeLocation(f),getFetcher:$r,resetFetcher:$a,deleteFetcher:Fa,dispose:_a,getBlocker:ja,deleteBlocker:Hr,patchRoutes:Ba,_internalFetchControllers:K,_internalSetRoutes:za,_internalSetStateDoNotUseOrYouWillBreakYourApp(f){he(f)}},e.unstable_instrumentations&&(k=To(k,e.unstable_instrumentations.map(f=>f.router).filter(Boolean))),k}function Uo(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function sr(e,t,r,n,a,o){let i,u;if(a){i=[];for(let l of t)if(i.push(l),l.route.id===a){u=l;break}}else i=t,u=t[t.length-1];let s=jt(n||".",Er(i),Se(e.pathname,r)||e.pathname,o==="path");if(n==null&&(s.search=e.search,s.hash=e.hash),(n==null||n===""||n===".")&&u){let l=br(s.search);if(u.route.index&&!l)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&l){let d=new URLSearchParams(s.search),c=d.getAll("index");d.delete("index"),c.filter(g=>g).forEach(g=>d.append("index",g));let p=d.toString();s.search=p?`?${p}`:""}}return r!=="/"&&(s.pathname=Eo({basename:r,pathname:s.pathname})),Pe(s)}function un(e,t,r){if(!r||!Uo(r))return{path:t};if(r.formMethod&&!oi(r.formMethod))return{path:t,error:Ce(405,{method:r.formMethod})};let n=()=>({path:t,error:Ce(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),i=ea(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ye(o))return n();let c=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((p,[g,R])=>`${p}${g}=${R}
2
- `,""):String(r.body);return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:void 0,text:c}}}else if(r.formEncType==="application/json"){if(!ye(o))return n();try{let c=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:c,text:void 0}}}catch{return n()}}}V(typeof FormData=="function","FormData is not available in this environment");let u,s;if(r.formData)u=cr(r.formData),s=r.formData;else if(r.body instanceof FormData)u=cr(r.body),s=r.body;else if(r.body instanceof URLSearchParams)u=r.body,s=yn(u);else if(r.body==null)u=new URLSearchParams,s=new FormData;else try{u=new URLSearchParams(r.body),s=yn(u)}catch{return n()}let l={formMethod:o,formAction:i,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(ye(l.formMethod))return{path:t,submission:l};let d=Ie(t);return e&&d.search&&br(d.search)&&u.append("index",""),d.search=`?${u}`,{path:Pe(d),submission:l}}function cn(e,t,r,n,a,o,i,u,s,l,d,c,p,g,R,b,w,x,S,_,T){let M=_?be(_[1])?_[1].error:_[1].data:void 0,O=a.createURL(o.location),k=a.createURL(s),v;if(d&&o.errors){let J=Object.keys(o.errors)[0];v=i.findIndex(q=>q.route.id===J)}else if(_&&be(_[1])){let J=_[0];v=i.findIndex(q=>q.route.id===J)-1}let B=_?_[1].statusCode:void 0,G=B&&B>=400,re={currentUrl:O,currentParams:o.matches[0]?.params||{},nextUrl:k,nextParams:i[0].params,...u,actionResult:M,actionStatus:B},X=pt(i),se=i.map((J,q)=>{let{route:ue}=J,fe=null;if(v!=null&&q>v)fe=!1;else if(ue.lazy)fe=!0;else if(!Rr(ue))fe=!1;else if(d){let{shouldLoad:L}=Gn(ue,o.loaderData,o.errors);fe=L}else Ho(o.loaderData,o.matches[q],J)&&(fe=!0);if(fe!==null)return ur(r,n,e,X,J,l,t,fe);let K=!1;typeof T=="boolean"?K=T:G?K=!1:(c||O.pathname+O.search===k.pathname+k.search||O.search!==k.search||zo(o.matches[q],J))&&(K=!0);let ve={...re,defaultShouldRevalidate:K},m=dt(J,ve);return ur(r,n,e,X,J,l,t,m,ve,T)}),te=[];return R.forEach((J,q)=>{if(d||!i.some(I=>I.route.id===J.routeId)||g.has(q))return;let ue=o.fetchers.get(q),fe=ue&&ue.state!=="idle"&&ue.data===void 0,K=Ne(w,J.path,x);if(!K){if(S&&fe)return;te.push({key:q,routeId:J.routeId,path:J.path,matches:null,match:null,request:null,controller:null});return}if(b.has(q))return;let ve=Ot(K,J.path),m=new AbortController,L=qe(a,J.path,m.signal),N=null;if(p.has(q))p.delete(q),N=Ze(r,n,L,K,ve,l,t);else if(fe)c&&(N=Ze(r,n,L,K,ve,l,t));else{let I;typeof T=="boolean"?I=T:G?I=!1:I=c;let W={...re,defaultShouldRevalidate:I};dt(ve,W)&&(N=Ze(r,n,L,K,ve,l,t,W))}N&&te.push({key:q,routeId:J.routeId,path:J.path,matches:N,match:ve,request:L,controller:m})}),{dsMatches:se,revalidatingFetchers:te}}function Rr(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Gn(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Rr(e))return{shouldLoad:!1,renderFallback:!1};let n=t!=null&&e.id in t,a=r!=null&&r[e.id]!==void 0;if(!n&&a)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!n};let o=!n&&!a;return{shouldLoad:o,renderFallback:o}}function Ho(e,t,r){let n=!t||r.route.id!==t.route.id,a=!e.hasOwnProperty(r.route.id);return n||a}function zo(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function dt(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function dn(e,t,r,n,a,o){let i;if(e){let l=n[e];V(l,`No route found to patch children into: routeId = ${e}`),l.children||(l.children=[]),i=l.children}else i=r;let u=[],s=[];if(t.forEach(l=>{let d=i.find(c=>Xn(l,c));d?s.push({existingRoute:d,newRoute:l}):u.push(l)}),u.length>0){let l=ht(u,a,[e||"_","patch",String(i?.length||"0")],n);i.push(...l)}if(o&&s.length>0)for(let l=0;l<s.length;l++){let{existingRoute:d,newRoute:c}=s[l],p=d,[g]=ht([c],a,[],{},!0);Object.assign(p,{element:g.element?g.element:p.element,errorElement:g.errorElement?g.errorElement:p.errorElement,hydrateFallbackElement:g.hydrateFallbackElement?g.hydrateFallbackElement:p.hydrateFallbackElement})}}function Xn(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((r,n)=>t.children?.some(a=>Xn(r,a)))??!1:!1}var fn=new WeakMap,Kn=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let a=r[t.id];if(V(a,"No route found in manifest"),!a.lazy||typeof a.lazy!="object")return;let o=a.lazy[e];if(!o)return;let i=fn.get(a);i||(i={},fn.set(a,i));let u=i[e];if(u)return u;let s=(async()=>{let l=ao(e),c=a[e]!==void 0&&e!=="hasErrorBoundary";if(l)le(!l,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(c)le(!1,`Route "${a.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let p=await o();p!=null&&(Object.assign(a,{[e]:p}),Object.assign(a,n(a)))}typeof a.lazy=="object"&&(a.lazy[e]=void 0,Object.values(a.lazy).every(p=>p===void 0)&&(a.lazy=void 0))})();return i[e]=s,s},hn=new WeakMap;function Bo(e,t,r,n,a){let o=r[e.id];if(V(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let d=hn.get(o);if(d)return{lazyRoutePromise:d,lazyHandlerPromise:d};let c=(async()=>{V(typeof e.lazy=="function","No lazy route function found");let p=await e.lazy(),g={};for(let R in p){let b=p[R];if(b===void 0)continue;let w=io(R),S=o[R]!==void 0&&R!=="hasErrorBoundary";w?le(!w,"Route property "+R+" is not a supported property to be returned from a lazy route function. This property will be ignored."):S?le(!S,`Route "${o.id}" has a static property "${R}" defined but its lazy function is also returning a value for this property. The lazy route property "${R}" will be ignored.`):g[R]=b}Object.assign(o,g),Object.assign(o,{...n(o),lazy:void 0})})();return hn.set(o,c),c.catch(()=>{}),{lazyRoutePromise:c,lazyHandlerPromise:c}}let i=Object.keys(e.lazy),u=[],s;for(let d of i){if(a&&a.includes(d))continue;let c=Kn({key:d,route:e,manifest:r,mapRouteProperties:n});c&&(u.push(c),d===t&&(s=c))}let l=u.length>0?Promise.all(u).then(()=>{}):void 0;return l?.catch(()=>{}),s?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:s}}async function mn(e){let t=e.matches.filter(a=>a.shouldLoad),r={};return(await Promise.all(t.map(a=>a.resolve()))).forEach((a,o)=>{r[t[o].route.id]=a}),r}async function Wo(e){return e.matches.some(t=>t.route.middleware)?qn(e,()=>mn(e)):mn(e)}function qn(e,t){return Yo(e,t,n=>{if(ai(n))throw n;return n},ei,r);function r(n,a,o){if(o)return Promise.resolve(Object.assign(o.value,{[a]:{type:"error",result:n}}));{let{matches:i}=e,u=Math.min(Math.max(i.findIndex(l=>l.route.id===a),0),Math.max(i.findIndex(l=>l.shouldCallHandler()),0)),s=Fe(i,i[u].route.id).route.id;return Promise.resolve({[s]:{type:"error",result:n}})}}}async function Yo(e,t,r,n,a){let{matches:o,request:i,params:u,context:s,unstable_pattern:l}=e,d=o.flatMap(p=>p.route.middleware?p.route.middleware.map(g=>[p.route.id,g]):[]);return await Qn({request:i,params:u,context:s,unstable_pattern:l},d,t,r,n,a)}async function Qn(e,t,r,n,a,o,i=0){let{request:u}=e;if(u.signal.aborted)throw u.signal.reason??new Error(`Request aborted: ${u.method} ${u.url}`);let s=t[i];if(!s)return await r();let[l,d]=s,c,p=async()=>{if(c)throw new Error("You may only call `next()` once per middleware");try{return c={value:await Qn(e,t,r,n,a,o,i+1)},c.value}catch(g){return c={value:await o(g,l,c)},c.value}};try{let g=await d(e,p),R=g!=null?n(g):void 0;return a(R)?R:c?R??c.value:(c={value:await p()},c.value)}catch(g){return await o(g,l,c)}}function Zn(e,t,r,n,a){let o=Kn({key:"middleware",route:n.route,manifest:t,mapRouteProperties:e}),i=Bo(n.route,ye(r.method)?"action":"loader",t,e,a);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function ur(e,t,r,n,a,o,i,u,s=null,l){let d=!1,c=Zn(e,t,r,a,o);return{...a,_lazyPromises:c,shouldLoad:u,shouldRevalidateArgs:s,shouldCallHandler(p){return d=!0,s?typeof l=="boolean"?dt(a,{...s,defaultShouldRevalidate:l}):typeof p=="boolean"?dt(a,{...s,defaultShouldRevalidate:p}):dt(a,s):u},resolve(p){let{lazy:g,loader:R,middleware:b}=a.route,w=d||u||p&&!ye(r.method)&&(g||R),x=b&&b.length>0&&!R&&!g;return w&&(ye(r.method)||!x)?Jo({request:r,unstable_pattern:n,match:a,lazyHandlerPromise:c?.handler,lazyRoutePromise:c?.route,handlerOverride:p,scopedContext:i}):Promise.resolve({type:"data",result:void 0})}}}function Ze(e,t,r,n,a,o,i,u=null){return n.map(s=>s.route.id!==a.route.id?{...s,shouldLoad:!1,shouldRevalidateArgs:u,shouldCallHandler:()=>!1,_lazyPromises:Zn(e,t,r,s,o),resolve:()=>Promise.resolve({type:"data",result:void 0})}:ur(e,t,r,pt(n),s,o,i,!0,u))}async function Vo(e,t,r,n,a,o){r.some(l=>l._lazyPromises?.middleware)&&await Promise.all(r.map(l=>l._lazyPromises?.middleware));let i={request:t,unstable_pattern:pt(r),params:r[0].params,context:a,matches:r},s=await e({...i,fetcherKey:n,runClientMiddleware:l=>{let d=i;return qn(d,()=>l({...d,fetcherKey:n,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(l=>[l._lazyPromises?.handler,l._lazyPromises?.route]))}catch{}return s}async function Jo({request:e,unstable_pattern:t,match:r,lazyHandlerPromise:n,lazyRoutePromise:a,handlerOverride:o,scopedContext:i}){let u,s,l=ye(e.method),d=l?"action":"loader",c=p=>{let g,R=new Promise((x,S)=>g=S);s=()=>g(),e.signal.addEventListener("abort",s);let b=x=>typeof p!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)):p({request:e,unstable_pattern:t,params:r.params,context:i},...x!==void 0?[x]:[]),w=(async()=>{try{return{type:"data",result:await(o?o(S=>b(S)):b())}}catch(x){return{type:"error",result:x}}})();return Promise.race([w,R])};try{let p=l?r.route.action:r.route.loader;if(n||a)if(p){let g,[R]=await Promise.all([c(p).catch(b=>{g=b}),n,a]);if(g!==void 0)throw g;u=R}else{await n;let g=l?r.route.action:r.route.loader;if(g)[u]=await Promise.all([c(g),a]);else if(d==="action"){let R=new URL(e.url),b=R.pathname+R.search;throw Ce(405,{method:e.method,pathname:b,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(p)u=await c(p);else{let g=new URL(e.url),R=g.pathname+g.search;throw Ce(404,{pathname:R})}}catch(p){return{type:"error",result:p}}finally{s&&e.signal.removeEventListener("abort",s)}return u}async function Go(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Xo(e){let{result:t,type:r}=e;if(Ut(t)){let n;try{n=await Go(t)}catch(a){return{type:"error",error:a}}return r==="error"?{type:"error",error:new Ue(t.status,t.statusText,n),statusCode:t.status,headers:t.headers}:{type:"data",data:n,statusCode:t.status,headers:t.headers}}return r==="error"?dr(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:Zo(t),statusCode:Je(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:Je(t)?t.status:void 0}:dr(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function Ko(e,t,r,n,a){let o=e.headers.get("Location");if(V(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!wr(o)){let i=n.slice(0,n.findIndex(u=>u.route.id===r)+1);o=sr(new URL(t.url),i,a,o),e.headers.set("Location",o)}return e}function pn(e,t,r,n){let a=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(wr(e)){let o=e,i=o.startsWith("//")?new URL(t.protocol+o):new URL(o);if(a.includes(i.protocol))throw new Error("Invalid redirect location");let u=Se(i.pathname,r)!=null;if(i.origin===t.origin&&u)return i.pathname+i.search+i.hash}try{let o=n.createURL(e);if(a.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return e}function qe(e,t,r,n){let a=e.createURL(ea(t)).toString(),o={signal:r};if(n&&ye(n.formMethod)){let{formMethod:i,formEncType:u}=n;o.method=i.toUpperCase(),u==="application/json"?(o.headers=new Headers({"Content-Type":u}),o.body=JSON.stringify(n.json)):u==="text/plain"?o.body=n.text:u==="application/x-www-form-urlencoded"&&n.formData?o.body=cr(n.formData):o.body=n.formData}return new Request(a,o)}function cr(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function yn(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function qo(e,t,r,n=!1,a=!1){let o={},i=null,u,s=!1,l={},d=r&&be(r[1])?r[1].error:void 0;return e.forEach(c=>{if(!(c.route.id in t))return;let p=c.route.id,g=t[p];if(V(!Ve(g),"Cannot handle redirect results in processLoaderData"),be(g)){let R=g.error;if(d!==void 0&&(R=d,d=void 0),i=i||{},a)i[p]=R;else{let b=Fe(e,p);i[b.route.id]==null&&(i[b.route.id]=R)}n||(o[p]=Jn),s||(s=!0,u=Je(g.error)?g.error.status:500),g.headers&&(l[p]=g.headers)}else o[p]=g.data,g.statusCode&&g.statusCode!==200&&!s&&(u=g.statusCode),g.headers&&(l[p]=g.headers)}),d!==void 0&&r&&(i={[r[0]]:d},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:i,statusCode:u||200,loaderHeaders:l}}function vn(e,t,r,n,a,o){let{loaderData:i,errors:u}=qo(t,r,n);return a.filter(s=>!s.matches||s.matches.some(l=>l.shouldLoad)).forEach(s=>{let{key:l,match:d,controller:c}=s;if(c&&c.signal.aborted)return;let p=o[l];if(V(p,"Did not find corresponding fetcher result"),be(p)){let g=Fe(e.matches,d?.route.id);u&&u[g.route.id]||(u={...u,[g.route.id]:p.error}),e.fetchers.delete(l)}else if(Ve(p))V(!1,"Unhandled fetcher revalidation redirect");else{let g=Ae(p.data);e.fetchers.set(l,g)}}),{loaderData:i,errors:u}}function gn(e,t,r,n){let a=Object.entries(t).filter(([,o])=>o!==Jn).reduce((o,[i,u])=>(o[i]=u,o),{});for(let o of r){let i=o.route.id;if(!t.hasOwnProperty(i)&&e.hasOwnProperty(i)&&o.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function wn(e){return e?be(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Fe(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 xt(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 Ce(e,{pathname:t,routeId:r,method:n,type:a,message:o}={}){let i="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(i="Bad Request",n&&t&&r?u=`You made a ${n} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:a==="invalid-body"&&(u="Unable to encode submission body")):e===403?(i="Forbidden",u=`Route "${r}" does not match URL "${t}"`):e===404?(i="Not Found",u=`No route matches URL "${t}"`):e===405&&(i="Method Not Allowed",n&&t&&r?u=`You made a ${n.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(u=`Invalid request method "${n.toUpperCase()}"`)),new Ue(e||500,i,new Error(u),!0)}function Pt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(Ve(a))return{key:n,result:a}}}function ea(e){let t=typeof e=="string"?Ie(e):e;return Pe({...t,hash:""})}function Qo(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Zo(e){return new Ue(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function ei(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&ti(r))}function ti(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function ri(e){return Ut(e.result)&&Yn.has(e.result.status)}function be(e){return e.type==="error"}function Ve(e){return(e&&e.type)==="redirect"}function dr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Ut(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function ni(e){return Yn.has(e)}function ai(e){return Ut(e)&&ni(e.status)&&e.headers.has("Location")}function oi(e){return Io.has(e.toUpperCase())}function ye(e){return Ao.has(e.toUpperCase())}function br(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ot(e,t){let r=typeof t=="string"?Ie(t).search:t.search;if(e[e.length-1].route.index&&br(r||""))return e[e.length-1];let n=Un(e);return n[n.length-1]}function En(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function rr(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 ii(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 lt(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 li(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 Ae(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 si(e,t){try{let r=e.sessionStorage.getItem(Vn);if(r){let n=JSON.parse(r);for(let[a,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(a,new Set(o||[]))}}catch{}}function ui(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(Vn,JSON.stringify(r))}catch(n){le(!1,`Failed to save applied view transitions in sessionStorage (${n}).`)}}}function Rn(){let e,t,r=new Promise((n,a)=>{e=async o=>{n(o);try{await r}catch{}},t=async o=>{a(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var Ge=h.createContext(null);Ge.displayName="DataRouter";var et=h.createContext(null);et.displayName="DataRouterState";var ta=h.createContext(!1);function ra(){return h.useContext(ta)}var Sr=h.createContext({isTransitioning:!1});Sr.displayName="ViewTransition";var na=h.createContext(new Map);na.displayName="Fetchers";var ci=h.createContext(null);ci.displayName="Await";var Re=h.createContext(null);Re.displayName="Navigation";var Ht=h.createContext(null);Ht.displayName="Location";var _e=h.createContext({outlet:null,matches:[],isDataRoute:!1});_e.displayName="Route";var Lr=h.createContext(null);Lr.displayName="RouteError";var aa="REACT_ROUTER_ERROR",di="REDIRECT",fi="ROUTE_ERROR_RESPONSE";function hi(e){if(e.startsWith(`${aa}:${di}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function mi(e){if(e.startsWith(`${aa}:${fi}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Ue(t.status,t.statusText,t.data)}catch{}}function pi(e,{relative:t}={}){V(yt(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=h.useContext(Re),{hash:a,pathname:o,search:i}=vt(e,{relative:t}),u=o;return r!=="/"&&(u=o==="/"?r:xe([r,o])),n.createHref({pathname:u,search:i,hash:a})}function yt(){return h.useContext(Ht)!=null}function Te(){return V(yt(),"useLocation() may be used only in the context of a <Router> component."),h.useContext(Ht).location}var oa="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ia(e){h.useContext(Re).static||h.useLayoutEffect(e)}function yi(){let{isDataRoute:e}=h.useContext(_e);return e?ki():vi()}function vi(){V(yt(),"useNavigate() may be used only in the context of a <Router> component.");let e=h.useContext(Ge),{basename:t,navigator:r}=h.useContext(Re),{matches:n}=h.useContext(_e),{pathname:a}=Te(),o=JSON.stringify(Er(n)),i=h.useRef(!1);return ia(()=>{i.current=!0}),h.useCallback((s,l={})=>{if(le(i.current,oa),!i.current)return;if(typeof s=="number"){r.go(s);return}let d=jt(s,JSON.parse(o),a,l.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:xe([t,d.pathname])),(l.replace?r.replace:r.push)(d,l.state,l)},[t,r,o,a,e])}var gi=h.createContext(null);function wi(e){let t=h.useContext(_e).outlet;return h.useMemo(()=>t&&h.createElement(gi.Provider,{value:e},t),[t,e])}function Ei(){let{matches:e}=h.useContext(_e),t=e[e.length-1];return t?t.params:{}}function vt(e,{relative:t}={}){let{matches:r}=h.useContext(_e),{pathname:n}=Te(),a=JSON.stringify(Er(r));return h.useMemo(()=>jt(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function Ri(e,t,r){V(yt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=h.useContext(Re),{matches:a}=h.useContext(_e),o=a[a.length-1],i=o?o.params:{},u=o?o.pathname:"/",s=o?o.pathnameBase:"/",l=o&&o.route;{let w=l&&l.path||"";ua(u,!l||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${w}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
3
-
4
- Please change the parent <Route path="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let d=Te(),c;c=d;let p=c.pathname||"/",g=p;if(s!=="/"){let w=s.replace(/^\//,"").split("/");g="/"+p.replace(/^\//,"").split("/").slice(w.length).join("/")}let R=Ne(e,{pathname:g});return le(l||R!=null,`No routes matched location "${c.pathname}${c.search}${c.hash}" `),le(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${c.pathname}${c.search}${c.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),xi(R&&R.map(w=>Object.assign({},w,{params:Object.assign({},i,w.params),pathname:xe([s,n.encodeLocation?n.encodeLocation(w.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?s:xe([s,n.encodeLocation?n.encodeLocation(w.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),a,r)}function bi(){let e=sa(),t=Je(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=h.createElement(h.Fragment,null,h.createElement("p",null,"💿 Hey developer 👋"),h.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",h.createElement("code",{style:o},"ErrorBoundary")," or"," ",h.createElement("code",{style:o},"errorElement")," prop on your route.")),h.createElement(h.Fragment,null,h.createElement("h2",null,"Unexpected Application Error!"),h.createElement("h3",{style:{fontStyle:"italic"}},t),r?h.createElement("pre",{style:a},r):null,i)}var Si=h.createElement(bi,null),la=class extends h.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=mi(e.digest);r&&(e=r)}let t=e!==void 0?h.createElement(_e.Provider,{value:this.props.routeContext},h.createElement(Lr.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?h.createElement(Li,{error:e},t):t}};la.contextType=ta;var nr=new WeakMap;function Li({children:e,error:t}){let{basename:r}=h.useContext(Re);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=hi(t.digest);if(n){let a=nr.get(t);if(a)throw a;let o=zn(n.location,r);if(Hn&&!nr.get(t))if(o.isExternal||n.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const i=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:n.replace}));throw nr.set(t,i),i}return h.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function Ci({routeContext:e,match:t,children:r}){let n=h.useContext(Ge);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),h.createElement(_e.Provider,{value:e},r)}function xi(e,t=[],r){let n=r?.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n?.errors;if(o!=null){let d=a.findIndex(c=>c.route.id&&o?.[c.route.id]!==void 0);V(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,d+1))}let i=!1,u=-1;if(r&&n){i=n.renderFallback;for(let d=0;d<a.length;d++){let c=a[d];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=d),c.route.id){let{loaderData:p,errors:g}=n,R=c.route.loader&&!p.hasOwnProperty(c.route.id)&&(!g||g[c.route.id]===void 0);if(c.route.lazy||R){r.isStatic&&(i=!0),u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}}let s=r?.onError,l=n&&s?(d,c)=>{s(d,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:pt(n.matches),errorInfo:c})}:void 0;return a.reduceRight((d,c,p)=>{let g,R=!1,b=null,w=null;n&&(g=o&&c.route.id?o[c.route.id]:void 0,b=c.route.errorElement||Si,i&&(u<0&&p===0?(ua("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,w=null):u===p&&(R=!0,w=c.route.hydrateFallbackElement||null)));let x=t.concat(a.slice(0,p+1)),S=()=>{let _;return g?_=b:R?_=w:c.route.Component?_=h.createElement(c.route.Component,null):c.route.element?_=c.route.element:_=d,h.createElement(Ci,{match:c,routeContext:{outlet:d,matches:x,isDataRoute:n!=null},children:_})};return n&&(c.route.ErrorBoundary||c.route.errorElement||p===0)?h.createElement(la,{location:n.location,revalidation:n.revalidation,component:b,error:g,children:S(),routeContext:{outlet:null,matches:x,isDataRoute:!0},onError:l}):S()},null)}function Cr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Pi(e){let t=h.useContext(Ge);return V(t,Cr(e)),t}function gt(e){let t=h.useContext(et);return V(t,Cr(e)),t}function _i(e){let t=h.useContext(_e);return V(t,Cr(e)),t}function wt(e){let t=_i(e),r=t.matches[t.matches.length-1];return V(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Ti(){return wt("useRouteId")}function Mi(){return gt("useNavigation").navigation}function xr(){let{matches:e,loaderData:t}=gt("useMatches");return h.useMemo(()=>e.map(r=>Nn(r,t)),[e,t])}function Di(){let e=gt("useLoaderData"),t=wt("useLoaderData");return e.loaderData[t]}function Oi(){let e=gt("useActionData"),t=wt("useLoaderData");return e.actionData?e.actionData[t]:void 0}function sa(){let e=h.useContext(Lr),t=gt("useRouteError"),r=wt("useRouteError");return e!==void 0?e:t.errors?.[r]}function ki(){let{router:e}=Pi("useNavigate"),t=wt("useNavigate"),r=h.useRef(!1);return ia(()=>{r.current=!0}),h.useCallback(async(a,o={})=>{le(r.current,oa),r.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var bn={};function ua(e,t,r){!t&&!bn[e]&&(bn[e]=!0,le(!1,r))}var Sn={};function fr(e,t){!e&&!Sn[t]&&(Sn[t]=!0,console.warn(t))}var Ai="useOptimistic",Ln=Ka[Ai],Ni=()=>{};function Ii(e){return Ln?Ln(e):[e,Ni]}function Es(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&le(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:h.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&le(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:h.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&le(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:h.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Rs=["HydrateFallback","hydrateFallbackElement"],$i=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function bs({router:e,flushSync:t,onError:r,unstable_useTransitions:n}){n=ra()||n;let[o,i]=h.useState(e.state),[u,s]=Ii(o),[l,d]=h.useState(),[c,p]=h.useState({isTransitioning:!1}),[g,R]=h.useState(),[b,w]=h.useState(),[x,S]=h.useState(),_=h.useRef(new Map),T=h.useCallback((v,{deletedFetchers:B,newErrors:G,flushSync:re,viewTransitionOpts:X})=>{G&&r&&Object.values(G).forEach(te=>r(te,{location:v.location,params:v.matches[0]?.params??{},unstable_pattern:pt(v.matches)})),v.fetchers.forEach((te,J)=>{te.data!==void 0&&_.current.set(J,te.data)}),B.forEach(te=>_.current.delete(te)),fr(re===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let se=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(fr(X==null||se,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!X||!se){t&&re?t(()=>i(v)):n===!1?i(v):h.startTransition(()=>{n===!0&&s(te=>Cn(te,v)),i(v)});return}if(t&&re){t(()=>{b&&(g?.resolve(),b.skipTransition()),p({isTransitioning:!0,flushSync:!0,currentLocation:X.currentLocation,nextLocation:X.nextLocation})});let te=e.window.document.startViewTransition(()=>{t(()=>i(v))});te.finished.finally(()=>{t(()=>{R(void 0),w(void 0),d(void 0),p({isTransitioning:!1})})}),t(()=>w(te));return}b?(g?.resolve(),b.skipTransition(),S({state:v,currentLocation:X.currentLocation,nextLocation:X.nextLocation})):(d(v),p({isTransitioning:!0,flushSync:!1,currentLocation:X.currentLocation,nextLocation:X.nextLocation}))},[e.window,t,b,g,n,s,r]);h.useLayoutEffect(()=>e.subscribe(T),[e,T]),h.useEffect(()=>{c.isTransitioning&&!c.flushSync&&R(new $i)},[c]),h.useEffect(()=>{if(g&&l&&e.window){let v=l,B=g.promise,G=e.window.document.startViewTransition(async()=>{n===!1?i(v):h.startTransition(()=>{n===!0&&s(re=>Cn(re,v)),i(v)}),await B});G.finished.finally(()=>{R(void 0),w(void 0),d(void 0),p({isTransitioning:!1})}),w(G)}},[l,g,e.window,n,s]),h.useEffect(()=>{g&&l&&u.location.key===l.location.key&&g.resolve()},[g,b,u.location,l]),h.useEffect(()=>{!c.isTransitioning&&x&&(d(x.state),p({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),S(void 0))},[c.isTransitioning,x]);let M=h.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:v=>e.navigate(v),push:(v,B,G)=>e.navigate(v,{state:B,preventScrollReset:G?.preventScrollReset}),replace:(v,B,G)=>e.navigate(v,{replace:!0,state:B,preventScrollReset:G?.preventScrollReset})}),[e]),O=e.basename||"/",k=h.useMemo(()=>({router:e,navigator:M,static:!1,basename:O,onError:r}),[e,M,O,r]);return h.createElement(h.Fragment,null,h.createElement(Ge.Provider,{value:k},h.createElement(et.Provider,{value:u},h.createElement(na.Provider,{value:_.current},h.createElement(Sr.Provider,{value:c},h.createElement(Ui,{basename:O,location:u.location,navigationType:u.historyAction,navigator:M,unstable_useTransitions:n},h.createElement(Fi,{routes:e.routes,future:e.future,state:u,isStatic:!1,onError:r})))))),null)}function Cn(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var Fi=h.memo(ji);function ji({routes:e,future:t,state:r,isStatic:n,onError:a}){return Ri(e,void 0,{state:r,isStatic:n,onError:a})}function Ss(e){return wi(e.context)}function Ui({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1,unstable_useTransitions:i}){V(!yt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),s=h.useMemo(()=>({basename:u,navigator:a,static:o,unstable_useTransitions:i,future:{}}),[u,a,o,i]);typeof r=="string"&&(r=Ie(r));let{pathname:l="/",search:d="",hash:c="",state:p=null,key:g="default",unstable_mask:R}=r,b=h.useMemo(()=>{let w=Se(l,u);return w==null?null:{location:{pathname:w,search:d,hash:c,state:p,key:g,unstable_mask:R},navigationType:n}},[u,l,d,c,p,g,n,R]);return le(b!=null,`<Router basename="${u}"> is not able to match the URL "${l}${d}${c}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:h.createElement(Re.Provider,{value:s},h.createElement(Ht.Provider,{children:t,value:b}))}function Hi(){return{params:Ei(),loaderData:Di(),actionData:Oi(),matches:xr()}}function Ls(e){return function(){const r=Hi();return h.createElement(e,r)}}var kt="get",At="application/x-www-form-urlencoded";function zt(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function zi(e){return zt(e)&&e.tagName.toLowerCase()==="button"}function Bi(e){return zt(e)&&e.tagName.toLowerCase()==="form"}function Wi(e){return zt(e)&&e.tagName.toLowerCase()==="input"}function Yi(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Vi(e,t){return e.button===0&&(!t||t==="_self")&&!Yi(e)}var _t=null;function Ji(){if(_t===null)try{new FormData(document.createElement("form"),0),_t=!1}catch{_t=!0}return _t}var Gi=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ar(e){return e!=null&&!Gi.has(e)?(le(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${At}"`),null):e}function Xi(e,t){let r,n,a,o,i;if(Bi(e)){let u=e.getAttribute("action");n=u?Se(u,t):null,r=e.getAttribute("method")||kt,a=ar(e.getAttribute("enctype"))||At,o=new FormData(e)}else if(zi(e)||Wi(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||u.getAttribute("action");if(n=s?Se(s,t):null,r=e.getAttribute("formmethod")||u.getAttribute("method")||kt,a=ar(e.getAttribute("formenctype"))||ar(u.getAttribute("enctype"))||At,o=new FormData(u,e),!Ji()){let{name:l,type:d,value:c}=e;if(d==="image"){let p=l?`${l}.`:"";o.append(`${p}x`,"0"),o.append(`${p}y`,"0")}else l&&o.append(l,c)}}else{if(zt(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=kt,n=null,a=At,i=e}return o&&a==="text/plain"&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}var Ki=-1,qi=-2,Qi=-3,Zi=-4,el=-5,tl=-6,rl=-7,nl="B",al="D",ca="E",ol="M",il="N",da="P",ll="R",sl="S",ul="Y",cl="U",dl="Z",fa=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};function fl(){const e=new TextDecoder;let t="";return new TransformStream({transform(r,n){const a=e.decode(r,{stream:!0}),o=(t+a).split(`
5
- `);t=o.pop()||"";for(const i of o)n.enqueue(i)},flush(r){t&&r.enqueue(t)}})}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var or=typeof window<"u"?window:typeof globalThis<"u"?globalThis:void 0;function hr(e){const{hydrated:t,values:r}=this;if(typeof e=="number")return xn.call(this,e);if(!Array.isArray(e)||!e.length)throw new SyntaxError;const n=r.length;for(const a of e)r.push(a);return t.length=r.length,xn.call(this,n)}function xn(e){const{hydrated:t,values:r,deferred:n,plugins:a}=this;let o;const i=[[e,s=>{o=s}]];let u=[];for(;i.length>0;){const[s,l]=i.pop();switch(s){case rl:l(void 0);continue;case el:l(null);continue;case qi:l(NaN);continue;case tl:l(1/0);continue;case Qi:l(-1/0);continue;case Zi:l(-0);continue}if(t[s]){l(t[s]);continue}const d=r[s];if(!d||typeof d!="object"){t[s]=d,l(d);continue}if(Array.isArray(d))if(typeof d[0]=="string"){const[c,p,g]=d;switch(c){case al:l(t[s]=new Date(p));continue;case cl:l(t[s]=new URL(p));continue;case nl:l(t[s]=BigInt(p));continue;case ll:l(t[s]=new RegExp(p,g));continue;case ul:l(t[s]=Symbol.for(p));continue;case sl:const R=new Set;t[s]=R;for(let T=d.length-1;T>0;T--)i.push([d[T],M=>{R.add(M)}]);l(R);continue;case ol:const b=new Map;t[s]=b;for(let T=d.length-2;T>0;T-=2){const M=[];i.push([d[T+1],O=>{M[1]=O}]),i.push([d[T],O=>{M[0]=O}]),u.push(()=>{b.set(M[0],M[1])})}l(b);continue;case il:const w=Object.create(null);t[s]=w;for(const T of Object.keys(p).reverse()){const M=[];i.push([p[T],O=>{M[1]=O}]),i.push([Number(T.slice(1)),O=>{M[0]=O}]),u.push(()=>{w[M[0]]=M[1]})}l(w);continue;case da:if(t[p])l(t[s]=t[p]);else{const T=new fa;n[p]=T,l(t[s]=T.promise)}continue;case ca:const[,x,S]=d;let _=S&&or&&or[S]?new or[S](x):new Error(x);t[s]=_,l(_);continue;case dl:l(t[s]=t[p]);continue;default:if(Array.isArray(a)){const T=[],M=d.slice(1);for(let O=0;O<M.length;O++){const k=M[O];i.push([k,v=>{T[O]=v}])}u.push(()=>{for(const O of a){const k=O(d[0],...T);if(k){l(t[s]=k.value);return}}throw new SyntaxError});continue}throw new SyntaxError}}else{const c=[];t[s]=c;for(let p=0;p<d.length;p++){const g=d[p];g!==Ki&&i.push([g,R=>{c[p]=R}])}l(c);continue}else{const c={};t[s]=c;for(const p of Object.keys(d).reverse()){const g=[];i.push([d[p],R=>{g[1]=R}]),i.push([Number(p.slice(1)),R=>{g[0]=R}]),u.push(()=>{c[g[0]]=g[1]})}l(c);continue}}for(;u.length>0;)u.pop()();return o}async function hl(e,t){const{plugins:r}=t??{},n=new fa,a=e.pipeThrough(fl()).getReader(),o={values:[],hydrated:[],deferred:{},plugins:r},i=await ml.call(o,a);let u=n.promise;return i.done?n.resolve():u=pl.call(o,a).then(n.resolve).catch(s=>{for(const l of Object.values(o.deferred))l.reject(s);n.reject(s)}),{done:u.then(()=>a.closed),value:i.value}}async function ml(e){const t=await e.read();if(!t.value)throw new SyntaxError;let r;try{r=JSON.parse(t.value)}catch{throw new SyntaxError}return{done:t.done,value:hr.call(this,r)}}async function pl(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;const r=t.value;switch(r[0]){case da:{const n=r.indexOf(":"),a=Number(r.slice(1,n)),o=this.deferred[a];if(!o)throw new Error(`Deferred ID ${a} not found in stream`);const i=r.slice(n+1);let u;try{u=JSON.parse(i)}catch{throw new SyntaxError}const s=hr.call(this,u);o.resolve(s);break}case ca:{const n=r.indexOf(":"),a=Number(r.slice(1,n)),o=this.deferred[a];if(!o)throw new Error(`Deferred ID ${a} not found in stream`);const i=r.slice(n+1);let u;try{u=JSON.parse(i)}catch{throw new SyntaxError}const s=hr.call(this,u);o.reject(s);break}default:throw new SyntaxError}t=await e.read()}}async function yl(e){let t={signal:e.signal};if(e.method!=="GET"){t.method=e.method;let r=e.headers.get("Content-Type");r&&/\bapplication\/json\b/.test(r)?(t.headers={"Content-Type":r},t.body=JSON.stringify(await e.json())):r&&/\btext\/plain\b/.test(r)?(t.headers={"Content-Type":r},t.body=await e.text()):r&&/\bapplication\/x-www-form-urlencoded\b/.test(r)?t.body=new URLSearchParams(await e.text()):t.body=await e.formData()}return t}var vl={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},gl=/[&><\u2028\u2029]/g;function mr(e){return e.replace(gl,t=>vl[t])}function Ee(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}var pr=Symbol("SingleFetchRedirect"),ha=class extends Error{},wl=202,El=new Set([100,101,204,205]);function Cs(e,t,r,n,a,o){let i=Rl(e,u=>{let s=t.routes[u.route.id];Ee(s,"Route not found in manifest");let l=r[u.route.id];return{hasLoader:s.hasLoader,hasClientLoader:s.hasClientLoader,hasShouldRevalidate:!!l?.shouldRevalidate}},_l,n,a,o);return async u=>u.runClientMiddleware(i)}function Rl(e,t,r,n,a,o,i=()=>!0){return async u=>{let{request:s,matches:l,fetcherKey:d}=u,c=e();if(s.method!=="GET")return bl(u,r,a,o);let p=l.some(g=>{let{hasLoader:R,hasClientLoader:b}=t(g);return g.shouldCallHandler()&&R&&!b});return!n&&!p?Sl(u,t,r,a,o):d?xl(u,r,a,o):Ll(u,c,t,r,n,a,o,i)}}async function bl(e,t,r,n){let a=e.matches.find(u=>u.shouldCallHandler());Ee(a,"No action match found");let o,i=await a.resolve(async u=>await u(async()=>{let{data:l,status:d}=await t(e,r,n,[a.route.id]);return o=d,mt(l,a.route.id)}));return Ut(i.result)||Je(i.result)||dr(i.result)?{[a.route.id]:i}:{[a.route.id]:{type:i.type,result:xo(i.result,o)}}}async function Sl(e,t,r,n,a){let o=e.matches.filter(u=>u.shouldCallHandler()),i={};return await Promise.all(o.map(u=>u.resolve(async s=>{try{let{hasClientLoader:l}=t(u),d=u.route.id,c=l?await s(async()=>{let{data:p}=await r(e,n,a,[d]);return mt(p,d)}):await s();i[u.route.id]={type:"data",result:c}}catch(l){i[u.route.id]={type:"error",result:l}}}))),i}async function Ll(e,t,r,n,a,o,i,u=()=>!0){let s=new Set,l=!1,d=e.matches.map(()=>Pn()),c=Pn(),p={},g=Promise.all(e.matches.map(async(b,w)=>b.resolve(async x=>{d[w].resolve();let S=b.route.id,{hasLoader:_,hasClientLoader:T,hasShouldRevalidate:M}=r(b),O=!b.shouldRevalidateArgs||b.shouldRevalidateArgs.actionStatus==null||b.shouldRevalidateArgs.actionStatus<400;if(!b.shouldCallHandler(O)){l||(l=b.shouldRevalidateArgs!=null&&_&&M===!0);return}if(u(b)&&T){_&&(l=!0);try{let v=await x(async()=>{let{data:B}=await n(e,o,i,[S]);return mt(B,S)});p[S]={type:"data",result:v}}catch(v){p[S]={type:"error",result:v}}return}_&&s.add(S);try{let v=await x(async()=>{let B=await c.promise;return mt(B,S)});p[S]={type:"data",result:v}}catch(v){p[S]={type:"error",result:v}}})));if(await Promise.all(d.map(b=>b.promise)),(!t.state.initialized&&t.state.navigation.state==="idle"||s.size===0)&&!window.__reactRouterHdrActive)c.resolve({routes:{}});else{let b=a&&l&&s.size>0?[...s.keys()]:void 0;try{let w=await n(e,o,i,b);c.resolve(w.data)}catch(w){c.reject(w)}}return await g,await Cl(c.promise,e.matches,s,p),p}async function Cl(e,t,r,n){try{let a,o=await e;if("routes"in o){for(let i of t)if(i.route.id in o.routes){let u=o.routes[i.route.id];if("error"in u){a=u.error,n[i.route.id]?.result==null&&(n[i.route.id]={type:"error",result:a});break}}}a!==void 0&&Array.from(r.values()).forEach(i=>{n[i].result instanceof ha&&(n[i].result=a)})}catch{}}async function xl(e,t,r,n){let a=e.matches.find(u=>u.shouldCallHandler());Ee(a,"No fetcher match found");let o=a.route.id,i=await a.resolve(async u=>u(async()=>{let{data:s}=await t(e,r,n,[o]);return mt(s,o)}));return{[a.route.id]:i}}function Pl(e){let t=e.searchParams.getAll("index");e.searchParams.delete("index");let r=[];for(let n of t)n&&r.push(n);for(let n of r)e.searchParams.append("index",n);return e}function ma(e,t,r,n){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${n}`:a.pathname=`${a.pathname}.${n}`:a.pathname==="/"?a.pathname=`_root.${n}`:t&&Se(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${n}`,a}async function _l(e,t,r,n){let{request:a}=e,o=ma(a.url,t,r,"data");a.method==="GET"&&(o=Pl(o),n&&o.searchParams.set("_routes",n.join(",")));let i=await fetch(o,await yl(a));if(i.status>=400&&!i.headers.has("X-Remix-Response"))throw new Ue(i.status,i.statusText,await i.text());if(i.status===204&&i.headers.has("X-Remix-Redirect"))return{status:wl,data:{redirect:{redirect:i.headers.get("X-Remix-Redirect"),status:Number(i.headers.get("X-Remix-Status")||"302"),revalidate:i.headers.get("X-Remix-Revalidate")==="true",reload:i.headers.get("X-Remix-Reload-Document")==="true",replace:i.headers.get("X-Remix-Replace")==="true"}}};if(El.has(i.status)){let u={};return n&&a.method!=="GET"&&(u[n[0]]={data:void 0}),{status:i.status,data:{routes:u}}}Ee(i.body,"No response body to decode");try{let u=await Tl(i.body,window),s;if(a.method==="GET"){let l=u.value;pr in l?s={redirect:l[pr]}:s={routes:l}}else{let l=u.value,d=n?.[0];Ee(d,"No routeId found for single fetch call decoding"),"redirect"in l?s={redirect:l}:s={routes:{[d]:l}}}return{status:i.status,data:s}}catch{throw new Error("Unable to decode turbo-stream response")}}function Tl(e,t){return hl(e,{plugins:[(r,...n)=>{if(r==="SanitizedError"){let[a,o,i]=n,u=Error;a&&a in t&&typeof t[a]=="function"&&(u=t[a]);let s=new u(o);return s.stack=i,{value:s}}if(r==="ErrorResponse"){let[a,o,i]=n;return{value:new Ue(o,i,a)}}if(r==="SingleFetchRedirect")return{value:{[pr]:n[0]}};if(r==="SingleFetchClassInstance")return{value:n[0]};if(r==="SingleFetchFallback")return{value:void 0}}]})}function mt(e,t){if("redirect"in e){let{redirect:n,revalidate:a,reload:o,replace:i,status:u}=e.redirect;throw Po(n,{status:u,headers:{...a?{"X-Remix-Revalidate":"yes"}:null,...o?{"X-Remix-Reload-Document":"yes"}:null,...i?{"X-Remix-Replace":"yes"}:null}})}let r=e.routes[t];if(r==null)throw new ha(`No result found for routeId "${t}"`);if("error"in r)throw r.error;if("data"in r)return r.data;throw new Error(`Invalid response found for routeId "${t}"`)}function Pn(){let e,t,r=new Promise((n,a)=>{e=async o=>{n(o);try{await r}catch{}},t=async o=>{a(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}async function pa(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ml(e,t,r){let n=e.map(o=>{let i=t[o.route.id],u=r.routes[o.route.id];return[u&&u.css?u.css.map(s=>({rel:"stylesheet",href:s})):[],i?.links?.()||[]]}).flat(2),a=_r(e,r);return wa(n,a)}function ya(e){return e.css?e.css.map(t=>({rel:"stylesheet",href:t})):[]}async function Dl(e){if(!e.css)return;let t=ya(e);await Promise.all(t.map(ga))}async function va(e,t){if(!e.css&&!t.links||!Il())return;let r=[];if(e.css&&r.push(...ya(e)),t.links&&r.push(...t.links()),r.length===0)return;let n=[];for(let a of r)!Pr(a)&&a.rel==="stylesheet"&&n.push({...a,rel:"preload",as:"style"});await Promise.all(n.map(ga))}async function ga(e){return new Promise(t=>{if(e.media&&!window.matchMedia(e.media).matches||document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`))return t();let r=document.createElement("link");Object.assign(r,e);function n(){document.head.contains(r)&&document.head.removeChild(r)}r.onload=()=>{n(),t()},r.onerror=()=>{n(),t()},document.head.appendChild(r)})}function Pr(e){return e!=null&&typeof e.page=="string"}function Ol(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function kl(e,t,r){let n=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let i=await pa(o,r);return i.links?i.links():[]}return[]}));return wa(n.flat(1).filter(Ol).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function _n(e,t,r,n,a,o){let i=(s,l)=>r[l]?s.route.id!==r[l].route.id:!0,u=(s,l)=>r[l].pathname!==s.pathname||r[l].route.path?.endsWith("*")&&r[l].params["*"]!==s.params["*"];return o==="assets"?t.filter((s,l)=>i(s,l)||u(s,l)):o==="data"?t.filter((s,l)=>{let d=n.routes[s.route.id];if(!d||!d.hasLoader)return!1;if(i(s,l)||u(s,l))return!0;if(s.route.shouldRevalidate){let c=s.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof c=="boolean")return c}return!0}):[]}function _r(e,t,{includeHydrateFallback:r}={}){return Al(e.map(n=>{let a=t.routes[n.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function Al(e){return[...new Set(e)]}function Nl(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function wa(e,t){let r=new Set,n=new Set(t);return e.reduce((a,o)=>{if(t&&!Pr(o)&&o.as==="script"&&o.href&&n.has(o.href))return a;let u=JSON.stringify(Nl(o));return r.has(u)||(r.add(u),a.push({key:u,link:o})),a},[])}var Tt;function Il(){if(Tt!==void 0)return Tt;let e=document.createElement("link");return Tt=e.relList.supports("preload"),e=null,Tt}function $l(){return h.createElement(yr,{title:"Loading...",renderScripts:!0},h.createElement("script",{dangerouslySetInnerHTML:{__html:`
6
- console.log(
7
- "💿 Hey developer 👋. You can provide a way better UX than this " +
8
- "when your app is loading JS modules and/or running \`clientLoader\` " +
9
- "functions. Check out https://reactrouter.com/start/framework/route-module#hydratefallback " +
10
- "for more information."
11
- );
12
- `}}))}function Ea(e){let t={};return Object.values(e).forEach(r=>{if(r){let n=r.parentId||"";t[n]||(t[n]=[]),t[n].push(r)}}),t}function Fl(e,t,r){let n=Ra(t),a=t.HydrateFallback&&(!r||e.id==="root")?t.HydrateFallback:e.id==="root"?$l:void 0,o=t.ErrorBoundary?t.ErrorBoundary:e.id==="root"?()=>h.createElement(La,{error:sa()}):void 0;return e.id==="root"&&t.Layout?{...n?{element:h.createElement(t.Layout,null,h.createElement(n,null))}:{Component:n},...o?{errorElement:h.createElement(t.Layout,null,h.createElement(o,null))}:{ErrorBoundary:o},...a?{hydrateFallbackElement:h.createElement(t.Layout,null,h.createElement(a,null))}:{HydrateFallback:a}}:{Component:n,ErrorBoundary:o,HydrateFallback:a}}function xs(e,t,r,n,a,o){return Tr(t,r,n,a,o,"",Ea(t),e)}function Mt(e,t){if(e==="loader"&&!t.hasLoader||e==="action"&&!t.hasAction){let n=`You are trying to call ${e==="action"?"serverAction()":"serverLoader()"} on a route that does not have a server ${e} (routeId: "${t.id}")`;throw console.error(n),new Ue(400,"Bad Request",new Error(n),!0)}}function ir(e,t){let r=e==="clientAction"?"a":"an",n=`Route "${t}" does not have ${r} ${e}, but you are trying to submit to it. To fix this, please add ${r} \`${e}\` function to the route`;throw console.error(n),new Ue(405,"Method Not Allowed",new Error(n),!0)}function Tr(e,t,r,n,a,o="",i=Ea(e),u){return(i[o]||[]).map(s=>{let l=t[s.id];function d(S){return Ee(typeof S=="function","No single fetch function available for route handler"),S()}function c(S){return s.hasLoader?d(S):Promise.resolve(null)}function p(S){if(!s.hasAction)throw ir("action",s.id);return d(S)}function g(S){import(S)}function R(S){S.clientActionModule&&g(S.clientActionModule),S.clientLoaderModule&&g(S.clientLoaderModule)}async function b(S){let _=t[s.id],T=_?va(s,_):Promise.resolve();try{return S()}finally{await T}}let w={id:s.id,index:s.index,path:s.path};if(l){Object.assign(w,{...w,...Fl(s,l,a),middleware:l.clientMiddleware,handle:l.handle,shouldRevalidate:Tn(w.path,l,s,n,u)});let S=r&&r.loaderData&&s.id in r.loaderData,_=S?r?.loaderData?.[s.id]:void 0,T=r&&r.errors&&s.id in r.errors,M=T?r?.errors?.[s.id]:void 0,O=u==null&&(l.clientLoader?.hydrate===!0||!s.hasLoader);w.loader=async({request:k,params:v,context:B,unstable_pattern:G},re)=>{try{return await b(async()=>(Ee(l,"No `routeModule` available for critical-route loader"),l.clientLoader?l.clientLoader({request:k,params:v,context:B,unstable_pattern:G,async serverLoader(){if(Mt("loader",s),O){if(S)return _;if(T)throw M}return c(re)}}):c(re)))}finally{O=!1}},w.loader.hydrate=Hl(s.id,l.clientLoader,s.hasLoader,a),w.action=({request:k,params:v,context:B,unstable_pattern:G},re)=>b(async()=>{if(Ee(l,"No `routeModule` available for critical-route action"),!l.clientAction){if(a)throw ir("clientAction",s.id);return p(re)}return l.clientAction({request:k,params:v,context:B,unstable_pattern:G,async serverAction(){return Mt("action",s),p(re)}})})}else{s.hasClientLoader||(w.loader=(T,M)=>b(()=>c(M))),s.hasClientAction||(w.action=(T,M)=>b(()=>{if(a)throw ir("clientAction",s.id);return p(M)}));let S;async function _(){return S?await S:(S=(async()=>{(s.clientLoaderModule||s.clientActionModule)&&await new Promise(M=>setTimeout(M,0));let T=Ul(s,t);return R(s),await T})(),await S)}w.lazy={loader:s.hasClientLoader?async()=>{let{clientLoader:T}=s.clientLoaderModule?await import(s.clientLoaderModule):await _();return Ee(T,"No `clientLoader` export found"),(M,O)=>T({...M,async serverLoader(){return Mt("loader",s),c(O)}})}:void 0,action:s.hasClientAction?async()=>{let T=s.clientActionModule?import(s.clientActionModule):_();R(s);let{clientAction:M}=await T;return Ee(M,"No `clientAction` export found"),(O,k)=>M({...O,async serverAction(){return Mt("action",s),p(k)}})}:void 0,middleware:s.hasClientMiddleware?async()=>{let{clientMiddleware:T}=s.clientMiddlewareModule?await import(s.clientMiddlewareModule):await _();return Ee(T,"No `clientMiddleware` export found"),T}:void 0,shouldRevalidate:async()=>{let T=await _();return Tn(w.path,T,s,n,u)},handle:async()=>(await _()).handle,Component:async()=>(await _()).Component,ErrorBoundary:s.hasErrorBoundary?async()=>(await _()).ErrorBoundary:void 0}}let x=Tr(e,t,r,n,a,s.id,i,u);return x.length>0&&(w.children=x),w})}function Tn(e,t,r,n,a){if(a)return jl(r.id,t.shouldRevalidate,a);if(!n&&r.hasLoader&&!r.hasClientLoader){let o=e?Fn(e)[1].map(u=>u.paramName):[];const i=u=>o.some(s=>u.currentParams[s]!==u.nextParams[s]);if(t.shouldRevalidate){let u=t.shouldRevalidate;return s=>u({...s,defaultShouldRevalidate:i(s)})}else return u=>i(u)}return t.shouldRevalidate}function jl(e,t,r){let n=!1;return a=>n?t?t(a):a.defaultShouldRevalidate:(n=!0,r.has(e))}async function Ul(e,t){let r=pa(e,t),n=Dl(e),a=await r;return await Promise.all([n,va(e,a)]),{Component:Ra(a),ErrorBoundary:a.ErrorBoundary,clientMiddleware:a.clientMiddleware,clientAction:a.clientAction,clientLoader:a.clientLoader,handle:a.handle,links:a.links,meta:a.meta,shouldRevalidate:a.shouldRevalidate}}function Ra(e){if(e.default==null)return;if(!(typeof e.default=="object"&&Object.keys(e.default).length===0))return e.default}function Hl(e,t,r,n){return n&&e!=="root"||t!=null&&(t.hydrate===!0||r!==!0)}var Nt=new Set,zl=1e3,$t=new Set,Bl=7680;function Mr(e,t){return e.mode==="lazy"&&t===!0}function Wl({sri:e,...t},r){let n=new Set(r.state.matches.map(u=>u.route.id)),a=r.state.location.pathname.split("/").filter(Boolean),o=["/"];for(a.pop();a.length>0;)o.push(`/${a.join("/")}`),a.pop();o.forEach(u=>{let s=Ne(r.routes,u,r.basename);s&&s.forEach(l=>n.add(l.route.id))});let i=[...n].reduce((u,s)=>Object.assign(u,{[s]:t.routes[s]}),{});return{...t,routes:i,sri:e?!0:void 0}}function Ps(e,t,r,n,a,o,i){if(Mr(a,n))return async({path:u,patch:s,signal:l,fetcherKey:d})=>{if($t.has(u))return;let{state:c}=e();await ba([u],d?window.location.href:Pe(c.navigation.location||c.location),t,r,n,o,i,a.manifestPath,s,l)}}function _s(e,t,r,n,a,o){h.useEffect(()=>{if(!Mr(a,n)||window.navigator?.connection?.saveData===!0)return;function i(d){let c=d.tagName==="FORM"?d.getAttribute("action"):d.getAttribute("href");if(!c)return;let p=d.tagName==="A"?d.pathname:new URL(c,window.location.origin).pathname;$t.has(p)||Nt.add(p)}async function u(){document.querySelectorAll("a[data-discover], form[data-discover]").forEach(i);let d=Array.from(Nt.keys()).filter(c=>$t.has(c)?(Nt.delete(c),!1):!0);if(d.length!==0)try{await ba(d,null,t,r,n,o,e.basename,a.manifestPath,e.patchRoutes)}catch(c){console.error("Failed to fetch manifest patches",c)}}let s=Jl(u,100);u();let l=new MutationObserver(()=>s());return l.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-discover","href","action"]}),()=>l.disconnect()},[n,o,t,r,e,a])}function Yl(e,t){let r=e||"/__manifest";return t==null?r:`${t}${r}`.replace(/\/+/g,"/")}var lr="react-router-manifest-version";async function ba(e,t,r,n,a,o,i,u,s,l){const d=new URLSearchParams;d.set("paths",e.sort().join(",")),d.set("version",r.version);let c=new URL(Yl(u,i),window.location.origin);if(c.search=d.toString(),c.toString().length>Bl){Nt.clear();return}let p;try{let w=await fetch(c,{signal:l});if(w.ok){if(w.status===204&&w.headers.has("X-Remix-Reload-Document")){if(!t){console.warn("Detected a manifest version mismatch during eager route discovery. The next navigation/fetch to an undiscovered route will result in a new document navigation to sync up with the latest manifest.");return}try{if(sessionStorage.getItem(lr)===r.version){console.error("Unable to discover routes due to manifest version mismatch.");return}sessionStorage.setItem(lr,r.version)}catch{}window.location.href=t,console.warn("Detected manifest version mismatch, reloading..."),await new Promise(()=>{})}else if(w.status>=400)throw new Error(await w.text())}else throw new Error(`${w.status} ${w.statusText}`);try{sessionStorage.removeItem(lr)}catch{}p=await w.json()}catch(w){if(l?.aborted)return;throw w}let g=new Set(Object.keys(r.routes)),R=Object.values(p).reduce((w,x)=>(x&&!g.has(x.id)&&(w[x.id]=x),w),{});Object.assign(r.routes,R),e.forEach(w=>Vl(w,$t));let b=new Set;Object.values(R).forEach(w=>{w&&(!w.parentId||!R[w.parentId])&&b.add(w.parentId)}),b.forEach(w=>s(w||null,Tr(R,n,null,a,o,w)))}function Vl(e,t){if(t.size>=zl){let r=t.values().next().value;t.delete(r)}t.add(e)}function Jl(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...n),t)}}function Dr(){let e=h.useContext(Ge);return Ee(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Bt(){let e=h.useContext(et);return Ee(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Wt=h.createContext(void 0);Wt.displayName="FrameworkContext";function tt(){let e=h.useContext(Wt);return Ee(e,"You must render this element inside a <HydratedRouter> element"),e}function Gl(e,t){let r=h.useContext(Wt),[n,a]=h.useState(!1),[o,i]=h.useState(!1),{onFocus:u,onBlur:s,onMouseEnter:l,onMouseLeave:d,onTouchStart:c}=t,p=h.useRef(null);h.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let b=x=>{x.forEach(S=>{i(S.isIntersecting)})},w=new IntersectionObserver(b,{threshold:.5});return p.current&&w.observe(p.current),()=>{w.disconnect()}}},[e]),h.useEffect(()=>{if(n){let b=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(b)}}},[n]);let g=()=>{a(!0)},R=()=>{a(!1),i(!1)};return r?e!=="intent"?[o,p,{}]:[o,p,{onFocus:st(u,g),onBlur:st(s,R),onMouseEnter:st(l,g),onMouseLeave:st(d,R),onTouchStart:st(c,g)}]:[!1,p,{}]}function st(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Or(e,t,r){if(r&&!Ft)return[e[0]];if(t){let n=e.findIndex(a=>t[a.route.id]!==void 0);return e.slice(0,n+1)}return e}var Mn="data-react-router-critical-css";function Ts({nonce:e,crossOrigin:t}){let{isSpaMode:r,manifest:n,routeModules:a,criticalCss:o}=tt(),{errors:i,matches:u}=Bt(),s=Or(u,i,r),l=h.useMemo(()=>Ml(s,a,n),[s,a,n]);return h.createElement(h.Fragment,null,typeof o=="string"?h.createElement("style",{[Mn]:"",nonce:e,dangerouslySetInnerHTML:{__html:o}}):null,typeof o=="object"?h.createElement("link",{[Mn]:"",rel:"stylesheet",href:o.href,nonce:e,crossOrigin:t}):null,l.map(({key:d,link:c})=>Pr(c)?h.createElement(Sa,{key:d,nonce:e,...c,crossOrigin:c.crossOrigin??t}):h.createElement("link",{key:d,nonce:e,...c,crossOrigin:c.crossOrigin??t})))}function Sa({page:e,...t}){let{router:r}=Dr(),n=h.useMemo(()=>Ne(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?h.createElement(Kl,{page:e,matches:n,...t}):null}function Xl(e){let{manifest:t,routeModules:r}=tt(),[n,a]=h.useState([]);return h.useEffect(()=>{let o=!1;return kl(e,t,r).then(i=>{o||a(i)}),()=>{o=!0}},[e,t,r]),n}function Kl({page:e,matches:t,...r}){let n=Te(),{future:a,manifest:o,routeModules:i}=tt(),{basename:u}=Dr(),{loaderData:s,matches:l}=Bt(),d=h.useMemo(()=>_n(e,t,l,o,n,"data"),[e,t,l,o,n]),c=h.useMemo(()=>_n(e,t,l,o,n,"assets"),[e,t,l,o,n]),p=h.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let b=new Set,w=!1;if(t.forEach(S=>{let _=o.routes[S.route.id];!_||!_.hasLoader||(!d.some(T=>T.route.id===S.route.id)&&S.route.id in s&&i[S.route.id]?.shouldRevalidate||_.hasClientLoader?w=!0:b.add(S.route.id))}),b.size===0)return[];let x=ma(e,u,a.unstable_trailingSlashAwareDataRequests,"data");return w&&b.size>0&&x.searchParams.set("_routes",t.filter(S=>b.has(S.route.id)).map(S=>S.route.id).join(",")),[x.pathname+x.search]},[u,a.unstable_trailingSlashAwareDataRequests,s,n,o,d,t,e,i]),g=h.useMemo(()=>_r(c,o),[c,o]),R=Xl(c);return h.createElement(h.Fragment,null,p.map(b=>h.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...r})),g.map(b=>h.createElement("link",{key:b,rel:"modulepreload",href:b,...r})),R.map(({key:b,link:w})=>h.createElement("link",{key:b,nonce:r.nonce,...w,crossOrigin:w.crossOrigin??r.crossOrigin})))}function Ms(){let{isSpaMode:e,routeModules:t}=tt(),{errors:r,matches:n,loaderData:a}=Bt(),o=Te(),i=Or(n,r,e),u=null;r&&(u=r[i[i.length-1].route.id]);let s=[],l=null,d=[];for(let c=0;c<i.length;c++){let p=i[c],g=p.route.id,R=a[g],b=p.params,w=t[g],x=[],S={id:g,data:R,loaderData:R,meta:[],params:p.params,pathname:p.pathname,handle:p.route.handle,error:u};if(d[c]=S,w?.meta?x=typeof w.meta=="function"?w.meta({data:R,loaderData:R,params:b,location:o,matches:d,error:u}):Array.isArray(w.meta)?[...w.meta]:w.meta:l&&(x=[...l]),x=x||[],!Array.isArray(x))throw new Error("The route at "+p.route.path+` returns an invalid value. All route meta functions must return an array of meta objects.
13
-
14
- To reference the meta function API, see https://reactrouter.com/start/framework/route-module#meta`);S.meta=x,d[c]=S,s=[...x],l=s}return h.createElement(h.Fragment,null,s.flat().map(c=>{if(!c)return null;if("tagName"in c){let{tagName:p,...g}=c;if(!ql(p))return console.warn(`A meta object uses an invalid tagName: ${p}. Expected either 'link' or 'meta'`),null;let R=p;return h.createElement(R,{key:JSON.stringify(g),...g})}if("title"in c)return h.createElement("title",{key:"title"},String(c.title));if("charset"in c&&(c.charSet??(c.charSet=c.charset),delete c.charset),"charSet"in c&&c.charSet!=null)return typeof c.charSet=="string"?h.createElement("meta",{key:"charSet",charSet:c.charSet}):null;if("script:ld+json"in c)try{let p=JSON.stringify(c["script:ld+json"]);return h.createElement("script",{key:`script:ld+json:${p}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:mr(p)}})}catch{return null}return h.createElement("meta",{key:JSON.stringify(c),...c})}))}function ql(e){return typeof e=="string"&&/^(meta|link)$/.test(e)}var Ft=!1;function Ql(){Ft=!0}function Zl(e){let{manifest:t,serverHandoffString:r,isSpaMode:n,renderMeta:a,routeDiscovery:o,ssr:i}=tt(),{router:u,static:s,staticContext:l}=Dr(),{matches:d}=Bt(),c=ra(),p=Mr(o,i);a&&(a.didRenderScripts=!0);let g=Or(d,null,n);h.useEffect(()=>{Ql()},[]);let R=h.useMemo(()=>{if(c)return null;let S=l?`window.__reactRouterContext = ${r};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",_=s?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${p?"":`import ${JSON.stringify(t.url)}`};
15
- ${g.map((T,M)=>{let O=`route${M}`,k=t.routes[T.route.id];Ee(k,`Route ${T.route.id} not found in manifest`);let{clientActionModule:v,clientLoaderModule:B,clientMiddlewareModule:G,hydrateFallbackModule:re,module:X}=k,se=[...v?[{module:v,varName:`${O}_clientAction`}]:[],...B?[{module:B,varName:`${O}_clientLoader`}]:[],...G?[{module:G,varName:`${O}_clientMiddleware`}]:[],...re?[{module:re,varName:`${O}_HydrateFallback`}]:[],{module:X,varName:`${O}_main`}];if(se.length===1)return`import * as ${O} from ${JSON.stringify(X)};`;let te=se.map(q=>`import * as ${q.varName} from "${q.module}";`).join(`
16
- `),J=`const ${O} = {${se.map(q=>`...${q.varName}`).join(",")}};`;return[te,J].join(`
17
- `)}).join(`
18
- `)}
19
- ${p?`window.__reactRouterManifest = ${JSON.stringify(Wl(t,u),null,2)};`:""}
20
- window.__reactRouterRouteModules = {${g.map((T,M)=>`${JSON.stringify(T.route.id)}:route${M}`).join(",")}};
21
-
22
- import(${JSON.stringify(t.entry.module)});`:" ";return h.createElement(h.Fragment,null,h.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:S},type:void 0}),h.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:_},type:"module",async:!0}))},[]),b=Ft||c?[]:es(t.entry.imports.concat(_r(g,t,{includeHydrateFallback:!0}))),w=typeof t.sri=="object"?t.sri:{};return fr(!c,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),Ft||c?null:h.createElement(h.Fragment,null,typeof t.sri=="object"?h.createElement("script",{...e,"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:w})}}):null,p?null:h.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:w[t.url],suppressHydrationWarning:!0}),h.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:w[t.entry.module],suppressHydrationWarning:!0}),b.map(x=>h.createElement("link",{key:x,rel:"modulepreload",href:x,crossOrigin:e.crossOrigin,integrity:w[x],suppressHydrationWarning:!0})),R)}function es(e){return[...new Set(e)]}function ts(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Ds=class extends h.Component{constructor(e){super(e),this.state={error:e.error||null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error||null,location:e.location}:{error:e.error||t.error,location:t.location}}render(){return this.state.error?h.createElement(La,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function La({error:e,isOutsideRemixApp:t}){console.error(e);let r=h.createElement("script",{dangerouslySetInnerHTML:{__html:`
23
- console.log(
24
- "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
25
- );
26
- `}});if(Je(e))return h.createElement(yr,{title:"Unhandled Thrown Response!"},h.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),r);let n;if(e instanceof Error)n=e;else{let a=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);n=new Error(a)}return h.createElement(yr,{title:"Application Error!",isOutsideRemixApp:t},h.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),h.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},n.stack),r)}function yr({title:e,renderScripts:t,isOutsideRemixApp:r,children:n}){let{routeModules:a}=tt();return a.root?.Layout&&!r?n:h.createElement("html",{lang:"en"},h.createElement("head",null,h.createElement("meta",{charSet:"utf-8"}),h.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),h.createElement("title",null,e)),h.createElement("body",null,h.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},n,t?h.createElement(Zl,null):null)))}var rs=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{rs&&(window.__reactRouterVersion="7.13.1")}catch{}var Ca=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xa=h.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:o,replace:i,unstable_mask:u,state:s,target:l,to:d,preventScrollReset:c,viewTransition:p,unstable_defaultShouldRevalidate:g,...R},b){let{basename:w,navigator:x,unstable_useTransitions:S}=h.useContext(Re),_=typeof d=="string"&&Ca.test(d),T=zn(d,w);d=T.to;let M=pi(d,{relative:a}),O=Te(),k=null;if(u){let J=jt(u,[],O.unstable_mask?O.unstable_mask.pathname:"/",!0);w!=="/"&&(J.pathname=J.pathname==="/"?w:xe([w,J.pathname])),k=x.createHref(J)}let[v,B,G]=Gl(n,R),re=ls(d,{replace:i,unstable_mask:u,state:s,target:l,preventScrollReset:c,relative:a,viewTransition:p,unstable_defaultShouldRevalidate:g,unstable_useTransitions:S});function X(J){t&&t(J),J.defaultPrevented||re(J)}let se=!(T.isExternal||o),te=h.createElement("a",{...R,...G,href:(se?k:void 0)||T.absoluteURL||M,onClick:se?X:t,ref:ts(b,B),target:l,"data-discover":!_&&r==="render"?"true":void 0});return v&&!_?h.createElement(h.Fragment,null,te,h.createElement(Sa,{page:M})):te});xa.displayName="Link";var ns=h.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:a=!1,style:o,to:i,viewTransition:u,children:s,...l},d){let c=vt(i,{relative:l.relative}),p=Te(),g=h.useContext(et),{navigator:R,basename:b}=h.useContext(Re),w=g!=null&&ms(c)&&u===!0,x=R.encodeLocation?R.encodeLocation(c).pathname:c.pathname,S=p.pathname,_=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;r||(S=S.toLowerCase(),_=_?_.toLowerCase():null,x=x.toLowerCase()),_&&b&&(_=Se(_,b)||_);const T=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let M=S===x||!a&&S.startsWith(x)&&S.charAt(T)==="/",O=_!=null&&(_===x||!a&&_.startsWith(x)&&_.charAt(x.length)==="/"),k={isActive:M,isPending:O,isTransitioning:w},v=M?t:void 0,B;typeof n=="function"?B=n(k):B=[n,M?"active":null,O?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let G=typeof o=="function"?o(k):o;return h.createElement(xa,{...l,"aria-current":v,className:B,ref:d,style:G,to:i,viewTransition:u},typeof s=="function"?s(k):s)});ns.displayName="NavLink";var as=h.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:o,method:i=kt,action:u,onSubmit:s,relative:l,preventScrollReset:d,viewTransition:c,unstable_defaultShouldRevalidate:p,...g},R)=>{let{unstable_useTransitions:b}=h.useContext(Re),w=cs(),x=ds(u,{relative:l}),S=i.toLowerCase()==="get"?"get":"post",_=typeof u=="string"&&Ca.test(u),T=M=>{if(s&&s(M),M.defaultPrevented)return;M.preventDefault();let O=M.nativeEvent.submitter,k=O?.getAttribute("formmethod")||i,v=()=>w(O||M.currentTarget,{fetcherKey:t,method:k,navigate:r,replace:a,state:o,relative:l,preventScrollReset:d,viewTransition:c,unstable_defaultShouldRevalidate:p});b&&r!==!1?h.startTransition(()=>v()):v()};return h.createElement("form",{ref:R,method:S,action:x,onSubmit:n?s:T,...g,"data-discover":!_&&e==="render"?"true":void 0})});as.displayName="Form";function os({getKey:e,storageKey:t,...r}){let n=h.useContext(Wt),{basename:a}=h.useContext(Re),o=Te(),i=xr();fs({getKey:e,storageKey:t});let u=h.useMemo(()=>{if(!n||!e)return null;let l=gr(o,i,a,e);return l!==o.key?l:null},[]);if(!n||n.isSpaMode)return null;let s=((l,d)=>{if(!window.history.state||!window.history.state.key){let c=Math.random().toString(32).slice(2);window.history.replaceState({key:c},"")}try{let p=JSON.parse(sessionStorage.getItem(l)||"{}")[d||window.history.state.key];typeof p=="number"&&window.scrollTo(0,p)}catch(c){console.error(c),sessionStorage.removeItem(l)}}).toString();return h.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${s})(${mr(JSON.stringify(t||vr))}, ${mr(JSON.stringify(u))})`}})}os.displayName="ScrollRestoration";function Pa(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function kr(e){let t=h.useContext(Ge);return V(t,Pa(e)),t}function is(e){let t=h.useContext(et);return V(t,Pa(e)),t}function ls(e,{target:t,replace:r,unstable_mask:n,state:a,preventScrollReset:o,relative:i,viewTransition:u,unstable_defaultShouldRevalidate:s,unstable_useTransitions:l}={}){let d=yi(),c=Te(),p=vt(e,{relative:i});return h.useCallback(g=>{if(Vi(g,t)){g.preventDefault();let R=r!==void 0?r:Pe(c)===Pe(p),b=()=>d(e,{replace:R,unstable_mask:n,state:a,preventScrollReset:o,relative:i,viewTransition:u,unstable_defaultShouldRevalidate:s});l?h.startTransition(()=>b()):b()}},[c,d,p,r,n,a,t,e,o,i,u,s,l])}var ss=0,us=()=>`__${String(++ss)}__`;function cs(){let{router:e}=kr("useSubmit"),{basename:t}=h.useContext(Re),r=Ti(),n=e.fetch,a=e.navigate;return h.useCallback(async(o,i={})=>{let{action:u,method:s,encType:l,formData:d,body:c}=Xi(o,t);if(i.navigate===!1){let p=i.fetcherKey||us();await n(p,r,i.action||u,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:d,body:c,formMethod:i.method||s,formEncType:i.encType||l,flushSync:i.flushSync})}else await a(i.action||u,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:d,body:c,formMethod:i.method||s,formEncType:i.encType||l,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[n,a,t,r])}function ds(e,{relative:t}={}){let{basename:r}=h.useContext(Re),n=h.useContext(_e);V(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...vt(e||".",{relative:t})},i=Te();if(e==null){o.search=i.search;let u=new URLSearchParams(o.search),s=u.getAll("index");if(s.some(d=>d==="")){u.delete("index"),s.filter(c=>c).forEach(c=>u.append("index",c));let d=u.toString();o.search=d?`?${d}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:xe([r,o.pathname])),Pe(o)}var vr="react-router-scroll-positions",Dt={};function gr(e,t,r,n){let a=null;return n&&(r!=="/"?a=n({...e,pathname:Se(e.pathname,r)||e.pathname},t):a=n(e,t)),a==null&&(a=e.key),a}function fs({getKey:e,storageKey:t}={}){let{router:r}=kr("useScrollRestoration"),{restoreScrollPosition:n,preventScrollReset:a}=is("useScrollRestoration"),{basename:o}=h.useContext(Re),i=Te(),u=xr(),s=Mi();h.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),hs(h.useCallback(()=>{if(s.state==="idle"){let l=gr(i,u,o,e);Dt[l]=window.scrollY}try{sessionStorage.setItem(t||vr,JSON.stringify(Dt))}catch(l){le(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${l}).`)}window.history.scrollRestoration="auto"},[s.state,e,o,i,u,t])),typeof document<"u"&&(h.useLayoutEffect(()=>{try{let l=sessionStorage.getItem(t||vr);l&&(Dt=JSON.parse(l))}catch{}},[t]),h.useLayoutEffect(()=>{let l=r?.enableScrollRestoration(Dt,()=>window.scrollY,e?(d,c)=>gr(d,c,o,e):void 0);return()=>l&&l()},[r,o,e]),h.useLayoutEffect(()=>{if(n!==!1){if(typeof n=="number"){window.scrollTo(0,n);return}try{if(i.hash){let l=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(l){l.scrollIntoView();return}}}catch{le(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}a!==!0&&window.scrollTo(0,0)}},[i,n,a]))}function hs(e,t){let{capture:r}={};h.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}function ms(e,{relative:t}={}){let r=h.useContext(Sr);V(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=kr("useViewTransitionState"),a=vt(e,{relative:t});if(!r.isTransitioning)return!1;let o=Se(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=Se(r.nextLocation.pathname,n)||r.nextLocation.pathname;return It(a.pathname,i)!=null||It(a.pathname,o)!=null}var ps=Qa();const Os=Dn(ps);export{ys as A,Ka as B,Os as C,Ue as E,Wt as F,Ts as L,Ms as M,El as N,Ss as O,Xa as R,os as S,Qa as a,h as b,V as c,Ds as d,bs as e,ps as f,Dn as g,Tl as h,Je as i,Tr as j,ws as k,Ps as l,Ne as m,Cs as n,gs as o,xs as p,Es as q,On as r,Hl as s,Rs as t,_s as u,vs as v,Ls as w,Zl as x,Te as y,yi as z};
@@ -1 +0,0 @@
1
- import{v as s,w as L,b as v,y as g,z as f,O as C}from"./index-CtPqstFl.js";import{s as p,B as a,b as t,d as m}from"./playground-Hl52p9f5.js";import{D as M,L as n}from"./index-CQc11yq_.js";import{u as R}from"./auth-CD1rXHzz.js";import{L as d}from"./List-juBjUmfP.js";import{L as o,a as r,b as l}from"./ListItemText-DgWZmgzc.js";import{D as j}from"./Divider-B_Wx9srO.js";import"./listItemIconClasses-39Itzgzt.js";import"./mergeSlotProps-DptgQgAT.js";import"./Modal-BwXR_5Bh.js";import"./auth-GyTIVKy5.js";import"./listItemTextClasses-EQFLPLzt.js";import"./dividerClasses-CIiqeEPO.js";const k=p(a)(({theme:e})=>({backgroundColor:e.palette.background.default})),D=p(a)(({open:e})=>({padding:e?"0 0 0 210px":"0 0 0 80px",height:"100vh"})),S=p(a)({}),V=e=>s.jsx(M,{...e,children:e.children}),w=t([s.jsx("path",{d:"M5.7 6.71c-.39.39-.39 1.02 0 1.41L9.58 12 5.7 15.88c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41L7.12 6.71c-.39-.39-1.03-.39-1.42 0"},"0"),s.jsx("path",{d:"M12.29 6.71c-.39.39-.39 1.02 0 1.41L16.17 12l-3.88 3.88c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41L13.7 6.7c-.38-.38-1.02-.38-1.41.01"},"1")]),z=t([s.jsx("path",{d:"M18.29 17.29c.39-.39.39-1.02 0-1.41L14.42 12l3.88-3.88c.39-.39.39-1.02 0-1.41a.996.996 0 0 0-1.41 0L12.3 11.3c-.39.39-.39 1.02 0 1.41l4.59 4.59c.38.38 1.01.38 1.4-.01"},"0"),s.jsx("path",{d:"M11.7 17.29c.39-.39.39-1.02 0-1.41L7.83 12l3.88-3.88c.39-.39.39-1.02 0-1.41a.996.996 0 0 0-1.41 0L5.71 11.3c-.39.39-.39 1.02 0 1.41l4.59 4.59c.38.38 1.01.38 1.4-.01"},"1")]),A=t(s.jsx("path",{d:"m18.15 1.35-4 4q-.15.15-.15.36v8.17c0 .43.51.66.83.37l4-3.6c.11-.09.17-.23.17-.37V1.71c0-.45-.54-.67-.85-.36m4.32 3.85c-.47-.24-.96-.44-1.47-.61v12.03c-1.14-.41-2.31-.62-3.5-.62-1.9 0-3.78.54-5.5 1.58V5.48C10.38 4.55 8.51 4 6.5 4c-1.79 0-3.48.44-4.97 1.2-.33.16-.53.51-.53.88v12.08c0 .76.81 1.23 1.48.87C3.69 18.4 5.05 18 6.5 18c2.07 0 3.98.82 5.5 2 1.52-1.18 3.43-2 5.5-2 1.45 0 2.81.4 4.02 1.04.67.36 1.48-.11 1.48-.87V6.08c0-.37-.2-.72-.53-.88"})),B=t([s.jsx("circle",{cx:"7.2",cy:"14.4",r:"3.2"},"0"),s.jsx("circle",{cx:"14.8",cy:"18",r:"2"},"1"),s.jsx("circle",{cx:"15.2",cy:"8.8",r:"4.8"},"2")]),H=t(s.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m-.22-13h-.06c-.4 0-.72.32-.72.72v4.72c0 .35.18.68.49.86l4.15 2.49c.34.2.78.1.98-.24.21-.34.1-.79-.25-.99l-3.87-2.3V7.72c0-.4-.32-.72-.72-.72"})),K=t([s.jsx("path",{d:"M5 5h6c.55 0 1-.45 1-1s-.45-1-1-1H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h6c.55 0 1-.45 1-1s-.45-1-1-1H5z"},"0"),s.jsx("path",{d:"m20.65 11.65-2.79-2.79c-.32-.32-.86-.1-.86.35V11h-7c-.55 0-1 .45-1 1s.45 1 1 1h7v1.79c0 .45.54.67.85.35l2.79-2.79c.2-.19.2-.51.01-.7"},"1")]),O=t(s.jsx("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5s-3 1.34-3 3 1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V18c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-1.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05.02.01.03.03.04.04 1.14.83 1.93 1.94 1.93 3.41V18c0 .35-.07.69-.18 1H22c.55 0 1-.45 1-1v-1.5c0-2.33-4.67-3.5-7-3.5"})),T=t(s.jsx("path",{d:"M12.65 10C11.7 7.31 8.9 5.5 5.77 6.12c-2.29.46-4.15 2.29-4.63 4.58C.32 14.57 3.26 18 7 18c2.61 0 4.83-1.67 5.65-4H17v2c0 1.1.9 2 2 2s2-.9 2-2v-2c1.1 0 2-.9 2-2s-.9-2-2-2zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"})),N=[{label:"Controllers",Icon:s.jsx(B,{}),path:"/"},{label:"Models",Icon:s.jsx(A,{}),path:"/database-model"},{label:"Scheduler",Icon:s.jsx(H,{}),path:"/scheduler"}],P=[{label:"Users",Icon:s.jsx(O,{}),path:"/user-management"},{label:"API Keys",Icon:s.jsx(T,{}),path:"/key-management"}],s1=L(()=>{const[e,u]=v.useState(!1),i=g(),b=f(),{logout:y}=R(),I=()=>u(c=>!c),h=c=>{b(c)};return s.jsxs(k,{children:[s.jsx(S,{children:s.jsxs(V,{variant:"permanent",open:e,children:[s.jsx(a,{sx:{px:2,py:1,mt:3,display:e?"block":"none"},children:s.jsx(m,{variant:"subtitle2",sx:{color:"text.disabled",fontWeight:"bold",textTransform:"capitalize"},children:"Database"})}),s.jsx(d,{children:N.map((c,x)=>s.jsx(o,{sx:{mb:.5,p:"0 8px"},children:s.jsxs(r,{selected:i.pathname===c.path||c.path==="/"&&i.pathname==="",onClick:()=>h(c.path),children:[s.jsx(n,{children:c.Icon}),s.jsx(l,{primary:c.label})]})},x))}),s.jsx(j,{sx:{my:1}}),s.jsx(a,{sx:{px:2,py:1,display:e?"block":"none"},children:s.jsx(m,{variant:"subtitle2",sx:{color:"text.disabled",fontWeight:"bold",textTransform:"capitalize"},children:"Gerenciamento"})}),s.jsx(d,{children:P.map((c,x)=>s.jsx(o,{sx:{mb:.5,p:"0 8px"},children:s.jsxs(r,{selected:i.pathname===c.path,onClick:()=>h(c.path),children:[s.jsx(n,{children:c.Icon}),s.jsx(l,{primary:c.label})]})},x))}),s.jsx(j,{sx:{mt:"auto",mb:1}}),s.jsxs(d,{style:{display:"flex",flexDirection:"column"},children:[s.jsx(o,{sx:{mb:.5,p:"0 8px"},children:s.jsxs(r,{onClick:y,children:[s.jsx(n,{children:s.jsx(K,{})}),s.jsx(l,{primary:"Sair"})]})}),s.jsx(o,{sx:{mb:.5,p:"0 8px"},children:s.jsxs(r,{onClick:I,children:[s.jsx(n,{children:e?s.jsx(z,{}):s.jsx(w,{})}),s.jsx(l,{primary:"Fechar"})]})})]})]})}),s.jsx(D,{open:e,children:s.jsx(C,{})})]})});export{s1 as default};
@@ -1 +0,0 @@
1
- import{v as e,w as Z,b as o}from"./index-CtPqstFl.js";import{A as ee,L as I,S as te,a as L}from"./index-CQc11yq_.js";import{s as i,B as l,r as re,o as se,e as ne,f as oe,a as ae,l as ie,b as T,h as le,C as q,d as de,i as A}from"./playground-Hl52p9f5.js";import{B as G}from"./Button-DLrxHRm7.js";import{a as ce,L as m,b as g}from"./ListItemText-DgWZmgzc.js";import{u as B}from"./use-request-BZNkzlTr.js";import{u as ue}from"./toast-CsAH5FIf.js";import{L as E}from"./List-juBjUmfP.js";import"./listItemIconClasses-39Itzgzt.js";import"./mergeSlotProps-DptgQgAT.js";import"./Modal-BwXR_5Bh.js";import"./listItemTextClasses-EQFLPLzt.js";const N=r=>e.jsx(ee,{...r,mode:"json",theme:"dracula",name:"readonly-json",fontSize:14,width:"100%",highlightActiveLine:!1,setOptions:{showLineNumbers:!0,tabSize:2},editorProps:{$blockScrolling:!0}}),pe=i(l)({display:"flex",height:"100%"}),he=i(l)(({theme:r})=>({height:"100%",width:"13rem",minWidth:"13rem",padding:"2rem 10px 0 0"})),xe=i(l)({height:"100vh",width:"100%",overflow:"hidden"}),J=i(l)(({theme:r})=>({height:"3rem",display:"flex",justifyContent:"flex-end",alignItems:"center",padding:"0 5px"})),C=i(l)(({theme:r,isBackgroundActive:c})=>({padding:"10px",height:"100%",width:"100%",...c&&{borderRadius:"20px 20px 0 0",backgroundColor:r.palette.background.paper,".ace-dracula":{backgroundColor:r.palette.background.paper},".ace-dracula .ace_gutter":{backgroundColor:r.palette.background.paper}}})),me=i(l)(({status:r,theme:c})=>({marginRight:"1rem",padding:"4px 15px",borderRadius:"3px",backgroundColor:ae[500],...r>=200&&r<300&&{backgroundColor:oe[500]},...r>=300&&r<400&&{backgroundColor:ne[500]},...r>=400&&r<500&&{backgroundColor:se[500]},...r>=500&&r<600&&{backgroundColor:re[500]}})),ge=i(l)({padding:"5px 10px 10px 10px"}),j=i(G)({marginLeft:"0.5rem",width:"4.5rem"}),f=i(ce)(({selected:r,theme:c})=>({...r&&{backgroundColor:`${ie(c.palette.background.default,.1)} !important`,".MuiListItemText-root":{color:"white"}}})),z=T(e.jsx("circle",{cx:"12",cy:"12",r:"8"})),je=T(e.jsx("path",{d:"m3.4 20.4 17.45-7.48c.81-.35.81-1.49 0-1.84L3.4 3.6c-.66-.29-1.39.2-1.39.91L2 9.12c0 .5.37.93.87.99L17 12 2.87 13.88c-.5.07-.87.5-.87 1l.01 4.61c0 .71.73 1.2 1.39.91"}));function Ie(){return[{title:"Opposer - Playground"}]}const Le=Z(()=>{const[r,c]=o.useState({controllers:{},models:{}}),[b,k]=o.useState("models"),[s,W]=o.useState(void 0),[R,D]=o.useState(""),[n,M]=o.useState(""),[y,$]=o.useState(0),[F,O]=o.useState(""),[P,u]=o.useState(""),{showToast:v}=ue(),[V,H]=B(async()=>{const t=await A.getAppMap();return t.success&&t.data?c(t.data):v(t.error||"Erro ao carregar mapa da aplicação","error"),null}),[_,K]=B(async()=>{const t=await A.sendRequestOpposer(P);t.status&&$(t.status),t.success&&t.data||v(t.error||"Erro na requisição","error"),O(JSON.stringify(t.data,null,2))}),Q=t=>u(t),U=(t,a)=>{k("controllers"),M(t),D(a)},X=t=>{k("models"),M(t)},x=t=>{W(t)};return o.useEffect(()=>{H()},[]),o.useEffect(()=>{if(n)if(b==="models"){const a=(r.models[n]||{model:{}}).model,p=Object.keys(a).reduce((h,d)=>(h[d]=a[d]==="number"?0:a[d]==="boolean"?!1:"",h),{});s==="get"&&u(JSON.stringify({model:n,method:s,query:{filter:{}}},null,2)),s==="insert"&&u(JSON.stringify({model:n,method:s,data:p},null,2)),s==="update"&&u(JSON.stringify({model:n,method:s,filter:{},data:p},null,2)),s==="delete"&&u(JSON.stringify({model:n,method:s,filter:{}},null,2))}else{const S=(r.controllers[R]||{})[n]?.payload||{},Y=Object.keys(S).reduce((h,d)=>(h[d]=S[d]==="number"?0:S[d]==="boolean"?!1:"",h),{});u(JSON.stringify({controller:R,method:n,payload:Y},null,2))}},[s,n,b,r]),e.jsxs(pe,{children:[e.jsx(le,{sx:t=>({zIndex:t.zIndex.drawer+1}),open:V,children:e.jsx(q,{size:50})}),e.jsxs(he,{children:[e.jsxs(E,{children:[e.jsx(m,{disablePadding:!0,disableGutters:!0,children:e.jsxs(f,{disabled:!0,children:[e.jsx(I,{children:e.jsx(z,{color:"primary"})}),e.jsx(g,{primary:"Models"})]})}),Object.keys(r.models).map((t,a)=>e.jsx(m,{disablePadding:!0,disableGutters:!0,children:e.jsx(f,{selected:n===t,onClick:()=>X(t),children:e.jsx(g,{slotProps:{primary:{noWrap:!0}},inset:!0,primary:t})})},a))]}),e.jsx(E,{children:Object.keys(r.controllers).map((t,a)=>e.jsxs("div",{children:[e.jsx(m,{disablePadding:!0,disableGutters:!0,children:e.jsxs(f,{disabled:!0,children:[e.jsx(I,{children:e.jsx(z,{color:"primary"})}),e.jsx(g,{slotProps:{primary:{noWrap:!0}},primary:t})]})}),Object.keys(r.controllers[t]).map((p,w)=>e.jsx(m,{disablePadding:!0,disableGutters:!0,children:e.jsx(f,{selected:n===p,onClick:()=>U(p,t),children:e.jsx(g,{slotProps:{primary:{noWrap:!0}},inset:!0,primary:p})})},w))]},a))})]}),e.jsx(xe,{children:e.jsxs(te,{children:[e.jsx(L,{children:e.jsxs(C,{sx:{padding:"30px 10px 0 10px"},children:[b==="models"&&e.jsxs(ge,{children:[e.jsx(j,{variant:s==="get"?"contained":"text",color:"inherit",onClick:()=>x("get"),children:"Obter"}),e.jsx(j,{variant:s==="insert"?"contained":"text",color:"inherit",onClick:()=>x("insert"),children:"Inserir"}),e.jsx(j,{variant:s==="update"?"contained":"text",color:"inherit",onClick:()=>x("update"),children:"Atualizar"}),e.jsx(j,{variant:s==="delete"?"contained":"text",color:"inherit",onClick:()=>x("delete"),children:"Deletar"})]}),e.jsxs(C,{isBackgroundActive:!0,children:[e.jsx(J,{children:e.jsx(G,{variant:"contained",disableElevation:!0,startIcon:e.jsx(je,{}),onClick:K,children:"Send"})}),e.jsx(N,{value:P,onChange:Q})]})]})}),e.jsx(L,{children:e.jsxs(C,{sx:{padding:"40px 10px 0 10px"},children:[e.jsx(J,{children:y>0&&e.jsx(me,{status:y,children:e.jsx(de,{variant:"body1",fontWeight:"600",children:y})})}),_?e.jsx(l,{display:"flex",alignItems:"center",justifyContent:"center",height:"90%",children:e.jsx(q,{size:50})}):e.jsx(N,{showGutter:!1,readOnly:!0,value:F})]})})]})})]})});export{Le as default,Ie as meta};
@@ -1 +0,0 @@
1
- import{w as b,b as l,z as v,v as e}from"./index-CtPqstFl.js";import{a as u}from"./auth-GyTIVKy5.js";import{u as j}from"./use-request-BZNkzlTr.js";import{u as y}from"./toast-CsAH5FIf.js";import{C as w}from"./Container-CgITmmbk.js";import{B as C,P,d,C as S}from"./playground-Hl52p9f5.js";import{T as m}from"./TextField-UybdTIGB.js";import{B as T}from"./Button-DLrxHRm7.js";import"./Modal-BwXR_5Bh.js";import"./mergeSlotProps-DptgQgAT.js";import"./List-juBjUmfP.js";const G=b(function(){const[a,p]=l.useState(""),[s,c]=l.useState(""),g=v(),{showToast:n}=y(),[t,x]=j(async(r,f)=>{const o=await u.login(r,f);o.success?(o.data.data.usr.rl||[]).some(i=>i.mt==="all"&&i.sm==="all")?g("/"):(n("Acesso negado. Apenas administradores podem acessar o playground.","error"),await u.logout()):n(o.error||"Login ou senha inválidos.","error")}),h=r=>{r.preventDefault(),x(a,s)};return e.jsx(w,{maxWidth:"xs",children:e.jsx(C,{sx:{marginTop:15,display:"flex",flexDirection:"column",alignItems:"center"},children:e.jsxs(P,{elevation:0,sx:{p:4,width:"100%",borderRadius:2,border:"1px solid",borderColor:"divider"},children:[e.jsx(d,{component:"h1",variant:"h5",align:"center",gutterBottom:!0,sx:{fontWeight:"bold"},children:"Opposer Playground"}),e.jsx(d,{variant:"body2",color:"textSecondary",align:"center",sx:{mb:3},children:"Faça login para acessar o ambiente de testes"}),e.jsxs("form",{onSubmit:h,children:[e.jsx(m,{margin:"normal",required:!0,fullWidth:!0,label:"Login",autoComplete:"username",autoFocus:!0,value:a,onChange:r=>p(r.target.value),disabled:t}),e.jsx(m,{margin:"normal",required:!0,fullWidth:!0,label:"Senha",type:"password",autoComplete:"current-password",value:s,onChange:r=>c(r.target.value),disabled:t}),e.jsx(T,{type:"submit",fullWidth:!0,variant:"contained",disableElevation:!0,sx:{mt:3,mb:2,py:1.5},disabled:t,children:t?e.jsx(S,{size:24,color:"inherit"}):"Entrar"})]})]})})})});export{G as default};
@@ -1 +0,0 @@
1
- import{v as e,w as N,b as l}from"./index-CtPqstFl.js";import{c as B,d as O,b as P,u as q,A as F,D as H}from"./AddRounded-ByHfnsiW.js";import{b as K,B as d,d as u,P as w,C as W,i as p}from"./playground-Hl52p9f5.js";import{u as V}from"./use-request-BZNkzlTr.js";import{u as G,I as g}from"./toast-CsAH5FIf.js";import{u as J,D as $,a as z,b as L,c as Y}from"./confirm-Dr0pbiV6.js";import{C as M}from"./Container-CgITmmbk.js";import{B as j}from"./Button-DLrxHRm7.js";import{T as U,a as Q,b as X,c as h,d as a,e as Z}from"./TableRow-B9hAmlnV.js";import{T as _}from"./Tooltip-BGcUWUcF.js";import{D as T}from"./Divider-B_Wx9srO.js";import{T as D}from"./TextField-UybdTIGB.js";import"./Modal-BwXR_5Bh.js";import"./mergeSlotProps-DptgQgAT.js";import"./dividerClasses-CIiqeEPO.js";import"./List-juBjUmfP.js";const S=K(e.jsx("path",{d:"M15 20H5V7c0-.55-.45-1-1-1s-1 .45-1 1v13c0 1.1.9 2 2 2h10c.55 0 1-.45 1-1s-.45-1-1-1m5-4V4c0-1.1-.9-2-2-2H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2m-2 0H9V4h9z"})),ee=B({nm:P().required("Nome da chave é obrigatório"),ex:O().required("Data de expiração é obrigatória").min(new Date,"A data deve ser futura")}),re=(i=32)=>{const c=new Uint8Array(i);return window.crypto.getRandomValues(c),Array.from(c,x=>x.toString(16).padStart(2,"0")).join("")},be=N(()=>{const[i,c]=l.useState([]),[x,b]=l.useState(!1),[n,f]=l.useState(null),{showToast:o}=G(),{confirmAction:k}=J(),[I,m]=V(async()=>{const r=await p.sendRequestOpposer(JSON.stringify({method:"get",model:"ke",query:{filter:{}}}));r.success?c(r.data):o(r.error||"Erro ao carregar chaves","error")});l.useEffect(()=>{m()},[]);const E=()=>{s.resetForm(),f(null),b(!0)},C=()=>{b(!1)},A=async r=>{k({title:"Excluir Chave",description:"Deseja realmente excluir esta chave?",onConfirm:async()=>{const t=await p.sendRequestOpposer(JSON.stringify({method:"delete",model:"ke",filter:{id:r}}));t.success?(o("Chave excluída com sucesso!","success"),m()):o(t.error||"Erro ao excluir chave","error")}})},v=r=>{navigator.clipboard.writeText(r),o("Chave copiada para a área de transferência!","success")},R=async r=>{const t=re(),y=await p.sendRequestOpposer(JSON.stringify({method:"insert",model:"ke",data:{nm:r.nm,ex:r.ex,hs:t}}));y.success?(f(t),o("Chave gerada com sucesso!","success"),m()):o(y.error||"Erro ao criar chave","error")},s=q({initialValues:{nm:"",ex:new Date(new Date().setFullYear(new Date().getFullYear()+1)).toISOString().split("T")[0]},validationSchema:ee,onSubmit:R});return e.jsxs(M,{maxWidth:"lg",sx:{mt:4,mb:4},children:[e.jsxs(d,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:[e.jsx(u,{variant:"h4",children:"Gerenciamento de API Keys"}),e.jsx(j,{variant:"contained",disableElevation:!0,startIcon:e.jsx(F,{}),onClick:E,children:"Nova Chave"})]}),e.jsx(U,{component:w,children:e.jsxs(Q,{sx:{minWidth:650},children:[e.jsx(X,{children:e.jsxs(h,{children:[e.jsx(a,{sx:{backgroundColor:"background.paper"},children:"Nome"}),e.jsx(a,{sx:{backgroundColor:"background.paper"},children:"Hash (Parcial)"}),e.jsx(a,{sx:{backgroundColor:"background.paper"},children:"Expiração"}),e.jsx(a,{align:"right",sx:{backgroundColor:"background.paper"},children:"Ações"})]})}),e.jsx(Z,{children:I?e.jsx(h,{children:e.jsx(a,{colSpan:4,align:"center",children:e.jsx(W,{})})}):i.length===0?e.jsx(h,{children:e.jsx(a,{colSpan:4,align:"center",children:"Nenhuma chave encontrada"})}):i.map(r=>e.jsxs(h,{children:[e.jsx(a,{children:r.nm}),e.jsx(a,{children:e.jsxs("code",{children:[r.hs.substring(0,8),"...",r.hs.substring(r.hs.length-4)]})}),e.jsx(a,{children:new Date(r.ex).toLocaleDateString()}),e.jsxs(a,{align:"right",children:[e.jsx(_,{title:"Copiar Hash",children:e.jsx(g,{onClick:()=>v(r.hs),color:"primary",children:e.jsx(S,{})})}),e.jsx(g,{onClick:()=>A(r.id),color:"error",children:e.jsx(H,{})})]})]},r.id))})]})}),e.jsxs($,{open:x,onClose:C,fullWidth:!0,maxWidth:"sm",children:[e.jsx(z,{children:"Nova API Key"}),e.jsx(T,{}),e.jsx(L,{children:n?e.jsxs(d,{sx:{mt:2},children:[e.jsx(w,{variant:"outlined",sx:{p:2,bgcolor:"rgba(129, 199, 132, 0.1)",mb:2},children:e.jsxs(u,{variant:"body2",color:"success.main",children:["Chave criada com sucesso! ",e.jsx("strong",{children:"Copie-a agora"}),", pois ela não será exibida novamente por completo por motivos de segurança."]})}),e.jsxs(d,{sx:{p:2,bgcolor:"background.default",borderRadius:1,display:"flex",alignItems:"center",gap:1,border:"1px solid",borderColor:"divider"},children:[e.jsx(u,{variant:"body2",sx:{wordBreak:"break-all",flex:1,fontFormat:"monospace"},children:n}),e.jsx(g,{size:"small",onClick:()=>v(n),children:e.jsx(S,{})})]})]}):e.jsxs(d,{component:"form",sx:{pt:1},children:[e.jsx(D,{fullWidth:!0,name:"nm",label:"Nome da Chave (ex: Produção, Web App)",sx:{mb:2},value:s.values.nm,onChange:s.handleChange,error:s.touched.nm&&!!s.errors.nm,helperText:s.touched.nm&&s.errors.nm}),e.jsx(D,{fullWidth:!0,name:"ex",label:"Data de Expiração",type:"date",InputLabelProps:{shrink:!0},sx:{mb:2},value:s.values.ex,onChange:s.handleChange,error:s.touched.ex&&!!s.errors.ex,helperText:s.touched.ex&&s.errors.ex})]})}),e.jsx(T,{}),e.jsxs(Y,{sx:{p:2},children:[e.jsx(j,{disableElevation:!0,onClick:C,children:n?"Fechar":"Cancelar"}),!n&&e.jsx(j,{onClick:()=>s.handleSubmit(),variant:"contained",disableElevation:!0,children:"Gerar Chave"})]})]})]})});export{be as default};
@@ -1 +0,0 @@
1
- import{v as o,b as h,w as Be}from"./index-CtPqstFl.js";import{b as W,t as ie,v as ce,u as de,m as Le,F as xe,x as O,w as A,y as c,z as pe,s as m,A as ee,I as le,B as re,P as Me,d as Y,C as ze,i as ue}from"./playground-Hl52p9f5.js";import{u as ge}from"./use-request-BZNkzlTr.js";import{I as Z,a as fe,u as Ne}from"./toast-CsAH5FIf.js";import{d as g,T as De,a as he,b as ve,c as Q,e as me}from"./TableRow-B9hAmlnV.js";import{T as Ce}from"./Tooltip-BGcUWUcF.js";import{I as Ee,S as Pe,T as Fe,F as Ae,a as Oe}from"./TextField-UybdTIGB.js";import{M as se}from"./MenuItem-D_5SuVKQ.js";import{u as He}from"./mergeSlotProps-DptgQgAT.js";import"./Modal-BwXR_5Bh.js";import"./List-juBjUmfP.js";import"./listItemIconClasses-39Itzgzt.js";import"./listItemTextClasses-EQFLPLzt.js";import"./dividerClasses-CIiqeEPO.js";const Ve=W(o.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));function We(e){return ie("MuiChip",e)}const n=ce("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),Ue=e=>{const{classes:a,disabled:s,size:r,color:p,iconColor:I,onDelete:b,clickable:x,variant:l}=e,C={root:["root",l,s&&"disabled",`size${c(r)}`,`color${c(p)}`,x&&"clickable",x&&`clickableColor${c(p)}`,b&&"deletable",b&&`deletableColor${c(p)}`,`${l}${c(p)}`],label:["label",`label${c(r)}`],avatar:["avatar",`avatar${c(r)}`,`avatarColor${c(p)}`],icon:["icon",`icon${c(r)}`,`iconColor${c(I)}`],deleteIcon:["deleteIcon",`deleteIcon${c(r)}`,`deleteIconColor${c(p)}`,`deleteIcon${c(l)}Color${c(p)}`]};return pe(C,We,a)},Ke=m("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,a)=>{const{ownerState:s}=e,{color:r,iconColor:p,clickable:I,onDelete:b,size:x,variant:l}=s;return[{[`& .${n.avatar}`]:a.avatar},{[`& .${n.avatar}`]:a[`avatar${c(x)}`]},{[`& .${n.avatar}`]:a[`avatarColor${c(r)}`]},{[`& .${n.icon}`]:a.icon},{[`& .${n.icon}`]:a[`icon${c(x)}`]},{[`& .${n.icon}`]:a[`iconColor${c(p)}`]},{[`& .${n.deleteIcon}`]:a.deleteIcon},{[`& .${n.deleteIcon}`]:a[`deleteIcon${c(x)}`]},{[`& .${n.deleteIcon}`]:a[`deleteIconColor${c(r)}`]},{[`& .${n.deleteIcon}`]:a[`deleteIcon${c(l)}Color${c(r)}`]},a.root,a[`size${c(x)}`],a[`color${c(r)}`],I&&a.clickable,I&&r!=="default"&&a[`clickableColor${c(r)}`],b&&a.deletable,b&&r!=="default"&&a[`deletableColor${c(r)}`],a[l],a[`${l}${c(r)}`]]}})(ee(({theme:e})=>{const a=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${n.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${n.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:a,fontSize:e.typography.pxToRem(12)},[`& .${n.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${n.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${n.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${n.icon}`]:{marginLeft:5,marginRight:-6},[`& .${n.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${n.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${n.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(le(["contrastText"])).map(([s])=>({props:{color:s},style:{backgroundColor:(e.vars||e).palette[s].main,color:(e.vars||e).palette[s].contrastText,[`& .${n.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[s].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[s].contrastText}}}})),{props:s=>s.iconColor===s.color,style:{[`& .${n.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:a}}},{props:s=>s.iconColor===s.color&&s.color!=="default",style:{[`& .${n.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${n.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(le(["dark"])).map(([s])=>({props:{color:s,onDelete:!0},style:{[`&.${n.focusVisible}`]:{background:(e.vars||e).palette[s].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${n.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(le(["dark"])).map(([s])=>({props:{color:s,clickable:!0},style:{[`&:hover, &.${n.focusVisible}`]:{backgroundColor:(e.vars||e).palette[s].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${n.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${n.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${n.avatar}`]:{marginLeft:4},[`& .${n.avatarSmall}`]:{marginLeft:2},[`& .${n.icon}`]:{marginLeft:4},[`& .${n.iconSmall}`]:{marginLeft:2},[`& .${n.deleteIcon}`]:{marginRight:5},[`& .${n.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(le()).map(([s])=>({props:{variant:"outlined",color:s},style:{color:(e.vars||e).palette[s].main,border:`1px solid ${e.alpha((e.vars||e).palette[s].main,.7)}`,[`&.${n.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[s].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${n.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[s].main,(e.vars||e).palette.action.focusOpacity)},[`& .${n.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[s].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[s].main}}}}))]}})),Ge=m("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,a)=>{const{ownerState:s}=e,{size:r}=s;return[a.label,a[`label${c(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function ye(e){return e.key==="Backspace"||e.key==="Delete"}const Te=h.forwardRef(function(a,s){const r=de({props:a,name:"MuiChip"}),{avatar:p,className:I,clickable:b,color:x="default",component:l,deleteIcon:C,disabled:y=!1,icon:u,label:T,onClick:L,onDelete:P,onKeyDown:S,onKeyUp:d,size:$="medium",variant:v="filled",tabIndex:M,skipFocusWhenDisabled:U=!1,slots:z={},slotProps:N={},...H}=r,K=h.useRef(null),t=Le(K,s),i=f=>{f.stopPropagation(),P(f)},j=f=>{f.currentTarget===f.target&&ye(f)&&f.preventDefault(),S&&S(f)},G=f=>{f.currentTarget===f.target&&P&&ye(f)&&P(f),d&&d(f)},D=b!==!1&&L?!0:b,V=D||P?xe:l||"div",E={...r,component:V,disabled:y,size:$,color:x,iconColor:h.isValidElement(u)&&u.props.color||x,onDelete:!!P,clickable:D,variant:v},R=Ue(E),k=V===xe?{component:l||"div",focusVisibleClassName:R.focusVisible,...P&&{disableRipple:!0}}:{};let q=null;P&&(q=C&&h.isValidElement(C)?h.cloneElement(C,{className:O(C.props.className,R.deleteIcon),onClick:i}):o.jsx(Ve,{className:R.deleteIcon,onClick:i}));let J=null;p&&h.isValidElement(p)&&(J=h.cloneElement(p,{className:O(R.avatar,p.props.className)}));let X=null;u&&h.isValidElement(u)&&(X=h.cloneElement(u,{className:O(R.icon,u.props.className)}));const _={slots:z,slotProps:N},[oe,te]=A("root",{elementType:Ke,externalForwardedProps:{..._,...H},ownerState:E,shouldForwardComponentProp:!0,ref:t,className:O(R.root,I),additionalProps:{disabled:D&&y?!0:void 0,tabIndex:U&&y?-1:M,...k},getSlotProps:f=>({...f,onClick:B=>{f.onClick?.(B),L?.(B)},onKeyDown:B=>{f.onKeyDown?.(B),j(B)},onKeyUp:B=>{f.onKeyUp?.(B),G(B)}})}),[ae,w]=A("label",{elementType:Ge,externalForwardedProps:_,ownerState:E,className:R.label});return o.jsxs(oe,{as:V,...te,children:[J||X,o.jsx(ae,{...w,children:T}),q]})}),qe=W(o.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"})),Je=W(o.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}));function Xe(e){return ie("MuiToolbar",e)}ce("MuiToolbar",["root","gutters","regular","dense"]);const _e=e=>{const{classes:a,disableGutters:s,variant:r}=e;return pe({root:["root",!s&&"gutters",r]},Xe,a)},Qe=m("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,a)=>{const{ownerState:s}=e;return[a.root,!s.disableGutters&&a.gutters,a[s.variant]]}})(ee(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:a})=>!a.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),Ye=h.forwardRef(function(a,s){const r=de({props:a,name:"MuiToolbar"}),{className:p,component:I="div",disableGutters:b=!1,variant:x="regular",...l}=r,C={...r,component:I,disableGutters:b,variant:x},y=_e(C);return o.jsx(Qe,{as:I,className:O(y.root,p),ref:s,ownerState:C,...l})}),Ze=W(o.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),eo=W(o.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}));function oo(e){return ie("MuiTablePaginationActions",e)}ce("MuiTablePaginationActions",["root"]);const to=e=>{const{classes:a}=e;return pe({root:["root"]},oo,a)},ao=m("div",{name:"MuiTablePaginationActions",slot:"Root"})({}),so=h.forwardRef(function(a,s){const r=de({props:a,name:"MuiTablePaginationActions"}),{backIconButtonProps:p,className:I,count:b,disabled:x=!1,getItemAriaLabel:l,nextIconButtonProps:C,onPageChange:y,page:u,rowsPerPage:T,showFirstButton:L,showLastButton:P,slots:S={},slotProps:d={},...$}=r,v=He(),U=to(r),z=w=>{y(w,0)},N=w=>{y(w,u-1)},H=w=>{y(w,u+1)},K=w=>{y(w,Math.max(0,Math.ceil(b/T)-1))},t=S.firstButton??Z,i=S.lastButton??Z,j=S.nextButton??Z,G=S.previousButton??Z,D=S.firstButtonIcon??qe,V=S.lastButtonIcon??Je,E=S.nextButtonIcon??eo,R=S.previousButtonIcon??Ze,k=v?i:t,q=v?j:G,J=v?G:j,X=v?t:i,_=v?d.lastButton:d.firstButton,oe=v?d.nextButton:d.previousButton,te=v?d.previousButton:d.nextButton,ae=v?d.firstButton:d.lastButton;return o.jsxs(ao,{ref:s,className:O(U.root,I),...$,children:[L&&o.jsx(k,{onClick:z,disabled:x||u===0,"aria-label":l("first",u),title:l("first",u),..._,children:v?o.jsx(V,{...d.lastButtonIcon}):o.jsx(D,{...d.firstButtonIcon})}),o.jsx(q,{onClick:N,disabled:x||u===0,color:"inherit","aria-label":l("previous",u),title:l("previous",u),...oe??p,children:v?o.jsx(E,{...d.nextButtonIcon}):o.jsx(R,{...d.previousButtonIcon})}),o.jsx(J,{onClick:H,disabled:x||(b!==-1?u>=Math.ceil(b/T)-1:!1),color:"inherit","aria-label":l("next",u),title:l("next",u),...te??C,children:v?o.jsx(R,{...d.previousButtonIcon}):o.jsx(E,{...d.nextButtonIcon})}),P&&o.jsx(X,{onClick:K,disabled:x||u>=Math.ceil(b/T)-1,"aria-label":l("last",u),title:l("last",u),...ae,children:v?o.jsx(D,{...d.firstButtonIcon}):o.jsx(V,{...d.lastButtonIcon})})]})});function no(e){return ie("MuiTablePagination",e)}const ne=ce("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var Se;const ro=m(g,{name:"MuiTablePagination",slot:"Root"})(ee(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}))),lo=m(Ye,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,a)=>({[`& .${ne.actions}`]:a.actions,...a.toolbar})})(ee(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${ne.actions}`]:{flexShrink:0,marginLeft:20}}))),io=m("div",{name:"MuiTablePagination",slot:"Spacer"})({flex:"1 1 100%"}),co=m("p",{name:"MuiTablePagination",slot:"SelectLabel"})(ee(({theme:e})=>({...e.typography.body2,flexShrink:0}))),po=m(Pe,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,a)=>({[`& .${ne.selectIcon}`]:a.selectIcon,[`& .${ne.select}`]:a.select,...a.input,...a.selectRoot})})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${ne.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),uo=m(se,{name:"MuiTablePagination",slot:"MenuItem"})({}),go=m("p",{name:"MuiTablePagination",slot:"DisplayedRows"})(ee(({theme:e})=>({...e.typography.body2,flexShrink:0})));function bo({from:e,to:a,count:s}){return`${e}–${a} of ${s!==-1?s:`more than ${a}`}`}function xo(e){return`Go to ${e} page`}const fo=e=>{const{classes:a}=e;return pe({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},no,a)},ho=h.forwardRef(function(a,s){const r=de({props:a,name:"MuiTablePagination"}),{ActionsComponent:p=so,backIconButtonProps:I,colSpan:b,component:x=g,count:l,disabled:C=!1,getItemAriaLabel:y=xo,labelDisplayedRows:u=bo,labelRowsPerPage:T="Rows per page:",nextIconButtonProps:L,onPageChange:P,onRowsPerPageChange:S,page:d,rowsPerPage:$,rowsPerPageOptions:v=[10,25,50,100],SelectProps:M={},showFirstButton:U=!1,showLastButton:z=!1,slotProps:N={},slots:H={},...K}=r,t=r,i=fo(t),j=N?.select??M,G=j.native?"option":uo;let D;(x===g||x==="td")&&(D=b||1e3);const V=fe(j.id),E=fe(j.labelId),R=()=>l===-1?(d+1)*$:$===-1?l:Math.min(l,(d+1)*$),k={slots:H,slotProps:N},[q,J]=A("root",{ref:s,className:i.root,elementType:ro,externalForwardedProps:{...k,component:x,...K},ownerState:t,additionalProps:{colSpan:D}}),[X,_]=A("toolbar",{className:i.toolbar,elementType:lo,externalForwardedProps:k,ownerState:t}),[oe,te]=A("spacer",{className:i.spacer,elementType:io,externalForwardedProps:k,ownerState:t}),[ae,w]=A("selectLabel",{className:i.selectLabel,elementType:co,externalForwardedProps:k,ownerState:t,additionalProps:{id:E}}),[f,B]=A("select",{className:i.select,elementType:po,externalForwardedProps:k,ownerState:t}),[$e,Re]=A("menuItem",{className:i.menuItem,elementType:G,externalForwardedProps:k,ownerState:t}),[ke,we]=A("displayedRows",{className:i.displayedRows,elementType:go,externalForwardedProps:k,ownerState:t});return o.jsx(q,{...J,children:o.jsxs(X,{..._,children:[o.jsx(oe,{...te}),v.length>1&&o.jsx(ae,{...w,children:T}),v.length>1&&o.jsx(f,{variant:"standard",...!j.variant&&{input:Se||(Se=o.jsx(Ee,{}))},value:$,onChange:S,id:V,labelId:E,...j,classes:{...j.classes,root:O(i.input,i.selectRoot,(j.classes||{}).root),select:O(i.select,(j.classes||{}).select),icon:O(i.selectIcon,(j.classes||{}).icon)},disabled:C,...B,children:v.map(F=>h.createElement($e,{...Re,key:F.label?F.label:F,value:F.value?F.value:F},F.label?F.label:F))}),o.jsx(ke,{...we,children:u({from:l===0?0:d*$+1,to:R(),count:l===-1?-1:l,page:d})}),o.jsx(p,{className:i.actions,backIconButtonProps:I,count:l,nextIconButtonProps:L,onPageChange:P,page:d,rowsPerPage:$,showFirstButton:U,showLastButton:z,slotProps:N.actions,slots:H.actions,getItemAriaLabel:y,disabled:C})]})})}),vo=W(o.jsx("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82"})),mo=W(o.jsx("path",{d:"M17.65 6.35c-1.63-1.63-3.94-2.57-6.48-2.31-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20c3.19 0 5.93-1.87 7.21-4.56.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53-1.13 2.43-3.84 3.97-6.8 3.31-2.22-.49-4.01-2.3-4.48-4.52C5.31 9.44 8.26 6 12 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71z"})),Co=W(o.jsx("path",{d:"M12 7c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1s-1-.45-1-1V8c0-.55.45-1 1-1m-.01-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8m1-3h-2v-2h2z"})),yo=m(re)({padding:"2rem",height:"100%",display:"flex",flexDirection:"column",gap:"2rem"}),So=m(re)({display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"1rem"}),jo=m(re)({display:"flex",gap:"1rem",marginBottom:"1.5rem",flexWrap:"wrap"}),je=m(Me)(({theme:e})=>({padding:"1.5rem",borderRadius:"15px",backgroundColor:e.palette.background.paper,width:"100%"})),Ie=m(De)({marginTop:"1rem",borderRadius:"8px","& .MuiTableCell-head":{fontWeight:"bold",backgroundColor:"rgba(255, 255, 255, 0.05)"}}),be=m(Te)(({status:e,theme:a})=>({fontWeight:"bold",textTransform:"capitalize",...e==="success"&&{backgroundColor:"rgba(76, 175, 80, 0.1)",color:"#4caf50",border:"1px solid #4caf50"},...e==="error"&&{backgroundColor:"rgba(244, 67, 54, 0.1)",color:"#f44336",border:"1px solid #f44336"},...e==="running"&&{backgroundColor:"rgba(33, 150, 243, 0.1)",color:"#2196f3",border:"1px solid #2196f3"}})),Io=m(Y)({fontWeight:"bold",fontSize:"1rem"}),Po=m(Y)({color:"#f44336",fontSize:"0.85rem",maxWidth:"300px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),Oo=Be(()=>{const[e,a]=h.useState([]),[s,r]=h.useState([]),[p,I]=h.useState(""),[b,x]=h.useState("all"),[l,C]=h.useState(0),[y,u]=h.useState(10),{showToast:T}=Ne(),[L,P]=ge(()=>ue.sendRequestOpposer(JSON.stringify({controller:"scheduler",method:"listTasks",payload:{}}))),[S,d]=ge(()=>ue.sendRequestOpposer(JSON.stringify({controller:"scheduler",method:"getHistory",payload:{}}))),[$,v]=ge(t=>ue.sendRequestOpposer(JSON.stringify({controller:"scheduler",method:"runTask",payload:{name:t}}))),M=async()=>{const t=await P();t.success?a(t.data.data):T(t.error||"Erro ao carregar tarefas","error");const i=await d();i.success?r(i.data.data):T(i.error||"Erro ao carregar histórico","error")};h.useEffect(()=>{M();const t=setInterval(M,3e4);return()=>clearInterval(t)},[]);const U=async t=>{const i=await v(t);i.success?T(`Tarefa '${t}' iniciada com sucesso!`,"success"):T(i.error||`Erro ao executar tarefa '${t}'`,"error"),M()},z=h.useMemo(()=>s.filter(t=>{const i=t.nm.toLowerCase().includes(p.toLowerCase())||t.er&&t.er.toLowerCase().includes(p.toLowerCase()),j=b==="all"||b==="success"&&t.sc||b==="error"&&!t.sc&&t.ft||b==="running"&&!t.ft;return i&&j}),[s,p,b]),N=(t,i)=>{C(i)},H=t=>{u(parseInt(t.target.value,10)),C(0)},K=t=>t.ft?t.sc?o.jsx(be,{label:"SUCESSO",status:"success",size:"small"}):o.jsx(be,{label:"ERRO",status:"error",size:"small"}):o.jsx(be,{label:"EXECUTANDO",status:"running",size:"small"});return o.jsxs(yo,{children:[o.jsxs(So,{children:[o.jsx(Y,{variant:"h4",fontWeight:"bold",children:"Scheduler"}),o.jsx(Z,{onClick:M,disabled:L||S,children:o.jsx(mo,{})})]}),o.jsxs(je,{elevation:0,children:[o.jsx(Y,{variant:"h6",gutterBottom:!0,fontWeight:"bold",children:"Tarefas Cadastradas"}),o.jsx(Ie,{children:o.jsxs(he,{stickyHeader:!0,children:[o.jsx(ve,{children:o.jsxs(Q,{children:[o.jsx(g,{children:"Nome"}),o.jsx(g,{children:"Intervalo (ms)"}),o.jsx(g,{children:"Status"}),o.jsx(g,{align:"right",children:"Ações"})]})}),o.jsxs(me,{children:[e.map(t=>o.jsxs(Q,{children:[o.jsx(g,{children:o.jsx(Io,{children:t.name})}),o.jsx(g,{children:t.interval}),o.jsx(g,{children:o.jsx(Te,{label:t.enabled?"ATIVO":"INATIVO",color:t.enabled?"success":"default",size:"small",variant:"outlined"})}),o.jsx(g,{align:"right",children:o.jsx(Ce,{title:"Executar Agora",children:o.jsx(Z,{size:"small",color:"primary",onClick:()=>U(t.name),disabled:$,children:o.jsx(vo,{})})})})]},t.name)),e.length===0&&!L&&o.jsx(Q,{children:o.jsx(g,{colSpan:4,align:"center",children:"Nenhuma tarefa encontrada."})})]})]})})]}),o.jsxs(je,{elevation:0,children:[o.jsx(Y,{variant:"h6",gutterBottom:!0,fontWeight:"bold",children:"Histórico de Execução"}),o.jsxs(jo,{children:[o.jsx(Fe,{label:"Pesquisar por nome ou erro",variant:"outlined",size:"small",value:p,onChange:t=>I(t.target.value),sx:{flex:1,minWidth:"250px"}}),o.jsxs(Ae,{size:"small",sx:{minWidth:"150px"},children:[o.jsx(Oe,{children:"Status"}),o.jsxs(Pe,{value:b,label:"Status",onChange:t=>x(t.target.value),children:[o.jsx(se,{value:"all",children:"Todos"}),o.jsx(se,{value:"success",children:"Sucesso"}),o.jsx(se,{value:"error",children:"Erro"}),o.jsx(se,{value:"running",children:"Executando"})]})]})]}),o.jsx(Ie,{children:S&&s.length===0?o.jsx(re,{display:"flex",justifyContent:"center",p:4,children:o.jsx(ze,{})}):o.jsxs(he,{stickyHeader:!0,children:[o.jsx(ve,{children:o.jsxs(Q,{children:[o.jsx(g,{children:"Tarefa"}),o.jsx(g,{children:"Início"}),o.jsx(g,{children:"Fim"}),o.jsx(g,{children:"Duração"}),o.jsx(g,{children:"Status"}),o.jsx(g,{children:"Mensagem"})]})}),o.jsxs(me,{children:[z.slice(l*y,l*y+y).map(t=>o.jsxs(Q,{children:[o.jsx(g,{children:o.jsx(Y,{fontWeight:"medium",children:t.nm})}),o.jsx(g,{children:new Date(t.st).toLocaleString()}),o.jsx(g,{children:t.ft?new Date(t.ft).toLocaleString():"-"}),o.jsx(g,{children:t.du?`${t.du}ms`:"-"}),o.jsx(g,{children:K(t)}),o.jsx(g,{children:t.er?o.jsx(Ce,{title:t.er,children:o.jsxs(re,{display:"flex",alignItems:"center",gap:.5,children:[o.jsx(Co,{color:"error",fontSize:"small"}),o.jsx(Po,{children:t.er})]})}):"-"})]},t.id)),z.length===0&&o.jsx(Q,{children:o.jsx(g,{colSpan:6,align:"center",children:"Nenhum registro encontrado."})})]})]})}),o.jsx(ho,{rowsPerPageOptions:[10,25,50],component:"div",count:z.length,rowsPerPage:y,page:l,onPageChange:N,onRowsPerPageChange:H,labelRowsPerPage:"Linhas por página"})]})]})});export{Oo as default};
@@ -1 +0,0 @@
1
- import{t as s,v as e}from"./playground-Hl52p9f5.js";function a(t){return s("MuiListItemIcon",t)}const l=e("MuiListItemIcon",["root","alignItemsFlexStart"]);export{a as g,l};
@@ -1 +0,0 @@
1
- import{t as e,v as s}from"./playground-Hl52p9f5.js";function a(t){return e("MuiListItemText",t)}const l=s("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);export{a as g,l};
@@ -1 +0,0 @@
1
- window.__reactRouterManifest={"entry":{"module":"/playground/assets/entry.client-D6FYz1yh.js","imports":["/playground/assets/index-CtPqstFl.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/playground/assets/root-CQTBmuv8.js","imports":["/playground/assets/index-CtPqstFl.js","/playground/assets/playground-Hl52p9f5.js","/playground/assets/auth-CD1rXHzz.js","/playground/assets/toast-CsAH5FIf.js","/playground/assets/confirm-Dr0pbiV6.js","/playground/assets/auth-GyTIVKy5.js","/playground/assets/Modal-BwXR_5Bh.js","/playground/assets/Divider-B_Wx9srO.js","/playground/assets/dividerClasses-CIiqeEPO.js","/playground/assets/Button-DLrxHRm7.js"],"css":[]},"layouts/main/index":{"id":"layouts/main/index","parentId":"root","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/playground/assets/index-Ct_NE85o.js","imports":["/playground/assets/index-CtPqstFl.js","/playground/assets/playground-Hl52p9f5.js","/playground/assets/index-CQc11yq_.js","/playground/assets/auth-CD1rXHzz.js","/playground/assets/List-juBjUmfP.js","/playground/assets/ListItemText-DgWZmgzc.js","/playground/assets/Divider-B_Wx9srO.js","/playground/assets/listItemIconClasses-39Itzgzt.js","/playground/assets/mergeSlotProps-DptgQgAT.js","/playground/assets/Modal-BwXR_5Bh.js","/playground/assets/auth-GyTIVKy5.js","/playground/assets/listItemTextClasses-EQFLPLzt.js","/playground/assets/dividerClasses-CIiqeEPO.js"],"css":[]},"pages/playground/index":{"id":"pages/playground/index","parentId":"layouts/main/index","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/playground/assets/index-D0I6xwmb.js","imports":["/playground/assets/index-CtPqstFl.js","/playground/assets/index-CQc11yq_.js","/playground/assets/playground-Hl52p9f5.js","/playground/assets/Button-DLrxHRm7.js","/playground/assets/ListItemText-DgWZmgzc.js","/playground/assets/use-request-BZNkzlTr.js","/playground/assets/toast-CsAH5FIf.js","/playground/assets/List-juBjUmfP.js","/playground/assets/listItemIconClasses-39Itzgzt.js","/playground/assets/mergeSlotProps-DptgQgAT.js","/playground/assets/Modal-BwXR_5Bh.js","/playground/assets/listItemTextClasses-EQFLPLzt.js"],"css":[]},"pages/database-model/index":{"id":"pages/database-model/index","parentId":"layouts/main/index","path":"database-model","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/playground/assets/index-Cr4I-4J2.js","imports":["/playground/assets/index-CtPqstFl.js","/playground/assets/playground-Hl52p9f5.js","/playground/assets/TableRow-B9hAmlnV.js","/playground/assets/ListItemText-DgWZmgzc.js","/playground/assets/use-request-BZNkzlTr.js","/playground/assets/toast-CsAH5FIf.js","/playground/assets/List-juBjUmfP.js","/playground/assets/Divider-B_Wx9srO.js","/playground/assets/listItemTextClasses-EQFLPLzt.js","/playground/assets/dividerClasses-CIiqeEPO.js"],"css":[]},"pages/scheduler/index":{"id":"pages/scheduler/index","parentId":"layouts/main/index","path":"scheduler","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/playground/assets/index-_DMgWZ3Y.js","imports":["/playground/assets/index-CtPqstFl.js","/playground/assets/playground-Hl52p9f5.js","/playground/assets/use-request-BZNkzlTr.js","/playground/assets/toast-CsAH5FIf.js","/playground/assets/TableRow-B9hAmlnV.js","/playground/assets/Tooltip-BGcUWUcF.js","/playground/assets/TextField-UybdTIGB.js","/playground/assets/MenuItem-D_5SuVKQ.js","/playground/assets/mergeSlotProps-DptgQgAT.js","/playground/assets/Modal-BwXR_5Bh.js","/playground/assets/List-juBjUmfP.js","/playground/assets/listItemIconClasses-39Itzgzt.js","/playground/assets/listItemTextClasses-EQFLPLzt.js","/playground/assets/dividerClasses-CIiqeEPO.js"],"css":[]},"pages/user-management/index":{"id":"pages/user-management/index","parentId":"layouts/main/index","path":"user-management","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/playground/assets/index-CJ0wdt6Z.js","imports":["/playground/assets/index-CtPqstFl.js","/playground/assets/AddRounded-ByHfnsiW.js","/playground/assets/playground-Hl52p9f5.js","/playground/assets/use-request-BZNkzlTr.js","/playground/assets/toast-CsAH5FIf.js","/playground/assets/confirm-Dr0pbiV6.js","/playground/assets/Container-CgITmmbk.js","/playground/assets/Button-DLrxHRm7.js","/playground/assets/TableRow-B9hAmlnV.js","/playground/assets/Divider-B_Wx9srO.js","/playground/assets/TextField-UybdTIGB.js","/playground/assets/MenuItem-D_5SuVKQ.js","/playground/assets/Modal-BwXR_5Bh.js","/playground/assets/dividerClasses-CIiqeEPO.js","/playground/assets/mergeSlotProps-DptgQgAT.js","/playground/assets/List-juBjUmfP.js","/playground/assets/listItemIconClasses-39Itzgzt.js","/playground/assets/listItemTextClasses-EQFLPLzt.js"],"css":[]},"pages/key-management/index":{"id":"pages/key-management/index","parentId":"layouts/main/index","path":"key-management","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/playground/assets/index-DsSkAwyn.js","imports":["/playground/assets/index-CtPqstFl.js","/playground/assets/AddRounded-ByHfnsiW.js","/playground/assets/playground-Hl52p9f5.js","/playground/assets/use-request-BZNkzlTr.js","/playground/assets/toast-CsAH5FIf.js","/playground/assets/confirm-Dr0pbiV6.js","/playground/assets/Container-CgITmmbk.js","/playground/assets/Button-DLrxHRm7.js","/playground/assets/TableRow-B9hAmlnV.js","/playground/assets/Tooltip-BGcUWUcF.js","/playground/assets/Divider-B_Wx9srO.js","/playground/assets/TextField-UybdTIGB.js","/playground/assets/Modal-BwXR_5Bh.js","/playground/assets/mergeSlotProps-DptgQgAT.js","/playground/assets/dividerClasses-CIiqeEPO.js","/playground/assets/List-juBjUmfP.js"],"css":[]},"pages/login/index":{"id":"pages/login/index","parentId":"root","path":"login","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/playground/assets/index-DmDCpKb3.js","imports":["/playground/assets/index-CtPqstFl.js","/playground/assets/auth-GyTIVKy5.js","/playground/assets/use-request-BZNkzlTr.js","/playground/assets/toast-CsAH5FIf.js","/playground/assets/Container-CgITmmbk.js","/playground/assets/playground-Hl52p9f5.js","/playground/assets/TextField-UybdTIGB.js","/playground/assets/Button-DLrxHRm7.js","/playground/assets/Modal-BwXR_5Bh.js","/playground/assets/mergeSlotProps-DptgQgAT.js","/playground/assets/List-juBjUmfP.js"],"css":[]}},"url":"/playground/assets/manifest-c06e9a7f.js","version":"c06e9a7f"};
@@ -1 +0,0 @@
1
- import{b as x}from"./index-CtPqstFl.js";import{x as m}from"./playground-Hl52p9f5.js";const o=x.createContext(),d=()=>x.useContext(o)??!1;function C(s,t=166){let i;function e(...f){const r=()=>{s.apply(this,f)};clearTimeout(i),i=setTimeout(r,t)}return e.clear=()=>{clearTimeout(i)},e}function A(s,t){const i=s.charCodeAt(2);return s[0]==="o"&&s[1]==="n"&&i>=65&&i<=90&&typeof t=="function"}function b(s,t){if(!s)return t;function i(u,c){const n={};return Object.keys(c).forEach(a=>{A(a,c[a])&&typeof u[a]=="function"&&(n[a]=(...y)=>{u[a](...y),c[a](...y)})}),n}if(typeof s=="function"||typeof t=="function")return u=>{const c=typeof t=="function"?t(u):t,n=typeof s=="function"?s({...u,...c}):s,a=m(u?.className,c?.className,n?.className),y=i(n,c);return{...c,...n,...y,...!!a&&{className:a},...c?.style&&n?.style&&{style:{...c.style,...n.style}},...c?.sx&&n?.sx&&{sx:[...Array.isArray(c.sx)?c.sx:[c.sx],...Array.isArray(n.sx)?n.sx:[n.sx]]}}};const e=t,f=i(s,e),r=m(e?.className,s?.className);return{...t,...s,...f,...!!r&&{className:r},...e?.style&&s?.style&&{style:{...e.style,...s.style}},...e?.sx&&s?.sx&&{sx:[...Array.isArray(e.sx)?e.sx:[e.sx],...Array.isArray(s.sx)?s.sx:[s.sx]]}}}export{C as d,b as m,d as u};