diff --git a/project/platform__react-template/app_root/version/assets/client/package.json b/project/platform__react-template/app_root/version/assets/client/package.json index cd5d67346a..da299443cd 100644 --- a/project/platform__react-template/app_root/version/assets/client/package.json +++ b/project/platform__react-template/app_root/version/assets/client/package.json @@ -36,6 +36,6 @@ "@types/react-dom": "^19.2.4", "@vitejs/plugin-react": "^6.1.0", "typescript": "~6.0.2", - "vite": "^8.2.2" + "vite": "^8.3.3" } } diff --git a/project/platform__react-template/app_root/version/assets/package.json b/project/platform__react-template/app_root/version/assets/package.json index 2c76c4a3f3..da60b6962e 100644 --- a/project/platform__react-template/app_root/version/assets/package.json +++ b/project/platform__react-template/app_root/version/assets/package.json @@ -14,5 +14,14 @@ "packageManager": "pnpm@10.10.0", "devDependencies": { "@biomejs/biome": "2.5.12" + }, + "pnpm": { + "overrides": { + "@modelcontextprotocol/sdk": "1.32.0", + "proxy-addr": "2.0.8", + "brace-expansion": "5.0.12", + "source-map-js": "1.2.2", + "undici": "7.30.1" + } } } diff --git a/project/platform__react-template/app_root/version/assets/pnpm-lock.yaml b/project/platform__react-template/app_root/version/assets/pnpm-lock.yaml index 79927517ac..a661ac1c73 100644 --- a/project/platform__react-template/app_root/version/assets/pnpm-lock.yaml +++ b/project/platform__react-template/app_root/version/assets/pnpm-lock.yaml @@ -4,6 +4,13 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + '@modelcontextprotocol/sdk': 1.32.0 + proxy-addr: 2.0.8 + brace-expansion: 5.0.12 + source-map-js: 1.2.2 + undici: 7.30.1 + importers: .: @@ -28,7 +35,7 @@ importers: version: 0.3.1(@types/react@19.3.0)(react@19.3.0) '@tailwindcss/vite': specifier: ^4.3.3 - version: 4.3.3(vite@8.2.2(@types/node@24.13.4)(jiti@2.7.0)) + version: 4.3.3(vite@8.3.5(@types/node@24.13.4)(jiti@2.7.0)) class-variance-authority: specifier: ^0.7.1 version: 0.7.1 @@ -89,13 +96,13 @@ importers: version: 19.3.0(@types/react@19.3.0) '@vitejs/plugin-react': specifier: ^6.1.0 - version: 6.1.1(vite@8.2.2(@types/node@24.13.4)(jiti@2.7.0)) + version: 6.1.1(vite@8.3.5(@types/node@24.13.4)(jiti@2.7.0)) typescript: specifier: ~6.0.2 version: 6.0.3 vite: - specifier: ^8.2.2 - version: 8.2.2(@types/node@24.13.4)(jiti@2.7.0) + specifier: ^8.3.3 + version: 8.3.5(@types/node@24.13.4)(jiti@2.7.0) packages: @@ -362,8 +369,8 @@ packages: '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} - '@modelcontextprotocol/sdk@1.30.0': - resolution: {integrity: sha512-xKd8OIzlqNzcqcNumGAa6g+PW2kjD5vrpcKOnfldAUPP3j7lnqMPwlTXQm8gF+UwH72z0lqaRbjr9hqGz0eITA==} + '@modelcontextprotocol/sdk@1.32.0': + resolution: {integrity: sha512-8BviX/hK4Gd2eL1KdTwm0gfl4d3wdoErW0Jd00h6nomUAtk6IJk5vwQJc6kfWtJTzN5OEV/lgIiJKI8fiDGAlA==} engines: {node: '>=18'} peerDependencies: '@cfworker/json-schema': ^4.1.1 @@ -384,8 +391,8 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@oxc-project/types@0.149.0': - resolution: {integrity: sha512-Efcc+iF0j3Bf67YjEqIqWXbX5XddXoK/Mw4K1/JuXwRCZ8N16VR7iT23nlCc9XrveFVh/E5Rqs2StT0V8v9LdA==} + '@oxc-project/types@0.155.0': + resolution: {integrity: sha512-SeE8JPwW1xs1tHeNycjUtUBdhorRa8o4jlvjwk49R7/Z291i+4DQa7JJIgOm/TaYQZx+QrPQbVJ/9c8dMIZN8Q==} '@radix-ui/primitive@1.1.7': resolution: {integrity: sha512-rqWnm76nYT8HoNNqEjpgJ7Pw/DrBj5iBTrmEPo6HTX5+VJyBNOqTdv4g89G63HuR5g0AaENoAcH7Is5fF2kZ8Q==} @@ -560,92 +567,92 @@ packages: react-redux: optional: true - '@rolldown/binding-android-arm-eabi@1.2.8': - resolution: {integrity: sha512-tN5aztYkKCte4i5SIrrz5yK/HMjEuCqCSCJa418jOV8tZ1cBY3YF2otxB1ktPxzsLA1BeTqwapK0bfjxNvHJVw==} + '@rolldown/binding-android-arm-eabi@1.2.15': + resolution: {integrity: sha512-aLcgK9gIJ3YRvrrtfSBbRa27F5WrpiTaPulnFpsHPxpUHgFlSgnU4854MHwoRGEBhfRJDWCS2WQ7lIjskE9Olw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [android] - '@rolldown/binding-android-arm64@1.2.8': - resolution: {integrity: sha512-dIYTWl9XprMUiQFoc55KUyk/oS8SKYH3zFl0LTR7RT0Xj4hgSVyuJcroH8JUu8RcpF8fTB6E0aOwCkZoYPcDSQ==} + '@rolldown/binding-android-arm64@1.2.15': + resolution: {integrity: sha512-xD7DdZCrbThKuxNg7ooQmvp07ys4J/pnSEMTG3/OdOWl6daC67m/Q4fL78sRHMxTH/N4fGUbYhcPM0MF5WFHkg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@rolldown/binding-darwin-arm64@1.2.8': - resolution: {integrity: sha512-PCSDQGXD2IyTEFrcgPyBM8jJuGmrbCMuoIOXdbEGVemruKACXoLQJrb+A45Z0L5t1RQkdfJprAYPkikbh7dzdA==} + '@rolldown/binding-darwin-arm64@1.2.15': + resolution: {integrity: sha512-m2WuQ6r0B4OTYxyPpNLtXaMRbRDUbG8YQV2Q3KTdSSK8Th6KHCnC8jVCJt8bvYeSB5WivkkNbc85mKadaSdOxA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@rolldown/binding-darwin-x64@1.2.8': - resolution: {integrity: sha512-Uk7lRsGhPFHVX/sAUC6D5H9Ol30dFHd6iquokll2th3LpdJ3F5CzQB+7DHn0Ri2mG+U7k2zXiPHDrwZenXhwSA==} + '@rolldown/binding-darwin-x64@1.2.15': + resolution: {integrity: sha512-5RtnsHM36nodM9WbMy+zip0LGS/G+y5wro5RHrpOlr4ac24+1zSi9kiV2MP1myZeZ/ifEHfulQcWjnAXzc2C2A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@rolldown/binding-freebsd-x64@1.2.8': - resolution: {integrity: sha512-DjszaTEVogPqA5bYzsEeqDCQxbcp2fexQwKcRspYji2yzR68fCf+e4fx6kBSRDwX5/brZaHw/hWS9+A/+/w9sQ==} + '@rolldown/binding-freebsd-x64@1.2.15': + resolution: {integrity: sha512-g3l09pyFqhu+135JKkbkwiKGQmwU5hUMUPJ4VdBADvuqR8d33L6H578rh8m7rtxbdp+VmX/+nzI7nvhSZlzpUQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@rolldown/binding-linux-arm-gnueabihf@1.2.8': - resolution: {integrity: sha512-zmwa7FTmdzB6aaEEuuls18H6Ap5JmJPSoPTuXixeJZV6tG40SyLkApQtz1g8ptZtiEKqj9OM0oNLPh1AgvE31Q==} + '@rolldown/binding-linux-arm-gnueabihf@1.2.15': + resolution: {integrity: sha512-nIe3VugI97nGQtspPxDqA4sXMUpeiocKIP/CqpY/u/vgbT+alX+cVxu1C/oVBPKg4feNTmYovE91v4DgXvXNwQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@rolldown/binding-linux-arm64-gnu@1.2.8': - resolution: {integrity: sha512-KdYQDPHwJVnbFwdTGMgxsI9SqblBlz6STGM+w1We/d5B8OWWidYH0MwkU/uA1wM5fIpO2MkOVxXrNzzuZhw9ew==} + '@rolldown/binding-linux-arm64-gnu@1.2.15': + resolution: {integrity: sha512-iTBjXx+B5QSvgI89lJfmqh4wTh8NabR1YZIIN3hNx4zSG0EVfVqkOvLulNpG4251pbd6/IAmZ/LefVk1Y4rPhw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@rolldown/binding-linux-arm64-musl@1.2.8': - resolution: {integrity: sha512-jFJTifHnNPY+yzOoNZQfSIysrVyXzEQPhPnOUjmD1bcQGHH6s7c8cViKWar8YplQImE5N9JRqMCLrM2CdxOrZA==} + '@rolldown/binding-linux-arm64-musl@1.2.15': + resolution: {integrity: sha512-uN26XOnVR7rqQupG3V9oAG2EGGatWjcJHOeDOHUFCh4TBWmP2tHTFoVN13aYbwfm0aHqJAEmcwhAu6sooIjfqQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - '@rolldown/binding-linux-ppc64-gnu@1.2.8': - resolution: {integrity: sha512-FhiOziBDWPBjbcmRzfLyIJnaP7AVMFXT7YCXPjXxj7wKU3vx24RjrCNN/zjvVa+N2vVoHJwCoUBvsrN/DG3zIA==} + '@rolldown/binding-linux-ppc64-gnu@1.2.15': + resolution: {integrity: sha512-9nWkcdd+H+XhaA3fQIwpHnKIrfx/PQ6rO0pivr78Og07tXlUlctBBJoEYLPfhTmCR/QxEVdn6uPjHV5SymPhdw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] - '@rolldown/binding-linux-s390x-gnu@1.2.8': - resolution: {integrity: sha512-WnHfADMzOV2Y55wlx1hzzQnar/wDt/VdvWSD99r18Mz9ylNieIGOkRx3UV21h7m/eJvjySYJkO26VvGNFkwsIQ==} + '@rolldown/binding-linux-s390x-gnu@1.2.15': + resolution: {integrity: sha512-Ggh0ciFjLwIusLSLz7LZYEaGdxOAUJXI+Qu5JCbhPJJHEt8vP+IjRATTJheiJsdzzTYgUiHUiw3X1Ea3ZpMBdA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] - '@rolldown/binding-linux-x64-gnu@1.2.8': - resolution: {integrity: sha512-H9tRr5ibfXFVLxbPOseVewewFpl28zcEdjRDt2FTUZU7odxP0gEv1ki4/kGmcGOh78oRwZuuQllGLZ9zTJp84g==} + '@rolldown/binding-linux-x64-gnu@1.2.15': + resolution: {integrity: sha512-FHg60rS6DBePAYZ9X9F67x+JObFdmgn6tupA1C/a3B+CufFmTD4mX+e8M75tCiAO3foR/6xwVBI0KQiI7sn/rw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@rolldown/binding-linux-x64-musl@1.2.8': - resolution: {integrity: sha512-UefiqfM3D6IVNlZ8tSGs9+Ejjud2T+oxO0IHADU45Y+lyEjD2dVFyZHbkfX0LUb5Zugo/oIv1eCO/KVYhgYJYA==} + '@rolldown/binding-linux-x64-musl@1.2.15': + resolution: {integrity: sha512-/cvV/7v5VGz/moiz0XKRj2dE8DzsKyhIu1KpOvJGPjRywg3yscON889UGvAe8zfiJLHup7VLjBduoGWi3HusWQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - '@rolldown/binding-openharmony-arm64@1.2.8': - resolution: {integrity: sha512-637Ke4kWSy6rp9cxQ9gMOXlxPgIw/c1beASV4M//3+9I4uwBVOOl74G+e3zyU3u19U7RkRl/HuewixZ/Z6+Rjg==} + '@rolldown/binding-openharmony-arm64@1.2.15': + resolution: {integrity: sha512-MyzC5Hrv/sm+Z7TSGKP/j8001RO2xQm1zOpCNVL4j0cY/VhBZviludA2YFQ7i4lH6ZAXxQm0lcMdBzM+99mE7w==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@rolldown/binding-win32-arm64-msvc@1.2.8': - resolution: {integrity: sha512-xWBkPOF1Q9k/Gv1nQXnVdLxKu74jXppuOM4Z3mnypVUJJJwLsMl7hNJGRAUJoG8A5MgOI1ACKM+wBFxSJzKy4A==} + '@rolldown/binding-win32-arm64-msvc@1.2.15': + resolution: {integrity: sha512-+PgYiS+AH5omy6L45ZLxybasauJaj3M8buoT83D+nzPmCayXlxUV9hydhciCKVyIg0B/v0BtXPDE1uGqNwCPpg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@rolldown/binding-win32-x64-msvc@1.2.8': - resolution: {integrity: sha512-uz2ZvfgXbxqNwijjjbxrnvALwpyODDcgc1T1N8N3rf/DXKQmaFwmB4LX4yyjggpwN2obdQLb2rgirX5ffCWYng==} + '@rolldown/binding-win32-x64-msvc@1.2.15': + resolution: {integrity: sha512-HFZd2QNQYn1JbIi+Hpd7H+r/lkWxcfIu28nirZ6eCn2LafuvmExMlb/P96Sfx5tf7pPArw39IdhmCF8vmV+NhQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] @@ -901,8 +908,8 @@ packages: resolution: {integrity: sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==} engines: {node: '>=18'} - brace-expansion@5.0.9: - resolution: {integrity: sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==} + brace-expansion@5.0.12: + resolution: {integrity: sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==} engines: {node: 20 || >=22} braces@3.0.3: @@ -1774,6 +1781,11 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + nanoid@3.3.20: + resolution: {integrity: sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + negotiator@1.1.0: resolution: {integrity: sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg==} engines: {node: '>=18'} @@ -1902,6 +1914,10 @@ packages: resolution: {integrity: sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==} engines: {node: ^10 || ^12 || >=14} + postcss@8.5.31: + resolution: {integrity: sha512-YUbWYCgErwnMAVkjUnYa+KlMBzGpHwiIt/DE7f0G33AuX2LH9UcTk6KgWxd3zRU+pN3u/C+Xl3EnMLM4Hea7Sg==} + engines: {node: ^10 || ^12 || >=14} + powershell-utils@0.1.0: resolution: {integrity: sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A==} engines: {node: '>=20'} @@ -1918,8 +1934,8 @@ packages: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} - proxy-addr@2.0.7: - resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} + proxy-addr@2.0.8: + resolution: {integrity: sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ==} engines: {node: '>= 0.10'} qs@6.16.0: @@ -2059,8 +2075,8 @@ packages: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rolldown@1.2.8: - resolution: {integrity: sha512-Z67nTmhZe7anqnM/EjI392w5i/ANUinjip7QYsOyN37oayduxt3ksdX0hf5OOamkAd53BiIHfbfSzfUmzKFQqQ==} + rolldown@1.2.15: + resolution: {integrity: sha512-6odND+fel5zVw3I4Yc2e69gvguDnX0CAAGiNDZSq4ik5WUcaLrkD2GLuog0XcODbor31hZ5ayEMgVDno+KPV5g==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true @@ -2148,8 +2164,8 @@ packages: resolution: {integrity: sha512-e0VyvkVTwVYViNovRkZ9aodhxVlyoMn7eJhVUPxZ+eK9P/7CBkxvvsBOHqFPEH416726W8tLXXXjKwqgTErrCQ==} engines: {node: '>= 10.0.0', npm: '>= 3.0.0'} - source-map-js@1.2.1: - resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + source-map-js@1.2.2: + resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==} engines: {node: '>=0.10.0'} source-map@0.6.1: @@ -2245,8 +2261,8 @@ packages: undici-types@7.18.2: resolution: {integrity: sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==} - undici@7.29.1: - resolution: {integrity: sha512-RYONW2MeafgYlkVOKYKkA/Ag7BmXqgIWCa8t1m0JcxrQg9pI9lEqRhAOruOBCbAohOa/gkCF+iPi9hrgvTzu6Q==} + undici@7.30.1: + resolution: {integrity: sha512-03KrMbjIFDWQR5RNPrSw3bd1r12JpyFQl9/yxjUbJtqkjmllqC5lFjZh6ujeuJCKr8EOQvRW872Oy/az+nLYxg==} engines: {node: '>=20.18.1'} unicorn-magic@0.3.0: @@ -2306,13 +2322,13 @@ packages: victory-vendor@37.3.6: resolution: {integrity: sha512-SbPDPdDBYp+5MJHhBCAyI7wKM3d5ivekigc2Dk2s7pgbZ9wIgIBYGVw4zGHBml/qTFbexrofXW6Gu4noGxrOwQ==} - vite@8.2.2: - resolution: {integrity: sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q==} + vite@8.3.5: + resolution: {integrity: sha512-z1YpjieJ9g0ebTmQpLBv/oq9E3F9EIlOe+7LahW8SrE3LTiG3udBRUXQOlYXP9b+IC2q2phHeVxj9xGlw34OEQ==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: '@types/node': ^20.19.0 || >=22.12.0 - '@vitejs/devtools': ^0.4.0 || ^0.5.0 + '@vitejs/devtools': ^0.7.1 || ^0.8.0 esbuild: ^0.27.0 || ^0.28.0 jiti: '>=1.21.0' less: ^4.0.0 @@ -2652,7 +2668,7 @@ snapshots: open: 8.4.2 picomatch: 4.0.7 systeminformation: 5.33.10 - undici: 7.29.1 + undici: 7.30.1 which: 4.0.0 yocto-spinner: 1.2.2 @@ -2700,7 +2716,7 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.6.0 - '@modelcontextprotocol/sdk@1.30.0(zod@3.25.76)': + '@modelcontextprotocol/sdk@1.32.0(zod@3.25.76)': dependencies: '@hono/node-server': 2.1.1(hono@4.13.7) ajv: 8.20.0 @@ -2734,7 +2750,7 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.20.3 - '@oxc-project/types@0.149.0': {} + '@oxc-project/types@0.155.0': {} '@radix-ui/primitive@1.1.7': {} @@ -2885,49 +2901,49 @@ snapshots: react: 19.3.0 react-redux: 9.3.0(@types/react@19.3.0)(react@19.3.0)(redux@5.0.1) - '@rolldown/binding-android-arm-eabi@1.2.8': + '@rolldown/binding-android-arm-eabi@1.2.15': optional: true - '@rolldown/binding-android-arm64@1.2.8': + '@rolldown/binding-android-arm64@1.2.15': optional: true - '@rolldown/binding-darwin-arm64@1.2.8': + '@rolldown/binding-darwin-arm64@1.2.15': optional: true - '@rolldown/binding-darwin-x64@1.2.8': + '@rolldown/binding-darwin-x64@1.2.15': optional: true - '@rolldown/binding-freebsd-x64@1.2.8': + '@rolldown/binding-freebsd-x64@1.2.15': optional: true - '@rolldown/binding-linux-arm-gnueabihf@1.2.8': + '@rolldown/binding-linux-arm-gnueabihf@1.2.15': optional: true - '@rolldown/binding-linux-arm64-gnu@1.2.8': + '@rolldown/binding-linux-arm64-gnu@1.2.15': optional: true - '@rolldown/binding-linux-arm64-musl@1.2.8': + '@rolldown/binding-linux-arm64-musl@1.2.15': optional: true - '@rolldown/binding-linux-ppc64-gnu@1.2.8': + '@rolldown/binding-linux-ppc64-gnu@1.2.15': optional: true - '@rolldown/binding-linux-s390x-gnu@1.2.8': + '@rolldown/binding-linux-s390x-gnu@1.2.15': optional: true - '@rolldown/binding-linux-x64-gnu@1.2.8': + '@rolldown/binding-linux-x64-gnu@1.2.15': optional: true - '@rolldown/binding-linux-x64-musl@1.2.8': + '@rolldown/binding-linux-x64-musl@1.2.15': optional: true - '@rolldown/binding-openharmony-arm64@1.2.8': + '@rolldown/binding-openharmony-arm64@1.2.15': optional: true - '@rolldown/binding-win32-arm64-msvc@1.2.8': + '@rolldown/binding-win32-arm64-msvc@1.2.15': optional: true - '@rolldown/binding-win32-x64-msvc@1.2.8': + '@rolldown/binding-win32-x64-msvc@1.2.15': optional: true '@rolldown/pluginutils@1.0.1': {} @@ -2956,7 +2972,7 @@ snapshots: jiti: 2.7.0 lightningcss: 1.32.0 magic-string: 0.30.21 - source-map-js: 1.2.1 + source-map-js: 1.2.2 tailwindcss: 4.3.3 '@tailwindcss/oxide-android-arm64@4.3.3': @@ -3010,12 +3026,12 @@ snapshots: '@tailwindcss/oxide-win32-arm64-msvc': 4.3.3 '@tailwindcss/oxide-win32-x64-msvc': 4.3.3 - '@tailwindcss/vite@4.3.3(vite@8.2.2(@types/node@24.13.4)(jiti@2.7.0))': + '@tailwindcss/vite@4.3.3(vite@8.3.5(@types/node@24.13.4)(jiti@2.7.0))': dependencies: '@tailwindcss/node': 4.3.3 '@tailwindcss/oxide': 4.3.3 tailwindcss: 4.3.3 - vite: 8.2.2(@types/node@24.13.4)(jiti@2.7.0) + vite: 8.3.5(@types/node@24.13.4)(jiti@2.7.0) '@ts-morph/common@0.27.0': dependencies: @@ -3063,10 +3079,10 @@ snapshots: '@types/validate-npm-package-name@4.0.2': {} - '@vitejs/plugin-react@6.1.1(vite@8.2.2(@types/node@24.13.4)(jiti@2.7.0))': + '@vitejs/plugin-react@6.1.1(vite@8.3.5(@types/node@24.13.4)(jiti@2.7.0))': dependencies: '@rolldown/pluginutils': 1.0.1 - vite: 8.2.2(@types/node@24.13.4)(jiti@2.7.0) + vite: 8.3.5(@types/node@24.13.4)(jiti@2.7.0) accepts@2.0.0: dependencies: @@ -3124,7 +3140,7 @@ snapshots: transitivePeerDependencies: - supports-color - brace-expansion@5.0.9: + brace-expansion@5.0.12: dependencies: balanced-match: 4.0.4 @@ -3448,7 +3464,7 @@ snapshots: on-finished: 2.4.1 once: 1.4.0 parseurl: 1.3.3 - proxy-addr: 2.0.7 + proxy-addr: 2.0.8 qs: 6.16.0 range-parser: 1.3.0 router: 2.2.0 @@ -3844,7 +3860,7 @@ snapshots: minimatch@10.2.6: dependencies: - brace-expansion: 5.0.9 + brace-expansion: 5.0.12 minimist@1.2.8: {} @@ -3852,6 +3868,8 @@ snapshots: nanoid@3.3.18: {} + nanoid@3.3.20: {} + negotiator@1.1.0: dependencies: content-type: 2.1.0 @@ -3972,7 +3990,13 @@ snapshots: dependencies: nanoid: 3.3.18 picocolors: 1.1.1 - source-map-js: 1.2.1 + source-map-js: 1.2.2 + + postcss@8.5.31: + dependencies: + nanoid: 3.3.20 + picocolors: 1.1.1 + source-map-js: 1.2.2 powershell-utils@0.1.0: {} @@ -3987,7 +4011,7 @@ snapshots: kleur: 3.0.3 sisteransi: 1.0.5 - proxy-addr@2.0.7: + proxy-addr@2.0.8: dependencies: forwarded: 0.2.0 ipaddr.js: 1.9.1 @@ -4122,26 +4146,26 @@ snapshots: reusify@1.1.0: {} - rolldown@1.2.8: + rolldown@1.2.15: dependencies: - '@oxc-project/types': 0.149.0 + '@oxc-project/types': 0.155.0 '@rolldown/pluginutils': 1.0.1 optionalDependencies: - '@rolldown/binding-android-arm-eabi': 1.2.8 - '@rolldown/binding-android-arm64': 1.2.8 - '@rolldown/binding-darwin-arm64': 1.2.8 - '@rolldown/binding-darwin-x64': 1.2.8 - '@rolldown/binding-freebsd-x64': 1.2.8 - '@rolldown/binding-linux-arm-gnueabihf': 1.2.8 - '@rolldown/binding-linux-arm64-gnu': 1.2.8 - '@rolldown/binding-linux-arm64-musl': 1.2.8 - '@rolldown/binding-linux-ppc64-gnu': 1.2.8 - '@rolldown/binding-linux-s390x-gnu': 1.2.8 - '@rolldown/binding-linux-x64-gnu': 1.2.8 - '@rolldown/binding-linux-x64-musl': 1.2.8 - '@rolldown/binding-openharmony-arm64': 1.2.8 - '@rolldown/binding-win32-arm64-msvc': 1.2.8 - '@rolldown/binding-win32-x64-msvc': 1.2.8 + '@rolldown/binding-android-arm-eabi': 1.2.15 + '@rolldown/binding-android-arm64': 1.2.15 + '@rolldown/binding-darwin-arm64': 1.2.15 + '@rolldown/binding-darwin-x64': 1.2.15 + '@rolldown/binding-freebsd-x64': 1.2.15 + '@rolldown/binding-linux-arm-gnueabihf': 1.2.15 + '@rolldown/binding-linux-arm64-gnu': 1.2.15 + '@rolldown/binding-linux-arm64-musl': 1.2.15 + '@rolldown/binding-linux-ppc64-gnu': 1.2.15 + '@rolldown/binding-linux-s390x-gnu': 1.2.15 + '@rolldown/binding-linux-x64-gnu': 1.2.15 + '@rolldown/binding-linux-x64-musl': 1.2.15 + '@rolldown/binding-openharmony-arm64': 1.2.15 + '@rolldown/binding-win32-arm64-msvc': 1.2.15 + '@rolldown/binding-win32-x64-msvc': 1.2.15 router@2.2.0: dependencies: @@ -4201,7 +4225,7 @@ snapshots: '@babel/plugin-transform-typescript': 7.29.7(@babel/core@7.29.7) '@babel/preset-typescript': 7.29.7(@babel/core@7.29.7) '@dotenvx/dotenvx': 1.75.1 - '@modelcontextprotocol/sdk': 1.30.0(zod@3.25.76) + '@modelcontextprotocol/sdk': 1.32.0(zod@3.25.76) '@types/validate-npm-package-name': 4.0.2 browserslist: 4.28.9 cn: 0.2.6 @@ -4225,7 +4249,7 @@ snapshots: stringify-object: 5.0.0 ts-morph: 26.0.0 tsconfig-paths: 4.2.0 - undici: 7.29.1 + undici: 7.30.1 validate-npm-package-name: 7.0.2 zod: 3.25.76 zod-to-json-schema: 3.25.2(zod@3.25.76) @@ -4282,7 +4306,7 @@ snapshots: ip-address: 10.7.0 smart-buffer: 4.2.0 - source-map-js@1.2.1: {} + source-map-js@1.2.2: {} source-map@0.6.1: {} @@ -4360,7 +4384,7 @@ snapshots: undici-types@7.18.2: {} - undici@7.29.1: {} + undici@7.30.1: {} unicorn-magic@0.3.0: {} @@ -4416,12 +4440,12 @@ snapshots: d3-time: 3.1.0 d3-timer: 3.0.1 - vite@8.2.2(@types/node@24.13.4)(jiti@2.7.0): + vite@8.3.5(@types/node@24.13.4)(jiti@2.7.0): dependencies: lightningcss: 1.33.0 picomatch: 4.0.7 - postcss: 8.5.28 - rolldown: 1.2.8 + postcss: 8.5.31 + rolldown: 1.2.15 tinyglobby: 0.2.17 optionalDependencies: '@types/node': 24.13.4 diff --git a/project/platform__react-template/app_root/version/assets/portals/assets/index-Bf9Hj2Sw.js b/project/platform__react-template/app_root/version/assets/portals/assets/index-Bf9Hj2Sw.js new file mode 100644 index 0000000000..6679f1f2e4 --- /dev/null +++ b/project/platform__react-template/app_root/version/assets/portals/assets/index-Bf9Hj2Sw.js @@ -0,0 +1,15 @@ +var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function ee(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1_e||(e.current=ge[_e],ge[_e]=null,_e--)}function R(e,t){_e++,ge[_e]=e.current,e.current=t}var be=ve(null),xe=ve(null),Se=ve(null),Ce=ve(null);function we(e,t){switch(R(Se,t),R(xe,e),R(be,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ye(be),R(be,e)}function Te(){ye(be),ye(xe),ye(Se)}function Ee(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,R(Ce,e)),t=be.current;var n=dp(t,e.type);t!==n&&(R(xe,e),R(be,n))}function De(e){xe.current===e&&(ye(be),ye(xe)),Ce.current===e&&(ye(Ce),sh._currentValue=he)}var Oe,ke;function Ae(e){if(Oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Oe=t&&t[1]||``,ke=-1)`:-1i||c[r]!==l[i]){var u=` +`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{je=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ae(n):``}function z(e,t){switch(e.tag){case 26:case 27:case 5:return Ae(e.type);case 16:return Ae(`Lazy`);case 13:return e.child!==t&&t!==null?Ae(`Suspense Fallback`):Ae(`Suspense`);case 19:return Ae(`SuspenseList`);case 0:case 15:return Me(e.type,!1);case 11:return Me(e.type.render,!1);case 1:return Me(e.type,!0);case 31:return Ae(`Activity`);case 30:return Ae(`ViewTransition`);default:return``}}function Ne(e){try{var t=``,n=null;do t+=z(e,n),n=e,e=e.return;while(e);return t}catch(e){return` +Error generating stack: `+e.message+` +`+e.stack}}var Pe=Object.prototype.hasOwnProperty,Fe=t.unstable_scheduleCallback,Ie=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Re=t.unstable_requestPaint,ze=t.unstable_now,Be=t.unstable_getCurrentPriorityLevel,Ve=t.unstable_ImmediatePriority,B=t.unstable_UserBlockingPriority,He=t.unstable_NormalPriority,Ue=t.unstable_LowPriority,We=t.unstable_IdlePriority,Ge=t.log,Ke=t.unstable_setDisableYieldValue,qe=null,Je=null;function Ye(e){if(typeof Ge==`function`&&Ke(e),Je&&typeof Je.setStrictMode==`function`)try{Je.setStrictMode(qe,e)}catch{}}var Xe=Math.clz32?Math.clz32:$e,Ze=Math.log,Qe=Math.LN2;function $e(e){return e>>>=0,e===0?32:31-(Ze(e)/Qe|0)|0}var et=256,tt=262144,nt=4194304;function rt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function it(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=rt(n))):i=rt(o):i=rt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=rt(n))):i=rt(o)):i=rt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function at(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ot(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0n;n++)t.push(e);return t}function ut(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function dt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0=ur),pr=` `,mr=!1;function hr(e,t){switch(e){case`keyup`:return cr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function gr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var _r=!1;function vr(e,t){switch(e){case`compositionend`:return gr(t);case`keypress`:return t.which===32?(mr=!0,pr):null;case`textInput`:return e=t.data,e===pr&&mr?null:e;default:return null}}function yr(e,t){if(_r)return e===`compositionend`||!lr&&hr(e,t)?(e=jn(),An=kn=On=null,_r=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Hr(n)}}function Wr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vr(e.document)}return t}function Kr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var qr=Tn&&`documentMode`in document&&11>=document.documentMode,Jr=null,Yr=null,Xr=null,Zr=!1;function Qr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Zr||Jr==null||Jr!==Vr(r)||(r=Jr,`selectionStart`in r&&Kr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Xr&&Br(Xr,r)||(Xr=r,r=Jf(Yr,`onSelect`),0>=o,i-=o,Ji=1<<32-Xe(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),U&&Xi(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),U&&Xi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return U&&Xi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),U&&Xi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===j&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===j){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),ao(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ie&&Qa(l)===r.type){n(e,r.sibling),c=a(r,o.props),ao(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===j?(c=Fi(o.props.children,e.mode,c,o.key),ao(c,o),c.return=e,e=c):(c=Pi(o.type,o.key,o.props,null,e.mode,c),ao(c,o),c.return=e,e=c)}return s(e);case A:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Ri(o,e.mode,c),c.return=e,e=c}return s(e);case ie:return o=Qa(o),_(e,r,o,c)}if(me(o))return h(e,r,o,c);if(de(o)){if(l=de(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,io(o),c);if(o.$$typeof===P)return _(e,r,Ca(e,o),c);oo(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Ii(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ro=0;var i=_(e,t,n,r);return no=null,i}catch(t){if(t===Ka||t===Ja)throw t;var a=Ai(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var co=so(!0),lo=so(!1),uo=!1;function fo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function po(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function mo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ho(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,q&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Di(e),Ei(e,null,n),t}return Ci(e,r,t,n),Di(e)}function go(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}function _o(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var vo=!1;function yo(){if(vo){var e=La;if(e!==null)throw e}}function bo(e,t,n,r){vo=!1;var i=e.updateQueue;uo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===Ia&&(vo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:uo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),od|=o,e.lanes=o,e.memoizedState=d}}function xo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function So(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=I.T,s={};s.types=o===null?null:o.types,I.T=s,cc(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?sc(e,t,Ba(c,r),jd(e)):sc(e,t,r,jd(e))}catch(n){sc(e,t,{then:function(){},status:`rejected`,reason:n},jd())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function Zs(){}function Qs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=$s(e).queue;Xs(e,a,t,he,n===null?Zs:function(){return ec(e),n(r)})}function $s(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:he},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ec(e){var t=$s(e);t.next===null&&(t=e.alternate.memoizedState),sc(e,t.next.queue,{},jd())}function tc(){return Sa(sh)}function nc(){return is().memoizedState}function rc(){return is().memoizedState}function ic(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=jd();e=mo(n);var r=ho(t,e,n);r!==null&&(Pd(r,t,n),go(r,t,n)),t={cache:ka()},e.payload=t;return}t=t.return}}function ac(e,t,n){var r=jd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},lc(e)?uc(t,n):(n=wi(e,t,n,r),n!==null&&(Pd(n,e,r),dc(n,t,r)))}function oc(e,t,n){sc(e,t,n,jd())}function sc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(lc(e))uc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,zr(s,o))return Ci(e,t,i,0),$u===null&&Si(),!1}catch{}if(n=wi(e,t,i,r),n!==null)return Pd(n,e,r),dc(n,t,r),!0}return!1}function cc(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},lc(e)){if(t)throw Error(i(479))}else t=wi(e,n,r,2),t!==null&&Pd(t,e,2)}function lc(e){var t=e.alternate;return e===W||t!==null&&t===W}function uc(e,t){Ho=Vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function dc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}var fc={readContext:Sa,use:ss,useCallback:Jo,useContext:Jo,useEffect:Jo,useImperativeHandle:Jo,useLayoutEffect:Jo,useInsertionEffect:Jo,useMemo:Jo,useReducer:Jo,useRef:Jo,useState:Jo,useDebugValue:Jo,useDeferredValue:Jo,useTransition:Jo,useSyncExternalStore:Jo,useId:Jo,useHostTransitionStatus:Jo,useFormState:Jo,useActionState:Jo,useOptimistic:Jo,useMemoCache:Jo,useCacheRefresh:Jo,useEffectEvent:Jo},pc={readContext:Sa,use:ss,useCallback:function(e,t){return rs().memoizedState=[e,t===void 0?null:t],e},useContext:Sa,useEffect:Ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Fs(4194308,4,Us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fs(4194308,4,e,t)},useInsertionEffect:function(e,t){Fs(4,2,e,t)},useMemo:function(e,t){var n=rs();t=t===void 0?null:t;var r=e();if(Uo){Ye(!0);try{e()}finally{Ye(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=rs();if(n!==void 0){var i=n(t);if(Uo){Ye(!0);try{n(t)}finally{Ye(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ac.bind(null,W,e),[r.memoizedState,e]},useRef:function(e){var t=rs();return e={current:e},t.memoizedState=e},useState:function(e){e=ys(e);var t=e.queue,n=oc.bind(null,W,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Gs,useDeferredValue:function(e,t){return Js(rs(),e,t)},useTransition:function(){var e=ys(!1);return e=Xs.bind(null,W,e.queue,!0,!1),rs().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=W,a=rs();if(U){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),$u===null)throw Error(i(349));Y&127||ms(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ls(gs.bind(null,r,o,e),[e]),r.flags|=2048,Ns(9,{destroy:void 0},hs.bind(null,r,o,n,t),null),n},useId:function(){var e=rs(),t=$u.identifierPrefix;if(U){var n=Yi,r=Ji;n=(r&~(1<<32-Xe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Wo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[bt]=t,o[xt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(np(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&dl(t)}}return gl(t),t.subtreeFlags&=-33554433,fl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Se.current,ca(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ta,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[bt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ep(e.nodeValue,n)),e||aa(t,!0)}else e=lp(e).createTextNode(r),e[bt]=t,t.stateNode=e}return gl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ca(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[bt]=t}else la(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;gl(t),e=!1}else n=ua(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Po(t),t):(Po(t),null);if(t.flags&128)throw Error(i(558))}return gl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ca(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[bt]=t}else la(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;gl(t),a=!1}else a=ua(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Po(t),t):(Po(t),null)}return Po(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ml(t,t.updateQueue),gl(t),null);case 4:return Te(),e===null&&Wf(t.stateNode.containerInfo),t.flags|=67108864,gl(t),null;case 10:return ga(t.type),gl(t),null;case 19:if(Lo(t),r=t.memoizedState,r===null)return gl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)hl(r,!1);else{if(ad!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ro(e),o!==null){for(t.flags|=128,hl(r,!1),e=o.updateQueue,t.updateQueue=e,ml(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ni(n,e),n=n.sibling;return Io(t,Fo.current&1|2),U&&Xi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ze()>gd&&(t.flags|=128,a=!0,hl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Ro(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ml(t,e),hl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!U)return gl(t),null}else 2*ze()-r.renderingStartTime>gd&&n!==536870912&&(t.flags|=128,a=!0,hl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ze(),e.sibling=null,o=Fo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||U?Io(t,o):(n=o,R(Oo,t),R(Fo,n),ko===null&&(ko=t)),U&&Xi(t,r.treeForkCount),e}return gl(t),null;case 22:case 23:return Po(t),Do(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(gl(t),t.subtreeFlags&6&&(t.flags|=8192)):gl(t),n=t.updateQueue,n!==null&&ml(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ye(Ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ga(Oa),gl(t),null;case 25:return null;case 30:return t.flags|=33554432,gl(t),null}throw Error(i(156,t.tag))}function vl(e,t){switch($i(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ga(Oa),Te(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return De(t),null;case 31:if(t.memoizedState!==null){if(Po(t),t.alternate===null)throw Error(i(340));la()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Po(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));la()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Lo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Te(),null;case 10:return ga(t.type),null;case 22:case 23:return Po(t),Do(),e!==null&&ye(Ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ga(Oa),null;case 25:return null;default:return null}}function yl(e,t){switch($i(t),t.tag){case 3:ga(Oa),Te();break;case 26:case 27:case 5:De(t);break;case 4:Te();break;case 31:t.memoizedState!==null&&Po(t);break;case 13:Po(t);break;case 19:Lo(t);break;case 10:ga(t.type);break;case 22:case 23:Po(t),Do(),e!==null&&ye(Ha);break;case 24:ga(Oa)}}function bl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function xl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Sl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{So(t,n)}catch(t){Z(e,e.return,t)}}}function Cl(e,t,n){n.props=bc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function wl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=hi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Pp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Fp(e);h(e.child,!1,Qp,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Tl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}}function El(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n title`))),np(r,t,n),r[bt]=e,Pt(r),t=r;break a;case`link`:if(o=Gm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;sg&&(o=g,g=h,h=o);var _=Ur(s,h),v=Ur(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,I.T=null,n=wd,wd=null;var o=bd,s=Sd;if(yd=0,xd=bd=null,Sd=0,q&6)throw Error(i(331));var c=q;if(q|=4,Ju(o.current),Bu(o,o.current,s,n),q=c,Df(0,!1),Je&&typeof Je.onPostCommitFiberRoot==`function`)try{Je.onPostCommitFiberRoot(qe,o)}catch{}return!0}finally{L.p=a,I.T=r,uf(e,t)}}function pf(e,t,n){t=Bi(n,t),t=Ec(e.stateNode,t,2),e=ho(e,t,2),e!==null&&(ut(e,2),Ef(e))}function Z(e,t,n){if(e.tag===3)pf(e,e,n);else for(;t!==null;){if(t.tag===3){pf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(vd===null||!vd.has(r))){e=Bi(n,e),n=Dc(2),r=ho(t,n,2),r!==null&&(Oc(n,r,t,e),ut(r,2),Ef(r));break}}t=t.return}}function mf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Qu;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(rd=!0,i.add(n),e=hf.bind(null,e,t,n),t.then(e,e))}function hf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,$u===e&&(Y&n)===n&&(ad===4||ad===3&&(Y&62914560)===Y&&300>ze()-md?q&2?cd|=n:Vd(e,0):cd|=n,ud===Y&&(ud=0)),Ef(e)}function gf(e,t){t===0&&(t=ct()),e=Ti(e,t),e!==null&&(ut(e,t),Ef(e))}function _f(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gf(e,n)}function vf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),gf(e,n)}function yf(e,t){return Fe(e,t)}var bf=null,xf=null,Sf=!1,Cf=!1,wf=!1,Tf=0;function Ef(e){e!==xf&&e.next===null&&(xf===null?bf=xf=e:xf=xf.next=e),Cf=!0,Sf||(Sf=!0,Nf())}function Df(e,t){if(!wf&&Cf){wf=!0;do for(var n=!1,r=bf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Xe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Mf(r,a))}else a=Y,a=it(r,r===$u?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||at(r,a)||(n=!0,Mf(r,a))}r=r.next}while(n);wf=!1}}function Of(){kf()}function kf(){Cf=Sf=!1;var e=0;Tf!==0&&hp()&&(e=Tf);for(var t=ze(),n=null,r=bf;r!==null;){var i=r.next,a=Af(r,t);a===0?(r.next=null,n===null?bf=i:n.next=i,i===null&&(xf=n)):(n=r,(e!==0||a&3)&&(Cf=!0)),r=i}yd!==0&&yd!==5||Df(e,!1),Tf!==0&&(Tf=0)}function Af(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&ap(d)&&(c=c.responseEnd,o+=u*(c$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=en(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),Pt(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+en(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+en(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+en(n.imageSizes)+`"]`)):i+=`[href="`+en(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[Ot]=!0,o.onload=o.onerror=function(){Ft(o)}),Pt(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+en(r)+`"][href="`+en(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),Pt(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=Nt(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);Pt(c),np(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=Nt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Pt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=Nt(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Pt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var a=(a=Se.current)?bm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=Nt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var o=Nt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,o)),Lm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=Nt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pm(e){return`href="`+en(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Ot]){r.loading=1;return}}else t=e.createElement(`link`),t[Ot]=!0,t.onload=t.onerror=Ft.bind(null,t),np(t,`link`,n),Pt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+en(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+en(n.href)+`"]`);if(r)return t.instance=r,Pt(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Pt(r),np(r,`style`,a),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pm(n.href);var o=e.querySelector(Fm(a));if(o)return t.state.loading|=4,t.instance=o,Pt(o),o;r=Im(n),(a=vm.get(a))&&Hm(r,a),o=(e.ownerDocument||e).createElement(`link`),Pt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),np(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(a=e.querySelector(zm(o)))?(t.instance=a,Pt(a),a):(r=n,(a=vm.get(o))&&(r=D({},n),Um(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Pt(a),np(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Pt(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),Pt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=c(u(),1),v=g(),y=()=>{if(typeof document>`u`)return{};let e=document.getElementById(`semoss-env`)?.textContent?.trim();if(!e)return{};let t;try{t=JSON.parse(e)}catch{return console.warn(`Ignoring the semoss-env tag: contents are not valid JSON`),{}}if(!t||typeof t!=`object`||Array.isArray(t))return console.warn(`Ignoring the semoss-env tag: expected a JSON object`),{};let n=t,r={};return typeof n.APP==`string`&&n.APP.trim()&&(r.APP=n.APP.trim()),typeof n.MODULE==`string`&&n.MODULE.trim()&&(r.MODULE=n.MODULE.trim()),r},b={APP:``,MODULE:``,ACCESS_KEY:``,SECRET_KEY:``,BEARER_TOKEN:``,BEARER_PROVIDER:``,CSRF:!1,REDIRECT_URL:``,TOOL:null},x={get APP(){return b.APP},get MODULE(){return b.MODULE},get ACCESS_KEY(){return b.ACCESS_KEY},get SECRET_KEY(){return b.SECRET_KEY},get BEARER_TOKEN(){return b.BEARER_TOKEN},get BEARER_PROVIDER(){return b.BEARER_PROVIDER},get CSRF(){return b.CSRF},get REDIRECT_URL(){return b.REDIRECT_URL},get TOOL(){return b.TOOL},update(e){Object.assign(b,e)},refreshFromDocument(){this.update(y())}};x.refreshFromDocument(),typeof window<`u`&&window?.addEventListener(`message`,e=>{try{if(!e.data||e.data.type!==`SMSS_INIT_TOOL`)return;let t=e.data;x.update({TOOL:{type:t.tool.type,message:t.tool.message||``,id:t.tool.id||``,name:t.tool.name||``,parameters:t.tool.parameters||{},roomId:t.tool.roomId||``,original_name:t.tool.original_name||``,tool_response:t.tool.tool_response,executedParameters:t.tool.executedParameters}})}catch{}},!1);var S=class extends Error{constructor(e){super(e),this.name=this.constructor.name}},C=class extends S{constructor(e,t=401){super(e),this.code=t}},w={isEnabled:!1,token:``},T=e=>{if(typeof window>`u`)return null;try{return new URL(e,window.location.origin).toString()}catch{return null}},E=e=>(e.headers.get(`content-type`)||``).toLowerCase().includes(`text/html`),D=e=>{if(typeof window>`u`)return!1;let t=e.headers.get(`redirect`)||e.headers.get(`location`);if(t){let e=T(t);if(e)return window.location.replace(x.REDIRECT_URL||e),!0}return e.redirected&&e.url&&E(e)?(window.location.replace(e.url),!0):!1},O={request:async e=>{if(e.headers||={},x.ACCESS_KEY&&x.SECRET_KEY&&(e.headers={...e.headers,authorization:`Basic ${btoa(`${x.ACCESS_KEY}:${x.SECRET_KEY}`)}`}),x.BEARER_TOKEN&&(e.headers={...e.headers,authorization:`Bearer ${x.BEARER_TOKEN}`}),x.BEARER_PROVIDER&&(e.headers={...e.headers,"Bearer-Provider":x.BEARER_PROVIDER}),!(x.ACCESS_KEY&&x.SECRET_KEY)&&(w.isEnabled||x.CSRF)&&e.method===`POST`){if(!w.token){let e=await fetch(`${x.MODULE}/api/config/fetchCsrf`,{headers:{"X-CSRF-Token":`fetch`}});w.token=e.headers.get(`X-CSRF-Token`)||e.headers.get(`x-csrf-token`)||``}w.token&&(e.headers={...e.headers,"X-CSRF-Token":w.token})}return e},response:async({response:e})=>{if(D(e))throw new C(`Redirecting from header direct value`,302)}},k=async(e,t={})=>{t={method:`GET`,...t},O.request&&(t=await O.request(t));let n=await fetch(`${e}`,t);if(O.response&&await O.response({response:n}),!n.ok){let e=await n.json(),t=e.message||e.error||e.errorMessage||`Request failed with status ${n.status}`;throw Error(t)}return{response:n,data:await n.json()}},A=async(e,t,n={})=>{let r=t instanceof FormData,i={};n.headers&&(i=n.headers),r||(i[`Content-Type`]=`application/x-www-form-urlencoded`),n={method:`POST`,headers:i,body:r?t:Object.keys(t).map(e=>{let n=t[e];return typeof n!=`string`&&(n=JSON.stringify(t[e])),`${encodeURIComponent(e)}=${encodeURIComponent(n)}`}).join(`&`),...n},O.request&&(n=await O.request(n));let a=await fetch(`${e}`,n);if(O.response&&await O.response({response:a}),!a.ok){let e={};try{e=await a.json()}catch{e={}}let t=e.message||e.error||e.errorMessage||`Request failed with status ${a.status}`;throw Error(t)}return{response:a,data:await a.json()}},j=async()=>{let e=await k(`${x.MODULE}/api/config`);if(e.data?.csrf){let t=e.data[`X-CSRF-Token`];w.isEnabled=!0,w.token=t}return e.data},M=async(e,t)=>{if(!e)throw Error(`Missing Pixel`);let n={expression:e};t&&(n.insightId=t);try{n.tz=Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}let r=await A(`${x.MODULE}/api/engine/runPixel`,n,{}),i=[];for(let e of r.data.pixelReturn){let{output:t,operationType:n}=e;n.indexOf(`ERROR`)>-1&&i.push(t)}return{errors:i,insightId:r.data.insightID,pixelReturn:r.data.pixelReturn}},ee=async(e,t)=>{if(!e)throw Error(`No Pixel To Execute`);let n={expression:e};t&&(n.insightId=t);try{n.tz=Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}return{jobId:(await A(`${x.MODULE}/api/engine/runPixelAsync`,n,{})).data.jobId}},N=async e=>{if(!e)throw Error(`No job id provided to get pixel response`);let t={jobId:e},n=await A(`${x.MODULE}/api/engine/result`,t,{}),r=[];for(let e of n.data.pixelReturn){let{output:t,operationType:n}=e;n.indexOf(`ERROR`)>-1&&r.push(t)}return{errors:r,insightId:n.data.insightID,results:n.data.pixelReturn}},P=async e=>{if(!e)throw Error(`No job id provided for streaming`);return(await A(`${x.MODULE}/api/engine/pixelJobStreaming`,{jobId:e})).data},te=async(e,t)=>{let{roomId:n,command:r,engine:i,harnessType:a,agentId:o,maxTurns:s,maxReflections:c,media:l,urls:u,paramValues:d}=e,f=await M(`RunAgent(${[`roomId=${JSON.stringify([n])}`,`command=${JSON.stringify([r])}`,i?`engine=${JSON.stringify([i])}`:null,a?`harnessType=${JSON.stringify(a)}`:null,o?`workspaceId=${JSON.stringify([o])}`:null,s===void 0?null:`maxTurns=${JSON.stringify(s)}`,c===void 0?null:`maxReflections=${JSON.stringify(c)}`,l&&l.length>0?`media=${JSON.stringify(l)}`:null,u&&u.length>0?`url=${JSON.stringify(u)}`:null,d&&Object.keys(d).length>0?`paramValues=[${JSON.stringify(d)}]`:null,`wait=false`].filter(e=>e!==null).join(`, +`)});`,t);if(f.errors.length>0)throw Error(f.errors.join(``));return f.pixelReturn[0].output},ne=async e=>{if(!e)throw Error(`Missing runId`);return(await A(`${x.MODULE}/api/engine/agentRunStreaming`,{runId:e})).data},F=async(e,t={},n)=>{if(!e)throw Error(`Missing runId`);let r=await M(`GetAgentRun(${[`runId=${JSON.stringify([e])}`,t.includeMessages?`includeMessages=true`:null].filter(e=>e!==null).join(`, +`)});`,n);if(r.errors.length>0)throw Error(r.errors.join(``));let i=r.pixelReturn[0].output;return{...i,pendingActions:i.pendingActions??[]}},re=async(e,t)=>{if(!e)throw Error(`Missing runId`);let n=await M(`StopAgentRun(runId=${JSON.stringify([e])});`,t);if(n.errors.length>0)throw Error(n.errors.join(``));let r=n.pixelReturn[0].output;return{...r,pendingActions:r.pendingActions??[]}},ie=async(e,t)=>{let{actionId:n,decision:r,paramValues:i,mcpToolResult:a}=e,o=await M(`RunMCPTool(${[`actionId=${JSON.stringify([n])}`,`decision=${JSON.stringify([r])}`,r===`edit`?`paramValues=${JSON.stringify(i??{})}`:null,r===`respond`?`mcpToolResult=${JSON.stringify([a??``])}`:null].filter(e=>e!==null).join(`, +`)});`,t);if(o.errors.length>0)throw Error(o.errors.join(``));return o.pixelReturn[0].output},ae=async(e,t,n,r)=>{let i=new FormData;if(Array.isArray(n))for(let e=0;e(await A(`${x.MODULE}/api/auth/login`,{username:e,password:t,disableRedirect:!0}),!0),se=async(e,t)=>(await A(`${x.MODULE}/api/auth/loginLDAP`,{username:e,password:t,disableRedirect:!0}),!0),ce=async(e,t)=>(await A(`${x.MODULE}/api/auth/loginLinOTP`,{username:e,pin:t,disableRedirect:!0}),!0),le=async e=>(await A(`${x.MODULE}/api/auth/loginLinOTP`,{otp:e,disableRedirect:!0}),!0),ue=async(e,t=!1)=>{if((await k(`${x.MODULE}/api/auth/userinfo/${e}`)).data?.name)return!0;if(t)throw Error(`Unable to login`);return new Promise((t,n)=>{if(typeof window>`u`||window.top===void 0){n(`Unable to login`);return}let r=`${x.MODULE}/api/auth/login/${e}`,i=window.top.open(r,`_blank`,`height=600,width=400,top=300,left=600`),a=setInterval(async()=>{try{!i||i.closed||i.closed===void 0?clearInterval(a):i.document.location.href.indexOf(`${window.location.host}`)>-1&&(clearInterval(a),i.close(),t(await ue(e,!0)))}catch{}},1e3)})},de=async()=>(await k(`${x.MODULE}/api/auth/logout/all?disableRedirect=true`),w.token=``,!0),fe=async(e,t)=>{let{errors:n,pixelReturn:r}=await M(t?`CreateRoom(workspaceId="${t}");`:`CreateRoom();`,e);if(n.length>0)throw Error(n.join(`, `));let i=r[0]?.output;if(!i)throw Error(`CreateRoom returned no data`);return i},pe=async(e,t)=>{let{errors:n,pixelReturn:r}=await M(`GetRoomMessages(roomId=["${t}"]);`,e);if(n.length>0)throw Error(n.join(`, `));let i=r[0]?.output;if(!i)throw Error(`GetRoomMessages returned no data`);return i},me=async(e,t)=>{let{errors:n,pixelReturn:r}=await M(`GetRoomOptions(roomId="${t}");`,e);if(n.length>0)throw Error(n.join(`, `));let i=r[0]?.output;if(!i)throw Error(`GetRoomOptions returned no data`);return i},I=async(e,t)=>{let{errors:n}=await M(`SetRoomForInsight(roomId="${t}");`,e);if(n.length>0)throw Error(n.join(`, `))},L=async e=>{let{errors:t,pixelReturn:n}=await M(`GetRoomForInsight();`,e);if(t.length>0)throw Error(t.join(`, `));return n[0]?.output??null},he=async(e,t,n)=>{let{errors:r}=await M(`UpdateRoomOptions(roomId="${t}", roomOptions=${JSON.stringify(n)});`,e);if(r.length>0)throw Error(r.join(`, `))},ge=async(e,t)=>{let{engine:n,roomId:r,command:i,context:a,image:o=[],parentMessageId:s,paramValues:c=[{}]}=t;return ee(`AskRoom(engine=["${n}"], roomId=["${r}"], command=["${i}"], context=["${a}"], image=${JSON.stringify(o)}, parentMessageId=["${s}"], paramValues=${JSON.stringify(c)})`,e)},_e=async(e,t,n,r)=>{let i=new FormData;if(Array.isArray(n))for(let e=0;e{let i=``;r||=``,(t||n||r)&&(t&&(i.length>0&&(i+=`&`),i+=`insightId=${t}`),n&&(i.length>0&&(i+=`&`),i+=`projectId=${n}`),r&&(i.length>0&&(i+=`&`),i+=`path=${r}`),i=`?${i}`);let a=`${x.MODULE}/api/uploadFile/baseUpload${i}`,o=new FormData;if(Array.isArray(e))for(let t=0;t{if(!e)throw Error(`No Insight ID provided for download.`);let n=`${x.MODULE}/api/engine/downloadFile?insightId=${e}&fileKey=${encodeURIComponent(t)}`;if(typeof window<`u`&&typeof document<`u`)return new Promise(e=>{let t=document.createElement(`a`);t.href=n,t.target=`_blank`,document.body.appendChild(t),t.click(),document.body.removeChild(t),e()});{let e=await fetch(n);if(!e.ok){let t=await e.json(),n=t.message||t.error||`Request failed with status ${e.status}`;throw Error(n)}return await e.arrayBuffer()}},R=async(e,t,n)=>{let r=new FormData;if(Array.isArray(n))for(let e=0;e{let r=new FormData;if(Array.isArray(t))for(let e=0;e({itemsById:{},itemOrder:[]}),Ce=(e,t)=>{if(t.type===`item.started`){let{item:n}=t;return e.itemsById[n.id]?e:{itemsById:{...e.itemsById,[n.id]:n},itemOrder:[...e.itemOrder,n.id]}}if(t.type===`item.updated`){let n=e.itemsById[t.itemId];if(!n)return e;let r=n;return t.delta===void 0?t.patch&&(r={...n,...t.patch}):n.kind===`message`?r={...n,text:n.text+t.delta}:n.kind===`reasoning`&&(r={...n,summary:n.summary+t.delta}),{...e,itemsById:{...e.itemsById,[t.itemId]:r}}}let{item:n}=t,r=!!e.itemsById[n.id];return{itemsById:{...e.itemsById,[n.id]:n},itemOrder:r?e.itemOrder:[...e.itemOrder,n.id]}},we=class e{constructor(e,t,n){this._subscription=null,this.roomId=e,this.insightId=t,this.runId=n}get isWatching(){return this._subscription!==null}get done(){return this._subscription?.done??Promise.resolve(null)}watch(e,t={}){if(this._subscription)return this._subscription;let{runId:n}=this,{pollIntervalMs:r=500,inputRequiredIntervalMultiplier:i=3,signal:a,maxConsecutiveFailures:o=8}=t,{onEvent:s,onSnapshot:c,onReconcile:l,onError:u}=e,d=!1,f=null,p=null,m=new Set,h=0,g=Se(),_=null,v=()=>{d||(d=!0,a?.removeEventListener(`abort`,v),_?.())},y=()=>_?.(),b=e=>new Promise(t=>{let n=setTimeout(()=>{_=null,t()},e);_=()=>{clearTimeout(n),_=null,t()}});a?.addEventListener(`abort`,v);let x=async e=>{if(p!==e){p=e;try{let e=await F(n,{includeMessages:!0});l(e)}catch(e){u?.(e)}}},S=(async()=>{for(;!d;){let e=r;try{let{run:t,events:a,droppedEvents:o}=await ne(n);h=0,f=t;let l=[...a].sort((e,t)=>e.sequence-t.sequence),u=0;for(let e of l)m.has(e.eventId)||(m.add(e.eventId),g=Ce(g,e),s(e,g),u++);if(c(t,{droppedEvents:o}),t.status===`INPUT_REQUIRED`)await x(t.status),e=r*i;else if(xe.has(t.status)){if(u>0)e=Math.min(r,100);else{await x(t.status),v();break}}else p=null}catch(t){if(h++,u?.(t),h>=o){try{let e=await F(n,{includeMessages:!0});f=e,p=e.status,l(e)}catch(e){u?.(e)}v();break}e=Math.min(r*2**Math.min(h,4),1e4)}if(d)break;await b(e)}})().then(()=>f,()=>f);return this._subscription={stop:v,getItems:()=>g,pokeNow:y,done:S},this._subscription}stop(){this._subscription?.stop()}pokeNow(){this._subscription?.pokeNow()}async getSnapshot(e={}){return F(this.runId,e,this.insightId)}async cancel(){return re(this.runId,this.insightId)}async decide(e,t,n){let r=t===`reject`?`reject`:t===`respond`?`respond`:n===void 0||JSON.stringify(n)===JSON.stringify(e.toolArgs??{})?`approve`:`edit`,i=await ie({actionId:e.actionId,decision:r,paramValues:r===`edit`?n:void 0,mcpToolResult:r===`respond`?JSON.stringify(n??{}):void 0},this.insightId);return this.pokeNow(),i}static async start(t,n){let{runId:r,roomId:i}=await te(t,n);return new e(i,n,r)}},Te=[`ProgressComplete`,`Complete`,`Canceled`,`Error`,`UnknownJob`],Ee=class e{constructor(e,t,n){this._lastResponseMessageId=`ROOT_PLACEHOLDER_ID`,this._agent=null,this.roomId=e,this.insightId=t,this._options=n}get options(){return this._options}get agent(){return this._agent}async _stream(e,t){for(;;){let{message:n,status:r}=await P(e);if(t)for(let e of n)e.stream_type===`content`&&e.data.content?t({type:`content`,content:e.data.content}):e.stream_type===`thinking`&&e.data.thinking?t({type:`thinking`,thinking:e.data.thinking}):e.stream_type===`tool`&&t({type:`tool`,toolData:e.data});if(Te.includes(r))break}}async updateOptions(e){let t={...this._options,...e};await he(this.insightId,this.roomId,[t]),this._options=t}async getMessages(){return pe(this.insightId,this.roomId)}async ask(e,t={}){let{onChunk:n,parentMessageId:r=this._lastResponseMessageId,image:i=[],context:a=this._options.instructions}=t,{jobId:o}=await ge(this.insightId,{engine:this._options.modelId,roomId:this.roomId,command:e,context:a,image:i,parentMessageId:r});await this._stream(o,n);let{errors:s,results:c}=await N(o);if(s.length>0)throw Error(s.join(`, `));let l=c[0].output,u=l.responseMessage.parts.filter(e=>e.type===`TEXT`&&e.text).map(e=>e.text).join(``);return this._lastResponseMessageId=l.responseMessage.messageId,{inputMessageId:l.inputMessage.messageId,responseMessageId:l.responseMessage.messageId,text:u}}async createAgent(e,t){return this._agent=await we.start({roomId:this.roomId,command:e,engine:t??this._options.modelId},this.insightId),this._agent}async askAgent(e,t={}){let{onChunk:n,onPendingActions:r}=t,i=await this.createAgent(e),a=await new Promise((e,t)=>{i.watch({onEvent:e=>{n&&(e.type===`item.updated`?e.kind===`message`&&e.delta?n({type:`content`,content:e.delta}):e.kind===`reasoning`&&e.delta?n({type:`thinking`,thinking:e.delta}):e.patch&&n({type:`tool`,toolData:e.patch}):e.item.kind===`tool`&&n({type:`tool`,toolData:e.item}))},onSnapshot:()=>{},onReconcile:n=>{n.status===`INPUT_REQUIRED`?r?r(n.pendingActions):(i.stop(),t(Error(`Agent run paused awaiting a tool decision (INPUT_REQUIRED), but no onPendingActions handler was provided to askAgent — pass one and resolve each action with agent.decide(), or the run has no way to resume.`))):(n.status===`COMPLETED`||n.status===`FAILED`||n.status===`CANCELLED`)&&e(n)},onError:e=>{console.error(`Agent run stream error`,e)}})});if(a.status!==`COMPLETED`)throw Error(`Agent run did not complete: ${a.status}${a.errorMessage?` — ${a.errorMessage}`:``}`);return this._lastResponseMessageId=a.finalOutputMessageId??this._lastResponseMessageId,{inputMessageId:a.inputMessageId??``,responseMessageId:a.finalOutputMessageId??``,text:a.finalText??``,status:a.status}}static async create(t,n){let r=await fe(t,n);return await I(t,r.roomId),new e(r.roomId,t,{predefinedPrompts:[],instructions:``,mcp:[],modelId:``})}},De=(e,t)=>Ee.create(e,t),Oe=null,ke=null,Ae=async()=>{if(Oe)return Oe;ke||=j();try{return Oe=await ke,Oe}catch(e){throw ke=null,e}},je=class{constructor(){this._store={insightId:`new`,isInitialized:!1,isAuthorized:!1,isReady:!1,error:null,system:null,meta:{},options:{appId:``,python:null,disableRoom:!1}},this._room=null,this._initializing=null,this.initialize=async e=>{if(this._initializing)return this._initializing;this._initializing=this.runInitialize(e);try{return await this._initializing}finally{this._initializing=null}},this.runInitialize=async e=>{this._store.isInitialized=!1,this._store.isAuthorized=!1,this._store.isReady=!1,this._room=null;let t={app:e?.app||``,python:e&&e.python!==void 0?e.python:!1,disableRoom:e?.disableRoom||!1,insightId:e?.insightId||``};this._store.insightId=``,t.insightId&&(this._store.insightId=t.insightId),this._store.options.appId=``,t.app&&(this._store.options.appId=t.app),this._store.options.python=null,t.python&&(t.python.type===`file`?this._store.options.python=await this.loadScript(t.python):t.python.type===`script`&&(this._store.options.python={script:t.python.script,alias:t.python.alias})),this._store.options.disableRoom=t.disableRoom||!1,x.refreshFromDocument();try{if(x.APP&&(this._store.options.appId=x.APP),!x.MODULE)throw Error(`module is required`);if(await this.setupSystem(),!this._store.isInitialized)throw Error(`Error loading system`);if(this._store.system&&Object.keys(this._store.system.config.logins).length>0||x.ACCESS_KEY&&x.SECRET_KEY)return this._store.isAuthorized=!0,await this.setupInsight(),{tool:x.TOOL};this._store.isAuthorized=!1}catch(e){console.warn(e),this._store.error=e}return null},this.destroy=async()=>{try{await this.destroyInsight(),this.destroySystem()}catch(e){console.warn(e),this._store.error=e}finally{this._store.isInitialized=!1,this._store.isAuthorized=!1,this._store.isReady=!1}},this.setupSystem=async()=>{this._store.isInitialized=!1;let e=await Ae(),t=null;if(e){t={config:{logins:{},availableProviders:[],theme:{playground:{}},systemDate:``}};for(let n in e)t.config[n]=e[n]}this._store.system=t,this._store.system?this._store.isInitialized=!0:this._store.isInitialized=!1},this.destroySystem=()=>{this._store.system=null},this.setupInsight=async()=>{this._store.isReady=!1;let e=!!this._store.insightId,t=``;if(this._store.options.appId&&(t+=`SetContext("${this._store.options.appId}");`),this._store.options.python?.script){let e=this._store.options.python.alias;e||(e=`smss`,console.warn(`Alias not found. Loading python as ${e}`)),t+=` +WriteObjectToFile(value="${this._store.options.python.script}", filePath = "temp.py"); +LoadPyFromFile(alias="${e}", filePath="temp.py"); + `}if(!t&&e){x?.TOOL?.roomId&&!this._store.options.disableRoom&&await this.actions.getRoom(),this._store.isReady=!0;return}t||=`META | init`;let{insightId:n,errors:r}=await M(t,this._store.insightId);if(r.length)throw Error(r[0]);this._store.insightId=n,x?.TOOL?.roomId&&!this._store.options.disableRoom&&await this.actions.getRoom(),this._store.isReady=!0},this.destroyInsight=async()=>{if(!this._store.insightId)return;let{errors:e}=await M(`DropInsight()`,this._store.insightId);if(e.length)throw Error(e[0]);this._store.insightId=``,this._room=null},this.processActionError=e=>{if(e instanceof C)this._store.isAuthorized=!1;else throw e},this.loadScript=async e=>{let t={script:``,alias:e.alias};try{let n=await(await fetch(e.path)).text();if(!n)throw Error(`No Text`);t.script=n}catch(e){return console.warn(e),null}return t},this.actions={requestOTP:async(e,t)=>{try{return await ce(e,t)}catch(e){this.processActionError(e)}return!1},login:async e=>{try{let t=!1;return e.type===`native`?await oe(e.username,e.password)&&(t=!0):e.type===`ldap`?await se(e.username,e.password)&&(t=!0):e.type===`linotp`?await le(e.otp)&&(t=!0):e.type===`oauth`&&await ue(e.provider)&&(t=!0),t?(this._store.isAuthorized=!0,await this.setupInsight()):this._store.isAuthorized=!1,t}catch(e){this.processActionError(e)}return!1},logout:async()=>{try{return await de()?(this._store.isAuthorized=!1,this._store.insightId=``,this._store.isReady=!1,this._room=null,!0):!1}catch(e){this.processActionError(e)}return!1},run:async e=>{try{let{errors:t,pixelReturn:n}=await M(e,this._store.insightId);if(t.length)throw Error(t.join(``));return{pixelReturn:n}}catch(e){this.processActionError(e)}throw Error(`No response`)},runAsync:async e=>{try{let{jobId:t}=await ee(e,this._store.insightId);return{jobId:t}}catch(e){this.processActionError(e)}throw Error(`No response`)},runPy:async e=>{let{pixelReturn:t}=await this.actions.run(`Py("${e}")`);return{output:t[0].output[0].output}},askModel:async(e,t)=>{let{pixelReturn:n}=await this.actions.run(`LLM(engine=["${e}"], command=["${t}"]);`);return{output:n[0].output}},getRoom:async()=>{if(this._store.options.disableRoom)return null;if(this._room)return this._room;let e=x.TOOL?.roomId;if(e){await I(this._store.insightId,e);let t=await me(this._store.insightId,e);return this._room=new Ee(e,this._store.insightId,t),this._room}let t=await L(this._store.insightId);if(t){let e=await me(this._store.insightId,t.roomId);return this._room=new Ee(t.roomId,this._store.insightId,e),this._room}return this._room=await De(this._store.insightId),this._room},sendMCPResponseToRoom:(e,t=`success`,n={})=>{if(!x.TOOL)throw Error(`No MCP tool execution context found`);if(typeof window>`u`||window.parent===void 0)throw Error(`Cannot send MCP tool response outside of embedded browser`);window.parent.postMessage({type:`SMSS_EXEC_TOOL`,tool:{type:`MCP`,message:x.TOOL.message,id:x.TOOL.id,name:x.TOOL.name,response:e,roomId:x.TOOL.roomId,tool_status:t,executedParameters:n}},`*`)},runMCPTool:async(e,t)=>{let{pixelReturn:n}=await this.actions.run(`RunMCPTool(project = [ "${this._store.options.appId}" ], function=[ "${e}" ], paramValues=[ ${JSON.stringify(t)} ] );`),r=n[0].operationType||``,i=n[0].output,a=typeof i==`string`?i:JSON.stringify(i);if(!a||r.indexOf(`MCP_TOOL_EXECUTION`)<0)throw Error(`Error running MCP tool`);if(x.TOOL)try{this.actions.sendMCPResponseToRoom(a,`success`,t)}catch(e){console.warn(`Failed to send MCP response to room${e.message?`: ${e.message}`:``}`)}return{output:a}},queryDatabase:async(e,t,n={collect:-1})=>{let{pixelReturn:r}=await this.actions.run(`Database(database=["${e}"]) | Query("${t}") | Collect(${typeof n.collect==`number`?n.collect:-1});`);return{output:r[0].output}},upload:async(e,t)=>{try{return await ve(e,this._store.insightId,``,t)}catch(e){this.processActionError(e)}throw Error(`No upload`)},download:async e=>{let{pixelReturn:t}=await this.actions.run(`DownloadAsset(filePath=["${e}"], space=["${this._store.insightId}"]);`),n=t[0].output;try{return await ye(this._store.insightId,n),!0}catch(e){this.processActionError(e)}throw Error(`No download`)},uploadApp:async(e,t,n)=>{try{return await ae(e,t,n,this._store.insightId)}catch(e){this.processActionError(e)}throw Error(`No upload`)},uploadEngine:async(e,t,n)=>{try{return await _e(e,t,n,this._store.insightId)}catch(e){this.processActionError(e)}throw Error(`No upload`)},uploadInsight:async(e,t)=>{try{return await R(this._store.insightId,e,t)}catch(e){this.processActionError(e)}throw Error(`No upload`)},uploadUser:async(e,t)=>{try{return await be(e,t,this._store.insightId)}catch(e){this.processActionError(e)}throw Error(`No upload`)}}}get insightId(){return this._store.insightId}get isInitialized(){return this._store.isInitialized}get isAuthorized(){return this._store.isAuthorized}get isReady(){return this._store.isReady}get error(){return this._store.error}get system(){return this._store.system}updateUserDefaultModel(e,t){this._store.meta={...this._store.meta,[e]:t}}get defaultTextGenerationModel(){let e=this._store.meta;if(e&&typeof e==`object`){let t=e[`text-generation-model`];if(t)return typeof t==`string`?t:``}return``}get defaultCodeGenerationModel(){let e=this._store.meta;if(e&&typeof e==`object`){let t=e[`code-generation-model`];if(t)return typeof t==`string`?t:``}return``}setUserDefaultModel(e){this._store.meta={...e}}},Me=o((e=>{var t=Symbol.for(`react.transitional.element`);function n(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.jsx=n,e.jsxs=n})),z=o(((e,t)=>{t.exports=Me()}))(),Ne=(0,_.createContext)(void 0),Pe=e=>{let{children:t,options:n,destroyOnUnmount:r=!0}=e,i=(0,_.useMemo)(()=>new je,[]),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)(null),[h,g]=(0,_.useState)(``),v=(0,_.useCallback)(()=>{f(i.error),m(i.system),c(i.isAuthorized),o(i.isInitialized),u(i.isReady),g(i.insightId)},[i]),y=(0,_.useMemo)(()=>Object.keys(i.actions).reduce((e,t)=>(e[t]=async(...e)=>{let n=await i.actions[t].apply(null,[...e]);return v(),n},e),{}),[i,i.actions,v]);return(0,_.useEffect)(()=>(i.initialize(n).finally(()=>v()),()=>{r?i.destroy().finally(()=>{v()}):v()}),[i,JSON.stringify(n),r,v]),(0,z.jsx)(Ne.Provider,{value:{isInitialized:a,isAuthorized:s,isReady:l,error:d,system:p,actions:y,insightId:h,tool:x.TOOL??null},children:t})},Fe=()=>{let e=(0,_.useContext)(Ne);if(e===void 0)throw Error(`useInsight must be used within InsightProvider`);return e},Ie=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Le=/^[\\/]{2}/;function Re(e,t){return t+e.replace(/\\/g,`/`)}var ze=`popstate`;function Be(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function Ve(e={}){function t(e,t){let{pathname:n=`/`,search:r=``,hash:i=``}=qe(e.location.hash.substring(1));return!n.startsWith(`/`)&&!n.startsWith(`.`)&&(n=`/`+n),Ge(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){let n=e.document.querySelector(`base`),r=``;if(n&&n.getAttribute(`href`)){let t=e.location.href,n=t.indexOf(`#`);r=n===-1?t:t.slice(0,n)}return r+`#`+(typeof t==`string`?t:Ke(t))}function r(e,t){He(e.pathname.charAt(0)===`/`,`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}return Je(t,n,r,e)}function B(e,t){if(e===!1||e==null)throw Error(t)}function He(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Ue(){return Math.random().toString(36).substring(2,10)}function We(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Ge(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?qe(t):t,state:n,key:t&&t.key||r||Ue(),mask:i}}function Ke({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function qe(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Je(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=Be(e)?e:Ge(h.location,e,t);n&&n(r,e),l=u()+1;let d=We(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=Be(e)?e:Ge(h.location,e,t);n&&n(r,e),l=u();let i=We(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return Ye(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(ze,d),c=e,()=>{i.removeEventListener(ze,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function Ye(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),B(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:Ke(t);return i=i.replace(/ $/,`%20`),!n&&Le.test(i)&&(i=r+i),new URL(i,r)}var Xe=class{#e=new Map;constructor(e){if(e)for(let[t,n]of e)this.set(t,n)}get(e){if(this.#e.has(e))return this.#e.get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){this.#e.set(e,t)}},Ze=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function Qe(e){return Ze.has(e)}var $e=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function et(e){return $e.has(e)}function tt(e){return e.index===!0}function nt(e){let t={};return e.Component&&Object.assign(t,{element:_.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:_.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:_.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function rt(e,t=nt,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(B(e.index!==!0||!e.children,`Cannot specify children on an index route`),B(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),tt(e)){let n={...e,id:s};return r[s]=it(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=it(n,t(n)),e.children&&(n.children=rt(e.children,t,o,r,i)),n}})}function it(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function at(e,t,n=`/`){return ot(e,t,n,!1)}function ot(e,t,n,r,i){let a=Ot((typeof t==`string`?qe(t):t).pathname||`/`,n);if(a==null)return null;let o=i??ct(e),s=null,c=Dt(a);for(let e=0;s==null&&e{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;B(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Rt([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(B(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),lt(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:xt(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Et(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ut(e.path))a(e,t,!0,n)}),t}function ut(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ut(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function dt(e){e.sort((e,t)=>e.score===t.score?St(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ft=/^:[\w-]+$/,pt=/^:[\w-]+/,mt=3.5,ht=3,gt=2,_t=1,vt=10,yt=-2,bt=e=>e===`*`;function xt(e,t){let n=e.split(`/`),r=n.length;return n.some(bt)&&(r+=yt),t&&(r+=gt),n.filter(e=>!bt(e)).reduce((e,t)=>e+(ft.test(t)?ht:pt.test(t)?mt:t===``?_t:vt),r)}function St(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Ct(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e{if(t===`*`){let e=s[r]||``;o=zt(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Et(e,t=!1,n=!0){He(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 r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Dt(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return He(!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 Ot(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function kt({basename:e,pathname:t}){return t===`/`?e:Rt([e,t])}var At=e=>Ie.test(e);function jt(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?qe(e):e,a;return n?(n=Lt(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?Mt(n.substring(1),`/`):Mt(n,t)):a=t,{pathname:a,search:Vt(r),hash:Ht(i)}}function Mt(e,t){let n=zt(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Nt(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function Pt(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ft(e){let t=Pt(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function It(e,t,n,r=!1){let i;typeof e==`string`?i=qe(e):(i={...e},B(!i.pathname||!i.pathname.includes(`?`),Nt(`?`,`pathname`,`search`,i)),B(!i.pathname||!i.pathname.includes(`#`),Nt(`#`,`pathname`,`hash`,i)),B(!i.search||!i.search.includes(`#`),Nt(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=jt(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Lt=e=>e.replace(/[\\/]{2,}/g,`/`),Rt=e=>Lt(e.join(`/`));function zt(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var Bt=e=>zt(e).replace(/^\/*/,`/`),Vt=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ht=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Ut=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],V=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Wt(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Gt(e){return Rt(e.map(e=>e.route.path).filter(Boolean))||`/`}function Kt(e,t){let n=new URL(typeof e==`string`||e instanceof URL?e:e.url),r=typeof t==`string`?qe(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);let i=e.toString();n.search=i?`?${i}`:``}else n.search=``;return n.hash=r.hash||``,n}var qt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Jt(e,t){let n=e;if(typeof n!=`string`||!Ie.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(qt)try{let e=new URL(window.location.href),r=Le.test(n)?new URL(Re(n,e.protocol)):new URL(n),a=Ot(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{He(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var Yt=Symbol(`Uninstrumented`),Xt=new WeakMap;function Zt(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){e.lazy!=null&&n.lazy.push(e.lazy),e[`lazy.loader`]!=null&&n[`lazy.loader`].push(e[`lazy.loader`]),e[`lazy.action`]!=null&&n[`lazy.action`].push(e[`lazy.action`]),e[`lazy.middleware`]!=null&&n[`lazy.middleware`].push(e[`lazy.middleware`]),e.middleware!=null&&n.middleware.push(e.middleware),e.loader!=null&&n.loader.push(e.loader),e.action!=null&&n.action.push(e.action)}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=t.lazy;r.lazy=async(...t)=>rn(await an(n.lazy,void 0,()=>e(...t),on))}if(typeof t.lazy==`object`){let e=t.lazy;if(typeof e.middleware==`function`&&n[`lazy.middleware`].length>0){let t=e.middleware;r.lazy=Object.assign(r.lazy||{},{middleware:async(...e)=>rn(await an(n[`lazy.middleware`],void 0,()=>t(...e),on))})}if(typeof e.loader==`function`&&n[`lazy.loader`].length>0){let t=e.loader;r.lazy=Object.assign(r.lazy||{},{loader:async(...e)=>rn(await an(n[`lazy.loader`],void 0,()=>t(...e),on))})}if(typeof e.action==`function`&&n[`lazy.action`].length>0){let t=e.action;r.lazy=Object.assign(r.lazy||{},{action:async(...e)=>rn(await an(n[`lazy.action`],void 0,()=>t(...e),on))})}}if(typeof t.loader==`function`&&n.loader.length>0){let e=$t(t.loader),i=async(...t)=>rn(await an(n.loader,sn(t[0]),()=>e(...t),on));e.hydrate===!0&&(i.hydrate=!0),en(i,e),r.loader=i}if(typeof t.action==`function`&&n.action.length>0){let e=$t(t.action),i=async(...t)=>rn(await an(n.action,sn(t[0]),()=>e(...t),on));en(i,e),r.action=i}return t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=$t(e),r=async(...e)=>rn(await an(n.middleware,sn(e[0]),()=>t(...e),on));return en(r,t),r})),r}function Qt(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){e.navigate!=null&&n.navigate.push(e.navigate),e.fetch!=null&&n.fetch.push(e.fetch)}})),n.navigate.length>0){let t=$t(e.navigate),r=async(...r)=>{let[i,a]=r,o,s={to:typeof i==`number`||typeof i==`string`?i:i?Ke(i):`.`,...cn(e,a??{})};return rn(await an(n.navigate,s,async()=>{if(typeof i==`number`)return await t(...r);let n=tn(e,e=>{o=e});try{return await t(...r)}finally{n()}},e=>({...on(e),meta:o})))};en(r,t),e.navigate=r}if(n.fetch.length>0){let t=$t(e.fetch),r=async(...r)=>{let[i,a,o,s]=r,c;return rn(await an(n.fetch,{href:o??`.`,fetcherKey:i,...cn(e,s??{})},async()=>{let n=tn(e,e=>{c=e});try{return await t(...r)}finally{n()}},e=>({...on(e),meta:c})))};en(r,t),e.fetch=r}return e}function $t(e){return e[Yt]??e}function en(e,t){e[Yt]=t}function tn(e,t){return Xt.set(e,t),()=>{Xt.get(e)===t&&Xt.delete(e)}}function nn(e){let t=Xt.get(e);return Xt.delete(e),t}function rn(e){if(e.type===`error`)throw e.value;return e.value}async function an(e,t,n,r,i={result:null,innerResult:null},a=e.length-1){let o=e[a];if(o){let s,c=async()=>(s?console.error(`You cannot call instrumented handlers more than once`):s=an(e,t,n,r,i,a-1),await s,B(i.innerResult,`Expected an inner result`),i.innerResult);try{await o(c,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}s||await c(),await s}else{try{i.result={type:`success`,value:await n()}}catch(e){i.result={type:`error`,value:e}}i.innerResult=r(i.result,t)}return i.result||(i.result={type:`error`,value:Error(`No result assigned in instrumentation chain.`)},i.innerResult=r(i.result,t)),i.result}function on(e){return e.type===`error`&&e.value instanceof Error?{status:`error`,error:e.value}:{status:`success`,error:void 0}}function sn(e){let{request:t,context:n,params:r}=e;return{...e,request:ln(t),params:{...r},context:un(n)}}function cn(e,t){return{currentUrl:Ke(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 ln(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function un(e){return{get:t=>e.get(t)}}var dn=new URL(`http://localhost`);function fn(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),dn)}catch{return dn}}function pn(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function mn(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function hn(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!pn(i,n),s=!pn(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!mn(e,i)||!pn(i,a)))throw Error(`External navigation is not allowed`)}var gn=[`POST`,`PUT`,`PATCH`,`DELETE`],_n=new Set(gn),vn=[`GET`,...gn],yn=new Set(vn),bn=new Set([301,302,303,307,308]),xn=new Set([307,308]),Sn={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Cn={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},wn={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},Tn=`remix-router-transitions`,En=Symbol(`ResetLoaderData`),Dn=class{#e;#t;#n;#r;constructor(e){this.#e=e,this.#t=ct(e)}get stableRoutes(){return this.#e}get activeRoutes(){return this.#n??this.#e}get branches(){return this.#r??this.#t}get hasHMRRoutes(){return this.#n!=null}setRoutes(e){this.#e=e,this.#t=ct(e)}setHmrRoutes(e){this.#n=e,this.#r=ct(e)}commitHmrRoutes(){this.#n&&(this.#e=this.#n,this.#t=this.#r,this.#n=void 0,this.#r=void 0)}};function On(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;B(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties,a=i||(()=>({}));if(e.instrumentations){let t=e.instrumentations;a=e=>({...i?.(e),...Zt(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new Dn(rt(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||Gn,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,v=ot(s.activeRoutes,e.history.location,c,!1,s.branches),y=!1,b=null,x,S;if(v==null&&!e.patchRoutesOnNavigation){let t=hr(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=mr(s.activeRoutes);x=!0,S=!x,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&&Ze(v,s.activeRoutes,e.history.location.pathname).active&&(v=null),!v){x=!1,S=!x,v=[];let t=Ze(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}else if(v.some(e=>e.route.lazy))x=!1,S=!x;else if(!v.some(e=>Nn(e.route)))x=!0,S=!x;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=v;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}S=!1,x=!0,r.forEach(e=>{let r=Pn(e.route,t,n);S||=r.renderFallback,x&&=!r.shouldLoad})}let C,w={historyAction:e.history.action,location:e.history.location,matches:v,initialized:x,renderFallback:S,navigation:Sn,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},T=`POP`,E=null,D=!1,O,k=!1,A=new Map,j=null,M=!1,ee=!1,N=new Set,P=new Map,te=0,ne=-1,F=new Map,re=new Set,ie=new Map,ae=new Map,oe=new Set,se=new Map,ce,le=null;function ue(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(ce){ce(),ce=void 0;return}He(se.size===0||r!=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 i=ze({currentLocation:w.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{ce=e});e.history.go(r*-1),Re(i,{state:`blocked`,location:n,proceed(){Re(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(w.blockers);e.set(i,wn),pe({blockers:e})}}),E?.resolve(),E=null}else return he(t,n)}),n){Br(t,A);let e=()=>Vr(t,A);t.addEventListener(`pagehide`,e),j=()=>t.removeEventListener(`pagehide`,e)}return w.initialized||he(`POP`,w.location,{initialHydration:!0}),C}function de(){d&&d(),j&&j(),f.clear(),O&&O.abort(),w.fetchers.forEach((e,t)=>Ae(w.fetchers,t)),w.blockers.forEach((e,t)=>Ie(t))}function fe(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(w,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function pe(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),w={...w,...e};let n=[],r=[];w.fetchers.forEach((e,t)=>{e.state===`idle`&&(oe.has(t)?n.push(t):r.push(t))}),oe.forEach(e=>{!w.fetchers.has(e)&&!P.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(w,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Ae(w.fetchers,e)),r.forEach(e=>w.fetchers.delete(e))}function me(t,n,{flushSync:r}={}){let i=w.actionData!=null&&w.navigation.formMethod!=null&&Ar(w.navigation.formMethod)&&w.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?w.actionData:null;let o=n.loaderData?dr(w.loaderData,n.loaderData,n.matches||[],n.errors):w.loaderData,c=w.blockers;c.size>0&&!M&&(c=new Map(c),c.forEach((e,t)=>c.set(t,wn)));let l=!M&&Je(t,n.matches||w.matches),u=D===!0||w.navigation.formMethod!=null&&Ar(w.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),M||T===`POP`||(T===`PUSH`?e.history.push(t,t.state):T===`REPLACE`&&e.history.replace(t,t.state));let d;if(T===`POP`){let e=A.get(w.location.pathname);e&&e.has(t.pathname)?d={currentLocation:w.location,nextLocation:t}:A.has(t.pathname)&&(d={currentLocation:t,nextLocation:w.location})}else if(k){let e=A.get(w.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),A.set(w.location.pathname,e)),d={currentLocation:w.location,nextLocation:t}}pe({...n,actionData:a,loaderData:o,historyAction:T,location:t,initialized:!0,renderFallback:!1,navigation:Sn,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),T=`POP`,D=!1,k=!1,M=!1,ee=!1,E?.resolve(),E=null,le?.resolve(),le=null}async function I(t,n){if(E?.resolve(),E=null,typeof t==`number`){E||=Hr();let n=E.promise;return e.history.go(t),n}let r=nn(C),{path:i,submission:a,error:o}=jn(!1,An(w.location,w.matches,c,t,n?.fromRouteId,n?.relative),n),s;if(n?.mask){let t=typeof n.mask==`string`?qe(n.mask):{...w.location.mask,...n.mask};if(s={pathname:t.pathname??``,search:t.search??``,hash:t.hash??``},Le.test(s.pathname))throw Error(`External navigation is not allowed`);s.pathname.startsWith(`\\`)&&(s.pathname=s.pathname.replace(/^\\+/,`/`)),hn(typeof n.mask==`string`?n.mask:Ke(n.mask),Ke(s),e.history.createURL(`/`),`reject`)}let l=w.location,u=Ge(l,i,n&&n.state,void 0,s);u={...u,...e.history.encodeLocation(u)},hn(t==null?e.history.createHref(w.location):typeof t==`string`?t:Ke(t),e.history.createHref(u.mask||u),e.history.createURL(`/`),`reject`);let d=n&&n.replace!=null?n.replace:void 0,f=`PUSH`;d===!0?f=`REPLACE`:d===!1||a!=null&&Ar(a.formMethod)&&a.formAction===w.location.pathname+w.location.search&&(f=`REPLACE`);let p=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,m=(n&&n.flushSync)===!0,h=ze({currentLocation:l,nextLocation:u,historyAction:f});h?Re(h,{state:`blocked`,location:u,proceed(){Re(h,{state:`proceeding`,proceed:void 0,reset:void 0,location:u}),I(t,n)},reset(){let e=new Map(w.blockers);e.set(h,wn),pe({blockers:e})}}):await he(f,u,{submission:a,pendingError:o,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:m,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate,instrumentationNavigateMetaReceiver:r})}function L(){le||=Hr(),Te(),pe({revalidation:`loading`});let e=le.promise;return w.navigation.state===`submitting`?e:w.navigation.state===`idle`?(he(w.historyAction,w.location,{startUninterruptedRevalidation:!0}),e):(he(T||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:k===!0}),e)}async function he(t,n,r){O&&O.abort(),O=null,T=t,M=(r&&r.startUninterruptedRevalidation)===!0,We(w.location,w.matches),D=(r&&r.preventScrollReset)===!0,k=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&w.matches&&w.matches.length>0&&!y?w.matches:ot(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&w.initialized&&!ee&&vr(w.location,n)&&!(r&&r.submission&&Ar(r.submission.formMethod))){me(n,{matches:a},{flushSync:o});return}let l=Ze(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),r?.instrumentationNavigateMetaReceiver){let t=Nr(e.history,n,a);r.instrumentationNavigateMetaReceiver(t)}if(!a){let{error:e,notFoundMatches:t,route:r}=Be(n.pathname);me(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;O=new AbortController;let d=or(e.history,n,O.signal,r&&r.submission),f=e.getContext?await e.getContext():new Xe,p;if(r&&r.pendingError)p=[pr(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Ar(r.submission.formMethod)){let i=await ge(d,n,r.submission,a,t,f,l.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:o});if(i.shortCircuited)return;if(i.pendingActionResult){let[e,t]=i.pendingActionResult;if(Cr(t)&&Wt(t.error)&&t.error.status===404){O=null,me(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=Fr(n,a,t,r.submission),o=!1,l.active=!1,d=or(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await _e(d,n,a,t,f,l.active,u,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,p,r&&r.callSiteDefaultShouldRevalidate);m||(O=null,me(n,{matches:h||a,...fr(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function ge(t,n,i,l,u,d,f,p,m={}){if(Te(),pe({navigation:Ir(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await Qe(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=mr(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=pr(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=Be(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=Mr(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:hr(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await Ce(t,n,Zn(a,o,t,n,l,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of l)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(wr(h)){let n;return n=m&&m.replace!=null?m.replace:ar(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===w.location.pathname+w.location.search,await Se(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(Cr(h)){let e=pr(l,g.route.id);return(m&&m.replace)!==!0&&(T=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function _e(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||Fr(n,i,l,p),x=p||m||Pr(b),S=!M&&!g;if(d){if(S){let e=ve(v);pe({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await Qe(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=mr(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=pr(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=Be(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:T,revalidatingFetchers:E}=Mn(t,u,a,o,e.history,w,i,x,n,g?[]:r,g===!0,ee,N,oe,ie,re,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(ne=++te,!e.dataStrategy&&!T.some(e=>e.shouldLoad)&&!T.some(e=>e.route.middleware&&e.route.middleware.length>0)&&E.length===0){let e=new Map(w.fetchers),t=Ne(e);return me(n,{matches:i,loaderData:{},errors:v&&Cr(v[1])?{[v[0]]:v[1].error}:null,...fr(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=ve(v);t!==void 0&&(e.actionData=t)}E.length>0&&(e.fetchers=ye(E)),pe(e,{flushSync:_})}E.forEach(e=>{Me(e.key),e.controller&&P.set(e.key,e.controller)});let D=()=>E.forEach(e=>Me(e.key));O&&O.signal.addEventListener(`abort`,D);let{loaderResults:k,fetcherResults:A}=await we(T,E,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener(`abort`,D),E.forEach(e=>P.delete(e.key));let j=gr(k);if(j)return await Se(t,j.result,!0,{replace:h}),{shortCircuited:!0};if(j=gr(A),j)return re.add(j.key),await Se(t,j.result,!0,{replace:h}),{shortCircuited:!0};let F=new Map(w.fetchers),{loaderData:ae,errors:se}=ur(w,i,k,v,E,A,F);g&&w.errors&&(se={...w.errors,...se});let ce=Ne(F),le=Pe(ne,F),ue=ce||le||E.length>0;return{matches:i,loaderData:ae,errors:se,...ue?{workingFetchers:F}:{}}}function ve(e){if(e&&!Cr(e[1]))return{[e[0]]:e[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function ye(e){let t=new Map(w.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=Lr(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function R(t,n,r,i){Me(t);let a=(i&&i.flushSync)===!0,o=nn(C),l=s.activeRoutes,u=An(w.location,w.matches,c,r,n,i?.relative),d=ot(l,u,c,!1,s.branches),f=Ze(d,l,u);if(f.active&&f.matches&&(d=f.matches),o&&o(Nr(e.history,u,d)),!d){De(t,n,hr(404,{pathname:u}),{flushSync:a});return}let{path:p,submission:m,error:h}=jn(!0,u,i);if(h){De(t,n,h,{flushSync:a});return}let g=e.getContext?await e.getContext():new Xe,_=(i&&i.preventScrollReset)===!0;m&&Ar(m.formMethod)?await be(t,n,p,d,g,f.active,a,_,m,i&&i.defaultShouldRevalidate):(ie.set(t,{routeId:n,path:p}),await xe(t,n,p,d,g,f.active,a,_,m))}async function be(t,n,i,l,u,d,f,p,m,h){Te(),ie.delete(t),Ee(t,Rr(m,w.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=or(e.history,i,g.signal,m);if(d){let e=await Qe(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){De(t,n,e.error,{flushSync:f});return}if(e.matches)l=e.matches;else{De(t,n,hr(404,{pathname:i}),{flushSync:f});return}}let v=Mr(l,i);if(!v.route.action&&!v.route.lazy){De(t,n,hr(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}P.set(t,g);let y=te,b=Zn(a,o,_,i,l,v,r,u),x=await Ce(_,i,b,u,t),S=x[v.route.id];if(!S){for(let e of b)if(x[e.route.id]){S=x[e.route.id];break}}if(_.signal.aborted){P.get(t)===g&&P.delete(t);return}if(oe.has(t)){if(wr(S)||Cr(S)){Ee(t,zr(void 0));return}}else{if(wr(S)){if(P.delete(t),ne>y){Ee(t,zr(void 0));return}return re.add(t),Ee(t,Lr(m)),Se(_,S,!1,{fetcherSubmission:m,preventScrollReset:p})}if(Cr(S)){De(t,n,S.error);return}}let C=w.navigation.location||w.location,E=or(e.history,C,g.signal),D=s.activeRoutes,k=w.navigation.state===`idle`?w.matches:ot(D,w.navigation.location,c,!1,s.branches);B(k,`Didn't find any matches after fetcher action`);let A=++te;F.set(t,A);let{dsMatches:j,revalidatingFetchers:M}=Mn(E,u,a,o,e.history,w,k,m,C,r,!1,ee,N,oe,ie,re,D,c,e.patchRoutesOnNavigation!=null,s.branches,[v.route.id,S],h),ae=Lr(m,S.data),se=new Map(w.fetchers);se.set(t,ae),M.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=se.get(t),r=Lr(void 0,n?n.data:void 0);se.set(t,r),Me(t),e.controller&&P.set(t,e.controller)}),pe({fetchers:se});let ce=()=>M.forEach(e=>Me(e.key));g.signal.addEventListener(`abort`,ce);let{loaderResults:le,fetcherResults:ue}=await we(j,M,E,C,u);if(g.signal.aborted){F.get(t)===A&&F.delete(t);return}g.signal.removeEventListener(`abort`,ce),F.delete(t),P.delete(t),M.forEach(e=>P.delete(e.key));let de=w.fetchers.has(t),fe=e=>{if(!de)return e;let n=new Map(e.fetchers);return n.set(t,zr(S.data)),{...e,fetchers:n}},I=gr(le);if(I)return w=fe(w),Se(E,I.result,!1,{preventScrollReset:p});if(I=gr(ue),I)return re.add(I.key),w=fe(w),Se(E,I.result,!1,{preventScrollReset:p});let L=new Map(w.fetchers);de&&L.set(t,zr(S.data));let{loaderData:he,errors:ge}=ur(w,k,le,void 0,M,ue,L);Pe(A,L),w.navigation.state===`loading`&&A>ne?(B(T,`Expected pending action`),O&&O.abort(),me(w.navigation.location,{matches:k,loaderData:he,errors:ge,fetchers:L})):(pe({errors:ge,loaderData:dr(w.loaderData,he,k,ge),fetchers:L}),ee=!1)}async function xe(t,n,i,s,c,l,u,d,f){let p=w.fetchers.get(t);Ee(t,Lr(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=or(e.history,i,m.signal);if(l){let e=await Qe(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){De(t,n,e.error,{flushSync:u});return}if(e.matches)s=e.matches;else{De(t,n,hr(404,{pathname:i}),{flushSync:u});return}}let g=Mr(s,i);P.set(t,m);let _=te,v=await Ce(h,i,Zn(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(P.get(t)===m&&P.delete(t),!h.signal.aborted){if(oe.has(t))Ee(t,zr(void 0));else{if(wr(y)){if(ne>_){Ee(t,zr(void 0));return}re.add(t),await Se(h,y,!1,{preventScrollReset:d});return}Cr(y)?De(t,n,y.error):Ee(t,zr(y.data))}}}async function Se(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(E?.resolve(),E=null),i.response.headers.has(`X-Remix-Revalidate`)&&(ee=!0);let d=i.response.headers.get(`Location`);B(d,`Expected a Location header on the redirect Response`);let f=d,p=new URL(r.url);d=ar(d,p,c,e.history),hn(f,d,p,`allow-explicit`);let m=Ge(w.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(At(d)){let n=Ye(t,d,!0);e=n.origin!==t.location.origin||Ot(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}O=null;let h=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:g,formAction:_,formEncType:v}=w.navigation;!o&&!s&&g&&_&&v&&(o=Pr(w.navigation));let y=o||s;xn.has(i.response.status)&&y&&Ar(y.formMethod)?await he(h,m,{submission:{...y,formAction:d},preventScrollReset:l||D,enableViewTransition:a?k:void 0}):await he(h,m,{overrideNavigation:Fr(m,[],h,o),fetcherSubmission:s,preventScrollReset:l||D,enableViewTransition:a?k:void 0})}async function Ce(e,t,n,r,i){let a,o={};try{a=await Qn(l,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!Ar(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;a.hasOwnProperty(e.route.id)||w.loaderData.hasOwnProperty(e.route.id)||w.errors&&w.errors.hasOwnProperty(e.route.id)||!e.shouldCallHandler()||(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(Sr(r)){let i=r.result;o[t]={type:`redirect`,response:nr(i,e,t,n,c)}}else o[t]=await tr(r);return o}async function we(e,t,n,r,i){let a=Ce(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Ce(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:`error`,error:hr(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Te(){ee=!0,ie.forEach((e,t)=>{P.has(t)&&N.add(t),Me(t)})}function Ee(e,t,n={}){let r=new Map(w.fetchers);r.set(e,t),pe({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function De(e,t,n,r={}){let i=pr(w.matches,t),a=new Map(w.fetchers);Ae(a,e),pe({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Oe(e){return ae.set(e,(ae.get(e)||0)+1),oe.has(e)&&oe.delete(e),w.fetchers.get(e)||Cn}function ke(e,t){Me(e,t?.reason),Ee(e,zr(null))}function Ae(e,t){let n=w.fetchers.get(t);P.has(t)&&!(n&&n.state===`loading`&&F.has(t))&&Me(t),ie.delete(t),F.delete(t),re.delete(t),oe.delete(t),N.delete(t),e.delete(t)}function je(e){let t=(ae.get(e)||0)-1;t<=0?(ae.delete(e),oe.add(e)):ae.set(e,t),pe({fetchers:new Map(w.fetchers)})}function Me(e,t){let n=P.get(e);n&&(n.abort(t),P.delete(e))}function z(e,t){for(let n of e){let e=t.get(n);B(e,`Expected fetcher: ${n}`);let r=zr(e.data);t.set(n,r)}}function Ne(e){let t=[],n=!1;for(let r of re){let i=e.get(r);B(i,`Expected fetcher: ${r}`),i.state===`loading`&&(re.delete(r),t.push(r),n=!0)}return z(t,e),n}function Pe(e,t){let n=[];for(let[r,i]of F)if(i0}function Fe(e,t){let n=w.blockers.get(e)||wn;return se.get(e)!==t&&se.set(e,t),n}function Ie(e){w.blockers.delete(e),se.delete(e)}function Re(e,t){let n=w.blockers.get(e)||wn;B(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(w.blockers);r.set(e,t),pe({blockers:r})}function ze({currentLocation:e,nextLocation:t,historyAction:n}){if(se.size===0)return;se.size>1&&He(!1,`A router only supports one blocker at a time`);let r=Array.from(se.entries()),[i,a]=r[r.length-1],o=w.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function Be(e){let t=hr(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=mr(n);return{notFoundMatches:r,route:i,error:t}}function Ve(e,t,n){if(m=e,g=t,h=n||null,!_&&w.navigation===Sn){_=!0;let e=Je(w.location,w.matches);e!=null&&pe({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function Ue(e,t){return h&&h(e,t.map(e=>st(e,w.loaderData)))||e.key}function We(e,t){if(m&&g){let n=Ue(e,t);m[n]=g()}}function Je(e,t){if(m){let n=Ue(e,t),r=m[n];if(typeof r==`number`)return r}return null}function Ze(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:ot(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:ot(n,r,c,!0,e)}}return{active:!1,matches:null}}async function Qe(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||Rn(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=ot(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=ot(s.activeRoutes,n,c,!0,u),!(f&&l.lengthe.route.id===t[n].route.id)}function et(e){o={},s.setHmrRoutes(rt(e,a,void 0,o))}function tt(e,t,n=!1){Rn(e,t,s,o,a,n),s.hasHMRRoutes||pe({})}return C={get basename(){return c},get future(){return u},get state(){return w},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:ue,subscribe:fe,enableScrollRestoration:Ve,navigate:I,fetch:R,revalidate:L,createHref:t=>e.history.createHref(t),createURL:t=>e.history.createURL(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Oe,resetFetcher:ke,deleteFetcher:je,dispose:de,getBlocker:Fe,deleteBlocker:Ie,patchRoutes:tt,_internalFetchControllers:P,_internalSetRoutes:et,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){pe(e)}},e.instrumentations&&(C=Qt(C,e.instrumentations.map(e=>e.router).filter(Boolean))),C}function kn(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function An(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=It(r||`.`,Ft(o),Ot(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=jr(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=kt({basename:n,pathname:c.pathname})),Ke(c)}function jn(e,t,n){if(!n||!kn(n))return{path:t};if(n.formMethod&&!kr(n.formMethod))return{path:t,error:hr(405,{method:n.formMethod})};let r=()=>({path:t,error:hr(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=_r(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Ar(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}\n`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if(n.formEncType===`application/json`){if(!Ar(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}B(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=sr(n.formData),s=n.formData;else if(n.body instanceof FormData)o=sr(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=cr(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=cr(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(Ar(c.formMethod))return{path:t,submission:c};let l=qe(t);return e&&l.search&&jr(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:Ke(l),submission:c}}function Mn(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?Cr(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&Cr(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let E=b?b[1].statusCode:void 0,D=E&&E>=400,O={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},k=Gt(o),A=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!Nn(s))f=!1;else if(u){let{shouldLoad:e}=Pn(s,a.loaderData,a.errors);f=e}else Fn(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return Xn(n,r,e,c,k,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:D?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?In(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p};return Xn(n,r,e,c,k,i,l,t,Ln(i,m),m,x)}),j=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,b=ot(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;j.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=Mr(b,e.path),C=new AbortController,w=or(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=Zn(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=Zn(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!D&&d;let a={...O,defaultShouldRevalidate:i};Ln(S,a)&&(T=Zn(n,r,w,e.path,b,S,l,t,a))}T&&j.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:A,revalidatingFetchers:j}}function Nn(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Pn(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Nn(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function Fn(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function In(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Ln(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Rn(e,t,n,r,i,a){let o;if(e){let t=r[e];B(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>zn(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=rt(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;et.children?.some(t=>zn(e,t)))??!1}var Bn=new WeakMap,Vn=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(B(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=Bn.get(i);o||(o={},Bn.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=Qe(e),n=i[e]!==void 0;if(t)He(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)He(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},Hn=new WeakMap;function Un(e,t,n,r,i){let a=n[e.id];if(B(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=Hn.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{B(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=et(e),o=a[e]!==void 0;i?He(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?He(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return Hn.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=Vn({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function Wn(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function Gn(e){return e.matches.some(e=>e.route.middleware)?Kn(e,()=>Wn(e)):Wn(e)}function Kn(e,t){return qn(e,t,e=>{if(Or(e))throw e;return e},br,n);async function n(t,n,r){if(r)return Object.assign(r.value,{[n]:{type:`error`,result:t}});{let{matches:r}=e,i=Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0)),a=r[i].route.id;for(let e of r.slice(0,i+1))try{await e._lazyPromises?.route}catch{a=e.route.id;break}return{[pr(r,a).route.id]:{type:`error`,result:t}}}}}async function qn(e,t,n,r,i){let{matches:a,...o}=e;return await Jn(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function Jn(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await Jn(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function Yn(e,t,n,r,i){let a=Vn({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=Un(r.route,Ar(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Xn(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=Yn(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?Ln(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?Ln(a,{...l,defaultShouldRevalidate:e}):Ln(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!Ar(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(Ar(n.method)||!p)?$n({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function Zn(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?Xn(e,t,n,r,Gt(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Yn(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function Qn(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:Kt(t,n),pattern:Gt(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return Kn(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function $n({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=Ar(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:Kt(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a){if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw hr(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}}else if(t)c=await f(t);else{let t=new URL(e.url);throw hr(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function er(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 tr(e){let{result:t,type:n}=e;if(Er(t)){let e;try{e=await er(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new V(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?Tr(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:yr(t),statusCode:Wt(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Wt(t)?t.status:void 0}:Tr(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 nr(e,t,n,r,i){let a=e.headers.get(`Location`);if(B(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!At(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=An(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var rr=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function ir(e){try{return rr.includes(new URL(e).protocol)}catch{return!1}}function ar(e,t,n,r){if(At(e)){let r=e,i=Le.test(r)?new URL(Re(r,t.protocol)):new URL(r);if(ir(i.toString()))throw Error(`Invalid redirect location`);let a=Ot(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Lt(i.pathname)+i.search+i.hash}try{if(ir(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function or(e,t,n,r){let i=e.createURL(_r(t)).toString(),a={signal:n};if(r&&Ar(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):a.body=t===`text/plain`?r.text:t===`application/x-www-form-urlencoded`&&r.formData?sr(r.formData):r.formData}return new Request(i,a)}function sr(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function cr(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function lr(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&Cr(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(B(!wr(f),`Cannot handle redirect results in processLoaderData`),Cr(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=pr(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=En),c||(c=!0,s=Wt(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function ur(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=lr(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(B(s,`Did not find corresponding fetcher result`),Cr(s)){let t=pr(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(wr(s))B(!1,`Unhandled fetcher revalidation redirect`);else{let e=zr(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function dr(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==En).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function fr(e){return e?Cr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function pr(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.ErrorBoundary!=null||e.route.errorElement!=null)||e[0]}function mr(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function hr(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new V(e||500,o,Error(s),!0)}function gr(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(wr(r))return{key:n,result:r}}}function _r(e){return Ke({...typeof e==`string`?qe(e):e,hash:``})}function vr(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function yr(e){return new V(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function br(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&xr(t))}function xr(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function Sr(e){return Er(e.result)&&bn.has(e.result.status)}function Cr(e){return e.type===`error`}function wr(e){return(e&&e.type)===`redirect`}function Tr(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function Er(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function Dr(e){return bn.has(e)}function Or(e){return Er(e)&&Dr(e.status)&&e.headers.has(`Location`)}function kr(e){return yn.has(e.toUpperCase())}function Ar(e){return _n.has(e.toUpperCase())}function jr(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function Mr(e,t){let n=typeof t==`string`?qe(t).search:t.search;if(e[e.length-1].route.index&&jr(n||``))return e[e.length-1];let r=Pt(e);return r[r.length-1]}function Nr(e,t,n){return{url:Kt(e.createURL(t),t),pattern:n?Gt(n):``,params:n?.[0]?.params?{...n[0].params}:{}}}function Pr(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(t&&n&&r){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function Fr(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Ir(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function Lr(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 Rr(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 zr(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 Br(e,t){try{let n=e.sessionStorage.getItem(Tn);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function Vr(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Tn,JSON.stringify(n))}catch(e){He(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function Hr(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var Ur=_.createContext(null);Ur.displayName=`DataRouter`;var Wr=_.createContext(null);Wr.displayName=`DataRouterState`;var Gr=_.createContext(!1);function Kr(){return _.useContext(Gr)}var qr=_.createContext({isTransitioning:!1});qr.displayName=`ViewTransition`;var Jr=_.createContext(new Map);Jr.displayName=`Fetchers`;var Yr=_.createContext(null);Yr.displayName=`Await`;var Xr=_.createContext(null);Xr.displayName=`Navigation`;var Zr=_.createContext(null);Zr.displayName=`Location`;var Qr=_.createContext({outlet:null,matches:[],isDataRoute:!1});Qr.displayName=`Route`;var $r=_.createContext(null);$r.displayName=`RouteError`;var ei=`REACT_ROUTER_ERROR`,ti=`REDIRECT`,ni=`ROUTE_ERROR_RESPONSE`;function ri(e){if(e.startsWith(`${ei}:${ti}:{`))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 ii(e){if(e.startsWith(`${ei}:${ni}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new V(t.status,t.statusText,t.data)}catch{}}function ai(e,{relative:t}={}){B(oi(),`useHref() may be used only in the context of a component.`);let{basename:n,navigator:r}=_.useContext(Xr),{hash:i,pathname:a,search:o}=pi(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Rt([n,a])),r.createHref({pathname:s,search:o,hash:i})}function oi(){return _.useContext(Zr)!=null}function si(){return B(oi(),`useLocation() may be used only in the context of a component.`),_.useContext(Zr).location}var ci=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function li(){let{isDataRoute:e}=_.useContext(Qr);return e?ki():ui()}function ui(){B(oi(),`useNavigate() may be used only in the context of a component.`);let e=_.useContext(Ur),{basename:t,navigator:n}=_.useContext(Xr),{matches:r}=_.useContext(Qr),{pathname:i}=si(),a=JSON.stringify(Ft(r)),o=_.useRef(!1);return _.useLayoutEffect(()=>{o.current=!0}),_.useCallback((r,s={})=>{if(He(o.current,ci),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=It(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Rt([t,c.pathname])),hn(typeof r==`string`?r:Ke(r),n.createHref(c),fn(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var di=_.createContext(null);function fi(e){let t=_.useContext(Qr).outlet;return _.useMemo(()=>t&&_.createElement(di.Provider,{value:e},t),[t,e])}function pi(e,{relative:t}={}){let{matches:n}=_.useContext(Qr),{pathname:r}=si(),i=JSON.stringify(Ft(n));return _.useMemo(()=>It(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function mi(e,t,n){B(oi(),`useRoutes() may be used only in the context of a component.`);let{navigator:r}=_.useContext(Xr),{matches:i}=_.useContext(Qr),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=si(),l;if(t){let e=typeof t==`string`?qe(t):t;B(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):at(e,{pathname:d}),p=xi(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Rt([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:Rt([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?_.createElement(Zr.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function hi(){let e=Oi(),t=Wt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return _.createElement(_.Fragment,null,_.createElement(`h2`,null,`Unexpected Application Error!`),_.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?_.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var gi=_.createElement(hi,null),_i=class extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=Gr;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?t.error:e.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`){let t=ii(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:_.createElement(Qr.Provider,{value:this.props.routeContext},_.createElement($r.Provider,{value:e,children:this.props.component}));return this.context?_.createElement(yi,{error:e},t):t}},vi=new WeakMap;function yi({children:e,error:t}){let{basename:n,navigator:r}=_.useContext(Xr);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=ri(t.digest);if(e){let i=vi.get(t);if(i)throw i;let a=Jt(e.location,n),o=a.absoluteURL||a.to;if(hn(e.location,o,fn(r),`allow-explicit`),ir(o))throw Error(`Invalid redirect location`);if(qt&&!vi.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw vi.set(t,n),n}}return _.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function bi({routeContext:e,match:t,children:n}){let r=_.useContext(Ur);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),_.createElement(Qr.Provider,{value:e},n)}function xi(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);B(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Gt(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||gi,o&&(s<0&&c===0?(ji(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?_.createElement(n.route.Component,null):n.route.element?n.route.element:e,_.createElement(bi,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?_.createElement(_i,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function Si(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ci(e){let t=_.useContext(Ur);return B(t,Si(e)),t}function wi(e){let t=_.useContext(Wr);return B(t,Si(e)),t}function Ti(e){let t=_.useContext(Qr);return B(t,Si(e)),t}function Ei(e){let t=Ti(e),n=t.matches[t.matches.length-1];return B(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Di(){return Ei(`useRouteId`)}function Oi(){let e=_.useContext($r),t=wi(`useRouteError`),n=Ei(`useRouteError`);return e===void 0?t.errors?.[n]:e}function ki(){let{router:e}=Ci(`useNavigate`),t=Ei(`useNavigate`),n=_.useRef(!1);return _.useLayoutEffect(()=>{n.current=!0}),_.useCallback(async(r,i={})=>{He(n.current,ci),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Ai={};function ji(e,t,n){!t&&!Ai[e]&&(Ai[e]=!0,He(!1,n))}var Mi={};function Ni(e,t){!e&&!Mi[t]&&(Mi[t]=!0,console.warn(t))}var Pi=[`HydrateFallback`,`hydrateFallbackElement`],Fi=class{status=`pending`;promise;resolve;reject;constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function Ii({router:e,flushSync:t,onError:n,useTransitions:r}){r=Kr()||r;let[i,a]=_.useState(e.state),[o,s]=(0,_.useOptimistic)(i),[c,l]=_.useState(),[u,d]=_.useState({isTransitioning:!1}),[f,p]=_.useState(),[m,h]=_.useState(),[g,v]=_.useState(),y=_.useRef(new Map),b=_.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:g})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:Gt(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),o.forEach(e=>y.current.delete(e)),Ni(u===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `` 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 b=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(Ni(g==null||b,"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."),!g||!b)t&&u?t(()=>a(i)):r===!1?a(i):_.startTransition(()=>{r===!0&&s(e=>Li(e,i)),a(i)});else if(t&&u){t(()=>{m&&(f?.resolve(),m.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:g.currentLocation,nextLocation:g.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>h(n))}else m?(f?.resolve(),m.skipTransition(),v({state:i,currentLocation:g.currentLocation,nextLocation:g.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}))},[e.window,t,m,f,r,s,n]);_.useLayoutEffect(()=>e.subscribe(b),[e,b]),_.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new Fi)},[u]),_.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):_.startTransition(()=>{r===!0&&s(e=>Li(e,t)),a(t)}),await n});i.finished.finally(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})}),h(i)}},[c,f,e.window,r,s]),_.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),_.useEffect(()=>{!u.isTransitioning&&g&&(l(g.state),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),v(void 0))},[u.isTransitioning,g]);let x=_.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),S=e.basename||`/`,C=_.useMemo(()=>({router:e,navigator:x,static:!1,basename:S,onError:n}),[e,x,S,n]);return _.createElement(_.Fragment,null,_.createElement(Ur.Provider,{value:C},_.createElement(Wr.Provider,{value:o},_.createElement(Jr.Provider,{value:y.current},_.createElement(qr.Provider,{value:u},_.createElement(Hi,{basename:S,location:o.location,navigationType:o.historyAction,navigator:x,useTransitions:r},_.createElement(Ri,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function Li(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var Ri=_.memo(zi);function zi({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return mi(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Bi({to:e,replace:t,state:n,relative:r}){B(oi(),` may be used only in the context of a component.`);let{static:i,navigator:a}=_.useContext(Xr);He(!i,` must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.`);let{matches:o}=_.useContext(Qr),{pathname:s}=si(),c=li(),l=It(e,Ft(o),s,r===`path`);hn(typeof e==`string`?e:Ke(e),a.createHref(l),fn(a),`reject`);let u=JSON.stringify(l);return _.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function Vi(e){return fi(e.context)}function Hi({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){B(!oi(),`You cannot render a inside another . You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=_.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=qe(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=_.useMemo(()=>{let e=Ot(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return He(h!=null,` is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the won't render anything.`),h==null?null:_.createElement(Xr.Provider,{value:c},_.createElement(Zr.Provider,{children:t,value:h}))}_.Component;var Ui=`application/x-www-form-urlencoded`;function Wi(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Gi(e){return Wi(e)&&e.tagName.toLowerCase()===`button`}function Ki(e){return Wi(e)&&e.tagName.toLowerCase()===`form`}function qi(e){return Wi(e)&&e.tagName.toLowerCase()===`input`}function Ji(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Yi(e,t){return e.button===0&&(!t||t===`_self`)&&!Ji(e)}var Xi=null;function Zi(){if(Xi===null)try{new FormData(document.createElement(`form`),0),Xi=!1}catch{Xi=!0}return Xi}var Qi=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function $i(e){return e!=null&&!Qi.has(e)?(He(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Ui}"`),null):e}function ea(e,t){let n,r,i,a,o;if(Ki(e)){let o=e.getAttribute(`action`);r=o?Ot(o,t):null,n=e.getAttribute(`method`)||`get`,i=$i(e.getAttribute(`enctype`))||Ui,a=new FormData(e)}else if(Gi(e)||qi(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a