natroc 0.0.1

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 (183) hide show
  1. package/AGENTS.md +494 -0
  2. package/LICENSE +7 -0
  3. package/README.md +0 -0
  4. package/install.ps1 +109 -0
  5. package/install.sh +132 -0
  6. package/package.json +77 -0
  7. package/server/dist/agent/agent-loop.d.ts +71 -0
  8. package/server/dist/agent/agent-loop.js +171 -0
  9. package/server/dist/agent/agent-loop.js.map +1 -0
  10. package/server/dist/agent/home-context.d.ts +29 -0
  11. package/server/dist/agent/home-context.js +134 -0
  12. package/server/dist/agent/home-context.js.map +1 -0
  13. package/server/dist/agent/improvement-engine.d.ts +23 -0
  14. package/server/dist/agent/improvement-engine.js +107 -0
  15. package/server/dist/agent/improvement-engine.js.map +1 -0
  16. package/server/dist/agent/tools/index.d.ts +14 -0
  17. package/server/dist/agent/tools/index.js +85 -0
  18. package/server/dist/agent/tools/index.js.map +1 -0
  19. package/server/dist/agent/tools/list-directory.d.ts +2 -0
  20. package/server/dist/agent/tools/list-directory.js +27 -0
  21. package/server/dist/agent/tools/list-directory.js.map +1 -0
  22. package/server/dist/agent/tools/read-file.d.ts +2 -0
  23. package/server/dist/agent/tools/read-file.js +30 -0
  24. package/server/dist/agent/tools/read-file.js.map +1 -0
  25. package/server/dist/agent/tools/run-command.d.ts +2 -0
  26. package/server/dist/agent/tools/run-command.js +72 -0
  27. package/server/dist/agent/tools/run-command.js.map +1 -0
  28. package/server/dist/agent/tools/system-info.d.ts +2 -0
  29. package/server/dist/agent/tools/system-info.js +28 -0
  30. package/server/dist/agent/tools/system-info.js.map +1 -0
  31. package/server/dist/agent/tools/types.d.ts +18 -0
  32. package/server/dist/agent/tools/types.js +2 -0
  33. package/server/dist/agent/tools/types.js.map +1 -0
  34. package/server/dist/agent/tools/util.d.ts +7 -0
  35. package/server/dist/agent/tools/util.js +24 -0
  36. package/server/dist/agent/tools/util.js.map +1 -0
  37. package/server/dist/agent/tools/write-file.d.ts +2 -0
  38. package/server/dist/agent/tools/write-file.js +25 -0
  39. package/server/dist/agent/tools/write-file.js.map +1 -0
  40. package/server/dist/app.d.ts +8 -0
  41. package/server/dist/app.js +39 -0
  42. package/server/dist/app.js.map +1 -0
  43. package/server/dist/auth/password.d.ts +7 -0
  44. package/server/dist/auth/password.js +20 -0
  45. package/server/dist/auth/password.js.map +1 -0
  46. package/server/dist/channels/channel-runtime.d.ts +32 -0
  47. package/server/dist/channels/channel-runtime.js +484 -0
  48. package/server/dist/channels/channel-runtime.js.map +1 -0
  49. package/server/dist/cli/agent-deliver.d.ts +14 -0
  50. package/server/dist/cli/agent-deliver.js +183 -0
  51. package/server/dist/cli/agent-deliver.js.map +1 -0
  52. package/server/dist/cli/args.d.ts +11 -0
  53. package/server/dist/cli/args.js +57 -0
  54. package/server/dist/cli/args.js.map +1 -0
  55. package/server/dist/cli/cli-token.d.ts +1 -0
  56. package/server/dist/cli/cli-token.js +22 -0
  57. package/server/dist/cli/cli-token.js.map +1 -0
  58. package/server/dist/cli/daemon.d.ts +2 -0
  59. package/server/dist/cli/daemon.js +252 -0
  60. package/server/dist/cli/daemon.js.map +1 -0
  61. package/server/dist/cli.d.ts +2 -0
  62. package/server/dist/cli.js +416 -0
  63. package/server/dist/cli.js.map +1 -0
  64. package/server/dist/config/natroc-home.d.ts +13 -0
  65. package/server/dist/config/natroc-home.js +730 -0
  66. package/server/dist/config/natroc-home.js.map +1 -0
  67. package/server/dist/gateway/agent-service.d.ts +16 -0
  68. package/server/dist/gateway/agent-service.js +261 -0
  69. package/server/dist/gateway/agent-service.js.map +1 -0
  70. package/server/dist/gateway/connection.d.ts +38 -0
  71. package/server/dist/gateway/connection.js +254 -0
  72. package/server/dist/gateway/connection.js.map +1 -0
  73. package/server/dist/gateway/gateway.d.ts +79 -0
  74. package/server/dist/gateway/gateway.js +150 -0
  75. package/server/dist/gateway/gateway.js.map +1 -0
  76. package/server/dist/gateway/index.d.ts +8 -0
  77. package/server/dist/gateway/index.js +26 -0
  78. package/server/dist/gateway/index.js.map +1 -0
  79. package/server/dist/gateway/protocol.d.ts +102 -0
  80. package/server/dist/gateway/protocol.js +63 -0
  81. package/server/dist/gateway/protocol.js.map +1 -0
  82. package/server/dist/gateway/rpc/agent.d.ts +3 -0
  83. package/server/dist/gateway/rpc/agent.js +174 -0
  84. package/server/dist/gateway/rpc/agent.js.map +1 -0
  85. package/server/dist/gateway/rpc/agents.d.ts +2 -0
  86. package/server/dist/gateway/rpc/agents.js +68 -0
  87. package/server/dist/gateway/rpc/agents.js.map +1 -0
  88. package/server/dist/gateway/rpc/auth.d.ts +3 -0
  89. package/server/dist/gateway/rpc/auth.js +180 -0
  90. package/server/dist/gateway/rpc/auth.js.map +1 -0
  91. package/server/dist/gateway/rpc/channels.d.ts +2 -0
  92. package/server/dist/gateway/rpc/channels.js +230 -0
  93. package/server/dist/gateway/rpc/channels.js.map +1 -0
  94. package/server/dist/gateway/rpc/conversations.d.ts +3 -0
  95. package/server/dist/gateway/rpc/conversations.js +36 -0
  96. package/server/dist/gateway/rpc/conversations.js.map +1 -0
  97. package/server/dist/gateway/rpc/projects.d.ts +3 -0
  98. package/server/dist/gateway/rpc/projects.js +49 -0
  99. package/server/dist/gateway/rpc/projects.js.map +1 -0
  100. package/server/dist/gateway/rpc/providers.d.ts +3 -0
  101. package/server/dist/gateway/rpc/providers.js +106 -0
  102. package/server/dist/gateway/rpc/providers.js.map +1 -0
  103. package/server/dist/gateway/rpc/usage.d.ts +2 -0
  104. package/server/dist/gateway/rpc/usage.js +41 -0
  105. package/server/dist/gateway/rpc/usage.js.map +1 -0
  106. package/server/dist/gateway/types.d.ts +43 -0
  107. package/server/dist/gateway/types.js +20 -0
  108. package/server/dist/gateway/types.js.map +1 -0
  109. package/server/dist/gateway/ws-server.d.ts +10 -0
  110. package/server/dist/gateway/ws-server.js +37 -0
  111. package/server/dist/gateway/ws-server.js.map +1 -0
  112. package/server/dist/index.d.ts +1 -0
  113. package/server/dist/index.js +9 -0
  114. package/server/dist/index.js.map +1 -0
  115. package/server/dist/local-runtime.d.ts +9 -0
  116. package/server/dist/local-runtime.js +16 -0
  117. package/server/dist/local-runtime.js.map +1 -0
  118. package/server/dist/providers/configured-adapters.d.ts +9 -0
  119. package/server/dist/providers/configured-adapters.js +34 -0
  120. package/server/dist/providers/configured-adapters.js.map +1 -0
  121. package/server/dist/providers/ollama.d.ts +23 -0
  122. package/server/dist/providers/ollama.js +164 -0
  123. package/server/dist/providers/ollama.js.map +1 -0
  124. package/server/dist/providers/openrouter.d.ts +24 -0
  125. package/server/dist/providers/openrouter.js +201 -0
  126. package/server/dist/providers/openrouter.js.map +1 -0
  127. package/server/dist/providers/thinking.d.ts +18 -0
  128. package/server/dist/providers/thinking.js +58 -0
  129. package/server/dist/providers/thinking.js.map +1 -0
  130. package/server/dist/providers/types.d.ts +55 -0
  131. package/server/dist/providers/types.js +2 -0
  132. package/server/dist/providers/types.js.map +1 -0
  133. package/server/dist/routes/schemas.d.ts +51 -0
  134. package/server/dist/routes/schemas.js +53 -0
  135. package/server/dist/routes/schemas.js.map +1 -0
  136. package/server/dist/runtime.d.ts +47 -0
  137. package/server/dist/runtime.js +29 -0
  138. package/server/dist/runtime.js.map +1 -0
  139. package/server/dist/server.d.ts +11 -0
  140. package/server/dist/server.js +19 -0
  141. package/server/dist/server.js.map +1 -0
  142. package/server/dist/storage/agent-repository.d.ts +59 -0
  143. package/server/dist/storage/agent-repository.js +192 -0
  144. package/server/dist/storage/agent-repository.js.map +1 -0
  145. package/server/dist/storage/auth-repository.d.ts +49 -0
  146. package/server/dist/storage/auth-repository.js +139 -0
  147. package/server/dist/storage/auth-repository.js.map +1 -0
  148. package/server/dist/storage/channel-repository.d.ts +152 -0
  149. package/server/dist/storage/channel-repository.js +413 -0
  150. package/server/dist/storage/channel-repository.js.map +1 -0
  151. package/server/dist/storage/conversation-repository.d.ts +63 -0
  152. package/server/dist/storage/conversation-repository.js +196 -0
  153. package/server/dist/storage/conversation-repository.js.map +1 -0
  154. package/server/dist/storage/database.d.ts +11 -0
  155. package/server/dist/storage/database.js +360 -0
  156. package/server/dist/storage/database.js.map +1 -0
  157. package/server/dist/storage/memory-repository.d.ts +70 -0
  158. package/server/dist/storage/memory-repository.js +279 -0
  159. package/server/dist/storage/memory-repository.js.map +1 -0
  160. package/server/dist/storage/project-repository.d.ts +25 -0
  161. package/server/dist/storage/project-repository.js +67 -0
  162. package/server/dist/storage/project-repository.js.map +1 -0
  163. package/server/dist/storage/provider-repository.d.ts +44 -0
  164. package/server/dist/storage/provider-repository.js +159 -0
  165. package/server/dist/storage/provider-repository.js.map +1 -0
  166. package/server/dist/storage/tool-call-repository.d.ts +35 -0
  167. package/server/dist/storage/tool-call-repository.js +83 -0
  168. package/server/dist/storage/tool-call-repository.js.map +1 -0
  169. package/server/dist/storage/usage-repository.d.ts +76 -0
  170. package/server/dist/storage/usage-repository.js +249 -0
  171. package/server/dist/storage/usage-repository.js.map +1 -0
  172. package/server/dist/storage/vault.d.ts +3 -0
  173. package/server/dist/storage/vault.js +57 -0
  174. package/server/dist/storage/vault.js.map +1 -0
  175. package/ui/README.md +0 -0
  176. package/ui/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  177. package/ui/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  178. package/ui/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  179. package/ui/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  180. package/ui/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  181. package/ui/dist/assets/index-DKaFmZNO.js +114 -0
  182. package/ui/dist/assets/index-DOfPcjx3.css +2 -0
  183. package/ui/dist/index.html +14 -0
@@ -0,0 +1,114 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var f=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ee(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function te(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},F={map:ee,forEach:function(e,t,n){ee(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ee(e,function(){t++}),t},toArray:function(e){return ee(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=F,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:te}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,P)}catch(e){P(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.6`})),p=s(((e,t)=>{t.exports=f()})),m=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),h=s(((e,t)=>{t.exports=m()})),g=s((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.6`})),_=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=s((e=>{var t=h(),n=p(),r=_();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,m=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function ee(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ee(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var te=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=[],ie=-1;function ae(e){return{current:e}}function I(e){0>ie||(e.current=re[ie],re[ie]=null,ie--)}function oe(e,t){ie++,re[ie]=e.current,e.current=t}var se=ae(null),ce=ae(null),le=ae(null),ue=ae(null);function de(e,t){switch(oe(le,t),oe(ce,e),oe(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Qd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Qd(t),e=$d(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}I(se),oe(se,e)}function fe(){I(se),I(ce),I(le)}function pe(e){e.memoizedState!==null&&oe(ue,e);var t=se.current,n=$d(t,e.type);t!==n&&(oe(ce,e),oe(se,n))}function me(e){ce.current===e&&(I(se),I(ce)),ue.current===e&&(I(ue),lp._currentValue=ne)}var he,ge;function _e(e){if(he===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);he=t&&t[1]||``,ge=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+he+e+ge}var ve=!1;function ye(e,t){if(!e||ve)return``;ve=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
+ `),l=s.split(`
5
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ve=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?_e(n):``}function be(e,t){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e(`Lazy`);case 13:return e.child!==t&&t!==null?_e(`Suspense Fallback`):_e(`Suspense`);case 19:return _e(`SuspenseList`);case 0:case 15:return ye(e.type,!1);case 11:return ye(e.type.render,!1);case 1:return ye(e.type,!0);case 31:return _e(`Activity`);default:return``}}function xe(e){try{var t=``,n=null;do t+=be(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var Se=Object.prototype.hasOwnProperty,Ce=t.unstable_scheduleCallback,we=t.unstable_cancelCallback,Te=t.unstable_shouldYield,Ee=t.unstable_requestPaint,De=t.unstable_now,Oe=t.unstable_getCurrentPriorityLevel,ke=t.unstable_ImmediatePriority,Ae=t.unstable_UserBlockingPriority,je=t.unstable_NormalPriority,Me=t.unstable_LowPriority,Ne=t.unstable_IdlePriority,Pe=t.log,Fe=t.unstable_setDisableYieldValue,Ie=null,Le=null;function Re(e){if(typeof Pe==`function`&&Fe(e),Le&&typeof Le.setStrictMode==`function`)try{Le.setStrictMode(Ie,e)}catch{}}var L=Math.clz32?Math.clz32:Ve,ze=Math.log,Be=Math.LN2;function Ve(e){return e>>>=0,e===0?32:31-(ze(e)/Be|0)|0}var He=256,Ue=262144,We=4194304;function Ge(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ke(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ge(n))):i=Ge(o):i=Ge(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ge(n))):i=Ge(o)):i=Ge(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Je(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 Ye(){var e=We;return We<<=1,!(We&62914560)&&(We=4194304),e}function Xe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ze(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qe(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-L(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&$e(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function $e(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-L(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function et(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-L(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function tt(e,t){var n=t&-t;return n=n&42?1:nt(n),(n&(e.suspendedLanes|t))===0?n:0}function nt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function rt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function it(){var e=F.p;return e===0?(e=window.event,e===void 0?32:Tp(e.type)):e}function at(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var ot=Math.random().toString(36).slice(2),st=`__reactFiber$`+ot,ct=`__reactProps$`+ot,lt=`__reactContainer$`+ot,ut=`__reactEvents$`+ot,dt=`__reactListeners$`+ot,ft=`__reactHandles$`+ot,pt=`__reactResources$`+ot,mt=`__reactMarker$`+ot;function ht(e){delete e[st],delete e[ct],delete e[ut],delete e[dt],delete e[ft]}function gt(e){var t=e[st];if(t)return t;for(var n=e.parentNode;n;){if(t=n[lt]||n[st]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Sf(e);e!==null;){if(n=e[st])return n;e=Sf(e)}return t}e=n,n=e.parentNode}return null}function _t(e){if(e=e[st]||e[lt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function vt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function yt(e){var t=e[pt];return t||=e[pt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function bt(e){e[mt]=!0}var xt=new Set,St={};function Ct(e,t){wt(e,t),wt(e+`Capture`,t)}function wt(e,t){for(St[e]=t,e=0;e<t.length;e++)xt.add(t[e])}var Tt=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]*$`),Et={},Dt={};function Ot(e){return Se.call(Dt,e)?!0:Se.call(Et,e)?!1:Tt.test(e)?Dt[e]=!0:(Et[e]=!0,!1)}function kt(e,t,n){if(Ot(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function At(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function jt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Mt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Nt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Pt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ft(e){if(!e._valueTracker){var t=Nt(e)?`checked`:`value`;e._valueTracker=Pt(e,t,``+e[t])}}function It(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Nt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Lt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Rt=/[\n"\\]/g;function zt(e){return e.replace(Rt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Bt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Mt(t)):e.value!==``+Mt(t)&&(e.value=``+Mt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ht(e,o,Mt(n)):Ht(e,o,Mt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Mt(s):e.removeAttribute(`name`)}function Vt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Ft(e);return}n=n==null?``:``+Mt(n),t=t==null?n:``+Mt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Ft(e)}function Ht(e,t,n){t===`number`&&Lt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ut(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Mt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Wt(e,t,n){if(t!=null&&(t=``+Mt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Mt(n)}function Gt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(te(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Mt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ft(e)}function Kt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qt=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 Jt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||qt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Yt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Jt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Jt(e,o,t[o])}function Xt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){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 Zt=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`]]),Qt=/^[\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 $t(e){return Qt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function en(){}var tn=null;function nn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rn=null,an=null;function on(e){var t=_t(e);if(t&&(e=t.stateNode)){var n=e[ct]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Bt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+zt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ct]||null;if(!a)throw Error(i(90));Bt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&It(r)}break a;case`textarea`:Wt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ut(e,!!n.multiple,t,!1)}}}var sn=!1;function cn(e,t,n){if(sn)return e(t,n);sn=!0;try{return e(t)}finally{if(sn=!1,(rn!==null||an!==null)&&(ku(),rn&&(t=rn,e=an,an=rn=null,on(t),e)))for(t=0;t<e.length;t++)on(e[t])}}function ln(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ct]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var un=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),dn=!1;if(un)try{var fn={};Object.defineProperty(fn,"passive",{get:function(){dn=!0}}),window.addEventListener(`test`,fn,fn),window.removeEventListener(`test`,fn,fn)}catch{dn=!1}var pn=null,mn=null,hn=null;function R(){if(hn)return hn;var e,t=mn,n=t.length,r,i=`value`in pn?pn.value:pn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return hn=i.slice(e,1<r?1-r:void 0)}function gn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function _n(){return!0}function vn(){return!1}function yn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?_n:vn,this.isPropagationStopped=vn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=_n)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=_n)},persist:function(){},isPersistent:_n}),t}var bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xn=yn(bn),Sn=f({},bn,{view:0,detail:0}),Cn=yn(Sn),wn,Tn,En,Dn=f({},Sn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==En&&(En&&e.type===`mousemove`?(wn=e.screenX-En.screenX,Tn=e.screenY-En.screenY):Tn=wn=0,En=e),wn)},movementY:function(e){return`movementY`in e?e.movementY:Tn}}),On=yn(Dn),kn=yn(f({},Dn,{dataTransfer:0})),An=yn(f({},Sn,{relatedTarget:0})),jn=yn(f({},bn,{animationName:0,elapsedTime:0,pseudoElement:0})),Mn=yn(f({},bn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Nn=yn(f({},bn,{data:0})),Pn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Fn={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`},In={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Ln(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=In[e])?!!t[e]:!1}function Rn(){return Ln}var zn=yn(f({},Sn,{key:function(e){if(e.key){var t=Pn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=gn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Fn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rn,charCode:function(e){return e.type===`keypress`?gn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?gn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Bn=yn(f({},Dn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Vn=yn(f({},Sn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rn})),Hn=yn(f({},bn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Un=yn(f({},Dn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Wn=yn(f({},bn,{newState:0,oldState:0})),Gn=[9,13,27,32],Kn=un&&`CompositionEvent`in window,qn=null;un&&`documentMode`in document&&(qn=document.documentMode);var Jn=un&&`TextEvent`in window&&!qn,Yn=un&&(!Kn||qn&&8<qn&&11>=qn),Xn=` `,Zn=!1;function Qn(e,t){switch(e){case`keyup`:return Gn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function $n(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var er=!1;function tr(e,t){switch(e){case`compositionend`:return $n(t);case`keypress`:return t.which===32?(Zn=!0,Xn):null;case`textInput`:return e=t.data,e===Xn&&Zn?null:e;default:return null}}function nr(e,t){if(er)return e===`compositionend`||!Kn&&Qn(e,t)?(e=R(),hn=mn=pn=null,er=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Yn&&t.locale!==`ko`?null:t.data;default:return null}}var rr={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 ir(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!rr[e.type]:t===`textarea`}function ar(e,t,n,r){rn?an?an.push(r):an=[r]:rn=r,t=Id(t,`onChange`),0<t.length&&(n=new xn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var or=null,sr=null;function cr(e){kd(e,0)}function lr(e){if(It(vt(e)))return e}function ur(e,t){if(e===`change`)return t}var dr=!1;if(un){var fr;if(un){var pr=`oninput`in document;if(!pr){var mr=document.createElement(`div`);mr.setAttribute(`oninput`,`return;`),pr=typeof mr.oninput==`function`}fr=pr}else fr=!1;dr=fr&&(!document.documentMode||9<document.documentMode)}function hr(){or&&(or.detachEvent(`onpropertychange`,gr),sr=or=null)}function gr(e){if(e.propertyName===`value`&&lr(sr)){var t=[];ar(t,sr,e,nn(e)),cn(cr,t)}}function _r(e,t,n){e===`focusin`?(hr(),or=t,sr=n,or.attachEvent(`onpropertychange`,gr)):e===`focusout`&&hr()}function vr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return lr(sr)}function yr(e,t){if(e===`click`)return lr(t)}function br(e,t){if(e===`input`||e===`change`)return lr(t)}function xr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Sr=typeof Object.is==`function`?Object.is:xr;function Cr(e,t){if(Sr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Se.call(t,i)||!Sr(e[i],t[i]))return!1}return!0}function wr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Tr(e,t){var n=wr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=wr(n)}}function Er(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Er(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Lt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lt(e.document)}return t}function Or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var kr=un&&`documentMode`in document&&11>=document.documentMode,Ar=null,jr=null,Mr=null,Nr=!1;function Pr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Nr||Ar==null||Ar!==Lt(r)||(r=Ar,`selectionStart`in r&&Or(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Mr&&Cr(Mr,r)||(Mr=r,r=Id(jr,`onSelect`),0<r.length&&(t=new xn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ar)))}function Fr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Ir={animationend:Fr(`Animation`,`AnimationEnd`),animationiteration:Fr(`Animation`,`AnimationIteration`),animationstart:Fr(`Animation`,`AnimationStart`),transitionrun:Fr(`Transition`,`TransitionRun`),transitionstart:Fr(`Transition`,`TransitionStart`),transitioncancel:Fr(`Transition`,`TransitionCancel`),transitionend:Fr(`Transition`,`TransitionEnd`)},Lr={},Rr={};un&&(Rr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Ir.animationend.animation,delete Ir.animationiteration.animation,delete Ir.animationstart.animation),`TransitionEvent`in window||delete Ir.transitionend.transition);function zr(e){if(Lr[e])return Lr[e];if(!Ir[e])return e;var t=Ir[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Rr)return Lr[e]=t[n];return e}var Br=zr(`animationend`),Vr=zr(`animationiteration`),Hr=zr(`animationstart`),Ur=zr(`transitionrun`),Wr=zr(`transitionstart`),Gr=zr(`transitioncancel`),Kr=zr(`transitionend`),qr=new Map,Jr=`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(` `);Jr.push(`scrollEnd`);function Yr(e,t){qr.set(e,t),Ct(t,[e])}var Xr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Zr=[],Qr=0,$r=0;function ei(){for(var e=Qr,t=$r=Qr=0;t<e;){var n=Zr[t];Zr[t++]=null;var r=Zr[t];Zr[t++]=null;var i=Zr[t];Zr[t++]=null;var a=Zr[t];if(Zr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ii(n,i,a)}}function ti(e,t,n,r){Zr[Qr++]=e,Zr[Qr++]=t,Zr[Qr++]=n,Zr[Qr++]=r,$r|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ni(e,t,n,r){return ti(e,t,n,r),ai(e)}function ri(e,t){return ti(e,null,null,t),ai(e)}function ii(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-L(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ai(e){if(50<bu)throw bu=0,xu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var oi={};function si(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ci(e,t,n,r){return new si(e,t,n,r)}function li(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ui(e,t){var n=e.alternate;return n===null?(n=ci(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function di(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function fi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)li(e)&&(s=1);else if(typeof e==`string`)s=ep(e,n,se.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ci(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return pi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ci(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ci(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ci(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ci(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function pi(e,t,n,r){return e=ci(7,e,r,t),e.lanes=n,e}function mi(e,t,n){return e=ci(6,e,null,t),e.lanes=n,e}function hi(e){var t=ci(18,null,null,0);return t.stateNode=e,t}function gi(e,t,n){return t=ci(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var _i=new WeakMap;function vi(e,t){if(typeof e==`object`&&e){var n=_i.get(e);return n===void 0?(t={value:e,source:t,stack:xe(t)},_i.set(e,t),t):n}return{value:e,source:t,stack:xe(t)}}var yi=[],bi=0,xi=null,Si=0,Ci=[],wi=0,Ti=null,Ei=1,Di=``;function Oi(e,t){yi[bi++]=Si,yi[bi++]=xi,xi=e,Si=t}function ki(e,t,n){Ci[wi++]=Ei,Ci[wi++]=Di,Ci[wi++]=Ti,Ti=e;var r=Ei;e=Di;var i=32-L(r)-1;r&=~(1<<i),n+=1;var a=32-L(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ei=1<<32-L(t)+i|n<<i|r,Di=a+e}else Ei=1<<a|n<<i|r,Di=e}function Ai(e){e.return!==null&&(Oi(e,1),ki(e,1,0))}function ji(e){for(;e===xi;)xi=yi[--bi],yi[bi]=null,Si=yi[--bi],yi[bi]=null;for(;e===Ti;)Ti=Ci[--wi],Ci[wi]=null,Di=Ci[--wi],Ci[wi]=null,Ei=Ci[--wi],Ci[wi]=null}function Mi(e,t){Ci[wi++]=Ei,Ci[wi++]=Di,Ci[wi++]=Ti,Ei=t.id,Di=t.overflow,Ti=e}var Ni=null,Pi=null,Fi=!1,Ii=null,Li=!1,Ri=Error(i(519));function zi(e){throw Gi(vi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ri}function Bi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[st]=e,t[ct]=r,n){case`dialog`:H(`cancel`,t),H(`close`,t);break;case`iframe`:case`object`:case`embed`:H(`load`,t);break;case`video`:case`audio`:for(n=0;n<Dd.length;n++)H(Dd[n],t);break;case`source`:H(`error`,t);break;case`img`:case`image`:case`link`:H(`error`,t),H(`load`,t);break;case`details`:H(`toggle`,t);break;case`input`:H(`invalid`,t),Vt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:H(`invalid`,t);break;case`textarea`:H(`invalid`,t),Gt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Hd(t.textContent,n)?(r.popover!=null&&(H(`beforetoggle`,t),H(`toggle`,t)),r.onScroll!=null&&H(`scroll`,t),r.onScrollEnd!=null&&H(`scrollend`,t),r.onClick!=null&&(t.onclick=en),t=!0):t=!1,t||zi(e,!0)}function Vi(e){for(Ni=e.return;Ni;)switch(Ni.tag){case 5:case 31:case 13:Li=!1;return;case 27:case 3:Li=!0;return;default:Ni=Ni.return}}function Hi(e){if(e!==Ni)return!1;if(!Fi)return Vi(e),Fi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||ef(e.type,e.memoizedProps)),n=!n),n&&Pi&&zi(e),Vi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Pi=xf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Pi=xf(e)}else t===27?(t=Pi,lf(e.type)?(e=bf,bf=null,Pi=e):Pi=t):Pi=Ni?yf(e.stateNode.nextSibling):null;return!0}function Ui(){Pi=Ni=null,Fi=!1}function Wi(){var e=Ii;return e!==null&&(ou===null?ou=e:ou.push.apply(ou,e),Ii=null),e}function Gi(e){Ii===null?Ii=[e]:Ii.push(e)}var Ki=ae(null),qi=null,Ji=null;function Yi(e,t,n){oe(Ki,t._currentValue),t._currentValue=n}function Xi(e){e._currentValue=Ki.current,I(Ki)}function Zi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Qi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Zi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Zi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function $i(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Sr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ue.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[lp]:e.push(lp))}a=a.return}e!==null&&Qi(t,e,n,r),t.flags|=262144}function ea(e){for(e=e.firstContext;e!==null;){if(!Sr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ta(e){qi=e,Ji=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function na(e){return ia(qi,e)}function ra(e,t){return qi===null&&ta(e),ia(e,t)}function ia(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ji===null){if(e===null)throw Error(i(308));Ji=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ji=Ji.next=t;return n}var aa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},oa=t.unstable_scheduleCallback,sa=t.unstable_NormalPriority,ca={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function la(){return{controller:new aa,data:new Map,refCount:0}}function ua(e){e.refCount--,e.refCount===0&&oa(sa,function(){e.controller.abort()})}var da=null,fa=0,pa=0,ma=null;function ha(e,t){if(da===null){var n=da=[];fa=0,pa=xd(),ma={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return fa++,t.then(ga,ga),t}function ga(){if(--fa===0&&da!==null){ma!==null&&(ma.status=`fulfilled`);var e=da;da=null,pa=0,ma=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function _a(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var va=P.S;P.S=function(e,t){lu=De(),typeof t==`object`&&t&&typeof t.then==`function`&&ha(e,t),va!==null&&va(e,t)};var ya=ae(null);function ba(){var e=ya.current;return e===null?Kl.pooledCache:e}function xa(e,t){t===null?oe(ya,ya.current):oe(ya,t.pool)}function Sa(){var e=ba();return e===null?null:{parent:ca._currentValue,pool:e}}var Ca=Error(i(460)),wa=Error(i(474)),Ta=Error(i(542)),Ea={then:function(){}};function Da(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Oa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(en,en),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ma(e),e;default:if(typeof t.status==`string`)t.then(en,en);else{if(e=Kl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ma(e),e}throw Aa=t,Ca}}function ka(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Aa=e,Ca):e}}var Aa=null;function ja(){if(Aa===null)throw Error(i(459));var e=Aa;return Aa=null,e}function Ma(e){if(e===Ca||e===Ta)throw Error(i(483))}var Na=null,Pa=0;function Fa(e){var t=Pa;return Pa+=1,Na===null&&(Na=[]),Oa(Na,e,t)}function Ia(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function La(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ra(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ui(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=mi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&ka(i)===t.type)?(t=a(t,n.props),Ia(t,n),t.return=e,t):(t=fi(n.type,n.key,n.props,null,e.mode,r),Ia(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=gi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=pi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=mi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=fi(t.type,t.key,t.props,null,e.mode,n),Ia(n,t),n.return=e,n;case v:return t=gi(t,e.mode,n),t.return=e,t;case O:return t=ka(t),f(e,t,n)}if(te(t)||M(t))return t=pi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Fa(t),n);if(t.$$typeof===C)return f(e,ra(e,t),n);La(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case g:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=ka(n),p(e,t,n,r)}if(te(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Fa(n),r);if(n.$$typeof===C)return p(e,t,ra(e,n),r);La(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case g:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=ka(r),m(e,t,n,r,i)}if(te(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Fa(r),i);if(r.$$typeof===C)return m(e,t,n,ra(t,r),i);La(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Fi&&Oi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Fi&&Oi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Fi&&Oi(i,h),l}function _(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Fi&&Oi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Fi&&Oi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Fi&&Oi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case g:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&ka(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ia(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=pi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=fi(o.type,o.key,o.props,null,e.mode,c),Ia(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=gi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=ka(o),b(e,r,o,c)}if(te(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),_(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Fa(o),c);if(o.$$typeof===C)return b(e,r,ra(e,o),c);La(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=mi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Pa=0;var i=b(e,t,n,r);return Na=null,i}catch(t){if(t===Ca||t===Ta)throw t;var a=ci(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var za=Ra(!0),Ba=Ra(!1),Va=!1;function Ha(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ua(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Wa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ga(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Gl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ai(e),ii(e,null,n),t}return ti(e,r,t,n),ai(e)}function Ka(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}function qa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ja=!1;function Ya(){if(Ja){var e=ma;if(e!==null)throw e}}function Xa(e,t,n,r){Ja=!1;var i=e.updateQueue;Va=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(V&p)===p:(r&p)===p){p!==0&&p===pa&&(Ja=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Va=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),eu|=o,e.lanes=o,e.memoizedState=d}}function Za(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Za(n[e],t)}var $a=ae(null),eo=ae(0);function to(e,t){e=Ql,oe(eo,e),oe($a,t),Ql=e|t.baseLanes}function no(){oe(eo,Ql),oe($a,$a.current)}function ro(){Ql=eo.current,I($a),I(eo)}var io=ae(null),ao=null;function oo(e){var t=e.alternate;oe(fo,fo.current&1),oe(io,e),ao===null&&(t===null||$a.current!==null||t.memoizedState!==null)&&(ao=e)}function so(e){oe(fo,fo.current),oe(io,e),ao===null&&(ao=e)}function co(e){e.tag===22?(oe(fo,fo.current),oe(io,e),ao===null&&(ao=e)):lo(e)}function lo(){oe(fo,fo.current),oe(io,io.current)}function uo(e){I(io),ao===e&&(ao=null),I(fo)}var fo=ae(0);function po(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||gf(n)||_f(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mo=0,z=null,ho=null,go=null,_o=!1,vo=!1,yo=!1,bo=0,xo=0,So=null,Co=0;function wo(){throw Error(i(321))}function To(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Sr(e[n],t[n]))return!1;return!0}function Eo(e,t,n,r,i,a){return mo=a,z=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Us:Ws,yo=!1,a=n(r,i),yo=!1,vo&&(a=Oo(t,n,r,i)),Do(e),a}function Do(e){P.H=Hs;var t=ho!==null&&ho.next!==null;if(mo=0,go=ho=z=null,_o=!1,xo=0,So=null,t)throw Error(i(300));e===null||sc||(e=e.dependencies,e!==null&&ea(e)&&(sc=!0))}function Oo(e,t,n,r){z=e;var a=0;do{if(vo&&(So=null),xo=0,vo=!1,25<=a)throw Error(i(301));if(a+=1,go=ho=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Gs,o=t(n,r)}while(vo);return o}function ko(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?Io(t):t,e=e.useState()[0],(ho===null?null:ho.memoizedState)!==e&&(z.flags|=1024),t}function Ao(){var e=bo!==0;return bo=0,e}function jo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Mo(e){if(_o){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_o=!1}mo=0,go=ho=z=null,vo=!1,xo=bo=0,So=null}function No(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return go===null?z.memoizedState=go=e:go=go.next=e,go}function Po(){if(ho===null){var e=z.alternate;e=e===null?null:e.memoizedState}else e=ho.next;var t=go===null?z.memoizedState:go.next;if(t!==null)go=t,ho=e;else{if(e===null)throw z.alternate===null?Error(i(467)):Error(i(310));ho=e,e={memoizedState:ho.memoizedState,baseState:ho.baseState,baseQueue:ho.baseQueue,queue:ho.queue,next:null},go===null?z.memoizedState=go=e:go=go.next=e}return go}function Fo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Io(e){var t=xo;return xo+=1,So===null&&(So=[]),e=Oa(So,e,t),t=z,(go===null?t.memoizedState:go.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Us:Ws),e}function Lo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Io(e);if(e.$$typeof===C)return na(e)}throw Error(i(438,String(e)))}function Ro(e){var t=null,n=z.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=z.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Fo(),z.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function zo(e,t){return typeof t==`function`?t(e):t}function Bo(e){return Vo(Po(),ho,e)}function Vo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(mo&f)===f:(V&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===pa&&(d=!0);else if((mo&p)===p){u=u.next,p===pa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,z.lanes|=p,eu|=p;f=u.action,yo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,z.lanes|=f,eu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Sr(o,e.memoizedState)&&(sc=!0,d&&(n=ma,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ho(e){var t=Po(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Sr(o,t.memoizedState)||(sc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Uo(e,t,n){var r=z,a=Po(),o=Fi;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Sr((ho||a).memoizedState,n);if(s&&(a.memoizedState=n,sc=!0),a=a.queue,ms(Ko.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||go!==null&&go.memoizedState.tag&1){if(r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,a,n,t),null),Kl===null)throw Error(i(349));o||mo&127||Wo(r,t,n)}return n}function Wo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=z.updateQueue,t===null?(t=Fo(),z.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Go(e,t,n,r){t.value=n,t.getSnapshot=r,qo(t)&&Jo(e)}function Ko(e,t,n){return n(function(){qo(t)&&Jo(e)})}function qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Sr(e,n)}catch{return!0}}function Jo(e){var t=ri(e,2);t!==null&&wu(t,e,2)}function Yo(e){var t=No();if(typeof e==`function`){var n=e;if(e=n(),yo){Re(!0);try{n()}finally{Re(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:e},t}function Xo(e,t,n,r){return e.baseState=n,Vo(e,ho,typeof r==`function`?r:zo)}function Zo(e,t,n,r,a){if(zs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Qo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Qo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),$o(e,t,s)}catch(n){ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),$o(e,t,a)}catch(n){ts(e,t,n)}}function $o(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){es(e,t,n)},function(n){return ts(e,t,n)}):es(e,t,n)}function es(e,t,n){t.status=`fulfilled`,t.value=n,ns(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Qo(e,n)))}function ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ns(t),t=t.next;while(t!==r)}e.action=null}function ns(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function rs(e,t){return t}function is(e,t){if(Fi){var n=Kl.formState;if(n!==null){a:{var r=z;if(Fi){if(Pi){b:{for(var i=Pi,a=Li;i.nodeType!==8;){if(!a){i=null;break b}if(i=yf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Pi=yf(i.nextSibling),r=i.data===`F!`;break a}}zi(r)}r=!1}r&&(t=n[0])}}return n=No(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:t},n.queue=r,n=Is.bind(null,z,r),r.dispatch=n,r=Yo(!1),a=Rs.bind(null,z,!1,r.queue),r=No(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Zo.bind(null,z,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function as(e){return os(Po(),ho,e)}function os(e,t,n){if(t=Vo(e,t,rs)[0],e=Bo(zo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Io(t)}catch(e){throw e===Ca?Ta:e}else r=t;t=Po();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(z.flags|=2048,ls(9,{destroy:void 0},ss.bind(null,i,n),null)),[r,a,e]}function ss(e,t){e.action=t}function cs(e){var t=Po(),n=ho;if(n!==null)return os(t,n,e);Po(),t=t.memoizedState,n=Po();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ls(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=z.updateQueue,t===null&&(t=Fo(),z.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function us(){return Po().memoizedState}function ds(e,t,n,r){var i=No();z.flags|=e,i.memoizedState=ls(1|t,{destroy:void 0},n,r===void 0?null:r)}function fs(e,t,n,r){var i=Po();r=r===void 0?null:r;var a=i.memoizedState.inst;ho!==null&&r!==null&&To(r,ho.memoizedState.deps)?i.memoizedState=ls(t,a,n,r):(z.flags|=e,i.memoizedState=ls(1|t,a,n,r))}function ps(e,t){ds(8390656,8,e,t)}function ms(e,t){fs(2048,8,e,t)}function hs(e){z.flags|=4;var t=z.updateQueue;if(t===null)t=Fo(),z.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function gs(e){var t=Po().memoizedState;return hs({ref:t,nextImpl:e}),function(){if(Gl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function _s(e,t){return fs(4,2,e,t)}function vs(e,t){return fs(4,4,e,t)}function ys(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function bs(e,t,n){n=n==null?null:n.concat([e]),fs(4,4,ys.bind(null,t,e),n)}function xs(){}function Ss(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&To(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Cs(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&To(t,r[1]))return r[0];if(r=e(),yo){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r}function ws(e,t,n){return n===void 0||mo&1073741824&&!(V&261930)?e.memoizedState=t:(e.memoizedState=n,e=Cu(),z.lanes|=e,eu|=e,n)}function Ts(e,t,n,r){return Sr(n,t)?n:$a.current===null?!(mo&42)||mo&1073741824&&!(V&261930)?(sc=!0,e.memoizedState=n):(e=Cu(),z.lanes|=e,eu|=e,t):(e=ws(e,n,r),Sr(e,t)||(sc=!0),e)}function Es(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Rs(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ls(e,t,_a(c,r),Su(e)):Ls(e,t,r,Su(e))}catch(n){Ls(e,t,{then:function(){},status:`rejected`,reason:n},Su())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function Ds(){}function Os(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ks(e).queue;Es(e,a,t,ne,n===null?Ds:function(){return As(e),n(r)})}function ks(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function As(e){var t=ks(e);t.next===null&&(t=e.alternate.memoizedState),Ls(e,t.next.queue,{},Su())}function js(){return na(lp)}function Ms(){return Po().memoizedState}function Ns(){return Po().memoizedState}function Ps(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Su();e=Wa(n);var r=Ga(t,e,n);r!==null&&(wu(r,t,n),Ka(r,t,n)),t={cache:la()},e.payload=t;return}t=t.return}}function Fs(e,t,n){var r=Su();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},zs(e)?Bs(t,n):(n=ni(e,t,n,r),n!==null&&(wu(n,e,r),Vs(n,t,r)))}function Is(e,t,n){Ls(e,t,n,Su())}function Ls(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(zs(e))Bs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Sr(s,o))return ti(e,t,i,0),Kl===null&&ei(),!1}catch{}if(n=ni(e,t,i,r),n!==null)return wu(n,e,r),Vs(n,t,r),!0}return!1}function Rs(e,t,n,r){if(r={lane:2,revertLane:xd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},zs(e)){if(t)throw Error(i(479))}else t=ni(e,n,r,2),t!==null&&wu(t,e,2)}function zs(e){var t=e.alternate;return e===z||t!==null&&t===z}function Bs(e,t){vo=_o=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}var Hs={readContext:na,use:Lo,useCallback:wo,useContext:wo,useEffect:wo,useImperativeHandle:wo,useLayoutEffect:wo,useInsertionEffect:wo,useMemo:wo,useReducer:wo,useRef:wo,useState:wo,useDebugValue:wo,useDeferredValue:wo,useTransition:wo,useSyncExternalStore:wo,useId:wo,useHostTransitionStatus:wo,useFormState:wo,useActionState:wo,useOptimistic:wo,useMemoCache:wo,useCacheRefresh:wo};Hs.useEffectEvent=wo;var Us={readContext:na,use:Lo,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:na,useEffect:ps,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ds(4194308,4,ys.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ds(4194308,4,e,t)},useInsertionEffect:function(e,t){ds(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(yo){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(yo){Re(!0);try{n(t)}finally{Re(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Fs.bind(null,z,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Yo(e);var t=e.queue,n=Is.bind(null,z,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:xs,useDeferredValue:function(e,t){return ws(No(),e,t)},useTransition:function(){var e=Yo(!1);return e=Es.bind(null,z,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=z,a=No();if(Fi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Kl===null)throw Error(i(349));V&127||Wo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ps(Ko.bind(null,r,o,e),[e]),r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,o,n,t),null),n},useId:function(){var e=No(),t=Kl.identifierPrefix;if(Fi){var n=Di,r=Ei;n=(r&~(1<<32-L(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=bo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Co++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:js,useFormState:is,useActionState:is,useOptimistic:function(e){var t=No();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Rs.bind(null,z,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ro,useCacheRefresh:function(){return No().memoizedState=Ps.bind(null,z)},useEffectEvent:function(e){var t=No(),n={impl:e};return t.memoizedState=n,function(){if(Gl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ws={readContext:na,use:Lo,useCallback:Ss,useContext:na,useEffect:ms,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:Bo,useRef:us,useState:function(){return Bo(zo)},useDebugValue:xs,useDeferredValue:function(e,t){return Ts(Po(),ho.memoizedState,e,t)},useTransition:function(){var e=Bo(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Ms,useHostTransitionStatus:js,useFormState:as,useActionState:as,useOptimistic:function(e,t){return Xo(Po(),ho,e,t)},useMemoCache:Ro,useCacheRefresh:Ns};Ws.useEffectEvent=gs;var Gs={readContext:na,use:Lo,useCallback:Ss,useContext:na,useEffect:ms,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:Ho,useRef:us,useState:function(){return Ho(zo)},useDebugValue:xs,useDeferredValue:function(e,t){var n=Po();return ho===null?ws(n,e,t):Ts(n,ho.memoizedState,e,t)},useTransition:function(){var e=Ho(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Ms,useHostTransitionStatus:js,useFormState:cs,useActionState:cs,useOptimistic:function(e,t){var n=Po();return ho===null?(n.baseState=e,[e,n.queue.dispatch]):Xo(n,ho,e,t)},useMemoCache:Ro,useCacheRefresh:Ns};Gs.useEffectEvent=gs;function Ks(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var qs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Su(),i=Wa(r);i.payload=t,n!=null&&(i.callback=n),t=Ga(e,i,r),t!==null&&(wu(t,e,r),Ka(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Su(),i=Wa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ga(e,i,r),t!==null&&(wu(t,e,r),Ka(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Su(),r=Wa(n);r.tag=2,t!=null&&(r.callback=t),t=Ga(e,r,n),t!==null&&(wu(t,e,n),Ka(t,e,n))}};function Js(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Cr(n,r)||!Cr(i,a):!0}function Ys(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&qs.enqueueReplaceState(t,t.state,null)}function Xs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Zs(e){Xr(e)}function Qs(e){console.error(e)}function $s(e){Xr(e)}function ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function tc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function nc(e,t,n){return n=Wa(n),n.tag=3,n.payload={element:null},n.callback=function(){ec(e,t)},n}function rc(e){return e=Wa(e),e.tag=3,e}function ic(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){tc(t,n,r),typeof i!=`function`&&(fu===null?fu=new Set([this]):fu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ac(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&$i(t,n,a,!0),n=io.current,n!==null){switch(n.tag){case 31:case 13:return ao===null?Iu():n.alternate===null&&$l===0&&($l=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ea?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),td(e,r,a)),!1;case 22:return n.flags|=65536,r===Ea?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),td(e,r,a)),!1}throw Error(i(435,n.tag))}return td(e,r,a),Iu(),!1}if(Fi)return t=io.current,t===null?(r!==Ri&&(t=Error(i(423),{cause:r}),Gi(vi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=vi(r,n),a=nc(e.stateNode,r,a),qa(e,a),$l!==4&&($l=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ri&&(e=Error(i(422),{cause:r}),Gi(vi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=vi(o,n),au===null?au=[o]:au.push(o),$l!==4&&($l=2),t===null)return!0;r=vi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=nc(n.stateNode,r,e),qa(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(fu===null||!fu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=rc(a),ic(a,e,n,r),qa(n,a),!1}n=n.return}while(n!==null);return!1}var oc=Error(i(461)),sc=!1;function cc(e,t,n,r){t.child=e===null?Ba(t,null,n,r):za(t,e.child,n,r)}function lc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ta(t),r=Eo(e,t,n,o,a,i),s=Ao(),e!==null&&!sc?(jo(e,t,i),Nc(e,t,i)):(Fi&&s&&Ai(t),t.flags|=1,cc(e,t,r,i),t.child)}function uc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!li(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,dc(e,t,a,r,i)):(e=fi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Pc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Cr:n,n(o,r)&&e.ref===t.ref)return Nc(e,t,i)}return t.flags|=1,e=ui(a,r),e.ref=t.ref,e.return=t,t.child=e}function dc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Cr(a,r)&&e.ref===t.ref)if(sc=!1,t.pendingProps=r=a,Pc(e,i))e.flags&131072&&(sc=!0);else return t.lanes=e.lanes,Nc(e,t,i)}return yc(e,t,n,r,i)}function fc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return mc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&xa(t,a===null?null:a.cachePool),a===null?no():to(t,a),co(t);else return r=t.lanes=536870912,mc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&xa(t,null),no(),lo(t)):(xa(t,a.cachePool),to(t,a),lo(t),t.memoizedState=null);return cc(e,t,i,n),t.child}function pc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mc(e,t,n,r,i){var a=ba();return a=a===null?null:{parent:ca._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&xa(t,null),no(),co(t),e!==null&&$i(e,t,r,!0),t.childLanes=i,null}function hc(e,t){return t=Oc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gc(e,t,n){return za(t,e.child,null,n),e=hc(t,t.pendingProps),e.flags|=2,uo(t),t.memoizedState=null,e}function _c(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Fi){if(r.mode===`hidden`)return e=hc(t,r),t.lanes=536870912,pc(null,e);if(so(t),(e=Pi)?(e=hf(e,Li),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ti===null?null:{id:Ei,overflow:Di},retryLane:536870912,hydrationErrors:null},n=hi(e),n.return=t,t.child=n,Ni=t,Pi=null)):e=null,e===null)throw zi(t);return t.lanes=536870912,null}return hc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(so(t),a)if(t.flags&256)t.flags&=-257,t=gc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(sc||$i(e,t,n,!1),a=(n&e.childLanes)!==0,sc||a){if(r=Kl,r!==null&&(s=tt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ri(e,s),wu(r,e,s),oc;Iu(),t=gc(e,t,n)}else e=o.treeContext,Pi=yf(s.nextSibling),Ni=t,Fi=!0,Ii=null,Li=!1,e!==null&&Mi(t,e),t=hc(t,r),t.flags|=4096;return t}return e=ui(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function vc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function yc(e,t,n,r,i){return ta(t),n=Eo(e,t,n,r,void 0,i),r=Ao(),e!==null&&!sc?(jo(e,t,i),Nc(e,t,i)):(Fi&&r&&Ai(t),t.flags|=1,cc(e,t,n,i),t.child)}function bc(e,t,n,r,i,a){return ta(t),t.updateQueue=null,n=Oo(t,r,n,i),Do(e),r=Ao(),e!==null&&!sc?(jo(e,t,a),Nc(e,t,a)):(Fi&&r&&Ai(t),t.flags|=1,cc(e,t,n,a),t.child)}function xc(e,t,n,r,i){if(ta(t),t.stateNode===null){var a=oi,o=n.contextType;typeof o==`object`&&o&&(a=na(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=qs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ha(t),o=n.contextType,a.context=typeof o==`object`&&o?na(o):oi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ks(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&qs.enqueueReplaceState(a,a.state,null),Xa(t,r,a,i),Ya(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Xs(n,s);a.props=c;var l=a.context,u=n.contextType;o=oi,typeof u==`object`&&u&&(o=na(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ys(t,a,r,o),Va=!1;var f=t.memoizedState;a.state=f,Xa(t,r,a,i),Ya(),l=t.memoizedState,s||f!==l||Va?(typeof d==`function`&&(Ks(t,n,d,r),l=t.memoizedState),(c=Va||Js(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ua(e,t),o=t.memoizedProps,u=Xs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=oi,typeof l==`object`&&l&&(c=na(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ys(t,a,r,c),Va=!1,f=t.memoizedState,a.state=f,Xa(t,r,a,i),Ya();var p=t.memoizedState;o!==d||f!==p||Va||e!==null&&e.dependencies!==null&&ea(e.dependencies)?(typeof s==`function`&&(Ks(t,n,s,r),p=t.memoizedState),(u=Va||Js(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ea(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,vc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=za(t,e.child,null,i),t.child=za(t,null,n,i)):cc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Nc(e,t,i),e}function Sc(e,t,n,r){return Ui(),t.flags|=256,cc(e,t,n,r),t.child}var Cc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wc(e){return{baseLanes:e,cachePool:Sa()}}function Tc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ru),e}function Ec(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(fo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Fi){if(a?oo(t):lo(t),(e=Pi)?(e=hf(e,Li),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ti===null?null:{id:Ei,overflow:Di},retryLane:536870912,hydrationErrors:null},n=hi(e),n.return=t,t.child=n,Ni=t,Pi=null)):e=null,e===null)throw zi(t);return _f(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(lo(t),a=t.mode,c=Oc({mode:`hidden`,children:c},a),r=pi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(null,r)):(oo(t),Dc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(oo(t),t.flags&=-257,t=kc(e,t,n)):t.memoizedState===null?(lo(t),c=r.fallback,a=t.mode,r=Oc({mode:`visible`,children:r.children},a),c=pi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,za(t,e.child,null,n),r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,t=pc(null,r)):(lo(t),t.child=e.child,t.flags|=128,t=null);else if(oo(t),_f(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Gi({value:r,source:null,stack:null}),t=kc(e,t,n)}else if(sc||$i(e,t,n,!1),s=(n&e.childLanes)!==0,sc||s){if(s=Kl,s!==null&&(r=tt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ri(e,r),wu(s,e,r),oc;gf(c)||Iu(),t=kc(e,t,n)}else gf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Pi=yf(c.nextSibling),Ni=t,Fi=!0,Ii=null,Li=!1,e!==null&&Mi(t,e),t=Dc(t,r.children),t.flags|=4096);return t}return a?(lo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ui(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=pi(c,a,n,null),c.flags|=2):c=ui(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,pc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=wc(n):(a=c.cachePool,a===null?a=Sa():(l=ca._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(e.child,r)):(oo(t),n=e.child,e=n.sibling,n=ui(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Dc(e,t){return t=Oc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Oc(e,t){return e=ci(22,e,null,t),e.lanes=0,e}function kc(e,t,n){return za(t,e.child,null,n),e=Dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ac(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Zi(e.return,t,n)}function jc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Mc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=fo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,oe(fo,o),cc(e,t,r,n),r=Fi?Si:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ac(e,n,t);else if(e.tag===19)Ac(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&po(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),jc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&po(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}jc(t,!0,n,null,a,r);break;case`together`:jc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Nc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),eu|=t.lanes,(n&t.childLanes)===0)if(e!==null){if($i(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ui(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ui(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Pc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ea(e))):!0}function Fc(e,t,n){switch(t.tag){case 3:de(t,t.stateNode.containerInfo),Yi(t,ca,e.memoizedState.cache),Ui();break;case 27:case 5:pe(t);break;case 4:de(t,t.stateNode.containerInfo);break;case 10:Yi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,so(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(oo(t),e=Nc(e,t,n),e===null?null:e.sibling):Ec(e,t,n):(oo(t),t.flags|=128,null);oo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=($i(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Mc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),oe(fo,fo.current),r)break;return null;case 22:return t.lanes=0,fc(e,t,n,t.pendingProps);case 24:Yi(t,ca,e.memoizedState.cache)}return Nc(e,t,n)}function Ic(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)sc=!0;else{if(!Pc(e,n)&&!(t.flags&128))return sc=!1,Fc(e,t,n);sc=!!(e.flags&131072)}else sc=!1,Fi&&t.flags&1048576&&ki(t,Si,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ka(t.elementType),t.type=e,typeof e==`function`)li(e)?(r=Xs(e,r),t.tag=1,t=xc(null,t,e,r,n)):(t.tag=0,t=yc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=lc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=uc(null,t,e,r,n);break a}}throw t=ee(e)||e,Error(i(306,t,``))}}return t;case 0:return yc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Xs(r,t.pendingProps),xc(e,t,r,a,n);case 3:a:{if(de(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ua(e,t),Xa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Yi(t,ca,r),r!==o.cache&&Qi(t,[ca],n,!0),Ya(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Sc(e,t,r,n);break a}else if(r!==a){a=vi(Error(i(424)),t),Gi(a),t=Sc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Pi=yf(e.firstChild),Ni=t,Fi=!0,Ii=null,Li=!0,n=Ba(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ui(),r===a){t=Nc(e,t,n);break a}cc(e,t,r,n)}t=t.child}return t;case 26:return vc(e,t),e===null?(n=Bf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Fi||(n=t.type,e=t.pendingProps,r=Zd(le.current).createElement(n),r[st]=t,r[ct]=e,Gd(r,n,e),bt(r),t.stateNode=r):t.memoizedState=Bf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return pe(t),e===null&&Fi&&(r=t.stateNode=Cf(t.type,t.pendingProps,le.current),Ni=t,Li=!0,a=Pi,lf(t.type)?(bf=a,Pi=yf(r.firstChild)):Pi=a),cc(e,t,t.pendingProps.children,n),vc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Fi&&((a=r=Pi)&&(r=pf(r,t.type,t.pendingProps,Li),r===null?a=!1:(t.stateNode=r,Ni=t,Pi=yf(r.firstChild),Li=!1,a=!0)),a||zi(t)),pe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,ef(a,o)?r=null:s!==null&&ef(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Eo(e,t,ko,null,null,n),lp._currentValue=a),vc(e,t),cc(e,t,r,n),t.child;case 6:return e===null&&Fi&&((e=n=Pi)&&(n=mf(n,t.pendingProps,Li),n===null?e=!1:(t.stateNode=n,Ni=t,Pi=null,e=!0)),e||zi(t)),null;case 13:return Ec(e,t,n);case 4:return de(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=za(t,null,r,n):cc(e,t,r,n),t.child;case 11:return lc(e,t,t.type,t.pendingProps,n);case 7:return cc(e,t,t.pendingProps,n),t.child;case 8:return cc(e,t,t.pendingProps.children,n),t.child;case 12:return cc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Yi(t,t.type,r.value),cc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ta(t),a=na(a),r=r(a),t.flags|=1,cc(e,t,r,n),t.child;case 14:return uc(e,t,t.type,t.pendingProps,n);case 15:return dc(e,t,t.type,t.pendingProps,n);case 19:return Mc(e,t,n);case 31:return _c(e,t,n);case 22:return fc(e,t,n,t.pendingProps);case 24:return ta(t),r=na(ca),e===null?(a=ba(),a===null&&(a=Kl,o=la(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ha(t),Yi(t,ca,a)):((e.lanes&n)!==0&&(Ua(e,t),Xa(t,null,null,n),Ya()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Yi(t,ca,r),r!==a.cache&&Qi(t,[ca],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Yi(t,ca,r))),cc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Lc(e){e.flags|=4}function Rc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Nu())e.flags|=8192;else throw Aa=Ea,wa}else e.flags&=-16777217}function zc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!tp(t))if(Nu())e.flags|=8192;else throw Aa=Ea,wa}function Bc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ye(),e.lanes|=t,iu|=t)}function Vc(e,t){if(!Fi)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Hc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Uc(e,t,n){var r=t.pendingProps;switch(ji(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Hc(t),null;case 1:return Hc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Xi(ca),fe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Hi(t)?Lc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Wi())),Hc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Lc(t),o===null?(Hc(t),Rc(t,a,null,r,n)):(Hc(t),zc(t,o))):o?o===e.memoizedState?(Hc(t),t.flags&=-16777217):(Lc(t),Hc(t),zc(t,o)):(e=e.memoizedProps,e!==r&&Lc(t),Hc(t),Rc(t,a,e,r,n)),null;case 27:if(me(t),n=le.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Hc(t),null}e=se.current,Hi(t)?Bi(t,e):(e=Cf(a,r,n),t.stateNode=e,Lc(t))}return Hc(t),null;case 5:if(me(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Hc(t),null}if(o=se.current,Hi(t))Bi(t,o);else{var s=Zd(le.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[st]=t,o[ct]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Gd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Lc(t)}}return Hc(t),Rc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=le.current,Hi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ni,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[st]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Hd(e.nodeValue,n)),e||zi(t,!0)}else e=Zd(e).createTextNode(r),e[st]=t,t.stateNode=e}return Hc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Hi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[st]=t}else Ui(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Hc(t),e=!1}else n=Wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(uo(t),t):(uo(t),null);if(t.flags&128)throw Error(i(558))}return Hc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Hi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[st]=t}else Ui(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Hc(t),a=!1}else a=Wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(uo(t),t):(uo(t),null)}return uo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Bc(t,t.updateQueue),Hc(t),null);case 4:return fe(),e===null&&Md(t.stateNode.containerInfo),Hc(t),null;case 10:return Xi(t.type),Hc(t),null;case 19:if(I(fo),r=t.memoizedState,r===null)return Hc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Vc(r,!1);else{if($l!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=po(e),o!==null){for(t.flags|=128,Vc(r,!1),e=o.updateQueue,t.updateQueue=e,Bc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)di(n,e),n=n.sibling;return oe(fo,fo.current&1|2),Fi&&Oi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&De()>uu&&(t.flags|=128,a=!0,Vc(r,!1),t.lanes=4194304)}else{if(!a)if(e=po(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Bc(t,e),Vc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Fi)return Hc(t),null}else 2*De()-r.renderingStartTime>uu&&n!==536870912&&(t.flags|=128,a=!0,Vc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Hc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=De(),e.sibling=null,n=fo.current,oe(fo,a?n&1|2:n&1),Fi&&Oi(t,r.treeForkCount),e);case 22:case 23:return uo(t),ro(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Hc(t),t.subtreeFlags&6&&(t.flags|=8192)):Hc(t),n=t.updateQueue,n!==null&&Bc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&I(ya),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Xi(ca),Hc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Wc(e,t){switch(ji(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xi(ca),fe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return me(t),null;case 31:if(t.memoizedState!==null){if(uo(t),t.alternate===null)throw Error(i(340));Ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(uo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return I(fo),null;case 4:return fe(),null;case 10:return Xi(t.type),null;case 22:case 23:return uo(t),ro(),e!==null&&I(ya),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Xi(ca),null;case 25:return null;default:return null}}function Gc(e,t){switch(ji(t),t.tag){case 3:Xi(ca),fe();break;case 26:case 27:case 5:me(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&uo(t);break;case 13:uo(t);break;case 19:I(fo);break;case 10:Xi(t.type);break;case 22:case 23:uo(t),ro(),e!==null&&I(ya);break;case 24:Xi(ca)}}function Kc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){ed(t,t.return,e)}}function qc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){ed(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){ed(t,t.return,e)}}function Jc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Qa(t,n)}catch(t){ed(e,e.return,t)}}}function Yc(e,t,n){n.props=Xs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ed(e,t,n)}}function Xc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){ed(e,t,n)}}function Zc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){ed(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){ed(e,t,n)}else n.current=null}function Qc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){ed(e,e.return,t)}}function $c(e,t,n){try{var r=e.stateNode;Kd(r,e.type,n,t),r[ct]=t}catch(t){ed(e,e.return,t)}}function el(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&lf(e.type)||e.tag===4}function tl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||el(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&lf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function nl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=en));else if(r!==4&&(r===27&&lf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(nl(e,t,n),e=e.sibling;e!==null;)nl(e,t,n),e=e.sibling}function rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&lf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Gd(t,r,n),t[st]=e,t[ct]=n}catch(t){ed(e,e.return,t)}}var al=!1,ol=!1,sl=!1,cl=typeof WeakSet==`function`?WeakSet:Set,ll=null;function ul(e,t){if(e=e.containerInfo,Yd=vp,e=Dr(e),Or(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Xd={focusedElem:e,selectionRange:n},vp=!1,ll=t;ll!==null;)if(t=ll,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ll=e;else for(;ll!==null;){switch(t=ll,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Xs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){ed(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ff(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ff(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ll=e;break}ll=t.return}}function dl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:El(e,n),r&4&&Kc(5,n);break;case 1:if(El(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){ed(n,n.return,e)}else{var i=Xs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){ed(n,n.return,e)}}r&64&&Jc(n),r&512&&Xc(n,n.return);break;case 3:if(El(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Qa(e,t)}catch(e){ed(n,n.return,e)}}break;case 27:t===null&&r&4&&il(n);case 26:case 5:El(e,n),t===null&&r&4&&Qc(n),r&512&&Xc(n,n.return);break;case 12:El(e,n);break;case 31:El(e,n),r&4&&_l(e,n);break;case 13:El(e,n),r&4&&vl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=id.bind(null,n),vf(e,n))));break;case 22:if(r=n.memoizedState!==null||al,!r){t=t!==null&&t.memoizedState!==null||ol,i=al;var a=ol;al=r,(ol=t)&&!a?Ol(e,n,(n.subtreeFlags&8772)!=0):El(e,n),al=i,ol=a}break;case 30:break;default:El(e,n)}}function fl(e){var t=e.alternate;t!==null&&(e.alternate=null,fl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ht(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var pl=null,ml=!1;function hl(e,t,n){for(n=n.child;n!==null;)gl(e,t,n),n=n.sibling}function gl(e,t,n){if(Le&&typeof Le.onCommitFiberUnmount==`function`)try{Le.onCommitFiberUnmount(Ie,n)}catch{}switch(n.tag){case 26:ol||Zc(n,t),hl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ol||Zc(n,t);var r=pl,i=ml;lf(n.type)&&(pl=n.stateNode,ml=!1),hl(e,t,n),wf(n.stateNode),pl=r,ml=i;break;case 5:ol||Zc(n,t);case 6:if(r=pl,i=ml,pl=null,hl(e,t,n),pl=r,ml=i,pl!==null)if(ml)try{(pl.nodeType===9?pl.body:pl.nodeName===`HTML`?pl.ownerDocument.body:pl).removeChild(n.stateNode)}catch(e){ed(n,t,e)}else try{pl.removeChild(n.stateNode)}catch(e){ed(n,t,e)}break;case 18:pl!==null&&(ml?(e=pl,uf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Wp(e)):uf(pl,n.stateNode));break;case 4:r=pl,i=ml,pl=n.stateNode.containerInfo,ml=!0,hl(e,t,n),pl=r,ml=i;break;case 0:case 11:case 14:case 15:qc(2,n,t),ol||qc(4,n,t),hl(e,t,n);break;case 1:ol||(Zc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Yc(n,t,r)),hl(e,t,n);break;case 21:hl(e,t,n);break;case 22:ol=(r=ol)||n.memoizedState!==null,hl(e,t,n),ol=r;break;default:hl(e,t,n)}}function _l(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wp(e)}catch(e){ed(t,t.return,e)}}}function vl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wp(e)}catch(e){ed(t,t.return,e)}}function yl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new cl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new cl),t;default:throw Error(i(435,e.tag))}}function bl(e,t){var n=yl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=ad.bind(null,e,t);t.then(r,r)}})}function xl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(lf(c.type)){pl=c.stateNode,ml=!1;break a}break;case 5:pl=c.stateNode,ml=!1;break a;case 3:case 4:pl=c.stateNode.containerInfo,ml=!0;break a}c=c.return}if(pl===null)throw Error(i(160));gl(o,s,a),pl=null,ml=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Cl(t,e),t=t.sibling}var Sl=null;function Cl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:xl(t,e),wl(e),r&4&&(qc(3,e,e.return),Kc(3,e),qc(5,e,e.return));break;case 1:xl(t,e),wl(e),r&512&&(ol||n===null||Zc(n,n.return)),r&64&&al&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=Sl;if(xl(t,e),wl(e),r&512&&(ol||n===null||Zc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[mt]||o[st]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Gd(o,r,n),o[st]=e,bt(o),r=o;break a;case`link`:var s=Qf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Gd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Qf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Gd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[st]=e,bt(o),r=o}e.stateNode=r}else $f(a,e.type,e.stateNode);else e.stateNode=qf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&$c(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?$f(a,e.type,e.stateNode):qf(a,r,e.memoizedProps))}break;case 27:xl(t,e),wl(e),r&512&&(ol||n===null||Zc(n,n.return)),n!==null&&r&4&&$c(e,e.memoizedProps,n.memoizedProps);break;case 5:if(xl(t,e),wl(e),r&512&&(ol||n===null||Zc(n,n.return)),e.flags&32){a=e.stateNode;try{Kt(a,``)}catch(t){ed(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,$c(e,a,n===null?a:n.memoizedProps)),r&1024&&(sl=!0);break;case 6:if(xl(t,e),wl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){ed(e,e.return,t)}}break;case 3:if(Zf=null,a=Sl,Sl=Df(t.containerInfo),xl(t,e),Sl=a,wl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Wp(t.containerInfo)}catch(t){ed(e,e.return,t)}sl&&(sl=!1,Tl(e));break;case 4:r=Sl,Sl=Df(e.stateNode.containerInfo),xl(t,e),wl(e),Sl=r;break;case 12:xl(t,e),wl(e);break;case 31:xl(t,e),wl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 13:xl(t,e),wl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(cu=De()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=al,d=ol;if(al=u||a,ol=d||l,xl(t,e),ol=d,al=u,wl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||al||ol||Dl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){ed(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){ed(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?df(m,!0):df(l.stateNode,!1)}catch(e){ed(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,bl(e,n))));break;case 19:xl(t,e),wl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 30:break;case 21:break;default:xl(t,e),wl(e)}}function wl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(el(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;rl(e,tl(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Kt(o,``),n.flags&=-33),rl(e,tl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;nl(e,tl(e),s);break;default:throw Error(i(161))}}catch(t){ed(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Tl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Tl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function El(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)dl(e,t.alternate,t),t=t.sibling}function Dl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:qc(4,t,t.return),Dl(t);break;case 1:Zc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Yc(t,t.return,n),Dl(t);break;case 27:wf(t.stateNode);case 26:case 5:Zc(t,t.return),Dl(t);break;case 22:t.memoizedState===null&&Dl(t);break;case 30:Dl(t);break;default:Dl(t)}e=e.sibling}}function Ol(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Ol(i,a,n),Kc(4,a);break;case 1:if(Ol(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){ed(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Za(c[i],s)}catch(e){ed(r,r.return,e)}}n&&o&64&&Jc(a),Xc(a,a.return);break;case 27:il(a);case 26:case 5:Ol(i,a,n),n&&r===null&&o&4&&Qc(a),Xc(a,a.return);break;case 12:Ol(i,a,n);break;case 31:Ol(i,a,n),n&&o&4&&_l(i,a);break;case 13:Ol(i,a,n),n&&o&4&&vl(i,a);break;case 22:a.memoizedState===null&&Ol(i,a,n),Xc(a,a.return);break;case 30:break;default:Ol(i,a,n)}t=t.sibling}}function kl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ua(n))}function Al(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ua(e))}function jl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ml(e,t,n,r),t=t.sibling}function Ml(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:jl(e,t,n,r),i&2048&&Kc(9,t);break;case 1:jl(e,t,n,r);break;case 3:jl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ua(e)));break;case 12:if(i&2048){jl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){ed(t,t.return,e)}}else jl(e,t,n,r);break;case 31:jl(e,t,n,r);break;case 13:jl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?jl(e,t,n,r):(a._visibility|=2,Nl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?jl(e,t,n,r):Pl(e,t),i&2048&&kl(o,t);break;case 24:jl(e,t,n,r),i&2048&&Al(t.alternate,t);break;default:jl(e,t,n,r)}}function Nl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Nl(a,o,s,c,i),Kc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Nl(a,o,s,c,i)):u._visibility&2?Nl(a,o,s,c,i):Pl(a,o),i&&l&2048&&kl(o.alternate,o);break;case 24:Nl(a,o,s,c,i),i&&l&2048&&Al(o.alternate,o);break;default:Nl(a,o,s,c,i)}t=t.sibling}}function Pl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Pl(n,r),i&2048&&kl(r.alternate,r);break;case 24:Pl(n,r),i&2048&&Al(r.alternate,r);break;default:Pl(n,r)}t=t.sibling}}var Fl=8192;function Il(e,t,n){if(e.subtreeFlags&Fl)for(e=e.child;e!==null;)Ll(e,t,n),e=e.sibling}function Ll(e,t,n){switch(e.tag){case 26:Il(e,t,n),e.flags&Fl&&e.memoizedState!==null&&np(n,Sl,e.memoizedState,e.memoizedProps);break;case 5:Il(e,t,n);break;case 3:case 4:var r=Sl;Sl=Df(e.stateNode.containerInfo),Il(e,t,n),Sl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Fl,Fl=16777216,Il(e,t,n),Fl=r):Il(e,t,n));break;default:Il(e,t,n)}}function Rl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function zl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ll=r,Hl(r,e)}Rl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Bl(e),e=e.sibling}function Bl(e){switch(e.tag){case 0:case 11:case 15:zl(e),e.flags&2048&&qc(9,e,e.return);break;case 3:zl(e);break;case 12:zl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Vl(e)):zl(e);break;default:zl(e)}}function Vl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ll=r,Hl(r,e)}Rl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:qc(8,t,t.return),Vl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Vl(t));break;default:Vl(t)}e=e.sibling}}function Hl(e,t){for(;ll!==null;){var n=ll;switch(n.tag){case 0:case 11:case 15:qc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ua(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ll=r;else a:for(n=e;ll!==null;){r=ll;var i=r.sibling,a=r.return;if(fl(r),r===n){ll=null;break a}if(i!==null){i.return=a,ll=i;break a}ll=a}}}var Ul={getCacheForType:function(e){var t=na(ca),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return na(ca).controller.signal}},Wl=typeof WeakMap==`function`?WeakMap:Map,Gl=0,Kl=null,B=null,V=0,ql=0,Jl=null,Yl=!1,Xl=!1,Zl=!1,Ql=0,$l=0,eu=0,tu=0,nu=0,ru=0,iu=0,au=null,ou=null,su=!1,cu=0,lu=0,uu=1/0,du=null,fu=null,pu=0,mu=null,hu=null,gu=0,_u=0,vu=null,yu=null,bu=0,xu=null;function Su(){return Gl&2&&V!==0?V&-V:P.T===null?it():xd()}function Cu(){if(ru===0)if(!(V&536870912)||Fi){var e=Ue;Ue<<=1,!(Ue&3932160)&&(Ue=262144),ru=e}else ru=536870912;return e=io.current,e!==null&&(e.flags|=32),ru}function wu(e,t,n){(e===Kl&&(ql===2||ql===9)||e.cancelPendingCommit!==null)&&(ju(e,0),Ou(e,V,ru,!1)),Ze(e,n),(!(Gl&2)||e!==Kl)&&(e===Kl&&(!(Gl&2)&&(tu|=n),$l===4&&Ou(e,V,ru,!1)),pd(e))}function Tu(e,t,n){if(Gl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||qe(e,t),a=r?zu(e,t):Lu(e,t,!0),o=r;do{if(a===0){Xl&&!r&&Ou(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Du(n)){a=Lu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=au;var l=c.current.memoizedState.isDehydrated;if(l&&(ju(c,s).flags|=256),s=Lu(c,s,!1),s!==2){if(Zl&&!l){c.errorRecoveryDisabledLanes|=o,tu|=o,a=4;break a}o=ou,ou=a,o!==null&&(ou===null?ou=o:ou.push.apply(ou,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){ju(e,0),Ou(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Ou(r,t,ru,!Yl);break a;case 2:ou=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=cu+300-De(),10<a)){if(Ou(r,t,ru,!Yl),Ke(r,0,!0)!==0)break a;gu=t,r.timeoutHandle=rf(Eu.bind(null,r,n,ou,du,su,t,ru,tu,iu,Yl,o,`Throttled`,-0,0),a);break a}Eu(r,n,ou,du,su,t,ru,tu,iu,Yl,o,null,-0,0)}}break}while(1);pd(e)}function Eu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:en},Ll(t,a,d);var m=(a&62914560)===a?cu-De():(a&4194048)===a?lu-De():0;if(m=ip(d,m),m!==null){gu=a,e.cancelPendingCommit=m(Ku.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Ou(e,a,o,!l);return}}Ku(e,t,a,n,r,i,o,s,c)}function Du(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Sr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ou(e,t,n,r){t&=~nu,t&=~tu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-L(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&$e(e,n,t)}function ku(){return Gl&6?!0:(md(0,!1),!1)}function Au(){if(B!==null){if(ql===0)var e=B.return;else e=B,Ji=qi=null,Mo(e),Na=null,Pa=0,e=B;for(;e!==null;)Gc(e.alternate,e),e=e.return;B=null}}function ju(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,af(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),gu=0,Au(),Kl=e,B=n=ui(e.current,null),V=t,ql=0,Jl=null,Yl=!1,Xl=qe(e,t),Zl=!1,iu=ru=nu=tu=eu=$l=0,ou=au=null,su=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-L(r),a=1<<i;t|=e[i],r&=~a}return Ql=t,ei(),n}function Mu(e,t){z=null,P.H=Hs,t===Ca||t===Ta?(t=ja(),ql=3):t===wa?(t=ja(),ql=4):ql=t===oc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Jl=t,B===null&&($l=1,ec(e,vi(t,e.current)))}function Nu(){var e=io.current;return e===null?!0:(V&4194048)===V?ao===null:(V&62914560)===V||V&536870912?e===ao:!1}function Pu(){var e=P.H;return P.H=Hs,e===null?Hs:e}function Fu(){var e=P.A;return P.A=Ul,e}function Iu(){$l=4,Yl||(V&4194048)!==V&&io.current!==null||(Xl=!0),!(eu&134217727)&&!(tu&134217727)||Kl===null||Ou(Kl,V,ru,!1)}function Lu(e,t,n){var r=Gl;Gl|=2;var i=Pu(),a=Fu();(Kl!==e||V!==t)&&(du=null,ju(e,t)),t=!1;var o=$l;a:do try{if(ql!==0&&B!==null){var s=B,c=Jl;switch(ql){case 8:Au(),o=6;break a;case 3:case 2:case 9:case 6:io.current===null&&(t=!0);var l=ql;if(ql=0,Jl=null,Uu(e,s,c,l),n&&Xl){o=0;break a}break;default:l=ql,ql=0,Jl=null,Uu(e,s,c,l)}}Ru(),o=$l;break}catch(t){Mu(e,t)}while(1);return t&&e.shellSuspendCounter++,Ji=qi=null,Gl=r,P.H=i,P.A=a,B===null&&(Kl=null,V=0,ei()),o}function Ru(){for(;B!==null;)Vu(B)}function zu(e,t){var n=Gl;Gl|=2;var r=Pu(),a=Fu();Kl!==e||V!==t?(du=null,uu=De()+500,ju(e,t)):Xl=qe(e,t);a:do try{if(ql!==0&&B!==null){t=B;var o=Jl;b:switch(ql){case 1:ql=0,Jl=null,Uu(e,t,o,1);break;case 2:case 9:if(Da(o)){ql=0,Jl=null,Hu(t);break}t=function(){ql!==2&&ql!==9||Kl!==e||(ql=7),pd(e)},o.then(t,t);break a;case 3:ql=7;break a;case 4:ql=5;break a;case 7:Da(o)?(ql=0,Jl=null,Hu(t)):(ql=0,Jl=null,Uu(e,t,o,7));break;case 5:var s=null;switch(B.tag){case 26:s=B.memoizedState;case 5:case 27:var c=B;if(s?tp(s):c.stateNode.complete){ql=0,Jl=null;var l=c.sibling;if(l!==null)B=l;else{var u=c.return;u===null?B=null:(B=u,Wu(u))}break b}}ql=0,Jl=null,Uu(e,t,o,5);break;case 6:ql=0,Jl=null,Uu(e,t,o,6);break;case 8:Au(),$l=6;break a;default:throw Error(i(462))}}Bu();break}catch(t){Mu(e,t)}while(1);return Ji=qi=null,P.H=r,P.A=a,Gl=n,B===null?(Kl=null,V=0,ei(),$l):0}function Bu(){for(;B!==null&&!Te();)Vu(B)}function Vu(e){var t=Ic(e.alternate,e,Ql);e.memoizedProps=e.pendingProps,t===null?Wu(e):B=t}function Hu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=bc(n,t,t.pendingProps,t.type,void 0,V);break;case 11:t=bc(n,t,t.pendingProps,t.type.render,t.ref,V);break;case 5:Mo(t);default:Gc(n,t),t=B=di(t,Ql),t=Ic(n,t,Ql)}e.memoizedProps=e.pendingProps,t===null?Wu(e):B=t}function Uu(e,t,n,r){Ji=qi=null,Mo(t),Na=null,Pa=0;var i=t.return;try{if(ac(e,i,t,n,V)){$l=1,ec(e,vi(n,e.current)),B=null;return}}catch(t){if(i!==null)throw B=i,t;$l=1,ec(e,vi(n,e.current)),B=null;return}t.flags&32768?(Fi||r===1?e=!0:Xl||V&536870912?e=!1:(Yl=e=!0,(r===2||r===9||r===3||r===6)&&(r=io.current,r!==null&&r.tag===13&&(r.flags|=16384))),Gu(t,e)):Wu(t)}function Wu(e){var t=e;do{if(t.flags&32768){Gu(t,Yl);return}e=t.return;var n=Uc(t.alternate,t,Ql);if(n!==null){B=n;return}if(t=t.sibling,t!==null){B=t;return}B=t=e}while(t!==null);$l===0&&($l=5)}function Gu(e,t){do{var n=Wc(e.alternate,e);if(n!==null){n.flags&=32767,B=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){B=e;return}B=e=n}while(e!==null);$l=6,B=null}function Ku(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Zu();while(pu!==0);if(Gl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=$r,Qe(e,n,o,s,c,l),e===Kl&&(B=Kl=null,V=0),hu=t,mu=e,gu=n,_u=o,vu=a,yu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,od(je,function(){return Qu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=P.T,P.T=null,a=F.p,F.p=2,s=Gl,Gl|=4;try{ul(e,t,n)}finally{Gl=s,F.p=a,P.T=r}}pu=1,qu(),Ju(),Yu()}}function qu(){if(pu===1){pu=0;var e=mu,t=hu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Gl;Gl|=4;try{Cl(t,e);var a=Xd,o=Dr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Er(s.ownerDocument.documentElement,s)){if(c!==null&&Or(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Tr(s,h),v=Tr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}vp=!!Yd,Xd=Yd=null}finally{Gl=i,F.p=r,P.T=n}}e.current=t,pu=2}}function Ju(){if(pu===2){pu=0;var e=mu,t=hu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Gl;Gl|=4;try{dl(e,t.alternate,t)}finally{Gl=i,F.p=r,P.T=n}}pu=3}}function Yu(){if(pu===4||pu===3){pu=0,Ee();var e=mu,t=hu,n=gu,r=yu;t.subtreeFlags&10256||t.flags&10256?pu=5:(pu=0,hu=mu=null,Xu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(fu=null),rt(n),t=t.stateNode,Le&&typeof Le.onCommitFiberRoot==`function`)try{Le.onCommitFiberRoot(Ie,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}gu&3&&Zu(),pd(e),i=e.pendingLanes,n&261930&&i&42?e===xu?bu++:(bu=0,xu=e):bu=0,md(0,!1)}}function Xu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ua(t)))}function Zu(){return qu(),Ju(),Yu(),Qu()}function Qu(){if(pu!==5)return!1;var e=mu,t=_u;_u=0;var n=rt(gu),r=P.T,a=F.p;try{F.p=32>n?32:n,P.T=null,n=vu,vu=null;var o=mu,s=gu;if(pu=0,hu=mu=null,gu=0,Gl&6)throw Error(i(331));var c=Gl;if(Gl|=4,Bl(o.current),Ml(o,o.current,s,n),Gl=c,md(0,!1),Le&&typeof Le.onPostCommitFiberRoot==`function`)try{Le.onPostCommitFiberRoot(Ie,o)}catch{}return!0}finally{F.p=a,P.T=r,Xu(e,t)}}function $u(e,t,n){t=vi(n,t),t=nc(e.stateNode,t,2),e=Ga(e,t,2),e!==null&&(Ze(e,2),pd(e))}function ed(e,t,n){if(e.tag===3)$u(e,e,n);else for(;t!==null;){if(t.tag===3){$u(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(fu===null||!fu.has(r))){e=vi(n,e),n=rc(2),r=Ga(t,n,2),r!==null&&(ic(n,r,t,e),Ze(r,2),pd(r));break}}t=t.return}}function td(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Wl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Zl=!0,i.add(n),e=nd.bind(null,e,t,n),t.then(e,e))}function nd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Kl===e&&(V&n)===n&&($l===4||$l===3&&(V&62914560)===V&&300>De()-cu?!(Gl&2)&&ju(e,0):nu|=n,iu===V&&(iu=0)),pd(e)}function rd(e,t){t===0&&(t=Ye()),e=ri(e,t),e!==null&&(Ze(e,t),pd(e))}function id(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),rd(e,n)}function ad(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),rd(e,n)}function od(e,t){return Ce(e,t)}var sd=null,cd=null,ld=!1,ud=!1,dd=!1,fd=0;function pd(e){e!==cd&&e.next===null&&(cd===null?sd=cd=e:cd=cd.next=e),ud=!0,ld||(ld=!0,bd())}function md(e,t){if(!dd&&ud){dd=!0;do for(var n=!1,r=sd;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-L(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,yd(r,a))}else a=V,a=Ke(r,r===Kl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||qe(r,a)||(n=!0,yd(r,a));r=r.next}while(n);dd=!1}}function hd(){gd()}function gd(){ud=ld=!1;var e=0;fd!==0&&nf()&&(e=fd);for(var t=De(),n=null,r=sd;r!==null;){var i=r.next,a=_d(r,t);a===0?(r.next=null,n===null?sd=i:n.next=i,i===null&&(cd=n)):(n=r,(e!==0||a&3)&&(ud=!0)),r=i}pu!==0&&pu!==5||md(e,!1),fd!==0&&(fd=0)}function _d(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-L(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Je(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Kl,n=V,n=Ke(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(ql===2||ql===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&we(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||qe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&we(r),rt(n)){case 2:case 8:n=Ae;break;case 32:n=je;break;case 268435456:n=Ne;break;default:n=je}return r=vd.bind(null,e),n=Ce(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&we(r),e.callbackPriority=2,e.callbackNode=null,2}function vd(e,t){if(pu!==0&&pu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Zu()&&e.callbackNode!==n)return null;var r=V;return r=Ke(e,e===Kl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Tu(e,r,t),_d(e,De()),e.callbackNode!=null&&e.callbackNode===n?vd.bind(null,e):null)}function yd(e,t){if(Zu())return null;Tu(e,t,!0)}function bd(){sf(function(){Gl&6?Ce(ke,hd):gd()})}function xd(){if(fd===0){var e=pa;e===0&&(e=He,He<<=1,!(He&261888)&&(He=256)),fd=e}return fd}function Sd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:$t(``+e)}function Cd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function wd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Sd((i[ct]||null).action),o=r.submitter;o&&(t=(t=o[ct]||null)?Sd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new xn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(fd!==0){var e=o?Cd(i,o):new FormData(i);Os(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Cd(i,o):new FormData(i),Os(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Td=0;Td<Jr.length;Td++){var Ed=Jr[Td];Yr(Ed.toLowerCase(),`on`+(Ed[0].toUpperCase()+Ed.slice(1)))}Yr(Br,`onAnimationEnd`),Yr(Vr,`onAnimationIteration`),Yr(Hr,`onAnimationStart`),Yr(`dblclick`,`onDoubleClick`),Yr(`focusin`,`onFocus`),Yr(`focusout`,`onBlur`),Yr(Ur,`onTransitionRun`),Yr(Wr,`onTransitionStart`),Yr(Gr,`onTransitionCancel`),Yr(Kr,`onTransitionEnd`),wt(`onMouseEnter`,[`mouseout`,`mouseover`]),wt(`onMouseLeave`,[`mouseout`,`mouseover`]),wt(`onPointerEnter`,[`pointerout`,`pointerover`]),wt(`onPointerLeave`,[`pointerout`,`pointerover`]),Ct(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ct(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ct(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ct(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ct(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ct(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Dd=`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(` `),Od=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Dd));function kd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Xr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Xr(e)}i.currentTarget=null,a=c}}}}function H(e,t){var n=t[ut];n===void 0&&(n=t[ut]=new Set);var r=e+`__bubble`;n.has(r)||(Nd(t,e,2,!1),n.add(r))}function Ad(e,t,n){var r=0;t&&(r|=4),Nd(n,e,r,t)}var jd=`_reactListening`+Math.random().toString(36).slice(2);function Md(e){if(!e[jd]){e[jd]=!0,xt.forEach(function(t){t!==`selectionchange`&&(Od.has(t)||Ad(t,!1,e),Ad(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jd]||(t[jd]=!0,Ad(`selectionchange`,!1,t))}}function Nd(e,t,n,r){switch(Tp(t)){case 2:var i=yp;break;case 8:i=bp;break;default:i=xp}n=i.bind(null,t,n,e),i=void 0,!dn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Pd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=gt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}cn(function(){var r=a,i=nn(n),s=[];a:{var c=qr.get(e);if(c!==void 0){var l=xn,u=e;switch(e){case`keypress`:if(gn(n)===0)break a;case`keydown`:case`keyup`:l=zn;break;case`focusin`:u=`focus`,l=An;break;case`focusout`:u=`blur`,l=An;break;case`beforeblur`:case`afterblur`:l=An;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=On;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Vn;break;case Br:case Vr:case Hr:l=jn;break;case Kr:l=Hn;break;case`scroll`:case`scrollend`:l=Cn;break;case`wheel`:l=Un;break;case`copy`:case`cut`:case`paste`:l=Mn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Bn;break;case`toggle`:case`beforetoggle`:l=Wn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=ln(m,p),g!=null&&d.push(Fd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==tn&&(u=n.relatedTarget||n.fromElement)&&(gt(u)||u[lt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?gt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=On,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Bn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:vt(l),h=u==null?c:vt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,gt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ld,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Rd(s,c,l,d,!1),u!==null&&f!==null&&Rd(s,f,u,d,!0)}}a:{if(c=r?vt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=ur;else if(ir(c))if(dr)v=br;else{v=vr;var y=_r}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Xt(r.elementType)&&(v=ur):v=yr;if(v&&=v(e,r)){ar(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ht(c,`number`,c.value)}switch(y=r?vt(r):window,e){case`focusin`:(ir(y)||y.contentEditable===`true`)&&(Ar=y,jr=r,Mr=null);break;case`focusout`:Mr=jr=Ar=null;break;case`mousedown`:Nr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Nr=!1,Pr(s,n,i);break;case`selectionchange`:if(kr)break;case`keydown`:case`keyup`:Pr(s,n,i)}var b;if(Kn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else er?Qn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Yn&&n.locale!==`ko`&&(er||x!==`onCompositionStart`?x===`onCompositionEnd`&&er&&(b=R()):(pn=i,mn=`value`in pn?pn.value:pn.textContent,er=!0)),y=Id(r,x),0<y.length&&(x=new Nn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=$n(n),b!==null&&(x.data=b)))),(b=Jn?tr(e,n):nr(e,n))&&(x=Id(r,`onBeforeInput`),0<x.length&&(y=new Nn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),wd(s,e,r,n,i)}kd(s,t)})}function Fd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Id(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=ln(e,n),i!=null&&r.unshift(Fd(e,i,a)),i=ln(e,t),i!=null&&r.push(Fd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ld(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Rd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=ln(n,a),l!=null&&o.unshift(Fd(n,l,c))):i||(l=ln(n,a),l!=null&&o.push(Fd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var zd=/\r\n?/g,Bd=/\u0000|\uFFFD/g;function Vd(e){return(typeof e==`string`?e:``+e).replace(zd,`
9
+ `).replace(Bd,``)}function Hd(e,t){return t=Vd(t),Vd(e)===t}function Ud(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Kt(e,``+r);break;case`className`:At(e,`class`,r);break;case`tabIndex`:At(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:At(e,n,r);break;case`style`:Yt(e,r,o);break;case`data`:if(t!==`object`){At(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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 o==`function`&&(n===`formAction`?(t!==`input`&&Ud(e,t,`name`,a.name,a,null),Ud(e,t,`formEncType`,a.formEncType,a,null),Ud(e,t,`formMethod`,a.formMethod,a,null),Ud(e,t,`formTarget`,a.formTarget,a,null)):(Ud(e,t,`encType`,a.encType,a,null),Ud(e,t,`method`,a.method,a,null),Ud(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=en);break;case`onScroll`:r!=null&&H(`scroll`,e);break;case`onScrollEnd`:r!=null&&H(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=$t(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);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`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:H(`beforetoggle`,e),H(`toggle`,e),kt(e,`popover`,r);break;case`xlinkActuate`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:kt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Zt.get(n)||n,kt(e,n,r))}}function Wd(e,t,n,r,a,o){switch(n){case`style`:Yt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Kt(e,``+r);break;case`onScroll`:r!=null&&H(`scroll`,e);break;case`onScrollEnd`:r!=null&&H(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=en);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!St.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ct]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):kt(e,n,r)}}}function Gd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:H(`error`,e),H(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Ud(e,t,o,s,n,null)}}a&&Ud(e,t,`srcSet`,n.srcSet,n,null),r&&Ud(e,t,`src`,n.src,n,null);return;case`input`:H(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Ud(e,t,r,d,n,null)}}Vt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in H(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Ud(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ut(e,!!r,n,!0):Ut(e,!!r,t,!1);return;case`textarea`:for(s in H(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Ud(e,t,s,c,n,null)}Gt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Ud(e,t,l,r,n,null)}return;case`dialog`:H(`beforetoggle`,e),H(`toggle`,e),H(`cancel`,e),H(`close`,e);break;case`iframe`:case`object`:H(`load`,e);break;case`video`:case`audio`:for(r=0;r<Dd.length;r++)H(Dd[r],e);break;case`image`:H(`error`,e),H(`load`,e);break;case`details`:H(`toggle`,e);break;case`embed`:case`source`:case`link`:H(`error`,e),H(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Ud(e,t,u,r,n,null)}return;default:if(Xt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Wd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Ud(e,t,c,r,n,null))}function Kd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Ud(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Ud(e,t,p,m,r,f)}}Bt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Ud(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Ud(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ut(e,!!n,n?[]:``,!1):Ut(e,!!n,t,!0)):Ut(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Ud(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Ud(e,t,s,a,r,o)}Wt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Ud(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Ud(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Ud(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Ud(e,t,u,p,r,m)}return;default:if(Xt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Wd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Wd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Ud(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Ud(e,t,f,p,r,m)}function qd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Jd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&qd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&qd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Yd=null,Xd=null;function Zd(e){return e.nodeType===9?e:e.ownerDocument}function Qd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function $d(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function ef(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var tf=null;function nf(){var e=window.event;return e&&e.type===`popstate`?e===tf?!1:(tf=e,!0):(tf=null,!1)}var rf=typeof setTimeout==`function`?setTimeout:void 0,af=typeof clearTimeout==`function`?clearTimeout:void 0,of=typeof Promise==`function`?Promise:void 0,sf=typeof queueMicrotask==`function`?queueMicrotask:of===void 0?rf:function(e){return of.resolve(null).then(e).catch(cf)};function cf(e){setTimeout(function(){throw e})}function lf(e){return e===`head`}function uf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Wp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)wf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,wf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[mt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&wf(e.ownerDocument.body);n=i}while(n);Wp(t)}function df(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ff(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ff(n),ht(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function pf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[mt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=yf(e.nextSibling),e===null)break}return null}function mf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=yf(e.nextSibling),e===null))return null;return e}function hf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=yf(e.nextSibling),e===null))return null;return e}function gf(e){return e.data===`$?`||e.data===`$~`}function _f(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function vf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function yf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var bf=null;function xf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return yf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Sf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function Cf(e,t,n){switch(t=Zd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function wf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ht(e)}var Tf=new Map,Ef=new Set;function Df(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Of=F.d;F.d={f:kf,r:Af,D:Nf,C:Pf,L:Ff,m:If,X:Rf,S:Lf,M:zf};function kf(){var e=Of.f(),t=ku();return e||t}function Af(e){var t=_t(e);t!==null&&t.tag===5&&t.type===`form`?As(t):Of.r(e)}var jf=typeof document>`u`?null:document;function Mf(e,t,n){var r=jf;if(r&&typeof t==`string`&&t){var i=zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Ef.has(i)||(Ef.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Gd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Nf(e){Of.D(e),Mf(`dns-prefetch`,e,null)}function Pf(e,t){Of.C(e,t),Mf(`preconnect`,e,t)}function Ff(e,t,n){Of.L(e,t,n);var r=jf;if(r&&e&&t){var i=`link[rel="preload"][as="`+zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+zt(n.imageSizes)+`"]`)):i+=`[href="`+zt(e)+`"]`;var a=i;switch(t){case`style`:a=Vf(e);break;case`script`:a=Gf(e)}Tf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Tf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Hf(a))||t===`script`&&r.querySelector(Kf(a))||(t=r.createElement(`link`),Gd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function If(e,t){Of.m(e,t);var n=jf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+zt(r)+`"][href="`+zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Gf(e)}if(!Tf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Tf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Kf(a)))return}r=n.createElement(`link`),Gd(r,`link`,e),bt(r),n.head.appendChild(r)}}}function Lf(e,t,n){Of.S(e,t,n);var r=jf;if(r&&e){var i=yt(r).hoistableStyles,a=Vf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Hf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Tf.get(a))&&Yf(e,n);var c=o=r.createElement(`link`);bt(c),Gd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Jf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Rf(e,t){Of.X(e,t);var n=jf;if(n&&e){var r=yt(n).hoistableScripts,i=Gf(e),a=r.get(i);a||(a=n.querySelector(Kf(i)),a||(e=f({src:e,async:!0},t),(t=Tf.get(i))&&Xf(e,t),a=n.createElement(`script`),bt(a),Gd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t){Of.M(e,t);var n=jf;if(n&&e){var r=yt(n).hoistableScripts,i=Gf(e),a=r.get(i);a||(a=n.querySelector(Kf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Tf.get(i))&&Xf(e,t),a=n.createElement(`script`),bt(a),Gd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Bf(e,t,n,r){var a=(a=le.current)?Df(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Vf(n.href),n=yt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Vf(n.href);var o=yt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Hf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Tf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Tf.set(e,n),o||Wf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Gf(n),n=yt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Vf(e){return`href="`+zt(e)+`"`}function Hf(e){return`link[rel="stylesheet"][`+e+`]`}function Uf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Wf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Gd(t,`link`,n),bt(t),e.head.appendChild(t))}function Gf(e){return`[src="`+zt(e)+`"]`}function Kf(e){return`script[async]`+e}function qf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+zt(n.href)+`"]`);if(r)return t.instance=r,bt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),bt(r),Gd(r,`style`,a),Jf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Vf(n.href);var o=e.querySelector(Hf(a));if(o)return t.state.loading|=4,t.instance=o,bt(o),o;r=Uf(n),(a=Tf.get(a))&&Yf(r,a),o=(e.ownerDocument||e).createElement(`link`),bt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Gd(o,`link`,r),t.state.loading|=4,Jf(o,n.precedence,e),t.instance=o;case`script`:return o=Gf(n.src),(a=e.querySelector(Kf(o)))?(t.instance=a,bt(a),a):(r=n,(a=Tf.get(o))&&(r=f({},n),Xf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),bt(a),Gd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Jf(r,n.precedence,e));return t.instance}function Jf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Yf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Xf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Zf=null;function Qf(e,t,n){if(Zf===null){var r=new Map,i=Zf=new Map;i.set(n,r)}else i=Zf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[mt]||a[st]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function $f(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function ep(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function tp(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function np(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Vf(r.href),a=t.querySelector(Hf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ap.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,bt(a);return}a=t.ownerDocument||t,r=Uf(r),(i=Tf.get(i))&&Yf(r,i),a=a.createElement(`link`),bt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Gd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ap.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var rp=0;function ip(e,t){return e.stylesheets&&e.count===0&&sp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&sp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&rp===0&&(rp=62500*Jd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>rp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ap(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var op=null;function sp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,op=new Map,t.forEach(cp,e),op=null,ap.call(e))}function cp(e,t){if(!(t.state.loading&4)){var n=op.get(e);if(n)var r=n.get(null);else{n=new Map,op.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ap.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var lp={$$typeof:C,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function up(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,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=Xe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xe(0),this.hiddenUpdates=Xe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function dp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new up(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ci(3,null,null,t),e.current=a,a.stateNode=e,t=la(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ha(a),e}function fp(e){return e?(e=oi,e):oi}function pp(e,t,n,r,i,a){i=fp(i),r.context===null?r.context=i:r.pendingContext=i,r=Wa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ga(e,r,t),n!==null&&(wu(n,e,t),Ka(n,e,t))}function mp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hp(e,t){mp(e,t),(e=e.alternate)&&mp(e,t)}function gp(e){if(e.tag===13||e.tag===31){var t=ri(e,67108864);t!==null&&wu(t,e,67108864),hp(e,67108864)}}function _p(e){if(e.tag===13||e.tag===31){var t=Su();t=nt(t);var n=ri(e,t);n!==null&&wu(n,e,t),hp(e,t)}}var vp=!0;function yp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,xp(e,t,n,r)}finally{F.p=a,P.T=i}}function bp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,xp(e,t,n,r)}finally{F.p=a,P.T=i}}function xp(e,t,n,r){if(vp){var i=Sp(r);if(i===null)Pd(e,t,r,Cp,n),Pp(e,r);else if(Ip(i,e,t,n,r))r.stopPropagation();else if(Pp(e,r),t&4&&-1<Np.indexOf(e)){for(;i!==null;){var a=_t(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ge(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-L(o);s.entanglements[1]|=c,o&=~c}pd(a),!(Gl&6)&&(uu=De()+500,md(0,!1))}}break;case 31:case 13:s=ri(a,2),s!==null&&wu(s,a,2),ku(),hp(a,2)}if(a=Sp(r),a===null&&Pd(e,t,r,Cp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Pd(e,t,r,null,n)}}function Sp(e){return e=nn(e),wp(e)}var Cp=null;function wp(e){if(Cp=null,e=gt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Cp=e,null}function Tp(e){switch(e){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(Oe()){case ke:return 2;case Ae:return 8;case je:case Me:return 32;case Ne:return 268435456;default:return 32}default:return 32}}var Ep=!1,Dp=null,Op=null,kp=null,Ap=new Map,jp=new Map,Mp=[],Np=`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 Pp(e,t){switch(e){case`focusin`:case`focusout`:Dp=null;break;case`dragenter`:case`dragleave`:Op=null;break;case`mouseover`:case`mouseout`:kp=null;break;case`pointerover`:case`pointerout`:Ap.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:jp.delete(t.pointerId)}}function Fp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=_t(t),t!==null&&gp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ip(e,t,n,r,i){switch(t){case`focusin`:return Dp=Fp(Dp,e,t,n,r,i),!0;case`dragenter`:return Op=Fp(Op,e,t,n,r,i),!0;case`mouseover`:return kp=Fp(kp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ap.set(a,Fp(Ap.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,jp.set(a,Fp(jp.get(a)||null,e,t,n,r,i)),!0}return!1}function Lp(e){var t=gt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,at(e.priority,function(){_p(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,at(e.priority,function(){_p(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);tn=r,n.target.dispatchEvent(r),tn=null}else return t=_t(n),t!==null&&gp(t),e.blockedOn=n,!1;t.shift()}return!0}function zp(e,t,n){Rp(e)&&n.delete(t)}function Bp(){Ep=!1,Dp!==null&&Rp(Dp)&&(Dp=null),Op!==null&&Rp(Op)&&(Op=null),kp!==null&&Rp(kp)&&(kp=null),Ap.forEach(zp),jp.forEach(zp)}function Vp(e,n){e.blockedOn===n&&(e.blockedOn=null,Ep||(Ep=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bp)))}var Hp=null;function Up(e){Hp!==e&&(Hp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Hp===e&&(Hp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(wp(r||n)===null)continue;break}var a=_t(n);a!==null&&(e.splice(t,3),t-=3,Os(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Wp(e){function t(t){return Vp(t,e)}Dp!==null&&Vp(Dp,e),Op!==null&&Vp(Op,e),kp!==null&&Vp(kp,e),Ap.forEach(t),jp.forEach(t);for(var n=0;n<Mp.length;n++){var r=Mp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Mp.length&&(n=Mp[0],n.blockedOn===null);)Lp(n),n.blockedOn===null&&Mp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ct]||null;if(typeof a==`function`)o||Up(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ct]||null)s=o.formAction;else if(wp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Up(n)}}}function Gp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Kp(e){this._internalRoot=e}qp.prototype.render=Kp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;pp(n,Su(),e,t,null,null)},qp.prototype.unmount=Kp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;pp(e.current,2,null,e,null,null),ku(),t[lt]=null}};function qp(e){this._internalRoot=e}qp.prototype.unstable_scheduleHydration=function(e){if(e){var t=it();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mp.length&&t!==0&&t<Mp[n].priority;n++);Mp.splice(n,0,e),n===0&&Lp(e)}};var Jp=n.version;if(Jp!==`19.2.6`)throw Error(i(527,Jp,`19.2.6`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Yp={bundleType:0,version:`19.2.6`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.6`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xp.isDisabled&&Xp.supportsFiber)try{Ie=Xp.inject(Yp),Le=Xp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Zs,s=Qs,c=$s;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=dp(e,1,!1,null,null,n,r,null,o,s,c,Gp),e[lt]=t.current,Md(e),new Kp(t)}})),y=s(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=v()})),b=u(p(),1),x=y(),S=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),C=s(((e,t)=>{t.exports=S()}))(),w=`(prefers-color-scheme: dark)`,T=[`dark`,`light`,`system`],E=b.createContext(void 0);function D(e){return e===null?!1:T.includes(e)}function O(){return window.matchMedia(w).matches?`dark`:`light`}function k(){let e=document.createElement(`style`);return e.appendChild(document.createTextNode(`*,*::before,*::after{-webkit-transition:none!important;transition:none!important}`)),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.remove()})})}}function A(e){return e instanceof HTMLElement?!!(e.isContentEditable||e.closest(`input, textarea, select, [contenteditable='true']`)):!1}function j({children:e,defaultTheme:t=`system`,storageKey:n=`theme`,disableTransitionOnChange:r=!0,...i}){let[a,o]=b.useState(()=>{let e=localStorage.getItem(n);return D(e)?e:t}),s=b.useCallback(e=>{localStorage.setItem(n,e),o(e)},[n]),c=b.useCallback(e=>{let t=document.documentElement,n=e===`system`?O():e,i=r?k():null;t.classList.remove(`light`,`dark`),t.classList.add(n),i&&i()},[r]);b.useEffect(()=>{if(c(a),a!==`system`)return;let e=window.matchMedia(w),t=()=>{c(`system`)};return e.addEventListener(`change`,t),()=>{e.removeEventListener(`change`,t)}},[a,c]),b.useEffect(()=>{let e=e=>{e.repeat||e.metaKey||e.ctrlKey||e.altKey||A(e.target)||e.key.toLowerCase()===`d`&&o(e=>{let t=e===`dark`?`light`:e===`light`?`dark`:O()===`dark`?`light`:`dark`;return localStorage.setItem(n,t),t})};return window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`keydown`,e)}},[n]),b.useEffect(()=>{let e=e=>{if(e.storageArea===localStorage&&e.key===n){if(D(e.newValue)){o(e.newValue);return}o(t)}};return window.addEventListener(`storage`,e),()=>{window.removeEventListener(`storage`,e)}},[t,n]);let l=b.useMemo(()=>({theme:a,setTheme:s}),[a,s]);return(0,C.jsx)(E.Provider,{...i,value:l,children:e})}var M=(e,t,n,r,i,a,o,s)=>{let c=document.documentElement,l=[`light`,`dark`];function u(t){(Array.isArray(e)?e:[e]).forEach(e=>{let n=e===`class`,r=n&&a?i.map(e=>a[e]||e):i;n?(c.classList.remove(...r),c.classList.add(a&&a[t]?a[t]:t)):c.setAttribute(e,t)}),d(t)}function d(e){s&&l.includes(e)&&(c.style.colorScheme=e)}function f(){return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}if(r)u(r);else try{let e=localStorage.getItem(t)||n;u(o&&e===`system`?f():e)}catch{}},N=b.createContext(void 0),ee={setTheme:e=>{},themes:[]},te=()=>b.useContext(N)??ee;b.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:a,value:o,themes:s,nonce:c,scriptProps:l})=>{let u=JSON.stringify([n,t,a,e,s,o,r,i]).slice(1,-1);return b.createElement(`script`,{...l,suppressHydrationWarning:!0,nonce:typeof window>`u`?c:``,dangerouslySetInnerHTML:{__html:`(${M.toString()})(${u})`}})});var P=u(_(),1);function F(e){if(!e||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))}var ne=e=>{switch(e){case`success`:return ae;case`info`:return oe;case`warning`:return I;case`error`:return se;default:return null}},re=Array(12).fill(0),ie=({visible:e,className:t})=>b.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},b.createElement(`div`,{className:`sonner-spinner`},re.map((e,t)=>b.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),ae=b.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},b.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`})),I=b.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},b.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`})),oe=b.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},b.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`})),se=b.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},b.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`})),ce=b.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`},b.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),b.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),le=()=>{let[e,t]=b.useState(document.hidden);return b.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},ue=1,de=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:ue++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],b.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(pe(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!b.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!b.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!b.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!b.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||ue++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},fe=(e,t)=>{let n=t?.id||ue++;return de.addToast({title:e,...t,id:n}),n},pe=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,me=Object.assign(fe,{success:de.success,info:de.info,warning:de.warning,error:de.error,custom:de.custom,message:de.message,promise:de.promise,dismiss:de.dismiss,loading:de.loading},{getHistory:()=>de.toasts,getToasts:()=>de.getActiveToasts()});F(`[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 he(e){return e.label!==void 0}var ge=3,_e=`24px`,ve=`16px`,ye=4e3,be=356,xe=14,Se=45,Ce=200;function we(...e){return e.filter(Boolean).join(` `)}function Te(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var Ee=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:x,gap:S,expandByDefault:C,classNames:w,icons:T,closeButtonAriaLabel:E=`Close toast`}=e,[D,O]=b.useState(null),[k,A]=b.useState(null),[j,M]=b.useState(!1),[N,ee]=b.useState(!1),[te,P]=b.useState(!1),[F,re]=b.useState(!1),[ae,I]=b.useState(!1),[oe,se]=b.useState(0),[ue,de]=b.useState(0),fe=b.useRef(n.duration||y||ye),pe=b.useRef(null),me=b.useRef(null),ge=c===0,_e=c+1<=o,ve=n.type,be=n.dismissible!==!1,xe=n.className||``,Ee=n.descriptionClassName||``,De=b.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),Oe=b.useMemo(()=>n.closeButton??p,[n.closeButton,p]),ke=b.useMemo(()=>n.duration||y||ye,[n.duration,y]),Ae=b.useRef(0),je=b.useRef(0),Me=b.useRef(0),Ne=b.useRef(null),[Pe,Fe]=x.split(`-`),Ie=b.useMemo(()=>s.reduce((e,t,n)=>n>=De?e:e+t.height,0),[s,De]),Le=le(),Re=n.invert||t,L=ve===`loading`;je.current=b.useMemo(()=>De*S+Ie,[De,Ie]),b.useEffect(()=>{fe.current=ke},[ke]),b.useEffect(()=>{M(!0)},[]),b.useEffect(()=>{let e=me.current;if(e){let t=e.getBoundingClientRect().height;return de(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),b.useLayoutEffect(()=>{if(!j)return;let e=me.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,de(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[j,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let ze=b.useCallback(()=>{ee(!0),se(je.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},Ce)},[n,d,a,je]);b.useEffect(()=>{if(n.promise&&ve===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Le?(()=>{if(Me.current<Ae.current){let e=new Date().getTime()-Ae.current;fe.current-=e}Me.current=new Date().getTime()})():fe.current!==1/0&&(Ae.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),ze()},fe.current)),()=>clearTimeout(e)},[u,i,n,ve,Le,ze]),b.useEffect(()=>{n.delete&&(ze(),n.onDismiss==null||n.onDismiss.call(n,n))},[ze,n.delete]);function Be(){return T?.loading?b.createElement(`div`,{className:we(w?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":ve===`loading`},T.loading):b.createElement(ie,{className:we(w?.loader,n?.classNames?.loader),visible:ve===`loading`})}let Ve=n.icon||T?.[ve]||ne(ve);return b.createElement(`li`,{tabIndex:0,ref:me,className:we(_,xe,w?.toast,n?.classNames?.toast,w?.default,w?.[ve],n?.classNames?.[ve]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":j,"data-promise":!!n.promise,"data-swiped":ae,"data-removed":N,"data-visible":_e,"data-y-position":Pe,"data-x-position":Fe,"data-index":c,"data-front":ge,"data-swiping":te,"data-dismissible":be,"data-type":ve,"data-invert":Re,"data-swipe-out":F,"data-swipe-direction":k,"data-expanded":!!(u||C&&j),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${N?oe:je.current}px`,"--initial-height":C?`auto`:`${ue}px`,...m,...n.style},onDragEnd:()=>{P(!1),O(null),Ne.current=null},onPointerDown:e=>{e.button!==2&&(L||!be||(pe.current=new Date,se(je.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(P(!0),Ne.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(F||!be)return;Ne.current=null;let e=Number(me.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(me.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-pe.current?.getTime(),i=D===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=Se||a>.11){se(je.current),n.onDismiss==null||n.onDismiss.call(n,n),A(D===`x`?e>0?`right`:`left`:t>0?`down`:`up`),ze(),re(!0);return}else{var o,s;(o=me.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=me.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}I(!1),P(!1),O(null)},onPointerMove:t=>{var n,r;if(!Ne.current||!be||window.getSelection()?.toString().length>0)return;let i=t.clientY-Ne.current.y,a=t.clientX-Ne.current.x,o=e.swipeDirections??Te(x);!D&&(Math.abs(a)>1||Math.abs(i)>1)&&O(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(D===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(D===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&I(!0),(n=me.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=me.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},Oe&&!n.jsx&&ve!==`loading`?b.createElement(`button`,{"aria-label":E,"data-disabled":L,"data-close-button":!0,onClick:L||!be?()=>{}:()=>{ze(),n.onDismiss==null||n.onDismiss.call(n,n)},className:we(w?.closeButton,n?.classNames?.closeButton)},T?.close??ce):null,(ve||n.icon||n.promise)&&n.icon!==null&&(T?.[ve]!==null||n.icon)?b.createElement(`div`,{"data-icon":``,className:we(w?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||Be():null,n.type===`loading`?null:Ve):null,b.createElement(`div`,{"data-content":``,className:we(w?.content,n?.classNames?.content)},b.createElement(`div`,{"data-title":``,className:we(w?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?b.createElement(`div`,{"data-description":``,className:we(v,Ee,w?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),b.isValidElement(n.cancel)?n.cancel:n.cancel&&he(n.cancel)?b.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{he(n.cancel)&&be&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),ze())},className:we(w?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,b.isValidElement(n.action)?n.action:n.action&&he(n.action)?b.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{he(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&ze())},className:we(w?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function De(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function Oe(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?ve:_e;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var ke=b.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=ge,toastOptions:g,dir:_=De(),gap:v=xe,icons:y,containerAriaLabel:x=`Notifications`}=e,[S,C]=b.useState([]),w=b.useMemo(()=>n?S.filter(e=>e.toasterId===n):S.filter(e=>!e.toasterId),[S,n]),T=b.useMemo(()=>Array.from(new Set([i].concat(w.filter(e=>e.position).map(e=>e.position)))),[w,i]),[E,D]=b.useState([]),[O,k]=b.useState(!1),[A,j]=b.useState(!1),[M,N]=b.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),ee=b.useRef(null),te=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),F=b.useRef(null),ne=b.useRef(!1),re=b.useCallback(e=>{C(t=>(t.find(t=>t.id===e.id)?.delete||de.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return b.useEffect(()=>de.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{C(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{P.flushSync(()=>{C(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[S]),b.useEffect(()=>{if(d!==`system`){N(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?N(`dark`):N(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{N(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{N(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),b.useEffect(()=>{S.length<=1&&k(!1)},[S]),b.useEffect(()=>{let e=e=>{if(a.every(t=>e[t]||e.code===t)){var t;k(!0),(t=ee.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===ee.current||ee.current?.contains(document.activeElement))&&k(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),b.useEffect(()=>{if(ee.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,ne.current=!1)}},[ee.current]),b.createElement(`section`,{ref:t,"aria-label":`${x} ${te}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},T.map((t,n)=>{let[i,a]=t.split(`-`);return w.length?b.createElement(`ol`,{key:t,dir:_===`auto`?De():_,tabIndex:-1,ref:ee,className:c,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${E[0]?.height||0}px`,"--width":`${be}px`,"--gap":`${v}px`,...m,...Oe(l,u)},onBlur:e=>{ne.current&&!e.currentTarget.contains(e.relatedTarget)&&(ne.current=!1,F.current&&=(F.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||ne.current||(ne.current=!0,F.current=e.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{A||k(!1)},onDragEnd:()=>k(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||j(!0)},onPointerUp:()=>j(!1)},w.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>b.createElement(Ee,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:A,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:re,toasts:w.filter(e=>e.position==n.position),heights:E.filter(e=>e.position==n.position),setHeights:D,expandByDefault:o,gap:v,expanded:O,swipeDirections:e.swipeDirections}))):null}))}),Ae=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),je=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Me=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Ne=e=>{let t=Me(e);return t.charAt(0).toUpperCase()+t.slice(1)},Pe={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`},Fe=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Ie=(0,b.createContext)({}),Le=()=>(0,b.useContext)(Ie),Re=(0,b.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Le()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,b.createElement)(`svg`,{ref:c,...Pe,width:t??l??Pe.width,height:t??l??Pe.height,stroke:e??f,strokeWidth:m,className:Ae(`lucide`,p,i),...!a&&!Fe(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,b.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),L=(e,t)=>{let n=(0,b.forwardRef)(({className:n,...r},i)=>(0,b.createElement)(Re,{ref:i,iconNode:t,className:Ae(`lucide-${je(Ne(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Ne(e),n},ze=L(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),Be=L(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),Ve=L(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),He=L(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Ue=L(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),We=L(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),Ge=L(`brain-circuit`,[[`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:`M9 13a4.5 4.5 0 0 0 3-4`,key:`10igwf`}],[`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:`M6 18a4 4 0 0 1-1.967-.516`,key:`2e4loj`}],[`path`,{d:`M12 13h4`,key:`1ku699`}],[`path`,{d:`M12 18h6a2 2 0 0 1 2 2v1`,key:`105ag5`}],[`path`,{d:`M12 8h8`,key:`1lhi5i`}],[`path`,{d:`M16 8V5a2 2 0 0 1 2-2`,key:`u6izg6`}],[`circle`,{cx:`16`,cy:`13`,r:`.5`,key:`ry7gng`}],[`circle`,{cx:`18`,cy:`3`,r:`.5`,key:`1aiba7`}],[`circle`,{cx:`20`,cy:`21`,r:`.5`,key:`yhc1fs`}],[`circle`,{cx:`20`,cy:`8`,r:`.5`,key:`1e43v0`}]]),Ke=L(`brain-cog`,[[`path`,{d:`m10.852 14.772-.383.923`,key:`11vil6`}],[`path`,{d:`m10.852 9.228-.383-.923`,key:`1fjppe`}],[`path`,{d:`m13.148 14.772.382.924`,key:`je3va1`}],[`path`,{d:`m13.531 8.305-.383.923`,key:`18epck`}],[`path`,{d:`m14.772 10.852.923-.383`,key:`k9m8cz`}],[`path`,{d:`m14.772 13.148.923.383`,key:`1xvhww`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 0 0-5.63-1.446 3 3 0 0 0-.368 1.571 4 4 0 0 0-2.525 5.771`,key:`jcbbz1`}],[`path`,{d:`M17.998 5.125a4 4 0 0 1 2.525 5.771`,key:`1kkn7e`}],[`path`,{d:`M19.505 10.294a4 4 0 0 1-1.5 7.706`,key:`18bmuc`}],[`path`,{d:`M4.032 17.483A4 4 0 0 0 11.464 20c.18-.311.892-.311 1.072 0a4 4 0 0 0 7.432-2.516`,key:`uozx0d`}],[`path`,{d:`M4.5 10.291A4 4 0 0 0 6 18`,key:`whdemb`}],[`path`,{d:`M6.002 5.125a3 3 0 0 0 .4 1.375`,key:`1kqy2g`}],[`path`,{d:`m9.228 10.852-.923-.383`,key:`1wtb30`}],[`path`,{d:`m9.228 13.148-.923.383`,key:`1a830x`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),qe=L(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),Je=L(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Ye=L(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Xe=L(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Ze=L(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Qe=L(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),$e=L(`circle-arrow-down`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 8v8`,key:`napkw2`}],[`path`,{d:`m8 12 4 4 4-4`,key:`k98ssh`}]]),et=L(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),tt=L(`circle-stop`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]]),nt=L(`command`,[[`path`,{d:`M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3`,key:`11bfej`}]]),rt=L(`credit-card`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`,key:`ynyp8z`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`,key:`1b3vmo`}]]),it=L(`database`,[[`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`}]]),at=L(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),ot=L(`eye-off`,[[`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`}]]),st=L(`eye`,[[`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`}]]),ct=L(`fingerprint-pattern`,[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`,key:`1nerag`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`,key:`o46ks0`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`,key:`ptglia`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`,key:`ydlgp0`}],[`path`,{d:`M2 16h.01`,key:`1gqxmh`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`,key:`drycrb`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`,key:`1tidbn`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`,key:`13wd9y`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`,key:`1fr1j5`}]]),lt=L(`folder-input`,[[`path`,{d:`M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]]),ut=L(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),dt=L(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),ft=L(`graduation-cap`,[[`path`,{d:`M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z`,key:`j76jl0`}],[`path`,{d:`M22 10v6`,key:`1lu8f3`}],[`path`,{d:`M6 12.5V16a6 3 0 0 0 12 0v-3.5`,key:`1r8lef`}]]),pt=L(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),mt=L(`id-card`,[[`path`,{d:`M16 10h2`,key:`8sgtl7`}],[`path`,{d:`M16 14h2`,key:`epxaof`}],[`path`,{d:`M6.17 15a3 3 0 0 1 5.66 0`,key:`n6f512`}],[`circle`,{cx:`9`,cy:`11`,r:`2`,key:`yxgjnd`}],[`rect`,{x:`2`,y:`5`,width:`20`,height:`14`,rx:`2`,key:`qneu4z`}]]),ht=L(`image-up`,[[`path`,{d:`M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21`,key:`9csbqa`}],[`path`,{d:`m14 19.5 3-3 3 3`,key:`9vmjn0`}],[`path`,{d:`M17 22v-5.5`,key:`1aa6fl`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),gt=L(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),_t=L(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),vt=L(`layout-dashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),yt=L(`life-buoy`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m4.93 4.93 4.24 4.24`,key:`1ymg45`}],[`path`,{d:`m14.83 9.17 4.24-4.24`,key:`1cb5xl`}],[`path`,{d:`m14.83 14.83 4.24 4.24`,key:`q42g0n`}],[`path`,{d:`m9.17 14.83-4.24 4.24`,key:`bqpfvv`}],[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}]]),bt=L(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),xt=L(`loader`,[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]),St=L(`lock-keyhole`,[[`circle`,{cx:`12`,cy:`16`,r:`1`,key:`1au0dj`}],[`rect`,{x:`3`,y:`10`,width:`18`,height:`12`,rx:`2`,key:`6s8ecr`}],[`path`,{d:`M7 10V7a5 5 0 0 1 10 0v3`,key:`1pqi11`}]]),Ct=L(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),wt=L(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),Tt=L(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),Et=L(`message-square-plus`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]),Dt=L(`mic`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]),Ot=L(`octagon-x`,[[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z`,key:`2d38gg`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),kt=L(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),At=L(`paperclip`,[[`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`}]]),jt=L(`party-popper`,[[`path`,{d:`M5.8 11.3 2 22l10.7-3.79`,key:`gwxi1d`}],[`path`,{d:`M4 3h.01`,key:`1vcuye`}],[`path`,{d:`M22 8h.01`,key:`1mrtc2`}],[`path`,{d:`M15 2h.01`,key:`1cjtqr`}],[`path`,{d:`M22 20h.01`,key:`1mrys2`}],[`path`,{d:`m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10`,key:`hbicv8`}],[`path`,{d:`m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17`,key:`1i94pl`}],[`path`,{d:`m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7`,key:`1cofks`}],[`path`,{d:`M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z`,key:`4kbmks`}]]),Mt=L(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),Nt=L(`plug-zap`,[[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m18 3-4 4h6l-4 4`,key:`16psg9`}]]),Pt=L(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Ft=L(`refresh-cw`,[[`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`}]]),It=L(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Lt=L(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),Rt=L(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),zt=L(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),Bt=L(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Vt=L(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),Ht=L(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Ut=L(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Wt=L(`unplug`,[[`path`,{d:`m19 5 3-3`,key:`yk6iyv`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z`,key:`1snsnr`}]]),Gt=L(`user-cog`,[[`path`,{d:`M10 15H6a4 4 0 0 0-4 4v2`,key:`1nfge6`}],[`path`,{d:`m14.305 16.53.923-.382`,key:`1itpsq`}],[`path`,{d:`m15.228 13.852-.923-.383`,key:`eplpkm`}],[`path`,{d:`m16.852 12.228-.383-.923`,key:`13v3q0`}],[`path`,{d:`m16.852 17.772-.383.924`,key:`1i8mnm`}],[`path`,{d:`m19.148 12.228.383-.923`,key:`1q8j1v`}],[`path`,{d:`m19.53 18.696-.382-.924`,key:`vk1qj3`}],[`path`,{d:`m20.772 13.852.924-.383`,key:`n880s0`}],[`path`,{d:`m20.772 16.148.924.383`,key:`1g6xey`}],[`circle`,{cx:`18`,cy:`15`,r:`3`,key:`gjjjvw`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),Kt=L(`user-round`,[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]]),qt=L(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Jt=({...e})=>{let{theme:t=`system`}=te();return(0,C.jsx)(ke,{theme:t,className:`toaster group`,icons:{success:(0,C.jsx)(et,{className:`size-4`}),info:(0,C.jsx)(gt,{className:`size-4`}),warning:(0,C.jsx)(Ut,{className:`size-4`}),error:(0,C.jsx)(Ot,{className:`size-4`}),loading:(0,C.jsx)(bt,{className:`size-4 animate-spin`})},style:{"--normal-bg":`var(--popover)`,"--normal-text":`var(--popover-foreground)`,"--normal-border":`var(--border)`,"--border-radius":`var(--radius)`},toastOptions:{classNames:{toast:`cn-toast`}},...e})};function Yt(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Xt(...e){return t=>{let n=!1,r=e.map(e=>{let r=Yt(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Yt(e[t],null)}}}}function Zt(...e){return b.useCallback(Xt(...e),e)}function Qt(e){let t=en(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e,a=b.Children.toArray(r),o=a.find(rn);if(o){let e=o.props.children,r=a.map(t=>t===o?b.Children.count(e)>1?b.Children.only(null):b.isValidElement(e)?e.props.children:null:t);return(0,C.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,C.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var $t=Qt(`Slot`);function en(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(b.isValidElement(n)){let e=on(n),i=an(r,n.props);return n.type!==b.Fragment&&(i.ref=t?Xt(t,e):e),b.cloneElement(n,i)}return b.Children.count(n)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tn=Symbol(`radix.slottable`);function nn(e){let t=({children:e})=>(0,C.jsx)(C.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=tn,t}function rn(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===tn}function an(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function on(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var sn=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Qt(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,C.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),cn=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`}),ln=`VisuallyHidden`,un=b.forwardRef((e,t)=>(0,C.jsx)(sn.span,{...e,ref:t,style:{...cn,...e.style}}));un.displayName=ln;var dn=un;function fn(e,t){let n=b.createContext(t),r=e=>{let{children:t,...r}=e,i=b.useMemo(()=>r,Object.values(r));return(0,C.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=b.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function pn(e,t=[]){let n=[];function r(t,r){let i=b.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=b.useMemo(()=>o,Object.values(o));return(0,C.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=b.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>b.createContext(e));return function(n){let r=n?.[e]||t;return b.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,mn(i,...t)]}function mn(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function hn(e){let t=e+`CollectionProvider`,[n,r]=pn(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=b.useRef(null),a=b.useRef(new Map).current;return(0,C.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Qt(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,C.jsx)(c,{ref:Zt(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Qt(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=Zt(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,C.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return b.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}typeof window<`u`&&window.document&&window.document.createElement;function R(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var gn=globalThis?.document?b.useLayoutEffect:()=>{},_n=b.useInsertionEffect||gn;function vn({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=yn({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=b.useRef(e!==void 0);b.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`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.`),t.current=s},[s,r])}return[c,b.useCallback(t=>{if(s){let n=bn(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function yn({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return _n(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function bn(e){return typeof e==`function`}var xn=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Qt(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,C.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Sn(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}var Cn=e=>{let{present:t,children:n}=e,r=wn(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=Zt(r.ref,En(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null};Cn.displayName=`Presence`;function wn(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),[o,s]=Sn(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{let e=Tn(r.current);a.current=o===`mounted`?e:`none`},[o]),gn(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Tn(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),gn(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Tn(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=Tn(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:b.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function Tn(e){return e?.animationName||`none`}function En(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Dn=b.useId||(()=>void 0),On=0;function kn(e){let[t,n]=b.useState(Dn());return gn(()=>{e||n(e=>e??String(On++))},[e]),e||(t?`radix-${t}`:``)}var An=`Collapsible`,[jn,Mn]=pn(An),[Nn,Pn]=jn(An),Fn=b.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=vn({prop:r,defaultProp:i??!1,onChange:o,caller:An});return(0,C.jsx)(Nn,{scope:n,disabled:a,contentId:kn(),open:c,onOpenToggle:b.useCallback(()=>l(e=>!e),[l]),children:(0,C.jsx)(xn.div,{"data-state":Vn(c),"data-disabled":a?``:void 0,...s,ref:t})})});Fn.displayName=An;var In=`CollapsibleTrigger`,Ln=b.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=Pn(In,n);return(0,C.jsx)(xn.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Vn(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:R(e.onClick,i.onOpenToggle)})});Ln.displayName=In;var Rn=`CollapsibleContent`,zn=b.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=Pn(Rn,e.__scopeCollapsible);return(0,C.jsx)(Cn,{present:n||i.open,children:({present:e})=>(0,C.jsx)(Bn,{...r,ref:t,present:e})})});zn.displayName=Rn;var Bn=b.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=Pn(Rn,n),[s,c]=b.useState(r),l=b.useRef(null),u=Zt(t,l),d=b.useRef(0),f=d.current,p=b.useRef(0),m=p.current,h=o.open||s,g=b.useRef(h),_=b.useRef(void 0);return b.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),gn(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,C.jsx)(xn.div,{"data-state":Vn(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function Vn(e){return e?`open`:`closed`}var Hn=Fn,Un=b.createContext(void 0);function Wn(e){let t=b.useContext(Un);return e||t||`ltr`}var Gn=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Qt(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,C.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Kn(e,t){e&&P.flushSync(()=>e.dispatchEvent(t))}function qn(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...e)=>t.current?.(...e),[])}function Jn(e,t=globalThis?.document){let n=qn(e);b.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var Yn=`DismissableLayer`,Xn=`dismissableLayer.update`,Zn=`dismissableLayer.pointerDownOutside`,Qn=`dismissableLayer.focusOutside`,$n,er=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),tr=b.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=b.useContext(er),[u,d]=b.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=b.useState({}),m=Zt(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,x=v>=_,S=ir(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!x||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),w=ar(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return Jn(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),b.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&($n=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),or(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=$n)}},[u,f,n,l]),b.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),or())},[u,l]),b.useEffect(()=>{let e=()=>p({});return document.addEventListener(Xn,e),()=>document.removeEventListener(Xn,e)},[]),(0,C.jsx)(Gn.div,{...c,ref:m,style:{pointerEvents:y?x?`auto`:`none`:void 0,...e.style},onFocusCapture:R(e.onFocusCapture,w.onFocusCapture),onBlurCapture:R(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:R(e.onPointerDownCapture,S.onPointerDownCapture)})});tr.displayName=Yn;var nr=`DismissableLayerBranch`,rr=b.forwardRef((e,t)=>{let n=b.useContext(er),r=b.useRef(null),i=Zt(t,r);return b.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,C.jsx)(Gn.div,{...e,ref:i})});rr.displayName=nr;function ir(e,t=globalThis?.document){let n=qn(e),r=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){sr(Zn,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ar(e,t=globalThis?.document){let n=qn(e),r=b.useRef(!1);return b.useEffect(()=>{let e=e=>{e.target&&!r.current&&sr(Qn,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function or(){let e=new CustomEvent(Xn);document.dispatchEvent(e)}function sr(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Kn(i,a):i.dispatchEvent(a)}var cr=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Qt(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,C.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),lr=`focusScope.autoFocusOnMount`,ur=`focusScope.autoFocusOnUnmount`,dr={bubbles:!1,cancelable:!0},fr=`FocusScope`,pr=b.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=b.useState(null),l=qn(i),u=qn(a),d=b.useRef(null),f=Zt(t,e=>c(e)),p=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:br(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||br(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&br(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),b.useEffect(()=>{if(s){xr.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(lr,dr);s.addEventListener(lr,l),s.dispatchEvent(t),t.defaultPrevented||(mr(wr(gr(s)),{select:!0}),document.activeElement===e&&br(s))}return()=>{s.removeEventListener(lr,l),setTimeout(()=>{let t=new CustomEvent(ur,dr);s.addEventListener(ur,u),s.dispatchEvent(t),t.defaultPrevented||br(e??document.body,{select:!0}),s.removeEventListener(ur,u),xr.remove(p)},0)}}},[s,l,u,p]);let m=b.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=hr(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&br(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&br(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,C.jsx)(cr.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});pr.displayName=fr;function mr(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(br(r,{select:t}),document.activeElement!==n)return}function hr(e){let t=gr(e);return[_r(t,e),_r(t.reverse(),e)]}function gr(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _r(e,t){for(let n of e)if(!vr(n,{upTo:t}))return n}function vr(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 yr(e){return e instanceof HTMLInputElement&&`select`in e}function br(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&yr(e)&&t&&e.select()}}var xr=Sr();function Sr(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Cr(e,t),e.unshift(t)},remove(t){e=Cr(e,t),e[0]?.resume()}}}function Cr(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function wr(e){return e.filter(e=>e.tagName!==`A`)}var Tr=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Qt(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,C.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Er=`Portal`,Dr=b.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=b.useState(!1);gn(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?P.createPortal((0,C.jsx)(Tr.div,{...r,ref:t}),o):null});Dr.displayName=Er;var Or=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Qt(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,C.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),kr=0;function Ar(){b.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??jr()),document.body.insertAdjacentElement(`beforeend`,e[1]??jr()),kr++,()=>{kr===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),kr--}},[])}function jr(){let 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 Mr=function(){return Mr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Mr.apply(this,arguments)};function Nr(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Pr(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Fr=`right-scroll-bar-position`,Ir=`width-before-scroll-bar`,Lr=`with-scroll-bars-hidden`,Rr=`--removed-body-scroll-bar-size`;function zr(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Br(e,t){var n=(0,b.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Vr=typeof window<`u`?b.useLayoutEffect:b.useEffect,Hr=new WeakMap;function Ur(e,t){var n=Br(t||null,function(t){return e.forEach(function(e){return zr(e,t)})});return Vr(function(){var t=Hr.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||zr(e,null)}),i.forEach(function(e){r.has(e)||zr(e,a)})}Hr.set(n,e)},[e]),n}function Wr(e){return e}function Gr(e,t){t===void 0&&(t=Wr);var n=[],r=!1;return{read:function(){if(r)throw 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(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Kr(e){e===void 0&&(e={});var t=Gr(null);return t.options=Mr({async:!0,ssr:!1},e),t}var qr=function(e){var t=e.sideCar,n=Nr(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return b.createElement(r,Mr({},n))};qr.isSideCarExport=!0;function Jr(e,t){return e.useMedium(t),qr}var Yr=Kr(),Xr=function(){},Zr=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:Xr,onWheelCapture:Xr,onTouchMoveCapture:Xr}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,x=Nr(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=Ur([n,t]),w=Mr(Mr({},x),i);return b.createElement(b.Fragment,null,u&&b.createElement(S,{sideCar:Yr,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?b.cloneElement(b.Children.only(s),Mr(Mr({},w),{ref:C})):b.createElement(v,Mr({},w,{className:c,ref:C}),s))});Zr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Zr.classNames={fullWidth:Ir,zeroRight:Fr};var Qr,$r=function(){if(Qr)return Qr;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function ei(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=$r();return t&&e.setAttribute(`nonce`,t),e}function ti(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ni(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ri=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ei())&&(ti(t,n),ni(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ii=function(){var e=ri();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ai=function(){var e=ii();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},oi={left:0,top:0,right:0,gap:0},si=function(e){return parseInt(e||``,10)||0},ci=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[si(n),si(r),si(i)]},li=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return oi;var t=ci(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])}},ui=ai(),di=`data-scroll-locked`,fi=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
10
+ .${Lr} {
11
+ overflow: hidden ${r};
12
+ padding-right: ${s}px ${r};
13
+ }
14
+ body[${di}] {
15
+ overflow: hidden ${r};
16
+ overscroll-behavior: contain;
17
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
18
+ padding-left: ${i}px;
19
+ padding-top: ${a}px;
20
+ padding-right: ${o}px;
21
+ margin-left:0;
22
+ margin-top:0;
23
+ margin-right: ${s}px ${r};
24
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
25
+ }
26
+
27
+ .${Fr} {
28
+ right: ${s}px ${r};
29
+ }
30
+
31
+ .${Ir} {
32
+ margin-right: ${s}px ${r};
33
+ }
34
+
35
+ .${Fr} .${Fr} {
36
+ right: 0 ${r};
37
+ }
38
+
39
+ .${Ir} .${Ir} {
40
+ margin-right: 0 ${r};
41
+ }
42
+
43
+ body[${di}] {
44
+ ${Rr}: ${s}px;
45
+ }
46
+ `},pi=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},mi=function(){b.useEffect(function(){return document.body.setAttribute(di,(pi()+1).toString()),function(){var e=pi()-1;e<=0?document.body.removeAttribute(di):document.body.setAttribute(di,e.toString())}},[])},hi=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;mi();var a=b.useMemo(function(){return li(i)},[i]);return b.createElement(ui,{styles:fi(a,!t,i,n?``:`!important`)})},gi=!1;if(typeof window<`u`)try{var _i=Object.defineProperty({},"passive",{get:function(){return gi=!0,!0}});window.addEventListener(`test`,_i,_i),window.removeEventListener(`test`,_i,_i)}catch{gi=!1}var vi=gi?{passive:!1}:!1,yi=function(e){return e.tagName===`TEXTAREA`},bi=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!yi(e)&&n[t]===`visible`)},xi=function(e){return bi(e,`overflowY`)},Si=function(e){return bi(e,`overflowX`)},Ci=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Ei(e,r)){var i=Di(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},wi=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Ti=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Ei=function(e,t){return e===`v`?xi(t):Si(t)},Di=function(e,t){return e===`v`?wi(t):Ti(t)},Oi=function(e,t){return e===`h`&&t===`rtl`?-1:1},ki=function(e,t,n,r,i){var a=Oi(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Di(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Ei(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Ai=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ji=function(e){return[e.deltaX,e.deltaY]},Mi=function(e){return e&&`current`in e?e.current:e},Ni=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Pi=function(e){return`
47
+ .block-interactivity-${e} {pointer-events: none;}
48
+ .allow-interactivity-${e} {pointer-events: all;}
49
+ `},Fi=0,Ii=[];function Li(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),i=b.useState(Fi++)[0],a=b.useState(ai)[0],o=b.useRef(e);b.useEffect(function(){o.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Pr([e.lockRef.current],(e.shards||[]).map(Mi),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=b.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Ai(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Ci(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Ci(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return ki(h,t,e,h===`h`?s:c,!0)},[]),c=b.useCallback(function(e){var n=e;if(!(!Ii.length||Ii[Ii.length-1]!==a)){var r=`deltaY`in n?ji(n):Ai(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Ni(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Mi).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=b.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ri(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=b.useCallback(function(e){n.current=Ai(e),r.current=void 0},[]),d=b.useCallback(function(t){l(t.type,ji(t),t.target,s(t,e.lockRef.current))},[]),f=b.useCallback(function(t){l(t.type,Ai(t),t.target,s(t,e.lockRef.current))},[]);b.useEffect(function(){return Ii.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,vi),document.addEventListener(`touchmove`,c,vi),document.addEventListener(`touchstart`,u,vi),function(){Ii=Ii.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,vi),document.removeEventListener(`touchmove`,c,vi),document.removeEventListener(`touchstart`,u,vi)}},[]);var p=e.removeScrollBar,m=e.inert;return b.createElement(b.Fragment,null,m?b.createElement(a,{styles:Pi(i)}):null,p?b.createElement(hi,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ri(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var zi=Jr(Yr,Li),Bi=b.forwardRef(function(e,t){return b.createElement(Zr,Mr({},e,{ref:t,sideCar:zi}))});Bi.classNames=Zr.classNames;var Vi=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Hi=new WeakMap,Ui=new WeakMap,Wi={},Gi=0,Ki=function(e){return e&&(e.host||Ki(e.parentNode))},qi=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Ki(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Ji=function(e,t,n,r){var i=qi(t,Array.isArray(e)?e:[e]);Wi[n]||(Wi[n]=new WeakMap);var a=Wi[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Hi.get(e)||0)+1,l=(a.get(e)||0)+1;Hi.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ui.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Gi++,function(){o.forEach(function(e){var t=Hi.get(e)-1,i=a.get(e)-1;Hi.set(e,t),a.set(e,i),t||(Ui.has(e)||e.removeAttribute(r),Ui.delete(e)),i||e.removeAttribute(n)}),Gi--,Gi||(Hi=new WeakMap,Hi=new WeakMap,Ui=new WeakMap,Wi={})}},Yi=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Vi(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Ji(r,i,n,`aria-hidden`)):function(){return null}},Xi=`Dialog`,[Zi,Qi]=pn(Xi),[$i,ea]=Zi(Xi),ta=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=b.useRef(null),c=b.useRef(null),[l,u]=vn({prop:r,defaultProp:i??!1,onChange:a,caller:Xi});return(0,C.jsx)($i,{scope:t,triggerRef:s,contentRef:c,contentId:kn(),titleId:kn(),descriptionId:kn(),open:l,onOpenChange:u,onOpenToggle:b.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};ta.displayName=Xi;var na=`DialogTrigger`,ra=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=ea(na,n),a=Zt(t,i.triggerRef);return(0,C.jsx)(Or.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Ca(i.open),...r,ref:a,onClick:R(e.onClick,i.onOpenToggle)})});ra.displayName=na;var ia=`DialogPortal`,[aa,oa]=Zi(ia,{forceMount:void 0}),sa=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=ea(ia,t);return(0,C.jsx)(aa,{scope:t,forceMount:n,children:b.Children.map(r,e=>(0,C.jsx)(Cn,{present:n||a.open,children:(0,C.jsx)(Dr,{asChild:!0,container:i,children:e})}))})};sa.displayName=ia;var ca=`DialogOverlay`,la=b.forwardRef((e,t)=>{let n=oa(ca,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=ea(ca,e.__scopeDialog);return a.modal?(0,C.jsx)(Cn,{present:r||a.open,children:(0,C.jsx)(da,{...i,ref:t})}):null});la.displayName=ca;var ua=Qt(`DialogOverlay.RemoveScroll`),da=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=ea(ca,n);return(0,C.jsx)(Bi,{as:ua,allowPinchZoom:!0,shards:[i.contentRef],children:(0,C.jsx)(Or.div,{"data-state":Ca(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),fa=`DialogContent`,pa=b.forwardRef((e,t)=>{let n=oa(fa,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=ea(fa,e.__scopeDialog);return(0,C.jsx)(Cn,{present:r||a.open,children:a.modal?(0,C.jsx)(ma,{...i,ref:t}):(0,C.jsx)(ha,{...i,ref:t})})});pa.displayName=fa;var ma=b.forwardRef((e,t)=>{let n=ea(fa,e.__scopeDialog),r=b.useRef(null),i=Zt(t,n.contentRef,r);return b.useEffect(()=>{let e=r.current;if(e)return Yi(e)},[]),(0,C.jsx)(ga,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:R(e.onFocusOutside,e=>e.preventDefault())})}),ha=b.forwardRef((e,t)=>{let n=ea(fa,e.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return(0,C.jsx)(ga,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),ga=b.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=ea(fa,n),c=b.useRef(null),l=Zt(t,c);return Ar(),(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(pr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,C.jsx)(tr,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Ca(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Da,{titleId:s.titleId}),(0,C.jsx)(ka,{contentRef:c,descriptionId:s.descriptionId})]})]})}),_a=`DialogTitle`,va=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=ea(_a,n);return(0,C.jsx)(Or.h2,{id:i.titleId,...r,ref:t})});va.displayName=_a;var ya=`DialogDescription`,ba=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=ea(ya,n);return(0,C.jsx)(Or.p,{id:i.descriptionId,...r,ref:t})});ba.displayName=ya;var xa=`DialogClose`,Sa=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=ea(xa,n);return(0,C.jsx)(Or.button,{type:`button`,...r,ref:t,onClick:R(e.onClick,()=>i.onOpenChange(!1))})});Sa.displayName=xa;function Ca(e){return e?`open`:`closed`}var wa=`DialogTitleWarning`,[Ta,Ea]=fn(wa,{contentName:fa,titleName:_a,docsSlug:`dialog`}),Da=({titleId:e})=>{let t=Ea(wa),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
50
+
51
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
52
+
53
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Oa=`DialogDescriptionWarning`,ka=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ea(Oa).contentName}}.`;return b.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Aa=ta,ja=sa,Ma=la,Na=pa,Pa=va,Fa=ba,Ia=Sa,La=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Qt(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,C.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Ra=s((e=>{var t=p();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),za=s(((e,t)=>{t.exports=Ra()}))();function Ba(){return(0,za.useSyncExternalStore)(Va,()=>!0,()=>!1)}function Va(){return()=>{}}var Ha=`Avatar`,[Ua,Wa]=pn(Ha),[Ga,Ka]=Ua(Ha),qa=b.forwardRef((e,t)=>{let{__scopeAvatar:n,...r}=e,[i,a]=b.useState(`idle`);return(0,C.jsx)(Ga,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:(0,C.jsx)(La.span,{...r,ref:t})})});qa.displayName=Ha;var Ja=`AvatarImage`,Ya=b.forwardRef((e,t)=>{let{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=Ka(Ja,n),s=$a(r,a),c=qn(e=>{i(e),o.onImageLoadingStatusChange(e)});return gn(()=>{s!==`idle`&&c(s)},[s,c]),s===`loaded`?(0,C.jsx)(La.img,{...a,ref:t,src:r}):null});Ya.displayName=Ja;var Xa=`AvatarFallback`,Za=b.forwardRef((e,t)=>{let{__scopeAvatar:n,delayMs:r,...i}=e,a=Ka(Xa,n),[o,s]=b.useState(r===void 0);return b.useEffect(()=>{if(r!==void 0){let e=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(e)}},[r]),o&&a.imageLoadingStatus!==`loaded`?(0,C.jsx)(La.span,{...i,ref:t}):null});Za.displayName=Xa;function Qa(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?`loaded`:`loading`):`error`:`idle`}function $a(e,{referrerPolicy:t,crossOrigin:n}){let r=Ba(),i=b.useRef(null),a=r?(i.current||=new window.Image,i.current):null,[o,s]=b.useState(()=>Qa(a,e));return gn(()=>{s(Qa(a,e))},[a,e]),gn(()=>{let e=e=>()=>{s(e)};if(!a)return;let r=e(`loaded`),i=e(`error`);return a.addEventListener(`load`,r),a.addEventListener(`error`,i),t&&(a.referrerPolicy=t),typeof n==`string`&&(a.crossOrigin=n),()=>{a.removeEventListener(`load`,r),a.removeEventListener(`error`,i)}},[a,n,t]),o}var eo=qa,to=Ya,no=Za;function ro(e){let t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function io(e){let[t,n]=b.useState(void 0);return gn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var ao=[`top`,`right`,`bottom`,`left`],oo=Math.min,so=Math.max,co=Math.round,lo=Math.floor,uo=e=>({x:e,y:e}),fo={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function po(e,t,n){return so(e,oo(t,n))}function mo(e,t){return typeof e==`function`?e(t):e}function z(e){return e.split(`-`)[0]}function ho(e){return e.split(`-`)[1]}function go(e){return e===`x`?`y`:`x`}function _o(e){return e===`y`?`height`:`width`}function vo(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function yo(e){return go(vo(e))}function bo(e,t,n){n===void 0&&(n=!1);let r=ho(e),i=yo(e),a=_o(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ko(o)),[o,ko(o)]}function xo(e){let t=ko(e);return[So(e),t,So(t)]}function So(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Co=[`left`,`right`],wo=[`right`,`left`],To=[`top`,`bottom`],Eo=[`bottom`,`top`];function Do(e,t,n){switch(e){case`top`:case`bottom`:return n?t?wo:Co:t?Co:wo;case`left`:case`right`:return t?To:Eo;default:return[]}}function Oo(e,t,n,r){let i=ho(e),a=Do(z(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(So)))),a}function ko(e){let t=z(e);return fo[t]+e.slice(t.length)}function Ao(e){return{top:0,right:0,bottom:0,left:0,...e}}function jo(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ao(e)}function Mo(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function No(e,t,n){let{reference:r,floating:i}=e,a=vo(t),o=yo(t),s=_o(o),c=z(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(ho(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Po(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=mo(t,e),p=jo(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Mo(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Mo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Fo=50,Io=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Po},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=No(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Fo&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=No(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Lo=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=mo(e,t)||{};if(l==null)return{};let d=jo(u),f={x:n,y:r},p=yo(i),m=_o(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=oo(d[_],T),D=oo(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=po(O,A,k),M=!c.arrow&&ho(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),Ro=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=mo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=z(r),_=vo(o),v=z(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ko(o)]:xo(o)),x=p!==`none`;!d&&x&&b.push(...Oo(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=bo(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==vo(t))||T.every(e=>vo(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=vo(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function zo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bo(e){return ao.some(t=>e[t]>=0)}var Vo=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=mo(e,t);switch(i){case`referenceHidden`:{let e=zo(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Bo(e)}}}case`escaped`:{let e=zo(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Bo(e)}}}default:return{}}}}},Ho=new Set([`left`,`top`]);async function Uo(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=z(n),s=ho(n),c=vo(n)===`y`,l=Ho.has(o)?-1:1,u=a&&c?-1:1,d=mo(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Wo=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Uo(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Go=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=mo(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=vo(z(i)),p=go(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=po(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=po(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Ko=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=mo(e,t),u={x:n,y:r},d=vo(i),f=go(d),p=u[f],m=u[d],h=mo(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Ho.has(z(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},qo=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=mo(e,t),u=await o.detectOverflow(t,l),d=z(i),f=ho(i),p=vo(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=oo(h-u[g],v),x=oo(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=so(u.left,0),t=so(u.right,0),n=so(u.top,0),r=so(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:so(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:so(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Jo(){return typeof window<`u`}function Yo(e){return Qo(e)?(e.nodeName||``).toLowerCase():`#document`}function Xo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zo(e){return((Qo(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Qo(e){return Jo()?e instanceof Node||e instanceof Xo(e).Node:!1}function $o(e){return Jo()?e instanceof Element||e instanceof Xo(e).Element:!1}function es(e){return Jo()?e instanceof HTMLElement||e instanceof Xo(e).HTMLElement:!1}function ts(e){return!Jo()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Xo(e).ShadowRoot}function ns(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ps(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function rs(e){return/^(table|td|th)$/.test(Yo(e))}function is(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var as=/transform|translate|scale|rotate|perspective|filter/,os=/paint|layout|strict|content/,ss=e=>!!e&&e!==`none`,cs;function ls(e){let t=$o(e)?ps(e):e;return ss(t.transform)||ss(t.translate)||ss(t.scale)||ss(t.rotate)||ss(t.perspective)||!ds()&&(ss(t.backdropFilter)||ss(t.filter))||as.test(t.willChange||``)||os.test(t.contain||``)}function us(e){let t=hs(e);for(;es(t)&&!fs(t);){if(ls(t))return t;if(is(t))return null;t=hs(t)}return null}function ds(){return cs??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),cs}function fs(e){return/^(html|body|#document)$/.test(Yo(e))}function ps(e){return Xo(e).getComputedStyle(e)}function ms(e){return $o(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hs(e){if(Yo(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ts(e)&&e.host||Zo(e);return ts(t)?t.host:t}function gs(e){let t=hs(e);return fs(t)?e.ownerDocument?e.ownerDocument.body:e.body:es(t)&&ns(t)?t:gs(t)}function _s(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=gs(e),i=r===e.ownerDocument?.body,a=Xo(r);if(i){let e=vs(a);return t.concat(a,a.visualViewport||[],ns(r)?r:[],e&&n?_s(e):[])}else return t.concat(r,_s(r,[],n))}function vs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ys(e){let t=ps(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=es(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=co(n)!==a||co(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function bs(e){return $o(e)?e:e.contextElement}function xs(e){let t=bs(e);if(!es(t))return uo(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ys(t),o=(a?co(n.width):n.width)/r,s=(a?co(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ss=uo(0);function Cs(e){let t=Xo(e);return!ds()||!t.visualViewport?Ss:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ws(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Xo(e)?!1:t}function Ts(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=bs(e),o=uo(1);t&&(r?$o(r)&&(o=xs(r)):o=xs(e));let s=ws(a,n,r)?Cs(a):uo(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Xo(a),t=r&&$o(r)?Xo(r):r,n=e,i=vs(n);for(;i&&r&&t!==n;){let e=xs(i),t=i.getBoundingClientRect(),r=ps(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Xo(i),i=vs(n)}}return Mo({width:u,height:d,x:c,y:l})}function Es(e,t){let n=ms(e).scrollLeft;return t?t.left+n:Ts(Zo(e)).left+n}function Ds(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Es(e,n),y:n.top+t.scrollTop}}function Os(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Zo(r),s=t?is(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=uo(1),u=uo(0),d=es(r);if((d||!d&&!a)&&((Yo(r)!==`body`||ns(o))&&(c=ms(r)),d)){let e=Ts(r);l=xs(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ds(o,c):uo(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ks(e){return Array.from(e.getClientRects())}function As(e){let t=Zo(e),n=ms(e),r=e.ownerDocument.body,i=so(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=so(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Es(e),s=-n.scrollTop;return ps(r).direction===`rtl`&&(o+=so(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var js=25;function Ms(e,t){let n=Xo(e),r=Zo(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=ds();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Es(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=js&&(a-=o)}else l<=js&&(a+=l);return{width:a,height:o,x:s,y:c}}function Ns(e,t){let n=Ts(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=es(e)?xs(e):uo(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ps(e,t,n){let r;if(t===`viewport`)r=Ms(e,n);else if(t===`document`)r=As(Zo(e));else if($o(t))r=Ns(t,n);else{let n=Cs(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Mo(r)}function Fs(e,t){let n=hs(e);return n===t||!$o(n)||fs(n)?!1:ps(n).position===`fixed`||Fs(n,t)}function Is(e,t){let n=t.get(e);if(n)return n;let r=_s(e,[],!1).filter(e=>$o(e)&&Yo(e)!==`body`),i=null,a=ps(e).position===`fixed`,o=a?hs(e):e;for(;$o(o)&&!fs(o);){let t=ps(o),n=ls(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||ns(o)&&!n&&Fs(e,o))?r=r.filter(e=>e!==o):i=t,o=hs(o)}return t.set(e,r),r}function Ls(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?is(t)?[]:Is(t,this._c):[].concat(n),r],o=Ps(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ps(t,a[e],i);s=so(n.top,s),c=oo(n.right,c),l=oo(n.bottom,l),u=so(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Rs(e){let{width:t,height:n}=ys(e);return{width:t,height:n}}function zs(e,t,n){let r=es(t),i=Zo(t),a=n===`fixed`,o=Ts(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=uo(0);function l(){c.x=Es(i)}if(r||!r&&!a)if((Yo(t)!==`body`||ns(i))&&(s=ms(t)),r){let e=Ts(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Ds(i,s):uo(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Bs(e){return ps(e).position===`static`}function Vs(e,t){if(!es(e)||ps(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Zo(e)===n&&(n=n.ownerDocument.body),n}function Hs(e,t){let n=Xo(e);if(is(e))return n;if(!es(e)){let t=hs(e);for(;t&&!fs(t);){if($o(t)&&!Bs(t))return t;t=hs(t)}return n}let r=Vs(e,t);for(;r&&rs(r)&&Bs(r);)r=Vs(r,t);return r&&fs(r)&&Bs(r)&&!ls(r)?n:r||us(e)||n}var Us=async function(e){let t=this.getOffsetParent||Hs,n=this.getDimensions,r=await n(e.floating);return{reference:zs(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ws(e){return ps(e).direction===`rtl`}var Gs={convertOffsetParentRelativeRectToViewportRelativeRect:Os,getDocumentElement:Zo,getClippingRect:Ls,getOffsetParent:Hs,getElementRects:Us,getClientRects:ks,getDimensions:Rs,getScale:xs,isElement:$o,isRTL:Ws};function Ks(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function qs(e,t){let n=null,r,i=Zo(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=lo(d),h=lo(i.clientWidth-(u+f)),g=lo(i.clientHeight-(d+p)),_=lo(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:so(0,oo(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Ks(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Js(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=bs(e),u=i||a?[...l?_s(l):[],...t?_s(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?qs(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Ts(e):null;c&&g();function g(){let t=Ts(e);h&&!Ks(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Ys=Wo,Xs=Go,Zs=Ro,Qs=qo,$s=Vo,ec=Lo,tc=Ko,nc=(e,t,n)=>{let r=new Map,i={platform:Gs,...n},a={...i.platform,_c:r};return Io(e,t,{...i,platform:a})},rc=typeof document<`u`?b.useLayoutEffect:function(){};function ic(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,i;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(!ic(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!ic(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function ac(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oc(e,t){let n=ac(e);return Math.round(t*n)/n}function sc(e){let t=b.useRef(e);return rc(()=>{t.current=e}),t}function cc(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=b.useState(r);ic(f,r)||p(r);let[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),y=b.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=b.useRef(null),w=b.useRef(null),T=b.useRef(u),E=c!=null,D=sc(c),O=sc(i),k=sc(l),A=b.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),nc(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!ic(T.current,t)&&(T.current=t,P.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);rc(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=b.useRef(!1);rc(()=>(j.current=!0,()=>{j.current=!1}),[]),rc(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=b.useMemo(()=>({reference:C,floating:w,setReference:v,setFloating:y}),[v,y]),N=b.useMemo(()=>({reference:x,floating:S}),[x,S]),ee=b.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=oc(N.floating,u.x),r=oc(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...ac(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:ee}),[u,A,M,N,ee])}var lc=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:ec({element:r.current,padding:i}).fn(n):r?ec({element:r,padding:i}).fn(n):{}}}},uc=(e,t)=>{let n=Ys(e);return{name:n.name,fn:n.fn,options:[e,t]}},dc=(e,t)=>{let n=Xs(e);return{name:n.name,fn:n.fn,options:[e,t]}},fc=(e,t)=>({fn:tc(e).fn,options:[e,t]}),pc=(e,t)=>{let n=Zs(e);return{name:n.name,fn:n.fn,options:[e,t]}},mc=(e,t)=>{let n=Qs(e);return{name:n.name,fn:n.fn,options:[e,t]}},hc=(e,t)=>{let n=$s(e);return{name:n.name,fn:n.fn,options:[e,t]}},gc=(e,t)=>{let n=lc(e);return{name:n.name,fn:n.fn,options:[e,t]}},_c=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Qt(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,C.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),vc=`Arrow`,yc=b.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,C.jsx)(_c.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,C.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});yc.displayName=vc;var bc=yc,xc=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Qt(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,C.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Sc=`Popper`,[Cc,wc]=pn(Sc),[Tc,Ec]=Cc(Sc),Dc=e=>{let{__scopePopper:t,children:n}=e,[r,i]=b.useState(null);return(0,C.jsx)(Tc,{scope:t,anchor:r,onAnchorChange:i,children:n})};Dc.displayName=Sc;var Oc=`PopperAnchor`,kc=b.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Ec(Oc,n),o=b.useRef(null),s=Zt(t,o),c=b.useRef(null);return b.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,C.jsx)(xc.div,{...i,ref:s})});kc.displayName=Oc;var Ac=`PopperContent`,[jc,Mc]=Cc(Ac),Nc=b.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=Ec(Ac,n),[_,v]=b.useState(null),y=Zt(t,e=>v(e)),[x,S]=b.useState(null),w=io(x),T=w?.width??0,E=w?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],A=k.length>0,j={padding:O,boundary:k.filter(Lc),altBoundary:A},{refs:M,floatingStyles:N,placement:ee,isPositioned:te,middlewareData:P}=cc({strategy:`fixed`,placement:D,whileElementsMounted:(...e)=>Js(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[uc({mainAxis:i+E,alignmentAxis:o}),c&&dc({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?fc():void 0,...j}),c&&pc({...j}),mc({...j,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),x&&gc({element:x,padding:s}),Rc({arrowWidth:T,arrowHeight:E}),f&&hc({strategy:`referenceHidden`,...j})]}),[F,ne]=zc(ee),re=qn(m);gn(()=>{te&&re?.()},[te,re]);let ie=P.arrow?.x,ae=P.arrow?.y,I=P.arrow?.centerOffset!==0,[oe,se]=b.useState();return gn(()=>{_&&se(window.getComputedStyle(_).zIndex)},[_]),(0,C.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:te?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:oe,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(` `),...P.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,C.jsx)(jc,{scope:n,placedSide:F,onArrowChange:S,arrowX:ie,arrowY:ae,shouldHideArrow:I,children:(0,C.jsx)(xc.div,{"data-side":F,"data-align":ne,...h,ref:y,style:{...h.style,animation:te?void 0:`none`}})})})});Nc.displayName=Ac;var Pc=`PopperArrow`,Fc={top:`bottom`,right:`left`,bottom:`top`,left:`right`},Ic=b.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Mc(Pc,n),a=Fc[i.placedSide];return(0,C.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,C.jsx)(bc,{...r,ref:t,style:{...r.style,display:`block`}})})});Ic.displayName=Pc;function Lc(e){return e!==null}var Rc=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=zc(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function zc(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Bc=Dc,Vc=kc,Hc=Nc,Uc=Ic,Wc=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Qt(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,C.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Gc(e,t){e&&P.flushSync(()=>e.dispatchEvent(t))}var Kc=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Qt(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,C.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),qc=`rovingFocusGroup.onEntryFocus`,Jc={bubbles:!1,cancelable:!0},Yc=`RovingFocusGroup`,[Xc,Zc,Qc]=hn(Yc),[$c,el]=pn(Yc,[Qc]),[tl,nl]=$c(Yc),rl=b.forwardRef((e,t)=>(0,C.jsx)(Xc.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,C.jsx)(Xc.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,C.jsx)(il,{...e,ref:t})})}));rl.displayName=Yc;var il=b.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=b.useRef(null),p=Zt(t,f),m=Wn(a),[h,g]=vn({prop:o,defaultProp:s??null,onChange:c,caller:Yc}),[_,v]=b.useState(!1),y=qn(l),x=Zc(n),S=b.useRef(!1),[w,T]=b.useState(0);return b.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(qc,y),()=>e.removeEventListener(qc,y)},[y]),(0,C.jsx)(tl,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:b.useCallback(e=>g(e),[g]),onItemShiftTab:b.useCallback(()=>v(!0),[]),onFocusableItemAdd:b.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:b.useCallback(()=>T(e=>e-1),[]),children:(0,C.jsx)(Kc.div,{tabIndex:_||w===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:R(e.onMouseDown,()=>{S.current=!0}),onFocus:R(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(qc,Jc);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);ul([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:R(e.onBlur,()=>v(!1))})})}),al=`RovingFocusGroupItem`,ol=b.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=kn(),l=a||c,u=nl(al,n),d=u.currentTabStopId===l,f=Zc(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return b.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,C.jsx)(Xc.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,C.jsx)(Kc.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:R(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:R(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:R(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=ll(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?dl(n,r+1):n.slice(r+1)}setTimeout(()=>ul(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});ol.displayName=al;var sl={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function cl(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function ll(e,t,n){let r=cl(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return sl[r]}function ul(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function dl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var fl=rl,pl=ol,ml=[`Enter`,` `],hl=[`ArrowDown`,`PageUp`,`Home`],gl=[`ArrowUp`,`PageDown`,`End`],_l=[...hl,...gl],vl={ltr:[...ml,`ArrowRight`],rtl:[...ml,`ArrowLeft`]},yl={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},bl=`Menu`,[xl,Sl,Cl]=hn(bl),[wl,Tl]=pn(bl,[Cl,wc,el]),El=wc(),Dl=el(),[Ol,kl]=wl(bl),[Al,jl]=wl(bl),Ml=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=El(t),[c,l]=b.useState(null),u=b.useRef(!1),d=qn(a),f=Wn(i);return b.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,C.jsx)(Bc,{...s,children:(0,C.jsx)(Ol,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,C.jsx)(Al,{scope:t,onClose:b.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};Ml.displayName=bl;var Nl=`MenuAnchor`,Pl=b.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=El(n);return(0,C.jsx)(Vc,{...i,...r,ref:t})});Pl.displayName=Nl;var Fl=`MenuPortal`,[Il,Ll]=wl(Fl,{forceMount:void 0}),Rl=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=kl(Fl,t);return(0,C.jsx)(Il,{scope:t,forceMount:n,children:(0,C.jsx)(Cn,{present:n||a.open,children:(0,C.jsx)(Dr,{asChild:!0,container:i,children:r})})})};Rl.displayName=Fl;var zl=`MenuContent`,[Bl,Vl]=wl(zl),Hl=b.forwardRef((e,t)=>{let n=Ll(zl,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=kl(zl,e.__scopeMenu),o=jl(zl,e.__scopeMenu);return(0,C.jsx)(xl.Provider,{scope:e.__scopeMenu,children:(0,C.jsx)(Cn,{present:r||a.open,children:(0,C.jsx)(xl.Slot,{scope:e.__scopeMenu,children:o.modal?(0,C.jsx)(Ul,{...i,ref:t}):(0,C.jsx)(Wl,{...i,ref:t})})})})}),Ul=b.forwardRef((e,t)=>{let n=kl(zl,e.__scopeMenu),r=b.useRef(null),i=Zt(t,r);return b.useEffect(()=>{let e=r.current;if(e)return Yi(e)},[]),(0,C.jsx)(Kl,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:R(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Wl=b.forwardRef((e,t)=>{let n=kl(zl,e.__scopeMenu);return(0,C.jsx)(Kl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Gl=Qt(`MenuContent.ScrollLock`),Kl=b.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=kl(zl,n),_=jl(zl,n),v=El(n),y=Dl(n),x=Sl(n),[S,w]=b.useState(null),T=b.useRef(null),E=Zt(t,T,g.onContentChange),D=b.useRef(0),O=b.useRef(``),k=b.useRef(0),A=b.useRef(null),j=b.useRef(`right`),M=b.useRef(0),N=m?Bi:b.Fragment,ee=m?{as:Gl,allowPinchZoom:!0}:void 0,te=e=>{let t=O.current+e,n=x().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Ou(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){O.current=t,window.clearTimeout(D.current),t!==``&&(D.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};b.useEffect(()=>()=>window.clearTimeout(D.current),[]),Ar();let P=b.useCallback(e=>j.current===A.current?.side&&Au(e,A.current?.area),[]);return(0,C.jsx)(Bl,{scope:n,searchRef:O,onItemEnter:b.useCallback(e=>{P(e)&&e.preventDefault()},[P]),onItemLeave:b.useCallback(e=>{P(e)||(T.current?.focus(),w(null))},[P]),onTriggerLeave:b.useCallback(e=>{P(e)&&e.preventDefault()},[P]),pointerGraceTimerRef:k,onPointerGraceIntentChange:b.useCallback(e=>{A.current=e},[]),children:(0,C.jsx)(N,{...ee,children:(0,C.jsx)(pr,{asChild:!0,trapped:i,onMountAutoFocus:R(a,e=>{e.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,C.jsx)(tr,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,C.jsx)(fl,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:S,onCurrentTabStopIdChange:w,onEntryFocus:R(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,C.jsx)(Hc,{role:`menu`,"aria-orientation":`vertical`,"data-state":Cu(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:E,style:{outline:`none`,...h.style},onKeyDown:R(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&te(e.key));let i=T.current;if(e.target!==i||!_l.includes(e.key))return;e.preventDefault();let a=x().filter(e=>!e.disabled).map(e=>e.ref.current);gl.includes(e.key)&&a.reverse(),Eu(a)}),onBlur:R(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),O.current=``)}),onPointerMove:R(e.onPointerMove,ju(e=>{let t=e.target,n=M.current!==e.clientX;e.currentTarget.contains(t)&&n&&(j.current=e.clientX>M.current?`right`:`left`,M.current=e.clientX)}))})})})})})})});Hl.displayName=zl;var B=`MenuGroup`,V=b.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,C.jsx)(Wc.div,{role:`group`,...r,ref:t})});V.displayName=B;var ql=`MenuLabel`,Jl=b.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,C.jsx)(Wc.div,{...r,ref:t})});Jl.displayName=ql;var Yl=`MenuItem`,Xl=`menu.itemSelect`,Zl=b.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=b.useRef(null),o=jl(Yl,e.__scopeMenu),s=Vl(Yl,e.__scopeMenu),c=Zt(t,a),l=b.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Xl,{bubbles:!0,cancelable:!0});e.addEventListener(Xl,e=>r?.(e),{once:!0}),Gc(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,C.jsx)(Ql,{...i,ref:c,disabled:n,onClick:R(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:R(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:R(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||ml.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Zl.displayName=Yl;var Ql=b.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Vl(Yl,n),s=Dl(n),c=b.useRef(null),l=Zt(t,c),[u,d]=b.useState(!1),[f,p]=b.useState(``);return b.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,C.jsx)(xl.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,C.jsx)(pl,{asChild:!0,...s,focusable:!r,children:(0,C.jsx)(Wc.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:R(e.onPointerMove,ju(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:R(e.onPointerLeave,ju(e=>o.onItemLeave(e))),onFocus:R(e.onFocus,()=>d(!0)),onBlur:R(e.onBlur,()=>d(!1))})})})}),$l=`MenuCheckboxItem`,eu=b.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,C.jsx)(cu,{scope:e.__scopeMenu,checked:n,children:(0,C.jsx)(Zl,{role:`menuitemcheckbox`,"aria-checked":wu(n)?`mixed`:n,...i,ref:t,"data-state":Tu(n),onSelect:R(i.onSelect,()=>r?.(wu(n)?!0:!n),{checkForDefaultPrevented:!1})})})});eu.displayName=$l;var tu=`MenuRadioGroup`,[nu,ru]=wl(tu,{value:void 0,onValueChange:()=>{}}),iu=b.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=qn(r);return(0,C.jsx)(nu,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,C.jsx)(V,{...i,ref:t})})});iu.displayName=tu;var au=`MenuRadioItem`,ou=b.forwardRef((e,t)=>{let{value:n,...r}=e,i=ru(au,e.__scopeMenu),a=n===i.value;return(0,C.jsx)(cu,{scope:e.__scopeMenu,checked:a,children:(0,C.jsx)(Zl,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Tu(a),onSelect:R(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});ou.displayName=au;var su=`MenuItemIndicator`,[cu,lu]=wl(su,{checked:!1}),uu=b.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=lu(su,n);return(0,C.jsx)(Cn,{present:r||wu(a.checked)||a.checked===!0,children:(0,C.jsx)(Wc.span,{...i,ref:t,"data-state":Tu(a.checked)})})});uu.displayName=su;var du=`MenuSeparator`,fu=b.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,C.jsx)(Wc.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});fu.displayName=du;var pu=`MenuArrow`,mu=b.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=El(n);return(0,C.jsx)(Uc,{...i,...r,ref:t})});mu.displayName=pu;var hu=`MenuSub`,[gu,_u]=wl(hu),vu=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=kl(hu,t),o=El(t),[s,c]=b.useState(null),[l,u]=b.useState(null),d=qn(i);return b.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,C.jsx)(Bc,{...o,children:(0,C.jsx)(Ol,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,C.jsx)(gu,{scope:t,contentId:kn(),triggerId:kn(),trigger:s,onTriggerChange:c,children:n})})})};vu.displayName=hu;var yu=`MenuSubTrigger`,bu=b.forwardRef((e,t)=>{let n=kl(yu,e.__scopeMenu),r=jl(yu,e.__scopeMenu),i=_u(yu,e.__scopeMenu),a=Vl(yu,e.__scopeMenu),o=b.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=b.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return b.useEffect(()=>u,[u]),b.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,C.jsx)(Pl,{asChild:!0,...l,children:(0,C.jsx)(Ql,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":Cu(n.open),...e,ref:Xt(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:R(e.onPointerMove,ju(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:R(e.onPointerLeave,ju(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:R(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||vl[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});bu.displayName=yu;var xu=`MenuSubContent`,Su=b.forwardRef((e,t)=>{let n=Ll(zl,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=kl(zl,e.__scopeMenu),o=jl(zl,e.__scopeMenu),s=_u(xu,e.__scopeMenu),c=b.useRef(null),l=Zt(t,c);return(0,C.jsx)(xl.Provider,{scope:e.__scopeMenu,children:(0,C.jsx)(Cn,{present:r||a.open,children:(0,C.jsx)(xl.Slot,{scope:e.__scopeMenu,children:(0,C.jsx)(Kl,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:`start`,side:o.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{o.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:R(e.onFocusOutside,e=>{e.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:R(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:R(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=yl[o.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),s.trigger?.focus(),e.preventDefault())})})})})})});Su.displayName=xu;function Cu(e){return e?`open`:`closed`}function wu(e){return e===`indeterminate`}function Tu(e){return wu(e)?`indeterminate`:e?`checked`:`unchecked`}function Eu(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Du(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Ou(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Du(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function ku(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Au(e,t){return t?ku({x:e.clientX,y:e.clientY},t):!1}function ju(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Mu=Ml,Nu=Pl,Pu=Rl,Fu=Hl,Iu=V,Lu=Jl,Ru=Zl,zu=eu,Bu=iu,Vu=ou,Hu=uu,Uu=fu,Wu=mu,Gu=bu,Ku=Su,qu=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Qt(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,C.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Ju=`DropdownMenu`,[Yu,Xu]=pn(Ju,[Tl]),Zu=Tl(),[Qu,$u]=Yu(Ju),ed=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Zu(t),l=b.useRef(null),[u,d]=vn({prop:i,defaultProp:a??!1,onChange:o,caller:Ju});return(0,C.jsx)(Qu,{scope:t,triggerId:kn(),triggerRef:l,contentId:kn(),open:u,onOpenChange:d,onOpenToggle:b.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,C.jsx)(Mu,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};ed.displayName=Ju;var td=`DropdownMenuTrigger`,nd=b.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=$u(td,n),o=Zu(n);return(0,C.jsx)(Nu,{asChild:!0,...o,children:(0,C.jsx)(qu.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:Xt(t,a.triggerRef),onPointerDown:R(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:R(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});nd.displayName=td;var rd=`DropdownMenuPortal`,id=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Zu(t);return(0,C.jsx)(Pu,{...r,...n})};id.displayName=rd;var ad=`DropdownMenuContent`,od=b.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=$u(ad,n),a=Zu(n),o=b.useRef(!1);return(0,C.jsx)(Fu,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:R(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:R(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.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)`}})});od.displayName=ad;var sd=`DropdownMenuGroup`,cd=b.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Zu(n);return(0,C.jsx)(Iu,{...i,...r,ref:t})});cd.displayName=sd;var ld=`DropdownMenuLabel`,ud=b.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Zu(n);return(0,C.jsx)(Lu,{...i,...r,ref:t})});ud.displayName=ld;var dd=`DropdownMenuItem`,fd=b.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Zu(n);return(0,C.jsx)(Ru,{...i,...r,ref:t})});fd.displayName=dd;var pd=`DropdownMenuCheckboxItem`,md=b.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Zu(n);return(0,C.jsx)(zu,{...i,...r,ref:t})});md.displayName=pd;var hd=`DropdownMenuRadioGroup`,gd=b.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Zu(n);return(0,C.jsx)(Bu,{...i,...r,ref:t})});gd.displayName=hd;var _d=`DropdownMenuRadioItem`,vd=b.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Zu(n);return(0,C.jsx)(Vu,{...i,...r,ref:t})});vd.displayName=_d;var yd=`DropdownMenuItemIndicator`,bd=b.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Zu(n);return(0,C.jsx)(Hu,{...i,...r,ref:t})});bd.displayName=yd;var xd=`DropdownMenuSeparator`,Sd=b.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Zu(n);return(0,C.jsx)(Uu,{...i,...r,ref:t})});Sd.displayName=xd;var Cd=`DropdownMenuArrow`,wd=b.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Zu(n);return(0,C.jsx)(Wu,{...i,...r,ref:t})});wd.displayName=Cd;var Td=`DropdownMenuSubTrigger`,Ed=b.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Zu(n);return(0,C.jsx)(Gu,{...i,...r,ref:t})});Ed.displayName=Td;var Dd=`DropdownMenuSubContent`,Od=b.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Zu(n);return(0,C.jsx)(Ku,{...i,...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)`}})});Od.displayName=Dd;var kd=ed,H=nd,Ad=id,jd=od,Md=cd,Nd=ud,Pd=fd,Fd=gd,Id=vd,Ld=bd,Rd=Sd,zd=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Qt(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,C.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Bd=`Label`,Vd=b.forwardRef((e,t)=>(0,C.jsx)(zd.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));Vd.displayName=Bd;var Hd=Vd;function Ud(e,[t,n]){return Math.min(n,Math.max(t,e))}var Wd=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Qt(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,C.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Gd=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Kd=[` `,`Enter`],qd=`Select`,[Jd,Yd,Xd]=hn(qd),[Zd,Qd]=pn(qd,[Xd,wc]),$d=wc(),[ef,tf]=Zd(qd),[nf,rf]=Zd(qd),af=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=$d(t),[g,_]=b.useState(null),[v,y]=b.useState(null),[x,S]=b.useState(!1),w=Wn(l),[T,E]=vn({prop:r,defaultProp:i??!1,onChange:a,caller:qd}),[D,O]=vn({prop:o,defaultProp:s,onChange:c,caller:qd}),k=b.useRef(null),A=g?m||!!g.closest(`form`):!0,[j,M]=b.useState(new Set),N=Array.from(j).map(e=>e.props.value).join(`;`);return(0,C.jsx)(Bc,{...h,children:(0,C.jsxs)(ef,{required:p,scope:t,trigger:g,onTriggerChange:_,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:kn(),value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:f,children:[(0,C.jsx)(Jd.Provider,{scope:t,children:(0,C.jsx)(nf,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:b.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),A?(0,C.jsxs)(ep,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:D,onChange:e=>O(e.target.value),disabled:f,form:m,children:[D===void 0?(0,C.jsx)(`option`,{value:``}):null,Array.from(j)]},N):null]})})};af.displayName=qd;var of=`SelectTrigger`,sf=b.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=$d(n),o=tf(of,n),s=o.disabled||r,c=Zt(t,o.onTriggerChange),l=Yd(n),u=b.useRef(`touch`),[d,f,p]=np(e=>{let t=l().filter(e=>!e.disabled),n=rp(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,C.jsx)(Vc,{asChild:!0,...a,children:(0,C.jsx)(Wd.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":tp(o.value)?``:void 0,...i,ref:c,onClick:R(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:R(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:R(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&Gd.includes(e.key)&&(m(),e.preventDefault())})})})});sf.displayName=of;var cf=`SelectValue`,lf=b.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=tf(cf,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=Zt(t,c.onValueNodeChange);return gn(()=>{l(u)},[l,u]),(0,C.jsx)(Wd.span,{...s,ref:d,style:{pointerEvents:`none`},children:tp(c.value)?(0,C.jsx)(C.Fragment,{children:o}):a})});lf.displayName=cf;var uf=`SelectIcon`,df=b.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,C.jsx)(Wd.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});df.displayName=uf;var ff=`SelectPortal`,pf=e=>(0,C.jsx)(Dr,{asChild:!0,...e});pf.displayName=ff;var mf=`SelectContent`,hf=b.forwardRef((e,t)=>{let n=tf(mf,e.__scopeSelect),[r,i]=b.useState();if(gn(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?P.createPortal((0,C.jsx)(_f,{scope:e.__scopeSelect,children:(0,C.jsx)(Jd.Slot,{scope:e.__scopeSelect,children:(0,C.jsx)(`div`,{children:e.children})})}),t):null}return(0,C.jsx)(xf,{...e,ref:t})});hf.displayName=mf;var gf=10,[_f,vf]=Zd(mf),yf=`SelectContentImpl`,bf=Qt(`SelectContent.RemoveScroll`),xf=b.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=tf(mf,n),[y,x]=b.useState(null),[S,w]=b.useState(null),T=Zt(t,e=>x(e)),[E,D]=b.useState(null),[O,k]=b.useState(null),A=Yd(n),[j,M]=b.useState(!1),N=b.useRef(!1);b.useEffect(()=>{if(y)return Yi(y)},[y]),Ar();let ee=b.useCallback(e=>{let[t,...n]=A().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[A,S]),te=b.useCallback(()=>ee([E,y]),[ee,E,y]);b.useEffect(()=>{j&&te()},[j,te]);let{onOpenChange:P,triggerPointerDownPosRef:F}=v;b.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||P(!1),document.removeEventListener(`pointermove`,t),F.current=null};return F.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,P,F]),b.useEffect(()=>{let e=()=>P(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[P]);let[ne,re]=np(e=>{let t=A().filter(e=>!e.disabled),n=rp(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ie=b.useCallback((e,t,n)=>{let r=!N.current&&!n;(v.value!==void 0&&v.value===t||r)&&(D(e),r&&(N.current=!0))},[v.value]),ae=b.useCallback(()=>y?.focus(),[y]),I=b.useCallback((e,t,n)=>{let r=!N.current&&!n;(v.value!==void 0&&v.value===t||r)&&k(e)},[v.value]),oe=r===`popper`?Tf:Cf,se=oe===Tf?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,C.jsx)(_f,{scope:n,content:y,viewport:S,onViewportChange:w,itemRefCallback:ie,selectedItem:E,onItemLeave:ae,itemTextRefCallback:I,focusSelectedItem:te,selectedItemText:O,position:r,isPositioned:j,searchRef:ne,children:(0,C.jsx)(Bi,{as:bf,allowPinchZoom:!0,children:(0,C.jsx)(pr,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:R(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,C.jsx)(tr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,C.jsx)(oe,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...se,onPlaced:()=>M(!0),ref:T,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:R(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&re(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=A().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>ee(t)),e.preventDefault()}})})})})})})});xf.displayName=yf;var Sf=`SelectItemAlignedPosition`,Cf=b.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=tf(mf,n),o=vf(mf,n),[s,c]=b.useState(null),[l,u]=b.useState(null),d=Zt(t,e=>u(e)),f=Yd(n),p=b.useRef(!1),m=b.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=b.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-gf,d=Ud(a,[gf,Math.max(gf,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-gf,d=Ud(a,[gf,Math.max(gf,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-gf*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-gf,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${gf}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);gn(()=>y(),[y]);let[x,S]=b.useState();return gn(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]),(0,C.jsx)(Ef,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:b.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,C.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,C.jsx)(Wd.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});Cf.displayName=Sf;var wf=`SelectPopperPosition`,Tf=b.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=gf,...a}=e,o=$d(n);return(0,C.jsx)(Hc,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.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)`}})});Tf.displayName=wf;var[Ef,Df]=Zd(mf,{}),Of=`SelectViewport`,kf=b.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=vf(Of,n),o=Df(Of,n),s=Zt(t,a.onViewportChange),c=b.useRef(0);return(0,C.jsxs)(C.Fragment,{children:[(0,C.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}),(0,C.jsx)(Jd.Slot,{scope:n,children:(0,C.jsx)(Wd.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:R(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-gf*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});kf.displayName=Of;var Af=`SelectGroup`,[jf,Mf]=Zd(Af),Nf=b.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=kn();return(0,C.jsx)(jf,{scope:n,id:i,children:(0,C.jsx)(Wd.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});Nf.displayName=Af;var Pf=`SelectLabel`,Ff=b.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Mf(Pf,n);return(0,C.jsx)(Wd.div,{id:i.id,...r,ref:t})});Ff.displayName=Pf;var If=`SelectItem`,[Lf,Rf]=Zd(If),zf=b.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=tf(If,n),c=vf(If,n),l=s.value===r,[u,d]=b.useState(a??``),[f,p]=b.useState(!1),m=Zt(t,e=>c.itemRefCallback?.(e,r,i)),h=kn(),g=b.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw 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(0,C.jsx)(Lf,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:b.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,C.jsx)(Jd.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,C.jsx)(Wd.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:R(o.onFocus,()=>p(!0)),onBlur:R(o.onBlur,()=>p(!1)),onClick:R(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:R(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:R(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:R(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:R(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:R(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(Kd.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});zf.displayName=If;var Bf=`SelectItemText`,Vf=b.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=tf(Bf,n),s=vf(Bf,n),c=Rf(Bf,n),l=rf(Bf,n),[u,d]=b.useState(null),f=Zt(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=b.useMemo(()=>(0,C.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return gn(()=>(h(m),()=>g(m)),[h,g,m]),(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Wd.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?P.createPortal(a.children,o.valueNode):null]})});Vf.displayName=Bf;var Hf=`SelectItemIndicator`,Uf=b.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return Rf(Hf,n).isSelected?(0,C.jsx)(Wd.span,{"aria-hidden":!0,...r,ref:t}):null});Uf.displayName=Hf;var Wf=`SelectScrollUpButton`,Gf=b.forwardRef((e,t)=>{let n=vf(Wf,e.__scopeSelect),r=Df(Wf,e.__scopeSelect),[i,a]=b.useState(!1),o=Zt(t,r.onScrollButtonChange);return gn(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,C.jsx)(Jf,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Gf.displayName=Wf;var Kf=`SelectScrollDownButton`,qf=b.forwardRef((e,t)=>{let n=vf(Kf,e.__scopeSelect),r=Df(Kf,e.__scopeSelect),[i,a]=b.useState(!1),o=Zt(t,r.onScrollButtonChange);return gn(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,C.jsx)(Jf,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});qf.displayName=Kf;var Jf=b.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=vf(`SelectScrollButton`,n),o=b.useRef(null),s=Yd(n),c=b.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return b.useEffect(()=>()=>c(),[c]),gn(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,C.jsx)(Wd.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:R(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:R(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:R(i.onPointerLeave,()=>{c()})})}),Yf=`SelectSeparator`,Xf=b.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,C.jsx)(Wd.div,{"aria-hidden":!0,...r,ref:t})});Xf.displayName=Yf;var Zf=`SelectArrow`,Qf=b.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=$d(n),a=tf(Zf,n),o=vf(Zf,n);return a.open&&o.position===`popper`?(0,C.jsx)(Uc,{...i,...r,ref:t}):null});Qf.displayName=Zf;var $f=`SelectBubbleInput`,ep=b.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=b.useRef(null),a=Zt(r,i),o=ro(t);return b.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,C.jsx)(Wd.select,{...n,style:{...cn,...n.style},ref:a,defaultValue:t})});ep.displayName=$f;function tp(e){return e===``||e===void 0}function np(e){let t=qn(e),n=b.useRef(``),r=b.useRef(0),i=b.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=b.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function rp(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=ip(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function ip(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ap=af,op=sf,sp=lf,cp=df,lp=pf,up=hf,dp=kf,fp=zf,pp=Vf,mp=Uf,hp=Gf,gp=qf,_p=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Qt(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,C.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),vp=`Separator`,yp=`horizontal`,bp=[`horizontal`,`vertical`],xp=b.forwardRef((e,t)=>{let{decorative:n,orientation:r=yp,...i}=e,a=Sp(r)?r:yp,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,C.jsx)(_p.div,{"data-orientation":a,...o,...i,ref:t})});xp.displayName=vp;function Sp(e){return bp.includes(e)}var Cp=xp,wp=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Qt(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,C.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Tp=`Switch`,[Ep,Dp]=pn(Tp),[Op,kp]=Ep(Tp),Ap=b.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c=`on`,onCheckedChange:l,form:u,...d}=e,[f,p]=b.useState(null),m=Zt(t,e=>p(e)),h=b.useRef(!1),g=f?u||!!f.closest(`form`):!0,[_,v]=vn({prop:i,defaultProp:a??!1,onChange:l,caller:Tp});return(0,C.jsxs)(Op,{scope:n,checked:_,disabled:s,children:[(0,C.jsx)(wp.button,{type:`button`,role:`switch`,"aria-checked":_,"aria-required":o,"data-state":Fp(_),"data-disabled":s?``:void 0,disabled:s,value:c,...d,ref:m,onClick:R(e.onClick,e=>{v(e=>!e),g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})}),g&&(0,C.jsx)(Pp,{control:f,bubbles:!h.current,name:r,value:c,checked:_,required:o,disabled:s,form:u,style:{transform:`translateX(-100%)`}})]})});Ap.displayName=Tp;var jp=`SwitchThumb`,Mp=b.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=kp(jp,n);return(0,C.jsx)(wp.span,{"data-state":Fp(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});Mp.displayName=jp;var Np=`SwitchBubbleInput`,Pp=b.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=b.useRef(null),s=Zt(o,a),c=ro(n),l=io(t);return b.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(c!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[c,n,r]),(0,C.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...l,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});Pp.displayName=Np;function Fp(e){return e?`checked`:`unchecked`}var Ip=Ap,Lp=Mp,Rp=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Qt(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,C.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),zp=`Tabs`,[Bp,Vp]=pn(zp,[el]),Hp=el(),[Up,Wp]=Bp(zp),Gp=b.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=Wn(s),[d,f]=vn({prop:r,onChange:i,defaultProp:a??``,caller:zp});return(0,C.jsx)(Up,{scope:n,baseId:kn(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,C.jsx)(Rp.div,{dir:u,"data-orientation":o,...l,ref:t})})});Gp.displayName=zp;var Kp=`TabsList`,qp=b.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=Wp(Kp,n),o=Hp(n);return(0,C.jsx)(fl,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,C.jsx)(Rp.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});qp.displayName=Kp;var Jp=`TabsTrigger`,Yp=b.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=Wp(Jp,n),s=Hp(n),c=Qp(o.baseId,r),l=$p(o.baseId,r),u=r===o.value;return(0,C.jsx)(pl,{asChild:!0,...s,focusable:!i,active:u,children:(0,C.jsx)(Rp.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:R(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:R(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:R(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});Yp.displayName=Jp;var Xp=`TabsContent`,Zp=b.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=Wp(Xp,n),c=Qp(s.baseId,r),l=$p(s.baseId,r),u=r===s.value,d=b.useRef(u);return b.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,C.jsx)(Cn,{present:i||u,children:({present:n})=>(0,C.jsx)(Rp.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});Zp.displayName=Xp;function Qp(e,t){return`${e}-trigger-${t}`}function $p(e,t){return`${e}-content-${t}`}var em=Gp,tm=qp,nm=Yp,rm=Zp,im=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Qt(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,C.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),[am,om]=pn(`Tooltip`,[wc]),sm=wc(),cm=`TooltipProvider`,lm=700,um=`tooltip.open`,[dm,fm]=am(cm),pm=e=>{let{__scopeTooltip:t,delayDuration:n=lm,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=b.useRef(!0),s=b.useRef(!1),c=b.useRef(0);return b.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,C.jsx)(dm,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:b.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};pm.displayName=cm;var mm=`Tooltip`,[hm,gm]=am(mm),_m=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=fm(mm,e.__scopeTooltip),l=sm(t),[u,d]=b.useState(null),f=kn(),p=b.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=b.useRef(!1),[_,v]=vn({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(um))):c.onClose(),a?.(e)},caller:mm}),y=b.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),x=b.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,v(!0)},[v]),S=b.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),w=b.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,v(!0),p.current=0},h)},[h,v]);return b.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,C.jsx)(Bc,{...l,children:(0,C.jsx)(hm,{scope:t,contentId:f,open:_,stateAttribute:y,trigger:u,onTriggerChange:d,onTriggerEnter:b.useCallback(()=>{c.isOpenDelayedRef.current?w():x()},[c.isOpenDelayedRef,w,x]),onTriggerLeave:b.useCallback(()=>{m?S():(window.clearTimeout(p.current),p.current=0)},[S,m]),onOpen:x,onClose:S,disableHoverableContent:m,children:n})})};_m.displayName=mm;var vm=`TooltipTrigger`,ym=b.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=gm(vm,n),a=fm(vm,n),o=sm(n),s=Zt(t,b.useRef(null),i.onTriggerChange),c=b.useRef(!1),l=b.useRef(!1),u=b.useCallback(()=>c.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,C.jsx)(Vc,{asChild:!0,...o,children:(0,C.jsx)(im.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:R(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:R(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:R(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:R(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:R(e.onBlur,i.onClose),onClick:R(e.onClick,i.onClose)})})});ym.displayName=vm;var bm=`TooltipPortal`,[xm,Sm]=am(bm,{forceMount:void 0}),Cm=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=gm(bm,t);return(0,C.jsx)(xm,{scope:t,forceMount:n,children:(0,C.jsx)(Cn,{present:n||a.open,children:(0,C.jsx)(Dr,{asChild:!0,container:i,children:r})})})};Cm.displayName=bm;var wm=`TooltipContent`,Tm=b.forwardRef((e,t)=>{let n=Sm(wm,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=gm(wm,e.__scopeTooltip);return(0,C.jsx)(Cn,{present:r||o.open,children:o.disableHoverableContent?(0,C.jsx)(Am,{side:i,...a,ref:t}):(0,C.jsx)(Em,{side:i,...a,ref:t})})}),Em=b.forwardRef((e,t)=>{let n=gm(wm,e.__scopeTooltip),r=fm(wm,e.__scopeTooltip),i=b.useRef(null),a=Zt(t,i),[o,s]=b.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=b.useCallback(()=>{s(null),d(!1)},[d]),p=b.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Pm(r,Nm(r,n.getBoundingClientRect())),a=Fm(t.getBoundingClientRect());s(Lm([...i,...a])),d(!0)},[d]);return b.useEffect(()=>()=>f(),[f]),b.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),b.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!Im(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,C.jsx)(Am,{...e,ref:a})}),[Dm,Om]=am(mm,{isInside:!1}),km=nn(`TooltipContent`),Am=b.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=gm(wm,n),l=sm(n),{onClose:u}=c;return b.useEffect(()=>(document.addEventListener(um,u),()=>document.removeEventListener(um,u)),[u]),b.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,C.jsx)(tr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,C.jsxs)(Hc,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.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:[(0,C.jsx)(km,{children:r}),(0,C.jsx)(Dm,{scope:n,isInside:!0,children:(0,C.jsx)(dn,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});Tm.displayName=wm;var jm=`TooltipArrow`,Mm=b.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=sm(n);return Om(jm,n).isInside?null:(0,C.jsx)(Uc,{...i,...r,ref:t})});Mm.displayName=jm;function Nm(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function Pm(e,t,n=5){let 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 Fm(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Im(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Lm(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),Rm(t)}function Rm(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}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 zm=pm,Bm=_m,Vm=ym,Hm=Cm,Um=Tm,Wm=Mm;function Gm(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Gm(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Km(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Gm(e))&&(r&&(r+=` `),r+=t);return r}var qm=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Jm=(e,t)=>({classGroupId:e,validator:t}),Ym=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Xm=`-`,Zm=[],Qm=`arbitrary..`,$m=e=>{let t=nh(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return th(e);let n=e.split(Xm);return eh(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?qm(i,t):t:i||Zm}return n[e]||Zm}}},eh=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=eh(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Xm):e.slice(t).join(Xm),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},th=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Qm+r:void 0})(),nh=e=>{let{theme:t,classGroups:n}=e;return rh(n,t)},rh=(e,t)=>{let n=Ym();for(let r in e){let i=e[r];ih(i,n,r,t)}return n},ih=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];ah(i,t,n,r)}},ah=(e,t,n,r)=>{if(typeof e==`string`){oh(e,t,n);return}if(typeof e==`function`){sh(e,t,n,r);return}ch(e,t,n,r)},oh=(e,t,n)=>{let r=e===``?t:lh(t,e);r.classGroupId=n},sh=(e,t,n,r)=>{if(uh(e)){ih(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Jm(n,e))},ch=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];ih(o,lh(t,a),n,r)}},lh=(e,t)=>{let n=e,r=t.split(Xm),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Ym(),n.nextPart.set(t,i)),n=i}return n},uh=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,dh=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},fh=`!`,ph=`:`,mh=[],hh=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),gh=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===ph){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(fh)?(c=s.slice(0,-1),l=!0):s.startsWith(fh)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return hh(t,l,c,u)};if(t){let e=t+ph,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):hh(mh,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},_h=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},vh=e=>({cache:dh(e.cacheSize),parseClassName:gh(e),sortModifiers:_h(e),postfixLookupClassGroupIds:yh(e),...$m(e)}),yh=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},bh=/\s+/,xh=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(bh),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+fh:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Sh=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Ch(n))&&(i&&(i+=` `),i+=r);return i},Ch=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Ch(e[r]))&&(n&&(n+=` `),n+=t);return n},wh=(e,...t)=>{let n,r,i,a,o=o=>(n=vh(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=xh(e,n);return i(e,a),a};return a=o,(...e)=>a(Sh(...e))},Th=[],Eh=e=>{let t=t=>t[e]||Th;return t.isThemeGetter=!0,t},Dh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Oh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,kh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ah=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jh=/\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$/,Mh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Nh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ph=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Fh=e=>kh.test(e),U=e=>!!e&&!Number.isNaN(Number(e)),Ih=e=>!!e&&Number.isInteger(Number(e)),Lh=e=>e.endsWith(`%`)&&U(e.slice(0,-1)),Rh=e=>Ah.test(e),zh=()=>!0,Bh=e=>jh.test(e)&&!Mh.test(e),Vh=()=>!1,Hh=e=>Nh.test(e),Uh=e=>Ph.test(e),Wh=e=>!W(e)&&!G(e),Gh=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Kh=e=>sg(e,dg,Vh),W=e=>Dh.test(e),qh=e=>sg(e,fg,Bh),Jh=e=>sg(e,pg,U),Yh=e=>sg(e,hg,zh),Xh=e=>sg(e,mg,Vh),Zh=e=>sg(e,lg,Vh),Qh=e=>sg(e,ug,Uh),$h=e=>sg(e,gg,Hh),G=e=>Oh.test(e),eg=e=>cg(e,fg),tg=e=>cg(e,mg),ng=e=>cg(e,lg),rg=e=>cg(e,dg),ig=e=>cg(e,ug),ag=e=>cg(e,gg,!0),og=e=>cg(e,hg,!0),sg=(e,t,n)=>{let r=Dh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},cg=(e,t,n=!1)=>{let r=Oh.exec(e);return r?r[1]?t(r[1]):n:!1},lg=e=>e===`position`||e===`percentage`,ug=e=>e===`image`||e===`url`,dg=e=>e===`length`||e===`size`||e===`bg-size`,fg=e=>e===`length`,pg=e=>e===`number`,mg=e=>e===`family-name`,hg=e=>e===`number`||e===`weight`,gg=e=>e===`shadow`,_g=wh(()=>{let e=Eh(`color`),t=Eh(`font`),n=Eh(`text`),r=Eh(`font-weight`),i=Eh(`tracking`),a=Eh(`leading`),o=Eh(`breakpoint`),s=Eh(`container`),c=Eh(`spacing`),l=Eh(`radius`),u=Eh(`shadow`),d=Eh(`inset-shadow`),f=Eh(`text-shadow`),p=Eh(`drop-shadow`),m=Eh(`blur`),h=Eh(`perspective`),g=Eh(`aspect`),_=Eh(`ease`),v=Eh(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),G,W],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[G,W,c],T=()=>[Fh,`full`,`auto`,...w()],E=()=>[Ih,`none`,`subgrid`,G,W],D=()=>[`auto`,{span:[`full`,Ih,G,W]},Ih,G,W],O=()=>[Ih,`auto`,G,W],k=()=>[`auto`,`min`,`max`,`fr`,G,W],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[Fh,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ee=()=>[Fh,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],te=()=>[Fh,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,G,W],F=()=>[...b(),ng,Zh,{position:[G,W]}],ne=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],re=()=>[`auto`,`cover`,`contain`,rg,Kh,{size:[G,W]}],ie=()=>[Lh,eg,qh],ae=()=>[``,`none`,`full`,l,G,W],I=()=>[``,U,eg,qh],oe=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ce=()=>[U,Lh,ng,Zh],le=()=>[``,`none`,m,G,W],ue=()=>[`none`,U,G,W],de=()=>[`none`,U,G,W],fe=()=>[U,G,W],pe=()=>[Fh,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Rh],breakpoint:[Rh],color:[zh],container:[Rh],"drop-shadow":[Rh],ease:[`in`,`out`,`in-out`],font:[Wh],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Rh],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Rh],shadow:[Rh],spacing:[`px`,U],text:[Rh],"text-shadow":[Rh],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Fh,W,G,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,G,W]}],"container-named":[Gh],columns:[{columns:[U,W,G,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Ih,`auto`,G,W]}],basis:[{basis:[Fh,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[U,Fh,`auto`,`initial`,`none`,W]}],grow:[{grow:[``,U,G,W]}],shrink:[{shrink:[``,U,G,W]}],order:[{order:[Ih,`first`,`last`,`none`,G,W]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...ee()]}],"min-inline-size":[{"min-inline":[`auto`,...ee()]}],"max-inline-size":[{"max-inline":[`none`,...ee()]}],"block-size":[{block:[`auto`,...te()]}],"min-block-size":[{"min-block":[`auto`,...te()]}],"max-block-size":[{"max-block":[`none`,...te()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,eg,qh]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,og,Yh]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Lh,W]}],"font-family":[{font:[tg,Xh,t]}],"font-features":[{"font-features":[W]}],"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:[i,G,W]}],"line-clamp":[{"line-clamp":[U,`none`,G,Jh]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,G,W]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,G,W]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...oe(),`wavy`]}],"text-decoration-thickness":[{decoration:[U,`from-font`,`auto`,G,qh]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[U,`auto`,G,W]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[Ih,G,W]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,G,W]}],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`,G,W]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:re()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Ih,G,W],radial:[``,G,W],conic:[Ih,G,W]},ig,Qh]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-bs":[{"border-bs":I()}],"border-w-be":[{"border-be":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":I()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...oe(),`hidden`,`none`]}],"divide-style":[{divide:[...oe(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...oe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[U,G,W]}],"outline-w":[{outline:[``,U,eg,qh]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`none`,u,ag,$h]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,ag,$h]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:I()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[U,qh]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,ag,$h]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[U,G,W]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"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":[U]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[G,W]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[U]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,G,W]}],filter:[{filter:[``,`none`,G,W]}],blur:[{blur:le()}],brightness:[{brightness:[U,G,W]}],contrast:[{contrast:[U,G,W]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ag,$h]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,U,G,W]}],"hue-rotate":[{"hue-rotate":[U,G,W]}],invert:[{invert:[``,U,G,W]}],saturate:[{saturate:[U,G,W]}],sepia:[{sepia:[``,U,G,W]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,G,W]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[U,G,W]}],"backdrop-contrast":[{"backdrop-contrast":[U,G,W]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,U,G,W]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[U,G,W]}],"backdrop-invert":[{"backdrop-invert":[``,U,G,W]}],"backdrop-opacity":[{"backdrop-opacity":[U,G,W]}],"backdrop-saturate":[{"backdrop-saturate":[U,G,W]}],"backdrop-sepia":[{"backdrop-sepia":[``,U,G,W]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,G,W]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[U,`initial`,G,W]}],ease:[{ease:[`linear`,`initial`,_,G,W]}],delay:[{delay:[U,G,W]}],animate:[{animate:[`none`,v,G,W]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,G,W]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":[`scale-3d`],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[G,W,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":[`translate-none`],zoom:[{zoom:[Ih,G,W]}],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"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`,G,W]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,G,W]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[U,eg,qh,Jh]}],stroke:[{stroke:[`none`,...P()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`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`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`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-bs`,`border-w-be`,`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-bs`,`border-color-be`,`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-mbs`,`scroll-mbe`,`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-pbs`,`scroll-pbe`,`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`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function K(...e){return _g(Km(e))}function vg({delayDuration:e=0,...t}){return(0,C.jsx)(zm,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function yg({...e}){return(0,C.jsx)(Bm,{"data-slot":`tooltip`,...e})}function bg({...e}){return(0,C.jsx)(Vm,{"data-slot":`tooltip-trigger`,...e})}function xg({className:e,sideOffset:t=0,children:n,...r}){return(0,C.jsx)(Hm,{children:(0,C.jsxs)(Um,{"data-slot":`tooltip-content`,sideOffset:t,className:K(`z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r,children:[n,(0,C.jsx)(Wm,{className:`z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground`})]})})}var Sg=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Cg=Km,wg=(e,t)=>n=>{if(t?.variants==null)return Cg(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Sg(t)||Sg(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Cg(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Tg=`(max-width: 767px)`;function Eg(){return window.matchMedia(Tg).matches}function Dg(){return!1}function Og(e){let t=window.matchMedia(Tg);return t.addEventListener(`change`,e),()=>t.removeEventListener(`change`,e)}function kg(){return b.useSyncExternalStore(Og,Eg,Dg)}var Ag=wg(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-[color,background-color,border-color,box-shadow,transform] duration-150 ease-[var(--natroc-ease-out)] outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:scale-[0.98] disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 motion-reduce:transition-colors motion-reduce:active:not-aria-[haspopup]:scale-100 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function q({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){return(0,C.jsx)(r?$t:`button`,{"data-slot":`button`,"data-variant":t,"data-size":n,className:K(Ag({variant:t,size:n,className:e})),...i})}function jg({className:e,type:t,...n}){return(0,C.jsx)(`input`,{type:t,"data-slot":`input`,className:K(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}function Mg({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,C.jsx)(Cp,{"data-slot":`separator`,decorative:n,orientation:t,className:K(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,e),...r})}function Ng({...e}){return(0,C.jsx)(Aa,{"data-slot":`sheet`,...e})}function Pg({...e}){return(0,C.jsx)(ja,{"data-slot":`sheet-portal`,...e})}function Fg({className:e,...t}){return(0,C.jsx)(Ma,{"data-slot":`sheet-overlay`,className:K(`fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function Ig({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,C.jsxs)(Pg,{children:[(0,C.jsx)(Fg,{}),(0,C.jsxs)(Na,{"data-slot":`sheet-content`,"data-side":n,className:K(`fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10`,e),...i,children:[t,r&&(0,C.jsx)(Ia,{"data-slot":`sheet-close`,asChild:!0,children:(0,C.jsxs)(q,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`,children:[(0,C.jsx)(qt,{}),(0,C.jsx)(`span`,{className:`sr-only`,children:`Close`})]})})]})]})}function Lg({className:e,...t}){return(0,C.jsx)(`div`,{"data-slot":`sheet-header`,className:K(`flex flex-col gap-0.5 p-4`,e),...t})}function Rg({className:e,...t}){return(0,C.jsx)(Pa,{"data-slot":`sheet-title`,className:K(`font-heading text-base font-medium text-foreground`,e),...t})}function zg({className:e,...t}){return(0,C.jsx)(Fa,{"data-slot":`sheet-description`,className:K(`text-sm text-muted-foreground`,e),...t})}var Bg=`sidebar_state`,Vg=3600*24*7,Hg=`16rem`,Ug=`18rem`,Wg=`3rem`,Gg=`b`,Kg=b.createContext(null);function qg(){let e=b.useContext(Kg);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function Jg({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...o}){let s=kg(),[c,l]=b.useState(!1),[u,d]=b.useState(e),f=t??u,p=b.useCallback(e=>{let t=typeof e==`function`?e(f):e;n?n(t):d(t),document.cookie=`${Bg}=${t}; path=/; max-age=${Vg}`},[n,f]),m=b.useCallback(()=>s?l(e=>!e):p(e=>!e),[s,p,l]);b.useEffect(()=>{let e=e=>{e.key===Gg&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[m]);let h=f?`expanded`:`collapsed`,g=b.useMemo(()=>({state:h,open:f,setOpen:p,isMobile:s,openMobile:c,setOpenMobile:l,toggleSidebar:m}),[h,f,p,s,c,l,m]);return(0,C.jsx)(Kg.Provider,{value:g,children:(0,C.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":Hg,"--sidebar-width-icon":Wg,...i},className:K(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),...o,children:a})})}function Yg({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:i,dir:a,...o}){let{isMobile:s,state:c,openMobile:l,setOpenMobile:u}=qg();return n===`none`?(0,C.jsx)(`div`,{"data-slot":`sidebar`,className:K(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...o,children:i}):s?(0,C.jsx)(Ng,{open:l,onOpenChange:u,...o,children:(0,C.jsxs)(Ig,{dir:a,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":Ug},side:e,children:[(0,C.jsxs)(Lg,{className:`sr-only`,children:[(0,C.jsx)(Rg,{children:`Sidebar`}),(0,C.jsx)(zg,{children:`Displays the mobile sidebar.`})]}),(0,C.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:i})]})}):(0,C.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":c,"data-collapsible":c===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,C.jsx)(`div`,{"data-slot":`sidebar-gap`,className:K(`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)`)}),(0,C.jsx)(`div`,{"data-slot":`sidebar-container`,"data-side":e,className:K(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex`,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:(0,C.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,children:i})})]})}function Xg({className:e,onClick:t,...n}){let{toggleSidebar:r}=qg();return(0,C.jsxs)(q,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon-sm`,className:K(e),onClick:e=>{t?.(e),r()},...n,children:[(0,C.jsx)(kt,{}),(0,C.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function Zg({className:e,...t}){return(0,C.jsx)(`main`,{"data-slot":`sidebar-inset`,className:K(`relative flex w-full flex-1 flex-col bg-background 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 Qg({className:e,...t}){return(0,C.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:K(`flex flex-col gap-2 p-2`,e),...t})}function $g({className:e,...t}){return(0,C.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:K(`flex flex-col gap-2 p-2`,e),...t})}function e_({className:e,...t}){return(0,C.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:K(`no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function t_({className:e,...t}){return(0,C.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:K(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function n_({className:e,asChild:t=!1,...n}){return(0,C.jsx)(t?$t:`div`,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:K(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,e),...n})}function r_({className:e,...t}){return(0,C.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:K(`flex w-full min-w-0 flex-col gap-0`,e),...t})}function i_({className:e,...t}){return(0,C.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:K(`group/menu-item relative`,e),...t})}var a_=wg(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! 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 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_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 o_({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:r=`default`,tooltip:i,className:a,...o}){let s=e?$t:`button`,{isMobile:c,state:l}=qg(),u=(0,C.jsx)(s,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":r,"data-active":t,className:K(a_({variant:n,size:r}),a),...o});return i?(typeof i==`string`&&(i={children:i}),(0,C.jsxs)(yg,{children:[(0,C.jsx)(bg,{asChild:!0,children:u}),(0,C.jsx)(xg,{side:`right`,align:`center`,hidden:l!==`collapsed`||c,...i})]})):u}function s_({className:e,asChild:t=!1,showOnHover:n=!1,...r}){return(0,C.jsx)(t?$t:`button`,{"data-slot":`sidebar-menu-action`,"data-sidebar":`menu-action`,className:K(`absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0`,n&&`group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0`,e),...r})}function c_({className:e,...t}){return(0,C.jsx)(`ul`,{"data-slot":`sidebar-menu-sub`,"data-sidebar":`menu-sub`,className:K(`mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden`,e),...t})}function l_({className:e,...t}){return(0,C.jsx)(`li`,{"data-slot":`sidebar-menu-sub-item`,"data-sidebar":`menu-sub-item`,className:K(`group/menu-sub-item relative`,e),...t})}function u_({asChild:e=!1,size:t=`md`,isActive:n=!1,className:r,...i}){return(0,C.jsx)(e?$t:`a`,{"data-slot":`sidebar-menu-sub-button`,"data-sidebar":`menu-sub-button`,"data-size":t,"data-active":n,className:K(`flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden 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 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground`,r),...i})}function d_({className:e,...t}){return(0,C.jsx)(`nav`,{"aria-label":`breadcrumb`,"data-slot":`breadcrumb`,className:K(e),...t})}function f_({className:e,...t}){return(0,C.jsx)(`ol`,{"data-slot":`breadcrumb-list`,className:K(`flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground`,e),...t})}function p_({className:e,...t}){return(0,C.jsx)(`li`,{"data-slot":`breadcrumb-item`,className:K(`inline-flex items-center gap-1`,e),...t})}function m_({className:e,...t}){return(0,C.jsx)(`span`,{"data-slot":`breadcrumb-page`,role:`link`,"aria-disabled":`true`,"aria-current":`page`,className:K(`font-normal text-foreground`,e),...t})}function h_({page:e}){return e?.title?(0,C.jsx)(d_,{children:(0,C.jsx)(f_,{children:(0,C.jsx)(p_,{children:(0,C.jsxs)(m_,{className:`flex items-center gap-2 [&>svg]:size-3.5`,children:[e.icon,e.title]})})})}):null}function g_({className:e,...t}){return(0,C.jsx)(`kbd`,{"data-slot":`kbd`,className:K(`pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3`,e),...t})}function __({className:e,...t}){return(0,C.jsx)(`kbd`,{"data-slot":`kbd-group`,className:K(`inline-flex items-center gap-1`,e),...t})}function v_(){return(0,C.jsxs)(yg,{delayDuration:1e3,children:[(0,C.jsx)(bg,{asChild:!0,children:(0,C.jsx)(Xg,{})}),(0,C.jsxs)(xg,{className:`px-2 py-1`,side:`right`,children:[`Toggle Sidebar`,` `,(0,C.jsxs)(__,{children:[(0,C.jsx)(g_,{children:`⌘`}),(0,C.jsx)(g_,{children:`b`})]})]})]})}var y_={home:{id:`home`,path:`/`,title:`New Conversation`,icon:(0,C.jsx)(Et,{}),showInPrimaryNav:!1},projects:{id:`projects`,path:`/projects`,title:`Projects`,icon:(0,C.jsx)(ut,{}),showInPrimaryNav:!0},config:{id:`config`,path:`/config`,title:`Config`,icon:(0,C.jsx)(Rt,{}),showInPrimaryNav:!0},account:{id:`account`,path:`/account`,title:`Account Settings`,icon:(0,C.jsx)(Gt,{}),showInPrimaryNav:!1}},b_=Object.values(y_).filter(e=>e.showInPrimaryNav);function x_(e){return e===`/agent`?y_.config:Object.values(y_).find(t=>t.path===e)??null}function S_(e,t){return e===y_.home.path&&!t.startsWith(`#/chat/`)}function C_({className:e,size:t=`default`,...n}){return(0,C.jsx)(eo,{"data-slot":`avatar`,"data-size":t,className:K(`group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten`,e),...n})}function w_({className:e,...t}){return(0,C.jsx)(to,{"data-slot":`avatar-image`,className:K(`aspect-square size-full rounded-full object-cover`,e),...t})}function T_({className:e,...t}){return(0,C.jsx)(no,{"data-slot":`avatar-fallback`,className:K(`flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs`,e),...t})}function E_({...e}){return(0,C.jsx)(kd,{"data-slot":`dropdown-menu`,...e})}function D_({...e}){return(0,C.jsx)(H,{"data-slot":`dropdown-menu-trigger`,...e})}function O_({className:e,align:t=`start`,sideOffset:n=4,...r}){return(0,C.jsx)(Ad,{children:(0,C.jsx)(jd,{"data-slot":`dropdown-menu-content`,sideOffset:n,align:t,className:K(`z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 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 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r})})}function k_({...e}){return(0,C.jsx)(Md,{"data-slot":`dropdown-menu-group`,...e})}function A_({className:e,inset:t,variant:n=`default`,...r}){return(0,C.jsx)(Pd,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:K(`group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive`,e),...r})}function j_({...e}){return(0,C.jsx)(Fd,{"data-slot":`dropdown-menu-radio-group`,...e})}function M_({className:e,children:t,inset:n,...r}){return(0,C.jsxs)(Id,{"data-slot":`dropdown-menu-radio-item`,"data-inset":n,className:K(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[(0,C.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-radio-item-indicator`,children:(0,C.jsx)(Ld,{children:(0,C.jsx)(Je,{})})}),t]})}function N_({className:e,inset:t,...n}){return(0,C.jsx)(Nd,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:K(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,e),...n})}function P_({className:e,...t}){return(0,C.jsx)(Rd,{"data-slot":`dropdown-menu-separator`,className:K(`-mx-1 my-1 h-px bg-border`,e),...t})}var F_=`natroc:token`;function I_(){try{return localStorage.getItem(F_)}catch{return null}}function L_(e){try{localStorage.setItem(F_,e)}catch{}}function R_(){try{localStorage.removeItem(F_)}catch{}}function z_(){return!!I_()}var B_=1,V_=class extends Error{code;constructor(e,t){super(e),this.name=`GatewayError`,this.code=t}};function H_(){return`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}/gateway`}function U_(e){return e instanceof V_?e:new V_(e instanceof Error?e.message:`Gateway request failed.`)}function W_(e){return new V_(e?.message??`Gateway request failed.`,e?.code)}function G_(){R_(),typeof window<`u`&&window.location.pathname!==`/login`&&window.location.assign(`/login`)}var J=new class{socket=null;connecting=null;pending=new Map;streams=new Map;broadcastListeners=new Map;lastSeqByEvent=new Map;async call(e,t){return await this.connect(),new Promise((n,r)=>{let i=crypto.randomUUID();this.pending.set(i,{resolve:e=>n(e),reject:r}),this.transmit({type:`req`,id:i,method:e,params:t})})}stream(e,t,n){let r=crypto.randomUUID(),i=!1;return this.connect().then(()=>{i||(this.streams.set(r,n),this.transmit({type:`req`,id:r,method:e,params:t}))},e=>n.onError(U_(e))),()=>{i=!0,this.streams.has(r)&&(this.streams.delete(r),this.transmit({type:`cancel`,id:r}))}}on(e,t){let n=this.broadcastListeners.get(e);return n||(n=new Set,this.broadcastListeners.set(e,n)),n.add(t),()=>{n?.delete(t)}}connect(){return this.socket?.readyState===WebSocket.OPEN&&this.connecting===null?Promise.resolve():(this.connecting||=new Promise((e,t)=>{let n=new WebSocket(H_());this.socket=n;let r=I_(),i=!!r,a=crypto.randomUUID();this.pending.set(a,{resolve:n=>{if(i&&n?.auth?.ok===!1){G_();let e=new V_(`Session is invalid or expired.`,`unauthenticated`);this.connecting=null,t(e);return}this.connecting=null,e()},reject:e=>{this.connecting=null,t(e)}}),n.addEventListener(`open`,()=>{this.transmit({type:`connect`,id:a,params:{protocol:B_,auth:r?{token:r}:void 0,client:{id:`natroc-web`,mode:`ui`,version:`0.0.1`}}})}),n.addEventListener(`message`,e=>{this.handleFrame(e.data)}),n.addEventListener(`close`,()=>{this.handleClose()})}),this.connecting)}transmit(e){this.socket?.readyState===WebSocket.OPEN&&this.socket.send(JSON.stringify(e))}handleFrame(e){if(typeof e!=`string`)return;let t;try{t=JSON.parse(e)}catch{return}if(t.type===`res`){!t.ok&&t.error?.code===`unauthenticated`&&G_();let e=this.pending.get(t.id);if(e){this.pending.delete(t.id),t.ok?e.resolve(t.payload):e.reject(W_(t.error));return}let n=this.streams.get(t.id);n&&(this.streams.delete(t.id),t.ok?n.onEnd(t.payload):n.onError(W_(t.error)));return}if(t.type===`event`){if(t.id){this.streams.get(t.id)?.onEvent(t.payload);return}let e=this.broadcastListeners.get(t.event);if(!e||e.size===0)return;let n=this.lastSeqByEvent.get(t.event),r=t.seq,i=n!==void 0&&r!==void 0&&r>n+1;r!==void 0&&this.lastSeqByEvent.set(t.event,r);let a={seq:r,stateVersion:t.stateVersion,gap:i};for(let n of e)n(t.payload,a);return}}handleClose(){this.socket=null,this.connecting=null;let e=new V_(`Gateway connection closed.`,`connection_closed`);for(let t of this.pending.values())t.reject(e);this.pending.clear();for(let t of this.streams.values())t.onError(e);this.streams.clear()}};function K_(e,t){return J.call(`auth.login`,{username:e,password:t})}function q_(e){return J.call(`auth.register`,e)}async function J_(){if(!I_())return null;try{return(await J.call(`auth.me`)).user}catch{return null}}async function Y_(){if(I_())try{await J.call(`auth.logout`)}catch{}}function X_(e){return J.call(`auth.updatePassword`,e)}function Z_(e){return J.call(`auth.updateAvatar`,e)}function Q_(){let[e,t]=(0,b.useState)({name:`Natroc user`,handle:``,avatarUrl:null});(0,b.useEffect)(()=>{let e=!0,n=e=>{t({name:e.fullName,handle:`@${e.username}`,avatarUrl:e.avatarUrl})};J_().then(t=>{e&&t&&n(t)});let r=e=>{let t=e;t.detail&&n(t.detail)};return window.addEventListener(`natroc:user-updated`,r),()=>{e=!1,window.removeEventListener(`natroc:user-updated`,r)}},[]);let n=async()=>{await Y_(),R_(),window.location.assign(`/login`)},r=e.name.trim().charAt(0).toUpperCase()||`N`;return(0,C.jsxs)(E_,{children:[(0,C.jsx)(D_,{asChild:!0,children:(0,C.jsxs)(C_,{className:`size-8`,children:[e.avatarUrl&&(0,C.jsx)(w_,{src:e.avatarUrl,alt:e.name}),(0,C.jsx)(T_,{children:r})]})}),(0,C.jsxs)(O_,{align:`end`,className:`w-60`,children:[(0,C.jsx)(A_,{className:`flex items-center justify-start gap-2`,children:(0,C.jsxs)(N_,{className:`flex items-center gap-3`,children:[(0,C.jsxs)(C_,{className:`size-10`,children:[e.avatarUrl&&(0,C.jsx)(w_,{src:e.avatarUrl,alt:e.name}),(0,C.jsx)(T_,{children:r})]}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`span`,{className:`font-medium text-foreground`,children:e.name}),` `,(0,C.jsx)(`br`,{}),(0,C.jsx)(`div`,{className:`max-w-full overflow-hidden text-xs overflow-ellipsis whitespace-nowrap text-muted-foreground`,children:e.handle})]})]})}),(0,C.jsx)(P_,{}),(0,C.jsx)(k_,{children:(0,C.jsxs)(A_,{onSelect:()=>window.location.assign(y_.account.path),children:[(0,C.jsx)(Gt,{}),`Account Settings`]})}),(0,C.jsx)(P_,{}),(0,C.jsxs)(k_,{children:[(0,C.jsxs)(A_,{children:[(0,C.jsx)(Ue,{}),`Notifications`]}),(0,C.jsxs)(A_,{children:[(0,C.jsx)(nt,{}),`Keyboard shortcuts`]})]}),(0,C.jsx)(P_,{}),(0,C.jsxs)(k_,{children:[(0,C.jsxs)(A_,{children:[(0,C.jsx)(yt,{}),`Help center`]}),(0,C.jsxs)(A_,{children:[(0,C.jsx)(ft,{}),`Agent training`]})]}),(0,C.jsx)(P_,{}),(0,C.jsx)(k_,{children:(0,C.jsxs)(A_,{children:[(0,C.jsx)(rt,{}),`Subscription`]})}),(0,C.jsx)(P_,{}),(0,C.jsx)(k_,{children:(0,C.jsxs)(A_,{className:`w-full cursor-pointer`,variant:`destructive`,onSelect:()=>{n()},children:[(0,C.jsx)(wt,{}),`Log out`]})})]})]})}var $_=({size:e=24,style:t,...n})=>(0,C.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,fillRule:`evenodd`,width:e,height:e,style:{width:e,height:e,minWidth:e,minHeight:e,...t},...n,children:[(0,C.jsx)(`title`,{children:`Github`}),(0,C.jsx)(`path`,{d:`M12 0c6.63 0 12 5.276 12 11.79-.001 5.067-3.29 9.567-8.175 11.187-.6.118-.825-.25-.825-.56 0-.398.015-1.665.015-3.242 0-1.105-.375-1.813-.81-2.181 2.67-.295 5.475-1.297 5.475-5.822 0-1.297-.465-2.344-1.23-3.169.12-.295.54-1.503-.12-3.125 0 0-1.005-.324-3.3 1.209a11.32 11.32 0 00-3-.398c-1.02 0-2.04.133-3 .398-2.295-1.518-3.3-1.209-3.3-1.209-.66 1.622-.24 2.83-.12 3.125-.765.825-1.23 1.887-1.23 3.169 0 4.51 2.79 5.527 5.46 5.822-.345.294-.66.81-.765 1.577-.69.31-2.415.81-3.495-.973-.225-.354-.9-1.223-1.845-1.209-1.005.015-.405.56.015.781.51.28 1.095 1.327 1.23 1.666.24.663 1.02 1.93 4.035 1.385 0 .988.015 1.916.015 2.196 0 .31-.225.664-.825.56C3.303 21.374-.003 16.867 0 11.791 0 5.276 5.37 0 12 0z`})]}),ev=({size:e=24,style:t,...n})=>(0,C.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,fillRule:`evenodd`,width:e,height:e,style:{width:e,height:e,minWidth:e,minHeight:e,...t},...n,children:[(0,C.jsx)(`title`,{children:`Ollama`}),(0,C.jsx)(`path`,{d:`M7.905 1.09c.216.085.411.225.588.41.295.306.544.744.734 1.263.191.522.315 1.1.362 1.68a5.054 5.054 0 012.049-.636l.051-.004c.87-.07 1.73.087 2.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67 1.67 0 01.589-.41c.257-.1.53-.118.796-.042.401.114.745.368 1.016.737.248.337.434.769.561 1.287.23.934.27 2.163.115 3.645l.053.04.026.019c.757.576 1.284 1.397 1.563 2.35.435 1.487.216 3.155-.534 4.088l-.018.021.002.003c.417.762.67 1.567.724 2.4l.002.03c.064 1.065-.2 2.137-.814 3.19l-.007.01.01.024c.472 1.157.62 2.322.438 3.486l-.006.039a.651.651 0 01-.747.536.648.648 0 01-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643 0 01.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644 0 01.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229 4.229 0 00-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653 0 01-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288 3.288 0 00-1.772-.332c-1.245.099-2.343.801-2.67 1.686a.652.652 0 01-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066 1.588a4.07 4.07 0 00-.068 1.886c.112.558.331 1.02.582 1.269l.008.007c.212.207.257.53.109.785-.36.622-.629 1.549-.673 2.44-.05 1.018.186 1.902.719 2.536l.016.019a.643.643 0 01.095.69c-.576 1.236-.753 2.252-.562 3.052a.652.652 0 01-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339 4.339 0 01-.598-1.309l-.005-.019a5.764 5.764 0 01-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352 5.352 0 01.093-2.49c.262-.915.777-1.701 1.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622 1.015-.737.266-.076.54-.059.797.042zm4.116 9.09c.936 0 1.8.313 2.446.855.63.527 1.005 1.235 1.005 1.94 0 .888-.406 1.58-1.133 2.022-.62.375-1.451.557-2.403.557-1.009 0-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845 0-.707.398-1.417 1.056-1.946.668-.537 1.55-.849 2.485-.849zm0 .896a3.07 3.07 0 00-1.916.65c-.461.37-.722.835-.722 1.25 0 .428.21.829.61 1.134.455.347 1.124.548 1.943.548.799 0 1.473-.147 1.932-.426.463-.28.7-.686.7-1.257 0-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662 1.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375 0 01-.376.373.375.375 0 01-.376-.373v-.46l-.271-.218a.347.347 0 01-.052-.49.353.353 0 01.494-.051l.215.172.22-.174a.353.353 0 01.49.051zm-5.04-1.919c.478 0 .867.39.867.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zm8.706 0c.48 0 .868.39.868.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zM7.44 2.3l-.003.002a.659.659 0 00-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216 1.631-.124 2.782.43-.128.899-.208 1.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628 0 00-.107-.09L7.44 2.3zm9.174.04l-.002.001a.628.628 0 00-.107.09c-.156.163-.32.45-.453.814-.29.794-.387 1.776-.23 2.572l.058.097.008.014h.03a5.184 5.184 0 011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659 0 00-.285-.239h-.004z`})]}),tv=({size:e=24,style:t,...n})=>(0,C.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,fillRule:`evenodd`,width:e,height:e,style:{width:e,height:e,minWidth:e,minHeight:e,...t},...n,children:[(0,C.jsx)(`title`,{children:`OpenRouter`}),(0,C.jsx)(`path`,{d:`M16.804 1.957l7.22 4.105v.087L16.73 10.21l.017-2.117-.821-.03c-1.059-.028-1.611.002-2.268.11-1.064.175-2.038.577-3.147 1.352L8.345 11.03c-.284.195-.495.336-.68.455l-.515.322-.397.234.385.23.53.338c.476.314 1.17.796 2.701 1.866 1.11.775 2.083 1.177 3.147 1.352l.3.045c.694.091 1.375.094 2.825.033l.022-2.159 7.22 4.105v.087L16.589 22l.014-1.862-.635.022c-1.386.042-2.137.002-3.138-.162-1.694-.28-3.26-.926-4.881-2.059l-2.158-1.5a21.997 21.997 0 00-.755-.498l-.467-.28a55.927 55.927 0 00-.76-.43C2.908 14.73.563 14.116 0 14.116V9.888l.14.004c.564-.007 2.91-.622 3.809-1.124l1.016-.58.438-.274c.428-.28 1.072-.726 2.686-1.853 1.621-1.133 3.186-1.78 4.881-2.059 1.152-.19 1.974-.213 3.814-.138l.02-1.907z`})]});function nv({...e}){return(0,C.jsx)(Aa,{"data-slot":`dialog`,...e})}function rv({...e}){return(0,C.jsx)(ja,{"data-slot":`dialog-portal`,...e})}function iv({...e}){return(0,C.jsx)(Ia,{"data-slot":`dialog-close`,...e})}function av({className:e,...t}){return(0,C.jsx)(Ma,{"data-slot":`dialog-overlay`,className:K(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function ov({className:e,children:t,showCloseButton:n=!0,...r}){return(0,C.jsxs)(rv,{children:[(0,C.jsx)(av,{}),(0,C.jsxs)(Na,{"data-slot":`dialog-content`,className:K(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r,children:[t,n&&(0,C.jsx)(Ia,{"data-slot":`dialog-close`,asChild:!0,children:(0,C.jsxs)(q,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`,children:[(0,C.jsx)(qt,{}),(0,C.jsx)(`span`,{className:`sr-only`,children:`Close`})]})})]})]})}function sv({className:e,...t}){return(0,C.jsx)(`div`,{"data-slot":`dialog-header`,className:K(`flex flex-col gap-2`,e),...t})}function cv({className:e,showCloseButton:t=!1,children:n,...r}){return(0,C.jsxs)(`div`,{"data-slot":`dialog-footer`,className:K(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,C.jsx)(Ia,{asChild:!0,children:(0,C.jsx)(q,{variant:`outline`,children:`Close`})})]})}function lv({className:e,...t}){return(0,C.jsx)(Pa,{"data-slot":`dialog-title`,className:K(`font-heading text-base leading-none font-medium`,e),...t})}function uv({className:e,...t}){return(0,C.jsx)(Fa,{"data-slot":`dialog-description`,className:K(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}function dv({className:e,...t}){return(0,C.jsx)(`textarea`,{"data-slot":`textarea`,className:K(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function fv({className:e,...t}){return(0,C.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:K(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var pv=wg(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function mv({className:e,align:t=`inline-start`,...n}){return(0,C.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:K(pv({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var hv=wg(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function gv({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,C.jsx)(q,{type:t,"data-size":r,variant:n,className:K(hv({size:r}),e),...i})}function _v({className:e,...t}){return(0,C.jsx)(jg,{"data-slot":`input-group-control`,className:K(`flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function vv({className:e,...t}){return(0,C.jsx)(Hd,{"data-slot":`label`,className:K(`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 yv({...e}){return(0,C.jsx)(ap,{"data-slot":`select`,...e})}function bv({...e}){return(0,C.jsx)(sp,{"data-slot":`select-value`,...e})}function xv({className:e,size:t=`default`,children:n,...r}){return(0,C.jsxs)(op,{"data-slot":`select-trigger`,"data-size":t,className:K(`flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,C.jsx)(cp,{asChild:!0,children:(0,C.jsx)(Ye,{className:`pointer-events-none size-4 text-muted-foreground`})})]})}function Sv({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,C.jsx)(lp,{children:(0,C.jsxs)(up,{"data-slot":`select-content`,"data-align-trigger":n===`item-aligned`,className:K(`relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,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,align:r,...i,children:[(0,C.jsx)(wv,{}),(0,C.jsx)(dp,{"data-position":n,className:K(`data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)`,n===`popper`&&``),children:t}),(0,C.jsx)(Tv,{})]})})}function Cv({className:e,children:t,...n}){return(0,C.jsxs)(fp,{"data-slot":`select-item`,className:K(`relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground 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:[(0,C.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`,children:(0,C.jsx)(mp,{children:(0,C.jsx)(Je,{className:`pointer-events-none`})})}),(0,C.jsx)(pp,{children:t})]})}function wv({className:e,...t}){return(0,C.jsx)(hp,{"data-slot":`select-scroll-up-button`,className:K(`z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,C.jsx)(Ze,{})})}function Tv({className:e,...t}){return(0,C.jsx)(gp,{"data-slot":`select-scroll-down-button`,className:K(`z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,C.jsx)(Ye,{})})}var Ev=`http://127.0.0.1:11434`,Dv=`https://openrouter.ai/api/v1`,Ov=[{value:`ollama`,label:`Ollama`,Icon:ev},{value:`openrouter`,label:`OpenRouter`,Icon:tv}];function kv(){let[e,t]=(0,b.useState)(!1),[n,r]=(0,b.useState)(``),[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)(``),[c,l]=(0,b.useState)([]),[u,d]=(0,b.useState)(``),[f,p]=(0,b.useState)(``),[m,h]=(0,b.useState)(``),[g,_]=(0,b.useState)(!1),[v,y]=(0,b.useState)(null),x=c.find(e=>e.isActive);(0,b.useEffect)(()=>{let e=!0;return Av().then(t=>{e&&l(t)}),()=>{e=!1}},[]);let S=async()=>{l(await Av())},w=()=>{r(``),a(``),s(``),d(``),p(``)},T=e=>{t(e),e||w()},E=e=>{let t=e;r(t),a(t===`ollama`?Ev:Dv),s(``),d(``),p(``)},D=n===`ollama`,O=n===`openrouter`,k=!!n&&!g&&(D||O&&o.trim().length>0),A=async()=>{if(!(!n||!k)){_(!0),d(``),p(``);try{n===`ollama`?await J.call(`providers.connectOllama`,{baseUrl:i.trim()}):await J.call(`providers.connectOpenRouter`,{apiKey:o.trim(),baseUrl:i.trim()}),await S(),d(`${O?`OpenRouter`:`Ollama`} connected and active.`),window.dispatchEvent(new Event(`natroc:provider-updated`))}catch(e){p(e instanceof Error?e.message:`Failed to connect provider.`)}finally{_(!1)}}},j=async e=>{if(!v){y(e),h(``);try{await J.call(`providers.setActive`,{providerId:e}),await S(),window.dispatchEvent(new Event(`natroc:provider-updated`))}catch(e){h(e instanceof Error?e.message:`Failed to switch provider.`)}finally{y(null)}}};return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(E_,{children:[(0,C.jsx)(D_,{asChild:!0,children:(0,C.jsxs)(q,{variant:`outline`,size:`sm`,children:[x?.displayName??`Select provider`,(0,C.jsx)(Ye,{className:`text-muted-foreground`})]})}),(0,C.jsxs)(O_,{align:`start`,className:`w-56`,children:[(0,C.jsx)(N_,{children:`Your providers`}),c.length>0?c.map(e=>(0,C.jsxs)(A_,{disabled:e.isActive||!!v,onSelect:()=>{j(e.id)},children:[(0,C.jsx)(`span`,{children:e.displayName}),v===e.id?(0,C.jsx)(`span`,{className:`natroc-soft-panel ml-auto text-xs text-muted-foreground`,children:`Switching...`}):e.isActive?(0,C.jsx)(`span`,{className:`ml-auto text-xs text-muted-foreground`,children:`Active`}):(0,C.jsx)(`span`,{className:`ml-auto text-xs text-muted-foreground`,children:`Switch`})]},e.id)):(0,C.jsx)(`div`,{className:`px-2 py-3 text-center text-xs text-muted-foreground`,children:`No providers connected yet.`}),m&&(0,C.jsx)(`div`,{className:`px-2 py-2 text-xs text-destructive`,children:m}),(0,C.jsx)(P_,{}),(0,C.jsxs)(A_,{onSelect:()=>t(!0),children:[(0,C.jsx)(Pt,{}),`Add Provider`]})]})]}),(0,C.jsx)(nv,{open:e,onOpenChange:T,children:(0,C.jsxs)(ov,{className:`sm:max-w-md`,children:[(0,C.jsxs)(`div`,{className:`flex flex-col gap-1.5 pr-6`,children:[(0,C.jsx)(lv,{children:`Add a new provider`}),(0,C.jsx)(uv,{children:`Pick a provider to connect to Natroc. You can manage and switch between them later from the topbar.`})]}),(0,C.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,C.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,C.jsx)(vv,{htmlFor:`provider`,children:`Provider`}),(0,C.jsxs)(yv,{value:n,onValueChange:E,children:[(0,C.jsx)(xv,{id:`provider`,className:`w-full`,children:(0,C.jsx)(bv,{placeholder:`Select a provider...`})}),(0,C.jsx)(Sv,{children:Ov.map(({value:e,label:t,Icon:n})=>(0,C.jsxs)(Cv,{value:e,children:[(0,C.jsx)(n,{size:16}),t]},e))})]})]}),n&&(0,C.jsxs)(`div`,{className:`natroc-soft-panel flex flex-col gap-2`,children:[(0,C.jsx)(vv,{htmlFor:`base-url`,children:`Base URL`}),(0,C.jsx)(fv,{children:(0,C.jsx)(_v,{id:`base-url`,placeholder:D?Ev:Dv,value:i,onChange:e=>a(e.target.value)})}),D&&(0,C.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Leave empty to use the default`,` `,(0,C.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-[0.7rem]`,children:Ev}),`.`]})]}),O&&(0,C.jsxs)(`div`,{className:`natroc-soft-panel flex flex-col gap-2`,children:[(0,C.jsx)(vv,{htmlFor:`api-key`,children:`API Key`}),(0,C.jsx)(jg,{id:`api-key`,type:`password`,placeholder:`sk-or-v1-...`,autoComplete:`off`,value:o,onChange:e=>s(e.target.value)})]}),u&&(0,C.jsx)(`p`,{className:`natroc-soft-panel rounded-md border border-green-500/20 bg-green-500/10 px-3 py-2 text-xs text-green-700 dark:text-green-300`,children:u}),f&&(0,C.jsx)(`p`,{className:`natroc-soft-panel rounded-md border border-destructive/20 bg-destructive/10 px-3 py-2 text-xs text-destructive`,children:f})]}),(0,C.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,C.jsx)(iv,{asChild:!0,children:(0,C.jsx)(q,{variant:`outline`,children:`Close`})}),(0,C.jsx)(q,{onClick:A,disabled:!k,children:g?`Connecting...`:`Connect provider`})]})]})})]})}async function Av(){try{return(await J.call(`providers.list`)).providers??[]}catch{return[]}}function jv(){let e=x_(window.location.pathname);return(0,C.jsxs)(`header`,{className:K(`sticky top-0 z-50 flex h-14 shrink-0 items-center justify-between gap-2 border-b px-4 md:px-6`),children:[(0,C.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,C.jsx)(v_,{}),(0,C.jsx)(kv,{}),(0,C.jsx)(Mg,{className:`mr-2 h-4 data-[orientation=vertical]:self-center`,orientation:`vertical`}),(0,C.jsx)(h_,{page:e})]}),(0,C.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,C.jsx)(q,{size:`icon-sm`,variant:`outline`,children:(0,C.jsx)(Lt,{})}),(0,C.jsx)(q,{"aria-label":`Notifications`,size:`icon-sm`,variant:`outline`,children:(0,C.jsx)(Ue,{})}),(0,C.jsx)(Mg,{className:`h-4 data-[orientation=vertical]:self-center`,orientation:`vertical`}),(0,C.jsx)(Q_,{})]})]})}var Mv={x:50,y:120,w:397,h:248},Nv=Mv.h/Mv.w,Pv=({size:e=24,style:t,...n})=>{let r=e,i=e*Nv;return(0,C.jsx)(`svg`,{version:`1.0`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`${Mv.x} ${Mv.y} ${Mv.w} ${Mv.h}`,preserveAspectRatio:`xMidYMid meet`,width:r,height:i,style:{width:r,height:i,minWidth:r,minHeight:i,...t},...n,children:(0,C.jsxs)(`g`,{transform:`translate(0.000000,500.000000) scale(0.100000,-0.100000)`,fill:`currentColor`,stroke:`none`,children:[(0,C.jsx)(`path`,{d:`M605 3748 c61 -22 189 -69 285 -105 634 -233 736 -301 1270 -847 329 -335 592 -599 680 -681 247 -228 563 -433 995 -644 127 -62 295 -141 301 -141 15 0 -497 676 -546 720 -3 3 -55 61 -117 130 -170 191 -392 406 -714 691 -381 338 -415 366 -534 444 -108 71 -195 117 -287 154 -70 28 -289 88 -408 111 -25 5 -76 17 -115 25 -236 53 -886 185 -905 184 -8 0 35 -18 95 -41z`}),(0,C.jsx)(`path`,{d:`M4385 3760 c-118 -32 -415 -136 -556 -196 -245 -103 -345 -160 -417 -238 -67 -72 -72 -104 -72 -440 0 -331 0 -327 85 -426 117 -134 255 -318 327 -434 l38 -61 0 522 c0 317 4 552 11 599 38 273 195 452 553 630 138 68 142 74 31 44z`}),(0,C.jsx)(`path`,{d:`M1290 2633 c0 -381 -4 -653 -11 -708 -19 -161 -61 -291 -134 -419 -25 -44 -43 -81 -41 -84 3 -2 20 7 38 20 364 266 514 417 579 587 20 50 22 79 26 281 2 124 9 244 14 267 39 151 200 110 529 -134 96 -71 -466 452 -614 572 -150 120 -333 235 -376 235 -7 0 -10 -208 -10 -617z`})]})})};function Fv({...e}){return(0,C.jsx)(Hn,{"data-slot":`collapsible`,...e})}function Iv({...e}){return(0,C.jsx)(Ln,{"data-slot":`collapsible-trigger`,...e})}function Lv({...e}){return(0,C.jsx)(zn,{"data-slot":`collapsible-content`,...e})}function Rv({label:e,items:t}){return(0,C.jsxs)(t_,{children:[e&&(0,C.jsx)(n_,{children:e}),(0,C.jsx)(r_,{children:t.map(e=>(0,C.jsx)(Fv,{asChild:!0,className:`group/collapsible`,defaultOpen:!!e.isActive||e.subItems?.some(e=>!!e.isActive),children:(0,C.jsx)(i_,{children:e.subItems?.length?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Iv,{asChild:!0,children:(0,C.jsxs)(o_,{isActive:e.isActive,children:[e.icon,(0,C.jsx)(`span`,{children:e.title}),(0,C.jsx)(Xe,{className:`ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90`})]})}),(0,C.jsx)(Lv,{children:(0,C.jsx)(c_,{children:e.subItems?.map(e=>(0,C.jsx)(l_,{children:(0,C.jsx)(u_,{asChild:!0,isActive:e.isActive,children:(0,C.jsxs)(`a`,{href:e.path,children:[e.icon,(0,C.jsx)(`span`,{children:e.title})]})})},e.title))})})]}):(0,C.jsx)(o_,{asChild:!0,isActive:e.isActive,children:(0,C.jsxs)(`a`,{href:e.path,children:[e.icon,(0,C.jsx)(`span`,{children:e.title})]})})})},e.title))})]})}var zv=[],Bv=[{title:`Github`,path:`https://github.com/licentora/natroc`,icon:(0,C.jsx)($_,{size:16})},{title:`System status`,path:`#/status`,icon:(0,C.jsx)(ze,{})}];[...zv.flatMap(e=>e.items.flatMap(e=>e.subItems?.length?[e,...e.subItems]:[e])),...Bv];var Vv={badge:`NEW`,title:`Smarter queue triage`,description:`One-click triage for your queue.`,readMore:{href:`#`,label:`Release notes`}};function Hv(){let[e,t]=(0,b.useState)(!0);return e?(0,C.jsxs)(`div`,{className:K(`group/latest-change size-full min-h-27 justify-center rounded-lg border bg-background`,`relative flex size-full flex-col gap-1 overflow-hidden px-4 pt-3 pb-1 *:text-nowrap`,`transition-opacity group-data-[collapsible=icon]:pointer-events-none group-data-[collapsible=icon]:opacity-0`),children:[(0,C.jsx)(`span`,{className:`font-mono text-[10px] font-light text-muted-foreground`,children:Vv.badge}),(0,C.jsx)(`p`,{className:`text-xs font-medium`,children:Vv.title}),(0,C.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:Vv.description}),(0,C.jsx)(q,{asChild:!0,className:`w-max px-0 text-xs font-light`,size:`sm`,variant:`link`,children:(0,C.jsx)(`a`,{href:Vv.readMore.href,children:Vv.readMore.label})}),(0,C.jsxs)(q,{className:`absolute top-2 right-2 z-10 size-6 rounded-full opacity-0 transition-opacity group-hover/latest-change:opacity-100`,onClick:()=>t(!1),size:`icon-sm`,variant:`ghost`,children:[(0,C.jsx)(qt,{className:`size-3.5 text-muted-foreground`}),` `]})]}):null}function Uv({chat:e,onDelete:t,onSelect:n}){let[r,i]=(0,b.useState)(!1),[a,o]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{if(!a)return;let n=n=>{(n.key===`y`||n.key===`Y`)&&(n.preventDefault(),t?.(e.id),o(!1))};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[a,e.id,t]),(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(i_,{children:[(0,C.jsx)(o_,{asChild:!0,tooltip:e.title,children:(0,C.jsx)(`a`,{href:`#/chat/${e.id}`,onClick:t=>{t.preventDefault(),n?.(e.id)},children:(0,C.jsx)(`span`,{className:`truncate`,children:e.title})})}),(0,C.jsxs)(E_,{open:r,onOpenChange:i,children:[(0,C.jsx)(D_,{asChild:!0,children:(0,C.jsx)(s_,{showOnHover:!0,"aria-label":`More options`,children:(0,C.jsx)(at,{})})}),(0,C.jsxs)(O_,{side:`right`,align:`start`,className:`w-44`,children:[(0,C.jsxs)(A_,{children:[(0,C.jsx)(lt,{}),(0,C.jsx)(`span`,{children:`Move to Project`})]}),(0,C.jsx)(P_,{}),(0,C.jsxs)(A_,{variant:`destructive`,onSelect:e=>{e.preventDefault(),i(!1),o(!0)},children:[(0,C.jsx)(Ht,{}),(0,C.jsx)(`span`,{children:`Delete`})]})]})]})]}),(0,C.jsx)(nv,{open:a,onOpenChange:o,children:(0,C.jsxs)(ov,{className:`max-w-md`,showCloseButton:!1,children:[(0,C.jsxs)(sv,{children:[(0,C.jsx)(lv,{children:`Delete chat?`}),(0,C.jsxs)(uv,{children:[`This will permanently delete`,` `,(0,C.jsxs)(`span`,{className:`font-medium text-foreground`,children:[`"`,e.title,`"`]}),`. This action cannot be undone.`]})]}),(0,C.jsxs)(cv,{children:[(0,C.jsxs)(q,{variant:`outline`,onClick:()=>o(!1),children:[`Cancel`,(0,C.jsx)(g_,{className:`ml-1`,children:`Esc`})]}),(0,C.jsxs)(q,{variant:`destructive`,onClick:()=>{t?.(e.id),o(!1)},children:[`Yes, delete`,(0,C.jsx)(g_,{className:`ml-1`,children:`Y`})]})]})]})})]})}function Wv(){let[e,t]=(0,b.useState)([]),[n,r]=(0,b.useState)(!0),i=window.location.pathname,a=window.location.hash,o=S_(i,a),s=(0,b.useCallback)(async()=>{r(!0);try{t(await Gv())}finally{r(!1)}},[]);(0,b.useEffect)(()=>{let e=!0;Gv().then(n=>{e&&t(n)}).finally(()=>{e&&r(!1)});let n=()=>{s()};return window.addEventListener(`natroc:conversation-updated`,n),()=>{e=!1,window.removeEventListener(`natroc:conversation-updated`,n)}},[s]);let c=async e=>{try{await J.call(`conversations.delete`,{conversationId:e})}catch{return}t(t=>t.filter(t=>t.id!==e)),window.dispatchEvent(new Event(`natroc:conversation-updated`))},l=e=>{if(i!==y_.home.path){window.location.assign(`/#/chat/${e}`);return}window.history.replaceState(null,``,`#/chat/${e}`),window.dispatchEvent(new CustomEvent(`natroc:conversation-selected`,{detail:{id:e}}))};return(0,C.jsxs)(Yg,{collapsible:`icon`,variant:`inset`,children:[(0,C.jsx)(Qg,{className:`h-14 justify-center`,children:(0,C.jsx)(o_,{asChild:!0,className:`h-auto`,children:(0,C.jsxs)(`a`,{href:`/`,children:[(0,C.jsx)(Pv,{size:24}),(0,C.jsx)(`span`,{className:`font-medium`,children:`Natroc`})]})})}),(0,C.jsxs)(e_,{children:[(0,C.jsx)(t_,{children:(0,C.jsxs)(r_,{children:[(0,C.jsx)(i_,{children:(0,C.jsxs)(o_,{onClick:()=>{if(i!==y_.home.path){window.location.assign(y_.home.path);return}window.history.replaceState(null,``,y_.home.path),window.dispatchEvent(new Event(`natroc:new-conversation`))},isActive:o,className:K(`w-full duration-200 ease-linear`,o?`bg-primary text-primary-foreground hover:bg-primary/90 hover:text-primary-foreground active:bg-primary/90 active:text-primary-foreground`:`text-muted-foreground hover:bg-muted hover:text-foreground`),tooltip:y_.home.title,children:[y_.home.icon,(0,C.jsx)(`span`,{children:y_.home.title})]})}),b_.map(e=>(0,C.jsx)(i_,{children:(0,C.jsx)(o_,{asChild:!0,isActive:i===e.path,tooltip:e.title,children:(0,C.jsxs)(`a`,{href:e.path,children:[e.icon,(0,C.jsx)(`span`,{children:e.title})]})})},e.id))]})}),zv.map((e,t)=>(0,C.jsx)(Rv,{...e},`sidebar-group-${t}`)),(0,C.jsxs)(t_,{className:`group-data-[collapsible=icon]:hidden`,children:[(0,C.jsx)(n_,{children:`Recents`}),(0,C.jsxs)(r_,{children:[n&&e.length===0&&(0,C.jsx)(i_,{children:(0,C.jsx)(o_,{disabled:!0,children:(0,C.jsx)(`span`,{children:`Loading chats...`})})}),!n&&e.length===0&&(0,C.jsx)(i_,{children:(0,C.jsx)(o_,{disabled:!0,children:(0,C.jsx)(`span`,{children:`No recent chats`})})}),e.map(e=>(0,C.jsx)(Uv,{chat:e,onDelete:c,onSelect:l},e.id))]})]})]}),(0,C.jsxs)($g,{children:[(0,C.jsx)(Hv,{}),(0,C.jsx)(r_,{className:`mt-2`,children:Bv.map(e=>(0,C.jsx)(i_,{children:(0,C.jsx)(o_,{asChild:!0,className:`text-muted-foreground`,isActive:e.isActive,size:`sm`,children:(0,C.jsxs)(`a`,{href:e.path,children:[e.icon,(0,C.jsx)(`span`,{children:e.title})]})})},e.title))})]})]})}async function Gv(){try{return(await J.call(`conversations.list`)).conversations?.map(e=>({id:e.id,title:e.title,updatedAt:e.updatedAt}))??[]}catch{return[]}}function Kv({children:e}){return(0,C.jsx)(`div`,{className:`overflow-hidden`,children:(0,C.jsxs)(Jg,{className:`relative h-svh`,children:[(0,C.jsx)(Wv,{}),(0,C.jsxs)(Zg,{className:`md:peer-data-[variant=inset]:ml-0`,children:[(0,C.jsx)(jv,{}),(0,C.jsx)(`div`,{className:`flex flex-1 flex-col gap-4 overflow-y-auto p-4 md:p-6`,children:e})]})]})})}var qv=(0,b.createContext)({});function Jv(e){let t=(0,b.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Yv=typeof window<`u`?b.useLayoutEffect:b.useEffect,Xv=(0,b.createContext)(null);function Zv(e,t){e.indexOf(t)===-1&&e.push(t)}function Qv(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var $v=(e,t,n)=>n>t?t:n<e?e:n,ey={},ty=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ny=e=>typeof e==`object`&&!!e,ry=e=>/^0[^.\s]+$/u.test(e);function iy(e){let t;return()=>(t===void 0&&(t=e()),t)}var ay=e=>e,oy=(...e)=>e.reduce((e,t)=>n=>t(e(n))),sy=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},cy=class{constructor(){this.subscriptions=[]}add(e){return Zv(this.subscriptions,e),()=>Qv(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},ly=e=>e*1e3,uy=e=>e/1e3,dy=(e,t)=>t?1e3/t*e:0,fy=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,py=1e-7,my=12;function hy(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=fy(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>py&&++s<my);return o}function gy(e,t,n,r){if(e===t&&n===r)return ay;let i=t=>hy(t,0,1,e,n);return e=>e===0||e===1?e:fy(i(e),t,r)}var _y=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,vy=e=>t=>1-e(1-t),yy=gy(.33,1.53,.69,.99),by=vy(yy),xy=_y(by),Sy=e=>e>=1?1:(e*=2)<1?.5*by(e):.5*(2-2**(-10*(e-1))),Cy=e=>1-Math.sin(Math.acos(e)),wy=vy(Cy),Ty=_y(Cy),Ey=gy(.42,0,1,1),Dy=gy(0,0,.58,1),Oy=gy(.42,0,.58,1),ky=e=>Array.isArray(e)&&typeof e[0]!=`number`,Ay=e=>Array.isArray(e)&&typeof e[0]==`number`,jy={linear:ay,easeIn:Ey,easeInOut:Oy,easeOut:Dy,circIn:Cy,circInOut:Ty,circOut:wy,backIn:by,backInOut:xy,backOut:yy,anticipate:Sy},My=e=>typeof e==`string`,Ny=e=>{if(Ay(e)){e.length;let[t,n,r,i]=e;return gy(t,n,r,i)}else if(My(e))return jy[e],`${e}`,jy[e];return e},Py=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],Fy={value:null,addProjectionMetrics:null};function Iy(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&Fy.value&&Fy.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var Ly=40;function Ry(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Py.reduce((e,n)=>(e[n]=Iy(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=ey.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Ly),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Py.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Py.length;t++)o[Py[t]].cancel(e)},state:i,steps:o}}var{schedule:zy,cancel:By,state:Vy,steps:Hy}=Ry(typeof requestAnimationFrame<`u`?requestAnimationFrame:ay,!0),Uy;function Wy(){Uy=void 0}var Gy={now:()=>(Uy===void 0&&Gy.set(Vy.isProcessing||ey.useManualTiming?Vy.timestamp:performance.now()),Uy),set:e=>{Uy=e,queueMicrotask(Wy)}},Ky={layout:0,mainThread:0,waapi:0},qy=e=>t=>typeof t==`string`&&t.startsWith(e),Jy=qy(`--`),Yy=qy(`var(--`),Xy=e=>Yy(e)?Zy.test(e.split(`/*`)[0].trim()):!1,Zy=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Qy(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var $y={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},eb={...$y,transform:e=>$v(0,1,e)},tb={...$y,default:1},nb=e=>Math.round(e*1e5)/1e5,rb=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ib(e){return e==null}var ab=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ob=(e,t)=>n=>!!(typeof n==`string`&&ab.test(n)&&n.startsWith(e)||t&&!ib(n)&&Object.prototype.hasOwnProperty.call(n,t)),sb=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(rb);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},cb=e=>$v(0,255,e),lb={...$y,transform:e=>Math.round(cb(e))},ub={test:ob(`rgb`,`red`),parse:sb(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+lb.transform(e)+`, `+lb.transform(t)+`, `+lb.transform(n)+`, `+nb(eb.transform(r))+`)`};function db(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var fb={test:ob(`#`),parse:db,transform:ub.transform},pb=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),mb=pb(`deg`),hb=pb(`%`),Y=pb(`px`),gb=pb(`vh`),_b=pb(`vw`),vb={...hb,parse:e=>hb.parse(e)/100,transform:e=>hb.transform(e*100)},yb={test:ob(`hsl`,`hue`),parse:sb(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+hb.transform(nb(t))+`, `+hb.transform(nb(n))+`, `+nb(eb.transform(r))+`)`},bb={test:e=>ub.test(e)||fb.test(e)||yb.test(e),parse:e=>ub.test(e)?ub.parse(e):yb.test(e)?yb.parse(e):fb.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?ub.transform(e):yb.transform(e),getAnimatableNone:e=>{let t=bb.parse(e);return t.alpha=0,bb.transform(t)}},xb=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Sb(e){return isNaN(e)&&typeof e==`string`&&(e.match(rb)?.length||0)+(e.match(xb)?.length||0)>0}var Cb=`number`,wb=`color`,Tb=`var`,Eb=`var(`,Db="${}",Ob=/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 kb(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Ob,e=>(bb.test(e)?(r.color.push(a),i.push(wb),n.push(bb.parse(e))):e.startsWith(Eb)?(r.var.push(a),i.push(Tb),n.push(e)):(r.number.push(a),i.push(Cb),n.push(parseFloat(e))),++a,Db)).split(Db),indexes:r,types:i}}function Ab(e){return kb(e).values}function jb({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===Cb?i+=nb(r[a]):e===wb?i+=bb.transform(r[a]):i+=r[a]}return i}}function Mb(e){return jb(kb(e))}var Nb=e=>typeof e==`number`?0:bb.test(e)?bb.getAnimatableNone(e):e,Pb=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Nb(e);function Fb(e){let t=kb(e);return jb(t)(t.values.map((e,n)=>Pb(e,t.split[n])))}var Ib={test:Sb,parse:Ab,createTransformer:Mb,getAnimatableNone:Fb};function Lb(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Rb({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Lb(s,r,e+1/3),a=Lb(s,r,e),o=Lb(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function zb(e,t){return n=>n>0?t:e}var Bb=(e,t,n)=>e+(t-e)*n,Vb=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Hb=[fb,ub,yb],Ub=e=>Hb.find(t=>t.test(e));function Wb(e){let t=Ub(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===yb&&(n=Rb(n)),n}var Gb=(e,t)=>{let n=Wb(e),r=Wb(t);if(!n||!r)return zb(e,t);let i={...n};return e=>(i.red=Vb(n.red,r.red,e),i.green=Vb(n.green,r.green,e),i.blue=Vb(n.blue,r.blue,e),i.alpha=Bb(n.alpha,r.alpha,e),ub.transform(i))},Kb=new Set([`none`,`hidden`]);function qb(e,t){return Kb.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Jb(e,t){return n=>Bb(e,t,n)}function Yb(e){return typeof e==`number`?Jb:typeof e==`string`?Xy(e)?zb:bb.test(e)?Gb:$b:Array.isArray(e)?Xb:typeof e==`object`?bb.test(e)?Gb:Zb:zb}function Xb(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Yb(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Zb(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Yb(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Qb(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var $b=(e,t)=>{let n=Ib.createTransformer(t),r=kb(e),i=kb(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Kb.has(e)&&!i.values.length||Kb.has(t)&&!r.values.length?qb(e,t):oy(Xb(Qb(r,i),i.values),n):(`${e}${t}`,zb(e,t))};function ex(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?Bb(e,t,n):Yb(e)(e,t)}var tx=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>zy.update(t,e),stop:()=>By(t),now:()=>Vy.isProcessing?Vy.timestamp:Gy.now()}},nx=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},rx=2e4;function ix(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function ax(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(ix(r),rx);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:uy(i)}}var ox={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};function sx(e,t){return e*Math.sqrt(1-t*t)}var cx=12;function lx(e,t,n){let r=n;for(let n=1;n<cx;n++)r-=e(r)/t(r);return r}var ux=.001;function dx({duration:e=ox.duration,bounce:t=ox.bounce,velocity:n=ox.velocity,mass:r=ox.mass}){let i,a;ox.maxDuration;let o=1-t;o=$v(ox.minDamping,ox.maxDamping,o),e=$v(ox.minDuration,ox.maxDuration,uy(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=sx(t,o),c=Math.exp(-i);return ux-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=sx(t**2,o);return(-i(t)+ux>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=lx(i,a,s);if(e=ly(e),isNaN(c))return{stiffness:ox.stiffness,damping:ox.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var fx=[`duration`,`bounce`],px=[`stiffness`,`damping`,`mass`];function mx(e,t){return t.some(t=>e[t]!==void 0)}function hx(e){let t={velocity:ox.velocity,stiffness:ox.stiffness,damping:ox.damping,mass:ox.mass,isResolvedFromDuration:!1,...e};if(!mx(e,px)&&mx(e,fx))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*$v(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:ox.mass,stiffness:i,damping:a}}else{let n=dx({...e,velocity:0});t={...t,...n,mass:ox.mass},t.isResolvedFromDuration=!0}return t}function gx(e=ox.visualDuration,t=ox.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=hx({...n,velocity:-uy(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=uy(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?ox.restSpeed.granular:ox.restSpeed.default,i||=v?ox.restDelta.granular:ox.restDelta.default;let y,b,x,S,C,w;if(h<1)x=sx(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>ly(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=ly(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=ly(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(ix(T),rx),t=nx(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}gx.applyToOptions=e=>{let t=ax(e,100,gx);return e.ease=t.ease,e.duration=ly(t.duration),e.type=`keyframes`,e};var _x=5;function vx(e,t,n){let r=Math.max(t-_x,0);return dy(n-e(r),t-r)}function yx({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=gx({keyframes:[f.value,m(f.value)],velocity:vx(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function bx(e,t,n){let r=[],i=n||ey.mix||ex,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=oy(Array.isArray(t)?t[n]||ay:t,a)),r.push(a)}return r}function xx(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=bx(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=sy(e[r],e[r+1],n);return s[r](i)};return n?t=>l($v(e[0],e[a-1],t)):l}function Sx(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=sy(0,t,r);e.push(Bb(n,1,i))}}function Cx(e){let t=[0];return Sx(t,e.length-1),t}function wx(e,t){return e.map(e=>e*t)}function Tx(e,t){return e.map(()=>t||Oy).splice(0,e.length-1)}function Ex({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=ky(r)?r.map(Ny):Ny(r),a={done:!1,value:t[0]},o=xx(wx(n&&n.length===t.length?n:Cx(t),e),t,{ease:Array.isArray(i)?i:Tx(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Dx=e=>e!==null;function Ox(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Dx),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var kx={decay:yx,inertia:yx,tween:Ex,keyframes:Ex,spring:gx};function Ax(e){typeof e.type==`string`&&(e.type=kx[e.type])}var jx=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},Mx=e=>e/100,Nx=class extends jx{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==Gy.now()&&this.tick(Gy.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},Ky.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Ax(e);let{type:t=Ex,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Ex;s!==Ex&&typeof o[0]!=`number`&&(this.mixKeyframes=oy(Mx,ex(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=ix(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=$v(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==yx&&(b.value=Ox(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return uy(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+uy(e)}get time(){return uy(this.currentTime)}set time(e){e=ly(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return vx(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Gy.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=uy(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=tx,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,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(Gy.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,Ky.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function Px(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Fx=e=>e*180/Math.PI,Ix=e=>Rx(Fx(Math.atan2(e[1],e[0]))),Lx={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ix,rotateZ:Ix,skewX:e=>Fx(Math.atan(e[1])),skewY:e=>Fx(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Rx=e=>(e%=360,e<0&&(e+=360),e),zx=Ix,Bx=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Vx=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Hx={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Bx,scaleY:Vx,scale:e=>(Bx(e)+Vx(e))/2,rotateX:e=>Rx(Fx(Math.atan2(e[6],e[5]))),rotateY:e=>Rx(Fx(Math.atan2(-e[2],e[0]))),rotateZ:zx,rotate:zx,skewX:e=>Fx(Math.atan(e[4])),skewY:e=>Fx(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ux(e){return+!!e.includes(`scale`)}function Wx(e,t){if(!e||e===`none`)return Ux(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=Hx,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Lx,i=t}if(!i)return Ux(t);let a=r[t],o=i[1].split(`,`).map(Kx);return typeof a==`function`?a(o):o[a]}var Gx=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Wx(n,t)};function Kx(e){return parseFloat(e.trim())}var qx=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Jx=new Set([...qx,`pathRotation`]),Yx=e=>e===$y||e===Y,Xx=new Set([`x`,`y`,`z`]),Zx=qx.filter(e=>!Xx.has(e));function Qx(e){let t=[];return Zx.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var $x={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-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})=>Wx(t,`x`),y:(e,{transform:t})=>Wx(t,`y`)};$x.translateX=$x.x,$x.translateY=$x.y;var eS=new Set,tS=!1,nS=!1,rS=!1;function iS(){if(nS){let e=Array.from(eS).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=Qx(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}nS=!1,tS=!1,eS.forEach(e=>e.complete(rS)),eS.clear()}function aS(){eS.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(nS=!0)})}function oS(){rS=!0,aS(),iS(),rS=!1}var sS=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(eS.add(this),tS||(tS=!0,zy.read(aS),zy.resolveKeyframes(iS))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}Px(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),eS.delete(this)}cancel(){this.state===`scheduled`&&(eS.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},cS=e=>e.startsWith(`--`);function lS(e,t,n){cS(t)?e.style.setProperty(t,n):e.style[t]=n}var uS={};function dS(e,t){let n=iy(e);return()=>uS[t]??n()}var fS=dS(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),pS=dS(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),mS=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,hS={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:mS([0,.65,.55,1]),circOut:mS([.55,0,1,.45]),backIn:mS([.31,.01,.66,-.59]),backOut:mS([.33,1.53,.69,.99])};function gS(e,t){if(e)return typeof e==`function`?pS()?nx(e,t):`ease-out`:Ay(e)?mS(e):Array.isArray(e)?e.map(e=>gS(e,t)||hS.easeOut):hS[e]}function _S(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=gS(s,i);Array.isArray(d)&&(u.easing=d),Fy.value&&Ky.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return Fy.value&&p.finished.finally(()=>{Ky.waapi--}),p}function vS(e){return typeof e==`function`&&`applyToOptions`in e}function yS({type:e,...t}){return vS(e)&&pS()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var bS=class extends jx{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=yS(e);this.animation=_S(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Ox(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),lS(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return uy(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+uy(e)}get time(){return uy(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ly(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&fS()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),ay):r(this)}},xS={anticipate:Sy,backInOut:xy,circInOut:Ty};function SS(e){return e in xS}function CS(e){typeof e.ease==`string`&&SS(e.ease)&&(e.ease=xS[e.ease])}var wS=10,TS=class extends bS{constructor(e){CS(e),Ax(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new Nx({...a,autoplay:!1}),s=Math.max(wS,Gy.now()-this.startTime),c=$v(0,wS,s-wS),l=o.sample(s).value,{name:u}=this.options;i&&u&&lS(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},ES=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Ib.test(e)||e===`0`)&&!e.startsWith(`url(`));function DS(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function OS(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=ES(i,t),s=ES(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:DS(e)||(n===`spring`||vS(n))&&r}function kS(e){e.duration=0,e.type=`keyframes`}var AS=new Set([`opacity`,`clipPath`,`filter`,`transform`]),jS=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function MS(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&jS.test(e[t]))return!0;return!1}var NS=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),PS=iy(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function FS(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return PS()&&n&&(AS.has(n)||NS.has(n)&&MS(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var IS=40,LS=class extends jx{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Gy.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||sS;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=Gy.now();let u=!0;OS(e,i,a,o)||(u=!1,(ey.instantAnimations||!s)&&l?.(Ox(e,n,t)),e[0]=e[e.length-1],kS(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>IS?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&FS(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new TS({...d,element:p})}catch{m=new Nx(d)}else m=new Nx(d);m.finished.then(()=>{this.notifyFinished()}).catch(ay),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),oS()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function RS(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var zS=30,BS=e=>!isNaN(parseFloat(e)),VS={current:void 0},HS=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Gy.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Gy.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=BS(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new cy);let n=this.events[e].add(t);return e===`change`?()=>{n(),zy.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return VS.current&&VS.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=Gy.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>zS)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,zS);return dy(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),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(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function US(e,t){return new HS(e,t)}function WS(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function GS(e,t){let n=e?.[t]??e?.default??e;return n===e?n:WS(n,e)}var KS={type:`spring`,stiffness:500,damping:25,restSpeed:10},qS=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),JS={type:`keyframes`,duration:.8},YS={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},XS=(e,{keyframes:t})=>t.length>2?JS:Jx.has(e)?e.startsWith(`scale`)?qS(t[1]):KS:YS,ZS=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function QS(e){for(let t in e)if(!ZS.has(t))return!0;return!1}var $S=(e,t,n,r={},i,a)=>o=>{let s=GS(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=ly(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};QS(s)||Object.assign(u,XS(e,u)),u.duration&&=ly(u.duration),u.repeatDelay&&=ly(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(kS(u),u.delay===0&&(d=!0)),(ey.instantAnimations||ey.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,kS(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Ox(u.keyframes,s);if(e!==void 0){zy.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Nx(u):new LS(u)},eC=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function tC(e){let t=eC.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function nC(e,t,n=1){`${e}`;let[r,i]=tC(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return ty(e)?parseFloat(e):e}return Xy(i)?nC(i,t,n+1):i}function rC(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function iC(e,t,n,r){if(typeof t==`function`){let[i,a]=rC(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=rC(r);t=t(n===void 0?e.custom:n,i,a)}return t}function aC(e,t,n){let r=e.getProps();return iC(r,t,n===void 0?r.custom:n,e)}var oC=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...qx]),sC=e=>Array.isArray(e);function cC(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,US(n))}function lC(e){return sC(e)?e[e.length-1]||0:e}function uC(e,t){let{transitionEnd:n={},transition:r={},...i}=aC(e,t)||{};i={...i,...n};for(let t in i)cC(e,t,lC(i[t]))}var dC=e=>!!(e&&e.getVelocity);function fC(e){return!!(dC(e)&&e.add)}function pC(e,t){let n=e.getValue(`willChange`);if(fC(n))return n.add(t);if(!n&&ey.WillChange){let n=new ey.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function mC(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var hC=`data-`+mC(`framerAppearId`);function gC(e){return e.props[hC]}function _C({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function vC(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?WS(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&_C(f,t))continue;let o={delay:n,...GS(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){zy.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=gC(e);if(n){let e=window.MotionHandoffAnimation(n,t,zy);e!==null&&(o.startTime=e,p=!0)}}pC(e,t);let m=l??e.shouldReduceMotion;r.start($S(t,r,i,m&&oC.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>zy.update(()=>{o&&uC(e,o)});d.length?Promise.all(d).then(t):t()}return d}function yC(e,t,n={}){let r=aC(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(vC(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return bC(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function bC(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(yC(c,t,{...o,delay:n+(typeof r==`function`?0:r)+RS(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function xC(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>yC(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=yC(e,t,n);else{let i=typeof t==`function`?aC(e,t,n.custom):t;r=Promise.all(vC(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var SC={test:e=>e===`auto`,parse:e=>e},CC=e=>t=>t.test(e),wC=[$y,Y,hb,mb,_b,gb,SC],TC=e=>wC.find(CC(e));function EC(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||ry(e)}var DC=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function OC(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(rb)||[];if(!r)return e;let i=n.replace(r,``),a=+!!DC.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var kC=/\b([a-z-]*)\(.*?\)/gu,AC={...Ib,getAnimatableNone:e=>{let t=e.match(kC);return t?t.map(OC).join(` `):e}},jC={...Ib,getAnimatableNone:e=>{let t=Ib.parse(e);return Ib.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},MC={...$y,transform:Math.round},NC={borderWidth:Y,borderTopWidth:Y,borderRightWidth:Y,borderBottomWidth:Y,borderLeftWidth:Y,borderRadius:Y,borderTopLeftRadius:Y,borderTopRightRadius:Y,borderBottomRightRadius:Y,borderBottomLeftRadius:Y,width:Y,maxWidth:Y,height:Y,maxHeight:Y,top:Y,right:Y,bottom:Y,left:Y,inset:Y,insetBlock:Y,insetBlockStart:Y,insetBlockEnd:Y,insetInline:Y,insetInlineStart:Y,insetInlineEnd:Y,padding:Y,paddingTop:Y,paddingRight:Y,paddingBottom:Y,paddingLeft:Y,paddingBlock:Y,paddingBlockStart:Y,paddingBlockEnd:Y,paddingInline:Y,paddingInlineStart:Y,paddingInlineEnd:Y,margin:Y,marginTop:Y,marginRight:Y,marginBottom:Y,marginLeft:Y,marginBlock:Y,marginBlockStart:Y,marginBlockEnd:Y,marginInline:Y,marginInlineStart:Y,marginInlineEnd:Y,fontSize:Y,backgroundPositionX:Y,backgroundPositionY:Y,rotate:mb,pathRotation:mb,rotateX:mb,rotateY:mb,rotateZ:mb,scale:tb,scaleX:tb,scaleY:tb,scaleZ:tb,skew:mb,skewX:mb,skewY:mb,distance:Y,translateX:Y,translateY:Y,translateZ:Y,x:Y,y:Y,z:Y,perspective:Y,transformPerspective:Y,opacity:eb,originX:vb,originY:vb,originZ:Y,zIndex:MC,fillOpacity:eb,strokeOpacity:eb,numOctaves:MC},PC={...NC,color:bb,backgroundColor:bb,outlineColor:bb,fill:bb,stroke:bb,borderColor:bb,borderTopColor:bb,borderRightColor:bb,borderBottomColor:bb,borderLeftColor:bb,filter:AC,WebkitFilter:AC,mask:jC,WebkitMask:jC},FC=e=>PC[e],IC=new Set([AC,jC]);function LC(e,t){let n=FC(e);return IC.has(n)||(n=Ib),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var RC=new Set([`auto`,`none`,`0`]);function zC(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!RC.has(t)&&kb(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=LC(n,i)}var BC=class extends sS{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Xy(r))){let i=nC(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!oC.has(n)||e.length!==2)return;let[r,i]=e,a=TC(r),o=TC(i);if(Qy(r)!==Qy(i)&&$x[n]){this.needsMeasurement=!0;return}if(a!==o)if(Yx(a)&&Yx(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else $x[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||EC(e[t]))&&n.push(t);n.length&&zC(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=$x[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=$x[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function VC(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var HC=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function UC(e){return ny(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:WC,cancel:GC}=Ry(queueMicrotask,!1),KC={x:!1,y:!1};function qC(){return KC.x||KC.y}function JC(e){return e===`x`||e===`y`?KC[e]?null:(KC[e]=!0,()=>{KC[e]=!1}):KC.x||KC.y?null:(KC.x=KC.y=!0,()=>{KC.x=KC.y=!1})}function YC(e,t){let n=VC(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function XC(e){return!(e.pointerType===`touch`||qC())}function ZC(e,t,n={}){let[r,i,a]=YC(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!XC(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var QC=(e,t)=>t?e===t?!0:QC(e,t.parentElement):!1,$C=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,ew=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function tw(e){return ew.has(e.tagName)||e.isContentEditable===!0}var nw=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function rw(e){return nw.has(e.tagName)||e.isContentEditable===!0}var iw=new WeakSet;function aw(e){return t=>{t.key===`Enter`&&e(t)}}function ow(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var sw=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=aw(()=>{if(iw.has(n))return;ow(n,`down`);let e=aw(()=>{ow(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>ow(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function cw(e){return $C(e)&&!qC()}var lw=new WeakSet;function uw(e,t,n={}){let[r,i,a]=YC(e,n),o=e=>{let r=e.currentTarget;if(!cw(e)||lw.has(e))return;iw.add(r),n.stopPropagation&&lw.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),iw.has(r)&&iw.delete(r),cw(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||QC(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),UC(e)&&(e.addEventListener(`focus`,e=>sw(e,i)),!tw(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function dw(e){return ny(e)&&`ownerSVGElement`in e}var fw=new WeakMap,pw,mw=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:dw(r)&&`getBBox`in r?r.getBBox()[t]:r[n],hw=mw(`inline`,`width`,`offsetWidth`),gw=mw(`block`,`height`,`offsetHeight`);function _w({target:e,borderBoxSize:t}){fw.get(e)?.forEach(n=>{n(e,{get width(){return hw(e,t)},get height(){return gw(e,t)}})})}function vw(e){e.forEach(_w)}function yw(){typeof ResizeObserver>`u`||(pw=new ResizeObserver(vw))}function bw(e,t){pw||yw();let n=VC(e);return n.forEach(e=>{let n=fw.get(e);n||(n=new Set,fw.set(e,n)),n.add(t),pw?.observe(e)}),()=>{n.forEach(e=>{let n=fw.get(e);n?.delete(t),n?.size||pw?.unobserve(e)})}}var xw=new Set,Sw;function Cw(){Sw=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};xw.forEach(t=>t(e))},window.addEventListener(`resize`,Sw)}function ww(e){return xw.add(e),Sw||Cw(),()=>{xw.delete(e),!xw.size&&typeof Sw==`function`&&(window.removeEventListener(`resize`,Sw),Sw=void 0)}}function Tw(e,t){return typeof e==`function`?ww(e):bw(e,t)}function Ew(e){return dw(e)&&e.tagName===`svg`}var Dw=[...wC,bb,Ib],Ow=e=>Dw.find(CC(e)),kw=()=>({translate:0,scale:1,origin:0,originPoint:0}),Aw=()=>({x:kw(),y:kw()}),jw=()=>({min:0,max:0}),Mw=()=>({x:jw(),y:jw()}),Nw=new WeakMap;function Pw(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function Fw(e){return typeof e==`string`||Array.isArray(e)}var Iw=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Lw=[`initial`,...Iw];function Rw(e){return Pw(e.animate)||Lw.some(t=>Fw(e[t]))}function zw(e){return!!(Rw(e)||e.variants)}function Bw(e,t,n){for(let r in t){let i=t[r],a=n[r];if(dC(i))e.addValue(r,i);else if(dC(a))e.addValue(r,US(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,US(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Vw={current:null},Hw={current:!1},Uw=typeof window<`u`;function Ww(){if(Hw.current=!0,Uw)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Vw.current=e.matches;e.addEventListener(`change`,t),t()}else Vw.current=!1}var Gw=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Kw={};function qw(e){Kw=e}function Jw(){return Kw}var Yw=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=sS,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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=()=>{let e=Gy.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,zy.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Rw(t),this.isVariantNode=zw(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&dC(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,Nw.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(Hw.current||Ww(),this.shouldReduceMotion=Vw.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),By(this.notifyUpdate),By(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&AS.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new bS({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:ly(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Jx.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&zy.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in Kw){let t=Kw[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Mw()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Gw.length;t++){let n=Gw[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Bw(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=US(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(ty(n)||ry(n))?n=parseFloat(n):!Ow(n)&&Ib.test(t)&&(n=LC(e,t)),this.setBaseTarget(e,dC(n)?n.get():n)),dC(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=iC(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!dC(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new cy),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){WC.render(this.render)}},Xw=class extends Yw{constructor(){super(...arguments),this.KeyframeResolver=BC}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;dC(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},Zw=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function Qw({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function $w({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function eT(e,t){if(!t)return e;let 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 tT(e){return e===void 0||e===1}function nT({scale:e,scaleX:t,scaleY:n}){return!tT(e)||!tT(t)||!tT(n)}function rT(e){return nT(e)||iT(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function iT(e){return aT(e.x)||aT(e.y)}function aT(e){return e&&e!==`0%`}function oT(e,t,n){return n+t*(e-n)}function sT(e,t,n,r,i){return i!==void 0&&(e=oT(e,i,r)),oT(e,n,r)+t}function cT(e,t=0,n=1,r,i){e.min=sT(e.min,t,n,r,i),e.max=sT(e.max,t,n,r,i)}function lT(e,{x:t,y:n}){cT(e.x,t.translate,t.scale,t.originPoint),cT(e.y,n.translate,n.scale,n.originPoint)}var uT=.999999999999,dT=1.0000000000001;function fT(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(pT(e.x,-a.scroll.offset.x),pT(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,lT(e,o)),r&&rT(a.latestValues)&&gT(e,a.latestValues,a.layout?.layoutBox))}t.x<dT&&t.x>uT&&(t.x=1),t.y<dT&&t.y>uT&&(t.y=1)}function pT(e,t){e.min+=t,e.max+=t}function mT(e,t,n,r,i=.5){cT(e,t,n,Bb(e.min,e.max,i),r)}function hT(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function gT(e,t,n){let r=n??e;mT(e.x,hT(t.x,r.x),t.scaleX,t.scale,t.originX),mT(e.y,hT(t.y,r.y),t.scaleY,t.scale,t.originY)}function _T(e,t){return Qw(eT(e.getBoundingClientRect(),t))}function vT(e,t,n){let r=_T(e,n),{scroll:i}=t;return i&&(pT(r.x,i.offset.x),pT(r.y,i.offset.y)),r}var yT={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},bT=qx.length;function xT(e,t,n){let r=``,i=!0;for(let a=0;a<bT;a++){let o=qx[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=HC(s,NC[o]);if(!c){i=!1;let t=yT[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${HC(a,NC.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function ST(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(Jx.has(e)){o=!0;continue}else if(Jy(e)){i[e]=n;continue}else{let t=HC(n,NC[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=xT(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function CT(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function wT(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var TT={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(Y.test(e))e=parseFloat(e);else return e;return`${wT(e,t.target.x)}% ${wT(e,t.target.y)}%`}},ET={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Ib.parse(e);if(i.length>5)return r;let a=Ib.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Bb(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},DT={borderRadius:{...TT,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:TT,borderTopRightRadius:TT,borderBottomLeftRadius:TT,borderBottomRightRadius:TT,boxShadow:ET};function OT(e,{layout:t,layoutId:n}){return Jx.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!DT[e]||e===`opacity`)}function kT(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(dC(r[t])||i&&dC(i[t])||OT(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function AT(e){return window.getComputedStyle(e)}var jT=class extends Xw{constructor(){super(...arguments),this.type=`html`,this.renderInstance=CT}readValueFromInstance(e,t){if(Jx.has(t))return this.projection?.isProjecting?Ux(t):Gx(e,t);{let n=AT(e),r=(Jy(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return _T(e,t)}build(e,t,n){ST(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return kT(e,t,n)}},MT={offset:`stroke-dashoffset`,array:`stroke-dasharray`},NT={offset:`strokeDashoffset`,array:`strokeDasharray`};function PT(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?MT:NT;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var FT=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function IT(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(ST(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of FT)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&PT(d,i,a,o,!1)}var LT=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`]),RT=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function zT(e,t,n,r){CT(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(LT.has(n)?n:mC(n),t.attrs[n])}function BT(e,t,n){let r=kT(e,t,n);for(let n in e)if(dC(e[n])||dC(t[n])){let t=qx.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var VT=class extends Xw{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Mw}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Jx.has(t)){let e=FC(t);return e&&e.default||0}return t=LT.has(t)?t:mC(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return BT(e,t,n)}build(e,t,n){IT(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){zT(e,t,n,r)}mount(e){this.isSVGTag=RT(e.tagName),super.mount(e)}},HT=Lw.length;function UT(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&UT(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<HT;n++){let r=Lw[n],i=e.props[r];(Fw(i)||i===!1)&&(t[r]=i)}return t}function WT(e,t){if(!Array.isArray(t))return!1;let 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}var GT=[...Iw].reverse(),KT=Iw.length;function qT(e){return t=>Promise.all(t.map(({animation:t,options:n})=>xC(e,t,n)))}function JT(e){let t=qT(e),n=ZT(),r=!0,i=!1,a=t=>(n,r)=>{let i=aC(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=UT(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<KT;t++){let p=GT[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=Fw(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||Pw(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=YT(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=sC(t)&&sC(n)?!WT(t,n)||y:t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=aC(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=RS(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=aC(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=ZT(),i=!0}}}function YT(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!WT(t,e):!1}function XT(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ZT(){return{animate:XT(!0),whileInView:XT(),whileHover:XT(),whileTap:XT(),whileDrag:XT(),whileFocus:XT(),exit:XT()}}function QT(e,t){e.min=t.min,e.max=t.max}function $T(e,t){QT(e.x,t.x),QT(e.y,t.y)}function eE(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var tE=.9999,nE=1.0001,rE=-.01,iE=.01;function aE(e){return e.max-e.min}function oE(e,t,n){return Math.abs(e-t)<=n}function sE(e,t,n,r=.5){e.origin=r,e.originPoint=Bb(t.min,t.max,e.origin),e.scale=aE(n)/aE(t),e.translate=Bb(n.min,n.max,e.origin)-e.originPoint,(e.scale>=tE&&e.scale<=nE||isNaN(e.scale))&&(e.scale=1),(e.translate>=rE&&e.translate<=iE||isNaN(e.translate))&&(e.translate=0)}function cE(e,t,n,r){sE(e.x,t.x,n.x,r?r.originX:void 0),sE(e.y,t.y,n.y,r?r.originY:void 0)}function lE(e,t,n,r=0){e.min=(r?Bb(n.min,n.max,r):n.min)+t.min,e.max=e.min+aE(t)}function uE(e,t,n,r){lE(e.x,t.x,n.x,r?.x),lE(e.y,t.y,n.y,r?.y)}function dE(e,t,n,r=0){let i=r?Bb(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+aE(t)}function fE(e,t,n,r){dE(e.x,t.x,n.x,r?.x),dE(e.y,t.y,n.y,r?.y)}function pE(e,t,n,r,i){return e-=t,e=oT(e,1/n,r),i!==void 0&&(e=oT(e,1/i,r)),e}function mE(e,t=0,n=1,r=.5,i,a=e,o=e){if(hb.test(t)&&(t=parseFloat(t),t=Bb(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=Bb(a.min,a.max,r);e===a&&(s-=t),e.min=pE(e.min,t,n,s,i),e.max=pE(e.max,t,n,s,i)}function hE(e,t,[n,r,i],a,o){mE(e,t[n],t[r],t[i],t.scale,a,o)}var gE=[`x`,`scaleX`,`originX`],_E=[`y`,`scaleY`,`originY`];function vE(e,t,n,r){hE(e.x,t,gE,n?n.x:void 0,r?r.x:void 0),hE(e.y,t,_E,n?n.y:void 0,r?r.y:void 0)}function yE(e){return e.translate===0&&e.scale===1}function bE(e){return yE(e.x)&&yE(e.y)}function xE(e,t){return e.min===t.min&&e.max===t.max}function SE(e,t){return xE(e.x,t.x)&&xE(e.y,t.y)}function CE(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function wE(e,t){return CE(e.x,t.x)&&CE(e.y,t.y)}function TE(e){return aE(e.x)/aE(e.y)}function EE(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function DE(e){return[e(`x`),e(`y`)]}function OE(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var kE=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],AE=kE.length,jE=e=>typeof e==`string`?parseFloat(e):e,ME=e=>typeof e==`number`||Y.test(e);function NE(e,t,n,r,i,a){i?(e.opacity=Bb(0,n.opacity??1,FE(r)),e.opacityExit=Bb(t.opacity??1,0,IE(r))):a&&(e.opacity=Bb(t.opacity??1,n.opacity??1,r));for(let i=0;i<AE;i++){let a=kE[i],o=PE(t,a),s=PE(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||ME(o)===ME(s)?(e[a]=Math.max(Bb(jE(o),jE(s),r),0),(hb.test(s)||hb.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=Bb(t.rotate||0,n.rotate||0,r))}function PE(e,t){return e[t]===void 0?e.borderRadius:e[t]}var FE=LE(0,.5,wy),IE=LE(.5,.95,ay);function LE(e,t,n){return r=>r<e?0:r>t?1:n(sy(e,t,r))}function RE(e,t,n){let r=dC(e)?e:US(e);return r.start($S(``,r,t,n)),r.animation}function zE(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var BE=(e,t)=>e.depth-t.depth,VE=class{constructor(){this.children=[],this.isDirty=!1}add(e){Zv(this.children,e),this.isDirty=!0}remove(e){Qv(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(BE),this.isDirty=!1,this.children.forEach(e)}};function HE(e,t){let n=Gy.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(By(r),e(a-t))};return zy.setup(r,!0),()=>By(r)}function UE(e){return dC(e)?e.get():e}var WE=class{constructor(){this.members=[]}add(e){Zv(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(Qv(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(Qv(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},GE={hasAnimatedSinceResize:!0,hasEverUpdated:!1},KE={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},qE=[``,`X`,`Y`,`Z`],JE=1e3,YE=0;function XE(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ZE(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=gC(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,zy,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ZE(r)}function QE({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=YE++,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.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Fy.value&&(KE.nodes=KE.calculatedTargetDeltas=KE.calculatedProjections=0),this.nodes.forEach(tD),this.nodes.forEach(uD),this.nodes.forEach(dD),this.nodes.forEach(nD),Fy.addProjectionMetrics&&Fy.addProjectionMetrics(KE)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new VE)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new cy),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=dw(t)&&!Ew(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;zy.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=HE(i,250),GE.hasAnimatedSinceResize&&(GE.hasAnimatedSinceResize=!1,this.nodes.forEach(lD)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||vD,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!wE(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...GS(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||lD(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),By(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(fD),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ZE(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(aD),this.nodes.forEach(iD);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(oD);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(sD),this.nodes.forEach(cD),this.nodes.forEach($E),this.nodes.forEach(eD)):this.nodes.forEach(oD),this.clearAllSnapshots();let e=Gy.now();Vy.delta=$v(0,1e3/60,e-Vy.timestamp),Vy.timestamp=e,Vy.isProcessing=!0,Hy.update.process(Vy),Hy.preRender.process(Vy),Hy.render.process(Vy),Vy.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,WC.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(rD),this.sharedNodes.forEach(pD)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,zy.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){zy.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!aE(this.snapshot.measuredBox.x)&&!aE(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 e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=Mw(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!bE(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||rT(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),SD(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Mw();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(wD))){let{scroll:e}=this.root;e&&(pT(t.x,e.offset.x),pT(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Mw();if($T(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&$T(t,e),pT(t.x,i.offset.x),pT(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||Mw();$T(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(pT(r.x,-n.scroll.offset.x),pT(r.y,-n.scroll.offset.y)),rT(n.latestValues)&&gT(r,n.latestValues,n.layout?.layoutBox)}return rT(this.latestValues)&&gT(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=Mw();$T(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!rT(n.latestValues))continue;let r;n.instance&&(nT(n.latestValues)&&n.updateSnapshot(),r=Mw(),$T(r,n.measurePageBox())),vE(t,n.latestValues,n.snapshot?.layoutBox,r)}return rT(this.latestValues)&&vE(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}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!==Vy.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=Vy.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Mw(),this.targetWithTransforms=Mw()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),uE(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):$T(this.target,this.layout.layoutBox),lT(this.target,this.targetDelta)):$T(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),Fy.value&&KE.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||nT(this.parent.latestValues)||iT(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Mw(),this.relativeTargetOrigin=Mw(),fE(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),$T(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Vy.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;$T(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;fT(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Mw());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(eE(this.prevProjectionDelta.x,this.projectionDelta.x),eE(this.prevProjectionDelta.y,this.projectionDelta.y)),cE(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!EE(this.projectionDelta.x,this.prevProjectionDelta.x)||!EE(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Fy.value&&KE.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Aw(),this.projectionDelta=Aw(),this.projectionDeltaWithTransform=Aw()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=Aw();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=Mw(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!!(c&&!u&&this.options.crossfade===!0&&!this.path.some(_D));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=Bb(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=Bb(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(mD(o.x,e.x,n),mD(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(fE(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),gD(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&SE(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=Mw(),$T(f,this.relativeTarget)),c&&(this.animationValues=a,NE(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(By(this.pendingAnimation),void 0),this.pendingAnimation=zy.update(()=>{GE.hasAnimatedSinceResize=!0,Ky.layout++,this.motionValue||=US(0),this.motionValue.jump(0,!1),this.currentAnimation=RE(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{Ky.layout--},onComplete:()=>{Ky.layout--,e.onComplete&&e.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);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(JE),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&CD(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Mw();let t=aE(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=aE(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}$T(t,n),gT(t,i),cE(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new WE),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&XE(`z`,e,r,this.animationValues);for(let t=0;t<qE.length;t++)XE(`rotate${qE[t]}`,e,r,this.animationValues),XE(`skew${qE[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=UE(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=UE(t?.pointerEvents)||``),this.hasProjected&&!rT(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=OE(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in DT){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=DT[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?UE(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(iD),this.root.sharedNodes.clear()}}}function $E(e){e.updateLayout()}function eD(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)DE(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=aE(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;QT(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else CD(i,t.layoutBox,n)&&DE(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=aE(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Aw();cE(o,n,t.layoutBox);let s=Aw();a?cE(s,e.applyTransform(r,!0),t.measuredBox):cE(s,n,t.layoutBox);let c=!bE(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=Mw();fE(s,t.layoutBox,i.layoutBox,o);let c=Mw();fE(c,n,a.layoutBox,o),wE(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function tD(e){Fy.value&&KE.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function nD(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function rD(e){e.clearSnapshot()}function iD(e){e.clearMeasurements()}function aD(e){e.isLayoutDirty=!0,e.updateLayout()}function oD(e){e.isLayoutDirty=!1}function sD(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function cD(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function lD(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function uD(e){e.resolveTargetDelta()}function dD(e){e.calcProjection()}function fD(e){e.resetSkewAndRotation()}function pD(e){e.removeLeadSnapshot()}function mD(e,t,n){e.translate=Bb(t.translate,0,n),e.scale=Bb(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function hD(e,t,n,r){e.min=Bb(t.min,n.min,r),e.max=Bb(t.max,n.max,r)}function gD(e,t,n,r){hD(e.x,t.x,n.x,r),hD(e.y,t.y,n.y,r)}function _D(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var vD={duration:.45,ease:[.4,0,.1,1]},yD=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),bD=yD(`applewebkit/`)&&!yD(`chrome/`)?Math.round:ay;function xD(e){e.min=bD(e.min),e.max=bD(e.max)}function SD(e){xD(e.x),xD(e.y)}function CD(e,t,n){return e===`position`||e===`preserve-aspect`&&!oE(TE(t),TE(n),.2)}function wD(e){return e!==e.root&&e.scroll?.wasRoot}var TD=QE({attachResizeListener:(e,t)=>zE(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),ED={current:void 0},DD=QE({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ED.current){let e=new TD({});e.mount(window),e.setOptions({layoutScroll:!0}),ED.current=e}return ED.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),OD=(0,b.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function kD(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function AD(...e){return t=>{let n=!1,r=e.map(e=>{let r=kD(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():kD(e[t],null)}}}}function jD(...e){return b.useCallback(AD(...e),e)}var MD=class extends b.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(UC(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=UC(e)&&e.offsetWidth||0,r=UC(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function ND({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,b.useId)(),s=(0,b.useRef)(null),c=(0,b.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:l}=(0,b.useContext)(OD),u=jD(s,e.props?.ref??e?.ref);return(0,b.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!u)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);l&&(y.nonce=l);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
54
+ [data-motion-pop-id="${o}"] {
55
+ position: absolute !important;
56
+ width: ${e}px !important;
57
+ height: ${u}px !important;
58
+ ${_}px !important;
59
+ ${v}px !important;
60
+ }
61
+ `),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,C.jsx)(MD,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:b.cloneElement(e,{ref:u})})}var PD=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=Jv(FD),d=(0,b.useId)(),f=!0,p=(0,b.useMemo)(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>u.delete(e))}),[n,u,r]);return a&&f&&(p={...p}),(0,b.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),b.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,C.jsx)(ND,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,C.jsx)(Xv.Provider,{value:p,children:e})};function FD(){return new Map}function ID(e=!0){let t=(0,b.useContext)(Xv);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,b.useId)();(0,b.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,b.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var LD=e=>e.key||``;function RD(e){let t=[];return b.Children.forEach(e,e=>{(0,b.isValidElement)(e)&&t.push(e)}),t}var zD=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=ID(o),f=(0,b.useMemo)(()=>RD(e),[e]),p=o&&!u?[]:f.map(LD),m=(0,b.useRef)(!0),h=(0,b.useRef)(f),g=Jv(()=>new Map),_=(0,b.useRef)(new Set),[v,y]=(0,b.useState)(f),[x,S]=(0,b.useState)(f);Yv(()=>{m.current=!1,h.current=f;for(let e=0;e<x.length;e++){let t=LD(x[e]);p.includes(t)?(g.delete(t),_.current.delete(t)):g.get(t)!==!0&&g.set(t,!1)}},[x,p.length,p.join(`-`)]);let w=[];if(f!==v){let e=[...f];for(let t=0;t<x.length;t++){let n=x[t],r=LD(n);p.includes(r)||(e.splice(t,0,n),w.push(n))}return a===`wait`&&w.length&&(e=w),S(RD(e)),y(f),null}let{forceRender:T}=(0,b.useContext)(qv);return(0,C.jsx)(C.Fragment,{children:x.map(e=>{let v=LD(e),y=o&&!u?!1:f===x||p.includes(v);return(0,C.jsx)(PD,{isPresent:y,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:y?void 0:()=>{if(_.current.has(v))return;if(g.has(v))_.current.add(v),g.set(v,!0);else return;let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(T?.(),S(h.current),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},v)})})},BD=(0,b.createContext)({strict:!1}),VD={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`]},HD=!1;function UD(){if(HD)return;let e={};for(let t in VD)e[t]={isEnabled:e=>VD[t].some(t=>!!e[t])};qw(e),HD=!0}function WD(){return UD(),Jw()}function GD(e){let t=WD();for(let n in e)t[n]={...t[n],...e[n]};qw(t)}var KD=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.propagate.ignoreStrict.viewport`.split(`.`));function qD(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||KD.has(e)}var JD=c({default:()=>YD}),YD,XD=o((()=>{throw YD={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),ZD=e=>!qD(e);function QD(e){typeof e==`function`&&(ZD=t=>t.startsWith(`on`)?!qD(t):e(t))}try{QD((XD(),d(JD)).default)}catch{}function $D(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||dC(e[i])||(ZD(i)||n===!0&&qD(i)||!t&&!qD(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var eO=(0,b.createContext)({});function tO(e,t){if(Rw(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Fw(t)?t:void 0,animate:Fw(n)?n:void 0}}return e.inherit===!1?{}:t}function nO(e){let{initial:t,animate:n}=tO(e,(0,b.useContext)(eO));return(0,b.useMemo)(()=>({initial:t,animate:n}),[rO(t),rO(n)])}function rO(e){return Array.isArray(e)?e.join(` `):e}var iO=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function aO(e,t,n){for(let r in t)!dC(t[r])&&!OT(r,n)&&(e[r]=t[r])}function oO({transformTemplate:e},t){return(0,b.useMemo)(()=>{let n=iO();return ST(n,t,e),Object.assign({},n.vars,n.style)},[t])}function sO(e,t){let n=e.style||{},r={};return aO(r,n,e),Object.assign(r,oO(e,t)),r}function cO(e,t){let n={},r=sO(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}var lO=()=>({...iO(),attrs:{}});function uO(e,t,n,r){let i=(0,b.useMemo)(()=>{let n=lO();return IT(n,t,RT(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};aO(t,e.style,e),i.style={...t,...i.style}}return i}var dO=[`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 fO(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(dO.indexOf(e)>-1||/[A-Z]/u.test(e))}function pO(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??fO(e)?uO:cO)(t,r,i,e),c=$D(t,typeof e==`string`,a),l=e===b.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,b.useMemo)(()=>dC(u)?u.get():u,[u]);return(0,b.createElement)(e,{...l,children:d})}function mO({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:hO(n,r,i,e),renderState:t()}}function hO(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=UE(a[e]);let{initial:o,animate:s}=e,c=Rw(e),l=zw(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Pw(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=iC(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var gO=e=>(t,n)=>{let r=(0,b.useContext)(eO),i=(0,b.useContext)(Xv),a=()=>mO(e,t,r,i);return n?a():Jv(a)},_O=gO({scrapeMotionValuesFromProps:kT,createRenderState:iO}),vO=gO({scrapeMotionValuesFromProps:BT,createRenderState:lO}),yO=Symbol.for(`motionComponentSymbol`);function bO(e,t,n){let r=(0,b.useRef)(n);(0,b.useInsertionEffect)(()=>{r.current=n});let i=(0,b.useRef)(null);return(0,b.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}var xO=(0,b.createContext)({});function SO(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function CO(e,t,n,r,i,a){let{visualElement:o}=(0,b.useContext)(eO),s=(0,b.useContext)(BD),c=(0,b.useContext)(Xv),l=(0,b.useContext)(OD),u=l.reducedMotion,d=l.skipAnimations,f=(0,b.useRef)(null),p=(0,b.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,b.useContext)(xO);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&wO(f.current,n,i,h);let g=(0,b.useRef)(!1);(0,b.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[hC],v=(0,b.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return Yv(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,b.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function wO(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:TO(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&SO(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function TO(e){if(e)return e.options.allowProjection===!1?TO(e.parent):e.projection}function EO(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&GD(r);let a=n?n===`svg`:fO(e),o=a?vO:_O;function s(n,s){let c,l={...(0,b.useContext)(OD),...n,layoutId:DO(n)},{isStatic:u}=l,d=nO(n),f=o(n,u);if(!u&&typeof window<`u`){OO(l,r);let t=kO(l);c=t.MeasureLayout,d.visualElement=CO(e,f,l,i,t.ProjectionNode,a)}return(0,C.jsxs)(eO.Provider,{value:d,children:[c&&d.visualElement?(0,C.jsx)(c,{visualElement:d.visualElement,...l}):null,pO(e,n,bO(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,b.forwardRef)(s);return c[yO]=e,c}function DO({layoutId:e}){let t=(0,b.useContext)(qv).id;return t&&e!==void 0?t+`-`+e:e}function OO(e,t){(0,b.useContext)(BD).strict}function kO(e){let{drag:t,layout:n}=WD();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function AO(e,t){if(typeof Proxy>`u`)return EO;let n=new Map,r=(n,r)=>EO(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,EO(a,void 0,e,t)),n.get(a))})}var jO=(e,t)=>t.isSVG??fO(e)?new VT(t):new jT(t,{allowProjection:e!==b.Fragment}),MO=class extends Zw{constructor(e){super(e),e.animationState||=JT(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Pw(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},NO=0,PO={animation:{Feature:MO},exit:{Feature:class extends Zw{constructor(){super(...arguments),this.id=NO++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`||typeof e==`object`&&e&&!Array.isArray(e)){let n=aC(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function FO(e){return{point:{x:e.pageX,y:e.pageY}}}var IO=e=>t=>$C(t)&&e(t,FO(t));function LO(e,t,n,r){return zE(e,t,IO(n),r)}var RO=({current:e})=>e?e.ownerDocument.defaultView:null,zO=(e,t)=>Math.abs(e-t);function BO(e,t){let n=zO(e.x,t.x),r=zO(e.y,t.y);return Math.sqrt(n**2+r**2)}var VO=new Set([`auto`,`scroll`]),HO=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=UO(this.lastRawMoveEventInfo,this.transformPagePoint));let e=GO(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=BO(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=Vy;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=UO(t,this.transformPagePoint),zy.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=GO(e.type===`pointercancel`?this.lastMoveEventInfo:UO(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!$C(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=UO(FO(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=Vy;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,GO(s,this.history)),this.removeListeners=oy(LO(this.contextWindow,`pointermove`,this.handlePointerMove),LO(this.contextWindow,`pointerup`,this.handlePointerUp),LO(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(VO.has(e.overflowX)||VO.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),zy.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),By(this.updatePoint)}};function UO(e,t){return t?{point:t(e.point)}:e}function WO(e,t){return{x:e.x-t.x,y:e.y-t.y}}function GO({point:e},t){return{point:e,delta:WO(e,qO(t)),offset:WO(e,KO(t)),velocity:JO(t,.1)}}function KO(e){return e[0]}function qO(e){return e[e.length-1]}function JO(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=qO(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ly(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>ly(t)*2&&(r=e[1]);let a=uy(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function YO(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Bb(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Bb(n,e,r.max):Math.min(e,n)),e}function XO(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function ZO(e,{top:t,left:n,bottom:r,right:i}){return{x:XO(e.x,n,i),y:XO(e.y,t,r)}}function QO(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 $O(e,t){return{x:QO(e.x,t.x),y:QO(e.y,t.y)}}function ek(e,t){let n=.5,r=aE(e),i=aE(t);return i>r?n=sy(t.min,t.max-r,e.min):r>i&&(n=sy(e.min,e.max-i,t.min)),$v(0,1,n)}function tk(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var nk=.35;function rk(e=nk){return e===!1?e=0:e===!0&&(e=nk),{x:ik(e,`left`,`right`),y:ik(e,`top`,`bottom`)}}function ik(e,t,n){return{min:ak(e,t),max:ak(e,n)}}function ak(e,t){return typeof e==`number`?e:e[t]||0}var ok=new WeakMap,sk=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Mw(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(FO(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=JC(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),DE(e=>{let t=this.getAxisMotionValue(e).get()||0;if(hb.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=aE(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&zy.update(()=>i(e,t),!1,!0),pC(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=dk(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&zy.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new HO(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:RO(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&zy.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!uk(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=YO(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&SO(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=ZO(n.layoutBox,e):this.constraints=!1,this.elastic=rk(t),r!==this.constraints&&!SO(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&DE(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=tk(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!SO(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=vT(n,r.root,this.visualElement.getTransformPagePoint()),a=$O(r.layout.layoutBox,i);if(t){let e=t($w(a));this.hasMutatedConstraints=!!e,e&&(a=Qw(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=DE(o=>{if(!uk(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return pC(this.visualElement,e),n.start($S(e,n,0,t,this.visualElement,!1))}stopAnimation(){DE(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){DE(t=>{let{drag:n}=this.getProps();if(!uk(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-Bb(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!SO(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};DE(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=ek({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),DE(t=>{if(!uk(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(Bb(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;ok.set(this.visualElement,this);let e=this.visualElement.current,t=LO(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&rw(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();SO(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=lk(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),zy.read(r);let o=zE(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(DE(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=nk,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function ck(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function lk(e,t,n){let r=Tw(e,ck(n)),i=Tw(t,ck(n));return()=>{r(),i()}}function uk(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function dk(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var fk=class extends Zw{constructor(e){super(e),this.removeGroupControls=ay,this.removeListeners=ay,this.controls=new sk(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ay}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},pk=e=>(t,n)=>{e&&zy.update(()=>e(t,n),!1,!0)},mk=class extends Zw{constructor(){super(...arguments),this.removePointerDownListener=ay}onPointerDown(e){this.session=new HO(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:RO(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:pk(e),onStart:pk(t),onMove:pk(n),onEnd:(e,t)=>{delete this.session,r&&zy.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=LO(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},hk=!1,gk=class extends b.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),hk&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),GE.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),hk=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||zy.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),WC.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;hk=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function _k(e){let[t,n]=ID(),r=(0,b.useContext)(qv);return(0,C.jsx)(gk,{...e,layoutGroup:r,switchLayoutGroup:(0,b.useContext)(xO),isPresent:t,safeToRemove:n})}var vk={pan:{Feature:mk},drag:{Feature:fk,ProjectionNode:DD,MeasureLayout:_k}};function yk(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&zy.postRender(()=>i(t,FO(t)))}var bk=class extends Zw{mount(){let{current:e}=this.node;e&&(this.unmount=ZC(e,(e,t)=>(yk(this.node,t,`Start`),e=>yk(this.node,e,`End`))))}unmount(){}},xk=class extends Zw{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!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=oy(zE(this.node.current,`focus`,()=>this.onFocus()),zE(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Sk(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&zy.postRender(()=>i(t,FO(t)))}var Ck=class extends Zw{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=uw(e,(e,t)=>(Sk(this.node,t,`Start`),(e,{success:t})=>Sk(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},wk=new WeakMap,Tk=new WeakMap,Ek=e=>{let t=wk.get(e.target);t&&t(e)},Dk=e=>{e.forEach(Ek)};function Ok({root:e,...t}){let n=e||document;Tk.has(n)||Tk.set(n,{});let r=Tk.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Dk,{root:e,...t})),r[i]}function kk(e,t,n){let r=Ok(t);return wk.set(e,n),r.observe(e),()=>{wk.delete(e),r.unobserve(e)}}var Ak={some:0,all:1},jk=class extends Zw{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Ak[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=kk(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Mk(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Mk({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Nk={inView:{Feature:jk},tap:{Feature:Ck},focus:{Feature:xk},hover:{Feature:bk}},Pk={layout:{ProjectionNode:DD,MeasureLayout:_k}},X=AO({...PO,...Nk,...vk,...Pk},jO);function Fk(){!Hw.current&&Ww();let[e]=(0,b.useState)(Vw.current);return e}var Ik={some:0,all:1};function Lk(e,t,{root:n,margin:r,amount:i=`some`}={}){let a=VC(e),o=new WeakMap,s=new IntersectionObserver(e=>{e.forEach(e=>{let n=o.get(e.target);if(e.isIntersecting!==!!n)if(e.isIntersecting){let n=t(e.target,e);typeof n==`function`?o.set(e.target,n):s.unobserve(e.target)}else typeof n==`function`&&(n(e),o.delete(e.target))})},{root:n,rootMargin:r,threshold:typeof i==`number`?i:Ik[i]});return a.forEach(e=>s.observe(e)),()=>s.disconnect()}function Rk(e,{root:t,margin:n,amount:r,once:i=!1,initial:a=!1}={}){let[o,s]=(0,b.useState)(a);return(0,b.useEffect)(()=>{if(!e.current||i&&o)return;let a=()=>(s(!0),i?void 0:()=>s(!1)),c={root:t&&t.current||void 0,margin:n,amount:r};return Lk(e.current,a,c)},[t,e,n,i,r]),o}var zk=[{delay:0,path:`M61 64H33a14 14 0 0 0-14 14v5`},{delay:.18,path:`M179 64h28a14 14 0 0 1 14 14v5`},{delay:.36,path:`M61 184H33a14 14 0 0 1-14-14v-5`},{delay:.54,path:`M179 184h28a14 14 0 0 0 14-14v-5`}];function Bk(){if(window.history.length>1){window.history.back();return}window.location.assign(`/`)}function Vk(){let e=Fk();return(0,C.jsx)(X.div,{"aria-hidden":`true`,className:`relative aspect-square w-full max-w-[min(62dvw,34dvh,19rem)] text-foreground sm:max-w-[min(52dvw,42dvh,22rem)] lg:max-w-[min(38dvw,56dvh,25rem)]`,initial:e?!1:{opacity:0,y:10,rotateX:8},animate:e?void 0:{opacity:1,y:0,rotateX:0},transition:{duration:.55,ease:[.22,1,.36,1]},style:{perspective:900},children:(0,C.jsxs)(X.svg,{viewBox:`0 0 240 240`,className:`h-full w-full drop-shadow-[0_24px_40px_oklch(0.2_0.01_260_/_0.12)]`,fill:`none`,animate:e?void 0:{rotateY:[-5,5],rotateX:[3,-3],y:[-4,4]},transition:{duration:4.8,repeat:1/0,repeatType:`mirror`,ease:[.22,1,.36,1]},children:[(0,C.jsxs)(X.g,{animate:e?void 0:{rotate:[0,360]},transition:{duration:22,repeat:1/0,ease:`linear`},style:{originX:`50%`,originY:`50%`},children:[(0,C.jsx)(`ellipse`,{cx:`120`,cy:`124`,rx:`92`,ry:`28`,stroke:`oklch(0.56 0.08 250 / 0.28)`,strokeWidth:`1.5`}),(0,C.jsx)(`ellipse`,{cx:`120`,cy:`124`,rx:`92`,ry:`28`,stroke:`oklch(0.56 0.08 250 / 0.18)`,strokeWidth:`1.5`,transform:`rotate(60 120 124)`}),(0,C.jsx)(`ellipse`,{cx:`120`,cy:`124`,rx:`92`,ry:`28`,stroke:`oklch(0.56 0.08 250 / 0.18)`,strokeWidth:`1.5`,transform:`rotate(120 120 124)`})]}),(0,C.jsx)(`rect`,{x:`64`,y:`57`,width:`112`,height:`134`,rx:`28`,fill:`oklch(0.985 0.006 250)`,stroke:`oklch(0.46 0.04 250 / 0.3)`,strokeWidth:`2`}),(0,C.jsx)(`rect`,{x:`79`,y:`76`,width:`82`,height:`61`,rx:`20`,fill:`oklch(0.22 0.018 250)`}),(0,C.jsx)(X.rect,{x:`92`,y:`96`,width:`18`,height:`14`,rx:`7`,fill:`oklch(0.79 0.11 188)`,animate:e?void 0:{opacity:[.45,1,.45]},transition:{duration:2.2,repeat:1/0,ease:`easeInOut`}}),(0,C.jsx)(X.rect,{x:`130`,y:`96`,width:`18`,height:`14`,rx:`7`,fill:`oklch(0.79 0.11 188)`,animate:e?void 0:{opacity:[1,.45,1]},transition:{duration:2.2,repeat:1/0,ease:`easeInOut`}}),(0,C.jsx)(`path`,{d:`M98 124c7 6 37 6 44 0`,stroke:`oklch(0.79 0.11 188)`,strokeWidth:`4`,strokeLinecap:`round`}),(0,C.jsx)(`rect`,{x:`99`,y:`37`,width:`42`,height:`18`,rx:`9`,fill:`oklch(0.985 0.006 250)`,stroke:`oklch(0.46 0.04 250 / 0.3)`,strokeWidth:`2`}),(0,C.jsx)(`path`,{d:`M120 37V23`,stroke:`oklch(0.46 0.04 250 / 0.45)`,strokeWidth:`2`,strokeLinecap:`round`}),(0,C.jsx)(X.path,{d:`M120 20h.01`,stroke:`oklch(0.79 0.11 188)`,strokeWidth:`8`,strokeLinecap:`round`,animate:e?void 0:{opacity:[.35,1,.35]},transition:{duration:1.9,repeat:1/0,ease:`easeInOut`}}),(0,C.jsx)(`rect`,{x:`52`,y:`102`,width:`18`,height:`42`,rx:`9`,fill:`oklch(0.93 0.012 250)`,stroke:`oklch(0.46 0.04 250 / 0.24)`}),(0,C.jsx)(`rect`,{x:`170`,y:`102`,width:`18`,height:`42`,rx:`9`,fill:`oklch(0.93 0.012 250)`,stroke:`oklch(0.46 0.04 250 / 0.24)`}),(0,C.jsx)(`path`,{d:`M92 158h56`,stroke:`oklch(0.46 0.04 250 / 0.26)`,strokeWidth:`2`,strokeLinecap:`round`}),(0,C.jsx)(`path`,{d:`M104 171h32`,stroke:`oklch(0.46 0.04 250 / 0.18)`,strokeWidth:`2`,strokeLinecap:`round`}),zk.map(t=>(0,C.jsx)(X.path,{d:t.path,stroke:`oklch(0.79 0.11 188 / 0.78)`,strokeWidth:`2`,strokeLinecap:`round`,strokeDasharray:`6 16`,initial:e?!1:{pathLength:0,opacity:0},animate:e?void 0:{pathLength:[0,1,0],opacity:[0,.8,0]},transition:{delay:t.delay,duration:2.8,repeat:1/0,ease:[.22,1,.36,1]}},t.path))]})})}function Hk({className:e}){return(0,C.jsxs)(`main`,{className:K(`relative grid h-dvh max-h-dvh min-h-0 overflow-hidden bg-[oklch(0.985_0.006_250)] text-[oklch(0.18_0.012_250)] dark:bg-[oklch(0.16_0.014_250)] dark:text-[oklch(0.96_0.006_250)]`,e),children:[(0,C.jsx)(`div`,{className:`pointer-events-none absolute inset-0 bg-[linear-gradient(oklch(0.46_0.035_250_/_0.08)_1px,transparent_1px),linear-gradient(90deg,oklch(0.46_0.035_250_/_0.08)_1px,transparent_1px)] [mask-image:radial-gradient(ellipse_at_center,black_18%,transparent_72%)] bg-[size:36px_36px]`}),(0,C.jsxs)(`section`,{className:`relative mx-auto grid h-full w-full max-w-6xl grid-rows-[1fr_auto] px-4 py-3 sm:px-6 sm:py-5 lg:px-8 lg:py-6 [@media(max-height:520px)]:py-2`,children:[(0,C.jsxs)(`div`,{className:`grid min-h-0 items-center gap-3 sm:gap-4 lg:grid-cols-[0.95fr_1.05fr] lg:gap-8`,children:[(0,C.jsxs)(X.div,{className:`order-2 flex min-h-0 flex-col items-center text-center lg:order-1 lg:items-start lg:text-left`,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.45,ease:[.22,1,.36,1]},children:[(0,C.jsx)(`p`,{className:`mb-3 rounded-md border border-[oklch(0.46_0.035_250_/_0.16)] bg-[oklch(0.97_0.008_250)] px-2.5 py-1 text-xs font-medium text-muted-foreground dark:bg-[oklch(0.22_0.018_250)] [@media(max-height:420px)]:hidden`,children:`Agent route check failed`}),(0,C.jsx)(`h1`,{className:`max-w-[12ch] text-5xl leading-none font-semibold tracking-normal sm:text-6xl lg:text-7xl [@media(max-height:520px)]:text-4xl`,children:`404`}),(0,C.jsx)(`p`,{className:`mt-3 max-w-[36rem] text-base leading-6 text-balance text-muted-foreground sm:text-lg [@media(max-height:520px)]:mt-2 [@media(max-height:520px)]:text-sm [@media(max-height:520px)]:leading-5`,children:`The agent reached a silent node. This page is not available in the current workspace.`}),(0,C.jsxs)(`div`,{className:`mt-6 flex flex-wrap items-center justify-center gap-2 lg:justify-start [@media(max-height:520px)]:mt-3`,children:[(0,C.jsxs)(q,{type:`button`,variant:`outline`,onClick:Bk,children:[(0,C.jsx)(Be,{}),`Back`]}),(0,C.jsx)(q,{asChild:!0,children:(0,C.jsxs)(`a`,{href:`/`,children:[(0,C.jsx)(vt,{}),`Dashboard`]})})]})]}),(0,C.jsx)(`div`,{className:`order-1 flex min-h-0 items-center justify-center lg:order-2`,children:(0,C.jsx)(Vk,{})})]}),(0,C.jsxs)(X.div,{className:`mx-auto flex w-full max-w-2xl items-center justify-center gap-2 overflow-hidden rounded-lg border border-[oklch(0.46_0.035_250_/_0.14)] bg-[oklch(0.97_0.008_250)] px-3 py-2 text-xs text-muted-foreground dark:bg-[oklch(0.22_0.018_250)] [@media(max-height:460px)]:hidden`,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:.18,duration:.45,ease:[.22,1,.36,1]},children:[(0,C.jsx)(`span`,{className:`h-1.5 w-1.5 shrink-0 rounded-sm bg-[oklch(0.79_0.11_188)]`}),(0,C.jsx)(`span`,{className:`truncate font-mono`,children:`request.path unresolved`})]})]})]})}var Uk=[.22,1,.36,1],Wk=.06,Gk=[`#22c55e`,`#3b82f6`,`#f97316`,`#eab308`,`#ec4899`,`#a855f7`];function Kk(e,t){return e+Math.random()*(t-e)}function qk(e){let t=Math.max(1,Math.min(e.particleCount??50,140)),n=`${(e.origin?.x??.5)*100}%`,r=`${(e.origin?.y??.5)*100}%`,i=e.angle??90,a=e.spread??60,o=e.startVelocity??30,s=Math.max(700,(e.ticks??60)*16);return Array.from({length:t},(t,c)=>{let l=(i+Kk(-a/2,a/2))*Math.PI/180,u=Kk(o*4,o*8);return{id:`${Date.now()}-${c}-${Math.random()}`,color:Gk[c%Gk.length],duration:s+Kk(-120,320),left:n,rotation:`${Kk(-540,540)}deg`,size:Kk(6,11),top:r,x:`${Math.cos(l)*u}px`,y:`${-Math.sin(l)*u+Kk(90,180)}px`,zIndex:e.zIndex}})}var Jk=(0,b.forwardRef)((e,t)=>{let{options:n,manualstart:r=!1,className:i,...a}=e,[o,s]=(0,b.useState)([]),c=(0,b.useRef)([]),l=(0,b.useCallback)((e={})=>{let t=qk({...n,...e}),r=new Set(t.map(e=>e.id)),i=Math.max(...t.map(e=>e.duration));s(e=>[...e,...t]);let a=window.setTimeout(()=>{s(e=>e.filter(e=>!r.has(e.id))),c.current=c.current.filter(e=>e!==a)},i+100);c.current.push(a)},[n]),u=(0,b.useMemo)(()=>({fire:l}),[l]);return(0,b.useImperativeHandle)(t,()=>u,[u]),(0,b.useEffect)(()=>{if(r)return;let e=window.setTimeout(()=>l(),0);return()=>window.clearTimeout(e)},[r,l]),(0,b.useEffect)(()=>()=>{c.current.forEach(e=>window.clearTimeout(e))},[]),(0,C.jsxs)(`div`,{className:i,...a,children:[(0,C.jsx)(`style`,{children:`@keyframes auth-confetti-burst { 0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0deg); } 100% { opacity: 0; transform: translate3d(var(--confetti-x), var(--confetti-y), 0) rotate(var(--confetti-rotation)); } }`}),o.map(e=>(0,C.jsx)(`span`,{className:`absolute block rounded-sm`,style:{"--confetti-rotation":e.rotation,"--confetti-x":e.x,"--confetti-y":e.y,animation:`auth-confetti-burst ${e.duration}ms cubic-bezier(0.16, 1, 0.3, 1) forwards`,backgroundColor:e.color,height:e.size,left:e.left,top:e.top,width:e.size,zIndex:e.zIndex}},e.id))]})});Jk.displayName=`Confetti`;function Yk({children:e,className:t,interval:n=2,transition:r={duration:.3,ease:Uk},variants:i,onIndexChange:a,stopOnEnd:o=!1}){let[s,c]=(0,b.useState)(0),l=Fk(),u=b.Children.toArray(e);(0,b.useEffect)(()=>{let e=n*1e3,t=setInterval(()=>{c(e=>{if(o&&e===u.length-1)return clearInterval(t),e;let n=(e+1)%u.length;return a?.(n),n})},e);return()=>clearInterval(t)},[u.length,n,a,o]);let d={initial:{y:l?0:20,opacity:0},animate:{y:0,opacity:1},exit:{y:l?0:-20,opacity:0}};return(0,C.jsx)(`div`,{className:K(`relative inline-block whitespace-nowrap`,t),children:(0,C.jsx)(zD,{mode:`popLayout`,initial:!1,children:(0,C.jsx)(X.div,{initial:`initial`,animate:`animate`,exit:`exit`,transition:r,variants:i||d,children:u[s]},s)})})}function Xk({children:e,className:t,variant:n,duration:r=.35,delay:i=0,yOffset:a=6,inView:o=!0,inViewMargin:s=`-50px`,blur:c=`6px`}){let l=(0,b.useRef)(null),u=Fk(),d=Rk(l,{once:!0,margin:s}),f=!o||d,p={hidden:{y:a,opacity:0,filter:`blur(${c})`},visible:{y:-a,opacity:1,filter:`blur(0px)`}},m=u?{hidden:{opacity:0},visible:{opacity:1}}:n||p;return(0,C.jsx)(X.div,{ref:l,initial:`hidden`,animate:f?`visible`:`hidden`,exit:`hidden`,variants:m,transition:{delay:u?0:.04+i,duration:u?.15:r,ease:Uk},className:t,children:e})}var Zk=wg(`all-unset relative isolate cursor-pointer rounded-full transition-[transform,box-shadow]`,{variants:{size:{default:`text-base font-medium`,sm:`text-sm font-medium`,lg:`text-lg font-medium`,icon:`h-10 w-10`}},defaultVariants:{size:`default`}}),Qk=wg(`glass-button-text relative block tracking-tighter select-none`,{variants:{size:{default:`px-6 py-3.5`,sm:`px-4 py-2`,lg:`px-8 py-4`,icon:`flex h-10 w-10 items-center justify-center`}},defaultVariants:{size:`default`}}),$k=b.forwardRef(({className:e,children:t,size:n,contentClassName:r,onClick:i,...a},o)=>(0,C.jsxs)(`div`,{className:K(`glass-button-wrap relative cursor-pointer rounded-full`,e),onClick:e=>{let t=e.currentTarget.querySelector(`button`);t&&e.target!==t&&t.click()},children:[(0,C.jsx)(`button`,{className:K(`glass-button relative z-10`,Zk({size:n})),ref:o,onClick:i,...a,children:(0,C.jsx)(`span`,{className:K(Qk({size:n}),r),children:t})}),(0,C.jsx)(`div`,{className:`glass-button-shadow pointer-events-none rounded-full`})]}));$k.displayName=`GlassButton`;var eA=({reduceMotion:e=!1})=>(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`style`,{children:` @keyframes float1 { 0% { transform: translate(0, 0); } 50% { transform: translate(-10px, 10px); } 100% { transform: translate(0, 0); } } @keyframes float2 { 0% { transform: translate(0, 0); } 50% { transform: translate(10px, -10px); } 100% { transform: translate(0, 0); } } `}),(0,C.jsxs)(`svg`,{width:`100%`,height:`100%`,viewBox:`0 0 800 600`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,preserveAspectRatio:`xMidYMid slice`,className:`absolute top-0 left-0 h-full w-full`,children:[(0,C.jsxs)(`defs`,{children:[(0,C.jsxs)(`linearGradient`,{id:`rev_grad1`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`,children:[(0,C.jsx)(`stop`,{offset:`0%`,style:{stopColor:`var(--color-primary)`,stopOpacity:.8}}),(0,C.jsx)(`stop`,{offset:`100%`,style:{stopColor:`var(--color-chart-3)`,stopOpacity:.6}})]}),(0,C.jsxs)(`linearGradient`,{id:`rev_grad2`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`,children:[(0,C.jsx)(`stop`,{offset:`0%`,style:{stopColor:`var(--color-chart-4)`,stopOpacity:.9}}),(0,C.jsx)(`stop`,{offset:`50%`,style:{stopColor:`var(--color-secondary)`,stopOpacity:.7}}),(0,C.jsx)(`stop`,{offset:`100%`,style:{stopColor:`var(--color-chart-1)`,stopOpacity:.6}})]}),(0,C.jsxs)(`radialGradient`,{id:`rev_grad3`,cx:`50%`,cy:`50%`,r:`50%`,children:[(0,C.jsx)(`stop`,{offset:`0%`,style:{stopColor:`var(--color-destructive)`,stopOpacity:.8}}),(0,C.jsx)(`stop`,{offset:`100%`,style:{stopColor:`var(--color-chart-5)`,stopOpacity:.4}})]}),(0,C.jsx)(`filter`,{id:`rev_blur1`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:(0,C.jsx)(`feGaussianBlur`,{stdDeviation:`35`})}),(0,C.jsx)(`filter`,{id:`rev_blur2`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:(0,C.jsx)(`feGaussianBlur`,{stdDeviation:`25`})}),(0,C.jsx)(`filter`,{id:`rev_blur3`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:(0,C.jsx)(`feGaussianBlur`,{stdDeviation:`45`})})]}),(0,C.jsxs)(`g`,{style:{animation:e?void 0:`float1 20s ease-in-out infinite`},children:[(0,C.jsx)(`ellipse`,{cx:`200`,cy:`500`,rx:`250`,ry:`180`,fill:`url(#rev_grad1)`,filter:`url(#rev_blur1)`,transform:`rotate(-30 200 500)`}),(0,C.jsx)(`rect`,{x:`500`,y:`100`,width:`300`,height:`250`,rx:`80`,fill:`url(#rev_grad2)`,filter:`url(#rev_blur2)`,transform:`rotate(15 650 225)`})]}),(0,C.jsxs)(`g`,{style:{animation:e?void 0:`float2 25s ease-in-out infinite`},children:[(0,C.jsx)(`circle`,{cx:`650`,cy:`450`,r:`150`,fill:`url(#rev_grad3)`,filter:`url(#rev_blur3)`,opacity:`0.7`}),(0,C.jsx)(`ellipse`,{cx:`50`,cy:`150`,rx:`180`,ry:`120`,fill:`var(--color-accent)`,filter:`url(#rev_blur2)`,opacity:`0.8`})]})]})]}),tA=[{message:`Signing you up...`,icon:(0,C.jsx)(xt,{className:`h-12 w-12 animate-spin text-primary`})},{message:`Onboarding you...`,icon:(0,C.jsx)(xt,{className:`h-12 w-12 animate-spin text-primary`})},{message:`Finalizing...`,icon:(0,C.jsx)(xt,{className:`h-12 w-12 animate-spin text-primary`})},{message:`Welcome Aboard!`,icon:(0,C.jsx)(jt,{className:`h-12 w-12 text-green-500`})}],nA=1.5,rA=({logo:e=(0,C.jsx)(Pv,{}),brandName:t=`Natroc`})=>{let[n,r]=(0,b.useState)(``),[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)(``),[c,l]=(0,b.useState)(``),[u,d]=(0,b.useState)(``),[f,p]=(0,b.useState)(!1),[m,h]=(0,b.useState)(!1),[g,_]=(0,b.useState)(`email`),[v,y]=(0,b.useState)(`closed`),[x,S]=(0,b.useState)(``),w=(0,b.useRef)(null),T=Fk(),E=n.trim().length>0,D=i.trim().length>0,O=/\S+@\S+\.\S+/.test(o),k=c.length>=6,A=u.length>=6,j=E&&D&&O,M=(0,b.useRef)(null),N=(0,b.useRef)(null),ee=()=>{if(T)return;let e=w.current?.fire;if(e){let t={startVelocity:30,spread:360,ticks:60,zIndex:100};e({...t,particleCount:50,origin:{x:0,y:1},angle:60}),e({...t,particleCount:50,origin:{x:1,y:1},angle:120})}},te=e=>{if(e.preventDefault(),!(v!==`closed`||g!==`confirmPassword`))if(c!==u)S(`Passwords do not match!`),y(`error`);else{y(`loading`);let e=(tA.length-1)*nA*1e3;setTimeout(()=>{ee(),y(`success`)},e)}},P=()=>{g===`email`?j&&_(`password`):g===`password`&&k&&_(`confirmPassword`)},F=e=>{e.key===`Enter`&&(e.preventDefault(),P())},ne=()=>{g===`confirmPassword`?(_(`password`),d(``)):g===`password`&&_(`email`)},re=()=>{y(`closed`),S(``)};(0,b.useEffect)(()=>{g===`password`?setTimeout(()=>M.current?.focus(),300):g===`confirmPassword`&&setTimeout(()=>N.current?.focus(),300)},[g]),(0,b.useEffect)(()=>{v===`success`&&ee()},[v]);let ie=(0,C.jsx)(zD,{children:v!==`closed`&&(0,C.jsx)(X.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,ease:Uk},className:`fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm`,children:(0,C.jsxs)(X.div,{initial:T?{opacity:0}:{scale:.9,opacity:0},animate:T?{opacity:1}:{scale:1,opacity:1},exit:T?{opacity:0}:{scale:.9,opacity:0},transition:{duration:.2,ease:Uk},className:`relative mx-2 flex w-full max-w-sm flex-col items-center gap-4 rounded-2xl border border-border bg-card/80 p-8`,children:[(v===`error`||v===`success`)&&(0,C.jsx)(`button`,{onClick:re,className:`absolute top-2 right-2 p-1 text-muted-foreground transition-colors hover:text-foreground`,children:(0,C.jsx)(qt,{className:`h-5 w-5`})}),v===`error`&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Qe,{className:`h-12 w-12 text-destructive`}),(0,C.jsx)(`p`,{className:`text-lg font-medium text-foreground`,children:x}),(0,C.jsx)($k,{onClick:re,size:`sm`,className:`mt-4`,children:`Try Again`})]}),v===`loading`&&(0,C.jsx)(Yk,{interval:nA,stopOnEnd:!0,children:tA.slice(0,-1).map((e,t)=>(0,C.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[e.icon,(0,C.jsx)(`p`,{className:`text-lg font-medium text-foreground`,children:e.message})]},t))}),v===`success`&&(0,C.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[tA[tA.length-1].icon,(0,C.jsx)(`p`,{className:`text-lg font-medium text-foreground`,children:tA[tA.length-1].message})]})]})})});return(0,C.jsxs)(`div`,{className:`flex min-h-dvh w-full flex-col bg-background`,children:[(0,C.jsx)(`style`,{children:`
62
+ input[type="password"]::-ms-reveal, input[type="password"]::-ms-clear { display: none !important; } input[type="password"]::-webkit-credentials-auto-fill-button, input[type="password"]::-webkit-strong-password-auto-fill-button { display: none !important; } input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, input:-webkit-autofill:active { -webkit-box-shadow: 0 0 0 30px transparent inset !important; -webkit-text-fill-color: var(--foreground) !important; background-color: transparent !important; background-clip: content-box !important; transition: background-color 5000s ease-in-out 0s !important; color: var(--foreground) !important; caret-color: var(--foreground) !important; } input:autofill { background-color: transparent !important; background-clip: content-box !important; -webkit-text-fill-color: var(--foreground) !important; color: var(--foreground) !important; } input:-internal-autofill-selected { background-color: transparent !important; background-image: none !important; color: var(--foreground) !important; -webkit-text-fill-color: var(--foreground) !important; } input:-webkit-autofill::first-line { color: var(--foreground) !important; -webkit-text-fill-color: var(--foreground) !important; }
63
+ @property --angle-1 { syntax: "<angle>"; inherits: false; initial-value: -75deg; } @property --angle-2 { syntax: "<angle>"; inherits: false; initial-value: -45deg; }
64
+ .glass-button-wrap { --anim-time: 400ms; --anim-ease: cubic-bezier(0.25, 1, 0.5, 1); --border-width: clamp(1px, 0.0625em, 4px); position: relative; z-index: 2; transform-style: preserve-3d; transition: transform var(--anim-time) var(--anim-ease); } .glass-button-wrap:has(.glass-button:active) { transform: rotateX(25deg); } .glass-button-shadow { --shadow-cutoff-fix: 2em; position: absolute; width: calc(100% + var(--shadow-cutoff-fix)); height: calc(100% + var(--shadow-cutoff-fix)); top: calc(0% - var(--shadow-cutoff-fix) / 2); left: calc(0% - var(--shadow-cutoff-fix) / 2); filter: blur(clamp(2px, 0.125em, 12px)); transition: filter var(--anim-time) var(--anim-ease); pointer-events: none; z-index: 0; } .glass-button-shadow::after { content: ""; position: absolute; inset: 0; border-radius: 9999px; background: linear-gradient(180deg, oklch(from var(--foreground) l c h / 20%), oklch(from var(--foreground) l c h / 10%)); width: calc(100% - var(--shadow-cutoff-fix) - 0.25em); height: calc(100% - var(--shadow-cutoff-fix) - 0.25em); top: calc(var(--shadow-cutoff-fix) - 0.5em); left: calc(var(--shadow-cutoff-fix) - 0.875em); padding: 0.125em; box-sizing: border-box; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; transition: all var(--anim-time) var(--anim-ease); opacity: 1; }
65
+ .glass-button { -webkit-tap-highlight-color: transparent; backdrop-filter: blur(clamp(1px, 0.125em, 4px)); transition: all var(--anim-time) var(--anim-ease); background: linear-gradient(-75deg, oklch(from var(--background) l c h / 5%), oklch(from var(--background) l c h / 20%), oklch(from var(--background) l c h / 5%)); box-shadow: inset 0 0.125em 0.125em oklch(from var(--foreground) l c h / 5%), inset 0 -0.125em 0.125em oklch(from var(--background) l c h / 50%), 0 0.25em 0.125em -0.125em oklch(from var(--foreground) l c h / 20%), 0 0 0.1em 0.25em inset oklch(from var(--background) l c h / 20%), 0 0 0 0 oklch(from var(--background) l c h); } .glass-button:hover { transform: scale(0.975); backdrop-filter: blur(0.01em); box-shadow: inset 0 0.125em 0.125em oklch(from var(--foreground) l c h / 5%), inset 0 -0.125em 0.125em oklch(from var(--background) l c h / 50%), 0 0.15em 0.05em -0.1em oklch(from var(--foreground) l c h / 25%), 0 0 0.05em 0.1em inset oklch(from var(--background) l c h / 50%), 0 0 0 0 oklch(from var(--background) l c h); } .glass-button-text { color: oklch(from var(--foreground) l c h / 90%); text-shadow: 0em 0.25em 0.05em oklch(from var(--foreground) l c h / 10%); transition: all var(--anim-time) var(--anim-ease); } .glass-button:hover .glass-button-text { text-shadow: 0.025em 0.025em 0.025em oklch(from var(--foreground) l c h / 12%); } .glass-button-text::after { content: ""; display: block; position: absolute; width: calc(100% - var(--border-width)); height: calc(100% - var(--border-width)); top: calc(0% + var(--border-width) / 2); left: calc(0% + var(--border-width) / 2); box-sizing: border-box; border-radius: 9999px; overflow: clip; background: linear-gradient(var(--angle-2), transparent 0%, oklch(from var(--background) l c h / 50%) 40% 50%, transparent 55%); z-index: 3; mix-blend-mode: screen; pointer-events: none; background-size: 200% 200%; background-position: 0% 50%; transition: background-position calc(var(--anim-time) * 1.25) var(--anim-ease), --angle-2 calc(var(--anim-time) * 1.25) var(--anim-ease); } .glass-button:hover .glass-button-text::after { background-position: 25% 50%; } .glass-button:active .glass-button-text::after { background-position: 50% 15%; --angle-2: -15deg; } .glass-button::after { content: ""; position: absolute; z-index: 1; inset: 0; border-radius: 9999px; width: calc(100% + var(--border-width)); height: calc(100% + var(--border-width)); top: calc(0% - var(--border-width) / 2); left: calc(0% - var(--border-width) / 2); padding: var(--border-width); box-sizing: border-box; background: conic-gradient(from var(--angle-1) at 50% 50%, oklch(from var(--foreground) l c h / 50%) 0%, transparent 5% 40%, oklch(from var(--foreground) l c h / 50%) 50%, transparent 60% 95%, oklch(from var(--foreground) l c h / 50%) 100%), linear-gradient(180deg, oklch(from var(--background) l c h / 50%), oklch(from var(--background) l c h / 50%)); mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; transition: all var(--anim-time) var(--anim-ease), --angle-1 500ms ease; box-shadow: inset 0 0 0 calc(var(--border-width) / 2) oklch(from var(--background) l c h / 50%); pointer-events: none; } .glass-button:hover::after { --angle-1: -125deg; } .glass-button:active::after { --angle-1: -75deg; } .glass-button-wrap:has(.glass-button:hover) .glass-button-shadow { filter: blur(clamp(2px, 0.0625em, 6px)); } .glass-button-wrap:has(.glass-button:hover) .glass-button-shadow::after { top: calc(var(--shadow-cutoff-fix) - 0.875em); opacity: 1; } .glass-button-wrap:has(.glass-button:active) .glass-button-shadow { filter: blur(clamp(2px, 0.125em, 12px)); } .glass-button-wrap:has(.glass-button:active) .glass-button-shadow::after { top: calc(var(--shadow-cutoff-fix) - 0.5em); opacity: 0.75; } .glass-button-wrap:has(.glass-button:active) .glass-button-text { text-shadow: 0.025em 0.25em 0.05em oklch(from var(--foreground) l c h / 12%); } .glass-button-wrap:has(.glass-button:active) .glass-button { box-shadow: inset 0 0.125em 0.125em oklch(from var(--foreground) l c h / 5%), inset 0 -0.125em 0.125em oklch(from var(--background) l c h / 50%), 0 0.125em 0.125em -0.125em oklch(from var(--foreground) l c h / 20%), 0 0 0.1em 0.25em inset oklch(from var(--background) l c h / 20%), 0 0.225em 0.05em 0 oklch(from var(--foreground) l c h / 5%), 0 0.25em 0 0 oklch(from var(--background) l c h / 75%), inset 0 0.25em 0.05em 0 oklch(from var(--foreground) l c h / 15%); } @media (hover: none) and (pointer: coarse) { .glass-button::after, .glass-button:hover::after, .glass-button:active::after { --angle-1: -75deg; } .glass-button .glass-button-text::after, .glass-button:active .glass-button-text::after { --angle-2: -45deg; } }
66
+ .glass-input-wrap { position: relative; z-index: 2; transform-style: preserve-3d; border-radius: 9999px; } .glass-input { display: flex; position: relative; width: 100%; min-height: 3rem; align-items: center; gap: 0.5rem; border-radius: 9999px; padding: 0.25rem; -webkit-tap-highlight-color: transparent; backdrop-filter: blur(clamp(1px, 0.125em, 4px)); transition: all 400ms cubic-bezier(0.25, 1, 0.5, 1); background: linear-gradient(-75deg, oklch(from var(--background) l c h / 5%), oklch(from var(--background) l c h / 20%), oklch(from var(--background) l c h / 5%)); box-shadow: inset 0 0.125em 0.125em oklch(from var(--foreground) l c h / 5%), inset 0 -0.125em 0.125em oklch(from var(--background) l c h / 50%), 0 0.25em 0.125em -0.125em oklch(from var(--foreground) l c h / 20%), 0 0 0.1em 0.25em inset oklch(from var(--background) l c h / 20%), 0 0 0 0 oklch(from var(--background) l c h); } .glass-input-wrap:focus-within .glass-input { backdrop-filter: blur(0.01em); box-shadow: inset 0 0.125em 0.125em oklch(from var(--foreground) l c h / 5%), inset 0 -0.125em 0.125em oklch(from var(--background) l c h / 50%), 0 0.15em 0.05em -0.1em oklch(from var(--foreground) l c h / 25%), 0 0 0.05em 0.1em inset oklch(from var(--background) l c h / 50%), 0 0 0 0 oklch(from var(--background) l c h); } .glass-input::after { content: ""; position: absolute; z-index: 1; inset: 0; border-radius: 9999px; width: calc(100% + clamp(1px, 0.0625em, 4px)); height: calc(100% + clamp(1px, 0.0625em, 4px)); top: calc(0% - clamp(1px, 0.0625em, 4px) / 2); left: calc(0% - clamp(1px, 0.0625em, 4px) / 2); padding: clamp(1px, 0.0625em, 4px); box-sizing: border-box; background: conic-gradient(from var(--angle-1) at 50% 50%, oklch(from var(--foreground) l c h / 50%) 0%, transparent 5% 40%, oklch(from var(--foreground) l c h / 50%) 50%, transparent 60% 95%, oklch(from var(--foreground) l c h / 50%) 100%), linear-gradient(180deg, oklch(from var(--background) l c h / 50%), oklch(from var(--background) l c h / 50%)); mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; transition: all 400ms cubic-bezier(0.25, 1, 0.5, 1), --angle-1 500ms ease; box-shadow: inset 0 0 0 calc(clamp(1px, 0.0625em, 4px) / 2) oklch(from var(--background) l c h / 50%); pointer-events: none; } .glass-input-wrap:focus-within .glass-input::after { --angle-1: -125deg; } .glass-input-text-area { position: absolute; inset: 0; border-radius: 9999px; pointer-events: none; } .glass-input-text-area::after { content: ""; display: block; position: absolute; width: calc(100% - clamp(1px, 0.0625em, 4px)); height: calc(100% - clamp(1px, 0.0625em, 4px)); top: calc(0% + clamp(1px, 0.0625em, 4px) / 2); left: calc(0% + clamp(1px, 0.0625em, 4px) / 2); box-sizing: border-box; border-radius: 9999px; overflow: clip; background: linear-gradient(var(--angle-2), transparent 0%, oklch(from var(--background) l c h / 50%) 40% 50%, transparent 55%); z-index: 3; mix-blend-mode: screen; pointer-events: none; background-size: 200% 200%; background-position: 0% 50%; transition: background-position calc(400ms * 1.25) cubic-bezier(0.25, 1, 0.5, 1), --angle-2 calc(400ms * 1.25) cubic-bezier(0.25, 1, 0.5, 1); } .glass-input-wrap:focus-within .glass-input-text-area::after { background-position: 25% 50%; }
67
+ @media (prefers-reduced-motion: reduce) { .glass-button:hover { transform: none; } .glass-button-wrap:has(.glass-button:active) { transform: none; } }
68
+ `}),(0,C.jsx)(Jk,{ref:w,manualstart:!0,className:`pointer-events-none fixed top-0 left-0 z-[999] h-full w-full`}),ie,(0,C.jsxs)(`div`,{className:`fixed top-5 left-1/2 z-20 flex -translate-x-1/2 items-center gap-2`,children:[e,(0,C.jsx)(`h1`,{className:`text-base font-bold text-foreground`,children:t})]}),(0,C.jsxs)(`div`,{className:K(`flex h-full w-full flex-1 items-center justify-center bg-card`,`relative overflow-hidden`),children:[(0,C.jsx)(`div`,{className:`absolute inset-0 z-0`,children:(0,C.jsx)(eA,{reduceMotion:!!T})}),(0,C.jsxs)(`fieldset`,{disabled:v!==`closed`,className:`relative z-10 mx-auto flex w-full max-w-xs flex-col items-center gap-8 p-4 [@media(max-height:760px)]:gap-5`,children:[(0,C.jsxs)(zD,{mode:`wait`,children:[g===`email`&&(0,C.jsxs)(X.div,{initial:T?!1:{y:6,opacity:0},animate:{y:0,opacity:1},exit:{opacity:0},transition:{duration:.3,ease:Uk},className:`flex w-full flex-col items-center gap-4`,children:[(0,C.jsx)(Xk,{delay:Wk*1,className:`w-full`,children:(0,C.jsx)(`div`,{className:`text-center`,children:(0,C.jsx)(`p`,{className:`text-3xl font-semibold tracking-tight text-balance text-foreground sm:text-4xl`,children:`Create an admin account`})})}),(0,C.jsx)(Xk,{delay:Wk*2,className:`w-full max-w-[400px]`,children:(0,C.jsx)(`p`,{className:`w-full text-center text-sm text-muted-foreground`,children:`Create your admin account to manage all configurations`})})]},`email-content`),g===`password`&&(0,C.jsxs)(X.div,{initial:T?!1:{y:6,opacity:0},animate:{y:0,opacity:1},exit:{opacity:0},transition:{duration:.3,ease:Uk},className:`flex w-full flex-col items-center gap-4 text-center`,children:[(0,C.jsx)(Xk,{delay:0,className:`w-full`,children:(0,C.jsx)(`div`,{className:`text-center`,children:(0,C.jsx)(`p`,{className:`text-3xl font-semibold tracking-tight text-balance text-foreground sm:text-4xl`,children:`Create an admin password`})})}),(0,C.jsx)(Xk,{delay:Wk*1,children:(0,C.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:`Your password must be at least 6 characters long.`})})]},`password-title`),g===`confirmPassword`&&(0,C.jsxs)(X.div,{initial:T?!1:{y:6,opacity:0},animate:{y:0,opacity:1},exit:{opacity:0},transition:{duration:.3,ease:Uk},className:`flex w-full flex-col items-center gap-4 text-center`,children:[(0,C.jsx)(Xk,{delay:0,className:`w-full`,children:(0,C.jsx)(`div`,{className:`text-center`,children:(0,C.jsx)(`p`,{className:`text-3xl font-semibold tracking-tight text-balance text-foreground sm:text-4xl`,children:`One Last Step`})})}),(0,C.jsx)(Xk,{delay:Wk*1,children:(0,C.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:`Confirm your admin password to continue`})})]},`confirm-title`)]}),(0,C.jsxs)(`form`,{onSubmit:te,className:`w-full space-y-6 [@media(max-height:760px)]:space-y-4`,children:[(0,C.jsx)(zD,{children:g!==`confirmPassword`&&(0,C.jsxs)(X.div,{exit:{opacity:0,filter:`blur(4px)`},transition:{duration:.3,ease:Uk},className:`w-full space-y-6 [@media(max-height:760px)]:space-y-4`,children:[(0,C.jsx)(zD,{initial:!1,children:g===`email`&&(0,C.jsxs)(X.div,{initial:T?!1:{y:6,opacity:0},animate:{y:0,opacity:1},exit:{y:-6,opacity:0,filter:`blur(4px)`},transition:{duration:.3,ease:Uk},className:`flex w-full flex-col gap-6 [@media(max-height:760px)]:gap-4`,children:[(0,C.jsx)(Xk,{delay:Wk*3,inView:!0,className:`w-full`,children:(0,C.jsxs)(`div`,{className:`relative w-full`,children:[(0,C.jsx)(zD,{children:n.length>0&&(0,C.jsx)(X.div,{initial:T?!1:{y:-10,opacity:0},animate:{y:0,opacity:1},transition:{duration:.3,ease:Uk},className:`absolute -top-6 left-4 z-10`,children:(0,C.jsx)(`label`,{className:`text-xs font-semibold text-muted-foreground`,children:`Full Name`})})}),(0,C.jsx)(`div`,{className:`glass-input-wrap w-full`,children:(0,C.jsxs)(`div`,{className:`glass-input`,children:[(0,C.jsx)(`span`,{className:`glass-input-text-area`}),(0,C.jsx)(`div`,{className:K(`relative z-10 flex flex-shrink-0 items-center justify-center overflow-hidden transition-all duration-300 ease-in-out`,n.length>20?`w-0 px-0`:`w-10 pl-2`),children:(0,C.jsx)(mt,{className:`h-5 w-5 flex-shrink-0 text-foreground/80`})}),(0,C.jsx)(`input`,{type:`text`,placeholder:`Full Name`,autoComplete:`name`,value:n,onChange:e=>r(e.target.value),onKeyDown:F,className:`relative z-10 h-full w-0 flex-grow bg-transparent text-foreground placeholder:text-foreground/60 focus:outline-none`})]})})]})}),(0,C.jsx)(Xk,{delay:Wk*4,inView:!0,className:`w-full`,children:(0,C.jsxs)(`div`,{className:`relative w-full`,children:[(0,C.jsx)(zD,{children:i.length>0&&(0,C.jsx)(X.div,{initial:T?!1:{y:-10,opacity:0},animate:{y:0,opacity:1},transition:{duration:.3,ease:Uk},className:`absolute -top-6 left-4 z-10`,children:(0,C.jsx)(`label`,{className:`text-xs font-semibold text-muted-foreground`,children:`Username`})})}),(0,C.jsx)(`div`,{className:`glass-input-wrap w-full`,children:(0,C.jsxs)(`div`,{className:`glass-input`,children:[(0,C.jsx)(`span`,{className:`glass-input-text-area`}),(0,C.jsx)(`div`,{className:K(`relative z-10 flex flex-shrink-0 items-center justify-center overflow-hidden transition-all duration-300 ease-in-out`,i.length>20?`w-0 px-0`:`w-10 pl-2`),children:(0,C.jsx)(Kt,{className:`h-5 w-5 flex-shrink-0 text-foreground/80`})}),(0,C.jsx)(`input`,{type:`text`,placeholder:`Username`,autoComplete:`username`,value:i,onChange:e=>a(e.target.value),onKeyDown:F,className:`relative z-10 h-full w-0 flex-grow bg-transparent text-foreground placeholder:text-foreground/60 focus:outline-none`})]})})]})})]},`identity-fields`)}),(0,C.jsx)(Xk,{delay:g===`email`?Wk*5:0,inView:!0,className:`w-full`,children:(0,C.jsxs)(`div`,{className:`relative w-full`,children:[(0,C.jsx)(zD,{children:g===`password`&&(0,C.jsx)(X.div,{initial:T?!1:{y:-10,opacity:0},animate:{y:0,opacity:1},transition:{duration:.3,delay:.4,ease:Uk},className:`absolute -top-6 left-4 z-10`,children:(0,C.jsx)(`label`,{className:`text-xs font-semibold text-muted-foreground`,children:`Email`})})}),(0,C.jsx)(`div`,{className:`glass-input-wrap w-full`,children:(0,C.jsxs)(`div`,{className:`glass-input`,children:[(0,C.jsx)(`span`,{className:`glass-input-text-area`}),(0,C.jsx)(`div`,{className:K(`relative z-10 flex flex-shrink-0 items-center justify-center overflow-hidden transition-all duration-300 ease-in-out`,o.length>20&&g===`email`?`w-0 px-0`:`w-10 pl-2`),children:(0,C.jsx)(Tt,{className:`h-5 w-5 flex-shrink-0 text-foreground/80`})}),(0,C.jsx)(`input`,{type:`mail`,placeholder:`Email`,value:o,onChange:e=>s(e.target.value),onKeyDown:F,className:K(`relative z-10 h-full w-0 flex-grow bg-transparent text-foreground transition-[padding-right] delay-300 duration-300 ease-in-out placeholder:text-foreground/60 focus:outline-none`,j&&g===`email`?`pr-2`:`pr-0`)}),(0,C.jsx)(`div`,{className:K(`relative z-10 flex-shrink-0 overflow-hidden transition-all duration-300 ease-in-out`,j&&g===`email`?`w-10 pr-1`:`w-0`),children:(0,C.jsx)($k,{type:`button`,onClick:P,size:`icon`,"aria-label":`Continue with email`,contentClassName:`text-foreground/80 hover:text-foreground`,children:(0,C.jsx)(Ve,{className:`h-5 w-5`})})})]})})]})}),(0,C.jsx)(zD,{children:g===`password`&&(0,C.jsxs)(Xk,{className:`w-full`,children:[(0,C.jsxs)(`div`,{className:`relative w-full`,children:[(0,C.jsx)(zD,{children:c.length>0&&(0,C.jsx)(X.div,{initial:T?!1:{y:-10,opacity:0},animate:{y:0,opacity:1},transition:{duration:.3,ease:Uk},className:`absolute -top-6 left-4 z-10`,children:(0,C.jsx)(`label`,{className:`text-xs font-semibold text-muted-foreground`,children:`Password`})})}),(0,C.jsx)(`div`,{className:`glass-input-wrap w-full`,children:(0,C.jsxs)(`div`,{className:`glass-input`,children:[(0,C.jsx)(`span`,{className:`glass-input-text-area`}),(0,C.jsx)(`div`,{className:`relative z-10 flex w-10 flex-shrink-0 items-center justify-center pl-2`,children:k?(0,C.jsx)(`button`,{type:`button`,"aria-label":`Toggle password visibility`,onClick:()=>p(!f),className:`rounded-full p-2 text-foreground/80 transition-colors hover:text-foreground`,children:f?(0,C.jsx)(ot,{className:`h-5 w-5`}):(0,C.jsx)(st,{className:`h-5 w-5`})}):(0,C.jsx)(Ct,{className:`h-5 w-5 flex-shrink-0 text-foreground/80`})}),(0,C.jsx)(`input`,{ref:M,type:f?`text`:`password`,placeholder:`Password`,value:c,onChange:e=>l(e.target.value),onKeyDown:F,className:`relative z-10 h-full w-0 flex-grow bg-transparent text-foreground placeholder:text-foreground/60 focus:outline-none`}),(0,C.jsx)(`div`,{className:K(`relative z-10 flex-shrink-0 overflow-hidden transition-all duration-300 ease-in-out`,k?`w-10 pr-1`:`w-0`),children:(0,C.jsx)($k,{type:`button`,onClick:P,size:`icon`,"aria-label":`Submit password`,contentClassName:`text-foreground/80 hover:text-foreground`,children:(0,C.jsx)(Ve,{className:`h-5 w-5`})})})]})})]}),(0,C.jsx)(Xk,{inView:!0,delay:.2,children:(0,C.jsxs)(`button`,{type:`button`,onClick:ne,className:`mt-4 flex items-center gap-2 text-sm text-foreground/70 transition-colors hover:text-foreground`,children:[(0,C.jsx)(Be,{className:`h-4 w-4`}),` Go back`]})})]},`password-field`)})]},`email-password-fields`)}),(0,C.jsx)(zD,{children:g===`confirmPassword`&&(0,C.jsxs)(Xk,{className:`w-full`,children:[(0,C.jsxs)(`div`,{className:`relative w-full`,children:[(0,C.jsx)(zD,{children:u.length>0&&(0,C.jsx)(X.div,{initial:T?!1:{y:-10,opacity:0},animate:{y:0,opacity:1},transition:{duration:.3,ease:Uk},className:`absolute -top-6 left-4 z-10`,children:(0,C.jsx)(`label`,{className:`text-xs font-semibold text-muted-foreground`,children:`Confirm Password`})})}),(0,C.jsx)(`div`,{className:`glass-input-wrap w-full`,children:(0,C.jsxs)(`div`,{className:`glass-input`,children:[(0,C.jsx)(`span`,{className:`glass-input-text-area`}),(0,C.jsx)(`div`,{className:`relative z-10 flex w-10 flex-shrink-0 items-center justify-center pl-2`,children:A?(0,C.jsx)(`button`,{type:`button`,"aria-label":`Toggle confirm password visibility`,onClick:()=>h(!m),className:`rounded-full p-2 text-foreground/80 transition-colors hover:text-foreground`,children:m?(0,C.jsx)(ot,{className:`h-5 w-5`}):(0,C.jsx)(st,{className:`h-5 w-5`})}):(0,C.jsx)(Ct,{className:`h-5 w-5 flex-shrink-0 text-foreground/80`})}),(0,C.jsx)(`input`,{ref:N,type:m?`text`:`password`,placeholder:`Confirm Password`,value:u,onChange:e=>d(e.target.value),className:`relative z-10 h-full w-0 flex-grow bg-transparent text-foreground placeholder:text-foreground/60 focus:outline-none`}),(0,C.jsx)(`div`,{className:K(`relative z-10 flex-shrink-0 overflow-hidden transition-all duration-300 ease-in-out`,A?`w-10 pr-1`:`w-0`),children:(0,C.jsx)($k,{type:`submit`,size:`icon`,"aria-label":`Finish sign-up`,contentClassName:`text-foreground/80 hover:text-foreground`,children:(0,C.jsx)(Ve,{className:`h-5 w-5`})})})]})})]}),(0,C.jsx)(Xk,{inView:!0,delay:.2,children:(0,C.jsxs)(`button`,{type:`button`,onClick:ne,className:`mt-4 flex items-center gap-2 text-sm text-foreground/70 transition-colors hover:text-foreground`,children:[(0,C.jsx)(Be,{className:`h-4 w-4`}),` Go back`]})})]},`confirm-password-field`)})]})]})]})]})},iA=`
69
+ *:focus-visible {
70
+ outline-offset: 0 !important;
71
+ --ring-offset: 0 !important;
72
+ }
73
+ textarea::-webkit-scrollbar {
74
+ width: 6px;
75
+ }
76
+ textarea::-webkit-scrollbar-track {
77
+ background: transparent;
78
+ }
79
+ textarea::-webkit-scrollbar-thumb {
80
+ background-color: var(--border);
81
+ border-radius: 3px;
82
+ }
83
+ textarea::-webkit-scrollbar-thumb:hover {
84
+ background-color: var(--muted-foreground);
85
+ }
86
+ `,aA=`chat-input-embedded-styles`;if(typeof document<`u`&&!document.getElementById(aA)){let e=document.createElement(`style`);e.id=aA,e.innerText=iA,document.head.appendChild(e)}var oA=b.forwardRef(({className:e,...t},n)=>(0,C.jsx)(`textarea`,{className:K(`flex min-h-[44px] w-full resize-none rounded-md border-none bg-transparent px-3 py-2.5 text-base text-foreground placeholder:text-muted-foreground focus-visible:ring-0 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50`,e),ref:n,rows:1,...t}));oA.displayName=`Textarea`;var sA=zm,cA=Bm,lA=Vm,uA=b.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,C.jsx)(Um,{ref:r,sideOffset:t,className:K(`z-50 animate-in overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md fade-in-0 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95`,e),...n}));uA.displayName=Um.displayName;var dA=Aa,fA=ja,pA=b.forwardRef(({className:e,...t},n)=>(0,C.jsx)(Ma,{ref:n,className:K(`fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t}));pA.displayName=Ma.displayName;var mA=b.forwardRef(({className:e,children:t,...n},r)=>(0,C.jsxs)(fA,{children:[(0,C.jsx)(pA,{}),(0,C.jsxs)(Na,{ref:r,className:K(`fixed top-[50%] left-[50%] z-50 grid w-full max-w-[90vw] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl border border-border bg-popover p-0 shadow-xl duration-200 ease-[var(--natroc-ease-out)] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 md:max-w-[800px]`,e),...n,children:[t,(0,C.jsxs)(Ia,{className:`absolute top-4 right-4 z-10 rounded-full bg-muted/80 p-2 transition-[background-color,transform] duration-150 ease-[var(--natroc-ease-out)] hover:bg-muted active:scale-[0.97] motion-reduce:active:scale-100`,children:[(0,C.jsx)(qt,{className:`h-5 w-5 text-muted-foreground hover:text-foreground`}),(0,C.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]}));mA.displayName=Na.displayName;var hA=b.forwardRef(({className:e,...t},n)=>(0,C.jsx)(Pa,{ref:n,className:K(`text-lg leading-none font-semibold tracking-tight text-foreground`,e),...t}));hA.displayName=Pa.displayName;var gA=b.forwardRef(({className:e,variant:t=`default`,size:n=`default`,...r},i)=>(0,C.jsx)(`button`,{className:K(`inline-flex items-center justify-center font-medium transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{default:`bg-primary hover:bg-primary/80 text-primary-foreground`,outline:`border border-border bg-transparent hover:bg-accent hover:text-accent-foreground`,ghost:`bg-transparent hover:bg-accent hover:text-accent-foreground`}[t],{default:`h-10 px-4 py-2`,sm:`h-8 px-3 text-sm`,lg:`h-12 px-6`,icon:`h-8 w-8 rounded-full aspect-[1/1]`}[n],e),ref:i,...r}));gA.displayName=`Button`;function _A(e){let t=15+e*37%85,n=.5+e*19%50/100;return{height:`${t}%`,animationDelay:`${e*.05}s`,animationDuration:`${n}s`}}var vA=({isRecording:e,onStartRecording:t,onStopRecording:n,visualizerBars:r=32})=>{let[i,a]=b.useState(0),o=b.useRef(null),s=b.useRef(null);return b.useEffect(()=>(e?(t(),o.current=setInterval(()=>a(e=>e+1),1e3)):(o.current&&=(clearInterval(o.current),null),n(i),s.current=setTimeout(()=>a(0),0)),()=>{o.current&&clearInterval(o.current),s.current&&clearTimeout(s.current)}),[e,i,t,n]),(0,C.jsxs)(`div`,{className:K(`flex w-full flex-col items-center justify-center py-3 transition-[height,opacity] duration-180 ease-[var(--natroc-ease-out)]`,e?`opacity-100`:`h-0 opacity-0`),children:[(0,C.jsxs)(`div`,{className:`mb-3 flex items-center gap-2`,children:[(0,C.jsx)(`div`,{className:`h-2 w-2 animate-pulse rounded-full bg-red-500`}),(0,C.jsx)(`span`,{className:`font-mono text-sm text-foreground/80`,children:(e=>{let t=Math.floor(e/60),n=e%60;return`${t.toString().padStart(2,`0`)}:${n.toString().padStart(2,`0`)}`})(i)})]}),(0,C.jsx)(`div`,{className:`flex h-10 w-full items-center justify-center gap-0.5 px-4`,children:[...Array(r)].map((e,t)=>(0,C.jsx)(`div`,{className:`w-0.5 animate-pulse rounded-full bg-muted-foreground/60`,style:_A(t)},t))})]})},yA=({imageUrl:e,onClose:t})=>e?(0,C.jsx)(dA,{open:!!e,onOpenChange:t,children:(0,C.jsxs)(mA,{className:`max-w-[90vw] border-none bg-transparent p-0 shadow-none md:max-w-[800px]`,children:[(0,C.jsx)(hA,{className:`sr-only`,children:`Image Preview`}),(0,C.jsx)(X.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2,ease:`easeOut`},className:`relative overflow-hidden rounded-2xl bg-popover shadow-2xl`,children:(0,C.jsx)(`img`,{src:e,alt:`Full preview`,className:`max-h-[80vh] w-full rounded-2xl object-contain`})})]})}):null,bA=b.createContext({isLoading:!1,value:``,setValue:()=>{},maxHeight:240,onSubmit:void 0,disabled:!1});function xA(){let e=b.useContext(bA);if(!e)throw Error(`usePromptInput must be used within a PromptInput`);return e}var SA=b.forwardRef(({className:e,isLoading:t=!1,maxHeight:n=240,value:r,onValueChange:i,onSubmit:a,children:o,disabled:s=!1,onDragOver:c,onDragLeave:l,onDrop:u},d)=>{let[f,p]=b.useState(r||``);return(0,C.jsx)(sA,{children:(0,C.jsx)(bA.Provider,{value:{isLoading:t,value:r??f,setValue:i??(e=>{p(e),i?.(e)}),maxHeight:n,onSubmit:a,disabled:s},children:(0,C.jsx)(`div`,{ref:d,className:K(`rounded-3xl border border-border bg-card p-2 shadow-[0_8px_30px_rgba(0,0,0,0.24)] transition-[background-color,border-color,box-shadow] duration-180 ease-[var(--natroc-ease-out)]`,t&&`border-red-500/70`,e),onDragOver:c,onDragLeave:l,onDrop:u,children:o})})})});SA.displayName=`PromptInput`;var CA=({className:e,onKeyDown:t,disableAutosize:n=!1,placeholder:r,...i})=>{let{value:a,setValue:o,maxHeight:s,onSubmit:c,disabled:l}=xA(),u=b.useRef(null);return b.useEffect(()=>{n||!u.current||(u.current.style.height=`auto`,u.current.style.height=typeof s==`number`?`${Math.min(u.current.scrollHeight,s)}px`:`min(${u.current.scrollHeight}px, ${s})`)},[a,s,n]),(0,C.jsx)(oA,{ref:u,value:a,onChange:e=>o(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),c?.()),t?.(e)},className:K(`text-base`,e),disabled:l,placeholder:r,...i})},wA=({children:e,className:t,...n})=>(0,C.jsx)(`div`,{className:K(`flex items-center gap-2`,t),...n,children:e}),TA=({tooltip:e,children:t,className:n,side:r=`top`,...i})=>{let{disabled:a}=xA();return(0,C.jsxs)(cA,{...i,children:[(0,C.jsx)(lA,{asChild:!0,disabled:a,children:t}),(0,C.jsx)(uA,{side:r,className:n,children:e})]})},EA=()=>(0,C.jsx)(`div`,{className:`relative mx-1 h-6 w-[1.5px]`,children:(0,C.jsx)(`div`,{className:`absolute inset-0 rounded-full bg-gradient-to-t from-transparent via-border to-transparent`,style:{clipPath:`polygon(0% 0%, 100% 0%, 100% 40%, 140% 50%, 100% 60%, 100% 100%, 0% 100%, 0% 60%, -40% 50%, 0% 40%)`}})}),DA=b.forwardRef((e,t)=>{let{onSend:n=()=>{},isLoading:r=!1,placeholder:i=`Type your message here...`,className:a,selectedModel:o,modelOptions:s=[],onModelChange:c,isModelLoading:l=!1,isModelDisabled:u=!1,thinkingEffortOptions:d=[],selectedThinkingEffort:f,onThinkingEffortChange:p}=e,[m,h]=b.useState(``),[g,_]=b.useState([]),[v,y]=b.useState({}),[x,S]=b.useState(null),[w,T]=b.useState(!1),[E,D]=b.useState(!1),O=b.useRef(null),k=b.useRef(null),A=e=>{e===`search`&&D(e=>!e)},j=b.useCallback(e=>e.type.startsWith(`image/`),[]),M=b.useCallback(e=>{if(!j(e)){console.log(`Only image files are allowed`);return}if(e.size>10*1024*1024){console.log(`File too large (max 10MB)`);return}_([e]);let t=new FileReader;t.onload=t=>y({[e.name]:t.target?.result}),t.readAsDataURL(e)},[j]),N=b.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]),ee=b.useCallback(e=>{e.preventDefault(),e.stopPropagation()},[]),te=b.useCallback(e=>{e.preventDefault(),e.stopPropagation();let t=Array.from(e.dataTransfer.files).filter(e=>j(e));t.length>0&&M(t[0])},[j,M]),P=e=>{let t=g[e];t&&v[t.name]&&y({}),_([])},F=e=>S(e),ne=b.useCallback(e=>{let t=e.clipboardData?.items;if(t){for(let n=0;n<t.length;n++)if(t[n].type.indexOf(`image`)!==-1){let r=t[n].getAsFile();if(r){e.preventDefault(),M(r);break}}}},[M]);b.useEffect(()=>(document.addEventListener(`paste`,ne),()=>document.removeEventListener(`paste`,ne)),[ne]);let re=()=>{if(m.trim()||g.length>0){let e=``;E&&(e=`[Search: `),n(e?`${e}${m}]`:m,g,{thinkingEffort:f??d[0]?.value}),h(``),_([]),y({})}},ie=()=>console.log(`Started recording`),ae=e=>{console.log(`Stopped recording after ${e} seconds`),T(!1),n(`[Voice message - ${e} seconds]`,[])},I=m.trim()!==``||g.length>0,oe=d.find(e=>e.value===f)?.label??`Thinking`;return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(SA,{value:m,onValueChange:h,isLoading:r,onSubmit:re,className:K(`w-full border-border bg-card shadow-[0_8px_30px_rgba(0,0,0,0.24)] transition-[background-color,border-color,box-shadow] duration-180 ease-[var(--natroc-ease-out)]`,w&&`border-red-500/70`,a),disabled:r||w,ref:t||k,onDragOver:N,onDragLeave:ee,onDrop:te,children:[g.length>0&&!w&&(0,C.jsx)(`div`,{className:`natroc-soft-panel flex flex-wrap gap-2 p-0 pb-1`,children:g.map((e,t)=>(0,C.jsx)(`div`,{className:`group relative`,children:e.type.startsWith(`image/`)&&v[e.name]&&(0,C.jsxs)(`div`,{className:`natroc-hover-lift h-16 w-16 cursor-pointer overflow-hidden rounded-xl transition-[opacity,transform] duration-180 ease-[var(--natroc-ease-out)]`,onClick:()=>F(v[e.name]),children:[(0,C.jsx)(`img`,{src:v[e.name],alt:e.name,className:`h-full w-full object-cover`}),(0,C.jsx)(`button`,{onClick:e=>{e.stopPropagation(),P(t)},className:`absolute top-1 right-1 rounded-full bg-background/70 p-0.5 opacity-100 transition-opacity`,children:(0,C.jsx)(qt,{className:`h-3 w-3 text-foreground`})})]})},t))}),(0,C.jsx)(`div`,{className:K(`transition-[height,opacity] duration-180 ease-[var(--natroc-ease-out)]`,w?`h-0 overflow-hidden opacity-0`:`opacity-100`),children:(0,C.jsx)(CA,{placeholder:E?`Search the web...`:f?`Think ${oe.toLowerCase()}...`:i,className:`text-base`})}),w&&(0,C.jsx)(vA,{isRecording:w,onStartRecording:ie,onStopRecording:ae}),(0,C.jsxs)(wA,{className:`flex flex-wrap items-center justify-between gap-2 p-0 pt-2 sm:flex-nowrap`,children:[(0,C.jsxs)(`div`,{className:K(`flex min-w-0 flex-1 items-center gap-1 transition-opacity duration-150 ease-[var(--natroc-ease-out)]`,w?`invisible h-0 opacity-0`:`visible opacity-100`),children:[(0,C.jsx)(TA,{tooltip:`Upload image`,children:(0,C.jsxs)(`button`,{onClick:()=>O.current?.click(),className:`flex h-8 w-8 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-[background-color,color,transform] duration-150 ease-[var(--natroc-ease-out)] hover:bg-accent hover:text-accent-foreground active:scale-[0.97] motion-reduce:active:scale-100`,disabled:w,children:[(0,C.jsx)(At,{className:`h-5 w-5 transition-colors`}),(0,C.jsx)(`input`,{ref:O,type:`file`,className:`hidden`,onChange:e=>{e.target.files&&e.target.files.length>0&&M(e.target.files[0]),e.target&&(e.target.value=``)},accept:`image/*`})]})}),(0,C.jsx)(`div`,{className:`flex items-center`,children:(0,C.jsxs)(`button`,{type:`button`,onClick:()=>A(`search`),className:K(`flex h-8 items-center gap-1 rounded-full border px-2 py-1 transition-[background-color,border-color,color,transform] duration-150 ease-[var(--natroc-ease-out)] active:scale-[0.97] motion-reduce:active:scale-100`,E?`border-[#1EAEDB] bg-[#1EAEDB]/15 text-[#1EAEDB]`:`border-transparent bg-transparent text-muted-foreground hover:text-foreground`),children:[(0,C.jsx)(`div`,{className:`flex h-5 w-5 flex-shrink-0 items-center justify-center`,children:(0,C.jsx)(X.div,{animate:{rotate:E?360:0,scale:E?1.1:1},whileHover:{rotate:E?360:15,scale:1.1,transition:{type:`spring`,stiffness:300,damping:10}},transition:{type:`spring`,stiffness:260,damping:25},children:(0,C.jsx)(dt,{className:K(`h-4 w-4`,E?`text-[#1EAEDB]`:`text-inherit`)})})}),(0,C.jsx)(zD,{children:E&&(0,C.jsx)(X.span,{initial:{width:0,opacity:0},animate:{width:`auto`,opacity:1},exit:{width:0,opacity:0},transition:{duration:.2},className:`flex-shrink-0 overflow-hidden text-xs whitespace-nowrap text-[#1EAEDB]`,children:`Search`})})]})}),c&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(EA,{}),(0,C.jsxs)(yv,{value:o,onValueChange:c,disabled:u||l||s.length===0,children:[(0,C.jsx)(xv,{size:`sm`,"aria-label":`Select model`,className:`h-8 max-w-[11rem] min-w-[7rem] border-transparent bg-transparent px-2 text-xs text-muted-foreground hover:text-foreground`,children:(0,C.jsx)(bv,{placeholder:l?`Loading...`:`Model`})}),(0,C.jsx)(Sv,{align:`start`,className:`max-w-[20rem]`,children:s.map(e=>(0,C.jsx)(Cv,{value:e.id,children:(0,C.jsx)(`span`,{className:`block max-w-[16rem] truncate`,children:e.name})},e.id))})]})]})]}),(0,C.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1`,children:[!w&&d.length>0&&p&&(0,C.jsxs)(yv,{value:f,onValueChange:p,disabled:r,children:[(0,C.jsxs)(xv,{size:`sm`,"aria-label":`Select thinking effort`,className:`h-8 max-w-[10rem] rounded-full border-[#8B5CF6] bg-[#8B5CF6]/15 px-2 text-xs text-[#8B5CF6]`,children:[(0,C.jsx)(Ke,{className:`h-4 w-4 shrink-0`}),(0,C.jsx)(bv,{placeholder:`Thinking`,children:oe})]}),(0,C.jsx)(Sv,{align:`end`,className:`max-w-[14rem]`,children:d.map(e=>(0,C.jsx)(Cv,{value:e.value,children:e.label},e.value))})]}),(0,C.jsx)(TA,{tooltip:r?`Stop generation`:w?`Stop recording`:I?`Send message`:`Voice message`,children:(0,C.jsx)(gA,{variant:`default`,size:`icon`,className:K(`h-8 w-8 rounded-full`,w?`bg-transparent text-red-500 hover:bg-accent hover:text-red-400`:I?`bg-primary text-primary-foreground hover:bg-primary/80`:`bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`),onClick:()=>{w?T(!1):I?re():T(!0)},disabled:r&&!I,children:r?(0,C.jsx)(Bt,{className:`h-4 w-4 animate-pulse fill-primary-foreground`}):w?(0,C.jsx)(tt,{className:`h-5 w-5 text-red-500`}):I?(0,C.jsx)(He,{className:`h-4 w-4 text-primary-foreground`}):(0,C.jsx)(Dt,{className:`h-5 w-5 text-muted-foreground transition-colors`})})})]})]})]}),(0,C.jsx)(yA,{imageUrl:x,onClose:()=>S(null)})]})});DA.displayName=`PromptInputBox`;function OA({className:e}){return(0,C.jsx)(`div`,{className:K(`flex items-center gap-1.5 py-2`,e),role:`status`,"aria-label":`Menunggu respon model`,children:[0,1,2].map(e=>(0,C.jsx)(X.span,{className:`size-1.5 rounded-full bg-muted-foreground/60`,animate:{opacity:[.3,1,.3]},transition:{duration:1.2,repeat:1/0,delay:e*.18,ease:`easeInOut`}},e))})}function kA({text:e,duration:t=1,transition:n,wave:r=!1,className:i,color:a=`var(--color-neutral-500)`,shimmeringColor:o=`var(--color-neutral-300)`,...s}){return(0,C.jsx)(X.span,{className:K(`relative inline-block [perspective:500px]`,i),style:{"--shimmering-color":o,"--color":a,color:`var(--color)`},...s,children:e?.split(``)?.map((i,a)=>(0,C.jsx)(X.span,{animate:{...r?{x:[0,5,0],y:[0,-5,0],scale:[1,1.1,1],rotateY:[0,15,0]}:{},color:[`var(--color)`,`var(--shimmering-color)`,`var(--color)`]},className:`inline-block whitespace-pre [transform-style:preserve-3d]`,initial:{...r?{scale:1,rotateY:0}:{},color:`var(--color)`},transition:{duration:t,repeat:1/0,repeatType:`loop`,repeatDelay:e.length*.05,delay:a*t/e.length,ease:`easeInOut`,...n},children:i},a))})}function AA(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var jA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,MA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,NA={};function PA(e,t){return((t||NA).jsx?MA:jA).test(e)}var FA=/[ \t\n\f\r]/g;function IA(e){return typeof e==`object`?e.type===`text`?LA(e.value):!1:LA(e)}function LA(e){return e.replace(FA,``)===``}var RA=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};RA.prototype.normal={},RA.prototype.property={},RA.prototype.space=void 0;function zA(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new RA(n,r,t)}function BA(e){return e.toLowerCase()}var VA=class{constructor(e,t){this.attribute=t,this.property=e}};VA.prototype.attribute=``,VA.prototype.booleanish=!1,VA.prototype.boolean=!1,VA.prototype.commaOrSpaceSeparated=!1,VA.prototype.commaSeparated=!1,VA.prototype.defined=!1,VA.prototype.mustUseProperty=!1,VA.prototype.number=!1,VA.prototype.overloadedBoolean=!1,VA.prototype.property=``,VA.prototype.spaceSeparated=!1,VA.prototype.space=void 0;var HA=c({boolean:()=>Z,booleanish:()=>WA,commaOrSpaceSeparated:()=>JA,commaSeparated:()=>qA,number:()=>Q,overloadedBoolean:()=>GA,spaceSeparated:()=>KA}),UA=0,Z=YA(),WA=YA(),GA=YA(),Q=YA(),KA=YA(),qA=YA(),JA=YA();function YA(){return 2**++UA}var XA=Object.keys(HA),ZA=class extends VA{constructor(e,t,n,r){let i=-1;if(super(e,t),QA(this,`space`,r),typeof n==`number`)for(;++i<XA.length;){let e=XA[i];QA(this,XA[i],(n&HA[e])===HA[e])}}};ZA.prototype.defined=!0;function QA(e,t,n){n&&(e[t]=n)}function $A(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ZA(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[BA(r)]=r,n[BA(a.attribute)]=r}return new RA(t,n,e.space)}var ej=$A({properties:{ariaActiveDescendant:null,ariaAtomic:WA,ariaAutoComplete:null,ariaBusy:WA,ariaChecked:WA,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:KA,ariaCurrent:null,ariaDescribedBy:KA,ariaDetails:null,ariaDisabled:WA,ariaDropEffect:KA,ariaErrorMessage:null,ariaExpanded:WA,ariaFlowTo:KA,ariaGrabbed:WA,ariaHasPopup:null,ariaHidden:WA,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:KA,ariaLevel:Q,ariaLive:null,ariaModal:WA,ariaMultiLine:WA,ariaMultiSelectable:WA,ariaOrientation:null,ariaOwns:KA,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:WA,ariaReadOnly:WA,ariaRelevant:null,ariaRequired:WA,ariaRoleDescription:KA,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:WA,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function tj(e,t){return t in e?e[t]:t}function nj(e,t){return tj(e,t.toLowerCase())}var rj=$A({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:qA,acceptCharset:KA,accessKey:KA,action:null,allow:null,allowFullScreen:Z,allowPaymentRequest:Z,allowUserMedia:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:KA,autoFocus:Z,autoPlay:Z,blocking:KA,capture:null,charSet:null,checked:Z,cite:null,className:KA,cols:Q,colSpan:null,content:null,contentEditable:WA,controls:Z,controlsList:KA,coords:Q|qA,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:GA,draggable:WA,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:KA,height:Q,hidden:GA,high:Q,href:null,hrefLang:null,htmlFor:KA,httpEquiv:KA,id:null,imageSizes:null,imageSrcSet:null,inert:Z,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:KA,itemRef:KA,itemScope:Z,itemType:KA,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,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:Z,optimum:Q,pattern:null,ping:KA,placeholder:null,playsInline:Z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:KA,required:Z,reversed:Z,rows:Q,rowSpan:Q,sandbox:KA,scope:null,scoped:Z,seamless:Z,selected:Z,shadowRootClonable:Z,shadowRootDelegatesFocus:Z,shadowRootMode:null,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:WA,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:Z,useMap:null,value:WA,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:KA,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:WA,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Z,disableRemotePlayback:Z,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:nj}),ij=$A({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:JA,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:KA,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:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:Z,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,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:qA,g2:qA,glyphName:qA,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:JA,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,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:Q,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:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:KA,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:JA,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:JA,rev:JA,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:JA,requiredFeatures:JA,requiredFonts:JA,requiredFormats:JA,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:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:JA,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:JA,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:JA,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:tj}),aj=$A({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()}}),oj=$A({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:nj}),sj=$A({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),cj={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`},lj=/[A-Z]/g,uj=/-[a-z]/g,dj=/^data[-\w.:]+$/i;function fj(e,t){let n=BA(t),r=t,i=VA;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&dj.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(uj,mj);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!uj.test(e)){let n=e.replace(lj,pj);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ZA}return new i(r,t)}function pj(e){return`-`+e.toLowerCase()}function mj(e){return e.charAt(1).toUpperCase()}var hj=zA([ej,rj,aj,oj,sj],`html`),gj=zA([ej,ij,aj,oj,sj],`svg`);function _j(e){return e.join(` `).trim()}var vj=s(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
87
+ `,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),yj=s((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(vj());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),bj=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),xj=s(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(yj()),r=bj();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Sj=wj(`end`),Cj=wj(`start`);function wj(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Tj(e){let t=Cj(e),n=Sj(e);if(t&&n)return{start:t,end:n}}function Ej(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Oj(e.position):`start`in e||`end`in e?Oj(e):`line`in e||`column`in e?Dj(e):``}function Dj(e){return kj(e&&e.line)+`:`+kj(e&&e.column)}function Oj(e){return Dj(e&&e.start)+`-`+Dj(e&&e.end)}function kj(e){return e&&typeof e==`number`?e:1}var Aj=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Ej(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Aj.prototype.file=``,Aj.prototype.name=``,Aj.prototype.reason=``,Aj.prototype.message=``,Aj.prototype.stack=``,Aj.prototype.column=void 0,Aj.prototype.line=void 0,Aj.prototype.ancestors=void 0,Aj.prototype.cause=void 0,Aj.prototype.fatal=void 0,Aj.prototype.place=void 0,Aj.prototype.ruleId=void 0,Aj.prototype.source=void 0;var jj=u(xj(),1),Mj={}.hasOwnProperty,Nj=new Map,Pj=/[A-Z]/g,Fj=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Ij=new Set([`td`,`th`]);function Lj(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Jj(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=qj(n,t.jsx,t.jsxs)}let i={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`?gj:hj,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Rj(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Rj(e,t,n){if(t.type===`element`)return zj(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Bj(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Hj(e,t,n);if(t.type===`mdxjsEsm`)return Vj(e,t);if(t.type===`root`)return Uj(e,t,n);if(t.type===`text`)return Wj(e,t)}function zj(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=gj,e.schema=i),e.ancestors.push(t);let a=eM(e,t.tagName,!1),o=Yj(e,t),s=Zj(e,t);return Fj.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!IA(e):!0})),Gj(e,o,a,t),Kj(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Bj(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}tM(e,t.position)}function Vj(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);tM(e,t.position)}function Hj(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=gj,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:eM(e,t.name,!0),o=Xj(e,t),s=Zj(e,t);return Gj(e,o,a,t),Kj(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Uj(e,t,n){let r={};return Kj(r,Zj(e,t)),e.create(t,e.Fragment,r,n)}function Wj(e,t){return t.value}function Gj(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Kj(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function qj(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Jj(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Cj(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Yj(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Mj.call(t.properties,i)){let a=Qj(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Ij.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Xj(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else tM(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else tM(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Zj(e,t){let n=[],r=-1,i=e.passKeys?new Map:Nj;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Rj(e,a,o);s!==void 0&&n.push(s)}return n}function Qj(e,t,n){let r=fj(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?AA(n):_j(n)),r.property===`style`){let t=typeof n==`object`?n:$j(e,String(n));return e.stylePropertyNameCase===`css`&&(t=nM(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?cj[r.property]||r.property:r.attribute,n]}}function $j(e,t){try{return(0,jj.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Aj("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-parse-style-attribute`,r}}function eM(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=PA(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=PA(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Mj.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);tM(e)}function tM(e,t){let n=new Aj("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=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-handle-mdx-estrees-without-createevaluater`,n}function nM(e){let t={},n;for(n in e)Mj.call(e,n)&&(t[rM(n)]=e[n]);return t}function rM(e){let t=e.replace(Pj,iM);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function iM(e){return`-`+e.toLowerCase()}var aM={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`]},oM={};function sM(e,t){let n=t||oM;return cM(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function cM(e,t,n){if(uM(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 lM(e.children,t,n)}return Array.isArray(e)?lM(e,t,n):``}function lM(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=cM(e[i],t,n);return r.join(``)}function uM(e){return!!(e&&typeof e==`object`)}var dM=document.createElement(`i`);function fM(e){let t=`&`+e+`;`;dM.innerHTML=t;let n=dM.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function pM(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function mM(e,t){return e.length>0?(pM(e,e.length,0,t),e):t}var hM={}.hasOwnProperty;function gM(e){let t={},n=-1;for(;++n<e.length;)_M(t,e[n]);return t}function _M(e,t){let n;for(n in t){let r=(hM.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){hM.call(r,a)||(r[a]=[]);let e=i[a];vM(r[a],Array.isArray(e)?e:e?[e]:[])}}}function vM(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);pM(e,0,0,r)}function yM(e,t){let 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 bM(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var xM=MM(/[A-Za-z]/),SM=MM(/[\dA-Za-z]/),CM=MM(/[#-'*+\--9=?A-Z^-~]/);function wM(e){return e!==null&&(e<32||e===127)}var TM=MM(/\d/),EM=MM(/[\dA-Fa-f]/),DM=MM(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function OM(e){return e!==null&&(e<0||e===32)}function kM(e){return e===-2||e===-1||e===32}var AM=MM(/\p{P}|\p{S}/u),jM=MM(/\s/);function MM(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function NM(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&SM(e.charCodeAt(n+1))&&SM(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function PM(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return kM(r)?(e.enter(n),s(r)):t(r)}function s(r){return kM(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var FM={tokenize:IM};function IM(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),PM(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return $(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var LM={tokenize:zM},RM={tokenize:BM};function zM(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return pM(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(RM,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(RM,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return $(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;pM(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function BM(e,t,n){return PM(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function VM(e){if(e===null||OM(e)||jM(e))return 1;if(AM(e))return 2}function HM(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var UM={name:`attention`,resolveAll:WM,tokenize:GM};function WM(e,t){let n=-1,r,i,a,o,s,c,l,u;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;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};KM(d,-c),KM(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=mM(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=mM(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=mM(l,HM(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=mM(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=mM(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,pM(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function GM(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=VM(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=VM(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function KM(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var qM={name:`autolink`,tokenize:JM};function JM(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return xM(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||SM(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||SM(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||wM(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):CM(t)?(e.consume(t),l):n(t)}function u(e){return SM(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||SM(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var YM={partial:!0,tokenize:XM};function XM(e,t,n){return r;function r(t){return kM(t)?PM(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||$(e)?t(e):n(e)}}var ZM={continuation:{tokenize:$M},exit:eN,name:`blockQuote`,tokenize:QM};function QM(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return kM(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function $M(e,t,n){let r=this;return i;function i(t){return kM(t)?PM(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(ZM,t,n)(r)}}function eN(e){e.exit(`blockQuote`)}var tN={name:`characterEscape`,tokenize:nN};function nN(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return DM(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var rN={name:`characterReference`,tokenize:iN};function iN(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=SM,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=EM,u):(e.enter(`characterReferenceValue`),a=7,o=TM,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===SM&&!fM(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var aN={partial:!0,tokenize:cN},oN={concrete:!0,name:`codeFenced`,tokenize:sN};function sN(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),kM(t)?PM(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||$(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(aN,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):kM(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),PM(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||$(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&kM(t)?PM(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||$(t)?e.check(aN,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||$(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),kM(t)?PM(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),kM(t)?PM(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||$(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function cN(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var lN={name:`codeIndented`,tokenize:dN},uN={partial:!0,tokenize:fN};function dN(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),PM(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):$(t)?e.attempt(uN,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||$(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function fN(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):PM(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):$(e)?i(e):n(e)}}var pN={name:`codeText`,previous:hN,resolve:mN,tokenize:gN};function mN(e){let t=e.length-4,n=3,r,i;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;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function hN(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function gN(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||$(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var _N=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&vN(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),vN(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),vN(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);vN(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);vN(this.left,t.reverse())}}};function vN(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 yN(e){let t={},n=-1,r,i,a,o,s,c,l,u=new _N(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,bN(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return pM(e,0,1/0,u.slice(0)),!l}function bN(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var xN={resolve:CN,tokenize:wN},SN={partial:!0,tokenize:TN};function CN(e){return yN(e),e}function wN(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):$(t)?e.check(SN,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function TN(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),PM(e,a,`linePrefix`)}function a(i){if(i===null||$(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function EN(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||wM(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||$(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||OM(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||wM(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function DN(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):$(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||$(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!kM(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function ON(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),PM(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||$(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function kN(e,t){let n;return r;function r(i){return $(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):kM(i)?PM(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var AN={name:`definition`,tokenize:MN},jN={partial:!0,tokenize:NN};function MN(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return DN.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=bM(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return OM(t)?kN(e,l)(t):l(t)}function l(t){return EN(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(jN,d,d)(t)}function d(t){return kM(t)?PM(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||$(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function NN(e,t,n){return r;function r(t){return OM(t)?kN(e,i)(t):n(t)}function i(t){return ON(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return kM(t)?PM(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||$(e)?t(e):n(e)}}var PN={name:`hardBreakEscape`,tokenize:FN};function FN(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return $(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var IN={name:`headingAtx`,resolve:LN,tokenize:RN};function LN(e,t){let n=e.length-2,r=3,i,a;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&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},pM(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function RN(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||OM(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||$(n)?(e.exit(`atxHeading`),t(n)):kM(n)?PM(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||OM(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var zN=`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`.split(`.`),BN=[`pre`,`script`,`style`,`textarea`],VN={concrete:!0,name:`htmlFlow`,resolveTo:WN,tokenize:GN},HN={partial:!0,tokenize:qN},UN={partial:!0,tokenize:KN};function WN(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 GN(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:P):xM(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):xM(a)?(e.consume(a),i=4,r.interrupt?t:P):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:P):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return xM(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||OM(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&BN.includes(l)?(i=1,r.interrupt?t(s):O(s)):zN.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||SM(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return kM(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||xM(t)?(e.consume(t),b):kM(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||SM(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):kM(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):kM(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||$(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||OM(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||kM(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||$(t)?O(t):kM(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),F):t===63&&i===3?(e.consume(t),P):t===93&&i===5?(e.consume(t),te):$(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(HN,ne,k)(t)):t===null||$(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(UN,A,ne)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||$(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),P):O(t)}function N(t){return t===47?(e.consume(t),o=``,ee):O(t)}function ee(t){if(t===62){let n=o.toLowerCase();return BN.includes(n)?(e.consume(t),F):O(t)}return xM(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ee):O(t)}function te(t){return t===93?(e.consume(t),P):O(t)}function P(t){return t===62?(e.consume(t),F):t===45&&i===2?(e.consume(t),P):O(t)}function F(t){return t===null||$(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),F)}function ne(n){return e.exit(`htmlFlow`),t(n)}}function KN(e,t,n){let r=this;return i;function i(t){return $(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function qN(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(YM,t,n)}}var JN={name:`htmlText`,tokenize:YN};function YN(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):xM(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):xM(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):$(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):$(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):$(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):$(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return xM(t)?(e.consume(t),S):n(t)}function S(t){return t===45||SM(t)?(e.consume(t),S):C(t)}function C(t){return $(t)?(o=C,N(t)):kM(t)?(e.consume(t),C):M(t)}function w(t){return t===45||SM(t)?(e.consume(t),w):t===47||t===62||OM(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||xM(t)?(e.consume(t),E):$(t)?(o=T,N(t)):kM(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||SM(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):$(t)?(o=D,N(t)):kM(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):$(t)?(o=O,N(t)):kM(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):$(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||OM(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||OM(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return kM(t)?PM(e,te,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):te(t)}function te(t){return e.enter(`htmlTextData`),o(t)}}var XN={name:`labelEnd`,resolveAll:eP,resolveTo:tP,tokenize:nP},ZN={tokenize:rP},QN={tokenize:iP},$N={tokenize:aP};function eP(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&pM(e,0,e.length,n),e}function tP(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=mM(s,e.slice(a+1,a+r+3)),s=mM(s,[[`enter`,u,t]]),s=mM(s,HM(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=mM(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=mM(s,e.slice(o+1)),s=mM(s,[[`exit`,c,t]]),pM(e,a,e.length,s),e}function nP(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(bM(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(ZN,u,o?u:d)(t):t===91?e.attempt(QN,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt($N,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function rP(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return OM(t)?kN(e,a)(t):a(t)}function a(t){return t===41?u(t):EN(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return OM(t)?kN(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?ON(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return OM(t)?kN(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function iP(e,t,n){let r=this;return i;function i(t){return DN.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(bM(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function aP(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var oP={name:`labelStartImage`,resolveAll:XN.resolveAll,tokenize:sP};function sP(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var cP={name:`labelStartLink`,resolveAll:XN.resolveAll,tokenize:lP};function lP(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var uP={name:`lineEnding`,tokenize:dP};function dP(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),PM(e,t,`linePrefix`)}}var fP={name:`thematicBreak`,tokenize:pP};function pP(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||$(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),kM(t)?PM(e,s,`whitespace`)(t):s(t))}}var mP={continuation:{tokenize:vP},exit:bP,name:`list`,tokenize:_P},hP={partial:!0,tokenize:xP},gP={partial:!0,tokenize:yP};function _P(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:TM(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(fP,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return TM(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(YM,r.interrupt?n:u,e.attempt(hP,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return kM(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function vP(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(YM,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,PM(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!kM(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(gP,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,PM(e,e.attempt(mP,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function yP(e,t,n){let r=this;return PM(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function bP(e){e.exit(this.containerState.type)}function xP(e,t,n){let r=this;return PM(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!kM(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var SP={name:`setextUnderline`,resolveTo:CP,tokenize:wP};function CP(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function wP(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),kM(t)?PM(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||$(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var TP={tokenize:EP};function EP(e){let t=this,n=e.attempt(YM,r,e.attempt(this.parser.constructs.flowInitial,i,PM(e,e.attempt(this.parser.constructs.flow,i,e.attempt(xN,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var DP={resolveAll:jP()},OP=AP(`string`),kP=AP(`text`);function AP(e){return{resolveAll:jP(e===`text`?MP:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function jP(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function MP(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var NP=c({attentionMarkers:()=>VP,contentInitial:()=>FP,disable:()=>HP,document:()=>PP,flow:()=>LP,flowInitial:()=>IP,insideSpan:()=>BP,string:()=>RP,text:()=>zP}),PP={42:mP,43:mP,45:mP,48:mP,49:mP,50:mP,51:mP,52:mP,53:mP,54:mP,55:mP,56:mP,57:mP,62:ZM},FP={91:AN},IP={[-2]:lN,[-1]:lN,32:lN},LP={35:IN,42:fP,45:[SP,fP],60:VN,61:SP,95:fP,96:oN,126:oN},RP={38:rN,92:tN},zP={[-5]:uP,[-4]:uP,[-3]:uP,33:oP,38:rN,42:UM,60:[qM,JN],91:cP,92:[PN,tN],93:XN,95:UM,96:pN},BP={null:[UM,DP]},VP={null:[42,95]},HP={null:[]};function UP(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=mM(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=HM(a,l.events,l),l.events):[]}function f(e,t){return GP(p(e),t)}function p(e){return WP(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){$(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&pM(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function WP(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function GP(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
88
+ `;break;case-3:o=`\r
89
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function KP(e){let t={constructs:gM([NP,...(e||{}).extensions||[]]),content:n(FM),defined:[],document:n(LM),flow:n(TP),lazy:{},string:n(OP),text:n(kP)};return t;function n(e){return n;function n(n){return UP(t,e,n)}}}function qP(e){for(;!yN(e););return e}var JP=/[\0\t\n\r]/g;function YP(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(JP.lastIndex=u,c=JP.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var XP=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ZP(e){return e.replace(XP,QP)}function QP(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return yM(n.slice(t?2:1),t?16:10)}return fM(n)||e}var $P={}.hasOwnProperty;function eF(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),tF(n)(qP(KP(n).document().write(YP()(e,t,!0))))}function tF(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ve),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(me),blockQuote:a(le),characterEscape:T,characterReference:T,codeFenced:a(ue),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ue,o),codeText:a(de,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(fe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(pe),hardBreakEscape:a(he),hardBreakTrailing:a(he),htmlFlow:a(ge,o),htmlFlowData:T,htmlText:a(ge,o),htmlTextData:T,image:a(_e),label:o,link:a(ve),listItem:a(be),listItemValue:f,listOrdered:a(ye,d),listUnordered:a(ye),paragraph:a(xe),reference:re,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(me),strong:a(Se),thematicBreak:a(we)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ce,autolinkProtocol:se,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:I,characterReference:oe,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:te,labelText:ee,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ie,resourceDestinationString:P,resourceTitleString:F,resource:ne,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};rF(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];$P.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||aF).call(a,void 0,e[0])}for(r.position={start:nF(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:nF(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:nF(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||aF).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Ej({start:e.start,end:e.end})+`): it’s not open`);n.position.end=nF(e.end)}function u(){return sM(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=bM(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Ce(),n.position={start:nF(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=nF(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=nF(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ee(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=ZP(t),n.identifier=bM(t).toLowerCase()}function te(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function P(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ne(){this.data.inReference=void 0}function re(){this.data.referenceType=`collapsed`}function ie(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=bM(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ae(e){this.data.characterReferenceType=e.type}function I(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=yM(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=fM(t);let i=this.stack[this.stack.length-1];i.value+=r}function oe(e){let t=this.stack.pop();t.position.end=nF(e.end)}function se(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ce(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function le(){return{type:`blockquote`,children:[]}}function ue(){return{type:`code`,lang:null,meta:null,value:``}}function de(){return{type:`inlineCode`,value:``}}function fe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function pe(){return{type:`emphasis`,children:[]}}function me(){return{type:`heading`,depth:0,children:[]}}function he(){return{type:`break`}}function ge(){return{type:`html`,value:``}}function _e(){return{type:`image`,title:null,url:``,alt:null}}function ve(){return{type:`link`,title:null,url:``,children:[]}}function ye(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function be(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function xe(){return{type:`paragraph`,children:[]}}function Se(){return{type:`strong`,children:[]}}function Ce(){return{type:`text`,value:``}}function we(){return{type:`thematicBreak`}}}function nF(e){return{line:e.line,column:e.column,offset:e.offset}}function rF(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?rF(e,r):iF(e,r)}}function iF(e,t){let n;for(n in t)if($P.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function aF(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Ej({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ej({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Ej({start:t.start,end:t.end})+`) is still open`)}function oF(e){let t=this;t.parser=n;function n(n){return eF(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function sF(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function cF(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
90
+ `}]}function lF(e,t){let n=t.value?t.value+`
91
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function uF(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dF(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fF(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=NM(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function pF(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mF(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function hF(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function gF(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return hF(e,t);let i={src:NM(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function _F(e,t){let n={src:NM(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function vF(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function yF(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return hF(e,t);let i={href:NM(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function bF(e,t){let n={href:NM(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function xF(e,t,n){let r=e.all(t),i=n?SF(n):CF(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
92
+ `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
93
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function SF(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=CF(n[r])}return t}function CF(e){return e.spread??e.children.length>1}function wF(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function TF(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function EF(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function DF(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function OF(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Cj(t.children[1]),o=Sj(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function kF(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function AF(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var jF=9,MF=32;function NF(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(PF(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(PF(t.slice(i),i>0,!1)),a.join(``)}function PF(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===jF||t===MF;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===jF||t===MF;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function FF(e,t){let n={type:`text`,value:NF(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function IF(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var LF={blockquote:sF,break:cF,code:lF,delete:uF,emphasis:dF,footnoteReference:fF,heading:pF,html:mF,imageReference:gF,image:_F,inlineCode:vF,linkReference:yF,link:bF,listItem:xF,list:wF,paragraph:TF,root:EF,strong:DF,table:OF,tableCell:AF,tableRow:kF,text:FF,thematicBreak:IF,toml:RF,yaml:RF,definition:RF,footnoteDefinition:RF};function RF(){}var zF=typeof self==`object`?self:globalThis,BF=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new zF[e](t)},VF=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(BF(e,t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(BF(a,o),i)};return r},HF=e=>VF(new Map,e)(0),UF=``,{toString:WF}={},{keys:GF}=Object,KF=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=WF.call(e).slice(8,-1);switch(n){case`Array`:return[1,UF];case`Object`:return[2,UF];case`Date`:return[3,UF];case`RegExp`:return[4,UF];case`Map`:return[5,UF];case`Set`:return[6,UF];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},qF=([e,t])=>e===0&&(t===`function`||t===`symbol`),JF=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=KF(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of GF(r))(e||!qF(KF(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(qF(KF(n))||qF(KF(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!qF(KF(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},YF=(e,{json:t,lossy:n}={})=>{let r=[];return JF(!(t||n),!!t,new Map,r)(e),r},XF=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?HF(YF(e,t)):structuredClone(e):(e,t)=>HF(YF(e,t));function ZF(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function QF(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function $F(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||ZF,r=e.options.footnoteBackLabel||QF,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=NM(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...XF(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
94
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
95
+ `}]}}var eI=(function(e){if(e==null)return aI;if(typeof e==`function`)return iI(e);if(typeof e==`object`)return Array.isArray(e)?tI(e):nI(e);if(typeof e==`string`)return rI(e);throw Error(`Expected function, string, or object as test`)});function tI(e){let t=[],n=-1;for(;++n<e.length;)t[n]=eI(e[n]);return iI(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function nI(e){let t=e;return iI(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function rI(e){return iI(t);function t(t){return t&&t.type===e}}function iI(e){return t;function t(t,n,r){return!!(oI(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function aI(){return!0}function oI(e){return typeof e==`object`&&!!e&&`type`in e}function sI(e){return e}var cI=[];function lI(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=eI(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+sI(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=cI,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=uI(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function uI(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?cI:[e]}function dI(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),lI(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var fI={}.hasOwnProperty,pI={};function mI(e,t){let n=t||pI,r=new Map,i=new Map,a={all:s,applyData:gI,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...LF,...n.handlers},one:o,options:n,patch:hI,wrap:vI};return dI(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(fI.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=XF(n);return r.children=a.all(e),r}return XF(e)}return(a.options.unknownHandler||_I)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=yI(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=yI(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function hI(e,t){e.position&&(t.position=Tj(e))}function gI(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,XF(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function _I(e,t){let n=t.data||{},r=`value`in t&&!(fI.call(n,`hProperties`)||fI.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 vI(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
96
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
97
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
98
+ `}),n}function yI(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function bI(e,t){let n=mI(e,t),r=n.one(e,void 0),i=$F(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
99
+ `},i)),a}function xI(e,t){return e&&`run`in e?async function(n,r){let i=bI(n,{file:r,...t});await e.run(i,r)}:function(n,r){return bI(n,{file:r,...e||t})}}function SI(e){if(e)throw e}var CI=s(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function wI(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function TI(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?EI(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function EI(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var DI={basename:OI,dirname:kI,extname:AI,join:jI,sep:`/`};function OI(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);PI(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function kI(e){if(PI(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||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function AI(e){PI(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function jI(...e){let t=-1,n;for(;++t<e.length;)PI(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:MI(n)}function MI(e){PI(e);let t=e.codePointAt(0)===47,n=NI(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function NI(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function PI(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var FI={cwd:II};function II(){return`/`}function LI(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function RI(e){if(typeof e==`string`)e=new URL(e);else if(!LI(e)){let t=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:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return zI(e)}function zI(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var BI=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],VI=class{constructor(e){let t;t=e?LI(e)?{path:e}:typeof e==`string`||GI(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:FI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<BI.length;){let e=BI[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)BI.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?DI.basename(this.path):void 0}set basename(e){UI(e,`basename`),HI(e,`basename`),this.path=DI.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?DI.dirname(this.path):void 0}set dirname(e){WI(this.basename,`dirname`),this.path=DI.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?DI.extname(this.path):void 0}set extname(e){if(HI(e,`extname`),WI(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=DI.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){LI(e)&&(e=RI(e)),UI(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?DI.basename(this.path,this.extname):void 0}set stem(e){UI(e,`stem`),HI(e,`stem`),this.path=DI.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Aj(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function HI(e,t){if(e&&e.includes(DI.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+DI.sep+"`")}function UI(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function WI(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function GI(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var KI=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),qI=u(CI(),1),JI={}.hasOwnProperty,YI=new class e extends KI{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=TI()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,qI.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(QI(`data`,this.frozen),this.namespace[e]=t,this):JI.call(this.namespace,e)&&this.namespace[e]||void 0:e?(QI(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=tL(e),n=this.parser||this.Parser;return XI(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),XI(`process`,this.parser||this.Parser),ZI(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=tL(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);rL(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),XI(`processSync`,this.parser||this.Parser),ZI(`processSync`,this.compiler||this.Compiler),this.process(e,r),eL(`processSync`,`process`,t),n;function r(e,r){t=!0,SI(e),n=r}}run(e,t,n){$I(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=tL(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),eL(`runSync`,`run`,n),r;function i(e,t){SI(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=tL(t),r=this.compiler||this.Compiler;return ZI(`stringify`,r),$I(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(QI(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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");o(e.plugins),e.settings&&(r.settings=(0,qI.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];wI(o)&&wI(r)&&(r=(0,qI.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function XI(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function ZI(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function QI(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $I(e){if(!wI(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function eL(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function tL(e){return nL(e)?e:new VI(e)}function nL(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function rL(e){return typeof e==`string`||iL(e)}function iL(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var aL=[],oL={allowDangerousHtml:!0},sL=/^(https?|ircs?|mailto|xmpp)$/i,cL=[{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 lL(e){let t=uL(e),n=dL(e);return fL(t.runSync(t.parse(n),n),e)}function uL(e){let t=e.rehypePlugins||aL,n=e.remarkPlugins||aL,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...oL}:oL;return YI().use(oF).use(n).use(xI,r).use(t)}function dL(e){let t=e.children||``,n=new VI;return typeof t==`string`?n.value=t:``+t,n}function fL(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||pL;for(let e of cL)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return dI(e,l),Lj(e,{Fragment:C.Fragment,components:i,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in aM)if(Object.hasOwn(aM,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=aM[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function pL(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||sL.test(e.slice(0,t))?e:``}function mL(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function hL(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function gL(e,t,n){let r=eI((n||{}).ignore||[]),i=_L(t),a=-1;for(;++a<i.length;)lI(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function _L(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([vL(e[0]),yL(e[1])])}return t}function vL(e){return typeof e==`string`?new RegExp(hL(e),`g`):e}function yL(e){return typeof e==`function`?e:function(){return e}}var bL=`phrasing`,xL=[`autolink`,`link`,`image`,`label`];function SL(){return{transforms:[AL],enter:{literalAutolink:wL,literalAutolinkEmail:TL,literalAutolinkHttp:TL,literalAutolinkWww:TL},exit:{literalAutolink:kL,literalAutolinkEmail:OL,literalAutolinkHttp:EL,literalAutolinkWww:DL}}}function CL(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:bL,notInConstruct:xL},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:bL,notInConstruct:xL},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:bL,notInConstruct:xL}]}}function wL(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function TL(e){this.config.enter.autolinkProtocol.call(this,e)}function EL(e){this.config.exit.autolinkProtocol.call(this,e)}function DL(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function OL(e){this.config.exit.autolinkEmail.call(this,e)}function kL(e){this.exit(e)}function AL(e){gL(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,jL],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,ML]],{ignore:[`link`,`linkReference`]})}function jL(e,t,n,r,i){let a=``;if(!FL(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!NL(n)))return!1;let o=PL(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function ML(e,t,n,r){return!FL(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function NL(e){let 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 PL(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=mL(e,`(`),a=mL(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function FL(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||jM(n)||AM(n))&&(!t||n!==47)}GL.peek=WL;function IL(){this.buffer()}function LL(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function RL(){this.buffer()}function zL(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function BL(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=bM(this.sliceSerialize(e)).toLowerCase(),n.label=t}function VL(e){this.exit(e)}function HL(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=bM(this.sliceSerialize(e)).toLowerCase(),n.label=t}function UL(e){this.exit(e)}function WL(){return`[`}function GL(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function KL(){return{enter:{gfmFootnoteCallString:IL,gfmFootnoteCall:LL,gfmFootnoteDefinitionLabelString:RL,gfmFootnoteDefinition:zL},exit:{gfmFootnoteCallString:BL,gfmFootnoteCall:VL,gfmFootnoteDefinitionLabelString:HL,gfmFootnoteDefinition:UL}}}function qL(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:GL},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
100
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?YL:JL))),s(),o}}function JL(e,t,n){return t===0?e:YL(e,t,n)}function YL(e,t,n){return(n?``:` `)+e}var XL=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];tR.peek=nR;function ZL(){return{canContainEols:[`delete`],enter:{strikethrough:$L},exit:{strikethrough:eR}}}function QL(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:XL}],handlers:{delete:tR}}}function $L(e){this.enter({type:`delete`,children:[]},e)}function eR(e){this.exit(e)}function tR(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function nR(){return`~`}function rR(e){return e.length}function iR(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||rR,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=aR(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=oR(r[d]);else{let e=oR(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
101
+ `)}function aR(e){return e==null?``:String(e)}function oR(e){let 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 sR(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),cR);return i(),o}function cR(e,t,n){return`>`+(n?``:` `)+e}function lR(e,t){return uR(e,t.inConstruct,!0)&&!uR(e,t.notInConstruct,!1)}function uR(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 dR(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
102
+ `&&lR(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
103
+ `}function fR(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function pR(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 mR(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function hR(e,t,n,r){let i=mR(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(pR(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,gR);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(fR(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
104
+ `,encode:["`"],...s.current()})),t()}return u+=s.move(`
105
+ `),a&&(u+=s.move(a+`
106
+ `)),u+=s.move(c),l(),u}function gR(e,t,n){return(n?``:` `)+e}function _R(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function vR(e,t,n,r){let i=_R(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
107
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function yR(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function bR(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function xR(e,t,n){let r=VM(e),i=VM(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}SR.peek=CR;function SR(e,t,n,r){let i=yR(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=xR(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=bR(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=xR(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+bR(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function CR(e,t,n){return n.options.emphasis||`*`}function wR(e,t){let n=!1;return dI(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&sM(e)&&(t.options.setext||n))}function TR(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(wR(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
108
+ `,after:`
109
+ `});return r(),t(),o+`
110
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
111
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
112
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=bR(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}ER.peek=DR;function ER(e){return e.value||``}function DR(){return`<`}OR.peek=kR;function OR(e,t,n,r){let i=_R(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function kR(){return`!`}AR.peek=jR;function AR(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function jR(){return`!`}MR.peek=NR;function MR(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function NR(){return"`"}function PR(e,t){let n=sM(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))}FR.peek=IR;function FR(e,t,n,r){let i=_R(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(PR(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function IR(e,t,n){return PR(e,n)?`<`:`[`}LR.peek=RR;function LR(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function RR(){return`[`}function zR(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function BR(e){let t=zR(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function VR(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function HR(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function UR(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?VR(n):zR(n),s=e.ordered?o===`.`?`)`:`.`:BR(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.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&&(c=!0),HR(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function WR(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function GR(e,t,n,r){let i=WR(n),a=n.bulletCurrent||zR(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function KR(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var qR=eI([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function JR(e,t,n,r){return(e.children.some(function(e){return qR(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function YR(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}XR.peek=ZR;function XR(e,t,n,r){let i=YR(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=xR(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=bR(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=xR(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+bR(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function ZR(e,t,n){return n.options.strong||`*`}function QR(e,t,n,r){return n.safe(e.value,r)}function $R(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ez(e,t,n){let r=(HR(n)+(n.options.ruleSpaces?` `:``)).repeat($R(n));return n.options.ruleSpaces?r.slice(0,-1):r}var tz={blockquote:sR,break:dR,code:hR,definition:vR,emphasis:SR,hardBreak:dR,heading:TR,html:ER,image:OR,imageReference:AR,inlineCode:MR,link:FR,linkReference:LR,list:UR,listItem:GR,paragraph:KR,root:JR,strong:XR,text:QR,thematicBreak:ez};function nz(){return{enter:{table:rz,tableData:sz,tableHeader:sz,tableRow:az},exit:{codeText:cz,table:iz,tableData:oz,tableHeader:oz,tableRow:oz}}}function rz(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function iz(e){this.exit(e),this.data.inTable=void 0}function az(e){this.enter({type:`tableRow`,children:[]},e)}function oz(e){this.exit(e)}function sz(e){this.enter({type:`tableCell`,children:[]},e)}function cz(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,lz));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function lz(e,t){return t===`|`?t:e}function uz(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
113
+ `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
114
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return iR(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=tz.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function dz(){return{exit:{taskListCheckValueChecked:pz,taskListCheckValueUnchecked:pz,paragraph:mz}}}function fz(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:hz}}}function pz(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function mz(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function hz(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=tz.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function gz(){return[SL(),KL(),ZL(),nz(),dz()]}function _z(e){return{extensions:[CL(),qL(e),QL(),uz(e),fz()]}}var vz={tokenize:Mz,partial:!0},yz={tokenize:Nz,partial:!0},bz={tokenize:Pz,partial:!0},xz={tokenize:Fz,partial:!0},Sz={tokenize:Iz,partial:!0},Cz={name:`wwwAutolink`,tokenize:Az,previous:Lz},wz={name:`protocolAutolink`,tokenize:jz,previous:Rz},Tz={name:`emailAutolink`,tokenize:kz,previous:zz},Ez={};function Dz(){return{text:Ez}}for(var Oz=48;Oz<123;)Ez[Oz]=Tz,Oz++,Oz===58?Oz=65:Oz===91&&(Oz=97);Ez[43]=Tz,Ez[45]=Tz,Ez[46]=Tz,Ez[95]=Tz,Ez[72]=[Tz,wz],Ez[104]=[Tz,wz],Ez[87]=[Tz,Cz],Ez[119]=[Tz,Cz];function kz(e,t,n){let r=this,i,a;return o;function o(t){return!Bz(t)||!zz.call(r,r.previous)||Vz(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Bz(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Sz,u,l)(t):t===45||t===95||SM(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&xM(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Az(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Lz.call(r,r.previous)||Vz(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(vz,e.attempt(yz,e.attempt(bz,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function jz(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Rz.call(r,r.previous)&&!Vz(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(xM(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||wM(t)||OM(t)||jM(t)||AM(t)?n(t):e.attempt(yz,e.attempt(bz,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Mz(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Nz(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(xz,c,s)(t):t===null||OM(t)||jM(t)||t!==45&&AM(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Pz(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(xz,t,a)(o):o===null||OM(o)||jM(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Fz(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||OM(o)||jM(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||OM(e)||jM(e)?t(e):r(e)}function a(e){return xM(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):xM(t)?(e.consume(t),o):n(t)}}function Iz(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return SM(e)?n(e):t(e)}}function Lz(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||OM(e)}function Rz(e){return!xM(e)}function zz(e){return!(e===47||Bz(e))}function Bz(e){return e===43||e===45||e===46||e===95||SM(e)}function Vz(e){let t=e.length,n=!1;for(;t--;){let 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}var Hz={tokenize:Xz,partial:!0};function Uz(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:qz,continuation:{tokenize:Jz},exit:Yz}},text:{91:{name:`gfmFootnoteCall`,tokenize:Kz},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Wz,resolveTo:Gz}}}}function Wz(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=bM(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Gz(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`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Kz(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||OM(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(bM(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return OM(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function qz(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||OM(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=bM(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return OM(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),PM(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Jz(e,t,n){return e.check(YM,t,e.attempt(Hz,t,n))}function Yz(e){e.exit(`gfmFootnoteDefinition`)}function Xz(e,t,n){let r=this;return PM(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Zz(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&pM(o,o.length,0,HM(s,e.slice(r+1,n),t)),pM(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),pM(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=VM(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=VM(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Qz=class{constructor(){this.map=[]}add(e,t,n){$z(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function $z(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function eB(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function tB(){return{flow:{null:{name:`table`,tokenize:nB,resolveAll:rB}}}}function nB(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):$(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):kM(t)?PM(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||OM(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,kM(t)?PM(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return kM(t)?PM(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||$(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return kM(t)?PM(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||$(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||$(n)?(e.exit(`tableRow`),t(n)):kM(n)?PM(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||OM(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function rB(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Qz;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(aB(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=iB(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=iB(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=iB(f,t,o,i,n,d)):(o[0]=o[1],d=iB(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&aB(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=eB(t.events,n))}return e}function iB(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},oB(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=oB(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=oB(t.events,n[2]),a=oB(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},oB(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function aB(e,t,n,r,i){let a=[],o=oB(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function oB(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var sB={name:`tasklistCheck`,tokenize:lB};function cB(){return{text:{91:sB}}}function lB(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return OM(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return $(r)?t(r):kM(r)?e.check({tokenize:uB},t,n)(r):n(r)}}function uB(e,t,n){return PM(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function dB(e){return gM([Dz(),Uz(),Zz(e),tB(),cB()])}var fB={};function pB(e){let t=this,n=e||fB,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(dB(n)),a.push(gz()),o.push(_z(n))}function mB({content:e,className:t}){return(0,C.jsx)(`div`,{className:K(`space-y-3 break-words text-foreground`,`[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-4`,`[&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-4 [&_blockquote]:text-muted-foreground`,`[&_code]:rounded [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-[0.85em]`,`[&_h1]:text-xl [&_h1]:font-semibold [&_h2]:text-lg [&_h2]:font-semibold [&_h3]:font-semibold`,`[&_li]:ml-5 [&_ol]:list-decimal [&_ul]:list-disc`,`[&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:bg-muted [&_pre]:p-3 [&_pre_code]:bg-transparent [&_pre_code]:p-0`,`[&_table]:w-full [&_table]:border-collapse [&_td]:border [&_td]:border-border [&_td]:px-2 [&_td]:py-1 [&_th]:border [&_th]:border-border [&_th]:px-2 [&_th]:py-1 [&_th]:text-left`,t),children:(0,C.jsx)(lL,{remarkPlugins:[pB],children:e})})}function hB(e){return!Number.isFinite(e)||e<=0?`0.0s`:e<1?`${e.toFixed(1)}s`:`${Math.round(e)}s`}function gB(e){return e===void 0?`Thought`:`Thought for ${hB(e)}`}function _B({durationSeconds:e,isOpen:t=!1,isThinking:n=!1,onToggle:r,reasoningText:i=``}){let a=Fk(),o=i.trim().length>0;if(!o&&!n&&e===void 0)return null;let s=n?`Thinking...`:gB(e),c=a?{duration:0}:{duration:.18,ease:[.23,1,.32,1]};return(0,C.jsxs)(`div`,{className:`mb-2 text-xs text-muted-foreground`,children:[(0,C.jsxs)(`button`,{type:`button`,"aria-expanded":t,onClick:r,className:`inline-flex items-center gap-1.5 text-left font-medium text-muted-foreground transition-colors duration-150 ease-[var(--natroc-ease-out)] hover:text-foreground`,children:[(0,C.jsx)(Ke,{className:`size-3.5 shrink-0`}),n?(0,C.jsx)(kA,{text:s,duration:1.4}):(0,C.jsx)(`span`,{children:s}),(0,C.jsx)(X.span,{"aria-hidden":`true`,animate:{rotate:t?180:0},transition:c,className:`inline-flex`,children:(0,C.jsx)(Ye,{className:`size-3.5 shrink-0`})})]}),(0,C.jsx)(zD,{initial:!1,children:t&&o&&(0,C.jsx)(X.div,{initial:a?!1:{height:0,opacity:0,y:-4},animate:{height:`auto`,opacity:1,y:0},exit:a?{opacity:0}:{height:0,opacity:0},transition:c,className:`overflow-hidden`,children:(0,C.jsx)(`div`,{className:`mt-1 pl-5`,children:(0,C.jsx)(mB,{content:i,className:K(`space-y-1 text-xs leading-relaxed text-muted-foreground`,`[&_p]:my-0 [&_pre]:my-1 [&_pre]:rounded-md [&_pre]:border [&_pre]:border-border/60 [&_pre]:bg-muted/40 [&_pre]:p-2`)})})},`reasoning-content`)})]})}function vB({events:e}){return e.length===0?null:(0,C.jsx)(`div`,{className:`mb-2 flex flex-col gap-1.5`,children:e.map(e=>(0,C.jsx)(yB,{event:e},e.id))})}function yB({event:e}){let[t,n]=(0,b.useState)(!1);return(0,C.jsxs)(`div`,{className:`natroc-soft-panel rounded-lg border border-border bg-muted/30 text-xs`,children:[(0,C.jsxs)(`button`,{type:`button`,onClick:()=>n(e=>!e),className:`flex w-full items-center gap-2 px-3 py-2 text-left`,children:[(0,C.jsx)(bB,{status:e.status}),(0,C.jsx)(`span`,{className:`shrink-0 font-medium text-foreground`,children:e.name}),(0,C.jsx)(`span`,{className:`truncate text-muted-foreground`,children:xB(e.args)}),e.risk===`high`&&(0,C.jsx)(`span`,{className:`shrink-0 rounded bg-amber-500/15 px-1.5 py-0.5 text-[0.65rem] font-medium text-amber-600 dark:text-amber-400`,children:`high risk`}),(0,C.jsx)(Ye,{className:K(`ml-auto h-4 w-4 shrink-0 text-muted-foreground transition-transform`,t&&`rotate-180`)})]}),t&&(0,C.jsx)(`div`,{className:`border-t border-border px-3 py-2`,children:(0,C.jsx)(`pre`,{className:`overflow-x-auto whitespace-pre-wrap break-words text-[0.7rem] leading-relaxed text-muted-foreground`,children:e.output??`Running...`})})]})}function bB({status:e}){return e===`running`?(0,C.jsx)(`span`,{className:`h-3.5 w-3.5 shrink-0 animate-spin rounded-full border-2 border-muted-foreground/30 border-t-muted-foreground`}):e===`error`?(0,C.jsx)(qt,{className:`h-4 w-4 shrink-0 text-destructive`}):(0,C.jsx)(Je,{className:`h-4 w-4 shrink-0 text-green-600 dark:text-green-400`})}function xB(e){let t=Object.entries(e).map(([e,t])=>`${e}: ${typeof t==`string`?t:JSON.stringify(t)}`).join(` · `);return t.length>90?`${t.slice(0,90)}…`:t}var SB={id:`ollama`,listModels:CB};async function CB(){return(await J.call(`providers.models`,{provider:`ollama`})).models??[]}var wB={id:`openrouter`,listModels:TB};async function TB(){return(await J.call(`providers.models`,{provider:`openrouter`})).models??[]}var EB={openrouter:wB,ollama:SB};function DB(e){return EB[e]}function OB(e){return DB(e).listModels()}async function kB(){try{return(await J.call(`providers.list`)).providers?.find(e=>e.isActive)??null}catch{return null}}async function AB(e){return(await J.call(`conversations.messages`,{conversationId:e})).messages??[]}function jB(e,t){return new Promise((n,r)=>{t.onStart?.(),J.stream(`agent.chat`,e,{onEvent:e=>{let n=e;switch(n.type){case`text`:t.onText(n.delta);break;case`reasoning`:t.onReasoning(n.delta);break;case`step`:t.onStep?.();break;case`tool_call`:t.onToolCall?.({id:n.id,name:n.name,args:n.args,risk:n.risk});break;case`tool_result`:t.onToolResult?.({id:n.id,status:n.status,output:n.output});break;case`metadata`:break}},onEnd:e=>{t.onDone(e),n()},onError:e=>r(e)})})}function MB(e,t,n){return t||(n&&e.some(e=>e.id===n)?n:e[0]?.id??n??void 0)}function NB(e,t){return!t||e.some(e=>e.id===t)?e:[{id:t,name:t},...e]}var PB=[`medium`,`low`,`auto`,`high`,`minimal`,`xhigh`];function FB(e){let t=e.replace(/[_-]+/g,` `).trim();return t.toLowerCase()===`xhigh`?`Extra High`:t.split(/\s+/).map(e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`).join(` `)}function IB(e){return e?.thinking?.supported?e.thinking.efforts.map(e=>({value:e,label:FB(e)})):[]}function LB(e,t){return t&&e.some(e=>e.value===t)?t:PB.find(t=>e.some(e=>e.value===t))??e[0]?.value}var RB=`The agent finished without a visible response. Please try again.`;function zB(){let[e,t]=(0,b.useState)([]),[n,r]=(0,b.useState)(!1),[i,a]=(0,b.useState)(),[o,s]=(0,b.useState)(null),[c,l]=(0,b.useState)([]),[u,d]=(0,b.useState)(),[f,p]=(0,b.useState)(),[m,h]=(0,b.useState)(!1),g=(0,b.useRef)(null),_=o?.baseUrl??null,v=o?.defaultModel??null,y=o?.id,x=o?.provider,S=(0,b.useMemo)(()=>NB(c,u),[c,u]),C=(0,b.useMemo)(()=>S.find(e=>e.id===u),[S,u]),w=(0,b.useMemo)(()=>IB(C),[C]),T=(0,b.useMemo)(()=>!y||!x?null:{baseUrl:_,defaultModel:v,id:y,provider:x},[_,v,y,x]),E=(0,b.useCallback)(async()=>{s(await kB())},[]),D=(0,b.useCallback)(async e=>{r(!0);try{let n=await AB(e);a(e),t(n.map(e=>({id:e.id,role:e.role,text:e.content,files:[]})))}catch(e){t([{id:crypto.randomUUID(),role:`error`,text:e instanceof Error?e.message:`Failed to load conversation.`,files:[]}])}finally{r(!1)}},[]),O=(0,b.useCallback)(async()=>{let e=window.location.hash.match(/^#\/chat\/(.+)$/)?.[1];e&&await D(e)},[D]);return(0,b.useEffect)(()=>{E(),O();let e=()=>{E()},n=e=>{let t=e;t.detail?.id&&D(t.detail.id)},r=()=>{a(void 0),t([])};return window.addEventListener(`natroc:provider-updated`,e),window.addEventListener(`natroc:conversation-selected`,n),window.addEventListener(`natroc:new-conversation`,r),()=>{window.removeEventListener(`natroc:provider-updated`,e),window.removeEventListener(`natroc:conversation-selected`,n),window.removeEventListener(`natroc:new-conversation`,r)}},[D,O,E]),(0,b.useEffect)(()=>{if(!T){g.current=null,l([]),d(void 0),p(void 0);return}let e=T,t=BB(e),n=g.current===t,r=!1;g.current=t,n||(l([]),d(void 0),p(void 0));async function i(){h(!0);try{let t=await OB(e.provider);if(r)return;l(t),d(r=>MB(t,n?r:void 0,e.defaultModel))}catch{if(r)return;n||l([]),d(t=>n?t??e.defaultModel??void 0:e.defaultModel??void 0)}finally{r||h(!1)}}return i(),()=>{r=!0}},[T]),(0,b.useEffect)(()=>{p(e=>LB(w,e))},[w]),{activeProvider:o,handleSend:async(e,c,l)=>{let d=e.trim();if(!d||n)return;let f=l?.thinkingEffort?{enabled:!0,effort:l.thinkingEffort}:void 0,p=(c??[]).map(e=>({name:e.name,url:URL.createObjectURL(e)})),m=crypto.randomUUID();t(e=>[...e,{id:m,role:`user`,text:d,files:p}]),r(!0);let h=crypto.randomUUID(),g=null,_=0,v,y=()=>{g===null&&(g=performance.now())},b=()=>(g!==null&&(_+=(performance.now()-g)/1e3,g=null,v=_),v);try{let e=o??await kB();if(!e)throw Error(`Connect OpenRouter or Ollama before sending a message.`);await jB({conversationId:i,message:d,model:u,thinking:f},{onStart(){t(e=>[...e,VB(h)])},onStep(){t(e=>e.map(e=>e.id===h?{...e,text:``}:e))},onText(e){t(t=>t.map(t=>t.id===h?{...t,text:t.text+e,isLoading:!1,isThinking:!1,thinkingDurationSeconds:b()??t.thinkingDurationSeconds}:t))},onToolCall(e){t(t=>t.map(t=>t.id===h?{...t,text:``,isLoading:!1,isThinking:!1,thinkingDurationSeconds:b()??t.thinkingDurationSeconds,toolEvents:[...t.toolEvents??[],{id:e.id,name:e.name,args:e.args,risk:e.risk,status:`running`}]}:t))},onToolResult(e){t(t=>t.map(t=>t.id===h?{...t,toolEvents:(t.toolEvents??[]).map(t=>t.id===e.id?{...t,status:e.status,output:e.output}:t)}:t))},onReasoning(e){y(),t(t=>t.map(t=>t.id===h?{...t,reasoningText:`${t.reasoningText??``}${e}`,isLoading:!1,isThinking:!0,thinkingDurationSeconds:void 0}:t))},onDone(n){a(n.conversationId),window.dispatchEvent(new Event(`natroc:conversation-updated`)),s(e),t(e=>e.map(e=>e.id===h?{...e,text:HB(n.content,e.text),isLoading:!1,isThinking:!1,thinkingDurationSeconds:b()??e.thinkingDurationSeconds}:e))}})}catch(e){t(t=>[...t.filter(e=>e.id!==h||!!(e.text||e.reasoningText||e.toolEvents&&e.toolEvents.length>0)).map(e=>e.id===h?{...e,isThinking:!1,thinkingDurationSeconds:b()??e.thinkingDurationSeconds}:e),{id:crypto.randomUUID(),role:`error`,text:e instanceof Error?e.message:`Failed to send message.`,files:[]}])}finally{r(!1)}},handleToggleReasoning:e=>{t(t=>t.map(t=>t.id===e?{...t,isReasoningOpen:!t.isReasoningOpen}:t))},isEmpty:e.length===0,isLoading:n,isLoadingModels:m,messages:e,modelOptions:S,selectedModel:u,selectedThinkingEffort:f,setSelectedModel:d,setSelectedThinkingEffort:p,thinkingEffortOptions:w}}function BB(e){return`${e.provider}:${e.id}:${e.baseUrl??``}`}function VB(e){return{id:e,role:`assistant`,text:``,reasoningText:``,isReasoningOpen:!1,isLoading:!0,isThinking:!1,thinkingDurationSeconds:void 0,toolEvents:[],files:[]}}function HB(e,t){return e.trim()?e:t.trim()?t:RB}function UB({clientHeight:e,scrollHeight:t}){return Math.max(0,t-e)}var WB=48,GB=360;function KB(){let{activeProvider:e,handleSend:t,handleToggleReasoning:n,isEmpty:r,isLoading:i,isLoadingModels:a,messages:o,modelOptions:s,selectedModel:c,selectedThinkingEffort:l,setSelectedModel:u,setSelectedThinkingEffort:d,thinkingEffortOptions:f}=zB(),p=(0,b.useRef)(null),m=(0,b.useRef)(!0),h=(0,b.useRef)(!1),g=(0,b.useRef)(null),[_,v]=(0,b.useState)(!0),[y,x]=(0,b.useState)(!1),S=(0,b.useCallback)((e=`auto`)=>{let t=p.current;t&&(t.scrollTo({top:UB(t),behavior:e}),v(!0))},[]),w=(0,b.useCallback)(()=>{let e=p.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight<=WB;if(h.current){m.current=!0,v(t);return}m.current=t,v(t)},[]),T=(0,b.useCallback)(()=>{m.current=!0,h.current=!0,x(!0),g.current!==null&&window.clearTimeout(g.current);let e=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;S(e?`auto`:`smooth`);let t=()=>{S(),h.current=!1,x(!1),g.current=null};if(e){t();return}g.current=window.setTimeout(t,GB)},[S]),E=(0,b.useCallback)((e,n,r)=>{m.current=!0,v(!0),t(e,n,r),requestAnimationFrame(()=>S())},[t,S]);return(0,b.useEffect)(()=>{if(r){m.current=!0;let e=window.setTimeout(()=>{v(!0)},0);return()=>window.clearTimeout(e)}if(!m.current)return;let e=requestAnimationFrame(()=>S());return()=>cancelAnimationFrame(e)},[r,o,S]),(0,b.useEffect)(()=>()=>{g.current!==null&&window.clearTimeout(g.current),h.current=!1},[]),(0,C.jsxs)(`div`,{className:K(`flex h-full min-h-0 w-full flex-col items-center gap-4 overflow-hidden`,r?`justify-center`:`justify-end`),children:[!r&&(0,C.jsx)(`div`,{ref:p,onScroll:w,className:`flex min-h-0 w-full max-w-2xl flex-1 scrollbar-none flex-col gap-3 overflow-y-auto py-4 [&::-webkit-scrollbar]:hidden`,children:o.map(e=>(0,C.jsxs)(`div`,{className:K(`natroc-message-enter text-sm leading-relaxed`,e.role===`user`&&`self-end rounded-2xl border border-border bg-muted/40 px-4 py-2`,e.role===`assistant`&&`w-full self-start py-1`,e.role===`error`&&`self-start rounded-2xl border border-destructive/30 bg-destructive/10 px-4 py-2 text-destructive`),children:[e.role===`assistant`&&(e.reasoningText||e.isThinking||e.thinkingDurationSeconds!==void 0)&&(0,C.jsx)(_B,{durationSeconds:e.thinkingDurationSeconds,isOpen:e.isReasoningOpen,isThinking:e.isThinking,reasoningText:e.reasoningText,onToggle:()=>n(e.id)}),e.role===`assistant`&&e.toolEvents&&e.toolEvents.length>0&&(0,C.jsx)(vB,{events:e.toolEvents}),e.role===`assistant`&&e.isLoading&&!e.text&&!e.reasoningText&&!e.toolEvents?.length&&(0,C.jsx)(OA,{}),e.text&&(e.role===`assistant`?(0,C.jsx)(mB,{content:e.text}):(0,C.jsx)(`p`,{className:`whitespace-pre-wrap`,children:e.text})),e.files.length>0&&(0,C.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:e.files.map(e=>(0,C.jsx)(`img`,{src:e.url,alt:e.name,className:`h-20 w-20 rounded-lg object-cover`},e.url))})]},e.id))}),(0,C.jsxs)(`div`,{className:`flex w-full max-w-2xl shrink-0 flex-col items-center gap-3`,children:[r&&(0,C.jsxs)(`div`,{className:`natroc-stagger flex max-w-2xl flex-col items-center gap-3 text-center`,children:[(0,C.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-foreground md:text-3xl`,children:`Good morning! May this beautiful morning lead you to progress. Have a productive day ahead.`}),(0,C.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e?`Using ${e.displayName}${c?` · ${c}`:``}`:`Connect OpenRouter or Ollama to start chatting.`})]}),(0,C.jsxs)(`div`,{className:`relative w-full`,children:[(!_||y)&&(0,C.jsx)(`div`,{className:`pointer-events-none absolute bottom-full left-0 z-10 mb-2 flex w-full justify-center`,children:(0,C.jsx)(`button`,{type:`button`,"aria-label":i?`Follow agent stream`:`Scroll to latest message`,onClick:T,className:K(`natroc-soft-panel pointer-events-auto inline-flex h-8 w-8 items-center justify-center rounded-full border border-border bg-card text-muted-foreground shadow-[0_8px_24px_rgba(0,0,0,0.14)] transition-[background-color,color,transform] duration-150 ease-[var(--natroc-ease-out)] hover:bg-muted hover:text-foreground active:scale-[0.96] motion-reduce:active:scale-100`,y&&`natroc-jump-to-latest`),children:(0,C.jsx)($e,{className:`h-4 w-4`})})}),(0,C.jsx)(DA,{onSend:E,isLoading:i,placeholder:`Write a message...`,selectedModel:c,modelOptions:s,onModelChange:u,isModelLoading:a,isModelDisabled:!e,thinkingEffortOptions:f,selectedThinkingEffort:l,onThinkingEffortChange:d})]})]})]})}var qB=[`image/png`,`image/jpeg`,`image/webp`],JB=2*1024*1024;function YB(){let[e,t]=(0,b.useState)(null),[n,r]=(0,b.useState)({status:`loading`}),[i,a]=(0,b.useState)({status:`idle`}),[o,s]=(0,b.useState)({status:`idle`}),[c,l]=(0,b.useState)(null),[u,d]=(0,b.useState)({currentPassword:``,newPassword:``,confirmPassword:``}),f=(0,b.useRef)(null),p=(0,b.useCallback)(e=>{t(e),window.dispatchEvent(new CustomEvent(`natroc:user-updated`,{detail:e}))},[]),m=(0,b.useCallback)(async()=>{r({status:`loading`});try{let e=await J_();if(!e){r({status:`error`,message:`Account session is not available.`});return}t(e),r({status:`idle`})}catch(e){r({status:`error`,message:e instanceof Error?e.message:`Failed to load account.`})}},[]);(0,b.useEffect)(()=>{let e=window.setTimeout(()=>{m()},0);return()=>window.clearTimeout(e)},[m]);let h=async e=>{let t=e.currentTarget.files?.[0];if(e.currentTarget.value=``,!(!t||i.status===`loading`)){if(!ZB(t.type)){me.error(`Profile picture must be PNG, JPEG, or WebP.`),a({status:`error`,message:`Profile picture must be PNG, JPEG, or WebP.`});return}if(t.size>JB){me.error(`Profile picture must be 2MB or smaller.`),a({status:`error`,message:`Profile picture must be 2MB or smaller.`});return}a({status:`loading`});try{let e=await QB(t);l(e),p((await Z_({dataUrl:e})).user),l(null),me.success(`Profile picture updated.`),a({status:`success`,message:`Profile picture updated.`})}catch(e){let t=$B(e,`Failed to update profile picture.`);l(null),me.error(t),a({status:`error`,message:t})}}},g=async()=>{if(!(i.status===`loading`||!e?.avatarUrl)){a({status:`loading`});try{p((await Z_({dataUrl:null})).user),me.success(`Profile picture removed.`),a({status:`success`,message:`Profile picture removed.`})}catch(e){let t=$B(e,`Failed to remove profile picture.`);me.error(t),a({status:`error`,message:t})}}},_=async e=>{if(e.preventDefault(),o.status!==`loading`){if(u.newPassword!==u.confirmPassword){me.error(`New password and confirmation do not match.`),s({status:`error`,message:`New password and confirmation do not match.`});return}s({status:`loading`});try{p((await X_({currentPassword:u.currentPassword,newPassword:u.newPassword})).user),d({currentPassword:``,newPassword:``,confirmPassword:``}),me.success(`Password updated.`),s({status:`success`,message:`Password updated.`})}catch(e){let t=$B(e,`Failed to update password.`);me.error(t),s({status:`error`,message:t})}}},v=e?.fullName.trim().charAt(0).toUpperCase()||`N`,y=c??e?.avatarUrl,x=i.status===`loading`,S=o.status===`loading`;return n.status===`loading`?(0,C.jsx)(`section`,{className:`natroc-enter flex min-h-[calc(100svh-7rem)] items-center justify-center text-sm text-muted-foreground`,children:`Loading account...`}):!e||n.status===`error`?(0,C.jsxs)(`section`,{className:`natroc-enter flex min-h-[calc(100svh-7rem)] flex-col items-center justify-center gap-3`,children:[(0,C.jsx)(`p`,{className:`text-sm text-destructive`,children:n.message??`Failed to load account.`}),(0,C.jsxs)(q,{variant:`secondary`,onClick:()=>void m(),children:[(0,C.jsx)(Ft,{}),`Retry`]})]}):(0,C.jsxs)(`section`,{className:`natroc-enter flex min-h-[calc(100svh-7rem)] w-full flex-col gap-6`,children:[(0,C.jsxs)(`div`,{className:`space-y-2`,children:[(0,C.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Account Settings`}),(0,C.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.username})]}),(0,C.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-[minmax(0,0.8fr)_minmax(0,1.2fr)]`,children:[(0,C.jsx)(`section`,{className:`natroc-soft-panel rounded-lg border border-border bg-card p-4`,children:(0,C.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,C.jsxs)(C_,{className:`size-20`,children:[y&&(0,C.jsx)(w_,{src:y,alt:e.fullName}),(0,C.jsx)(T_,{className:`text-xl`,children:v})]}),(0,C.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,C.jsx)(`h2`,{className:`font-medium`,children:`Profile Picture`}),(0,C.jsx)(`p`,{className:`mt-1 truncate text-sm text-muted-foreground`,children:e.fullName}),(0,C.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center gap-2`,children:[(0,C.jsxs)(q,{type:`button`,variant:`secondary`,onClick:()=>f.current?.click(),disabled:x,children:[(0,C.jsx)(ht,{}),`Choose image`]}),(0,C.jsxs)(q,{type:`button`,variant:`ghost`,onClick:()=>void g(),disabled:x||!e.avatarUrl,children:[(0,C.jsx)(Ht,{}),`Remove`]})]}),(0,C.jsx)(`input`,{ref:f,type:`file`,className:`hidden`,accept:qB.join(`,`),onChange:h}),(0,C.jsx)(XB,{state:i})]})]})}),(0,C.jsxs)(`form`,{className:`natroc-soft-panel rounded-lg border border-border bg-card p-4`,onSubmit:_,children:[(0,C.jsxs)(`div`,{className:`mb-5 flex items-center gap-2`,children:[(0,C.jsx)(St,{className:`size-4 text-muted-foreground`}),(0,C.jsx)(`h2`,{className:`font-medium`,children:`Password`})]}),(0,C.jsxs)(`div`,{className:`grid gap-4`,children:[(0,C.jsxs)(`div`,{className:`grid gap-2`,children:[(0,C.jsx)(vv,{htmlFor:`account-current-password`,children:`Current password`}),(0,C.jsx)(jg,{id:`account-current-password`,type:`password`,autoComplete:`current-password`,value:u.currentPassword,onChange:e=>d(t=>({...t,currentPassword:e.currentTarget.value})),required:!0})]}),(0,C.jsxs)(`div`,{className:`grid gap-2`,children:[(0,C.jsx)(vv,{htmlFor:`account-new-password`,children:`New password`}),(0,C.jsx)(jg,{id:`account-new-password`,type:`password`,autoComplete:`new-password`,minLength:6,value:u.newPassword,onChange:e=>d(t=>({...t,newPassword:e.currentTarget.value})),required:!0})]}),(0,C.jsxs)(`div`,{className:`grid gap-2`,children:[(0,C.jsx)(vv,{htmlFor:`account-confirm-password`,children:`Confirm new password`}),(0,C.jsx)(jg,{id:`account-confirm-password`,type:`password`,autoComplete:`new-password`,minLength:6,value:u.confirmPassword,onChange:e=>d(t=>({...t,confirmPassword:e.currentTarget.value})),required:!0})]})]}),(0,C.jsxs)(`div`,{className:`mt-5 flex flex-wrap items-center justify-between gap-3`,children:[(0,C.jsx)(XB,{state:o}),(0,C.jsx)(q,{type:`submit`,disabled:S||!u.currentPassword||!u.newPassword||!u.confirmPassword,children:S?`Saving...`:`Save password`})]})]})]})]})}function XB({state:e}){return e.message?(0,C.jsx)(`p`,{className:K(`mt-3 text-sm`,e.status===`error`?`text-destructive`:`text-muted-foreground`),children:e.message}):null}function ZB(e){return qB.some(t=>t===e)}function QB(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{if(typeof r.result==`string`){t(r.result);return}n(Error(`Unable to read profile picture.`))},r.onerror=()=>n(Error(`Unable to read profile picture.`)),r.readAsDataURL(e)})}function $B(e,t){return e instanceof Error?e.message:t}function eV({className:e,...t}){return(0,C.jsx)(`div`,{"data-slot":`field-group`,className:K(`group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,e),...t})}var tV=wg(`group/field flex w-full gap-2 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:`flex-col *:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function nV({className:e,orientation:t=`vertical`,...n}){return(0,C.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":t,className:K(tV({orientation:t}),e),...n})}function rV({className:e,...t}){return(0,C.jsx)(vv,{"data-slot":`field-label`,className:K(`group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,e),...t})}function iV({className:e,...t}){return(0,C.jsx)(`p`,{"data-slot":`field-description`,className:K(`text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5`,`last:mt-0 nth-last-2:-mt-1`,`[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function aV({className:e,children:t,errors:n,...r}){let i=(0,b.useMemo)(()=>{if(t)return t;if(!n?.length)return null;let e=[...new Map(n.map(e=>[e?.message,e])).values()];return e?.length==1?e[0]?.message:(0,C.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:e.map((e,t)=>e?.message&&(0,C.jsx)(`li`,{children:e.message},t))})},[t,n]);return i?(0,C.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:K(`text-sm font-normal text-destructive`,e),...r,children:i}):null}var oV=[{cx:48,cy:68},{cx:104,cy:36},{cx:152,cy:72},{cx:86,cy:130},{cx:164,cy:154}],sV=[`M48 68L104 36L152 72`,`M48 68L86 130L164 154`,`M104 36L86 130L152 72L164 154`];function cV(){let e=Fk();return(0,C.jsxs)(X.svg,{"aria-hidden":`true`,viewBox:`0 0 212 188`,className:`h-full w-full text-foreground`,fill:`none`,initial:e?!1:{opacity:0,y:8},animate:e?void 0:{opacity:1,y:0},transition:{duration:.35,ease:[.22,1,.36,1]},children:[(0,C.jsx)(`rect`,{x:`18`,y:`18`,width:`176`,height:`152`,rx:`18`,fill:`oklch(0.98 0.004 250 / 0.7)`,stroke:`oklch(0.48 0.02 250 / 0.16)`}),(0,C.jsx)(`path`,{d:`M42 156h128`,stroke:`oklch(0.48 0.02 250 / 0.16)`,strokeLinecap:`round`}),sV.map((t,n)=>(0,C.jsx)(X.path,{d:t,stroke:`oklch(0.62 0.08 218 / 0.58)`,strokeWidth:`2`,strokeLinecap:`round`,initial:e?!1:{pathLength:.2,opacity:.35},animate:e?void 0:{pathLength:[.2,1,.2],opacity:[.32,.72,.32]},transition:{delay:n*.16,duration:2.6,repeat:1/0,ease:[.22,1,.36,1]}},t)),oV.map((t,n)=>(0,C.jsxs)(X.g,{animate:e?void 0:{scale:[1,1.08,1],opacity:[.78,1,.78]},transition:{delay:n*.12,duration:2,repeat:1/0,ease:`easeInOut`},style:{originX:t.cx,originY:t.cy},children:[(0,C.jsx)(`circle`,{cx:t.cx,cy:t.cy,r:`12`,fill:`oklch(0.96 0.01 250)`,stroke:`oklch(0.46 0.04 250 / 0.28)`}),(0,C.jsx)(`circle`,{cx:t.cx,cy:t.cy,r:`4`,fill:`oklch(0.62 0.08 218)`})]},`${t.cx}-${t.cy}`)),(0,C.jsx)(X.rect,{x:`68`,y:`79`,width:`76`,height:`35`,rx:`12`,fill:`oklch(0.18 0.012 250)`,animate:e?void 0:{y:[79,76,79]},transition:{duration:3,repeat:1/0,ease:[.22,1,.36,1]}}),(0,C.jsx)(X.path,{d:`M88 96h36`,stroke:`oklch(0.82 0.1 190)`,strokeWidth:`3`,strokeLinecap:`round`,animate:e?void 0:{opacity:[.45,1,.45]},transition:{duration:1.8,repeat:1/0,ease:`easeInOut`}})]})}function lV({brandName:e=`Natroc`,className:t,errorMessage:n,isLoading:r=!1,logo:i=(0,C.jsx)(Pv,{}),onForgotPassword:a,onRegister:o,onSubmit:s}){let[c,l]=(0,b.useState)({password:``,username:``}),[u,d]=(0,b.useState)(!1),f=c.username.trim().length>0&&c.password.trim().length>0&&!r;return(0,C.jsx)(`main`,{className:K(`grid h-dvh max-h-dvh min-h-0 overflow-hidden bg-background text-foreground`,t),children:(0,C.jsxs)(`div`,{className:`grid min-h-0 lg:grid-cols-[minmax(24rem,0.9fr)_minmax(0,1.1fr)]`,children:[(0,C.jsx)(`section`,{className:`flex min-h-0 items-center justify-center px-4 py-6 sm:px-6 lg:px-10`,children:(0,C.jsxs)(X.div,{className:`flex w-full max-w-sm flex-col gap-7`,initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.35,ease:[.22,1,.36,1]},children:[(0,C.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,C.jsx)(`span`,{className:`flex size-10 items-center justify-center rounded-lg border bg-card text-foreground`,children:i}),(0,C.jsxs)(`div`,{className:`flex flex-col`,children:[(0,C.jsx)(`span`,{className:`text-base leading-tight font-semibold`,children:e}),(0,C.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Agent workspace`})]})]}),(0,C.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,C.jsx)(`h1`,{className:`text-2xl font-semibold tracking-normal`,children:`Welcome back`}),(0,C.jsx)(`p`,{className:`max-w-[46ch] text-sm leading-6 text-muted-foreground`,children:`Sign in with your workspace username and password.`})]}),(0,C.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),f&&s?.({password:c.password,username:c.username.trim()})},className:`flex flex-col gap-5`,children:[(0,C.jsxs)(eV,{children:[(0,C.jsxs)(nV,{children:[(0,C.jsx)(rV,{htmlFor:`login-username`,children:`Username`}),(0,C.jsxs)(fv,{children:[(0,C.jsx)(mv,{children:(0,C.jsx)(Kt,{})}),(0,C.jsx)(_v,{id:`login-username`,autoComplete:`username`,placeholder:`your.username`,value:c.username,onChange:e=>l(t=>({...t,username:e.target.value}))})]})]}),(0,C.jsxs)(nV,{children:[(0,C.jsx)(rV,{htmlFor:`login-password`,children:`Password`}),(0,C.jsxs)(fv,{children:[(0,C.jsx)(mv,{children:(0,C.jsx)(Ct,{})}),(0,C.jsx)(_v,{id:`login-password`,autoComplete:`current-password`,placeholder:`Enter password`,type:u?`text`:`password`,value:c.password,onChange:e=>l(t=>({...t,password:e.target.value}))}),(0,C.jsx)(mv,{align:`inline-end`,children:(0,C.jsx)(gv,{"aria-label":u?`Hide password`:`Show password`,onClick:()=>d(e=>!e),size:`icon-xs`,children:u?(0,C.jsx)(ot,{}):(0,C.jsx)(st,{})})})]}),(0,C.jsx)(iV,{children:`Use the account assigned to your Natroc workspace.`})]})]}),(0,C.jsx)(zD,{children:n&&(0,C.jsx)(X.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.2,ease:[.22,1,.36,1]},children:(0,C.jsx)(aV,{children:n})})}),(0,C.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,C.jsx)(q,{type:`button`,variant:`ghost`,className:`px-0`,onClick:a,disabled:!a||r,children:`Forgot password?`}),(0,C.jsxs)(q,{type:`submit`,disabled:!f,children:[r?`Signing in...`:`Sign in`,(0,C.jsx)(Ve,{"data-icon":`inline-end`})]})]})]}),o&&(0,C.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Don't have an account?`,` `,(0,C.jsx)(`button`,{type:`button`,onClick:o,className:`font-medium text-foreground underline-offset-4 hover:underline`,children:`Create one`})]})]})}),(0,C.jsxs)(`section`,{className:`relative hidden min-h-0 overflow-hidden border-l bg-muted/30 lg:block`,children:[(0,C.jsx)(`div`,{className:`absolute inset-0 bg-[linear-gradient(oklch(0.48_0.02_250_/_0.08)_1px,transparent_1px),linear-gradient(90deg,oklch(0.48_0.02_250_/_0.08)_1px,transparent_1px)] [mask-image:radial-gradient(ellipse_at_center,black_18%,transparent_72%)] bg-[size:38px_38px]`}),(0,C.jsxs)(`div`,{className:`relative flex h-full flex-col justify-center px-14`,children:[(0,C.jsx)(X.div,{className:`mx-auto aspect-[1.12] w-full max-w-md`,initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},transition:{duration:.4,ease:[.22,1,.36,1]},children:(0,C.jsx)(cV,{})}),(0,C.jsxs)(`div`,{className:`mx-auto flex max-w-md flex-col gap-2`,children:[(0,C.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:`Secure access for every user`}),(0,C.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,children:`Natroc keeps the interface quiet while your agent handles the busy work behind the workspace.`})]})]})]})]})})}function uV(){let[e,t]=(0,b.useState)(``),[n,r]=(0,b.useState)(!1);return(0,C.jsx)(lV,{onSubmit:async e=>{r(!0),t(``);try{L_((await K_(e.username,e.password)).token),window.location.assign(`/`)}catch(e){t(e instanceof Error?e.message:`Sign in failed.`)}finally{r(!1)}},isLoading:n,errorMessage:e,onRegister:()=>window.location.assign(`/register`)})}var dV=[{detail:`Human-readable profile identity`,label:`Full Name`},{detail:`Workspace handle for agent access`,label:`Username`},{detail:`Verified secret before submit`,label:`Password`}],fV=[mt,Kt,_t];function pV(){let e=Fk();return(0,C.jsxs)(`div`,{className:`mx-auto flex w-full max-w-md flex-col gap-6`,children:[(0,C.jsxs)(X.div,{"aria-hidden":`true`,className:`relative mx-auto aspect-square w-full max-w-[22rem]`,initial:e?!1:{opacity:0,y:8},animate:e?void 0:{opacity:1,y:0},transition:{duration:.35,ease:[.22,1,.36,1]},children:[(0,C.jsx)(X.div,{className:`absolute inset-6 rounded-full border border-border`,animate:e?void 0:{rotate:360},transition:{duration:18,repeat:1/0,ease:`linear`}}),(0,C.jsx)(X.div,{className:`absolute inset-14 rounded-full border border-dashed border-border`,animate:e?void 0:{rotate:-360},transition:{duration:24,repeat:1/0,ease:`linear`}}),(0,C.jsxs)(X.div,{className:`absolute inset-x-16 top-16 flex flex-col gap-3 rounded-lg border bg-background p-4 shadow-sm`,animate:e?void 0:{y:[-3,3,-3]},transition:{duration:3.2,repeat:1/0,ease:[.22,1,.36,1]},children:[(0,C.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,C.jsx)(`div`,{className:`flex size-9 items-center justify-center rounded-lg bg-muted text-foreground`,children:(0,C.jsx)(ct,{className:`size-4`})}),(0,C.jsx)(`span`,{className:`rounded-md border px-2 py-1 text-xs text-muted-foreground`,children:`user.create`})]}),(0,C.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,C.jsx)(`span`,{className:`h-2 w-3/4 rounded-sm bg-foreground/80`}),(0,C.jsx)(`span`,{className:`h-2 w-1/2 rounded-sm bg-muted-foreground/45`})]}),(0,C.jsxs)(`div`,{className:`grid grid-cols-3 gap-2`,children:[(0,C.jsx)(`span`,{className:`h-8 rounded-md border bg-muted/50`}),(0,C.jsx)(`span`,{className:`h-8 rounded-md border bg-muted/50`}),(0,C.jsx)(`span`,{className:`h-8 rounded-md border bg-muted/50`})]})]}),(0,C.jsx)(X.div,{className:`absolute top-12 left-1 rounded-lg border bg-background px-3 py-2 text-xs font-medium shadow-sm`,animate:e?void 0:{y:[-2,4,-2]},transition:{duration:2.8,repeat:1/0,ease:`easeInOut`},children:`Full Name`}),(0,C.jsx)(X.div,{className:`absolute top-28 right-2 rounded-lg border bg-background px-3 py-2 text-xs font-medium shadow-sm`,animate:e?void 0:{y:[3,-3,3]},transition:{duration:3,repeat:1/0,ease:`easeInOut`},children:`Username`}),(0,C.jsx)(X.div,{className:`absolute bottom-14 left-12 rounded-lg border bg-background px-3 py-2 text-xs font-medium shadow-sm`,animate:e?void 0:{y:[-1,4,-1]},transition:{duration:3.4,repeat:1/0,ease:`easeInOut`},children:`Password`})]}),(0,C.jsx)(`div`,{className:`flex flex-col gap-2`,children:dV.map((t,n)=>{let r=fV[n];return(0,C.jsxs)(X.div,{className:`flex items-center gap-3 rounded-lg border bg-background px-3 py-2 shadow-sm`,initial:e?!1:{opacity:0,y:6},animate:e?void 0:{opacity:1,y:0},transition:{delay:.08*n,duration:.28,ease:[.22,1,.36,1]},children:[(0,C.jsx)(`div`,{className:`flex size-8 items-center justify-center rounded-md bg-muted`,children:(0,C.jsx)(r,{className:`size-4`})}),(0,C.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,C.jsx)(`p`,{className:`truncate text-sm font-medium`,children:t.label}),(0,C.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:t.detail})]}),(0,C.jsx)(Je,{className:`size-4 text-muted-foreground`})]},t.label)})})]})}function mV({brandName:e=`Natroc`,className:t,errorMessage:n,isLoading:r=!1,logo:i=(0,C.jsx)(Pv,{}),onLogin:a,onSubmit:o}){let[s,c]=(0,b.useState)({confirmPassword:``,fullName:``,password:``,username:``}),[l,u]=(0,b.useState)(!1),[d,f]=(0,b.useState)(!1),p=s.confirmPassword.length>0&&s.password!==s.confirmPassword,m=s.fullName.trim().length>0&&s.username.trim().length>0&&s.password.length>0&&s.confirmPassword.length>0&&!p&&!r;return(0,C.jsx)(`main`,{className:K(`grid h-dvh max-h-dvh min-h-0 overflow-hidden bg-background text-foreground`,t),children:(0,C.jsxs)(`div`,{className:`grid min-h-0 lg:grid-cols-[minmax(24rem,0.9fr)_minmax(0,1.1fr)]`,children:[(0,C.jsx)(`section`,{className:`flex min-h-0 items-center justify-center px-4 py-5 sm:px-6 lg:px-10`,children:(0,C.jsxs)(X.div,{className:`flex w-full max-w-sm flex-col gap-6`,initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.35,ease:[.22,1,.36,1]},children:[(0,C.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,C.jsx)(`span`,{className:`flex size-10 items-center justify-center rounded-lg border bg-card text-foreground`,children:i}),(0,C.jsxs)(`div`,{className:`flex flex-col`,children:[(0,C.jsx)(`span`,{className:`text-base leading-tight font-semibold`,children:e}),(0,C.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`User access`})]})]}),(0,C.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,C.jsx)(`h1`,{className:`text-2xl font-semibold tracking-normal`,children:`Create account`}),(0,C.jsx)(`p`,{className:`max-w-[48ch] text-sm leading-6 text-muted-foreground`,children:`Register a user profile for access to the Natroc workspace.`})]}),(0,C.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),m&&o?.({confirmPassword:s.confirmPassword,fullName:s.fullName.trim(),password:s.password,username:s.username.trim()})},className:`flex flex-col gap-5`,children:[(0,C.jsxs)(eV,{children:[(0,C.jsxs)(nV,{children:[(0,C.jsx)(rV,{htmlFor:`register-full-name`,children:`Full Name`}),(0,C.jsxs)(fv,{children:[(0,C.jsx)(mv,{children:(0,C.jsx)(mt,{})}),(0,C.jsx)(_v,{id:`register-full-name`,autoComplete:`name`,placeholder:`Full name`,value:s.fullName,onChange:e=>c(t=>({...t,fullName:e.target.value}))})]})]}),(0,C.jsxs)(nV,{children:[(0,C.jsx)(rV,{htmlFor:`register-username`,children:`Username`}),(0,C.jsxs)(fv,{children:[(0,C.jsx)(mv,{children:(0,C.jsx)(Kt,{})}),(0,C.jsx)(_v,{id:`register-username`,autoComplete:`username`,placeholder:`your.username`,value:s.username,onChange:e=>c(t=>({...t,username:e.target.value}))})]})]}),(0,C.jsxs)(nV,{children:[(0,C.jsx)(rV,{htmlFor:`register-password`,children:`Password`}),(0,C.jsxs)(fv,{children:[(0,C.jsx)(mv,{children:(0,C.jsx)(Ct,{})}),(0,C.jsx)(_v,{id:`register-password`,autoComplete:`new-password`,placeholder:`Create password`,type:l?`text`:`password`,value:s.password,onChange:e=>c(t=>({...t,password:e.target.value}))}),(0,C.jsx)(mv,{align:`inline-end`,children:(0,C.jsx)(gv,{"aria-label":l?`Hide password`:`Show password`,onClick:()=>u(e=>!e),size:`icon-xs`,children:l?(0,C.jsx)(ot,{}):(0,C.jsx)(st,{})})})]})]}),(0,C.jsxs)(nV,{"data-invalid":p,children:[(0,C.jsx)(rV,{htmlFor:`register-confirm-password`,children:`Confirm Password`}),(0,C.jsxs)(fv,{children:[(0,C.jsx)(mv,{children:(0,C.jsx)(Ct,{})}),(0,C.jsx)(_v,{id:`register-confirm-password`,"aria-invalid":p,autoComplete:`new-password`,placeholder:`Confirm password`,type:d?`text`:`password`,value:s.confirmPassword,onChange:e=>c(t=>({...t,confirmPassword:e.target.value}))}),(0,C.jsx)(mv,{align:`inline-end`,children:(0,C.jsx)(gv,{"aria-label":d?`Hide confirm password`:`Show confirm password`,onClick:()=>f(e=>!e),size:`icon-xs`,children:d?(0,C.jsx)(ot,{}):(0,C.jsx)(st,{})})})]}),p?(0,C.jsx)(aV,{children:`Passwords do not match.`}):(0,C.jsx)(iV,{children:`Use the same password to confirm access.`})]})]}),(0,C.jsx)(zD,{children:n&&(0,C.jsx)(X.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.2,ease:[.22,1,.36,1]},children:(0,C.jsx)(aV,{children:n})})}),(0,C.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,C.jsx)(q,{type:`button`,variant:`ghost`,className:`px-0`,onClick:a,disabled:!a||r,children:`Sign in instead`}),(0,C.jsxs)(q,{type:`submit`,disabled:!m,children:[r?`Creating...`:`Create account`,(0,C.jsx)(Ve,{"data-icon":`inline-end`})]})]})]})]})}),(0,C.jsxs)(`section`,{className:`relative hidden min-h-0 overflow-hidden border-l bg-muted/30 lg:block`,children:[(0,C.jsx)(`div`,{className:`absolute inset-0 bg-[linear-gradient(oklch(0.48_0.02_250_/_0.08)_1px,transparent_1px),linear-gradient(90deg,oklch(0.48_0.02_250_/_0.08)_1px,transparent_1px)] [mask-image:radial-gradient(ellipse_at_center,black_18%,transparent_72%)] bg-[size:38px_38px]`}),(0,C.jsxs)(`div`,{className:`relative flex h-full flex-col justify-center px-14`,children:[(0,C.jsx)(pV,{}),(0,C.jsxs)(`div`,{className:`mx-auto flex max-w-md flex-col gap-2`,children:[(0,C.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:`Account identity for every user`}),(0,C.jsx)(`p`,{className:`text-sm leading-6 text-muted-foreground`,children:`Keep identity simple: a real name, a workspace username, and a password verified before submit.`})]})]})]})]})})}function hV(){let[e,t]=(0,b.useState)(``),[n,r]=(0,b.useState)(!1);return(0,C.jsx)(mV,{onSubmit:async e=>{if(e.password!==e.confirmPassword){t(`Passwords do not match.`);return}r(!0),t(``);try{L_((await q_({username:e.username,fullName:e.fullName,password:e.password})).token),window.location.assign(`/`)}catch(e){t(e instanceof Error?e.message:`Registration failed.`)}finally{r(!1)}},isLoading:n,errorMessage:e,onLogin:()=>window.location.assign(`/login`)})}var gV=wg(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function _V({className:e,variant:t=`default`,asChild:n=!1,...r}){return(0,C.jsx)(n?$t:`span`,{"data-slot":`badge`,"data-variant":t,className:K(gV({variant:t}),e),...r})}async function vV(){return J.call(`agent.status`)}async function yV(e){let t=e?.trim();return(await J.call(`agent.memory`,t?{query:t}:{})).entries??[]}async function bV(e=`pending`){return(await J.call(`agent.proposals.list`,{status:e})).proposals??[]}async function xV(e){return J.call(`agent.proposals.approve`,{id:e})}async function SV(e){return J.call(`agent.proposals.reject`,{id:e})}async function CV(){return(await J.call(`agent.improve`,{})).proposals??[]}function wV(){let[e,t]=(0,b.useState)(null),[n,r]=(0,b.useState)([]),[i,a]=(0,b.useState)([]),[o,s]=(0,b.useState)(``),[c,l]=(0,b.useState)(null),[u,d]=(0,b.useState)({error:null,isLoading:!0}),[f,p]=(0,b.useState)(null),[m,h]=(0,b.useState)(!1),g=(0,b.useCallback)(async()=>{d({error:null,isLoading:!0});try{let[e,n,i]=await Promise.all([vV(),yV(o),bV()]);t(e),r(n),a(i)}catch(e){d({error:e instanceof Error?e.message:`Failed to load agent state.`,isLoading:!1});return}d({error:null,isLoading:!1})},[o]);(0,b.useEffect)(()=>{let e=window.setTimeout(()=>{g()},0);return()=>window.clearTimeout(e)},[g]);let _=async e=>{p(e);try{await xV(e),await g()}finally{p(null)}},v=async e=>{p(e);try{await SV(e),await g()}finally{p(null)}};return(0,C.jsxs)(`section`,{className:`natroc-enter flex min-h-[calc(100svh-7rem)] w-full flex-col gap-6`,children:[(0,C.jsxs)(`div`,{className:`flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between`,children:[(0,C.jsxs)(`div`,{className:`space-y-2`,children:[(0,C.jsxs)(`div`,{className:`flex items-center gap-2 text-muted-foreground`,children:[(0,C.jsx)(Ge,{className:`size-4`}),(0,C.jsx)(`span`,{className:`text-sm font-medium`,children:`Agent runtime`})]}),(0,C.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Natroc is alive locally`})]}),(0,C.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,C.jsxs)(q,{variant:`secondary`,onClick:()=>void g(),disabled:u.isLoading,children:[(0,C.jsx)(Ft,{className:K(u.isLoading&&`animate-spin`)}),`Refresh`]}),(0,C.jsxs)(q,{onClick:async()=>{h(!0),l(null);try{l(`Created ${(await CV()).length} pending proposal(s).`),await g()}catch(e){l(e instanceof Error?e.message:`Improvement review failed.`)}finally{h(!1)}},disabled:m,children:[(0,C.jsx)(zt,{className:K(m&&`animate-pulse`)}),`Improve`]})]})]}),u.error&&(0,C.jsx)(`div`,{className:`rounded-lg border border-destructive/30 bg-destructive/10 px-4 py-3 text-sm text-destructive`,children:u.error}),c&&(0,C.jsx)(`div`,{className:`natroc-soft-panel rounded-lg border border-border bg-muted/40 px-4 py-3 text-sm text-muted-foreground`,children:c}),(0,C.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-3`,children:[(0,C.jsx)(TV,{status:e}),(0,C.jsx)(EV,{status:e}),(0,C.jsx)(DV,{status:e})]}),(0,C.jsxs)(`div`,{className:`grid min-h-0 gap-5 xl:grid-cols-[minmax(0,1.05fr)_minmax(360px,0.95fr)]`,children:[(0,C.jsxs)(`section`,{className:`flex min-h-0 flex-col gap-3`,children:[(0,C.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,C.jsx)(`h2`,{className:`text-base font-semibold`,children:`Pending proposals`}),(0,C.jsx)(_V,{variant:`secondary`,children:i.length})]}),(0,C.jsx)(`div`,{className:`flex flex-col gap-3`,children:i.length===0?(0,C.jsx)(jV,{text:`No pending proposals.`}):i.map(e=>(0,C.jsx)(kV,{proposal:e,isBusy:f===e.id,onApprove:_,onReject:v},e.id))})]}),(0,C.jsxs)(`section`,{className:`flex min-h-0 flex-col gap-3`,children:[(0,C.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,C.jsx)(`h2`,{className:`text-base font-semibold`,children:`Approved memory`}),(0,C.jsxs)(`div`,{className:`relative w-56`,children:[(0,C.jsx)(It,{className:`pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground`}),(0,C.jsx)(jg,{value:o,onChange:e=>s(e.target.value),placeholder:`Search memory`,className:`h-9 rounded-lg border-transparent bg-muted/80 pl-9`})]})]}),(0,C.jsx)(`div`,{className:`flex flex-col gap-3`,children:n.length===0?(0,C.jsx)(jV,{text:`No approved memory.`}):n.map(e=>(0,C.jsx)(AV,{entry:e},e.id))})]})]})]})}function TV({status:e}){return(0,C.jsx)(OV,{icon:(0,C.jsx)(Ge,{className:`size-4`}),label:`Runtime`,value:e?.providers.active?.displayName??`No provider`,detail:e?.providers.active?.defaultModel??`Model not selected`})}function EV({status:e}){let t=e?.homeFiles.filter(e=>e.exists).length??0,n=e?.homeFiles.length??0;return(0,C.jsx)(OV,{icon:(0,C.jsx)(pt,{className:`size-4`}),label:`Home`,value:e?.paths?.homeDir??`~/.natroc/home`,detail:`${t}/${n} files ready`})}function DV({status:e}){return(0,C.jsx)(OV,{icon:(0,C.jsx)(it,{className:`size-4`}),label:`Memory`,value:`${e?.counts.memories??0} approved`,detail:`${e?.counts.pendingProposals??0} pending proposal(s)`})}function OV({detail:e,icon:t,label:n,value:r}){return(0,C.jsxs)(`div`,{className:`natroc-soft-panel min-w-0 rounded-lg border border-border bg-muted/30 p-4`,children:[(0,C.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium text-muted-foreground`,children:[t,(0,C.jsx)(`span`,{children:n})]}),(0,C.jsx)(`p`,{className:`mt-3 truncate text-sm font-semibold`,children:r}),(0,C.jsx)(`p`,{className:`mt-1 truncate text-xs text-muted-foreground`,children:e})]})}function kV({isBusy:e,onApprove:t,onReject:n,proposal:r}){return(0,C.jsx)(`div`,{className:`natroc-soft-panel rounded-lg border border-border bg-background/60 p-4`,children:(0,C.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,C.jsxs)(`div`,{className:`min-w-0 space-y-2`,children:[(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,C.jsx)(_V,{variant:`secondary`,children:r.kind}),(0,C.jsx)(`h3`,{className:`text-sm font-semibold`,children:r.title})]}),(0,C.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:r.content}),(0,C.jsx)(`p`,{className:`text-xs leading-relaxed text-muted-foreground/80`,children:r.reason})]}),(0,C.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,C.jsx)(q,{size:`icon`,variant:`secondary`,disabled:e,onClick:()=>void t(r.id),"aria-label":`Approve proposal`,children:(0,C.jsx)(Je,{})}),(0,C.jsx)(q,{size:`icon`,variant:`ghost`,disabled:e,onClick:()=>void n(r.id),"aria-label":`Reject proposal`,children:(0,C.jsx)(qt,{})})]})]})})}function AV({entry:e}){return(0,C.jsxs)(`div`,{className:`rounded-lg border border-border bg-background/60 p-4`,children:[(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,C.jsx)(_V,{variant:`secondary`,children:e.kind}),(0,C.jsx)(`h3`,{className:`text-sm font-semibold`,children:e.title})]}),(0,C.jsx)(`p`,{className:`mt-2 text-sm leading-relaxed text-muted-foreground`,children:e.content})]})}function jV({text:e}){return(0,C.jsx)(`div`,{className:`rounded-lg border border-dashed border-border px-4 py-8 text-center text-sm text-muted-foreground`,children:e})}function MV({className:e,size:t=`default`,...n}){return(0,C.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:K(`group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...n})}function NV({className:e,size:t=`default`,...n}){return(0,C.jsxs)(`div`,{className:K(`group/native-select relative w-fit has-[select:disabled]:opacity-50`,e),"data-slot":`native-select-wrapper`,"data-size":t,children:[(0,C.jsx)(`select`,{"data-slot":`native-select`,"data-size":t,className:`h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pr-8 pl-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,...n}),(0,C.jsx)(Ye,{className:`pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none`,"aria-hidden":`true`,"data-slot":`native-select-icon`})]})}function PV({className:e,...t}){return(0,C.jsx)(`option`,{"data-slot":`native-select-option`,className:K(`bg-[Canvas] text-[CanvasText]`,e),...t})}function FV({className:e,size:t=`default`,...n}){return(0,C.jsx)(Ip,{"data-slot":`switch`,"data-size":t,className:K(`peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50`,e),...n,children:(0,C.jsx)(Lp,{"data-slot":`switch-thumb`,className:`pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground`})})}function IV({className:e,...t}){return(0,C.jsx)(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:(0,C.jsx)(`table`,{"data-slot":`table`,className:K(`w-full caption-bottom text-sm`,e),...t})})}function LV({className:e,...t}){return(0,C.jsx)(`thead`,{"data-slot":`table-header`,className:K(`[&_tr]:border-b`,e),...t})}function RV({className:e,...t}){return(0,C.jsx)(`tbody`,{"data-slot":`table-body`,className:K(`[&_tr:last-child]:border-0`,e),...t})}function zV({className:e,...t}){return(0,C.jsx)(`tr`,{"data-slot":`table-row`,className:K(`border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted`,e),...t})}function BV({className:e,...t}){return(0,C.jsx)(`th`,{"data-slot":`table-head`,className:K(`h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0`,e),...t})}function VV({className:e,...t}){return(0,C.jsx)(`td`,{"data-slot":`table-cell`,className:K(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0`,e),...t})}function HV({className:e,orientation:t=`horizontal`,...n}){return(0,C.jsx)(em,{"data-slot":`tabs`,"data-orientation":t,className:K(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...n})}var UV=wg(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function WV({className:e,variant:t=`default`,...n}){return(0,C.jsx)(tm,{"data-slot":`tabs-list`,"data-variant":t,className:K(UV({variant:t}),e),...n})}function GV({className:e,...t}){return(0,C.jsx)(nm,{"data-slot":`tabs-trigger`,className:K(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function KV({className:e,...t}){return(0,C.jsx)(rm,{"data-slot":`tabs-content`,className:K(`flex-1 text-sm outline-none`,e),...t})}async function qV(){return(await J.call(`agents.list`)).agents??[]}async function JV(e){return(await J.call(`agents.create`,e)).agent}async function YV(e,t){return(await J.call(`agents.update`,{id:e,...t})).agent}async function XV(e){await J.call(`agents.delete`,{id:e})}async function ZV(e){return(await J.call(`agents.setDefault`,{id:e})).agent}async function QV(){return(await J.call(`usage.summary`)).summary}async function $V(){return(await J.call(`usage.detail`,{limit:100})).events??[]}async function eH(){return(await J.call(`channels.accounts.list`)).accounts??[]}async function tH(e){return(await J.call(`channels.accounts.create`,e)).account}async function nH(e){return(await J.call(`channels.accounts.connect`,{id:e})).account}async function rH(e){return(await J.call(`channels.accounts.disconnect`,{id:e})).account}async function iH(e){await J.call(`channels.accounts.delete`,{id:e})}async function aH(){return(await J.call(`channels.bindings.list`)).bindings??[]}async function oH(e){return(await J.call(`channels.bindings.create`,e)).binding}async function sH(e){await J.call(`channels.bindings.delete`,{id:e})}var cH={name:``,description:``,defaultProvider:``,defaultModel:``,workspace:``,systemPrompt:``,configJson:`{}`,isEnabled:!0,isDefault:!1},lH={channel:`telegram`,displayName:``,accountRef:``,token:``,allowlist:``};function uH(){let[e,t]=(0,b.useState)(()=>bH()),[n,r]=(0,b.useState)([]),[i,a]=(0,b.useState)(null),[o,s]=(0,b.useState)([]),[c,l]=(0,b.useState)([]),[u,d]=(0,b.useState)([]),[f,p]=(0,b.useState)({error:null,isLoading:!0}),m=(0,b.useCallback)(async()=>{p({error:null,isLoading:!0});try{let[e,t,n,i,o]=await Promise.all([qV(),QV(),$V(),eH(),aH()]);r(e),a(t),s(n),l(i),d(o),p({error:null,isLoading:!1})}catch(e){p({error:e instanceof Error?e.message:`Failed to load config data.`,isLoading:!1})}},[]);return(0,b.useEffect)(()=>{let e=window.setTimeout(()=>{m()},0);return()=>window.clearTimeout(e)},[m]),(0,C.jsxs)(`section`,{className:`natroc-enter flex w-full flex-1 flex-col gap-5`,children:[(0,C.jsxs)(`div`,{className:`flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between`,children:[(0,C.jsxs)(`div`,{className:`space-y-2`,children:[(0,C.jsxs)(`div`,{className:`flex items-center gap-2 text-muted-foreground`,children:[(0,C.jsx)(Rt,{className:`size-4`}),(0,C.jsx)(`span`,{className:`text-sm font-medium`,children:`Config`})]}),(0,C.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Agent, usage, and channel control`})]}),(0,C.jsxs)(q,{variant:`secondary`,onClick:()=>void m(),disabled:f.isLoading,children:[(0,C.jsx)(Ft,{className:K(f.isLoading&&`animate-spin`)}),`Refresh`]})]}),f.error&&(0,C.jsx)(`div`,{className:`rounded-lg border border-destructive/30 bg-destructive/10 px-4 py-3 text-sm text-destructive`,children:f.error}),(0,C.jsxs)(HV,{value:e,onValueChange:e=>{if(!xH(e))return;t(e);let n=new URL(window.location.href);n.searchParams.set(`tab`,e),window.history.replaceState(null,``,n)},className:`gap-5`,children:[(0,C.jsxs)(WV,{className:`w-full justify-start overflow-x-auto sm:w-fit`,children:[(0,C.jsxs)(GV,{value:`agents`,children:[(0,C.jsx)(We,{}),`Agents`]}),(0,C.jsxs)(GV,{value:`usage`,children:[(0,C.jsx)(qe,{}),`Usage`]}),(0,C.jsxs)(GV,{value:`channels`,children:[(0,C.jsx)(Nt,{}),`Channels`]})]}),(0,C.jsx)(KV,{value:`agents`,className:`space-y-5`,children:(0,C.jsx)(dH,{agents:n,onRefresh:m})}),(0,C.jsx)(KV,{value:`usage`,children:(0,C.jsx)(fH,{summary:i,events:o})}),(0,C.jsx)(KV,{value:`channels`,children:(0,C.jsx)(pH,{agents:n,accounts:c,bindings:u,onRefresh:m})})]})]})}function dH({agents:e,onRefresh:t}){let[n,r]=(0,b.useState)(null),[i,a]=(0,b.useState)(cH),[o,s]=(0,b.useState)(null),c=e.find(e=>e.id===n)??null,l=()=>{r(null),a(cH),s(null)},u=e=>{r(e.id),a({name:e.name,description:e.description,defaultProvider:e.defaultProvider??``,defaultModel:e.defaultModel??``,workspace:e.workspace??``,systemPrompt:e.systemPrompt,configJson:JSON.stringify(e.config??{},null,2),isEnabled:e.isEnabled,isDefault:e.isDefault}),s(null)};return(0,C.jsxs)(`div`,{className:`space-y-5`,children:[(0,C.jsxs)(`div`,{className:`grid gap-5 xl:grid-cols-[minmax(360px,0.72fr)_minmax(0,1.28fr)]`,children:[(0,C.jsxs)(vH,{children:[(0,C.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`h2`,{className:`text-base font-semibold`,children:c?`Edit agent`:`Create agent`}),(0,C.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[e.length,` configured`]})]}),n&&(0,C.jsx)(q,{variant:`ghost`,onClick:l,children:`New`})]}),(0,C.jsxs)(`form`,{className:`mt-4 space-y-3`,onSubmit:async e=>{e.preventDefault(),s(null);let r;try{let e=JSON.parse(i.configJson||`{}`);r=e&&typeof e==`object`&&!Array.isArray(e)?e:{}}catch{s(`Config JSON is invalid.`);return}let a={name:i.name,description:i.description,defaultProvider:i.defaultProvider||null,defaultModel:SH(i.defaultModel),workspace:SH(i.workspace),systemPrompt:i.systemPrompt,config:r,isEnabled:i.isEnabled,isDefault:i.isDefault};n?(await YV(n,a),s(`Agent updated.`)):(await JV(a),s(`Agent created.`)),await t(),n||l()},children:[(0,C.jsx)(gH,{label:`Name`,children:(0,C.jsx)(jg,{value:i.name,onChange:e=>a(t=>({...t,name:e.target.value})),required:!0})}),(0,C.jsx)(gH,{label:`Description`,children:(0,C.jsx)(dv,{value:i.description,onChange:e=>a(t=>({...t,description:e.target.value})),className:`min-h-20`})}),(0,C.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,C.jsx)(gH,{label:`Provider`,children:(0,C.jsxs)(NV,{className:`w-full`,value:i.defaultProvider,onChange:e=>a(t=>({...t,defaultProvider:e.target.value})),children:[(0,C.jsx)(PV,{value:``,children:`Active provider`}),(0,C.jsx)(PV,{value:`openrouter`,children:`OpenRouter`}),(0,C.jsx)(PV,{value:`ollama`,children:`Ollama`})]})}),(0,C.jsx)(gH,{label:`Model`,children:(0,C.jsx)(jg,{value:i.defaultModel,onChange:e=>a(t=>({...t,defaultModel:e.target.value})),placeholder:`Provider default`})})]}),(0,C.jsx)(gH,{label:`Workspace`,children:(0,C.jsx)(jg,{value:i.workspace,onChange:e=>a(t=>({...t,workspace:e.target.value})),placeholder:`Optional path`})}),(0,C.jsx)(gH,{label:`System prompt`,children:(0,C.jsx)(dv,{value:i.systemPrompt,onChange:e=>a(t=>({...t,systemPrompt:e.target.value})),className:`min-h-24`})}),(0,C.jsx)(gH,{label:`Config JSON`,children:(0,C.jsx)(dv,{value:i.configJson,onChange:e=>a(t=>({...t,configJson:e.target.value})),className:`min-h-24 font-mono text-xs`})}),(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4`,children:[(0,C.jsx)(_H,{label:`Enabled`,checked:i.isEnabled,onCheckedChange:e=>a(t=>({...t,isEnabled:e}))}),(0,C.jsx)(_H,{label:`Default`,checked:i.isDefault,onCheckedChange:e=>a(t=>({...t,isDefault:e}))})]}),o&&(0,C.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:o}),(0,C.jsxs)(q,{type:`submit`,children:[(0,C.jsx)(Pt,{}),c?`Update`:`Create`]})]})]}),(0,C.jsxs)(vH,{children:[(0,C.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,C.jsx)(`h2`,{className:`text-base font-semibold`,children:`Agents`}),(0,C.jsx)(_V,{variant:`secondary`,children:e.length})]}),(0,C.jsx)(`div`,{className:`mt-4`,children:e.length===0?(0,C.jsx)(yH,{text:`No agents configured.`}):(0,C.jsxs)(IV,{children:[(0,C.jsx)(LV,{children:(0,C.jsxs)(zV,{children:[(0,C.jsx)(BV,{children:`Name`}),(0,C.jsx)(BV,{children:`Provider`}),(0,C.jsx)(BV,{children:`Status`}),(0,C.jsx)(BV,{className:`text-right`,children:`Actions`})]})}),(0,C.jsx)(RV,{children:e.map(e=>(0,C.jsxs)(zV,{children:[(0,C.jsxs)(VV,{className:`min-w-52 whitespace-normal`,children:[(0,C.jsx)(`div`,{className:`font-medium`,children:e.name}),(0,C.jsx)(`div`,{className:`line-clamp-2 text-xs text-muted-foreground`,children:e.description||`No description`})]}),(0,C.jsxs)(VV,{children:[e.defaultProvider??`active`,(0,C.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.defaultModel??`default model`})]}),(0,C.jsx)(VV,{children:(0,C.jsxs)(`div`,{className:`flex flex-wrap gap-1.5`,children:[e.isDefault&&(0,C.jsx)(_V,{variant:`secondary`,children:`default`}),(0,C.jsx)(_V,{variant:e.isEnabled?`default`:`outline`,children:e.isEnabled?`enabled`:`disabled`})]})}),(0,C.jsx)(VV,{children:(0,C.jsxs)(`div`,{className:`flex justify-end gap-1`,children:[(0,C.jsx)(q,{size:`icon`,variant:`ghost`,"aria-label":`Edit agent`,onClick:()=>u(e),children:(0,C.jsx)(Mt,{})}),(0,C.jsx)(q,{size:`icon`,variant:`ghost`,"aria-label":`Set default agent`,disabled:e.isDefault,onClick:()=>void ZV(e.id).then(t),children:(0,C.jsx)(Vt,{})}),(0,C.jsx)(q,{size:`icon`,variant:`ghost`,"aria-label":`Delete agent`,onClick:()=>void XV(e.id).then(t),children:(0,C.jsx)(Ht,{})})]})})]},e.id))})]})})]})]}),(0,C.jsx)(wV,{})]})}function fH({events:e,summary:t}){let n=t?.totals;return(0,C.jsxs)(`div`,{className:`space-y-5`,children:[(0,C.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-4`,children:[(0,C.jsx)(hH,{label:`Requests`,value:wH(n?.requests)}),(0,C.jsx)(hH,{label:`Tokens`,value:wH(n?.totalTokens)}),(0,C.jsx)(hH,{label:`Known`,value:wH(n?.knownRequests)}),(0,C.jsx)(hH,{label:`Unknown`,value:wH(n?.unknownRequests)})]}),(0,C.jsxs)(`div`,{className:`grid gap-5 xl:grid-cols-2`,children:[(0,C.jsx)(mH,{title:`By provider`,rows:t?.byProvider??[],labelKey:`provider`}),(0,C.jsx)(mH,{title:`By channel`,rows:t?.byChannel??[],labelKey:`channel`})]}),(0,C.jsxs)(vH,{children:[(0,C.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,C.jsx)(`h2`,{className:`text-base font-semibold`,children:`Request detail`}),(0,C.jsx)(_V,{variant:`secondary`,children:e.length})]}),(0,C.jsx)(`div`,{className:`mt-4`,children:e.length===0?(0,C.jsx)(yH,{text:`No usage events yet.`}):(0,C.jsxs)(IV,{children:[(0,C.jsx)(LV,{children:(0,C.jsxs)(zV,{children:[(0,C.jsx)(BV,{children:`Time`}),(0,C.jsx)(BV,{children:`Provider`}),(0,C.jsx)(BV,{children:`Model`}),(0,C.jsx)(BV,{children:`Channel`}),(0,C.jsx)(BV,{children:`Tokens`}),(0,C.jsx)(BV,{children:`Status`})]})}),(0,C.jsx)(RV,{children:e.map(e=>(0,C.jsxs)(zV,{children:[(0,C.jsx)(VV,{children:TH(e.createdAt)}),(0,C.jsx)(VV,{children:e.provider}),(0,C.jsx)(VV,{children:e.model}),(0,C.jsx)(VV,{children:e.channel}),(0,C.jsx)(VV,{children:wH(e.totalTokens)}),(0,C.jsx)(VV,{children:(0,C.jsx)(_V,{variant:e.usageStatus===`actual`?`default`:`outline`,children:e.usageStatus})})]},e.id))})]})})]})]})}function pH({accounts:e,agents:t,bindings:n,onRefresh:r}){let[i,a]=(0,b.useState)(lH),[o,s]=(0,b.useState)({accountId:``,agentId:``,peer:`*`});return(0,C.jsxs)(`div`,{className:`grid gap-5 xl:grid-cols-[minmax(360px,0.72fr)_minmax(0,1.28fr)]`,children:[(0,C.jsxs)(`div`,{className:`space-y-5`,children:[(0,C.jsxs)(vH,{children:[(0,C.jsx)(`h2`,{className:`text-base font-semibold`,children:`Add channel`}),(0,C.jsxs)(`form`,{className:`mt-4 space-y-3`,onSubmit:async e=>{e.preventDefault(),await tH({channel:i.channel,displayName:i.displayName,accountRef:SH(i.accountRef),token:SH(i.token),allowlist:CH(i.allowlist)}),a(lH),await r()},children:[(0,C.jsx)(gH,{label:`Channel`,children:(0,C.jsxs)(NV,{className:`w-full`,value:i.channel,onChange:e=>a(t=>({...t,channel:e.target.value})),children:[(0,C.jsx)(PV,{value:`telegram`,children:`Telegram`}),(0,C.jsx)(PV,{value:`whatsapp`,children:`WhatsApp`})]})}),(0,C.jsx)(gH,{label:`Display name`,children:(0,C.jsx)(jg,{value:i.displayName,onChange:e=>a(t=>({...t,displayName:e.target.value})),required:!0})}),(0,C.jsx)(gH,{label:`Account ref`,children:(0,C.jsx)(jg,{value:i.accountRef,onChange:e=>a(t=>({...t,accountRef:e.target.value})),placeholder:`@bot or phone/JID`})}),(0,C.jsx)(gH,{label:`Token`,children:(0,C.jsx)(jg,{value:i.token,onChange:e=>a(t=>({...t,token:e.target.value})),type:`password`,placeholder:`Telegram only`})}),(0,C.jsx)(gH,{label:`Allowlist`,children:(0,C.jsx)(jg,{value:i.allowlist,onChange:e=>a(t=>({...t,allowlist:e.target.value})),placeholder:`12345, *`})}),(0,C.jsxs)(q,{type:`submit`,children:[(0,C.jsx)(Pt,{}),`Add`]})]})]}),(0,C.jsxs)(vH,{children:[(0,C.jsx)(`h2`,{className:`text-base font-semibold`,children:`Bind agent`}),(0,C.jsxs)(`form`,{className:`mt-4 space-y-3`,onSubmit:async e=>{e.preventDefault(),await oH({accountId:o.accountId,agentId:o.agentId,peer:o.peer,isEnabled:!0}),s({accountId:``,agentId:``,peer:`*`}),await r()},children:[(0,C.jsx)(gH,{label:`Account`,children:(0,C.jsxs)(NV,{className:`w-full`,value:o.accountId,onChange:e=>s(t=>({...t,accountId:e.target.value})),required:!0,children:[(0,C.jsx)(PV,{value:``,children:`Select account`}),e.map(e=>(0,C.jsx)(PV,{value:e.id,children:e.displayName},e.id))]})}),(0,C.jsx)(gH,{label:`Agent`,children:(0,C.jsxs)(NV,{className:`w-full`,value:o.agentId,onChange:e=>s(t=>({...t,agentId:e.target.value})),required:!0,children:[(0,C.jsx)(PV,{value:``,children:`Select agent`}),t.map(e=>(0,C.jsx)(PV,{value:e.id,children:e.name},e.id))]})}),(0,C.jsx)(gH,{label:`Peer`,children:(0,C.jsx)(jg,{value:o.peer,onChange:e=>s(t=>({...t,peer:e.target.value})),required:!0})}),(0,C.jsxs)(q,{type:`submit`,disabled:!e.length||!t.length,children:[(0,C.jsx)(Nt,{}),`Bind`]})]})]})]}),(0,C.jsxs)(`div`,{className:`space-y-5`,children:[(0,C.jsxs)(vH,{children:[(0,C.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,C.jsx)(`h2`,{className:`text-base font-semibold`,children:`Accounts`}),(0,C.jsx)(_V,{variant:`secondary`,children:e.length})]}),(0,C.jsx)(`div`,{className:`mt-4 space-y-3`,children:e.length===0?(0,C.jsx)(yH,{text:`No channel accounts configured.`}):e.map(e=>(0,C.jsx)(MV,{className:`gap-0 rounded-lg border-border bg-background/60 p-4 py-4 shadow-none`,children:(0,C.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,C.jsxs)(`div`,{className:`min-w-0`,children:[(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,C.jsx)(`h3`,{className:`font-medium`,children:e.displayName}),(0,C.jsx)(_V,{variant:`secondary`,children:e.channel}),(0,C.jsx)(_V,{variant:e.status===`connected`?`default`:`outline`,children:e.status})]}),(0,C.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:e.accountRef??`No account ref`}),typeof e.metadata.qr==`string`&&(0,C.jsx)(`p`,{className:`mt-2 break-all rounded-lg bg-muted/50 p-2 font-mono text-xs text-muted-foreground`,children:e.metadata.qr}),e.lastError&&(0,C.jsx)(`p`,{className:`mt-2 text-sm text-destructive`,children:e.lastError})]}),(0,C.jsxs)(`div`,{className:`flex shrink-0 gap-1`,children:[e.status===`connected`?(0,C.jsx)(q,{size:`icon`,variant:`ghost`,"aria-label":`Disconnect channel`,onClick:()=>void rH(e.id).then(r),children:(0,C.jsx)(Wt,{})}):(0,C.jsx)(q,{size:`icon`,variant:`ghost`,"aria-label":`Connect channel`,onClick:()=>void nH(e.id).then(r),children:(0,C.jsx)(Nt,{})}),(0,C.jsx)(q,{size:`icon`,variant:`ghost`,"aria-label":`Delete channel`,onClick:()=>void iH(e.id).then(r),children:(0,C.jsx)(Ht,{})})]})]})},e.id))})]}),(0,C.jsxs)(vH,{children:[(0,C.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,C.jsx)(`h2`,{className:`text-base font-semibold`,children:`Bindings`}),(0,C.jsx)(_V,{variant:`secondary`,children:n.length})]}),(0,C.jsx)(`div`,{className:`mt-4`,children:n.length===0?(0,C.jsx)(yH,{text:`No channel bindings configured.`}):(0,C.jsxs)(IV,{children:[(0,C.jsx)(LV,{children:(0,C.jsxs)(zV,{children:[(0,C.jsx)(BV,{children:`Peer`}),(0,C.jsx)(BV,{children:`Account`}),(0,C.jsx)(BV,{children:`Agent`}),(0,C.jsx)(BV,{className:`text-right`,children:`Actions`})]})}),(0,C.jsx)(RV,{children:n.map(n=>(0,C.jsxs)(zV,{children:[(0,C.jsx)(VV,{children:n.peer}),(0,C.jsx)(VV,{children:EH(e,n.accountId)}),(0,C.jsx)(VV,{children:DH(t,n.agentId)}),(0,C.jsx)(VV,{children:(0,C.jsx)(`div`,{className:`flex justify-end`,children:(0,C.jsx)(q,{size:`icon`,variant:`ghost`,"aria-label":`Delete binding`,onClick:()=>void sH(n.id).then(r),children:(0,C.jsx)(Ht,{})})})})]},n.id))})]})})]})]})]})}function mH({labelKey:e,rows:t,title:n}){return(0,C.jsxs)(vH,{children:[(0,C.jsx)(`h2`,{className:`text-base font-semibold`,children:n}),(0,C.jsx)(`div`,{className:`mt-4`,children:t.length===0?(0,C.jsx)(yH,{text:`No usage breakdown yet.`}):(0,C.jsxs)(IV,{children:[(0,C.jsx)(LV,{children:(0,C.jsxs)(zV,{children:[(0,C.jsx)(BV,{children:`Name`}),(0,C.jsx)(BV,{children:`Requests`}),(0,C.jsx)(BV,{children:`Tokens`})]})}),(0,C.jsx)(RV,{children:t.map(t=>(0,C.jsxs)(zV,{children:[(0,C.jsx)(VV,{children:String(t[e]??`unknown`)}),(0,C.jsx)(VV,{children:wH(t.requests)}),(0,C.jsx)(VV,{children:wH(t.totalTokens)})]},String(t[e])))})]})})]})}function hH({label:e,value:t}){return(0,C.jsxs)(MV,{className:`gap-0 rounded-lg border-border bg-muted/30 p-4 py-4 shadow-none`,children:[(0,C.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e}),(0,C.jsx)(`p`,{className:`mt-2 text-xl font-semibold`,children:t})]})}function gH({children:e,label:t}){return(0,C.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,C.jsx)(vv,{htmlFor:(0,b.useMemo)(()=>`${t.toLowerCase().replace(/\s+/g,`-`)}-${crypto.randomUUID()}`,[t]),children:t}),e]})}function _H({checked:e,label:t,onCheckedChange:n}){return(0,C.jsxs)(vv,{className:`flex items-center gap-2 text-sm`,children:[(0,C.jsx)(FV,{checked:e,onCheckedChange:n}),t]})}function vH({children:e}){return(0,C.jsx)(MV,{className:`natroc-soft-panel gap-0 rounded-lg border-border bg-background/70 p-4 py-4 shadow-none`,children:e})}function yH({text:e}){return(0,C.jsx)(`div`,{className:`rounded-lg border border-dashed border-border px-4 py-8 text-center text-sm text-muted-foreground`,children:e})}function bH(){let e=new URLSearchParams(window.location.search).get(`tab`);return xH(e)?e:`agents`}function xH(e){return e===`agents`||e===`usage`||e===`channels`}function SH(e){return e.trim()||null}function CH(e){return e.split(`,`).map(e=>e.trim()).filter(Boolean)}function wH(e){return new Intl.NumberFormat().format(e??0)}function TH(e){return new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`}).format(new Date(e))}function EH(e,t){return e.find(e=>e.id===t)?.displayName??`Unknown`}function DH(e,t){return e.find(e=>e.id===t)?.name??`Unknown`}function OH({className:e,...t}){return(0,C.jsx)(`div`,{"data-slot":`empty`,className:K(`flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance`,e),...t})}function kH({className:e,...t}){return(0,C.jsx)(`div`,{"data-slot":`empty-header`,className:K(`flex max-w-sm flex-col items-center gap-2`,e),...t})}var AH=wg(`mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4`}},defaultVariants:{variant:`default`}});function jH({className:e,variant:t=`default`,...n}){return(0,C.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":t,className:K(AH({variant:t,className:e})),...n})}function MH({className:e,...t}){return(0,C.jsx)(`div`,{"data-slot":`empty-title`,className:K(`font-heading text-sm font-medium tracking-tight`,e),...t})}function NH({className:e,...t}){return(0,C.jsx)(`div`,{"data-slot":`empty-description`,className:K(`text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function PH({className:e,...t}){return(0,C.jsx)(`div`,{"data-slot":`empty-content`,className:K(`flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance`,e),...t})}async function FH(){return(await J.call(`projects.list`)).projects??[]}async function IH(e,t){return(await J.call(`projects.create`,{name:e,description:t})).project}async function LH(e){await J.call(`projects.delete`,{id:e})}var RH=[`Activity`,`Name`,`Created`];function zH(e,t){let n=[...e];return t===`Name`?n.sort((e,t)=>e.name.localeCompare(t.name)):t===`Created`?n.sort((e,t)=>t.createdAt.localeCompare(e.createdAt)):n.sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt))}function BH(e){let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleDateString()}function VH(e){return(0,C.jsxs)(`svg`,{viewBox:`0 0 96 96`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`3`,"aria-hidden":`true`,...e,children:[(0,C.jsx)(`rect`,{x:`28`,y:`14`,width:`22`,height:`22`,rx:`1`}),(0,C.jsx)(`rect`,{x:`51`,y:`13`,width:`22`,height:`22`,rx:`1`}),(0,C.jsx)(`rect`,{x:`51`,y:`38`,width:`22`,height:`20`,rx:`1`}),(0,C.jsx)(`path`,{d:`M59 62V51a4 4 0 0 1 8 0v11`}),(0,C.jsx)(`path`,{d:`M67 58V49a4 4 0 0 1 8 0v14`}),(0,C.jsx)(`path`,{d:`M75 60v-8a4 4 0 0 1 8 0v15`}),(0,C.jsx)(`path`,{d:`M83 61v-6a4 4 0 0 1 8 0v17c0 10-6 16-17 16H55a4 4 0 0 1-4-4V62a4 4 0 0 1 8 0v10`}),(0,C.jsx)(`path`,{d:`M51 72h12`})]})}function HH(){let[e,t]=(0,b.useState)(`Activity`),[n,r]=(0,b.useState)(``),[i,a]=(0,b.useState)([]),[o,s]=(0,b.useState)(!0),[c,l]=(0,b.useState)(``),[u,d]=(0,b.useState)(!1),[f,p]=(0,b.useState)(``),[m,h]=(0,b.useState)(``),[g,_]=(0,b.useState)(!1),[v,y]=(0,b.useState)(``),x=(0,b.useCallback)(async()=>{s(!0),l(``);try{a(await FH())}catch(e){l(e instanceof Error?e.message:`Failed to load projects.`)}finally{s(!1)}},[]);(0,b.useEffect)(()=>{let e=window.setTimeout(()=>{x()});return()=>window.clearTimeout(e)},[x]);let S=()=>d(!0),w=()=>{p(``),h(``),y(``)},T=e=>{d(e),e||w()},E=async e=>{if(e.preventDefault(),!(!f.trim()||g)){_(!0),y(``);try{let e=await IH(f.trim(),m.trim());a(t=>[e,...t]),d(!1),w()}catch(e){y(e instanceof Error?e.message:`Failed to create project.`)}finally{_(!1)}}},D=async e=>{a(t=>t.filter(t=>t.id!==e));try{await LH(e)}catch{x()}},O=zH(i.filter(e=>{let t=n.trim().toLowerCase();return t?e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t):!0}),e);return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`section`,{className:`natroc-enter flex min-h-[calc(100svh-7rem)] w-full flex-col gap-6`,children:[(0,C.jsxs)(`div`,{className:`natroc-stagger flex flex-col gap-5`,children:[(0,C.jsxs)(`div`,{className:`flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between`,children:[(0,C.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Projects`}),(0,C.jsxs)(`div`,{className:`flex items-center gap-3 self-start sm:self-auto`,children:[(0,C.jsx)(`span`,{className:`text-sm font-medium text-muted-foreground`,children:`Sort by`}),(0,C.jsxs)(E_,{children:[(0,C.jsx)(D_,{asChild:!0,children:(0,C.jsxs)(q,{variant:`secondary`,children:[e,(0,C.jsx)(Ye,{})]})}),(0,C.jsx)(O_,{align:`end`,className:`w-36`,children:(0,C.jsx)(j_,{value:e,onValueChange:e=>t(e),children:RH.map(e=>(0,C.jsx)(M_,{value:e,children:e},e))})})]}),(0,C.jsx)(q,{onClick:S,children:`New project`})]})]}),(0,C.jsxs)(`div`,{className:`relative`,children:[(0,C.jsx)(It,{className:`pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground`}),(0,C.jsx)(jg,{"aria-label":`Search projects`,placeholder:`Search projects...`,value:n,onChange:e=>r(e.target.value),className:`h-10 rounded-lg border-transparent bg-muted/80 pl-9 text-sm focus-visible:border-ring dark:bg-muted/80`})]})]}),o?(0,C.jsx)(`div`,{className:`flex flex-1 items-center justify-center py-12 text-sm text-muted-foreground`,children:`Loading projects...`}):c?(0,C.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 py-12`,children:[(0,C.jsx)(`p`,{className:`text-sm text-destructive`,children:c}),(0,C.jsx)(q,{variant:`secondary`,onClick:()=>void x(),children:`Try again`})]}):O.length===0?(0,C.jsx)(`div`,{className:`natroc-enter flex flex-1 items-center justify-center py-12`,children:(0,C.jsxs)(OH,{className:`max-w-md border-0 p-0`,children:[(0,C.jsxs)(kH,{children:[(0,C.jsx)(jH,{className:`mb-3 text-foreground`,children:(0,C.jsx)(VH,{className:`size-20`})}),(0,C.jsx)(MH,{children:i.length===0?`Looking to start a project?`:`No projects match your search`}),(0,C.jsx)(NH,{children:`Upload materials, set custom instructions, and organize conversations in one space.`})]}),(0,C.jsx)(PH,{children:(0,C.jsx)(q,{variant:`secondary`,onClick:S,children:`New project`})})]})}):(0,C.jsx)(`div`,{className:`natroc-stagger grid gap-3 sm:grid-cols-2 lg:grid-cols-3`,children:O.map(e=>(0,C.jsxs)(`div`,{className:`natroc-soft-panel flex flex-col gap-2 rounded-lg border border-border bg-card p-4`,children:[(0,C.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,C.jsx)(`h3`,{className:`font-medium break-words`,children:e.name}),(0,C.jsx)(q,{variant:`ghost`,size:`icon`,"aria-label":`Delete ${e.name}`,onClick:()=>void D(e.id),children:(0,C.jsx)(Ht,{className:`text-muted-foreground`})})]}),e.description&&(0,C.jsx)(`p`,{className:`line-clamp-3 text-sm text-muted-foreground`,children:e.description}),(0,C.jsxs)(`p`,{className:`mt-auto text-xs text-muted-foreground`,children:[`Created `,BH(e.createdAt)]})]},e.id))})]}),(0,C.jsx)(nv,{open:u,onOpenChange:T,children:(0,C.jsxs)(ov,{className:`gap-6 rounded-lg p-6 sm:max-w-[520px]`,children:[(0,C.jsx)(lv,{className:`pr-8 text-2xl font-semibold`,children:`Create a project`}),(0,C.jsxs)(`div`,{className:`natroc-soft-panel rounded-lg bg-muted/80 p-4 dark:bg-background/80`,children:[(0,C.jsx)(`h2`,{className:`text-sm font-semibold`,children:`How to use projects`}),(0,C.jsxs)(uv,{className:`mt-3 space-y-3 text-sm leading-relaxed`,children:[(0,C.jsx)(`p`,{children:`Projects help organize your work and leverage knowledge across multiple conversations. Upload docs, code, and files to create themed collections that Natroc can reference again and again.`}),(0,C.jsx)(`p`,{children:`Start by creating a memorable title and description to organize your project. You can always edit it later.`})]})]}),(0,C.jsxs)(`form`,{className:`natroc-stagger flex flex-col gap-6`,onSubmit:E,children:[(0,C.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,C.jsx)(vv,{htmlFor:`project-name`,children:`What are you working on?`}),(0,C.jsx)(jg,{id:`project-name`,placeholder:`Name your project`,value:f,onChange:e=>p(e.target.value),className:`border-transparent bg-muted/80 dark:bg-muted/80`})]}),(0,C.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,C.jsx)(vv,{htmlFor:`project-description`,children:`What are you trying to achieve?`}),(0,C.jsx)(dv,{id:`project-description`,placeholder:`Describe your project, goals, subject, etc...`,value:m,onChange:e=>h(e.target.value),className:`min-h-20 resize-none border-transparent bg-muted/80 dark:bg-muted/80`})]}),v&&(0,C.jsx)(`p`,{className:`text-sm text-destructive`,children:v}),(0,C.jsxs)(`div`,{className:`flex justify-end gap-3`,children:[(0,C.jsx)(iv,{asChild:!0,children:(0,C.jsx)(q,{type:`button`,variant:`secondary`,children:`Cancel`})}),(0,C.jsx)(q,{type:`submit`,disabled:!f.trim()||g,children:g?`Creating...`:`Create project`})]})]})]})})]})}var UH=window.location.pathname;function WH(){return UH===`/login`?(0,C.jsx)(uV,{}):UH===`/register`?(0,C.jsx)(hV,{}):UH===`/onboarding/register`?(0,C.jsx)(rA,{}):z_()?UH===y_.home.path?(0,C.jsx)(Kv,{children:(0,C.jsx)(KB,{})}):UH===y_.projects.path?(0,C.jsx)(Kv,{children:(0,C.jsx)(HH,{})}):UH===`/agent`?(window.location.replace(`/config?tab=agents`),null):UH===y_.config.path?(0,C.jsx)(Kv,{children:(0,C.jsx)(uH,{})}):UH===y_.account.path?(0,C.jsx)(Kv,{children:(0,C.jsx)(YB,{})}):(0,C.jsx)(Hk,{}):(0,C.jsx)(uV,{})}var GH=WH();(0,x.createRoot)(document.getElementById(`root`)).render((0,C.jsx)(b.StrictMode,{children:(0,C.jsxs)(j,{children:[(0,C.jsx)(vg,{children:GH}),(0,C.jsx)(Jt,{position:`top-right`,richColors:!0})]})}));