@mcpjam/inspector 0.8.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. package/README.md +28 -10
  2. package/bin/start.js +78 -66
  3. package/dist/client/assets/index-C4nE74q5.css +1 -0
  4. package/dist/client/assets/index-CcfG-2LO.js +357 -0
  5. package/dist/client/assets/index-CcfG-2LO.js.map +1 -0
  6. package/dist/client/catalyst.png +0 -0
  7. package/dist/client/index.html +14 -0
  8. package/dist/main/main.cjs +1330 -0
  9. package/dist/preload/preload.js +26 -0
  10. package/dist/renderer/assets/index-CYiU4_x2.css +1 -0
  11. package/dist/renderer/assets/index-woGCpEdp.js +356 -0
  12. package/dist/renderer/catalyst.png +0 -0
  13. package/dist/renderer/demo_1.png +0 -0
  14. package/dist/renderer/demo_2.png +0 -0
  15. package/dist/renderer/demo_3.png +0 -0
  16. package/dist/renderer/file.svg +1 -0
  17. package/dist/renderer/globe.svg +1 -0
  18. package/dist/renderer/index.html +14 -0
  19. package/dist/renderer/mcp.svg +1 -0
  20. package/dist/renderer/mcp_jam.svg +12 -0
  21. package/dist/renderer/mcp_jam_dark.png +0 -0
  22. package/dist/renderer/mcp_jam_light.png +0 -0
  23. package/dist/renderer/next.svg +1 -0
  24. package/dist/renderer/vercel.svg +1 -0
  25. package/dist/renderer/window.svg +1 -0
  26. package/dist/server/index.js +1101 -0
  27. package/dist/server/index.js.map +1 -0
  28. package/package.json +32 -17
  29. package/.next/BUILD_ID +0 -1
  30. package/.next/app-build-manifest.json +0 -89
  31. package/.next/app-path-routes-manifest.json +0 -13
  32. package/.next/build-manifest.json +0 -33
  33. package/.next/cache/.previewinfo +0 -1
  34. package/.next/cache/.rscinfo +0 -1
  35. package/.next/cache/.tsbuildinfo +0 -1
  36. package/.next/cache/eslint/.cache_1pr0xfn +0 -1
  37. package/.next/cache/webpack/client-production/0.pack +0 -0
  38. package/.next/cache/webpack/client-production/index.pack +0 -0
  39. package/.next/cache/webpack/edge-server-production/0.pack +0 -0
  40. package/.next/cache/webpack/edge-server-production/index.pack +0 -0
  41. package/.next/cache/webpack/server-production/0.pack +0 -0
  42. package/.next/cache/webpack/server-production/index.pack +0 -0
  43. package/.next/diagnostics/build-diagnostics.json +0 -6
  44. package/.next/diagnostics/framework.json +0 -1
  45. package/.next/export-marker.json +0 -6
  46. package/.next/images-manifest.json +0 -57
  47. package/.next/next-minimal-server.js.nft.json +0 -1
  48. package/.next/next-server.js.nft.json +0 -1
  49. package/.next/package.json +0 -1
  50. package/.next/prerender-manifest.json +0 -41
  51. package/.next/react-loadable-manifest.json +0 -1
  52. package/.next/required-server-files.json +0 -318
  53. package/.next/routes-manifest.json +0 -65
  54. package/.next/server/app/_not-found/page.js +0 -2
  55. package/.next/server/app/_not-found/page.js.nft.json +0 -1
  56. package/.next/server/app/_not-found/page_client-reference-manifest.js +0 -1
  57. package/.next/server/app/api/mcp/chat/route.js +0 -45
  58. package/.next/server/app/api/mcp/chat/route.js.nft.json +0 -1
  59. package/.next/server/app/api/mcp/chat/route_client-reference-manifest.js +0 -1
  60. package/.next/server/app/api/mcp/connect/route.js +0 -1
  61. package/.next/server/app/api/mcp/connect/route.js.nft.json +0 -1
  62. package/.next/server/app/api/mcp/connect/route_client-reference-manifest.js +0 -1
  63. package/.next/server/app/api/mcp/prompts/get/route.js +0 -1
  64. package/.next/server/app/api/mcp/prompts/get/route.js.nft.json +0 -1
  65. package/.next/server/app/api/mcp/prompts/get/route_client-reference-manifest.js +0 -1
  66. package/.next/server/app/api/mcp/prompts/list/route.js +0 -1
  67. package/.next/server/app/api/mcp/prompts/list/route.js.nft.json +0 -1
  68. package/.next/server/app/api/mcp/prompts/list/route_client-reference-manifest.js +0 -1
  69. package/.next/server/app/api/mcp/resources/list/route.js +0 -1
  70. package/.next/server/app/api/mcp/resources/list/route.js.nft.json +0 -1
  71. package/.next/server/app/api/mcp/resources/list/route_client-reference-manifest.js +0 -1
  72. package/.next/server/app/api/mcp/resources/read/route.js +0 -1
  73. package/.next/server/app/api/mcp/resources/read/route.js.nft.json +0 -1
  74. package/.next/server/app/api/mcp/resources/read/route_client-reference-manifest.js +0 -1
  75. package/.next/server/app/api/mcp/tools/route.js +0 -21
  76. package/.next/server/app/api/mcp/tools/route.js.nft.json +0 -1
  77. package/.next/server/app/api/mcp/tools/route_client-reference-manifest.js +0 -1
  78. package/.next/server/app/favicon.ico/route.js +0 -1
  79. package/.next/server/app/favicon.ico/route.js.nft.json +0 -1
  80. package/.next/server/app/favicon.ico.body +0 -0
  81. package/.next/server/app/favicon.ico.meta +0 -1
  82. package/.next/server/app/oauth/callback/page.js +0 -2
  83. package/.next/server/app/oauth/callback/page.js.nft.json +0 -1
  84. package/.next/server/app/oauth/callback/page_client-reference-manifest.js +0 -1
  85. package/.next/server/app/page.js +0 -16
  86. package/.next/server/app/page.js.nft.json +0 -1
  87. package/.next/server/app/page_client-reference-manifest.js +0 -1
  88. package/.next/server/app-paths-manifest.json +0 -13
  89. package/.next/server/chunks/175.js +0 -8
  90. package/.next/server/chunks/260.js +0 -82
  91. package/.next/server/chunks/546.js +0 -1
  92. package/.next/server/chunks/548.js +0 -6
  93. package/.next/server/chunks/55.js +0 -1
  94. package/.next/server/chunks/985.js +0 -22
  95. package/.next/server/functions-config-manifest.json +0 -4
  96. package/.next/server/interception-route-rewrite-manifest.js +0 -1
  97. package/.next/server/middleware-build-manifest.js +0 -1
  98. package/.next/server/middleware-manifest.json +0 -6
  99. package/.next/server/middleware-react-loadable-manifest.js +0 -1
  100. package/.next/server/next-font-manifest.js +0 -1
  101. package/.next/server/next-font-manifest.json +0 -1
  102. package/.next/server/pages/500.html +0 -1
  103. package/.next/server/pages/_app.js +0 -1
  104. package/.next/server/pages/_app.js.nft.json +0 -1
  105. package/.next/server/pages/_document.js +0 -1
  106. package/.next/server/pages/_document.js.nft.json +0 -1
  107. package/.next/server/pages/_error.js +0 -19
  108. package/.next/server/pages/_error.js.nft.json +0 -1
  109. package/.next/server/pages-manifest.json +0 -5
  110. package/.next/server/server-reference-manifest.js +0 -1
  111. package/.next/server/server-reference-manifest.json +0 -1
  112. package/.next/server/webpack-runtime.js +0 -1
  113. package/.next/static/Pq27RIJUfrYOGSjOrYx4E/_buildManifest.js +0 -1
  114. package/.next/static/Pq27RIJUfrYOGSjOrYx4E/_ssgManifest.js +0 -1
  115. package/.next/static/chunks/14-ae3a01e72ea53777.js +0 -1
  116. package/.next/static/chunks/214-cc4c35d88f2695ed.js +0 -1
  117. package/.next/static/chunks/4bd1b696-cf72ae8a39fa05aa.js +0 -1
  118. package/.next/static/chunks/866-04c19dda4c52f2bf.js +0 -1
  119. package/.next/static/chunks/964-eda38e26c0391a47.js +0 -1
  120. package/.next/static/chunks/app/_not-found/page-8601c49989b0be94.js +0 -1
  121. package/.next/static/chunks/app/api/mcp/chat/route-0341498a8bf5f2da.js +0 -1
  122. package/.next/static/chunks/app/api/mcp/connect/route-0341498a8bf5f2da.js +0 -1
  123. package/.next/static/chunks/app/api/mcp/prompts/get/route-0341498a8bf5f2da.js +0 -1
  124. package/.next/static/chunks/app/api/mcp/prompts/list/route-0341498a8bf5f2da.js +0 -1
  125. package/.next/static/chunks/app/api/mcp/resources/list/route-0341498a8bf5f2da.js +0 -1
  126. package/.next/static/chunks/app/api/mcp/resources/read/route-0341498a8bf5f2da.js +0 -1
  127. package/.next/static/chunks/app/api/mcp/tools/route-0341498a8bf5f2da.js +0 -1
  128. package/.next/static/chunks/app/layout-9e8115d4bf656fa0.js +0 -1
  129. package/.next/static/chunks/app/oauth/callback/page-cf6cb1ac31175f40.js +0 -1
  130. package/.next/static/chunks/app/page-fdd433623879220d.js +0 -1
  131. package/.next/static/chunks/framework-7c95b8e5103c9e90.js +0 -1
  132. package/.next/static/chunks/main-app-4e9e28316818cdde.js +0 -1
  133. package/.next/static/chunks/main-bbdafee21a7bd1d6.js +0 -1
  134. package/.next/static/chunks/pages/_app-0a0020ddd67f79cf.js +0 -1
  135. package/.next/static/chunks/pages/_error-03529f2c21436739.js +0 -1
  136. package/.next/static/chunks/polyfills-42372ed130431b0a.js +0 -1
  137. package/.next/static/chunks/webpack-cdfccaf38062dd25.js +0 -1
  138. package/.next/static/css/1e852d83e9c1d0c6.css +0 -1
  139. package/.next/static/css/f30152c0704fba31.css +0 -1
  140. package/.next/static/css/fe751fdbe975e9ca.css +0 -1
  141. package/.next/static/media/569ce4b8f30dc480-s.p.woff2 +0 -0
  142. package/.next/static/media/747892c23ea88013-s.woff2 +0 -0
  143. package/.next/static/media/8d697b304b401681-s.woff2 +0 -0
  144. package/.next/static/media/93f479601ee12b01-s.p.woff2 +0 -0
  145. package/.next/static/media/9610d9e46709d722-s.woff2 +0 -0
  146. package/.next/static/media/ba015fad6dcf6784-s.woff2 +0 -0
  147. package/.next/trace +0 -35
  148. package/.next/types/app/api/mcp/chat/route.ts +0 -347
  149. package/.next/types/app/api/mcp/connect/route.ts +0 -347
  150. package/.next/types/app/api/mcp/prompts/get/route.ts +0 -347
  151. package/.next/types/app/api/mcp/prompts/list/route.ts +0 -347
  152. package/.next/types/app/api/mcp/resources/list/route.ts +0 -347
  153. package/.next/types/app/api/mcp/resources/read/route.ts +0 -347
  154. package/.next/types/app/api/mcp/tools/route.ts +0 -347
  155. package/.next/types/app/layout.ts +0 -84
  156. package/.next/types/app/oauth/callback/page.ts +0 -84
  157. package/.next/types/app/page.ts +0 -84
  158. package/.next/types/cache-life.d.ts +0 -141
  159. package/.next/types/package.json +0 -1
  160. package/next.config.ts +0 -7
  161. /package/{public → dist/client}/claude_logo.png +0 -0
  162. /package/{public → dist/client}/demo_1.png +0 -0
  163. /package/{public → dist/client}/demo_2.png +0 -0
  164. /package/{public → dist/client}/demo_3.png +0 -0
  165. /package/{public → dist/client}/file.svg +0 -0
  166. /package/{public → dist/client}/globe.svg +0 -0
  167. /package/{public → dist/client}/mcp.svg +0 -0
  168. /package/{public → dist/client}/mcp_jam.svg +0 -0
  169. /package/{public → dist/client}/mcp_jam_dark.png +0 -0
  170. /package/{public → dist/client}/mcp_jam_light.png +0 -0
  171. /package/{public → dist/client}/next.svg +0 -0
  172. /package/{public → dist/client}/ollama_dark.png +0 -0
  173. /package/{public → dist/client}/ollama_logo.svg +0 -0
  174. /package/{public → dist/client}/openai_logo.png +0 -0
  175. /package/{public → dist/client}/vercel.svg +0 -0
  176. /package/{public → dist/client}/window.svg +0 -0
  177. /package/{.next/static/media/claude_logo.d33b25b0.png → dist/renderer/claude_logo.png} +0 -0
  178. /package/{.next/static/media/ollama_dark.9af45ac0.png → dist/renderer/ollama_dark.png} +0 -0
  179. /package/{.next/static/media/ollama_logo.9f08a95b.svg → dist/renderer/ollama_logo.svg} +0 -0
  180. /package/{.next/static/media/openai_logo.3f83154a.png → dist/renderer/openai_logo.png} +0 -0
@@ -0,0 +1,357 @@
1
+ var BD=Object.defineProperty;var VD=(e,t,n)=>t in e?BD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ja=(e,t,n)=>VD(e,typeof t!="symbol"?t+"":t,n);function UD(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function Xf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qp={exports:{}},cc={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var RS;function HD(){if(RS)return cc;RS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,s,o){var l=null;if(o!==void 0&&(l=""+o),s.key!==void 0&&(l=""+s.key),"key"in s){o={};for(var u in s)u!=="key"&&(o[u]=s[u])}else o=s;return s=o.ref,{$$typeof:e,type:r,key:l,ref:s!==void 0?s:null,props:o}}return cc.Fragment=t,cc.jsx=n,cc.jsxs=n,cc}var MS;function FD(){return MS||(MS=1,qp.exports=HD()),qp.exports}var m=FD(),Gp={exports:{}},Ge={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var OS;function $D(){if(OS)return Ge;OS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.iterator;function x(C){return C===null||typeof C!="object"?null:(C=p&&C[p]||C["@@iterator"],typeof C=="function"?C:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,k={};function E(C,G,le){this.props=C,this.context=G,this.refs=k,this.updater=le||v}E.prototype.isReactComponent={},E.prototype.setState=function(C,G){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,G,"setState")},E.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function T(){}T.prototype=E.prototype;function A(C,G,le){this.props=C,this.context=G,this.refs=k,this.updater=le||v}var O=A.prototype=new T;O.constructor=A,S(O,E.prototype),O.isPureReactComponent=!0;var R=Array.isArray,M={H:null,A:null,T:null,S:null,V:null},_=Object.prototype.hasOwnProperty;function D(C,G,le,N,K,Q){return le=Q.ref,{$$typeof:e,type:C,key:G,ref:le!==void 0?le:null,props:Q}}function P(C,G){return D(C.type,G,void 0,void 0,void 0,C.props)}function B(C){return typeof C=="object"&&C!==null&&C.$$typeof===e}function z(C){var G={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(le){return G[le]})}var H=/\/+/g;function $(C,G){return typeof C=="object"&&C!==null&&C.key!=null?z(""+C.key):G.toString(36)}function re(){}function te(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(re,re):(C.status="pending",C.then(function(G){C.status==="pending"&&(C.status="fulfilled",C.value=G)},function(G){C.status==="pending"&&(C.status="rejected",C.reason=G)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function ie(C,G,le,N,K){var Q=typeof C;(Q==="undefined"||Q==="boolean")&&(C=null);var X=!1;if(C===null)X=!0;else switch(Q){case"bigint":case"string":case"number":X=!0;break;case"object":switch(C.$$typeof){case e:case t:X=!0;break;case g:return X=C._init,ie(X(C._payload),G,le,N,K)}}if(X)return K=K(C),X=N===""?"."+$(C,0):N,R(K)?(le="",X!=null&&(le=X.replace(H,"$&/")+"/"),ie(K,G,le,"",function(ce){return ce})):K!=null&&(B(K)&&(K=P(K,le+(K.key==null||C&&C.key===K.key?"":(""+K.key).replace(H,"$&/")+"/")+X)),G.push(K)),1;X=0;var Y=N===""?".":N+":";if(R(C))for(var oe=0;oe<C.length;oe++)N=C[oe],Q=Y+$(N,oe),X+=ie(N,G,le,Q,K);else if(oe=x(C),typeof oe=="function")for(C=oe.call(C),oe=0;!(N=C.next()).done;)N=N.value,Q=Y+$(N,oe++),X+=ie(N,G,le,Q,K);else if(Q==="object"){if(typeof C.then=="function")return ie(te(C),G,le,N,K);throw G=String(C),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return X}function I(C,G,le){if(C==null)return C;var N=[],K=0;return ie(C,N,"","",function(Q){return G.call(le,Q,K++)}),N}function F(C){if(C._status===-1){var G=C._result;G=G(),G.then(function(le){(C._status===0||C._status===-1)&&(C._status=1,C._result=le)},function(le){(C._status===0||C._status===-1)&&(C._status=2,C._result=le)}),C._status===-1&&(C._status=0,C._result=G)}if(C._status===1)return C._result.default;throw C._result}var V=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)};function Z(){}return Ge.Children={map:I,forEach:function(C,G,le){I(C,function(){G.apply(this,arguments)},le)},count:function(C){var G=0;return I(C,function(){G++}),G},toArray:function(C){return I(C,function(G){return G})||[]},only:function(C){if(!B(C))throw Error("React.Children.only expected to receive a single React element child.");return C}},Ge.Component=E,Ge.Fragment=n,Ge.Profiler=s,Ge.PureComponent=A,Ge.StrictMode=r,Ge.Suspense=d,Ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Ge.__COMPILER_RUNTIME={__proto__:null,c:function(C){return M.H.useMemoCache(C)}},Ge.cache=function(C){return function(){return C.apply(null,arguments)}},Ge.cloneElement=function(C,G,le){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var N=S({},C.props),K=C.key,Q=void 0;if(G!=null)for(X in G.ref!==void 0&&(Q=void 0),G.key!==void 0&&(K=""+G.key),G)!_.call(G,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&G.ref===void 0||(N[X]=G[X]);var X=arguments.length-2;if(X===1)N.children=le;else if(1<X){for(var Y=Array(X),oe=0;oe<X;oe++)Y[oe]=arguments[oe+2];N.children=Y}return D(C.type,K,void 0,void 0,Q,N)},Ge.createContext=function(C){return C={$$typeof:l,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:o,_context:C},C},Ge.createElement=function(C,G,le){var N,K={},Q=null;if(G!=null)for(N in G.key!==void 0&&(Q=""+G.key),G)_.call(G,N)&&N!=="key"&&N!=="__self"&&N!=="__source"&&(K[N]=G[N]);var X=arguments.length-2;if(X===1)K.children=le;else if(1<X){for(var Y=Array(X),oe=0;oe<X;oe++)Y[oe]=arguments[oe+2];K.children=Y}if(C&&C.defaultProps)for(N in X=C.defaultProps,X)K[N]===void 0&&(K[N]=X[N]);return D(C,Q,void 0,void 0,null,K)},Ge.createRef=function(){return{current:null}},Ge.forwardRef=function(C){return{$$typeof:u,render:C}},Ge.isValidElement=B,Ge.lazy=function(C){return{$$typeof:g,_payload:{_status:-1,_result:C},_init:F}},Ge.memo=function(C,G){return{$$typeof:h,type:C,compare:G===void 0?null:G}},Ge.startTransition=function(C){var G=M.T,le={};M.T=le;try{var N=C(),K=M.S;K!==null&&K(le,N),typeof N=="object"&&N!==null&&typeof N.then=="function"&&N.then(Z,V)}catch(Q){V(Q)}finally{M.T=G}},Ge.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Ge.use=function(C){return M.H.use(C)},Ge.useActionState=function(C,G,le){return M.H.useActionState(C,G,le)},Ge.useCallback=function(C,G){return M.H.useCallback(C,G)},Ge.useContext=function(C){return M.H.useContext(C)},Ge.useDebugValue=function(){},Ge.useDeferredValue=function(C,G){return M.H.useDeferredValue(C,G)},Ge.useEffect=function(C,G,le){var N=M.H;if(typeof le=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return N.useEffect(C,G)},Ge.useId=function(){return M.H.useId()},Ge.useImperativeHandle=function(C,G,le){return M.H.useImperativeHandle(C,G,le)},Ge.useInsertionEffect=function(C,G){return M.H.useInsertionEffect(C,G)},Ge.useLayoutEffect=function(C,G){return M.H.useLayoutEffect(C,G)},Ge.useMemo=function(C,G){return M.H.useMemo(C,G)},Ge.useOptimistic=function(C,G){return M.H.useOptimistic(C,G)},Ge.useReducer=function(C,G,le){return M.H.useReducer(C,G,le)},Ge.useRef=function(C){return M.H.useRef(C)},Ge.useState=function(C){return M.H.useState(C)},Ge.useSyncExternalStore=function(C,G,le){return M.H.useSyncExternalStore(C,G,le)},Ge.useTransition=function(){return M.H.useTransition()},Ge.version="19.1.0",Ge}var DS;function Px(){return DS||(DS=1,Gp.exports=$D()),Gp.exports}var w=Px();const ye=Xf(w),zx=UD({__proto__:null,default:ye},[w]);var Yp={exports:{}},uc={},Zp={exports:{}},Xp={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var PS;function qD(){return PS||(PS=1,function(e){function t(I,F){var V=I.length;I.push(F);e:for(;0<V;){var Z=V-1>>>1,C=I[Z];if(0<s(C,F))I[Z]=F,I[V]=C,V=Z;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var F=I[0],V=I.pop();if(V!==F){I[0]=V;e:for(var Z=0,C=I.length,G=C>>>1;Z<G;){var le=2*(Z+1)-1,N=I[le],K=le+1,Q=I[K];if(0>s(N,V))K<C&&0>s(Q,N)?(I[Z]=Q,I[K]=V,Z=K):(I[Z]=N,I[le]=V,Z=le);else if(K<C&&0>s(Q,V))I[Z]=Q,I[K]=V,Z=K;else break e}}return F}function s(I,F){var V=I.sortIndex-F.sortIndex;return V!==0?V:I.id-F.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var d=[],h=[],g=1,p=null,x=3,v=!1,S=!1,k=!1,E=!1,T=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function R(I){for(var F=n(h);F!==null;){if(F.callback===null)r(h);else if(F.startTime<=I)r(h),F.sortIndex=F.expirationTime,t(d,F);else break;F=n(h)}}function M(I){if(k=!1,R(I),!S)if(n(d)!==null)S=!0,_||(_=!0,$());else{var F=n(h);F!==null&&ie(M,F.startTime-I)}}var _=!1,D=-1,P=5,B=-1;function z(){return E?!0:!(e.unstable_now()-B<P)}function H(){if(E=!1,_){var I=e.unstable_now();B=I;var F=!0;try{e:{S=!1,k&&(k=!1,A(D),D=-1),v=!0;var V=x;try{t:{for(R(I),p=n(d);p!==null&&!(p.expirationTime>I&&z());){var Z=p.callback;if(typeof Z=="function"){p.callback=null,x=p.priorityLevel;var C=Z(p.expirationTime<=I);if(I=e.unstable_now(),typeof C=="function"){p.callback=C,R(I),F=!0;break t}p===n(d)&&r(d),R(I)}else r(d);p=n(d)}if(p!==null)F=!0;else{var G=n(h);G!==null&&ie(M,G.startTime-I),F=!1}}break e}finally{p=null,x=V,v=!1}F=void 0}}finally{F?$():_=!1}}}var $;if(typeof O=="function")$=function(){O(H)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,te=re.port2;re.port1.onmessage=H,$=function(){te.postMessage(null)}}else $=function(){T(H,0)};function ie(I,F){D=T(function(){I(e.unstable_now())},F)}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(I){I.callback=null},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(I){switch(x){case 1:case 2:case 3:var F=3;break;default:F=x}var V=x;x=F;try{return I()}finally{x=V}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(I,F){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var V=x;x=I;try{return F()}finally{x=V}},e.unstable_scheduleCallback=function(I,F,V){var Z=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?Z+V:Z):V=Z,I){case 1:var C=-1;break;case 2:C=250;break;case 5:C=1073741823;break;case 4:C=1e4;break;default:C=5e3}return C=V+C,I={id:g++,callback:F,priorityLevel:I,startTime:V,expirationTime:C,sortIndex:-1},V>Z?(I.sortIndex=V,t(h,I),n(d)===null&&I===n(h)&&(k?(A(D),D=-1):k=!0,ie(M,V-Z))):(I.sortIndex=C,t(d,I),S||v||(S=!0,_||(_=!0,$()))),I},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(I){var F=x;return function(){var V=x;x=F;try{return I.apply(this,arguments)}finally{x=V}}}}(Xp)),Xp}var zS;function GD(){return zS||(zS=1,Zp.exports=qD()),Zp.exports}var Kp={exports:{}},Tn={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var LS;function YD(){if(LS)return Tn;LS=1;var e=Px();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function o(d,h,g){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:p==null?null:""+p,children:d,containerInfo:h,implementation:g}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Tn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Tn.createPortal=function(d,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return o(d,h,null,g)},Tn.flushSync=function(d){var h=l.T,g=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=h,r.p=g,r.d.f()}},Tn.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(d,h))},Tn.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},Tn.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var g=h.as,p=u(g,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?r.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:x,fetchPriority:v}):g==="script"&&r.d.X(d,{crossOrigin:p,integrity:x,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Tn.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=u(h.as,h.crossOrigin);r.d.M(d,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(d)},Tn.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,p=u(g,h.crossOrigin);r.d.L(d,g,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Tn.preloadModule=function(d,h){if(typeof d=="string")if(h){var g=u(h.as,h.crossOrigin);r.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(d)},Tn.requestFormReset=function(d){r.d.r(d)},Tn.unstable_batchedUpdates=function(d,h){return d(h)},Tn.useFormState=function(d,h,g){return l.H.useFormState(d,h,g)},Tn.useFormStatus=function(){return l.H.useHostTransitionStatus()},Tn.version="19.1.0",Tn}var IS;function OE(){if(IS)return Kp.exports;IS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Kp.exports=YD(),Kp.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var BS;function ZD(){if(BS)return uc;BS=1;var e=GD(),t=Px(),n=OE();function r(i){var a="https://react.dev/errors/"+i;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)a+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+i+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var a=i,c=i;if(i.alternate)for(;a.return;)a=a.return;else{i=a;do a=i,(a.flags&4098)!==0&&(c=a.return),i=a.return;while(i)}return a.tag===3?c:null}function l(i){if(i.tag===13){var a=i.memoizedState;if(a===null&&(i=i.alternate,i!==null&&(a=i.memoizedState)),a!==null)return a.dehydrated}return null}function u(i){if(o(i)!==i)throw Error(r(188))}function d(i){var a=i.alternate;if(!a){if(a=o(i),a===null)throw Error(r(188));return a!==i?null:i}for(var c=i,f=a;;){var y=c.return;if(y===null)break;var b=y.alternate;if(b===null){if(f=y.return,f!==null){c=f;continue}break}if(y.child===b.child){for(b=y.child;b;){if(b===c)return u(y),i;if(b===f)return u(y),a;b=b.sibling}throw Error(r(188))}if(c.return!==f.return)c=y,f=b;else{for(var j=!1,L=y.child;L;){if(L===c){j=!0,c=y,f=b;break}if(L===f){j=!0,f=y,c=b;break}L=L.sibling}if(!j){for(L=b.child;L;){if(L===c){j=!0,c=b,f=y;break}if(L===f){j=!0,f=b,c=y;break}L=L.sibling}if(!j)throw Error(r(189))}}if(c.alternate!==f)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?i:a}function h(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i;for(i=i.child;i!==null;){if(a=h(i),a!==null)return a;i=i.sibling}return null}var g=Object.assign,p=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),A=Symbol.for("react.consumer"),O=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function $(i){return i===null||typeof i!="object"?null:(i=H&&i[H]||i["@@iterator"],typeof i=="function"?i:null)}var re=Symbol.for("react.client.reference");function te(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===re?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case S:return"Fragment";case E:return"Profiler";case k:return"StrictMode";case M:return"Suspense";case _:return"SuspenseList";case B:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case v:return"Portal";case O:return(i.displayName||"Context")+".Provider";case A:return(i._context.displayName||"Context")+".Consumer";case R:var a=i.render;return i=i.displayName,i||(i=a.displayName||a.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case D:return a=i.displayName||null,a!==null?a:te(i.type)||"Memo";case P:a=i._payload,i=i._init;try{return te(i(a))}catch{}}return null}var ie=Array.isArray,I=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},Z=[],C=-1;function G(i){return{current:i}}function le(i){0>C||(i.current=Z[C],Z[C]=null,C--)}function N(i,a){C++,Z[C]=i.current,i.current=a}var K=G(null),Q=G(null),X=G(null),Y=G(null);function oe(i,a){switch(N(X,a),N(Q,i),N(K,null),a.nodeType){case 9:case 11:i=(i=a.documentElement)&&(i=i.namespaceURI)?aS(i):0;break;default:if(i=a.tagName,a=a.namespaceURI)a=aS(a),i=sS(a,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}le(K),N(K,i)}function ce(){le(K),le(Q),le(X)}function me(i){i.memoizedState!==null&&N(Y,i);var a=K.current,c=sS(a,i.type);a!==c&&(N(Q,i),N(K,c))}function be(i){Q.current===i&&(le(K),le(Q)),Y.current===i&&(le(Y),ic._currentValue=V)}var Te=Object.prototype.hasOwnProperty,Ve=e.unstable_scheduleCallback,lt=e.unstable_cancelCallback,Mt=e.unstable_shouldYield,Lt=e.unstable_requestPaint,st=e.unstable_now,yt=e.unstable_getCurrentPriorityLevel,kt=e.unstable_ImmediatePriority,lr=e.unstable_UserBlockingPriority,Jt=e.unstable_NormalPriority,Ct=e.unstable_LowPriority,Yn=e.unstable_IdlePriority,fl=e.log,hl=e.unstable_setDisableYieldValue,ue=null,ge=null;function Oe(i){if(typeof fl=="function"&&hl(i),ge&&typeof ge.setStrictMode=="function")try{ge.setStrictMode(ue,i)}catch{}}var De=Math.clz32?Math.clz32:wn,it=Math.log,bn=Math.LN2;function wn(i){return i>>>=0,i===0?32:31-(it(i)/bn|0)|0}var Sn=256,cr=4194304;function kn(i){var a=i&42;if(a!==0)return a;switch(i&-i){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:case 262144:case 524288:case 1048576:case 2097152:return i&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function It(i,a,c){var f=i.pendingLanes;if(f===0)return 0;var y=0,b=i.suspendedLanes,j=i.pingedLanes;i=i.warmLanes;var L=f&134217727;return L!==0?(f=L&~b,f!==0?y=kn(f):(j&=L,j!==0?y=kn(j):c||(c=L&~i,c!==0&&(y=kn(c))))):(L=f&~b,L!==0?y=kn(L):j!==0?y=kn(j):c||(c=f&~i,c!==0&&(y=kn(c)))),y===0?0:a!==0&&a!==y&&(a&b)===0&&(b=y&-y,c=a&-a,b>=c||b===32&&(c&4194048)!==0)?a:y}function zn(i,a){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&a)===0}function Nn(i,a){switch(i){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Nr(){var i=Sn;return Sn<<=1,(Sn&4194048)===0&&(Sn=256),i}function wu(){var i=cr;return cr<<=1,(cr&62914560)===0&&(cr=4194304),i}function ml(i){for(var a=[],c=0;31>c;c++)a.push(i);return a}function Ui(i,a){i.pendingLanes|=a,a!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Su(i,a,c,f,y,b){var j=i.pendingLanes;i.pendingLanes=c,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=c,i.entangledLanes&=c,i.errorRecoveryDisabledLanes&=c,i.shellSuspendCounter=0;var L=i.entanglements,U=i.expirationTimes,ne=i.hiddenUpdates;for(c=j&~c;0<c;){var de=31-De(c),he=1<<de;L[de]=0,U[de]=-1;var ae=ne[de];if(ae!==null)for(ne[de]=null,de=0;de<ae.length;de++){var se=ae[de];se!==null&&(se.lane&=-536870913)}c&=~he}f!==0&&Fe(i,f,0),b!==0&&y===0&&i.tag!==0&&(i.suspendedLanes|=b&~(j&~a))}function Fe(i,a,c){i.pendingLanes|=a,i.suspendedLanes&=~a;var f=31-De(a);i.entangledLanes|=a,i.entanglements[f]=i.entanglements[f]|1073741824|c&4194090}function Bt(i,a){var c=i.entangledLanes|=a;for(i=i.entanglements;c;){var f=31-De(c),y=1<<f;y&a|i[f]&a&&(i[f]|=a),c&=~y}}function Gt(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function fn(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Pa(){var i=F.p;return i!==0?i:(i=window.event,i===void 0?32:TS(i.type))}function en(i,a){var c=F.p;try{return F.p=i,a()}finally{F.p=c}}var Vt=Math.random().toString(36).slice(2),Ut="__reactFiber$"+Vt,Tt="__reactProps$"+Vt,sn="__reactContainer$"+Vt,As="__reactEvents$"+Vt,di="__reactListeners$"+Vt,G0="__reactHandles$"+Vt,Y0="__reactResources$"+Vt,pl="__reactMarker$"+Vt;function Ih(i){delete i[Ut],delete i[Tt],delete i[As],delete i[di],delete i[G0]}function Rs(i){var a=i[Ut];if(a)return a;for(var c=i.parentNode;c;){if(a=c[sn]||c[Ut]){if(c=a.alternate,a.child!==null||c!==null&&c.child!==null)for(i=uS(i);i!==null;){if(c=i[Ut])return c;i=uS(i)}return a}i=c,c=i.parentNode}return null}function Ms(i){if(i=i[Ut]||i[sn]){var a=i.tag;if(a===5||a===6||a===13||a===26||a===27||a===3)return i}return null}function gl(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i.stateNode;throw Error(r(33))}function Os(i){var a=i[Y0];return a||(a=i[Y0]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function on(i){i[pl]=!0}var Z0=new Set,X0={};function za(i,a){Ds(i,a),Ds(i+"Capture",a)}function Ds(i,a){for(X0[i]=a,i=0;i<a.length;i++)Z0.add(a[i])}var RM=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),K0={},W0={};function MM(i){return Te.call(W0,i)?!0:Te.call(K0,i)?!1:RM.test(i)?W0[i]=!0:(K0[i]=!0,!1)}function ku(i,a,c){if(MM(a))if(c===null)i.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":i.removeAttribute(a);return;case"boolean":var f=a.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){i.removeAttribute(a);return}}i.setAttribute(a,""+c)}}function Cu(i,a,c){if(c===null)i.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(a);return}i.setAttribute(a,""+c)}}function fi(i,a,c,f){if(f===null)i.removeAttribute(c);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(c);return}i.setAttributeNS(a,c,""+f)}}var Bh,Q0;function Ps(i){if(Bh===void 0)try{throw Error()}catch(c){var a=c.stack.trim().match(/\n( *(at )?)/);Bh=a&&a[1]||"",Q0=-1<c.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Bh+i+Q0}var Vh=!1;function Uh(i,a){if(!i||Vh)return"";Vh=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(a){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(se){var ae=se}Reflect.construct(i,[],he)}else{try{he.call()}catch(se){ae=se}i.call(he.prototype)}}else{try{throw Error()}catch(se){ae=se}(he=i())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(se){if(se&&ae&&typeof se.stack=="string")return[se.stack,ae.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=f.DetermineComponentFrameRoot(),j=b[0],L=b[1];if(j&&L){var U=j.split(`
44
+ `),ne=L.split(`
45
+ `);for(y=f=0;f<U.length&&!U[f].includes("DetermineComponentFrameRoot");)f++;for(;y<ne.length&&!ne[y].includes("DetermineComponentFrameRoot");)y++;if(f===U.length||y===ne.length)for(f=U.length-1,y=ne.length-1;1<=f&&0<=y&&U[f]!==ne[y];)y--;for(;1<=f&&0<=y;f--,y--)if(U[f]!==ne[y]){if(f!==1||y!==1)do if(f--,y--,0>y||U[f]!==ne[y]){var de=`
46
+ `+U[f].replace(" at new "," at ");return i.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",i.displayName)),de}while(1<=f&&0<=y);break}}}finally{Vh=!1,Error.prepareStackTrace=c}return(c=i?i.displayName||i.name:"")?Ps(c):""}function OM(i){switch(i.tag){case 26:case 27:case 5:return Ps(i.type);case 16:return Ps("Lazy");case 13:return Ps("Suspense");case 19:return Ps("SuspenseList");case 0:case 15:return Uh(i.type,!1);case 11:return Uh(i.type.render,!1);case 1:return Uh(i.type,!0);case 31:return Ps("Activity");default:return""}}function J0(i){try{var a="";do a+=OM(i),i=i.return;while(i);return a}catch(c){return`
47
+ Error generating stack: `+c.message+`
48
+ `+c.stack}}function ur(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function eb(i){var a=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function DM(i){var a=eb(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,a),f=""+i[a];if(!i.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var y=c.get,b=c.set;return Object.defineProperty(i,a,{configurable:!0,get:function(){return y.call(this)},set:function(j){f=""+j,b.call(this,j)}}),Object.defineProperty(i,a,{enumerable:c.enumerable}),{getValue:function(){return f},setValue:function(j){f=""+j},stopTracking:function(){i._valueTracker=null,delete i[a]}}}}function Tu(i){i._valueTracker||(i._valueTracker=DM(i))}function tb(i){if(!i)return!1;var a=i._valueTracker;if(!a)return!0;var c=a.getValue(),f="";return i&&(f=eb(i)?i.checked?"true":"false":i.value),i=f,i!==c?(a.setValue(i),!0):!1}function Eu(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var PM=/[\n"\\]/g;function dr(i){return i.replace(PM,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Hh(i,a,c,f,y,b,j,L){i.name="",j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?i.type=j:i.removeAttribute("type"),a!=null?j==="number"?(a===0&&i.value===""||i.value!=a)&&(i.value=""+ur(a)):i.value!==""+ur(a)&&(i.value=""+ur(a)):j!=="submit"&&j!=="reset"||i.removeAttribute("value"),a!=null?Fh(i,j,ur(a)):c!=null?Fh(i,j,ur(c)):f!=null&&i.removeAttribute("value"),y==null&&b!=null&&(i.defaultChecked=!!b),y!=null&&(i.checked=y&&typeof y!="function"&&typeof y!="symbol"),L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?i.name=""+ur(L):i.removeAttribute("name")}function nb(i,a,c,f,y,b,j,L){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(i.type=b),a!=null||c!=null){if(!(b!=="submit"&&b!=="reset"||a!=null))return;c=c!=null?""+ur(c):"",a=a!=null?""+ur(a):c,L||a===i.value||(i.value=a),i.defaultValue=a}f=f??y,f=typeof f!="function"&&typeof f!="symbol"&&!!f,i.checked=L?i.checked:!!f,i.defaultChecked=!!f,j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(i.name=j)}function Fh(i,a,c){a==="number"&&Eu(i.ownerDocument)===i||i.defaultValue===""+c||(i.defaultValue=""+c)}function zs(i,a,c,f){if(i=i.options,a){a={};for(var y=0;y<c.length;y++)a["$"+c[y]]=!0;for(c=0;c<i.length;c++)y=a.hasOwnProperty("$"+i[c].value),i[c].selected!==y&&(i[c].selected=y),y&&f&&(i[c].defaultSelected=!0)}else{for(c=""+ur(c),a=null,y=0;y<i.length;y++){if(i[y].value===c){i[y].selected=!0,f&&(i[y].defaultSelected=!0);return}a!==null||i[y].disabled||(a=i[y])}a!==null&&(a.selected=!0)}}function rb(i,a,c){if(a!=null&&(a=""+ur(a),a!==i.value&&(i.value=a),c==null)){i.defaultValue!==a&&(i.defaultValue=a);return}i.defaultValue=c!=null?""+ur(c):""}function ib(i,a,c,f){if(a==null){if(f!=null){if(c!=null)throw Error(r(92));if(ie(f)){if(1<f.length)throw Error(r(93));f=f[0]}c=f}c==null&&(c=""),a=c}c=ur(a),i.defaultValue=c,f=i.textContent,f===c&&f!==""&&f!==null&&(i.value=f)}function Ls(i,a){if(a){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=a;return}}i.textContent=a}var zM=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ab(i,a,c){var f=a.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?f?i.setProperty(a,""):a==="float"?i.cssFloat="":i[a]="":f?i.setProperty(a,c):typeof c!="number"||c===0||zM.has(a)?a==="float"?i.cssFloat=c:i[a]=(""+c).trim():i[a]=c+"px"}function sb(i,a,c){if(a!=null&&typeof a!="object")throw Error(r(62));if(i=i.style,c!=null){for(var f in c)!c.hasOwnProperty(f)||a!=null&&a.hasOwnProperty(f)||(f.indexOf("--")===0?i.setProperty(f,""):f==="float"?i.cssFloat="":i[f]="");for(var y in a)f=a[y],a.hasOwnProperty(y)&&c[y]!==f&&ab(i,y,f)}else for(var b in a)a.hasOwnProperty(b)&&ab(i,b,a[b])}function $h(i){if(i.indexOf("-")===-1)return!1;switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var LM=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),IM=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function _u(i){return IM.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}var qh=null;function Gh(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Is=null,Bs=null;function ob(i){var a=Ms(i);if(a&&(i=a.stateNode)){var c=i[Tt]||null;e:switch(i=a.stateNode,a.type){case"input":if(Hh(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),a=c.name,c.type==="radio"&&a!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+dr(""+a)+'"][type="radio"]'),a=0;a<c.length;a++){var f=c[a];if(f!==i&&f.form===i.form){var y=f[Tt]||null;if(!y)throw Error(r(90));Hh(f,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(a=0;a<c.length;a++)f=c[a],f.form===i.form&&tb(f)}break e;case"textarea":rb(i,c.value,c.defaultValue);break e;case"select":a=c.value,a!=null&&zs(i,!!c.multiple,a,!1)}}}var Yh=!1;function lb(i,a,c){if(Yh)return i(a,c);Yh=!0;try{var f=i(a);return f}finally{if(Yh=!1,(Is!==null||Bs!==null)&&(fd(),Is&&(a=Is,i=Bs,Bs=Is=null,ob(a),i)))for(a=0;a<i.length;a++)ob(i[a])}}function yl(i,a){var c=i.stateNode;if(c===null)return null;var f=c[Tt]||null;if(f===null)return null;c=f[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(r(231,a,typeof c));return c}var hi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zh=!1;if(hi)try{var xl={};Object.defineProperty(xl,"passive",{get:function(){Zh=!0}}),window.addEventListener("test",xl,xl),window.removeEventListener("test",xl,xl)}catch{Zh=!1}var Hi=null,Xh=null,ju=null;function cb(){if(ju)return ju;var i,a=Xh,c=a.length,f,y="value"in Hi?Hi.value:Hi.textContent,b=y.length;for(i=0;i<c&&a[i]===y[i];i++);var j=c-i;for(f=1;f<=j&&a[c-f]===y[b-f];f++);return ju=y.slice(i,1<f?1-f:void 0)}function Nu(i){var a=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&a===13&&(i=13)):i=a,i===10&&(i=13),32<=i||i===13?i:0}function Au(){return!0}function ub(){return!1}function Ln(i){function a(c,f,y,b,j){this._reactName=c,this._targetInst=y,this.type=f,this.nativeEvent=b,this.target=j,this.currentTarget=null;for(var L in i)i.hasOwnProperty(L)&&(c=i[L],this[L]=c?c(b):b[L]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Au:ub,this.isPropagationStopped=ub,this}return g(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Au)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Au)},persist:function(){},isPersistent:Au}),a}var La={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ru=Ln(La),vl=g({},La,{view:0,detail:0}),BM=Ln(vl),Kh,Wh,bl,Mu=g({},vl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jh,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==bl&&(bl&&i.type==="mousemove"?(Kh=i.screenX-bl.screenX,Wh=i.screenY-bl.screenY):Wh=Kh=0,bl=i),Kh)},movementY:function(i){return"movementY"in i?i.movementY:Wh}}),db=Ln(Mu),VM=g({},Mu,{dataTransfer:0}),UM=Ln(VM),HM=g({},vl,{relatedTarget:0}),Qh=Ln(HM),FM=g({},La,{animationName:0,elapsedTime:0,pseudoElement:0}),$M=Ln(FM),qM=g({},La,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),GM=Ln(qM),YM=g({},La,{data:0}),fb=Ln(YM),ZM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},XM={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},KM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function WM(i){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(i):(i=KM[i])?!!a[i]:!1}function Jh(){return WM}var QM=g({},vl,{key:function(i){if(i.key){var a=ZM[i.key]||i.key;if(a!=="Unidentified")return a}return i.type==="keypress"?(i=Nu(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?XM[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jh,charCode:function(i){return i.type==="keypress"?Nu(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Nu(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),JM=Ln(QM),eO=g({},Mu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hb=Ln(eO),tO=g({},vl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jh}),nO=Ln(tO),rO=g({},La,{propertyName:0,elapsedTime:0,pseudoElement:0}),iO=Ln(rO),aO=g({},Mu,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),sO=Ln(aO),oO=g({},La,{newState:0,oldState:0}),lO=Ln(oO),cO=[9,13,27,32],em=hi&&"CompositionEvent"in window,wl=null;hi&&"documentMode"in document&&(wl=document.documentMode);var uO=hi&&"TextEvent"in window&&!wl,mb=hi&&(!em||wl&&8<wl&&11>=wl),pb=" ",gb=!1;function yb(i,a){switch(i){case"keyup":return cO.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xb(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Vs=!1;function dO(i,a){switch(i){case"compositionend":return xb(a);case"keypress":return a.which!==32?null:(gb=!0,pb);case"textInput":return i=a.data,i===pb&&gb?null:i;default:return null}}function fO(i,a){if(Vs)return i==="compositionend"||!em&&yb(i,a)?(i=cb(),ju=Xh=Hi=null,Vs=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return mb&&a.locale!=="ko"?null:a.data;default:return null}}var hO={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function vb(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a==="input"?!!hO[i.type]:a==="textarea"}function bb(i,a,c,f){Is?Bs?Bs.push(f):Bs=[f]:Is=f,a=xd(a,"onChange"),0<a.length&&(c=new Ru("onChange","change",null,c,f),i.push({event:c,listeners:a}))}var Sl=null,kl=null;function mO(i){eS(i,0)}function Ou(i){var a=gl(i);if(tb(a))return i}function wb(i,a){if(i==="change")return a}var Sb=!1;if(hi){var tm;if(hi){var nm="oninput"in document;if(!nm){var kb=document.createElement("div");kb.setAttribute("oninput","return;"),nm=typeof kb.oninput=="function"}tm=nm}else tm=!1;Sb=tm&&(!document.documentMode||9<document.documentMode)}function Cb(){Sl&&(Sl.detachEvent("onpropertychange",Tb),kl=Sl=null)}function Tb(i){if(i.propertyName==="value"&&Ou(kl)){var a=[];bb(a,kl,i,Gh(i)),lb(mO,a)}}function pO(i,a,c){i==="focusin"?(Cb(),Sl=a,kl=c,Sl.attachEvent("onpropertychange",Tb)):i==="focusout"&&Cb()}function gO(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Ou(kl)}function yO(i,a){if(i==="click")return Ou(a)}function xO(i,a){if(i==="input"||i==="change")return Ou(a)}function vO(i,a){return i===a&&(i!==0||1/i===1/a)||i!==i&&a!==a}var Zn=typeof Object.is=="function"?Object.is:vO;function Cl(i,a){if(Zn(i,a))return!0;if(typeof i!="object"||i===null||typeof a!="object"||a===null)return!1;var c=Object.keys(i),f=Object.keys(a);if(c.length!==f.length)return!1;for(f=0;f<c.length;f++){var y=c[f];if(!Te.call(a,y)||!Zn(i[y],a[y]))return!1}return!0}function Eb(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function _b(i,a){var c=Eb(i);i=0;for(var f;c;){if(c.nodeType===3){if(f=i+c.textContent.length,i<=a&&f>=a)return{node:c,offset:a-i};i=f}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=Eb(c)}}function jb(i,a){return i&&a?i===a?!0:i&&i.nodeType===3?!1:a&&a.nodeType===3?jb(i,a.parentNode):"contains"in i?i.contains(a):i.compareDocumentPosition?!!(i.compareDocumentPosition(a)&16):!1:!1}function Nb(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var a=Eu(i.document);a instanceof i.HTMLIFrameElement;){try{var c=typeof a.contentWindow.location.href=="string"}catch{c=!1}if(c)i=a.contentWindow;else break;a=Eu(i.document)}return a}function rm(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a&&(a==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||a==="textarea"||i.contentEditable==="true")}var bO=hi&&"documentMode"in document&&11>=document.documentMode,Us=null,im=null,Tl=null,am=!1;function Ab(i,a,c){var f=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;am||Us==null||Us!==Eu(f)||(f=Us,"selectionStart"in f&&rm(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Tl&&Cl(Tl,f)||(Tl=f,f=xd(im,"onSelect"),0<f.length&&(a=new Ru("onSelect","select",null,a,c),i.push({event:a,listeners:f}),a.target=Us)))}function Ia(i,a){var c={};return c[i.toLowerCase()]=a.toLowerCase(),c["Webkit"+i]="webkit"+a,c["Moz"+i]="moz"+a,c}var Hs={animationend:Ia("Animation","AnimationEnd"),animationiteration:Ia("Animation","AnimationIteration"),animationstart:Ia("Animation","AnimationStart"),transitionrun:Ia("Transition","TransitionRun"),transitionstart:Ia("Transition","TransitionStart"),transitioncancel:Ia("Transition","TransitionCancel"),transitionend:Ia("Transition","TransitionEnd")},sm={},Rb={};hi&&(Rb=document.createElement("div").style,"AnimationEvent"in window||(delete Hs.animationend.animation,delete Hs.animationiteration.animation,delete Hs.animationstart.animation),"TransitionEvent"in window||delete Hs.transitionend.transition);function Ba(i){if(sm[i])return sm[i];if(!Hs[i])return i;var a=Hs[i],c;for(c in a)if(a.hasOwnProperty(c)&&c in Rb)return sm[i]=a[c];return i}var Mb=Ba("animationend"),Ob=Ba("animationiteration"),Db=Ba("animationstart"),wO=Ba("transitionrun"),SO=Ba("transitionstart"),kO=Ba("transitioncancel"),Pb=Ba("transitionend"),zb=new Map,om="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");om.push("scrollEnd");function Ar(i,a){zb.set(i,a),za(a,[i])}var Lb=new WeakMap;function fr(i,a){if(typeof i=="object"&&i!==null){var c=Lb.get(i);return c!==void 0?c:(a={value:i,source:a,stack:J0(a)},Lb.set(i,a),a)}return{value:i,source:a,stack:J0(a)}}var hr=[],Fs=0,lm=0;function Du(){for(var i=Fs,a=lm=Fs=0;a<i;){var c=hr[a];hr[a++]=null;var f=hr[a];hr[a++]=null;var y=hr[a];hr[a++]=null;var b=hr[a];if(hr[a++]=null,f!==null&&y!==null){var j=f.pending;j===null?y.next=y:(y.next=j.next,j.next=y),f.pending=y}b!==0&&Ib(c,y,b)}}function Pu(i,a,c,f){hr[Fs++]=i,hr[Fs++]=a,hr[Fs++]=c,hr[Fs++]=f,lm|=f,i.lanes|=f,i=i.alternate,i!==null&&(i.lanes|=f)}function cm(i,a,c,f){return Pu(i,a,c,f),zu(i)}function $s(i,a){return Pu(i,null,null,a),zu(i)}function Ib(i,a,c){i.lanes|=c;var f=i.alternate;f!==null&&(f.lanes|=c);for(var y=!1,b=i.return;b!==null;)b.childLanes|=c,f=b.alternate,f!==null&&(f.childLanes|=c),b.tag===22&&(i=b.stateNode,i===null||i._visibility&1||(y=!0)),i=b,b=b.return;return i.tag===3?(b=i.stateNode,y&&a!==null&&(y=31-De(c),i=b.hiddenUpdates,f=i[y],f===null?i[y]=[a]:f.push(a),a.lane=c|536870912),b):null}function zu(i){if(50<Kl)throw Kl=0,pp=null,Error(r(185));for(var a=i.return;a!==null;)i=a,a=i.return;return i.tag===3?i.stateNode:null}var qs={};function CO(i,a,c,f){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xn(i,a,c,f){return new CO(i,a,c,f)}function um(i){return i=i.prototype,!(!i||!i.isReactComponent)}function mi(i,a){var c=i.alternate;return c===null?(c=Xn(i.tag,a,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=a,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&65011712,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,a=i.dependencies,c.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c.refCleanup=i.refCleanup,c}function Bb(i,a){i.flags&=65011714;var c=i.alternate;return c===null?(i.childLanes=0,i.lanes=a,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=c.childLanes,i.lanes=c.lanes,i.child=c.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=c.memoizedProps,i.memoizedState=c.memoizedState,i.updateQueue=c.updateQueue,i.type=c.type,a=c.dependencies,i.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),i}function Lu(i,a,c,f,y,b){var j=0;if(f=i,typeof i=="function")um(i)&&(j=1);else if(typeof i=="string")j=ED(i,c,K.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case B:return i=Xn(31,c,a,y),i.elementType=B,i.lanes=b,i;case S:return Va(c.children,y,b,a);case k:j=8,y|=24;break;case E:return i=Xn(12,c,a,y|2),i.elementType=E,i.lanes=b,i;case M:return i=Xn(13,c,a,y),i.elementType=M,i.lanes=b,i;case _:return i=Xn(19,c,a,y),i.elementType=_,i.lanes=b,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:case O:j=10;break e;case A:j=9;break e;case R:j=11;break e;case D:j=14;break e;case P:j=16,f=null;break e}j=29,c=Error(r(130,i===null?"null":typeof i,"")),f=null}return a=Xn(j,c,a,y),a.elementType=i,a.type=f,a.lanes=b,a}function Va(i,a,c,f){return i=Xn(7,i,f,a),i.lanes=c,i}function dm(i,a,c){return i=Xn(6,i,null,a),i.lanes=c,i}function fm(i,a,c){return a=Xn(4,i.children!==null?i.children:[],i.key,a),a.lanes=c,a.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},a}var Gs=[],Ys=0,Iu=null,Bu=0,mr=[],pr=0,Ua=null,pi=1,gi="";function Ha(i,a){Gs[Ys++]=Bu,Gs[Ys++]=Iu,Iu=i,Bu=a}function Vb(i,a,c){mr[pr++]=pi,mr[pr++]=gi,mr[pr++]=Ua,Ua=i;var f=pi;i=gi;var y=32-De(f)-1;f&=~(1<<y),c+=1;var b=32-De(a)+y;if(30<b){var j=y-y%5;b=(f&(1<<j)-1).toString(32),f>>=j,y-=j,pi=1<<32-De(a)+y|c<<y|f,gi=b+i}else pi=1<<b|c<<y|f,gi=i}function hm(i){i.return!==null&&(Ha(i,1),Vb(i,1,0))}function mm(i){for(;i===Iu;)Iu=Gs[--Ys],Gs[Ys]=null,Bu=Gs[--Ys],Gs[Ys]=null;for(;i===Ua;)Ua=mr[--pr],mr[pr]=null,gi=mr[--pr],mr[pr]=null,pi=mr[--pr],mr[pr]=null}var An=null,Ot=null,ht=!1,Fa=null,$r=!1,pm=Error(r(519));function $a(i){var a=Error(r(418,""));throw jl(fr(a,i)),pm}function Ub(i){var a=i.stateNode,c=i.type,f=i.memoizedProps;switch(a[Ut]=i,a[Tt]=f,c){case"dialog":nt("cancel",a),nt("close",a);break;case"iframe":case"object":case"embed":nt("load",a);break;case"video":case"audio":for(c=0;c<Ql.length;c++)nt(Ql[c],a);break;case"source":nt("error",a);break;case"img":case"image":case"link":nt("error",a),nt("load",a);break;case"details":nt("toggle",a);break;case"input":nt("invalid",a),nb(a,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0),Tu(a);break;case"select":nt("invalid",a);break;case"textarea":nt("invalid",a),ib(a,f.value,f.defaultValue,f.children),Tu(a)}c=f.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||a.textContent===""+c||f.suppressHydrationWarning===!0||iS(a.textContent,c)?(f.popover!=null&&(nt("beforetoggle",a),nt("toggle",a)),f.onScroll!=null&&nt("scroll",a),f.onScrollEnd!=null&&nt("scrollend",a),f.onClick!=null&&(a.onclick=vd),a=!0):a=!1,a||$a(i)}function Hb(i){for(An=i.return;An;)switch(An.tag){case 5:case 13:$r=!1;return;case 27:case 3:$r=!0;return;default:An=An.return}}function El(i){if(i!==An)return!1;if(!ht)return Hb(i),ht=!0,!1;var a=i.tag,c;if((c=a!==3&&a!==27)&&((c=a===5)&&(c=i.type,c=!(c!=="form"&&c!=="button")||Rp(i.type,i.memoizedProps)),c=!c),c&&Ot&&$a(i),Hb(i),a===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));e:{for(i=i.nextSibling,a=0;i;){if(i.nodeType===8)if(c=i.data,c==="/$"){if(a===0){Ot=Mr(i.nextSibling);break e}a--}else c!=="$"&&c!=="$!"&&c!=="$?"||a++;i=i.nextSibling}Ot=null}}else a===27?(a=Ot,ia(i.type)?(i=Pp,Pp=null,Ot=i):Ot=a):Ot=An?Mr(i.stateNode.nextSibling):null;return!0}function _l(){Ot=An=null,ht=!1}function Fb(){var i=Fa;return i!==null&&(Vn===null?Vn=i:Vn.push.apply(Vn,i),Fa=null),i}function jl(i){Fa===null?Fa=[i]:Fa.push(i)}var gm=G(null),qa=null,yi=null;function Fi(i,a,c){N(gm,a._currentValue),a._currentValue=c}function xi(i){i._currentValue=gm.current,le(gm)}function ym(i,a,c){for(;i!==null;){var f=i.alternate;if((i.childLanes&a)!==a?(i.childLanes|=a,f!==null&&(f.childLanes|=a)):f!==null&&(f.childLanes&a)!==a&&(f.childLanes|=a),i===c)break;i=i.return}}function xm(i,a,c,f){var y=i.child;for(y!==null&&(y.return=i);y!==null;){var b=y.dependencies;if(b!==null){var j=y.child;b=b.firstContext;e:for(;b!==null;){var L=b;b=y;for(var U=0;U<a.length;U++)if(L.context===a[U]){b.lanes|=c,L=b.alternate,L!==null&&(L.lanes|=c),ym(b.return,c,i),f||(j=null);break e}b=L.next}}else if(y.tag===18){if(j=y.return,j===null)throw Error(r(341));j.lanes|=c,b=j.alternate,b!==null&&(b.lanes|=c),ym(j,c,i),j=null}else j=y.child;if(j!==null)j.return=y;else for(j=y;j!==null;){if(j===i){j=null;break}if(y=j.sibling,y!==null){y.return=j.return,j=y;break}j=j.return}y=j}}function Nl(i,a,c,f){i=null;for(var y=a,b=!1;y!==null;){if(!b){if((y.flags&524288)!==0)b=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var j=y.alternate;if(j===null)throw Error(r(387));if(j=j.memoizedProps,j!==null){var L=y.type;Zn(y.pendingProps.value,j.value)||(i!==null?i.push(L):i=[L])}}else if(y===Y.current){if(j=y.alternate,j===null)throw Error(r(387));j.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(i!==null?i.push(ic):i=[ic])}y=y.return}i!==null&&xm(a,i,c,f),a.flags|=262144}function Vu(i){for(i=i.firstContext;i!==null;){if(!Zn(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Ga(i){qa=i,yi=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Cn(i){return $b(qa,i)}function Uu(i,a){return qa===null&&Ga(i),$b(i,a)}function $b(i,a){var c=a._currentValue;if(a={context:a,memoizedValue:c,next:null},yi===null){if(i===null)throw Error(r(308));yi=a,i.dependencies={lanes:0,firstContext:a},i.flags|=524288}else yi=yi.next=a;return c}var TO=typeof AbortController<"u"?AbortController:function(){var i=[],a=this.signal={aborted:!1,addEventListener:function(c,f){i.push(f)}};this.abort=function(){a.aborted=!0,i.forEach(function(c){return c()})}},EO=e.unstable_scheduleCallback,_O=e.unstable_NormalPriority,tn={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vm(){return{controller:new TO,data:new Map,refCount:0}}function Al(i){i.refCount--,i.refCount===0&&EO(_O,function(){i.controller.abort()})}var Rl=null,bm=0,Zs=0,Xs=null;function jO(i,a){if(Rl===null){var c=Rl=[];bm=0,Zs=Sp(),Xs={status:"pending",value:void 0,then:function(f){c.push(f)}}}return bm++,a.then(qb,qb),a}function qb(){if(--bm===0&&Rl!==null){Xs!==null&&(Xs.status="fulfilled");var i=Rl;Rl=null,Zs=0,Xs=null;for(var a=0;a<i.length;a++)(0,i[a])()}}function NO(i,a){var c=[],f={status:"pending",value:null,reason:null,then:function(y){c.push(y)}};return i.then(function(){f.status="fulfilled",f.value=a;for(var y=0;y<c.length;y++)(0,c[y])(a)},function(y){for(f.status="rejected",f.reason=y,y=0;y<c.length;y++)(0,c[y])(void 0)}),f}var Gb=I.S;I.S=function(i,a){typeof a=="object"&&a!==null&&typeof a.then=="function"&&jO(i,a),Gb!==null&&Gb(i,a)};var Ya=G(null);function wm(){var i=Ya.current;return i!==null?i:Et.pooledCache}function Hu(i,a){a===null?N(Ya,Ya.current):N(Ya,a.pool)}function Yb(){var i=wm();return i===null?null:{parent:tn._currentValue,pool:i}}var Ml=Error(r(460)),Zb=Error(r(474)),Fu=Error(r(542)),Sm={then:function(){}};function Xb(i){return i=i.status,i==="fulfilled"||i==="rejected"}function $u(){}function Kb(i,a,c){switch(c=i[c],c===void 0?i.push(a):c!==a&&(a.then($u,$u),a=c),a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,Qb(i),i;default:if(typeof a.status=="string")a.then($u,$u);else{if(i=Et,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=a,i.status="pending",i.then(function(f){if(a.status==="pending"){var y=a;y.status="fulfilled",y.value=f}},function(f){if(a.status==="pending"){var y=a;y.status="rejected",y.reason=f}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,Qb(i),i}throw Ol=a,Ml}}var Ol=null;function Wb(){if(Ol===null)throw Error(r(459));var i=Ol;return Ol=null,i}function Qb(i){if(i===Ml||i===Fu)throw Error(r(483))}var $i=!1;function km(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Cm(i,a){i=i.updateQueue,a.updateQueue===i&&(a.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function qi(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Gi(i,a,c){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(mt&2)!==0){var y=f.pending;return y===null?a.next=a:(a.next=y.next,y.next=a),f.pending=a,a=zu(i),Ib(i,null,c),a}return Pu(i,f,a,c),zu(i)}function Dl(i,a,c){if(a=a.updateQueue,a!==null&&(a=a.shared,(c&4194048)!==0)){var f=a.lanes;f&=i.pendingLanes,c|=f,a.lanes=c,Bt(i,c)}}function Tm(i,a){var c=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,c===f)){var y=null,b=null;if(c=c.firstBaseUpdate,c!==null){do{var j={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};b===null?y=b=j:b=b.next=j,c=c.next}while(c!==null);b===null?y=b=a:b=b.next=a}else y=b=a;c={baseState:f.baseState,firstBaseUpdate:y,lastBaseUpdate:b,shared:f.shared,callbacks:f.callbacks},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=a:i.next=a,c.lastBaseUpdate=a}var Em=!1;function Pl(){if(Em){var i=Xs;if(i!==null)throw i}}function zl(i,a,c,f){Em=!1;var y=i.updateQueue;$i=!1;var b=y.firstBaseUpdate,j=y.lastBaseUpdate,L=y.shared.pending;if(L!==null){y.shared.pending=null;var U=L,ne=U.next;U.next=null,j===null?b=ne:j.next=ne,j=U;var de=i.alternate;de!==null&&(de=de.updateQueue,L=de.lastBaseUpdate,L!==j&&(L===null?de.firstBaseUpdate=ne:L.next=ne,de.lastBaseUpdate=U))}if(b!==null){var he=y.baseState;j=0,de=ne=U=null,L=b;do{var ae=L.lane&-536870913,se=ae!==L.lane;if(se?(ct&ae)===ae:(f&ae)===ae){ae!==0&&ae===Zs&&(Em=!0),de!==null&&(de=de.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});e:{var Ie=i,ze=L;ae=a;var bt=c;switch(ze.tag){case 1:if(Ie=ze.payload,typeof Ie=="function"){he=Ie.call(bt,he,ae);break e}he=Ie;break e;case 3:Ie.flags=Ie.flags&-65537|128;case 0:if(Ie=ze.payload,ae=typeof Ie=="function"?Ie.call(bt,he,ae):Ie,ae==null)break e;he=g({},he,ae);break e;case 2:$i=!0}}ae=L.callback,ae!==null&&(i.flags|=64,se&&(i.flags|=8192),se=y.callbacks,se===null?y.callbacks=[ae]:se.push(ae))}else se={lane:ae,tag:L.tag,payload:L.payload,callback:L.callback,next:null},de===null?(ne=de=se,U=he):de=de.next=se,j|=ae;if(L=L.next,L===null){if(L=y.shared.pending,L===null)break;se=L,L=se.next,se.next=null,y.lastBaseUpdate=se,y.shared.pending=null}}while(!0);de===null&&(U=he),y.baseState=U,y.firstBaseUpdate=ne,y.lastBaseUpdate=de,b===null&&(y.shared.lanes=0),ea|=j,i.lanes=j,i.memoizedState=he}}function Jb(i,a){if(typeof i!="function")throw Error(r(191,i));i.call(a)}function ew(i,a){var c=i.callbacks;if(c!==null)for(i.callbacks=null,i=0;i<c.length;i++)Jb(c[i],a)}var Ks=G(null),qu=G(0);function tw(i,a){i=Ti,N(qu,i),N(Ks,a),Ti=i|a.baseLanes}function _m(){N(qu,Ti),N(Ks,Ks.current)}function jm(){Ti=qu.current,le(Ks),le(qu)}var Yi=0,We=null,xt=null,Yt=null,Gu=!1,Ws=!1,Za=!1,Yu=0,Ll=0,Qs=null,AO=0;function Ht(){throw Error(r(321))}function Nm(i,a){if(a===null)return!1;for(var c=0;c<a.length&&c<i.length;c++)if(!Zn(i[c],a[c]))return!1;return!0}function Am(i,a,c,f,y,b){return Yi=b,We=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,I.H=i===null||i.memoizedState===null?Iw:Bw,Za=!1,b=c(f,y),Za=!1,Ws&&(b=rw(a,c,f,y)),nw(i),b}function nw(i){I.H=Ju;var a=xt!==null&&xt.next!==null;if(Yi=0,Yt=xt=We=null,Gu=!1,Ll=0,Qs=null,a)throw Error(r(300));i===null||ln||(i=i.dependencies,i!==null&&Vu(i)&&(ln=!0))}function rw(i,a,c,f){We=i;var y=0;do{if(Ws&&(Qs=null),Ll=0,Ws=!1,25<=y)throw Error(r(301));if(y+=1,Yt=xt=null,i.updateQueue!=null){var b=i.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}I.H=LO,b=a(c,f)}while(Ws);return b}function RO(){var i=I.H,a=i.useState()[0];return a=typeof a.then=="function"?Il(a):a,i=i.useState()[0],(xt!==null?xt.memoizedState:null)!==i&&(We.flags|=1024),a}function Rm(){var i=Yu!==0;return Yu=0,i}function Mm(i,a,c){a.updateQueue=i.updateQueue,a.flags&=-2053,i.lanes&=~c}function Om(i){if(Gu){for(i=i.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Gu=!1}Yi=0,Yt=xt=We=null,Ws=!1,Ll=Yu=0,Qs=null}function In(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Yt===null?We.memoizedState=Yt=i:Yt=Yt.next=i,Yt}function Zt(){if(xt===null){var i=We.alternate;i=i!==null?i.memoizedState:null}else i=xt.next;var a=Yt===null?We.memoizedState:Yt.next;if(a!==null)Yt=a,xt=i;else{if(i===null)throw We.alternate===null?Error(r(467)):Error(r(310));xt=i,i={memoizedState:xt.memoizedState,baseState:xt.baseState,baseQueue:xt.baseQueue,queue:xt.queue,next:null},Yt===null?We.memoizedState=Yt=i:Yt=Yt.next=i}return Yt}function Dm(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Il(i){var a=Ll;return Ll+=1,Qs===null&&(Qs=[]),i=Kb(Qs,i,a),a=We,(Yt===null?a.memoizedState:Yt.next)===null&&(a=a.alternate,I.H=a===null||a.memoizedState===null?Iw:Bw),i}function Zu(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Il(i);if(i.$$typeof===O)return Cn(i)}throw Error(r(438,String(i)))}function Pm(i){var a=null,c=We.updateQueue;if(c!==null&&(a=c.memoCache),a==null){var f=We.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(a={data:f.data.map(function(y){return y.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),c===null&&(c=Dm(),We.updateQueue=c),c.memoCache=a,c=a.data[a.index],c===void 0)for(c=a.data[a.index]=Array(i),f=0;f<i;f++)c[f]=z;return a.index++,c}function vi(i,a){return typeof a=="function"?a(i):a}function Xu(i){var a=Zt();return zm(a,xt,i)}function zm(i,a,c){var f=i.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=c;var y=i.baseQueue,b=f.pending;if(b!==null){if(y!==null){var j=y.next;y.next=b.next,b.next=j}a.baseQueue=y=b,f.pending=null}if(b=i.baseState,y===null)i.memoizedState=b;else{a=y.next;var L=j=null,U=null,ne=a,de=!1;do{var he=ne.lane&-536870913;if(he!==ne.lane?(ct&he)===he:(Yi&he)===he){var ae=ne.revertLane;if(ae===0)U!==null&&(U=U.next={lane:0,revertLane:0,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null}),he===Zs&&(de=!0);else if((Yi&ae)===ae){ne=ne.next,ae===Zs&&(de=!0);continue}else he={lane:0,revertLane:ne.revertLane,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},U===null?(L=U=he,j=b):U=U.next=he,We.lanes|=ae,ea|=ae;he=ne.action,Za&&c(b,he),b=ne.hasEagerState?ne.eagerState:c(b,he)}else ae={lane:he,revertLane:ne.revertLane,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},U===null?(L=U=ae,j=b):U=U.next=ae,We.lanes|=he,ea|=he;ne=ne.next}while(ne!==null&&ne!==a);if(U===null?j=b:U.next=L,!Zn(b,i.memoizedState)&&(ln=!0,de&&(c=Xs,c!==null)))throw c;i.memoizedState=b,i.baseState=j,i.baseQueue=U,f.lastRenderedState=b}return y===null&&(f.lanes=0),[i.memoizedState,f.dispatch]}function Lm(i){var a=Zt(),c=a.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=i;var f=c.dispatch,y=c.pending,b=a.memoizedState;if(y!==null){c.pending=null;var j=y=y.next;do b=i(b,j.action),j=j.next;while(j!==y);Zn(b,a.memoizedState)||(ln=!0),a.memoizedState=b,a.baseQueue===null&&(a.baseState=b),c.lastRenderedState=b}return[b,f]}function iw(i,a,c){var f=We,y=Zt(),b=ht;if(b){if(c===void 0)throw Error(r(407));c=c()}else c=a();var j=!Zn((xt||y).memoizedState,c);j&&(y.memoizedState=c,ln=!0),y=y.queue;var L=ow.bind(null,f,y,i);if(Bl(2048,8,L,[i]),y.getSnapshot!==a||j||Yt!==null&&Yt.memoizedState.tag&1){if(f.flags|=2048,Js(9,Ku(),sw.bind(null,f,y,c,a),null),Et===null)throw Error(r(349));b||(Yi&124)!==0||aw(f,a,c)}return c}function aw(i,a,c){i.flags|=16384,i={getSnapshot:a,value:c},a=We.updateQueue,a===null?(a=Dm(),We.updateQueue=a,a.stores=[i]):(c=a.stores,c===null?a.stores=[i]:c.push(i))}function sw(i,a,c,f){a.value=c,a.getSnapshot=f,lw(a)&&cw(i)}function ow(i,a,c){return c(function(){lw(a)&&cw(i)})}function lw(i){var a=i.getSnapshot;i=i.value;try{var c=a();return!Zn(i,c)}catch{return!0}}function cw(i){var a=$s(i,2);a!==null&&er(a,i,2)}function Im(i){var a=In();if(typeof i=="function"){var c=i;if(i=c(),Za){Oe(!0);try{c()}finally{Oe(!1)}}}return a.memoizedState=a.baseState=i,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:i},a}function uw(i,a,c,f){return i.baseState=c,zm(i,xt,typeof f=="function"?f:vi)}function MO(i,a,c,f,y){if(Qu(i))throw Error(r(485));if(i=a.action,i!==null){var b={payload:y,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(j){b.listeners.push(j)}};I.T!==null?c(!0):b.isTransition=!1,f(b),c=a.pending,c===null?(b.next=a.pending=b,dw(a,b)):(b.next=c.next,a.pending=c.next=b)}}function dw(i,a){var c=a.action,f=a.payload,y=i.state;if(a.isTransition){var b=I.T,j={};I.T=j;try{var L=c(y,f),U=I.S;U!==null&&U(j,L),fw(i,a,L)}catch(ne){Bm(i,a,ne)}finally{I.T=b}}else try{b=c(y,f),fw(i,a,b)}catch(ne){Bm(i,a,ne)}}function fw(i,a,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(f){hw(i,a,f)},function(f){return Bm(i,a,f)}):hw(i,a,c)}function hw(i,a,c){a.status="fulfilled",a.value=c,mw(a),i.state=c,a=i.pending,a!==null&&(c=a.next,c===a?i.pending=null:(c=c.next,a.next=c,dw(i,c)))}function Bm(i,a,c){var f=i.pending;if(i.pending=null,f!==null){f=f.next;do a.status="rejected",a.reason=c,mw(a),a=a.next;while(a!==f)}i.action=null}function mw(i){i=i.listeners;for(var a=0;a<i.length;a++)(0,i[a])()}function pw(i,a){return a}function gw(i,a){if(ht){var c=Et.formState;if(c!==null){e:{var f=We;if(ht){if(Ot){t:{for(var y=Ot,b=$r;y.nodeType!==8;){if(!b){y=null;break t}if(y=Mr(y.nextSibling),y===null){y=null;break t}}b=y.data,y=b==="F!"||b==="F"?y:null}if(y){Ot=Mr(y.nextSibling),f=y.data==="F!";break e}}$a(f)}f=!1}f&&(a=c[0])}}return c=In(),c.memoizedState=c.baseState=a,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pw,lastRenderedState:a},c.queue=f,c=Pw.bind(null,We,f),f.dispatch=c,f=Im(!1),b=$m.bind(null,We,!1,f.queue),f=In(),y={state:a,dispatch:null,action:i,pending:null},f.queue=y,c=MO.bind(null,We,y,b,c),y.dispatch=c,f.memoizedState=i,[a,c,!1]}function yw(i){var a=Zt();return xw(a,xt,i)}function xw(i,a,c){if(a=zm(i,a,pw)[0],i=Xu(vi)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var f=Il(a)}catch(j){throw j===Ml?Fu:j}else f=a;a=Zt();var y=a.queue,b=y.dispatch;return c!==a.memoizedState&&(We.flags|=2048,Js(9,Ku(),OO.bind(null,y,c),null)),[f,b,i]}function OO(i,a){i.action=a}function vw(i){var a=Zt(),c=xt;if(c!==null)return xw(a,c,i);Zt(),a=a.memoizedState,c=Zt();var f=c.queue.dispatch;return c.memoizedState=i,[a,f,!1]}function Js(i,a,c,f){return i={tag:i,create:c,deps:f,inst:a,next:null},a=We.updateQueue,a===null&&(a=Dm(),We.updateQueue=a),c=a.lastEffect,c===null?a.lastEffect=i.next=i:(f=c.next,c.next=i,i.next=f,a.lastEffect=i),i}function Ku(){return{destroy:void 0,resource:void 0}}function bw(){return Zt().memoizedState}function Wu(i,a,c,f){var y=In();f=f===void 0?null:f,We.flags|=i,y.memoizedState=Js(1|a,Ku(),c,f)}function Bl(i,a,c,f){var y=Zt();f=f===void 0?null:f;var b=y.memoizedState.inst;xt!==null&&f!==null&&Nm(f,xt.memoizedState.deps)?y.memoizedState=Js(a,b,c,f):(We.flags|=i,y.memoizedState=Js(1|a,b,c,f))}function ww(i,a){Wu(8390656,8,i,a)}function Sw(i,a){Bl(2048,8,i,a)}function kw(i,a){return Bl(4,2,i,a)}function Cw(i,a){return Bl(4,4,i,a)}function Tw(i,a){if(typeof a=="function"){i=i();var c=a(i);return function(){typeof c=="function"?c():a(null)}}if(a!=null)return i=i(),a.current=i,function(){a.current=null}}function Ew(i,a,c){c=c!=null?c.concat([i]):null,Bl(4,4,Tw.bind(null,a,i),c)}function Vm(){}function _w(i,a){var c=Zt();a=a===void 0?null:a;var f=c.memoizedState;return a!==null&&Nm(a,f[1])?f[0]:(c.memoizedState=[i,a],i)}function jw(i,a){var c=Zt();a=a===void 0?null:a;var f=c.memoizedState;if(a!==null&&Nm(a,f[1]))return f[0];if(f=i(),Za){Oe(!0);try{i()}finally{Oe(!1)}}return c.memoizedState=[f,a],f}function Um(i,a,c){return c===void 0||(Yi&1073741824)!==0?i.memoizedState=a:(i.memoizedState=c,i=R1(),We.lanes|=i,ea|=i,c)}function Nw(i,a,c,f){return Zn(c,a)?c:Ks.current!==null?(i=Um(i,c,f),Zn(i,a)||(ln=!0),i):(Yi&42)===0?(ln=!0,i.memoizedState=c):(i=R1(),We.lanes|=i,ea|=i,a)}function Aw(i,a,c,f,y){var b=F.p;F.p=b!==0&&8>b?b:8;var j=I.T,L={};I.T=L,$m(i,!1,a,c);try{var U=y(),ne=I.S;if(ne!==null&&ne(L,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var de=NO(U,f);Vl(i,a,de,Jn(i))}else Vl(i,a,f,Jn(i))}catch(he){Vl(i,a,{then:function(){},status:"rejected",reason:he},Jn())}finally{F.p=b,I.T=j}}function DO(){}function Hm(i,a,c,f){if(i.tag!==5)throw Error(r(476));var y=Rw(i).queue;Aw(i,y,a,V,c===null?DO:function(){return Mw(i),c(f)})}function Rw(i){var a=i.memoizedState;if(a!==null)return a;a={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:V},next:null};var c={};return a.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:c},next:null},i.memoizedState=a,i=i.alternate,i!==null&&(i.memoizedState=a),a}function Mw(i){var a=Rw(i).next.queue;Vl(i,a,{},Jn())}function Fm(){return Cn(ic)}function Ow(){return Zt().memoizedState}function Dw(){return Zt().memoizedState}function PO(i){for(var a=i.return;a!==null;){switch(a.tag){case 24:case 3:var c=Jn();i=qi(c);var f=Gi(a,i,c);f!==null&&(er(f,a,c),Dl(f,a,c)),a={cache:vm()},i.payload=a;return}a=a.return}}function zO(i,a,c){var f=Jn();c={lane:f,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null},Qu(i)?zw(a,c):(c=cm(i,a,c,f),c!==null&&(er(c,i,f),Lw(c,a,f)))}function Pw(i,a,c){var f=Jn();Vl(i,a,c,f)}function Vl(i,a,c,f){var y={lane:f,revertLane:0,action:c,hasEagerState:!1,eagerState:null,next:null};if(Qu(i))zw(a,y);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=a.lastRenderedReducer,b!==null))try{var j=a.lastRenderedState,L=b(j,c);if(y.hasEagerState=!0,y.eagerState=L,Zn(L,j))return Pu(i,a,y,0),Et===null&&Du(),!1}catch{}finally{}if(c=cm(i,a,y,f),c!==null)return er(c,i,f),Lw(c,a,f),!0}return!1}function $m(i,a,c,f){if(f={lane:2,revertLane:Sp(),action:f,hasEagerState:!1,eagerState:null,next:null},Qu(i)){if(a)throw Error(r(479))}else a=cm(i,c,f,2),a!==null&&er(a,i,2)}function Qu(i){var a=i.alternate;return i===We||a!==null&&a===We}function zw(i,a){Ws=Gu=!0;var c=i.pending;c===null?a.next=a:(a.next=c.next,c.next=a),i.pending=a}function Lw(i,a,c){if((c&4194048)!==0){var f=a.lanes;f&=i.pendingLanes,c|=f,a.lanes=c,Bt(i,c)}}var Ju={readContext:Cn,use:Zu,useCallback:Ht,useContext:Ht,useEffect:Ht,useImperativeHandle:Ht,useLayoutEffect:Ht,useInsertionEffect:Ht,useMemo:Ht,useReducer:Ht,useRef:Ht,useState:Ht,useDebugValue:Ht,useDeferredValue:Ht,useTransition:Ht,useSyncExternalStore:Ht,useId:Ht,useHostTransitionStatus:Ht,useFormState:Ht,useActionState:Ht,useOptimistic:Ht,useMemoCache:Ht,useCacheRefresh:Ht},Iw={readContext:Cn,use:Zu,useCallback:function(i,a){return In().memoizedState=[i,a===void 0?null:a],i},useContext:Cn,useEffect:ww,useImperativeHandle:function(i,a,c){c=c!=null?c.concat([i]):null,Wu(4194308,4,Tw.bind(null,a,i),c)},useLayoutEffect:function(i,a){return Wu(4194308,4,i,a)},useInsertionEffect:function(i,a){Wu(4,2,i,a)},useMemo:function(i,a){var c=In();a=a===void 0?null:a;var f=i();if(Za){Oe(!0);try{i()}finally{Oe(!1)}}return c.memoizedState=[f,a],f},useReducer:function(i,a,c){var f=In();if(c!==void 0){var y=c(a);if(Za){Oe(!0);try{c(a)}finally{Oe(!1)}}}else y=a;return f.memoizedState=f.baseState=y,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:y},f.queue=i,i=i.dispatch=zO.bind(null,We,i),[f.memoizedState,i]},useRef:function(i){var a=In();return i={current:i},a.memoizedState=i},useState:function(i){i=Im(i);var a=i.queue,c=Pw.bind(null,We,a);return a.dispatch=c,[i.memoizedState,c]},useDebugValue:Vm,useDeferredValue:function(i,a){var c=In();return Um(c,i,a)},useTransition:function(){var i=Im(!1);return i=Aw.bind(null,We,i.queue,!0,!1),In().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,a,c){var f=We,y=In();if(ht){if(c===void 0)throw Error(r(407));c=c()}else{if(c=a(),Et===null)throw Error(r(349));(ct&124)!==0||aw(f,a,c)}y.memoizedState=c;var b={value:c,getSnapshot:a};return y.queue=b,ww(ow.bind(null,f,b,i),[i]),f.flags|=2048,Js(9,Ku(),sw.bind(null,f,b,c,a),null),c},useId:function(){var i=In(),a=Et.identifierPrefix;if(ht){var c=gi,f=pi;c=(f&~(1<<32-De(f)-1)).toString(32)+c,a="«"+a+"R"+c,c=Yu++,0<c&&(a+="H"+c.toString(32)),a+="»"}else c=AO++,a="«"+a+"r"+c.toString(32)+"»";return i.memoizedState=a},useHostTransitionStatus:Fm,useFormState:gw,useActionState:gw,useOptimistic:function(i){var a=In();a.memoizedState=a.baseState=i;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=c,a=$m.bind(null,We,!0,c),c.dispatch=a,[i,a]},useMemoCache:Pm,useCacheRefresh:function(){return In().memoizedState=PO.bind(null,We)}},Bw={readContext:Cn,use:Zu,useCallback:_w,useContext:Cn,useEffect:Sw,useImperativeHandle:Ew,useInsertionEffect:kw,useLayoutEffect:Cw,useMemo:jw,useReducer:Xu,useRef:bw,useState:function(){return Xu(vi)},useDebugValue:Vm,useDeferredValue:function(i,a){var c=Zt();return Nw(c,xt.memoizedState,i,a)},useTransition:function(){var i=Xu(vi)[0],a=Zt().memoizedState;return[typeof i=="boolean"?i:Il(i),a]},useSyncExternalStore:iw,useId:Ow,useHostTransitionStatus:Fm,useFormState:yw,useActionState:yw,useOptimistic:function(i,a){var c=Zt();return uw(c,xt,i,a)},useMemoCache:Pm,useCacheRefresh:Dw},LO={readContext:Cn,use:Zu,useCallback:_w,useContext:Cn,useEffect:Sw,useImperativeHandle:Ew,useInsertionEffect:kw,useLayoutEffect:Cw,useMemo:jw,useReducer:Lm,useRef:bw,useState:function(){return Lm(vi)},useDebugValue:Vm,useDeferredValue:function(i,a){var c=Zt();return xt===null?Um(c,i,a):Nw(c,xt.memoizedState,i,a)},useTransition:function(){var i=Lm(vi)[0],a=Zt().memoizedState;return[typeof i=="boolean"?i:Il(i),a]},useSyncExternalStore:iw,useId:Ow,useHostTransitionStatus:Fm,useFormState:vw,useActionState:vw,useOptimistic:function(i,a){var c=Zt();return xt!==null?uw(c,xt,i,a):(c.baseState=i,[i,c.queue.dispatch])},useMemoCache:Pm,useCacheRefresh:Dw},eo=null,Ul=0;function ed(i){var a=Ul;return Ul+=1,eo===null&&(eo=[]),Kb(eo,i,a)}function Hl(i,a){a=a.props.ref,i.ref=a!==void 0?a:null}function td(i,a){throw a.$$typeof===p?Error(r(525)):(i=Object.prototype.toString.call(a),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":i)))}function Vw(i){var a=i._init;return a(i._payload)}function Uw(i){function a(W,q){if(i){var J=W.deletions;J===null?(W.deletions=[q],W.flags|=16):J.push(q)}}function c(W,q){if(!i)return null;for(;q!==null;)a(W,q),q=q.sibling;return null}function f(W){for(var q=new Map;W!==null;)W.key!==null?q.set(W.key,W):q.set(W.index,W),W=W.sibling;return q}function y(W,q){return W=mi(W,q),W.index=0,W.sibling=null,W}function b(W,q,J){return W.index=J,i?(J=W.alternate,J!==null?(J=J.index,J<q?(W.flags|=67108866,q):J):(W.flags|=67108866,q)):(W.flags|=1048576,q)}function j(W){return i&&W.alternate===null&&(W.flags|=67108866),W}function L(W,q,J,fe){return q===null||q.tag!==6?(q=dm(J,W.mode,fe),q.return=W,q):(q=y(q,J),q.return=W,q)}function U(W,q,J,fe){var Ee=J.type;return Ee===S?de(W,q,J.props.children,fe,J.key):q!==null&&(q.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===P&&Vw(Ee)===q.type)?(q=y(q,J.props),Hl(q,J),q.return=W,q):(q=Lu(J.type,J.key,J.props,null,W.mode,fe),Hl(q,J),q.return=W,q)}function ne(W,q,J,fe){return q===null||q.tag!==4||q.stateNode.containerInfo!==J.containerInfo||q.stateNode.implementation!==J.implementation?(q=fm(J,W.mode,fe),q.return=W,q):(q=y(q,J.children||[]),q.return=W,q)}function de(W,q,J,fe,Ee){return q===null||q.tag!==7?(q=Va(J,W.mode,fe,Ee),q.return=W,q):(q=y(q,J),q.return=W,q)}function he(W,q,J){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=dm(""+q,W.mode,J),q.return=W,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case x:return J=Lu(q.type,q.key,q.props,null,W.mode,J),Hl(J,q),J.return=W,J;case v:return q=fm(q,W.mode,J),q.return=W,q;case P:var fe=q._init;return q=fe(q._payload),he(W,q,J)}if(ie(q)||$(q))return q=Va(q,W.mode,J,null),q.return=W,q;if(typeof q.then=="function")return he(W,ed(q),J);if(q.$$typeof===O)return he(W,Uu(W,q),J);td(W,q)}return null}function ae(W,q,J,fe){var Ee=q!==null?q.key:null;if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return Ee!==null?null:L(W,q,""+J,fe);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case x:return J.key===Ee?U(W,q,J,fe):null;case v:return J.key===Ee?ne(W,q,J,fe):null;case P:return Ee=J._init,J=Ee(J._payload),ae(W,q,J,fe)}if(ie(J)||$(J))return Ee!==null?null:de(W,q,J,fe,null);if(typeof J.then=="function")return ae(W,q,ed(J),fe);if(J.$$typeof===O)return ae(W,q,Uu(W,J),fe);td(W,J)}return null}function se(W,q,J,fe,Ee){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return W=W.get(J)||null,L(q,W,""+fe,Ee);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case x:return W=W.get(fe.key===null?J:fe.key)||null,U(q,W,fe,Ee);case v:return W=W.get(fe.key===null?J:fe.key)||null,ne(q,W,fe,Ee);case P:var et=fe._init;return fe=et(fe._payload),se(W,q,J,fe,Ee)}if(ie(fe)||$(fe))return W=W.get(J)||null,de(q,W,fe,Ee,null);if(typeof fe.then=="function")return se(W,q,J,ed(fe),Ee);if(fe.$$typeof===O)return se(W,q,J,Uu(q,fe),Ee);td(q,fe)}return null}function Ie(W,q,J,fe){for(var Ee=null,et=null,Re=q,Le=q=0,un=null;Re!==null&&Le<J.length;Le++){Re.index>Le?(un=Re,Re=null):un=Re.sibling;var ft=ae(W,Re,J[Le],fe);if(ft===null){Re===null&&(Re=un);break}i&&Re&&ft.alternate===null&&a(W,Re),q=b(ft,q,Le),et===null?Ee=ft:et.sibling=ft,et=ft,Re=un}if(Le===J.length)return c(W,Re),ht&&Ha(W,Le),Ee;if(Re===null){for(;Le<J.length;Le++)Re=he(W,J[Le],fe),Re!==null&&(q=b(Re,q,Le),et===null?Ee=Re:et.sibling=Re,et=Re);return ht&&Ha(W,Le),Ee}for(Re=f(Re);Le<J.length;Le++)un=se(Re,W,Le,J[Le],fe),un!==null&&(i&&un.alternate!==null&&Re.delete(un.key===null?Le:un.key),q=b(un,q,Le),et===null?Ee=un:et.sibling=un,et=un);return i&&Re.forEach(function(ca){return a(W,ca)}),ht&&Ha(W,Le),Ee}function ze(W,q,J,fe){if(J==null)throw Error(r(151));for(var Ee=null,et=null,Re=q,Le=q=0,un=null,ft=J.next();Re!==null&&!ft.done;Le++,ft=J.next()){Re.index>Le?(un=Re,Re=null):un=Re.sibling;var ca=ae(W,Re,ft.value,fe);if(ca===null){Re===null&&(Re=un);break}i&&Re&&ca.alternate===null&&a(W,Re),q=b(ca,q,Le),et===null?Ee=ca:et.sibling=ca,et=ca,Re=un}if(ft.done)return c(W,Re),ht&&Ha(W,Le),Ee;if(Re===null){for(;!ft.done;Le++,ft=J.next())ft=he(W,ft.value,fe),ft!==null&&(q=b(ft,q,Le),et===null?Ee=ft:et.sibling=ft,et=ft);return ht&&Ha(W,Le),Ee}for(Re=f(Re);!ft.done;Le++,ft=J.next())ft=se(Re,W,Le,ft.value,fe),ft!==null&&(i&&ft.alternate!==null&&Re.delete(ft.key===null?Le:ft.key),q=b(ft,q,Le),et===null?Ee=ft:et.sibling=ft,et=ft);return i&&Re.forEach(function(ID){return a(W,ID)}),ht&&Ha(W,Le),Ee}function bt(W,q,J,fe){if(typeof J=="object"&&J!==null&&J.type===S&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case x:e:{for(var Ee=J.key;q!==null;){if(q.key===Ee){if(Ee=J.type,Ee===S){if(q.tag===7){c(W,q.sibling),fe=y(q,J.props.children),fe.return=W,W=fe;break e}}else if(q.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===P&&Vw(Ee)===q.type){c(W,q.sibling),fe=y(q,J.props),Hl(fe,J),fe.return=W,W=fe;break e}c(W,q);break}else a(W,q);q=q.sibling}J.type===S?(fe=Va(J.props.children,W.mode,fe,J.key),fe.return=W,W=fe):(fe=Lu(J.type,J.key,J.props,null,W.mode,fe),Hl(fe,J),fe.return=W,W=fe)}return j(W);case v:e:{for(Ee=J.key;q!==null;){if(q.key===Ee)if(q.tag===4&&q.stateNode.containerInfo===J.containerInfo&&q.stateNode.implementation===J.implementation){c(W,q.sibling),fe=y(q,J.children||[]),fe.return=W,W=fe;break e}else{c(W,q);break}else a(W,q);q=q.sibling}fe=fm(J,W.mode,fe),fe.return=W,W=fe}return j(W);case P:return Ee=J._init,J=Ee(J._payload),bt(W,q,J,fe)}if(ie(J))return Ie(W,q,J,fe);if($(J)){if(Ee=$(J),typeof Ee!="function")throw Error(r(150));return J=Ee.call(J),ze(W,q,J,fe)}if(typeof J.then=="function")return bt(W,q,ed(J),fe);if(J.$$typeof===O)return bt(W,q,Uu(W,J),fe);td(W,J)}return typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint"?(J=""+J,q!==null&&q.tag===6?(c(W,q.sibling),fe=y(q,J),fe.return=W,W=fe):(c(W,q),fe=dm(J,W.mode,fe),fe.return=W,W=fe),j(W)):c(W,q)}return function(W,q,J,fe){try{Ul=0;var Ee=bt(W,q,J,fe);return eo=null,Ee}catch(Re){if(Re===Ml||Re===Fu)throw Re;var et=Xn(29,Re,null,W.mode);return et.lanes=fe,et.return=W,et}finally{}}}var to=Uw(!0),Hw=Uw(!1),gr=G(null),qr=null;function Zi(i){var a=i.alternate;N(nn,nn.current&1),N(gr,i),qr===null&&(a===null||Ks.current!==null||a.memoizedState!==null)&&(qr=i)}function Fw(i){if(i.tag===22){if(N(nn,nn.current),N(gr,i),qr===null){var a=i.alternate;a!==null&&a.memoizedState!==null&&(qr=i)}}else Xi()}function Xi(){N(nn,nn.current),N(gr,gr.current)}function bi(i){le(gr),qr===i&&(qr=null),le(nn)}var nn=G(0);function nd(i){for(var a=i;a!==null;){if(a.tag===13){var c=a.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||Dp(c)))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}function qm(i,a,c,f){a=i.memoizedState,c=c(f,a),c=c==null?a:g({},a,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var Gm={enqueueSetState:function(i,a,c){i=i._reactInternals;var f=Jn(),y=qi(f);y.payload=a,c!=null&&(y.callback=c),a=Gi(i,y,f),a!==null&&(er(a,i,f),Dl(a,i,f))},enqueueReplaceState:function(i,a,c){i=i._reactInternals;var f=Jn(),y=qi(f);y.tag=1,y.payload=a,c!=null&&(y.callback=c),a=Gi(i,y,f),a!==null&&(er(a,i,f),Dl(a,i,f))},enqueueForceUpdate:function(i,a){i=i._reactInternals;var c=Jn(),f=qi(c);f.tag=2,a!=null&&(f.callback=a),a=Gi(i,f,c),a!==null&&(er(a,i,c),Dl(a,i,c))}};function $w(i,a,c,f,y,b,j){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,b,j):a.prototype&&a.prototype.isPureReactComponent?!Cl(c,f)||!Cl(y,b):!0}function qw(i,a,c,f){i=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(c,f),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(c,f),a.state!==i&&Gm.enqueueReplaceState(a,a.state,null)}function Xa(i,a){var c=a;if("ref"in a){c={};for(var f in a)f!=="ref"&&(c[f]=a[f])}if(i=i.defaultProps){c===a&&(c=g({},c));for(var y in i)c[y]===void 0&&(c[y]=i[y])}return c}var rd=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)};function Gw(i){rd(i)}function Yw(i){console.error(i)}function Zw(i){rd(i)}function id(i,a){try{var c=i.onUncaughtError;c(a.value,{componentStack:a.stack})}catch(f){setTimeout(function(){throw f})}}function Xw(i,a,c){try{var f=i.onCaughtError;f(c.value,{componentStack:c.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function Ym(i,a,c){return c=qi(c),c.tag=3,c.payload={element:null},c.callback=function(){id(i,a)},c}function Kw(i){return i=qi(i),i.tag=3,i}function Ww(i,a,c,f){var y=c.type.getDerivedStateFromError;if(typeof y=="function"){var b=f.value;i.payload=function(){return y(b)},i.callback=function(){Xw(a,c,f)}}var j=c.stateNode;j!==null&&typeof j.componentDidCatch=="function"&&(i.callback=function(){Xw(a,c,f),typeof y!="function"&&(ta===null?ta=new Set([this]):ta.add(this));var L=f.stack;this.componentDidCatch(f.value,{componentStack:L!==null?L:""})})}function IO(i,a,c,f,y){if(c.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(a=c.alternate,a!==null&&Nl(a,c,y,!0),c=gr.current,c!==null){switch(c.tag){case 13:return qr===null?yp():c.alternate===null&&Dt===0&&(Dt=3),c.flags&=-257,c.flags|=65536,c.lanes=y,f===Sm?c.flags|=16384:(a=c.updateQueue,a===null?c.updateQueue=new Set([f]):a.add(f),vp(i,f,y)),!1;case 22:return c.flags|=65536,f===Sm?c.flags|=16384:(a=c.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([f])},c.updateQueue=a):(c=a.retryQueue,c===null?a.retryQueue=new Set([f]):c.add(f)),vp(i,f,y)),!1}throw Error(r(435,c.tag))}return vp(i,f,y),yp(),!1}if(ht)return a=gr.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=y,f!==pm&&(i=Error(r(422),{cause:f}),jl(fr(i,c)))):(f!==pm&&(a=Error(r(423),{cause:f}),jl(fr(a,c))),i=i.current.alternate,i.flags|=65536,y&=-y,i.lanes|=y,f=fr(f,c),y=Ym(i.stateNode,f,y),Tm(i,y),Dt!==4&&(Dt=2)),!1;var b=Error(r(520),{cause:f});if(b=fr(b,c),Xl===null?Xl=[b]:Xl.push(b),Dt!==4&&(Dt=2),a===null)return!0;f=fr(f,c),c=a;do{switch(c.tag){case 3:return c.flags|=65536,i=y&-y,c.lanes|=i,i=Ym(c.stateNode,f,i),Tm(c,i),!1;case 1:if(a=c.type,b=c.stateNode,(c.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(ta===null||!ta.has(b))))return c.flags|=65536,y&=-y,c.lanes|=y,y=Kw(y),Ww(y,i,c,f),Tm(c,y),!1}c=c.return}while(c!==null);return!1}var Qw=Error(r(461)),ln=!1;function hn(i,a,c,f){a.child=i===null?Hw(a,null,c,f):to(a,i.child,c,f)}function Jw(i,a,c,f,y){c=c.render;var b=a.ref;if("ref"in f){var j={};for(var L in f)L!=="ref"&&(j[L]=f[L])}else j=f;return Ga(a),f=Am(i,a,c,j,b,y),L=Rm(),i!==null&&!ln?(Mm(i,a,y),wi(i,a,y)):(ht&&L&&hm(a),a.flags|=1,hn(i,a,f,y),a.child)}function e1(i,a,c,f,y){if(i===null){var b=c.type;return typeof b=="function"&&!um(b)&&b.defaultProps===void 0&&c.compare===null?(a.tag=15,a.type=b,t1(i,a,b,f,y)):(i=Lu(c.type,null,f,a,a.mode,y),i.ref=a.ref,i.return=a,a.child=i)}if(b=i.child,!tp(i,y)){var j=b.memoizedProps;if(c=c.compare,c=c!==null?c:Cl,c(j,f)&&i.ref===a.ref)return wi(i,a,y)}return a.flags|=1,i=mi(b,f),i.ref=a.ref,i.return=a,a.child=i}function t1(i,a,c,f,y){if(i!==null){var b=i.memoizedProps;if(Cl(b,f)&&i.ref===a.ref)if(ln=!1,a.pendingProps=f=b,tp(i,y))(i.flags&131072)!==0&&(ln=!0);else return a.lanes=i.lanes,wi(i,a,y)}return Zm(i,a,c,f,y)}function n1(i,a,c){var f=a.pendingProps,y=f.children,b=i!==null?i.memoizedState:null;if(f.mode==="hidden"){if((a.flags&128)!==0){if(f=b!==null?b.baseLanes|c:c,i!==null){for(y=a.child=i.child,b=0;y!==null;)b=b|y.lanes|y.childLanes,y=y.sibling;a.childLanes=b&~f}else a.childLanes=0,a.child=null;return r1(i,a,f,c)}if((c&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},i!==null&&Hu(a,b!==null?b.cachePool:null),b!==null?tw(a,b):_m(),Fw(a);else return a.lanes=a.childLanes=536870912,r1(i,a,b!==null?b.baseLanes|c:c,c)}else b!==null?(Hu(a,b.cachePool),tw(a,b),Xi(),a.memoizedState=null):(i!==null&&Hu(a,null),_m(),Xi());return hn(i,a,y,c),a.child}function r1(i,a,c,f){var y=wm();return y=y===null?null:{parent:tn._currentValue,pool:y},a.memoizedState={baseLanes:c,cachePool:y},i!==null&&Hu(a,null),_m(),Fw(a),i!==null&&Nl(i,a,f,!0),null}function ad(i,a){var c=a.ref;if(c===null)i!==null&&i.ref!==null&&(a.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(i===null||i.ref!==c)&&(a.flags|=4194816)}}function Zm(i,a,c,f,y){return Ga(a),c=Am(i,a,c,f,void 0,y),f=Rm(),i!==null&&!ln?(Mm(i,a,y),wi(i,a,y)):(ht&&f&&hm(a),a.flags|=1,hn(i,a,c,y),a.child)}function i1(i,a,c,f,y,b){return Ga(a),a.updateQueue=null,c=rw(a,f,c,y),nw(i),f=Rm(),i!==null&&!ln?(Mm(i,a,b),wi(i,a,b)):(ht&&f&&hm(a),a.flags|=1,hn(i,a,c,b),a.child)}function a1(i,a,c,f,y){if(Ga(a),a.stateNode===null){var b=qs,j=c.contextType;typeof j=="object"&&j!==null&&(b=Cn(j)),b=new c(f,b),a.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Gm,a.stateNode=b,b._reactInternals=a,b=a.stateNode,b.props=f,b.state=a.memoizedState,b.refs={},km(a),j=c.contextType,b.context=typeof j=="object"&&j!==null?Cn(j):qs,b.state=a.memoizedState,j=c.getDerivedStateFromProps,typeof j=="function"&&(qm(a,c,j,f),b.state=a.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(j=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),j!==b.state&&Gm.enqueueReplaceState(b,b.state,null),zl(a,f,b,y),Pl(),b.state=a.memoizedState),typeof b.componentDidMount=="function"&&(a.flags|=4194308),f=!0}else if(i===null){b=a.stateNode;var L=a.memoizedProps,U=Xa(c,L);b.props=U;var ne=b.context,de=c.contextType;j=qs,typeof de=="object"&&de!==null&&(j=Cn(de));var he=c.getDerivedStateFromProps;de=typeof he=="function"||typeof b.getSnapshotBeforeUpdate=="function",L=a.pendingProps!==L,de||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(L||ne!==j)&&qw(a,b,f,j),$i=!1;var ae=a.memoizedState;b.state=ae,zl(a,f,b,y),Pl(),ne=a.memoizedState,L||ae!==ne||$i?(typeof he=="function"&&(qm(a,c,he,f),ne=a.memoizedState),(U=$i||$w(a,c,U,f,ae,ne,j))?(de||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(a.flags|=4194308)):(typeof b.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=f,a.memoizedState=ne),b.props=f,b.state=ne,b.context=j,f=U):(typeof b.componentDidMount=="function"&&(a.flags|=4194308),f=!1)}else{b=a.stateNode,Cm(i,a),j=a.memoizedProps,de=Xa(c,j),b.props=de,he=a.pendingProps,ae=b.context,ne=c.contextType,U=qs,typeof ne=="object"&&ne!==null&&(U=Cn(ne)),L=c.getDerivedStateFromProps,(ne=typeof L=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(j!==he||ae!==U)&&qw(a,b,f,U),$i=!1,ae=a.memoizedState,b.state=ae,zl(a,f,b,y),Pl();var se=a.memoizedState;j!==he||ae!==se||$i||i!==null&&i.dependencies!==null&&Vu(i.dependencies)?(typeof L=="function"&&(qm(a,c,L,f),se=a.memoizedState),(de=$i||$w(a,c,de,f,ae,se,U)||i!==null&&i.dependencies!==null&&Vu(i.dependencies))?(ne||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(f,se,U),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(f,se,U)),typeof b.componentDidUpdate=="function"&&(a.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof b.componentDidUpdate!="function"||j===i.memoizedProps&&ae===i.memoizedState||(a.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||j===i.memoizedProps&&ae===i.memoizedState||(a.flags|=1024),a.memoizedProps=f,a.memoizedState=se),b.props=f,b.state=se,b.context=U,f=de):(typeof b.componentDidUpdate!="function"||j===i.memoizedProps&&ae===i.memoizedState||(a.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||j===i.memoizedProps&&ae===i.memoizedState||(a.flags|=1024),f=!1)}return b=f,ad(i,a),f=(a.flags&128)!==0,b||f?(b=a.stateNode,c=f&&typeof c.getDerivedStateFromError!="function"?null:b.render(),a.flags|=1,i!==null&&f?(a.child=to(a,i.child,null,y),a.child=to(a,null,c,y)):hn(i,a,c,y),a.memoizedState=b.state,i=a.child):i=wi(i,a,y),i}function s1(i,a,c,f){return _l(),a.flags|=256,hn(i,a,c,f),a.child}var Xm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Km(i){return{baseLanes:i,cachePool:Yb()}}function Wm(i,a,c){return i=i!==null?i.childLanes&~c:0,a&&(i|=yr),i}function o1(i,a,c){var f=a.pendingProps,y=!1,b=(a.flags&128)!==0,j;if((j=b)||(j=i!==null&&i.memoizedState===null?!1:(nn.current&2)!==0),j&&(y=!0,a.flags&=-129),j=(a.flags&32)!==0,a.flags&=-33,i===null){if(ht){if(y?Zi(a):Xi(),ht){var L=Ot,U;if(U=L){e:{for(U=L,L=$r;U.nodeType!==8;){if(!L){L=null;break e}if(U=Mr(U.nextSibling),U===null){L=null;break e}}L=U}L!==null?(a.memoizedState={dehydrated:L,treeContext:Ua!==null?{id:pi,overflow:gi}:null,retryLane:536870912,hydrationErrors:null},U=Xn(18,null,null,0),U.stateNode=L,U.return=a,a.child=U,An=a,Ot=null,U=!0):U=!1}U||$a(a)}if(L=a.memoizedState,L!==null&&(L=L.dehydrated,L!==null))return Dp(L)?a.lanes=32:a.lanes=536870912,null;bi(a)}return L=f.children,f=f.fallback,y?(Xi(),y=a.mode,L=sd({mode:"hidden",children:L},y),f=Va(f,y,c,null),L.return=a,f.return=a,L.sibling=f,a.child=L,y=a.child,y.memoizedState=Km(c),y.childLanes=Wm(i,j,c),a.memoizedState=Xm,f):(Zi(a),Qm(a,L))}if(U=i.memoizedState,U!==null&&(L=U.dehydrated,L!==null)){if(b)a.flags&256?(Zi(a),a.flags&=-257,a=Jm(i,a,c)):a.memoizedState!==null?(Xi(),a.child=i.child,a.flags|=128,a=null):(Xi(),y=f.fallback,L=a.mode,f=sd({mode:"visible",children:f.children},L),y=Va(y,L,c,null),y.flags|=2,f.return=a,y.return=a,f.sibling=y,a.child=f,to(a,i.child,null,c),f=a.child,f.memoizedState=Km(c),f.childLanes=Wm(i,j,c),a.memoizedState=Xm,a=y);else if(Zi(a),Dp(L)){if(j=L.nextSibling&&L.nextSibling.dataset,j)var ne=j.dgst;j=ne,f=Error(r(419)),f.stack="",f.digest=j,jl({value:f,source:null,stack:null}),a=Jm(i,a,c)}else if(ln||Nl(i,a,c,!1),j=(c&i.childLanes)!==0,ln||j){if(j=Et,j!==null&&(f=c&-c,f=(f&42)!==0?1:Gt(f),f=(f&(j.suspendedLanes|c))!==0?0:f,f!==0&&f!==U.retryLane))throw U.retryLane=f,$s(i,f),er(j,i,f),Qw;L.data==="$?"||yp(),a=Jm(i,a,c)}else L.data==="$?"?(a.flags|=192,a.child=i.child,a=null):(i=U.treeContext,Ot=Mr(L.nextSibling),An=a,ht=!0,Fa=null,$r=!1,i!==null&&(mr[pr++]=pi,mr[pr++]=gi,mr[pr++]=Ua,pi=i.id,gi=i.overflow,Ua=a),a=Qm(a,f.children),a.flags|=4096);return a}return y?(Xi(),y=f.fallback,L=a.mode,U=i.child,ne=U.sibling,f=mi(U,{mode:"hidden",children:f.children}),f.subtreeFlags=U.subtreeFlags&65011712,ne!==null?y=mi(ne,y):(y=Va(y,L,c,null),y.flags|=2),y.return=a,f.return=a,f.sibling=y,a.child=f,f=y,y=a.child,L=i.child.memoizedState,L===null?L=Km(c):(U=L.cachePool,U!==null?(ne=tn._currentValue,U=U.parent!==ne?{parent:ne,pool:ne}:U):U=Yb(),L={baseLanes:L.baseLanes|c,cachePool:U}),y.memoizedState=L,y.childLanes=Wm(i,j,c),a.memoizedState=Xm,f):(Zi(a),c=i.child,i=c.sibling,c=mi(c,{mode:"visible",children:f.children}),c.return=a,c.sibling=null,i!==null&&(j=a.deletions,j===null?(a.deletions=[i],a.flags|=16):j.push(i)),a.child=c,a.memoizedState=null,c)}function Qm(i,a){return a=sd({mode:"visible",children:a},i.mode),a.return=i,i.child=a}function sd(i,a){return i=Xn(22,i,null,a),i.lanes=0,i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},i}function Jm(i,a,c){return to(a,i.child,null,c),i=Qm(a,a.pendingProps.children),i.flags|=2,a.memoizedState=null,i}function l1(i,a,c){i.lanes|=a;var f=i.alternate;f!==null&&(f.lanes|=a),ym(i.return,a,c)}function ep(i,a,c,f,y){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:f,tail:c,tailMode:y}:(b.isBackwards=a,b.rendering=null,b.renderingStartTime=0,b.last=f,b.tail=c,b.tailMode=y)}function c1(i,a,c){var f=a.pendingProps,y=f.revealOrder,b=f.tail;if(hn(i,a,f.children,c),f=nn.current,(f&2)!==0)f=f&1|2,a.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=a.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&l1(i,c,a);else if(i.tag===19)l1(i,c,a);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===a)break e;for(;i.sibling===null;){if(i.return===null||i.return===a)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}f&=1}switch(N(nn,f),y){case"forwards":for(c=a.child,y=null;c!==null;)i=c.alternate,i!==null&&nd(i)===null&&(y=c),c=c.sibling;c=y,c===null?(y=a.child,a.child=null):(y=c.sibling,c.sibling=null),ep(a,!1,y,c,b);break;case"backwards":for(c=null,y=a.child,a.child=null;y!==null;){if(i=y.alternate,i!==null&&nd(i)===null){a.child=y;break}i=y.sibling,y.sibling=c,c=y,y=i}ep(a,!0,c,null,b);break;case"together":ep(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function wi(i,a,c){if(i!==null&&(a.dependencies=i.dependencies),ea|=a.lanes,(c&a.childLanes)===0)if(i!==null){if(Nl(i,a,c,!1),(c&a.childLanes)===0)return null}else return null;if(i!==null&&a.child!==i.child)throw Error(r(153));if(a.child!==null){for(i=a.child,c=mi(i,i.pendingProps),a.child=c,c.return=a;i.sibling!==null;)i=i.sibling,c=c.sibling=mi(i,i.pendingProps),c.return=a;c.sibling=null}return a.child}function tp(i,a){return(i.lanes&a)!==0?!0:(i=i.dependencies,!!(i!==null&&Vu(i)))}function BO(i,a,c){switch(a.tag){case 3:oe(a,a.stateNode.containerInfo),Fi(a,tn,i.memoizedState.cache),_l();break;case 27:case 5:me(a);break;case 4:oe(a,a.stateNode.containerInfo);break;case 10:Fi(a,a.type,a.memoizedProps.value);break;case 13:var f=a.memoizedState;if(f!==null)return f.dehydrated!==null?(Zi(a),a.flags|=128,null):(c&a.child.childLanes)!==0?o1(i,a,c):(Zi(a),i=wi(i,a,c),i!==null?i.sibling:null);Zi(a);break;case 19:var y=(i.flags&128)!==0;if(f=(c&a.childLanes)!==0,f||(Nl(i,a,c,!1),f=(c&a.childLanes)!==0),y){if(f)return c1(i,a,c);a.flags|=128}if(y=a.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),N(nn,nn.current),f)break;return null;case 22:case 23:return a.lanes=0,n1(i,a,c);case 24:Fi(a,tn,i.memoizedState.cache)}return wi(i,a,c)}function u1(i,a,c){if(i!==null)if(i.memoizedProps!==a.pendingProps)ln=!0;else{if(!tp(i,c)&&(a.flags&128)===0)return ln=!1,BO(i,a,c);ln=(i.flags&131072)!==0}else ln=!1,ht&&(a.flags&1048576)!==0&&Vb(a,Bu,a.index);switch(a.lanes=0,a.tag){case 16:e:{i=a.pendingProps;var f=a.elementType,y=f._init;if(f=y(f._payload),a.type=f,typeof f=="function")um(f)?(i=Xa(f,i),a.tag=1,a=a1(null,a,f,i,c)):(a.tag=0,a=Zm(null,a,f,i,c));else{if(f!=null){if(y=f.$$typeof,y===R){a.tag=11,a=Jw(null,a,f,i,c);break e}else if(y===D){a.tag=14,a=e1(null,a,f,i,c);break e}}throw a=te(f)||f,Error(r(306,a,""))}}return a;case 0:return Zm(i,a,a.type,a.pendingProps,c);case 1:return f=a.type,y=Xa(f,a.pendingProps),a1(i,a,f,y,c);case 3:e:{if(oe(a,a.stateNode.containerInfo),i===null)throw Error(r(387));f=a.pendingProps;var b=a.memoizedState;y=b.element,Cm(i,a),zl(a,f,null,c);var j=a.memoizedState;if(f=j.cache,Fi(a,tn,f),f!==b.cache&&xm(a,[tn],c,!0),Pl(),f=j.element,b.isDehydrated)if(b={element:f,isDehydrated:!1,cache:j.cache},a.updateQueue.baseState=b,a.memoizedState=b,a.flags&256){a=s1(i,a,f,c);break e}else if(f!==y){y=fr(Error(r(424)),a),jl(y),a=s1(i,a,f,c);break e}else{switch(i=a.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(Ot=Mr(i.firstChild),An=a,ht=!0,Fa=null,$r=!0,c=Hw(a,null,f,c),a.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling}else{if(_l(),f===y){a=wi(i,a,c);break e}hn(i,a,f,c)}a=a.child}return a;case 26:return ad(i,a),i===null?(c=mS(a.type,null,a.pendingProps,null))?a.memoizedState=c:ht||(c=a.type,i=a.pendingProps,f=bd(X.current).createElement(c),f[Ut]=a,f[Tt]=i,pn(f,c,i),on(f),a.stateNode=f):a.memoizedState=mS(a.type,i.memoizedProps,a.pendingProps,i.memoizedState),null;case 27:return me(a),i===null&&ht&&(f=a.stateNode=dS(a.type,a.pendingProps,X.current),An=a,$r=!0,y=Ot,ia(a.type)?(Pp=y,Ot=Mr(f.firstChild)):Ot=y),hn(i,a,a.pendingProps.children,c),ad(i,a),i===null&&(a.flags|=4194304),a.child;case 5:return i===null&&ht&&((y=f=Ot)&&(f=hD(f,a.type,a.pendingProps,$r),f!==null?(a.stateNode=f,An=a,Ot=Mr(f.firstChild),$r=!1,y=!0):y=!1),y||$a(a)),me(a),y=a.type,b=a.pendingProps,j=i!==null?i.memoizedProps:null,f=b.children,Rp(y,b)?f=null:j!==null&&Rp(y,j)&&(a.flags|=32),a.memoizedState!==null&&(y=Am(i,a,RO,null,null,c),ic._currentValue=y),ad(i,a),hn(i,a,f,c),a.child;case 6:return i===null&&ht&&((i=c=Ot)&&(c=mD(c,a.pendingProps,$r),c!==null?(a.stateNode=c,An=a,Ot=null,i=!0):i=!1),i||$a(a)),null;case 13:return o1(i,a,c);case 4:return oe(a,a.stateNode.containerInfo),f=a.pendingProps,i===null?a.child=to(a,null,f,c):hn(i,a,f,c),a.child;case 11:return Jw(i,a,a.type,a.pendingProps,c);case 7:return hn(i,a,a.pendingProps,c),a.child;case 8:return hn(i,a,a.pendingProps.children,c),a.child;case 12:return hn(i,a,a.pendingProps.children,c),a.child;case 10:return f=a.pendingProps,Fi(a,a.type,f.value),hn(i,a,f.children,c),a.child;case 9:return y=a.type._context,f=a.pendingProps.children,Ga(a),y=Cn(y),f=f(y),a.flags|=1,hn(i,a,f,c),a.child;case 14:return e1(i,a,a.type,a.pendingProps,c);case 15:return t1(i,a,a.type,a.pendingProps,c);case 19:return c1(i,a,c);case 31:return f=a.pendingProps,c=a.mode,f={mode:f.mode,children:f.children},i===null?(c=sd(f,c),c.ref=a.ref,a.child=c,c.return=a,a=c):(c=mi(i.child,f),c.ref=a.ref,a.child=c,c.return=a,a=c),a;case 22:return n1(i,a,c);case 24:return Ga(a),f=Cn(tn),i===null?(y=wm(),y===null&&(y=Et,b=vm(),y.pooledCache=b,b.refCount++,b!==null&&(y.pooledCacheLanes|=c),y=b),a.memoizedState={parent:f,cache:y},km(a),Fi(a,tn,y)):((i.lanes&c)!==0&&(Cm(i,a),zl(a,null,null,c),Pl()),y=i.memoizedState,b=a.memoizedState,y.parent!==f?(y={parent:f,cache:f},a.memoizedState=y,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=y),Fi(a,tn,f)):(f=b.cache,Fi(a,tn,f),f!==y.cache&&xm(a,[tn],c,!0))),hn(i,a,a.pendingProps.children,c),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function Si(i){i.flags|=4}function d1(i,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!vS(a)){if(a=gr.current,a!==null&&((ct&4194048)===ct?qr!==null:(ct&62914560)!==ct&&(ct&536870912)===0||a!==qr))throw Ol=Sm,Zb;i.flags|=8192}}function od(i,a){a!==null&&(i.flags|=4),i.flags&16384&&(a=i.tag!==22?wu():536870912,i.lanes|=a,ao|=a)}function Fl(i,a){if(!ht)switch(i.tailMode){case"hidden":a=i.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var f=null;c!==null;)c.alternate!==null&&(f=c),c=c.sibling;f===null?a||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function At(i){var a=i.alternate!==null&&i.alternate.child===i.child,c=0,f=0;if(a)for(var y=i.child;y!==null;)c|=y.lanes|y.childLanes,f|=y.subtreeFlags&65011712,f|=y.flags&65011712,y.return=i,y=y.sibling;else for(y=i.child;y!==null;)c|=y.lanes|y.childLanes,f|=y.subtreeFlags,f|=y.flags,y.return=i,y=y.sibling;return i.subtreeFlags|=f,i.childLanes=c,a}function VO(i,a,c){var f=a.pendingProps;switch(mm(a),a.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(a),null;case 1:return At(a),null;case 3:return c=a.stateNode,f=null,i!==null&&(f=i.memoizedState.cache),a.memoizedState.cache!==f&&(a.flags|=2048),xi(tn),ce(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(i===null||i.child===null)&&(El(a)?Si(a):i===null||i.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Fb())),At(a),null;case 26:return c=a.memoizedState,i===null?(Si(a),c!==null?(At(a),d1(a,c)):(At(a),a.flags&=-16777217)):c?c!==i.memoizedState?(Si(a),At(a),d1(a,c)):(At(a),a.flags&=-16777217):(i.memoizedProps!==f&&Si(a),At(a),a.flags&=-16777217),null;case 27:be(a),c=X.current;var y=a.type;if(i!==null&&a.stateNode!=null)i.memoizedProps!==f&&Si(a);else{if(!f){if(a.stateNode===null)throw Error(r(166));return At(a),null}i=K.current,El(a)?Ub(a):(i=dS(y,f,c),a.stateNode=i,Si(a))}return At(a),null;case 5:if(be(a),c=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==f&&Si(a);else{if(!f){if(a.stateNode===null)throw Error(r(166));return At(a),null}if(i=K.current,El(a))Ub(a);else{switch(y=bd(X.current),i){case 1:i=y.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:i=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":i=y.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":i=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":i=y.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof f.is=="string"?y.createElement("select",{is:f.is}):y.createElement("select"),f.multiple?i.multiple=!0:f.size&&(i.size=f.size);break;default:i=typeof f.is=="string"?y.createElement(c,{is:f.is}):y.createElement(c)}}i[Ut]=a,i[Tt]=f;e:for(y=a.child;y!==null;){if(y.tag===5||y.tag===6)i.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===a)break e;for(;y.sibling===null;){if(y.return===null||y.return===a)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}a.stateNode=i;e:switch(pn(i,c,f),c){case"button":case"input":case"select":case"textarea":i=!!f.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Si(a)}}return At(a),a.flags&=-16777217,null;case 6:if(i&&a.stateNode!=null)i.memoizedProps!==f&&Si(a);else{if(typeof f!="string"&&a.stateNode===null)throw Error(r(166));if(i=X.current,El(a)){if(i=a.stateNode,c=a.memoizedProps,f=null,y=An,y!==null)switch(y.tag){case 27:case 5:f=y.memoizedProps}i[Ut]=a,i=!!(i.nodeValue===c||f!==null&&f.suppressHydrationWarning===!0||iS(i.nodeValue,c)),i||$a(a)}else i=bd(i).createTextNode(f),i[Ut]=a,a.stateNode=i}return At(a),null;case 13:if(f=a.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(y=El(a),f!==null&&f.dehydrated!==null){if(i===null){if(!y)throw Error(r(318));if(y=a.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[Ut]=a}else _l(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;At(a),y=!1}else y=Fb(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=y),y=!0;if(!y)return a.flags&256?(bi(a),a):(bi(a),null)}if(bi(a),(a.flags&128)!==0)return a.lanes=c,a;if(c=f!==null,i=i!==null&&i.memoizedState!==null,c){f=a.child,y=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(y=f.alternate.memoizedState.cachePool.pool);var b=null;f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(b=f.memoizedState.cachePool.pool),b!==y&&(f.flags|=2048)}return c!==i&&c&&(a.child.flags|=8192),od(a,a.updateQueue),At(a),null;case 4:return ce(),i===null&&Ep(a.stateNode.containerInfo),At(a),null;case 10:return xi(a.type),At(a),null;case 19:if(le(nn),y=a.memoizedState,y===null)return At(a),null;if(f=(a.flags&128)!==0,b=y.rendering,b===null)if(f)Fl(y,!1);else{if(Dt!==0||i!==null&&(i.flags&128)!==0)for(i=a.child;i!==null;){if(b=nd(i),b!==null){for(a.flags|=128,Fl(y,!1),i=b.updateQueue,a.updateQueue=i,od(a,i),a.subtreeFlags=0,i=c,c=a.child;c!==null;)Bb(c,i),c=c.sibling;return N(nn,nn.current&1|2),a.child}i=i.sibling}y.tail!==null&&st()>ud&&(a.flags|=128,f=!0,Fl(y,!1),a.lanes=4194304)}else{if(!f)if(i=nd(b),i!==null){if(a.flags|=128,f=!0,i=i.updateQueue,a.updateQueue=i,od(a,i),Fl(y,!0),y.tail===null&&y.tailMode==="hidden"&&!b.alternate&&!ht)return At(a),null}else 2*st()-y.renderingStartTime>ud&&c!==536870912&&(a.flags|=128,f=!0,Fl(y,!1),a.lanes=4194304);y.isBackwards?(b.sibling=a.child,a.child=b):(i=y.last,i!==null?i.sibling=b:a.child=b,y.last=b)}return y.tail!==null?(a=y.tail,y.rendering=a,y.tail=a.sibling,y.renderingStartTime=st(),a.sibling=null,i=nn.current,N(nn,f?i&1|2:i&1),a):(At(a),null);case 22:case 23:return bi(a),jm(),f=a.memoizedState!==null,i!==null?i.memoizedState!==null!==f&&(a.flags|=8192):f&&(a.flags|=8192),f?(c&536870912)!==0&&(a.flags&128)===0&&(At(a),a.subtreeFlags&6&&(a.flags|=8192)):At(a),c=a.updateQueue,c!==null&&od(a,c.retryQueue),c=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),f=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),f!==c&&(a.flags|=2048),i!==null&&le(Ya),null;case 24:return c=null,i!==null&&(c=i.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),xi(tn),At(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function UO(i,a){switch(mm(a),a.tag){case 1:return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 3:return xi(tn),ce(),i=a.flags,(i&65536)!==0&&(i&128)===0?(a.flags=i&-65537|128,a):null;case 26:case 27:case 5:return be(a),null;case 13:if(bi(a),i=a.memoizedState,i!==null&&i.dehydrated!==null){if(a.alternate===null)throw Error(r(340));_l()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 19:return le(nn),null;case 4:return ce(),null;case 10:return xi(a.type),null;case 22:case 23:return bi(a),jm(),i!==null&&le(Ya),i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 24:return xi(tn),null;case 25:return null;default:return null}}function f1(i,a){switch(mm(a),a.tag){case 3:xi(tn),ce();break;case 26:case 27:case 5:be(a);break;case 4:ce();break;case 13:bi(a);break;case 19:le(nn);break;case 10:xi(a.type);break;case 22:case 23:bi(a),jm(),i!==null&&le(Ya);break;case 24:xi(tn)}}function $l(i,a){try{var c=a.updateQueue,f=c!==null?c.lastEffect:null;if(f!==null){var y=f.next;c=y;do{if((c.tag&i)===i){f=void 0;var b=c.create,j=c.inst;f=b(),j.destroy=f}c=c.next}while(c!==y)}}catch(L){wt(a,a.return,L)}}function Ki(i,a,c){try{var f=a.updateQueue,y=f!==null?f.lastEffect:null;if(y!==null){var b=y.next;f=b;do{if((f.tag&i)===i){var j=f.inst,L=j.destroy;if(L!==void 0){j.destroy=void 0,y=a;var U=c,ne=L;try{ne()}catch(de){wt(y,U,de)}}}f=f.next}while(f!==b)}}catch(de){wt(a,a.return,de)}}function h1(i){var a=i.updateQueue;if(a!==null){var c=i.stateNode;try{ew(a,c)}catch(f){wt(i,i.return,f)}}}function m1(i,a,c){c.props=Xa(i.type,i.memoizedProps),c.state=i.memoizedState;try{c.componentWillUnmount()}catch(f){wt(i,a,f)}}function ql(i,a){try{var c=i.ref;if(c!==null){switch(i.tag){case 26:case 27:case 5:var f=i.stateNode;break;case 30:f=i.stateNode;break;default:f=i.stateNode}typeof c=="function"?i.refCleanup=c(f):c.current=f}}catch(y){wt(i,a,y)}}function Gr(i,a){var c=i.ref,f=i.refCleanup;if(c!==null)if(typeof f=="function")try{f()}catch(y){wt(i,a,y)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(y){wt(i,a,y)}else c.current=null}function p1(i){var a=i.type,c=i.memoizedProps,f=i.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":c.autoFocus&&f.focus();break e;case"img":c.src?f.src=c.src:c.srcSet&&(f.srcset=c.srcSet)}}catch(y){wt(i,i.return,y)}}function np(i,a,c){try{var f=i.stateNode;lD(f,i.type,c,a),f[Tt]=a}catch(y){wt(i,i.return,y)}}function g1(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&ia(i.type)||i.tag===4}function rp(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||g1(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&ia(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function ip(i,a,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,a?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(i,a):(a=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,a.appendChild(i),c=c._reactRootContainer,c!=null||a.onclick!==null||(a.onclick=vd));else if(f!==4&&(f===27&&ia(i.type)&&(c=i.stateNode,a=null),i=i.child,i!==null))for(ip(i,a,c),i=i.sibling;i!==null;)ip(i,a,c),i=i.sibling}function ld(i,a,c){var f=i.tag;if(f===5||f===6)i=i.stateNode,a?c.insertBefore(i,a):c.appendChild(i);else if(f!==4&&(f===27&&ia(i.type)&&(c=i.stateNode),i=i.child,i!==null))for(ld(i,a,c),i=i.sibling;i!==null;)ld(i,a,c),i=i.sibling}function y1(i){var a=i.stateNode,c=i.memoizedProps;try{for(var f=i.type,y=a.attributes;y.length;)a.removeAttributeNode(y[0]);pn(a,f,c),a[Ut]=i,a[Tt]=c}catch(b){wt(i,i.return,b)}}var ki=!1,Ft=!1,ap=!1,x1=typeof WeakSet=="function"?WeakSet:Set,cn=null;function HO(i,a){if(i=i.containerInfo,Np=Ed,i=Nb(i),rm(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var f=c.getSelection&&c.getSelection();if(f&&f.rangeCount!==0){c=f.anchorNode;var y=f.anchorOffset,b=f.focusNode;f=f.focusOffset;try{c.nodeType,b.nodeType}catch{c=null;break e}var j=0,L=-1,U=-1,ne=0,de=0,he=i,ae=null;t:for(;;){for(var se;he!==c||y!==0&&he.nodeType!==3||(L=j+y),he!==b||f!==0&&he.nodeType!==3||(U=j+f),he.nodeType===3&&(j+=he.nodeValue.length),(se=he.firstChild)!==null;)ae=he,he=se;for(;;){if(he===i)break t;if(ae===c&&++ne===y&&(L=j),ae===b&&++de===f&&(U=j),(se=he.nextSibling)!==null)break;he=ae,ae=he.parentNode}he=se}c=L===-1||U===-1?null:{start:L,end:U}}else c=null}c=c||{start:0,end:0}}else c=null;for(Ap={focusedElem:i,selectionRange:c},Ed=!1,cn=a;cn!==null;)if(a=cn,i=a.child,(a.subtreeFlags&1024)!==0&&i!==null)i.return=a,cn=i;else for(;cn!==null;){switch(a=cn,b=a.alternate,i=a.flags,a.tag){case 0:break;case 11:case 15:break;case 1:if((i&1024)!==0&&b!==null){i=void 0,c=a,y=b.memoizedProps,b=b.memoizedState,f=c.stateNode;try{var Ie=Xa(c.type,y,c.elementType===c.type);i=f.getSnapshotBeforeUpdate(Ie,b),f.__reactInternalSnapshotBeforeUpdate=i}catch(ze){wt(c,c.return,ze)}}break;case 3:if((i&1024)!==0){if(i=a.stateNode.containerInfo,c=i.nodeType,c===9)Op(i);else if(c===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Op(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=a.sibling,i!==null){i.return=a.return,cn=i;break}cn=a.return}}function v1(i,a,c){var f=c.flags;switch(c.tag){case 0:case 11:case 15:Wi(i,c),f&4&&$l(5,c);break;case 1:if(Wi(i,c),f&4)if(i=c.stateNode,a===null)try{i.componentDidMount()}catch(j){wt(c,c.return,j)}else{var y=Xa(c.type,a.memoizedProps);a=a.memoizedState;try{i.componentDidUpdate(y,a,i.__reactInternalSnapshotBeforeUpdate)}catch(j){wt(c,c.return,j)}}f&64&&h1(c),f&512&&ql(c,c.return);break;case 3:if(Wi(i,c),f&64&&(i=c.updateQueue,i!==null)){if(a=null,c.child!==null)switch(c.child.tag){case 27:case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}try{ew(i,a)}catch(j){wt(c,c.return,j)}}break;case 27:a===null&&f&4&&y1(c);case 26:case 5:Wi(i,c),a===null&&f&4&&p1(c),f&512&&ql(c,c.return);break;case 12:Wi(i,c);break;case 13:Wi(i,c),f&4&&S1(i,c),f&64&&(i=c.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(c=WO.bind(null,c),pD(i,c))));break;case 22:if(f=c.memoizedState!==null||ki,!f){a=a!==null&&a.memoizedState!==null||Ft,y=ki;var b=Ft;ki=f,(Ft=a)&&!b?Qi(i,c,(c.subtreeFlags&8772)!==0):Wi(i,c),ki=y,Ft=b}break;case 30:break;default:Wi(i,c)}}function b1(i){var a=i.alternate;a!==null&&(i.alternate=null,b1(a)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(a=i.stateNode,a!==null&&Ih(a)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var jt=null,Bn=!1;function Ci(i,a,c){for(c=c.child;c!==null;)w1(i,a,c),c=c.sibling}function w1(i,a,c){if(ge&&typeof ge.onCommitFiberUnmount=="function")try{ge.onCommitFiberUnmount(ue,c)}catch{}switch(c.tag){case 26:Ft||Gr(c,a),Ci(i,a,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:Ft||Gr(c,a);var f=jt,y=Bn;ia(c.type)&&(jt=c.stateNode,Bn=!1),Ci(i,a,c),ec(c.stateNode),jt=f,Bn=y;break;case 5:Ft||Gr(c,a);case 6:if(f=jt,y=Bn,jt=null,Ci(i,a,c),jt=f,Bn=y,jt!==null)if(Bn)try{(jt.nodeType===9?jt.body:jt.nodeName==="HTML"?jt.ownerDocument.body:jt).removeChild(c.stateNode)}catch(b){wt(c,a,b)}else try{jt.removeChild(c.stateNode)}catch(b){wt(c,a,b)}break;case 18:jt!==null&&(Bn?(i=jt,cS(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,c.stateNode),lc(i)):cS(jt,c.stateNode));break;case 4:f=jt,y=Bn,jt=c.stateNode.containerInfo,Bn=!0,Ci(i,a,c),jt=f,Bn=y;break;case 0:case 11:case 14:case 15:Ft||Ki(2,c,a),Ft||Ki(4,c,a),Ci(i,a,c);break;case 1:Ft||(Gr(c,a),f=c.stateNode,typeof f.componentWillUnmount=="function"&&m1(c,a,f)),Ci(i,a,c);break;case 21:Ci(i,a,c);break;case 22:Ft=(f=Ft)||c.memoizedState!==null,Ci(i,a,c),Ft=f;break;default:Ci(i,a,c)}}function S1(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{lc(i)}catch(c){wt(a,a.return,c)}}function FO(i){switch(i.tag){case 13:case 19:var a=i.stateNode;return a===null&&(a=i.stateNode=new x1),a;case 22:return i=i.stateNode,a=i._retryCache,a===null&&(a=i._retryCache=new x1),a;default:throw Error(r(435,i.tag))}}function sp(i,a){var c=FO(i);a.forEach(function(f){var y=QO.bind(null,i,f);c.has(f)||(c.add(f),f.then(y,y))})}function Kn(i,a){var c=a.deletions;if(c!==null)for(var f=0;f<c.length;f++){var y=c[f],b=i,j=a,L=j;e:for(;L!==null;){switch(L.tag){case 27:if(ia(L.type)){jt=L.stateNode,Bn=!1;break e}break;case 5:jt=L.stateNode,Bn=!1;break e;case 3:case 4:jt=L.stateNode.containerInfo,Bn=!0;break e}L=L.return}if(jt===null)throw Error(r(160));w1(b,j,y),jt=null,Bn=!1,b=y.alternate,b!==null&&(b.return=null),y.return=null}if(a.subtreeFlags&13878)for(a=a.child;a!==null;)k1(a,i),a=a.sibling}var Rr=null;function k1(i,a){var c=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Kn(a,i),Wn(i),f&4&&(Ki(3,i,i.return),$l(3,i),Ki(5,i,i.return));break;case 1:Kn(a,i),Wn(i),f&512&&(Ft||c===null||Gr(c,c.return)),f&64&&ki&&(i=i.updateQueue,i!==null&&(f=i.callbacks,f!==null&&(c=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=c===null?f:c.concat(f))));break;case 26:var y=Rr;if(Kn(a,i),Wn(i),f&512&&(Ft||c===null||Gr(c,c.return)),f&4){var b=c!==null?c.memoizedState:null;if(f=i.memoizedState,c===null)if(f===null)if(i.stateNode===null){e:{f=i.type,c=i.memoizedProps,y=y.ownerDocument||y;t:switch(f){case"title":b=y.getElementsByTagName("title")[0],(!b||b[pl]||b[Ut]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=y.createElement(f),y.head.insertBefore(b,y.querySelector("head > title"))),pn(b,f,c),b[Ut]=i,on(b),f=b;break e;case"link":var j=yS("link","href",y).get(f+(c.href||""));if(j){for(var L=0;L<j.length;L++)if(b=j[L],b.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&b.getAttribute("rel")===(c.rel==null?null:c.rel)&&b.getAttribute("title")===(c.title==null?null:c.title)&&b.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){j.splice(L,1);break t}}b=y.createElement(f),pn(b,f,c),y.head.appendChild(b);break;case"meta":if(j=yS("meta","content",y).get(f+(c.content||""))){for(L=0;L<j.length;L++)if(b=j[L],b.getAttribute("content")===(c.content==null?null:""+c.content)&&b.getAttribute("name")===(c.name==null?null:c.name)&&b.getAttribute("property")===(c.property==null?null:c.property)&&b.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&b.getAttribute("charset")===(c.charSet==null?null:c.charSet)){j.splice(L,1);break t}}b=y.createElement(f),pn(b,f,c),y.head.appendChild(b);break;default:throw Error(r(468,f))}b[Ut]=i,on(b),f=b}i.stateNode=f}else xS(y,i.type,i.stateNode);else i.stateNode=gS(y,f,i.memoizedProps);else b!==f?(b===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):b.count--,f===null?xS(y,i.type,i.stateNode):gS(y,f,i.memoizedProps)):f===null&&i.stateNode!==null&&np(i,i.memoizedProps,c.memoizedProps)}break;case 27:Kn(a,i),Wn(i),f&512&&(Ft||c===null||Gr(c,c.return)),c!==null&&f&4&&np(i,i.memoizedProps,c.memoizedProps);break;case 5:if(Kn(a,i),Wn(i),f&512&&(Ft||c===null||Gr(c,c.return)),i.flags&32){y=i.stateNode;try{Ls(y,"")}catch(se){wt(i,i.return,se)}}f&4&&i.stateNode!=null&&(y=i.memoizedProps,np(i,y,c!==null?c.memoizedProps:y)),f&1024&&(ap=!0);break;case 6:if(Kn(a,i),Wn(i),f&4){if(i.stateNode===null)throw Error(r(162));f=i.memoizedProps,c=i.stateNode;try{c.nodeValue=f}catch(se){wt(i,i.return,se)}}break;case 3:if(kd=null,y=Rr,Rr=wd(a.containerInfo),Kn(a,i),Rr=y,Wn(i),f&4&&c!==null&&c.memoizedState.isDehydrated)try{lc(a.containerInfo)}catch(se){wt(i,i.return,se)}ap&&(ap=!1,C1(i));break;case 4:f=Rr,Rr=wd(i.stateNode.containerInfo),Kn(a,i),Wn(i),Rr=f;break;case 12:Kn(a,i),Wn(i);break;case 13:Kn(a,i),Wn(i),i.child.flags&8192&&i.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(fp=st()),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,sp(i,f)));break;case 22:y=i.memoizedState!==null;var U=c!==null&&c.memoizedState!==null,ne=ki,de=Ft;if(ki=ne||y,Ft=de||U,Kn(a,i),Ft=de,ki=ne,Wn(i),f&8192)e:for(a=i.stateNode,a._visibility=y?a._visibility&-2:a._visibility|1,y&&(c===null||U||ki||Ft||Ka(i)),c=null,a=i;;){if(a.tag===5||a.tag===26){if(c===null){U=c=a;try{if(b=U.stateNode,y)j=b.style,typeof j.setProperty=="function"?j.setProperty("display","none","important"):j.display="none";else{L=U.stateNode;var he=U.memoizedProps.style,ae=he!=null&&he.hasOwnProperty("display")?he.display:null;L.style.display=ae==null||typeof ae=="boolean"?"":(""+ae).trim()}}catch(se){wt(U,U.return,se)}}}else if(a.tag===6){if(c===null){U=a;try{U.stateNode.nodeValue=y?"":U.memoizedProps}catch(se){wt(U,U.return,se)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===i)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break e;for(;a.sibling===null;){if(a.return===null||a.return===i)break e;c===a&&(c=null),a=a.return}c===a&&(c=null),a.sibling.return=a.return,a=a.sibling}f&4&&(f=i.updateQueue,f!==null&&(c=f.retryQueue,c!==null&&(f.retryQueue=null,sp(i,c))));break;case 19:Kn(a,i),Wn(i),f&4&&(f=i.updateQueue,f!==null&&(i.updateQueue=null,sp(i,f)));break;case 30:break;case 21:break;default:Kn(a,i),Wn(i)}}function Wn(i){var a=i.flags;if(a&2){try{for(var c,f=i.return;f!==null;){if(g1(f)){c=f;break}f=f.return}if(c==null)throw Error(r(160));switch(c.tag){case 27:var y=c.stateNode,b=rp(i);ld(i,b,y);break;case 5:var j=c.stateNode;c.flags&32&&(Ls(j,""),c.flags&=-33);var L=rp(i);ld(i,L,j);break;case 3:case 4:var U=c.stateNode.containerInfo,ne=rp(i);ip(i,ne,U);break;default:throw Error(r(161))}}catch(de){wt(i,i.return,de)}i.flags&=-3}a&4096&&(i.flags&=-4097)}function C1(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var a=i;C1(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),i=i.sibling}}function Wi(i,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)v1(i,a.alternate,a),a=a.sibling}function Ka(i){for(i=i.child;i!==null;){var a=i;switch(a.tag){case 0:case 11:case 14:case 15:Ki(4,a,a.return),Ka(a);break;case 1:Gr(a,a.return);var c=a.stateNode;typeof c.componentWillUnmount=="function"&&m1(a,a.return,c),Ka(a);break;case 27:ec(a.stateNode);case 26:case 5:Gr(a,a.return),Ka(a);break;case 22:a.memoizedState===null&&Ka(a);break;case 30:Ka(a);break;default:Ka(a)}i=i.sibling}}function Qi(i,a,c){for(c=c&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var f=a.alternate,y=i,b=a,j=b.flags;switch(b.tag){case 0:case 11:case 15:Qi(y,b,c),$l(4,b);break;case 1:if(Qi(y,b,c),f=b,y=f.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(ne){wt(f,f.return,ne)}if(f=b,y=f.updateQueue,y!==null){var L=f.stateNode;try{var U=y.shared.hiddenCallbacks;if(U!==null)for(y.shared.hiddenCallbacks=null,y=0;y<U.length;y++)Jb(U[y],L)}catch(ne){wt(f,f.return,ne)}}c&&j&64&&h1(b),ql(b,b.return);break;case 27:y1(b);case 26:case 5:Qi(y,b,c),c&&f===null&&j&4&&p1(b),ql(b,b.return);break;case 12:Qi(y,b,c);break;case 13:Qi(y,b,c),c&&j&4&&S1(y,b);break;case 22:b.memoizedState===null&&Qi(y,b,c),ql(b,b.return);break;case 30:break;default:Qi(y,b,c)}a=a.sibling}}function op(i,a){var c=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==c&&(i!=null&&i.refCount++,c!=null&&Al(c))}function lp(i,a){i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&Al(i))}function Yr(i,a,c,f){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)T1(i,a,c,f),a=a.sibling}function T1(i,a,c,f){var y=a.flags;switch(a.tag){case 0:case 11:case 15:Yr(i,a,c,f),y&2048&&$l(9,a);break;case 1:Yr(i,a,c,f);break;case 3:Yr(i,a,c,f),y&2048&&(i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&Al(i)));break;case 12:if(y&2048){Yr(i,a,c,f),i=a.stateNode;try{var b=a.memoizedProps,j=b.id,L=b.onPostCommit;typeof L=="function"&&L(j,a.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(U){wt(a,a.return,U)}}else Yr(i,a,c,f);break;case 13:Yr(i,a,c,f);break;case 23:break;case 22:b=a.stateNode,j=a.alternate,a.memoizedState!==null?b._visibility&2?Yr(i,a,c,f):Gl(i,a):b._visibility&2?Yr(i,a,c,f):(b._visibility|=2,no(i,a,c,f,(a.subtreeFlags&10256)!==0)),y&2048&&op(j,a);break;case 24:Yr(i,a,c,f),y&2048&&lp(a.alternate,a);break;default:Yr(i,a,c,f)}}function no(i,a,c,f,y){for(y=y&&(a.subtreeFlags&10256)!==0,a=a.child;a!==null;){var b=i,j=a,L=c,U=f,ne=j.flags;switch(j.tag){case 0:case 11:case 15:no(b,j,L,U,y),$l(8,j);break;case 23:break;case 22:var de=j.stateNode;j.memoizedState!==null?de._visibility&2?no(b,j,L,U,y):Gl(b,j):(de._visibility|=2,no(b,j,L,U,y)),y&&ne&2048&&op(j.alternate,j);break;case 24:no(b,j,L,U,y),y&&ne&2048&&lp(j.alternate,j);break;default:no(b,j,L,U,y)}a=a.sibling}}function Gl(i,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var c=i,f=a,y=f.flags;switch(f.tag){case 22:Gl(c,f),y&2048&&op(f.alternate,f);break;case 24:Gl(c,f),y&2048&&lp(f.alternate,f);break;default:Gl(c,f)}a=a.sibling}}var Yl=8192;function ro(i){if(i.subtreeFlags&Yl)for(i=i.child;i!==null;)E1(i),i=i.sibling}function E1(i){switch(i.tag){case 26:ro(i),i.flags&Yl&&i.memoizedState!==null&&jD(Rr,i.memoizedState,i.memoizedProps);break;case 5:ro(i);break;case 3:case 4:var a=Rr;Rr=wd(i.stateNode.containerInfo),ro(i),Rr=a;break;case 22:i.memoizedState===null&&(a=i.alternate,a!==null&&a.memoizedState!==null?(a=Yl,Yl=16777216,ro(i),Yl=a):ro(i));break;default:ro(i)}}function _1(i){var a=i.alternate;if(a!==null&&(i=a.child,i!==null)){a.child=null;do a=i.sibling,i.sibling=null,i=a;while(i!==null)}}function Zl(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var c=0;c<a.length;c++){var f=a[c];cn=f,N1(f,i)}_1(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)j1(i),i=i.sibling}function j1(i){switch(i.tag){case 0:case 11:case 15:Zl(i),i.flags&2048&&Ki(9,i,i.return);break;case 3:Zl(i);break;case 12:Zl(i);break;case 22:var a=i.stateNode;i.memoizedState!==null&&a._visibility&2&&(i.return===null||i.return.tag!==13)?(a._visibility&=-3,cd(i)):Zl(i);break;default:Zl(i)}}function cd(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var c=0;c<a.length;c++){var f=a[c];cn=f,N1(f,i)}_1(i)}for(i=i.child;i!==null;){switch(a=i,a.tag){case 0:case 11:case 15:Ki(8,a,a.return),cd(a);break;case 22:c=a.stateNode,c._visibility&2&&(c._visibility&=-3,cd(a));break;default:cd(a)}i=i.sibling}}function N1(i,a){for(;cn!==null;){var c=cn;switch(c.tag){case 0:case 11:case 15:Ki(8,c,a);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var f=c.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:Al(c.memoizedState.cache)}if(f=c.child,f!==null)f.return=c,cn=f;else e:for(c=i;cn!==null;){f=cn;var y=f.sibling,b=f.return;if(b1(f),f===c){cn=null;break e}if(y!==null){y.return=b,cn=y;break e}cn=b}}}var $O={getCacheForType:function(i){var a=Cn(tn),c=a.data.get(i);return c===void 0&&(c=i(),a.data.set(i,c)),c}},qO=typeof WeakMap=="function"?WeakMap:Map,mt=0,Et=null,tt=null,ct=0,pt=0,Qn=null,Ji=!1,io=!1,cp=!1,Ti=0,Dt=0,ea=0,Wa=0,up=0,yr=0,ao=0,Xl=null,Vn=null,dp=!1,fp=0,ud=1/0,dd=null,ta=null,mn=0,na=null,so=null,oo=0,hp=0,mp=null,A1=null,Kl=0,pp=null;function Jn(){if((mt&2)!==0&&ct!==0)return ct&-ct;if(I.T!==null){var i=Zs;return i!==0?i:Sp()}return Pa()}function R1(){yr===0&&(yr=(ct&536870912)===0||ht?Nr():536870912);var i=gr.current;return i!==null&&(i.flags|=32),yr}function er(i,a,c){(i===Et&&(pt===2||pt===9)||i.cancelPendingCommit!==null)&&(lo(i,0),ra(i,ct,yr,!1)),Ui(i,c),((mt&2)===0||i!==Et)&&(i===Et&&((mt&2)===0&&(Wa|=c),Dt===4&&ra(i,ct,yr,!1)),Zr(i))}function M1(i,a,c){if((mt&6)!==0)throw Error(r(327));var f=!c&&(a&124)===0&&(a&i.expiredLanes)===0||zn(i,a),y=f?ZO(i,a):xp(i,a,!0),b=f;do{if(y===0){io&&!f&&ra(i,a,0,!1);break}else{if(c=i.current.alternate,b&&!GO(c)){y=xp(i,a,!1),b=!1;continue}if(y===2){if(b=a,i.errorRecoveryDisabledLanes&b)var j=0;else j=i.pendingLanes&-536870913,j=j!==0?j:j&536870912?536870912:0;if(j!==0){a=j;e:{var L=i;y=Xl;var U=L.current.memoizedState.isDehydrated;if(U&&(lo(L,j).flags|=256),j=xp(L,j,!1),j!==2){if(cp&&!U){L.errorRecoveryDisabledLanes|=b,Wa|=b,y=4;break e}b=Vn,Vn=y,b!==null&&(Vn===null?Vn=b:Vn.push.apply(Vn,b))}y=j}if(b=!1,y!==2)continue}}if(y===1){lo(i,0),ra(i,a,0,!0);break}e:{switch(f=i,b=y,b){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:ra(f,a,yr,!Ji);break e;case 2:Vn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(y=fp+300-st(),10<y)){if(ra(f,a,yr,!Ji),It(f,0,!0)!==0)break e;f.timeoutHandle=oS(O1.bind(null,f,c,Vn,dd,dp,a,yr,Wa,ao,Ji,b,2,-0,0),y);break e}O1(f,c,Vn,dd,dp,a,yr,Wa,ao,Ji,b,0,-0,0)}}break}while(!0);Zr(i)}function O1(i,a,c,f,y,b,j,L,U,ne,de,he,ae,se){if(i.timeoutHandle=-1,he=a.subtreeFlags,(he&8192||(he&16785408)===16785408)&&(rc={stylesheets:null,count:0,unsuspend:_D},E1(a),he=ND(),he!==null)){i.cancelPendingCommit=he(V1.bind(null,i,a,b,c,f,y,j,L,U,de,1,ae,se)),ra(i,b,j,!ne);return}V1(i,a,b,c,f,y,j,L,U)}function GO(i){for(var a=i;;){var c=a.tag;if((c===0||c===11||c===15)&&a.flags&16384&&(c=a.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var f=0;f<c.length;f++){var y=c[f],b=y.getSnapshot;y=y.value;try{if(!Zn(b(),y))return!1}catch{return!1}}if(c=a.child,a.subtreeFlags&16384&&c!==null)c.return=a,a=c;else{if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ra(i,a,c,f){a&=~up,a&=~Wa,i.suspendedLanes|=a,i.pingedLanes&=~a,f&&(i.warmLanes|=a),f=i.expirationTimes;for(var y=a;0<y;){var b=31-De(y),j=1<<b;f[b]=-1,y&=~j}c!==0&&Fe(i,c,a)}function fd(){return(mt&6)===0?(Wl(0),!1):!0}function gp(){if(tt!==null){if(pt===0)var i=tt.return;else i=tt,yi=qa=null,Om(i),eo=null,Ul=0,i=tt;for(;i!==null;)f1(i.alternate,i),i=i.return;tt=null}}function lo(i,a){var c=i.timeoutHandle;c!==-1&&(i.timeoutHandle=-1,uD(c)),c=i.cancelPendingCommit,c!==null&&(i.cancelPendingCommit=null,c()),gp(),Et=i,tt=c=mi(i.current,null),ct=a,pt=0,Qn=null,Ji=!1,io=zn(i,a),cp=!1,ao=yr=up=Wa=ea=Dt=0,Vn=Xl=null,dp=!1,(a&8)!==0&&(a|=a&32);var f=i.entangledLanes;if(f!==0)for(i=i.entanglements,f&=a;0<f;){var y=31-De(f),b=1<<y;a|=i[y],f&=~b}return Ti=a,Du(),c}function D1(i,a){We=null,I.H=Ju,a===Ml||a===Fu?(a=Wb(),pt=3):a===Zb?(a=Wb(),pt=4):pt=a===Qw?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Qn=a,tt===null&&(Dt=1,id(i,fr(a,i.current)))}function P1(){var i=I.H;return I.H=Ju,i===null?Ju:i}function z1(){var i=I.A;return I.A=$O,i}function yp(){Dt=4,Ji||(ct&4194048)!==ct&&gr.current!==null||(io=!0),(ea&134217727)===0&&(Wa&134217727)===0||Et===null||ra(Et,ct,yr,!1)}function xp(i,a,c){var f=mt;mt|=2;var y=P1(),b=z1();(Et!==i||ct!==a)&&(dd=null,lo(i,a)),a=!1;var j=Dt;e:do try{if(pt!==0&&tt!==null){var L=tt,U=Qn;switch(pt){case 8:gp(),j=6;break e;case 3:case 2:case 9:case 6:gr.current===null&&(a=!0);var ne=pt;if(pt=0,Qn=null,co(i,L,U,ne),c&&io){j=0;break e}break;default:ne=pt,pt=0,Qn=null,co(i,L,U,ne)}}YO(),j=Dt;break}catch(de){D1(i,de)}while(!0);return a&&i.shellSuspendCounter++,yi=qa=null,mt=f,I.H=y,I.A=b,tt===null&&(Et=null,ct=0,Du()),j}function YO(){for(;tt!==null;)L1(tt)}function ZO(i,a){var c=mt;mt|=2;var f=P1(),y=z1();Et!==i||ct!==a?(dd=null,ud=st()+500,lo(i,a)):io=zn(i,a);e:do try{if(pt!==0&&tt!==null){a=tt;var b=Qn;t:switch(pt){case 1:pt=0,Qn=null,co(i,a,b,1);break;case 2:case 9:if(Xb(b)){pt=0,Qn=null,I1(a);break}a=function(){pt!==2&&pt!==9||Et!==i||(pt=7),Zr(i)},b.then(a,a);break e;case 3:pt=7;break e;case 4:pt=5;break e;case 7:Xb(b)?(pt=0,Qn=null,I1(a)):(pt=0,Qn=null,co(i,a,b,7));break;case 5:var j=null;switch(tt.tag){case 26:j=tt.memoizedState;case 5:case 27:var L=tt;if(!j||vS(j)){pt=0,Qn=null;var U=L.sibling;if(U!==null)tt=U;else{var ne=L.return;ne!==null?(tt=ne,hd(ne)):tt=null}break t}}pt=0,Qn=null,co(i,a,b,5);break;case 6:pt=0,Qn=null,co(i,a,b,6);break;case 8:gp(),Dt=6;break e;default:throw Error(r(462))}}XO();break}catch(de){D1(i,de)}while(!0);return yi=qa=null,I.H=f,I.A=y,mt=c,tt!==null?0:(Et=null,ct=0,Du(),Dt)}function XO(){for(;tt!==null&&!Mt();)L1(tt)}function L1(i){var a=u1(i.alternate,i,Ti);i.memoizedProps=i.pendingProps,a===null?hd(i):tt=a}function I1(i){var a=i,c=a.alternate;switch(a.tag){case 15:case 0:a=i1(c,a,a.pendingProps,a.type,void 0,ct);break;case 11:a=i1(c,a,a.pendingProps,a.type.render,a.ref,ct);break;case 5:Om(a);default:f1(c,a),a=tt=Bb(a,Ti),a=u1(c,a,Ti)}i.memoizedProps=i.pendingProps,a===null?hd(i):tt=a}function co(i,a,c,f){yi=qa=null,Om(a),eo=null,Ul=0;var y=a.return;try{if(IO(i,y,a,c,ct)){Dt=1,id(i,fr(c,i.current)),tt=null;return}}catch(b){if(y!==null)throw tt=y,b;Dt=1,id(i,fr(c,i.current)),tt=null;return}a.flags&32768?(ht||f===1?i=!0:io||(ct&536870912)!==0?i=!1:(Ji=i=!0,(f===2||f===9||f===3||f===6)&&(f=gr.current,f!==null&&f.tag===13&&(f.flags|=16384))),B1(a,i)):hd(a)}function hd(i){var a=i;do{if((a.flags&32768)!==0){B1(a,Ji);return}i=a.return;var c=VO(a.alternate,a,Ti);if(c!==null){tt=c;return}if(a=a.sibling,a!==null){tt=a;return}tt=a=i}while(a!==null);Dt===0&&(Dt=5)}function B1(i,a){do{var c=UO(i.alternate,i);if(c!==null){c.flags&=32767,tt=c;return}if(c=i.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!a&&(i=i.sibling,i!==null)){tt=i;return}tt=i=c}while(i!==null);Dt=6,tt=null}function V1(i,a,c,f,y,b,j,L,U){i.cancelPendingCommit=null;do md();while(mn!==0);if((mt&6)!==0)throw Error(r(327));if(a!==null){if(a===i.current)throw Error(r(177));if(b=a.lanes|a.childLanes,b|=lm,Su(i,c,b,j,L,U),i===Et&&(tt=Et=null,ct=0),so=a,na=i,oo=c,hp=b,mp=y,A1=f,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,JO(Jt,function(){return q1(),null})):(i.callbackNode=null,i.callbackPriority=0),f=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||f){f=I.T,I.T=null,y=F.p,F.p=2,j=mt,mt|=4;try{HO(i,a,c)}finally{mt=j,F.p=y,I.T=f}}mn=1,U1(),H1(),F1()}}function U1(){if(mn===1){mn=0;var i=na,a=so,c=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||c){c=I.T,I.T=null;var f=F.p;F.p=2;var y=mt;mt|=4;try{k1(a,i);var b=Ap,j=Nb(i.containerInfo),L=b.focusedElem,U=b.selectionRange;if(j!==L&&L&&L.ownerDocument&&jb(L.ownerDocument.documentElement,L)){if(U!==null&&rm(L)){var ne=U.start,de=U.end;if(de===void 0&&(de=ne),"selectionStart"in L)L.selectionStart=ne,L.selectionEnd=Math.min(de,L.value.length);else{var he=L.ownerDocument||document,ae=he&&he.defaultView||window;if(ae.getSelection){var se=ae.getSelection(),Ie=L.textContent.length,ze=Math.min(U.start,Ie),bt=U.end===void 0?ze:Math.min(U.end,Ie);!se.extend&&ze>bt&&(j=bt,bt=ze,ze=j);var W=_b(L,ze),q=_b(L,bt);if(W&&q&&(se.rangeCount!==1||se.anchorNode!==W.node||se.anchorOffset!==W.offset||se.focusNode!==q.node||se.focusOffset!==q.offset)){var J=he.createRange();J.setStart(W.node,W.offset),se.removeAllRanges(),ze>bt?(se.addRange(J),se.extend(q.node,q.offset)):(J.setEnd(q.node,q.offset),se.addRange(J))}}}}for(he=[],se=L;se=se.parentNode;)se.nodeType===1&&he.push({element:se,left:se.scrollLeft,top:se.scrollTop});for(typeof L.focus=="function"&&L.focus(),L=0;L<he.length;L++){var fe=he[L];fe.element.scrollLeft=fe.left,fe.element.scrollTop=fe.top}}Ed=!!Np,Ap=Np=null}finally{mt=y,F.p=f,I.T=c}}i.current=a,mn=2}}function H1(){if(mn===2){mn=0;var i=na,a=so,c=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||c){c=I.T,I.T=null;var f=F.p;F.p=2;var y=mt;mt|=4;try{v1(i,a.alternate,a)}finally{mt=y,F.p=f,I.T=c}}mn=3}}function F1(){if(mn===4||mn===3){mn=0,Lt();var i=na,a=so,c=oo,f=A1;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?mn=5:(mn=0,so=na=null,$1(i,i.pendingLanes));var y=i.pendingLanes;if(y===0&&(ta=null),fn(c),a=a.stateNode,ge&&typeof ge.onCommitFiberRoot=="function")try{ge.onCommitFiberRoot(ue,a,void 0,(a.current.flags&128)===128)}catch{}if(f!==null){a=I.T,y=F.p,F.p=2,I.T=null;try{for(var b=i.onRecoverableError,j=0;j<f.length;j++){var L=f[j];b(L.value,{componentStack:L.stack})}}finally{I.T=a,F.p=y}}(oo&3)!==0&&md(),Zr(i),y=i.pendingLanes,(c&4194090)!==0&&(y&42)!==0?i===pp?Kl++:(Kl=0,pp=i):Kl=0,Wl(0)}}function $1(i,a){(i.pooledCacheLanes&=a)===0&&(a=i.pooledCache,a!=null&&(i.pooledCache=null,Al(a)))}function md(i){return U1(),H1(),F1(),q1()}function q1(){if(mn!==5)return!1;var i=na,a=hp;hp=0;var c=fn(oo),f=I.T,y=F.p;try{F.p=32>c?32:c,I.T=null,c=mp,mp=null;var b=na,j=oo;if(mn=0,so=na=null,oo=0,(mt&6)!==0)throw Error(r(331));var L=mt;if(mt|=4,j1(b.current),T1(b,b.current,j,c),mt=L,Wl(0,!1),ge&&typeof ge.onPostCommitFiberRoot=="function")try{ge.onPostCommitFiberRoot(ue,b)}catch{}return!0}finally{F.p=y,I.T=f,$1(i,a)}}function G1(i,a,c){a=fr(c,a),a=Ym(i.stateNode,a,2),i=Gi(i,a,2),i!==null&&(Ui(i,2),Zr(i))}function wt(i,a,c){if(i.tag===3)G1(i,i,c);else for(;a!==null;){if(a.tag===3){G1(a,i,c);break}else if(a.tag===1){var f=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(ta===null||!ta.has(f))){i=fr(c,i),c=Kw(2),f=Gi(a,c,2),f!==null&&(Ww(c,f,a,i),Ui(f,2),Zr(f));break}}a=a.return}}function vp(i,a,c){var f=i.pingCache;if(f===null){f=i.pingCache=new qO;var y=new Set;f.set(a,y)}else y=f.get(a),y===void 0&&(y=new Set,f.set(a,y));y.has(c)||(cp=!0,y.add(c),i=KO.bind(null,i,a,c),a.then(i,i))}function KO(i,a,c){var f=i.pingCache;f!==null&&f.delete(a),i.pingedLanes|=i.suspendedLanes&c,i.warmLanes&=~c,Et===i&&(ct&c)===c&&(Dt===4||Dt===3&&(ct&62914560)===ct&&300>st()-fp?(mt&2)===0&&lo(i,0):up|=c,ao===ct&&(ao=0)),Zr(i)}function Y1(i,a){a===0&&(a=wu()),i=$s(i,a),i!==null&&(Ui(i,a),Zr(i))}function WO(i){var a=i.memoizedState,c=0;a!==null&&(c=a.retryLane),Y1(i,c)}function QO(i,a){var c=0;switch(i.tag){case 13:var f=i.stateNode,y=i.memoizedState;y!==null&&(c=y.retryLane);break;case 19:f=i.stateNode;break;case 22:f=i.stateNode._retryCache;break;default:throw Error(r(314))}f!==null&&f.delete(a),Y1(i,c)}function JO(i,a){return Ve(i,a)}var pd=null,uo=null,bp=!1,gd=!1,wp=!1,Qa=0;function Zr(i){i!==uo&&i.next===null&&(uo===null?pd=uo=i:uo=uo.next=i),gd=!0,bp||(bp=!0,tD())}function Wl(i,a){if(!wp&&gd){wp=!0;do for(var c=!1,f=pd;f!==null;){if(i!==0){var y=f.pendingLanes;if(y===0)var b=0;else{var j=f.suspendedLanes,L=f.pingedLanes;b=(1<<31-De(42|i)+1)-1,b&=y&~(j&~L),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(c=!0,W1(f,b))}else b=ct,b=It(f,f===Et?b:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(b&3)===0||zn(f,b)||(c=!0,W1(f,b));f=f.next}while(c);wp=!1}}function eD(){Z1()}function Z1(){gd=bp=!1;var i=0;Qa!==0&&(cD()&&(i=Qa),Qa=0);for(var a=st(),c=null,f=pd;f!==null;){var y=f.next,b=X1(f,a);b===0?(f.next=null,c===null?pd=y:c.next=y,y===null&&(uo=c)):(c=f,(i!==0||(b&3)!==0)&&(gd=!0)),f=y}Wl(i)}function X1(i,a){for(var c=i.suspendedLanes,f=i.pingedLanes,y=i.expirationTimes,b=i.pendingLanes&-62914561;0<b;){var j=31-De(b),L=1<<j,U=y[j];U===-1?((L&c)===0||(L&f)!==0)&&(y[j]=Nn(L,a)):U<=a&&(i.expiredLanes|=L),b&=~L}if(a=Et,c=ct,c=It(i,i===a?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),f=i.callbackNode,c===0||i===a&&(pt===2||pt===9)||i.cancelPendingCommit!==null)return f!==null&&f!==null&&lt(f),i.callbackNode=null,i.callbackPriority=0;if((c&3)===0||zn(i,c)){if(a=c&-c,a===i.callbackPriority)return a;switch(f!==null&&lt(f),fn(c)){case 2:case 8:c=lr;break;case 32:c=Jt;break;case 268435456:c=Yn;break;default:c=Jt}return f=K1.bind(null,i),c=Ve(c,f),i.callbackPriority=a,i.callbackNode=c,a}return f!==null&&f!==null&&lt(f),i.callbackPriority=2,i.callbackNode=null,2}function K1(i,a){if(mn!==0&&mn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var c=i.callbackNode;if(md()&&i.callbackNode!==c)return null;var f=ct;return f=It(i,i===Et?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),f===0?null:(M1(i,f,a),X1(i,st()),i.callbackNode!=null&&i.callbackNode===c?K1.bind(null,i):null)}function W1(i,a){if(md())return null;M1(i,a,!0)}function tD(){dD(function(){(mt&6)!==0?Ve(kt,eD):Z1()})}function Sp(){return Qa===0&&(Qa=Nr()),Qa}function Q1(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:_u(""+i)}function J1(i,a){var c=a.ownerDocument.createElement("input");return c.name=a.name,c.value=a.value,i.id&&c.setAttribute("form",i.id),a.parentNode.insertBefore(c,a),i=new FormData(i),c.parentNode.removeChild(c),i}function nD(i,a,c,f,y){if(a==="submit"&&c&&c.stateNode===y){var b=Q1((y[Tt]||null).action),j=f.submitter;j&&(a=(a=j[Tt]||null)?Q1(a.formAction):j.getAttribute("formAction"),a!==null&&(b=a,j=null));var L=new Ru("action","action",null,f,y);i.push({event:L,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(Qa!==0){var U=j?J1(y,j):new FormData(y);Hm(c,{pending:!0,data:U,method:y.method,action:b},null,U)}}else typeof b=="function"&&(L.preventDefault(),U=j?J1(y,j):new FormData(y),Hm(c,{pending:!0,data:U,method:y.method,action:b},b,U))},currentTarget:y}]})}}for(var kp=0;kp<om.length;kp++){var Cp=om[kp],rD=Cp.toLowerCase(),iD=Cp[0].toUpperCase()+Cp.slice(1);Ar(rD,"on"+iD)}Ar(Mb,"onAnimationEnd"),Ar(Ob,"onAnimationIteration"),Ar(Db,"onAnimationStart"),Ar("dblclick","onDoubleClick"),Ar("focusin","onFocus"),Ar("focusout","onBlur"),Ar(wO,"onTransitionRun"),Ar(SO,"onTransitionStart"),Ar(kO,"onTransitionCancel"),Ar(Pb,"onTransitionEnd"),Ds("onMouseEnter",["mouseout","mouseover"]),Ds("onMouseLeave",["mouseout","mouseover"]),Ds("onPointerEnter",["pointerout","pointerover"]),Ds("onPointerLeave",["pointerout","pointerover"]),za("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),za("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),za("onBeforeInput",["compositionend","keypress","textInput","paste"]),za("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),za("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),za("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ql="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),aD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ql));function eS(i,a){a=(a&4)!==0;for(var c=0;c<i.length;c++){var f=i[c],y=f.event;f=f.listeners;e:{var b=void 0;if(a)for(var j=f.length-1;0<=j;j--){var L=f[j],U=L.instance,ne=L.currentTarget;if(L=L.listener,U!==b&&y.isPropagationStopped())break e;b=L,y.currentTarget=ne;try{b(y)}catch(de){rd(de)}y.currentTarget=null,b=U}else for(j=0;j<f.length;j++){if(L=f[j],U=L.instance,ne=L.currentTarget,L=L.listener,U!==b&&y.isPropagationStopped())break e;b=L,y.currentTarget=ne;try{b(y)}catch(de){rd(de)}y.currentTarget=null,b=U}}}}function nt(i,a){var c=a[As];c===void 0&&(c=a[As]=new Set);var f=i+"__bubble";c.has(f)||(tS(a,i,2,!1),c.add(f))}function Tp(i,a,c){var f=0;a&&(f|=4),tS(c,i,f,a)}var yd="_reactListening"+Math.random().toString(36).slice(2);function Ep(i){if(!i[yd]){i[yd]=!0,Z0.forEach(function(c){c!=="selectionchange"&&(aD.has(c)||Tp(c,!1,i),Tp(c,!0,i))});var a=i.nodeType===9?i:i.ownerDocument;a===null||a[yd]||(a[yd]=!0,Tp("selectionchange",!1,a))}}function tS(i,a,c,f){switch(TS(a)){case 2:var y=MD;break;case 8:y=OD;break;default:y=Vp}c=y.bind(null,a,c,i),y=void 0,!Zh||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(y=!0),f?y!==void 0?i.addEventListener(a,c,{capture:!0,passive:y}):i.addEventListener(a,c,!0):y!==void 0?i.addEventListener(a,c,{passive:y}):i.addEventListener(a,c,!1)}function _p(i,a,c,f,y){var b=f;if((a&1)===0&&(a&2)===0&&f!==null)e:for(;;){if(f===null)return;var j=f.tag;if(j===3||j===4){var L=f.stateNode.containerInfo;if(L===y)break;if(j===4)for(j=f.return;j!==null;){var U=j.tag;if((U===3||U===4)&&j.stateNode.containerInfo===y)return;j=j.return}for(;L!==null;){if(j=Rs(L),j===null)return;if(U=j.tag,U===5||U===6||U===26||U===27){f=b=j;continue e}L=L.parentNode}}f=f.return}lb(function(){var ne=b,de=Gh(c),he=[];e:{var ae=zb.get(i);if(ae!==void 0){var se=Ru,Ie=i;switch(i){case"keypress":if(Nu(c)===0)break e;case"keydown":case"keyup":se=JM;break;case"focusin":Ie="focus",se=Qh;break;case"focusout":Ie="blur",se=Qh;break;case"beforeblur":case"afterblur":se=Qh;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":se=db;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":se=UM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":se=nO;break;case Mb:case Ob:case Db:se=$M;break;case Pb:se=iO;break;case"scroll":case"scrollend":se=BM;break;case"wheel":se=sO;break;case"copy":case"cut":case"paste":se=GM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":se=hb;break;case"toggle":case"beforetoggle":se=lO}var ze=(a&4)!==0,bt=!ze&&(i==="scroll"||i==="scrollend"),W=ze?ae!==null?ae+"Capture":null:ae;ze=[];for(var q=ne,J;q!==null;){var fe=q;if(J=fe.stateNode,fe=fe.tag,fe!==5&&fe!==26&&fe!==27||J===null||W===null||(fe=yl(q,W),fe!=null&&ze.push(Jl(q,fe,J))),bt)break;q=q.return}0<ze.length&&(ae=new se(ae,Ie,null,c,de),he.push({event:ae,listeners:ze}))}}if((a&7)===0){e:{if(ae=i==="mouseover"||i==="pointerover",se=i==="mouseout"||i==="pointerout",ae&&c!==qh&&(Ie=c.relatedTarget||c.fromElement)&&(Rs(Ie)||Ie[sn]))break e;if((se||ae)&&(ae=de.window===de?de:(ae=de.ownerDocument)?ae.defaultView||ae.parentWindow:window,se?(Ie=c.relatedTarget||c.toElement,se=ne,Ie=Ie?Rs(Ie):null,Ie!==null&&(bt=o(Ie),ze=Ie.tag,Ie!==bt||ze!==5&&ze!==27&&ze!==6)&&(Ie=null)):(se=null,Ie=ne),se!==Ie)){if(ze=db,fe="onMouseLeave",W="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(ze=hb,fe="onPointerLeave",W="onPointerEnter",q="pointer"),bt=se==null?ae:gl(se),J=Ie==null?ae:gl(Ie),ae=new ze(fe,q+"leave",se,c,de),ae.target=bt,ae.relatedTarget=J,fe=null,Rs(de)===ne&&(ze=new ze(W,q+"enter",Ie,c,de),ze.target=J,ze.relatedTarget=bt,fe=ze),bt=fe,se&&Ie)t:{for(ze=se,W=Ie,q=0,J=ze;J;J=fo(J))q++;for(J=0,fe=W;fe;fe=fo(fe))J++;for(;0<q-J;)ze=fo(ze),q--;for(;0<J-q;)W=fo(W),J--;for(;q--;){if(ze===W||W!==null&&ze===W.alternate)break t;ze=fo(ze),W=fo(W)}ze=null}else ze=null;se!==null&&nS(he,ae,se,ze,!1),Ie!==null&&bt!==null&&nS(he,bt,Ie,ze,!0)}}e:{if(ae=ne?gl(ne):window,se=ae.nodeName&&ae.nodeName.toLowerCase(),se==="select"||se==="input"&&ae.type==="file")var Ee=wb;else if(vb(ae))if(Sb)Ee=xO;else{Ee=gO;var et=pO}else se=ae.nodeName,!se||se.toLowerCase()!=="input"||ae.type!=="checkbox"&&ae.type!=="radio"?ne&&$h(ne.elementType)&&(Ee=wb):Ee=yO;if(Ee&&(Ee=Ee(i,ne))){bb(he,Ee,c,de);break e}et&&et(i,ae,ne),i==="focusout"&&ne&&ae.type==="number"&&ne.memoizedProps.value!=null&&Fh(ae,"number",ae.value)}switch(et=ne?gl(ne):window,i){case"focusin":(vb(et)||et.contentEditable==="true")&&(Us=et,im=ne,Tl=null);break;case"focusout":Tl=im=Us=null;break;case"mousedown":am=!0;break;case"contextmenu":case"mouseup":case"dragend":am=!1,Ab(he,c,de);break;case"selectionchange":if(bO)break;case"keydown":case"keyup":Ab(he,c,de)}var Re;if(em)e:{switch(i){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else Vs?yb(i,c)&&(Le="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Le="onCompositionStart");Le&&(mb&&c.locale!=="ko"&&(Vs||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Vs&&(Re=cb()):(Hi=de,Xh="value"in Hi?Hi.value:Hi.textContent,Vs=!0)),et=xd(ne,Le),0<et.length&&(Le=new fb(Le,i,null,c,de),he.push({event:Le,listeners:et}),Re?Le.data=Re:(Re=xb(c),Re!==null&&(Le.data=Re)))),(Re=uO?dO(i,c):fO(i,c))&&(Le=xd(ne,"onBeforeInput"),0<Le.length&&(et=new fb("onBeforeInput","beforeinput",null,c,de),he.push({event:et,listeners:Le}),et.data=Re)),nD(he,i,ne,c,de)}eS(he,a)})}function Jl(i,a,c){return{instance:i,listener:a,currentTarget:c}}function xd(i,a){for(var c=a+"Capture",f=[];i!==null;){var y=i,b=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||b===null||(y=yl(i,c),y!=null&&f.unshift(Jl(i,y,b)),y=yl(i,a),y!=null&&f.push(Jl(i,y,b))),i.tag===3)return f;i=i.return}return[]}function fo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function nS(i,a,c,f,y){for(var b=a._reactName,j=[];c!==null&&c!==f;){var L=c,U=L.alternate,ne=L.stateNode;if(L=L.tag,U!==null&&U===f)break;L!==5&&L!==26&&L!==27||ne===null||(U=ne,y?(ne=yl(c,b),ne!=null&&j.unshift(Jl(c,ne,U))):y||(ne=yl(c,b),ne!=null&&j.push(Jl(c,ne,U)))),c=c.return}j.length!==0&&i.push({event:a,listeners:j})}var sD=/\r\n?/g,oD=/\u0000|\uFFFD/g;function rS(i){return(typeof i=="string"?i:""+i).replace(sD,`
49
+ `).replace(oD,"")}function iS(i,a){return a=rS(a),rS(i)===a}function vd(){}function vt(i,a,c,f,y,b){switch(c){case"children":typeof f=="string"?a==="body"||a==="textarea"&&f===""||Ls(i,f):(typeof f=="number"||typeof f=="bigint")&&a!=="body"&&Ls(i,""+f);break;case"className":Cu(i,"class",f);break;case"tabIndex":Cu(i,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":Cu(i,c,f);break;case"style":sb(i,f,b);break;case"data":if(a!=="object"){Cu(i,"data",f);break}case"src":case"href":if(f===""&&(a!=="a"||c!=="href")){i.removeAttribute(c);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){i.removeAttribute(c);break}f=_u(""+f),i.setAttribute(c,f);break;case"action":case"formAction":if(typeof f=="function"){i.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(c==="formAction"?(a!=="input"&&vt(i,a,"name",y.name,y,null),vt(i,a,"formEncType",y.formEncType,y,null),vt(i,a,"formMethod",y.formMethod,y,null),vt(i,a,"formTarget",y.formTarget,y,null)):(vt(i,a,"encType",y.encType,y,null),vt(i,a,"method",y.method,y,null),vt(i,a,"target",y.target,y,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){i.removeAttribute(c);break}f=_u(""+f),i.setAttribute(c,f);break;case"onClick":f!=null&&(i.onclick=vd);break;case"onScroll":f!=null&&nt("scroll",i);break;case"onScrollEnd":f!=null&&nt("scrollend",i);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(c=f.__html,c!=null){if(y.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"multiple":i.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":i.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){i.removeAttribute("xlink:href");break}c=_u(""+f),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,""+f):i.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":f&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,""):i.removeAttribute(c);break;case"capture":case"download":f===!0?i.setAttribute(c,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?i.setAttribute(c,f):i.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?i.setAttribute(c,f):i.removeAttribute(c);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?i.removeAttribute(c):i.setAttribute(c,f);break;case"popover":nt("beforetoggle",i),nt("toggle",i),ku(i,"popover",f);break;case"xlinkActuate":fi(i,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":fi(i,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":fi(i,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":fi(i,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":fi(i,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":fi(i,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":fi(i,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":fi(i,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":fi(i,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":ku(i,"is",f);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=LM.get(c)||c,ku(i,c,f))}}function jp(i,a,c,f,y,b){switch(c){case"style":sb(i,f,b);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(r(61));if(c=f.__html,c!=null){if(y.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"children":typeof f=="string"?Ls(i,f):(typeof f=="number"||typeof f=="bigint")&&Ls(i,""+f);break;case"onScroll":f!=null&&nt("scroll",i);break;case"onScrollEnd":f!=null&&nt("scrollend",i);break;case"onClick":f!=null&&(i.onclick=vd);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!X0.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(y=c.endsWith("Capture"),a=c.slice(2,y?c.length-7:void 0),b=i[Tt]||null,b=b!=null?b[c]:null,typeof b=="function"&&i.removeEventListener(a,b,y),typeof f=="function")){typeof b!="function"&&b!==null&&(c in i?i[c]=null:i.hasAttribute(c)&&i.removeAttribute(c)),i.addEventListener(a,f,y);break e}c in i?i[c]=f:f===!0?i.setAttribute(c,""):ku(i,c,f)}}}function pn(i,a,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":nt("error",i),nt("load",i);var f=!1,y=!1,b;for(b in c)if(c.hasOwnProperty(b)){var j=c[b];if(j!=null)switch(b){case"src":f=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:vt(i,a,b,j,c,null)}}y&&vt(i,a,"srcSet",c.srcSet,c,null),f&&vt(i,a,"src",c.src,c,null);return;case"input":nt("invalid",i);var L=b=j=y=null,U=null,ne=null;for(f in c)if(c.hasOwnProperty(f)){var de=c[f];if(de!=null)switch(f){case"name":y=de;break;case"type":j=de;break;case"checked":U=de;break;case"defaultChecked":ne=de;break;case"value":b=de;break;case"defaultValue":L=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(137,a));break;default:vt(i,a,f,de,c,null)}}nb(i,b,L,U,ne,j,y,!1),Tu(i);return;case"select":nt("invalid",i),f=j=b=null;for(y in c)if(c.hasOwnProperty(y)&&(L=c[y],L!=null))switch(y){case"value":b=L;break;case"defaultValue":j=L;break;case"multiple":f=L;default:vt(i,a,y,L,c,null)}a=b,c=j,i.multiple=!!f,a!=null?zs(i,!!f,a,!1):c!=null&&zs(i,!!f,c,!0);return;case"textarea":nt("invalid",i),b=y=f=null;for(j in c)if(c.hasOwnProperty(j)&&(L=c[j],L!=null))switch(j){case"value":f=L;break;case"defaultValue":y=L;break;case"children":b=L;break;case"dangerouslySetInnerHTML":if(L!=null)throw Error(r(91));break;default:vt(i,a,j,L,c,null)}ib(i,f,y,b),Tu(i);return;case"option":for(U in c)if(c.hasOwnProperty(U)&&(f=c[U],f!=null))switch(U){case"selected":i.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:vt(i,a,U,f,c,null)}return;case"dialog":nt("beforetoggle",i),nt("toggle",i),nt("cancel",i),nt("close",i);break;case"iframe":case"object":nt("load",i);break;case"video":case"audio":for(f=0;f<Ql.length;f++)nt(Ql[f],i);break;case"image":nt("error",i),nt("load",i);break;case"details":nt("toggle",i);break;case"embed":case"source":case"link":nt("error",i),nt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ne in c)if(c.hasOwnProperty(ne)&&(f=c[ne],f!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:vt(i,a,ne,f,c,null)}return;default:if($h(a)){for(de in c)c.hasOwnProperty(de)&&(f=c[de],f!==void 0&&jp(i,a,de,f,c,void 0));return}}for(L in c)c.hasOwnProperty(L)&&(f=c[L],f!=null&&vt(i,a,L,f,c,null))}function lD(i,a,c,f){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,b=null,j=null,L=null,U=null,ne=null,de=null;for(se in c){var he=c[se];if(c.hasOwnProperty(se)&&he!=null)switch(se){case"checked":break;case"value":break;case"defaultValue":U=he;default:f.hasOwnProperty(se)||vt(i,a,se,null,f,he)}}for(var ae in f){var se=f[ae];if(he=c[ae],f.hasOwnProperty(ae)&&(se!=null||he!=null))switch(ae){case"type":b=se;break;case"name":y=se;break;case"checked":ne=se;break;case"defaultChecked":de=se;break;case"value":j=se;break;case"defaultValue":L=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,a));break;default:se!==he&&vt(i,a,ae,se,f,he)}}Hh(i,j,L,U,ne,de,b,y);return;case"select":se=j=L=ae=null;for(b in c)if(U=c[b],c.hasOwnProperty(b)&&U!=null)switch(b){case"value":break;case"multiple":se=U;default:f.hasOwnProperty(b)||vt(i,a,b,null,f,U)}for(y in f)if(b=f[y],U=c[y],f.hasOwnProperty(y)&&(b!=null||U!=null))switch(y){case"value":ae=b;break;case"defaultValue":L=b;break;case"multiple":j=b;default:b!==U&&vt(i,a,y,b,f,U)}a=L,c=j,f=se,ae!=null?zs(i,!!c,ae,!1):!!f!=!!c&&(a!=null?zs(i,!!c,a,!0):zs(i,!!c,c?[]:"",!1));return;case"textarea":se=ae=null;for(L in c)if(y=c[L],c.hasOwnProperty(L)&&y!=null&&!f.hasOwnProperty(L))switch(L){case"value":break;case"children":break;default:vt(i,a,L,null,f,y)}for(j in f)if(y=f[j],b=c[j],f.hasOwnProperty(j)&&(y!=null||b!=null))switch(j){case"value":ae=y;break;case"defaultValue":se=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==b&&vt(i,a,j,y,f,b)}rb(i,ae,se);return;case"option":for(var Ie in c)if(ae=c[Ie],c.hasOwnProperty(Ie)&&ae!=null&&!f.hasOwnProperty(Ie))switch(Ie){case"selected":i.selected=!1;break;default:vt(i,a,Ie,null,f,ae)}for(U in f)if(ae=f[U],se=c[U],f.hasOwnProperty(U)&&ae!==se&&(ae!=null||se!=null))switch(U){case"selected":i.selected=ae&&typeof ae!="function"&&typeof ae!="symbol";break;default:vt(i,a,U,ae,f,se)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ze in c)ae=c[ze],c.hasOwnProperty(ze)&&ae!=null&&!f.hasOwnProperty(ze)&&vt(i,a,ze,null,f,ae);for(ne in f)if(ae=f[ne],se=c[ne],f.hasOwnProperty(ne)&&ae!==se&&(ae!=null||se!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(r(137,a));break;default:vt(i,a,ne,ae,f,se)}return;default:if($h(a)){for(var bt in c)ae=c[bt],c.hasOwnProperty(bt)&&ae!==void 0&&!f.hasOwnProperty(bt)&&jp(i,a,bt,void 0,f,ae);for(de in f)ae=f[de],se=c[de],!f.hasOwnProperty(de)||ae===se||ae===void 0&&se===void 0||jp(i,a,de,ae,f,se);return}}for(var W in c)ae=c[W],c.hasOwnProperty(W)&&ae!=null&&!f.hasOwnProperty(W)&&vt(i,a,W,null,f,ae);for(he in f)ae=f[he],se=c[he],!f.hasOwnProperty(he)||ae===se||ae==null&&se==null||vt(i,a,he,ae,f,se)}var Np=null,Ap=null;function bd(i){return i.nodeType===9?i:i.ownerDocument}function aS(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function sS(i,a){if(i===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&a==="foreignObject"?0:i}function Rp(i,a){return i==="textarea"||i==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Mp=null;function cD(){var i=window.event;return i&&i.type==="popstate"?i===Mp?!1:(Mp=i,!0):(Mp=null,!1)}var oS=typeof setTimeout=="function"?setTimeout:void 0,uD=typeof clearTimeout=="function"?clearTimeout:void 0,lS=typeof Promise=="function"?Promise:void 0,dD=typeof queueMicrotask=="function"?queueMicrotask:typeof lS<"u"?function(i){return lS.resolve(null).then(i).catch(fD)}:oS;function fD(i){setTimeout(function(){throw i})}function ia(i){return i==="head"}function cS(i,a){var c=a,f=0,y=0;do{var b=c.nextSibling;if(i.removeChild(c),b&&b.nodeType===8)if(c=b.data,c==="/$"){if(0<f&&8>f){c=f;var j=i.ownerDocument;if(c&1&&ec(j.documentElement),c&2&&ec(j.body),c&4)for(c=j.head,ec(c),j=c.firstChild;j;){var L=j.nextSibling,U=j.nodeName;j[pl]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&j.rel.toLowerCase()==="stylesheet"||c.removeChild(j),j=L}}if(y===0){i.removeChild(b),lc(a);return}y--}else c==="$"||c==="$?"||c==="$!"?y++:f=c.charCodeAt(0)-48;else f=0;c=b}while(c);lc(a)}function Op(i){var a=i.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var c=a;switch(a=a.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":Op(c),Ih(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}i.removeChild(c)}}function hD(i,a,c,f){for(;i.nodeType===1;){var y=c;if(i.nodeName.toLowerCase()!==a.toLowerCase()){if(!f&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(f){if(!i[pl])switch(a){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(b=i.getAttribute("rel"),b==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(b!==y.rel||i.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||i.getAttribute("title")!==(y.title==null?null:y.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(b=i.getAttribute("src"),(b!==(y.src==null?null:y.src)||i.getAttribute("type")!==(y.type==null?null:y.type)||i.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&b&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(a==="input"&&i.type==="hidden"){var b=y.name==null?null:""+y.name;if(y.type==="hidden"&&i.getAttribute("name")===b)return i}else return i;if(i=Mr(i.nextSibling),i===null)break}return null}function mD(i,a,c){if(a==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!c||(i=Mr(i.nextSibling),i===null))return null;return i}function Dp(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState==="complete"}function pD(i,a){var c=i.ownerDocument;if(i.data!=="$?"||c.readyState==="complete")a();else{var f=function(){a(),c.removeEventListener("DOMContentLoaded",f)};c.addEventListener("DOMContentLoaded",f),i._reactRetry=f}}function Mr(i){for(;i!=null;i=i.nextSibling){var a=i.nodeType;if(a===1||a===3)break;if(a===8){if(a=i.data,a==="$"||a==="$!"||a==="$?"||a==="F!"||a==="F")break;if(a==="/$")return null}}return i}var Pp=null;function uS(i){i=i.previousSibling;for(var a=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(a===0)return i;a--}else c==="/$"&&a++}i=i.previousSibling}return null}function dS(i,a,c){switch(a=bd(c),i){case"html":if(i=a.documentElement,!i)throw Error(r(452));return i;case"head":if(i=a.head,!i)throw Error(r(453));return i;case"body":if(i=a.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function ec(i){for(var a=i.attributes;a.length;)i.removeAttributeNode(a[0]);Ih(i)}var xr=new Map,fS=new Set;function wd(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Ei=F.d;F.d={f:gD,r:yD,D:xD,C:vD,L:bD,m:wD,X:kD,S:SD,M:CD};function gD(){var i=Ei.f(),a=fd();return i||a}function yD(i){var a=Ms(i);a!==null&&a.tag===5&&a.type==="form"?Mw(a):Ei.r(i)}var ho=typeof document>"u"?null:document;function hS(i,a,c){var f=ho;if(f&&typeof a=="string"&&a){var y=dr(a);y='link[rel="'+i+'"][href="'+y+'"]',typeof c=="string"&&(y+='[crossorigin="'+c+'"]'),fS.has(y)||(fS.add(y),i={rel:i,crossOrigin:c,href:a},f.querySelector(y)===null&&(a=f.createElement("link"),pn(a,"link",i),on(a),f.head.appendChild(a)))}}function xD(i){Ei.D(i),hS("dns-prefetch",i,null)}function vD(i,a){Ei.C(i,a),hS("preconnect",i,a)}function bD(i,a,c){Ei.L(i,a,c);var f=ho;if(f&&i&&a){var y='link[rel="preload"][as="'+dr(a)+'"]';a==="image"&&c&&c.imageSrcSet?(y+='[imagesrcset="'+dr(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(y+='[imagesizes="'+dr(c.imageSizes)+'"]')):y+='[href="'+dr(i)+'"]';var b=y;switch(a){case"style":b=mo(i);break;case"script":b=po(i)}xr.has(b)||(i=g({rel:"preload",href:a==="image"&&c&&c.imageSrcSet?void 0:i,as:a},c),xr.set(b,i),f.querySelector(y)!==null||a==="style"&&f.querySelector(tc(b))||a==="script"&&f.querySelector(nc(b))||(a=f.createElement("link"),pn(a,"link",i),on(a),f.head.appendChild(a)))}}function wD(i,a){Ei.m(i,a);var c=ho;if(c&&i){var f=a&&typeof a.as=="string"?a.as:"script",y='link[rel="modulepreload"][as="'+dr(f)+'"][href="'+dr(i)+'"]',b=y;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=po(i)}if(!xr.has(b)&&(i=g({rel:"modulepreload",href:i},a),xr.set(b,i),c.querySelector(y)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(nc(b)))return}f=c.createElement("link"),pn(f,"link",i),on(f),c.head.appendChild(f)}}}function SD(i,a,c){Ei.S(i,a,c);var f=ho;if(f&&i){var y=Os(f).hoistableStyles,b=mo(i);a=a||"default";var j=y.get(b);if(!j){var L={loading:0,preload:null};if(j=f.querySelector(tc(b)))L.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":a},c),(c=xr.get(b))&&zp(i,c);var U=j=f.createElement("link");on(U),pn(U,"link",i),U._p=new Promise(function(ne,de){U.onload=ne,U.onerror=de}),U.addEventListener("load",function(){L.loading|=1}),U.addEventListener("error",function(){L.loading|=2}),L.loading|=4,Sd(j,a,f)}j={type:"stylesheet",instance:j,count:1,state:L},y.set(b,j)}}}function kD(i,a){Ei.X(i,a);var c=ho;if(c&&i){var f=Os(c).hoistableScripts,y=po(i),b=f.get(y);b||(b=c.querySelector(nc(y)),b||(i=g({src:i,async:!0},a),(a=xr.get(y))&&Lp(i,a),b=c.createElement("script"),on(b),pn(b,"link",i),c.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},f.set(y,b))}}function CD(i,a){Ei.M(i,a);var c=ho;if(c&&i){var f=Os(c).hoistableScripts,y=po(i),b=f.get(y);b||(b=c.querySelector(nc(y)),b||(i=g({src:i,async:!0,type:"module"},a),(a=xr.get(y))&&Lp(i,a),b=c.createElement("script"),on(b),pn(b,"link",i),c.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},f.set(y,b))}}function mS(i,a,c,f){var y=(y=X.current)?wd(y):null;if(!y)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(a=mo(c.href),c=Os(y).hoistableStyles,f=c.get(a),f||(f={type:"style",instance:null,count:0,state:null},c.set(a,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){i=mo(c.href);var b=Os(y).hoistableStyles,j=b.get(i);if(j||(y=y.ownerDocument||y,j={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(i,j),(b=y.querySelector(tc(i)))&&!b._p&&(j.instance=b,j.state.loading=5),xr.has(i)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},xr.set(i,c),b||TD(y,i,c,j.state))),a&&f===null)throw Error(r(528,""));return j}if(a&&f!==null)throw Error(r(529,""));return null;case"script":return a=c.async,c=c.src,typeof c=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=po(c),c=Os(y).hoistableScripts,f=c.get(a),f||(f={type:"script",instance:null,count:0,state:null},c.set(a,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function mo(i){return'href="'+dr(i)+'"'}function tc(i){return'link[rel="stylesheet"]['+i+"]"}function pS(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function TD(i,a,c,f){i.querySelector('link[rel="preload"][as="style"]['+a+"]")?f.loading=1:(a=i.createElement("link"),f.preload=a,a.addEventListener("load",function(){return f.loading|=1}),a.addEventListener("error",function(){return f.loading|=2}),pn(a,"link",c),on(a),i.head.appendChild(a))}function po(i){return'[src="'+dr(i)+'"]'}function nc(i){return"script[async]"+i}function gS(i,a,c){if(a.count++,a.instance===null)switch(a.type){case"style":var f=i.querySelector('style[data-href~="'+dr(c.href)+'"]');if(f)return a.instance=f,on(f),f;var y=g({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return f=(i.ownerDocument||i).createElement("style"),on(f),pn(f,"style",y),Sd(f,c.precedence,i),a.instance=f;case"stylesheet":y=mo(c.href);var b=i.querySelector(tc(y));if(b)return a.state.loading|=4,a.instance=b,on(b),b;f=pS(c),(y=xr.get(y))&&zp(f,y),b=(i.ownerDocument||i).createElement("link"),on(b);var j=b;return j._p=new Promise(function(L,U){j.onload=L,j.onerror=U}),pn(b,"link",f),a.state.loading|=4,Sd(b,c.precedence,i),a.instance=b;case"script":return b=po(c.src),(y=i.querySelector(nc(b)))?(a.instance=y,on(y),y):(f=c,(y=xr.get(b))&&(f=g({},c),Lp(f,y)),i=i.ownerDocument||i,y=i.createElement("script"),on(y),pn(y,"link",f),i.head.appendChild(y),a.instance=y);case"void":return null;default:throw Error(r(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(f=a.instance,a.state.loading|=4,Sd(f,c.precedence,i));return a.instance}function Sd(i,a,c){for(var f=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=f.length?f[f.length-1]:null,b=y,j=0;j<f.length;j++){var L=f[j];if(L.dataset.precedence===a)b=L;else if(b!==y)break}b?b.parentNode.insertBefore(i,b.nextSibling):(a=c.nodeType===9?c.head:c,a.insertBefore(i,a.firstChild))}function zp(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.title==null&&(i.title=a.title)}function Lp(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.integrity==null&&(i.integrity=a.integrity)}var kd=null;function yS(i,a,c){if(kd===null){var f=new Map,y=kd=new Map;y.set(c,f)}else y=kd,f=y.get(c),f||(f=new Map,y.set(c,f));if(f.has(i))return f;for(f.set(i,null),c=c.getElementsByTagName(i),y=0;y<c.length;y++){var b=c[y];if(!(b[pl]||b[Ut]||i==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var j=b.getAttribute(a)||"";j=i+j;var L=f.get(j);L?L.push(b):f.set(j,[b])}}return f}function xS(i,a,c){i=i.ownerDocument||i,i.head.insertBefore(c,a==="title"?i.querySelector("head > title"):null)}function ED(i,a,c){if(c===1||a.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return i=a.disabled,typeof a.precedence=="string"&&i==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function vS(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}var rc=null;function _D(){}function jD(i,a,c){if(rc===null)throw Error(r(475));var f=rc;if(a.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var y=mo(c.href),b=i.querySelector(tc(y));if(b){i=b._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(f.count++,f=Cd.bind(f),i.then(f,f)),a.state.loading|=4,a.instance=b,on(b);return}b=i.ownerDocument||i,c=pS(c),(y=xr.get(y))&&zp(c,y),b=b.createElement("link"),on(b);var j=b;j._p=new Promise(function(L,U){j.onload=L,j.onerror=U}),pn(b,"link",c),a.instance=b}f.stylesheets===null&&(f.stylesheets=new Map),f.stylesheets.set(a,i),(i=a.state.preload)&&(a.state.loading&3)===0&&(f.count++,a=Cd.bind(f),i.addEventListener("load",a),i.addEventListener("error",a))}}function ND(){if(rc===null)throw Error(r(475));var i=rc;return i.stylesheets&&i.count===0&&Ip(i,i.stylesheets),0<i.count?function(a){var c=setTimeout(function(){if(i.stylesheets&&Ip(i,i.stylesheets),i.unsuspend){var f=i.unsuspend;i.unsuspend=null,f()}},6e4);return i.unsuspend=a,function(){i.unsuspend=null,clearTimeout(c)}}:null}function Cd(){if(this.count--,this.count===0){if(this.stylesheets)Ip(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Td=null;function Ip(i,a){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Td=new Map,a.forEach(AD,i),Td=null,Cd.call(i))}function AD(i,a){if(!(a.state.loading&4)){var c=Td.get(i);if(c)var f=c.get(null);else{c=new Map,Td.set(i,c);for(var y=i.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<y.length;b++){var j=y[b];(j.nodeName==="LINK"||j.getAttribute("media")!=="not all")&&(c.set(j.dataset.precedence,j),f=j)}f&&c.set(null,f)}y=a.instance,j=y.getAttribute("data-precedence"),b=c.get(j)||f,b===f&&c.set(null,y),c.set(j,y),this.count++,f=Cd.bind(this),y.addEventListener("load",f),y.addEventListener("error",f),b?b.parentNode.insertBefore(y,b.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(y,i.firstChild)),a.state.loading|=4}}var ic={$$typeof:O,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function RD(i,a,c,f,y,b,j,L){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ml(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ml(0),this.hiddenUpdates=ml(null),this.identifierPrefix=f,this.onUncaughtError=y,this.onCaughtError=b,this.onRecoverableError=j,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function bS(i,a,c,f,y,b,j,L,U,ne,de,he){return i=new RD(i,a,c,j,L,U,ne,he),a=1,b===!0&&(a|=24),b=Xn(3,null,null,a),i.current=b,b.stateNode=i,a=vm(),a.refCount++,i.pooledCache=a,a.refCount++,b.memoizedState={element:f,isDehydrated:c,cache:a},km(b),i}function wS(i){return i?(i=qs,i):qs}function SS(i,a,c,f,y,b){y=wS(y),f.context===null?f.context=y:f.pendingContext=y,f=qi(a),f.payload={element:c},b=b===void 0?null:b,b!==null&&(f.callback=b),c=Gi(i,f,a),c!==null&&(er(c,i,a),Dl(c,i,a))}function kS(i,a){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<a?c:a}}function Bp(i,a){kS(i,a),(i=i.alternate)&&kS(i,a)}function CS(i){if(i.tag===13){var a=$s(i,67108864);a!==null&&er(a,i,67108864),Bp(i,67108864)}}var Ed=!0;function MD(i,a,c,f){var y=I.T;I.T=null;var b=F.p;try{F.p=2,Vp(i,a,c,f)}finally{F.p=b,I.T=y}}function OD(i,a,c,f){var y=I.T;I.T=null;var b=F.p;try{F.p=8,Vp(i,a,c,f)}finally{F.p=b,I.T=y}}function Vp(i,a,c,f){if(Ed){var y=Up(f);if(y===null)_p(i,a,f,_d,c),ES(i,f);else if(PD(y,i,a,c,f))f.stopPropagation();else if(ES(i,f),a&4&&-1<DD.indexOf(i)){for(;y!==null;){var b=Ms(y);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var j=kn(b.pendingLanes);if(j!==0){var L=b;for(L.pendingLanes|=2,L.entangledLanes|=2;j;){var U=1<<31-De(j);L.entanglements[1]|=U,j&=~U}Zr(b),(mt&6)===0&&(ud=st()+500,Wl(0))}}break;case 13:L=$s(b,2),L!==null&&er(L,b,2),fd(),Bp(b,2)}if(b=Up(f),b===null&&_p(i,a,f,_d,c),b===y)break;y=b}y!==null&&f.stopPropagation()}else _p(i,a,f,null,c)}}function Up(i){return i=Gh(i),Hp(i)}var _d=null;function Hp(i){if(_d=null,i=Rs(i),i!==null){var a=o(i);if(a===null)i=null;else{var c=a.tag;if(c===13){if(i=l(a),i!==null)return i;i=null}else if(c===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return _d=i,null}function TS(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(yt()){case kt:return 2;case lr:return 8;case Jt:case Ct:return 32;case Yn:return 268435456;default:return 32}default:return 32}}var Fp=!1,aa=null,sa=null,oa=null,ac=new Map,sc=new Map,la=[],DD="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ES(i,a){switch(i){case"focusin":case"focusout":aa=null;break;case"dragenter":case"dragleave":sa=null;break;case"mouseover":case"mouseout":oa=null;break;case"pointerover":case"pointerout":ac.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":sc.delete(a.pointerId)}}function oc(i,a,c,f,y,b){return i===null||i.nativeEvent!==b?(i={blockedOn:a,domEventName:c,eventSystemFlags:f,nativeEvent:b,targetContainers:[y]},a!==null&&(a=Ms(a),a!==null&&CS(a)),i):(i.eventSystemFlags|=f,a=i.targetContainers,y!==null&&a.indexOf(y)===-1&&a.push(y),i)}function PD(i,a,c,f,y){switch(a){case"focusin":return aa=oc(aa,i,a,c,f,y),!0;case"dragenter":return sa=oc(sa,i,a,c,f,y),!0;case"mouseover":return oa=oc(oa,i,a,c,f,y),!0;case"pointerover":var b=y.pointerId;return ac.set(b,oc(ac.get(b)||null,i,a,c,f,y)),!0;case"gotpointercapture":return b=y.pointerId,sc.set(b,oc(sc.get(b)||null,i,a,c,f,y)),!0}return!1}function _S(i){var a=Rs(i.target);if(a!==null){var c=o(a);if(c!==null){if(a=c.tag,a===13){if(a=l(c),a!==null){i.blockedOn=a,en(i.priority,function(){if(c.tag===13){var f=Jn();f=Gt(f);var y=$s(c,f);y!==null&&er(y,c,f),Bp(c,f)}});return}}else if(a===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function jd(i){if(i.blockedOn!==null)return!1;for(var a=i.targetContainers;0<a.length;){var c=Up(i.nativeEvent);if(c===null){c=i.nativeEvent;var f=new c.constructor(c.type,c);qh=f,c.target.dispatchEvent(f),qh=null}else return a=Ms(c),a!==null&&CS(a),i.blockedOn=c,!1;a.shift()}return!0}function jS(i,a,c){jd(i)&&c.delete(a)}function zD(){Fp=!1,aa!==null&&jd(aa)&&(aa=null),sa!==null&&jd(sa)&&(sa=null),oa!==null&&jd(oa)&&(oa=null),ac.forEach(jS),sc.forEach(jS)}function Nd(i,a){i.blockedOn===a&&(i.blockedOn=null,Fp||(Fp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,zD)))}var Ad=null;function NS(i){Ad!==i&&(Ad=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ad===i&&(Ad=null);for(var a=0;a<i.length;a+=3){var c=i[a],f=i[a+1],y=i[a+2];if(typeof f!="function"){if(Hp(f||c)===null)continue;break}var b=Ms(c);b!==null&&(i.splice(a,3),a-=3,Hm(b,{pending:!0,data:y,method:c.method,action:f},f,y))}}))}function lc(i){function a(U){return Nd(U,i)}aa!==null&&Nd(aa,i),sa!==null&&Nd(sa,i),oa!==null&&Nd(oa,i),ac.forEach(a),sc.forEach(a);for(var c=0;c<la.length;c++){var f=la[c];f.blockedOn===i&&(f.blockedOn=null)}for(;0<la.length&&(c=la[0],c.blockedOn===null);)_S(c),c.blockedOn===null&&la.shift();if(c=(i.ownerDocument||i).$$reactFormReplay,c!=null)for(f=0;f<c.length;f+=3){var y=c[f],b=c[f+1],j=y[Tt]||null;if(typeof b=="function")j||NS(c);else if(j){var L=null;if(b&&b.hasAttribute("formAction")){if(y=b,j=b[Tt]||null)L=j.formAction;else if(Hp(y)!==null)continue}else L=j.action;typeof L=="function"?c[f+1]=L:(c.splice(f,3),f-=3),NS(c)}}}function $p(i){this._internalRoot=i}Rd.prototype.render=$p.prototype.render=function(i){var a=this._internalRoot;if(a===null)throw Error(r(409));var c=a.current,f=Jn();SS(c,f,i,a,null,null)},Rd.prototype.unmount=$p.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var a=i.containerInfo;SS(i.current,2,null,i,null,null),fd(),a[sn]=null}};function Rd(i){this._internalRoot=i}Rd.prototype.unstable_scheduleHydration=function(i){if(i){var a=Pa();i={blockedOn:null,target:i,priority:a};for(var c=0;c<la.length&&a!==0&&a<la[c].priority;c++);la.splice(c,0,i),c===0&&_S(i)}};var AS=t.version;if(AS!=="19.1.0")throw Error(r(527,AS,"19.1.0"));F.findDOMNode=function(i){var a=i._reactInternals;if(a===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=d(a),i=i!==null?h(i):null,i=i===null?null:i.stateNode,i};var LD={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Md=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Md.isDisabled&&Md.supportsFiber)try{ue=Md.inject(LD),ge=Md}catch{}}return uc.createRoot=function(i,a){if(!s(i))throw Error(r(299));var c=!1,f="",y=Gw,b=Yw,j=Zw,L=null;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(f=a.identifierPrefix),a.onUncaughtError!==void 0&&(y=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(j=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(L=a.unstable_transitionCallbacks)),a=bS(i,1,!1,null,null,c,f,y,b,j,L,null),i[sn]=a.current,Ep(i),new $p(a)},uc.hydrateRoot=function(i,a,c){if(!s(i))throw Error(r(299));var f=!1,y="",b=Gw,j=Yw,L=Zw,U=null,ne=null;return c!=null&&(c.unstable_strictMode===!0&&(f=!0),c.identifierPrefix!==void 0&&(y=c.identifierPrefix),c.onUncaughtError!==void 0&&(b=c.onUncaughtError),c.onCaughtError!==void 0&&(j=c.onCaughtError),c.onRecoverableError!==void 0&&(L=c.onRecoverableError),c.unstable_transitionCallbacks!==void 0&&(U=c.unstable_transitionCallbacks),c.formState!==void 0&&(ne=c.formState)),a=bS(i,1,!0,a,c??null,f,y,b,j,L,U,ne),a.context=wS(null),c=a.current,f=Jn(),f=Gt(f),y=qi(f),y.callback=null,Gi(c,y,f),c=f,a.current.lanes=c,Ui(a,c),Zr(a),i[sn]=a.current,Ep(i),new Rd(a)},uc.version="19.1.0",uc}var VS;function XD(){if(VS)return Yp.exports;VS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Yp.exports=ZD(),Yp.exports}var KD=XD();function DE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=DE(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Lx(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=DE(e))&&(r&&(r+=" "),r+=t);return r}const Ix="-",WD=e=>{const t=JD(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const u=l.split(Ix);return u[0]===""&&u.length!==1&&u.shift(),PE(u,t)||QD(l)},getConflictingClassGroupIds:(l,u)=>{const d=n[l]||[];return u&&r[l]?[...d,...r[l]]:d}}},PE=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?PE(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(Ix);return(l=t.validators.find(({validator:u})=>u(o)))==null?void 0:l.classGroupId},US=/^\[(.+)\]$/,QD=e=>{if(US.test(e)){const t=US.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},JD=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const s in n)ny(n[s],r,s,t);return r},ny=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:HS(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(e4(s)){ny(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,l])=>{ny(l,HS(t,o),n,r)})})},HS=(e,t)=>{let n=e;return t.split(Ix).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},e4=e=>e.isThemeGetter,t4=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(o,l)=>{n.set(o,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let l=n.get(o);if(l!==void 0)return l;if((l=r.get(o))!==void 0)return s(o,l),l},set(o,l){n.has(o)?n.set(o,l):s(o,l)}}},ry="!",iy=":",n4=iy.length,r4=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=s=>{const o=[];let l=0,u=0,d=0,h;for(let S=0;S<s.length;S++){let k=s[S];if(l===0&&u===0){if(k===iy){o.push(s.slice(d,S)),d=S+n4;continue}if(k==="/"){h=S;continue}}k==="["?l++:k==="]"?l--:k==="("?u++:k===")"&&u--}const g=o.length===0?s:s.substring(d),p=i4(g),x=p!==g,v=h&&h>d?h-d:void 0;return{modifiers:o,hasImportantModifier:x,baseClassName:p,maybePostfixModifierPosition:v}};if(t){const s=t+iy,o=r;r=l=>l.startsWith(s)?o(l.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(n){const s=r;r=o=>n({className:o,parseClassName:s})}return r},i4=e=>e.endsWith(ry)?e.substring(0,e.length-1):e.startsWith(ry)?e.substring(1):e,a4=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const s=[];let o=[];return r.forEach(l=>{l[0]==="["||t[l]?(s.push(...o.sort(),l),o=[]):o.push(l)}),s.push(...o.sort()),s}},s4=e=>({cache:t4(e.cacheSize),parseClassName:r4(e),sortModifiers:a4(e),...WD(e)}),o4=/\s+/,l4=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:o}=t,l=[],u=e.trim().split(o4);let d="";for(let h=u.length-1;h>=0;h-=1){const g=u[h],{isExternal:p,modifiers:x,hasImportantModifier:v,baseClassName:S,maybePostfixModifierPosition:k}=n(g);if(p){d=g+(d.length>0?" "+d:d);continue}let E=!!k,T=r(E?S.substring(0,k):S);if(!T){if(!E){d=g+(d.length>0?" "+d:d);continue}if(T=r(S),!T){d=g+(d.length>0?" "+d:d);continue}E=!1}const A=o(x).join(":"),O=v?A+ry:A,R=O+T;if(l.includes(R))continue;l.push(R);const M=s(T,E);for(let _=0;_<M.length;++_){const D=M[_];l.push(O+D)}d=g+(d.length>0?" "+d:d)}return d};function c4(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=zE(t))&&(r&&(r+=" "),r+=n);return r}const zE=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=zE(e[r]))&&(n&&(n+=" "),n+=t);return n};function u4(e,...t){let n,r,s,o=l;function l(d){const h=t.reduce((g,p)=>p(g),e());return n=s4(h),r=n.cache.get,s=n.cache.set,o=u,u(d)}function u(d){const h=r(d);if(h)return h;const g=l4(d,n);return s(d,g),g}return function(){return o(c4.apply(null,arguments))}}const rn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},LE=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,IE=/^\((?:(\w[\w-]*):)?(.+)\)$/i,d4=/^\d+\/\d+$/,f4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,h4=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,m4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,p4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,g4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,go=e=>d4.test(e),Qe=e=>!!e&&!Number.isNaN(Number(e)),ua=e=>!!e&&Number.isInteger(Number(e)),Wp=e=>e.endsWith("%")&&Qe(e.slice(0,-1)),_i=e=>f4.test(e),y4=()=>!0,x4=e=>h4.test(e)&&!m4.test(e),BE=()=>!1,v4=e=>p4.test(e),b4=e=>g4.test(e),w4=e=>!_e(e)&&!je(e),S4=e=>Jo(e,HE,BE),_e=e=>LE.test(e),es=e=>Jo(e,FE,x4),Qp=e=>Jo(e,_4,Qe),FS=e=>Jo(e,VE,BE),k4=e=>Jo(e,UE,b4),Od=e=>Jo(e,$E,v4),je=e=>IE.test(e),dc=e=>el(e,FE),C4=e=>el(e,j4),$S=e=>el(e,VE),T4=e=>el(e,HE),E4=e=>el(e,UE),Dd=e=>el(e,$E,!0),Jo=(e,t,n)=>{const r=LE.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},el=(e,t,n=!1)=>{const r=IE.exec(e);return r?r[1]?t(r[1]):n:!1},VE=e=>e==="position"||e==="percentage",UE=e=>e==="image"||e==="url",HE=e=>e==="length"||e==="size"||e==="bg-size",FE=e=>e==="length",_4=e=>e==="number",j4=e=>e==="family-name",$E=e=>e==="shadow",N4=()=>{const e=rn("color"),t=rn("font"),n=rn("text"),r=rn("font-weight"),s=rn("tracking"),o=rn("leading"),l=rn("breakpoint"),u=rn("container"),d=rn("spacing"),h=rn("radius"),g=rn("shadow"),p=rn("inset-shadow"),x=rn("text-shadow"),v=rn("drop-shadow"),S=rn("blur"),k=rn("perspective"),E=rn("aspect"),T=rn("ease"),A=rn("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...R(),je,_e],_=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],P=()=>[je,_e,d],B=()=>[go,"full","auto",...P()],z=()=>[ua,"none","subgrid",je,_e],H=()=>["auto",{span:["full",ua,je,_e]},ua,je,_e],$=()=>[ua,"auto",je,_e],re=()=>["auto","min","max","fr",je,_e],te=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ie=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...P()],F=()=>[go,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],V=()=>[e,je,_e],Z=()=>[...R(),$S,FS,{position:[je,_e]}],C=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",T4,S4,{size:[je,_e]}],le=()=>[Wp,dc,es],N=()=>["","none","full",h,je,_e],K=()=>["",Qe,dc,es],Q=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>[Qe,Wp,$S,FS],oe=()=>["","none",S,je,_e],ce=()=>["none",Qe,je,_e],me=()=>["none",Qe,je,_e],be=()=>[Qe,je,_e],Te=()=>[go,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[_i],breakpoint:[_i],color:[y4],container:[_i],"drop-shadow":[_i],ease:["in","out","in-out"],font:[w4],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[_i],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[_i],shadow:[_i],spacing:["px",Qe],text:[_i],"text-shadow":[_i],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",go,_e,je,E]}],container:["container"],columns:[{columns:[Qe,_e,je,u]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:M()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{start:B()}],end:[{end:B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[ua,"auto",je,_e]}],basis:[{basis:[go,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Qe,go,"auto","initial","none",_e]}],grow:[{grow:["",Qe,je,_e]}],shrink:[{shrink:["",Qe,je,_e]}],order:[{order:[ua,"first","last","none",je,_e]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":re()}],"auto-rows":[{"auto-rows":re()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...te(),"normal"]}],"justify-items":[{"justify-items":[...ie(),"normal"]}],"justify-self":[{"justify-self":["auto",...ie()]}],"align-content":[{content:["normal",...te()]}],"align-items":[{items:[...ie(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ie(),{baseline:["","last"]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...ie(),"baseline"]}],"place-self":[{"place-self":["auto",...ie()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[u,"screen",...F()]}],"min-w":[{"min-w":[u,"screen","none",...F()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",n,dc,es]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,je,Qp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Wp,_e]}],"font-family":[{font:[C4,_e,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,je,_e]}],"line-clamp":[{"line-clamp":[Qe,"none",je,Qp]}],leading:[{leading:[o,...P()]}],"list-image":[{"list-image":["none",je,_e]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",je,_e]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:[Qe,"from-font","auto",je,es]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[Qe,"auto",je,_e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je,_e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",je,_e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Z()}],"bg-repeat":[{bg:C()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ua,je,_e],radial:["",je,_e],conic:[ua,je,_e]},E4,k4]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:N()}],"rounded-s":[{"rounded-s":N()}],"rounded-e":[{"rounded-e":N()}],"rounded-t":[{"rounded-t":N()}],"rounded-r":[{"rounded-r":N()}],"rounded-b":[{"rounded-b":N()}],"rounded-l":[{"rounded-l":N()}],"rounded-ss":[{"rounded-ss":N()}],"rounded-se":[{"rounded-se":N()}],"rounded-ee":[{"rounded-ee":N()}],"rounded-es":[{"rounded-es":N()}],"rounded-tl":[{"rounded-tl":N()}],"rounded-tr":[{"rounded-tr":N()}],"rounded-br":[{"rounded-br":N()}],"rounded-bl":[{"rounded-bl":N()}],"border-w":[{border:K()}],"border-w-x":[{"border-x":K()}],"border-w-y":[{"border-y":K()}],"border-w-s":[{"border-s":K()}],"border-w-e":[{"border-e":K()}],"border-w-t":[{"border-t":K()}],"border-w-r":[{"border-r":K()}],"border-w-b":[{"border-b":K()}],"border-w-l":[{"border-l":K()}],"divide-x":[{"divide-x":K()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":K()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Q(),"hidden","none"]}],"divide-style":[{divide:[...Q(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...Q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Qe,je,_e]}],"outline-w":[{outline:["",Qe,dc,es]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",g,Dd,Od]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",p,Dd,Od]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[Qe,es]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":K()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",x,Dd,Od]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[Qe,je,_e]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":Y()}],"mask-image-linear-to-pos":[{"mask-linear-to":Y()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":Y()}],"mask-image-t-to-pos":[{"mask-t-to":Y()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":Y()}],"mask-image-r-to-pos":[{"mask-r-to":Y()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":Y()}],"mask-image-b-to-pos":[{"mask-b-to":Y()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":Y()}],"mask-image-l-to-pos":[{"mask-l-to":Y()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":Y()}],"mask-image-x-to-pos":[{"mask-x-to":Y()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":Y()}],"mask-image-y-to-pos":[{"mask-y-to":Y()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[je,_e]}],"mask-image-radial-from-pos":[{"mask-radial-from":Y()}],"mask-image-radial-to-pos":[{"mask-radial-to":Y()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[Qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":Y()}],"mask-image-conic-to-pos":[{"mask-conic-to":Y()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Z()}],"mask-repeat":[{mask:C()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",je,_e]}],filter:[{filter:["","none",je,_e]}],blur:[{blur:oe()}],brightness:[{brightness:[Qe,je,_e]}],contrast:[{contrast:[Qe,je,_e]}],"drop-shadow":[{"drop-shadow":["","none",v,Dd,Od]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",Qe,je,_e]}],"hue-rotate":[{"hue-rotate":[Qe,je,_e]}],invert:[{invert:["",Qe,je,_e]}],saturate:[{saturate:[Qe,je,_e]}],sepia:[{sepia:["",Qe,je,_e]}],"backdrop-filter":[{"backdrop-filter":["","none",je,_e]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[Qe,je,_e]}],"backdrop-contrast":[{"backdrop-contrast":[Qe,je,_e]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Qe,je,_e]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qe,je,_e]}],"backdrop-invert":[{"backdrop-invert":["",Qe,je,_e]}],"backdrop-opacity":[{"backdrop-opacity":[Qe,je,_e]}],"backdrop-saturate":[{"backdrop-saturate":[Qe,je,_e]}],"backdrop-sepia":[{"backdrop-sepia":["",Qe,je,_e]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",je,_e]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Qe,"initial",je,_e]}],ease:[{ease:["linear","initial",T,je,_e]}],delay:[{delay:[Qe,je,_e]}],animate:[{animate:["none",A,je,_e]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,je,_e]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:be()}],"skew-x":[{"skew-x":be()}],"skew-y":[{"skew-y":be()}],transform:[{transform:[je,_e,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Te()}],"translate-x":[{"translate-x":Te()}],"translate-y":[{"translate-y":Te()}],"translate-z":[{"translate-z":Te()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",je,_e]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",je,_e]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[Qe,dc,es,Qp]}],stroke:[{stroke:["none",...V()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},qE=u4(N4);function Me(...e){return qE(Lx(e))}function A4(e){if(e<=0)return"Expired";const t=Math.floor(e/(1e3*60*60*24)),n=Math.floor(e%(1e3*60*60*24)/(1e3*60*60)),r=Math.floor(e%(1e3*60*60)/(1e3*60)),s=Math.floor(e%(1e3*60)/1e3),o=[];return t>0&&o.push(`${t}d`),n>0&&o.push(`${n}h`),r>0&&o.push(`${r}m`),(s>0||o.length===0)&&o.push(`${s}s`),o.join(" ")+" remaining"}function va({className:e,...t}){return m.jsx("div",{"data-slot":"card",className:Me("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function qS({className:e,...t}){return m.jsx("div",{"data-slot":"card-header",className:Me("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function GS({className:e,...t}){return m.jsx("div",{"data-slot":"card-title",className:Me("leading-none font-semibold",e),...t})}function Pc({className:e,...t}){return m.jsx("div",{"data-slot":"card-content",className:Me("px-6",e),...t})}var tu=OE();const GE=Xf(tu);function YS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Kf(...e){return t=>{let n=!1;const r=e.map(s=>{const o=YS(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():YS(e[s],null)}}}}function ot(...e){return w.useCallback(Kf(...e),e)}function ps(e){const t=R4(e),n=w.forwardRef((r,s)=>{const{children:o,...l}=r,u=w.Children.toArray(o),d=u.find(O4);if(d){const h=d.props.children,g=u.map(p=>p===d?w.Children.count(h)>1?w.Children.only(null):w.isValidElement(h)?h.props.children:null:p);return m.jsx(t,{...l,ref:s,children:w.isValidElement(h)?w.cloneElement(h,void 0,g):null})}return m.jsx(t,{...l,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}var Bx=ps("Slot");function R4(e){const t=w.forwardRef((n,r)=>{const{children:s,...o}=n;if(w.isValidElement(s)){const l=P4(s),u=D4(o,s.props);return s.type!==w.Fragment&&(u.ref=r?Kf(r,l):l),w.cloneElement(s,u)}return w.Children.count(s)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var YE=Symbol("radix.slottable");function M4(e){const t=({children:n})=>m.jsx(m.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=YE,t}function O4(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===YE}function D4(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...u)=>{const d=o(...u);return s(...u),d}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function P4(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var z4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qe=z4.reduce((e,t)=>{const n=ps(`Primitive.${t}`),r=w.forwardRef((s,o)=>{const{asChild:l,...u}=s,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(d,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ZE(e,t){e&&tu.flushSync(()=>e.dispatchEvent(t))}var XE=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),L4="VisuallyHidden",KE=w.forwardRef((e,t)=>m.jsx(qe.span,{...e,ref:t,style:{...XE,...e.style}}));KE.displayName=L4;var I4=KE;function B4(e,t){const n=w.createContext(t),r=o=>{const{children:l,...u}=o,d=w.useMemo(()=>u,Object.values(u));return m.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function s(o){const l=w.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,s]}function Bi(e,t=[]){let n=[];function r(o,l){const u=w.createContext(l),d=n.length;n=[...n,l];const h=p=>{var T;const{scope:x,children:v,...S}=p,k=((T=x==null?void 0:x[e])==null?void 0:T[d])||u,E=w.useMemo(()=>S,Object.values(S));return m.jsx(k.Provider,{value:E,children:v})};h.displayName=o+"Provider";function g(p,x){var k;const v=((k=x==null?void 0:x[e])==null?void 0:k[d])||u,S=w.useContext(v);if(S)return S;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[h,g]}const s=()=>{const o=n.map(l=>w.createContext(l));return function(u){const d=(u==null?void 0:u[e])||o;return w.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return s.scopeName=e,[r,V4(s,...t)]}function V4(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const l=r.reduce((u,{useScope:d,scopeName:h})=>{const p=d(o)[`__scope${h}`];return{...u,...p}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function Vx(e){const t=e+"CollectionProvider",[n,r]=Bi(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=k=>{const{scope:E,children:T}=k,A=ye.useRef(null),O=ye.useRef(new Map).current;return m.jsx(s,{scope:E,itemMap:O,collectionRef:A,children:T})};l.displayName=t;const u=e+"CollectionSlot",d=ps(u),h=ye.forwardRef((k,E)=>{const{scope:T,children:A}=k,O=o(u,T),R=ot(E,O.collectionRef);return m.jsx(d,{ref:R,children:A})});h.displayName=u;const g=e+"CollectionItemSlot",p="data-radix-collection-item",x=ps(g),v=ye.forwardRef((k,E)=>{const{scope:T,children:A,...O}=k,R=ye.useRef(null),M=ot(E,R),_=o(g,T);return ye.useEffect(()=>(_.itemMap.set(R,{ref:R,...O}),()=>void _.itemMap.delete(R))),m.jsx(x,{[p]:"",ref:M,children:A})});v.displayName=g;function S(k){const E=o(e+"CollectionConsumer",k);return ye.useCallback(()=>{const A=E.collectionRef.current;if(!A)return[];const O=Array.from(A.querySelectorAll(`[${p}]`));return Array.from(E.itemMap.values()).sort((_,D)=>O.indexOf(_.ref.current)-O.indexOf(D.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:l,Slot:h,ItemSlot:v},S,r]}function ke(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}var xn=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},U4=zx[" useInsertionEffect ".trim().toString()]||xn;function Bo({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,o,l]=H4({defaultProp:t,onChange:n}),u=e!==void 0,d=u?e:s;{const g=w.useRef(e!==void 0);w.useEffect(()=>{const p=g.current;p!==u&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=u},[u,r])}const h=w.useCallback(g=>{var p;if(u){const x=F4(g)?g(e):g;x!==e&&((p=l.current)==null||p.call(l,x))}else o(g)},[u,e,o,l]);return[d,h]}function H4({defaultProp:e,onChange:t}){const[n,r]=w.useState(e),s=w.useRef(n),o=w.useRef(t);return U4(()=>{o.current=t},[t]),w.useEffect(()=>{var l;s.current!==n&&((l=o.current)==null||l.call(o,n),s.current=n)},[n,s]),[n,r,o]}function F4(e){return typeof e=="function"}function $4(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var $n=e=>{const{present:t,children:n}=e,r=q4(t),s=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),o=ot(r.ref,G4(s));return typeof n=="function"||r.isPresent?w.cloneElement(s,{ref:o}):null};$n.displayName="Presence";function q4(e){const[t,n]=w.useState(),r=w.useRef(null),s=w.useRef(e),o=w.useRef("none"),l=e?"mounted":"unmounted",[u,d]=$4(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const h=Pd(r.current);o.current=u==="mounted"?h:"none"},[u]),xn(()=>{const h=r.current,g=s.current;if(g!==e){const x=o.current,v=Pd(h);e?d("MOUNT"):v==="none"||(h==null?void 0:h.display)==="none"?d("UNMOUNT"):d(g&&x!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,d]),xn(()=>{if(t){let h;const g=t.ownerDocument.defaultView??window,p=v=>{const k=Pd(r.current).includes(v.animationName);if(v.target===t&&k&&(d("ANIMATION_END"),!s.current)){const E=t.style.animationFillMode;t.style.animationFillMode="forwards",h=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=E)})}},x=v=>{v.target===t&&(o.current=Pd(r.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{g.clearTimeout(h),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:w.useCallback(h=>{r.current=h?getComputedStyle(h):null,n(h)},[])}}function Pd(e){return(e==null?void 0:e.animationName)||"none"}function G4(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Y4=zx[" useId ".trim().toString()]||(()=>{}),Z4=0;function Jr(e){const[t,n]=w.useState(Y4());return xn(()=>{n(r=>r??String(Z4++))},[e]),t?`radix-${t}`:""}var X4=w.createContext(void 0);function Wf(e){const t=w.useContext(X4);return e||t||"ltr"}function yn(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function K4(e,t=globalThis==null?void 0:globalThis.document){const n=yn(e);w.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var W4="DismissableLayer",ay="dismissableLayer.update",Q4="dismissableLayer.pointerDownOutside",J4="dismissableLayer.focusOutside",ZS,WE=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nu=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:l,onDismiss:u,...d}=e,h=w.useContext(WE),[g,p]=w.useState(null),x=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=w.useState({}),S=ot(t,D=>p(D)),k=Array.from(h.layers),[E]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),T=k.indexOf(E),A=g?k.indexOf(g):-1,O=h.layersWithOutsidePointerEventsDisabled.size>0,R=A>=T,M=n3(D=>{const P=D.target,B=[...h.branches].some(z=>z.contains(P));!R||B||(s==null||s(D),l==null||l(D),D.defaultPrevented||u==null||u())},x),_=r3(D=>{const P=D.target;[...h.branches].some(z=>z.contains(P))||(o==null||o(D),l==null||l(D),D.defaultPrevented||u==null||u())},x);return K4(D=>{A===h.layers.size-1&&(r==null||r(D),!D.defaultPrevented&&u&&(D.preventDefault(),u()))},x),w.useEffect(()=>{if(g)return n&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(ZS=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),XS(),()=>{n&&h.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=ZS)}},[g,x,n,h]),w.useEffect(()=>()=>{g&&(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),XS())},[g,h]),w.useEffect(()=>{const D=()=>v({});return document.addEventListener(ay,D),()=>document.removeEventListener(ay,D)},[]),m.jsx(qe.div,{...d,ref:S,style:{pointerEvents:O?R?"auto":"none":void 0,...e.style},onFocusCapture:ke(e.onFocusCapture,_.onFocusCapture),onBlurCapture:ke(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:ke(e.onPointerDownCapture,M.onPointerDownCapture)})});nu.displayName=W4;var e3="DismissableLayerBranch",t3=w.forwardRef((e,t)=>{const n=w.useContext(WE),r=w.useRef(null),s=ot(t,r);return w.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),m.jsx(qe.div,{...e,ref:s})});t3.displayName=e3;function n3(e,t=globalThis==null?void 0:globalThis.document){const n=yn(e),r=w.useRef(!1),s=w.useRef(()=>{});return w.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let d=function(){QE(Q4,n,h,{discrete:!0})};const h={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=d,t.addEventListener("click",s.current,{once:!0})):d()}else t.removeEventListener("click",s.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function r3(e,t=globalThis==null?void 0:globalThis.document){const n=yn(e),r=w.useRef(!1);return w.useEffect(()=>{const s=o=>{o.target&&!r.current&&QE(J4,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function XS(){const e=new CustomEvent(ay);document.dispatchEvent(e)}function QE(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?ZE(s,o):s.dispatchEvent(o)}var Jp="focusScope.autoFocusOnMount",eg="focusScope.autoFocusOnUnmount",KS={bubbles:!1,cancelable:!0},i3="FocusScope",Qf=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...l}=e,[u,d]=w.useState(null),h=yn(s),g=yn(o),p=w.useRef(null),x=ot(t,k=>d(k)),v=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let k=function(O){if(v.paused||!u)return;const R=O.target;u.contains(R)?p.current=R:ha(p.current,{select:!0})},E=function(O){if(v.paused||!u)return;const R=O.relatedTarget;R!==null&&(u.contains(R)||ha(p.current,{select:!0}))},T=function(O){if(document.activeElement===document.body)for(const M of O)M.removedNodes.length>0&&ha(u)};document.addEventListener("focusin",k),document.addEventListener("focusout",E);const A=new MutationObserver(T);return u&&A.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",E),A.disconnect()}}},[r,u,v.paused]),w.useEffect(()=>{if(u){QS.add(v);const k=document.activeElement;if(!u.contains(k)){const T=new CustomEvent(Jp,KS);u.addEventListener(Jp,h),u.dispatchEvent(T),T.defaultPrevented||(a3(u3(JE(u)),{select:!0}),document.activeElement===k&&ha(u))}return()=>{u.removeEventListener(Jp,h),setTimeout(()=>{const T=new CustomEvent(eg,KS);u.addEventListener(eg,g),u.dispatchEvent(T),T.defaultPrevented||ha(k??document.body,{select:!0}),u.removeEventListener(eg,g),QS.remove(v)},0)}}},[u,h,g,v]);const S=w.useCallback(k=>{if(!n&&!r||v.paused)return;const E=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,T=document.activeElement;if(E&&T){const A=k.currentTarget,[O,R]=s3(A);O&&R?!k.shiftKey&&T===R?(k.preventDefault(),n&&ha(O,{select:!0})):k.shiftKey&&T===O&&(k.preventDefault(),n&&ha(R,{select:!0})):T===A&&k.preventDefault()}},[n,r,v.paused]);return m.jsx(qe.div,{tabIndex:-1,...l,ref:x,onKeyDown:S})});Qf.displayName=i3;function a3(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ha(r,{select:t}),document.activeElement!==n)return}function s3(e){const t=JE(e),n=WS(t,e),r=WS(t.reverse(),e);return[n,r]}function JE(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function WS(e,t){for(const n of e)if(!o3(n,{upTo:t}))return n}function o3(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function l3(e){return e instanceof HTMLInputElement&&"select"in e}function ha(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&l3(e)&&t&&e.select()}}var QS=c3();function c3(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=JS(e,t),e.unshift(t)},remove(t){var n;e=JS(e,t),(n=e[0])==null||n.resume()}}}function JS(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function u3(e){return e.filter(t=>t.tagName!=="A")}var d3="Portal",ru=w.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[s,o]=w.useState(!1);xn(()=>o(!0),[]);const l=n||s&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?GE.createPortal(m.jsx(qe.div,{...r,ref:t}),l):null});ru.displayName=d3;var tg=0;function Ux(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ek()),document.body.insertAdjacentElement("beforeend",e[1]??ek()),tg++,()=>{tg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),tg--}},[])}function ek(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Wr=function(){return Wr=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Wr.apply(this,arguments)};function e_(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function f3(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,o;r<s;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var Jd="right-scroll-bar-position",ef="width-before-scroll-bar",h3="with-scroll-bars-hidden",m3="--removed-body-scroll-bar-size";function ng(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function p3(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var g3=typeof window<"u"?w.useLayoutEffect:w.useEffect,tk=new WeakMap;function y3(e,t){var n=p3(null,function(r){return e.forEach(function(s){return ng(s,r)})});return g3(function(){var r=tk.get(n);if(r){var s=new Set(r),o=new Set(e),l=n.current;s.forEach(function(u){o.has(u)||ng(u,null)}),o.forEach(function(u){s.has(u)||ng(u,l)})}tk.set(n,e)},[e]),n}function x3(e){return e}function v3(e,t){t===void 0&&(t=x3);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(u){return o(u)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(o),l=n}var d=function(){var g=l;l=[],g.forEach(o)},h=function(){return Promise.resolve().then(d)};h(),n={push:function(g){l.push(g),h()},filter:function(g){return l=l.filter(g),n}}}};return s}function b3(e){e===void 0&&(e={});var t=v3(null);return t.options=Wr({async:!0,ssr:!1},e),t}var t_=function(e){var t=e.sideCar,n=e_(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return w.createElement(r,Wr({},n))};t_.isSideCarExport=!0;function w3(e,t){return e.useMedium(t),t_}var n_=b3(),rg=function(){},Jf=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:rg,onWheelCapture:rg,onTouchMoveCapture:rg}),s=r[0],o=r[1],l=e.forwardProps,u=e.children,d=e.className,h=e.removeScrollBar,g=e.enabled,p=e.shards,x=e.sideCar,v=e.noRelative,S=e.noIsolation,k=e.inert,E=e.allowPinchZoom,T=e.as,A=T===void 0?"div":T,O=e.gapMode,R=e_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=x,_=y3([n,t]),D=Wr(Wr({},R),s);return w.createElement(w.Fragment,null,g&&w.createElement(M,{sideCar:n_,removeScrollBar:h,shards:p,noRelative:v,noIsolation:S,inert:k,setCallbacks:o,allowPinchZoom:!!E,lockRef:n,gapMode:O}),l?w.cloneElement(w.Children.only(u),Wr(Wr({},D),{ref:_})):w.createElement(A,Wr({},D,{className:d,ref:_}),u))});Jf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Jf.classNames={fullWidth:ef,zeroRight:Jd};var S3=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function k3(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=S3();return t&&e.setAttribute("nonce",t),e}function C3(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function T3(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var E3=function(){var e=0,t=null;return{add:function(n){e==0&&(t=k3())&&(C3(t,n),T3(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},_3=function(){var e=E3();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},r_=function(){var e=_3(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},j3={left:0,top:0,right:0,gap:0},ig=function(e){return parseInt(e||"",10)||0},N3=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[ig(n),ig(r),ig(s)]},A3=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return j3;var t=N3(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},R3=r_(),Oo="data-scroll-locked",M3=function(e,t,n,r){var s=e.left,o=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
50
+ .`.concat(h3,` {
51
+ overflow: hidden `).concat(r,`;
52
+ padding-right: `).concat(u,"px ").concat(r,`;
53
+ }
54
+ body[`).concat(Oo,`] {
55
+ overflow: hidden `).concat(r,`;
56
+ overscroll-behavior: contain;
57
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
58
+ padding-left: `.concat(s,`px;
59
+ padding-top: `).concat(o,`px;
60
+ padding-right: `).concat(l,`px;
61
+ margin-left:0;
62
+ margin-top:0;
63
+ margin-right: `).concat(u,"px ").concat(r,`;
64
+ `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
65
+ }
66
+
67
+ .`).concat(Jd,` {
68
+ right: `).concat(u,"px ").concat(r,`;
69
+ }
70
+
71
+ .`).concat(ef,` {
72
+ margin-right: `).concat(u,"px ").concat(r,`;
73
+ }
74
+
75
+ .`).concat(Jd," .").concat(Jd,` {
76
+ right: 0 `).concat(r,`;
77
+ }
78
+
79
+ .`).concat(ef," .").concat(ef,` {
80
+ margin-right: 0 `).concat(r,`;
81
+ }
82
+
83
+ body[`).concat(Oo,`] {
84
+ `).concat(m3,": ").concat(u,`px;
85
+ }
86
+ `)},nk=function(){var e=parseInt(document.body.getAttribute(Oo)||"0",10);return isFinite(e)?e:0},O3=function(){w.useEffect(function(){return document.body.setAttribute(Oo,(nk()+1).toString()),function(){var e=nk()-1;e<=0?document.body.removeAttribute(Oo):document.body.setAttribute(Oo,e.toString())}},[])},D3=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;O3();var o=w.useMemo(function(){return A3(s)},[s]);return w.createElement(R3,{styles:M3(o,!t,s,n?"":"!important")})},sy=!1;if(typeof window<"u")try{var zd=Object.defineProperty({},"passive",{get:function(){return sy=!0,!0}});window.addEventListener("test",zd,zd),window.removeEventListener("test",zd,zd)}catch{sy=!1}var yo=sy?{passive:!1}:!1,P3=function(e){return e.tagName==="TEXTAREA"},i_=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!P3(e)&&n[t]==="visible")},z3=function(e){return i_(e,"overflowY")},L3=function(e){return i_(e,"overflowX")},rk=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=a_(e,r);if(s){var o=s_(e,r),l=o[1],u=o[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},I3=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},B3=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},a_=function(e,t){return e==="v"?z3(t):L3(t)},s_=function(e,t){return e==="v"?I3(t):B3(t)},V3=function(e,t){return e==="h"&&t==="rtl"?-1:1},U3=function(e,t,n,r,s){var o=V3(e,window.getComputedStyle(t).direction),l=o*r,u=n.target,d=t.contains(u),h=!1,g=l>0,p=0,x=0;do{if(!u)break;var v=s_(e,u),S=v[0],k=v[1],E=v[2],T=k-E-o*S;(S||T)&&a_(e,u)&&(p+=T,x+=S);var A=u.parentNode;u=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(g&&Math.abs(p)<1||!g&&Math.abs(x)<1)&&(h=!0),h},Ld=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ik=function(e){return[e.deltaX,e.deltaY]},ak=function(e){return e&&"current"in e?e.current:e},H3=function(e,t){return e[0]===t[0]&&e[1]===t[1]},F3=function(e){return`
87
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
88
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
89
+ `)},$3=0,xo=[];function q3(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),s=w.useState($3++)[0],o=w.useState(r_)[0],l=w.useRef(e);w.useEffect(function(){l.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var k=f3([e.lockRef.current],(e.shards||[]).map(ak),!0).filter(Boolean);return k.forEach(function(E){return E.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),k.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var u=w.useCallback(function(k,E){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!l.current.allowPinchZoom;var T=Ld(k),A=n.current,O="deltaX"in k?k.deltaX:A[0]-T[0],R="deltaY"in k?k.deltaY:A[1]-T[1],M,_=k.target,D=Math.abs(O)>Math.abs(R)?"h":"v";if("touches"in k&&D==="h"&&_.type==="range")return!1;var P=rk(D,_);if(!P)return!0;if(P?M=D:(M=D==="v"?"h":"v",P=rk(D,_)),!P)return!1;if(!r.current&&"changedTouches"in k&&(O||R)&&(r.current=M),!M)return!0;var B=r.current||M;return U3(B,E,k,B==="h"?O:R)},[]),d=w.useCallback(function(k){var E=k;if(!(!xo.length||xo[xo.length-1]!==o)){var T="deltaY"in E?ik(E):Ld(E),A=t.current.filter(function(M){return M.name===E.type&&(M.target===E.target||E.target===M.shadowParent)&&H3(M.delta,T)})[0];if(A&&A.should){E.cancelable&&E.preventDefault();return}if(!A){var O=(l.current.shards||[]).map(ak).filter(Boolean).filter(function(M){return M.contains(E.target)}),R=O.length>0?u(E,O[0]):!l.current.noIsolation;R&&E.cancelable&&E.preventDefault()}}},[]),h=w.useCallback(function(k,E,T,A){var O={name:k,delta:E,target:T,should:A,shadowParent:G3(T)};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(R){return R!==O})},1)},[]),g=w.useCallback(function(k){n.current=Ld(k),r.current=void 0},[]),p=w.useCallback(function(k){h(k.type,ik(k),k.target,u(k,e.lockRef.current))},[]),x=w.useCallback(function(k){h(k.type,Ld(k),k.target,u(k,e.lockRef.current))},[]);w.useEffect(function(){return xo.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:x}),document.addEventListener("wheel",d,yo),document.addEventListener("touchmove",d,yo),document.addEventListener("touchstart",g,yo),function(){xo=xo.filter(function(k){return k!==o}),document.removeEventListener("wheel",d,yo),document.removeEventListener("touchmove",d,yo),document.removeEventListener("touchstart",g,yo)}},[]);var v=e.removeScrollBar,S=e.inert;return w.createElement(w.Fragment,null,S?w.createElement(o,{styles:F3(s)}):null,v?w.createElement(D3,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function G3(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Y3=w3(n_,q3);var eh=w.forwardRef(function(e,t){return w.createElement(Jf,Wr({},e,{ref:t,sideCar:Y3}))});eh.classNames=Jf.classNames;var Z3=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},vo=new WeakMap,Id=new WeakMap,Bd={},ag=0,o_=function(e){return e&&(e.host||o_(e.parentNode))},X3=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=o_(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},K3=function(e,t,n,r){var s=X3(t,Array.isArray(e)?e:[e]);Bd[n]||(Bd[n]=new WeakMap);var o=Bd[n],l=[],u=new Set,d=new Set(s),h=function(p){!p||u.has(p)||(u.add(p),h(p.parentNode))};s.forEach(h);var g=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(x){if(u.has(x))g(x);else try{var v=x.getAttribute(r),S=v!==null&&v!=="false",k=(vo.get(x)||0)+1,E=(o.get(x)||0)+1;vo.set(x,k),o.set(x,E),l.push(x),k===1&&S&&Id.set(x,!0),E===1&&x.setAttribute(n,"true"),S||x.setAttribute(r,"true")}catch(T){console.error("aria-hidden: cannot operate on ",x,T)}})};return g(t),u.clear(),ag++,function(){l.forEach(function(p){var x=vo.get(p)-1,v=o.get(p)-1;vo.set(p,x),o.set(p,v),x||(Id.has(p)||p.removeAttribute(r),Id.delete(p)),v||p.removeAttribute(n)}),ag--,ag||(vo=new WeakMap,vo=new WeakMap,Id=new WeakMap,Bd={})}},Hx=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=Z3(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),K3(r,s,n,"aria-hidden")):function(){return null}},th="Dialog",[l_,SJ]=Bi(th),[W3,Hr]=l_(th),c_=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:l=!0}=e,u=w.useRef(null),d=w.useRef(null),[h,g]=Bo({prop:r,defaultProp:s??!1,onChange:o,caller:th});return m.jsx(W3,{scope:t,triggerRef:u,contentRef:d,contentId:Jr(),titleId:Jr(),descriptionId:Jr(),open:h,onOpenChange:g,onOpenToggle:w.useCallback(()=>g(p=>!p),[g]),modal:l,children:n})};c_.displayName=th;var u_="DialogTrigger",Q3=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Hr(u_,n),o=ot(t,s.triggerRef);return m.jsx(qe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":qx(s.open),...r,ref:o,onClick:ke(e.onClick,s.onOpenToggle)})});Q3.displayName=u_;var Fx="DialogPortal",[J3,d_]=l_(Fx,{forceMount:void 0}),f_=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=Hr(Fx,t);return m.jsx(J3,{scope:t,forceMount:n,children:w.Children.map(r,l=>m.jsx($n,{present:n||o.open,children:m.jsx(ru,{asChild:!0,container:s,children:l})}))})};f_.displayName=Fx;var df="DialogOverlay",h_=w.forwardRef((e,t)=>{const n=d_(df,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Hr(df,e.__scopeDialog);return o.modal?m.jsx($n,{present:r||o.open,children:m.jsx(t5,{...s,ref:t})}):null});h_.displayName=df;var e5=ps("DialogOverlay.RemoveScroll"),t5=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Hr(df,n);return m.jsx(eh,{as:e5,allowPinchZoom:!0,shards:[s.contentRef],children:m.jsx(qe.div,{"data-state":qx(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),gs="DialogContent",m_=w.forwardRef((e,t)=>{const n=d_(gs,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Hr(gs,e.__scopeDialog);return m.jsx($n,{present:r||o.open,children:o.modal?m.jsx(n5,{...s,ref:t}):m.jsx(r5,{...s,ref:t})})});m_.displayName=gs;var n5=w.forwardRef((e,t)=>{const n=Hr(gs,e.__scopeDialog),r=w.useRef(null),s=ot(t,n.contentRef,r);return w.useEffect(()=>{const o=r.current;if(o)return Hx(o)},[]),m.jsx(p_,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ke(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:ke(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&o.preventDefault()}),onFocusOutside:ke(e.onFocusOutside,o=>o.preventDefault())})}),r5=w.forwardRef((e,t)=>{const n=Hr(gs,e.__scopeDialog),r=w.useRef(!1),s=w.useRef(!1);return m.jsx(p_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var d,h;(d=e.onInteractOutside)==null||d.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=o.target;((h=n.triggerRef.current)==null?void 0:h.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),p_=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...l}=e,u=Hr(gs,n),d=w.useRef(null),h=ot(t,d);return Ux(),m.jsxs(m.Fragment,{children:[m.jsx(Qf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:m.jsx(nu,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":qx(u.open),...l,ref:h,onDismiss:()=>u.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(i5,{titleId:u.titleId}),m.jsx(s5,{contentRef:d,descriptionId:u.descriptionId})]})]})}),$x="DialogTitle",g_=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Hr($x,n);return m.jsx(qe.h2,{id:s.titleId,...r,ref:t})});g_.displayName=$x;var y_="DialogDescription",x_=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Hr(y_,n);return m.jsx(qe.p,{id:s.descriptionId,...r,ref:t})});x_.displayName=y_;var v_="DialogClose",b_=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Hr(v_,n);return m.jsx(qe.button,{type:"button",...r,ref:t,onClick:ke(e.onClick,()=>s.onOpenChange(!1))})});b_.displayName=v_;function qx(e){return e?"open":"closed"}var w_="DialogTitleWarning",[kJ,S_]=B4(w_,{contentName:gs,titleName:$x,docsSlug:"dialog"}),i5=({titleId:e})=>{const t=S_(w_),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
90
+
91
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
92
+
93
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},a5="DialogDescriptionWarning",s5=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${S_(a5).contentName}}.`;return w.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},k_=c_,C_=f_,T_=h_,E_=m_,__=g_,j_=x_,N_=b_;function o5(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function l5(e){const[t,n]=w.useState(void 0);return xn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let l,u;if("borderBoxSize"in o){const d=o.borderBoxSize,h=Array.isArray(d)?d[0]:d;l=h.inlineSize,u=h.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const c5=["top","right","bottom","left"],ba=Math.min,ir=Math.max,ff=Math.round,Vd=Math.floor,ei=e=>({x:e,y:e}),u5={left:"right",right:"left",bottom:"top",top:"bottom"},d5={start:"end",end:"start"};function oy(e,t,n){return ir(e,ba(t,n))}function Oi(e,t){return typeof e=="function"?e(t):e}function Di(e){return e.split("-")[0]}function tl(e){return e.split("-")[1]}function Gx(e){return e==="x"?"y":"x"}function Yx(e){return e==="y"?"height":"width"}const f5=new Set(["top","bottom"]);function Qr(e){return f5.has(Di(e))?"y":"x"}function Zx(e){return Gx(Qr(e))}function h5(e,t,n){n===void 0&&(n=!1);const r=tl(e),s=Zx(e),o=Yx(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=hf(l)),[l,hf(l)]}function m5(e){const t=hf(e);return[ly(e),t,ly(t)]}function ly(e){return e.replace(/start|end/g,t=>d5[t])}const sk=["left","right"],ok=["right","left"],p5=["top","bottom"],g5=["bottom","top"];function y5(e,t,n){switch(e){case"top":case"bottom":return n?t?ok:sk:t?sk:ok;case"left":case"right":return t?p5:g5;default:return[]}}function x5(e,t,n,r){const s=tl(e);let o=y5(Di(e),n==="start",r);return s&&(o=o.map(l=>l+"-"+s),t&&(o=o.concat(o.map(ly)))),o}function hf(e){return e.replace(/left|right|bottom|top/g,t=>u5[t])}function v5(e){return{top:0,right:0,bottom:0,left:0,...e}}function A_(e){return typeof e!="number"?v5(e):{top:e,right:e,bottom:e,left:e}}function mf(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function lk(e,t,n){let{reference:r,floating:s}=e;const o=Qr(t),l=Zx(t),u=Yx(l),d=Di(t),h=o==="y",g=r.x+r.width/2-s.width/2,p=r.y+r.height/2-s.height/2,x=r[u]/2-s[u]/2;let v;switch(d){case"top":v={x:g,y:r.y-s.height};break;case"bottom":v={x:g,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:p};break;case"left":v={x:r.x-s.width,y:p};break;default:v={x:r.x,y:r.y}}switch(tl(t)){case"start":v[l]-=x*(n&&h?-1:1);break;case"end":v[l]+=x*(n&&h?-1:1);break}return v}const b5=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:l}=n,u=o.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:g,y:p}=lk(h,r,d),x=r,v={},S=0;for(let k=0;k<u.length;k++){const{name:E,fn:T}=u[k],{x:A,y:O,data:R,reset:M}=await T({x:g,y:p,initialPlacement:r,placement:x,strategy:s,middlewareData:v,rects:h,platform:l,elements:{reference:e,floating:t}});g=A??g,p=O??p,v={...v,[E]:{...v[E],...R}},M&&S<=50&&(S++,typeof M=="object"&&(M.placement&&(x=M.placement),M.rects&&(h=M.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):M.rects),{x:g,y:p}=lk(h,x,d)),k=-1)}return{x:g,y:p,placement:x,strategy:s,middlewareData:v}};async function zc(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:l,elements:u,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:x=!1,padding:v=0}=Oi(t,e),S=A_(v),E=u[x?p==="floating"?"reference":"floating":p],T=mf(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(E)))==null||n?E:E.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:h,rootBoundary:g,strategy:d})),A=p==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),R=await(o.isElement==null?void 0:o.isElement(O))?await(o.getScale==null?void 0:o.getScale(O))||{x:1,y:1}:{x:1,y:1},M=mf(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:A,offsetParent:O,strategy:d}):A);return{top:(T.top-M.top+S.top)/R.y,bottom:(M.bottom-T.bottom+S.bottom)/R.y,left:(T.left-M.left+S.left)/R.x,right:(M.right-T.right+S.right)/R.x}}const w5=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:l,elements:u,middlewareData:d}=t,{element:h,padding:g=0}=Oi(e,t)||{};if(h==null)return{};const p=A_(g),x={x:n,y:r},v=Zx(s),S=Yx(v),k=await l.getDimensions(h),E=v==="y",T=E?"top":"left",A=E?"bottom":"right",O=E?"clientHeight":"clientWidth",R=o.reference[S]+o.reference[v]-x[v]-o.floating[S],M=x[v]-o.reference[v],_=await(l.getOffsetParent==null?void 0:l.getOffsetParent(h));let D=_?_[O]:0;(!D||!await(l.isElement==null?void 0:l.isElement(_)))&&(D=u.floating[O]||o.floating[S]);const P=R/2-M/2,B=D/2-k[S]/2-1,z=ba(p[T],B),H=ba(p[A],B),$=z,re=D-k[S]-H,te=D/2-k[S]/2+P,ie=oy($,te,re),I=!d.arrow&&tl(s)!=null&&te!==ie&&o.reference[S]/2-(te<$?z:H)-k[S]/2<0,F=I?te<$?te-$:te-re:0;return{[v]:x[v]+F,data:{[v]:ie,centerOffset:te-ie-F,...I&&{alignmentOffset:F}},reset:I}}}),S5=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:l,initialPlacement:u,platform:d,elements:h}=t,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:x,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:k=!0,...E}=Oi(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const T=Di(s),A=Qr(u),O=Di(u)===u,R=await(d.isRTL==null?void 0:d.isRTL(h.floating)),M=x||(O||!k?[hf(u)]:m5(u)),_=S!=="none";!x&&_&&M.push(...x5(u,k,S,R));const D=[u,...M],P=await zc(t,E),B=[];let z=((r=o.flip)==null?void 0:r.overflows)||[];if(g&&B.push(P[T]),p){const te=h5(s,l,R);B.push(P[te[0]],P[te[1]])}if(z=[...z,{placement:s,overflows:B}],!B.every(te=>te<=0)){var H,$;const te=(((H=o.flip)==null?void 0:H.index)||0)+1,ie=D[te];if(ie&&(!(p==="alignment"?A!==Qr(ie):!1)||z.every(V=>Qr(V.placement)===A?V.overflows[0]>0:!0)))return{data:{index:te,overflows:z},reset:{placement:ie}};let I=($=z.filter(F=>F.overflows[0]<=0).sort((F,V)=>F.overflows[1]-V.overflows[1])[0])==null?void 0:$.placement;if(!I)switch(v){case"bestFit":{var re;const F=(re=z.filter(V=>{if(_){const Z=Qr(V.placement);return Z===A||Z==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(Z=>Z>0).reduce((Z,C)=>Z+C,0)]).sort((V,Z)=>V[1]-Z[1])[0])==null?void 0:re[0];F&&(I=F);break}case"initialPlacement":I=u;break}if(s!==I)return{reset:{placement:I}}}return{}}}};function ck(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function uk(e){return c5.some(t=>e[t]>=0)}const k5=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Oi(e,t);switch(r){case"referenceHidden":{const o=await zc(t,{...s,elementContext:"reference"}),l=ck(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:uk(l)}}}case"escaped":{const o=await zc(t,{...s,altBoundary:!0}),l=ck(o,n.floating);return{data:{escapedOffsets:l,escaped:uk(l)}}}default:return{}}}}},R_=new Set(["left","top"]);async function C5(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=Di(n),u=tl(n),d=Qr(n)==="y",h=R_.has(l)?-1:1,g=o&&d?-1:1,p=Oi(t,e);let{mainAxis:x,crossAxis:v,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof S=="number"&&(v=u==="end"?S*-1:S),d?{x:v*g,y:x*h}:{x:x*h,y:v*g}}const T5=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:l,middlewareData:u}=t,d=await C5(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:s+d.x,y:o+d.y,data:{...d,placement:l}}}}},E5=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:u={fn:E=>{let{x:T,y:A}=E;return{x:T,y:A}}},...d}=Oi(e,t),h={x:n,y:r},g=await zc(t,d),p=Qr(Di(s)),x=Gx(p);let v=h[x],S=h[p];if(o){const E=x==="y"?"top":"left",T=x==="y"?"bottom":"right",A=v+g[E],O=v-g[T];v=oy(A,v,O)}if(l){const E=p==="y"?"top":"left",T=p==="y"?"bottom":"right",A=S+g[E],O=S-g[T];S=oy(A,S,O)}const k=u.fn({...t,[x]:v,[p]:S});return{...k,data:{x:k.x-n,y:k.y-r,enabled:{[x]:o,[p]:l}}}}}},_5=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:h=!0}=Oi(e,t),g={x:n,y:r},p=Qr(s),x=Gx(p);let v=g[x],S=g[p];const k=Oi(u,t),E=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(d){const O=x==="y"?"height":"width",R=o.reference[x]-o.floating[O]+E.mainAxis,M=o.reference[x]+o.reference[O]-E.mainAxis;v<R?v=R:v>M&&(v=M)}if(h){var T,A;const O=x==="y"?"width":"height",R=R_.has(Di(s)),M=o.reference[p]-o.floating[O]+(R&&((T=l.offset)==null?void 0:T[p])||0)+(R?0:E.crossAxis),_=o.reference[p]+o.reference[O]+(R?0:((A=l.offset)==null?void 0:A[p])||0)-(R?E.crossAxis:0);S<M?S=M:S>_&&(S=_)}return{[x]:v,[p]:S}}}},j5=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:o,platform:l,elements:u}=t,{apply:d=()=>{},...h}=Oi(e,t),g=await zc(t,h),p=Di(s),x=tl(s),v=Qr(s)==="y",{width:S,height:k}=o.floating;let E,T;p==="top"||p==="bottom"?(E=p,T=x===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(T=p,E=x==="end"?"top":"bottom");const A=k-g.top-g.bottom,O=S-g.left-g.right,R=ba(k-g[E],A),M=ba(S-g[T],O),_=!t.middlewareData.shift;let D=R,P=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=O),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(D=A),_&&!x){const z=ir(g.left,0),H=ir(g.right,0),$=ir(g.top,0),re=ir(g.bottom,0);v?P=S-2*(z!==0||H!==0?z+H:ir(g.left,g.right)):D=k-2*($!==0||re!==0?$+re:ir(g.top,g.bottom))}await d({...t,availableWidth:P,availableHeight:D});const B=await l.getDimensions(u.floating);return S!==B.width||k!==B.height?{reset:{rects:!0}}:{}}}};function nh(){return typeof window<"u"}function nl(e){return M_(e)?(e.nodeName||"").toLowerCase():"#document"}function sr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function oi(e){var t;return(t=(M_(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function M_(e){return nh()?e instanceof Node||e instanceof sr(e).Node:!1}function Vr(e){return nh()?e instanceof Element||e instanceof sr(e).Element:!1}function ai(e){return nh()?e instanceof HTMLElement||e instanceof sr(e).HTMLElement:!1}function dk(e){return!nh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof sr(e).ShadowRoot}const N5=new Set(["inline","contents"]);function iu(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Ur(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!N5.has(s)}const A5=new Set(["table","td","th"]);function R5(e){return A5.has(nl(e))}const M5=[":popover-open",":modal"];function rh(e){return M5.some(t=>{try{return e.matches(t)}catch{return!1}})}const O5=["transform","translate","scale","rotate","perspective"],D5=["transform","translate","scale","rotate","perspective","filter"],P5=["paint","layout","strict","content"];function Xx(e){const t=Kx(),n=Vr(e)?Ur(e):e;return O5.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||D5.some(r=>(n.willChange||"").includes(r))||P5.some(r=>(n.contain||"").includes(r))}function z5(e){let t=wa(e);for(;ai(t)&&!Vo(t);){if(Xx(t))return t;if(rh(t))return null;t=wa(t)}return null}function Kx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const L5=new Set(["html","body","#document"]);function Vo(e){return L5.has(nl(e))}function Ur(e){return sr(e).getComputedStyle(e)}function ih(e){return Vr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function wa(e){if(nl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||dk(e)&&e.host||oi(e);return dk(t)?t.host:t}function O_(e){const t=wa(e);return Vo(t)?e.ownerDocument?e.ownerDocument.body:e.body:ai(t)&&iu(t)?t:O_(t)}function Lc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=O_(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),l=sr(s);if(o){const u=cy(l);return t.concat(l,l.visualViewport||[],iu(s)?s:[],u&&n?Lc(u):[])}return t.concat(s,Lc(s,[],n))}function cy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function D_(e){const t=Ur(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=ai(e),o=s?e.offsetWidth:n,l=s?e.offsetHeight:r,u=ff(n)!==o||ff(r)!==l;return u&&(n=o,r=l),{width:n,height:r,$:u}}function Wx(e){return Vr(e)?e:e.contextElement}function Do(e){const t=Wx(e);if(!ai(t))return ei(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=D_(t);let l=(o?ff(n.width):n.width)/r,u=(o?ff(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const I5=ei(0);function P_(e){const t=sr(e);return!Kx()||!t.visualViewport?I5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function B5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==sr(e)?!1:t}function ys(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=Wx(e);let l=ei(1);t&&(r?Vr(r)&&(l=Do(r)):l=Do(e));const u=B5(o,n,r)?P_(o):ei(0);let d=(s.left+u.x)/l.x,h=(s.top+u.y)/l.y,g=s.width/l.x,p=s.height/l.y;if(o){const x=sr(o),v=r&&Vr(r)?sr(r):r;let S=x,k=cy(S);for(;k&&r&&v!==S;){const E=Do(k),T=k.getBoundingClientRect(),A=Ur(k),O=T.left+(k.clientLeft+parseFloat(A.paddingLeft))*E.x,R=T.top+(k.clientTop+parseFloat(A.paddingTop))*E.y;d*=E.x,h*=E.y,g*=E.x,p*=E.y,d+=O,h+=R,S=sr(k),k=cy(S)}}return mf({width:g,height:p,x:d,y:h})}function Qx(e,t){const n=ih(e).scrollLeft;return t?t.left+n:ys(oi(e)).left+n}function z_(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:Qx(e,r)),o=r.top+t.scrollTop;return{x:s,y:o}}function V5(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",l=oi(r),u=t?rh(t.floating):!1;if(r===l||u&&o)return n;let d={scrollLeft:0,scrollTop:0},h=ei(1);const g=ei(0),p=ai(r);if((p||!p&&!o)&&((nl(r)!=="body"||iu(l))&&(d=ih(r)),ai(r))){const v=ys(r);h=Do(r),g.x=v.x+r.clientLeft,g.y=v.y+r.clientTop}const x=l&&!p&&!o?z_(l,d,!0):ei(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+g.x+x.x,y:n.y*h.y-d.scrollTop*h.y+g.y+x.y}}function U5(e){return Array.from(e.getClientRects())}function H5(e){const t=oi(e),n=ih(e),r=e.ownerDocument.body,s=ir(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=ir(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Qx(e);const u=-n.scrollTop;return Ur(r).direction==="rtl"&&(l+=ir(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:l,y:u}}function F5(e,t){const n=sr(e),r=oi(e),s=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,u=0,d=0;if(s){o=s.width,l=s.height;const h=Kx();(!h||h&&t==="fixed")&&(u=s.offsetLeft,d=s.offsetTop)}return{width:o,height:l,x:u,y:d}}const $5=new Set(["absolute","fixed"]);function q5(e,t){const n=ys(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=ai(e)?Do(e):ei(1),l=e.clientWidth*o.x,u=e.clientHeight*o.y,d=s*o.x,h=r*o.y;return{width:l,height:u,x:d,y:h}}function fk(e,t,n){let r;if(t==="viewport")r=F5(e,n);else if(t==="document")r=H5(oi(e));else if(Vr(t))r=q5(t,n);else{const s=P_(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return mf(r)}function L_(e,t){const n=wa(e);return n===t||!Vr(n)||Vo(n)?!1:Ur(n).position==="fixed"||L_(n,t)}function G5(e,t){const n=t.get(e);if(n)return n;let r=Lc(e,[],!1).filter(u=>Vr(u)&&nl(u)!=="body"),s=null;const o=Ur(e).position==="fixed";let l=o?wa(e):e;for(;Vr(l)&&!Vo(l);){const u=Ur(l),d=Xx(l);!d&&u.position==="fixed"&&(s=null),(o?!d&&!s:!d&&u.position==="static"&&!!s&&$5.has(s.position)||iu(l)&&!d&&L_(e,l))?r=r.filter(g=>g!==l):s=u,l=wa(l)}return t.set(e,r),r}function Y5(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?rh(t)?[]:G5(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((h,g)=>{const p=fk(t,g,s);return h.top=ir(p.top,h.top),h.right=ba(p.right,h.right),h.bottom=ba(p.bottom,h.bottom),h.left=ir(p.left,h.left),h},fk(t,u,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function Z5(e){const{width:t,height:n}=D_(e);return{width:t,height:n}}function X5(e,t,n){const r=ai(t),s=oi(t),o=n==="fixed",l=ys(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const d=ei(0);function h(){d.x=Qx(s)}if(r||!r&&!o)if((nl(t)!=="body"||iu(s))&&(u=ih(t)),r){const v=ys(t,!0,o,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else s&&h();o&&!r&&s&&h();const g=s&&!r&&!o?z_(s,u):ei(0),p=l.left+u.scrollLeft-d.x-g.x,x=l.top+u.scrollTop-d.y-g.y;return{x:p,y:x,width:l.width,height:l.height}}function sg(e){return Ur(e).position==="static"}function hk(e,t){if(!ai(e)||Ur(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return oi(e)===n&&(n=n.ownerDocument.body),n}function I_(e,t){const n=sr(e);if(rh(e))return n;if(!ai(e)){let s=wa(e);for(;s&&!Vo(s);){if(Vr(s)&&!sg(s))return s;s=wa(s)}return n}let r=hk(e,t);for(;r&&R5(r)&&sg(r);)r=hk(r,t);return r&&Vo(r)&&sg(r)&&!Xx(r)?n:r||z5(e)||n}const K5=async function(e){const t=this.getOffsetParent||I_,n=this.getDimensions,r=await n(e.floating);return{reference:X5(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function W5(e){return Ur(e).direction==="rtl"}const Q5={convertOffsetParentRelativeRectToViewportRelativeRect:V5,getDocumentElement:oi,getClippingRect:Y5,getOffsetParent:I_,getElementRects:K5,getClientRects:U5,getDimensions:Z5,getScale:Do,isElement:Vr,isRTL:W5};function B_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function J5(e,t){let n=null,r;const s=oi(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),o();const h=e.getBoundingClientRect(),{left:g,top:p,width:x,height:v}=h;if(u||t(),!x||!v)return;const S=Vd(p),k=Vd(s.clientWidth-(g+x)),E=Vd(s.clientHeight-(p+v)),T=Vd(g),O={rootMargin:-S+"px "+-k+"px "+-E+"px "+-T+"px",threshold:ir(0,ba(1,d))||1};let R=!0;function M(_){const D=_[0].intersectionRatio;if(D!==d){if(!R)return l();D?l(!1,D):r=setTimeout(()=>{l(!1,1e-7)},1e3)}D===1&&!B_(h,e.getBoundingClientRect())&&l(),R=!1}try{n=new IntersectionObserver(M,{...O,root:s.ownerDocument})}catch{n=new IntersectionObserver(M,O)}n.observe(e)}return l(!0),o}function eP(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=Wx(e),g=s||o?[...h?Lc(h):[],...Lc(t)]:[];g.forEach(T=>{s&&T.addEventListener("scroll",n,{passive:!0}),o&&T.addEventListener("resize",n)});const p=h&&u?J5(h,n):null;let x=-1,v=null;l&&(v=new ResizeObserver(T=>{let[A]=T;A&&A.target===h&&v&&(v.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var O;(O=v)==null||O.observe(t)})),n()}),h&&!d&&v.observe(h),v.observe(t));let S,k=d?ys(e):null;d&&E();function E(){const T=ys(e);k&&!B_(k,T)&&n(),k=T,S=requestAnimationFrame(E)}return n(),()=>{var T;g.forEach(A=>{s&&A.removeEventListener("scroll",n),o&&A.removeEventListener("resize",n)}),p==null||p(),(T=v)==null||T.disconnect(),v=null,d&&cancelAnimationFrame(S)}}const tP=T5,nP=E5,rP=S5,iP=j5,aP=k5,mk=w5,sP=_5,oP=(e,t,n)=>{const r=new Map,s={platform:Q5,...n},o={...s.platform,_c:r};return b5(e,t,{...s,platform:o})};var lP=typeof document<"u",cP=function(){},tf=lP?w.useLayoutEffect:cP;function pf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!pf(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!pf(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function V_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pk(e,t){const n=V_(e);return Math.round(t*n)/n}function og(e){const t=w.useRef(e);return tf(()=>{t.current=e}),t}function uP(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:l}={},transform:u=!0,whileElementsMounted:d,open:h}=e,[g,p]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[x,v]=w.useState(r);pf(x,r)||v(r);const[S,k]=w.useState(null),[E,T]=w.useState(null),A=w.useCallback(V=>{V!==_.current&&(_.current=V,k(V))},[]),O=w.useCallback(V=>{V!==D.current&&(D.current=V,T(V))},[]),R=o||S,M=l||E,_=w.useRef(null),D=w.useRef(null),P=w.useRef(g),B=d!=null,z=og(d),H=og(s),$=og(h),re=w.useCallback(()=>{if(!_.current||!D.current)return;const V={placement:t,strategy:n,middleware:x};H.current&&(V.platform=H.current),oP(_.current,D.current,V).then(Z=>{const C={...Z,isPositioned:$.current!==!1};te.current&&!pf(P.current,C)&&(P.current=C,tu.flushSync(()=>{p(C)}))})},[x,t,n,H,$]);tf(()=>{h===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(V=>({...V,isPositioned:!1})))},[h]);const te=w.useRef(!1);tf(()=>(te.current=!0,()=>{te.current=!1}),[]),tf(()=>{if(R&&(_.current=R),M&&(D.current=M),R&&M){if(z.current)return z.current(R,M,re);re()}},[R,M,re,z,B]);const ie=w.useMemo(()=>({reference:_,floating:D,setReference:A,setFloating:O}),[A,O]),I=w.useMemo(()=>({reference:R,floating:M}),[R,M]),F=w.useMemo(()=>{const V={position:n,left:0,top:0};if(!I.floating)return V;const Z=pk(I.floating,g.x),C=pk(I.floating,g.y);return u?{...V,transform:"translate("+Z+"px, "+C+"px)",...V_(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Z,top:C}},[n,u,I.floating,g.x,g.y]);return w.useMemo(()=>({...g,update:re,refs:ie,elements:I,floatingStyles:F}),[g,re,ie,I,F])}const dP=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?mk({element:r.current,padding:s}).fn(n):{}:r?mk({element:r,padding:s}).fn(n):{}}}},fP=(e,t)=>({...tP(e),options:[e,t]}),hP=(e,t)=>({...nP(e),options:[e,t]}),mP=(e,t)=>({...sP(e),options:[e,t]}),pP=(e,t)=>({...rP(e),options:[e,t]}),gP=(e,t)=>({...iP(e),options:[e,t]}),yP=(e,t)=>({...aP(e),options:[e,t]}),xP=(e,t)=>({...dP(e),options:[e,t]});var vP="Arrow",U_=w.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return m.jsx(qe.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});U_.displayName=vP;var bP=U_,Jx="Popper",[H_,rl]=Bi(Jx),[wP,F_]=H_(Jx),$_=e=>{const{__scopePopper:t,children:n}=e,[r,s]=w.useState(null);return m.jsx(wP,{scope:t,anchor:r,onAnchorChange:s,children:n})};$_.displayName=Jx;var q_="PopperAnchor",G_=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=F_(q_,n),l=w.useRef(null),u=ot(t,l);return w.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:m.jsx(qe.div,{...s,ref:u})});G_.displayName=q_;var ev="PopperContent",[SP,kP]=H_(ev),Y_=w.forwardRef((e,t)=>{var Y,oe,ce,me,be,Te;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:g=0,sticky:p="partial",hideWhenDetached:x=!1,updatePositionStrategy:v="optimized",onPlaced:S,...k}=e,E=F_(ev,n),[T,A]=w.useState(null),O=ot(t,Ve=>A(Ve)),[R,M]=w.useState(null),_=l5(R),D=(_==null?void 0:_.width)??0,P=(_==null?void 0:_.height)??0,B=r+(o!=="center"?"-"+o:""),z=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},H=Array.isArray(h)?h:[h],$=H.length>0,re={padding:z,boundary:H.filter(TP),altBoundary:$},{refs:te,floatingStyles:ie,placement:I,isPositioned:F,middlewareData:V}=uP({strategy:"fixed",placement:B,whileElementsMounted:(...Ve)=>eP(...Ve,{animationFrame:v==="always"}),elements:{reference:E.anchor},middleware:[fP({mainAxis:s+P,alignmentAxis:l}),d&&hP({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?mP():void 0,...re}),d&&pP({...re}),gP({...re,apply:({elements:Ve,rects:lt,availableWidth:Mt,availableHeight:Lt})=>{const{width:st,height:yt}=lt.reference,kt=Ve.floating.style;kt.setProperty("--radix-popper-available-width",`${Mt}px`),kt.setProperty("--radix-popper-available-height",`${Lt}px`),kt.setProperty("--radix-popper-anchor-width",`${st}px`),kt.setProperty("--radix-popper-anchor-height",`${yt}px`)}}),R&&xP({element:R,padding:u}),EP({arrowWidth:D,arrowHeight:P}),x&&yP({strategy:"referenceHidden",...re})]}),[Z,C]=K_(I),G=yn(S);xn(()=>{F&&(G==null||G())},[F,G]);const le=(Y=V.arrow)==null?void 0:Y.x,N=(oe=V.arrow)==null?void 0:oe.y,K=((ce=V.arrow)==null?void 0:ce.centerOffset)!==0,[Q,X]=w.useState();return xn(()=>{T&&X(window.getComputedStyle(T).zIndex)},[T]),m.jsx("div",{ref:te.setFloating,"data-radix-popper-content-wrapper":"",style:{...ie,transform:F?ie.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[(me=V.transformOrigin)==null?void 0:me.x,(be=V.transformOrigin)==null?void 0:be.y].join(" "),...((Te=V.hide)==null?void 0:Te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(SP,{scope:n,placedSide:Z,onArrowChange:M,arrowX:le,arrowY:N,shouldHideArrow:K,children:m.jsx(qe.div,{"data-side":Z,"data-align":C,...k,ref:O,style:{...k.style,animation:F?void 0:"none"}})})})});Y_.displayName=ev;var Z_="PopperArrow",CP={top:"bottom",right:"left",bottom:"top",left:"right"},X_=w.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=kP(Z_,r),l=CP[o.placedSide];return m.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:m.jsx(bP,{...s,ref:n,style:{...s.style,display:"block"}})})});X_.displayName=Z_;function TP(e){return e!==null}var EP=e=>({name:"transformOrigin",options:e,fn(t){var E,T,A;const{placement:n,rects:r,middlewareData:s}=t,l=((E=s.arrow)==null?void 0:E.centerOffset)!==0,u=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[h,g]=K_(n),p={start:"0%",center:"50%",end:"100%"}[g],x=(((T=s.arrow)==null?void 0:T.x)??0)+u/2,v=(((A=s.arrow)==null?void 0:A.y)??0)+d/2;let S="",k="";return h==="bottom"?(S=l?p:`${x}px`,k=`${-d}px`):h==="top"?(S=l?p:`${x}px`,k=`${r.floating.height+d}px`):h==="right"?(S=`${-d}px`,k=l?p:`${v}px`):h==="left"&&(S=`${r.floating.width+d}px`,k=l?p:`${v}px`),{data:{x:S,y:k}}}});function K_(e){const[t,n="center"]=e.split("-");return[t,n]}var tv=$_,nv=G_,rv=Y_,iv=X_,lg="rovingFocusGroup.onEntryFocus",_P={bubbles:!1,cancelable:!0},au="RovingFocusGroup",[uy,W_,jP]=Vx(au),[NP,Q_]=Bi(au,[jP]),[AP,RP]=NP(au),J_=w.forwardRef((e,t)=>m.jsx(uy.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(uy.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(MP,{...e,ref:t})})}));J_.displayName=au;var MP=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:h,preventScrollOnEntryFocus:g=!1,...p}=e,x=w.useRef(null),v=ot(t,x),S=Wf(o),[k,E]=Bo({prop:l,defaultProp:u??null,onChange:d,caller:au}),[T,A]=w.useState(!1),O=yn(h),R=W_(n),M=w.useRef(!1),[_,D]=w.useState(0);return w.useEffect(()=>{const P=x.current;if(P)return P.addEventListener(lg,O),()=>P.removeEventListener(lg,O)},[O]),m.jsx(AP,{scope:n,orientation:r,dir:S,loop:s,currentTabStopId:k,onItemFocus:w.useCallback(P=>E(P),[E]),onItemShiftTab:w.useCallback(()=>A(!0),[]),onFocusableItemAdd:w.useCallback(()=>D(P=>P+1),[]),onFocusableItemRemove:w.useCallback(()=>D(P=>P-1),[]),children:m.jsx(qe.div,{tabIndex:T||_===0?-1:0,"data-orientation":r,...p,ref:v,style:{outline:"none",...e.style},onMouseDown:ke(e.onMouseDown,()=>{M.current=!0}),onFocus:ke(e.onFocus,P=>{const B=!M.current;if(P.target===P.currentTarget&&B&&!T){const z=new CustomEvent(lg,_P);if(P.currentTarget.dispatchEvent(z),!z.defaultPrevented){const H=R().filter(I=>I.focusable),$=H.find(I=>I.active),re=H.find(I=>I.id===k),ie=[$,re,...H].filter(Boolean).map(I=>I.ref.current);n2(ie,g)}}M.current=!1}),onBlur:ke(e.onBlur,()=>A(!1))})})}),e2="RovingFocusGroupItem",t2=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,children:l,...u}=e,d=Jr(),h=o||d,g=RP(e2,n),p=g.currentTabStopId===h,x=W_(n),{onFocusableItemAdd:v,onFocusableItemRemove:S,currentTabStopId:k}=g;return w.useEffect(()=>{if(r)return v(),()=>S()},[r,v,S]),m.jsx(uy.ItemSlot,{scope:n,id:h,focusable:r,active:s,children:m.jsx(qe.span,{tabIndex:p?0:-1,"data-orientation":g.orientation,...u,ref:t,onMouseDown:ke(e.onMouseDown,E=>{r?g.onItemFocus(h):E.preventDefault()}),onFocus:ke(e.onFocus,()=>g.onItemFocus(h)),onKeyDown:ke(e.onKeyDown,E=>{if(E.key==="Tab"&&E.shiftKey){g.onItemShiftTab();return}if(E.target!==E.currentTarget)return;const T=PP(E,g.orientation,g.dir);if(T!==void 0){if(E.metaKey||E.ctrlKey||E.altKey||E.shiftKey)return;E.preventDefault();let O=x().filter(R=>R.focusable).map(R=>R.ref.current);if(T==="last")O.reverse();else if(T==="prev"||T==="next"){T==="prev"&&O.reverse();const R=O.indexOf(E.currentTarget);O=g.loop?zP(O,R+1):O.slice(R+1)}setTimeout(()=>n2(O))}}),children:typeof l=="function"?l({isCurrentTabStop:p,hasTabStop:k!=null}):l})})});t2.displayName=e2;var OP={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function DP(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function PP(e,t,n){const r=DP(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return OP[r]}function n2(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function zP(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var LP=J_,IP=t2,dy=["Enter"," "],BP=["ArrowDown","PageUp","Home"],r2=["ArrowUp","PageDown","End"],VP=[...BP,...r2],UP={ltr:[...dy,"ArrowRight"],rtl:[...dy,"ArrowLeft"]},HP={ltr:["ArrowLeft"],rtl:["ArrowRight"]},su="Menu",[Ic,FP,$P]=Vx(su),[_s,i2]=Bi(su,[$P,rl,Q_]),ah=rl(),a2=Q_(),[qP,js]=_s(su),[GP,ou]=_s(su),s2=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:o,modal:l=!0}=e,u=ah(t),[d,h]=w.useState(null),g=w.useRef(!1),p=yn(o),x=Wf(s);return w.useEffect(()=>{const v=()=>{g.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>g.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),m.jsx(tv,{...u,children:m.jsx(qP,{scope:t,open:n,onOpenChange:p,content:d,onContentChange:h,children:m.jsx(GP,{scope:t,onClose:w.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:g,dir:x,modal:l,children:r})})})};s2.displayName=su;var YP="MenuAnchor",av=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=ah(n);return m.jsx(nv,{...s,...r,ref:t})});av.displayName=YP;var sv="MenuPortal",[ZP,o2]=_s(sv,{forceMount:void 0}),l2=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,o=js(sv,t);return m.jsx(ZP,{scope:t,forceMount:n,children:m.jsx($n,{present:n||o.open,children:m.jsx(ru,{asChild:!0,container:s,children:r})})})};l2.displayName=sv;var kr="MenuContent",[XP,ov]=_s(kr),c2=w.forwardRef((e,t)=>{const n=o2(kr,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=js(kr,e.__scopeMenu),l=ou(kr,e.__scopeMenu);return m.jsx(Ic.Provider,{scope:e.__scopeMenu,children:m.jsx($n,{present:r||o.open,children:m.jsx(Ic.Slot,{scope:e.__scopeMenu,children:l.modal?m.jsx(KP,{...s,ref:t}):m.jsx(WP,{...s,ref:t})})})})}),KP=w.forwardRef((e,t)=>{const n=js(kr,e.__scopeMenu),r=w.useRef(null),s=ot(t,r);return w.useEffect(()=>{const o=r.current;if(o)return Hx(o)},[]),m.jsx(lv,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ke(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),WP=w.forwardRef((e,t)=>{const n=js(kr,e.__scopeMenu);return m.jsx(lv,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),QP=ps("MenuContent.ScrollLock"),lv=w.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:p,onInteractOutside:x,onDismiss:v,disableOutsideScroll:S,...k}=e,E=js(kr,n),T=ou(kr,n),A=ah(n),O=a2(n),R=FP(n),[M,_]=w.useState(null),D=w.useRef(null),P=ot(t,D,E.onContentChange),B=w.useRef(0),z=w.useRef(""),H=w.useRef(0),$=w.useRef(null),re=w.useRef("right"),te=w.useRef(0),ie=S?eh:w.Fragment,I=S?{as:QP,allowPinchZoom:!0}:void 0,F=Z=>{var Y,oe;const C=z.current+Z,G=R().filter(ce=>!ce.disabled),le=document.activeElement,N=(Y=G.find(ce=>ce.ref.current===le))==null?void 0:Y.textValue,K=G.map(ce=>ce.textValue),Q=uz(K,C,N),X=(oe=G.find(ce=>ce.textValue===Q))==null?void 0:oe.ref.current;(function ce(me){z.current=me,window.clearTimeout(B.current),me!==""&&(B.current=window.setTimeout(()=>ce(""),1e3))})(C),X&&setTimeout(()=>X.focus())};w.useEffect(()=>()=>window.clearTimeout(B.current),[]),Ux();const V=w.useCallback(Z=>{var G,le;return re.current===((G=$.current)==null?void 0:G.side)&&fz(Z,(le=$.current)==null?void 0:le.area)},[]);return m.jsx(XP,{scope:n,searchRef:z,onItemEnter:w.useCallback(Z=>{V(Z)&&Z.preventDefault()},[V]),onItemLeave:w.useCallback(Z=>{var C;V(Z)||((C=D.current)==null||C.focus(),_(null))},[V]),onTriggerLeave:w.useCallback(Z=>{V(Z)&&Z.preventDefault()},[V]),pointerGraceTimerRef:H,onPointerGraceIntentChange:w.useCallback(Z=>{$.current=Z},[]),children:m.jsx(ie,{...I,children:m.jsx(Qf,{asChild:!0,trapped:s,onMountAutoFocus:ke(o,Z=>{var C;Z.preventDefault(),(C=D.current)==null||C.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:m.jsx(nu,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:p,onInteractOutside:x,onDismiss:v,children:m.jsx(LP,{asChild:!0,...O,dir:T.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:_,onEntryFocus:ke(d,Z=>{T.isUsingKeyboardRef.current||Z.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(rv,{role:"menu","aria-orientation":"vertical","data-state":T2(E.open),"data-radix-menu-content":"",dir:T.dir,...A,...k,ref:P,style:{outline:"none",...k.style},onKeyDown:ke(k.onKeyDown,Z=>{const G=Z.target.closest("[data-radix-menu-content]")===Z.currentTarget,le=Z.ctrlKey||Z.altKey||Z.metaKey,N=Z.key.length===1;G&&(Z.key==="Tab"&&Z.preventDefault(),!le&&N&&F(Z.key));const K=D.current;if(Z.target!==K||!VP.includes(Z.key))return;Z.preventDefault();const X=R().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);r2.includes(Z.key)&&X.reverse(),lz(X)}),onBlur:ke(e.onBlur,Z=>{Z.currentTarget.contains(Z.target)||(window.clearTimeout(B.current),z.current="")}),onPointerMove:ke(e.onPointerMove,Bc(Z=>{const C=Z.target,G=te.current!==Z.clientX;if(Z.currentTarget.contains(C)&&G){const le=Z.clientX>te.current?"right":"left";re.current=le,te.current=Z.clientX}}))})})})})})})});c2.displayName=kr;var JP="MenuGroup",cv=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(qe.div,{role:"group",...r,ref:t})});cv.displayName=JP;var ez="MenuLabel",u2=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(qe.div,{...r,ref:t})});u2.displayName=ez;var gf="MenuItem",gk="menu.itemSelect",sh=w.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,o=w.useRef(null),l=ou(gf,e.__scopeMenu),u=ov(gf,e.__scopeMenu),d=ot(t,o),h=w.useRef(!1),g=()=>{const p=o.current;if(!n&&p){const x=new CustomEvent(gk,{bubbles:!0,cancelable:!0});p.addEventListener(gk,v=>r==null?void 0:r(v),{once:!0}),ZE(p,x),x.defaultPrevented?h.current=!1:l.onClose()}};return m.jsx(d2,{...s,ref:d,disabled:n,onClick:ke(e.onClick,g),onPointerDown:p=>{var x;(x=e.onPointerDown)==null||x.call(e,p),h.current=!0},onPointerUp:ke(e.onPointerUp,p=>{var x;h.current||(x=p.currentTarget)==null||x.click()}),onKeyDown:ke(e.onKeyDown,p=>{const x=u.searchRef.current!=="";n||x&&p.key===" "||dy.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});sh.displayName=gf;var d2=w.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...o}=e,l=ov(gf,n),u=a2(n),d=w.useRef(null),h=ot(t,d),[g,p]=w.useState(!1),[x,v]=w.useState("");return w.useEffect(()=>{const S=d.current;S&&v((S.textContent??"").trim())},[o.children]),m.jsx(Ic.ItemSlot,{scope:n,disabled:r,textValue:s??x,children:m.jsx(IP,{asChild:!0,...u,focusable:!r,children:m.jsx(qe.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:h,onPointerMove:ke(e.onPointerMove,Bc(S=>{r?l.onItemLeave(S):(l.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ke(e.onPointerLeave,Bc(S=>l.onItemLeave(S))),onFocus:ke(e.onFocus,()=>p(!0)),onBlur:ke(e.onBlur,()=>p(!1))})})})}),tz="MenuCheckboxItem",f2=w.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return m.jsx(y2,{scope:e.__scopeMenu,checked:n,children:m.jsx(sh,{role:"menuitemcheckbox","aria-checked":yf(n)?"mixed":n,...s,ref:t,"data-state":dv(n),onSelect:ke(s.onSelect,()=>r==null?void 0:r(yf(n)?!0:!n),{checkForDefaultPrevented:!1})})})});f2.displayName=tz;var h2="MenuRadioGroup",[nz,rz]=_s(h2,{value:void 0,onValueChange:()=>{}}),m2=w.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,o=yn(r);return m.jsx(nz,{scope:e.__scopeMenu,value:n,onValueChange:o,children:m.jsx(cv,{...s,ref:t})})});m2.displayName=h2;var p2="MenuRadioItem",g2=w.forwardRef((e,t)=>{const{value:n,...r}=e,s=rz(p2,e.__scopeMenu),o=n===s.value;return m.jsx(y2,{scope:e.__scopeMenu,checked:o,children:m.jsx(sh,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":dv(o),onSelect:ke(r.onSelect,()=>{var l;return(l=s.onValueChange)==null?void 0:l.call(s,n)},{checkForDefaultPrevented:!1})})})});g2.displayName=p2;var uv="MenuItemIndicator",[y2,iz]=_s(uv,{checked:!1}),x2=w.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,o=iz(uv,n);return m.jsx($n,{present:r||yf(o.checked)||o.checked===!0,children:m.jsx(qe.span,{...s,ref:t,"data-state":dv(o.checked)})})});x2.displayName=uv;var az="MenuSeparator",v2=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(qe.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});v2.displayName=az;var sz="MenuArrow",b2=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=ah(n);return m.jsx(iv,{...s,...r,ref:t})});b2.displayName=sz;var oz="MenuSub",[CJ,w2]=_s(oz),bc="MenuSubTrigger",S2=w.forwardRef((e,t)=>{const n=js(bc,e.__scopeMenu),r=ou(bc,e.__scopeMenu),s=w2(bc,e.__scopeMenu),o=ov(bc,e.__scopeMenu),l=w.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=o,h={__scopeMenu:e.__scopeMenu},g=w.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return w.useEffect(()=>g,[g]),w.useEffect(()=>{const p=u.current;return()=>{window.clearTimeout(p),d(null)}},[u,d]),m.jsx(av,{asChild:!0,...h,children:m.jsx(d2,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":T2(n.open),...e,ref:Kf(t,s.onTriggerChange),onClick:p=>{var x;(x=e.onClick)==null||x.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ke(e.onPointerMove,Bc(p=>{o.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(o.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),g()},100))})),onPointerLeave:ke(e.onPointerLeave,Bc(p=>{var v,S;g();const x=(v=n.content)==null?void 0:v.getBoundingClientRect();if(x){const k=(S=n.content)==null?void 0:S.dataset.side,E=k==="right",T=E?-5:5,A=x[E?"left":"right"],O=x[E?"right":"left"];o.onPointerGraceIntentChange({area:[{x:p.clientX+T,y:p.clientY},{x:A,y:x.top},{x:O,y:x.top},{x:O,y:x.bottom},{x:A,y:x.bottom}],side:k}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(p),p.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:ke(e.onKeyDown,p=>{var v;const x=o.searchRef.current!=="";e.disabled||x&&p.key===" "||UP[r.dir].includes(p.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),p.preventDefault())})})})});S2.displayName=bc;var k2="MenuSubContent",C2=w.forwardRef((e,t)=>{const n=o2(kr,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=js(kr,e.__scopeMenu),l=ou(kr,e.__scopeMenu),u=w2(k2,e.__scopeMenu),d=w.useRef(null),h=ot(t,d);return m.jsx(Ic.Provider,{scope:e.__scopeMenu,children:m.jsx($n,{present:r||o.open,children:m.jsx(Ic.Slot,{scope:e.__scopeMenu,children:m.jsx(lv,{id:u.contentId,"aria-labelledby":u.triggerId,...s,ref:h,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{var p;l.isUsingKeyboardRef.current&&((p=d.current)==null||p.focus()),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:ke(e.onFocusOutside,g=>{g.target!==u.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:ke(e.onEscapeKeyDown,g=>{l.onClose(),g.preventDefault()}),onKeyDown:ke(e.onKeyDown,g=>{var v;const p=g.currentTarget.contains(g.target),x=HP[l.dir].includes(g.key);p&&x&&(o.onOpenChange(!1),(v=u.trigger)==null||v.focus(),g.preventDefault())})})})})})});C2.displayName=k2;function T2(e){return e?"open":"closed"}function yf(e){return e==="indeterminate"}function dv(e){return yf(e)?"indeterminate":e?"checked":"unchecked"}function lz(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function cz(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function uz(e,t,n){const s=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=cz(e,Math.max(o,0));s.length===1&&(l=l.filter(h=>h!==n));const d=l.find(h=>h.toLowerCase().startsWith(s.toLowerCase()));return d!==n?d:void 0}function dz(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const u=t[o],d=t[l],h=u.x,g=u.y,p=d.x,x=d.y;g>r!=x>r&&n<(p-h)*(r-g)/(x-g)+h&&(s=!s)}return s}function fz(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return dz(n,t)}function Bc(e){return t=>t.pointerType==="mouse"?e(t):void 0}var hz=s2,mz=av,pz=l2,gz=c2,yz=cv,xz=u2,vz=sh,bz=f2,wz=m2,Sz=g2,kz=x2,Cz=v2,Tz=b2,Ez=S2,_z=C2,oh="DropdownMenu",[jz,TJ]=Bi(oh,[i2]),Dn=i2(),[Nz,E2]=jz(oh),_2=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:o,onOpenChange:l,modal:u=!0}=e,d=Dn(t),h=w.useRef(null),[g,p]=Bo({prop:s,defaultProp:o??!1,onChange:l,caller:oh});return m.jsx(Nz,{scope:t,triggerId:Jr(),triggerRef:h,contentId:Jr(),open:g,onOpenChange:p,onOpenToggle:w.useCallback(()=>p(x=>!x),[p]),modal:u,children:m.jsx(hz,{...d,open:g,onOpenChange:p,dir:r,modal:u,children:n})})};_2.displayName=oh;var j2="DropdownMenuTrigger",N2=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,o=E2(j2,n),l=Dn(n);return m.jsx(mz,{asChild:!0,...l,children:m.jsx(qe.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:Kf(t,o.triggerRef),onPointerDown:ke(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(o.onOpenToggle(),o.open||u.preventDefault())}),onKeyDown:ke(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&o.onOpenToggle(),u.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});N2.displayName=j2;var Az="DropdownMenuPortal",A2=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Dn(t);return m.jsx(pz,{...r,...n})};A2.displayName=Az;var R2="DropdownMenuContent",M2=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=E2(R2,n),o=Dn(n),l=w.useRef(!1);return m.jsx(gz,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...r,ref:t,onCloseAutoFocus:ke(e.onCloseAutoFocus,u=>{var d;l.current||(d=s.triggerRef.current)==null||d.focus(),l.current=!1,u.preventDefault()}),onInteractOutside:ke(e.onInteractOutside,u=>{const d=u.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0,g=d.button===2||h;(!s.modal||g)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});M2.displayName=R2;var Rz="DropdownMenuGroup",Mz=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(yz,{...s,...r,ref:t})});Mz.displayName=Rz;var Oz="DropdownMenuLabel",Dz=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(xz,{...s,...r,ref:t})});Dz.displayName=Oz;var Pz="DropdownMenuItem",O2=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(vz,{...s,...r,ref:t})});O2.displayName=Pz;var zz="DropdownMenuCheckboxItem",Lz=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(bz,{...s,...r,ref:t})});Lz.displayName=zz;var Iz="DropdownMenuRadioGroup",Bz=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(wz,{...s,...r,ref:t})});Bz.displayName=Iz;var Vz="DropdownMenuRadioItem",Uz=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(Sz,{...s,...r,ref:t})});Uz.displayName=Vz;var Hz="DropdownMenuItemIndicator",Fz=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(kz,{...s,...r,ref:t})});Fz.displayName=Hz;var $z="DropdownMenuSeparator",qz=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(Cz,{...s,...r,ref:t})});qz.displayName=$z;var Gz="DropdownMenuArrow",Yz=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(Tz,{...s,...r,ref:t})});Yz.displayName=Gz;var Zz="DropdownMenuSubTrigger",Xz=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(Ez,{...s,...r,ref:t})});Xz.displayName=Zz;var Kz="DropdownMenuSubContent",Wz=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Dn(n);return m.jsx(_z,{...s,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Wz.displayName=Kz;var Qz=_2,Jz=N2,eL=A2,tL=M2,nL=O2,rL="Label",D2=w.forwardRef((e,t)=>m.jsx(qe.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));D2.displayName=rL;var iL=D2;function fy(e,[t,n]){return Math.min(n,Math.max(t,e))}function aL(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var fv="ScrollArea",[P2,EJ]=Bi(fv),[sL,Tr]=P2(fv),z2=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:o=600,...l}=e,[u,d]=w.useState(null),[h,g]=w.useState(null),[p,x]=w.useState(null),[v,S]=w.useState(null),[k,E]=w.useState(null),[T,A]=w.useState(0),[O,R]=w.useState(0),[M,_]=w.useState(!1),[D,P]=w.useState(!1),B=ot(t,H=>d(H)),z=Wf(s);return m.jsx(sL,{scope:n,type:r,dir:z,scrollHideDelay:o,scrollArea:u,viewport:h,onViewportChange:g,content:p,onContentChange:x,scrollbarX:v,onScrollbarXChange:S,scrollbarXEnabled:M,onScrollbarXEnabledChange:_,scrollbarY:k,onScrollbarYChange:E,scrollbarYEnabled:D,onScrollbarYEnabledChange:P,onCornerWidthChange:A,onCornerHeightChange:R,children:m.jsx(qe.div,{dir:z,...l,ref:B,style:{position:"relative","--radix-scroll-area-corner-width":T+"px","--radix-scroll-area-corner-height":O+"px",...e.style}})})});z2.displayName=fv;var L2="ScrollAreaViewport",I2=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:s,...o}=e,l=Tr(L2,n),u=w.useRef(null),d=ot(t,u,l.onViewportChange);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),m.jsx(qe.div,{"data-radix-scroll-area-viewport":"",...o,ref:d,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:m.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});I2.displayName=L2;var li="ScrollAreaScrollbar",B2=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Tr(li,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:l}=s,u=e.orientation==="horizontal";return w.useEffect(()=>(u?o(!0):l(!0),()=>{u?o(!1):l(!1)}),[u,o,l]),s.type==="hover"?m.jsx(oL,{...r,ref:t,forceMount:n}):s.type==="scroll"?m.jsx(lL,{...r,ref:t,forceMount:n}):s.type==="auto"?m.jsx(V2,{...r,ref:t,forceMount:n}):s.type==="always"?m.jsx(hv,{...r,ref:t}):null});B2.displayName=li;var oL=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Tr(li,e.__scopeScrollArea),[o,l]=w.useState(!1);return w.useEffect(()=>{const u=s.scrollArea;let d=0;if(u){const h=()=>{window.clearTimeout(d),l(!0)},g=()=>{d=window.setTimeout(()=>l(!1),s.scrollHideDelay)};return u.addEventListener("pointerenter",h),u.addEventListener("pointerleave",g),()=>{window.clearTimeout(d),u.removeEventListener("pointerenter",h),u.removeEventListener("pointerleave",g)}}},[s.scrollArea,s.scrollHideDelay]),m.jsx($n,{present:n||o,children:m.jsx(V2,{"data-state":o?"visible":"hidden",...r,ref:t})})}),lL=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=Tr(li,e.__scopeScrollArea),o=e.orientation==="horizontal",l=ch(()=>d("SCROLL_END"),100),[u,d]=aL("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(u==="idle"){const h=window.setTimeout(()=>d("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(h)}},[u,s.scrollHideDelay,d]),w.useEffect(()=>{const h=s.viewport,g=o?"scrollLeft":"scrollTop";if(h){let p=h[g];const x=()=>{const v=h[g];p!==v&&(d("SCROLL"),l()),p=v};return h.addEventListener("scroll",x),()=>h.removeEventListener("scroll",x)}},[s.viewport,o,d,l]),m.jsx($n,{present:n||u!=="hidden",children:m.jsx(hv,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ke(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:ke(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),V2=w.forwardRef((e,t)=>{const n=Tr(li,e.__scopeScrollArea),{forceMount:r,...s}=e,[o,l]=w.useState(!1),u=e.orientation==="horizontal",d=ch(()=>{if(n.viewport){const h=n.viewport.offsetWidth<n.viewport.scrollWidth,g=n.viewport.offsetHeight<n.viewport.scrollHeight;l(u?h:g)}},10);return Uo(n.viewport,d),Uo(n.content,d),m.jsx($n,{present:r||o,children:m.jsx(hv,{"data-state":o?"visible":"hidden",...s,ref:t})})}),hv=w.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,s=Tr(li,e.__scopeScrollArea),o=w.useRef(null),l=w.useRef(0),[u,d]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=q2(u.viewport,u.content),g={...r,sizes:u,onSizesChange:d,hasThumb:h>0&&h<1,onThumbChange:x=>o.current=x,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:x=>l.current=x};function p(x,v){return mL(x,l.current,u,v)}return n==="horizontal"?m.jsx(cL,{...g,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const x=s.viewport.scrollLeft,v=yk(x,u,s.dir);o.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:x=>{s.viewport&&(s.viewport.scrollLeft=x)},onDragScroll:x=>{s.viewport&&(s.viewport.scrollLeft=p(x,s.dir))}}):n==="vertical"?m.jsx(uL,{...g,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const x=s.viewport.scrollTop,v=yk(x,u);o.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:x=>{s.viewport&&(s.viewport.scrollTop=x)},onDragScroll:x=>{s.viewport&&(s.viewport.scrollTop=p(x))}}):null}),cL=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,o=Tr(li,e.__scopeScrollArea),[l,u]=w.useState(),d=w.useRef(null),h=ot(t,d,o.onScrollbarXChange);return w.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),m.jsx(H2,{"data-orientation":"horizontal",...s,ref:h,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":lh(n)+"px",...e.style},onThumbPointerDown:g=>e.onThumbPointerDown(g.x),onDragScroll:g=>e.onDragScroll(g.x),onWheelScroll:(g,p)=>{if(o.viewport){const x=o.viewport.scrollLeft+g.deltaX;e.onWheelScroll(x),Y2(x,p)&&g.preventDefault()}},onResize:()=>{d.current&&o.viewport&&l&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:vf(l.paddingLeft),paddingEnd:vf(l.paddingRight)}})}})}),uL=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,o=Tr(li,e.__scopeScrollArea),[l,u]=w.useState(),d=w.useRef(null),h=ot(t,d,o.onScrollbarYChange);return w.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),m.jsx(H2,{"data-orientation":"vertical",...s,ref:h,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":lh(n)+"px",...e.style},onThumbPointerDown:g=>e.onThumbPointerDown(g.y),onDragScroll:g=>e.onDragScroll(g.y),onWheelScroll:(g,p)=>{if(o.viewport){const x=o.viewport.scrollTop+g.deltaY;e.onWheelScroll(x),Y2(x,p)&&g.preventDefault()}},onResize:()=>{d.current&&o.viewport&&l&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:vf(l.paddingTop),paddingEnd:vf(l.paddingBottom)}})}})}),[dL,U2]=P2(li),H2=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:o,onThumbPointerUp:l,onThumbPointerDown:u,onThumbPositionChange:d,onDragScroll:h,onWheelScroll:g,onResize:p,...x}=e,v=Tr(li,n),[S,k]=w.useState(null),E=ot(t,B=>k(B)),T=w.useRef(null),A=w.useRef(""),O=v.viewport,R=r.content-r.viewport,M=yn(g),_=yn(d),D=ch(p,10);function P(B){if(T.current){const z=B.clientX-T.current.left,H=B.clientY-T.current.top;h({x:z,y:H})}}return w.useEffect(()=>{const B=z=>{const H=z.target;(S==null?void 0:S.contains(H))&&M(z,R)};return document.addEventListener("wheel",B,{passive:!1}),()=>document.removeEventListener("wheel",B,{passive:!1})},[O,S,R,M]),w.useEffect(_,[r,_]),Uo(S,D),Uo(v.content,D),m.jsx(dL,{scope:n,scrollbar:S,hasThumb:s,onThumbChange:yn(o),onThumbPointerUp:yn(l),onThumbPositionChange:_,onThumbPointerDown:yn(u),children:m.jsx(qe.div,{...x,ref:E,style:{position:"absolute",...x.style},onPointerDown:ke(e.onPointerDown,B=>{B.button===0&&(B.target.setPointerCapture(B.pointerId),T.current=S.getBoundingClientRect(),A.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),P(B))}),onPointerMove:ke(e.onPointerMove,P),onPointerUp:ke(e.onPointerUp,B=>{const z=B.target;z.hasPointerCapture(B.pointerId)&&z.releasePointerCapture(B.pointerId),document.body.style.webkitUserSelect=A.current,v.viewport&&(v.viewport.style.scrollBehavior=""),T.current=null})})})}),xf="ScrollAreaThumb",F2=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=U2(xf,e.__scopeScrollArea);return m.jsx($n,{present:n||s.hasThumb,children:m.jsx(fL,{ref:t,...r})})}),fL=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...s}=e,o=Tr(xf,n),l=U2(xf,n),{onThumbPositionChange:u}=l,d=ot(t,p=>l.onThumbChange(p)),h=w.useRef(void 0),g=ch(()=>{h.current&&(h.current(),h.current=void 0)},100);return w.useEffect(()=>{const p=o.viewport;if(p){const x=()=>{if(g(),!h.current){const v=pL(p,u);h.current=v,u()}};return u(),p.addEventListener("scroll",x),()=>p.removeEventListener("scroll",x)}},[o.viewport,g,u]),m.jsx(qe.div,{"data-state":l.hasThumb?"visible":"hidden",...s,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ke(e.onPointerDownCapture,p=>{const v=p.target.getBoundingClientRect(),S=p.clientX-v.left,k=p.clientY-v.top;l.onThumbPointerDown({x:S,y:k})}),onPointerUp:ke(e.onPointerUp,l.onThumbPointerUp)})});F2.displayName=xf;var mv="ScrollAreaCorner",$2=w.forwardRef((e,t)=>{const n=Tr(mv,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?m.jsx(hL,{...e,ref:t}):null});$2.displayName=mv;var hL=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,s=Tr(mv,n),[o,l]=w.useState(0),[u,d]=w.useState(0),h=!!(o&&u);return Uo(s.scrollbarX,()=>{var p;const g=((p=s.scrollbarX)==null?void 0:p.offsetHeight)||0;s.onCornerHeightChange(g),d(g)}),Uo(s.scrollbarY,()=>{var p;const g=((p=s.scrollbarY)==null?void 0:p.offsetWidth)||0;s.onCornerWidthChange(g),l(g)}),h?m.jsx(qe.div,{...r,ref:t,style:{width:o,height:u,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function vf(e){return e?parseInt(e,10):0}function q2(e,t){const n=e/t;return isNaN(n)?0:n}function lh(e){const t=q2(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function mL(e,t,n,r="ltr"){const s=lh(n),o=s/2,l=t||o,u=s-l,d=n.scrollbar.paddingStart+l,h=n.scrollbar.size-n.scrollbar.paddingEnd-u,g=n.content-n.viewport,p=r==="ltr"?[0,g]:[g*-1,0];return G2([d,h],p)(e)}function yk(e,t,n="ltr"){const r=lh(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,l=t.content-t.viewport,u=o-r,d=n==="ltr"?[0,l]:[l*-1,0],h=fy(e,d);return G2([0,l],[0,u])(h)}function G2(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Y2(e,t){return e>0&&e<t}var pL=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function s(){const o={left:e.scrollLeft,top:e.scrollTop},l=n.left!==o.left,u=n.top!==o.top;(l||u)&&t(),n=o,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function ch(e,t){const n=yn(e),r=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),w.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Uo(e,t){const n=yn(t);xn(()=>{let r=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(r),s.unobserve(e)}}},[e,n])}var gL=z2,yL=I2,xL=$2,vL=[" ","Enter","ArrowUp","ArrowDown"],bL=[" ","Enter"],xs="Select",[uh,dh,wL]=Vx(xs),[il,_J]=Bi(xs,[wL,rl]),fh=rl(),[SL,Na]=il(xs),[kL,CL]=il(xs),Z2=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:o,value:l,defaultValue:u,onValueChange:d,dir:h,name:g,autoComplete:p,disabled:x,required:v,form:S}=e,k=fh(t),[E,T]=w.useState(null),[A,O]=w.useState(null),[R,M]=w.useState(!1),_=Wf(h),[D,P]=Bo({prop:r,defaultProp:s??!1,onChange:o,caller:xs}),[B,z]=Bo({prop:l,defaultProp:u,onChange:d,caller:xs}),H=w.useRef(null),$=E?S||!!E.closest("form"):!0,[re,te]=w.useState(new Set),ie=Array.from(re).map(I=>I.props.value).join(";");return m.jsx(tv,{...k,children:m.jsxs(SL,{required:v,scope:t,trigger:E,onTriggerChange:T,valueNode:A,onValueNodeChange:O,valueNodeHasChildren:R,onValueNodeHasChildrenChange:M,contentId:Jr(),value:B,onValueChange:z,open:D,onOpenChange:P,dir:_,triggerPointerDownPosRef:H,disabled:x,children:[m.jsx(uh.Provider,{scope:t,children:m.jsx(kL,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(I=>{te(F=>new Set(F).add(I))},[]),onNativeOptionRemove:w.useCallback(I=>{te(F=>{const V=new Set(F);return V.delete(I),V})},[]),children:n})}),$?m.jsxs(gj,{"aria-hidden":!0,required:v,tabIndex:-1,name:g,autoComplete:p,value:B,onChange:I=>z(I.target.value),disabled:x,form:S,children:[B===void 0?m.jsx("option",{value:""}):null,Array.from(re)]},ie):null]})})};Z2.displayName=xs;var X2="SelectTrigger",K2=w.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,o=fh(n),l=Na(X2,n),u=l.disabled||r,d=ot(t,l.onTriggerChange),h=dh(n),g=w.useRef("touch"),[p,x,v]=xj(k=>{const E=h().filter(O=>!O.disabled),T=E.find(O=>O.value===l.value),A=vj(E,k,T);A!==void 0&&l.onValueChange(A.value)}),S=k=>{u||(l.onOpenChange(!0),v()),k&&(l.triggerPointerDownPosRef.current={x:Math.round(k.pageX),y:Math.round(k.pageY)})};return m.jsx(nv,{asChild:!0,...o,children:m.jsx(qe.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":yj(l.value)?"":void 0,...s,ref:d,onClick:ke(s.onClick,k=>{k.currentTarget.focus(),g.current!=="mouse"&&S(k)}),onPointerDown:ke(s.onPointerDown,k=>{g.current=k.pointerType;const E=k.target;E.hasPointerCapture(k.pointerId)&&E.releasePointerCapture(k.pointerId),k.button===0&&k.ctrlKey===!1&&k.pointerType==="mouse"&&(S(k),k.preventDefault())}),onKeyDown:ke(s.onKeyDown,k=>{const E=p.current!=="";!(k.ctrlKey||k.altKey||k.metaKey)&&k.key.length===1&&x(k.key),!(E&&k.key===" ")&&vL.includes(k.key)&&(S(),k.preventDefault())})})})});K2.displayName=X2;var W2="SelectValue",Q2=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:l="",...u}=e,d=Na(W2,n),{onValueNodeHasChildrenChange:h}=d,g=o!==void 0,p=ot(t,d.onValueNodeChange);return xn(()=>{h(g)},[h,g]),m.jsx(qe.span,{...u,ref:p,style:{pointerEvents:"none"},children:yj(d.value)?m.jsx(m.Fragment,{children:l}):o})});Q2.displayName=W2;var TL="SelectIcon",J2=w.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return m.jsx(qe.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});J2.displayName=TL;var EL="SelectPortal",ej=e=>m.jsx(ru,{asChild:!0,...e});ej.displayName=EL;var vs="SelectContent",tj=w.forwardRef((e,t)=>{const n=Na(vs,e.__scopeSelect),[r,s]=w.useState();if(xn(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?tu.createPortal(m.jsx(nj,{scope:e.__scopeSelect,children:m.jsx(uh.Slot,{scope:e.__scopeSelect,children:m.jsx("div",{children:e.children})})}),o):null}return m.jsx(rj,{...e,ref:t})});tj.displayName=vs;var Or=10,[nj,Aa]=il(vs),_L="SelectContentImpl",jL=ps("SelectContent.RemoveScroll"),rj=w.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:l,side:u,sideOffset:d,align:h,alignOffset:g,arrowPadding:p,collisionBoundary:x,collisionPadding:v,sticky:S,hideWhenDetached:k,avoidCollisions:E,...T}=e,A=Na(vs,n),[O,R]=w.useState(null),[M,_]=w.useState(null),D=ot(t,Y=>R(Y)),[P,B]=w.useState(null),[z,H]=w.useState(null),$=dh(n),[re,te]=w.useState(!1),ie=w.useRef(!1);w.useEffect(()=>{if(O)return Hx(O)},[O]),Ux();const I=w.useCallback(Y=>{const[oe,...ce]=$().map(Te=>Te.ref.current),[me]=ce.slice(-1),be=document.activeElement;for(const Te of Y)if(Te===be||(Te==null||Te.scrollIntoView({block:"nearest"}),Te===oe&&M&&(M.scrollTop=0),Te===me&&M&&(M.scrollTop=M.scrollHeight),Te==null||Te.focus(),document.activeElement!==be))return},[$,M]),F=w.useCallback(()=>I([P,O]),[I,P,O]);w.useEffect(()=>{re&&F()},[re,F]);const{onOpenChange:V,triggerPointerDownPosRef:Z}=A;w.useEffect(()=>{if(O){let Y={x:0,y:0};const oe=me=>{var be,Te;Y={x:Math.abs(Math.round(me.pageX)-(((be=Z.current)==null?void 0:be.x)??0)),y:Math.abs(Math.round(me.pageY)-(((Te=Z.current)==null?void 0:Te.y)??0))}},ce=me=>{Y.x<=10&&Y.y<=10?me.preventDefault():O.contains(me.target)||V(!1),document.removeEventListener("pointermove",oe),Z.current=null};return Z.current!==null&&(document.addEventListener("pointermove",oe),document.addEventListener("pointerup",ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",oe),document.removeEventListener("pointerup",ce,{capture:!0})}}},[O,V,Z]),w.useEffect(()=>{const Y=()=>V(!1);return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[V]);const[C,G]=xj(Y=>{const oe=$().filter(be=>!be.disabled),ce=oe.find(be=>be.ref.current===document.activeElement),me=vj(oe,Y,ce);me&&setTimeout(()=>me.ref.current.focus())}),le=w.useCallback((Y,oe,ce)=>{const me=!ie.current&&!ce;(A.value!==void 0&&A.value===oe||me)&&(B(Y),me&&(ie.current=!0))},[A.value]),N=w.useCallback(()=>O==null?void 0:O.focus(),[O]),K=w.useCallback((Y,oe,ce)=>{const me=!ie.current&&!ce;(A.value!==void 0&&A.value===oe||me)&&H(Y)},[A.value]),Q=r==="popper"?hy:ij,X=Q===hy?{side:u,sideOffset:d,align:h,alignOffset:g,arrowPadding:p,collisionBoundary:x,collisionPadding:v,sticky:S,hideWhenDetached:k,avoidCollisions:E}:{};return m.jsx(nj,{scope:n,content:O,viewport:M,onViewportChange:_,itemRefCallback:le,selectedItem:P,onItemLeave:N,itemTextRefCallback:K,focusSelectedItem:F,selectedItemText:z,position:r,isPositioned:re,searchRef:C,children:m.jsx(eh,{as:jL,allowPinchZoom:!0,children:m.jsx(Qf,{asChild:!0,trapped:A.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:ke(s,Y=>{var oe;(oe=A.trigger)==null||oe.focus({preventScroll:!0}),Y.preventDefault()}),children:m.jsx(nu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>A.onOpenChange(!1),children:m.jsx(Q,{role:"listbox",id:A.contentId,"data-state":A.open?"open":"closed",dir:A.dir,onContextMenu:Y=>Y.preventDefault(),...T,...X,onPlaced:()=>te(!0),ref:D,style:{display:"flex",flexDirection:"column",outline:"none",...T.style},onKeyDown:ke(T.onKeyDown,Y=>{const oe=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!oe&&Y.key.length===1&&G(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let me=$().filter(be=>!be.disabled).map(be=>be.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(me=me.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const be=Y.target,Te=me.indexOf(be);me=me.slice(Te+1)}setTimeout(()=>I(me)),Y.preventDefault()}})})})})})})});rj.displayName=_L;var NL="SelectItemAlignedPosition",ij=w.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,o=Na(vs,n),l=Aa(vs,n),[u,d]=w.useState(null),[h,g]=w.useState(null),p=ot(t,D=>g(D)),x=dh(n),v=w.useRef(!1),S=w.useRef(!0),{viewport:k,selectedItem:E,selectedItemText:T,focusSelectedItem:A}=l,O=w.useCallback(()=>{if(o.trigger&&o.valueNode&&u&&h&&k&&E&&T){const D=o.trigger.getBoundingClientRect(),P=h.getBoundingClientRect(),B=o.valueNode.getBoundingClientRect(),z=T.getBoundingClientRect();if(o.dir!=="rtl"){const be=z.left-P.left,Te=B.left-be,Ve=D.left-Te,lt=D.width+Ve,Mt=Math.max(lt,P.width),Lt=window.innerWidth-Or,st=fy(Te,[Or,Math.max(Or,Lt-Mt)]);u.style.minWidth=lt+"px",u.style.left=st+"px"}else{const be=P.right-z.right,Te=window.innerWidth-B.right-be,Ve=window.innerWidth-D.right-Te,lt=D.width+Ve,Mt=Math.max(lt,P.width),Lt=window.innerWidth-Or,st=fy(Te,[Or,Math.max(Or,Lt-Mt)]);u.style.minWidth=lt+"px",u.style.right=st+"px"}const H=x(),$=window.innerHeight-Or*2,re=k.scrollHeight,te=window.getComputedStyle(h),ie=parseInt(te.borderTopWidth,10),I=parseInt(te.paddingTop,10),F=parseInt(te.borderBottomWidth,10),V=parseInt(te.paddingBottom,10),Z=ie+I+re+V+F,C=Math.min(E.offsetHeight*5,Z),G=window.getComputedStyle(k),le=parseInt(G.paddingTop,10),N=parseInt(G.paddingBottom,10),K=D.top+D.height/2-Or,Q=$-K,X=E.offsetHeight/2,Y=E.offsetTop+X,oe=ie+I+Y,ce=Z-oe;if(oe<=K){const be=H.length>0&&E===H[H.length-1].ref.current;u.style.bottom="0px";const Te=h.clientHeight-k.offsetTop-k.offsetHeight,Ve=Math.max(Q,X+(be?N:0)+Te+F),lt=oe+Ve;u.style.height=lt+"px"}else{const be=H.length>0&&E===H[0].ref.current;u.style.top="0px";const Ve=Math.max(K,ie+k.offsetTop+(be?le:0)+X)+ce;u.style.height=Ve+"px",k.scrollTop=oe-K+k.offsetTop}u.style.margin=`${Or}px 0`,u.style.minHeight=C+"px",u.style.maxHeight=$+"px",r==null||r(),requestAnimationFrame(()=>v.current=!0)}},[x,o.trigger,o.valueNode,u,h,k,E,T,o.dir,r]);xn(()=>O(),[O]);const[R,M]=w.useState();xn(()=>{h&&M(window.getComputedStyle(h).zIndex)},[h]);const _=w.useCallback(D=>{D&&S.current===!0&&(O(),A==null||A(),S.current=!1)},[O,A]);return m.jsx(RL,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:v,onScrollButtonChange:_,children:m.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:m.jsx(qe.div,{...s,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});ij.displayName=NL;var AL="SelectPopperPosition",hy=w.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=Or,...o}=e,l=fh(n);return m.jsx(rv,{...l,...o,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});hy.displayName=AL;var[RL,pv]=il(vs,{}),my="SelectViewport",aj=w.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,o=Aa(my,n),l=pv(my,n),u=ot(t,o.onViewportChange),d=w.useRef(0);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),m.jsx(uh.Slot,{scope:n,children:m.jsx(qe.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:ke(s.onScroll,h=>{const g=h.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:x}=l;if(x!=null&&x.current&&p){const v=Math.abs(d.current-g.scrollTop);if(v>0){const S=window.innerHeight-Or*2,k=parseFloat(p.style.minHeight),E=parseFloat(p.style.height),T=Math.max(k,E);if(T<S){const A=T+v,O=Math.min(S,A),R=A-O;p.style.height=O+"px",p.style.bottom==="0px"&&(g.scrollTop=R>0?R:0,p.style.justifyContent="flex-end")}}}d.current=g.scrollTop})})})]})});aj.displayName=my;var sj="SelectGroup",[ML,OL]=il(sj),DL=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Jr();return m.jsx(ML,{scope:n,id:s,children:m.jsx(qe.div,{role:"group","aria-labelledby":s,...r,ref:t})})});DL.displayName=sj;var oj="SelectLabel",PL=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=OL(oj,n);return m.jsx(qe.div,{id:s.id,...r,ref:t})});PL.displayName=oj;var bf="SelectItem",[zL,lj]=il(bf),cj=w.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...l}=e,u=Na(bf,n),d=Aa(bf,n),h=u.value===r,[g,p]=w.useState(o??""),[x,v]=w.useState(!1),S=ot(t,A=>{var O;return(O=d.itemRefCallback)==null?void 0:O.call(d,A,r,s)}),k=Jr(),E=w.useRef("touch"),T=()=>{s||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return m.jsx(zL,{scope:n,value:r,disabled:s,textId:k,isSelected:h,onItemTextChange:w.useCallback(A=>{p(O=>O||((A==null?void 0:A.textContent)??"").trim())},[]),children:m.jsx(uh.ItemSlot,{scope:n,value:r,disabled:s,textValue:g,children:m.jsx(qe.div,{role:"option","aria-labelledby":k,"data-highlighted":x?"":void 0,"aria-selected":h&&x,"data-state":h?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...l,ref:S,onFocus:ke(l.onFocus,()=>v(!0)),onBlur:ke(l.onBlur,()=>v(!1)),onClick:ke(l.onClick,()=>{E.current!=="mouse"&&T()}),onPointerUp:ke(l.onPointerUp,()=>{E.current==="mouse"&&T()}),onPointerDown:ke(l.onPointerDown,A=>{E.current=A.pointerType}),onPointerMove:ke(l.onPointerMove,A=>{var O;E.current=A.pointerType,s?(O=d.onItemLeave)==null||O.call(d):E.current==="mouse"&&A.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ke(l.onPointerLeave,A=>{var O;A.currentTarget===document.activeElement&&((O=d.onItemLeave)==null||O.call(d))}),onKeyDown:ke(l.onKeyDown,A=>{var R;((R=d.searchRef)==null?void 0:R.current)!==""&&A.key===" "||(bL.includes(A.key)&&T(),A.key===" "&&A.preventDefault())})})})})});cj.displayName=bf;var wc="SelectItemText",uj=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...o}=e,l=Na(wc,n),u=Aa(wc,n),d=lj(wc,n),h=CL(wc,n),[g,p]=w.useState(null),x=ot(t,T=>p(T),d.onItemTextChange,T=>{var A;return(A=u.itemTextRefCallback)==null?void 0:A.call(u,T,d.value,d.disabled)}),v=g==null?void 0:g.textContent,S=w.useMemo(()=>m.jsx("option",{value:d.value,disabled:d.disabled,children:v},d.value),[d.disabled,d.value,v]),{onNativeOptionAdd:k,onNativeOptionRemove:E}=h;return xn(()=>(k(S),()=>E(S)),[k,E,S]),m.jsxs(m.Fragment,{children:[m.jsx(qe.span,{id:d.textId,...o,ref:x}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?tu.createPortal(o.children,l.valueNode):null]})});uj.displayName=wc;var dj="SelectItemIndicator",fj=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return lj(dj,n).isSelected?m.jsx(qe.span,{"aria-hidden":!0,...r,ref:t}):null});fj.displayName=dj;var py="SelectScrollUpButton",hj=w.forwardRef((e,t)=>{const n=Aa(py,e.__scopeSelect),r=pv(py,e.__scopeSelect),[s,o]=w.useState(!1),l=ot(t,r.onScrollButtonChange);return xn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const h=d.scrollTop>0;o(h)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),s?m.jsx(pj,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null});hj.displayName=py;var gy="SelectScrollDownButton",mj=w.forwardRef((e,t)=>{const n=Aa(gy,e.__scopeSelect),r=pv(gy,e.__scopeSelect),[s,o]=w.useState(!1),l=ot(t,r.onScrollButtonChange);return xn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const h=d.scrollHeight-d.clientHeight,g=Math.ceil(d.scrollTop)<h;o(g)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),s?m.jsx(pj,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null});mj.displayName=gy;var pj=w.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,o=Aa("SelectScrollButton",n),l=w.useRef(null),u=dh(n),d=w.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return w.useEffect(()=>()=>d(),[d]),xn(()=>{var g;const h=u().find(p=>p.ref.current===document.activeElement);(g=h==null?void 0:h.ref.current)==null||g.scrollIntoView({block:"nearest"})},[u]),m.jsx(qe.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ke(s.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:ke(s.onPointerMove,()=>{var h;(h=o.onItemLeave)==null||h.call(o),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:ke(s.onPointerLeave,()=>{d()})})}),LL="SelectSeparator",IL=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m.jsx(qe.div,{"aria-hidden":!0,...r,ref:t})});IL.displayName=LL;var yy="SelectArrow",BL=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=fh(n),o=Na(yy,n),l=Aa(yy,n);return o.open&&l.position==="popper"?m.jsx(iv,{...s,...r,ref:t}):null});BL.displayName=yy;var VL="SelectBubbleInput",gj=w.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const s=w.useRef(null),o=ot(r,s),l=o5(t);return w.useEffect(()=>{const u=s.current;if(!u)return;const d=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==t&&g){const p=new Event("change",{bubbles:!0});g.call(u,t),u.dispatchEvent(p)}},[l,t]),m.jsx(qe.select,{...n,style:{...XE,...n.style},ref:o,defaultValue:t})});gj.displayName=VL;function yj(e){return e===""||e===void 0}function xj(e){const t=yn(e),n=w.useRef(""),r=w.useRef(0),s=w.useCallback(l=>{const u=n.current+l;t(u),function d(h){n.current=h,window.clearTimeout(r.current),h!==""&&(r.current=window.setTimeout(()=>d(""),1e3))}(u)},[t]),o=w.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function vj(e,t,n){const s=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=UL(e,Math.max(o,0));s.length===1&&(l=l.filter(h=>h!==n));const d=l.find(h=>h.textValue.toLowerCase().startsWith(s.toLowerCase()));return d!==n?d:void 0}function UL(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var HL=Z2,FL=K2,$L=Q2,qL=J2,GL=ej,YL=tj,ZL=aj,XL=cj,KL=uj,WL=fj,QL=hj,JL=mj,e6="Separator",xk="horizontal",t6=["horizontal","vertical"],bj=w.forwardRef((e,t)=>{const{decorative:n,orientation:r=xk,...s}=e,o=n6(r)?r:xk,u=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return m.jsx(qe.div,{"data-orientation":o,...u,...s,ref:t})});bj.displayName=e6;function n6(e){return t6.includes(e)}var r6=bj,[hh,jJ]=Bi("Tooltip",[rl]),mh=rl(),wj="TooltipProvider",i6=700,xy="tooltip.open",[a6,gv]=hh(wj),Sj=e=>{const{__scopeTooltip:t,delayDuration:n=i6,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:o}=e,l=w.useRef(!0),u=w.useRef(!1),d=w.useRef(0);return w.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),m.jsx(a6,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:w.useCallback(()=>{window.clearTimeout(d.current),l.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:w.useCallback(h=>{u.current=h},[]),disableHoverableContent:s,children:o})};Sj.displayName=wj;var Vc="Tooltip",[s6,lu]=hh(Vc),kj=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s,onOpenChange:o,disableHoverableContent:l,delayDuration:u}=e,d=gv(Vc,e.__scopeTooltip),h=mh(t),[g,p]=w.useState(null),x=Jr(),v=w.useRef(0),S=l??d.disableHoverableContent,k=u??d.delayDuration,E=w.useRef(!1),[T,A]=Bo({prop:r,defaultProp:s??!1,onChange:D=>{D?(d.onOpen(),document.dispatchEvent(new CustomEvent(xy))):d.onClose(),o==null||o(D)},caller:Vc}),O=w.useMemo(()=>T?E.current?"delayed-open":"instant-open":"closed",[T]),R=w.useCallback(()=>{window.clearTimeout(v.current),v.current=0,E.current=!1,A(!0)},[A]),M=w.useCallback(()=>{window.clearTimeout(v.current),v.current=0,A(!1)},[A]),_=w.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{E.current=!0,A(!0),v.current=0},k)},[k,A]);return w.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),m.jsx(tv,{...h,children:m.jsx(s6,{scope:t,contentId:x,open:T,stateAttribute:O,trigger:g,onTriggerChange:p,onTriggerEnter:w.useCallback(()=>{d.isOpenDelayedRef.current?_():R()},[d.isOpenDelayedRef,_,R]),onTriggerLeave:w.useCallback(()=>{S?M():(window.clearTimeout(v.current),v.current=0)},[M,S]),onOpen:R,onClose:M,disableHoverableContent:S,children:n})})};kj.displayName=Vc;var vy="TooltipTrigger",Cj=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=lu(vy,n),o=gv(vy,n),l=mh(n),u=w.useRef(null),d=ot(t,u,s.onTriggerChange),h=w.useRef(!1),g=w.useRef(!1),p=w.useCallback(()=>h.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),m.jsx(nv,{asChild:!0,...l,children:m.jsx(qe.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:d,onPointerMove:ke(e.onPointerMove,x=>{x.pointerType!=="touch"&&!g.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),g.current=!0)}),onPointerLeave:ke(e.onPointerLeave,()=>{s.onTriggerLeave(),g.current=!1}),onPointerDown:ke(e.onPointerDown,()=>{s.open&&s.onClose(),h.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:ke(e.onFocus,()=>{h.current||s.onOpen()}),onBlur:ke(e.onBlur,s.onClose),onClick:ke(e.onClick,s.onClose)})})});Cj.displayName=vy;var yv="TooltipPortal",[o6,l6]=hh(yv,{forceMount:void 0}),Tj=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:s}=e,o=lu(yv,t);return m.jsx(o6,{scope:t,forceMount:n,children:m.jsx($n,{present:n||o.open,children:m.jsx(ru,{asChild:!0,container:s,children:r})})})};Tj.displayName=yv;var Ho="TooltipContent",Ej=w.forwardRef((e,t)=>{const n=l6(Ho,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...o}=e,l=lu(Ho,e.__scopeTooltip);return m.jsx($n,{present:r||l.open,children:l.disableHoverableContent?m.jsx(_j,{side:s,...o,ref:t}):m.jsx(c6,{side:s,...o,ref:t})})}),c6=w.forwardRef((e,t)=>{const n=lu(Ho,e.__scopeTooltip),r=gv(Ho,e.__scopeTooltip),s=w.useRef(null),o=ot(t,s),[l,u]=w.useState(null),{trigger:d,onClose:h}=n,g=s.current,{onPointerInTransitChange:p}=r,x=w.useCallback(()=>{u(null),p(!1)},[p]),v=w.useCallback((S,k)=>{const E=S.currentTarget,T={x:S.clientX,y:S.clientY},A=h6(T,E.getBoundingClientRect()),O=m6(T,A),R=p6(k.getBoundingClientRect()),M=y6([...O,...R]);u(M),p(!0)},[p]);return w.useEffect(()=>()=>x(),[x]),w.useEffect(()=>{if(d&&g){const S=E=>v(E,g),k=E=>v(E,d);return d.addEventListener("pointerleave",S),g.addEventListener("pointerleave",k),()=>{d.removeEventListener("pointerleave",S),g.removeEventListener("pointerleave",k)}}},[d,g,v,x]),w.useEffect(()=>{if(l){const S=k=>{const E=k.target,T={x:k.clientX,y:k.clientY},A=(d==null?void 0:d.contains(E))||(g==null?void 0:g.contains(E)),O=!g6(T,l);A?x():O&&(x(),h())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[d,g,l,h,x]),m.jsx(_j,{...e,ref:o})}),[u6,d6]=hh(Vc,{isInside:!1}),f6=M4("TooltipContent"),_j=w.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:l,...u}=e,d=lu(Ho,n),h=mh(n),{onClose:g}=d;return w.useEffect(()=>(document.addEventListener(xy,g),()=>document.removeEventListener(xy,g)),[g]),w.useEffect(()=>{if(d.trigger){const p=x=>{const v=x.target;v!=null&&v.contains(d.trigger)&&g()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[d.trigger,g]),m.jsx(nu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:p=>p.preventDefault(),onDismiss:g,children:m.jsxs(rv,{"data-state":d.stateAttribute,...h,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m.jsx(f6,{children:r}),m.jsx(u6,{scope:n,isInside:!0,children:m.jsx(I4,{id:d.contentId,role:"tooltip",children:s||r})})]})})});Ej.displayName=Ho;var jj="TooltipArrow",Nj=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=mh(n);return d6(jj,n).isInside?null:m.jsx(iv,{...s,...r,ref:t})});Nj.displayName=jj;function h6(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,s,o)){case o:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function m6(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function p6(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function g6(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const u=t[o],d=t[l],h=u.x,g=u.y,p=d.x,x=d.y;g>r!=x>r&&n<(p-h)*(r-g)/(x-g)+h&&(s=!s)}return s}function y6(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),x6(t)}function x6(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const o=t[t.length-1],l=t[t.length-2];if((o.x-l.x)*(s.y-l.y)>=(o.y-l.y)*(s.x-l.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const o=n[n.length-1],l=n[n.length-2];if((o.x-l.x)*(s.y-l.y)>=(o.y-l.y)*(s.x-l.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var v6=Sj,b6=kj,w6=Cj,S6=Tj,k6=Ej,C6=Nj;const vk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,bk=Lx,xv=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return bk(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,l=Object.keys(s).map(h=>{const g=n==null?void 0:n[h],p=o==null?void 0:o[h];if(g===null)return null;const x=vk(g)||vk(p);return s[h][x]}),u=n&&Object.entries(n).reduce((h,g)=>{let[p,x]=g;return x===void 0||(h[p]=x),h},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,g)=>{let{class:p,className:x,...v}=g;return Object.entries(v).every(S=>{let[k,E]=S;return Array.isArray(E)?E.includes({...o,...u}[k]):{...o,...u}[k]===E})?[...h,p,x]:h},[]);return bk(e,l,d,n==null?void 0:n.class,n==null?void 0:n.className)},T6=xv("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Je({className:e,variant:t,size:n,asChild:r=!1,...s}){const o=r?Bx:"button";return m.jsx(o,{"data-slot":"button",className:Me(T6({variant:t,size:n,className:e})),...s})}/**
94
+ * @license lucide-react v0.525.0 - ISC
95
+ *
96
+ * This source code is licensed under the ISC license.
97
+ * See the LICENSE file in the root directory of this source tree.
98
+ */const E6=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_6=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),wk=e=>{const t=_6(e);return t.charAt(0).toUpperCase()+t.slice(1)},Aj=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),j6=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
99
+ * @license lucide-react v0.525.0 - ISC
100
+ *
101
+ * This source code is licensed under the ISC license.
102
+ * See the LICENSE file in the root directory of this source tree.
103
+ */var N6={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
104
+ * @license lucide-react v0.525.0 - ISC
105
+ *
106
+ * This source code is licensed under the ISC license.
107
+ * See the LICENSE file in the root directory of this source tree.
108
+ */const A6=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:l,...u},d)=>w.createElement("svg",{ref:d,...N6,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Aj("lucide",s),...!o&&!j6(u)&&{"aria-hidden":"true"},...u},[...l.map(([h,g])=>w.createElement(h,g)),...Array.isArray(o)?o:[o]]));/**
109
+ * @license lucide-react v0.525.0 - ISC
110
+ *
111
+ * This source code is licensed under the ISC license.
112
+ * See the LICENSE file in the root directory of this source tree.
113
+ */const Ke=(e,t)=>{const n=w.forwardRef(({className:r,...s},o)=>w.createElement(A6,{ref:o,iconNode:t,className:Aj(`lucide-${E6(wk(e))}`,`lucide-${e}`,r),...s}));return n.displayName=wk(e),n};/**
114
+ * @license lucide-react v0.525.0 - ISC
115
+ *
116
+ * This source code is licensed under the ISC license.
117
+ * See the LICENSE file in the root directory of this source tree.
118
+ */const R6=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],M6=Ke("arrow-down",R6);/**
119
+ * @license lucide-react v0.525.0 - ISC
120
+ *
121
+ * This source code is licensed under the ISC license.
122
+ * See the LICENSE file in the root directory of this source tree.
123
+ */const O6=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Rj=Ke("arrow-up",O6);/**
124
+ * @license lucide-react v0.525.0 - ISC
125
+ *
126
+ * This source code is licensed under the ISC license.
127
+ * See the LICENSE file in the root directory of this source tree.
128
+ */const D6=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]],P6=Ke("brain",D6);/**
129
+ * @license lucide-react v0.525.0 - ISC
130
+ *
131
+ * This source code is licensed under the ISC license.
132
+ * See the LICENSE file in the root directory of this source tree.
133
+ */const z6=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Pr=Ke("check",z6);/**
134
+ * @license lucide-react v0.525.0 - ISC
135
+ *
136
+ * This source code is licensed under the ISC license.
137
+ * See the LICENSE file in the root directory of this source tree.
138
+ */const L6=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],al=Ke("chevron-down",L6);/**
139
+ * @license lucide-react v0.525.0 - ISC
140
+ *
141
+ * This source code is licensed under the ISC license.
142
+ * See the LICENSE file in the root directory of this source tree.
143
+ */const I6=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],sl=Ke("chevron-right",I6);/**
144
+ * @license lucide-react v0.525.0 - ISC
145
+ *
146
+ * This source code is licensed under the ISC license.
147
+ * See the LICENSE file in the root directory of this source tree.
148
+ */const B6=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Mj=Ke("chevron-up",B6);/**
149
+ * @license lucide-react v0.525.0 - ISC
150
+ *
151
+ * This source code is licensed under the ISC license.
152
+ * See the LICENSE file in the root directory of this source tree.
153
+ */const V6=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],cg=Ke("circle-check-big",V6);/**
154
+ * @license lucide-react v0.525.0 - ISC
155
+ *
156
+ * This source code is licensed under the ISC license.
157
+ * See the LICENSE file in the root directory of this source tree.
158
+ */const U6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],ug=Ke("circle-x",U6);/**
159
+ * @license lucide-react v0.525.0 - ISC
160
+ *
161
+ * This source code is licensed under the ISC license.
162
+ * See the LICENSE file in the root directory of this source tree.
163
+ */const H6=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],dg=Ke("clock",H6);/**
164
+ * @license lucide-react v0.525.0 - ISC
165
+ *
166
+ * This source code is licensed under the ISC license.
167
+ * See the LICENSE file in the root directory of this source tree.
168
+ */const F6=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ss=Ke("copy",F6);/**
169
+ * @license lucide-react v0.525.0 - ISC
170
+ *
171
+ * This source code is licensed under the ISC license.
172
+ * See the LICENSE file in the root directory of this source tree.
173
+ */const $6=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],q6=Ke("database",$6);/**
174
+ * @license lucide-react v0.525.0 - ISC
175
+ *
176
+ * This source code is licensed under the ISC license.
177
+ * See the LICENSE file in the root directory of this source tree.
178
+ */const G6=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],Y6=Ke("ellipsis-vertical",G6);/**
179
+ * @license lucide-react v0.525.0 - ISC
180
+ *
181
+ * This source code is licensed under the ISC license.
182
+ * See the LICENSE file in the root directory of this source tree.
183
+ */const Z6=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Sk=Ke("eye-off",Z6);/**
184
+ * @license lucide-react v0.525.0 - ISC
185
+ *
186
+ * This source code is licensed under the ISC license.
187
+ * See the LICENSE file in the root directory of this source tree.
188
+ */const X6=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],wf=Ke("eye",X6);/**
189
+ * @license lucide-react v0.525.0 - ISC
190
+ *
191
+ * This source code is licensed under the ISC license.
192
+ * See the LICENSE file in the root directory of this source tree.
193
+ */const K6=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],W6=Ke("file",K6);/**
194
+ * @license lucide-react v0.525.0 - ISC
195
+ *
196
+ * This source code is licensed under the ISC license.
197
+ * See the LICENSE file in the root directory of this source tree.
198
+ */const Q6=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],by=Ke("folder-open",Q6);/**
199
+ * @license lucide-react v0.525.0 - ISC
200
+ *
201
+ * This source code is licensed under the ISC license.
202
+ * See the LICENSE file in the root directory of this source tree.
203
+ */const J6=[["circle",{cx:"6",cy:"15",r:"4",key:"vux9w4"}],["circle",{cx:"18",cy:"15",r:"4",key:"18o8ve"}],["path",{d:"M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2",key:"1ag4bs"}],["path",{d:"M2.5 13 5 7c.7-1.3 1.4-2 3-2",key:"1hm1gs"}],["path",{d:"M21.5 13 19 7c-.7-1.3-1.5-2-3-2",key:"1r31ai"}]],eI=Ke("glasses",J6);/**
204
+ * @license lucide-react v0.525.0 - ISC
205
+ *
206
+ * This source code is licensed under the ISC license.
207
+ * See the LICENSE file in the root directory of this source tree.
208
+ */const tI=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],nI=Ke("grip-vertical",tI);/**
209
+ * @license lucide-react v0.525.0 - ISC
210
+ *
211
+ * This source code is licensed under the ISC license.
212
+ * See the LICENSE file in the root directory of this source tree.
213
+ */const rI=[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]],iI=Ke("hammer",rI);/**
214
+ * @license lucide-react v0.525.0 - ISC
215
+ *
216
+ * This source code is licensed under the ISC license.
217
+ * See the LICENSE file in the root directory of this source tree.
218
+ */const aI=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],sI=Ke("key",aI);/**
219
+ * @license lucide-react v0.525.0 - ISC
220
+ *
221
+ * This source code is licensed under the ISC license.
222
+ * See the LICENSE file in the root directory of this source tree.
223
+ */const oI=[["path",{d:"M9 17H7A5 5 0 0 1 7 7",key:"10o201"}],["path",{d:"M15 7h2a5 5 0 0 1 4 8",key:"1d3206"}],["line",{x1:"8",x2:"12",y1:"12",y2:"12",key:"rvw6j4"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]],lI=Ke("link-2-off",oI);/**
224
+ * @license lucide-react v0.525.0 - ISC
225
+ *
226
+ * This source code is licensed under the ISC license.
227
+ * See the LICENSE file in the root directory of this source tree.
228
+ */const cI=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],fg=Ke("loader-circle",cI);/**
229
+ * @license lucide-react v0.525.0 - ISC
230
+ *
231
+ * This source code is licensed under the ISC license.
232
+ * See the LICENSE file in the root directory of this source tree.
233
+ */const uI=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],Oj=Ke("message-circle",uI);/**
234
+ * @license lucide-react v0.525.0 - ISC
235
+ *
236
+ * This source code is licensed under the ISC license.
237
+ * See the LICENSE file in the root directory of this source tree.
238
+ */const dI=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],wy=Ke("message-square",dI);/**
239
+ * @license lucide-react v0.525.0 - ISC
240
+ *
241
+ * This source code is licensed under the ISC license.
242
+ * See the LICENSE file in the root directory of this source tree.
243
+ */const fI=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],hI=Ke("moon",fI);/**
244
+ * @license lucide-react v0.525.0 - ISC
245
+ *
246
+ * This source code is licensed under the ISC license.
247
+ * See the LICENSE file in the root directory of this source tree.
248
+ */const mI=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],pI=Ke("panel-left",mI);/**
249
+ * @license lucide-react v0.525.0 - ISC
250
+ *
251
+ * This source code is licensed under the ISC license.
252
+ * See the LICENSE file in the root directory of this source tree.
253
+ */const gI=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],yI=Ke("paperclip",gI);/**
254
+ * @license lucide-react v0.525.0 - ISC
255
+ *
256
+ * This source code is licensed under the ISC license.
257
+ * See the LICENSE file in the root directory of this source tree.
258
+ */const xI=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],Sf=Ke("play",xI);/**
259
+ * @license lucide-react v0.525.0 - ISC
260
+ *
261
+ * This source code is licensed under the ISC license.
262
+ * See the LICENSE file in the root directory of this source tree.
263
+ */const vI=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],kk=Ke("plus",vI);/**
264
+ * @license lucide-react v0.525.0 - ISC
265
+ *
266
+ * This source code is licensed under the ISC license.
267
+ * See the LICENSE file in the root directory of this source tree.
268
+ */const bI=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Lr=Ke("refresh-cw",bI);/**
269
+ * @license lucide-react v0.525.0 - ISC
270
+ *
271
+ * This source code is licensed under the ISC license.
272
+ * See the LICENSE file in the root directory of this source tree.
273
+ */const wI=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],SI=Ke("rotate-ccw",wI);/**
274
+ * @license lucide-react v0.525.0 - ISC
275
+ *
276
+ * This source code is licensed under the ISC license.
277
+ * See the LICENSE file in the root directory of this source tree.
278
+ */const kI=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],CI=Ke("search",kI);/**
279
+ * @license lucide-react v0.525.0 - ISC
280
+ *
281
+ * This source code is licensed under the ISC license.
282
+ * See the LICENSE file in the root directory of this source tree.
283
+ */const TI=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Dj=Ke("settings",TI);/**
284
+ * @license lucide-react v0.525.0 - ISC
285
+ *
286
+ * This source code is licensed under the ISC license.
287
+ * See the LICENSE file in the root directory of this source tree.
288
+ */const EI=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],_I=Ke("square-pen",EI);/**
289
+ * @license lucide-react v0.525.0 - ISC
290
+ *
291
+ * This source code is licensed under the ISC license.
292
+ * See the LICENSE file in the root directory of this source tree.
293
+ */const jI=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],NI=Ke("square",jI);/**
294
+ * @license lucide-react v0.525.0 - ISC
295
+ *
296
+ * This source code is licensed under the ISC license.
297
+ * See the LICENSE file in the root directory of this source tree.
298
+ */const AI=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],RI=Ke("sun",AI);/**
299
+ * @license lucide-react v0.525.0 - ISC
300
+ *
301
+ * This source code is licensed under the ISC license.
302
+ * See the LICENSE file in the root directory of this source tree.
303
+ */const MI=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],OI=Ke("wifi",MI);/**
304
+ * @license lucide-react v0.525.0 - ISC
305
+ *
306
+ * This source code is licensed under the ISC license.
307
+ * See the LICENSE file in the root directory of this source tree.
308
+ */const DI=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]],Ck=Ke("wrench",DI);/**
309
+ * @license lucide-react v0.525.0 - ISC
310
+ *
311
+ * This source code is licensed under the ISC license.
312
+ * See the LICENSE file in the root directory of this source tree.
313
+ */const PI=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Fo=Ke("x",PI);function zI(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const LI=e=>{switch(e){case"success":return VI;case"info":return HI;case"warning":return UI;case"error":return FI;default:return null}},II=Array(12).fill(0),BI=({visible:e,className:t})=>ye.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ye.createElement("div",{className:"sonner-spinner"},II.map((n,r)=>ye.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),VI=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),UI=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ye.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),HI=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),FI=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),$I=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ye.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ye.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),qI=()=>{const[e,t]=ye.useState(document.hidden);return ye.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Sy=1;class GI{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...s}=t,o=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Sy++,l=this.toasts.find(d=>d.id===o),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),l?this.toasts=this.toasts.map(d=>d.id===o?(this.publish({...d,...t,id:o,title:r}),{...d,...t,id:o,dismissible:u,title:r}):d):this.addToast({title:r,...s,dismissible:u,id:o}),o},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const s=Promise.resolve(t instanceof Function?t():t);let o=r!==void 0,l;const u=s.then(async h=>{if(l=["resolve",h],ye.isValidElement(h))o=!1,this.create({id:r,type:"default",message:h});else if(ZI(h)&&!h.ok){o=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${h.status}`):n.error,x=typeof n.description=="function"?await n.description(`HTTP error! status: ${h.status}`):n.description,S=typeof p=="object"&&!ye.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:x,...S})}else if(h instanceof Error){o=!1;const p=typeof n.error=="function"?await n.error(h):n.error,x=typeof n.description=="function"?await n.description(h):n.description,S=typeof p=="object"&&!ye.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:x,...S})}else if(n.success!==void 0){o=!1;const p=typeof n.success=="function"?await n.success(h):n.success,x=typeof n.description=="function"?await n.description(h):n.description,S=typeof p=="object"&&!ye.isValidElement(p)?p:{message:p};this.create({id:r,type:"success",description:x,...S})}}).catch(async h=>{if(l=["reject",h],n.error!==void 0){o=!1;const g=typeof n.error=="function"?await n.error(h):n.error,p=typeof n.description=="function"?await n.description(h):n.description,v=typeof g=="object"&&!ye.isValidElement(g)?g:{message:g};this.create({id:r,type:"error",description:p,...v})}}).finally(()=>{o&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),d=()=>new Promise((h,g)=>u.then(()=>l[0]==="reject"?g(l[1]):h(l[1])).catch(g));return typeof r!="string"&&typeof r!="number"?{unwrap:d}:Object.assign(r,{unwrap:d})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Sy++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Hn=new GI,YI=(e,t)=>{const n=(t==null?void 0:t.id)||Sy++;return Hn.addToast({title:e,...t,id:n}),n},ZI=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",XI=YI,KI=()=>Hn.toasts,WI=()=>Hn.getActiveToasts(),Xt=Object.assign(XI,{success:Hn.success,info:Hn.info,warning:Hn.warning,error:Hn.error,custom:Hn.custom,message:Hn.message,promise:Hn.promise,dismiss:Hn.dismiss,loading:Hn.loading},{getHistory:KI,getToasts:WI});zI("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Ud(e){return e.label!==void 0}const QI=3,JI="24px",e7="16px",Tk=4e3,t7=356,n7=14,r7=45,i7=200;function Xr(...e){return e.filter(Boolean).join(" ")}function a7(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const s7=e=>{var t,n,r,s,o,l,u,d,h;const{invert:g,toast:p,unstyled:x,interacting:v,setHeights:S,visibleToasts:k,heights:E,index:T,toasts:A,expanded:O,removeToast:R,defaultRichColors:M,closeButton:_,style:D,cancelButtonStyle:P,actionButtonStyle:B,className:z="",descriptionClassName:H="",duration:$,position:re,gap:te,expandByDefault:ie,classNames:I,icons:F,closeButtonAriaLabel:V="Close toast"}=e,[Z,C]=ye.useState(null),[G,le]=ye.useState(null),[N,K]=ye.useState(!1),[Q,X]=ye.useState(!1),[Y,oe]=ye.useState(!1),[ce,me]=ye.useState(!1),[be,Te]=ye.useState(!1),[Ve,lt]=ye.useState(0),[Mt,Lt]=ye.useState(0),st=ye.useRef(p.duration||$||Tk),yt=ye.useRef(null),kt=ye.useRef(null),lr=T===0,Jt=T+1<=k,Ct=p.type,Yn=p.dismissible!==!1,fl=p.className||"",hl=p.descriptionClassName||"",ue=ye.useMemo(()=>E.findIndex(Fe=>Fe.toastId===p.id)||0,[E,p.id]),ge=ye.useMemo(()=>{var Fe;return(Fe=p.closeButton)!=null?Fe:_},[p.closeButton,_]),Oe=ye.useMemo(()=>p.duration||$||Tk,[p.duration,$]),De=ye.useRef(0),it=ye.useRef(0),bn=ye.useRef(0),wn=ye.useRef(null),[Sn,cr]=re.split("-"),kn=ye.useMemo(()=>E.reduce((Fe,Bt,Gt)=>Gt>=ue?Fe:Fe+Bt.height,0),[E,ue]),It=qI(),zn=p.invert||g,Nn=Ct==="loading";it.current=ye.useMemo(()=>ue*te+kn,[ue,kn]),ye.useEffect(()=>{st.current=Oe},[Oe]),ye.useEffect(()=>{K(!0)},[]),ye.useEffect(()=>{const Fe=kt.current;if(Fe){const Bt=Fe.getBoundingClientRect().height;return Lt(Bt),S(Gt=>[{toastId:p.id,height:Bt,position:p.position},...Gt]),()=>S(Gt=>Gt.filter(fn=>fn.toastId!==p.id))}},[S,p.id]),ye.useLayoutEffect(()=>{if(!N)return;const Fe=kt.current,Bt=Fe.style.height;Fe.style.height="auto";const Gt=Fe.getBoundingClientRect().height;Fe.style.height=Bt,Lt(Gt),S(fn=>fn.find(en=>en.toastId===p.id)?fn.map(en=>en.toastId===p.id?{...en,height:Gt}:en):[{toastId:p.id,height:Gt,position:p.position},...fn])},[N,p.title,p.description,S,p.id,p.jsx,p.action,p.cancel]);const Nr=ye.useCallback(()=>{X(!0),lt(it.current),S(Fe=>Fe.filter(Bt=>Bt.toastId!==p.id)),setTimeout(()=>{R(p)},i7)},[p,R,S,it]);ye.useEffect(()=>{if(p.promise&&Ct==="loading"||p.duration===1/0||p.type==="loading")return;let Fe;return O||v||It?(()=>{if(bn.current<De.current){const fn=new Date().getTime()-De.current;st.current=st.current-fn}bn.current=new Date().getTime()})():(()=>{st.current!==1/0&&(De.current=new Date().getTime(),Fe=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Nr()},st.current))})(),()=>clearTimeout(Fe)},[O,v,p,Ct,It,Nr]),ye.useEffect(()=>{p.delete&&(Nr(),p.onDismiss==null||p.onDismiss.call(p,p))},[Nr,p.delete]);function wu(){var Fe;if(F!=null&&F.loading){var Bt;return ye.createElement("div",{className:Xr(I==null?void 0:I.loader,p==null||(Bt=p.classNames)==null?void 0:Bt.loader,"sonner-loader"),"data-visible":Ct==="loading"},F.loading)}return ye.createElement(BI,{className:Xr(I==null?void 0:I.loader,p==null||(Fe=p.classNames)==null?void 0:Fe.loader),visible:Ct==="loading"})}const ml=p.icon||(F==null?void 0:F[Ct])||LI(Ct);var Ui,Su;return ye.createElement("li",{tabIndex:0,ref:kt,className:Xr(z,fl,I==null?void 0:I.toast,p==null||(t=p.classNames)==null?void 0:t.toast,I==null?void 0:I.default,I==null?void 0:I[Ct],p==null||(n=p.classNames)==null?void 0:n[Ct]),"data-sonner-toast":"","data-rich-colors":(Ui=p.richColors)!=null?Ui:M,"data-styled":!(p.jsx||p.unstyled||x),"data-mounted":N,"data-promise":!!p.promise,"data-swiped":be,"data-removed":Q,"data-visible":Jt,"data-y-position":Sn,"data-x-position":cr,"data-index":T,"data-front":lr,"data-swiping":Y,"data-dismissible":Yn,"data-type":Ct,"data-invert":zn,"data-swipe-out":ce,"data-swipe-direction":G,"data-expanded":!!(O||ie&&N),style:{"--index":T,"--toasts-before":T,"--z-index":A.length-T,"--offset":`${Q?Ve:it.current}px`,"--initial-height":ie?"auto":`${Mt}px`,...D,...p.style},onDragEnd:()=>{oe(!1),C(null),wn.current=null},onPointerDown:Fe=>{Fe.button!==2&&(Nn||!Yn||(yt.current=new Date,lt(it.current),Fe.target.setPointerCapture(Fe.pointerId),Fe.target.tagName!=="BUTTON"&&(oe(!0),wn.current={x:Fe.clientX,y:Fe.clientY})))},onPointerUp:()=>{var Fe,Bt,Gt;if(ce||!Yn)return;wn.current=null;const fn=Number(((Fe=kt.current)==null?void 0:Fe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Pa=Number(((Bt=kt.current)==null?void 0:Bt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),en=new Date().getTime()-((Gt=yt.current)==null?void 0:Gt.getTime()),Vt=Z==="x"?fn:Pa,Ut=Math.abs(Vt)/en;if(Math.abs(Vt)>=r7||Ut>.11){lt(it.current),p.onDismiss==null||p.onDismiss.call(p,p),le(Z==="x"?fn>0?"right":"left":Pa>0?"down":"up"),Nr(),me(!0);return}else{var Tt,sn;(Tt=kt.current)==null||Tt.style.setProperty("--swipe-amount-x","0px"),(sn=kt.current)==null||sn.style.setProperty("--swipe-amount-y","0px")}Te(!1),oe(!1),C(null)},onPointerMove:Fe=>{var Bt,Gt,fn;if(!wn.current||!Yn||((Bt=window.getSelection())==null?void 0:Bt.toString().length)>0)return;const en=Fe.clientY-wn.current.y,Vt=Fe.clientX-wn.current.x;var Ut;const Tt=(Ut=e.swipeDirections)!=null?Ut:a7(re);!Z&&(Math.abs(Vt)>1||Math.abs(en)>1)&&C(Math.abs(Vt)>Math.abs(en)?"x":"y");let sn={x:0,y:0};const As=di=>1/(1.5+Math.abs(di)/20);if(Z==="y"){if(Tt.includes("top")||Tt.includes("bottom"))if(Tt.includes("top")&&en<0||Tt.includes("bottom")&&en>0)sn.y=en;else{const di=en*As(en);sn.y=Math.abs(di)<Math.abs(en)?di:en}}else if(Z==="x"&&(Tt.includes("left")||Tt.includes("right")))if(Tt.includes("left")&&Vt<0||Tt.includes("right")&&Vt>0)sn.x=Vt;else{const di=Vt*As(Vt);sn.x=Math.abs(di)<Math.abs(Vt)?di:Vt}(Math.abs(sn.x)>0||Math.abs(sn.y)>0)&&Te(!0),(Gt=kt.current)==null||Gt.style.setProperty("--swipe-amount-x",`${sn.x}px`),(fn=kt.current)==null||fn.style.setProperty("--swipe-amount-y",`${sn.y}px`)}},ge&&!p.jsx&&Ct!=="loading"?ye.createElement("button",{"aria-label":V,"data-disabled":Nn,"data-close-button":!0,onClick:Nn||!Yn?()=>{}:()=>{Nr(),p.onDismiss==null||p.onDismiss.call(p,p)},className:Xr(I==null?void 0:I.closeButton,p==null||(r=p.classNames)==null?void 0:r.closeButton)},(Su=F==null?void 0:F.close)!=null?Su:$I):null,(Ct||p.icon||p.promise)&&p.icon!==null&&((F==null?void 0:F[Ct])!==null||p.icon)?ye.createElement("div",{"data-icon":"",className:Xr(I==null?void 0:I.icon,p==null||(s=p.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||wu():null,p.type!=="loading"?ml:null):null,ye.createElement("div",{"data-content":"",className:Xr(I==null?void 0:I.content,p==null||(o=p.classNames)==null?void 0:o.content)},ye.createElement("div",{"data-title":"",className:Xr(I==null?void 0:I.title,p==null||(l=p.classNames)==null?void 0:l.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?ye.createElement("div",{"data-description":"",className:Xr(H,hl,I==null?void 0:I.description,p==null||(u=p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),ye.isValidElement(p.cancel)?p.cancel:p.cancel&&Ud(p.cancel)?ye.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||P,onClick:Fe=>{Ud(p.cancel)&&Yn&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Fe),Nr())},className:Xr(I==null?void 0:I.cancelButton,p==null||(d=p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,ye.isValidElement(p.action)?p.action:p.action&&Ud(p.action)?ye.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||B,onClick:Fe=>{Ud(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Fe),!Fe.defaultPrevented&&Nr())},className:Xr(I==null?void 0:I.actionButton,p==null||(h=p.classNames)==null?void 0:h.actionButton)},p.action.label):null)};function Ek(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function o7(e,t){const n={};return[e,t].forEach((r,s)=>{const o=s===1,l=o?"--mobile-offset":"--offset",u=o?e7:JI;function d(h){["top","right","bottom","left"].forEach(g=>{n[`${l}-${g}`]=typeof h=="number"?`${h}px`:h})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(h=>{r[h]===void 0?n[`${l}-${h}`]=u:n[`${l}-${h}`]=typeof r[h]=="number"?`${r[h]}px`:r[h]}):d(u)}),n}const l7=ye.forwardRef(function(t,n){const{invert:r,position:s="bottom-right",hotkey:o=["altKey","KeyT"],expand:l,closeButton:u,className:d,offset:h,mobileOffset:g,theme:p="light",richColors:x,duration:v,style:S,visibleToasts:k=QI,toastOptions:E,dir:T=Ek(),gap:A=n7,icons:O,containerAriaLabel:R="Notifications"}=t,[M,_]=ye.useState([]),D=ye.useMemo(()=>Array.from(new Set([s].concat(M.filter(G=>G.position).map(G=>G.position)))),[M,s]),[P,B]=ye.useState([]),[z,H]=ye.useState(!1),[$,re]=ye.useState(!1),[te,ie]=ye.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),I=ye.useRef(null),F=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),V=ye.useRef(null),Z=ye.useRef(!1),C=ye.useCallback(G=>{_(le=>{var N;return(N=le.find(K=>K.id===G.id))!=null&&N.delete||Hn.dismiss(G.id),le.filter(({id:K})=>K!==G.id)})},[]);return ye.useEffect(()=>Hn.subscribe(G=>{if(G.dismiss){requestAnimationFrame(()=>{_(le=>le.map(N=>N.id===G.id?{...N,delete:!0}:N))});return}setTimeout(()=>{GE.flushSync(()=>{_(le=>{const N=le.findIndex(K=>K.id===G.id);return N!==-1?[...le.slice(0,N),{...le[N],...G},...le.slice(N+1)]:[G,...le]})})})}),[M]),ye.useEffect(()=>{if(p!=="system"){ie(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ie("dark"):ie("light")),typeof window>"u")return;const G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:le})=>{ie(le?"dark":"light")})}catch{G.addListener(({matches:N})=>{try{ie(N?"dark":"light")}catch(K){console.error(K)}})}},[p]),ye.useEffect(()=>{M.length<=1&&H(!1)},[M]),ye.useEffect(()=>{const G=le=>{var N;if(o.every(X=>le[X]||le.code===X)){var Q;H(!0),(Q=I.current)==null||Q.focus()}le.code==="Escape"&&(document.activeElement===I.current||(N=I.current)!=null&&N.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[o]),ye.useEffect(()=>{if(I.current)return()=>{V.current&&(V.current.focus({preventScroll:!0}),V.current=null,Z.current=!1)}},[I.current]),ye.createElement("section",{ref:n,"aria-label":`${R} ${F}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},D.map((G,le)=>{var N;const[K,Q]=G.split("-");return M.length?ye.createElement("ol",{key:G,dir:T==="auto"?Ek():T,tabIndex:-1,ref:I,className:d,"data-sonner-toaster":!0,"data-sonner-theme":te,"data-y-position":K,"data-x-position":Q,style:{"--front-toast-height":`${((N=P[0])==null?void 0:N.height)||0}px`,"--width":`${t7}px`,"--gap":`${A}px`,...S,...o7(h,g)},onBlur:X=>{Z.current&&!X.currentTarget.contains(X.relatedTarget)&&(Z.current=!1,V.current&&(V.current.focus({preventScroll:!0}),V.current=null))},onFocus:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||Z.current||(Z.current=!0,V.current=X.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{$||H(!1)},onDragEnd:()=>H(!1),onPointerDown:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||re(!0)},onPointerUp:()=>re(!1)},M.filter(X=>!X.position&&le===0||X.position===G).map((X,Y)=>{var oe,ce;return ye.createElement(s7,{key:X.id,icons:O,index:Y,toast:X,defaultRichColors:x,duration:(oe=E==null?void 0:E.duration)!=null?oe:v,className:E==null?void 0:E.className,descriptionClassName:E==null?void 0:E.descriptionClassName,invert:r,visibleToasts:k,closeButton:(ce=E==null?void 0:E.closeButton)!=null?ce:u,interacting:$,position:G,style:E==null?void 0:E.style,unstyled:E==null?void 0:E.unstyled,classNames:E==null?void 0:E.classNames,cancelButtonStyle:E==null?void 0:E.cancelButtonStyle,actionButtonStyle:E==null?void 0:E.actionButtonStyle,closeButtonAriaLabel:E==null?void 0:E.closeButtonAriaLabel,removeToast:C,toasts:M.filter(me=>me.position==X.position),heights:P.filter(me=>me.position==X.position),setHeights:B,expandByDefault:l,gap:A,expanded:z,swipeDirections:t.swipeDirections})})):null}))});function c7({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return m.jsx(r6,{"data-slot":"separator",decorative:n,orientation:t,className:Me("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function ph({delayDuration:e=0,...t}){return m.jsx(v6,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function cs({...e}){return m.jsx(ph,{children:m.jsx(b6,{"data-slot":"tooltip",...e})})}function us({...e}){return m.jsx(w6,{"data-slot":"tooltip-trigger",...e})}function ds({className:e,sideOffset:t=0,children:n,...r}){return m.jsx(S6,{children:m.jsxs(k6,{"data-slot":"tooltip-content",sideOffset:t,className:Me("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:[n,m.jsx(C6,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function Pj({...e}){return m.jsx(Qz,{"data-slot":"dropdown-menu",...e})}function zj({...e}){return m.jsx(Jz,{"data-slot":"dropdown-menu-trigger",...e})}function Lj({className:e,sideOffset:t=4,...n}){return m.jsx(eL,{children:m.jsx(tL,{"data-slot":"dropdown-menu-content",sideOffset:t,className:Me("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function nf({className:e,inset:t,variant:n="default",...r}){return m.jsx(nL,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:Me("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function u7({server:e,onDisconnect:t,onReconnect:n,onEdit:r}){var P,B;const[s,o]=w.useState(!1),[l,u]=w.useState(!1),[d,h]=w.useState(!1),[g,p]=w.useState(null),x=e.config.url!==void 0,v=e.oauthTokens,S=(P=e.config.requestInit)==null?void 0:P.headers,k=((B=S==null?void 0:S.Authorization)==null?void 0:B.startsWith("Bearer "))&&S.Authorization.slice(7),E=v||k||!x,A=(()=>{var z;return(z=e.oauthTokens)!=null&&z.expires_in?{percentage:100,timeLeft:36e5,hours:1,minutes:0,seconds:0,isExpired:!1,isExpiringSoon:!1}:null})(),O=async(z,H)=>{try{await navigator.clipboard.writeText(z),p(H),setTimeout(()=>p(null),2e3)}catch($){console.error("Failed to copy text:",$)}},R=async()=>{u(!0);try{n(e.name)}catch(z){const H=z instanceof Error?z.message:"Unknown error";Xt.error(`Failed to reconnect to ${e.name}: ${H}`)}finally{u(!1)}},M=()=>{switch(e.connectionStatus){case"connected":return"Connected";case"connecting":return"Connecting...";case"oauth-flow":return"Authorizing...";case"failed":return`Failed (${e.retryCount} retries)`;case"disconnected":return"Disconnected"}},_=()=>{switch(e.connectionStatus){case"connected":return m.jsx(Pr,{className:"h-3 w-3 text-green-500"});case"connecting":return m.jsx(fg,{className:"h-3 w-3 text-blue-500 animate-spin"});case"oauth-flow":return m.jsx(fg,{className:"h-3 w-3 text-purple-500 animate-spin"});case"failed":return m.jsx(Fo,{className:"h-3 w-3 text-red-500"});case"disconnected":return m.jsx(OI,{className:"h-3 w-3 text-gray-500"})}},D=()=>{var $;if(x)return(($=e.config.url)==null?void 0:$.toString())||"";const z=e.config.command,H=e.config.args||[];return[z,...H].join(" ")};return m.jsx(ph,{children:m.jsx(va,{className:"border border-border/50 bg-card/50 backdrop-blur-sm hover:border-border transition-colors",children:m.jsxs("div",{className:"p-4 space-y-3 py-0",children:[m.jsxs("div",{className:"flex items-start justify-between",children:[m.jsxs("div",{className:"flex items-start gap-3 flex-1",children:[m.jsx("div",{className:"h-2 w-2 rounded-full flex-shrink-0 mt-1.5",style:{backgroundColor:e.connectionStatus==="connected"?"#10b981":e.connectionStatus==="connecting"?"#3b82f6":e.connectionStatus==="oauth-flow"?"#a855f7":e.connectionStatus==="failed"?"#ef4444":"#9ca3af"}}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("h3",{className:"font-medium text-sm text-foreground",children:e.name}),m.jsxs("div",{className:"flex justify-between mt-1",children:[m.jsx("p",{className:"text-xs text-muted-foreground",children:x?"HTTP/SSE":"STDIO"}),m.jsxs("div",{className:"flex items-center gap-1 -mr-3",children:[_(),m.jsx("p",{className:"text-xs text-muted-foreground",children:M()})]})]})]})]}),m.jsx("div",{className:"flex items-center gap-2",children:m.jsxs(Pj,{children:[m.jsx(zj,{asChild:!0,children:m.jsx(Je,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 text-muted-foreground/50 hover:text-foreground cursor-pointer",children:m.jsx(Y6,{className:"h-3 w-3"})})}),m.jsxs(Lj,{align:"end",className:"w-40",children:[m.jsxs(nf,{onClick:R,disabled:l||e.connectionStatus==="connecting"||e.connectionStatus==="oauth-flow",className:"text-xs cursor-pointer",children:[l?m.jsx(fg,{className:"h-3 w-3 mr-2 animate-spin"}):m.jsx(Lr,{className:"h-3 w-3 mr-2"}),l?"Reconnecting...":"Reconnect"]}),m.jsxs(nf,{onClick:()=>r(e),className:"text-xs cursor-pointer",children:[m.jsx(_I,{className:"h-3 w-3 mr-2"}),"Edit"]}),m.jsx(c7,{}),m.jsxs(nf,{className:"text-destructive text-xs cursor-pointer",onClick:()=>t(e.name),children:[m.jsx(lI,{className:"h-3 w-3 mr-2"}),"Disconnect"]})]})]})})]}),m.jsxs("div",{className:"font-mono text-xs text-muted-foreground bg-muted/30 p-2 rounded border border-border/30 break-all relative group",children:[m.jsx("div",{className:"pr-8",children:D()}),m.jsx("button",{onClick:()=>O(D(),"command"),className:"absolute top-1 right-1 p-1 text-muted-foreground/50 hover:text-foreground transition-colors cursor-pointer",children:g==="command"?m.jsx(Pr,{className:"h-3 w-3 text-green-500"}):m.jsx(ss,{className:"h-3 w-3"})})]}),e.connectionStatus==="failed"&&e.lastError&&m.jsxs("div",{className:"text-xs text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-950/30 p-2 rounded border border-red-200 dark:border-red-800/30",children:[m.jsx("div",{className:"break-all",children:d?e.lastError:e.lastError.length>100?`${e.lastError.substring(0,100)}...`:e.lastError}),e.lastError.length>100&&m.jsx("button",{onClick:()=>h(!d),className:"text-red-500/70 hover:text-red-500 mt-1 underline text-xs cursor-pointer",children:d?"Show less":"Show more"}),e.retryCount>0&&m.jsxs("div",{className:"text-red-500/70 mt-1",children:[e.retryCount," retry attempt",e.retryCount!==1?"s":""]})]}),E&&m.jsx("div",{className:"flex justify-end",children:m.jsx(Je,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 text-muted-foreground hover:text-foreground cursor-pointer",onClick:()=>o(!s),children:s?m.jsx(Mj,{className:"h-3 w-3"}):m.jsx(al,{className:"h-3 w-3"})})}),s&&E&&m.jsxs("div",{className:"space-y-3 pt-2",children:[k&&!e.oauthTokens&&m.jsx("div",{className:"space-y-2",children:m.jsx("div",{className:"space-y-3 text-xs",children:m.jsxs("div",{children:[m.jsx("span",{className:"text-muted-foreground font-medium",children:"Bearer Access Token (Manual):"}),m.jsxs("div",{className:"font-mono text-foreground break-all bg-muted/30 p-2 rounded mt-1 relative group",children:[m.jsx("div",{className:"pr-8",children:k}),m.jsx("button",{onClick:()=>O(k,"manualBearerToken"),className:"absolute top-1 right-1 p-1 text-muted-foreground/50 hover:text-foreground transition-colors cursor-pointer",children:g==="manualBearerToken"?m.jsx(Pr,{className:"h-3 w-3 text-green-500"}):m.jsx(ss,{className:"h-3 w-3"})})]})]})})}),e.oauthTokens&&m.jsxs("div",{className:"space-y-2",children:[m.jsxs("div",{className:"space-y-3 text-xs",children:[m.jsxs("div",{children:[m.jsx("span",{className:"text-muted-foreground font-medium",children:"Bearer Access Token:"}),m.jsxs("div",{className:"font-mono text-foreground break-all bg-muted/30 p-2 rounded mt-1 relative group",children:[m.jsx("div",{className:"pr-8",children:e.oauthTokens.access_token}),m.jsx("button",{onClick:()=>{var z;return O(((z=e.oauthTokens)==null?void 0:z.access_token)||"","accessToken")},className:"absolute top-1 right-1 p-1 text-muted-foreground/50 hover:text-foreground transition-colors cursor-pointer",children:g==="accessToken"?m.jsx(Pr,{className:"h-3 w-3 text-green-500"}):m.jsx(ss,{className:"h-3 w-3"})})]})]}),m.jsxs("div",{children:[m.jsx("span",{className:"text-muted-foreground font-medium",children:"Refresh Token:"}),m.jsxs("div",{className:"font-mono text-foreground break-all bg-muted/30 p-2 rounded mt-1 relative group",children:[m.jsx("div",{className:"pr-8",children:e.oauthTokens.refresh_token||"N/A"}),m.jsx("button",{onClick:()=>{var z;return O(((z=e.oauthTokens)==null?void 0:z.refresh_token)||"N/A","refreshToken")},className:"absolute top-1 right-1 p-1 text-muted-foreground/50 hover:text-foreground transition-colors cursor-pointer",children:g==="refreshToken"?m.jsx(Pr,{className:"h-3 w-3 text-green-500"}):m.jsx(ss,{className:"h-3 w-3"})})]})]}),e.oauthTokens.scope&&m.jsxs("div",{children:[m.jsx("span",{className:"text-muted-foreground font-medium",children:"Scopes:"}),m.jsx("div",{className:"font-mono text-foreground break-all bg-muted/30 p-2 rounded mt-1",children:e.oauthTokens.scope})]})]}),A&&m.jsxs("div",{children:[m.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Token Expiry:"}),m.jsx("div",{className:`text-xs font-mono mt-1 bg-muted/30 p-2 rounded ${A.isExpired?"text-red-500":A.isExpiringSoon?"text-yellow-500":"text-green-500"}`,children:A4(A.timeLeft)})]})]}),!x&&m.jsxs("div",{className:"space-y-3",children:[e.config.args&&e.config.args.length>0&&m.jsxs("div",{children:[m.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Arguments:"}),m.jsx("div",{className:"space-y-1 mt-1",children:e.config.args.map((z,H)=>m.jsx("div",{className:"text-xs font-mono text-foreground bg-muted/30 p-2 rounded break-all",children:z},H))})]}),e.config.env&&Object.keys(e.config.env).length>0&&m.jsxs("div",{children:[m.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:"Environment:"}),m.jsx("div",{className:"space-y-1 mt-1",children:Object.entries(e.config.env).map(([z,H])=>m.jsxs("div",{className:"text-xs font-mono bg-muted/30 p-2 rounded break-all",children:[m.jsx("span",{className:"text-blue-600",children:z}),"=",m.jsx("span",{className:"text-green-600",children:H})]},z))})]})]})]})]})})})}function qt({className:e,type:t,...n}){return m.jsx("input",{type:t,"data-slot":"input",className:Me("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function vv({...e}){return m.jsx(k_,{"data-slot":"dialog",...e})}function d7({...e}){return m.jsx(C_,{"data-slot":"dialog-portal",...e})}function f7({className:e,...t}){return m.jsx(T_,{"data-slot":"dialog-overlay",className:Me("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function bv({className:e,children:t,showCloseButton:n=!0,...r}){return m.jsxs(d7,{"data-slot":"dialog-portal",children:[m.jsx(f7,{}),m.jsxs(E_,{"data-slot":"dialog-content",className:Me("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...r,children:[t,n&&m.jsxs(N_,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[m.jsx(Fo,{}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function wv({className:e,...t}){return m.jsx("div",{"data-slot":"dialog-header",className:Me("flex flex-col gap-2 text-center sm:text-left",e),...t})}function h7({className:e,...t}){return m.jsx("div",{"data-slot":"dialog-footer",className:Me("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Sv({className:e,...t}){return m.jsx(__,{"data-slot":"dialog-title",className:Me("text-lg leading-none font-semibold",e),...t})}function m7({className:e,...t}){return m.jsx(j_,{"data-slot":"dialog-description",className:Me("text-muted-foreground text-sm",e),...t})}function Sa({...e}){return m.jsx(HL,{"data-slot":"select",...e})}function ka({...e}){return m.jsx($L,{"data-slot":"select-value",...e})}function Ca({className:e,size:t="default",children:n,...r}){return m.jsxs(FL,{"data-slot":"select-trigger","data-size":t,className:Me("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,m.jsx(qL,{asChild:!0,children:m.jsx(al,{className:"size-4 opacity-50"})})]})}function Ta({className:e,children:t,position:n="popper",...r}){return m.jsx(GL,{children:m.jsxs(YL,{"data-slot":"select-content",className:Me("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[m.jsx(p7,{}),m.jsx(ZL,{className:Me("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),m.jsx(g7,{})]})})}function ar({className:e,children:t,...n}){return m.jsxs(XL,{"data-slot":"select-item",className:Me("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[m.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:m.jsx(WL,{children:m.jsx(Pr,{className:"size-4"})})}),m.jsx(KL,{children:t})]})}function p7({className:e,...t}){return m.jsx(QL,{"data-slot":"select-scroll-up-button",className:Me("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(Mj,{className:"size-4"})})}function g7({className:e,...t}){return m.jsx(JL,{"data-slot":"select-scroll-down-button",className:Me("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(al,{className:"size-4"})})}function Ij({isOpen:e,onClose:t,onConnect:n}){const[r,s]=w.useState({name:"",type:"stdio",command:"",args:[],url:"",headers:{},env:{},useOAuth:!0,oauthScopes:["mcp:*"]}),[o,l]=w.useState(""),[u,d]=w.useState(""),[h,g]=w.useState(""),[p,x]=w.useState("none"),[v,S]=w.useState([]),k=M=>{if(M.preventDefault(),r.name){let _={...r};if(r.type==="stdio"&&o){const D=o.split(" ").filter(H=>H.trim()),P=D[0]||"",B=D.slice(1);_={..._,command:P,args:B};const z=v.reduce((H,{key:$,value:re})=>($&&re&&(H[$]=re),H),{});_={..._,env:z}}if(r.type==="http"){if(p==="none")_={..._,useOAuth:!1};else if(p==="bearer"&&h)_={..._,headers:{..._.headers,Authorization:`Bearer ${h}`},useOAuth:!1};else if(p==="oauth"&&r.useOAuth&&u){const D=u.split(" ").filter(P=>P.trim());_={..._,oauthScopes:D}}}n(_),T(),t()}},E=()=>{T(),t()},T=()=>{s({name:"",type:"stdio",command:"",args:[],url:"",headers:{},env:{},useOAuth:!0,oauthScopes:["mcp:*"]}),l(""),d(""),g(""),x("none"),S([])},A=()=>{S([...v,{key:"",value:""}])},O=M=>{S(v.filter((_,D)=>D!==M))},R=(M,_,D)=>{const P=[...v];P[M][_]=D,S(P)};return m.jsx(vv,{open:e,onOpenChange:E,children:m.jsxs(bv,{className:"max-w-md sm:max-w-lg",children:[m.jsx(wv,{className:"space-y-2",children:m.jsx(Sv,{className:"text-xl font-semibold",children:"Add MCP Server"})}),m.jsxs("form",{onSubmit:k,className:"space-y-6",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Server Name"}),m.jsx(qt,{value:r.name,onChange:M=>s(_=>({..._,name:M.target.value})),placeholder:"my-mcp-server",required:!0,className:"h-10"})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Connection Type"}),r.type==="stdio"?m.jsxs("div",{className:"flex",children:[m.jsxs(Sa,{value:r.type,onValueChange:M=>s(_=>({..._,type:M})),children:[m.jsx(Ca,{className:"w-22 rounded-r-none border-r-0 text-xs border-border",children:m.jsx(ka,{})}),m.jsxs(Ta,{children:[m.jsx(ar,{value:"stdio",children:"STDIO"}),m.jsx(ar,{value:"http",children:"HTTP"})]})]}),m.jsx(qt,{value:o,onChange:M=>l(M.target.value),placeholder:"npx -y @modelcontextprotocol/server-everything",required:!0,className:"flex-1 rounded-l-none text-sm border-border"})]}):m.jsxs("div",{className:"flex",children:[m.jsxs(Sa,{value:r.type,onValueChange:M=>s(_=>({..._,type:M})),children:[m.jsx(Ca,{className:"w-22 rounded-r-none border-r-0 text-xs border-border",children:m.jsx(ka,{})}),m.jsxs(Ta,{children:[m.jsx(ar,{value:"stdio",children:"STDIO"}),m.jsx(ar,{value:"http",children:"HTTP"})]})]}),m.jsx(qt,{value:r.url,onChange:M=>s(_=>({..._,url:M.target.value})),placeholder:"http://localhost:8080/mcp",required:!0,className:"flex-1 rounded-l-none text-sm"})]})]}),r.type==="stdio"&&m.jsxs("div",{className:"space-y-4 p-4 border rounded-lg bg-muted/30 border-border/50",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("label",{className:"text-sm font-medium text-foreground",children:"Environment Variables"}),m.jsx(Je,{type:"button",variant:"outline",size:"sm",onClick:A,className:"h-8 px-2 text-xs cursor-pointer",children:"Add Variable"})]}),v.length>0&&m.jsx("div",{className:"space-y-2",children:v.map((M,_)=>m.jsxs("div",{className:"flex gap-2",children:[m.jsx(qt,{placeholder:"key",value:M.key,onChange:D=>R(_,"key",D.target.value),className:"h-8 text-sm"}),m.jsx(qt,{placeholder:"value",value:M.value,onChange:D=>R(_,"value",D.target.value),className:"h-8 text-sm"}),m.jsx(Je,{type:"button",variant:"outline",size:"sm",onClick:()=>O(_),className:"h-8 px-2 text-xs",children:"×"})]},_))})]}),r.type==="http"&&m.jsxs("div",{className:"space-y-4 p-4 border rounded-lg bg-muted/30 border-border/50",children:[m.jsxs("div",{className:"space-y-3",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Authentication Method"}),m.jsxs("div",{className:"flex gap-4",children:[m.jsxs("div",{className:"flex items-center space-x-2",children:[m.jsx("input",{type:"radio",id:"none",name:"authType",checked:p==="none",onChange:()=>x("none"),className:"w-4 h-4 cursor-pointer"}),m.jsx("label",{htmlFor:"none",className:"text-sm cursor-pointer",children:"None"})]}),m.jsxs("div",{className:"flex items-center space-x-2",children:[m.jsx("input",{type:"radio",id:"oauth",name:"authType",checked:p==="oauth",onChange:()=>x("oauth"),className:"w-4 h-4 cursor-pointer"}),m.jsx("label",{htmlFor:"oauth",className:"text-sm cursor-pointer",children:"OAuth 2.1"})]}),m.jsxs("div",{className:"flex items-center space-x-2",children:[m.jsx("input",{type:"radio",id:"bearer",name:"authType",checked:p==="bearer",onChange:()=>x("bearer"),className:"w-4 h-4 cursor-pointer"}),m.jsx("label",{htmlFor:"bearer",className:"text-sm cursor-pointer",children:"Bearer Token"})]})]})]}),p==="oauth"&&m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"OAuth Scopes"}),m.jsx(qt,{value:u,onChange:M=>d(M.target.value),placeholder:"mcp:* mcp:tools mcp:resources",className:"h-10"}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"Space-separated OAuth scopes. Use 'mcp:*' for full access."})]}),p==="bearer"&&m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Bearer Token"}),m.jsx(qt,{type:"password",value:h,onChange:M=>g(M.target.value),placeholder:"Enter your bearer token",className:"h-10"}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"Token will be sent as Authorization: Bearer <token> header"})]})]}),m.jsxs("div",{className:"flex gap-3 pt-6 border-t",children:[m.jsx(Je,{type:"submit",className:"flex-1 cursor-pointer",children:"Connect Server"}),m.jsx(Je,{type:"button",variant:"outline",onClick:E,className:"flex-1 cursor-pointer",children:"Cancel"})]})]})]})})}function y7({isOpen:e,onClose:t,onUpdate:n,server:r}){const[s,o]=w.useState({name:"",type:"stdio",command:"",args:[],url:"",headers:{},env:{},useOAuth:!0,oauthScopes:["mcp:*"]}),[l,u]=w.useState(""),[d,h]=w.useState(""),[g,p]=w.useState(""),[x,v]=w.useState("none"),[S,k]=w.useState([]),E=_=>{var B,z,H,$;const D=_.config;if("url"in D){const re=((B=D.requestInit)==null?void 0:B.headers)||{},te=_.oauthTokens!=null;return{name:_.name,type:"http",url:((z=D.url)==null?void 0:z.toString())||"",headers:re,useOAuth:te,oauthScopes:(($=(H=_.oauthTokens)==null?void 0:H.scope)==null?void 0:$.split(" "))||["mcp:*"]}}else return{name:_.name,type:"stdio",command:D.command||"",args:D.args||[],env:D.env||{}}};w.useEffect(()=>{var _;if(r&&e){const D=E(r);if(o(D),D.type==="stdio"){const P=D.command||"",B=D.args||[];u([P,...B].join(" "));const z=Object.entries(D.env||{}).map(([H,$])=>({key:H,value:$}));k(z)}else{const B=(D.headers||{}).Authorization,z=B==null?void 0:B.startsWith("Bearer ");D.useOAuth?(v("oauth"),h(((_=D.oauthScopes)==null?void 0:_.join(" "))||"mcp:*"),o($=>({...$,useOAuth:!0}))):z?(v("bearer"),p(B.slice(7)),o($=>({...$,useOAuth:!1}))):(v("none"),o($=>({...$,useOAuth:!1})))}}},[r,e]);const T=_=>{if(_.preventDefault(),s.name){let D={...s};if(s.type==="stdio"&&l){const P=l.split(" ").filter($=>$.trim()),B=P[0]||"",z=P.slice(1);D={...D,command:B,args:z};const H=S.reduce(($,{key:re,value:te})=>(re&&te&&($[re]=te),$),{});D={...D,env:H}}if(s.type==="http"){if(x==="none")D={...D,useOAuth:!1,headers:{}};else if(x==="bearer"&&g)D={...D,headers:{...D.headers,Authorization:`Bearer ${g}`},useOAuth:!1};else if(x==="oauth"&&d){const P=d.split(" ").filter(B=>B.trim());D={...D,useOAuth:!0,oauthScopes:P,headers:{}}}}n(r.name,D),t()}},A=()=>{t()},O=()=>{k([...S,{key:"",value:""}])},R=_=>{k(S.filter((D,P)=>P!==_))},M=(_,D,P)=>{const B=[...S];B[_][D]=P,k(B)};return m.jsx(vv,{open:e,onOpenChange:A,children:m.jsxs(bv,{className:"max-w-md sm:max-w-lg",children:[m.jsx(wv,{className:"space-y-2",children:m.jsx(Sv,{className:"text-xl font-semibold",children:"Edit MCP Server"})}),m.jsxs("form",{onSubmit:T,className:"space-y-6",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Server Name"}),m.jsx(qt,{value:s.name,onChange:_=>o(D=>({...D,name:_.target.value})),placeholder:"my-mcp-server",required:!0,className:"h-10"})]}),m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Connection Type"}),s.type==="stdio"?m.jsxs("div",{className:"flex",children:[m.jsxs(Sa,{value:s.type,onValueChange:_=>o(D=>({...D,type:_})),children:[m.jsx(Ca,{className:"w-22 rounded-r-none border-r-0 text-xs border-border",children:m.jsx(ka,{})}),m.jsxs(Ta,{children:[m.jsx(ar,{value:"stdio",children:"STDIO"}),m.jsx(ar,{value:"http",children:"HTTP"})]})]}),m.jsx(qt,{value:l,onChange:_=>u(_.target.value),placeholder:"npx -y @modelcontextprotocol/server-everything",required:!0,className:"flex-1 rounded-l-none text-sm border-border"})]}):m.jsxs("div",{className:"flex",children:[m.jsxs(Sa,{value:s.type,onValueChange:_=>o(D=>({...D,type:_})),children:[m.jsx(Ca,{className:"w-22 rounded-r-none border-r-0 text-xs border-border",children:m.jsx(ka,{})}),m.jsxs(Ta,{children:[m.jsx(ar,{value:"stdio",children:"STDIO"}),m.jsx(ar,{value:"http",children:"HTTP"})]})]}),m.jsx(qt,{value:s.url,onChange:_=>o(D=>({...D,url:_.target.value})),placeholder:"http://localhost:8080/mcp",required:!0,className:"flex-1 rounded-l-none text-sm"})]})]}),s.type==="stdio"&&m.jsxs("div",{className:"space-y-4 p-4 border rounded-lg bg-muted/30 border-border/50",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("label",{className:"text-sm font-medium text-foreground",children:"Environment Variables"}),m.jsx(Je,{type:"button",variant:"outline",size:"sm",onClick:O,className:"h-8 px-2 text-xs cursor-pointer",children:"Add Variable"})]}),S.length>0&&m.jsx("div",{className:"space-y-2",children:S.map((_,D)=>m.jsxs("div",{className:"flex gap-2",children:[m.jsx(qt,{placeholder:"key",value:_.key,onChange:P=>M(D,"key",P.target.value),className:"h-8 text-sm"}),m.jsx(qt,{placeholder:"value",value:_.value,onChange:P=>M(D,"value",P.target.value),className:"h-8 text-sm"}),m.jsx(Je,{type:"button",variant:"outline",size:"sm",onClick:()=>R(D),className:"h-8 px-2 text-xs",children:"�"})]},D))})]}),s.type==="http"&&m.jsxs("div",{className:"space-y-4 p-4 border rounded-lg bg-muted/30 border-border/50",children:[m.jsxs("div",{className:"space-y-3",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Authentication Method"}),m.jsxs("div",{className:"flex gap-4",children:[m.jsxs("div",{className:"flex items-center space-x-2",children:[m.jsx("input",{type:"radio",id:"none",name:"authType",checked:x==="none",onChange:()=>{v("none"),o(_=>({..._,useOAuth:!1}))},className:"w-4 h-4 cursor-pointer"}),m.jsx("label",{htmlFor:"none",className:"text-sm cursor-pointer",children:"None"})]}),m.jsxs("div",{className:"flex items-center space-x-2",children:[m.jsx("input",{type:"radio",id:"oauth",name:"authType",checked:x==="oauth",onChange:()=>{v("oauth"),o(_=>({..._,useOAuth:!0}))},className:"w-4 h-4 cursor-pointer"}),m.jsx("label",{htmlFor:"oauth",className:"text-sm cursor-pointer",children:"OAuth 2.1"})]}),m.jsxs("div",{className:"flex items-center space-x-2",children:[m.jsx("input",{type:"radio",id:"bearer",name:"authType",checked:x==="bearer",onChange:()=>{v("bearer"),o(_=>({..._,useOAuth:!1}))},className:"w-4 h-4 cursor-pointer"}),m.jsx("label",{htmlFor:"bearer",className:"text-sm cursor-pointer",children:"Bearer Token"})]})]})]}),x==="oauth"&&m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"OAuth Scopes"}),m.jsx(qt,{value:d,onChange:_=>h(_.target.value),placeholder:"mcp:* mcp:tools mcp:resources",className:"h-10"}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"Space-separated OAuth scopes. Use 'mcp:*' for full access."})]}),x==="bearer"&&m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"block text-sm font-medium text-foreground",children:"Bearer Token"}),m.jsx(qt,{type:"password",value:g,onChange:_=>p(_.target.value),placeholder:"Enter your bearer token",className:"h-10"}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"Token will be sent as Authorization: Bearer <token> header"})]})]}),m.jsxs("div",{className:"flex gap-3 pt-6 border-t",children:[m.jsx(Je,{type:"submit",className:"flex-1 cursor-pointer",children:"Update Server"}),m.jsx(Je,{type:"button",variant:"outline",onClick:A,className:"flex-1 cursor-pointer",children:"Cancel"})]})]})]})})}const gh=ye.forwardRef(({className:e,...t},n)=>m.jsxs("svg",{ref:n,fill:"currentColor",fillRule:"evenodd",height:"1em",style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",className:e,...t,children:[m.jsx("title",{children:"ModelContextProtocol"}),m.jsx("path",{d:"M15.688 2.343a2.588 2.588 0 00-3.61 0l-9.626 9.44a.863.863 0 01-1.203 0 .823.823 0 010-1.18l9.626-9.44a4.313 4.313 0 016.016 0 4.116 4.116 0 011.204 3.54 4.3 4.3 0 013.609 1.18l.05.05a4.115 4.115 0 010 5.9l-8.706 8.537a.274.274 0 000 .393l1.788 1.754a.823.823 0 010 1.18.863.863 0 01-1.203 0l-1.788-1.753a1.92 1.92 0 010-2.754l8.706-8.538a2.47 2.47 0 000-3.54l-.05-.049a2.588 2.588 0 00-3.607-.003l-7.172 7.034-.002.002-.098.097a.863.863 0 01-1.204 0 .823.823 0 010-1.18l7.273-7.133a2.47 2.47 0 00-.003-3.537z"}),m.jsx("path",{d:"M14.485 4.703a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a4.115 4.115 0 000 5.9 4.314 4.314 0 006.016 0l7.12-6.982a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a2.588 2.588 0 01-3.61 0 2.47 2.47 0 010-3.54l7.12-6.982z"})]}));gh.displayName="MCPIcon";function x7({connectedServerConfigs:e,onConnect:t,onDisconnect:n,onReconnect:r,onUpdate:s}){const[o,l]=w.useState(!1),[u,d]=w.useState(!1),[h,g]=w.useState(null),[p,x]=w.useState(""),[v,S]=w.useState("all");w.useEffect(()=>{Object.keys(e).forEach(O=>{r(O)})},[]);const k=Object.entries(e).filter(([O,R])=>{const M=O.toLowerCase().includes(p.toLowerCase()),_=v==="all"||v==="stdio"&&"command"in R.config||v==="http"&&"url"in R.config;return M&&_}),E=Object.keys(e).length,T=O=>{g(O),d(!0)},A=()=>{d(!1),g(null)};return m.jsxs("div",{className:"space-y-6 p-8",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("div",{children:m.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"MCP Servers"})}),m.jsxs(Je,{onClick:()=>l(!0),className:"cursor-pointer",children:[m.jsx(kk,{className:"h-4 w-4 mr-2"}),"Add Server"]})]}),E>0?m.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6",children:k.map(([O,R])=>m.jsx(u7,{server:R,onDisconnect:n,onReconnect:r,onEdit:T},O))}):m.jsx(va,{className:"p-12 text-center",children:m.jsxs("div",{className:"mx-auto max-w-sm",children:[m.jsx(gh,{className:"mx-auto h-12 w-12 text-muted-foreground"}),m.jsx("h3",{className:"mt-4 text-lg font-semibold",children:"No servers connected"}),m.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Get started by connecting to your first MCP server"}),m.jsxs(Je,{onClick:()=>l(!0),className:"mt-4 cursor-pointer",children:[m.jsx(kk,{className:"h-4 w-4 mr-2"}),"Add Your First Server"]})]})}),k.length===0&&E>0&&m.jsx(va,{className:"p-8 text-center",children:m.jsxs("div",{className:"mx-auto max-w-sm",children:[m.jsx(q6,{className:"mx-auto h-8 w-8 text-muted-foreground"}),m.jsx("h3",{className:"mt-4 text-lg font-semibold",children:"No servers found"}),m.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Try adjusting your search or filter criteria"})]})}),m.jsx(Ij,{isOpen:o,onClose:()=>l(!1),onConnect:t}),h&&m.jsx(y7,{isOpen:u,onClose:A,onUpdate:s,server:h})]})}const _k={error:0,warn:1,info:2,debug:3,trace:4},v7={error:"#ef4444",warn:"#f59e0b",info:"#3b82f6",debug:"#8b5cf6",trace:"#6b7280"};class b7{constructor(){Ja(this,"config",{level:"info",enableConsole:!0,maxBufferSize:1e3});Ja(this,"buffer",[]);Ja(this,"listeners",new Set)}setConfig(t){this.config={...this.config,...t},this.notifyListeners()}getConfig(){return{...this.config}}addEntry(t){this.buffer.push(t),this.buffer.length>this.config.maxBufferSize&&(this.buffer=this.buffer.slice(-this.config.maxBufferSize)),this.notifyListeners()}getEntries(){return[...this.buffer]}getFilteredEntries(t,n){let r=this.buffer;if(t&&(r=r.filter(s=>s.level===t)),n){const s=n.toLowerCase();r=r.filter(o=>o.context.toLowerCase().includes(s))}return r}clearBuffer(){this.buffer=[],this.notifyListeners()}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notifyListeners(){this.listeners.forEach(t=>t())}shouldLog(t){return _k[t]<=_k[this.config.level]}}const nr=new b7;typeof window<"u"&&nr.setConfig({level:"info",enableConsole:!0});function Bj(e="Unknown"){const t=w.useCallback(r=>(s,o,l)=>{if(!nr.shouldLog(r))return;const d={timestamp:new Date().toISOString(),level:r,context:e,message:s,data:o,error:l};nr.addEntry(d),nr.getConfig().enableConsole&&w7(d)},[e]);return w.useMemo(()=>({error:t("error"),warn:t("warn"),info:t("info"),debug:t("debug"),trace:t("trace"),context:e}),[t,e])}function w7(e){const{timestamp:t,level:n,context:r,message:s,data:o,error:l}=e,u=new Date(t).toLocaleTimeString(),d=v7[n],h=`color: ${d}; font-weight: bold;`,g=`color: ${d};`,p=[`%c[${u}] %c${n.toUpperCase()} %c[${r}] %c${s}`,"color: #6b7280;",h,"color: #6b7280;",g];o!==void 0&&p.push(`
314
+ Data:`,o),l&&p.push(`
315
+ Error:`,l),(n==="error"?console.error:n==="warn"?console.warn:n==="debug"?console.debug:console.log)(...p)}function S7(){const[,e]=w.useState({});return w.useEffect(()=>{const t=nr.subscribe(()=>{e({})});return()=>{t()}},[]),{entries:nr.getEntries(),config:nr.getConfig(),setConfig:nr.setConfig.bind(nr),clearBuffer:nr.clearBuffer.bind(nr),getFilteredEntries:nr.getFilteredEntries.bind(nr)}}function cu({className:e,...t}){return m.jsx("textarea",{"data-slot":"textarea",className:Me("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}const k7=xv("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function zr({className:e,variant:t,asChild:n=!1,...r}){const s=n?Bx:"span";return m.jsx(s,{"data-slot":"badge",className:Me(k7({variant:t}),e),...r})}function xa({className:e,children:t,...n}){return m.jsxs(gL,{"data-slot":"scroll-area",className:Me("relative",e),...n,children:[m.jsx(yL,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),m.jsx(C7,{}),m.jsx(xL,{})]})}function C7({className:e,orientation:t="vertical",...n}){return m.jsx(B2,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Me("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:m.jsx(F2,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}const yh=w.createContext(null);yh.displayName="PanelGroupContext";const zt={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},kv=10,fs=w.useLayoutEffect,jk=zx.useId,T7=typeof jk=="function"?jk:()=>null;let E7=0;function Cv(e=null){const t=T7(),n=w.useRef(e||t||null);return n.current===null&&(n.current=""+E7++),e??n.current}function Vj({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:s,forwardedRef:o,id:l,maxSize:u,minSize:d,onCollapse:h,onExpand:g,onResize:p,order:x,style:v,tagName:S="div",...k}){const E=w.useContext(yh);if(E===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:T,expandPanel:A,getPanelSize:O,getPanelStyle:R,groupId:M,isPanelCollapsed:_,reevaluatePanelConstraints:D,registerPanel:P,resizePanel:B,unregisterPanel:z}=E,H=Cv(l),$=w.useRef({callbacks:{onCollapse:h,onExpand:g,onResize:p},constraints:{collapsedSize:n,collapsible:r,defaultSize:s,maxSize:u,minSize:d},id:H,idIsFromProps:l!==void 0,order:x});w.useRef({didLogMissingDefaultSizeWarning:!1}),fs(()=>{const{callbacks:te,constraints:ie}=$.current,I={...ie};$.current.id=H,$.current.idIsFromProps=l!==void 0,$.current.order=x,te.onCollapse=h,te.onExpand=g,te.onResize=p,ie.collapsedSize=n,ie.collapsible=r,ie.defaultSize=s,ie.maxSize=u,ie.minSize=d,(I.collapsedSize!==ie.collapsedSize||I.collapsible!==ie.collapsible||I.maxSize!==ie.maxSize||I.minSize!==ie.minSize)&&D($.current,I)}),fs(()=>{const te=$.current;return P(te),()=>{z(te)}},[x,H,P,z]),w.useImperativeHandle(o,()=>({collapse:()=>{T($.current)},expand:te=>{A($.current,te)},getId(){return H},getSize(){return O($.current)},isCollapsed(){return _($.current)},isExpanded(){return!_($.current)},resize:te=>{B($.current,te)}}),[T,A,O,_,H,B]);const re=R($.current,s);return w.createElement(S,{...k,children:e,className:t,id:H,style:{...re,...v},[zt.groupId]:M,[zt.panel]:"",[zt.panelCollapsible]:r||void 0,[zt.panelId]:H,[zt.panelSize]:parseFloat(""+re.flexGrow).toFixed(1)})}const Uj=w.forwardRef((e,t)=>w.createElement(Vj,{...e,forwardedRef:t}));Vj.displayName="Panel";Uj.displayName="forwardRef(Panel)";let ky=null,rf=-1,ga=null;function _7(e,t){if(t){const n=(t&Gj)!==0,r=(t&Yj)!==0,s=(t&Zj)!==0,o=(t&Xj)!==0;if(n)return s?"se-resize":o?"ne-resize":"e-resize";if(r)return s?"sw-resize":o?"nw-resize":"w-resize";if(s)return"s-resize";if(o)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function j7(){ga!==null&&(document.head.removeChild(ga),ky=null,ga=null,rf=-1)}function hg(e,t){var n,r;const s=_7(e,t);if(ky!==s){if(ky=s,ga===null&&(ga=document.createElement("style"),document.head.appendChild(ga)),rf>=0){var o;(o=ga.sheet)===null||o===void 0||o.removeRule(rf)}rf=(n=(r=ga.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${s} !important;}`))!==null&&n!==void 0?n:-1}}function Hj(e){return e.type==="keydown"}function Fj(e){return e.type.startsWith("pointer")}function $j(e){return e.type.startsWith("mouse")}function xh(e){if(Fj(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if($j(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function N7(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function A7(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function R7(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:Rk(e),b:Rk(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;Xe(r,"Stacking order can only be calculated for elements with a common ancestor");const s={a:Ak(Nk(n.a)),b:Ak(Nk(n.b))};if(s.a===s.b){const o=r.childNodes,l={a:n.a.at(-1),b:n.b.at(-1)};let u=o.length;for(;u--;){const d=o[u];if(d===l.a)return 1;if(d===l.b)return-1}}return Math.sign(s.a-s.b)}const M7=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function O7(e){var t;const n=getComputedStyle((t=qj(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function D7(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||O7(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||M7.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function Nk(e){let t=e.length;for(;t--;){const n=e[t];if(Xe(n,"Missing node"),D7(n))return n}return null}function Ak(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Rk(e){const t=[];for(;e;)t.push(e),e=qj(e);return t}function qj(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const Gj=1,Yj=2,Zj=4,Xj=8,P7=N7()==="coarse";let Ir=[],Po=!1,ya=new Map,vh=new Map;const Uc=new Set;function z7(e,t,n,r,s){var o;const{ownerDocument:l}=t,u={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:s},d=(o=ya.get(l))!==null&&o!==void 0?o:0;return ya.set(l,d+1),Uc.add(u),kf(),function(){var g;vh.delete(e),Uc.delete(u);const p=(g=ya.get(l))!==null&&g!==void 0?g:1;if(ya.set(l,p-1),kf(),p===1&&ya.delete(l),Ir.includes(u)){const x=Ir.indexOf(u);x>=0&&Ir.splice(x,1),Ev(),s("up",!0,null)}}}function L7(e){const{target:t}=e,{x:n,y:r}=xh(e);Po=!0,Tv({target:t,x:n,y:r}),kf(),Ir.length>0&&(Cf("down",e),e.preventDefault(),Kj(t)||e.stopImmediatePropagation())}function mg(e){const{x:t,y:n}=xh(e);if(Po&&e.buttons===0&&(Po=!1,Cf("up",e)),!Po){const{target:r}=e;Tv({target:r,x:t,y:n})}Cf("move",e),Ev(),Ir.length>0&&e.preventDefault()}function pg(e){const{target:t}=e,{x:n,y:r}=xh(e);vh.clear(),Po=!1,Ir.length>0&&(e.preventDefault(),Kj(t)||e.stopImmediatePropagation()),Cf("up",e),Tv({target:t,x:n,y:r}),Ev(),kf()}function Kj(e){let t=e;for(;t;){if(t.hasAttribute(zt.resizeHandle))return!0;t=t.parentElement}return!1}function Tv({target:e,x:t,y:n}){Ir.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),Uc.forEach(s=>{const{element:o,hitAreaMargins:l}=s,u=o.getBoundingClientRect(),{bottom:d,left:h,right:g,top:p}=u,x=P7?l.coarse:l.fine;if(t>=h-x&&t<=g+x&&n>=p-x&&n<=d+x){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&R7(r,o)>0){let S=r,k=!1;for(;S&&!S.contains(o);){if(A7(S.getBoundingClientRect(),u)){k=!0;break}S=S.parentElement}if(k)return}Ir.push(s)}})}function gg(e,t){vh.set(e,t)}function Ev(){let e=!1,t=!1;Ir.forEach(r=>{const{direction:s}=r;s==="horizontal"?e=!0:t=!0});let n=0;vh.forEach(r=>{n|=r}),e&&t?hg("intersection",n):e?hg("horizontal",n):t?hg("vertical",n):j7()}let yg;function kf(){var e;(e=yg)===null||e===void 0||e.abort(),yg=new AbortController;const t={capture:!0,signal:yg.signal};Uc.size&&(Po?(Ir.length>0&&ya.forEach((n,r)=>{const{body:s}=r;n>0&&(s.addEventListener("contextmenu",pg,t),s.addEventListener("pointerleave",mg,t),s.addEventListener("pointermove",mg,t))}),ya.forEach((n,r)=>{const{body:s}=r;s.addEventListener("pointerup",pg,t),s.addEventListener("pointercancel",pg,t)})):ya.forEach((n,r)=>{const{body:s}=r;n>0&&(s.addEventListener("pointerdown",L7,t),s.addEventListener("pointermove",mg,t))}))}function Cf(e,t){Uc.forEach(n=>{const{setResizeHandlerState:r}=n,s=Ir.includes(n);r(e,s,t)})}function I7(){const[e,t]=w.useState(0);return w.useCallback(()=>t(n=>n+1),[])}function Xe(e,t){if(!e)throw console.error(t),Error(t)}function bs(e,t,n=kv){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Ai(e,t,n=kv){return bs(e,t,n)===0}function rr(e,t,n){return bs(e,t,n)===0}function B7(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const s=e[r],o=t[r];if(!rr(s,o,n))return!1}return!0}function _o({panelConstraints:e,panelIndex:t,size:n}){const r=e[t];Xe(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:s=0,collapsible:o,maxSize:l=100,minSize:u=0}=r;if(bs(n,u)<0)if(o){const d=(s+u)/2;bs(n,d)<0?n=s:n=u}else n=u;return n=Math.min(l,n),n=parseFloat(n.toFixed(kv)),n}function Sc({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:s,trigger:o}){if(rr(e,0))return t;const l=[...t],[u,d]=r;Xe(u!=null,"Invalid first pivot index"),Xe(d!=null,"Invalid second pivot index");let h=0;if(o==="keyboard"){{const p=e<0?d:u,x=n[p];Xe(x,`Panel constraints not found for index ${p}`);const{collapsedSize:v=0,collapsible:S,minSize:k=0}=x;if(S){const E=t[p];if(Xe(E!=null,`Previous layout not found for panel index ${p}`),rr(E,v)){const T=k-E;bs(T,Math.abs(e))>0&&(e=e<0?0-T:T)}}}{const p=e<0?u:d,x=n[p];Xe(x,`No panel constraints found for index ${p}`);const{collapsedSize:v=0,collapsible:S,minSize:k=0}=x;if(S){const E=t[p];if(Xe(E!=null,`Previous layout not found for panel index ${p}`),rr(E,k)){const T=E-v;bs(T,Math.abs(e))>0&&(e=e<0?0-T:T)}}}}{const p=e<0?1:-1;let x=e<0?d:u,v=0;for(;;){const k=t[x];Xe(k!=null,`Previous layout not found for panel index ${x}`);const T=_o({panelConstraints:n,panelIndex:x,size:100})-k;if(v+=T,x+=p,x<0||x>=n.length)break}const S=Math.min(Math.abs(e),Math.abs(v));e=e<0?0-S:S}{let x=e<0?u:d;for(;x>=0&&x<n.length;){const v=Math.abs(e)-Math.abs(h),S=t[x];Xe(S!=null,`Previous layout not found for panel index ${x}`);const k=S-v,E=_o({panelConstraints:n,panelIndex:x,size:k});if(!rr(S,E)&&(h+=S-E,l[x]=E,h.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?x--:x++}}if(B7(s,l))return s;{const p=e<0?d:u,x=t[p];Xe(x!=null,`Previous layout not found for panel index ${p}`);const v=x+h,S=_o({panelConstraints:n,panelIndex:p,size:v});if(l[p]=S,!rr(S,v)){let k=v-S,T=e<0?d:u;for(;T>=0&&T<n.length;){const A=l[T];Xe(A!=null,`Previous layout not found for panel index ${T}`);const O=A+k,R=_o({panelConstraints:n,panelIndex:T,size:O});if(rr(A,R)||(k-=R-A,l[T]=R),rr(k,0))break;e>0?T--:T++}}}const g=l.reduce((p,x)=>x+p,0);return rr(g,100)?l:s}function V7({layout:e,panelsArray:t,pivotIndices:n}){let r=0,s=100,o=0,l=0;const u=n[0];Xe(u!=null,"No pivot index found"),t.forEach((p,x)=>{const{constraints:v}=p,{maxSize:S=100,minSize:k=0}=v;x===u?(r=k,s=S):(o+=k,l+=S)});const d=Math.min(s,100-o),h=Math.max(r,100-l),g=e[u];return{valueMax:d,valueMin:h,valueNow:g}}function Hc(e,t=document){return Array.from(t.querySelectorAll(`[${zt.resizeHandleId}][data-panel-group-id="${e}"]`))}function Wj(e,t,n=document){const s=Hc(e,n).findIndex(o=>o.getAttribute(zt.resizeHandleId)===t);return s??null}function Qj(e,t,n){const r=Wj(e,t,n);return r!=null?[r,r+1]:[-1,-1]}function U7(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function Jj(e,t=document){if(U7(t)&&t.dataset.panelGroupId==e)return t;const n=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return n||null}function bh(e,t=document){const n=t.querySelector(`[${zt.resizeHandleId}="${e}"]`);return n||null}function H7(e,t,n,r=document){var s,o,l,u;const d=bh(t,r),h=Hc(e,r),g=d?h.indexOf(d):-1,p=(s=(o=n[g])===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:null,x=(l=(u=n[g+1])===null||u===void 0?void 0:u.id)!==null&&l!==void 0?l:null;return[p,x]}function F7({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:s,panelGroupElement:o,setLayout:l}){w.useRef({didWarnAboutMissingResizeHandle:!1}),fs(()=>{if(!o)return;const u=Hc(n,o);for(let d=0;d<s.length-1;d++){const{valueMax:h,valueMin:g,valueNow:p}=V7({layout:r,panelsArray:s,pivotIndices:[d,d+1]}),x=u[d];if(x!=null){const v=s[d];Xe(v,`No panel data found for index "${d}"`),x.setAttribute("aria-controls",v.id),x.setAttribute("aria-valuemax",""+Math.round(h)),x.setAttribute("aria-valuemin",""+Math.round(g)),x.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{u.forEach((d,h)=>{d.removeAttribute("aria-controls"),d.removeAttribute("aria-valuemax"),d.removeAttribute("aria-valuemin"),d.removeAttribute("aria-valuenow")})}},[n,r,s,o]),w.useEffect(()=>{if(!o)return;const u=t.current;Xe(u,"Eager values not found");const{panelDataArray:d}=u,h=Jj(n,o);Xe(h!=null,`No group found for id "${n}"`);const g=Hc(n,o);Xe(g,`No resize handles found for group id "${n}"`);const p=g.map(x=>{const v=x.getAttribute(zt.resizeHandleId);Xe(v,"Resize handle element has no handle id attribute");const[S,k]=H7(n,v,d,o);if(S==null||k==null)return()=>{};const E=T=>{if(!T.defaultPrevented)switch(T.key){case"Enter":{T.preventDefault();const A=d.findIndex(O=>O.id===S);if(A>=0){const O=d[A];Xe(O,`No panel data found for index ${A}`);const R=r[A],{collapsedSize:M=0,collapsible:_,minSize:D=0}=O.constraints;if(R!=null&&_){const P=Sc({delta:rr(R,M)?D-M:M-R,initialLayout:r,panelConstraints:d.map(B=>B.constraints),pivotIndices:Qj(n,v,o),prevLayout:r,trigger:"keyboard"});r!==P&&l(P)}}break}}};return x.addEventListener("keydown",E),()=>{x.removeEventListener("keydown",E)}});return()=>{p.forEach(x=>x())}},[o,e,t,n,r,s,l])}function Mk(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function eN(e,t){const n=e==="horizontal",{x:r,y:s}=xh(t);return n?r:s}function $7(e,t,n,r,s){const o=n==="horizontal",l=bh(t,s);Xe(l,`No resize handle element found for id "${t}"`);const u=l.getAttribute(zt.groupId);Xe(u,"Resize handle element has no group id attribute");let{initialCursorPosition:d}=r;const h=eN(n,e),g=Jj(u,s);Xe(g,`No group element found for id "${u}"`);const p=g.getBoundingClientRect(),x=o?p.width:p.height;return(h-d)/x*100}function q7(e,t,n,r,s,o){if(Hj(e)){const l=n==="horizontal";let u=0;e.shiftKey?u=100:s!=null?u=s:u=10;let d=0;switch(e.key){case"ArrowDown":d=l?0:u;break;case"ArrowLeft":d=l?-u:0;break;case"ArrowRight":d=l?u:0;break;case"ArrowUp":d=l?0:-u;break;case"End":d=100;break;case"Home":d=-100;break}return d}else return r==null?0:$7(e,t,n,r,o)}function G7({panelDataArray:e}){const t=Array(e.length),n=e.map(o=>o.constraints);let r=0,s=100;for(let o=0;o<e.length;o++){const l=n[o];Xe(l,`Panel constraints not found for index ${o}`);const{defaultSize:u}=l;u!=null&&(r++,t[o]=u,s-=u)}for(let o=0;o<e.length;o++){const l=n[o];Xe(l,`Panel constraints not found for index ${o}`);const{defaultSize:u}=l;if(u!=null)continue;const d=e.length-r,h=s/d;r++,t[o]=h,s-=h}return t}function bo(e,t,n){t.forEach((r,s)=>{const o=e[s];Xe(o,`Panel data not found for index ${s}`);const{callbacks:l,constraints:u,id:d}=o,{collapsedSize:h=0,collapsible:g}=u,p=n[d];if(p==null||r!==p){n[d]=r;const{onCollapse:x,onExpand:v,onResize:S}=l;S&&S(r,p),g&&(x||v)&&(v&&(p==null||Ai(p,h))&&!Ai(r,h)&&v(),x&&(p==null||!Ai(p,h))&&Ai(r,h)&&x())}})}function Hd(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Y7({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:s,precision:o=3}){const l=n[s];let u;return l==null?u=e!=null?e.toPrecision(o):"1":r.length===1?u="1":u=l.toPrecision(o),{flexBasis:0,flexGrow:u,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function Z7(e,t=10){let n=null;return(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...s)},t)}}function Ok(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function tN(e){return`react-resizable-panels:${e}`}function nN(e){return e.map(t=>{const{constraints:n,id:r,idIsFromProps:s,order:o}=t;return s?r:o?`${o}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function rN(e,t){try{const n=tN(e),r=t.getItem(n);if(r){const s=JSON.parse(r);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function X7(e,t,n){var r,s;const o=(r=rN(e,n))!==null&&r!==void 0?r:{},l=nN(t);return(s=o[l])!==null&&s!==void 0?s:null}function K7(e,t,n,r,s){var o;const l=tN(e),u=nN(t),d=(o=rN(e,s))!==null&&o!==void 0?o:{};d[u]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{s.setItem(l,JSON.stringify(d))}catch(h){console.error(h)}}function Dk({layout:e,panelConstraints:t}){const n=[...e],r=n.reduce((o,l)=>o+l,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(o=>`${o}%`).join(", ")}`);if(!rr(r,100)&&n.length>0)for(let o=0;o<t.length;o++){const l=n[o];Xe(l!=null,`No layout data found for index ${o}`);const u=100/r*l;n[o]=u}let s=0;for(let o=0;o<t.length;o++){const l=n[o];Xe(l!=null,`No layout data found for index ${o}`);const u=_o({panelConstraints:t,panelIndex:o,size:l});l!=u&&(s+=l-u,n[o]=u)}if(!rr(s,0))for(let o=0;o<t.length;o++){const l=n[o];Xe(l!=null,`No layout data found for index ${o}`);const u=l+s,d=_o({panelConstraints:t,panelIndex:o,size:u});if(l!==d&&(s-=d-l,n[o]=d,rr(s,0)))break}return n}const W7=100,kc={getItem:e=>(Ok(kc),kc.getItem(e)),setItem:(e,t)=>{Ok(kc),kc.setItem(e,t)}},Pk={};function iN({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:s,id:o=null,onLayout:l=null,keyboardResizeBy:u=null,storage:d=kc,style:h,tagName:g="div",...p}){const x=Cv(o),v=w.useRef(null),[S,k]=w.useState(null),[E,T]=w.useState([]),A=I7(),O=w.useRef({}),R=w.useRef(new Map),M=w.useRef(0),_=w.useRef({autoSaveId:e,direction:r,dragState:S,id:x,keyboardResizeBy:u,onLayout:l,storage:d}),D=w.useRef({layout:E,panelDataArray:[],panelDataArrayChanged:!1});w.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),w.useImperativeHandle(s,()=>({getId:()=>_.current.id,getLayout:()=>{const{layout:N}=D.current;return N},setLayout:N=>{const{onLayout:K}=_.current,{layout:Q,panelDataArray:X}=D.current,Y=Dk({layout:N,panelConstraints:X.map(oe=>oe.constraints)});Mk(Q,Y)||(T(Y),D.current.layout=Y,K&&K(Y),bo(X,Y,O.current))}}),[]),fs(()=>{_.current.autoSaveId=e,_.current.direction=r,_.current.dragState=S,_.current.id=x,_.current.onLayout=l,_.current.storage=d}),F7({committedValuesRef:_,eagerValuesRef:D,groupId:x,layout:E,panelDataArray:D.current.panelDataArray,setLayout:T,panelGroupElement:v.current}),w.useEffect(()=>{const{panelDataArray:N}=D.current;if(e){if(E.length===0||E.length!==N.length)return;let K=Pk[e];K==null&&(K=Z7(K7,W7),Pk[e]=K);const Q=[...N],X=new Map(R.current);K(e,Q,X,E,d)}},[e,E,d]),w.useEffect(()=>{});const P=w.useCallback(N=>{const{onLayout:K}=_.current,{layout:Q,panelDataArray:X}=D.current;if(N.constraints.collapsible){const Y=X.map(be=>be.constraints),{collapsedSize:oe=0,panelSize:ce,pivotIndices:me}=ts(X,N,Q);if(Xe(ce!=null,`Panel size not found for panel "${N.id}"`),!Ai(ce,oe)){R.current.set(N.id,ce);const Te=Co(X,N)===X.length-1?ce-oe:oe-ce,Ve=Sc({delta:Te,initialLayout:Q,panelConstraints:Y,pivotIndices:me,prevLayout:Q,trigger:"imperative-api"});Hd(Q,Ve)||(T(Ve),D.current.layout=Ve,K&&K(Ve),bo(X,Ve,O.current))}}},[]),B=w.useCallback((N,K)=>{const{onLayout:Q}=_.current,{layout:X,panelDataArray:Y}=D.current;if(N.constraints.collapsible){const oe=Y.map(lt=>lt.constraints),{collapsedSize:ce=0,panelSize:me=0,minSize:be=0,pivotIndices:Te}=ts(Y,N,X),Ve=K??be;if(Ai(me,ce)){const lt=R.current.get(N.id),Mt=lt!=null&&lt>=Ve?lt:Ve,st=Co(Y,N)===Y.length-1?me-Mt:Mt-me,yt=Sc({delta:st,initialLayout:X,panelConstraints:oe,pivotIndices:Te,prevLayout:X,trigger:"imperative-api"});Hd(X,yt)||(T(yt),D.current.layout=yt,Q&&Q(yt),bo(Y,yt,O.current))}}},[]),z=w.useCallback(N=>{const{layout:K,panelDataArray:Q}=D.current,{panelSize:X}=ts(Q,N,K);return Xe(X!=null,`Panel size not found for panel "${N.id}"`),X},[]),H=w.useCallback((N,K)=>{const{panelDataArray:Q}=D.current,X=Co(Q,N);return Y7({defaultSize:K,dragState:S,layout:E,panelData:Q,panelIndex:X})},[S,E]),$=w.useCallback(N=>{const{layout:K,panelDataArray:Q}=D.current,{collapsedSize:X=0,collapsible:Y,panelSize:oe}=ts(Q,N,K);return Xe(oe!=null,`Panel size not found for panel "${N.id}"`),Y===!0&&Ai(oe,X)},[]),re=w.useCallback(N=>{const{layout:K,panelDataArray:Q}=D.current,{collapsedSize:X=0,collapsible:Y,panelSize:oe}=ts(Q,N,K);return Xe(oe!=null,`Panel size not found for panel "${N.id}"`),!Y||bs(oe,X)>0},[]),te=w.useCallback(N=>{const{panelDataArray:K}=D.current;K.push(N),K.sort((Q,X)=>{const Y=Q.order,oe=X.order;return Y==null&&oe==null?0:Y==null?-1:oe==null?1:Y-oe}),D.current.panelDataArrayChanged=!0,A()},[A]);fs(()=>{if(D.current.panelDataArrayChanged){D.current.panelDataArrayChanged=!1;const{autoSaveId:N,onLayout:K,storage:Q}=_.current,{layout:X,panelDataArray:Y}=D.current;let oe=null;if(N){const me=X7(N,Y,Q);me&&(R.current=new Map(Object.entries(me.expandToSizes)),oe=me.layout)}oe==null&&(oe=G7({panelDataArray:Y}));const ce=Dk({layout:oe,panelConstraints:Y.map(me=>me.constraints)});Mk(X,ce)||(T(ce),D.current.layout=ce,K&&K(ce),bo(Y,ce,O.current))}}),fs(()=>{const N=D.current;return()=>{N.layout=[]}},[]);const ie=w.useCallback(N=>{let K=!1;const Q=v.current;return Q&&window.getComputedStyle(Q,null).getPropertyValue("direction")==="rtl"&&(K=!0),function(Y){Y.preventDefault();const oe=v.current;if(!oe)return()=>null;const{direction:ce,dragState:me,id:be,keyboardResizeBy:Te,onLayout:Ve}=_.current,{layout:lt,panelDataArray:Mt}=D.current,{initialLayout:Lt}=me??{},st=Qj(be,N,oe);let yt=q7(Y,N,ce,me,Te,oe);const kt=ce==="horizontal";kt&&K&&(yt=-yt);const lr=Mt.map(Yn=>Yn.constraints),Jt=Sc({delta:yt,initialLayout:Lt??lt,panelConstraints:lr,pivotIndices:st,prevLayout:lt,trigger:Hj(Y)?"keyboard":"mouse-or-touch"}),Ct=!Hd(lt,Jt);(Fj(Y)||$j(Y))&&M.current!=yt&&(M.current=yt,!Ct&&yt!==0?kt?gg(N,yt<0?Gj:Yj):gg(N,yt<0?Zj:Xj):gg(N,0)),Ct&&(T(Jt),D.current.layout=Jt,Ve&&Ve(Jt),bo(Mt,Jt,O.current))}},[]),I=w.useCallback((N,K)=>{const{onLayout:Q}=_.current,{layout:X,panelDataArray:Y}=D.current,oe=Y.map(lt=>lt.constraints),{panelSize:ce,pivotIndices:me}=ts(Y,N,X);Xe(ce!=null,`Panel size not found for panel "${N.id}"`);const Te=Co(Y,N)===Y.length-1?ce-K:K-ce,Ve=Sc({delta:Te,initialLayout:X,panelConstraints:oe,pivotIndices:me,prevLayout:X,trigger:"imperative-api"});Hd(X,Ve)||(T(Ve),D.current.layout=Ve,Q&&Q(Ve),bo(Y,Ve,O.current))},[]),F=w.useCallback((N,K)=>{const{layout:Q,panelDataArray:X}=D.current,{collapsedSize:Y=0,collapsible:oe}=K,{collapsedSize:ce=0,collapsible:me,maxSize:be=100,minSize:Te=0}=N.constraints,{panelSize:Ve}=ts(X,N,Q);Ve!=null&&(oe&&me&&Ai(Ve,Y)?Ai(Y,ce)||I(N,ce):Ve<Te?I(N,Te):Ve>be&&I(N,be))},[I]),V=w.useCallback((N,K)=>{const{direction:Q}=_.current,{layout:X}=D.current;if(!v.current)return;const Y=bh(N,v.current);Xe(Y,`Drag handle element not found for id "${N}"`);const oe=eN(Q,K);k({dragHandleId:N,dragHandleRect:Y.getBoundingClientRect(),initialCursorPosition:oe,initialLayout:X})},[]),Z=w.useCallback(()=>{k(null)},[]),C=w.useCallback(N=>{const{panelDataArray:K}=D.current,Q=Co(K,N);Q>=0&&(K.splice(Q,1),delete O.current[N.id],D.current.panelDataArrayChanged=!0,A())},[A]),G=w.useMemo(()=>({collapsePanel:P,direction:r,dragState:S,expandPanel:B,getPanelSize:z,getPanelStyle:H,groupId:x,isPanelCollapsed:$,isPanelExpanded:re,reevaluatePanelConstraints:F,registerPanel:te,registerResizeHandle:ie,resizePanel:I,startDragging:V,stopDragging:Z,unregisterPanel:C,panelGroupElement:v.current}),[P,S,r,B,z,H,x,$,re,F,te,ie,I,V,Z,C]),le={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return w.createElement(yh.Provider,{value:G},w.createElement(g,{...p,children:t,className:n,id:o,ref:v,style:{...le,...h},[zt.group]:"",[zt.groupDirection]:r,[zt.groupId]:x}))}const aN=w.forwardRef((e,t)=>w.createElement(iN,{...e,forwardedRef:t}));iN.displayName="PanelGroup";aN.displayName="forwardRef(PanelGroup)";function Co(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function ts(e,t,n){const r=Co(e,t),o=r===e.length-1?[r-1,r]:[r,r+1],l=n[r];return{...t.constraints,panelSize:l,pivotIndices:o}}function Q7({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){w.useEffect(()=>{if(e||n==null||r==null)return;const s=bh(t,r);if(s==null)return;const o=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),n(l);break}case"F6":{l.preventDefault();const u=s.getAttribute(zt.groupId);Xe(u,`No group element found for id "${u}"`);const d=Hc(u,r),h=Wj(u,t,r);Xe(h!==null,`No resize element found for id "${t}"`);const g=l.shiftKey?h>0?h-1:d.length-1:h+1<d.length?h+1:0;d[g].focus();break}}};return s.addEventListener("keydown",o),()=>{s.removeEventListener("keydown",o)}},[r,e,t,n])}function sN({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:s,onBlur:o,onClick:l,onDragging:u,onFocus:d,onPointerDown:h,onPointerUp:g,style:p={},tabIndex:x=0,tagName:v="div",...S}){var k,E;const T=w.useRef(null),A=w.useRef({onClick:l,onDragging:u,onPointerDown:h,onPointerUp:g});w.useEffect(()=>{A.current.onClick=l,A.current.onDragging=u,A.current.onPointerDown=h,A.current.onPointerUp=g});const O=w.useContext(yh);if(O===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:R,groupId:M,registerResizeHandle:_,startDragging:D,stopDragging:P,panelGroupElement:B}=O,z=Cv(s),[H,$]=w.useState("inactive"),[re,te]=w.useState(!1),[ie,I]=w.useState(null),F=w.useRef({state:H});fs(()=>{F.current.state=H}),w.useEffect(()=>{if(n)I(null);else{const G=_(z);I(()=>G)}},[n,z,_]);const V=(k=r==null?void 0:r.coarse)!==null&&k!==void 0?k:15,Z=(E=r==null?void 0:r.fine)!==null&&E!==void 0?E:5;w.useEffect(()=>{if(n||ie==null)return;const G=T.current;Xe(G,"Element ref not attached");let le=!1;return z7(z,G,R,{coarse:V,fine:Z},(K,Q,X)=>{if(!Q){$("inactive");return}switch(K){case"down":{$("drag"),le=!1,Xe(X,'Expected event to be defined for "down" action'),D(z,X);const{onDragging:Y,onPointerDown:oe}=A.current;Y==null||Y(!0),oe==null||oe();break}case"move":{const{state:Y}=F.current;le=!0,Y!=="drag"&&$("hover"),Xe(X,'Expected event to be defined for "move" action'),ie(X);break}case"up":{$("hover"),P();const{onClick:Y,onDragging:oe,onPointerUp:ce}=A.current;oe==null||oe(!1),ce==null||ce(),le||Y==null||Y();break}}})},[V,R,n,Z,_,z,ie,D,P]),Q7({disabled:n,handleId:z,resizeHandler:ie,panelGroupElement:B});const C={touchAction:"none",userSelect:"none"};return w.createElement(v,{...S,children:e,className:t,id:s,onBlur:()=>{te(!1),o==null||o()},onFocus:()=>{te(!0),d==null||d()},ref:T,role:"separator",style:{...C,...p},tabIndex:x,[zt.groupDirection]:R,[zt.groupId]:M,[zt.resizeHandle]:"",[zt.resizeHandleActive]:H==="drag"?"pointer":re?"keyboard":void 0,[zt.resizeHandleEnabled]:!n,[zt.resizeHandleId]:z,[zt.resizeHandleState]:H})}sN.displayName="PanelResizeHandle";function $o({className:e,...t}){return m.jsx(aN,{"data-slot":"resizable-panel-group",className:Me("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t})}function Sr({...e}){return m.jsx(Uj,{"data-slot":"resizable-panel",...e})}function qo({withHandle:e,className:t,...n}){return m.jsx(sN,{"data-slot":"resizable-handle",className:Me("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...n,children:e&&m.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:m.jsx(nI,{className:"size-2.5"})})})}function J7(e,t,n,r){function s(o){return o instanceof n?o:new n(function(l){l(o)})}return new(n||(n=Promise))(function(o,l){function u(g){try{h(r.next(g))}catch(p){l(p)}}function d(g){try{h(r.throw(g))}catch(p){l(p)}}function h(g){g.done?o(g.value):s(g.value).then(u,d)}h((r=r.apply(e,[])).next())})}var e9=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(s){e.addRange(s)}),t&&t.focus()}},t9=e9,zk={"text/plain":"Text","text/html":"Url",default:"Text"},n9="Copy to clipboard: #{key}, Enter";function r9(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function i9(e,t){var n,r,s,o,l,u,d=!1;t||(t={}),n=t.debug||!1;try{s=t9(),o=document.createRange(),l=document.getSelection(),u=document.createElement("span"),u.textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",function(g){if(g.stopPropagation(),t.format)if(g.preventDefault(),typeof g.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var p=zk[t.format]||zk.default;window.clipboardData.setData(p,e)}else g.clipboardData.clearData(),g.clipboardData.setData(t.format,e);t.onCopy&&(g.preventDefault(),t.onCopy(g.clipboardData))}),document.body.appendChild(u),o.selectNodeContents(u),l.addRange(o);var h=document.execCommand("copy");if(!h)throw new Error("copy command was unsuccessful");d=!0}catch(g){n&&console.error("unable to copy using execCommand: ",g),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),d=!0}catch(p){n&&console.error("unable to copy using clipboardData: ",p),n&&console.error("falling back to prompt"),r=r9("message"in t?t.message:n9),window.prompt(r,e)}}finally{l&&(typeof l.removeRange=="function"?l.removeRange(o):l.removeAllRanges()),u&&document.body.removeChild(u),s()}return d}var a9=i9;function Ra(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ec(e){return Array.isArray(e)?e.length:Ra(e)?Object.keys(e).length:0}function s9(e,t){if(typeof e=="string")return e;try{return JSON.stringify(e,(n,r)=>{switch(typeof r){case"bigint":return String(r)+"n";case"number":case"boolean":case"object":case"string":return r;default:return String(r)}},t)}catch(n){return`${n.name}: ${n.message}`||"JSON.stringify failed"}}function o9(e){return J7(this,void 0,void 0,function*(){try{yield navigator.clipboard.writeText(e)}catch{a9(e)}})}function Lk(e,t,n,r,s,o){if(o&&o.collapsed!==void 0)return!!o.collapsed;if(typeof r=="boolean")return r;if(typeof r=="number"&&t>r)return!0;const l=Ec(e);if(typeof r=="function"){const u=_v(r,[{node:e,depth:t,indexOrName:n,size:l}]);if(typeof u=="boolean")return u}return!!(Array.isArray(e)&&l>s||Ra(e)&&l>s)}function Ik(e,t,n,r,s,o){if(o&&o.collapsed!==void 0)return!!o.collapsed;if(typeof r=="boolean")return r;if(typeof r=="number"&&t>r)return!0;const l=Math.ceil(e.length/100);if(typeof r=="function"){const u=_v(r,[{node:e,depth:t,indexOrName:n,size:l}]);if(typeof u=="boolean")return u}return!!(Array.isArray(e)&&l>s||Ra(e)&&l>s)}function zo(e,t,n){return typeof e=="boolean"?e:!!(typeof e=="number"&&t>e||e==="collapsed"&&n||e==="expanded"&&!n)}function _v(e,t){try{return e(...t)}catch(n){reportError(n)}}function oN(e){if(e===!0||Ra(e)&&e.add===!0)return!0}function Bk(e){if(e===!0||Ra(e)&&e.edit===!0)return!0}function jv(e){if(e===!0||Ra(e)&&e.delete===!0)return!0}function l9(e){return typeof e=="function"}function lN(e){return!e||e.add===void 0||!!e.add}function Vk(e){return!e||e.edit===void 0||!!e.edit}function Nv(e){return!e||e.delete===void 0||!!e.delete}function wh(e){return!e||e.enableClipboard===void 0||!!e.enableClipboard}function c9(e){return!e||e.matchesURL===void 0||!!e.matchesURL}function u9(e,t){return e==="string"?t.trim().replace(/^\"([\s\S]+?)\"$/,"$1"):t}var Uk;function Cy(){return Cy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cy.apply(this,arguments)}var Av=function(t){return w.createElement("svg",Cy({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},t),Uk||(Uk=w.createElement("path",{fill:"currentColor",d:"M12.473 5.806a.666.666 0 0 0-.946 0L8.473 8.86a.667.667 0 0 1-.946 0L4.473 5.806a.667.667 0 1 0-.946.94l3.06 3.06a2 2 0 0 0 2.826 0l3.06-3.06a.667.667 0 0 0 0-.94Z"})))},Hk;function Ty(){return Ty=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ty.apply(this,arguments)}var d9=function(t){return w.createElement("svg",Ty({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Hk||(Hk=w.createElement("path",{fill:"currentColor",d:"M17.542 2.5h-4.75a3.963 3.963 0 0 0-3.959 3.958v4.75a3.963 3.963 0 0 0 3.959 3.959h4.75a3.963 3.963 0 0 0 3.958-3.959v-4.75A3.963 3.963 0 0 0 17.542 2.5Zm2.375 8.708a2.378 2.378 0 0 1-2.375 2.375h-4.75a2.378 2.378 0 0 1-2.375-2.375v-4.75a2.378 2.378 0 0 1 2.375-2.375h4.75a2.378 2.378 0 0 1 2.375 2.375v4.75Zm-4.75 6.334a3.963 3.963 0 0 1-3.959 3.958h-4.75A3.963 3.963 0 0 1 2.5 17.542v-4.75a3.963 3.963 0 0 1 3.958-3.959.791.791 0 1 1 0 1.584 2.378 2.378 0 0 0-2.375 2.375v4.75a2.378 2.378 0 0 0 2.375 2.375h4.75a2.378 2.378 0 0 0 2.375-2.375.792.792 0 1 1 1.584 0Z"})))},Fk,$k;function Ey(){return Ey=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ey.apply(this,arguments)}var f9=function(t){return w.createElement("svg",Ey({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Fk||(Fk=w.createElement("path",{fill:"currentColor",d:"M17.25 3H6.75A3.755 3.755 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.755 3.755 0 0 0 17.25 3Zm2.25 14.25a2.25 2.25 0 0 1-2.25 2.25H6.75a2.25 2.25 0 0 1-2.25-2.25V6.75A2.25 2.25 0 0 1 6.75 4.5h10.5a2.25 2.25 0 0 1 2.25 2.25v10.5Z"})),$k||($k=w.createElement("path",{fill:"#14C786",d:"M10.312 14.45 7.83 11.906a.625.625 0 0 0-.896 0 .659.659 0 0 0 0 .918l2.481 2.546a1.264 1.264 0 0 0 .896.381 1.237 1.237 0 0 0 .895-.38l5.858-6.011a.658.658 0 0 0 0-.919.625.625 0 0 0-.896 0l-5.857 6.01Z"})))};function Sh({node:e,nodeMeta:t}){const{customizeCopy:n,CopyComponent:r,CopiedComponent:s}=w.useContext(Ma),[o,l]=w.useState(!1),u=d=>{d.stopPropagation();const h=n(e,t);typeof h=="string"&&h&&o9(h),l(!0),setTimeout(()=>l(!1),3e3)};return o?typeof s=="function"?m.jsx(s,{className:"json-view--copy",style:{display:"inline-block"}}):m.jsx(f9,{className:"json-view--copy",style:{display:"inline-block"}}):typeof r=="function"?m.jsx(r,{onClick:u,className:"json-view--copy"}):m.jsx(d9,{onClick:u,className:"json-view--copy"})}function _y({indexOrName:e,value:t,depth:n,deleteHandle:r,editHandle:s,parent:o,parentPath:l}){const{displayArrayIndex:u}=w.useContext(Ma),d=Array.isArray(o);return m.jsxs("div",Object.assign({className:"json-view--pair"},{children:[!d||d&&u?m.jsxs(m.Fragment,{children:[m.jsx("span",Object.assign({className:typeof e=="number"?"json-view--index":"json-view--property"},{children:e})),":"," "]}):m.jsx(m.Fragment,{}),m.jsx(uN,{node:t,depth:n+1,deleteHandle:(h,g)=>r(h,g),editHandle:(h,g,p,x)=>s(h,g,p,x),parent:o,indexOrName:e,parentPath:l})]}))}var qk,Gk;function jy(){return jy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jy.apply(this,arguments)}var Rv=function(t){return w.createElement("svg",jy({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),qk||(qk=w.createElement("path",{fill:"currentColor",d:"M18.75 6h-2.325a3.757 3.757 0 0 0-3.675-3h-1.5a3.757 3.757 0 0 0-3.675 3H5.25a.75.75 0 0 0 0 1.5H6v9.75A3.754 3.754 0 0 0 9.75 21h4.5A3.754 3.754 0 0 0 18 17.25V7.5h.75a.75.75 0 1 0 0-1.5Zm-7.5-1.5h1.5A2.255 2.255 0 0 1 14.872 6H9.128a2.255 2.255 0 0 1 2.122-1.5Zm5.25 12.75a2.25 2.25 0 0 1-2.25 2.25h-4.5a2.25 2.25 0 0 1-2.25-2.25V7.5h9v9.75Z"})),Gk||(Gk=w.createElement("path",{fill:"#DA0000",d:"M10.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75ZM13.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75Z"})))},Yk,Zk;function Ny(){return Ny=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ny.apply(this,arguments)}var cN=function(t){return w.createElement("svg",Ny({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Yk||(Yk=w.createElement("path",{fill:"currentColor",d:"M21 6.75v10.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3h10.5A3.754 3.754 0 0 1 21 6.75Zm-1.5 0c0-1.24-1.01-2.25-2.25-2.25H6.75C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25V6.75Z"})),Zk||(Zk=w.createElement("path",{fill:"#14C786",d:"M15 12.75a.75.75 0 1 0 0-1.5h-2.25V9a.75.75 0 1 0-1.5 0v2.25H9a.75.75 0 1 0 0 1.5h2.25V15a.75.75 0 1 0 1.5 0v-2.25H15Z"})))},Xk,Kk;function Ay(){return Ay=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ay.apply(this,arguments)}var Mv=function(t){return w.createElement("svg",Ay({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Xk||(Xk=w.createElement("path",{fill:"currentColor",d:"M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"})),Kk||(Kk=w.createElement("path",{fill:"#14C786",d:"m10.85 13.96-1.986-2.036a.5.5 0 0 0-.716 0 .527.527 0 0 0 0 .735l1.985 2.036a1.01 1.01 0 0 0 .717.305.99.99 0 0 0 .716-.305l4.686-4.808a.526.526 0 0 0 0-.735.5.5 0 0 0-.716 0l-4.687 4.809Z"})))},Wk,Qk;function Ry(){return Ry=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ry.apply(this,arguments)}var Ov=function(t){return w.createElement("svg",Ry({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Wk||(Wk=w.createElement("path",{fill:"#DA0000",d:"M15 9a.75.75 0 0 0-1.06 0L12 10.94 10.06 9A.75.75 0 0 0 9 10.06L10.94 12 9 13.94A.75.75 0 0 0 10.06 15L12 13.06 13.94 15A.75.75 0 0 0 15 13.94L13.06 12 15 10.06A.75.75 0 0 0 15 9Z"})),Qk||(Qk=w.createElement("path",{fill:"currentColor",d:"M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"})))};function h9({originNode:e,node:t,depth:n,index:r,deleteHandle:s,customOptions:o,startIndex:l,parent:u,parentPath:d}){const{enableClipboard:h,src:g,onEdit:p,onChange:x,forceUpdate:v,displaySize:S,CustomOperation:k}=w.useContext(Ma),E=[...d,String(r)],[T,A]=w.useState(!0),O=w.useCallback((_,D,P)=>{e[_]=D,p&&p({newValue:D,oldValue:P,depth:n,src:g,indexOrName:_,parentType:"array",parentPath:d}),x&&x({type:"edit",depth:n,src:g,indexOrName:_,parentType:"array",parentPath:d}),v()},[t,p,x,v]),R=_=>{e.splice(_,1),s&&s(_,d),v()},M=m.jsxs(m.Fragment,{children:[!T&&m.jsxs("span",Object.assign({onClick:()=>A(!0),className:"jv-size-chevron"},{children:[zo(S,n,T)&&m.jsxs("span",Object.assign({className:"jv-size"},{children:[Ec(t)," Items"]})),m.jsx(Av,{className:"jv-chevron"})]})),!T&&h&&wh(o)&&m.jsx(Sh,{node:t,nodeMeta:{depth:n,indexOrName:r,parent:u,parentPath:d,currentPath:E}}),typeof k=="function"?m.jsx(k,{node:t}):null]});return m.jsxs("div",{children:[m.jsx("span",{children:"["}),M,T?m.jsxs("button",Object.assign({onClick:()=>A(!1),className:"jv-button"},{children:[l," ... ",l+t.length-1]})):m.jsx("div",Object.assign({className:"jv-indent"},{children:t.map((_,D)=>m.jsx(_y,{indexOrName:D+l,value:_,depth:n,parent:t,deleteHandle:R,editHandle:O,parentPath:d},String(r)+String(D)))})),m.jsx("span",{children:"]"})]})}function m9({node:e,depth:t,deleteHandle:n,indexOrName:r,customOptions:s,parent:o,parentPath:l}){const u=typeof r<"u"?[...l,String(r)]:l,d=[];for(let ie=0;ie<e.length;ie+=100)d.push(e.slice(ie,ie+100));const{collapsed:h,enableClipboard:g,collapseObjectsAfterLength:p,editable:x,onDelete:v,src:S,onAdd:k,CustomOperation:E,onChange:T,forceUpdate:A,displaySize:O}=w.useContext(Ma),[R,M]=w.useState(Ik(e,t,r,h,p,s));w.useEffect(()=>{M(Ik(e,t,r,h,p,s))},[h,p]);const[_,D]=w.useState(!1),P=()=>{D(!1),n&&n(r,l),v&&v({value:e,depth:t,src:S,indexOrName:r,parentType:"array",parentPath:l}),T&&T({type:"delete",depth:t,src:S,indexOrName:r,parentType:"array",parentPath:l})},[B,z]=w.useState(!1),H=()=>{const ie=e;ie.push(null),k&&k({indexOrName:ie.length-1,depth:t,src:S,parentType:"array",parentPath:l}),T&&T({type:"add",indexOrName:ie.length-1,depth:t,src:S,parentType:"array",parentPath:l}),A()},$=_||B,re=()=>{D(!1),z(!1)},te=m.jsxs(m.Fragment,{children:[!R&&!$&&m.jsxs("span",Object.assign({onClick:()=>M(!0),className:"jv-size-chevron"},{children:[zo(O,t,R)&&m.jsxs("span",Object.assign({className:"jv-size"},{children:[e.length," Items"]})),m.jsx(Av,{className:"jv-chevron"})]})),$&&m.jsx(Mv,{className:"json-view--edit",style:{display:"inline-block"},onClick:B?H:P}),$&&m.jsx(Ov,{className:"json-view--edit",style:{display:"inline-block"},onClick:re}),!R&&!$&&g&&wh(s)&&m.jsx(Sh,{node:e,nodeMeta:{depth:t,indexOrName:r,parent:o,parentPath:l,currentPath:u}}),!R&&!$&&oN(x)&&lN(s)&&m.jsx(cN,{className:"json-view--edit",onClick:()=>{H()}}),!R&&!$&&jv(x)&&Nv(s)&&n&&m.jsx(Rv,{className:"json-view--edit",onClick:()=>D(!0)}),typeof E=="function"?m.jsx(E,{node:e}):null]});return m.jsxs(m.Fragment,{children:[m.jsx("span",{children:"["}),te,R?m.jsx("button",Object.assign({onClick:()=>M(!1),className:"jv-button"},{children:"..."})):m.jsx("div",Object.assign({className:"jv-indent"},{children:d.map((ie,I)=>m.jsx(h9,{originNode:e,node:ie,depth:t,index:I,startIndex:I*100,deleteHandle:n,customOptions:s,parentPath:l},String(r)+String(I)))})),m.jsx("span",{children:"]"}),R&&zo(O,t,R)&&m.jsxs("span",Object.assign({onClick:()=>M(!1),className:"jv-size"},{children:[e.length," Items"]}))]})}function p9({node:e,depth:t,indexOrName:n,deleteHandle:r,customOptions:s,parent:o,parentPath:l}){const{collapsed:u,onCollapse:d,enableClipboard:h,ignoreLargeArray:g,collapseObjectsAfterLength:p,editable:x,onDelete:v,src:S,onAdd:k,onEdit:E,onChange:T,forceUpdate:A,displaySize:O,CustomOperation:R}=w.useContext(Ma),M=typeof n<"u"?[...l,String(n)]:l;if(!g&&Array.isArray(e)&&e.length>100)return m.jsx(m9,{node:e,depth:t,indexOrName:n,deleteHandle:r,customOptions:s,parentPath:M});const _=Ra(e),[D,P]=w.useState(Lk(e,t,n,u,p,s)),B=N=>{d==null||d({isCollapsing:!N,node:e,depth:t,indexOrName:n}),P(N)};w.useEffect(()=>{B(Lk(e,t,n,u,p,s))},[u,p]);const z=w.useCallback((N,K,Q)=>{Array.isArray(e)?e[+N]=K:e&&(e[N]=K),E&&E({newValue:K,oldValue:Q,depth:t,src:S,indexOrName:N,parentType:_?"object":"array",parentPath:M}),T&&T({type:"edit",depth:t,src:S,indexOrName:N,parentType:_?"object":"array",parentPath:M}),A()},[e,E,T,A]),H=N=>{Array.isArray(e)?e.splice(+N,1):e&&delete e[N],A()},[$,re]=w.useState(!1),te=()=>{re(!1),r&&r(n,M),v&&v({value:e,depth:t,src:S,indexOrName:n,parentType:_?"object":"array",parentPath:M}),T&&T({type:"delete",depth:t,src:S,indexOrName:n,parentType:_?"object":"array",parentPath:M})},[ie,I]=w.useState(!1),F=w.useRef(null),V=()=>{var N;if(_){const K=(N=F.current)===null||N===void 0?void 0:N.value;K&&(e[K]=null,F.current&&(F.current.value=""),I(!1),k&&k({indexOrName:K,depth:t,src:S,parentType:"object",parentPath:M}),T&&T({type:"add",indexOrName:K,depth:t,src:S,parentType:"object",parentPath:M}))}else if(Array.isArray(e)){const K=e;K.push(null),k&&k({indexOrName:K.length-1,depth:t,src:S,parentType:"array",parentPath:M}),T&&T({type:"add",indexOrName:K.length-1,depth:t,src:S,parentType:"array",parentPath:M})}A()},Z=N=>{N.key==="Enter"?(N.preventDefault(),V()):N.key==="Escape"&&G()},C=$||ie,G=()=>{re(!1),I(!1)},le=m.jsxs(m.Fragment,{children:[!D&&!C&&m.jsxs("span",Object.assign({onClick:()=>B(!0),className:"jv-size-chevron"},{children:[zo(O,t,D)&&m.jsxs("span",Object.assign({className:"jv-size"},{children:[Ec(e)," Items"]})),m.jsx(Av,{className:"jv-chevron"})]})),ie&&_&&m.jsx("input",{className:"json-view--input",placeholder:"property",ref:F,onKeyDown:Z}),C&&m.jsx(Mv,{className:"json-view--edit",style:{display:"inline-block"},onClick:ie?V:te}),C&&m.jsx(Ov,{className:"json-view--edit",style:{display:"inline-block"},onClick:G}),!D&&!C&&h&&wh(s)&&m.jsx(Sh,{node:e,nodeMeta:{depth:t,indexOrName:n,parent:o,parentPath:l,currentPath:M}}),!D&&!C&&oN(x)&&lN(s)&&m.jsx(cN,{className:"json-view--edit",onClick:()=>{_?(I(!0),setTimeout(()=>{var N;return(N=F.current)===null||N===void 0?void 0:N.focus()})):V()}}),!D&&!C&&jv(x)&&Nv(s)&&r&&m.jsx(Rv,{className:"json-view--edit",onClick:()=>re(!0)}),typeof R=="function"?m.jsx(R,{node:e}):null]});return Array.isArray(e)?m.jsxs(m.Fragment,{children:[m.jsx("span",{children:"["}),le,D?m.jsx("button",Object.assign({onClick:()=>B(!1),className:"jv-button"},{children:"..."})):m.jsx("div",Object.assign({className:"jv-indent"},{children:e.map((N,K)=>m.jsx(_y,{indexOrName:K,value:N,depth:t,parent:e,deleteHandle:H,editHandle:z,parentPath:M},String(n)+String(K)))})),m.jsx("span",{children:"]"}),D&&zo(O,t,D)&&m.jsxs("span",Object.assign({onClick:()=>B(!1),className:"jv-size"},{children:[Ec(e)," Items"]}))]}):_?m.jsxs(m.Fragment,{children:[m.jsx("span",{children:"{"}),le,D?m.jsx("button",Object.assign({onClick:()=>B(!1),className:"jv-button"},{children:"..."})):m.jsx("div",Object.assign({className:"jv-indent"},{children:Object.entries(e).map(([N,K])=>m.jsx(_y,{indexOrName:N,value:K,depth:t,parent:e,deleteHandle:H,editHandle:z,parentPath:M},String(n)+String(N)))})),m.jsx("span",{children:"}"}),D&&zo(O,t,D)&&m.jsxs("span",Object.assign({onClick:()=>B(!1),className:"jv-size"},{children:[Ec(e)," Items"]}))]}):m.jsx("span",{children:String(e)})}const g9=ye.forwardRef(({str:e,className:t,ctrlClick:n},r)=>{let{collapseStringMode:s,collapseStringsAfterLength:o,customizeCollapseStringUI:l}=w.useContext(Ma);const[u,d]=w.useState(!0),h=w.useRef(null);o=o>0?o:0;const g=e.replace(/\s+/g," "),p=typeof l=="function"?l(g,u):typeof l=="string"?l:"...",x=v=>{var S;if((v.ctrlKey||v.metaKey)&&n)n(v);else{const k=window.getSelection();if(k&&k.anchorOffset!==k.focusOffset&&((S=k.anchorNode)===null||S===void 0?void 0:S.parentElement)===h.current)return;d(!u)}};if(e.length<=o)return m.jsxs("span",Object.assign({ref:h,className:t,onClick:n},{children:['"',e,'"']}));if(s==="address")return e.length<=10?m.jsxs("span",Object.assign({ref:h,className:t,onClick:n},{children:['"',e,'"']})):m.jsxs("span",Object.assign({ref:h,onClick:x,className:t+" cursor-pointer"},{children:['"',u?[g.slice(0,6),p,g.slice(-4)]:e,'"']}));if(s==="directly")return m.jsxs("span",Object.assign({ref:h,onClick:x,className:t+" cursor-pointer"},{children:['"',u?[g.slice(0,o),p]:e,'"']}));if(s==="word"){let v=o,S=o+1,k=g,E=1;for(;;){if(/\W/.test(e[v])){k=e.slice(0,v);break}if(/\W/.test(e[S])){k=e.slice(0,S);break}if(E===6){k=e.slice(0,o);break}E++,v--,S++}return m.jsxs("span",Object.assign({ref:h,onClick:x,className:t+" cursor-pointer"},{children:['"',u?[k,p]:e,'"']}))}return m.jsxs("span",Object.assign({ref:h,className:t},{children:['"',e,'"']}))});var Jk;function My(){return My=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},My.apply(this,arguments)}var y9=function(t){return w.createElement("svg",My({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Jk||(Jk=w.createElement("path",{fill:"currentColor",d:"M17.25 3H6.75A3.754 3.754 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.754 3.754 0 0 0 17.25 3Zm2.25 14.25c0 1.24-1.01 2.25-2.25 2.25H6.75c-1.24 0-2.25-1.01-2.25-2.25V6.75c0-1.24 1.01-2.25 2.25-2.25h10.5c1.24 0 2.25 1.01 2.25 2.25v10.5Zm-6.09-9.466-5.031 5.03a2.981 2.981 0 0 0-.879 2.121v1.19c0 .415.336.75.75.75h1.19c.8 0 1.554-.312 2.12-.879l5.03-5.03a2.252 2.252 0 0 0 0-3.182c-.85-.85-2.331-.85-3.18 0Zm-2.91 7.151c-.28.28-.666.44-1.06.44H9v-.44c0-.4.156-.777.44-1.06l3.187-3.188 1.06 1.061-3.187 3.188Zm5.03-5.03-.782.783-1.06-1.061.782-.782a.766.766 0 0 1 1.06 0 .75.75 0 0 1 0 1.06Z"})))},eC,tC;function Oy(){return Oy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oy.apply(this,arguments)}var x9=function(t){return w.createElement("svg",Oy({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),eC||(eC=w.createElement("path",{fill:"currentColor",d:"M6.75 3h5.5v1.5h-5.5C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25v-5.5H21v5.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3Z"})),tC||(tC=w.createElement("path",{fill:"currentColor",d:"M20.013 3h-3.946a.987.987 0 0 0 0 1.973h1.564l-6.342 6.342a1.004 1.004 0 0 0 0 1.396 1.004 1.004 0 0 0 1.396 0l6.342-6.342v1.564a.987.987 0 0 0 1.973 0V3.987A.987.987 0 0 0 20.013 3Z"})))};function uN({node:e,depth:t,deleteHandle:n,indexOrName:r,parent:s,editHandle:o,parentPath:l}){const{collapseStringsAfterLength:u,enableClipboard:d,editable:h,src:g,onDelete:p,onChange:x,customizeNode:v,matchesURL:S,urlRegExp:k,EditComponent:E,DoneComponent:T,CancelComponent:A,CustomOperation:O}=w.useContext(Ma);let R;if(typeof v=="function"&&(R=_v(v,[{node:e,depth:t,indexOrName:r}])),R){if(w.isValidElement(R))return R;if(l9(R)){const M=R;return m.jsx(M,{node:e,depth:t,indexOrName:r})}}if(Array.isArray(e)||Ra(e))return m.jsx(p9,{parent:s,node:e,depth:t,indexOrName:r,deleteHandle:n,parentPath:l,customOptions:typeof R=="object"?R:void 0});{const M=typeof e,_=typeof r<"u"?[...l,String(r)]:l,[D,P]=w.useState(!1),[B,z]=w.useState(!1),H=w.useRef(null),$=()=>{P(!0),setTimeout(()=>{var N,K;(N=window.getSelection())===null||N===void 0||N.selectAllChildren(H.current),(K=H.current)===null||K===void 0||K.focus()})},re=w.useCallback(()=>{let N=H.current.innerText;try{const K=JSON.parse(N);o&&o(r,K,e,l)}catch{const Q=u9(M,N);o&&o(r,Q,e,l)}P(!1)},[o,r,e,l,M]),te=()=>{P(!1),z(!1)},ie=()=>{z(!1),n&&n(r,l),p&&p({value:e,depth:t,src:g,indexOrName:r,parentType:Array.isArray(s)?"array":"object",parentPath:l}),x&&x({depth:t,src:g,indexOrName:r,parentType:Array.isArray(s)?"array":"object",type:"delete",parentPath:l})},I=w.useCallback(N=>{N.key==="Enter"?(N.preventDefault(),re()):N.key==="Escape"&&te()},[re]),F=D||B,V=!F&&Bk(h)&&Vk(R)&&o?N=>{(N.ctrlKey||N.metaKey)&&$()}:void 0,Z=m.jsxs(m.Fragment,{children:[F&&(typeof T=="function"?m.jsx(T,{className:"json-view--edit",style:{display:"inline-block"},onClick:B?ie:re}):m.jsx(Mv,{className:"json-view--edit",style:{display:"inline-block"},onClick:B?ie:re})),F&&(typeof A=="function"?m.jsx(A,{className:"json-view--edit",style:{display:"inline-block"},onClick:te}):m.jsx(Ov,{className:"json-view--edit",style:{display:"inline-block"},onClick:te})),!F&&d&&wh(R)&&m.jsx(Sh,{node:e,nodeMeta:{depth:t,indexOrName:r,parent:s,parentPath:l,currentPath:_}}),!F&&S&&M==="string"&&k.test(e)&&c9(R)&&m.jsx("a",Object.assign({href:e,target:"_blank",className:"json-view--link"},{children:m.jsx(x9,{})})),!F&&Bk(h)&&Vk(R)&&o&&(typeof E=="function"?m.jsx(E,{className:"json-view--edit",onClick:$}):m.jsx(y9,{className:"json-view--edit",onClick:$})),!F&&jv(h)&&Nv(R)&&n&&m.jsx(Rv,{className:"json-view--edit",onClick:()=>z(!0)}),typeof O=="function"?m.jsx(O,{node:e}):null]});let C="json-view--string";switch(M){case"number":case"bigint":C="json-view--number";break;case"boolean":C="json-view--boolean";break;case"object":C="json-view--null";break}typeof(R==null?void 0:R.className)=="string"&&(C+=" "+R.className),B&&(C+=" json-view--deleting");let G=String(e);M==="bigint"&&(G+="n");const le=w.useMemo(()=>m.jsx("span",{contentEditable:!0,className:C,dangerouslySetInnerHTML:{__html:M==="string"?`"${G}"`:G},ref:H,onKeyDown:I}),[G,M,I]);return M==="string"?m.jsxs(m.Fragment,{children:[D?le:e.length>u?m.jsx(g9,{str:e,ref:H,className:C,ctrlClick:V}):m.jsxs("span",Object.assign({className:C,onClick:V},{children:['"',G,'"']})),Z]}):m.jsxs(m.Fragment,{children:[D?le:m.jsx("span",Object.assign({className:C,onClick:V},{children:G})),Z]})}}const dN=/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/,Ma=w.createContext({src:void 0,collapseStringsAfterLength:99,collapseStringMode:"directly",customizeCollapseStringUI:void 0,collapseObjectsAfterLength:20,collapsed:!1,onCollapse:void 0,enableClipboard:!0,editable:!1,onEdit:void 0,onDelete:void 0,onAdd:void 0,onChange:void 0,forceUpdate:()=>{},customizeNode:void 0,customizeCopy:()=>{},displaySize:void 0,displayArrayIndex:!0,matchesURL:!1,urlRegExp:dN,ignoreLargeArray:!1,CopyComponent:void 0,CopiedComponent:void 0,EditComponent:void 0,CancelComponent:void 0,DoneComponent:void 0,CustomOperation:void 0});function kh({src:e,collapseStringsAfterLength:t=99,collapseStringMode:n="directly",customizeCollapseStringUI:r,collapseObjectsAfterLength:s=99,collapsed:o,onCollapse:l,enableClipboard:u=!0,editable:d=!1,onEdit:h,onDelete:g,onAdd:p,onChange:x,dark:v=!1,theme:S="default",customizeNode:k,customizeCopy:E=te=>s9(te),displaySize:T,displayArrayIndex:A=!0,style:O,className:R,matchesURL:M=!1,urlRegExp:_=dN,ignoreLargeArray:D=!1,CopyComponent:P,CopiedComponent:B,EditComponent:z,CancelComponent:H,DoneComponent:$,CustomOperation:re}){const[te,ie]=w.useState(0),I=w.useCallback(()=>ie(Z=>++Z),[]),[F,V]=w.useState(e);return w.useEffect(()=>V(e),[e]),m.jsx(Ma.Provider,Object.assign({value:{src:F,collapseStringsAfterLength:t,collapseStringMode:n,customizeCollapseStringUI:r,collapseObjectsAfterLength:s,collapsed:o,onCollapse:l,enableClipboard:u,editable:d,onEdit:h,onDelete:g,onAdd:p,onChange:x,forceUpdate:I,customizeNode:k,customizeCopy:E,displaySize:T,displayArrayIndex:A,matchesURL:M,urlRegExp:_,ignoreLargeArray:D,CopyComponent:P,CopiedComponent:B,EditComponent:z,CancelComponent:H,DoneComponent:$,CustomOperation:re}},{children:m.jsx("code",Object.assign({className:"json-view"+(v?" dark":"")+(S&&S!=="default"?" json-view_"+S:"")+(R?" "+R:""),style:O},{children:m.jsx(uN,{node:F,depth:1,editHandle:(Z,C,G,le)=>{V(C),h&&h({newValue:C,oldValue:G,depth:1,src:F,indexOrName:Z,parentType:null,parentPath:le}),x&&x({type:"edit",depth:1,src:F,indexOrName:Z,parentType:null,parentPath:le})},deleteHandle:(Z,C)=>{V(void 0),g&&g({value:F,depth:1,src:F,indexOrName:Z,parentType:null,parentPath:C}),x&&x({depth:1,src:F,indexOrName:Z,parentType:null,type:"delete",parentPath:C})},parentPath:[]})}))}))}function af({className:e,...t}){return m.jsx(iL,{"data-slot":"label",className:Me("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function Dy({elicitationRequest:e,onResponse:t,loading:n=!1}){const[r,s]=w.useState([]);ye.useEffect(()=>{e!=null&&e.schema?o(e.schema):s([])},[e]);const o=p=>{if(!p||!p.properties){s([]);return}const x=[],v=p.required||[];Object.entries(p.properties).forEach(([S,k])=>{const E=k.enum?"enum":k.type||"string";x.push({name:S,type:E,description:k.description,required:v.includes(S),value:l(E,k.enum),enum:k.enum,minimum:k.minimum,maximum:k.maximum,pattern:k.pattern})}),s(x)},l=(p,x)=>{switch(p){case"enum":return(x==null?void 0:x[0])||"";case"string":return"";case"number":case"integer":return"";case"boolean":return!1;case"array":return[];case"object":return{};default:return""}},u=(p,x)=>{s(v=>v.map(S=>S.name===p?{...S,value:x}:S))},d=()=>{const p={};return r.forEach(x=>{if(x.value!==""&&x.value!==null&&x.value!==void 0){let v=x.value;if(x.type==="number"||x.type==="integer")v=Number(x.value);else if(x.type==="boolean")v=!!x.value;else if(x.type==="array"||x.type==="object")try{v=JSON.parse(x.value)}catch{v=x.value}p[x.name]=v}}),p},h=async p=>{if(p==="accept"){if(r.filter(S=>S.required&&(!S.value||S.value==="")).length>0)return;const v=d();await t(p,v)}else await t(p)},g=p=>{var x;return p.type==="enum"?m.jsxs(Sa,{value:p.value,onValueChange:v=>u(p.name,v),children:[m.jsx(Ca,{className:"w-full",children:m.jsx(ka,{placeholder:"Select an option"})}),m.jsx(Ta,{children:(x=p.enum)==null?void 0:x.map(v=>m.jsx(ar,{value:v,children:v},v))})]}):p.type==="boolean"?m.jsxs("div",{className:"flex items-center space-x-3 py-2",children:[m.jsx("input",{type:"checkbox",checked:p.value,onChange:v=>u(p.name,v.target.checked),className:"w-4 h-4 text-primary bg-background border-border rounded focus:ring-ring focus:ring-2"}),m.jsx("span",{className:"text-sm",children:p.value?"Enabled":"Disabled"})]}):p.type==="array"||p.type==="object"?m.jsx(cu,{value:typeof p.value=="string"?p.value:JSON.stringify(p.value,null,2),onChange:v=>u(p.name,v.target.value),placeholder:`Enter ${p.type} as JSON`,className:"font-mono text-sm h-20 resize-none"}):m.jsx(qt,{type:p.type==="number"||p.type==="integer"?"number":"text",value:p.value,onChange:v=>u(p.name,v.target.value),placeholder:`Enter ${p.name}`,className:"text-sm"})};return m.jsx(vv,{open:!!e,onOpenChange:()=>{},children:m.jsxs(bv,{className:"max-w-2xl max-h-[80vh] overflow-y-auto",children:[m.jsxs(wv,{children:[m.jsxs(Sv,{className:"flex items-center gap-2 text-sm font-medium",children:[m.jsx(wy,{className:"h-3 w-3"}),"Elicitation Request"]}),m.jsx(m7,{className:"text-md font-bold",children:e==null?void 0:e.message})]}),m.jsx("div",{className:"space-y-6 py-4",children:r.map(p=>m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-start justify-between mb-2",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(af,{className:"text-sm font-medium",children:p.name}),p.required&&m.jsx("div",{className:"w-1.5 h-1.5 bg-red-500 rounded-full",title:"Required field"})]}),p.description&&m.jsx("p",{className:"text-xs text-muted-foreground",children:p.description})]}),m.jsx(zr,{variant:"secondary",className:"text-xs",children:p.type})]}),g(p)]},p.name))}),m.jsxs(h7,{className:"flex gap-2",children:[m.jsxs(Je,{variant:"outline",onClick:()=>h("cancel"),disabled:n,children:[m.jsx(Fo,{className:"h-4 w-4 mr-2"}),"Cancel"]}),m.jsx(Je,{variant:"outline",onClick:()=>h("decline"),disabled:n,children:"Decline"}),m.jsxs(Je,{onClick:()=>h("accept"),disabled:n,children:[n?m.jsx(Lr,{className:"h-4 w-4 mr-2 animate-spin"}):m.jsx(Pr,{className:"h-4 w-4 mr-2"}),"Accept"]})]})]})})}function v9({serverConfig:e}){var ie;const t=Bj("ToolsTab"),[n,r]=w.useState({}),[s,o]=w.useState(""),[l,u]=w.useState([]),[d,h]=w.useState(null),[g,p]=w.useState(!1),[x,v]=w.useState(!1),[S,k]=w.useState(""),[E,T]=w.useState(null),[A,O]=w.useState(null),[R,M]=w.useState(!1);w.useEffect(()=>(e&&D(),()=>{E&&E.close()}),[e,t]),w.useEffect(()=>{s&&n[s]&&P(n[s].inputSchema)},[s,n,t]);const _=()=>e||null,D=async()=>{var V;const I=_();if(!I){t.warn("Cannot fetch tools: no server config available");return}t.info("Starting tool fetch",{serverConfig:I}),E&&(E.close(),T(null)),v(!0),k(""),r({});const F=Date.now();try{const Z=await fetch("/api/mcp/tools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"list",serverConfig:I})});if(!Z.ok){const N=`HTTP error! status: ${Z.status}`;throw t.error("Tools fetch HTTP error",{status:Z.status}),new Error(N)}const C=(V=Z.body)==null?void 0:V.getReader(),G=new TextDecoder;if(!C){const N="No response body";throw t.error("Tools fetch error: no response body"),new Error(N)}let le=0;for(;;){const{done:N,value:K}=await C.read();if(N)break;const X=G.decode(K).split(`
316
+ `);for(const Y of X)if(Y.startsWith("data: ")){const oe=Y.slice(6);if(oe==="[DONE]"){v(!1);return}try{const ce=JSON.parse(oe);if(ce.type==="tools_list"){le=Object.keys(ce.tools||{}).length,r(ce.tools||{});const me=Date.now()-F;t.info("Tools fetch completed successfully",{serverConfig:I,toolCount:le,duration:me,tools:ce.tools})}else if(ce.type==="tool_error"){t.error("Tools fetch error from server",{error:ce.error}),k(ce.error),v(!1);return}}catch(ce){t.warn("Failed to parse SSE data",{data:oe,error:ce})}}}}catch(Z){const C=Z instanceof Error?Z.message:"Unknown error";t.error("Tools fetch network error",{error:C},Z instanceof Error?Z:void 0),k("Network error fetching tools")}finally{v(!1)}},P=I=>{if(!I||!I.properties){u([]);return}const F=[],V=I.required||[];Object.entries(I.properties).forEach(([Z,C])=>{const G=C.enum?"enum":C.type||"string";F.push({name:Z,type:G,description:C.description,required:V.includes(Z),value:B(G,C.enum),enum:C.enum,minimum:C.minimum,maximum:C.maximum,pattern:C.pattern})}),u(F)},B=(I,F)=>{switch(I){case"enum":return(F==null?void 0:F[0])||"";case"string":return"";case"number":case"integer":return"";case"boolean":return!1;case"array":return[];case"object":return{};default:return""}},z=(I,F)=>{u(V=>V.map(Z=>Z.name===I?{...Z,value:F}:Z))},H=()=>{const I={};let F=0;return l.forEach(V=>{if(V.value!==""&&V.value!==null&&V.value!==void 0){let Z=V.value;try{V.type==="number"||V.type==="integer"?(Z=Number(V.value),isNaN(Z)&&(t.warn("Invalid number value for field",{fieldName:V.name,value:V.value}),F++)):V.type==="boolean"?Z=!!V.value:(V.type==="array"||V.type==="object")&&(Z=JSON.parse(V.value)),I[V.name]=Z}catch(C){t.warn("Failed to process field value",{fieldName:V.name,type:V.type,value:V.value,error:C}),F++,I[V.name]=V.value}}}),I},$=async()=>{var V;if(!s){t.warn("Cannot execute tool: no tool selected");return}const I=_();if(!I){t.warn("Cannot execute tool: no server config available");return}p(!0),k(""),h(null);const F=Date.now();try{const Z=H();t.info("Starting tool execution",{toolName:s,parameters:Z});const C=await fetch("/api/mcp/tools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"execute",serverConfig:I,toolName:s,parameters:Z})});if(!C.ok){const N=`HTTP error! status: ${C.status}`;throw t.error("Tool execution HTTP error",{toolName:s,status:C.status}),new Error(N)}const G=(V=C.body)==null?void 0:V.getReader(),le=new TextDecoder;if(!G){const N="No response body";throw t.error("Tool execution error: no response body",{toolName:s}),new Error(N)}for(;;){const{done:N,value:K}=await G.read();if(N)break;const X=le.decode(K).split(`
317
+ `);for(const Y of X)if(Y.startsWith("data: ")){const oe=Y.slice(6);if(oe==="[DONE]"){p(!1);return}try{const ce=JSON.parse(oe);if(ce.type==="tool_result"){const me=ce.result,be=Date.now()-F;t.info("Tool execution completed successfully",{toolName:s,duration:be,result:me}),h(me)}else if(ce.type==="tool_error"){t.error("Tool execution error from server",{toolName:s,error:ce.error}),k(ce.error),p(!1);return}else ce.type==="elicitation_request"?O({requestId:ce.requestId,message:ce.message,schema:ce.schema,timestamp:ce.timestamp}):ce.type==="elicitation_complete"&&O(null)}catch(ce){t.warn("Failed to parse tool execution SSE data",{toolName:s,data:oe,error:ce})}}}}catch(Z){const C=Z instanceof Error?Z.message:"Unknown error";t.error("Tool execution network error",{toolName:s,error:C},Z instanceof Error?Z:void 0),k("Error executing tool")}finally{p(!1)}},re=async(I,F)=>{if(!A){t.warn("Cannot handle elicitation response: no active request");return}M(!0);try{let V=null;I==="accept"?V={action:"accept",content:F||{}}:V={action:I};const Z=await fetch("/api/mcp/tools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"respond",requestId:A.requestId,response:V})});if(!Z.ok){const C=`HTTP error! status: ${Z.status}`;throw t.error("Elicitation response HTTP error",{requestId:A.requestId,action:I,status:Z.status}),new Error(C)}O(null)}catch(V){const Z=V instanceof Error?V.message:"Unknown error";t.error("Error responding to elicitation request",{requestId:A.requestId,action:I,error:Z},V instanceof Error?V:void 0),k("Error responding to elicitation request")}finally{M(!1)}},te=Object.keys(n);return e?m.jsxs("div",{className:"h-[calc(100vh-120px)] flex flex-col",children:[m.jsxs($o,{direction:"vertical",className:"flex-1",children:[m.jsx(Sr,{defaultSize:70,minSize:30,children:m.jsxs($o,{direction:"horizontal",className:"h-full",children:[m.jsx(Sr,{defaultSize:30,minSize:20,maxSize:50,children:m.jsxs("div",{className:"h-full flex flex-col border-r border-border bg-background",children:[m.jsxs("div",{className:"flex items-center justify-between px-4 py-4 border-b border-border bg-background",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx(Ck,{className:"h-3 w-3 text-muted-foreground"}),m.jsx("h2",{className:"text-xs font-semibold text-foreground",children:"Tools"}),m.jsx(zr,{variant:"secondary",className:"text-xs font-mono",children:te.length})]}),m.jsx(Je,{onClick:D,variant:"ghost",size:"sm",disabled:x,children:m.jsx(Lr,{className:`h-3 w-3 ${x?"animate-spin":""} cursor-pointer`})})]}),m.jsx("div",{className:"flex-1 overflow-hidden",children:m.jsx(xa,{className:"h-full",children:m.jsx("div",{className:"p-2",children:x?m.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[m.jsx("div",{className:"w-8 h-8 bg-muted rounded-full flex items-center justify-center mb-3",children:m.jsx(Lr,{className:"h-4 w-4 text-muted-foreground animate-spin cursor-pointer"})}),m.jsx("p",{className:"text-xs text-muted-foreground font-semibold mb-1",children:"Loading tools..."}),m.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Fetching available tools from server"})]}):te.length===0?m.jsx("div",{className:"text-center py-8",children:m.jsx("p",{className:"text-sm text-muted-foreground",children:"No tools available"})}):m.jsx("div",{className:"space-y-1",children:te.map(I=>{var F;return m.jsx("div",{className:`cursor-pointer transition-all duration-200 hover:bg-muted/30 dark:hover:bg-muted/50 p-3 rounded-md mx-2 ${s===I?"bg-muted/50 dark:bg-muted/50 shadow-sm border border-border ring-1 ring-ring/20":"hover:shadow-sm"}`,onClick:()=>{o(I)},children:m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsx("div",{className:"flex items-center gap-2 mb-1",children:m.jsx("code",{className:"font-mono text-xs font-medium text-foreground bg-muted px-1.5 py-0.5 rounded border border-border",children:I})}),((F=n[I])==null?void 0:F.description)&&m.jsx("p",{className:"text-xs mt-2 line-clamp-2 leading-relaxed text-muted-foreground",children:n[I].description})]}),m.jsx(sl,{className:"h-3 w-3 text-muted-foreground flex-shrink-0 mt-1"})]})},I)})})})})})]})}),m.jsx(qo,{withHandle:!0}),m.jsx(Sr,{defaultSize:70,minSize:50,children:m.jsx("div",{className:"h-full flex flex-col bg-background",children:s?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex items-center justify-between px-6 py-5 border-b border-border bg-background",children:[m.jsx("div",{className:"space-y-2",children:m.jsx("div",{className:"flex items-center gap-3",children:m.jsx("code",{className:"font-mono font-semibold text-foreground bg-muted px-2 py-1 rounded-md border border-border text-xs",children:s})})}),m.jsx(Je,{onClick:$,disabled:g||!s,className:"bg-primary hover:bg-primary/90 text-primary-foreground shadow-sm transition-all duration-200 cursor-pointer",size:"sm",children:g?m.jsxs(m.Fragment,{children:[m.jsx(Lr,{className:"h-3 w-3 mr-1.5 animate-spin cursor-pointer"}),m.jsx("span",{className:"font-mono text-xs",children:A?"Waiting...":"Running"})]}):m.jsxs(m.Fragment,{children:[m.jsx(Sf,{className:"h-3 w-3 mr-1.5 cursor-pointer"}),m.jsx("span",{className:"font-mono text-xs",children:"Execute"})]})})]}),((ie=n[s])==null?void 0:ie.description)&&m.jsx("div",{className:"px-6 py-4 bg-muted/50 border-b border-border",children:m.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed font-medium",children:n[s].description})}),m.jsx("div",{className:"flex-1 overflow-hidden",children:m.jsx(xa,{className:"h-full",children:m.jsx("div",{className:"px-6 py-6",children:l.length===0?m.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[m.jsx("div",{className:"w-10 h-10 bg-muted rounded-full flex items-center justify-center mb-3",children:m.jsx(Sf,{className:"h-4 w-4 text-muted-foreground"})}),m.jsx("p",{className:"text-xs text-muted-foreground font-semibold mb-1",children:"No parameters required"}),m.jsx("p",{className:"text-xs text-muted-foreground/70",children:"This tool can be executed directly"})]}):m.jsx("div",{className:"space-y-8",children:l.map(I=>{var F;return m.jsxs("div",{className:"group",children:[m.jsxs("div",{className:"flex items-start justify-between mb-3",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("code",{className:"font-mono text-xs font-semibold text-foreground bg-muted px-1.5 py-0.5 rounded border border-border",children:I.name}),I.required&&m.jsx("div",{className:"w-1.5 h-1.5 bg-amber-400 dark:bg-amber-500 rounded-full",title:"Required field"})]}),I.description&&m.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed max-w-md font-medium",children:I.description})]}),m.jsx(zr,{variant:"secondary",className:"text-xs font-mono font-medium",children:I.type})]}),m.jsx("div",{className:"space-y-2",children:I.type==="enum"?m.jsxs(Sa,{value:I.value,onValueChange:V=>z(I.name,V),children:[m.jsx(Ca,{className:"w-full bg-background border-border hover:border-border/80 focus:border-ring focus:ring-0 font-medium text-xs",children:m.jsx(ka,{placeholder:"Select an option",className:"font-mono text-xs"})}),m.jsx(Ta,{children:(F=I.enum)==null?void 0:F.map(V=>m.jsx(ar,{value:V,className:"font-mono text-xs",children:V},V))})]}):I.type==="boolean"?m.jsxs("div",{className:"flex items-center space-x-3 py-2",children:[m.jsx("input",{type:"checkbox",checked:I.value,onChange:V=>z(I.name,V.target.checked),className:"w-4 h-4 text-primary bg-background border-border rounded focus:ring-ring focus:ring-2"}),m.jsx("span",{className:"text-xs text-foreground font-medium",children:I.value?"Enabled":"Disabled"})]}):I.type==="array"||I.type==="object"?m.jsx(cu,{value:typeof I.value=="string"?I.value:JSON.stringify(I.value,null,2),onChange:V=>z(I.name,V.target.value),placeholder:`Enter ${I.type} as JSON`,className:"font-mono text-xs h-20 bg-background border-border hover:border-border/80 focus:border-ring focus:ring-0 resize-none"}):m.jsx(qt,{type:I.type==="number"||I.type==="integer"?"number":"text",value:I.value,onChange:V=>z(I.name,V.target.value),placeholder:`Enter ${I.name}`,className:"bg-background border-border hover:border-border/80 focus:border-ring focus:ring-0 font-medium text-xs"})})]},I.name)})})})})})]}):m.jsx("div",{className:"h-full flex items-center justify-center",children:m.jsxs("div",{className:"text-center",children:[m.jsx("div",{className:"w-12 h-12 bg-muted rounded-full flex items-center justify-center mx-auto mb-3",children:m.jsx(Ck,{className:"h-5 w-5 text-muted-foreground"})}),m.jsx("p",{className:"text-xs font-semibold text-foreground mb-1",children:"Select a tool"}),m.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Choose a tool from the left to configure parameters"})]})})})})]})}),m.jsx(qo,{withHandle:!0}),m.jsx(Sr,{defaultSize:30,minSize:15,maxSize:70,children:m.jsxs("div",{className:"h-full flex flex-col border-t border-border bg-background",children:[m.jsx("div",{className:"flex items-center justify-between p-4 border-b border-border",children:m.jsx("h2",{className:"text-xs font-semibold text-foreground",children:"Response"})}),m.jsx("div",{className:"flex-1 overflow-hidden",children:S?m.jsx("div",{className:"p-4",children:m.jsx("div",{className:"p-3 bg-destructive/10 border border-destructive/20 rounded text-destructive text-xs font-medium",children:S})}):d?m.jsx(xa,{className:"h-full",children:m.jsx("div",{className:"p-4",children:m.jsx(kh,{src:d,dark:!0,theme:"atom",enableClipboard:!0,displaySize:!1,collapseStringsAfterLength:100,style:{fontSize:"12px",fontFamily:"ui-monospace, SFMono-Regular, 'SF Mono', monospace",backgroundColor:"hsl(var(--background))",padding:"16px",borderRadius:"8px",border:"1px solid hsl(var(--border))"}})})}):m.jsx("div",{className:"flex items-center justify-center h-full",children:m.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Execute a tool to see results here"})})})]})})]}),m.jsx(Dy,{elicitationRequest:A,onResponse:re,loading:R})]}):m.jsx(va,{children:m.jsx(Pc,{className:"pt-6",children:m.jsx("p",{className:"text-center text-muted-foreground font-medium",children:"Please select a server to view tools"})})})}function b9({serverConfig:e}){var T,A,O,R;const[t,n]=w.useState({}),[r,s]=w.useState(""),[o,l]=w.useState(null),[u,d]=w.useState(!1),[h,g]=w.useState(!1),[p,x]=w.useState("");w.useEffect(()=>{e&&S()},[e]);const v=()=>e||null,S=async()=>{const M=v();if(M){g(!0),x(""),n({});try{const _=await fetch("/api/mcp/resources/list",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverConfig:M})}),D=await _.json();_.ok?n(D.resources||{}):x(D.error||"Failed to fetch resources")}catch(_){x(`Network error fetching resources: ${_}`)}finally{g(!1)}}},k=async M=>{const _=v();if(_){d(!0),x("");try{const D=await fetch("/api/mcp/resources/read",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverConfig:_,uri:M})}),P=await D.json();D.ok?l(P.content):x(P.error||"Failed to read resource")}catch(D){x(`Network error reading resource: ${D}`)}finally{d(!1)}}},E=Object.values(t).flat();return e?m.jsx("div",{className:"h-[calc(100vh-120px)] flex flex-col",children:m.jsxs($o,{direction:"vertical",className:"flex-1",children:[m.jsx(Sr,{defaultSize:70,minSize:30,children:m.jsxs($o,{direction:"horizontal",className:"h-full",children:[m.jsx(Sr,{defaultSize:30,minSize:20,maxSize:50,children:m.jsxs("div",{className:"h-full flex flex-col border-r border-border bg-background",children:[m.jsxs("div",{className:"flex items-center justify-between px-4 py-4 border-b border-border bg-background",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx(by,{className:"h-3 w-3 text-muted-foreground"}),m.jsx("h2",{className:"text-xs font-semibold text-foreground",children:"Resources"}),m.jsx(zr,{variant:"secondary",className:"text-xs font-mono",children:E.length})]}),m.jsx(Je,{onClick:S,variant:"ghost",size:"sm",disabled:h,children:m.jsx(Lr,{className:`h-3 w-3 ${h?"animate-spin":""} cursor-pointer`})})]}),m.jsx("div",{className:"flex-1 overflow-hidden",children:m.jsx(xa,{className:"h-full",children:m.jsx("div",{className:"p-2",children:h?m.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[m.jsx("div",{className:"w-8 h-8 bg-muted rounded-full flex items-center justify-center mb-3",children:m.jsx(Lr,{className:"h-4 w-4 text-muted-foreground animate-spin cursor-pointer"})}),m.jsx("p",{className:"text-xs text-muted-foreground font-semibold mb-1",children:"Loading resources..."}),m.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Fetching available resources from server"})]}):E.length===0?m.jsx("div",{className:"text-center py-8",children:m.jsx("p",{className:"text-sm text-muted-foreground",children:"No resources available"})}):m.jsx("div",{className:"space-y-1",children:E.map(M=>m.jsx("div",{className:`cursor-pointer transition-all duration-200 hover:bg-muted/30 dark:hover:bg-muted/50 p-3 rounded-md mx-2 ${r===M.uri?"bg-muted/50 dark:bg-muted/50 shadow-sm border border-border ring-1 ring-ring/20":"hover:shadow-sm"}`,onClick:()=>s(M.uri),children:m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[m.jsx(W6,{className:"h-3 w-3 text-muted-foreground flex-shrink-0"}),m.jsx("code",{className:"font-mono text-xs font-medium text-foreground bg-muted px-1.5 py-0.5 rounded border border-border",children:M.name})]}),M.description&&m.jsx("p",{className:"text-xs mt-2 line-clamp-2 leading-relaxed text-muted-foreground",children:M.description}),m.jsx("p",{className:"text-xs text-muted-foreground/70 mt-1 font-mono truncate",children:M.uri}),M.mimeType&&m.jsx(zr,{variant:"outline",className:"text-xs mt-2 font-mono",children:M.mimeType})]}),m.jsx(sl,{className:"h-3 w-3 text-muted-foreground flex-shrink-0 mt-1"})]})},M.uri))})})})})]})}),m.jsx(qo,{withHandle:!0}),m.jsx(Sr,{defaultSize:70,minSize:50,children:m.jsx("div",{className:"h-full flex flex-col bg-background",children:r?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex items-center justify-between px-6 py-5 border-b border-border bg-background",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx("div",{className:"flex items-center gap-3",children:m.jsx("code",{className:"font-mono font-semibold text-foreground bg-muted px-2 py-1 rounded-md border border-border text-xs",children:((T=E.find(M=>M.uri===r))==null?void 0:T.name)||r})}),m.jsx("p",{className:"text-xs text-muted-foreground font-mono truncate max-w-md",children:r})]}),m.jsx(Je,{onClick:()=>k(r),disabled:u,className:"bg-primary hover:bg-primary/90 text-primary-foreground shadow-sm transition-all duration-200 cursor-pointer",size:"sm",children:u?m.jsxs(m.Fragment,{children:[m.jsx(Lr,{className:"h-3 w-3 mr-1.5 animate-spin cursor-pointer"}),m.jsx("span",{className:"font-mono text-xs",children:"Reading"})]}):m.jsxs(m.Fragment,{children:[m.jsx(wf,{className:"h-3 w-3 mr-1.5 cursor-pointer"}),m.jsx("span",{className:"font-mono text-xs",children:"Read"})]})})]}),((A=E.find(M=>M.uri===r))==null?void 0:A.description)&&m.jsx("div",{className:"px-6 py-4 bg-muted/50 border-b border-border",children:m.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed font-medium",children:(O=E.find(M=>M.uri===r))==null?void 0:O.description})}),m.jsx("div",{className:"flex-1 overflow-hidden",children:m.jsx(xa,{className:"h-full",children:m.jsx("div",{className:"px-6 py-6",children:o?m.jsx("div",{className:"space-y-4",children:(R=o==null?void 0:o.contents)==null?void 0:R.map((M,_)=>m.jsxs("div",{className:"group",children:[m.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[m.jsx(zr,{variant:"secondary",className:"text-xs font-mono font-medium",children:M.type}),M.mimeType&&m.jsx(zr,{variant:"outline",className:"text-xs font-mono",children:M.mimeType})]}),m.jsx("div",{className:"border border-border rounded-md overflow-hidden",children:M.type==="text"?m.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap p-4 bg-background overflow-auto max-h-96",children:M.text}):m.jsx("div",{className:"p-4",children:m.jsx(kh,{src:M,dark:!0,theme:"atom",enableClipboard:!0,displaySize:!1,collapseStringsAfterLength:100,style:{fontSize:"12px",fontFamily:"ui-monospace, SFMono-Regular, 'SF Mono', monospace",backgroundColor:"hsl(var(--background))",padding:"0",borderRadius:"0",border:"none"}})})})]},_))}):m.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[m.jsx("div",{className:"w-10 h-10 bg-muted rounded-full flex items-center justify-center mb-3",children:m.jsx(wf,{className:"h-4 w-4 text-muted-foreground"})}),m.jsx("p",{className:"text-xs text-muted-foreground font-semibold mb-1",children:"Ready to read resource"}),m.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Click the Read button to view resource content"})]})})})})]}):m.jsx("div",{className:"h-full flex items-center justify-center",children:m.jsxs("div",{className:"text-center",children:[m.jsx("div",{className:"w-12 h-12 bg-muted rounded-full flex items-center justify-center mx-auto mb-3",children:m.jsx(by,{className:"h-5 w-5 text-muted-foreground"})}),m.jsx("p",{className:"text-xs font-semibold text-foreground mb-1",children:"Select a resource"}),m.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Choose a resource from the left to preview its content"})]})})})})]})}),m.jsx(qo,{withHandle:!0}),m.jsx(Sr,{defaultSize:30,minSize:15,maxSize:70,children:m.jsxs("div",{className:"h-full flex flex-col border-t border-border bg-background",children:[m.jsx("div",{className:"flex items-center justify-between p-4 border-b border-border",children:m.jsx("h2",{className:"text-xs font-semibold text-foreground",children:"Status"})}),m.jsx("div",{className:"flex-1 overflow-hidden",children:p?m.jsx("div",{className:"p-4",children:m.jsx("div",{className:"p-3 bg-destructive/10 border border-destructive/20 rounded text-destructive text-xs font-medium",children:p})}):m.jsx("div",{className:"flex items-center justify-center h-full",children:m.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Resource operations status will appear here"})})})]})})]})}):m.jsx(va,{children:m.jsx(Pc,{className:"pt-6",children:m.jsx("p",{className:"text-center text-muted-foreground font-medium",children:"Please select a server to view resources"})})})}function w9({serverConfig:e}){const[t,n]=w.useState({}),[r,s]=w.useState(""),[o,l]=w.useState(null),[u,d]=w.useState([]),[h,g]=w.useState(null),[p,x]=w.useState(!1),[v,S]=w.useState(!1),[k,E]=w.useState("");w.useEffect(()=>{e&&A()},[e]),w.useEffect(()=>{o!=null&&o.arguments?O(o.arguments):d([])},[o]);const T=()=>e||null,A=async()=>{const P=T();if(P){S(!0),E("");try{const B=await fetch("/api/mcp/prompts/list",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverConfig:P})}),z=await B.json();console.log("bigData",z),B.ok?n(z.prompts||{}):E(z.error||"Failed to fetch prompts")}catch{E("Network error fetching prompts")}finally{S(!1)}}},O=P=>{if(!P||P.length===0){d([]);return}const B=P.map(z=>({name:z.name,type:"string",description:z.description,required:z.required||!1,value:""}));d(B)},R=(P,B)=>{d(z=>z.map(H=>H.name===P?{...H,value:B}:H))},M=()=>{const P={};return u.forEach(B=>{if(B.value!==""&&B.value!==null&&B.value!==void 0){let z=B.value;if(B.type==="number"||B.type==="integer")z=Number(B.value);else if(B.type==="boolean")z=!!B.value;else if(B.type==="array"||B.type==="object")try{z=JSON.parse(B.value)}catch{z=B.value}P[B.name]=z}}),P},_=async()=>{if(!r)return;const P=T();if(P){x(!0),E("");try{const B=M(),z=await fetch("/api/mcp/prompts/get",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverConfig:P,name:r,args:B})}),H=await z.json();z.ok?g(H.content):E(H.error||"Failed to get prompt")}catch(B){E(`Error getting prompt: ${B}`)}finally{x(!1)}}},D=Object.values(t).flat().map(P=>P.name);return e?m.jsx("div",{className:"h-[calc(100vh-120px)] flex flex-col",children:m.jsxs($o,{direction:"vertical",className:"flex-1",children:[m.jsx(Sr,{defaultSize:70,minSize:30,children:m.jsxs($o,{direction:"horizontal",className:"h-full",children:[m.jsx(Sr,{defaultSize:30,minSize:20,maxSize:50,children:m.jsxs("div",{className:"h-full flex flex-col border-r border-border bg-background",children:[m.jsxs("div",{className:"flex items-center justify-between px-4 py-4 border-b border-border bg-background",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx(wy,{className:"h-3 w-3 text-muted-foreground"}),m.jsx("h2",{className:"text-xs font-semibold text-foreground",children:"Prompts"}),m.jsx(zr,{variant:"secondary",className:"text-xs font-mono",children:D.length})]}),m.jsx(Je,{onClick:A,variant:"ghost",size:"sm",disabled:v,children:m.jsx(Lr,{className:`h-3 w-3 ${v?"animate-spin":""} cursor-pointer`})})]}),m.jsx("div",{className:"flex-1 overflow-hidden",children:m.jsx(xa,{className:"h-full",children:m.jsx("div",{className:"p-2",children:v?m.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[m.jsx("div",{className:"w-8 h-8 bg-muted rounded-full flex items-center justify-center mb-3",children:m.jsx(Lr,{className:"h-4 w-4 text-muted-foreground animate-spin cursor-pointer"})}),m.jsx("p",{className:"text-xs text-muted-foreground font-semibold mb-1",children:"Loading prompts..."}),m.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Fetching available prompts from server"})]}):D.length===0?m.jsx("div",{className:"text-center py-8",children:m.jsx("p",{className:"text-sm text-muted-foreground",children:"No prompts available"})}):m.jsx("div",{className:"space-y-1",children:D.map(P=>{var B,z;return m.jsx("div",{className:`cursor-pointer transition-all duration-200 hover:bg-muted/30 dark:hover:bg-muted/50 p-3 rounded-md mx-2 ${r===P?"bg-muted/50 dark:bg-muted/50 shadow-sm border border-border ring-1 ring-ring/20":"hover:shadow-sm"}`,onClick:()=>{s(P);const H=Object.values(t).flat().find($=>$.name===P);l(H||null)},children:m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsx("div",{className:"flex items-center gap-2 mb-1",children:m.jsx("code",{className:"font-mono text-xs font-medium text-foreground bg-muted px-1.5 py-0.5 rounded border border-border",children:P})}),((B=Object.values(t).flat().find(H=>H.name===P))==null?void 0:B.description)&&m.jsx("p",{className:"text-xs mt-2 line-clamp-2 leading-relaxed text-muted-foreground",children:(z=Object.values(t).flat().find(H=>H.name===P))==null?void 0:z.description})]}),m.jsx(sl,{className:"h-3 w-3 text-muted-foreground flex-shrink-0 mt-1"})]})},P)})})})})})]})}),m.jsx(qo,{withHandle:!0}),m.jsx(Sr,{defaultSize:70,minSize:50,children:m.jsx("div",{className:"h-full flex flex-col bg-background",children:r?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex items-center justify-between px-6 py-5 border-b border-border bg-background",children:[m.jsx("div",{className:"space-y-2",children:m.jsx("div",{className:"flex items-center gap-3",children:m.jsx("code",{className:"font-mono font-semibold text-foreground bg-muted px-2 py-1 rounded-md border border-border text-xs",children:r})})}),m.jsx(Je,{onClick:_,disabled:p||!r,className:"bg-primary hover:bg-primary/90 text-primary-foreground shadow-sm transition-all duration-200 cursor-pointer",size:"sm",children:p?m.jsxs(m.Fragment,{children:[m.jsx(Lr,{className:"h-3 w-3 mr-1.5 animate-spin cursor-pointer"}),m.jsx("span",{className:"font-mono text-xs",children:"Loading"})]}):m.jsxs(m.Fragment,{children:[m.jsx(Sf,{className:"h-3 w-3 mr-1.5 cursor-pointer"}),m.jsx("span",{className:"font-mono text-xs",children:"Get Prompt"})]})})]}),(o==null?void 0:o.description)&&m.jsx("div",{className:"px-6 py-4 bg-muted/50 border-b border-border",children:m.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed font-medium",children:o.description})}),m.jsx("div",{className:"flex-1 overflow-hidden",children:m.jsx(xa,{className:"h-full",children:m.jsx("div",{className:"px-6 py-6",children:u.length===0?m.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[m.jsx("div",{className:"w-10 h-10 bg-muted rounded-full flex items-center justify-center mb-3",children:m.jsx(Sf,{className:"h-4 w-4 text-muted-foreground"})}),m.jsx("p",{className:"text-xs text-muted-foreground font-semibold mb-1",children:"No parameters required"}),m.jsx("p",{className:"text-xs text-muted-foreground/70",children:"This prompt can be retrieved directly"})]}):m.jsx("div",{className:"space-y-8",children:u.map(P=>{var B;return m.jsxs("div",{className:"group",children:[m.jsxs("div",{className:"flex items-start justify-between mb-3",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("code",{className:"font-mono text-xs font-semibold text-foreground bg-muted px-1.5 py-0.5 rounded border border-border",children:P.name}),P.required&&m.jsx("div",{className:"w-1.5 h-1.5 bg-amber-400 dark:bg-amber-500 rounded-full",title:"Required field"})]}),P.description&&m.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed max-w-md font-medium",children:P.description})]}),m.jsx(zr,{variant:"secondary",className:"text-xs font-mono font-medium",children:P.type})]}),m.jsx("div",{className:"space-y-2",children:P.type==="enum"?m.jsxs(Sa,{value:P.value,onValueChange:z=>R(P.name,z),children:[m.jsx(Ca,{className:"w-full bg-background border-border hover:border-border/80 focus:border-ring focus:ring-0 font-medium text-xs",children:m.jsx(ka,{placeholder:"Select an option",className:"font-mono text-xs"})}),m.jsx(Ta,{children:(B=P.enum)==null?void 0:B.map(z=>m.jsx(ar,{value:z,className:"font-mono text-xs",children:z},z))})]}):P.type==="boolean"?m.jsxs("div",{className:"flex items-center space-x-3 py-2",children:[m.jsx("input",{type:"checkbox",checked:P.value,onChange:z=>R(P.name,z.target.checked),className:"w-4 h-4 text-primary bg-background border-border rounded focus:ring-ring focus:ring-2"}),m.jsx("span",{className:"text-xs text-foreground font-medium",children:P.value?"Enabled":"Disabled"})]}):P.type==="array"||P.type==="object"?m.jsx(cu,{value:typeof P.value=="string"?P.value:JSON.stringify(P.value,null,2),onChange:z=>R(P.name,z.target.value),placeholder:`Enter ${P.type} as JSON`,className:"font-mono text-xs h-20 bg-background border-border hover:border-border/80 focus:border-ring focus:ring-0 resize-none"}):m.jsx(qt,{type:P.type==="number"||P.type==="integer"?"number":"text",value:P.value,onChange:z=>R(P.name,z.target.value),placeholder:`Enter ${P.name}`,className:"bg-background border-border hover:border-border/80 focus:border-ring focus:ring-0 font-medium text-xs"})})]},P.name)})})})})})]}):m.jsx("div",{className:"h-full flex items-center justify-center",children:m.jsxs("div",{className:"text-center",children:[m.jsx("div",{className:"w-12 h-12 bg-muted rounded-full flex items-center justify-center mx-auto mb-3",children:m.jsx(wy,{className:"h-5 w-5 text-muted-foreground"})}),m.jsx("p",{className:"text-xs font-semibold text-foreground mb-1",children:"Select a prompt"}),m.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Choose a prompt from the left to view details"})]})})})})]})}),m.jsx(qo,{withHandle:!0}),m.jsx(Sr,{defaultSize:30,minSize:15,maxSize:70,children:m.jsxs("div",{className:"h-full flex flex-col border-t border-border bg-background",children:[m.jsx("div",{className:"flex items-center justify-between p-4 border-b border-border",children:m.jsx("h2",{className:"text-xs font-semibold text-foreground",children:"Prompt Content"})}),m.jsx("div",{className:"flex-1 overflow-hidden",children:k?m.jsx("div",{className:"p-4",children:m.jsx("div",{className:"p-3 bg-destructive/10 border border-destructive/20 rounded text-destructive text-xs font-medium",children:k})}):h?m.jsx(xa,{className:"h-full",children:m.jsx("div",{className:"p-4",children:typeof h=="string"?m.jsx("pre",{className:"whitespace-pre-wrap text-xs font-mono bg-muted p-4 rounded-md border border-border",children:h}):m.jsx(kh,{src:h,dark:!0,theme:"atom",enableClipboard:!0,displaySize:!1,collapseStringsAfterLength:100,style:{fontSize:"12px",fontFamily:"ui-monospace, SFMono-Regular, 'SF Mono', monospace",backgroundColor:"hsl(var(--background))",padding:"16px",borderRadius:"8px",border:"1px solid hsl(var(--border))"}})})}):m.jsx("div",{className:"flex items-center justify-center h-full",children:m.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Get a prompt to see its content here"})})})]})})]})}):m.jsx(va,{children:m.jsx(Pc,{className:"pt-6",children:m.jsx("p",{className:"text-center text-muted-foreground font-medium",children:"Please select a server to view prompts"})})})}function Py(...e){return qE(Lx(e))}function S9(){return Math.random().toString(36).substr(2,9)}function nC(e){return e.trim()}function rC(e){return new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}).format(e)}function iC(e,t,n){return{id:S9(),role:e,content:t,timestamp:new Date,attachments:n,metadata:{createdAt:new Date().toISOString()}}}var zy=(e=>(e.CLAUDE_OPUS_4_0="claude-opus-4-0",e.CLAUDE_SONNET_4_0="claude-sonnet-4-0",e.CLAUDE_3_7_SONNET_LATEST="claude-3-7-sonnet-latest",e.CLAUDE_3_5_SONNET_LATEST="claude-3-5-sonnet-latest",e.CLAUDE_3_5_HAIKU_LATEST="claude-3-5-haiku-latest",e.O3_MINI="o3-mini",e.O3="o3",e.O4_MINI="o4-mini",e.GPT_4_1="gpt-4.1",e.GPT_4_1_MINI="gpt-4.1-mini",e.GPT_4_1_NANO="gpt-4.1-nano",e.GPT_4O="gpt-4o",e.GPT_4O_MINI="gpt-4o-mini",e.GPT_4_TURBO="gpt-4-turbo",e.GPT_4="gpt-4",e.GPT_3_5_TURBO="gpt-3.5-turbo",e.O1="o1",e))(zy||{});const xg=[{id:"claude-opus-4-0",name:"Claude Opus 4",provider:"anthropic"},{id:"claude-sonnet-4-0",name:"Claude Sonnet 4",provider:"anthropic"},{id:"claude-3-7-sonnet-latest",name:"Claude Sonnet 3.7",provider:"anthropic"},{id:"claude-3-5-sonnet-latest",name:"Claude Sonnet 3.5",provider:"anthropic"},{id:"claude-3-5-haiku-latest",name:"Claude Haiku 3.5",provider:"anthropic"},{id:"o3-mini",name:"O3 Mini",provider:"openai"},{id:"o3",name:"O3",provider:"openai"},{id:"o4-mini",name:"O4 Mini",provider:"openai"},{id:"gpt-4.1",name:"GPT-4.1",provider:"openai"},{id:"gpt-4.1-mini",name:"GPT-4.1 Mini",provider:"openai"},{id:"gpt-4.1-nano",name:"GPT-4.1 Nano",provider:"openai"},{id:"gpt-4o",name:"GPT-4o",provider:"openai"},{id:"gpt-4o-mini",name:"GPT-4o Mini",provider:"openai"},{id:"gpt-4-turbo",name:"GPT-4 Turbo",provider:"openai"},{id:"gpt-4",name:"GPT-4",provider:"openai"},{id:"gpt-3.5-turbo",name:"GPT-3.5 Turbo",provider:"openai"},{id:"o1",name:"O1",provider:"openai"}],aC="mcp-inspector-provider-tokens",vg={anthropic:"",openai:"",ollama:"local",ollamaBaseUrl:"http://localhost:11434"};function fN(){const[e,t]=w.useState(vg),[n,r]=w.useState(!1);w.useEffect(()=>{if(typeof window<"u"){try{const p=localStorage.getItem(aC);if(p){const x=JSON.parse(p);t(x)}}catch(p){console.warn("Failed to load provider tokens from localStorage:",p)}r(!0)}},[]),w.useEffect(()=>{if(n&&typeof window<"u")try{localStorage.setItem(aC,JSON.stringify(e))}catch(p){console.warn("Failed to save provider tokens to localStorage:",p)}},[e,n]);const s=w.useCallback((p,x)=>{t(v=>({...v,[p]:x}))},[]),o=w.useCallback(p=>{t(x=>({...x,[p]:""}))},[]),l=w.useCallback(()=>{t(vg)},[]),u=w.useCallback(p=>{var x;return!!((x=e[p])!=null&&x.trim())},[e]),d=w.useCallback(p=>e[p]||"",[e]),h=w.useCallback(()=>e.ollamaBaseUrl||vg.ollamaBaseUrl,[e.ollamaBaseUrl]),g=w.useCallback(p=>{t(x=>({...x,ollamaBaseUrl:p}))},[]);return{tokens:e,setToken:s,clearToken:o,clearAllTokens:l,hasToken:u,getToken:d,getOllamaBaseUrl:h,setOllamaBaseUrl:g}}class hN{constructor(t="http://localhost:11434"){Ja(this,"baseUrl");this.baseUrl=t}setBaseUrl(t){this.baseUrl=t}async isOllamaRunning(){try{return(await fetch(`${this.baseUrl}/api/version`,{method:"GET",signal:AbortSignal.timeout(3e3)})).ok}catch{return!1}}async getAvailableModels(){try{const t=await fetch(`${this.baseUrl}/api/tags`,{method:"GET",signal:AbortSignal.timeout(5e3)});return t.ok?(await t.json()).models.map(r=>r.name):[]}catch(t){return console.warn("Failed to fetch Ollama models:",t),[]}}async checkModelExists(t){return(await this.getAvailableModels()).some(r=>r===t||r.startsWith(`${t}:`))}async getFilteredAvailableModels(t){const n=await this.getAvailableModels();return t.filter(r=>n.some(s=>s===r||s.startsWith(`${r}:`)))}}const k9=new hN,C9=async e=>{const t=e?new hN(e):k9;return await t.isOllamaRunning()?{isRunning:!0,availableModels:await t.getAvailableModels()}:{isRunning:!1,availableModels:[]}};function T9(e={}){const{getToken:t,hasToken:n,tokens:r,getOllamaBaseUrl:s}=fN(),{initialMessages:o=[],serverConfigs:l,systemPrompt:u,onMessageSent:d,onMessageReceived:h,onError:g,onModelChange:p}=e,[x,v]=w.useState({messages:o,isLoading:!1,connectionStatus:"disconnected"}),[S,k]=w.useState(""),[E,T]=w.useState("idle"),[A,O]=w.useState(null),[R,M]=w.useState([]),[_,D]=w.useState(!1),[P,B]=w.useState(null),[z,H]=w.useState(!1),$=w.useRef(null),re=w.useRef(x.messages);console.log("model",A),w.useEffect(()=>{re.current=x.messages},[x.messages]),w.useEffect(()=>{const Q=async()=>{const{isRunning:Y,availableModels:oe}=await C9(s());D(Y);const ce=oe.map(me=>({id:me,name:me,provider:"ollama"}));M(ce)};Q();const X=setInterval(Q,3e4);return()=>clearInterval(X)},[s]),w.useEffect(()=>{if(!A||!I.some(Q=>Q.id===A.id))if(_&&R.length>0)O(R[0]);else if(n("anthropic")){const Q=xg.find(X=>X.id===zy.CLAUDE_3_5_SONNET_LATEST);Q&&O(Q)}else if(n("openai")){const Q=xg.find(X=>X.id===zy.GPT_4O);Q&&O(Q)}else O(null)},[r,R,_,n,A]);const te=w.useMemo(()=>A?A.provider==="ollama"?_&&R.some(Q=>Q.id===A.id||Q.id.startsWith(`${A.id}:`))?"local":"":t(A.provider):"",[A,t,_,R]),ie=w.useCallback(Q=>{O(Q),p&&p(Q)},[p]),I=w.useMemo(()=>{const Q=[];for(const X of xg)(X.provider==="anthropic"&&n("anthropic")||X.provider==="openai"&&n("openai"))&&Q.push(X);return _&&R.length>0&&Q.push(...R),Q},[_,R,n]),F=w.useCallback((Q,X,Y,oe,ce)=>{if((Q.type==="text"||!Q.type&&Q.content)&&Q.content){Y.current+=Q.content,v(me=>({...me,messages:me.messages.map(be=>be.id===X.id?{...be,content:Y.current}:be)}));return}if((Q.type==="tool_call"||!Q.type&&Q.toolCall)&&Q.toolCall){const me=Q.toolCall;oe.current=[...oe.current,me],v(be=>({...be,messages:be.messages.map(Te=>Te.id===X.id?{...Te,toolCalls:[...oe.current]}:Te)}));return}if((Q.type==="tool_result"||!Q.type&&Q.toolResult)&&Q.toolResult){const me=Q.toolResult;ce.current=[...ce.current,me],oe.current=oe.current.map(be=>be.id===me.toolCallId?{...be,status:me.error?"error":"completed"}:be),v(be=>({...be,messages:be.messages.map(Te=>Te.id===X.id?{...Te,toolCalls:[...oe.current],toolResults:[...ce.current]}:Te)}));return}if(Q.type==="elicitation_request"){B({requestId:Q.requestId,message:Q.message,schema:Q.schema,timestamp:Q.timestamp});return}if(Q.type==="elicitation_complete"){B(null);return}if((Q.type==="error"||!Q.type&&Q.error)&&Q.error)throw new Error(Q.error)},[]),V=w.useCallback(async Q=>{var Y,oe;if(!l||!A||!te)throw new Error("Missing required configuration: serverConfig, model, and apiKey are required");const X=iC("assistant","");v(ce=>({...ce,messages:[...ce.messages,X]}));try{const ce=await fetch("/api/mcp/chat",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({serverConfigs:l,model:A,apiKey:te,systemPrompt:u,messages:re.current.concat(Q),ollamaBaseUrl:s()}),signal:(Y=$.current)==null?void 0:Y.signal});if(!ce.ok){const st=await ce.text();let yt;try{yt=JSON.parse(st)}catch{throw new Error(`Chat request failed: ${ce.status}`)}throw new Error(yt.error||"Chat request failed")}const me=(oe=ce.body)==null?void 0:oe.getReader(),be=new TextDecoder,Te={current:""},Ve={current:[]},lt={current:[]};let Mt="",Lt=!1;if(me)for(;!Lt;){const{done:st,value:yt}=await me.read();if(st)break;Mt+=be.decode(yt,{stream:!0});const kt=Mt.split(`
318
+ `);Mt=kt.pop()||"";for(const lr of kt)if(lr.startsWith("data: ")){const Jt=lr.slice(6).trim();if(Jt==="[DONE]"){Lt=!0,v(Ct=>({...Ct,isLoading:!1}));break}if(Jt)try{const Ct=JSON.parse(Jt);F(Ct,X,Te,Ve,lt)}catch(Ct){console.warn("Failed to parse SSE data:",Jt,Ct)}}}if(!Te.current&&!Ve.current.length&&console.warn("No content received from stream"),h){const st={...X,content:Te.current};h(st)}}catch(ce){throw v(me=>({...me,isLoading:!1})),ce}},[l,A,te,u,h,F,s]),Z=w.useCallback(async(Q,X)=>{if(!Q.trim()||x.isLoading)return;const Y=iC("user",Q,X);v(oe=>({...oe,messages:[...oe.messages,Y],isLoading:!0,error:void 0})),d&&d(Y),$.current=new AbortController;try{await V(Y),T("idle")}catch(oe){const ce=oe instanceof Error?oe.message:"An error occurred";v(me=>({...me,isLoading:!1,error:ce})),T("error"),g&&g(ce)}},[x.isLoading,d,V,g]),C=w.useCallback(()=>{$.current&&$.current.abort(),v(Q=>({...Q,isLoading:!1})),T("idle")},[]),G=w.useCallback(async Q=>{const X=re.current,Y=X.findIndex(ce=>ce.id===Q);if(Y===-1||Y===0)return;const oe=X[Y-1];if(oe.role==="user"){v(ce=>({...ce,messages:ce.messages.slice(0,Y),isLoading:!0})),$.current=new AbortController;try{await V(oe),T("idle")}catch(ce){const me=ce instanceof Error?ce.message:"An error occurred";v(be=>({...be,isLoading:!1,error:me})),T("error"),g&&g(me)}}},[V,g]),le=w.useCallback(Q=>{v(X=>({...X,messages:X.messages.filter(Y=>Y.id!==Q)}))},[]),N=w.useCallback(()=>{v(Q=>({...Q,messages:[],error:void 0})),k("")},[]),K=w.useCallback(async(Q,X)=>{if(!P){console.warn("Cannot handle elicitation response: no active request");return}H(!0);try{let Y=null;Q==="accept"?Y={action:"accept",content:X||{}}:Y={action:Q};const oe=await fetch("/api/mcp/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"elicitation_response",requestId:P.requestId,response:Y})});if(!oe.ok){const ce=`HTTP error! status: ${oe.status}`;throw new Error(ce)}B(null)}catch(Y){const oe=Y instanceof Error?Y.message:"Unknown error";console.error("Error responding to elicitation request:",oe),g&&g("Error responding to elicitation request")}finally{H(!1)}},[P,g]);return w.useEffect(()=>()=>{$.current&&$.current.abort()},[]),{messages:x.messages,isLoading:x.isLoading,error:x.error,connectionStatus:x.connectionStatus,status:E,input:S,setInput:k,model:A,availableModels:I,hasValidApiKey:!!te,elicitationRequest:P,elicitationLoading:z,sendMessage:Z,stopGeneration:C,regenerateMessage:G,deleteMessage:le,clearChat:N,setModel:ie,handleElicitationResponse:K}}const Dv=w.createContext({});function Pv(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const zv=typeof window<"u",mN=zv?w.useLayoutEffect:w.useEffect,Ch=w.createContext(null);function Lv(e,t){e.indexOf(t)===-1&&e.push(t)}function Iv(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Pi=(e,t,n)=>n>t?t:n<e?e:n;let Bv=()=>{};const zi={},pN=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function gN(e){return typeof e=="object"&&e!==null}const yN=e=>/^0[^.\s]+$/u.test(e);function Vv(e){let t;return()=>(t===void 0&&(t=e()),t)}const Cr=e=>e,E9=(e,t)=>n=>t(e(n)),uu=(...e)=>e.reduce(E9),Fc=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Uv{constructor(){this.subscriptions=[]}add(t){return Lv(this.subscriptions,t),()=>Iv(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const l=this.subscriptions[o];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ti=e=>e*1e3,ni=e=>e/1e3;function xN(e,t){return t?e*(1e3/t):0}const vN=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,_9=1e-7,j9=12;function N9(e,t,n,r,s){let o,l,u=0;do l=t+(n-t)/2,o=vN(l,r,s)-e,o>0?n=l:t=l;while(Math.abs(o)>_9&&++u<j9);return l}function du(e,t,n,r){if(e===t&&n===r)return Cr;const s=o=>N9(o,0,1,e,n);return o=>o===0||o===1?o:vN(s(o),t,r)}const bN=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,wN=e=>t=>1-e(1-t),SN=du(.33,1.53,.69,.99),Hv=wN(SN),kN=bN(Hv),CN=e=>(e*=2)<1?.5*Hv(e):.5*(2-Math.pow(2,-10*(e-1))),Fv=e=>1-Math.sin(Math.acos(e)),TN=wN(Fv),EN=bN(Fv),A9=du(.42,0,1,1),R9=du(0,0,.58,1),_N=du(.42,0,.58,1),M9=e=>Array.isArray(e)&&typeof e[0]!="number",jN=e=>Array.isArray(e)&&typeof e[0]=="number",O9={linear:Cr,easeIn:A9,easeInOut:_N,easeOut:R9,circIn:Fv,circInOut:EN,circOut:TN,backIn:Hv,backInOut:kN,backOut:SN,anticipate:CN},D9=e=>typeof e=="string",sC=e=>{if(jN(e)){Bv(e.length===4);const[t,n,r,s]=e;return du(t,n,r,s)}else if(D9(e))return O9[e];return e},Fd=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function P9(e,t){let n=new Set,r=new Set,s=!1,o=!1;const l=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function d(g){l.has(g)&&(h.schedule(g),e()),g(u)}const h={schedule:(g,p=!1,x=!1)=>{const S=x&&s?n:r;return p&&l.add(g),S.has(g)||S.add(g),g},cancel:g=>{r.delete(g),l.delete(g)},process:g=>{if(u=g,s){o=!0;return}s=!0,[n,r]=[r,n],n.forEach(d),n.clear(),s=!1,o&&(o=!1,h.process(g))}};return h}const z9=40;function NN(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,l=Fd.reduce((O,R)=>(O[R]=P9(o),O),{}),{setup:u,read:d,resolveKeyframes:h,preUpdate:g,update:p,preRender:x,render:v,postRender:S}=l,k=()=>{const O=zi.useManualTiming?s.timestamp:performance.now();n=!1,zi.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(O-s.timestamp,z9),1)),s.timestamp=O,s.isProcessing=!0,u.process(s),d.process(s),h.process(s),g.process(s),p.process(s),x.process(s),v.process(s),S.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(k))},E=()=>{n=!0,r=!0,s.isProcessing||e(k)};return{schedule:Fd.reduce((O,R)=>{const M=l[R];return O[R]=(_,D=!1,P=!1)=>(n||E(),M.schedule(_,D,P)),O},{}),cancel:O=>{for(let R=0;R<Fd.length;R++)l[Fd[R]].cancel(O)},state:s,steps:l}}const{schedule:Nt,cancel:Ea,state:gn,steps:bg}=NN(typeof requestAnimationFrame<"u"?requestAnimationFrame:Cr,!0);let sf;function L9(){sf=void 0}const Fn={now:()=>(sf===void 0&&Fn.set(gn.isProcessing||zi.useManualTiming?gn.timestamp:performance.now()),sf),set:e=>{sf=e,queueMicrotask(L9)}},AN=e=>t=>typeof t=="string"&&t.startsWith(e),$v=AN("--"),I9=AN("var(--"),qv=e=>I9(e)?B9.test(e.split("/*")[0].trim()):!1,B9=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ol={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},$c={...ol,transform:e=>Pi(0,1,e)},$d={...ol,default:1},_c=e=>Math.round(e*1e5)/1e5,Gv=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function V9(e){return e==null}const U9=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Yv=(e,t)=>n=>!!(typeof n=="string"&&U9.test(n)&&n.startsWith(e)||t&&!V9(n)&&Object.prototype.hasOwnProperty.call(n,t)),RN=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,l,u]=r.match(Gv);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},H9=e=>Pi(0,255,e),wg={...ol,transform:e=>Math.round(H9(e))},os={test:Yv("rgb","red"),parse:RN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+wg.transform(e)+", "+wg.transform(t)+", "+wg.transform(n)+", "+_c($c.transform(r))+")"};function F9(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const Ly={test:Yv("#"),parse:F9,transform:os.transform},fu=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ma=fu("deg"),ri=fu("%"),Be=fu("px"),$9=fu("vh"),q9=fu("vw"),oC={...ri,parse:e=>ri.parse(e)/100,transform:e=>ri.transform(e*100)},jo={test:Yv("hsl","hue"),parse:RN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ri.transform(_c(t))+", "+ri.transform(_c(n))+", "+_c($c.transform(r))+")"},Wt={test:e=>os.test(e)||Ly.test(e)||jo.test(e),parse:e=>os.test(e)?os.parse(e):jo.test(e)?jo.parse(e):Ly.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?os.transform(e):jo.transform(e),getAnimatableNone:e=>{const t=Wt.parse(e);return t.alpha=0,Wt.transform(t)}},G9=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Y9(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Gv))==null?void 0:t.length)||0)+(((n=e.match(G9))==null?void 0:n.length)||0)>0}const MN="number",ON="color",Z9="var",X9="var(",lC="${}",K9=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function qc(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const u=t.replace(K9,d=>(Wt.test(d)?(r.color.push(o),s.push(ON),n.push(Wt.parse(d))):d.startsWith(X9)?(r.var.push(o),s.push(Z9),n.push(d)):(r.number.push(o),s.push(MN),n.push(parseFloat(d))),++o,lC)).split(lC);return{values:n,split:u,indexes:r,types:s}}function DN(e){return qc(e).values}function PN(e){const{split:t,types:n}=qc(e),r=t.length;return s=>{let o="";for(let l=0;l<r;l++)if(o+=t[l],s[l]!==void 0){const u=n[l];u===MN?o+=_c(s[l]):u===ON?o+=Wt.transform(s[l]):o+=s[l]}return o}}const W9=e=>typeof e=="number"?0:Wt.test(e)?Wt.getAnimatableNone(e):e;function Q9(e){const t=DN(e);return PN(e)(t.map(W9))}const _a={test:Y9,parse:DN,createTransformer:PN,getAnimatableNone:Q9};function Sg(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function J9({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,l=0;if(!t)s=o=l=n;else{const u=n<.5?n*(1+t):n+t-n*t,d=2*n-u;s=Sg(d,u,e+1/3),o=Sg(d,u,e),l=Sg(d,u,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(l*255),alpha:r}}function Tf(e,t){return n=>n>0?t:e}const Rt=(e,t,n)=>e+(t-e)*n,kg=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},eB=[Ly,os,jo],tB=e=>eB.find(t=>t.test(e));function cC(e){const t=tB(e);if(!t)return!1;let n=t.parse(e);return t===jo&&(n=J9(n)),n}const uC=(e,t)=>{const n=cC(e),r=cC(t);if(!n||!r)return Tf(e,t);const s={...n};return o=>(s.red=kg(n.red,r.red,o),s.green=kg(n.green,r.green,o),s.blue=kg(n.blue,r.blue,o),s.alpha=Rt(n.alpha,r.alpha,o),os.transform(s))},Iy=new Set(["none","hidden"]);function nB(e,t){return Iy.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function rB(e,t){return n=>Rt(e,t,n)}function Zv(e){return typeof e=="number"?rB:typeof e=="string"?qv(e)?Tf:Wt.test(e)?uC:sB:Array.isArray(e)?zN:typeof e=="object"?Wt.test(e)?uC:iB:Tf}function zN(e,t){const n=[...e],r=n.length,s=e.map((o,l)=>Zv(o)(o,t[l]));return o=>{for(let l=0;l<r;l++)n[l]=s[l](o);return n}}function iB(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Zv(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function aB(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],l=e.indexes[o][r[o]],u=e.values[l]??0;n[s]=u,r[o]++}return n}const sB=(e,t)=>{const n=_a.createTransformer(t),r=qc(e),s=qc(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Iy.has(e)&&!s.values.length||Iy.has(t)&&!r.values.length?nB(e,t):uu(zN(aB(r,s),s.values),n):Tf(e,t)};function LN(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Rt(e,t,n):Zv(e)(e,t)}const oB=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Nt.update(t,n),stop:()=>Ea(t),now:()=>gn.isProcessing?gn.timestamp:Fn.now()}},IN=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Ef=2e4;function Xv(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ef;)t+=n,r=e.next(t);return t>=Ef?1/0:t}function lB(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(Xv(r),Ef);return{type:"keyframes",ease:o=>r.next(s*o).value/t,duration:ni(s)}}const cB=5;function BN(e,t,n){const r=Math.max(t-cB,0);return xN(n-e(r),t-r)}const Pt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Cg=.001;function uB({duration:e=Pt.duration,bounce:t=Pt.bounce,velocity:n=Pt.velocity,mass:r=Pt.mass}){let s,o,l=1-t;l=Pi(Pt.minDamping,Pt.maxDamping,l),e=Pi(Pt.minDuration,Pt.maxDuration,ni(e)),l<1?(s=h=>{const g=h*l,p=g*e,x=g-n,v=By(h,l),S=Math.exp(-p);return Cg-x/v*S},o=h=>{const p=h*l*e,x=p*n+n,v=Math.pow(l,2)*Math.pow(h,2)*e,S=Math.exp(-p),k=By(Math.pow(h,2),l);return(-s(h)+Cg>0?-1:1)*((x-v)*S)/k}):(s=h=>{const g=Math.exp(-h*e),p=(h-n)*e+1;return-Cg+g*p},o=h=>{const g=Math.exp(-h*e),p=(n-h)*(e*e);return g*p});const u=5/e,d=fB(s,o,u);if(e=ti(e),isNaN(d))return{stiffness:Pt.stiffness,damping:Pt.damping,duration:e};{const h=Math.pow(d,2)*r;return{stiffness:h,damping:l*2*Math.sqrt(r*h),duration:e}}}const dB=12;function fB(e,t,n){let r=n;for(let s=1;s<dB;s++)r=r-e(r)/t(r);return r}function By(e,t){return e*Math.sqrt(1-t*t)}const hB=["duration","bounce"],mB=["stiffness","damping","mass"];function dC(e,t){return t.some(n=>e[n]!==void 0)}function pB(e){let t={velocity:Pt.velocity,stiffness:Pt.stiffness,damping:Pt.damping,mass:Pt.mass,isResolvedFromDuration:!1,...e};if(!dC(e,mB)&&dC(e,hB))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*Pi(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:Pt.mass,stiffness:s,damping:o}}else{const n=uB(e);t={...t,...n,mass:Pt.mass},t.isResolvedFromDuration=!0}return t}function _f(e=Pt.visualDuration,t=Pt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],u={done:!1,value:o},{stiffness:d,damping:h,mass:g,duration:p,velocity:x,isResolvedFromDuration:v}=pB({...n,velocity:-ni(n.velocity||0)}),S=x||0,k=h/(2*Math.sqrt(d*g)),E=l-o,T=ni(Math.sqrt(d/g)),A=Math.abs(E)<5;r||(r=A?Pt.restSpeed.granular:Pt.restSpeed.default),s||(s=A?Pt.restDelta.granular:Pt.restDelta.default);let O;if(k<1){const M=By(T,k);O=_=>{const D=Math.exp(-k*T*_);return l-D*((S+k*T*E)/M*Math.sin(M*_)+E*Math.cos(M*_))}}else if(k===1)O=M=>l-Math.exp(-T*M)*(E+(S+T*E)*M);else{const M=T*Math.sqrt(k*k-1);O=_=>{const D=Math.exp(-k*T*_),P=Math.min(M*_,300);return l-D*((S+k*T*E)*Math.sinh(P)+M*E*Math.cosh(P))/M}}const R={calculatedDuration:v&&p||null,next:M=>{const _=O(M);if(v)u.done=M>=p;else{let D=M===0?S:0;k<1&&(D=M===0?ti(S):BN(O,M,_));const P=Math.abs(D)<=r,B=Math.abs(l-_)<=s;u.done=P&&B}return u.value=u.done?l:_,u},toString:()=>{const M=Math.min(Xv(R),Ef),_=IN(D=>R.next(M*D).value,M,30);return M+"ms "+_},toTransition:()=>{}};return R}_f.applyToOptions=e=>{const t=lB(e,100,_f);return e.ease=t.ease,e.duration=ti(t.duration),e.type="keyframes",e};function Vy({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:l,min:u,max:d,restDelta:h=.5,restSpeed:g}){const p=e[0],x={done:!1,value:p},v=P=>u!==void 0&&P<u||d!==void 0&&P>d,S=P=>u===void 0?d:d===void 0||Math.abs(u-P)<Math.abs(d-P)?u:d;let k=n*t;const E=p+k,T=l===void 0?E:l(E);T!==E&&(k=T-p);const A=P=>-k*Math.exp(-P/r),O=P=>T+A(P),R=P=>{const B=A(P),z=O(P);x.done=Math.abs(B)<=h,x.value=x.done?T:z};let M,_;const D=P=>{v(x.value)&&(M=P,_=_f({keyframes:[x.value,S(x.value)],velocity:BN(O,P,x.value),damping:s,stiffness:o,restDelta:h,restSpeed:g}))};return D(0),{calculatedDuration:null,next:P=>{let B=!1;return!_&&M===void 0&&(B=!0,R(P),D(P)),M!==void 0&&P>=M?_.next(P-M):(!B&&R(P),x)}}}function gB(e,t,n){const r=[],s=n||zi.mix||LN,o=e.length-1;for(let l=0;l<o;l++){let u=s(e[l],e[l+1]);if(t){const d=Array.isArray(t)?t[l]||Cr:t;u=uu(d,u)}r.push(u)}return r}function yB(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(Bv(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=gB(t,r,s),d=u.length,h=g=>{if(l&&g<e[0])return t[0];let p=0;if(d>1)for(;p<e.length-2&&!(g<e[p+1]);p++);const x=Fc(e[p],e[p+1],g);return u[p](x)};return n?g=>h(Pi(e[0],e[o-1],g)):h}function xB(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Fc(0,t,r);e.push(Rt(n,1,s))}}function vB(e){const t=[0];return xB(t,e.length-1),t}function bB(e,t){return e.map(n=>n*t)}function wB(e,t){return e.map(()=>t||_N).splice(0,e.length-1)}function jc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=M9(r)?r.map(sC):sC(r),o={done:!1,value:t[0]},l=bB(n&&n.length===t.length?n:vB(t),e),u=yB(l,t,{ease:Array.isArray(s)?s:wB(t,s)});return{calculatedDuration:e,next:d=>(o.value=u(d),o.done=d>=e,o)}}const SB=e=>e!==null;function Kv(e,{repeat:t,repeatType:n="loop"},r,s=1){const o=e.filter(SB),u=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!u||r===void 0?o[u]:r}const kB={decay:Vy,inertia:Vy,tween:jc,keyframes:jc,spring:_f};function VN(e){typeof e.type=="string"&&(e.type=kB[e.type])}class Wv{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const CB=e=>e/100;class Qv extends Wv{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==Fn.now()&&this.tick(Fn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;VN(t);const{type:n=jc,repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:l=0}=t;let{keyframes:u}=t;const d=n||jc;d!==jc&&typeof u[0]!="number"&&(this.mixKeyframes=uu(CB,LN(u[0],u[1])),u=[0,100]);const h=d({...t,keyframes:u});o==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...u].reverse(),velocity:-l})),h.calculatedDuration===null&&(h.calculatedDuration=Xv(h));const{calculatedDuration:g}=h;this.calculatedDuration=g,this.resolvedDuration=g+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=h}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:o,mirroredGenerator:l,resolvedDuration:u,calculatedDuration:d}=this;if(this.startTime===null)return r.next(0);const{delay:h=0,keyframes:g,repeat:p,repeatType:x,repeatDelay:v,type:S,onUpdate:k,finalKeyframe:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const T=this.currentTime-h*(this.playbackSpeed>=0?1:-1),A=this.playbackSpeed>=0?T<0:T>s;this.currentTime=Math.max(T,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let O=this.currentTime,R=r;if(p){const P=Math.min(this.currentTime,s)/u;let B=Math.floor(P),z=P%1;!z&&P>=1&&(z=1),z===1&&B--,B=Math.min(B,p+1),!!(B%2)&&(x==="reverse"?(z=1-z,v&&(z-=v/u)):x==="mirror"&&(R=l)),O=Pi(0,1,z)*u}const M=A?{done:!1,value:g[0]}:R.next(O);o&&(M.value=o(M.value));let{done:_}=M;!A&&d!==null&&(_=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return D&&S!==Vy&&(M.value=Kv(g,this.options,E,this.speed)),k&&k(M.value),D&&this.finish(),M}then(t,n){return this.finished.then(t,n)}get duration(){return ni(this.calculatedDuration)}get time(){return ni(this.currentTime)}set time(t){var n;t=ti(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Fn.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ni(this.currentTime))}play(){var s,o;if(this.isStopped)return;const{driver:t=oB,startTime:n}=this.options;this.driver||(this.driver=t(l=>this.tick(l))),(o=(s=this.options).onPlay)==null||o.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Fn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function TB(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ls=e=>e*180/Math.PI,Uy=e=>{const t=ls(Math.atan2(e[1],e[0]));return Hy(t)},EB={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Uy,rotateZ:Uy,skewX:e=>ls(Math.atan(e[1])),skewY:e=>ls(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Hy=e=>(e=e%360,e<0&&(e+=360),e),fC=Uy,hC=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),mC=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),_B={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:hC,scaleY:mC,scale:e=>(hC(e)+mC(e))/2,rotateX:e=>Hy(ls(Math.atan2(e[6],e[5]))),rotateY:e=>Hy(ls(Math.atan2(-e[2],e[0]))),rotateZ:fC,rotate:fC,skewX:e=>ls(Math.atan(e[4])),skewY:e=>ls(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Fy(e){return e.includes("scale")?1:0}function $y(e,t){if(!e||e==="none")return Fy(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=_B,s=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=EB,s=u}if(!s)return Fy(t);const o=r[t],l=s[1].split(",").map(NB);return typeof o=="function"?o(l):l[o]}const jB=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return $y(n,t)};function NB(e){return parseFloat(e.trim())}const ll=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],cl=new Set(ll),pC=e=>e===ol||e===Be,AB=new Set(["x","y","z"]),RB=ll.filter(e=>!AB.has(e));function MB(e){const t=[];return RB.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const hs={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>$y(t,"x"),y:(e,{transform:t})=>$y(t,"y")};hs.translateX=hs.x;hs.translateY=hs.y;const ms=new Set;let qy=!1,Gy=!1,Yy=!1;function UN(){if(Gy){const e=Array.from(ms).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=MB(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,l])=>{var u;(u=r.getValue(o))==null||u.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Gy=!1,qy=!1,ms.forEach(e=>e.complete(Yy)),ms.clear()}function HN(){ms.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Gy=!0)})}function OB(){Yy=!0,HN(),UN(),Yy=!1}class Jv{constructor(t,n,r,s,o,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(ms.add(this),qy||(qy=!0,Nt.read(HN),Nt.resolveKeyframes(UN))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const o=s==null?void 0:s.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const u=r.readValue(n,l);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=l),s&&o===void 0&&s.set(t[0])}TB(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ms.delete(this)}cancel(){this.state==="scheduled"&&(ms.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const DB=e=>e.startsWith("--");function PB(e,t,n){DB(t)?e.style.setProperty(t,n):e.style[t]=n}const zB=Vv(()=>window.ScrollTimeline!==void 0),LB={};function IB(e,t){const n=Vv(e);return()=>LB[t]??n()}const FN=IB(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Cc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,gC={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Cc([0,.65,.55,1]),circOut:Cc([.55,0,1,.45]),backIn:Cc([.31,.01,.66,-.59]),backOut:Cc([.33,1.53,.69,.99])};function $N(e,t){if(e)return typeof e=="function"?FN()?IN(e,t):"ease-out":jN(e)?Cc(e):Array.isArray(e)?e.map(n=>$N(n,t)||gC.easeOut):gC[e]}function BB(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:l="loop",ease:u="easeOut",times:d}={},h=void 0){const g={[t]:n};d&&(g.offset=d);const p=$N(u,s);Array.isArray(p)&&(g.easing=p);const x={delay:r,duration:s,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:o+1,direction:l==="reverse"?"alternate":"normal"};return h&&(x.pseudoElement=h),e.animate(g,x)}function qN(e){return typeof e=="function"&&"applyToOptions"in e}function VB({type:e,...t}){return qN(e)&&FN()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class UB extends Wv{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:o,allowFlatten:l=!1,finalKeyframe:u,onComplete:d}=t;this.isPseudoElement=!!o,this.allowFlatten=l,this.options=t,Bv(typeof t.type!="string");const h=VB(t);this.animation=BB(n,r,s,h,o),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const g=Kv(s,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(g):PB(n,r,g),this.animation.cancel()}d==null||d(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return ni(Number(t))}get time(){return ni(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=ti(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&zB()?(this.animation.timeline=t,Cr):n(this)}}const GN={anticipate:CN,backInOut:kN,circInOut:EN};function HB(e){return e in GN}function FB(e){typeof e.ease=="string"&&HB(e.ease)&&(e.ease=GN[e.ease])}const yC=10;class $B extends UB{constructor(t){FB(t),VN(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:o,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new Qv({...l,autoplay:!1}),d=ti(this.finishedTime??this.time);n.setWithVelocity(u.sample(d-yC).value,u.sample(d).value,yC),u.stop()}}const xC=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(_a.test(e)||e==="0")&&!e.startsWith("url("));function qB(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function GB(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],l=xC(s,t),u=xC(o,t);return!l||!u?!1:qB(e)||(n==="spring"||qN(n))&&r}const YB=new Set(["opacity","clipPath","filter","transform"]),ZB=Vv(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function XB(e){var g;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:o,type:l}=e;if(!(((g=t==null?void 0:t.owner)==null?void 0:g.current)instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:h}=t.owner.getProps();return ZB()&&n&&YB.has(n)&&(n!=="transform"||!h)&&!d&&!r&&s!=="mirror"&&o!==0&&l!=="inertia"}const KB=40;class WB extends Wv{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:l="loop",keyframes:u,name:d,motionValue:h,element:g,...p}){var S;super(),this.stop=()=>{var k,E;this._animation&&(this._animation.stop(),(k=this.stopTimeline)==null||k.call(this)),(E=this.keyframeResolver)==null||E.cancel()},this.createdAt=Fn.now();const x={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:l,name:d,motionValue:h,element:g,...p},v=(g==null?void 0:g.KeyframeResolver)||Jv;this.keyframeResolver=new v(u,(k,E,T)=>this.onKeyframesResolved(k,E,x,!T),d,h,g),(S=this.keyframeResolver)==null||S.scheduleResolve()}onKeyframesResolved(t,n,r,s){this.keyframeResolver=void 0;const{name:o,type:l,velocity:u,delay:d,isHandoff:h,onUpdate:g}=r;this.resolvedAt=Fn.now(),GB(t,o,l,u)||((zi.instantAnimations||!d)&&(g==null||g(Kv(t,r,n))),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const x={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>KB?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},v=!h&&XB(x)?new $B({...x,element:x.motionValue.owner.current}):new Qv(x);v.finished.then(()=>this.notifyFinished()).catch(Cr),this.pendingTimeline&&(this.stopTimeline=v.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=v}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),OB()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const QB=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function JB(e){const t=QB.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function YN(e,t,n=1){const[r,s]=JB(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const l=o.trim();return pN(l)?parseFloat(l):l}return qv(s)?YN(s,t,n+1):s}function e0(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const ZN=new Set(["width","height","top","left","right","bottom",...ll]),e8={test:e=>e==="auto",parse:e=>e},XN=e=>t=>t.test(e),KN=[ol,Be,ri,ma,q9,$9,e8],vC=e=>KN.find(XN(e));function t8(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||yN(e):!0}const n8=new Set(["brightness","contrast","saturate","opacity"]);function r8(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Gv)||[];if(!r)return e;const s=n.replace(r,"");let o=n8.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const i8=/\b([a-z-]*)\(.*?\)/gu,Zy={..._a,getAnimatableNone:e=>{const t=e.match(i8);return t?t.map(r8).join(" "):e}},bC={...ol,transform:Math.round},a8={rotate:ma,rotateX:ma,rotateY:ma,rotateZ:ma,scale:$d,scaleX:$d,scaleY:$d,scaleZ:$d,skew:ma,skewX:ma,skewY:ma,distance:Be,translateX:Be,translateY:Be,translateZ:Be,x:Be,y:Be,z:Be,perspective:Be,transformPerspective:Be,opacity:$c,originX:oC,originY:oC,originZ:Be},t0={borderWidth:Be,borderTopWidth:Be,borderRightWidth:Be,borderBottomWidth:Be,borderLeftWidth:Be,borderRadius:Be,radius:Be,borderTopLeftRadius:Be,borderTopRightRadius:Be,borderBottomRightRadius:Be,borderBottomLeftRadius:Be,width:Be,maxWidth:Be,height:Be,maxHeight:Be,top:Be,right:Be,bottom:Be,left:Be,padding:Be,paddingTop:Be,paddingRight:Be,paddingBottom:Be,paddingLeft:Be,margin:Be,marginTop:Be,marginRight:Be,marginBottom:Be,marginLeft:Be,backgroundPositionX:Be,backgroundPositionY:Be,...a8,zIndex:bC,fillOpacity:$c,strokeOpacity:$c,numOctaves:bC},s8={...t0,color:Wt,backgroundColor:Wt,outlineColor:Wt,fill:Wt,stroke:Wt,borderColor:Wt,borderTopColor:Wt,borderRightColor:Wt,borderBottomColor:Wt,borderLeftColor:Wt,filter:Zy,WebkitFilter:Zy},WN=e=>s8[e];function QN(e,t){let n=WN(e);return n!==Zy&&(n=_a),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const o8=new Set(["auto","none","0"]);function l8(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!o8.has(o)&&qc(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=QN(n,s)}class c8 extends Jv{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),qv(h))){const g=YN(h,n.current);g!==void 0&&(t[d]=g),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!ZN.has(r)||t.length!==2)return;const[s,o]=t,l=vC(s),u=vC(o);if(l!==u)if(pC(l)&&pC(u))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else hs[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||t8(t[s]))&&r.push(s);r.length&&l8(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=hs[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var u;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=r.length-1,l=r[o];r[o]=hs[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([d,h])=>{t.getValue(d).set(h)}),this.resolveNoneKeyframes()}}function u8(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(n==null?void 0:n[e])??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const JN=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function eA(e){return gN(e)&&"offsetHeight"in e}const wC=30,d8=e=>!isNaN(parseFloat(e));class f8{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{var l,u;const o=Fn.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((l=this.events.change)==null||l.notify(this.current),this.dependents))for(const d of this.dependents)d.dirty();s&&((u=this.events.renderRequest)==null||u.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Fn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=d8(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Uv);const r=this.events[t].add(n);return t==="change"?()=>{r(),Nt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Fn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>wC)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,wC);return xN(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Go(e,t){return new f8(e,t)}const{schedule:n0}=NN(queueMicrotask,!1),Dr={x:!1,y:!1};function tA(){return Dr.x||Dr.y}function h8(e){return e==="x"||e==="y"?Dr[e]?null:(Dr[e]=!0,()=>{Dr[e]=!1}):Dr.x||Dr.y?null:(Dr.x=Dr.y=!0,()=>{Dr.x=Dr.y=!1})}function nA(e,t){const n=u8(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function SC(e){return!(e.pointerType==="touch"||tA())}function m8(e,t,n={}){const[r,s,o]=nA(e,n),l=u=>{if(!SC(u))return;const{target:d}=u,h=t(d,u);if(typeof h!="function"||!d)return;const g=p=>{SC(p)&&(h(p),d.removeEventListener("pointerleave",g))};d.addEventListener("pointerleave",g,s)};return r.forEach(u=>{u.addEventListener("pointerenter",l,s)}),o}const rA=(e,t)=>t?e===t?!0:rA(e,t.parentElement):!1,r0=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,p8=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function g8(e){return p8.has(e.tagName)||e.tabIndex!==-1}const of=new WeakSet;function kC(e){return t=>{t.key==="Enter"&&e(t)}}function Tg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const y8=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=kC(()=>{if(of.has(n))return;Tg(n,"down");const s=kC(()=>{Tg(n,"up")}),o=()=>Tg(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function CC(e){return r0(e)&&!tA()}function x8(e,t,n={}){const[r,s,o]=nA(e,n),l=u=>{const d=u.currentTarget;if(!CC(u))return;of.add(d);const h=t(d,u),g=(v,S)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",x),of.has(d)&&of.delete(d),CC(v)&&typeof h=="function"&&h(v,{success:S})},p=v=>{g(v,d===window||d===document||n.useGlobalTarget||rA(d,v.target))},x=v=>{g(v,!1)};window.addEventListener("pointerup",p,s),window.addEventListener("pointercancel",x,s)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",l,s),eA(u)&&(u.addEventListener("focus",h=>y8(h,s)),!g8(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),o}function iA(e){return gN(e)&&"ownerSVGElement"in e}function v8(e){return iA(e)&&e.tagName==="svg"}const En=e=>!!(e&&e.getVelocity),b8=[...KN,Wt,_a],w8=e=>b8.find(XN(e)),i0=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class S8 extends w.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,s=eA(r)&&r.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function k8({children:e,isPresent:t,anchorX:n,root:r}){const s=w.useId(),o=w.useRef(null),l=w.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:u}=w.useContext(i0);return w.useInsertionEffect(()=>{const{width:d,height:h,top:g,left:p,right:x}=l.current;if(t||!o.current||!d||!h)return;const v=n==="left"?`left: ${p}`:`right: ${x}`;o.current.dataset.motionPopId=s;const S=document.createElement("style");u&&(S.nonce=u);const k=r??document.head;return k.appendChild(S),S.sheet&&S.sheet.insertRule(`
319
+ [data-motion-pop-id="${s}"] {
320
+ position: absolute !important;
321
+ width: ${d}px !important;
322
+ height: ${h}px !important;
323
+ ${v}px !important;
324
+ top: ${g}px !important;
325
+ }
326
+ `),()=>{k.removeChild(S),k.contains(S)&&k.removeChild(S)}},[t]),m.jsx(S8,{isPresent:t,childRef:o,sizeRef:l,children:w.cloneElement(e,{ref:o})})}const C8=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:l,anchorX:u,root:d})=>{const h=Pv(T8),g=w.useId();let p=!0,x=w.useMemo(()=>(p=!1,{id:g,initial:t,isPresent:n,custom:s,onExitComplete:v=>{h.set(v,!0);for(const S of h.values())if(!S)return;r&&r()},register:v=>(h.set(v,!1),()=>h.delete(v))}),[n,h,r]);return o&&p&&(x={...x}),w.useMemo(()=>{h.forEach((v,S)=>h.set(S,!1))},[n]),w.useEffect(()=>{!n&&!h.size&&r&&r()},[n]),l==="popLayout"&&(e=m.jsx(k8,{isPresent:n,anchorX:u,root:d,children:e})),m.jsx(Ch.Provider,{value:x,children:e})};function T8(){return new Map}function aA(e=!0){const t=w.useContext(Ch);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=w.useId();w.useEffect(()=>{if(e)return s(o)},[e]);const l=w.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,l]:[!0]}const qd=e=>e.key||"";function TC(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const jf=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:l=!1,anchorX:u="left",root:d})=>{const[h,g]=aA(l),p=w.useMemo(()=>TC(e),[e]),x=l&&!h?[]:p.map(qd),v=w.useRef(!0),S=w.useRef(p),k=Pv(()=>new Map),[E,T]=w.useState(p),[A,O]=w.useState(p);mN(()=>{v.current=!1,S.current=p;for(let _=0;_<A.length;_++){const D=qd(A[_]);x.includes(D)?k.delete(D):k.get(D)!==!0&&k.set(D,!1)}},[A,x.length,x.join("-")]);const R=[];if(p!==E){let _=[...p];for(let D=0;D<A.length;D++){const P=A[D],B=qd(P);x.includes(B)||(_.splice(D,0,P),R.push(P))}return o==="wait"&&R.length&&(_=R),O(TC(_)),T(p),null}const{forceRender:M}=w.useContext(Dv);return m.jsx(m.Fragment,{children:A.map(_=>{const D=qd(_),P=l&&!h?!1:p===A||x.includes(D),B=()=>{if(k.has(D))k.set(D,!0);else return;let z=!0;k.forEach(H=>{H||(z=!1)}),z&&(M==null||M(),O(S.current),l&&(g==null||g()),r&&r())};return m.jsx(C8,{isPresent:P,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:d,onExitComplete:P?void 0:B,anchorX:u,children:_},D)})})},sA=w.createContext({strict:!1}),EC={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Yo={};for(const e in EC)Yo[e]={isEnabled:t=>EC[e].some(n=>!!t[n])};function E8(e){for(const t in e)Yo[t]={...Yo[t],...e[t]}}const _8=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Nf(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||_8.has(e)}let oA=e=>!Nf(e);function j8(e){typeof e=="function"&&(oA=t=>t.startsWith("on")?!Nf(t):e(t))}try{j8(require("@emotion/is-prop-valid").default)}catch{}function N8(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(oA(s)||n===!0&&Nf(s)||!t&&!Nf(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Th=w.createContext({});function Eh(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Gc(e){return typeof e=="string"||Array.isArray(e)}const a0=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],s0=["initial",...a0];function _h(e){return Eh(e.animate)||s0.some(t=>Gc(e[t]))}function lA(e){return!!(_h(e)||e.variants)}function A8(e,t){if(_h(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Gc(n)?n:void 0,animate:Gc(r)?r:void 0}}return e.inherit!==!1?t:{}}function R8(e){const{initial:t,animate:n}=A8(e,w.useContext(Th));return w.useMemo(()=>({initial:t,animate:n}),[_C(t),_C(n)])}function _C(e){return Array.isArray(e)?e.join(" "):e}const Yc={};function M8(e){for(const t in e)Yc[t]=e[t],$v(t)&&(Yc[t].isCSSVariable=!0)}function cA(e,{layout:t,layoutId:n}){return cl.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Yc[e]||e==="opacity")}const O8={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},D8=ll.length;function P8(e,t,n){let r="",s=!0;for(let o=0;o<D8;o++){const l=ll[o],u=e[l];if(u===void 0)continue;let d=!0;if(typeof u=="number"?d=u===(l.startsWith("scale")?1:0):d=parseFloat(u)===0,!d||n){const h=JN(u,t0[l]);if(!d){s=!1;const g=O8[l]||l;r+=`${g}(${h}) `}n&&(t[l]=h)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function o0(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let l=!1,u=!1;for(const d in t){const h=t[d];if(cl.has(d)){l=!0;continue}else if($v(d)){s[d]=h;continue}else{const g=JN(h,t0[d]);d.startsWith("origin")?(u=!0,o[d]=g):r[d]=g}}if(t.transform||(l||n?r.transform=P8(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:d="50%",originY:h="50%",originZ:g=0}=o;r.transformOrigin=`${d} ${h} ${g}`}}const l0=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function uA(e,t,n){for(const r in t)!En(t[r])&&!cA(r,n)&&(e[r]=t[r])}function z8({transformTemplate:e},t){return w.useMemo(()=>{const n=l0();return o0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function L8(e,t){const n=e.style||{},r={};return uA(r,n,e),Object.assign(r,z8(e,t)),r}function I8(e,t){const n={},r=L8(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const B8={offset:"stroke-dashoffset",array:"stroke-dasharray"},V8={offset:"strokeDashoffset",array:"strokeDasharray"};function U8(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?B8:V8;e[o.offset]=Be.transform(-r);const l=Be.transform(t),u=Be.transform(n);e[o.array]=`${l} ${u}`}function dA(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:o=1,pathOffset:l=0,...u},d,h,g){if(o0(e,u,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:x}=e;p.transform&&(x.transform=p.transform,delete p.transform),(x.transform||p.transformOrigin)&&(x.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),x.transform&&(x.transformBox=(g==null?void 0:g.transformBox)??"fill-box",delete p.transformBox),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),s!==void 0&&U8(p,s,o,l,!1)}const fA=()=>({...l0(),attrs:{}}),hA=e=>typeof e=="string"&&e.toLowerCase()==="svg";function H8(e,t,n,r){const s=w.useMemo(()=>{const o=fA();return dA(o,t,hA(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};uA(o,e.style,e),s.style={...o,...s.style}}return s}const F8=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function c0(e){return typeof e!="string"||e.includes("-")?!1:!!(F8.indexOf(e)>-1||/[A-Z]/u.test(e))}function $8(e,t,n,{latestValues:r},s,o=!1){const u=(c0(e)?H8:I8)(t,r,s,e),d=N8(t,typeof e=="string",o),h=e!==w.Fragment?{...d,...u,ref:n}:{},{children:g}=t,p=w.useMemo(()=>En(g)?g.get():g,[g]);return w.createElement(e,{...h,children:p})}function jC(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function u0(e,t,n,r){if(typeof t=="function"){const[s,o]=jC(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=jC(r);t=t(n!==void 0?n:e.custom,s,o)}return t}function lf(e){return En(e)?e.get():e}function q8({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:G8(n,r,s,e),renderState:t()}}function G8(e,t,n,r){const s={},o=r(e,{});for(const x in o)s[x]=lf(o[x]);let{initial:l,animate:u}=e;const d=_h(e),h=lA(e);t&&h&&!d&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let g=n?n.initial===!1:!1;g=g||l===!1;const p=g?u:l;if(p&&typeof p!="boolean"&&!Eh(p)){const x=Array.isArray(p)?p:[p];for(let v=0;v<x.length;v++){const S=u0(e,x[v]);if(S){const{transitionEnd:k,transition:E,...T}=S;for(const A in T){let O=T[A];if(Array.isArray(O)){const R=g?O.length-1:0;O=O[R]}O!==null&&(s[A]=O)}for(const A in k)s[A]=k[A]}}}return s}const mA=e=>(t,n)=>{const r=w.useContext(Th),s=w.useContext(Ch),o=()=>q8(e,t,r,s);return n?o():Pv(o)};function d0(e,t,n){var o;const{style:r}=e,s={};for(const l in r)(En(r[l])||t.style&&En(t.style[l])||cA(l,e)||((o=n==null?void 0:n.getValue(l))==null?void 0:o.liveStyle)!==void 0)&&(s[l]=r[l]);return s}const Y8=mA({scrapeMotionValuesFromProps:d0,createRenderState:l0});function pA(e,t,n){const r=d0(e,t,n);for(const s in e)if(En(e[s])||En(t[s])){const o=ll.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}const Z8=mA({scrapeMotionValuesFromProps:pA,createRenderState:fA}),X8=Symbol.for("motionComponentSymbol");function No(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function K8(e,t,n){return w.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):No(n)&&(n.current=r))},[t])}const f0=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),W8="framerAppearId",gA="data-"+f0(W8),yA=w.createContext({});function Q8(e,t,n,r,s){var k,E;const{visualElement:o}=w.useContext(Th),l=w.useContext(sA),u=w.useContext(Ch),d=w.useContext(i0).reducedMotion,h=w.useRef(null);r=r||l.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const g=h.current,p=w.useContext(yA);g&&!g.projection&&s&&(g.type==="html"||g.type==="svg")&&J8(h.current,n,s,p);const x=w.useRef(!1);w.useInsertionEffect(()=>{g&&x.current&&g.update(n,u)});const v=n[gA],S=w.useRef(!!v&&!((k=window.MotionHandoffIsComplete)!=null&&k.call(window,v))&&((E=window.MotionHasOptimisedAnimation)==null?void 0:E.call(window,v)));return mN(()=>{g&&(x.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),S.current&&g.animationState&&g.animationState.animateChanges())}),w.useEffect(()=>{g&&(!S.current&&g.animationState&&g.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var T;(T=window.MotionHandoffMarkAsComplete)==null||T.call(window,v)}),S.current=!1))}),g}function J8(e,t,n,r){const{layoutId:s,layout:o,drag:l,dragConstraints:u,layoutScroll:d,layoutRoot:h,layoutCrossfade:g}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:xA(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!l||u&&No(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:g,layoutScroll:d,layoutRoot:h})}function xA(e){if(e)return e.options.allowProjection!==!1?e.projection:xA(e.parent)}function Eg(e,{forwardMotionProps:t=!1}={},n,r){n&&E8(n);const s=c0(e)?Z8:Y8;function o(u,d){let h;const g={...w.useContext(i0),...u,layoutId:eV(u)},{isStatic:p}=g,x=R8(u),v=s(u,p);if(!p&&zv){tV();const S=nV(g);h=S.MeasureLayout,x.visualElement=Q8(e,v,g,r,S.ProjectionNode)}return m.jsxs(Th.Provider,{value:x,children:[h&&x.visualElement?m.jsx(h,{visualElement:x.visualElement,...g}):null,$8(e,u,K8(v,x.visualElement,d),v,p,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=w.forwardRef(o);return l[X8]=e,l}function eV({layoutId:e}){const t=w.useContext(Dv).id;return t&&e!==void 0?t+"-"+e:e}function tV(e,t){w.useContext(sA).strict}function nV(e){const{drag:t,layout:n}=Yo;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function rV(e,t){if(typeof Proxy>"u")return Eg;const n=new Map,r=(o,l)=>Eg(o,l,e,t),s=(o,l)=>r(o,l);return new Proxy(s,{get:(o,l)=>l==="create"?r:(n.has(l)||n.set(l,Eg(l,void 0,e,t)),n.get(l))})}function vA({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function iV({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function aV(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function _g(e){return e===void 0||e===1}function Xy({scale:e,scaleX:t,scaleY:n}){return!_g(e)||!_g(t)||!_g(n)}function is(e){return Xy(e)||bA(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function bA(e){return NC(e.x)||NC(e.y)}function NC(e){return e&&e!=="0%"}function Af(e,t,n){const r=e-n,s=t*r;return n+s}function AC(e,t,n,r,s){return s!==void 0&&(e=Af(e,s,r)),Af(e,n,r)+t}function Ky(e,t=0,n=1,r,s){e.min=AC(e.min,t,n,r,s),e.max=AC(e.max,t,n,r,s)}function wA(e,{x:t,y:n}){Ky(e.x,t.translate,t.scale,t.originPoint),Ky(e.y,n.translate,n.scale,n.originPoint)}const RC=.999999999999,MC=1.0000000000001;function sV(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,l;for(let u=0;u<s;u++){o=n[u],l=o.projectionDelta;const{visualElement:d}=o.options;d&&d.props.style&&d.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ro(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,wA(e,l)),r&&is(o.latestValues)&&Ro(e,o.latestValues))}t.x<MC&&t.x>RC&&(t.x=1),t.y<MC&&t.y>RC&&(t.y=1)}function Ao(e,t){e.min=e.min+t,e.max=e.max+t}function OC(e,t,n,r,s=.5){const o=Rt(e.min,e.max,s);Ky(e,t,n,o,r)}function Ro(e,t){OC(e.x,t.x,t.scaleX,t.scale,t.originX),OC(e.y,t.y,t.scaleY,t.scale,t.originY)}function SA(e,t){return vA(aV(e.getBoundingClientRect(),t))}function oV(e,t,n){const r=SA(e,n),{scroll:s}=t;return s&&(Ao(r.x,s.offset.x),Ao(r.y,s.offset.y)),r}const DC=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mo=()=>({x:DC(),y:DC()}),PC=()=>({min:0,max:0}),$t=()=>({x:PC(),y:PC()}),Wy={current:null},kA={current:!1};function lV(){if(kA.current=!0,!!zv)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Wy.current=e.matches;e.addEventListener("change",t),t()}else Wy.current=!1}const cV=new WeakMap;function uV(e,t,n){for(const r in t){const s=t[r],o=n[r];if(En(s))e.addValue(r,s);else if(En(o))e.addValue(r,Go(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(s):l.hasAnimated||l.set(s)}else{const l=e.getStaticValue(r);e.addValue(r,Go(l!==void 0?l:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const zC=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class dV{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:o,visualState:l},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Jv,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const x=Fn.now();this.renderScheduledAt<x&&(this.renderScheduledAt=x,Nt.render(this.render,!1,!0))};const{latestValues:d,renderState:h}=l;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=h,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=_h(n),this.isVariantNode=lA(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:g,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const x in p){const v=p[x];d[x]!==void 0&&En(v)&&v.set(d[x],!1)}}mount(t){this.current=t,cV.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),kA.current||lV(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Wy.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Ea(this.notifyUpdate),Ea(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=cl.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&Nt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let l;window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o(),l&&l(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Yo){const n=Yo[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):$t()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<zC.length;r++){const s=zC[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,l=t[o];l&&(this.propEventSubscriptions[s]=this.on(s,l))}this.prevMotionValues=uV(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Go(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(pN(r)||yN(r))?r=parseFloat(r):!w8(r)&&_a.test(n)&&(r=QN(t,n)),this.setBaseTarget(t,En(r)?r.get():r)),En(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const l=u0(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);l&&(r=l[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!En(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Uv),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){n0.render(this.render)}}class CA extends dV{constructor(){super(...arguments),this.KeyframeResolver=c8}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;En(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function TA(e,{style:t,vars:n},r,s){const o=e.style;let l;for(l in t)o[l]=t[l];s==null||s.applyProjectionStyles(o,r);for(l in n)o.setProperty(l,n[l])}function fV(e){return window.getComputedStyle(e)}class hV extends CA{constructor(){super(...arguments),this.type="html",this.renderInstance=TA}readValueFromInstance(t,n){var r;if(cl.has(n))return(r=this.projection)!=null&&r.isProjecting?Fy(n):jB(t,n);{const s=fV(t),o=($v(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return SA(t,n)}build(t,n,r){o0(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return d0(t,n,r)}}const EA=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function mV(e,t,n,r){TA(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(EA.has(s)?s:f0(s),t.attrs[s])}class pV extends CA{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$t}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(cl.has(n)){const r=WN(n);return r&&r.default||0}return n=EA.has(n)?n:f0(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return pA(t,n,r)}build(t,n,r){dA(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){mV(t,n,r,s)}mount(t){this.isSVGTag=hA(t.tagName),super.mount(t)}}const gV=(e,t)=>c0(e)?new pV(t):new hV(t,{allowProjection:e!==w.Fragment});function Zc(e,t,n){const r=e.getProps();return u0(r,t,n!==void 0?n:r.custom,e)}const Qy=e=>Array.isArray(e);function yV(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Go(n))}function xV(e){return Qy(e)?e[e.length-1]||0:e}function vV(e,t){const n=Zc(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const l in o){const u=xV(o[l]);yV(e,l,u)}}function bV(e){return!!(En(e)&&e.add)}function Jy(e,t){const n=e.getValue("willChange");if(bV(n))return n.add(t);if(!n&&zi.WillChange){const r=new zi.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function _A(e){return e.props[gA]}const wV=e=>e!==null;function SV(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(wV),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[o]}const kV={type:"spring",stiffness:500,damping:25,restSpeed:10},CV=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),TV={type:"keyframes",duration:.8},EV={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_V=(e,{keyframes:t})=>t.length>2?TV:cl.has(e)?e.startsWith("scale")?CV(t[1]):kV:EV;function jV({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:l,repeatDelay:u,from:d,elapsed:h,...g}){return!!Object.keys(g).length}const h0=(e,t,n,r={},s,o)=>l=>{const u=e0(r,e)||{},d=u.delay||r.delay||0;let{elapsed:h=0}=r;h=h-ti(d);const g={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-h,onUpdate:x=>{t.set(x),u.onUpdate&&u.onUpdate(x)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:o?void 0:s};jV(u)||Object.assign(g,_V(e,g)),g.duration&&(g.duration=ti(g.duration)),g.repeatDelay&&(g.repeatDelay=ti(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let p=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(g.duration=0,g.delay===0&&(p=!0)),(zi.instantAnimations||zi.skipAnimations)&&(p=!0,g.duration=0,g.delay=0),g.allowFlatten=!u.type&&!u.ease,p&&!o&&t.get()!==void 0){const x=SV(g.keyframes,u);if(x!==void 0){Nt.update(()=>{g.onUpdate(x),g.onComplete()});return}}return u.isSync?new Qv(g):new WB(g)};function NV({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function jA(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:l,...u}=t;r&&(o=r);const d=[],h=s&&e.animationState&&e.animationState.getState()[s];for(const g in u){const p=e.getValue(g,e.latestValues[g]??null),x=u[g];if(x===void 0||h&&NV(h,g))continue;const v={delay:n,...e0(o||{},g)},S=p.get();if(S!==void 0&&!p.isAnimating&&!Array.isArray(x)&&x===S&&!v.velocity)continue;let k=!1;if(window.MotionHandoffAnimation){const T=_A(e);if(T){const A=window.MotionHandoffAnimation(T,g,Nt);A!==null&&(v.startTime=A,k=!0)}}Jy(e,g),p.start(h0(g,p,x,e.shouldReduceMotion&&ZN.has(g)?{type:!1}:v,e,k));const E=p.animation;E&&d.push(E)}return l&&Promise.all(d).then(()=>{Nt.update(()=>{l&&vV(e,l)})}),d}function ex(e,t,n={}){var d;const r=Zc(e,t,n.type==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(jA(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(h=0)=>{const{delayChildren:g=0,staggerChildren:p,staggerDirection:x}=s;return AV(e,t,h,g,p,x,n)}:()=>Promise.resolve(),{when:u}=s;if(u){const[h,g]=u==="beforeChildren"?[o,l]:[l,o];return h().then(()=>g())}else return Promise.all([o(),l(n.delay)])}function AV(e,t,n=0,r=0,s=0,o=1,l){const u=[],d=e.variantChildren.size,h=(d-1)*s,g=typeof r=="function",p=g?x=>r(x,d):o===1?(x=0)=>x*s:(x=0)=>h-x*s;return Array.from(e.variantChildren).sort(RV).forEach((x,v)=>{x.notify("AnimationStart",t),u.push(ex(x,t,{...l,delay:n+(g?0:r)+p(v)}).then(()=>x.notify("AnimationComplete",t)))}),Promise.all(u)}function RV(e,t){return e.sortNodePosition(t)}function MV(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>ex(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=ex(e,t,n);else{const s=typeof t=="function"?Zc(e,t,n.custom):t;r=Promise.all(jA(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function NA(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const OV=s0.length;function AA(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?AA(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<OV;n++){const r=s0[n],s=e.props[r];(Gc(s)||s===!1)&&(t[r]=s)}return t}const DV=[...a0].reverse(),PV=a0.length;function zV(e){return t=>Promise.all(t.map(({animation:n,options:r})=>MV(e,n,r)))}function LV(e){let t=zV(e),n=LC(),r=!0;const s=d=>(h,g)=>{var x;const p=Zc(e,g,d==="exit"?(x=e.presenceContext)==null?void 0:x.custom:void 0);if(p){const{transition:v,transitionEnd:S,...k}=p;h={...h,...k,...S}}return h};function o(d){t=d(e)}function l(d){const{props:h}=e,g=AA(e.parent)||{},p=[],x=new Set;let v={},S=1/0;for(let E=0;E<PV;E++){const T=DV[E],A=n[T],O=h[T]!==void 0?h[T]:g[T],R=Gc(O),M=T===d?A.isActive:null;M===!1&&(S=E);let _=O===g[T]&&O!==h[T]&&R;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),A.protectedKeys={...v},!A.isActive&&M===null||!O&&!A.prevProp||Eh(O)||typeof O=="boolean")continue;const D=IV(A.prevProp,O);let P=D||T===d&&A.isActive&&!_&&R||E>S&&R,B=!1;const z=Array.isArray(O)?O:[O];let H=z.reduce(s(T),{});M===!1&&(H={});const{prevResolvedValues:$={}}=A,re={...$,...H},te=F=>{P=!0,x.has(F)&&(B=!0,x.delete(F)),A.needsAnimating[F]=!0;const V=e.getValue(F);V&&(V.liveStyle=!1)};for(const F in re){const V=H[F],Z=$[F];if(v.hasOwnProperty(F))continue;let C=!1;Qy(V)&&Qy(Z)?C=!NA(V,Z):C=V!==Z,C?V!=null?te(F):x.add(F):V!==void 0&&x.has(F)?te(F):A.protectedKeys[F]=!0}A.prevProp=O,A.prevResolvedValues=H,A.isActive&&(v={...v,...H}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(_&&D)||B)&&p.push(...z.map(F=>({animation:F,options:{type:T}})))}if(x.size){const E={};if(typeof h.initial!="boolean"){const T=Zc(e,Array.isArray(h.initial)?h.initial[0]:h.initial);T&&T.transition&&(E.transition=T.transition)}x.forEach(T=>{const A=e.getBaseTarget(T),O=e.getValue(T);O&&(O.liveStyle=!0),E[T]=A??null}),p.push({animation:E})}let k=!!p.length;return r&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(k=!1),r=!1,k?t(p):Promise.resolve()}function u(d,h){var p;if(n[d].isActive===h)return Promise.resolve();(p=e.variantChildren)==null||p.forEach(x=>{var v;return(v=x.animationState)==null?void 0:v.setActive(d,h)}),n[d].isActive=h;const g=l(d);for(const x in n)n[x].protectedKeys={};return g}return{animateChanges:l,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=LC(),r=!0}}}function IV(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!NA(t,e):!1}function ns(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function LC(){return{animate:ns(!0),whileInView:ns(),whileHover:ns(),whileTap:ns(),whileDrag:ns(),whileFocus:ns(),exit:ns()}}class Oa{constructor(t){this.isMounted=!1,this.node=t}update(){}}class BV extends Oa{constructor(t){super(t),t.animationState||(t.animationState=LV(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Eh(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let VV=0;class UV extends Oa{constructor(){super(...arguments),this.id=VV++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const HV={animation:{Feature:BV},exit:{Feature:UV}};function Xc(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function hu(e){return{point:{x:e.pageX,y:e.pageY}}}const FV=e=>t=>r0(t)&&e(t,hu(t));function Nc(e,t,n,r){return Xc(e,t,FV(n),r)}const RA=1e-4,$V=1-RA,qV=1+RA,MA=.01,GV=0-MA,YV=0+MA;function Mn(e){return e.max-e.min}function ZV(e,t,n){return Math.abs(e-t)<=n}function IC(e,t,n,r=.5){e.origin=r,e.originPoint=Rt(t.min,t.max,e.origin),e.scale=Mn(n)/Mn(t),e.translate=Rt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=$V&&e.scale<=qV||isNaN(e.scale))&&(e.scale=1),(e.translate>=GV&&e.translate<=YV||isNaN(e.translate))&&(e.translate=0)}function Ac(e,t,n,r){IC(e.x,t.x,n.x,r?r.originX:void 0),IC(e.y,t.y,n.y,r?r.originY:void 0)}function BC(e,t,n){e.min=n.min+t.min,e.max=e.min+Mn(t)}function XV(e,t,n){BC(e.x,t.x,n.x),BC(e.y,t.y,n.y)}function VC(e,t,n){e.min=t.min-n.min,e.max=e.min+Mn(t)}function Rc(e,t,n){VC(e.x,t.x,n.x),VC(e.y,t.y,n.y)}function br(e){return[e("x"),e("y")]}const OA=({current:e})=>e?e.ownerDocument.defaultView:null,UC=(e,t)=>Math.abs(e-t);function KV(e,t){const n=UC(e.x,t.x),r=UC(e.y,t.y);return Math.sqrt(n**2+r**2)}class DA{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:l=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Ng(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,S=KV(x.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!S)return;const{point:k}=x,{timestamp:E}=gn;this.history.push({...k,timestamp:E});const{onStart:T,onMove:A}=this.handlers;v||(T&&T(this.lastMoveEvent,x),this.startEvent=this.lastMoveEvent),A&&A(this.lastMoveEvent,x)},this.handlePointerMove=(x,v)=>{this.lastMoveEvent=x,this.lastMoveEventInfo=jg(v,this.transformPagePoint),Nt.update(this.updatePoint,!0)},this.handlePointerUp=(x,v)=>{this.end();const{onEnd:S,onSessionEnd:k,resumeAnimation:E}=this.handlers;if(this.dragSnapToOrigin&&E&&E(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const T=Ng(x.type==="pointercancel"?this.lastMoveEventInfo:jg(v,this.transformPagePoint),this.history);this.startEvent&&S&&S(x,T),k&&k(x,T)},!r0(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=s||window;const u=hu(t),d=jg(u,this.transformPagePoint),{point:h}=d,{timestamp:g}=gn;this.history=[{...h,timestamp:g}];const{onSessionStart:p}=n;p&&p(t,Ng(d,this.history)),this.removeListeners=uu(Nc(this.contextWindow,"pointermove",this.handlePointerMove),Nc(this.contextWindow,"pointerup",this.handlePointerUp),Nc(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ea(this.updatePoint)}}function jg(e,t){return t?{point:t(e.point)}:e}function HC(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ng({point:e},t){return{point:e,delta:HC(e,PA(t)),offset:HC(e,WV(t)),velocity:QV(t,.1)}}function WV(e){return e[0]}function PA(e){return e[e.length-1]}function QV(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=PA(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>ti(t)));)n--;if(!r)return{x:0,y:0};const o=ni(s.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const l={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function JV(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Rt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Rt(n,e,r.max):Math.min(e,n)),e}function FC(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function eU(e,{top:t,left:n,bottom:r,right:s}){return{x:FC(e.x,n,s),y:FC(e.y,t,r)}}function $C(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function tU(e,t){return{x:$C(e.x,t.x),y:$C(e.y,t.y)}}function nU(e,t){let n=.5;const r=Mn(e),s=Mn(t);return s>r?n=Fc(t.min,t.max-r,e.min):r>s&&(n=Fc(e.min,e.max-s,t.min)),Pi(0,1,n)}function rU(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const tx=.35;function iU(e=tx){return e===!1?e=0:e===!0&&(e=tx),{x:qC(e,"left","right"),y:qC(e,"top","bottom")}}function qC(e,t,n){return{min:GC(e,t),max:GC(e,n)}}function GC(e,t){return typeof e=="number"?e:e[t]||0}const aU=new WeakMap;class sU{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=$t(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=p=>{const{dragSnapToOrigin:x}=this.getProps();x?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(hu(p).point)},l=(p,x)=>{const{drag:v,dragPropagation:S,onDragStart:k}=this.getProps();if(v&&!S&&(this.openDragLock&&this.openDragLock(),this.openDragLock=h8(v),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=x,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),br(T=>{let A=this.getAxisMotionValue(T).get()||0;if(ri.test(A)){const{projection:O}=this.visualElement;if(O&&O.layout){const R=O.layout.layoutBox[T];R&&(A=Mn(R)*(parseFloat(A)/100))}}this.originPoint[T]=A}),k&&Nt.postRender(()=>k(p,x)),Jy(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},u=(p,x)=>{this.latestPointerEvent=p,this.latestPanInfo=x;const{dragPropagation:v,dragDirectionLock:S,onDirectionLock:k,onDrag:E}=this.getProps();if(!v&&!this.openDragLock)return;const{offset:T}=x;if(S&&this.currentDirection===null){this.currentDirection=oU(T),this.currentDirection!==null&&k&&k(this.currentDirection);return}this.updateAxis("x",x.point,T),this.updateAxis("y",x.point,T),this.visualElement.render(),E&&E(p,x)},d=(p,x)=>{this.latestPointerEvent=p,this.latestPanInfo=x,this.stop(p,x),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>br(p=>{var x;return this.getAnimationState(p)==="paused"&&((x=this.getAxisMotionValue(p).animation)==null?void 0:x.play())}),{dragSnapToOrigin:g}=this.getProps();this.panSession=new DA(t,{onSessionStart:o,onStart:l,onMove:u,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,distanceThreshold:r,contextWindow:OA(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!r)return;const{velocity:l}=s;this.startAnimation(l);const{onDragEnd:u}=this.getProps();u&&Nt.postRender(()=>u(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Gd(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=JV(l,this.constraints[t],this.elastic[t])),o.set(l)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,s=this.constraints;t&&No(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=eU(r.layoutBox,t):this.constraints=!1,this.elastic=iU(n),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&br(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=rU(r.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!No(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=oV(r,s.root,this.visualElement.getTransformPagePoint());let l=tU(s.layout.layoutBox,o);if(n){const u=n(iV(l));this.hasMutatedConstraints=!!u,u&&(l=vA(u))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),d=this.constraints||{},h=br(g=>{if(!Gd(g,n,this.currentDirection))return;let p=d&&d[g]||{};l&&(p={min:0,max:0});const x=s?200:1e6,v=s?40:1e7,S={type:"inertia",velocity:r?t[g]:0,bounceStiffness:x,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...o,...p};return this.startAxisValueAnimation(g,S)});return Promise.all(h).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Jy(this.visualElement,t),r.start(h0(t,r,0,n,this.visualElement,!1))}stopAnimation(){br(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){br(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){br(n=>{const{drag:r}=this.getProps();if(!Gd(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:l,max:u}=s.layout.layoutBox[n];o.set(t[n]-Rt(l,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!No(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};br(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const d=u.get();s[l]=nU({min:d,max:d},this.constraints[l])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),br(l=>{if(!Gd(l,t,null))return;const u=this.getAxisMotionValue(l),{min:d,max:h}=this.constraints[l];u.set(Rt(d,h,s[l]))})}addListeners(){if(!this.visualElement.current)return;aU.set(this.visualElement,this);const t=this.visualElement.current,n=Nc(t,"pointerdown",d=>{const{drag:h,dragListener:g=!0}=this.getProps();h&&g&&this.start(d)}),r=()=>{const{dragConstraints:d}=this.getProps();No(d)&&d.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,o=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Nt.read(r);const l=Xc(window,"resize",()=>this.scalePositionWithinConstraints()),u=s.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h})=>{this.isDragging&&h&&(br(g=>{const p=this.getAxisMotionValue(g);p&&(this.originPoint[g]+=d[g].translate,p.set(p.get()+d[g].translate))}),this.visualElement.render())});return()=>{l(),n(),o(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:l=tx,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:l,dragMomentum:u}}}function Gd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function oU(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class lU extends Oa{constructor(t){super(t),this.removeGroupControls=Cr,this.removeListeners=Cr,this.controls=new sU(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Cr}unmount(){this.removeGroupControls(),this.removeListeners()}}const YC=e=>(t,n)=>{e&&Nt.postRender(()=>e(t,n))};class cU extends Oa{constructor(){super(...arguments),this.removePointerDownListener=Cr}onPointerDown(t){this.session=new DA(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:OA(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:YC(t),onStart:YC(n),onMove:r,onEnd:(o,l)=>{delete this.session,s&&Nt.postRender(()=>s(o,l))}}}mount(){this.removePointerDownListener=Nc(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const cf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ZC(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const fc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Be.test(e))e=parseFloat(e);else return e;const n=ZC(e,t.target.x),r=ZC(e,t.target.y);return`${n}% ${r}%`}},uU={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=_a.parse(e);if(s.length>5)return r;const o=_a.createTransformer(e),l=typeof s[0]!="number"?1:0,u=n.x.scale*t.x,d=n.y.scale*t.y;s[0+l]/=u,s[1+l]/=d;const h=Rt(u,d,.5);return typeof s[2+l]=="number"&&(s[2+l]/=h),typeof s[3+l]=="number"&&(s[3+l]/=h),o(s)}};let XC=!1;class dU extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;M8(fU),o&&(n.group&&n.group.add(o),r&&r.register&&s&&r.register(o),XC&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),cf.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:o}=this.props,{projection:l}=r;return l&&(l.isPresent=o,XC=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?l.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?l.promote():l.relegate()||Nt.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),n0.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function zA(e){const[t,n]=aA(),r=w.useContext(Dv);return m.jsx(dU,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(yA),isPresent:t,safeToRemove:n})}const fU={borderRadius:{...fc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:fc,borderTopRightRadius:fc,borderBottomLeftRadius:fc,borderBottomRightRadius:fc,boxShadow:uU};function hU(e,t,n){const r=En(e)?e:Go(e);return r.start(h0("",r,t,n)),r.animation}const mU=(e,t)=>e.depth-t.depth;class pU{constructor(){this.children=[],this.isDirty=!1}add(t){Lv(this.children,t),this.isDirty=!0}remove(t){Iv(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(mU),this.isDirty=!1,this.children.forEach(t)}}function gU(e,t){const n=Fn.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(Ea(r),e(o-t))};return Nt.setup(r,!0),()=>Ea(r)}const LA=["TopLeft","TopRight","BottomLeft","BottomRight"],yU=LA.length,KC=e=>typeof e=="string"?parseFloat(e):e,WC=e=>typeof e=="number"||Be.test(e);function xU(e,t,n,r,s,o){s?(e.opacity=Rt(0,n.opacity??1,vU(r)),e.opacityExit=Rt(t.opacity??1,0,bU(r))):o&&(e.opacity=Rt(t.opacity??1,n.opacity??1,r));for(let l=0;l<yU;l++){const u=`border${LA[l]}Radius`;let d=QC(t,u),h=QC(n,u);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||WC(d)===WC(h)?(e[u]=Math.max(Rt(KC(d),KC(h),r),0),(ri.test(h)||ri.test(d))&&(e[u]+="%")):e[u]=h}(t.rotate||n.rotate)&&(e.rotate=Rt(t.rotate||0,n.rotate||0,r))}function QC(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const vU=IA(0,.5,TN),bU=IA(.5,.95,Cr);function IA(e,t,n){return r=>r<e?0:r>t?1:n(Fc(e,t,r))}function JC(e,t){e.min=t.min,e.max=t.max}function vr(e,t){JC(e.x,t.x),JC(e.y,t.y)}function eT(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function tT(e,t,n,r,s){return e-=t,e=Af(e,1/n,r),s!==void 0&&(e=Af(e,1/s,r)),e}function wU(e,t=0,n=1,r=.5,s,o=e,l=e){if(ri.test(t)&&(t=parseFloat(t),t=Rt(l.min,l.max,t/100)-l.min),typeof t!="number")return;let u=Rt(o.min,o.max,r);e===o&&(u-=t),e.min=tT(e.min,t,n,u,s),e.max=tT(e.max,t,n,u,s)}function nT(e,t,[n,r,s],o,l){wU(e,t[n],t[r],t[s],t.scale,o,l)}const SU=["x","scaleX","originX"],kU=["y","scaleY","originY"];function rT(e,t,n,r){nT(e.x,t,SU,n?n.x:void 0,r?r.x:void 0),nT(e.y,t,kU,n?n.y:void 0,r?r.y:void 0)}function iT(e){return e.translate===0&&e.scale===1}function BA(e){return iT(e.x)&&iT(e.y)}function aT(e,t){return e.min===t.min&&e.max===t.max}function CU(e,t){return aT(e.x,t.x)&&aT(e.y,t.y)}function sT(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function VA(e,t){return sT(e.x,t.x)&&sT(e.y,t.y)}function oT(e){return Mn(e.x)/Mn(e.y)}function lT(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class TU{constructor(){this.members=[]}add(t){Lv(this.members,t),t.scheduleRender()}remove(t){if(Iv(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const o=this.members[s];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function EU(e,t,n){let r="";const s=e.x.translate/t.x,o=e.y.translate/t.y,l=(n==null?void 0:n.z)||0;if((s||o||l)&&(r=`translate3d(${s}px, ${o}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:h,rotate:g,rotateX:p,rotateY:x,skewX:v,skewY:S}=n;h&&(r=`perspective(${h}px) ${r}`),g&&(r+=`rotate(${g}deg) `),p&&(r+=`rotateX(${p}deg) `),x&&(r+=`rotateY(${x}deg) `),v&&(r+=`skewX(${v}deg) `),S&&(r+=`skewY(${S}deg) `)}const u=e.x.scale*t.x,d=e.y.scale*t.y;return(u!==1||d!==1)&&(r+=`scale(${u}, ${d})`),r||"none"}const Ag=["","X","Y","Z"],_U=1e3;let jU=0;function Rg(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function UA(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=_A(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Nt,!(s||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&UA(r)}function HA({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(l={},u=t==null?void 0:t()){this.id=jU++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(RU),this.nodes.forEach(PU),this.nodes.forEach(zU),this.nodes.forEach(MU)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new pU)}addEventListener(l,u){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new Uv),this.eventHandlers.get(l).add(u)}notifyListeners(l,...u){const d=this.eventHandlers.get(l);d&&d.notify(...u)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=iA(l)&&!v8(l),this.instance=l;const{layoutId:u,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||u)&&(this.isLayoutDirty=!0),e){let g,p=0;const x=()=>this.root.updateBlockedByResize=!1;Nt.read(()=>{p=window.innerWidth}),e(l,()=>{const v=window.innerWidth;v!==p&&(p=v,this.root.updateBlockedByResize=!0,g&&g(),g=gU(x,250),cf.hasAnimatedSinceResize&&(cf.hasAnimatedSinceResize=!1,this.nodes.forEach(dT)))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&h&&(u||d)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:p,hasRelativeLayoutChanged:x,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||h.getDefaultTransition()||UU,{onLayoutAnimationStart:k,onLayoutAnimationComplete:E}=h.getProps(),T=!this.targetLayout||!VA(this.targetLayout,v),A=!p&&x;if(this.options.layoutRoot||this.resumeFrom||A||p&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const O={...e0(S,"layout"),onPlay:k,onComplete:E};(h.shouldReduceMotion||this.options.layoutRoot)&&(O.delay=0,O.type=!1),this.startAnimation(O),this.setAnimationOrigin(g,A)}else p||dT(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ea(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(LU),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&UA(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g<this.path.length;g++){const p=this.path[g];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:u,layout:d}=this.options;if(u===void 0&&!d)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(cT);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(uT);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(DU),this.nodes.forEach(NU),this.nodes.forEach(AU)):this.nodes.forEach(uT),this.clearAllSnapshots();const u=Fn.now();gn.delta=Pi(0,1e3/60,u-gn.timestamp),gn.timestamp=u,gn.isProcessing=!0,bg.update.process(gn),bg.preRender.process(gn),bg.render.process(gn),gn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,n0.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(OU),this.sharedNodes.forEach(IU)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Nt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Nt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Mn(this.snapshot.measuredBox.x)&&!Mn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d<this.path.length;d++)this.path[d].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutCorrected=$t(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(u=!1),u&&this.instance){const d=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:d,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!s)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!BA(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,g=h!==this.prevTransformTemplateValue;l&&this.instance&&(u||is(this.latestValues)||g)&&(s(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const u=this.measurePageBox();let d=this.removeElementScroll(u);return l&&(d=this.removeTransform(d)),HU(d),{animationId:this.root.animationId,measuredBox:u,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){var h;const{visualElement:l}=this.options;if(!l)return $t();const u=l.measureViewportBox();if(!(((h=this.scroll)==null?void 0:h.wasRoot)||this.path.some(FU))){const{scroll:g}=this.root;g&&(Ao(u.x,g.offset.x),Ao(u.y,g.offset.y))}return u}removeElementScroll(l){var d;const u=$t();if(vr(u,l),(d=this.scroll)!=null&&d.wasRoot)return u;for(let h=0;h<this.path.length;h++){const g=this.path[h],{scroll:p,options:x}=g;g!==this.root&&p&&x.layoutScroll&&(p.wasRoot&&vr(u,l),Ao(u.x,p.offset.x),Ao(u.y,p.offset.y))}return u}applyTransform(l,u=!1){const d=$t();vr(d,l);for(let h=0;h<this.path.length;h++){const g=this.path[h];!u&&g.options.layoutScroll&&g.scroll&&g!==g.root&&Ro(d,{x:-g.scroll.offset.x,y:-g.scroll.offset.y}),is(g.latestValues)&&Ro(d,g.latestValues)}return is(this.latestValues)&&Ro(d,this.latestValues),d}removeTransform(l){const u=$t();vr(u,l);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!h.instance||!is(h.latestValues))continue;Xy(h.latestValues)&&h.updateSnapshot();const g=$t(),p=h.measurePageBox();vr(g,p),rT(u,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,g)}return is(this.latestValues)&&rT(u,this.latestValues),u}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==gn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var x;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==u;if(!(l||d&&this.isSharedProjectionDirty||this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:g,layoutId:p}=this.options;if(!(!this.layout||!(g||p))){if(this.resolvedRelativeTargetAt=gn.timestamp,!this.targetDelta&&!this.relativeTarget){const v=this.getClosestProjectingParent();v&&v.layout&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$t(),this.relativeTargetOrigin=$t(),Rc(this.relativeTargetOrigin,this.layout.layoutBox,v.layout.layoutBox),vr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=$t(),this.targetWithTransforms=$t()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),XV(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):vr(this.target,this.layout.layoutBox),wA(this.target,this.targetDelta)):vr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const v=this.getClosestProjectingParent();v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$t(),this.relativeTargetOrigin=$t(),Rc(this.relativeTargetOrigin,this.target,v.target),vr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Xy(this.parent.latestValues)||bA(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var S;const l=this.getLead(),u=!!this.resumingFrom||this!==l;let d=!0;if((this.isProjectionDirty||(S=this.parent)!=null&&S.isProjectionDirty)&&(d=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===gn.timestamp&&(d=!1),d)return;const{layout:h,layoutId:g}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||g))return;vr(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,x=this.treeScale.y;sV(this.layoutCorrected,this.treeScale,this.path,u),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=$t());const{target:v}=l;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(eT(this.prevProjectionDelta.x,this.projectionDelta.x),eT(this.prevProjectionDelta.y,this.projectionDelta.y)),Ac(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==x||!lT(this.projectionDelta.x,this.prevProjectionDelta.x)||!lT(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){var u;if((u=this.options.visualElement)==null||u.scheduleRender(),l){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Mo(),this.projectionDelta=Mo(),this.projectionDeltaWithTransform=Mo()}setAnimationOrigin(l,u=!1){const d=this.snapshot,h=d?d.latestValues:{},g={...this.latestValues},p=Mo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const x=$t(),v=d?d.source:void 0,S=this.layout?this.layout.source:void 0,k=v!==S,E=this.getStack(),T=!E||E.members.length<=1,A=!!(k&&!T&&this.options.crossfade===!0&&!this.path.some(VU));this.animationProgress=0;let O;this.mixTargetDelta=R=>{const M=R/1e3;fT(p.x,l.x,M),fT(p.y,l.y,M),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Rc(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),BU(this.relativeTarget,this.relativeTargetOrigin,x,M),O&&CU(this.relativeTarget,O)&&(this.isProjectionDirty=!1),O||(O=$t()),vr(O,this.relativeTarget)),k&&(this.animationValues=g,xU(g,h,this.latestValues,M,A,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){var u,d,h;this.notifyListeners("animationStart"),(u=this.currentAnimation)==null||u.stop(),(h=(d=this.resumingFrom)==null?void 0:d.currentAnimation)==null||h.stop(),this.pendingAnimation&&(Ea(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Nt.update(()=>{cf.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Go(0)),this.currentAnimation=hU(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:g=>{this.mixTargetDelta(g),l.onUpdate&&l.onUpdate(g)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(_U),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:u,target:d,layout:h,latestValues:g}=l;if(!(!u||!d||!h)){if(this!==l&&this.layout&&h&&FA(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||$t();const p=Mn(this.layout.layoutBox.x);d.x.min=l.target.x.min,d.x.max=d.x.min+p;const x=Mn(this.layout.layoutBox.y);d.y.min=l.target.y.min,d.y.max=d.y.min+x}vr(u,d),Ro(u,g),Ac(this.projectionDeltaWithTransform,this.layoutCorrected,u,g)}}registerSharedNode(l,u){this.sharedNodes.has(l)||this.sharedNodes.set(l,new TU),this.sharedNodes.get(l).add(u);const h=u.options.initialPromotionConfig;u.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(u):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var u;const{layoutId:l}=this.options;return l?((u=this.getStack())==null?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:l}=this.options;return l?(u=this.getStack())==null?void 0:u.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:u,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),l&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let u=!1;const{latestValues:d}=l;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(u=!0),!u)return;const h={};d.z&&Rg("z",l,h,this.animationValues);for(let g=0;g<Ag.length;g++)Rg(`rotate${Ag[g]}`,l,h,this.animationValues),Rg(`skew${Ag[g]}`,l,h,this.animationValues);l.render();for(const g in h)l.setStaticValue(g,h[g]),this.animationValues&&(this.animationValues[g]=h[g]);l.scheduleRender()}applyProjectionStyles(l,u){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=lf(u==null?void 0:u.pointerEvents)||"",l.transform=d?d(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=lf(u==null?void 0:u.pointerEvents)||""),this.hasProjected&&!is(this.latestValues)&&(l.transform=d?d({},""):"none",this.hasProjected=!1);return}l.visibility="";const g=h.animationValues||h.latestValues;this.applyTransformsToTarget();let p=EU(this.projectionDeltaWithTransform,this.treeScale,g);d&&(p=d(g,p)),l.transform=p;const{x,y:v}=this.projectionDelta;l.transformOrigin=`${x.origin*100}% ${v.origin*100}% 0`,h.animationValues?l.opacity=h===this?g.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:l.opacity=h===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const S in Yc){if(g[S]===void 0)continue;const{correct:k,applyTo:E,isCSSVariable:T}=Yc[S],A=p==="none"?g[S]:k(g[S],h);if(E){const O=E.length;for(let R=0;R<O;R++)l[E[R]]=A}else T?this.options.visualElement.renderState.vars[S]=A:l[S]=A}this.options.layoutId&&(l.pointerEvents=h===this?lf(u==null?void 0:u.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var u;return(u=l.currentAnimation)==null?void 0:u.stop()}),this.root.nodes.forEach(cT),this.root.sharedNodes.clear()}}}function NU(e){e.updateLayout()}function AU(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:o}=e.options,l=t.source!==e.layout.source;o==="size"?br(p=>{const x=l?t.measuredBox[p]:t.layoutBox[p],v=Mn(x);x.min=r[p].min,x.max=x.min+v}):FA(o,t.layoutBox,r)&&br(p=>{const x=l?t.measuredBox[p]:t.layoutBox[p],v=Mn(r[p]);x.max=x.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+v)});const u=Mo();Ac(u,r,t.layoutBox);const d=Mo();l?Ac(d,e.applyTransform(s,!0),t.measuredBox):Ac(d,r,t.layoutBox);const h=!BA(u);let g=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:x,layout:v}=p;if(x&&v){const S=$t();Rc(S,t.layoutBox,x.layoutBox);const k=$t();Rc(k,r,v.layoutBox),VA(S,k)||(g=!0),p.options.layoutRoot&&(e.relativeTarget=k,e.relativeTargetOrigin=S,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:d,layoutDelta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:g})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function RU(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function MU(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function OU(e){e.clearSnapshot()}function cT(e){e.clearMeasurements()}function uT(e){e.isLayoutDirty=!1}function DU(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function dT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function PU(e){e.resolveTargetDelta()}function zU(e){e.calcProjection()}function LU(e){e.resetSkewAndRotation()}function IU(e){e.removeLeadSnapshot()}function fT(e,t,n){e.translate=Rt(t.translate,0,n),e.scale=Rt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function hT(e,t,n,r){e.min=Rt(t.min,n.min,r),e.max=Rt(t.max,n.max,r)}function BU(e,t,n,r){hT(e.x,t.x,n.x,r),hT(e.y,t.y,n.y,r)}function VU(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const UU={duration:.45,ease:[.4,0,.1,1]},mT=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),pT=mT("applewebkit/")&&!mT("chrome/")?Math.round:Cr;function gT(e){e.min=pT(e.min),e.max=pT(e.max)}function HU(e){gT(e.x),gT(e.y)}function FA(e,t,n){return e==="position"||e==="preserve-aspect"&&!ZV(oT(t),oT(n),.2)}function FU(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const $U=HA({attachResizeListener:(e,t)=>Xc(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Mg={current:void 0},$A=HA({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Mg.current){const e=new $U({});e.mount(window),e.setOptions({layoutScroll:!0}),Mg.current=e}return Mg.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),qU={pan:{Feature:cU},drag:{Feature:lU,ProjectionNode:$A,MeasureLayout:zA}};function yT(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&Nt.postRender(()=>o(t,hu(t)))}class GU extends Oa{mount(){const{current:t}=this.node;t&&(this.unmount=m8(t,(n,r)=>(yT(this.node,r,"Start"),s=>yT(this.node,s,"End"))))}unmount(){}}class YU extends Oa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=uu(Xc(this.node.current,"focus",()=>this.onFocus()),Xc(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function xT(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&Nt.postRender(()=>o(t,hu(t)))}class ZU extends Oa{mount(){const{current:t}=this.node;t&&(this.unmount=x8(t,(n,r)=>(xT(this.node,r,"Start"),(s,{success:o})=>xT(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const nx=new WeakMap,Og=new WeakMap,XU=e=>{const t=nx.get(e.target);t&&t(e)},KU=e=>{e.forEach(XU)};function WU({root:e,...t}){const n=e||document;Og.has(n)||Og.set(n,{});const r=Og.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(KU,{root:e,...t})),r[s]}function QU(e,t,n){const r=WU(t);return nx.set(e,n),r.observe(e),()=>{nx.delete(e),r.unobserve(e)}}const JU={some:0,all:1};class eH extends Oa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:JU[s]},u=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,o&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:g,onViewportLeave:p}=this.node.getProps(),x=h?g:p;x&&x(d)};return QU(this.node.current,l,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(tH(t,n))&&this.startObserver()}unmount(){}}function tH({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const nH={inView:{Feature:eH},tap:{Feature:ZU},focus:{Feature:YU},hover:{Feature:GU}},rH={layout:{ProjectionNode:$A,MeasureLayout:zA}},iH={...HV,...nH,...qU,...rH},Ni=rV(iH,gV);function aH(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const sH=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oH=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lH={};function vT(e,t){return(lH.jsx?oH:sH).test(e)}const cH=/[ \t\n\f\r]/g;function uH(e){return typeof e=="object"?e.type==="text"?bT(e.value):!1:bT(e)}function bT(e){return e.replace(cH,"")===""}class mu{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}mu.prototype.normal={};mu.prototype.property={};mu.prototype.space=void 0;function qA(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new mu(n,r,t)}function rx(e){return e.toLowerCase()}class qn{constructor(t,n){this.attribute=n,this.property=t}}qn.prototype.attribute="";qn.prototype.booleanish=!1;qn.prototype.boolean=!1;qn.prototype.commaOrSpaceSeparated=!1;qn.prototype.commaSeparated=!1;qn.prototype.defined=!1;qn.prototype.mustUseProperty=!1;qn.prototype.number=!1;qn.prototype.overloadedBoolean=!1;qn.prototype.property="";qn.prototype.spaceSeparated=!1;qn.prototype.space=void 0;let dH=0;const Ye=Ns(),Kt=Ns(),ix=Ns(),xe=Ns(),_t=Ns(),Lo=Ns(),tr=Ns();function Ns(){return 2**++dH}const ax=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ye,booleanish:Kt,commaOrSpaceSeparated:tr,commaSeparated:Lo,number:xe,overloadedBoolean:ix,spaceSeparated:_t},Symbol.toStringTag,{value:"Module"})),Dg=Object.keys(ax);class m0 extends qn{constructor(t,n,r,s){let o=-1;if(super(t,n),wT(this,"space",s),typeof r=="number")for(;++o<Dg.length;){const l=Dg[o];wT(this,Dg[o],(r&ax[l])===ax[l])}}}m0.prototype.defined=!0;function wT(e,t,n){n&&(e[t]=n)}function ul(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const o=new m0(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[rx(r)]=r,n[rx(o.attribute)]=r}return new mu(t,n,e.space)}const GA=ul({properties:{ariaActiveDescendant:null,ariaAtomic:Kt,ariaAutoComplete:null,ariaBusy:Kt,ariaChecked:Kt,ariaColCount:xe,ariaColIndex:xe,ariaColSpan:xe,ariaControls:_t,ariaCurrent:null,ariaDescribedBy:_t,ariaDetails:null,ariaDisabled:Kt,ariaDropEffect:_t,ariaErrorMessage:null,ariaExpanded:Kt,ariaFlowTo:_t,ariaGrabbed:Kt,ariaHasPopup:null,ariaHidden:Kt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_t,ariaLevel:xe,ariaLive:null,ariaModal:Kt,ariaMultiLine:Kt,ariaMultiSelectable:Kt,ariaOrientation:null,ariaOwns:_t,ariaPlaceholder:null,ariaPosInSet:xe,ariaPressed:Kt,ariaReadOnly:Kt,ariaRelevant:null,ariaRequired:Kt,ariaRoleDescription:_t,ariaRowCount:xe,ariaRowIndex:xe,ariaRowSpan:xe,ariaSelected:Kt,ariaSetSize:xe,ariaSort:null,ariaValueMax:xe,ariaValueMin:xe,ariaValueNow:xe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function YA(e,t){return t in e?e[t]:t}function ZA(e,t){return YA(e,t.toLowerCase())}const fH=ul({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Lo,acceptCharset:_t,accessKey:_t,action:null,allow:null,allowFullScreen:Ye,allowPaymentRequest:Ye,allowUserMedia:Ye,alt:null,as:null,async:Ye,autoCapitalize:null,autoComplete:_t,autoFocus:Ye,autoPlay:Ye,blocking:_t,capture:null,charSet:null,checked:Ye,cite:null,className:_t,cols:xe,colSpan:null,content:null,contentEditable:Kt,controls:Ye,controlsList:_t,coords:xe|Lo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ye,defer:Ye,dir:null,dirName:null,disabled:Ye,download:ix,draggable:Kt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ye,formTarget:null,headers:_t,height:xe,hidden:ix,high:xe,href:null,hrefLang:null,htmlFor:_t,httpEquiv:_t,id:null,imageSizes:null,imageSrcSet:null,inert:Ye,inputMode:null,integrity:null,is:null,isMap:Ye,itemId:null,itemProp:_t,itemRef:_t,itemScope:Ye,itemType:_t,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ye,low:xe,manifest:null,max:null,maxLength:xe,media:null,method:null,min:null,minLength:xe,multiple:Ye,muted:Ye,name:null,nonce:null,noModule:Ye,noValidate:Ye,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ye,optimum:xe,pattern:null,ping:_t,placeholder:null,playsInline:Ye,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ye,referrerPolicy:null,rel:_t,required:Ye,reversed:Ye,rows:xe,rowSpan:xe,sandbox:_t,scope:null,scoped:Ye,seamless:Ye,selected:Ye,shadowRootClonable:Ye,shadowRootDelegatesFocus:Ye,shadowRootMode:null,shape:null,size:xe,sizes:null,slot:null,span:xe,spellCheck:Kt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:xe,step:null,style:null,tabIndex:xe,target:null,title:null,translate:null,type:null,typeMustMatch:Ye,useMap:null,value:Kt,width:xe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_t,axis:null,background:null,bgColor:null,border:xe,borderColor:null,bottomMargin:xe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ye,declare:Ye,event:null,face:null,frame:null,frameBorder:null,hSpace:xe,leftMargin:xe,link:null,longDesc:null,lowSrc:null,marginHeight:xe,marginWidth:xe,noResize:Ye,noHref:Ye,noShade:Ye,noWrap:Ye,object:null,profile:null,prompt:null,rev:null,rightMargin:xe,rules:null,scheme:null,scrolling:Kt,standby:null,summary:null,text:null,topMargin:xe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:xe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ye,disableRemotePlayback:Ye,prefix:null,property:null,results:xe,security:null,unselectable:null},space:"html",transform:ZA}),hH=ul({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:tr,accentHeight:xe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:xe,amplitude:xe,arabicForm:null,ascent:xe,attributeName:null,attributeType:null,azimuth:xe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:xe,by:null,calcMode:null,capHeight:xe,className:_t,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:xe,diffuseConstant:xe,direction:null,display:null,dur:null,divisor:xe,dominantBaseline:null,download:Ye,dx:null,dy:null,edgeMode:null,editable:null,elevation:xe,enableBackground:null,end:null,event:null,exponent:xe,externalResourcesRequired:null,fill:null,fillOpacity:xe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Lo,g2:Lo,glyphName:Lo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:xe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:xe,horizOriginX:xe,horizOriginY:xe,id:null,ideographic:xe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:xe,k:xe,k1:xe,k2:xe,k3:xe,k4:xe,kernelMatrix:tr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:xe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:xe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:xe,overlineThickness:xe,paintOrder:null,panose1:null,path:null,pathLength:xe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_t,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:xe,pointsAtY:xe,pointsAtZ:xe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:tr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:tr,rev:tr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:tr,requiredFeatures:tr,requiredFonts:tr,requiredFormats:tr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:xe,specularExponent:xe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:xe,strikethroughThickness:xe,string:null,stroke:null,strokeDashArray:tr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:xe,strokeOpacity:xe,strokeWidth:null,style:null,surfaceScale:xe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:tr,tabIndex:xe,tableValues:null,target:null,targetX:xe,targetY:xe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:tr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:xe,underlineThickness:xe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:xe,values:null,vAlphabetic:xe,vMathematical:xe,vectorEffect:null,vHanging:xe,vIdeographic:xe,version:null,vertAdvY:xe,vertOriginX:xe,vertOriginY:xe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:xe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:YA}),XA=ul({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),KA=ul({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ZA}),WA=ul({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),mH={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},pH=/[A-Z]/g,ST=/-[a-z]/g,gH=/^data[-\w.:]+$/i;function yH(e,t){const n=rx(t);let r=t,s=qn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&gH.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(ST,vH);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!ST.test(o)){let l=o.replace(pH,xH);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}s=m0}return new s(r,t)}function xH(e){return"-"+e.toLowerCase()}function vH(e){return e.charAt(1).toUpperCase()}const bH=qA([GA,fH,XA,KA,WA],"html"),p0=qA([GA,hH,XA,KA,WA],"svg");function wH(e){return e.join(" ").trim()}var wo={},Pg,kT;function SH(){if(kT)return Pg;kT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,u=/^\s+|\s+$/g,d=`
327
+ `,h="/",g="*",p="",x="comment",v="declaration";Pg=function(k,E){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];E=E||{};var T=1,A=1;function O(re){var te=re.match(t);te&&(T+=te.length);var ie=re.lastIndexOf(d);A=~ie?re.length-ie:A+re.length}function R(){var re={line:T,column:A};return function(te){return te.position=new M(re),P(),te}}function M(re){this.start=re,this.end={line:T,column:A},this.source=E.source}M.prototype.content=k;function _(re){var te=new Error(E.source+":"+T+":"+A+": "+re);if(te.reason=re,te.filename=E.source,te.line=T,te.column=A,te.source=k,!E.silent)throw te}function D(re){var te=re.exec(k);if(te){var ie=te[0];return O(ie),k=k.slice(ie.length),te}}function P(){D(n)}function B(re){var te;for(re=re||[];te=z();)te!==!1&&re.push(te);return re}function z(){var re=R();if(!(h!=k.charAt(0)||g!=k.charAt(1))){for(var te=2;p!=k.charAt(te)&&(g!=k.charAt(te)||h!=k.charAt(te+1));)++te;if(te+=2,p===k.charAt(te-1))return _("End of comment missing");var ie=k.slice(2,te-2);return A+=2,O(ie),k=k.slice(te),A+=2,re({type:x,comment:ie})}}function H(){var re=R(),te=D(r);if(te){if(z(),!D(s))return _("property missing ':'");var ie=D(o),I=re({type:v,property:S(te[0].replace(e,p)),value:ie?S(ie[0].replace(e,p)):p});return D(l),I}}function $(){var re=[];B(re);for(var te;te=H();)te!==!1&&(re.push(te),B(re));return re}return P(),$()};function S(k){return k?k.replace(u,p):p}return Pg}var CT;function kH(){if(CT)return wo;CT=1;var e=wo&&wo.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(wo,"__esModule",{value:!0}),wo.default=n;var t=e(SH());function n(r,s){var o=null;if(!r||typeof r!="string")return o;var l=(0,t.default)(r),u=typeof s=="function";return l.forEach(function(d){if(d.type==="declaration"){var h=d.property,g=d.value;u?s(h,g,d):g&&(o=o||{},o[h]=g)}}),o}return wo}var hc={},TT;function CH(){if(TT)return hc;TT=1,Object.defineProperty(hc,"__esModule",{value:!0}),hc.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(h){return!h||n.test(h)||e.test(h)},l=function(h,g){return g.toUpperCase()},u=function(h,g){return"".concat(g,"-")},d=function(h,g){return g===void 0&&(g={}),o(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(s,u):h=h.replace(r,u),h.replace(t,l))};return hc.camelCase=d,hc}var mc,ET;function TH(){if(ET)return mc;ET=1;var e=mc&&mc.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(kH()),n=CH();function r(s,o){var l={};return!s||typeof s!="string"||(0,t.default)(s,function(u,d){u&&d&&(l[(0,n.camelCase)(u,o)]=d)}),l}return r.default=r,mc=r,mc}var EH=TH();const _H=Xf(EH),QA=JA("end"),g0=JA("start");function JA(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function jH(e){const t=g0(e),n=QA(e);if(t&&n)return{start:t,end:n}}function Mc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?_T(e.position):"start"in e||"end"in e?_T(e):"line"in e||"column"in e?sx(e):""}function sx(e){return jT(e&&e.line)+":"+jT(e&&e.column)}function _T(e){return sx(e&&e.start)+"-"+sx(e&&e.end)}function jT(e){return e&&typeof e=="number"?e:1}class jn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?s=t:!o.cause&&t&&(l=!0,s=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?o.ruleId=r:(o.source=r.slice(0,d),o.ruleId=r.slice(d+1))}if(!o.place&&o.ancestors&&o.ancestors){const d=o.ancestors[o.ancestors.length-1];d&&(o.place=d.position)}const u=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file,this.message=s,this.line=u?u.line:void 0,this.name=Mc(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}jn.prototype.file="";jn.prototype.name="";jn.prototype.reason="";jn.prototype.message="";jn.prototype.stack="";jn.prototype.column=void 0;jn.prototype.line=void 0;jn.prototype.ancestors=void 0;jn.prototype.cause=void 0;jn.prototype.fatal=void 0;jn.prototype.place=void 0;jn.prototype.ruleId=void 0;jn.prototype.source=void 0;const y0={}.hasOwnProperty,NH=new Map,AH=/[A-Z]/g,RH=new Set(["table","tbody","thead","tfoot","tr"]),MH=new Set(["td","th"]),eR="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function OH(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=UH(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=VH(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?p0:bH,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=tR(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function tR(e,t,n){if(t.type==="element")return DH(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return PH(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return LH(e,t,n);if(t.type==="mdxjsEsm")return zH(e,t);if(t.type==="root")return IH(e,t,n);if(t.type==="text")return BH(e,t)}function DH(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=p0,e.schema=s),e.ancestors.push(t);const o=rR(e,t.tagName,!1),l=HH(e,t);let u=v0(e,t);return RH.has(t.tagName)&&(u=u.filter(function(d){return typeof d=="string"?!uH(d):!0})),nR(e,l,o,t),x0(l,u),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function PH(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Kc(e,t.position)}function zH(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Kc(e,t.position)}function LH(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=p0,e.schema=s),e.ancestors.push(t);const o=t.name===null?e.Fragment:rR(e,t.name,!0),l=FH(e,t),u=v0(e,t);return nR(e,l,o,t),x0(l,u),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function IH(e,t,n){const r={};return x0(r,v0(e,t)),e.create(t,e.Fragment,r,n)}function BH(e,t){return t.value}function nR(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function x0(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function VH(e,t,n){return r;function r(s,o,l,u){const h=Array.isArray(l.children)?n:t;return u?h(o,l,u):h(o,l)}}function UH(e,t){return n;function n(r,s,o,l){const u=Array.isArray(o.children),d=g0(r);return t(s,o,l,u,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function HH(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&y0.call(t.properties,s)){const o=$H(e,s,t.properties[s]);if(o){const[l,u]=o;e.tableCellAlignToStyle&&l==="align"&&typeof u=="string"&&MH.has(t.tagName)?r=u:n[l]=u}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function FH(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const u=l.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else Kc(e,t.position);else{const s=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,o=e.evaluater.evaluateExpression(u.expression)}else Kc(e,t.position);else o=r.value===null?!0:r.value;n[s]=o}return n}function v0(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:NH;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const d=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(d){const h=s.get(d)||0;l=d+"-"+h,s.set(d,h+1)}}const u=tR(e,o,l);u!==void 0&&n.push(u)}return n}function $H(e,t,n){const r=yH(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?aH(n):wH(n)),r.property==="style"){let s=typeof n=="object"?n:qH(e,String(n));return e.stylePropertyNameCase==="css"&&(s=GH(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?mH[r.property]||r.property:r.attribute,n]}}function qH(e,t){try{return _H(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new jn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=eR+"#cannot-parse-style-attribute",s}}function rR(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let o=-1,l;for(;++o<s.length;){const u=vT(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};l=l?{type:"MemberExpression",object:l,property:u,computed:!!(o&&u.type==="Literal"),optional:!1}:u}r=l}else r=vT(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return y0.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Kc(e)}function Kc(e,t){const n=new jn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=eR+"#cannot-handle-mdx-estrees-without-createevaluater",n}function GH(e){const t={};let n;for(n in e)y0.call(e,n)&&(t[YH(n)]=e[n]);return t}function YH(e){let t=e.replace(AH,ZH);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ZH(e){return"-"+e.toLowerCase()}const zg={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},XH={};function b0(e,t){const n=XH,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return iR(e,r,s)}function iR(e,t,n){if(KH(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return NT(e.children,t,n)}return Array.isArray(e)?NT(e,t,n):""}function NT(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=iR(e[s],t,n);return r.join("")}function KH(e){return!!(e&&typeof e=="object")}const AT=document.createElement("i");function w0(e){const t="&"+e+";";AT.innerHTML=t;const n=AT.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function or(e,t,n,r){const s=e.length;let o=0,l;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function wr(e,t){return e.length>0?(or(e,e.length,0,t),e):t}const RT={}.hasOwnProperty;function aR(e){const t={};let n=-1;for(;++n<e.length;)WH(t,e[n]);return t}function WH(e,t){let n;for(n in t){const s=(RT.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){RT.call(s,l)||(s[l]=[]);const u=o[l];QH(s[l],Array.isArray(u)?u:u?[u]:[])}}}function QH(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);or(e,0,0,r)}function sR(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Br(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Rn=Da(/[A-Za-z]/),_n=Da(/[\dA-Za-z]/),JH=Da(/[#-'*+\--9=?A-Z^-~]/);function Rf(e){return e!==null&&(e<32||e===127)}const ox=Da(/\d/),eF=Da(/[\dA-Fa-f]/),tF=Da(/[!-/:-@[-`{-~]/);function Pe(e){return e!==null&&e<-2}function St(e){return e!==null&&(e<0||e===32)}function rt(e){return e===-2||e===-1||e===32}const jh=Da(new RegExp("\\p{P}|\\p{S}","u")),ws=Da(/\s/);function Da(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function dl(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&_n(e.charCodeAt(n+1))&&_n(e.charCodeAt(n+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const u=e.charCodeAt(n+1);o<56320&&u>56319&&u<57344?(l=String.fromCharCode(o,u),s=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+s+1,l=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function ut(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(d){return rt(d)?(e.enter(n),u(d)):t(d)}function u(d){return rt(d)&&o++<s?(e.consume(d),u):(e.exit(n),t(d))}}const nF={tokenize:rF};function rF(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),ut(e,t,"linePrefix")}function s(u){return e.enter("paragraph"),o(u)}function o(u){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(u)}function l(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Pe(u)?(e.consume(u),e.exit("chunkText"),o):(e.consume(u),l)}}const iF={tokenize:aF},MT={tokenize:sF};function aF(e){const t=this,n=[];let r=0,s,o,l;return u;function u(O){if(r<n.length){const R=n[r];return t.containerState=R[1],e.attempt(R[0].continuation,d,h)(O)}return h(O)}function d(O){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&A();const R=t.events.length;let M=R,_;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){_=t.events[M][1].end;break}T(r);let D=R;for(;D<t.events.length;)t.events[D][1].end={..._},D++;return or(t.events,M+1,0,t.events.slice(R)),t.events.length=D,h(O)}return u(O)}function h(O){if(r===n.length){if(!s)return x(O);if(s.currentConstruct&&s.currentConstruct.concrete)return S(O);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(MT,g,p)(O)}function g(O){return s&&A(),T(r),x(O)}function p(O){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,S(O)}function x(O){return t.containerState={},e.attempt(MT,v,S)(O)}function v(O){return r++,n.push([t.currentConstruct,t.containerState]),x(O)}function S(O){if(O===null){s&&A(),T(0),e.consume(O);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),k(O)}function k(O){if(O===null){E(e.exit("chunkFlow"),!0),T(0),e.consume(O);return}return Pe(O)?(e.consume(O),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(O),k)}function E(O,R){const M=t.sliceStream(O);if(R&&M.push(null),O.previous=o,o&&(o.next=O),o=O,s.defineSkip(O.start),s.write(M),t.parser.lazy[O.start.line]){let _=s.events.length;for(;_--;)if(s.events[_][1].start.offset<l&&(!s.events[_][1].end||s.events[_][1].end.offset>l))return;const D=t.events.length;let P=D,B,z;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(B){z=t.events[P][1].end;break}B=!0}for(T(r),_=D;_<t.events.length;)t.events[_][1].end={...z},_++;or(t.events,P+1,0,t.events.slice(D)),t.events.length=_}}function T(O){let R=n.length;for(;R-- >O;){const M=n[R];t.containerState=M[1],M[0].exit.call(t,e)}n.length=O}function A(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function sF(e,t,n){return ut(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Zo(e){if(e===null||St(e)||ws(e))return 1;if(jh(e))return 2}function Nh(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const o=e[s].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const lx={name:"attention",resolveAll:oF,tokenize:lF};function oF(e,t){let n=-1,r,s,o,l,u,d,h,g;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},x={...e[n][1].start};OT(p,-d),OT(x,d),l={type:d>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},u={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},o={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:d>1?"strong":"emphasis",start:{...l.start},end:{...u.end}},e[r][1].end={...l.start},e[n][1].start={...u.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=wr(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=wr(h,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",o,t]]),h=wr(h,Nh(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=wr(h,[["exit",o,t],["enter",u,t],["exit",u,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(g=2,h=wr(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):g=0,or(e,r-1,n-r+3,h),n=r+h.length-g-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function lF(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Zo(r);let o;return l;function l(d){return o=d,e.enter("attentionSequence"),u(d)}function u(d){if(d===o)return e.consume(d),u;const h=e.exit("attentionSequence"),g=Zo(d),p=!g||g===2&&s||n.includes(d),x=!s||s===2&&g||n.includes(r);return h._open=!!(o===42?p:p&&(s||!x)),h._close=!!(o===42?x:x&&(g||!p)),t(d)}}function OT(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const cF={name:"autolink",tokenize:uF};function uF(e,t,n){let r=0;return s;function s(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(v){return Rn(v)?(e.consume(v),l):v===64?n(v):h(v)}function l(v){return v===43||v===45||v===46||_n(v)?(r=1,u(v)):h(v)}function u(v){return v===58?(e.consume(v),r=0,d):(v===43||v===45||v===46||_n(v))&&r++<32?(e.consume(v),u):(r=0,h(v))}function d(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||Rf(v)?n(v):(e.consume(v),d)}function h(v){return v===64?(e.consume(v),g):JH(v)?(e.consume(v),h):n(v)}function g(v){return _n(v)?p(v):n(v)}function p(v){return v===46?(e.consume(v),r=0,g):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):x(v)}function x(v){if((v===45||_n(v))&&r++<63){const S=v===45?x:p;return e.consume(v),S}return n(v)}}const pu={partial:!0,tokenize:dF};function dF(e,t,n){return r;function r(o){return rt(o)?ut(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||Pe(o)?t(o):n(o)}}const oR={continuation:{tokenize:hF},exit:mF,name:"blockQuote",tokenize:fF};function fF(e,t,n){const r=this;return s;function s(l){if(l===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return rt(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function hF(e,t,n){const r=this;return s;function s(l){return rt(l)?ut(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(oR,t,n)(l)}}function mF(e){e.exit("blockQuote")}const lR={name:"characterEscape",tokenize:pF};function pF(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),s}function s(o){return tF(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const cR={name:"characterReference",tokenize:gF};function gF(e,t,n){const r=this;let s=0,o,l;return u;function u(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),d}function d(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,l=_n,g(p))}function h(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=eF,g):(e.enter("characterReferenceValue"),o=7,l=ox,g(p))}function g(p){if(p===59&&s){const x=e.exit("characterReferenceValue");return l===_n&&!w0(r.sliceSerialize(x))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(p)&&s++<o?(e.consume(p),g):n(p)}}const DT={partial:!0,tokenize:xF},PT={concrete:!0,name:"codeFenced",tokenize:yF};function yF(e,t,n){const r=this,s={partial:!0,tokenize:M};let o=0,l=0,u;return d;function d(_){return h(_)}function h(_){const D=r.events[r.events.length-1];return o=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,u=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(_)}function g(_){return _===u?(l++,e.consume(_),g):l<3?n(_):(e.exit("codeFencedFenceSequence"),rt(_)?ut(e,p,"whitespace")(_):p(_))}function p(_){return _===null||Pe(_)?(e.exit("codeFencedFence"),r.interrupt?t(_):e.check(DT,k,R)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(_))}function x(_){return _===null||Pe(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(_)):rt(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ut(e,v,"whitespace")(_)):_===96&&_===u?n(_):(e.consume(_),x)}function v(_){return _===null||Pe(_)?p(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(_))}function S(_){return _===null||Pe(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(_)):_===96&&_===u?n(_):(e.consume(_),S)}function k(_){return e.attempt(s,R,E)(_)}function E(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),T}function T(_){return o>0&&rt(_)?ut(e,A,"linePrefix",o+1)(_):A(_)}function A(_){return _===null||Pe(_)?e.check(DT,k,R)(_):(e.enter("codeFlowValue"),O(_))}function O(_){return _===null||Pe(_)?(e.exit("codeFlowValue"),A(_)):(e.consume(_),O)}function R(_){return e.exit("codeFenced"),t(_)}function M(_,D,P){let B=0;return z;function z(ie){return _.enter("lineEnding"),_.consume(ie),_.exit("lineEnding"),H}function H(ie){return _.enter("codeFencedFence"),rt(ie)?ut(_,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ie):$(ie)}function $(ie){return ie===u?(_.enter("codeFencedFenceSequence"),re(ie)):P(ie)}function re(ie){return ie===u?(B++,_.consume(ie),re):B>=l?(_.exit("codeFencedFenceSequence"),rt(ie)?ut(_,te,"whitespace")(ie):te(ie)):P(ie)}function te(ie){return ie===null||Pe(ie)?(_.exit("codeFencedFence"),D(ie)):P(ie)}}}function xF(e,t,n){const r=this;return s;function s(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const Lg={name:"codeIndented",tokenize:bF},vF={partial:!0,tokenize:wF};function bF(e,t,n){const r=this;return s;function s(h){return e.enter("codeIndented"),ut(e,o,"linePrefix",5)(h)}function o(h){const g=r.events[r.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?d(h):Pe(h)?e.attempt(vF,l,d)(h):(e.enter("codeFlowValue"),u(h))}function u(h){return h===null||Pe(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),u)}function d(h){return e.exit("codeIndented"),t(h)}}function wF(e,t,n){const r=this;return s;function s(l){return r.parser.lazy[r.now().line]?n(l):Pe(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):ut(e,o,"linePrefix",5)(l)}function o(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):Pe(l)?s(l):n(l)}}const SF={name:"codeText",previous:CF,resolve:kF,tokenize:TF};function kF(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function CF(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function TF(e,t,n){let r=0,s,o;return l;function l(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),r++,u):(e.exit("codeTextSequence"),d(p))}function d(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),d):p===96?(o=e.enter("codeTextSequence"),s=0,g(p)):Pe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||Pe(p)?(e.exit("codeTextData"),d(p)):(e.consume(p),h)}function g(p){return p===96?(e.consume(p),s++,g):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(o.type="codeTextData",h(p))}}class EF{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&pc(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),pc(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),pc(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);pc(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);pc(this.left,n.reverse())}}}function pc(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function uR(e){const t={};let n=-1,r,s,o,l,u,d,h;const g=new EF(e);for(;++n<g.length;){for(;n in t;)n=t[n];if(r=g.get(n),n&&r[1].type==="chunkFlow"&&g.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,o=0,o<d.length&&d[o][1].type==="lineEndingBlank"&&(o+=2),o<d.length&&d[o][1].type==="content"))for(;++o<d.length&&d[o][1].type!=="content";)d[o][1].type==="chunkText"&&(d[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,_F(g,n)),n=t[n],h=!0);else if(r[1]._container){for(o=n,s=void 0;o--;)if(l=g.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(s&&(g.get(s)[1].type="lineEndingBlank"),l[1].type="lineEnding",s=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;s&&(r[1].end={...g.get(s)[1].start},u=g.slice(s,n),u.unshift(r),g.splice(s,n-s+1,u))}}return or(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function _F(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const u=l.events,d=[],h={};let g,p,x=-1,v=n,S=0,k=0;const E=[k];for(;v;){for(;e.get(++s)[1]!==v;);o.push(s),v._tokenizer||(g=r.sliceStream(v),v.next||g.push(null),p&&l.defineSkip(v.start),v._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(g),v._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),p=v,v=v.next}for(v=n;++x<u.length;)u[x][0]==="exit"&&u[x-1][0]==="enter"&&u[x][1].type===u[x-1][1].type&&u[x][1].start.line!==u[x][1].end.line&&(k=x+1,E.push(k),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(l.events=[],v?(v._tokenizer=void 0,v.previous=void 0):E.pop(),x=E.length;x--;){const T=u.slice(E[x],E[x+1]),A=o.pop();d.push([A,A+T.length-1]),e.splice(A,2,T)}for(d.reverse(),x=-1;++x<d.length;)h[S+d[x][0]]=S+d[x][1],S+=d[x][1]-d[x][0]-1;return h}const jF={resolve:AF,tokenize:RF},NF={partial:!0,tokenize:MF};function AF(e){return uR(e),e}function RF(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(u)}function s(u){return u===null?o(u):Pe(u)?e.check(NF,l,o)(u):(e.consume(u),s)}function o(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function l(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function MF(e,t,n){const r=this;return s;function s(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),ut(e,o,"linePrefix")}function o(l){if(l===null||Pe(l))return n(l);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function dR(e,t,n,r,s,o,l,u,d){const h=d||Number.POSITIVE_INFINITY;let g=0;return p;function p(T){return T===60?(e.enter(r),e.enter(s),e.enter(o),e.consume(T),e.exit(o),x):T===null||T===32||T===41||Rf(T)?n(T):(e.enter(r),e.enter(l),e.enter(u),e.enter("chunkString",{contentType:"string"}),k(T))}function x(T){return T===62?(e.enter(o),e.consume(T),e.exit(o),e.exit(s),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),v(T))}function v(T){return T===62?(e.exit("chunkString"),e.exit(u),x(T)):T===null||T===60||Pe(T)?n(T):(e.consume(T),T===92?S:v)}function S(T){return T===60||T===62||T===92?(e.consume(T),v):v(T)}function k(T){return!g&&(T===null||T===41||St(T))?(e.exit("chunkString"),e.exit(u),e.exit(l),e.exit(r),t(T)):g<h&&T===40?(e.consume(T),g++,k):T===41?(e.consume(T),g--,k):T===null||T===32||T===40||Rf(T)?n(T):(e.consume(T),T===92?E:k)}function E(T){return T===40||T===41||T===92?(e.consume(T),k):k(T)}}function fR(e,t,n,r,s,o){const l=this;let u=0,d;return h;function h(v){return e.enter(r),e.enter(s),e.consume(v),e.exit(s),e.enter(o),g}function g(v){return u>999||v===null||v===91||v===93&&!d||v===94&&!u&&"_hiddenFootnoteSupport"in l.parser.constructs?n(v):v===93?(e.exit(o),e.enter(s),e.consume(v),e.exit(s),e.exit(r),t):Pe(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===null||v===91||v===93||Pe(v)||u++>999?(e.exit("chunkString"),g(v)):(e.consume(v),d||(d=!rt(v)),v===92?x:p)}function x(v){return v===91||v===92||v===93?(e.consume(v),u++,p):p(v)}}function hR(e,t,n,r,s,o){let l;return u;function u(x){return x===34||x===39||x===40?(e.enter(r),e.enter(s),e.consume(x),e.exit(s),l=x===40?41:x,d):n(x)}function d(x){return x===l?(e.enter(s),e.consume(x),e.exit(s),e.exit(r),t):(e.enter(o),h(x))}function h(x){return x===l?(e.exit(o),d(l)):x===null?n(x):Pe(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),ut(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===l||x===null||Pe(x)?(e.exit("chunkString"),h(x)):(e.consume(x),x===92?p:g)}function p(x){return x===l||x===92?(e.consume(x),g):g(x)}}function Oc(e,t){let n;return r;function r(s){return Pe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):rt(s)?ut(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const OF={name:"definition",tokenize:PF},DF={partial:!0,tokenize:zF};function PF(e,t,n){const r=this;let s;return o;function o(v){return e.enter("definition"),l(v)}function l(v){return fR.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function u(v){return s=Br(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),d):n(v)}function d(v){return St(v)?Oc(e,h)(v):h(v)}function h(v){return dR(e,g,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function g(v){return e.attempt(DF,p,p)(v)}function p(v){return rt(v)?ut(e,x,"whitespace")(v):x(v)}function x(v){return v===null||Pe(v)?(e.exit("definition"),r.parser.defined.push(s),t(v)):n(v)}}function zF(e,t,n){return r;function r(u){return St(u)?Oc(e,s)(u):n(u)}function s(u){return hR(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function o(u){return rt(u)?ut(e,l,"whitespace")(u):l(u)}function l(u){return u===null||Pe(u)?t(u):n(u)}}const LF={name:"hardBreakEscape",tokenize:IF};function IF(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return Pe(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const BF={name:"headingAtx",resolve:VF,tokenize:UF};function VF(e,t){let n=e.length-2,r=3,s,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},or(e,r,n-r+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function UF(e,t,n){let r=0;return s;function s(g){return e.enter("atxHeading"),o(g)}function o(g){return e.enter("atxHeadingSequence"),l(g)}function l(g){return g===35&&r++<6?(e.consume(g),l):g===null||St(g)?(e.exit("atxHeadingSequence"),u(g)):n(g)}function u(g){return g===35?(e.enter("atxHeadingSequence"),d(g)):g===null||Pe(g)?(e.exit("atxHeading"),t(g)):rt(g)?ut(e,u,"whitespace")(g):(e.enter("atxHeadingText"),h(g))}function d(g){return g===35?(e.consume(g),d):(e.exit("atxHeadingSequence"),u(g))}function h(g){return g===null||g===35||St(g)?(e.exit("atxHeadingText"),u(g)):(e.consume(g),h)}}const HF=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],zT=["pre","script","style","textarea"],FF={concrete:!0,name:"htmlFlow",resolveTo:GF,tokenize:YF},$F={partial:!0,tokenize:XF},qF={partial:!0,tokenize:ZF};function GF(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function YF(e,t,n){const r=this;let s,o,l,u,d;return h;function h(N){return g(N)}function g(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),p}function p(N){return N===33?(e.consume(N),x):N===47?(e.consume(N),o=!0,k):N===63?(e.consume(N),s=3,r.interrupt?t:C):Rn(N)?(e.consume(N),l=String.fromCharCode(N),E):n(N)}function x(N){return N===45?(e.consume(N),s=2,v):N===91?(e.consume(N),s=5,u=0,S):Rn(N)?(e.consume(N),s=4,r.interrupt?t:C):n(N)}function v(N){return N===45?(e.consume(N),r.interrupt?t:C):n(N)}function S(N){const K="CDATA[";return N===K.charCodeAt(u++)?(e.consume(N),u===K.length?r.interrupt?t:$:S):n(N)}function k(N){return Rn(N)?(e.consume(N),l=String.fromCharCode(N),E):n(N)}function E(N){if(N===null||N===47||N===62||St(N)){const K=N===47,Q=l.toLowerCase();return!K&&!o&&zT.includes(Q)?(s=1,r.interrupt?t(N):$(N)):HF.includes(l.toLowerCase())?(s=6,K?(e.consume(N),T):r.interrupt?t(N):$(N)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):o?A(N):O(N))}return N===45||_n(N)?(e.consume(N),l+=String.fromCharCode(N),E):n(N)}function T(N){return N===62?(e.consume(N),r.interrupt?t:$):n(N)}function A(N){return rt(N)?(e.consume(N),A):z(N)}function O(N){return N===47?(e.consume(N),z):N===58||N===95||Rn(N)?(e.consume(N),R):rt(N)?(e.consume(N),O):z(N)}function R(N){return N===45||N===46||N===58||N===95||_n(N)?(e.consume(N),R):M(N)}function M(N){return N===61?(e.consume(N),_):rt(N)?(e.consume(N),M):O(N)}function _(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),d=N,D):rt(N)?(e.consume(N),_):P(N)}function D(N){return N===d?(e.consume(N),d=null,B):N===null||Pe(N)?n(N):(e.consume(N),D)}function P(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||St(N)?M(N):(e.consume(N),P)}function B(N){return N===47||N===62||rt(N)?O(N):n(N)}function z(N){return N===62?(e.consume(N),H):n(N)}function H(N){return N===null||Pe(N)?$(N):rt(N)?(e.consume(N),H):n(N)}function $(N){return N===45&&s===2?(e.consume(N),I):N===60&&s===1?(e.consume(N),F):N===62&&s===4?(e.consume(N),G):N===63&&s===3?(e.consume(N),C):N===93&&s===5?(e.consume(N),Z):Pe(N)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check($F,le,re)(N)):N===null||Pe(N)?(e.exit("htmlFlowData"),re(N)):(e.consume(N),$)}function re(N){return e.check(qF,te,le)(N)}function te(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),ie}function ie(N){return N===null||Pe(N)?re(N):(e.enter("htmlFlowData"),$(N))}function I(N){return N===45?(e.consume(N),C):$(N)}function F(N){return N===47?(e.consume(N),l="",V):$(N)}function V(N){if(N===62){const K=l.toLowerCase();return zT.includes(K)?(e.consume(N),G):$(N)}return Rn(N)&&l.length<8?(e.consume(N),l+=String.fromCharCode(N),V):$(N)}function Z(N){return N===93?(e.consume(N),C):$(N)}function C(N){return N===62?(e.consume(N),G):N===45&&s===2?(e.consume(N),C):$(N)}function G(N){return N===null||Pe(N)?(e.exit("htmlFlowData"),le(N)):(e.consume(N),G)}function le(N){return e.exit("htmlFlow"),t(N)}}function ZF(e,t,n){const r=this;return s;function s(l){return Pe(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function XF(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(pu,t,n)}}const KF={name:"htmlText",tokenize:WF};function WF(e,t,n){const r=this;let s,o,l;return u;function u(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),d}function d(C){return C===33?(e.consume(C),h):C===47?(e.consume(C),M):C===63?(e.consume(C),O):Rn(C)?(e.consume(C),P):n(C)}function h(C){return C===45?(e.consume(C),g):C===91?(e.consume(C),o=0,S):Rn(C)?(e.consume(C),A):n(C)}function g(C){return C===45?(e.consume(C),v):n(C)}function p(C){return C===null?n(C):C===45?(e.consume(C),x):Pe(C)?(l=p,F(C)):(e.consume(C),p)}function x(C){return C===45?(e.consume(C),v):p(C)}function v(C){return C===62?I(C):C===45?x(C):p(C)}function S(C){const G="CDATA[";return C===G.charCodeAt(o++)?(e.consume(C),o===G.length?k:S):n(C)}function k(C){return C===null?n(C):C===93?(e.consume(C),E):Pe(C)?(l=k,F(C)):(e.consume(C),k)}function E(C){return C===93?(e.consume(C),T):k(C)}function T(C){return C===62?I(C):C===93?(e.consume(C),T):k(C)}function A(C){return C===null||C===62?I(C):Pe(C)?(l=A,F(C)):(e.consume(C),A)}function O(C){return C===null?n(C):C===63?(e.consume(C),R):Pe(C)?(l=O,F(C)):(e.consume(C),O)}function R(C){return C===62?I(C):O(C)}function M(C){return Rn(C)?(e.consume(C),_):n(C)}function _(C){return C===45||_n(C)?(e.consume(C),_):D(C)}function D(C){return Pe(C)?(l=D,F(C)):rt(C)?(e.consume(C),D):I(C)}function P(C){return C===45||_n(C)?(e.consume(C),P):C===47||C===62||St(C)?B(C):n(C)}function B(C){return C===47?(e.consume(C),I):C===58||C===95||Rn(C)?(e.consume(C),z):Pe(C)?(l=B,F(C)):rt(C)?(e.consume(C),B):I(C)}function z(C){return C===45||C===46||C===58||C===95||_n(C)?(e.consume(C),z):H(C)}function H(C){return C===61?(e.consume(C),$):Pe(C)?(l=H,F(C)):rt(C)?(e.consume(C),H):B(C)}function $(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),s=C,re):Pe(C)?(l=$,F(C)):rt(C)?(e.consume(C),$):(e.consume(C),te)}function re(C){return C===s?(e.consume(C),s=void 0,ie):C===null?n(C):Pe(C)?(l=re,F(C)):(e.consume(C),re)}function te(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||St(C)?B(C):(e.consume(C),te)}function ie(C){return C===47||C===62||St(C)?B(C):n(C)}function I(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function F(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),V}function V(C){return rt(C)?ut(e,Z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):Z(C)}function Z(C){return e.enter("htmlTextData"),l(C)}}const S0={name:"labelEnd",resolveAll:t$,resolveTo:n$,tokenize:r$},QF={tokenize:i$},JF={tokenize:a$},e$={tokenize:s$};function t$(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&or(e,0,e.length,n),e}function n$(e,t){let n=e.length,r=0,s,o,l,u;for(;n--;)if(s=e[n][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(l=n);const d={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},g={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return u=[["enter",d,t],["enter",h,t]],u=wr(u,e.slice(o+1,o+r+3)),u=wr(u,[["enter",g,t]]),u=wr(u,Nh(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),u=wr(u,[["exit",g,t],e[l-2],e[l-1],["exit",h,t]]),u=wr(u,e.slice(l+1)),u=wr(u,[["exit",d,t]]),or(e,o,e.length,u),e}function r$(e,t,n){const r=this;let s=r.events.length,o,l;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){o=r.events[s][1];break}return u;function u(x){return o?o._inactive?p(x):(l=r.parser.defined.includes(Br(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),d):n(x)}function d(x){return x===40?e.attempt(QF,g,l?g:p)(x):x===91?e.attempt(JF,g,l?h:p)(x):l?g(x):p(x)}function h(x){return e.attempt(e$,g,p)(x)}function g(x){return t(x)}function p(x){return o._balanced=!0,n(x)}}function i$(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),s}function s(p){return St(p)?Oc(e,o)(p):o(p)}function o(p){return p===41?g(p):dR(e,l,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function l(p){return St(p)?Oc(e,d)(p):g(p)}function u(p){return n(p)}function d(p){return p===34||p===39||p===40?hR(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):g(p)}function h(p){return St(p)?Oc(e,g)(p):g(p)}function g(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function a$(e,t,n){const r=this;return s;function s(u){return fR.call(r,e,o,l,"reference","referenceMarker","referenceString")(u)}function o(u){return r.parser.defined.includes(Br(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function l(u){return n(u)}}function s$(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),s}function s(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const o$={name:"labelStartImage",resolveAll:S0.resolveAll,tokenize:l$};function l$(e,t,n){const r=this;return s;function s(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),o}function o(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),l):n(u)}function l(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const c$={name:"labelStartLink",resolveAll:S0.resolveAll,tokenize:u$};function u$(e,t,n){const r=this;return s;function s(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const Ig={name:"lineEnding",tokenize:d$};function d$(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ut(e,t,"linePrefix")}}const uf={name:"thematicBreak",tokenize:f$};function f$(e,t,n){let r=0,s;return o;function o(h){return e.enter("thematicBreak"),l(h)}function l(h){return s=h,u(h)}function u(h){return h===s?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Pe(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===s?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),rt(h)?ut(e,u,"whitespace")(h):u(h))}}const Un={continuation:{tokenize:g$},exit:x$,name:"list",tokenize:p$},h$={partial:!0,tokenize:v$},m$={partial:!0,tokenize:y$};function p$(e,t,n){const r=this,s=r.events[r.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,l=0;return u;function u(v){const S=r.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||v===r.containerState.marker:ox(v)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(uf,n,h)(v):h(v);if(!r.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(v)}return n(v)}function d(v){return ox(v)&&++l<10?(e.consume(v),d):(!r.interrupt||l<2)&&(r.containerState.marker?v===r.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):n(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||v,e.check(pu,r.interrupt?n:g,e.attempt(h$,x,p))}function g(v){return r.containerState.initialBlankLine=!0,o++,x(v)}function p(v){return rt(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),x):n(v)}function x(v){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function g$(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(pu,s,o);function s(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ut(e,t,"listItemIndent",r.containerState.size+1)(u)}function o(u){return r.containerState.furtherBlankLines||!rt(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(m$,t,l)(u))}function l(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,ut(e,e.attempt(Un,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function y$(e,t,n){const r=this;return ut(e,s,"listItemIndent",r.containerState.size+1);function s(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function x$(e){e.exit(this.containerState.type)}function v$(e,t,n){const r=this;return ut(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const l=r.events[r.events.length-1];return!rt(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const LT={name:"setextUnderline",resolveTo:b$,tokenize:w$};function b$(e,t){let n=e.length,r,s,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function w$(e,t,n){const r=this;let s;return o;function o(h){let g=r.events.length,p;for(;g--;)if(r.events[g][1].type!=="lineEnding"&&r.events[g][1].type!=="linePrefix"&&r.events[g][1].type!=="content"){p=r.events[g][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),s=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),u(h)}function u(h){return h===s?(e.consume(h),u):(e.exit("setextHeadingLineSequence"),rt(h)?ut(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Pe(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const S$={tokenize:k$};function k$(e){const t=this,n=e.attempt(pu,r,e.attempt(this.parser.constructs.flowInitial,s,ut(e,e.attempt(this.parser.constructs.flow,s,e.attempt(jF,s)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const C$={resolveAll:pR()},T$=mR("string"),E$=mR("text");function mR(e){return{resolveAll:pR(e==="text"?_$:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],o=n.attempt(s,l,u);return l;function l(g){return h(g)?o(g):u(g)}function u(g){if(g===null){n.consume(g);return}return n.enter("data"),n.consume(g),d}function d(g){return h(g)?(n.exit("data"),o(g)):(n.consume(g),d)}function h(g){if(g===null)return!0;const p=s[g];let x=-1;if(p)for(;++x<p.length;){const v=p[x];if(!v.previous||v.previous.call(r,r.previous))return!0}return!1}}}function pR(e){return t;function t(n,r){let s=-1,o;for(;++s<=n.length;)o===void 0?n[s]&&n[s][1].type==="data"&&(o=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==o+2&&(n[o][1].end=n[s-1][1].end,n.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(n,r):n}}function _$(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let o=s.length,l=-1,u=0,d;for(;o--;){const h=s[o];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)u++,l--;if(l)break;l=-1}else if(h===-2)d=!0,u++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const h={type:n===e.length||d||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const j$={42:Un,43:Un,45:Un,48:Un,49:Un,50:Un,51:Un,52:Un,53:Un,54:Un,55:Un,56:Un,57:Un,62:oR},N$={91:OF},A$={[-2]:Lg,[-1]:Lg,32:Lg},R$={35:BF,42:uf,45:[LT,uf],60:FF,61:LT,95:uf,96:PT,126:PT},M$={38:cR,92:lR},O$={[-5]:Ig,[-4]:Ig,[-3]:Ig,33:o$,38:cR,42:lx,60:[cF,KF],91:c$,92:[LF,lR],93:S0,95:lx,96:SF},D$={null:[lx,C$]},P$={null:[42,95]},z$={null:[]},L$=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:P$,contentInitial:N$,disable:z$,document:j$,flow:R$,flowInitial:A$,insideSpan:D$,string:M$,text:O$},Symbol.toStringTag,{value:"Module"}));function I$(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},o=[];let l=[],u=[];const d={attempt:D(M),check:D(_),consume:A,enter:O,exit:R,interrupt:D(_,{interrupt:!0})},h={code:null,containerState:{},defineSkip:k,events:[],now:S,parser:e,previous:null,sliceSerialize:x,sliceStream:v,write:p};let g=t.tokenize.call(h,d);return t.resolveAll&&o.push(t),h;function p(H){return l=wr(l,H),E(),l[l.length-1]!==null?[]:(P(t,0),h.events=Nh(o,h.events,h),h.events)}function x(H,$){return V$(v(H),$)}function v(H){return B$(l,H)}function S(){const{_bufferIndex:H,_index:$,line:re,column:te,offset:ie}=r;return{_bufferIndex:H,_index:$,line:re,column:te,offset:ie}}function k(H){s[H.line]=H.column,z()}function E(){let H;for(;r._index<l.length;){const $=l[r._index];if(typeof $=="string")for(H=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===H&&r._bufferIndex<$.length;)T($.charCodeAt(r._bufferIndex));else T($)}}function T(H){g=g(H)}function A(H){Pe(H)?(r.line++,r.column=1,r.offset+=H===-3?2:1,z()):H!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=H}function O(H,$){const re=$||{};return re.type=H,re.start=S(),h.events.push(["enter",re,h]),u.push(re),re}function R(H){const $=u.pop();return $.end=S(),h.events.push(["exit",$,h]),$}function M(H,$){P(H,$.from)}function _(H,$){$.restore()}function D(H,$){return re;function re(te,ie,I){let F,V,Z,C;return Array.isArray(te)?le(te):"tokenize"in te?le([te]):G(te);function G(X){return Y;function Y(oe){const ce=oe!==null&&X[oe],me=oe!==null&&X.null,be=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(me)?me:me?[me]:[]];return le(be)(oe)}}function le(X){return F=X,V=0,X.length===0?I:N(X[V])}function N(X){return Y;function Y(oe){return C=B(),Z=X,X.partial||(h.currentConstruct=X),X.name&&h.parser.constructs.disable.null.includes(X.name)?Q():X.tokenize.call($?Object.assign(Object.create(h),$):h,d,K,Q)(oe)}}function K(X){return H(Z,C),ie}function Q(X){return C.restore(),++V<F.length?N(F[V]):I}}}function P(H,$){H.resolveAll&&!o.includes(H)&&o.push(H),H.resolve&&or(h.events,$,h.events.length-$,H.resolve(h.events.slice($),h)),H.resolveTo&&(h.events=H.resolveTo(h.events,h))}function B(){const H=S(),$=h.previous,re=h.currentConstruct,te=h.events.length,ie=Array.from(u);return{from:te,restore:I};function I(){r=H,h.previous=$,h.currentConstruct=re,h.events.length=te,u=ie,z()}}function z(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function B$(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,o=t.end._bufferIndex;let l;if(n===s)l=[e[n].slice(r,o)];else{if(l=e.slice(n,s),r>-1){const u=l[0];typeof u=="string"?l[0]=u.slice(r):l.shift()}o>0&&l.push(e[s].slice(0,o))}return l}function V$(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
328
+ `;break}case-3:{l=`\r
329
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&s)continue;l=" ";break}default:l=String.fromCharCode(o)}s=o===-2,r.push(l)}return r.join("")}function U$(e){const r={constructs:aR([L$,...(e||{}).extensions||[]]),content:s(nF),defined:[],document:s(iF),flow:s(S$),lazy:{},string:s(T$),text:s(E$)};return r;function s(o){return l;function l(u){return I$(r,o,u)}}}function H$(e){for(;!uR(e););return e}const IT=/[\0\t\n\r]/g;function F$(){let e=1,t="",n=!0,r;return s;function s(o,l,u){const d=[];let h,g,p,x,v;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),p=0,t="",n&&(o.charCodeAt(0)===65279&&p++,n=void 0);p<o.length;){if(IT.lastIndex=p,h=IT.exec(o),x=h&&h.index!==void 0?h.index:o.length,v=o.charCodeAt(x),!h){t=o.slice(p);break}if(v===10&&p===x&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),p<x&&(d.push(o.slice(p,x)),e+=x-p),v){case 0:{d.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,d.push(-2);e++<g;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}p=x+1}return u&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const $$=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function q$(e){return e.replace($$,G$)}function G$(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return sR(n.slice(o?2:1),o?16:10)}return w0(n)||e}const gR={}.hasOwnProperty;function Y$(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Z$(n)(H$(U$(n).document().write(F$()(e,t,!0))))}function Z$(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(kt),autolinkProtocol:B,autolinkEmail:B,atxHeading:o(Mt),blockQuote:o(me),characterEscape:B,characterReference:B,codeFenced:o(be),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(be,l),codeText:o(Te,l),codeTextData:B,data:B,codeFlowValue:B,definition:o(Ve),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(lt),hardBreakEscape:o(Lt),hardBreakTrailing:o(Lt),htmlFlow:o(st,l),htmlFlowData:B,htmlText:o(st,l),htmlTextData:B,image:o(yt),label:l,link:o(kt),listItem:o(Jt),listItemValue:x,listOrdered:o(lr,p),listUnordered:o(lr),paragraph:o(Ct),reference:N,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(Mt),strong:o(Yn),thematicBreak:o(hl)},exit:{atxHeading:d(),atxHeadingSequence:M,autolink:d(),autolinkEmail:ce,autolinkProtocol:oe,blockQuote:d(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:Q,characterReferenceMarkerNumeric:Q,characterReferenceValue:X,characterReference:Y,codeFenced:d(E),codeFencedFence:k,codeFencedFenceInfo:v,codeFencedFenceMeta:S,codeFlowValue:z,codeIndented:d(T),codeText:d(ie),codeTextData:z,data:z,definition:d(),definitionDestinationString:R,definitionLabelString:A,definitionTitleString:O,emphasis:d(),hardBreakEscape:d($),hardBreakTrailing:d($),htmlFlow:d(re),htmlFlowData:z,htmlText:d(te),htmlTextData:z,image:d(F),label:Z,labelText:V,lineEnding:H,link:d(I),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:K,resourceDestinationString:C,resourceTitleString:G,resource:le,setextHeading:d(P),setextHeadingLineSequence:D,setextHeadingText:_,strong:d(),thematicBreak:d()}};yR(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ue){let ge={type:"root",children:[]};const Oe={stack:[ge],tokenStack:[],config:t,enter:u,exit:h,buffer:l,resume:g,data:n},De=[];let it=-1;for(;++it<ue.length;)if(ue[it][1].type==="listOrdered"||ue[it][1].type==="listUnordered")if(ue[it][0]==="enter")De.push(it);else{const bn=De.pop();it=s(ue,bn,it)}for(it=-1;++it<ue.length;){const bn=t[ue[it][0]];gR.call(bn,ue[it][1].type)&&bn[ue[it][1].type].call(Object.assign({sliceSerialize:ue[it][2].sliceSerialize},Oe),ue[it][1])}if(Oe.tokenStack.length>0){const bn=Oe.tokenStack[Oe.tokenStack.length-1];(bn[1]||BT).call(Oe,void 0,bn[0])}for(ge.position={start:da(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:da(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},it=-1;++it<t.transforms.length;)ge=t.transforms[it](ge)||ge;return ge}function s(ue,ge,Oe){let De=ge-1,it=-1,bn=!1,wn,Sn,cr,kn;for(;++De<=Oe;){const It=ue[De];switch(It[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{It[0]==="enter"?it++:it--,kn=void 0;break}case"lineEndingBlank":{It[0]==="enter"&&(wn&&!kn&&!it&&!cr&&(cr=De),kn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:kn=void 0}if(!it&&It[0]==="enter"&&It[1].type==="listItemPrefix"||it===-1&&It[0]==="exit"&&(It[1].type==="listUnordered"||It[1].type==="listOrdered")){if(wn){let zn=De;for(Sn=void 0;zn--;){const Nn=ue[zn];if(Nn[1].type==="lineEnding"||Nn[1].type==="lineEndingBlank"){if(Nn[0]==="exit")continue;Sn&&(ue[Sn][1].type="lineEndingBlank",bn=!0),Nn[1].type="lineEnding",Sn=zn}else if(!(Nn[1].type==="linePrefix"||Nn[1].type==="blockQuotePrefix"||Nn[1].type==="blockQuotePrefixWhitespace"||Nn[1].type==="blockQuoteMarker"||Nn[1].type==="listItemIndent"))break}cr&&(!Sn||cr<Sn)&&(wn._spread=!0),wn.end=Object.assign({},Sn?ue[Sn][1].start:It[1].end),ue.splice(Sn||De,0,["exit",wn,It[2]]),De++,Oe++}if(It[1].type==="listItemPrefix"){const zn={type:"listItem",_spread:!1,start:Object.assign({},It[1].start),end:void 0};wn=zn,ue.splice(De,0,["enter",zn,It[2]]),De++,Oe++,cr=void 0,kn=!0}}}return ue[ge][1]._spread=bn,Oe}function o(ue,ge){return Oe;function Oe(De){u.call(this,ue(De),De),ge&&ge.call(this,De)}}function l(){this.stack.push({type:"fragment",children:[]})}function u(ue,ge,Oe){this.stack[this.stack.length-1].children.push(ue),this.stack.push(ue),this.tokenStack.push([ge,Oe||void 0]),ue.position={start:da(ge.start),end:void 0}}function d(ue){return ge;function ge(Oe){ue&&ue.call(this,Oe),h.call(this,Oe)}}function h(ue,ge){const Oe=this.stack.pop(),De=this.tokenStack.pop();if(De)De[0].type!==ue.type&&(ge?ge.call(this,ue,De[0]):(De[1]||BT).call(this,ue,De[0]));else throw new Error("Cannot close `"+ue.type+"` ("+Mc({start:ue.start,end:ue.end})+"): it’s not open");Oe.position.end=da(ue.end)}function g(){return b0(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function x(ue){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(ue),10),this.data.expectingFirstListItemValue=void 0}}function v(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=ue}function S(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=ue}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function T(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ue.replace(/(\r?\n|\r)$/g,"")}function A(ue){const ge=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=ge,Oe.identifier=Br(this.sliceSerialize(ue)).toLowerCase()}function O(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.title=ue}function R(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.url=ue}function M(ue){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Oe=this.sliceSerialize(ue).length;ge.depth=Oe}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function D(ue){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(ue).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function B(ue){const Oe=this.stack[this.stack.length-1].children;let De=Oe[Oe.length-1];(!De||De.type!=="text")&&(De=fl(),De.position={start:da(ue.start),end:void 0},Oe.push(De)),this.stack.push(De)}function z(ue){const ge=this.stack.pop();ge.value+=this.sliceSerialize(ue),ge.position.end=da(ue.end)}function H(ue){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Oe=ge.children[ge.children.length-1];Oe.position.end=da(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(B.call(this,ue),z.call(this,ue))}function $(){this.data.atHardBreak=!0}function re(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ue}function te(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ue}function ie(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ue}function I(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=ge,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function F(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=ge,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function V(ue){const ge=this.sliceSerialize(ue),Oe=this.stack[this.stack.length-2];Oe.label=q$(ge),Oe.identifier=Br(ge).toLowerCase()}function Z(){const ue=this.stack[this.stack.length-1],ge=this.resume(),Oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Oe.type==="link"){const De=ue.children;Oe.children=De}else Oe.alt=ge}function C(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.url=ue}function G(){const ue=this.resume(),ge=this.stack[this.stack.length-1];ge.title=ue}function le(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function K(ue){const ge=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=ge,Oe.identifier=Br(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function Q(ue){this.data.characterReferenceType=ue.type}function X(ue){const ge=this.sliceSerialize(ue),Oe=this.data.characterReferenceType;let De;Oe?(De=sR(ge,Oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):De=w0(ge);const it=this.stack[this.stack.length-1];it.value+=De}function Y(ue){const ge=this.stack.pop();ge.position.end=da(ue.end)}function oe(ue){z.call(this,ue);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(ue)}function ce(ue){z.call(this,ue);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(ue)}function me(){return{type:"blockquote",children:[]}}function be(){return{type:"code",lang:null,meta:null,value:""}}function Te(){return{type:"inlineCode",value:""}}function Ve(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function lt(){return{type:"emphasis",children:[]}}function Mt(){return{type:"heading",depth:0,children:[]}}function Lt(){return{type:"break"}}function st(){return{type:"html",value:""}}function yt(){return{type:"image",title:null,url:"",alt:null}}function kt(){return{type:"link",title:null,url:"",children:[]}}function lr(ue){return{type:"list",ordered:ue.type==="listOrdered",start:null,spread:ue._spread,children:[]}}function Jt(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function Ct(){return{type:"paragraph",children:[]}}function Yn(){return{type:"strong",children:[]}}function fl(){return{type:"text",value:""}}function hl(){return{type:"thematicBreak"}}}function da(e){return{line:e.line,column:e.column,offset:e.offset}}function yR(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?yR(e,r):X$(e,r)}}function X$(e,t){let n;for(n in t)if(gR.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function BT(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Mc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Mc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Mc({start:t.start,end:t.end})+") is still open")}function K$(e){const t=this;t.parser=n;function n(r){return Y$(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function W$(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Q$(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
330
+ `}]}function J$(e,t){const n=t.value?t.value+`
331
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function eq(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tq(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nq(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=dl(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,u+=1,e.footnoteCounts.set(r,u);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function rq(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iq(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function xR(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),o=s[0];o&&o.type==="text"?o.value="["+o.value:s.unshift({type:"text",value:"["});const l=s[s.length-1];return l&&l.type==="text"?l.value+=r:s.push({type:"text",value:r}),s}function aq(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xR(e,t);const s={src:dl(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,o),e.applyData(t,o)}function sq(e,t){const n={src:dl(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function oq(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function lq(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xR(e,t);const s={href:dl(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function cq(e,t){const n={href:dl(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function uq(e,t,n){const r=e.all(t),s=n?dq(n):vR(t),o={},l=[];if(typeof t.checked=="boolean"){const g=r[0];let p;g&&g.type==="element"&&g.tagName==="p"?p=g:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const g=r[u];(s||u!==0||g.type!=="element"||g.tagName!=="p")&&l.push({type:"text",value:`
332
+ `}),g.type==="element"&&g.tagName==="p"&&!s?l.push(...g.children):l.push(g)}const d=r[r.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
333
+ `});const h={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,h),e.applyData(t,h)}function dq(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=vR(n[r])}return t}function vR(e){const t=e.spread;return t??e.children.length>1}function fq(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const l=r[s];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function hq(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mq(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function pq(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gq(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),s.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=g0(t.children[1]),d=QA(t.children[t.children.length-1]);u&&d&&(l.position={start:u,end:d}),s.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,o),e.applyData(t,o)}function yq(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,u=l?l.length:t.children.length;let d=-1;const h=[];for(;++d<u;){const p=t.children[d],x={},v=l?l[d]:void 0;v&&(x.align=v);let S={type:"element",tagName:o,properties:x,children:[]};p&&(S.children=e.all(p),e.patch(p,S),S=e.applyData(p,S)),h.push(S)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,g),e.applyData(t,g)}function xq(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const VT=9,UT=32;function vq(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const o=[];for(;r;)o.push(HT(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return o.push(HT(t.slice(s),s>0,!1)),o.join("")}function HT(e,t,n){let r=0,s=e.length;if(t){let o=e.codePointAt(r);for(;o===VT||o===UT;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(s-1);for(;o===VT||o===UT;)s--,o=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function bq(e,t){const n={type:"text",value:vq(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function wq(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Sq={blockquote:W$,break:Q$,code:J$,delete:eq,emphasis:tq,footnoteReference:nq,heading:rq,html:iq,imageReference:aq,image:sq,inlineCode:oq,linkReference:lq,link:cq,listItem:uq,list:fq,paragraph:hq,root:mq,strong:pq,table:gq,tableCell:xq,tableRow:yq,text:bq,thematicBreak:wq,toml:Yd,yaml:Yd,definition:Yd,footnoteDefinition:Yd};function Yd(){}const bR=-1,Ah=0,Dc=1,Mf=2,k0=3,C0=4,T0=5,E0=6,wR=7,SR=8,FT=typeof self=="object"?self:globalThis,kq=(e,t)=>{const n=(s,o)=>(e.set(o,s),s),r=s=>{if(e.has(s))return e.get(s);const[o,l]=t[s];switch(o){case Ah:case bR:return n(l,s);case Dc:{const u=n([],s);for(const d of l)u.push(r(d));return u}case Mf:{const u=n({},s);for(const[d,h]of l)u[r(d)]=r(h);return u}case k0:return n(new Date(l),s);case C0:{const{source:u,flags:d}=l;return n(new RegExp(u,d),s)}case T0:{const u=n(new Map,s);for(const[d,h]of l)u.set(r(d),r(h));return u}case E0:{const u=n(new Set,s);for(const d of l)u.add(r(d));return u}case wR:{const{name:u,message:d}=l;return n(new FT[u](d),s)}case SR:return n(BigInt(l),s);case"BigInt":return n(Object(BigInt(l)),s);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:u}=new Uint8Array(l);return n(new DataView(u),l)}}return n(new FT[o](l),s)};return r},$T=e=>kq(new Map,e)(0),So="",{toString:Cq}={},{keys:Tq}=Object,gc=e=>{const t=typeof e;if(t!=="object"||!e)return[Ah,t];const n=Cq.call(e).slice(8,-1);switch(n){case"Array":return[Dc,So];case"Object":return[Mf,So];case"Date":return[k0,So];case"RegExp":return[C0,So];case"Map":return[T0,So];case"Set":return[E0,So];case"DataView":return[Dc,n]}return n.includes("Array")?[Dc,n]:n.includes("Error")?[wR,n]:[Mf,n]},Zd=([e,t])=>e===Ah&&(t==="function"||t==="symbol"),Eq=(e,t,n,r)=>{const s=(l,u)=>{const d=r.push(l)-1;return n.set(u,d),d},o=l=>{if(n.has(l))return n.get(l);let[u,d]=gc(l);switch(u){case Ah:{let g=l;switch(d){case"bigint":u=SR,g=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);g=null;break;case"undefined":return s([bR],l)}return s([u,g],l)}case Dc:{if(d){let x=l;return d==="DataView"?x=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(x=new Uint8Array(l)),s([d,[...x]],l)}const g=[],p=s([u,g],l);for(const x of l)g.push(o(x));return p}case Mf:{if(d)switch(d){case"BigInt":return s([d,l.toString()],l);case"Boolean":case"Number":case"String":return s([d,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const g=[],p=s([u,g],l);for(const x of Tq(l))(e||!Zd(gc(l[x])))&&g.push([o(x),o(l[x])]);return p}case k0:return s([u,l.toISOString()],l);case C0:{const{source:g,flags:p}=l;return s([u,{source:g,flags:p}],l)}case T0:{const g=[],p=s([u,g],l);for(const[x,v]of l)(e||!(Zd(gc(x))||Zd(gc(v))))&&g.push([o(x),o(v)]);return p}case E0:{const g=[],p=s([u,g],l);for(const x of l)(e||!Zd(gc(x)))&&g.push(o(x));return p}}const{message:h}=l;return s([u,{name:d,message:h}],l)};return o},qT=(e,{json:t,lossy:n}={})=>{const r=[];return Eq(!(t||n),!!t,new Map,r)(e),r},Of=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?$T(qT(e,t)):structuredClone(e):(e,t)=>$T(qT(e,t));function _q(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function jq(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Nq(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||_q,r=e.options.footnoteBackLabel||jq,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const g=e.all(h),p=String(h.identifier).toUpperCase(),x=dl(p.toLowerCase());let v=0;const S=[],k=e.footnoteCounts.get(p);for(;k!==void 0&&++v<=k;){S.length>0&&S.push({type:"text",value:" "});let A=typeof n=="string"?n:n(d,v);typeof A=="string"&&(A={type:"text",value:A}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,v),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const E=g[g.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const A=E.children[E.children.length-1];A&&A.type==="text"?A.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...S)}else g.push(...S);const T={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(g,!0)};e.patch(h,T),u.push(T)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Of(l),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
334
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
335
+ `}]}}const Rh=function(e){if(e==null)return Oq;if(typeof e=="function")return Mh(e);if(typeof e=="object")return Array.isArray(e)?Aq(e):Rq(e);if(typeof e=="string")return Mq(e);throw new Error("Expected function, string, or object as test")};function Aq(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Rh(e[n]);return Mh(r);function r(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function Rq(e){const t=e;return Mh(n);function n(r){const s=r;let o;for(o in e)if(s[o]!==t[o])return!1;return!0}}function Mq(e){return Mh(t);function t(n){return n&&n.type===e}}function Mh(e){return t;function t(n,r,s){return!!(Dq(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function Oq(){return!0}function Dq(e){return e!==null&&typeof e=="object"&&"type"in e}const kR=[],Pq=!0,cx=!1,zq="skip";function CR(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const o=Rh(s),l=r?-1:1;u(e,void 0,[])();function u(d,h,g){const p=d&&typeof d=="object"?d:{};if(typeof p.type=="string"){const v=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(d.type+(v?"<"+v+">":""))+")"})}return x;function x(){let v=kR,S,k,E;if((!t||o(d,h,g[g.length-1]||void 0))&&(v=Lq(n(d,g)),v[0]===cx))return v;if("children"in d&&d.children){const T=d;if(T.children&&v[0]!==zq)for(k=(r?T.children.length:-1)+l,E=g.concat(T);k>-1&&k<T.children.length;){const A=T.children[k];if(S=u(A,k,E)(),S[0]===cx)return S;k=typeof S[1]=="number"?S[1]:k+l}}return v}}}function Lq(e){return Array.isArray(e)?e:typeof e=="number"?[Pq,e]:e==null?kR:[e]}function _0(e,t,n,r){let s,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,s=n):(o=t,l=n,s=r),CR(e,o,u,s);function u(d,h){const g=h[h.length-1],p=g?g.children.indexOf(d):void 0;return l(d,p,g)}}const ux={}.hasOwnProperty,Iq={};function Bq(e,t){const n=t||Iq,r=new Map,s=new Map,o=new Map,l={...Sq,...n.handlers},u={all:h,applyData:Uq,definitionById:r,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:l,one:d,options:n,patch:Vq,wrap:Fq};return _0(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const p=g.type==="definition"?r:s,x=String(g.identifier).toUpperCase();p.has(x)||p.set(x,g)}}),u;function d(g,p){const x=g.type,v=u.handlers[x];if(ux.call(u.handlers,x)&&v)return v(u,g,p);if(u.options.passThrough&&u.options.passThrough.includes(x)){if("children"in g){const{children:k,...E}=g,T=Of(E);return T.children=u.all(g),T}return Of(g)}return(u.options.unknownHandler||Hq)(u,g,p)}function h(g){const p=[];if("children"in g){const x=g.children;let v=-1;for(;++v<x.length;){const S=u.one(x[v],g);if(S){if(v&&x[v-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=GT(S.value)),!Array.isArray(S)&&S.type==="element")){const k=S.children[0];k&&k.type==="text"&&(k.value=GT(k.value))}Array.isArray(S)?p.push(...S):p.push(S)}}}return p}}function Vq(e,t){e.position&&(t.position=jH(e))}function Uq(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,Of(o)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function Hq(e,t){const n=t.data||{},r="value"in t&&!(ux.call(n,"hProperties")||ux.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Fq(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
336
+ `});++r<e.length;)r&&n.push({type:"text",value:`
337
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
338
+ `}),n}function GT(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function YT(e,t){const n=Bq(e,t),r=n.one(e,void 0),s=Nq(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
339
+ `},s),o}function $q(e,t){return e&&"run"in e?async function(n,r){const s=YT(n,{file:r,...t});await e.run(s,r)}:function(n,r){return YT(n,{file:r,...e||t})}}function ZT(e){if(e)throw e}var Bg,XT;function qq(){if(XT)return Bg;XT=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},o=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var g=e.call(h,"constructor"),p=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!p)return!1;var x;for(x in h);return typeof x>"u"||e.call(h,x)},l=function(h,g){n&&g.name==="__proto__"?n(h,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):h[g.name]=g.newValue},u=function(h,g){if(g==="__proto__")if(e.call(h,g)){if(r)return r(h,g).value}else return;return h[g]};return Bg=function d(){var h,g,p,x,v,S,k=arguments[0],E=1,T=arguments.length,A=!1;for(typeof k=="boolean"&&(A=k,k=arguments[1]||{},E=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});E<T;++E)if(h=arguments[E],h!=null)for(g in h)p=u(k,g),x=u(h,g),k!==x&&(A&&x&&(o(x)||(v=s(x)))?(v?(v=!1,S=p&&s(p)?p:[]):S=p&&o(p)?p:{},l(k,{name:g,newValue:d(A,S,x)})):typeof x<"u"&&l(k,{name:g,newValue:x}));return k},Bg}var Gq=qq();const Vg=Xf(Gq);function dx(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Yq(){const e=[],t={run:n,use:r};return t;function n(...s){let o=-1;const l=s.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);u(null,...s);function u(d,...h){const g=e[++o];let p=-1;if(d){l(d);return}for(;++p<s.length;)(h[p]===null||h[p]===void 0)&&(h[p]=s[p]);s=h,g?Zq(g,u)(...h):l(null,...h)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function Zq(e,t){let n;return r;function r(...l){const u=e.length>l.length;let d;u&&l.push(s);try{d=e.apply(this,l)}catch(h){const g=h;if(u&&n)throw g;return s(g)}u||(d&&d.then&&typeof d.then=="function"?d.then(o,s):d instanceof Error?s(d):o(d))}function s(l,...u){n||(n=!0,t(l,...u))}function o(l){s(null,l)}}const Kr={basename:Xq,dirname:Kq,extname:Wq,join:Qq,sep:"/"};function Xq(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');gu(e);let n=0,r=-1,s=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else r<0&&(o=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,u=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else l<0&&(o=!0,l=s+1),u>-1&&(e.codePointAt(s)===t.codePointAt(u--)?u<0&&(r=s):(u=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function Kq(e){if(gu(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Wq(e){gu(e);let t=e.length,n=-1,r=0,s=-1,o=0,l;for(;t--;){const u=e.codePointAt(t);if(u===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),u===46?s<0?s=t:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||n<0||o===0||o===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function Qq(...e){let t=-1,n;for(;++t<e.length;)gu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Jq(n)}function Jq(e){gu(e);const t=e.codePointAt(0)===47;let n=eG(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function eG(e,t){let n="",r=0,s=-1,o=0,l=-1,u,d;for(;++l<=e.length;){if(l<e.length)u=e.codePointAt(l);else{if(u===47)break;u=47}if(u===47){if(!(s===l-1||o===1))if(s!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),s=l,o=0;continue}}else if(n.length>0){n="",r=0,s=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,l):n=e.slice(s+1,l),r=l-s-1;s=l,o=0}else u===46&&o>-1?o++:o=-1}return n}function gu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const tG={cwd:nG};function nG(){return"/"}function fx(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function rG(e){if(typeof e=="string")e=new URL(e);else if(!fx(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return iG(e)}function iG(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const Ug=["history","path","basename","stem","extname","dirname"];class TR{constructor(t){let n;t?fx(t)?n={path:t}:typeof t=="string"||aG(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":tG.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ug.length;){const o=Ug[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let s;for(s in n)Ug.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Kr.basename(this.path):void 0}set basename(t){Fg(t,"basename"),Hg(t,"basename"),this.path=Kr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Kr.dirname(this.path):void 0}set dirname(t){KT(this.basename,"dirname"),this.path=Kr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Kr.extname(this.path):void 0}set extname(t){if(Hg(t,"extname"),KT(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Kr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){fx(t)&&(t=rG(t)),Fg(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Kr.basename(this.path,this.extname):void 0}set stem(t){Fg(t,"stem"),Hg(t,"stem"),this.path=Kr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new jn(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Hg(e,t){if(e&&e.includes(Kr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Kr.sep+"`")}function Fg(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function KT(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function aG(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const sG=function(e){const r=this.constructor.prototype,s=r[e],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},oG={}.hasOwnProperty;class j0 extends sG{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Yq()}copy(){const t=new j0;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Vg(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Gg("data",this.frozen),this.namespace[t]=n,this):oG.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Gg("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Xd(t),r=this.parser||this.Parser;return $g("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),$g("process",this.parser||this.Parser),qg("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(o,l){const u=Xd(t),d=r.parse(u);r.run(d,u,function(g,p,x){if(g||!p||!x)return h(g);const v=p,S=r.stringify(v,x);uG(S)?x.value=S:x.result=S,h(g,x)});function h(g,p){g||!p?l(g):o?o(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),$g("processSync",this.parser||this.Parser),qg("processSync",this.compiler||this.Compiler),this.process(t,s),QT("processSync","process",n),r;function s(o,l){n=!0,ZT(o),r=l}}run(t,n,r){WT(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,u){const d=Xd(n);s.run(t,d,h);function h(g,p,x){const v=p||t;g?u(g):l?l(v):r(void 0,v,x)}}}runSync(t,n){let r=!1,s;return this.run(t,n,o),QT("runSync","run",r),s;function o(l,u){ZT(l),s=u,r=!0}}stringify(t,n){this.freeze();const r=Xd(n),s=this.compiler||this.Compiler;return qg("stringify",s),WT(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(Gg("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...p]=h;d(g,p)}else l(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function l(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(h.plugins),h.settings&&(s.settings=Vg(!0,s.settings,h.settings))}function u(h){let g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const p=h[g];o(p)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,g){let p=-1,x=-1;for(;++p<r.length;)if(r[p][0]===h){x=p;break}if(x===-1)r.push([h,...g]);else if(g.length>0){let[v,...S]=g;const k=r[x][1];dx(k)&&dx(v)&&(v=Vg(!0,k,v)),r[x]=[h,v,...S]}}}}const lG=new j0().freeze();function $g(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function qg(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Gg(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function WT(e){if(!dx(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function QT(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Xd(e){return cG(e)?e:new TR(e)}function cG(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function uG(e){return typeof e=="string"||dG(e)}function dG(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const fG="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",JT=[],eE={allowDangerousHtml:!0},hG=/^(https?|ircs?|mailto|xmpp)$/i,mG=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function pG(e){const t=gG(e),n=yG(e);return xG(t.runSync(t.parse(n),n),e)}function gG(e){const t=e.rehypePlugins||JT,n=e.remarkPlugins||JT,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...eE}:eE;return lG().use(K$).use(n).use($q,r).use(t)}function yG(e){const t=e.children||"",n=new TR;return typeof t=="string"&&(n.value=t),n}function xG(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,o=t.disallowedElements,l=t.skipHtml,u=t.unwrapDisallowed,d=t.urlTransform||vG;for(const g of mG)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+fG+g.id,void 0);return _0(e,h),OH(e,{Fragment:m.Fragment,components:s,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0});function h(g,p,x){if(g.type==="raw"&&x&&typeof p=="number")return l?x.children.splice(p,1):x.children[p]={type:"text",value:g.value},p;if(g.type==="element"){let v;for(v in zg)if(Object.hasOwn(zg,v)&&Object.hasOwn(g.properties,v)){const S=g.properties[v],k=zg[v];(k===null||k.includes(g.tagName))&&(g.properties[v]=d(String(S||""),v,g))}}if(g.type==="element"){let v=n?!n.includes(g.tagName):o?o.includes(g.tagName):!1;if(!v&&r&&typeof p=="number"&&(v=!r(g,p,x)),v&&x&&typeof p=="number")return u&&g.children?x.children.splice(p,1,...g.children):x.children.splice(p,1),p}}}function vG(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||hG.test(e.slice(0,t))?e:""}function tE(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function bG(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function wG(e,t,n){const s=Rh((n||{}).ignore||[]),o=SG(t);let l=-1;for(;++l<o.length;)CR(e,"text",u);function u(h,g){let p=-1,x;for(;++p<g.length;){const v=g[p],S=x?x.children:void 0;if(s(v,S?S.indexOf(v):void 0,x))return;x=v}if(x)return d(h,g)}function d(h,g){const p=g[g.length-1],x=o[l][0],v=o[l][1];let S=0;const E=p.children.indexOf(h);let T=!1,A=[];x.lastIndex=0;let O=x.exec(h.value);for(;O;){const R=O.index,M={index:O.index,input:O.input,stack:[...g,h]};let _=v(...O,M);if(typeof _=="string"&&(_=_.length>0?{type:"text",value:_}:void 0),_===!1?x.lastIndex=R+1:(S!==R&&A.push({type:"text",value:h.value.slice(S,R)}),Array.isArray(_)?A.push(..._):_&&A.push(_),S=R+O[0].length,T=!0),!x.global)break;O=x.exec(h.value)}return T?(S<h.value.length&&A.push({type:"text",value:h.value.slice(S)}),p.children.splice(E,1,...A)):A=[h],E+A.length}}function SG(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const s=n[r];t.push([kG(s[0]),CG(s[1])])}return t}function kG(e){return typeof e=="string"?new RegExp(bG(e),"g"):e}function CG(e){return typeof e=="function"?e:function(){return e}}const Yg="phrasing",Zg=["autolink","link","image","label"];function TG(){return{transforms:[MG],enter:{literalAutolink:_G,literalAutolinkEmail:Xg,literalAutolinkHttp:Xg,literalAutolinkWww:Xg},exit:{literalAutolink:RG,literalAutolinkEmail:AG,literalAutolinkHttp:jG,literalAutolinkWww:NG}}}function EG(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Yg,notInConstruct:Zg},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Yg,notInConstruct:Zg},{character:":",before:"[ps]",after:"\\/",inConstruct:Yg,notInConstruct:Zg}]}}function _G(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Xg(e){this.config.enter.autolinkProtocol.call(this,e)}function jG(e){this.config.exit.autolinkProtocol.call(this,e)}function NG(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function AG(e){this.config.exit.autolinkEmail.call(this,e)}function RG(e){this.exit(e)}function MG(e){wG(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,OG],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),DG]],{ignore:["link","linkReference"]})}function OG(e,t,n,r,s){let o="";if(!ER(s)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!PG(n)))return!1;const l=zG(n+r);if(!l[0])return!1;const u={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[u,{type:"text",value:l[1]}]:u}function DG(e,t,n,r){return!ER(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function PG(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function zG(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const s=tE(e,"(");let o=tE(e,")");for(;r!==-1&&s>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function ER(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ws(n)||jh(n))&&(!t||n!==47)}_R.peek=qG;function LG(){this.buffer()}function IG(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function BG(){this.buffer()}function VG(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function UG(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Br(this.sliceSerialize(e)).toLowerCase(),n.label=t}function HG(e){this.exit(e)}function FG(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Br(this.sliceSerialize(e)).toLowerCase(),n.label=t}function $G(e){this.exit(e)}function qG(){return"["}function _R(e,t,n,r){const s=n.createTracker(r);let o=s.move("[^");const l=n.enter("footnoteReference"),u=n.enter("reference");return o+=s.move(n.safe(n.associationId(e),{after:"]",before:o})),u(),l(),o+=s.move("]"),o}function GG(){return{enter:{gfmFootnoteCallString:LG,gfmFootnoteCall:IG,gfmFootnoteDefinitionLabelString:BG,gfmFootnoteDefinition:VG},exit:{gfmFootnoteCallString:UG,gfmFootnoteCall:HG,gfmFootnoteDefinitionLabelString:FG,gfmFootnoteDefinition:$G}}}function YG(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:_R},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,o,l){const u=o.createTracker(l);let d=u.move("[^");const h=o.enter("footnoteDefinition"),g=o.enter("label");return d+=u.move(o.safe(o.associationId(r),{before:d,after:"]"})),g(),d+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),d+=u.move((t?`
340
+ `:" ")+o.indentLines(o.containerFlow(r,u.current()),t?jR:ZG))),h(),d}}function ZG(e,t,n){return t===0?e:jR(e,t,n)}function jR(e,t,n){return(n?"":" ")+e}const XG=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];NR.peek=eY;function KG(){return{canContainEols:["delete"],enter:{strikethrough:QG},exit:{strikethrough:JG}}}function WG(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:XG}],handlers:{delete:NR}}}function QG(e){this.enter({type:"delete",children:[]},e)}function JG(e){this.exit(e)}function NR(e,t,n,r){const s=n.createTracker(r),o=n.enter("strikethrough");let l=s.move("~~");return l+=n.containerPhrasing(e,{...s.current(),before:l,after:"~"}),l+=s.move("~~"),o(),l}function eY(){return"~"}function tY(e){return e.length}function nY(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||tY,o=[],l=[],u=[],d=[];let h=0,g=-1;for(;++g<e.length;){const k=[],E=[];let T=-1;for(e[g].length>h&&(h=e[g].length);++T<e[g].length;){const A=rY(e[g][T]);if(n.alignDelimiters!==!1){const O=s(A);E[T]=O,(d[T]===void 0||O>d[T])&&(d[T]=O)}k.push(A)}l[g]=k,u[g]=E}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<h;)o[p]=nE(r[p]);else{const k=nE(r);for(;++p<h;)o[p]=k}p=-1;const x=[],v=[];for(;++p<h;){const k=o[p];let E="",T="";k===99?(E=":",T=":"):k===108?E=":":k===114&&(T=":");let A=n.alignDelimiters===!1?1:Math.max(1,d[p]-E.length-T.length);const O=E+"-".repeat(A)+T;n.alignDelimiters!==!1&&(A=E.length+A+T.length,A>d[p]&&(d[p]=A),v[p]=A),x[p]=O}l.splice(1,0,x),u.splice(1,0,v),g=-1;const S=[];for(;++g<l.length;){const k=l[g],E=u[g];p=-1;const T=[];for(;++p<h;){const A=k[p]||"";let O="",R="";if(n.alignDelimiters!==!1){const M=d[p]-(E[p]||0),_=o[p];_===114?O=" ".repeat(M):_===99?M%2?(O=" ".repeat(M/2+.5),R=" ".repeat(M/2-.5)):(O=" ".repeat(M/2),R=O):R=" ".repeat(M)}n.delimiterStart!==!1&&!p&&T.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||p)&&T.push(" "),n.alignDelimiters!==!1&&T.push(O),T.push(A),n.alignDelimiters!==!1&&T.push(R),n.padding!==!1&&T.push(" "),(n.delimiterEnd!==!1||p!==h-1)&&T.push("|")}S.push(n.delimiterEnd===!1?T.join("").replace(/ +$/,""):T.join(""))}return S.join(`
341
+ `)}function rY(e){return e==null?"":String(e)}function nE(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function iY(e,t,n,r){const s=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),aY);return s(),l}function aY(e,t,n){return">"+(n?"":" ")+e}function sY(e,t){return rE(e,t.inConstruct,!0)&&!rE(e,t.notInConstruct,!1)}function rE(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function iE(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
342
+ `&&sY(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
343
+ `}function oY(e,t){const n=String(e);let r=n.indexOf(t),s=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++o>l&&(l=o):o=1,s=r+t.length,r=n.indexOf(t,s);return l}function lY(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function cY(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function uY(e,t,n,r){const s=cY(n),o=e.value||"",l=s==="`"?"GraveAccent":"Tilde";if(lY(e,n)){const p=n.enter("codeIndented"),x=n.indentLines(o,dY);return p(),x}const u=n.createTracker(r),d=s.repeat(Math.max(oY(o,s)+1,3)),h=n.enter("codeFenced");let g=u.move(d);if(e.lang){const p=n.enter(`codeFencedLang${l}`);g+=u.move(n.safe(e.lang,{before:g,after:" ",encode:["`"],...u.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${l}`);g+=u.move(" "),g+=u.move(n.safe(e.meta,{before:g,after:`
344
+ `,encode:["`"],...u.current()})),p()}return g+=u.move(`
345
+ `),o&&(g+=u.move(o+`
346
+ `)),g+=u.move(d),h(),g}function dY(e,t,n){return(n?"":" ")+e}function N0(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function fY(e,t,n,r){const s=N0(n),o=s==='"'?"Quote":"Apostrophe",l=n.enter("definition");let u=n.enter("label");const d=n.createTracker(r);let h=d.move("[");return h+=d.move(n.safe(n.associationId(e),{before:h,after:"]",...d.current()})),h+=d.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(u=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":`
347
+ `,...d.current()}))),u(),e.title&&(u=n.enter(`title${o}`),h+=d.move(" "+s),h+=d.move(n.safe(e.title,{before:h,after:s,...d.current()})),h+=d.move(s),u()),l(),h}function hY(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Wc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Df(e,t,n){const r=Zo(e),s=Zo(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}AR.peek=mY;function AR(e,t,n,r){const s=hY(n),o=n.enter("emphasis"),l=n.createTracker(r),u=l.move(s);let d=l.move(n.containerPhrasing(e,{after:s,before:u,...l.current()}));const h=d.charCodeAt(0),g=Df(r.before.charCodeAt(r.before.length-1),h,s);g.inside&&(d=Wc(h)+d.slice(1));const p=d.charCodeAt(d.length-1),x=Df(r.after.charCodeAt(0),p,s);x.inside&&(d=d.slice(0,-1)+Wc(p));const v=l.move(s);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:g.outside},u+d+v}function mY(e,t,n){return n.options.emphasis||"*"}function pY(e,t){let n=!1;return _0(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,cx}),!!((!e.depth||e.depth<3)&&b0(e)&&(t.options.setext||n))}function gY(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(pY(e,n)){const g=n.enter("headingSetext"),p=n.enter("phrasing"),x=n.containerPhrasing(e,{...o.current(),before:`
348
+ `,after:`
349
+ `});return p(),g(),x+`
350
+ `+(s===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
351
+ `))+1))}const l="#".repeat(s),u=n.enter("headingAtx"),d=n.enter("phrasing");o.move(l+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
352
+ `,...o.current()});return/^[\t ]/.test(h)&&(h=Wc(h.charCodeAt(0))+h.slice(1)),h=h?l+" "+h:l,n.options.closeAtx&&(h+=" "+l),d(),u(),h}RR.peek=yY;function RR(e){return e.value||""}function yY(){return"<"}MR.peek=xY;function MR(e,t,n,r){const s=N0(n),o=s==='"'?"Quote":"Apostrophe",l=n.enter("image");let u=n.enter("label");const d=n.createTracker(r);let h=d.move("![");return h+=d.move(n.safe(e.alt,{before:h,after:"]",...d.current()})),h+=d.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(u=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),u(),e.title&&(u=n.enter(`title${o}`),h+=d.move(" "+s),h+=d.move(n.safe(e.title,{before:h,after:s,...d.current()})),h+=d.move(s),u()),h+=d.move(")"),l(),h}function xY(){return"!"}OR.peek=vY;function OR(e,t,n,r){const s=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const u=n.createTracker(r);let d=u.move("![");const h=n.safe(e.alt,{before:d,after:"]",...u.current()});d+=u.move(h+"]["),l();const g=n.stack;n.stack=[],l=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...u.current()});return l(),n.stack=g,o(),s==="full"||!h||h!==p?d+=u.move(p+"]"):s==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function vY(){return"!"}DR.peek=bY;function DR(e,t,n){let r=e.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],u=n.compilePattern(l);let d;if(l.atBreak)for(;d=u.exec(r);){let h=d.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(d.index+1)}}return s+r+s}function bY(){return"`"}function PR(e,t){const n=b0(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}zR.peek=wY;function zR(e,t,n,r){const s=N0(n),o=s==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let u,d;if(PR(e,n)){const g=n.stack;n.stack=[],u=n.enter("autolink");let p=l.move("<");return p+=l.move(n.containerPhrasing(e,{before:p,after:">",...l.current()})),p+=l.move(">"),u(),n.stack=g,p}u=n.enter("link"),d=n.enter("label");let h=l.move("[");return h+=l.move(n.containerPhrasing(e,{before:h,after:"](",...l.current()})),h+=l.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=l.move("<"),h+=l.move(n.safe(e.url,{before:h,after:">",...l.current()})),h+=l.move(">")):(d=n.enter("destinationRaw"),h+=l.move(n.safe(e.url,{before:h,after:e.title?" ":")",...l.current()}))),d(),e.title&&(d=n.enter(`title${o}`),h+=l.move(" "+s),h+=l.move(n.safe(e.title,{before:h,after:s,...l.current()})),h+=l.move(s),d()),h+=l.move(")"),u(),h}function wY(e,t,n){return PR(e,n)?"<":"["}LR.peek=SY;function LR(e,t,n,r){const s=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const u=n.createTracker(r);let d=u.move("[");const h=n.containerPhrasing(e,{before:d,after:"]",...u.current()});d+=u.move(h+"]["),l();const g=n.stack;n.stack=[],l=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...u.current()});return l(),n.stack=g,o(),s==="full"||!h||h!==p?d+=u.move(p+"]"):s==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function SY(){return"["}function A0(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function kY(e){const t=A0(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function CY(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function IR(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function TY(e,t,n,r){const s=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?CY(n):A0(n);const u=e.ordered?l==="."?")":".":kY(n);let d=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&g&&(!g.children||!g.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),IR(n)===l&&g){let p=-1;for(;++p<e.children.length;){const x=e.children[p];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(l=u),n.bulletCurrent=l;const h=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,s(),h}function EY(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function _Y(e,t,n,r){const s=EY(n);let o=n.bulletCurrent||A0(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const u=n.createTracker(r);u.move(o+" ".repeat(l-o.length)),u.shift(l);const d=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,u.current()),g);return d(),h;function g(p,x,v){return x?(v?"":" ".repeat(l))+p:(v?o:o+" ".repeat(l-o.length))+p}}function jY(e,t,n,r){const s=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),s(),l}const NY=Rh(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function AY(e,t,n,r){return(e.children.some(function(l){return NY(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function RY(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}BR.peek=MY;function BR(e,t,n,r){const s=RY(n),o=n.enter("strong"),l=n.createTracker(r),u=l.move(s+s);let d=l.move(n.containerPhrasing(e,{after:s,before:u,...l.current()}));const h=d.charCodeAt(0),g=Df(r.before.charCodeAt(r.before.length-1),h,s);g.inside&&(d=Wc(h)+d.slice(1));const p=d.charCodeAt(d.length-1),x=Df(r.after.charCodeAt(0),p,s);x.inside&&(d=d.slice(0,-1)+Wc(p));const v=l.move(s+s);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:g.outside},u+d+v}function MY(e,t,n){return n.options.strong||"*"}function OY(e,t,n,r){return n.safe(e.value,r)}function DY(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function PY(e,t,n){const r=(IR(n)+(n.options.ruleSpaces?" ":"")).repeat(DY(n));return n.options.ruleSpaces?r.slice(0,-1):r}const VR={blockquote:iY,break:iE,code:uY,definition:fY,emphasis:AR,hardBreak:iE,heading:gY,html:RR,image:MR,imageReference:OR,inlineCode:DR,link:zR,linkReference:LR,list:TY,listItem:_Y,paragraph:jY,root:AY,strong:BR,text:OY,thematicBreak:PY};function zY(){return{enter:{table:LY,tableData:aE,tableHeader:aE,tableRow:BY},exit:{codeText:VY,table:IY,tableData:Kg,tableHeader:Kg,tableRow:Kg}}}function LY(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function IY(e){this.exit(e),this.data.inTable=void 0}function BY(e){this.enter({type:"tableRow",children:[]},e)}function Kg(e){this.exit(e)}function aE(e){this.enter({type:"tableCell",children:[]},e)}function VY(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,UY));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function UY(e,t){return t==="|"?t:e}function HY(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
353
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:l,tableCell:d,tableRow:u}};function l(v,S,k,E){return h(g(v,k,E),v.align)}function u(v,S,k,E){const T=p(v,k,E),A=h([T]);return A.slice(0,A.indexOf(`
354
+ `))}function d(v,S,k,E){const T=k.enter("tableCell"),A=k.enter("phrasing"),O=k.containerPhrasing(v,{...E,before:o,after:o});return A(),T(),O}function h(v,S){return nY(v,{align:S,alignDelimiters:r,padding:n,stringLength:s})}function g(v,S,k){const E=v.children;let T=-1;const A=[],O=S.enter("table");for(;++T<E.length;)A[T]=p(E[T],S,k);return O(),A}function p(v,S,k){const E=v.children;let T=-1;const A=[],O=S.enter("tableRow");for(;++T<E.length;)A[T]=d(E[T],v,S,k);return O(),A}function x(v,S,k){let E=VR.inlineCode(v,S,k);return k.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function FY(){return{exit:{taskListCheckValueChecked:sE,taskListCheckValueUnchecked:sE,paragraph:qY}}}function $Y(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:GY}}}function sE(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function qY(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let o=-1,l;for(;++o<s.length;){const u=s[o];if(u.type==="paragraph"){l=u;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function GY(e,t,n,r){const s=e.children[0],o=typeof e.checked=="boolean"&&s&&s.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);o&&u.move(l);let d=VR.listItem(e,t,n,{...r,...u.current()});return o&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(g){return g+l}}function YY(){return[TG(),GG(),KG(),zY(),FY()]}function ZY(e){return{extensions:[EG(),YG(e),WG(),HY(e),$Y()]}}const XY={tokenize:tZ,partial:!0},UR={tokenize:nZ,partial:!0},HR={tokenize:rZ,partial:!0},FR={tokenize:iZ,partial:!0},KY={tokenize:aZ,partial:!0},$R={name:"wwwAutolink",tokenize:JY,previous:GR},qR={name:"protocolAutolink",tokenize:eZ,previous:YR},Vi={name:"emailAutolink",tokenize:QY,previous:ZR},ci={};function WY(){return{text:ci}}let rs=48;for(;rs<123;)ci[rs]=Vi,rs++,rs===58?rs=65:rs===91&&(rs=97);ci[43]=Vi;ci[45]=Vi;ci[46]=Vi;ci[95]=Vi;ci[72]=[Vi,qR];ci[104]=[Vi,qR];ci[87]=[Vi,$R];ci[119]=[Vi,$R];function QY(e,t,n){const r=this;let s,o;return l;function l(p){return!hx(p)||!ZR.call(r,r.previous)||R0(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(p))}function u(p){return hx(p)?(e.consume(p),u):p===64?(e.consume(p),d):n(p)}function d(p){return p===46?e.check(KY,g,h)(p):p===45||p===95||_n(p)?(o=!0,e.consume(p),d):g(p)}function h(p){return e.consume(p),s=!0,d}function g(p){return o&&s&&Rn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function JY(e,t,n){const r=this;return s;function s(l){return l!==87&&l!==119||!GR.call(r,r.previous)||R0(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(XY,e.attempt(UR,e.attempt(HR,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function eZ(e,t,n){const r=this;let s="",o=!1;return l;function l(p){return(p===72||p===104)&&YR.call(r,r.previous)&&!R0(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(p),e.consume(p),u):n(p)}function u(p){if(Rn(p)&&s.length<5)return s+=String.fromCodePoint(p),e.consume(p),u;if(p===58){const x=s.toLowerCase();if(x==="http"||x==="https")return e.consume(p),d}return n(p)}function d(p){return p===47?(e.consume(p),o?h:(o=!0,d)):n(p)}function h(p){return p===null||Rf(p)||St(p)||ws(p)||jh(p)?n(p):e.attempt(UR,e.attempt(HR,g),n)(p)}function g(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function tZ(e,t,n){let r=0;return s;function s(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),s):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function nZ(e,t,n){let r,s,o;return l;function l(h){return h===46||h===95?e.check(FR,d,u)(h):h===null||St(h)||ws(h)||h!==45&&jh(h)?d(h):(o=!0,e.consume(h),l)}function u(h){return h===95?r=!0:(s=r,r=void 0),e.consume(h),l}function d(h){return s||r||!o?n(h):t(h)}}function rZ(e,t){let n=0,r=0;return s;function s(l){return l===40?(n++,e.consume(l),s):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(FR,t,o)(l):l===null||St(l)||ws(l)?t(l):(e.consume(l),s)}function o(l){return l===41&&r++,e.consume(l),s}}function iZ(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),o):u===93?(e.consume(u),s):u===60||u===null||St(u)||ws(u)?t(u):n(u)}function s(u){return u===null||u===40||u===91||St(u)||ws(u)?t(u):r(u)}function o(u){return Rn(u)?l(u):n(u)}function l(u){return u===59?(e.consume(u),r):Rn(u)?(e.consume(u),l):n(u)}}function aZ(e,t,n){return r;function r(o){return e.consume(o),s}function s(o){return _n(o)?n(o):t(o)}}function GR(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||St(e)}function YR(e){return!Rn(e)}function ZR(e){return!(e===47||hx(e))}function hx(e){return e===43||e===45||e===46||e===95||_n(e)}function R0(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const sZ={tokenize:mZ,partial:!0};function oZ(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:dZ,continuation:{tokenize:fZ},exit:hZ}},text:{91:{name:"gfmFootnoteCall",tokenize:uZ},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:lZ,resolveTo:cZ}}}}function lZ(e,t,n){const r=this;let s=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;s--;){const d=r.events[s][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return u;function u(d){if(!l||!l._balanced)return n(d);const h=Br(r.sliceSerialize({start:l.end,end:r.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function cZ(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function uZ(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return u;function u(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),d}function d(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(p){if(o>999||p===93&&!l||p===null||p===91||St(p))return n(p);if(p===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return s.includes(Br(r.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return St(p)||(l=!0),o++,e.consume(p),p===92?g:h}function g(p){return p===91||p===92||p===93?(e.consume(p),o++,h):h(p)}}function dZ(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,u;return d;function d(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):n(S)}function g(S){if(l>999||S===93&&!u||S===null||S===91||St(S))return n(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return o=Br(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return St(S)||(u=!0),l++,e.consume(S),S===92?p:g}function p(S){return S===91||S===92||S===93?(e.consume(S),l++,g):g(S)}function x(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(o)||s.push(o),ut(e,v,"gfmFootnoteDefinitionWhitespace")):n(S)}function v(S){return t(S)}}function fZ(e,t,n){return e.check(pu,t,e.attempt(sZ,t,n))}function hZ(e){e.exit("gfmFootnoteDefinition")}function mZ(e,t,n){const r=this;return ut(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function pZ(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(l,u){let d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let h=d;for(;h--;)if(l[h][0]==="exit"&&l[h][1].type==="strikethroughSequenceTemporary"&&l[h][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[h][1].end.offset-l[h][1].start.offset){l[d][1].type="strikethroughSequence",l[h][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},l[h][1].start),end:Object.assign({},l[d][1].end)},p={type:"strikethroughText",start:Object.assign({},l[h][1].end),end:Object.assign({},l[d][1].start)},x=[["enter",g,u],["enter",l[h][1],u],["exit",l[h][1],u],["enter",p,u]],v=u.parser.constructs.insideSpan.null;v&&or(x,x.length,0,Nh(v,l.slice(h+1,d),u)),or(x,x.length,0,[["exit",p,u],["enter",l[d][1],u],["exit",l[d][1],u],["exit",g,u]]),or(l,h-1,d-h+3,x),d=h+x.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function o(l,u,d){const h=this.previous,g=this.events;let p=0;return x;function x(S){return h===126&&g[g.length-1][1].type!=="characterEscape"?d(S):(l.enter("strikethroughSequenceTemporary"),v(S))}function v(S){const k=Zo(h);if(S===126)return p>1?d(S):(l.consume(S),p++,v);if(p<2&&!n)return d(S);const E=l.exit("strikethroughSequenceTemporary"),T=Zo(S);return E._open=!T||T===2&&!!k,E._close=!k||k===2&&!!T,u(S)}}}class gZ{constructor(){this.map=[]}add(t,n,r){yZ(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const o of s)t.push(o);s=r.pop()}this.map.length=0}}function yZ(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function xZ(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function vZ(){return{flow:{null:{name:"table",tokenize:bZ,resolveAll:wZ}}}}function bZ(e,t,n){const r=this;let s=0,o=0,l;return u;function u(z){let H=r.events.length-1;for(;H>-1;){const te=r.events[H][1].type;if(te==="lineEnding"||te==="linePrefix")H--;else break}const $=H>-1?r.events[H][1].type:null,re=$==="tableHead"||$==="tableRow"?_:d;return re===_&&r.parser.lazy[r.now().line]?n(z):re(z)}function d(z){return e.enter("tableHead"),e.enter("tableRow"),h(z)}function h(z){return z===124||(l=!0,o+=1),g(z)}function g(z){return z===null?n(z):Pe(z)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),v):n(z):rt(z)?ut(e,g,"whitespace")(z):(o+=1,l&&(l=!1,s+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),l=!0,g):(e.enter("data"),p(z)))}function p(z){return z===null||z===124||St(z)?(e.exit("data"),g(z)):(e.consume(z),z===92?x:p)}function x(z){return z===92||z===124?(e.consume(z),p):p(z)}function v(z){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(z):(e.enter("tableDelimiterRow"),l=!1,rt(z)?ut(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):S(z))}function S(z){return z===45||z===58?E(z):z===124?(l=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),k):M(z)}function k(z){return rt(z)?ut(e,E,"whitespace")(z):E(z)}function E(z){return z===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),T):z===45?(o+=1,T(z)):z===null||Pe(z)?R(z):M(z)}function T(z){return z===45?(e.enter("tableDelimiterFiller"),A(z)):M(z)}function A(z){return z===45?(e.consume(z),A):z===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),O):(e.exit("tableDelimiterFiller"),O(z))}function O(z){return rt(z)?ut(e,R,"whitespace")(z):R(z)}function R(z){return z===124?S(z):z===null||Pe(z)?!l||s!==o?M(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(z)):M(z)}function M(z){return n(z)}function _(z){return e.enter("tableRow"),D(z)}function D(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),D):z===null||Pe(z)?(e.exit("tableRow"),t(z)):rt(z)?ut(e,D,"whitespace")(z):(e.enter("data"),P(z))}function P(z){return z===null||z===124||St(z)?(e.exit("data"),D(z)):(e.consume(z),z===92?B:P)}function B(z){return z===92||z===124?(e.consume(z),P):P(z)}}function wZ(e,t){let n=-1,r=!0,s=0,o=[0,0,0,0],l=[0,0,0,0],u=!1,d=0,h,g,p;const x=new gZ;for(;++n<e.length;){const v=e[n],S=v[1];v[0]==="enter"?S.type==="tableHead"?(u=!1,d!==0&&(oE(x,t,d,h,g),g=void 0,d=0),h={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},x.add(n,0,[["enter",h,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(r=!0,p=void 0,o=[0,0,0,0],l=[0,n+1,0,0],u&&(u=!1,g={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},x.add(n,0,[["enter",g,t]])),s=S.type==="tableDelimiterRow"?2:g?3:1):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],p=Kd(x,t,o,s,void 0,p),o=[0,0,0,0]),l[2]=n)):S.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],p=Kd(x,t,o,s,void 0,p)),o=l,l=[o[1],n,0,0])):S.type==="tableHead"?(u=!0,d=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(d=n,o[1]!==0?(l[0]=l[1],p=Kd(x,t,o,s,n,p)):l[1]!==0&&(p=Kd(x,t,l,s,n,p)),s=0):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&oE(x,t,d,h,g),x.consume(t.events),n=-1;++n<t.events.length;){const v=t.events[n];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=xZ(t.events,n))}return e}function Kd(e,t,n,r,s,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(o.end=Object.assign({},To(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const d=To(t.events,n[1]);if(o={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const h=To(t.events,n[2]),g=To(t.events,n[3]),p={type:u,start:Object.assign({},h),end:Object.assign({},g)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const x=t.events[n[2]],v=t.events[n[3]];if(x[1].end=Object.assign({},v[1].end),x[1].type="chunkText",x[1].contentType="text",n[3]>n[2]+1){const S=n[2]+1,k=n[3]-n[2]-1;e.add(S,k,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return s!==void 0&&(o.end=Object.assign({},To(t.events,s)),e.add(s,0,[["exit",o,t]]),o=void 0),o}function oE(e,t,n,r,s){const o=[],l=To(t.events,n);s&&(s.end=Object.assign({},l),o.push(["exit",s,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function To(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const SZ={name:"tasklistCheck",tokenize:CZ};function kZ(){return{text:{91:SZ}}}function CZ(e,t,n){const r=this;return s;function s(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),o)}function o(d){return St(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(d)}function u(d){return Pe(d)?t(d):rt(d)?e.check({tokenize:TZ},t,n)(d):n(d)}}function TZ(e,t,n){return ut(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function EZ(e){return aR([WY(),oZ(),pZ(e),vZ(),kZ()])}const _Z={};function jZ(e){const t=this,n=e||_Z,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(EZ(n)),o.push(YY()),l.push(ZY(n))}function NZ({node:e,inline:t,className:n,children:r,...s}){return t?m.jsx("code",{className:`${n} text-sm bg-zinc-100 dark:bg-zinc-800 py-0.5 px-1 rounded-md`,...s,children:r}):m.jsx("div",{className:"not-prose flex flex-col",children:m.jsx("div",{...s,className:"text-sm w-full overflow-x-auto dark:bg-zinc-900 p-4 border border-zinc-200 dark:border-zinc-700 rounded-xl dark:text-zinc-50 text-zinc-900 font-mono whitespace-pre-wrap break-words",children:r})})}const AZ={code:NZ,pre:({children:e})=>m.jsx(m.Fragment,{children:e}),ol:({children:e,...t})=>m.jsx("ol",{className:"list-decimal list-outside ml-4",...t,children:e}),li:({children:e,...t})=>m.jsx("li",{className:"py-1",...t,children:e}),ul:({children:e,...t})=>m.jsx("ul",{className:"list-decimal list-outside ml-4",...t,children:e}),strong:({children:e,...t})=>m.jsx("span",{className:"font-semibold",...t,children:e}),a:({children:e,...t})=>m.jsx("a",{className:"text-blue-500 hover:underline",target:"_blank",rel:"noreferrer",...t,children:e}),h1:({children:e,...t})=>m.jsx("h1",{className:"text-3xl font-semibold mt-6 mb-2",...t,children:e}),h2:({children:e,...t})=>m.jsx("h2",{className:"text-2xl font-semibold mt-6 mb-2",...t,children:e}),h3:({children:e,...t})=>m.jsx("h3",{className:"text-xl font-semibold mt-6 mb-2",...t,children:e}),h4:({children:e,...t})=>m.jsx("h4",{className:"text-lg font-semibold mt-6 mb-2",...t,children:e}),h5:({children:e,...t})=>m.jsx("h5",{className:"text-base font-semibold mt-6 mb-2",...t,children:e}),h6:({children:e,...t})=>m.jsx("h6",{className:"text-sm font-semibold mt-6 mb-2",...t,children:e})},RZ=[jZ],MZ=({children:e})=>m.jsx(pG,{remarkPlugins:RZ,components:AZ,children:e}),OZ=w.memo(MZ,(e,t)=>e.children===t.children);function lE({message:e,onSave:t,onCancel:n}){const[r,s]=w.useState(e.content),o=w.useRef(null);w.useEffect(()=>{o.current&&(o.current.focus(),o.current.select(),l())},[]);const l=()=>{o.current&&(o.current.style.height="auto",o.current.style.height=`${o.current.scrollHeight}px`)},u=()=>{r.trim()!==e.content.trim()?t(r.trim()):n()},d=h=>{h.key==="Enter"&&(h.metaKey||h.ctrlKey)&&(h.preventDefault(),u()),h.key==="Escape"&&(h.preventDefault(),n())};return m.jsxs("div",{className:"w-full space-y-3",children:[m.jsx(cu,{ref:o,value:r,onChange:h=>{s(h.target.value),l()},onKeyDown:d,className:"min-h-[100px] resize-none",placeholder:"Edit your message..."}),m.jsxs("div",{className:"flex justify-end gap-2",children:[m.jsx(Je,{variant:"outline",size:"sm",onClick:n,children:"Cancel"}),m.jsx(Je,{size:"sm",onClick:u,disabled:!r.trim(),children:"Save"})]})]})}function cE({data:e,className:t}){const[n,r]=w.useState(!1),s=JSON.stringify(e,null,2),o=async()=>{try{await navigator.clipboard.writeText(s),r(!0),setTimeout(()=>r(!1),2e3)}catch(u){console.error("Failed to copy:",u)}},l=u=>u.replace(/"([^"]+)":/g,'<span class="text-blue-600/70 dark:text-blue-400/70">"$1"</span>:').replace(/: "([^"]*)"/g,': <span class="text-foreground">"$1"</span>').replace(/: (true|false)/g,': <span class="text-purple-600/70 dark:text-purple-400/70">$1</span>').replace(/: (null)/g,': <span class="text-muted-foreground/60">$1</span>').replace(/: (-?\d+(?:\.\d+)?)/g,': <span class="text-orange-600/70 dark:text-orange-400/70">$1</span>');return m.jsxs("div",{className:Me("relative group",t),children:[m.jsx("button",{onClick:o,className:"absolute top-2 right-2 p-1.5 rounded-md bg-background/80 backdrop-blur-sm border opacity-0 group-hover:opacity-100 transition-opacity hover:bg-muted",title:"Copy JSON",children:n?m.jsx(Pr,{className:"h-3 w-3 text-green-600/70 dark:text-green-400/70"}):m.jsx(ss,{className:"h-3 w-3"})}),m.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap overflow-x-auto p-3 bg-muted/20 rounded-md border",children:m.jsx("code",{dangerouslySetInnerHTML:{__html:l(s)}})})]})}function XR({data:e,depth:t=0}){const[n,r]=w.useState(t<2);if(typeof e!="object"||e===null)return m.jsx("span",{className:Me("text-sm",typeof e=="string"&&"text-foreground",typeof e=="number"&&"text-orange-600/70 dark:text-orange-400/70",typeof e=="boolean"&&"text-purple-600/70 dark:text-purple-400/70",e===null&&"text-muted-foreground/60"),children:typeof e=="string"?`"${e}"`:String(e)});const s=Array.isArray(e),o=s?e.map((d,h)=>[h,d]):Object.entries(e),l=s?"[":"{",u=s?"]":"}";return o.length===0?m.jsxs("span",{className:"text-sm text-muted-foreground",children:[l,u]}):m.jsxs("div",{className:"text-sm",children:[m.jsxs("button",{onClick:()=>r(!n),className:"flex items-center gap-1 hover:bg-muted/50 rounded px-1 transition-colors",children:[n?m.jsx(al,{className:"h-3 w-3"}):m.jsx(sl,{className:"h-3 w-3"}),m.jsxs("span",{className:"text-muted-foreground",children:[l," ",!n&&`${o.length} items`]})]}),n&&m.jsx("div",{className:"ml-4 border-l border-border pl-2 space-y-1",children:o.map(([d,h])=>m.jsxs("div",{className:"flex gap-2",children:[m.jsxs("span",{className:"text-blue-600/70 dark:text-blue-400/70 font-medium min-w-0 flex-shrink-0",children:[s?`[${d}]`:`"${d}"`,":"]}),m.jsx("div",{className:"min-w-0 flex-1",children:m.jsx(XR,{data:h,depth:t+1})})]},d))}),n&&m.jsx("span",{className:"text-muted-foreground ml-4",children:u})]})}function DZ({toolCall:e,toolResult:t,className:n}){const[r,s]=w.useState(!1),[o,l]=w.useState(!1),u=()=>{switch(e.status){case"completed":return m.jsxs("div",{className:"relative",children:[m.jsx(cg,{className:"h-4 w-4 text-green-600/70 dark:text-green-400/70"}),m.jsx("div",{className:"absolute inset-0 animate-ping",children:m.jsx(cg,{className:"h-4 w-4 text-green-600/70 dark:text-green-400/70 opacity-20"})})]});case"error":return m.jsxs("div",{className:"relative",children:[m.jsx(ug,{className:"h-4 w-4 text-red-600/70 dark:text-red-400/70"}),m.jsx("div",{className:"absolute inset-0 animate-pulse",children:m.jsx(ug,{className:"h-4 w-4 text-red-600/70 dark:text-red-400/70 opacity-30"})})]});case"executing":return m.jsxs("div",{className:"relative",children:[m.jsx(dg,{className:"h-4 w-4 text-blue-600/70 dark:text-blue-400/70 animate-spin"}),m.jsx("div",{className:"absolute inset-0 animate-ping",children:m.jsx(dg,{className:"h-4 w-4 text-blue-600/70 dark:text-blue-400/70 opacity-20"})})]});default:return m.jsx(dg,{className:"h-4 w-4 text-muted-foreground/60"})}};return m.jsxs("div",{className:Me("border rounded-lg bg-gradient-to-br from-muted/20 to-muted/40 backdrop-blur-sm shadow-sm hover:shadow-md transition-all duration-200",e.status==="completed"&&"border-green-200/50 dark:border-green-800/50",e.status==="error"&&"border-red-200/50 dark:border-red-800/50",e.status==="executing"&&"border-blue-200/50 dark:border-blue-800/50",n),children:[m.jsxs("button",{onClick:()=>s(!r),className:"w-full flex items-center justify-between p-4 hover:bg-muted/30 transition-all duration-200 rounded-t-lg",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("div",{className:"p-2 rounded-md bg-background/50 border",children:m.jsx(gh,{className:"h-4 w-4 text-muted-foreground"})}),m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("span",{className:"font-semibold text-sm",children:e.name}),u()]})]}),m.jsx("div",{className:"flex items-center gap-2",children:r?m.jsx(al,{className:"h-4 w-4 text-muted-foreground"}):m.jsx(sl,{className:"h-4 w-4 text-muted-foreground"})})]}),r&&m.jsxs("div",{className:"border-t bg-background/30 backdrop-blur-sm",children:[Object.keys(e.parameters).length>0&&m.jsxs("div",{className:"p-4 border-b border-border/50",children:[m.jsxs("div",{className:"flex items-center justify-between mb-3",children:[m.jsxs("h4",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider flex items-center gap-2",children:[m.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-600/70 dark:bg-blue-400/70"}),"Parameters"]}),m.jsx("button",{onClick:()=>l(!o),className:"text-xs text-muted-foreground hover:text-foreground transition-colors px-2 py-1 rounded bg-muted/50 hover:bg-muted",children:o?"Raw JSON":"Tree View"})]}),o?m.jsx(XR,{data:e.parameters}):m.jsx(cE,{data:e.parameters})]}),t&&m.jsxs("div",{className:"p-4",children:[m.jsxs("h4",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-3 flex items-center gap-2",children:[m.jsx("div",{className:Me("w-2 h-2 rounded-full",t.error?"bg-red-600/70 dark:bg-red-400/70":"bg-green-600/70 dark:bg-green-400/70")}),t.error?"Error":"Result"]}),m.jsx("div",{children:t.error?m.jsx("div",{className:"bg-red-50/30 dark:bg-red-950/20 border border-red-200/50 dark:border-red-800/50 rounded-lg p-4",children:m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsx(ug,{className:"h-5 w-5 text-red-600/70 dark:text-red-400/70 flex-shrink-0 mt-0.5"}),m.jsxs("div",{children:[m.jsx("p",{className:"font-medium text-foreground mb-1",children:"Tool execution failed"}),m.jsx("p",{className:"text-muted-foreground text-sm",children:t.error})]})]})}):m.jsxs("div",{className:"bg-green-50/30 dark:bg-green-950/20 border border-green-200/50 dark:border-green-800/50 rounded-lg overflow-hidden",children:[m.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-green-100/30 dark:bg-green-900/20 border-b border-green-200/50 dark:border-green-800/50",children:[m.jsx(cg,{className:"h-4 w-4 text-green-600/70 dark:text-green-400/70"}),m.jsx("span",{className:"text-sm font-medium text-foreground",children:"Tool executed successfully"})]}),m.jsx("div",{className:"p-4",children:typeof t.result=="object"?m.jsx(cE,{data:t.result}):m.jsx("div",{className:"text-sm text-foreground bg-muted/30 p-3 rounded border",children:String(t.result)})})]})})]})]})]})}const PZ="/claude_logo.png",zZ="/openai_logo.png",uE="/ollama_logo.svg",dE="/ollama_dark.png",KR=(e,t)=>{switch(e){case"anthropic":return PZ;case"openai":return zZ;case"ollama":return t==="dark"||t==="system"&&typeof document<"u"&&document.documentElement.classList.contains("dark")?dE:uE;default:return null}},LZ=(e,t)=>KR(e.provider,t),IZ=e=>{switch(e){case"anthropic":return"text-orange-600 dark:text-orange-400";case"openai":return"text-green-600 dark:text-green-400";default:return"text-blue-600 dark:text-blue-400"}},fE=e=>{let t;const n=new Set,r=(h,g)=>{const p=typeof h=="function"?h(t):h;if(!Object.is(p,t)){const x=t;t=g??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(v=>v(t,x))}},s=()=>t,u={setState:r,getState:s,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h))},d=t=e(r,s,u);return u},BZ=e=>e?fE(e):fE,VZ=e=>e;function UZ(e,t=VZ){const n=ye.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return ye.useDebugValue(n),n}const HZ=e=>BZ()(t=>({themeMode:(e==null?void 0:e.themeMode)??"light",themePreset:(e==null?void 0:e.themePreset)??"default",setThemeMode:n=>t({themeMode:n}),setThemePreset:n=>t({themePreset:n})})),WR=w.createContext(null),FZ=({children:e,themeMode:t,themePreset:n})=>{const r=w.useRef(null);return r.current??(r.current=HZ({themeMode:t,themePreset:n})),m.jsx(WR.Provider,{value:r.current,children:e})},Xo=e=>{const t=w.useContext(WR);if(!t)throw new Error("Missing PreferencesStoreProvider");return UZ(t,e)},$Z=()=>m.jsxs("div",{className:"flex items-center gap-2 py-2",children:[m.jsx("span",{className:"text-sm text-muted-foreground",children:"Thinking"}),m.jsxs("div",{className:"flex space-x-1",children:[m.jsx("div",{className:"w-1.5 h-1.5 bg-muted-foreground/60 rounded-full animate-bounce"}),m.jsx("div",{className:"w-1.5 h-1.5 bg-muted-foreground/60 rounded-full animate-bounce [animation-delay:-0.2s]"}),m.jsx("div",{className:"w-1.5 h-1.5 bg-muted-foreground/60 rounded-full animate-bounce [animation-delay:-0.4s]"})]})]}),qZ=({message:e,isLoading:t=!1,onEdit:n,onRegenerate:r,onCopy:s,isReadonly:o=!1,showActions:l=!0,model:u})=>{const[d,h]=w.useState("view"),[g,p]=w.useState(!1),x=Xo(A=>A.themeMode),v=()=>{s?s(e.content):navigator.clipboard.writeText(e.content)},S=A=>{n&&n(e.id,A),h("view")},k=()=>{h("view")},E=()=>{r&&r(e.id)},T=e.role==="assistant"&&t&&(!e.content||e.content.trim()==="");return m.jsx(jf,{children:m.jsxs(Ni.div,{"data-testid":`message-${e.role}`,className:"w-full mx-auto max-w-4xl px-4 group/message",initial:{y:5,opacity:0},animate:{y:0,opacity:1},"data-role":e.role,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[e.role==="assistant"&&m.jsxs("div",{className:"flex gap-4 w-full",children:[m.jsx("div",{className:"size-8 flex items-center rounded-full justify-center shrink-0 bg-muted/50",children:m.jsx("img",{src:LZ(u,x),alt:`${u==null?void 0:u.id} logo`,className:"h-4 w-4 object-contain"})}),m.jsxs("div",{className:"flex flex-col gap-4 w-full min-w-0",children:[e.attachments&&e.attachments.length>0&&m.jsx("div",{className:"flex flex-row gap-2",children:e.attachments.map(A=>m.jsx("div",{className:"px-3 py-2 bg-muted rounded-lg text-sm",children:A.name},A.id))}),e.toolCalls&&e.toolCalls.length>0&&m.jsx("div",{className:"space-y-2",children:e.toolCalls.map(A=>{var R;const O=(R=e.toolResults)==null?void 0:R.find(M=>M.toolCallId===A.id);return m.jsx(DZ,{toolCall:A,toolResult:O},A.id)})}),T?m.jsx(Ni.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},children:m.jsx($Z,{})}):d==="view"?m.jsxs("div",{className:"relative",children:[m.jsx("div",{"data-testid":"message-content",className:"prose prose-sm max-w-none dark:prose-invert prose-p:leading-relaxed prose-pre:bg-muted/50 prose-pre:border prose-pre:border-border/30 flex-1 min-w-0",children:m.jsx(OZ,{children:nC(e.content)})}),g&&m.jsxs("div",{className:"absolute -bottom-6 left-0 right-0 flex items-center justify-between",children:[m.jsx("div",{className:"text-xs text-muted-foreground/60",children:rC(e.timestamp)}),l&&!o&&m.jsxs("div",{className:"flex items-center gap-1",children:[m.jsxs(cs,{children:[m.jsx(us,{asChild:!0,children:m.jsx(Je,{variant:"ghost",size:"sm",className:"px-2 h-7 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-all",onClick:v,children:m.jsx(ss,{size:14})})}),m.jsx(ds,{children:"Copy"})]}),r&&m.jsxs(cs,{children:[m.jsx(us,{asChild:!0,children:m.jsx(Je,{variant:"ghost",size:"sm",className:"px-2 h-7 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-all",onClick:E,children:m.jsx(SI,{size:14})})}),m.jsx(ds,{children:"Regenerate"})]})]})]})]}):m.jsx("div",{className:"flex flex-row gap-2 items-start",children:m.jsx(lE,{message:e,onSave:S,onCancel:k})})]})]}),e.role==="user"&&m.jsx("div",{className:"flex justify-end w-full",children:m.jsxs("div",{className:"flex flex-col gap-2 max-w-2xl",children:[e.attachments&&e.attachments.length>0&&m.jsx("div",{className:"flex flex-row justify-end gap-2",children:e.attachments.map(A=>m.jsx("div",{className:"px-3 py-2 bg-muted rounded-lg text-sm",children:A.name},A.id))}),d==="view"?m.jsxs("div",{className:"flex items-start gap-2 justify-end",children:[l&&!o&&g&&m.jsx("div",{className:"flex items-center gap-1 mt-1",children:m.jsxs(cs,{children:[m.jsx(us,{asChild:!0,children:m.jsx(Je,{variant:"ghost",size:"sm",className:"px-2 h-7 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-all",onClick:v,children:m.jsx(ss,{size:14})})}),m.jsx(ds,{children:"Copy"})]})}),m.jsxs("div",{className:"relative",children:[m.jsx("div",{"data-testid":"message-content",className:"bg-primary text-primary-foreground px-4 py-3 rounded-2xl max-w-fit",children:m.jsx("div",{className:"whitespace-pre-wrap break-words font-medium",children:nC(e.content)})}),g&&m.jsx("div",{className:"absolute -bottom-6 right-0 text-xs text-muted-foreground/60",children:rC(e.timestamp)})]})]}):m.jsx("div",{className:"w-full",children:m.jsx(lE,{message:e,onSave:S,onCancel:k})})]})})]})})},GZ=w.memo(qZ,(e,t)=>e.message.id===t.message.id&&e.message.content===t.message.content&&e.isLoading===t.isLoading&&JSON.stringify(e.message.toolCalls)===JSON.stringify(t.message.toolCalls)&&JSON.stringify(e.message.toolResults)===JSON.stringify(t.message.toolResults));function hE({provider:e}){const t=Xo(r=>r.themeMode),n=KR(e,t);return n?m.jsx("img",{src:n,width:12,height:12,alt:`${e} logo`,className:"h-3 w-3 object-contain"}):m.jsx("div",{className:Py("h-3 w-3 rounded-sm",IZ(e))})}function YZ({currentModel:e,availableModels:t,onModelChange:n,disabled:r,isLoading:s}){const[o,l]=w.useState(!1),u=e;return m.jsxs(Pj,{open:o,onOpenChange:l,children:[m.jsx(zj,{asChild:!0,children:m.jsx(Je,{variant:"ghost",size:"sm",disabled:r||s,className:"h-8 px-2 rounded-full hover:bg-muted/80 transition-colors text-xs cursor-pointer",children:m.jsxs(m.Fragment,{children:[m.jsx(hE,{provider:u.provider}),m.jsx("span",{className:"text-[10px] font-medium",children:u.name})]})})}),m.jsx(Lj,{align:"start",className:"min-w-[200px]",children:t.map(d=>m.jsxs(nf,{onClick:()=>{n(d),l(!1)},className:"flex items-center gap-3 text-sm cursor-pointer",children:[m.jsx(hE,{provider:d.provider}),m.jsx("div",{className:"flex flex-col",children:m.jsx("span",{className:"font-medium",children:d.name})}),d.id===e.id&&m.jsx("div",{className:"ml-auto w-2 h-2 bg-primary rounded-full"})]},d.id))})]})}function mE({value:e,onChange:t,onSubmit:n,onStop:r,disabled:s=!1,isLoading:o=!1,placeholder:l="Type your message...",className:u,showScrollToBottom:d=!1,onScrollToBottom:h,currentModel:g,availableModels:p,onModelChange:x}){const v=w.useRef(null),S=w.useRef(null),[k,E]=w.useState([]),[T,A]=w.useState([]);console.log(g);const O=g;w.useEffect(()=>{R()},[e]);const R=()=>{v.current&&(v.current.style.height="auto",v.current.style.height=`${Math.min(v.current.scrollHeight,120)}px`)},M=()=>{v.current&&(v.current.style.height="auto")},_=w.useCallback(()=>{!e.trim()||s||o||T.length>0||(n(e.trim(),k.length>0?k:void 0),t(""),E([]),M(),setTimeout(()=>{var z;(z=v.current)==null||z.focus()},0))},[e,s,o,T.length,n,k,t]),D=z=>{z.key==="Enter"&&!z.shiftKey&&!z.nativeEvent.isComposing&&(z.preventDefault(),_())},P=w.useCallback(async z=>{const H=Array.from(z.target.files||[]);if(H.length!==0){A(H.map($=>$.name));try{const $=await Promise.all(H.map(async re=>(await new Promise(te=>setTimeout(te,1e3)),{id:Math.random().toString(36).substr(2,9),name:re.name,url:URL.createObjectURL(re),contentType:re.type,size:re.size})));E(re=>[...re,...$])}catch($){console.error("Error uploading files:",$)}finally{A([]),S.current&&(S.current.value="")}}},[]),B=z=>{E(H=>H.filter($=>$.id!==z))};return m.jsxs("div",{className:"relative w-full",children:[m.jsx(jf,{children:d&&m.jsx(Ni.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},className:"absolute left-1/2 bottom-full mb-4 -translate-x-1/2 z-50",children:m.jsx(Je,{size:"sm",variant:"outline",className:"rounded-full shadow-lg cursor-pointer",onClick:h,children:m.jsx(M6,{className:"h-4 w-4"})})})}),m.jsx("input",{ref:S,type:"file",multiple:!0,className:"hidden",onChange:P,accept:"image/*,.pdf,.txt,.json,.csv"}),(k.length>0||T.length>0)&&m.jsxs("div",{className:"mb-3 flex flex-wrap gap-2",children:[k.map(z=>m.jsxs("div",{className:"flex items-center gap-2 bg-muted px-3 py-2 rounded-lg text-sm",children:[m.jsx("span",{className:"truncate max-w-[200px]",children:z.name}),m.jsx("button",{onClick:()=>B(z.id),className:"text-muted-foreground hover:text-foreground cursor-pointer",children:"×"})]},z.id)),T.map(z=>m.jsxs("div",{className:"flex items-center gap-2 bg-muted/50 px-3 py-2 rounded-lg text-sm animate-pulse",children:[m.jsx("span",{className:"truncate max-w-[200px]",children:z}),m.jsx("div",{className:"w-3 h-3 border-2 border-current border-t-transparent rounded-full animate-spin"})]},z))]}),m.jsxs("div",{className:"relative",children:[m.jsx(cu,{ref:v,value:e,onChange:z=>t(z.target.value),onKeyDown:D,placeholder:l,disabled:s,className:Py("min-h-[56px] max-h-[120px] resize-none pl-16 pr-14 py-4 rounded-3xl","border-border/30 bg-background/50 focus-visible:border-border/50","focus-visible:ring-0 focus-visible:ring-offset-0","transition-all duration-200 ease-in-out overflow-y-auto","text-base placeholder:text-muted-foreground/60",u),rows:1,autoFocus:!0}),m.jsx("div",{className:"absolute bottom-3 left-4 flex items-center gap-1",children:m.jsxs(cs,{children:[m.jsx(us,{asChild:!0,children:m.jsx(Je,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0 rounded-full hover:bg-muted/80 transition-colors cursor-pointer",onClick:()=>{var z;return(z=S.current)==null?void 0:z.click()},disabled:s||o,children:m.jsx(yI,{size:16})})}),m.jsx(ds,{children:"Add files"})]})}),m.jsx("div",{className:"absolute bottom-3 right-4 flex items-center gap-1",children:o?m.jsxs(cs,{children:[m.jsx(us,{asChild:!0,children:m.jsx(Je,{type:"button",size:"sm",variant:"outline",className:"h-8 w-8 p-0 rounded-full border-border/30 hover:border-border/50 transition-colors cursor-pointer",onClick:r,children:m.jsx(NI,{size:16})})}),m.jsx(ds,{children:"Stop generating"})]}):m.jsxs(cs,{children:[m.jsx(us,{asChild:!0,children:m.jsx(Je,{type:"button",size:"sm",className:Py("h-8 w-8 p-0 rounded-full transition-all duration-200 cursor-pointer",e.trim()&&!s&&T.length===0?"bg-primary text-primary-foreground hover:bg-primary/90 shadow-sm":"bg-muted text-muted-foreground cursor-not-allowed"),onClick:_,disabled:!e.trim()||s||T.length>0,children:m.jsx(Rj,{size:16})})}),m.jsx(ds,{children:"Send message"})]})})]}),m.jsx("div",{className:"flex items-center gap-2 mt-2",children:p.length>0&&O&&m.jsx(YZ,{currentModel:O,availableModels:p,onModelChange:x,disabled:s,isLoading:o})})]})}function ZZ({serverConfigs:e,systemPrompt:t=""}){const n=w.useRef(null),[r,s]=w.useState(!0),{messages:o,isLoading:l,error:u,input:d,setInput:h,sendMessage:g,stopGeneration:p,regenerateMessage:x,clearChat:v,model:S,availableModels:k,setModel:E,elicitationRequest:T,elicitationLoading:A,handleElicitationResponse:O}=T9({serverConfigs:e,systemPrompt:t,onError:D=>{Xt.error(D)}});console.log("availableModels",k);const R=o.length>0;w.useEffect(()=>{r&&n.current&&(n.current.scrollTop=n.current.scrollHeight)},[o,r]);const M=()=>{if(!n.current)return;const{scrollTop:D,scrollHeight:P,clientHeight:B}=n.current,H=P-D-B<100;s(H)},_=D=>{navigator.clipboard.writeText(D)};return console.log(k),R?m.jsx(ph,{children:m.jsxs("div",{className:"relative bg-background h-screen overflow-hidden",children:[m.jsx("div",{ref:n,onScroll:M,className:"h-full overflow-y-auto pb-40",children:m.jsx("div",{className:"max-w-4xl mx-auto px-4 pt-8 pb-8",children:m.jsxs(jf,{mode:"popLayout",children:[o.map((D,P)=>m.jsx(Ni.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,delay:P*.05},className:"mb-8",children:m.jsx(GZ,{message:D,model:S||null,isLoading:l&&P===o.length-1,onEdit:()=>{},onRegenerate:x,onCopy:_,showActions:!0})},D.id)),l&&o.length>0&&o[o.length-1].role==="user"&&m.jsx(Ni.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mb-8",children:m.jsxs("div",{className:"flex gap-4 items-start",children:[m.jsx("div",{className:"w-8 h-8 flex items-center rounded-full justify-center bg-muted/50 shrink-0",children:m.jsx(Oj,{className:"h-4 w-4 text-muted-foreground"})}),m.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[m.jsx("span",{className:"text-sm text-muted-foreground",children:"Thinking"}),m.jsxs("div",{className:"flex space-x-1",children:[m.jsx("div",{className:"w-1.5 h-1.5 bg-muted-foreground/60 rounded-full animate-bounce"}),m.jsx("div",{className:"w-1.5 h-1.5 bg-muted-foreground/60 rounded-full animate-bounce delay-100"}),m.jsx("div",{className:"w-1.5 h-1.5 bg-muted-foreground/60 rounded-full animate-bounce delay-200"})]})]})]})})]})})}),m.jsx(jf,{children:u&&m.jsx(Ni.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},className:"absolute bottom-40 left-0 right-0 px-4 py-3 bg-destructive/5 border-t border-destructive/10 z-10",children:m.jsx("div",{className:"max-w-4xl mx-auto",children:m.jsx("p",{className:"text-sm text-destructive",children:u})})})}),m.jsx("div",{className:"absolute bottom-0 left-0 right-0 border-t border-border/50 bg-background/80 backdrop-blur-sm",children:m.jsx("div",{className:"max-w-4xl mx-auto p-4",children:m.jsx(mE,{value:d,onChange:h,onSubmit:g,onStop:p,disabled:k.length===0,isLoading:l,placeholder:"Send a message...",className:"border-2 shadow-sm",currentModel:S,availableModels:k,onModelChange:E,onClearChat:v,hasMessages:R})})}),m.jsx(Dy,{elicitationRequest:T,onResponse:O,loading:A})]})}):m.jsxs("div",{className:"flex flex-col h-screen",children:[m.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-4",children:[m.jsx(Ni.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"text-center space-y-6 max-w-2xl mb-8",children:m.jsxs("div",{className:"space-y-3",children:[m.jsx("h1",{className:"text-4xl font-semibold bg-gradient-to-r from-foreground to-foreground/70 bg-clip-text text-transparent",children:"Let's test out your MCP servers!"}),e&&m.jsx("div",{className:"text-sm text-muted-foreground mt-4",children:m.jsxs("p",{children:["Connected servers: ",Object.keys(e).join(", ")]})})]})}),m.jsxs(Ni.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.1},className:"w-full max-w-3xl",children:[m.jsx(mE,{value:d,onChange:h,onSubmit:g,onStop:p,disabled:k.length===0,isLoading:l,placeholder:"Send a message...",className:"border-2 shadow-lg bg-background/80 backdrop-blur-sm",currentModel:S||null,availableModels:k,onModelChange:E,onClearChat:v,hasMessages:!1}),k.length===0&&m.jsx(Ni.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.3},className:"text-sm text-muted-foreground mt-3 text-center",children:"Configure API keys in Settings or start Ollama to enable chat"})]})]}),m.jsx(Dy,{elicitationRequest:T,onResponse:O,loading:A})]})}function XZ(){const{tokens:e,setToken:t,clearToken:n,hasToken:r,getOllamaBaseUrl:s,setOllamaBaseUrl:o}=fN(),[l,u]=w.useState(!1),[d,h]=w.useState(!1),g=Xo(S=>S.themeMode),p=S=>{n(S)},x=()=>{o("http://localhost:11434")},v=S=>S?S.length<=8?"*".repeat(S.length):S.slice(0,4)+"*".repeat(S.length-8)+S.slice(-4):"";return m.jsxs("div",{className:"container mx-auto p-6 max-w-2xl",children:[m.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[m.jsx(Dj,{className:"h-6 w-6"}),m.jsx("h1",{className:"text-2xl font-bold",children:"Settings"})]}),m.jsxs(va,{children:[m.jsxs(qS,{children:[m.jsxs(GS,{className:"flex items-center gap-2",children:[m.jsx(sI,{className:"h-5 w-5"}),"API Keys"]}),m.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure your LLM provider API keys. Keys are stored locally in your browser."})]}),m.jsxs(Pc,{className:"space-y-6",children:[m.jsxs("div",{className:"space-y-3",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx(af,{htmlFor:"anthropic-key",className:"text-base font-medium",children:"Anthropic API Key"}),r("anthropic")&&m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Pr,{className:"h-4 w-4 text-green-500"}),m.jsx("span",{className:"text-xs text-green-600",children:"Configured"})]})]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsxs("div",{className:"relative flex-1",children:[m.jsx(qt,{id:"anthropic-key",type:l?"text":"password",value:l?e.anthropic:v(e.anthropic),onChange:S=>t("anthropic",S.target.value),placeholder:"sk-ant-...",className:"pr-10"}),m.jsx(Je,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 hover:bg-transparent",onClick:()=>u(!l),children:l?m.jsx(Sk,{className:"h-4 w-4"}):m.jsx(wf,{className:"h-4 w-4"})})]}),r("anthropic")&&m.jsx(Je,{variant:"outline",size:"sm",onClick:()=>p("anthropic"),children:m.jsx(Fo,{className:"h-4 w-4"})})]}),m.jsxs("p",{className:"text-xs text-muted-foreground",children:["Get your API key from"," ",m.jsx("a",{href:"https://console.anthropic.com/",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline",children:"Anthropic Console"})]})]}),m.jsxs("div",{className:"space-y-3",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx(af,{htmlFor:"openai-key",className:"text-base font-medium",children:"OpenAI API Key"}),r("openai")&&m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Pr,{className:"h-4 w-4 text-green-500"}),m.jsx("span",{className:"text-xs text-green-600",children:"Configured"})]})]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsxs("div",{className:"relative flex-1",children:[m.jsx(qt,{id:"openai-key",type:d?"text":"password",value:d?e.openai:v(e.openai),onChange:S=>t("openai",S.target.value),placeholder:"sk-...",className:"pr-10"}),m.jsx(Je,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3 hover:bg-transparent",onClick:()=>h(!d),children:d?m.jsx(Sk,{className:"h-4 w-4"}):m.jsx(wf,{className:"h-4 w-4"})})]}),r("openai")&&m.jsx(Je,{variant:"outline",size:"sm",onClick:()=>p("openai"),children:m.jsx(Fo,{className:"h-4 w-4"})})]}),m.jsxs("p",{className:"text-xs text-muted-foreground",children:["Get your API key from"," ",m.jsx("a",{href:"https://platform.openai.com/api-keys",target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline",children:"OpenAI Platform"})]})]})]})]}),m.jsxs(va,{className:"mt-6",children:[m.jsxs(qS,{children:[m.jsxs(GS,{className:"flex items-center gap-2",children:[m.jsx("img",{src:g==="dark"?"/ollama_dark.png":"/ollama_logo.svg",alt:"Ollama",className:"h-5 w-5"}),"Ollama Configuration"]}),m.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure your local Ollama server settings."})]}),m.jsx(Pc,{className:"space-y-6",children:m.jsxs("div",{className:"space-y-3",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx(af,{htmlFor:"ollama-url",className:"text-base font-medium",children:"Base URL"}),m.jsx("div",{className:"flex items-center gap-2",children:m.jsx("span",{className:"text-xs text-muted-foreground",children:"Default: http://localhost:11434"})})]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsx(qt,{id:"ollama-url",type:"text",value:s(),onChange:S=>o(S.target.value),placeholder:"http://localhost:11434",className:"flex-1"}),m.jsx(Je,{variant:"outline",size:"sm",onClick:x,children:"Reset"})]}),m.jsxs("p",{className:"text-xs text-muted-foreground",children:["Configure the base URL for your Ollama server. This is typically"," ",m.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:"http://localhost:11434"})," ","for local installations."]})]})})]})]})}function Fr(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Ss(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const QR=6048e5,KZ=864e5,JR=6e4,eM=36e5;let WZ={};function Oh(){return WZ}function Qc(e,t){var u,d,h,g;const n=Oh(),r=(t==null?void 0:t.weekStartsOn)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??n.weekStartsOn??((g=(h=n.locale)==null?void 0:h.options)==null?void 0:g.weekStartsOn)??0,s=Fr(e),o=s.getDay(),l=(o<r?7:0)+o-r;return s.setDate(s.getDate()-l),s.setHours(0,0,0,0),s}function Pf(e){return Qc(e,{weekStartsOn:1})}function tM(e){const t=Fr(e),n=t.getFullYear(),r=Ss(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const s=Pf(r),o=Ss(e,0);o.setFullYear(n,0,4),o.setHours(0,0,0,0);const l=Pf(o);return t.getTime()>=s.getTime()?n+1:t.getTime()>=l.getTime()?n:n-1}function pE(e){const t=Fr(e);return t.setHours(0,0,0,0),t}function gE(e){const t=Fr(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function QZ(e,t){const n=pE(e),r=pE(t),s=+n-gE(n),o=+r-gE(r);return Math.round((s-o)/KZ)}function JZ(e){const t=tM(e),n=Ss(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Pf(n)}function eX(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function tX(e){if(!eX(e)&&typeof e!="number")return!1;const t=Fr(e);return!isNaN(Number(t))}function nX(e){const t=Fr(e),n=Ss(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const rX={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},iX=(e,t,n)=>{let r;const s=rX[e];return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Wg(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const aX={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},sX={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},oX={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},lX={date:Wg({formats:aX,defaultWidth:"full"}),time:Wg({formats:sX,defaultWidth:"full"}),dateTime:Wg({formats:oX,defaultWidth:"full"})},cX={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},uX=(e,t,n,r)=>cX[e];function yc(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,u=n!=null&&n.width?String(n.width):l;s=e.formattingValues[u]||e.formattingValues[l]}else{const l=e.defaultWidth,u=n!=null&&n.width?String(n.width):e.defaultWidth;s=e.values[u]||e.values[l]}const o=e.argumentCallback?e.argumentCallback(t):t;return s[o]}}const dX={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},fX={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},hX={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},mX={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},pX={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gX={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},yX=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},xX={ordinalNumber:yX,era:yc({values:dX,defaultWidth:"wide"}),quarter:yc({values:fX,defaultWidth:"wide",argumentCallback:e=>e-1}),month:yc({values:hX,defaultWidth:"wide"}),day:yc({values:mX,defaultWidth:"wide"}),dayPeriod:yc({values:pX,defaultWidth:"wide",formattingValues:gX,defaultFormattingWidth:"wide"})};function xc(e){return(t,n={})=>{const r=n.width,s=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(s);if(!o)return null;const l=o[0],u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(u)?bX(u,p=>p.test(l)):vX(u,p=>p.test(l));let h;h=e.valueCallback?e.valueCallback(d):d,h=n.valueCallback?n.valueCallback(h):h;const g=t.slice(l.length);return{value:h,rest:g}}}function vX(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function bX(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function wX(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const s=r[0],o=t.match(e.parsePattern);if(!o)return null;let l=e.valueCallback?e.valueCallback(o[0]):o[0];l=n.valueCallback?n.valueCallback(l):l;const u=t.slice(s.length);return{value:l,rest:u}}}const SX=/^(\d+)(th|st|nd|rd)?/i,kX=/\d+/i,CX={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},TX={any:[/^b/i,/^(a|c)/i]},EX={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},_X={any:[/1/i,/2/i,/3/i,/4/i]},jX={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},NX={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},AX={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},RX={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},MX={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},OX={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},DX={ordinalNumber:wX({matchPattern:SX,parsePattern:kX,valueCallback:e=>parseInt(e,10)}),era:xc({matchPatterns:CX,defaultMatchWidth:"wide",parsePatterns:TX,defaultParseWidth:"any"}),quarter:xc({matchPatterns:EX,defaultMatchWidth:"wide",parsePatterns:_X,defaultParseWidth:"any",valueCallback:e=>e+1}),month:xc({matchPatterns:jX,defaultMatchWidth:"wide",parsePatterns:NX,defaultParseWidth:"any"}),day:xc({matchPatterns:AX,defaultMatchWidth:"wide",parsePatterns:RX,defaultParseWidth:"any"}),dayPeriod:xc({matchPatterns:MX,defaultMatchWidth:"any",parsePatterns:OX,defaultParseWidth:"any"})},PX={code:"en-US",formatDistance:iX,formatLong:lX,formatRelative:uX,localize:xX,match:DX,options:{weekStartsOn:0,firstWeekContainsDate:1}};function zX(e){const t=Fr(e);return QZ(t,nX(t))+1}function LX(e){const t=Fr(e),n=+Pf(t)-+JZ(t);return Math.round(n/QR)+1}function nM(e,t){var g,p,x,v;const n=Fr(e),r=n.getFullYear(),s=Oh(),o=(t==null?void 0:t.firstWeekContainsDate)??((p=(g=t==null?void 0:t.locale)==null?void 0:g.options)==null?void 0:p.firstWeekContainsDate)??s.firstWeekContainsDate??((v=(x=s.locale)==null?void 0:x.options)==null?void 0:v.firstWeekContainsDate)??1,l=Ss(e,0);l.setFullYear(r+1,0,o),l.setHours(0,0,0,0);const u=Qc(l,t),d=Ss(e,0);d.setFullYear(r,0,o),d.setHours(0,0,0,0);const h=Qc(d,t);return n.getTime()>=u.getTime()?r+1:n.getTime()>=h.getTime()?r:r-1}function IX(e,t){var u,d,h,g;const n=Oh(),r=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??n.firstWeekContainsDate??((g=(h=n.locale)==null?void 0:h.options)==null?void 0:g.firstWeekContainsDate)??1,s=nM(e,t),o=Ss(e,0);return o.setFullYear(s,0,r),o.setHours(0,0,0,0),Qc(o,t)}function BX(e,t){const n=Fr(e),r=+Qc(n,t)-+IX(n,t);return Math.round(r/QR)+1}function gt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const fa={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return gt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):gt(n+1,2)},d(e,t){return gt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return gt(e.getHours()%12||12,t.length)},H(e,t){return gt(e.getHours(),t.length)},m(e,t){return gt(e.getMinutes(),t.length)},s(e,t){return gt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return gt(s,t.length)}},ko={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},yE={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return fa.y(e,t)},Y:function(e,t,n,r){const s=nM(e,r),o=s>0?s:1-s;if(t==="YY"){const l=o%100;return gt(l,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):gt(o,t.length)},R:function(e,t){const n=tM(e);return gt(n,t.length)},u:function(e,t){const n=e.getFullYear();return gt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return gt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return gt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return fa.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return gt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const s=BX(e,r);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):gt(s,t.length)},I:function(e,t,n){const r=LX(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):gt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):fa.d(e,t)},D:function(e,t,n){const r=zX(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):gt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const s=e.getDay(),o=(s-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return gt(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const s=e.getDay(),o=(s-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return gt(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),s=r===0?7:r;switch(t){case"i":return String(s);case"ii":return gt(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let s;switch(r===12?s=ko.noon:r===0?s=ko.midnight:s=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let s;switch(r>=17?s=ko.evening:r>=12?s=ko.afternoon:r>=4?s=ko.morning:s=ko.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return fa.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):fa.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):gt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):gt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):fa.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):fa.s(e,t)},S:function(e,t){return fa.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return vE(r);case"XXXX":case"XX":return as(r);case"XXXXX":case"XXX":default:return as(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return vE(r);case"xxxx":case"xx":return as(r);case"xxxxx":case"xxx":default:return as(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+xE(r,":");case"OOOO":default:return"GMT"+as(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+xE(r,":");case"zzzz":default:return"GMT"+as(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return gt(r,t.length)},T:function(e,t,n){const r=e.getTime();return gt(r,t.length)}};function xE(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=Math.trunc(r/60),o=r%60;return o===0?n+String(s):n+String(s)+t+gt(o,2)}function vE(e,t){return e%60===0?(e>0?"-":"+")+gt(Math.abs(e)/60,2):as(e,t)}function as(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=gt(Math.trunc(r/60),2),o=gt(r%60,2);return n+s+t+o}const bE=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},rM=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},VX=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return bE(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",bE(r,t)).replace("{{time}}",rM(s,t))},UX={p:rM,P:VX},HX=/^D+$/,FX=/^Y+$/,$X=["D","DD","YY","YYYY"];function qX(e){return HX.test(e)}function GX(e){return FX.test(e)}function YX(e,t,n){const r=ZX(e,t,n);if(console.warn(r),$X.includes(e))throw new RangeError(r)}function ZX(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const XX=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,KX=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,WX=/^'([^]*?)'?$/,QX=/''/g,JX=/[a-zA-Z]/;function eK(e,t,n){var g,p,x,v;const r=Oh(),s=r.locale??PX,o=r.firstWeekContainsDate??((p=(g=r.locale)==null?void 0:g.options)==null?void 0:p.firstWeekContainsDate)??1,l=r.weekStartsOn??((v=(x=r.locale)==null?void 0:x.options)==null?void 0:v.weekStartsOn)??0,u=Fr(e);if(!tX(u))throw new RangeError("Invalid time value");let d=t.match(KX).map(S=>{const k=S[0];if(k==="p"||k==="P"){const E=UX[k];return E(S,s.formatLong)}return S}).join("").match(XX).map(S=>{if(S==="''")return{isToken:!1,value:"'"};const k=S[0];if(k==="'")return{isToken:!1,value:tK(S)};if(yE[k])return{isToken:!0,value:S};if(k.match(JX))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");return{isToken:!1,value:S}});s.localize.preprocessor&&(d=s.localize.preprocessor(u,d));const h={firstWeekContainsDate:o,weekStartsOn:l,locale:s};return d.map(S=>{if(!S.isToken)return S.value;const k=S.value;(GX(k)||qX(k))&&YX(k,t,String(e));const E=yE[k[0]];return E(u,k,s.localize,h)}).join("")}function tK(e){const t=e.match(WX);return t?t[1].replace(QX,"'"):e}function nK(e,t){const r=sK(e);let s;if(r.date){const d=oK(r.date,2);s=lK(d.restDateString,d.year)}if(!s||isNaN(s.getTime()))return new Date(NaN);const o=s.getTime();let l=0,u;if(r.time&&(l=cK(r.time),isNaN(l)))return new Date(NaN);if(r.timezone){if(u=uK(r.timezone),isNaN(u))return new Date(NaN)}else{const d=new Date(o+l),h=new Date(0);return h.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),h.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),h}return new Date(o+l+u)}const Wd={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},rK=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,iK=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,aK=/^([+-])(\d{2})(?::?(\d{2}))?$/;function sK(e){const t={},n=e.split(Wd.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Wd.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Wd.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const s=Wd.timezone.exec(r);s?(t.time=r.replace(s[1],""),t.timezone=s[1]):t.time=r}return t}function oK(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const s=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:o===null?s:o*100,restDateString:e.slice((r[1]||r[2]).length)}}function lK(e,t){if(t===null)return new Date(NaN);const n=e.match(rK);if(!n)return new Date(NaN);const r=!!n[4],s=vc(n[1]),o=vc(n[2])-1,l=vc(n[3]),u=vc(n[4]),d=vc(n[5])-1;if(r)return pK(t,u,d)?dK(t,u,d):new Date(NaN);{const h=new Date(0);return!hK(t,o,l)||!mK(t,s)?new Date(NaN):(h.setUTCFullYear(t,o,Math.max(s,l)),h)}}function vc(e){return e?parseInt(e):1}function cK(e){const t=e.match(iK);if(!t)return NaN;const n=Qg(t[1]),r=Qg(t[2]),s=Qg(t[3]);return gK(n,r,s)?n*eM+r*JR+s*1e3:NaN}function Qg(e){return e&&parseFloat(e.replace(",","."))||0}function uK(e){if(e==="Z")return 0;const t=e.match(aK);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),s=t[3]&&parseInt(t[3])||0;return yK(r,s)?n*(r*eM+s*JR):NaN}function dK(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const s=r.getUTCDay()||7,o=(t-1)*7+n+1-s;return r.setUTCDate(r.getUTCDate()+o),r}const fK=[31,null,31,30,31,30,31,31,30,31,30,31];function iM(e){return e%400===0||e%4===0&&e%100!==0}function hK(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(fK[t]||(iM(e)?29:28))}function mK(e,t){return t>=1&&t<=(iM(e)?366:365)}function pK(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function gK(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function yK(e,t){return t>=0&&t<=59}const xK=(e,t="HH:mm:ss.SSS")=>{const n=typeof e=="string"?nK(e):e;return eK(n,t)};var vK=(e,t,n,r,s,o,l,u)=>{let d=document.documentElement,h=["light","dark"];function g(v){(Array.isArray(e)?e:[e]).forEach(S=>{let k=S==="class",E=k&&o?s.map(T=>o[T]||T):s;k?(d.classList.remove(...E),d.classList.add(o&&o[v]?o[v]:v)):d.setAttribute(S,v)}),p(v)}function p(v){u&&h.includes(v)&&(d.style.colorScheme=v)}function x(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)g(r);else try{let v=localStorage.getItem(t)||n,S=l&&v==="system"?x():v;g(S)}catch{}},bK=w.createContext(void 0),wK={setTheme:e=>{},themes:[]},aM=()=>{var e;return(e=w.useContext(bK))!=null?e:wK};w.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:o,value:l,themes:u,nonce:d,scriptProps:h})=>{let g=JSON.stringify([n,t,o,e,u,l,r,s]).slice(1,-1);return w.createElement("script",{...h,suppressHydrationWarning:!0,nonce:typeof window>"u"?d:"",dangerouslySetInnerHTML:{__html:`(${vK.toString()})(${g})`}})});const SK={error:"bg-red-500/10 text-red-700 border-red-200 dark:text-red-400 dark:border-red-800",warn:"bg-yellow-500/10 text-yellow-700 border-yellow-200 dark:text-yellow-400 dark:border-yellow-800",info:"bg-blue-500/10 text-blue-700 border-blue-200 dark:text-blue-400 dark:border-blue-800",debug:"bg-purple-500/10 text-purple-700 border-purple-200 dark:text-purple-400 dark:border-purple-800",trace:"bg-gray-500/10 text-gray-700 border-gray-200 dark:text-gray-400 dark:border-gray-800"};function sM({level:e}){return m.jsx(zr,{variant:"outline",className:Me("font-mono",SK[e]),children:e.toUpperCase()})}function kK({entry:e,isExpanded:t,onToggleExpand:n}){const r=e.data!==void 0||e.error!==void 0,{theme:s}=aM();return m.jsxs("div",{className:"border rounded-lg font-mono",children:[m.jsx("div",{className:`p-3 cursor-pointer hover:bg-muted/50 ${r?"":"cursor-default"}`,onClick:r?n:void 0,children:m.jsxs("div",{className:"flex items-start gap-3",children:[r&&m.jsx("div",{className:"mt-0.5",children:t?m.jsx(al,{className:"h-4 w-4 text-muted-foreground"}):m.jsx(sl,{className:"h-4 w-4 text-muted-foreground"})}),m.jsx("div",{className:"flex-1 min-w-0",children:m.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[m.jsx("span",{className:"text-muted-foreground font-mono text-xs",children:`[${xK(e.timestamp)}]`}),m.jsx(sM,{level:e.level}),m.jsx(zr,{variant:"secondary",children:e.context}),m.jsx("span",{className:"flex-1 break-words",children:e.message})]})})]})}),t&&r&&m.jsxs("div",{className:"border-t bg-muted/20 p-3 space-y-3",children:[e.data!==void 0&&m.jsxs("div",{children:[m.jsx("div",{className:"text-xs font-semibold text-muted-foreground mb-1",children:"DATA:"}),m.jsx("div",{className:"text-xs bg-background border rounded overflow-auto max-h-60",children:m.jsx(kh,{src:e.data,dark:!0,theme:"atom",enableClipboard:!0,displaySize:!1,collapseStringsAfterLength:100,style:{fontSize:"12px",fontFamily:"ui-monospace, SFMono-Regular, 'SF Mono', monospace",backgroundColor:"hsl(var(--background))",padding:"0",borderRadius:"0",border:"none"}})})]}),e.error&&m.jsxs("div",{children:[m.jsx("div",{className:"text-xs font-semibold text-muted-foreground mb-1",children:"ERROR:"}),m.jsxs("pre",{className:"text-xs bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-800 rounded p-2 overflow-auto max-h-40 text-red-700 dark:text-red-400",children:[e.error.message,e.error.stack&&`
355
+
356
+ ${e.error.stack}`]})]})]})]})}const CK=["error","warn","info","debug","trace"];function TK(){const{entries:e}=S7(),[t,n]=w.useState(new Set),[r,s]=w.useState("all"),[o,l]=w.useState(""),[u,d]=w.useState(!1),h=w.useRef(null),g=w.useRef(null),p=w.useMemo(()=>{const S=r==="all"?e:e.filter(E=>E.level===r);if(!o.trim())return S;const k=o.toLowerCase();return S.filter(E=>E.message.toLowerCase().includes(k)||E.context.toLowerCase().includes(k)||E.data&&JSON.stringify(E.data).toLowerCase().includes(k))},[e,r,o]);w.useEffect(()=>{g.current&&g.current.scrollIntoView({behavior:"smooth"})},[e.length]),w.useEffect(()=>{const S=()=>{if(h.current){const{scrollTop:E}=h.current;d(E>200)}},k=h.current;if(k)return k.addEventListener("scroll",S),()=>k.removeEventListener("scroll",S)},[]);const x=()=>{h.current&&h.current.scrollTo({top:0,behavior:"smooth"})},v=S=>{const k=new Set(t);k.has(S)?k.delete(S):k.add(S),n(k)};return m.jsxs("div",{className:"flex flex-col h-full",children:[m.jsxs("div",{className:"border-b bg-background p-4 space-y-4 flex-shrink-0 sticky top-0 z-10",children:[m.jsx("h2",{className:"text-lg font-semibold",children:"Tracing"}),m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsxs(Sa,{value:r,onValueChange:S=>s(S),children:[m.jsx(Ca,{className:"w-32",children:m.jsx(ka,{})}),m.jsxs(Ta,{children:[m.jsx(ar,{value:"all",children:"All Levels"}),CK.map(S=>m.jsx(ar,{value:S,children:m.jsx(sM,{level:S})},S))]})]}),m.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[m.jsx(CI,{className:"h-4 w-4"}),m.jsx(qt,{placeholder:"Search logs...",value:o,onChange:S=>l(S.target.value),className:"h-8"})]})]}),m.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[m.jsxs("span",{children:["Total: ",e.length]}),m.jsxs("span",{children:["Filtered: ",p.length]})]})]}),m.jsxs("div",{ref:h,className:"flex-1 overflow-y-auto p-4 space-y-2 font-mono text-sm min-h-0",children:[p.length===0?m.jsx("div",{className:"text-center text-muted-foreground py-8",children:e.length===0?"No logs yet":"No logs match current filters"}):p.map((S,k)=>{const E=t.has(k);return m.jsx(kK,{entry:S,isExpanded:E,onToggleExpand:()=>v(k)},`${S.timestamp}-${k}`)}),m.jsx("div",{ref:g})]}),u&&m.jsxs(Je,{onClick:x,size:"sm",className:"fixed bottom-4 right-4 z-20 shadow-lg",variant:"secondary",children:[m.jsx(Rj,{className:"h-4 w-4 mr-1"}),"Top"]})]})}const Jg=768;function EK(){const[e,t]=w.useState(void 0);return w.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Jg-1}px)`),r=()=>{t(window.innerWidth<Jg)};return n.addEventListener("change",r),t(window.innerWidth<Jg),()=>n.removeEventListener("change",r)},[]),!!e}function _K({...e}){return m.jsx(k_,{"data-slot":"sheet",...e})}function jK({...e}){return m.jsx(C_,{"data-slot":"sheet-portal",...e})}function NK({className:e,...t}){return m.jsx(T_,{"data-slot":"sheet-overlay",className:Me("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function AK({className:e,children:t,side:n="right",...r}){return m.jsxs(jK,{children:[m.jsx(NK,{}),m.jsxs(E_,{"data-slot":"sheet-content",className:Me("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...r,children:[t,m.jsxs(N_,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[m.jsx(Fo,{className:"size-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function RK({className:e,...t}){return m.jsx("div",{"data-slot":"sheet-header",className:Me("flex flex-col gap-1.5 p-4",e),...t})}function MK({className:e,...t}){return m.jsx(__,{"data-slot":"sheet-title",className:Me("text-foreground font-semibold",e),...t})}function OK({className:e,...t}){return m.jsx(j_,{"data-slot":"sheet-description",className:Me("text-muted-foreground text-sm",e),...t})}const DK="sidebar_state",PK=3600*24*7,zK="16rem",LK="18rem",IK="3rem",BK="b",oM=w.createContext(null);function M0(){const e=w.useContext(oM);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function VK({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:s,children:o,...l}){const u=EK(),[d,h]=w.useState(!1),[g,p]=w.useState(e),x=t??g,v=w.useCallback(T=>{const A=typeof T=="function"?T(x):T;n?n(A):p(A),document.cookie=`${DK}=${A}; path=/; max-age=${PK}`},[n,x]),S=w.useCallback(()=>u?h(T=>!T):v(T=>!T),[u,v,h]);w.useEffect(()=>{const T=A=>{A.key===BK&&(A.metaKey||A.ctrlKey)&&(A.preventDefault(),S())};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[S]);const k=x?"expanded":"collapsed",E=w.useMemo(()=>({state:k,open:x,setOpen:v,isMobile:u,openMobile:d,setOpenMobile:h,toggleSidebar:S}),[k,x,v,u,d,h,S]);return m.jsx(oM.Provider,{value:E,children:m.jsx(ph,{delayDuration:0,children:m.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":zK,"--sidebar-width-icon":IK,...s},className:Me("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",r),...l,children:o})})})}function UK({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:s,...o}){const{isMobile:l,state:u,openMobile:d,setOpenMobile:h}=M0();return n==="none"?m.jsx("div",{"data-slot":"sidebar",className:Me("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),...o,children:s}):l?m.jsx(_K,{open:d,onOpenChange:h,...o,children:m.jsxs(AK,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":LK},side:e,children:[m.jsxs(RK,{className:"sr-only",children:[m.jsx(MK,{children:"Sidebar"}),m.jsx(OK,{children:"Displays the mobile sidebar."})]}),m.jsx("div",{className:"flex h-full w-full flex-col",children:s})]})}):m.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":u,"data-collapsible":u==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[m.jsx("div",{"data-slot":"sidebar-gap",className:Me("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),m.jsx("div",{"data-slot":"sidebar-container",className:Me("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...o,children:m.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:s})})]})}function HK({className:e,onClick:t,...n}){const{toggleSidebar:r}=M0();return m.jsxs(Je,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:Me("size-7",e),onClick:s=>{t==null||t(s),r()},...n,children:[m.jsx(pI,{}),m.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function FK({className:e,...t}){return m.jsx("main",{"data-slot":"sidebar-inset",className:Me("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function $K({className:e,...t}){return m.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:Me("flex flex-col gap-2 p-2",e),...t})}function qK({className:e,...t}){return m.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:Me("flex flex-col gap-2 p-2",e),...t})}function GK({className:e,...t}){return m.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:Me("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function YK({className:e,...t}){return m.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:Me("relative flex w-full min-w-0 flex-col p-2",e),...t})}function ZK({className:e,...t}){return m.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:Me("w-full text-sm",e),...t})}function XK({className:e,...t}){return m.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:Me("flex w-full min-w-0 flex-col gap-1",e),...t})}function KK({className:e,...t}){return m.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:Me("group/menu-item relative",e),...t})}const WK=xv("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function QK({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:s,className:o,...l}){const u=e?Bx:"button",{isMobile:d,state:h}=M0(),g=m.jsx(u,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":t,className:Me(WK({variant:n,size:r}),o),...l});return s?(typeof s=="string"&&(s={children:s}),m.jsxs(cs,{children:[m.jsx(us,{asChild:!0,children:g}),m.jsx(ds,{side:"right",align:"center",hidden:h!=="collapsed"||d,...s})]})):g}function JK({items:e,onItemClick:t}){const n=s=>{t&&t(s)},r=s=>s.isActive||!1;return m.jsx(YK,{children:m.jsx(ZK,{children:m.jsx(XK,{children:e.map(s=>m.jsx(KK,{children:m.jsxs(QK,{tooltip:s.title,isActive:r(s),onClick:()=>n(s.url),className:r(s)?"[&[data-active=true]]:bg-black/5 dark:[&[data-active=true]]:bg-white/5 cursor-pointer":"cursor-pointer",children:[s.icon&&m.jsx(s.icon,{className:"h-4 w-4"}),m.jsx("span",{children:s.title})]})},s.title))})})})}const wE=[{id:"connection",items:[{title:"MCP Servers",url:"#servers",icon:gh},{title:"Playground",url:"#chat",icon:Oj},{title:"Tracing",url:"#tracing",icon:eI}]},{id:"tools",items:[{title:"Tools",url:"#tools",icon:iI},{title:"Resources",url:"#resources",icon:by},{title:"Prompts",url:"#prompts",icon:P6}]},{id:"settings",items:[{title:"Settings",url:"#settings",icon:Dj}]}];function eW({onNavigate:e,activeTab:t,...n}){const r=Xo(o=>o.themeMode),s=o=>{e&&o.startsWith("#")&&e(o.slice(1))};return m.jsxs(UK,{collapsible:"offcanvas",...n,children:[m.jsx($K,{children:m.jsx("div",{className:"flex items-center justify-center px-4 py-4",children:m.jsx("img",{src:r==="dark"?"/mcp_jam_dark.png":"/mcp_jam_light.png",alt:"MCP Jam",className:"h-4 w-auto"})})}),m.jsx(GK,{children:wE.map((o,l)=>m.jsxs(w.Fragment,{children:[m.jsx(JK,{items:o.items.map(u=>({...u,isActive:u.url===`#${t}`})),onItemClick:s}),l<wE.length-1&&m.jsx("div",{className:"mx-4 my-2 border-t border-border/50"})]},o.id))}),m.jsx(qK,{})]})}function tW(e){switch(e){case"connected":return"bg-green-500 dark:bg-green-400";case"connecting":return"bg-yellow-500 dark:bg-yellow-400 animate-pulse";case"failed":return"bg-red-500 dark:bg-red-400";case"disconnected":return"bg-muted-foreground";default:return"bg-muted-foreground"}}function nW(e){switch(e){case"connected":return"Connected";case"connecting":return"Connecting...";case"failed":return"Failed";case"disconnected":return"Disconnected";default:return"Unknown"}}function rW({connectedServerConfigs:e,selectedServer:t,selectedMultipleServers:n,isMultiSelectEnabled:r,onServerChange:s,onMultiServerToggle:o,onConnect:l}){const[u,d]=w.useState(!1),h=Object.entries(e);return h.length===0?m.jsx("div",{className:"mb-6 p-4 border rounded-lg bg-muted/30 text-center text-sm text-muted-foreground",children:"No servers connected. Add a server to get started."}):m.jsxs("div",{children:[m.jsxs("div",{className:"flex flex-wrap",children:[h.map(([g,p])=>{const x=r?n.includes(g):t===g;return m.jsxs("button",{onClick:()=>r?o(g):s(g),className:Me("group relative flex items-center gap-3 px-4 py-3 border-r border-b border-border transition-all duration-200 cursor-pointer","hover:bg-accent hover:text-accent-foreground",x?"bg-muted text-foreground":"bg-background text-foreground"),children:[r&&m.jsx("div",{className:Me("w-4 h-4 rounded border-2 flex items-center justify-center transition-colors",x?"bg-primary border-primary text-primary-foreground":"border-muted-foreground/30 hover:border-primary/50"),children:x&&m.jsx(Pr,{className:"w-3 h-3"})}),m.jsx("div",{className:Me("w-2 h-2 rounded-full",tW(p.connectionStatus)),title:nW(p.connectionStatus)}),m.jsx("span",{className:"text-sm font-medium truncate max-w-36",children:g}),m.jsx("div",{className:"text-xs opacity-70",children:p.config.command?"STDIO":"HTTP"})]},g)}),m.jsxs("button",{onClick:()=>d(!0),className:Me("group relative flex items-center gap-3 px-4 py-3 border-r border-b border-border transition-all duration-200 cursor-pointer","hover:bg-accent hover:text-accent-foreground","bg-background text-muted-foreground border-dashed"),children:[r&&m.jsx("div",{className:"w-4 h-4"}),m.jsx("span",{className:"text-sm font-medium",children:"Add Server"}),m.jsx("div",{className:"text-xs opacity-70",children:"+"})]})]}),m.jsx(Ij,{isOpen:u,onClose:()=>d(!1),onConnect:l})]})}function iW(e){const t=document.documentElement;t.classList.add("disable-transitions"),t.classList.toggle("dark",e==="dark"),requestAnimationFrame(()=>{t.classList.remove("disable-transitions")})}function aW(){const e=Xo(r=>r.themeMode),t=Xo(r=>r.setThemeMode),n=()=>{const r=e==="dark"?"light":"dark";iW(r),t(r)};return m.jsx(Je,{size:"icon",onClick:n,className:"cursor-pointer",children:e==="dark"?m.jsx(RI,{}):m.jsx(hI,{})})}let O0;O0=globalThis.crypto;async function sW(e){return(await O0).getRandomValues(new Uint8Array(e))}async function oW(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~";let n="";const r=await sW(e);for(let s=0;s<e;s++){const o=r[s]%t.length;n+=t[o]}return n}async function lW(e){return await oW(e)}async function cW(e){const t=await(await O0).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function uW(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await lW(e),n=await cW(t);return{code_verifier:t,code_challenge:n}}var dt;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const o={};for(const l of s)o[l]=l;return o},e.getValidEnumValues=s=>{const o=e.objectKeys(s).filter(u=>typeof s[s[u]]!="number"),l={};for(const u of o)l[u]=s[u];return e.objectValues(l)},e.objectValues=s=>e.objectKeys(s).map(function(o){return s[o]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const l in s)Object.prototype.hasOwnProperty.call(s,l)&&o.push(l);return o},e.find=(s,o)=>{for(const l of s)if(o(l))return l},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(l=>typeof l=="string"?`'${l}'`:l).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(dt||(dt={}));var SE;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(SE||(SE={}));const Ce=dt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),pa=e=>{switch(typeof e){case"undefined":return Ce.undefined;case"string":return Ce.string;case"number":return Number.isNaN(e)?Ce.nan:Ce.number;case"boolean":return Ce.boolean;case"function":return Ce.function;case"bigint":return Ce.bigint;case"symbol":return Ce.symbol;case"object":return Array.isArray(e)?Ce.array:e===null?Ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ce.promise:typeof Map<"u"&&e instanceof Map?Ce.map:typeof Set<"u"&&e instanceof Set?Ce.set:typeof Date<"u"&&e instanceof Date?Ce.date:Ce.object;default:return Ce.unknown}},ve=dt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Li extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},s=o=>{for(const l of o.issues)if(l.code==="invalid_union")l.unionErrors.map(s);else if(l.code==="invalid_return_type")s(l.returnTypeError);else if(l.code==="invalid_arguments")s(l.argumentsError);else if(l.path.length===0)r._errors.push(n(l));else{let u=r,d=0;for(;d<l.path.length;){const h=l.path[d];d===l.path.length-1?(u[h]=u[h]||{_errors:[]},u[h]._errors.push(n(l))):u[h]=u[h]||{_errors:[]},u=u[h],d++}}};return s(this),r}static assert(t){if(!(t instanceof Li))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,dt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];n[o]=n[o]||[],n[o].push(t(s))}else r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Li.create=e=>new Li(e);const mx=(e,t)=>{let n;switch(e.code){case ve.invalid_type:e.received===Ce.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ve.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,dt.jsonStringifyReplacer)}`;break;case ve.unrecognized_keys:n=`Unrecognized key(s) in object: ${dt.joinValues(e.keys,", ")}`;break;case ve.invalid_union:n="Invalid input";break;case ve.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${dt.joinValues(e.options)}`;break;case ve.invalid_enum_value:n=`Invalid enum value. Expected ${dt.joinValues(e.options)}, received '${e.received}'`;break;case ve.invalid_arguments:n="Invalid function arguments";break;case ve.invalid_return_type:n="Invalid function return type";break;case ve.invalid_date:n="Invalid date";break;case ve.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:dt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ve.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ve.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ve.custom:n="Invalid input";break;case ve.invalid_intersection_types:n="Intersection results could not be merged";break;case ve.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ve.not_finite:n="Number must be finite";break;default:n=t.defaultError,dt.assertNever(e)}return{message:n}};let dW=mx;function fW(){return dW}const hW=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,o=[...n,...s.path||[]],l={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let u="";const d=r.filter(h=>!!h).slice().reverse();for(const h of d)u=h(l,{data:t,defaultError:u}).message;return{...s,path:o,message:u}};function Se(e,t){const n=fW(),r=hW({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===mx?void 0:mx].filter(s=>!!s)});e.common.issues.push(r)}class On{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return Ue;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const o=await s.key,l=await s.value;r.push({key:o,value:l})}return On.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:o,value:l}=s;if(o.status==="aborted"||l.status==="aborted")return Ue;o.status==="dirty"&&t.dirty(),l.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof l.value<"u"||s.alwaysSet)&&(r[o.value]=l.value)}return{status:t.value,value:r}}}const Ue=Object.freeze({status:"aborted"}),Tc=e=>({status:"dirty",value:e}),Er=e=>({status:"valid",value:e}),kE=e=>e.status==="aborted",CE=e=>e.status==="dirty",Ko=e=>e.status==="valid",zf=e=>typeof Promise<"u"&&e instanceof Promise;var Ae;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ae||(Ae={}));class si{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const TE=(e,t)=>{if(Ko(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Li(e.common.issues);return this._error=n,this._error}}};function Ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(l,u)=>{const{message:d}=e;return l.code==="invalid_enum_value"?{message:d??u.defaultError}:typeof u.data>"u"?{message:d??r??u.defaultError}:l.code!=="invalid_type"?{message:u.defaultError}:{message:d??n??u.defaultError}},description:s}}class at{get description(){return this._def.description}_getType(t){return pa(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:pa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new On,ctx:{common:t.parent.common,data:t.data,parsedType:pa(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(zf(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:pa(t)},s=this._parseSync({data:t,path:r.path,parent:r});return TE(r,s)}"~validate"(t){var r,s;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:pa(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:n});return Ko(o)?{value:o.value}:{issues:n.common.issues}}catch(o){(s=(r=o==null?void 0:o.message)==null?void 0:r.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(o=>Ko(o)?{value:o.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:pa(t)},s=this._parse({data:t,path:r.path,parent:r}),o=await(zf(s)?s:Promise.resolve(s));return TE(r,o)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,o)=>{const l=t(s),u=()=>o.addIssue({code:ve.custom,...r(s)});return typeof Promise<"u"&&l instanceof Promise?l.then(d=>d?!0:(u(),!1)):l?!0:(u(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new Ts({schema:this,typeName:He.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Mi.create(this,this._def)}nullable(){return Es.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ii.create(this)}promise(){return Hf.create(this,this._def)}or(t){return If.create([this,t],this._def)}and(t){return Bf.create(this,t,this._def)}transform(t){return new Ts({...Ze(this._def),schema:this,typeName:He.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ff({...Ze(this._def),innerType:this,defaultValue:n,typeName:He.ZodDefault})}brand(){return new dM({typeName:He.ZodBranded,type:this,...Ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new $f({...Ze(this._def),innerType:this,catchValue:n,typeName:He.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return P0.create(this,t)}readonly(){return qf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const mW=/^c[^\s-]{8,}$/i,pW=/^[0-9a-z]+$/,gW=/^[0-9A-HJKMNP-TV-Z]{26}$/i,yW=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,xW=/^[a-z0-9_-]{21}$/i,vW=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,bW=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,wW=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,SW="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ey;const kW=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,CW=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,TW=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,EW=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,_W=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,jW=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,lM="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",NW=new RegExp(`^${lM}$`);function cM(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function AW(e){return new RegExp(`^${cM(e)}$`)}function RW(e){let t=`${lM}T${cM(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function MW(e,t){return!!((t==="v4"||!t)&&kW.test(e)||(t==="v6"||!t)&&TW.test(e))}function OW(e,t){if(!vW.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function DW(e,t){return!!((t==="v4"||!t)&&CW.test(e)||(t==="v6"||!t)&&EW.test(e))}class Ri extends at{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ce.string){const o=this._getOrReturnCtx(t);return Se(o,{code:ve.invalid_type,expected:Ce.string,received:o.parsedType}),Ue}const r=new On;let s;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(s=this._getOrReturnCtx(t,s),Se(s,{code:ve.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(s=this._getOrReturnCtx(t,s),Se(s,{code:ve.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const l=t.data.length>o.value,u=t.data.length<o.value;(l||u)&&(s=this._getOrReturnCtx(t,s),l?Se(s,{code:ve.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):u&&Se(s,{code:ve.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")wW.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"email",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")ey||(ey=new RegExp(SW,"u")),ey.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"emoji",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")yW.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"uuid",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")xW.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"nanoid",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")mW.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"cuid",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")pW.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"cuid2",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")gW.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"ulid",code:ve.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),Se(s,{validation:"url",code:ve.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"regex",code:ve.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),Se(s,{code:ve.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),Se(s,{code:ve.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),Se(s,{code:ve.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?RW(o).test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{code:ve.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?NW.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{code:ve.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?AW(o).test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{code:ve.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?bW.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"duration",code:ve.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?MW(t.data,o.version)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"ip",code:ve.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?OW(t.data,o.alg)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"jwt",code:ve.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?DW(t.data,o.version)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"cidr",code:ve.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?_W.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"base64",code:ve.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?jW.test(t.data)||(s=this._getOrReturnCtx(t,s),Se(s,{validation:"base64url",code:ve.invalid_string,message:o.message}),r.dirty()):dt.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:ve.invalid_string,...Ae.errToObj(r)})}_addCheck(t){return new Ri({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ae.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ae.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ae.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ae.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ae.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ae.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ae.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ae.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ae.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ae.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ae.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ae.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ae.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Ae.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Ae.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ae.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ae.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ae.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ae.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ae.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ae.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ae.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ae.errToObj(n)})}nonempty(t){return this.min(1,Ae.errToObj(t))}trim(){return new Ri({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ri({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ri({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ri.create=e=>new Ri({checks:[],typeName:He.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Ze(e)});function PW(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,o=Number.parseInt(e.toFixed(s).replace(".","")),l=Number.parseInt(t.toFixed(s).replace(".",""));return o%l/10**s}class Wo extends at{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ce.number){const o=this._getOrReturnCtx(t);return Se(o,{code:ve.invalid_type,expected:Ce.number,received:o.parsedType}),Ue}let r;const s=new On;for(const o of this._def.checks)o.kind==="int"?dt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Se(r,{code:ve.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:ve.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:ve.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?PW(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),Se(r,{code:ve.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Se(r,{code:ve.not_finite,message:o.message}),s.dirty()):dt.assertNever(o);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ae.toString(n))}setLimit(t,n,r,s){return new Wo({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ae.toString(s)}]})}_addCheck(t){return new Wo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ae.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ae.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ae.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ae.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ae.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&dt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Wo.create=e=>new Wo({checks:[],typeName:He.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class Jc extends at{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ce.bigint)return this._getInvalidInput(t);let r;const s=new On;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:ve.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:ve.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:ve.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):dt.assertNever(o);return{status:s.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Se(n,{code:ve.invalid_type,expected:Ce.bigint,received:n.parsedType}),Ue}gte(t,n){return this.setLimit("min",t,!0,Ae.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ae.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ae.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ae.toString(n))}setLimit(t,n,r,s){return new Jc({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ae.toString(s)}]})}_addCheck(t){return new Jc({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ae.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Jc.create=e=>new Jc({checks:[],typeName:He.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Ze(e)});class px extends at{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ce.boolean){const r=this._getOrReturnCtx(t);return Se(r,{code:ve.invalid_type,expected:Ce.boolean,received:r.parsedType}),Ue}return Er(t.data)}}px.create=e=>new px({typeName:He.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class Lf extends at{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ce.date){const o=this._getOrReturnCtx(t);return Se(o,{code:ve.invalid_type,expected:Ce.date,received:o.parsedType}),Ue}if(Number.isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return Se(o,{code:ve.invalid_date}),Ue}const r=new On;let s;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(s=this._getOrReturnCtx(t,s),Se(s,{code:ve.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(s=this._getOrReturnCtx(t,s),Se(s,{code:ve.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):dt.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Lf({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ae.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ae.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Lf.create=e=>new Lf({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:He.ZodDate,...Ze(e)});class EE extends at{_parse(t){if(this._getType(t)!==Ce.symbol){const r=this._getOrReturnCtx(t);return Se(r,{code:ve.invalid_type,expected:Ce.symbol,received:r.parsedType}),Ue}return Er(t.data)}}EE.create=e=>new EE({typeName:He.ZodSymbol,...Ze(e)});class gx extends at{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return Se(r,{code:ve.invalid_type,expected:Ce.undefined,received:r.parsedType}),Ue}return Er(t.data)}}gx.create=e=>new gx({typeName:He.ZodUndefined,...Ze(e)});class yx extends at{_parse(t){if(this._getType(t)!==Ce.null){const r=this._getOrReturnCtx(t);return Se(r,{code:ve.invalid_type,expected:Ce.null,received:r.parsedType}),Ue}return Er(t.data)}}yx.create=e=>new yx({typeName:He.ZodNull,...Ze(e)});class xx extends at{constructor(){super(...arguments),this._any=!0}_parse(t){return Er(t.data)}}xx.create=e=>new xx({typeName:He.ZodAny,...Ze(e)});class vx extends at{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Er(t.data)}}vx.create=e=>new vx({typeName:He.ZodUnknown,...Ze(e)});class ja extends at{_parse(t){const n=this._getOrReturnCtx(t);return Se(n,{code:ve.invalid_type,expected:Ce.never,received:n.parsedType}),Ue}}ja.create=e=>new ja({typeName:He.ZodNever,...Ze(e)});class _E extends at{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return Se(r,{code:ve.invalid_type,expected:Ce.void,received:r.parsedType}),Ue}return Er(t.data)}}_E.create=e=>new _E({typeName:He.ZodVoid,...Ze(e)});class ii extends at{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==Ce.array)return Se(n,{code:ve.invalid_type,expected:Ce.array,received:n.parsedType}),Ue;if(s.exactLength!==null){const l=n.data.length>s.exactLength.value,u=n.data.length<s.exactLength.value;(l||u)&&(Se(n,{code:l?ve.too_big:ve.too_small,minimum:u?s.exactLength.value:void 0,maximum:l?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(Se(n,{code:ve.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(Se(n,{code:ve.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((l,u)=>s.type._parseAsync(new si(n,l,n.path,u)))).then(l=>On.mergeArray(r,l));const o=[...n.data].map((l,u)=>s.type._parseSync(new si(n,l,n.path,u)));return On.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new ii({...this._def,minLength:{value:t,message:Ae.toString(n)}})}max(t,n){return new ii({...this._def,maxLength:{value:t,message:Ae.toString(n)}})}length(t,n){return new ii({...this._def,exactLength:{value:t,message:Ae.toString(n)}})}nonempty(t){return this.min(1,t)}}ii.create=(e,t)=>new ii({type:e,minLength:null,maxLength:null,exactLength:null,typeName:He.ZodArray,...Ze(t)});function Eo(e){if(e instanceof Qt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Mi.create(Eo(r))}return new Qt({...e._def,shape:()=>t})}else return e instanceof ii?new ii({...e._def,type:Eo(e.element)}):e instanceof Mi?Mi.create(Eo(e.unwrap())):e instanceof Es?Es.create(Eo(e.unwrap())):e instanceof ks?ks.create(e.items.map(t=>Eo(t))):e}class Qt extends at{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=dt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ce.object){const h=this._getOrReturnCtx(t);return Se(h,{code:ve.invalid_type,expected:Ce.object,received:h.parsedType}),Ue}const{status:r,ctx:s}=this._processInputParams(t),{shape:o,keys:l}=this._getCached(),u=[];if(!(this._def.catchall instanceof ja&&this._def.unknownKeys==="strip"))for(const h in s.data)l.includes(h)||u.push(h);const d=[];for(const h of l){const g=o[h],p=s.data[h];d.push({key:{status:"valid",value:h},value:g._parse(new si(s,p,s.path,h)),alwaysSet:h in s.data})}if(this._def.catchall instanceof ja){const h=this._def.unknownKeys;if(h==="passthrough")for(const g of u)d.push({key:{status:"valid",value:g},value:{status:"valid",value:s.data[g]}});else if(h==="strict")u.length>0&&(Se(s,{code:ve.unrecognized_keys,keys:u}),r.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const g of u){const p=s.data[g];d.push({key:{status:"valid",value:g},value:h._parse(new si(s,p,s.path,g)),alwaysSet:g in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const h=[];for(const g of d){const p=await g.key,x=await g.value;h.push({key:p,value:x,alwaysSet:g.alwaysSet})}return h}).then(h=>On.mergeObjectSync(r,h)):On.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return Ae.errToObj,new Qt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,l;const s=((l=(o=this._def).errorMap)==null?void 0:l.call(o,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:Ae.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new Qt({...this._def,unknownKeys:"strip"})}passthrough(){return new Qt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Qt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Qt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:He.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Qt({...this._def,catchall:t})}pick(t){const n={};for(const r of dt.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Qt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of dt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Qt({...this._def,shape:()=>n})}deepPartial(){return Eo(this)}partial(t){const n={};for(const r of dt.objectKeys(this.shape)){const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}return new Qt({...this._def,shape:()=>n})}required(t){const n={};for(const r of dt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Mi;)o=o._def.innerType;n[r]=o}return new Qt({...this._def,shape:()=>n})}keyof(){return uM(dt.objectKeys(this.shape))}}Qt.create=(e,t)=>new Qt({shape:()=>e,unknownKeys:"strip",catchall:ja.create(),typeName:He.ZodObject,...Ze(t)});Qt.strictCreate=(e,t)=>new Qt({shape:()=>e,unknownKeys:"strict",catchall:ja.create(),typeName:He.ZodObject,...Ze(t)});Qt.lazycreate=(e,t)=>new Qt({shape:e,unknownKeys:"strip",catchall:ja.create(),typeName:He.ZodObject,...Ze(t)});class If extends at{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(o){for(const u of o)if(u.result.status==="valid")return u.result;for(const u of o)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const l=o.map(u=>new Li(u.ctx.common.issues));return Se(n,{code:ve.invalid_union,unionErrors:l}),Ue}if(n.common.async)return Promise.all(r.map(async o=>{const l={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:l}),ctx:l}})).then(s);{let o;const l=[];for(const d of r){const h={...n,common:{...n.common,issues:[]},parent:null},g=d._parseSync({data:n.data,path:n.path,parent:h});if(g.status==="valid")return g;g.status==="dirty"&&!o&&(o={result:g,ctx:h}),h.common.issues.length&&l.push(h.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const u=l.map(d=>new Li(d));return Se(n,{code:ve.invalid_union,unionErrors:u}),Ue}}get options(){return this._def.options}}If.create=(e,t)=>new If({options:e,typeName:He.ZodUnion,...Ze(t)});const ji=e=>e instanceof wx?ji(e.schema):e instanceof Ts?ji(e.innerType()):e instanceof Uf?[e.value]:e instanceof Cs?e.options:e instanceof Sx?dt.objectValues(e.enum):e instanceof Ff?ji(e._def.innerType):e instanceof gx?[void 0]:e instanceof yx?[null]:e instanceof Mi?[void 0,...ji(e.unwrap())]:e instanceof Es?[null,...ji(e.unwrap())]:e instanceof dM||e instanceof qf?ji(e.unwrap()):e instanceof $f?ji(e._def.innerType):[];class D0 extends at{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.object)return Se(n,{code:ve.invalid_type,expected:Ce.object,received:n.parsedType}),Ue;const r=this.discriminator,s=n.data[r],o=this.optionsMap.get(s);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(Se(n,{code:ve.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ue)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const o of n){const l=ji(o.shape[t]);if(!l.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const u of l){if(s.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);s.set(u,o)}}return new D0({typeName:He.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Ze(r)})}}function bx(e,t){const n=pa(e),r=pa(t);if(e===t)return{valid:!0,data:e};if(n===Ce.object&&r===Ce.object){const s=dt.objectKeys(t),o=dt.objectKeys(e).filter(u=>s.indexOf(u)!==-1),l={...e,...t};for(const u of o){const d=bx(e[u],t[u]);if(!d.valid)return{valid:!1};l[u]=d.data}return{valid:!0,data:l}}else if(n===Ce.array&&r===Ce.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let o=0;o<e.length;o++){const l=e[o],u=t[o],d=bx(l,u);if(!d.valid)return{valid:!1};s.push(d.data)}return{valid:!0,data:s}}else return n===Ce.date&&r===Ce.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Bf extends at{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(o,l)=>{if(kE(o)||kE(l))return Ue;const u=bx(o.value,l.value);return u.valid?((CE(o)||CE(l))&&n.dirty(),{status:n.value,value:u.data}):(Se(r,{code:ve.invalid_intersection_types}),Ue)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,l])=>s(o,l)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Bf.create=(e,t,n)=>new Bf({left:e,right:t,typeName:He.ZodIntersection,...Ze(n)});class ks extends at{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.array)return Se(r,{code:ve.invalid_type,expected:Ce.array,received:r.parsedType}),Ue;if(r.data.length<this._def.items.length)return Se(r,{code:ve.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ue;!this._def.rest&&r.data.length>this._def.items.length&&(Se(r,{code:ve.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((l,u)=>{const d=this._def.items[u]||this._def.rest;return d?d._parse(new si(r,l,r.path,u)):null}).filter(l=>!!l);return r.common.async?Promise.all(o).then(l=>On.mergeArray(n,l)):On.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new ks({...this._def,rest:t})}}ks.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ks({items:e,typeName:He.ZodTuple,rest:null,...Ze(t)})};class Vf extends at{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.object)return Se(r,{code:ve.invalid_type,expected:Ce.object,received:r.parsedType}),Ue;const s=[],o=this._def.keyType,l=this._def.valueType;for(const u in r.data)s.push({key:o._parse(new si(r,u,r.path,u)),value:l._parse(new si(r,r.data[u],r.path,u)),alwaysSet:u in r.data});return r.common.async?On.mergeObjectAsync(n,s):On.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof at?new Vf({keyType:t,valueType:n,typeName:He.ZodRecord,...Ze(r)}):new Vf({keyType:Ri.create(),valueType:t,typeName:He.ZodRecord,...Ze(n)})}}class jE extends at{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.map)return Se(r,{code:ve.invalid_type,expected:Ce.map,received:r.parsedType}),Ue;const s=this._def.keyType,o=this._def.valueType,l=[...r.data.entries()].map(([u,d],h)=>({key:s._parse(new si(r,u,r.path,[h,"key"])),value:o._parse(new si(r,d,r.path,[h,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const d of l){const h=await d.key,g=await d.value;if(h.status==="aborted"||g.status==="aborted")return Ue;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),u.set(h.value,g.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const d of l){const h=d.key,g=d.value;if(h.status==="aborted"||g.status==="aborted")return Ue;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),u.set(h.value,g.value)}return{status:n.value,value:u}}}}jE.create=(e,t,n)=>new jE({valueType:t,keyType:e,typeName:He.ZodMap,...Ze(n)});class eu extends at{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.set)return Se(r,{code:ve.invalid_type,expected:Ce.set,received:r.parsedType}),Ue;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(Se(r,{code:ve.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(Se(r,{code:ve.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const o=this._def.valueType;function l(d){const h=new Set;for(const g of d){if(g.status==="aborted")return Ue;g.status==="dirty"&&n.dirty(),h.add(g.value)}return{status:n.value,value:h}}const u=[...r.data.values()].map((d,h)=>o._parse(new si(r,d,r.path,h)));return r.common.async?Promise.all(u).then(d=>l(d)):l(u)}min(t,n){return new eu({...this._def,minSize:{value:t,message:Ae.toString(n)}})}max(t,n){return new eu({...this._def,maxSize:{value:t,message:Ae.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}eu.create=(e,t)=>new eu({valueType:e,minSize:null,maxSize:null,typeName:He.ZodSet,...Ze(t)});class wx extends at{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}wx.create=(e,t)=>new wx({getter:e,typeName:He.ZodLazy,...Ze(t)});class Uf extends at{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Se(n,{received:n.data,code:ve.invalid_literal,expected:this._def.value}),Ue}return{status:"valid",value:t.data}}get value(){return this._def.value}}Uf.create=(e,t)=>new Uf({value:e,typeName:He.ZodLiteral,...Ze(t)});function uM(e,t){return new Cs({values:e,typeName:He.ZodEnum,...Ze(t)})}class Cs extends at{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Se(n,{expected:dt.joinValues(r),received:n.parsedType,code:ve.invalid_type}),Ue}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Se(n,{received:n.data,code:ve.invalid_enum_value,options:r}),Ue}return Er(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Cs.create(t,{...this._def,...n})}exclude(t,n=this._def){return Cs.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Cs.create=uM;class Sx extends at{_parse(t){const n=dt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ce.string&&r.parsedType!==Ce.number){const s=dt.objectValues(n);return Se(r,{expected:dt.joinValues(s),received:r.parsedType,code:ve.invalid_type}),Ue}if(this._cache||(this._cache=new Set(dt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const s=dt.objectValues(n);return Se(r,{received:r.data,code:ve.invalid_enum_value,options:s}),Ue}return Er(t.data)}get enum(){return this._def.values}}Sx.create=(e,t)=>new Sx({values:e,typeName:He.ZodNativeEnum,...Ze(t)});class Hf extends at{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.promise&&n.common.async===!1)return Se(n,{code:ve.invalid_type,expected:Ce.promise,received:n.parsedType}),Ue;const r=n.parsedType===Ce.promise?n.data:Promise.resolve(n.data);return Er(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Hf.create=(e,t)=>new Hf({type:e,typeName:He.ZodPromise,...Ze(t)});class Ts extends at{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===He.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,o={addIssue:l=>{Se(r,l),l.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const l=s.transform(r.data,o);if(r.common.async)return Promise.resolve(l).then(async u=>{if(n.value==="aborted")return Ue;const d=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return d.status==="aborted"?Ue:d.status==="dirty"||n.value==="dirty"?Tc(d.value):d});{if(n.value==="aborted")return Ue;const u=this._def.schema._parseSync({data:l,path:r.path,parent:r});return u.status==="aborted"?Ue:u.status==="dirty"||n.value==="dirty"?Tc(u.value):u}}if(s.type==="refinement"){const l=u=>{const d=s.refinement(u,o);if(r.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?Ue:(u.status==="dirty"&&n.dirty(),l(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?Ue:(u.status==="dirty"&&n.dirty(),l(u.value).then(()=>({status:n.value,value:u.value}))))}if(s.type==="transform")if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ko(l))return Ue;const u=s.transform(l.value,o);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>Ko(l)?Promise.resolve(s.transform(l.value,o)).then(u=>({status:n.value,value:u})):Ue);dt.assertNever(s)}}Ts.create=(e,t,n)=>new Ts({schema:e,typeName:He.ZodEffects,effect:t,...Ze(n)});Ts.createWithPreprocess=(e,t,n)=>new Ts({schema:t,effect:{type:"preprocess",transform:e},typeName:He.ZodEffects,...Ze(n)});class Mi extends at{_parse(t){return this._getType(t)===Ce.undefined?Er(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Mi.create=(e,t)=>new Mi({innerType:e,typeName:He.ZodOptional,...Ze(t)});class Es extends at{_parse(t){return this._getType(t)===Ce.null?Er(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Es.create=(e,t)=>new Es({innerType:e,typeName:He.ZodNullable,...Ze(t)});class Ff extends at{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ce.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ff.create=(e,t)=>new Ff({innerType:e,typeName:He.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ze(t)});class $f extends at{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return zf(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Li(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Li(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}$f.create=(e,t)=>new $f({innerType:e,typeName:He.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ze(t)});class NE extends at{_parse(t){if(this._getType(t)!==Ce.nan){const r=this._getOrReturnCtx(t);return Se(r,{code:ve.invalid_type,expected:Ce.nan,received:r.parsedType}),Ue}return{status:"valid",value:t.data}}}NE.create=e=>new NE({typeName:He.ZodNaN,...Ze(e)});class dM extends at{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class P0 extends at{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ue:o.status==="dirty"?(n.dirty(),Tc(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ue:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new P0({in:t,out:n,typeName:He.ZodPipeline})}}class qf extends at{_parse(t){const n=this._def.innerType._parse(t),r=s=>(Ko(s)&&(s.value=Object.freeze(s.value)),s);return zf(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}qf.create=(e,t)=>new qf({innerType:e,typeName:He.ZodReadonly,...Ze(t)});var He;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(He||(He={}));const ee=Ri.create,dn=Wo.create,an=px.create,zW=xx.create,yu=vx.create;ja.create;const Ne=ii.create,we=Qt.create,Pn=If.create,LW=D0.create;Bf.create;ks.create;const xu=Vf.create,$e=Uf.create,Ii=Cs.create;Hf.create;const pe=Mi.create;Es.create;const fM="2025-06-18",Dh="2.0",hM=Pn([ee(),dn().int()]),mM=ee(),IW=we({progressToken:pe(hM)}).passthrough(),_r=we({_meta:pe(IW)}).passthrough(),Gn=we({method:ee(),params:pe(_r)}),vu=we({_meta:pe(we({}).passthrough())}).passthrough(),ui=we({method:ee(),params:pe(vu)}),jr=we({_meta:pe(we({}).passthrough())}).passthrough(),Ph=Pn([ee(),dn().int()]),BW=we({jsonrpc:$e(Dh),id:Ph}).merge(Gn).strict(),VW=we({jsonrpc:$e(Dh)}).merge(ui).strict(),UW=we({jsonrpc:$e(Dh),id:Ph,result:jr}).strict();var AE;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError"})(AE||(AE={}));const HW=we({jsonrpc:$e(Dh),id:Ph,error:we({code:dn().int(),message:ee(),data:pe(yu())})}).strict();Pn([BW,VW,UW,HW]);const pM=jr.strict(),gM=ui.extend({method:$e("notifications/cancelled"),params:vu.extend({requestId:Ph,reason:ee().optional()})}),bu=we({name:ee(),title:pe(ee())}).passthrough(),yM=bu.extend({version:ee()}),FW=we({experimental:pe(we({}).passthrough()),sampling:pe(we({}).passthrough()),elicitation:pe(we({}).passthrough()),roots:pe(we({listChanged:pe(an())}).passthrough())}).passthrough(),$W=Gn.extend({method:$e("initialize"),params:_r.extend({protocolVersion:ee(),capabilities:FW,clientInfo:yM})}),qW=we({experimental:pe(we({}).passthrough()),logging:pe(we({}).passthrough()),completions:pe(we({}).passthrough()),prompts:pe(we({listChanged:pe(an())}).passthrough()),resources:pe(we({subscribe:pe(an()),listChanged:pe(an())}).passthrough()),tools:pe(we({listChanged:pe(an())}).passthrough())}).passthrough(),GW=jr.extend({protocolVersion:ee(),capabilities:qW,serverInfo:yM,instructions:pe(ee())}),YW=ui.extend({method:$e("notifications/initialized")}),xM=Gn.extend({method:$e("ping")}),ZW=we({progress:dn(),total:pe(dn()),message:pe(ee())}).passthrough(),vM=ui.extend({method:$e("notifications/progress"),params:vu.merge(ZW).extend({progressToken:hM})}),zh=Gn.extend({params:_r.extend({cursor:pe(mM)}).optional()}),Lh=jr.extend({nextCursor:pe(mM)}),bM=we({uri:ee(),mimeType:pe(ee()),_meta:pe(we({}).passthrough())}).passthrough(),wM=bM.extend({text:ee()}),z0=ee().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),SM=bM.extend({blob:z0}),kM=bu.extend({uri:ee(),description:pe(ee()),mimeType:pe(ee()),_meta:pe(we({}).passthrough())}),XW=bu.extend({uriTemplate:ee(),description:pe(ee()),mimeType:pe(ee()),_meta:pe(we({}).passthrough())}),KW=zh.extend({method:$e("resources/list")}),WW=Lh.extend({resources:Ne(kM)}),QW=zh.extend({method:$e("resources/templates/list")}),JW=Lh.extend({resourceTemplates:Ne(XW)}),eQ=Gn.extend({method:$e("resources/read"),params:_r.extend({uri:ee()})}),tQ=jr.extend({contents:Ne(Pn([wM,SM]))}),nQ=ui.extend({method:$e("notifications/resources/list_changed")}),rQ=Gn.extend({method:$e("resources/subscribe"),params:_r.extend({uri:ee()})}),iQ=Gn.extend({method:$e("resources/unsubscribe"),params:_r.extend({uri:ee()})}),aQ=ui.extend({method:$e("notifications/resources/updated"),params:vu.extend({uri:ee()})}),sQ=we({name:ee(),description:pe(ee()),required:pe(an())}).passthrough(),oQ=bu.extend({description:pe(ee()),arguments:pe(Ne(sQ)),_meta:pe(we({}).passthrough())}),lQ=zh.extend({method:$e("prompts/list")}),cQ=Lh.extend({prompts:Ne(oQ)}),uQ=Gn.extend({method:$e("prompts/get"),params:_r.extend({name:ee(),arguments:pe(xu(ee()))})}),L0=we({type:$e("text"),text:ee(),_meta:pe(we({}).passthrough())}).passthrough(),I0=we({type:$e("image"),data:z0,mimeType:ee(),_meta:pe(we({}).passthrough())}).passthrough(),B0=we({type:$e("audio"),data:z0,mimeType:ee(),_meta:pe(we({}).passthrough())}).passthrough(),dQ=we({type:$e("resource"),resource:Pn([wM,SM]),_meta:pe(we({}).passthrough())}).passthrough(),fQ=kM.extend({type:$e("resource_link")}),CM=Pn([L0,I0,B0,fQ,dQ]),hQ=we({role:Ii(["user","assistant"]),content:CM}).passthrough(),mQ=jr.extend({description:pe(ee()),messages:Ne(hQ)}),pQ=ui.extend({method:$e("notifications/prompts/list_changed")}),gQ=we({title:pe(ee()),readOnlyHint:pe(an()),destructiveHint:pe(an()),idempotentHint:pe(an()),openWorldHint:pe(an())}).passthrough(),yQ=bu.extend({description:pe(ee()),inputSchema:we({type:$e("object"),properties:pe(we({}).passthrough()),required:pe(Ne(ee()))}).passthrough(),outputSchema:pe(we({type:$e("object"),properties:pe(we({}).passthrough()),required:pe(Ne(ee()))}).passthrough()),annotations:pe(gQ),_meta:pe(we({}).passthrough())}),xQ=zh.extend({method:$e("tools/list")}),vQ=Lh.extend({tools:Ne(yQ)}),TM=jr.extend({content:Ne(CM).default([]),structuredContent:we({}).passthrough().optional(),isError:pe(an())});TM.or(jr.extend({toolResult:yu()}));const bQ=Gn.extend({method:$e("tools/call"),params:_r.extend({name:ee(),arguments:pe(xu(yu()))})}),wQ=ui.extend({method:$e("notifications/tools/list_changed")}),EM=Ii(["debug","info","notice","warning","error","critical","alert","emergency"]),SQ=Gn.extend({method:$e("logging/setLevel"),params:_r.extend({level:EM})}),kQ=ui.extend({method:$e("notifications/message"),params:vu.extend({level:EM,logger:pe(ee()),data:yu()})}),CQ=we({name:ee().optional()}).passthrough(),TQ=we({hints:pe(Ne(CQ)),costPriority:pe(dn().min(0).max(1)),speedPriority:pe(dn().min(0).max(1)),intelligencePriority:pe(dn().min(0).max(1))}).passthrough(),EQ=we({role:Ii(["user","assistant"]),content:Pn([L0,I0,B0])}).passthrough(),_Q=Gn.extend({method:$e("sampling/createMessage"),params:_r.extend({messages:Ne(EQ),systemPrompt:pe(ee()),includeContext:pe(Ii(["none","thisServer","allServers"])),temperature:pe(dn()),maxTokens:dn().int(),stopSequences:pe(Ne(ee())),metadata:pe(we({}).passthrough()),modelPreferences:pe(TQ)})}),jQ=jr.extend({model:ee(),stopReason:pe(Ii(["endTurn","stopSequence","maxTokens"]).or(ee())),role:Ii(["user","assistant"]),content:LW("type",[L0,I0,B0])}),NQ=we({type:$e("boolean"),title:pe(ee()),description:pe(ee()),default:pe(an())}).passthrough(),AQ=we({type:$e("string"),title:pe(ee()),description:pe(ee()),minLength:pe(dn()),maxLength:pe(dn()),format:pe(Ii(["email","uri","date","date-time"]))}).passthrough(),RQ=we({type:Ii(["number","integer"]),title:pe(ee()),description:pe(ee()),minimum:pe(dn()),maximum:pe(dn())}).passthrough(),MQ=we({type:$e("string"),title:pe(ee()),description:pe(ee()),enum:Ne(ee()),enumNames:pe(Ne(ee()))}).passthrough(),OQ=Pn([NQ,AQ,RQ,MQ]),DQ=Gn.extend({method:$e("elicitation/create"),params:_r.extend({message:ee(),requestedSchema:we({type:$e("object"),properties:xu(ee(),OQ),required:pe(Ne(ee()))}).passthrough()})}),PQ=jr.extend({action:Ii(["accept","decline","cancel"]),content:pe(xu(ee(),yu()))}),zQ=we({type:$e("ref/resource"),uri:ee()}).passthrough(),LQ=we({type:$e("ref/prompt"),name:ee()}).passthrough(),IQ=Gn.extend({method:$e("completion/complete"),params:_r.extend({ref:Pn([LQ,zQ]),argument:we({name:ee(),value:ee()}).passthrough(),context:pe(we({arguments:pe(xu(ee(),ee()))}))})}),BQ=jr.extend({completion:we({values:Ne(ee()).max(100),total:pe(dn().int()),hasMore:pe(an())}).passthrough()}),VQ=we({uri:ee().startsWith("file://"),name:pe(ee()),_meta:pe(we({}).passthrough())}).passthrough(),UQ=Gn.extend({method:$e("roots/list")}),HQ=jr.extend({roots:Ne(VQ)}),FQ=ui.extend({method:$e("notifications/roots/list_changed")});Pn([xM,$W,IQ,SQ,uQ,lQ,KW,QW,eQ,rQ,iQ,bQ,xQ]);Pn([gM,vM,YW,FQ]);Pn([pM,jQ,PQ,HQ]);Pn([xM,_Q,DQ,UQ]);Pn([gM,vM,kQ,aQ,nQ,wQ,pQ]);Pn([pM,GW,BQ,mQ,cQ,WW,JW,tQ,TM,vQ]);const $Q=we({resource:ee().url(),authorization_servers:Ne(ee().url()).optional(),jwks_uri:ee().url().optional(),scopes_supported:Ne(ee()).optional(),bearer_methods_supported:Ne(ee()).optional(),resource_signing_alg_values_supported:Ne(ee()).optional(),resource_name:ee().optional(),resource_documentation:ee().optional(),resource_policy_uri:ee().url().optional(),resource_tos_uri:ee().url().optional(),tls_client_certificate_bound_access_tokens:an().optional(),authorization_details_types_supported:Ne(ee()).optional(),dpop_signing_alg_values_supported:Ne(ee()).optional(),dpop_bound_access_tokens_required:an().optional()}).passthrough(),_M=we({issuer:ee(),authorization_endpoint:ee(),token_endpoint:ee(),registration_endpoint:ee().optional(),scopes_supported:Ne(ee()).optional(),response_types_supported:Ne(ee()),response_modes_supported:Ne(ee()).optional(),grant_types_supported:Ne(ee()).optional(),token_endpoint_auth_methods_supported:Ne(ee()).optional(),token_endpoint_auth_signing_alg_values_supported:Ne(ee()).optional(),service_documentation:ee().optional(),revocation_endpoint:ee().optional(),revocation_endpoint_auth_methods_supported:Ne(ee()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Ne(ee()).optional(),introspection_endpoint:ee().optional(),introspection_endpoint_auth_methods_supported:Ne(ee()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Ne(ee()).optional(),code_challenge_methods_supported:Ne(ee()).optional()}).passthrough(),qQ=we({issuer:ee(),authorization_endpoint:ee(),token_endpoint:ee(),userinfo_endpoint:ee().optional(),jwks_uri:ee(),registration_endpoint:ee().optional(),scopes_supported:Ne(ee()).optional(),response_types_supported:Ne(ee()),response_modes_supported:Ne(ee()).optional(),grant_types_supported:Ne(ee()).optional(),acr_values_supported:Ne(ee()).optional(),subject_types_supported:Ne(ee()),id_token_signing_alg_values_supported:Ne(ee()),id_token_encryption_alg_values_supported:Ne(ee()).optional(),id_token_encryption_enc_values_supported:Ne(ee()).optional(),userinfo_signing_alg_values_supported:Ne(ee()).optional(),userinfo_encryption_alg_values_supported:Ne(ee()).optional(),userinfo_encryption_enc_values_supported:Ne(ee()).optional(),request_object_signing_alg_values_supported:Ne(ee()).optional(),request_object_encryption_alg_values_supported:Ne(ee()).optional(),request_object_encryption_enc_values_supported:Ne(ee()).optional(),token_endpoint_auth_methods_supported:Ne(ee()).optional(),token_endpoint_auth_signing_alg_values_supported:Ne(ee()).optional(),display_values_supported:Ne(ee()).optional(),claim_types_supported:Ne(ee()).optional(),claims_supported:Ne(ee()).optional(),service_documentation:ee().optional(),claims_locales_supported:Ne(ee()).optional(),ui_locales_supported:Ne(ee()).optional(),claims_parameter_supported:an().optional(),request_parameter_supported:an().optional(),request_uri_parameter_supported:an().optional(),require_request_uri_registration:an().optional(),op_policy_uri:ee().optional(),op_tos_uri:ee().optional()}).passthrough(),GQ=qQ.merge(_M.pick({code_challenge_methods_supported:!0})),jM=we({access_token:ee(),id_token:ee().optional(),token_type:ee(),expires_in:dn().optional(),scope:ee().optional(),refresh_token:ee().optional()}).strip(),YQ=we({error:ee(),error_description:ee().optional(),error_uri:ee().optional()}),ZQ=we({redirect_uris:Ne(ee()).refine(e=>e.every(t=>URL.canParse(t)),{message:"redirect_uris must contain valid URLs"}),token_endpoint_auth_method:ee().optional(),grant_types:Ne(ee()).optional(),response_types:Ne(ee()).optional(),client_name:ee().optional(),client_uri:ee().optional(),logo_uri:ee().optional(),scope:ee().optional(),contacts:Ne(ee()).optional(),tos_uri:ee().optional(),policy_uri:ee().optional(),jwks_uri:ee().optional(),jwks:zW().optional(),software_id:ee().optional(),software_version:ee().optional(),software_statement:ee().optional()}).strip(),XQ=we({client_id:ee(),client_secret:ee().optional(),client_id_issued_at:dn().optional(),client_secret_expires_at:dn().optional()}).strip(),KQ=ZQ.merge(XQ);we({error:ee(),error_description:ee().optional()}).strip();we({token:ee(),token_type_hint:ee().optional()}).strip();function WQ(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function QQ({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const s=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",o=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return s.startsWith(o)}class vn extends Error{constructor(t,n){super(t),this.errorUri=n,this.name=this.constructor.name}toResponseObject(){const t={error:this.errorCode,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}get errorCode(){return this.constructor.errorCode}}class kx extends vn{}kx.errorCode="invalid_request";class Gf extends vn{}Gf.errorCode="invalid_client";class Yf extends vn{}Yf.errorCode="invalid_grant";class Zf extends vn{}Zf.errorCode="unauthorized_client";class Cx extends vn{}Cx.errorCode="unsupported_grant_type";class Tx extends vn{}Tx.errorCode="invalid_scope";class Ex extends vn{}Ex.errorCode="access_denied";class Qo extends vn{}Qo.errorCode="server_error";class _x extends vn{}_x.errorCode="temporarily_unavailable";class jx extends vn{}jx.errorCode="unsupported_response_type";class Nx extends vn{}Nx.errorCode="unsupported_token_type";class Ax extends vn{}Ax.errorCode="invalid_token";class Rx extends vn{}Rx.errorCode="method_not_allowed";class Mx extends vn{}Mx.errorCode="too_many_requests";class Ox extends vn{}Ox.errorCode="invalid_client_metadata";class Dx extends vn{}Dx.errorCode="insufficient_scope";const JQ={[kx.errorCode]:kx,[Gf.errorCode]:Gf,[Yf.errorCode]:Yf,[Zf.errorCode]:Zf,[Cx.errorCode]:Cx,[Tx.errorCode]:Tx,[Ex.errorCode]:Ex,[Qo.errorCode]:Qo,[_x.errorCode]:_x,[jx.errorCode]:jx,[Nx.errorCode]:Nx,[Ax.errorCode]:Ax,[Rx.errorCode]:Rx,[Mx.errorCode]:Mx,[Ox.errorCode]:Ox,[Dx.errorCode]:Dx};function NM(e,t){const n=e.client_secret!==void 0;return t.length===0?n?"client_secret_post":"none":n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function AM(e,t,n,r){const{client_id:s,client_secret:o}=t;switch(e){case"client_secret_basic":eJ(s,o,n);return;case"client_secret_post":tJ(s,o,r);return;case"none":nJ(s,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function eJ(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function tJ(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function nJ(e,t){t.set("client_id",e)}async function V0(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=YQ.parse(JSON.parse(n)),{error:s,error_description:o,error_uri:l}=r,u=JQ[s]||Qo;return new u(o||"",l)}catch(r){const s=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new Qo(s)}}async function U0(e,t){var n,r;try{return await ty(e,t)}catch(s){if(s instanceof Gf||s instanceof Zf)return await((n=e.invalidateCredentials)===null||n===void 0?void 0:n.call(e,"all")),await ty(e,t);if(s instanceof Yf)return await((r=e.invalidateCredentials)===null||r===void 0?void 0:r.call(e,"tokens")),await ty(e,t);throw s}}async function ty(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:s,fetchFn:o}){let l,u;try{l=await iJ(t,{resourceMetadataUrl:s},o),l.authorization_servers&&l.authorization_servers.length>0&&(u=l.authorization_servers[0])}catch{}u||(u=t);const d=await rJ(t,e,l),h=await cJ(u,{fetchFn:o});let g=await Promise.resolve(e.clientInformation());if(!g){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const k=await hJ(u,{metadata:h,clientMetadata:e.clientMetadata});await e.saveClientInformation(k),g=k}if(n!==void 0){const k=await e.codeVerifier(),E=await dJ(u,{metadata:h,clientInformation:g,authorizationCode:n,codeVerifier:k,redirectUri:e.redirectUrl,resource:d,addClientAuthentication:e.addClientAuthentication,fetchFn:o});return await e.saveTokens(E),"AUTHORIZED"}const p=await e.tokens();if(p!=null&&p.refresh_token)try{const k=await fJ(u,{metadata:h,clientInformation:g,refreshToken:p.refresh_token,resource:d,addClientAuthentication:e.addClientAuthentication});return await e.saveTokens(k),"AUTHORIZED"}catch(k){if(!(!(k instanceof vn)||k instanceof Qo))throw k}const x=e.state?await e.state():void 0,{authorizationUrl:v,codeVerifier:S}=await uJ(u,{metadata:h,clientInformation:g,state:x,redirectUrl:e.redirectUrl,scope:r||e.clientMetadata.scope,resource:d});return await e.saveCodeVerifier(S),await e.redirectToAuthorization(v),"REDIRECT"}async function rJ(e,t,n){const r=WQ(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n==null?void 0:n.resource);if(n){if(!QQ({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}async function iJ(e,t,n=fetch){const r=await oJ(e,"oauth-protected-resource",n,{protocolVersion:t==null?void 0:t.protocolVersion,metadataUrl:t==null?void 0:t.resourceMetadataUrl});if(!r||r.status===404)throw new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return $Q.parse(await r.json())}async function H0(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?H0(e,void 0,n):void 0;throw r}}function aJ(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function RE(e,t,n=fetch){return await H0(e,{"MCP-Protocol-Version":t},n)}function sJ(e,t){return!e||e.status===404&&t!=="/"}async function oJ(e,t,n,r){var s,o;const l=new URL(e),u=(s=r==null?void 0:r.protocolVersion)!==null&&s!==void 0?s:fM;let d;if(r!=null&&r.metadataUrl)d=new URL(r.metadataUrl);else{const g=aJ(t,l.pathname);d=new URL(g,(o=r==null?void 0:r.metadataServerUrl)!==null&&o!==void 0?o:l),d.search=l.search}let h=await RE(d,u,n);if(!(r!=null&&r.metadataUrl)&&sJ(h,l.pathname)){const g=new URL(`/.well-known/${t}`,l);h=await RE(g,u,n)}return h}function lJ(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let s=t.pathname;return s.endsWith("/")&&(s=s.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${s}`,t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${s}`,t.origin),type:"oidc"}),r.push({url:new URL(`${s}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function cJ(e,{fetchFn:t=fetch,protocolVersion:n=fM}={}){var r;const s={"MCP-Protocol-Version":n},o=lJ(e);for(const{url:l,type:u}of o){const d=await H0(l,s,t);if(!d)throw new Error(`CORS error trying to load ${u==="oauth"?"OAuth":"OpenID provider"} metadata from ${l}`);if(!d.ok){if(d.status>=400&&d.status<500)continue;throw new Error(`HTTP ${d.status} trying to load ${u==="oauth"?"OAuth":"OpenID provider"} metadata from ${l}`)}if(u==="oauth")return _M.parse(await d.json());{const h=GQ.parse(await d.json());if(!(!((r=h.code_challenge_methods_supported)===null||r===void 0)&&r.includes("S256")))throw new Error(`Incompatible OIDC provider at ${l}: does not support S256 code challenge method required by MCP specification`);return h}}}async function uJ(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:s,state:o,resource:l}){const u="code",d="S256";let h;if(t){if(h=new URL(t.authorization_endpoint),!t.response_types_supported.includes(u))throw new Error(`Incompatible auth server: does not support response type ${u}`);if(!t.code_challenge_methods_supported||!t.code_challenge_methods_supported.includes(d))throw new Error(`Incompatible auth server: does not support code challenge method ${d}`)}else h=new URL("/authorize",e);const g=await uW(),p=g.code_verifier,x=g.code_challenge;return h.searchParams.set("response_type",u),h.searchParams.set("client_id",n.client_id),h.searchParams.set("code_challenge",x),h.searchParams.set("code_challenge_method",d),h.searchParams.set("redirect_uri",String(r)),o&&h.searchParams.set("state",o),s&&h.searchParams.set("scope",s),s!=null&&s.includes("offline_access")&&h.searchParams.append("prompt","consent"),l&&h.searchParams.set("resource",l.href),{authorizationUrl:h,codeVerifier:p}}async function dJ(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:s,redirectUri:o,resource:l,addClientAuthentication:u,fetchFn:d}){var h;const g="authorization_code",p=t!=null&&t.token_endpoint?new URL(t.token_endpoint):new URL("/token",e);if(t!=null&&t.grant_types_supported&&!t.grant_types_supported.includes(g))throw new Error(`Incompatible auth server: does not support grant type ${g}`);const x=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"}),v=new URLSearchParams({grant_type:g,code:r,code_verifier:s,redirect_uri:String(o)});if(u)u(x,v,e,t);else{const k=(h=t==null?void 0:t.token_endpoint_auth_methods_supported)!==null&&h!==void 0?h:[],E=NM(n,k);AM(E,n,x,v)}l&&v.set("resource",l.href);const S=await(d??fetch)(p,{method:"POST",headers:x,body:v});if(!S.ok)throw await V0(S);return jM.parse(await S.json())}async function fJ(e,{metadata:t,clientInformation:n,refreshToken:r,resource:s,addClientAuthentication:o,fetchFn:l}){var u;const d="refresh_token";let h;if(t){if(h=new URL(t.token_endpoint),t.grant_types_supported&&!t.grant_types_supported.includes(d))throw new Error(`Incompatible auth server: does not support grant type ${d}`)}else h=new URL("/token",e);const g=new Headers({"Content-Type":"application/x-www-form-urlencoded"}),p=new URLSearchParams({grant_type:d,refresh_token:r});if(o)o(g,p,e,t);else{const v=(u=t==null?void 0:t.token_endpoint_auth_methods_supported)!==null&&u!==void 0?u:[],S=NM(n,v);AM(S,n,g,p)}s&&p.set("resource",s.href);const x=await(l??fetch)(h,{method:"POST",headers:g,body:p});if(!x.ok)throw await V0(x);return jM.parse({refresh_token:r,...await x.json()})}async function hJ(e,{metadata:t,clientMetadata:n,fetchFn:r}){let s;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");s=new URL(t.registration_endpoint)}else s=new URL("/register",e);const o=await(r??fetch)(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!o.ok)throw await V0(o);return KQ.parse(await o.json())}const Io=window.fetch;function F0(){return async function(t,n){const r=typeof t=="string"?t:t instanceof URL?t.toString():t.url;if(r.includes("/.well-known/oauth-authorization-server"))try{const s=`/api/mcp/oauth/metadata?url=${encodeURIComponent(r)}`;return await Io(s,{...n,method:"GET"})}catch(s){return console.error("OAuth metadata proxy failed, falling back to direct fetch:",s),await Io(t,n)}return await Io(t,n)}}class $0{constructor(t){Ja(this,"serverName");Ja(this,"redirectUri");this.serverName=t,this.redirectUri=`${window.location.origin}/oauth/callback`}get redirectUrl(){return this.redirectUri}get clientMetadata(){return{client_name:`MCP Inspector - ${this.serverName}`,client_uri:"https://github.com/modelcontextprotocol/inspector",redirect_uris:[this.redirectUri],grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:"client_secret_post",scope:"mcp:*"}}clientInformation(){const t=localStorage.getItem(`mcp-client-${this.serverName}`);return t?JSON.parse(t):void 0}async saveClientInformation(t){localStorage.setItem(`mcp-client-${this.serverName}`,JSON.stringify(t))}tokens(){const t=localStorage.getItem(`mcp-tokens-${this.serverName}`);return t?JSON.parse(t):void 0}async saveTokens(t){localStorage.setItem(`mcp-tokens-${this.serverName}`,JSON.stringify(t))}async redirectToAuthorization(t){console.log("Setting mcp-oauth-pending to:",this.serverName),localStorage.setItem("mcp-oauth-pending",this.serverName),window.location.href=t.toString()}async saveCodeVerifier(t){localStorage.setItem(`mcp-verifier-${this.serverName}`,t)}codeVerifier(){const t=localStorage.getItem(`mcp-verifier-${this.serverName}`);if(!t)throw new Error("Code verifier not found");return t}async invalidateCredentials(t){switch(t){case"all":localStorage.removeItem(`mcp-tokens-${this.serverName}`),localStorage.removeItem(`mcp-client-${this.serverName}`),localStorage.removeItem(`mcp-verifier-${this.serverName}`);break;case"client":localStorage.removeItem(`mcp-client-${this.serverName}`);break;case"tokens":localStorage.removeItem(`mcp-tokens-${this.serverName}`);break;case"verifier":localStorage.removeItem(`mcp-verifier-${this.serverName}`);break}}}async function mJ(e){var n;const t=F0();window.fetch=t;try{const r=new $0(e.serverName);localStorage.setItem(`mcp-serverUrl-${e.serverName}`,e.serverUrl),localStorage.setItem("mcp-oauth-pending",e.serverName);const s=await U0(r,{serverUrl:e.serverUrl,scope:((n=e.scopes)==null?void 0:n.join(" "))||"mcp:*"});if(s==="REDIRECT")return{success:!0};if(s==="AUTHORIZED"){const o=r.tokens();if(o)return{success:!0,serverConfig:q0(e.serverUrl,o)}}return{success:!1,error:"OAuth flow failed"}}catch(r){return{success:!1,error:r instanceof Error?r.message:"Unknown OAuth error"}}finally{window.fetch=Io}}async function pJ(e){const t=F0();window.fetch=t;try{const n=localStorage.getItem("mcp-oauth-pending");if(!n)throw new Error("No pending OAuth flow found");const r=localStorage.getItem(`mcp-serverUrl-${n}`);if(!r)throw new Error("Server URL not found for OAuth callback");const s=new $0(n);if(await U0(s,{serverUrl:r,authorizationCode:e,scope:"mcp:*"})==="AUTHORIZED"){const l=s.tokens();if(l)return localStorage.removeItem("mcp-oauth-pending"),{success:!0,serverConfig:q0(r,l),serverName:n}}return{success:!1,error:"Token exchange failed"}}catch(n){return{success:!1,error:n instanceof Error?n.message:"Unknown callback error"}}finally{window.fetch=Io}}function Qd(e){const t=localStorage.getItem(`mcp-tokens-${e}`);return t?JSON.parse(t):void 0}async function gJ(e){const t=F0();window.fetch=t;try{const n=new $0(e),r=n.tokens();if(!(r!=null&&r.refresh_token))return{success:!1,error:"No refresh token available"};const s=localStorage.getItem(`mcp-serverUrl-${e}`);if(!s)return{success:!1,error:"Server URL not found for token refresh"};if(await U0(n,{serverUrl:s,scope:"mcp:*"})==="AUTHORIZED"){const l=n.tokens();if(l)return{success:!0,serverConfig:q0(s,l)}}return{success:!1,error:"Token refresh failed"}}catch(n){return{success:!1,error:n instanceof Error?n.message:"Unknown refresh error"}}finally{window.fetch=Io}}function yJ(e){localStorage.removeItem(`mcp-tokens-${e}`),localStorage.removeItem(`mcp-client-${e}`),localStorage.removeItem(`mcp-verifier-${e}`),localStorage.removeItem(`mcp-serverUrl-${e}`)}function q0(e,t){return{url:new URL(e),requestInit:{headers:t.access_token?{Authorization:`Bearer ${t.access_token}`}:{}},oauth:t}}const ME="mcp-inspector-state";function xJ(){var O;const e=Bj("Connections"),[t,n]=w.useState({servers:{},selectedServer:"none",selectedMultipleServers:[],isMultiSelectMode:!1}),[r,s]=w.useState(!0),[o,l]=w.useState({});w.useEffect(()=>{const R=localStorage.getItem(ME);if(R)try{const M=JSON.parse(R),_=Object.fromEntries(Object.entries(M.servers||{}).map(([D,P])=>[D,{...P,connectionStatus:P.connectionStatus||"disconnected",retryCount:P.retryCount||0,lastConnectionTime:P.lastConnectionTime?new Date(P.lastConnectionTime):new Date}]));n({servers:_,selectedServer:M.selectedServer||"none",selectedMultipleServers:M.selectedMultipleServers||[],isMultiSelectMode:M.isMultiSelectMode||!1})}catch(M){e.error("Failed to parse saved state",{error:M instanceof Error?M.message:"Unknown error"})}s(!1)},[]),w.useEffect(()=>{r||localStorage.setItem(ME,JSON.stringify(t))},[t,r]);const u=w.useCallback(()=>{n(R=>({...R,selectedMultipleServers:Object.keys(t.servers)}))},[t.servers]);w.useEffect(()=>{if(!r){const R=new URLSearchParams(window.location.search),M=R.get("code"),_=R.get("error");M?g(M):_&&Xt.error(`OAuth authorization failed: ${_}`)}},[r]);const d=w.useCallback(R=>R.type==="stdio"?{command:R.command,args:R.args,env:R.env}:{url:new URL(R.url),requestInit:{headers:R.headers||{}}},[]),h=w.useCallback(async R=>{if(console.log("handleConnectFormData",R),R.type==="stdio"){if(!R.command||R.command.trim()===""){Xt.error("Command is required for STDIO connections");return}}else{if(!R.url||R.url.trim()===""){Xt.error("URL is required for HTTP connections");return}try{new URL(R.url)}catch(_){Xt.error(`Invalid URL format: ${R.url} ${_}`);return}}const M=d(R);n(_=>({..._,servers:{..._.servers,[R.name]:{name:R.name,config:M,lastConnectionTime:new Date,connectionStatus:"connecting",retryCount:0}},selectedServer:R.name}));try{if(R.type==="http"&&R.useOAuth&&R.url){n(B=>({...B,servers:{...B.servers,[R.name]:{...B.servers[R.name],connectionStatus:"oauth-flow"}}}));const P=await mJ({serverName:R.name,serverUrl:R.url,scopes:R.oauthScopes||["mcp:*"]});if(P.success)if(P.serverConfig){try{const z=await(await fetch("/api/mcp/connect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverConfig:P.serverConfig})})).json();z.success?(n(H=>({...H,servers:{...H.servers,[R.name]:{...H.servers[R.name],config:P.serverConfig,connectionStatus:"connected",oauthTokens:Qd(R.name),lastError:void 0}}})),Xt.success("Connected successfully with OAuth!")):(n(H=>({...H,servers:{...H.servers,[R.name]:{...H.servers[R.name],connectionStatus:"failed",lastError:z.error||"OAuth connection test failed"}}})),Xt.error(`OAuth succeeded but connection failed: ${z.error}`))}catch(B){const z=B instanceof Error?B.message:"Unknown error";n(H=>({...H,servers:{...H.servers,[R.name]:{...H.servers[R.name],connectionStatus:"failed",lastError:z}}})),Xt.error(`OAuth succeeded but connection test threw error: ${z}`)}return}else{Xt.success("OAuth flow initiated. You will be redirected to authorize access.");return}else{n(B=>({...B,servers:{...B.servers,[R.name]:{...B.servers[R.name],connectionStatus:"failed",retryCount:0,lastError:P.error||"OAuth initialization failed"}}})),Xt.error(`OAuth initialization failed: ${P.error}`);return}}const D=await(await fetch("/api/mcp/connect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverConfig:M})})).json();D.success?(n(P=>({...P,servers:{...P.servers,[R.name]:{...P.servers[R.name],connectionStatus:"connected",lastConnectionTime:new Date,retryCount:0,lastError:void 0}}})),e.info("Connection successful",{serverName:R.name}),Xt.success("Connected successfully!")):(n(P=>({...P,servers:{...P.servers,[R.name]:{...P.servers[R.name],connectionStatus:"failed",retryCount:0,lastError:D.error}}})),e.error("Connection failed",{serverName:R.name,error:D.error}),Xt.error(`Failed to connect to ${R.name}`))}catch(_){const D=_ instanceof Error?_.message:"Unknown error";n(P=>({...P,servers:{...P.servers,[R.name]:{...P.servers[R.name],connectionStatus:"failed",retryCount:0,lastError:D}}})),e.error("Connection failed",{serverName:R.name,error:D}),Xt.error(`Network error: ${D}`)}},[d]),g=w.useCallback(async R=>{window.history.replaceState({},document.title,window.location.pathname);try{const M=await pJ(R);if(console.log("OAuth callback result:",M),M.success&&M.serverConfig&&M.serverName){const _=M.serverName,D=t.servers[_];!D||D.connectionStatus!=="oauth-flow"?n(P=>({...P,servers:{...P.servers,[_]:{name:_,config:M.serverConfig,oauthTokens:Qd(_),lastConnectionTime:new Date,connectionStatus:"connecting",retryCount:0}},selectedServer:_})):n(P=>({...P,servers:{...P.servers,[_]:{...P.servers[_],config:M.serverConfig,oauthTokens:Qd(_),connectionStatus:"connecting",lastError:void 0}},selectedServer:_}));try{const B=await(await fetch("/api/mcp/connect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverConfig:M.serverConfig})})).json();B.success?(n(z=>({...z,servers:{...z.servers,[_]:{...z.servers[_],connectionStatus:"connected",lastConnectionTime:new Date,lastError:void 0}}})),e.info("OAuth connection successful",{serverName:_}),Xt.success(`OAuth connection successful! Connected to ${_}.`)):(n(z=>({...z,servers:{...z.servers,[_]:{...z.servers[_],connectionStatus:"failed",lastError:B.error||"Connection test failed after OAuth"}}})),e.error("OAuth connection test failed",{serverName:_,error:B.error}),Xt.error(`OAuth succeeded but connection test failed: ${B.error}`))}catch(P){const B=P instanceof Error?P.message:"Unknown connection error";n(z=>({...z,servers:{...z.servers,[_]:{...z.servers[_],connectionStatus:"failed",lastError:B}}})),e.error("OAuth connection test error",{serverName:_,error:B}),Xt.error(`OAuth succeeded but connection test failed: ${B}`)}}else throw new Error(M.error||"OAuth callback failed")}catch(M){const _=M instanceof Error?M.message:"Unknown error";Xt.error(`Error completing OAuth flow: ${_}`),e.error("OAuth callback failed",{error:_})}},[t.servers,e]),p=w.useCallback(async R=>{const M=t.servers[R];return M!=null&&M.oauthTokens&&M.oauthTokens.access_token||null},[t.servers]),x=w.useCallback(async R=>{e.info("Disconnecting from server",{serverName:R}),yJ(R),n(M=>{const _={...M.servers};return delete _[R],{...M,servers:_,selectedServer:M.selectedServer===R?"none":M.selectedServer,selectedMultipleServers:M.selectedMultipleServers.filter(D=>D!==R)}})},[]),v=w.useCallback(async R=>{e.info("Reconnecting to server",{serverName:R});const M=t.servers[R];if(!M)throw new Error(`Server ${R} not found`);n(_=>({..._,servers:{..._.servers,[R]:{...M,connectionStatus:"connecting"}}}));try{let _=M.config;if(M.oauthTokens){e.info("Attempting to refresh OAuth tokens",{serverName:R});const B=await gJ(R);B.success&&B.serverConfig?(e.info("OAuth tokens refreshed successfully",{serverName:R}),_=B.serverConfig,n(z=>({...z,servers:{...z.servers,[R]:{...z.servers[R],config:B.serverConfig,oauthTokens:Qd(R)}}}))):e.warn("OAuth token refresh failed, attempting with existing tokens",{serverName:R,error:B.error})}const P=await(await fetch("/api/mcp/connect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverConfig:_})})).json();if(P.success)return n(B=>({...B,servers:{...B.servers,[R]:{...B.servers[R],connectionStatus:"connected",lastConnectionTime:new Date,retryCount:0,lastError:void 0}}})),e.info("Reconnection successful",{serverName:R,result:P}),{success:!0};n(B=>({...B,servers:{...B.servers,[R]:{...B.servers[R],connectionStatus:"failed",retryCount:B.servers[R].retryCount+1,lastError:P.error||"Connection test failed"}}})),e.error("Reconnection failed",{serverName:R,result:P}),Xt.error(`Failed to connect: ${R}`)}catch(_){const D=_ instanceof Error?_.message:"Unknown error";throw n(P=>({...P,servers:{...P.servers,[R]:{...P.servers[R],connectionStatus:"failed",retryCount:P.servers[R].retryCount+1,lastError:D}}})),e.error("Reconnection failed",{serverName:R,error:D}),_}},[t.servers]);w.useEffect(()=>{Object.keys(o).forEach(R=>{const M=t.servers[R];(!M||M.connectionStatus!=="failed")&&(clearTimeout(o[R]),l(_=>{const D={..._};return delete D[R],D}))})},[t.servers,o]),w.useEffect(()=>()=>{Object.values(o).forEach(clearTimeout)},[o]);const S=w.useCallback(R=>{n(M=>({...M,selectedServer:R}))},[]),k=w.useCallback(R=>{n(M=>({...M,selectedMCPConfigs:R}))},[]),E=w.useCallback(R=>{n(M=>({...M,isMultiSelectMode:R,selectedMultipleServers:R?[]:M.selectedMultipleServers}))},[]),T=w.useCallback(R=>{n(M=>{const _=M.selectedMultipleServers,D=_.includes(R);return{...M,selectedMultipleServers:D?_.filter(P=>P!==R):[..._,R]}})},[]),A=w.useCallback(async(R,M)=>{var B;console.log("handleUpdateFormData",M);const _=t.servers[R];if((_==null?void 0:_.oauthTokens)!=null&&M.useOAuth&&M.name===R&&M.type==="http"&&M.url===((B=_.config.url)==null?void 0:B.toString())){const z=d(M);n(H=>({...H,servers:{...H.servers,[R]:{...H.servers[R],config:z,connectionStatus:"connecting"}}}));try{if((await(await fetch("/api/mcp/connect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serverConfig:_.config})})).json()).success){n(re=>({...re,servers:{...re.servers,[R]:{...re.servers[R],config:z,connectionStatus:"connected",lastConnectionTime:new Date,retryCount:0,lastError:void 0}}})),Xt.success("Server configuration updated successfully!");return}else console.warn("OAuth connection test failed, falling back to full reconnect")}catch(H){console.warn("OAuth connection test error, falling back to full reconnect",H)}}await x(R),await h(M),t.selectedServer===R&&M.name!==R&&S(M.name)},[t.servers,t.selectedServer,d,x,h,S]);return{appState:t,isLoading:r,connectedServerConfigs:t.servers,selectedServerEntry:t.servers[t.selectedServer],selectedMCPConfig:(O=t.servers[t.selectedServer])==null?void 0:O.config,selectedMCPConfigs:t.selectedMultipleServers.map(R=>t.servers[R]).filter(Boolean),selectedMCPConfigsMap:t.selectedMultipleServers.reduce((R,M)=>(t.servers[M]&&(R[M]=t.servers[M].config),R),{}),isMultiSelectMode:t.isMultiSelectMode,handleConnect:h,handleDisconnect:x,handleReconnect:v,handleUpdate:A,setSelectedServer:S,setSelectedMCPConfigs:k,toggleMultiSelectMode:E,toggleServerSelection:T,getValidAccessToken:p,setSelectedMultipleServersToAllServers:u}}const vJ=({...e})=>{const{theme:t="system"}=aM();return m.jsx(l7,{theme:t,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...e})};function bJ(){const[e,t]=w.useState("servers"),{appState:n,isLoading:r,connectedServerConfigs:s,selectedMCPConfig:o,handleConnect:l,handleDisconnect:u,handleReconnect:d,handleUpdate:h,setSelectedServer:g,toggleServerSelection:p,selectedMCPConfigsMap:x,setSelectedMultipleServersToAllServers:v}=xJ(),S=k=>{t(k),k==="chat"&&v()};return r?m.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:m.jsxs("div",{className:"text-center",children:[m.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto"}),m.jsx("p",{className:"mt-4 text-muted-foreground",children:"Loading..."})]})}):m.jsxs(FZ,{themeMode:"light",themePreset:"default",children:[m.jsxs(VK,{defaultOpen:!0,children:[m.jsx(eW,{onNavigate:S,activeTab:e}),m.jsxs(FK,{className:"flex flex-col",children:[m.jsx("header",{className:"flex h-12 shrink-0 items-center gap-2 border-b transition-[width,height] ease-linear",children:m.jsxs("div",{className:"flex w-full items-center justify-between px-4 lg:px-6",children:[m.jsx("div",{className:"flex items-center gap-1 lg:gap-2",children:m.jsx(HK,{className:"-ml-1"})}),m.jsx("div",{className:"flex items-center gap-2",children:m.jsx(aW,{})})]})}),m.jsxs("div",{className:"flex-1",children:[(e==="tools"||e==="resources"||e==="prompts"||e==="chat")&&m.jsx(rW,{connectedServerConfigs:s,selectedServer:n.selectedServer,onServerChange:g,onConnect:l,isMultiSelectEnabled:e==="chat",onMultiServerToggle:p,selectedMultipleServers:n.selectedMultipleServers}),e==="servers"&&m.jsx(x7,{connectedServerConfigs:s,onConnect:l,onDisconnect:u,onReconnect:d,onUpdate:h}),e==="tools"&&m.jsx(v9,{serverConfig:o}),e==="resources"&&m.jsx(b9,{serverConfig:o}),e==="prompts"&&m.jsx(w9,{serverConfig:o}),e==="chat"&&m.jsx(ZZ,{serverConfigs:x}),e==="tracing"&&m.jsx(TK,{}),e==="settings"&&m.jsx(XZ,{})]})]})]}),m.jsx(vJ,{})]})}KD.createRoot(document.getElementById("root")).render(m.jsx(w.StrictMode,{children:m.jsx(bJ,{})}));
357
+ //# sourceMappingURL=index-CcfG-2LO.js.map